kui-crm 0.0.197 → 0.0.198
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 +171 -109
- package/cjs/index.js.map +1 -1
- package/index.d.ts +42 -19
- package/index.js +168 -109
- package/index.js.map +1 -1
- package/package.json +1 -1
- package/types/index.d.ts +1 -1
- package/utils/index.d.ts +1 -1
package/cjs/index.js
CHANGED
|
@@ -2084,8 +2084,8 @@ function TwoOptionForAutocomplete(_a) {
|
|
|
2084
2084
|
var option = _a.option;
|
|
2085
2085
|
return (jsxRuntime.jsxs(StyledWrapper$d, __assign({ container: true, justify: "space-between" }, { children: [jsxRuntime.jsx(kuiBasic.Grid, __assign({ item: true }, { children: jsxRuntime.jsx(kuiBasic.Caption, __assign({ size: "s", weight: 500 }, { children: option.name })) })), jsxRuntime.jsx(kuiBasic.Grid, __assign({ item: true }, { children: jsxRuntime.jsx(kuiBasic.Caption, __assign({ size: "s", weight: 500, color: "fiftyP" }, { children: option.right })) }))] })));
|
|
2086
2086
|
}
|
|
2087
|
-
var StyledWrapper$d = styled__default["default"](kuiBasic.Grid)(templateObject_1$
|
|
2088
|
-
var templateObject_1$
|
|
2087
|
+
var StyledWrapper$d = styled__default["default"](kuiBasic.Grid)(templateObject_1$H || (templateObject_1$H = __makeTemplateObject(["\n padding: 8px;\n border-radius: 8px;\n cursor: pointer;\n &:hover {\n background: ", ";\n },\n"], ["\n padding: 8px;\n border-radius: 8px;\n cursor: pointer;\n &:hover {\n background: ", ";\n },\n"])), kuiBasic.theme.palette.background.light2);
|
|
2088
|
+
var templateObject_1$H;
|
|
2089
2089
|
|
|
2090
2090
|
function SquarePreviewImage(_a) {
|
|
2091
2091
|
var imageSrc = _a.imageSrc, name = _a.name, size = _a.size, other = __rest(_a, ["imageSrc", "name", "size"]);
|
|
@@ -2093,8 +2093,8 @@ function SquarePreviewImage(_a) {
|
|
|
2093
2093
|
return (jsxRuntime.jsx(StyledWrapper$c, __assign({ size: size || "lg" }, other, { children: imageSrc ? (jsxRuntime.jsx(StyledImage$7, { src: imageSrc, alt: "preview image" })) : (jsxRuntime.jsx(StyledNameWrapper, __assign({ alignItems: "center", justify: "center" }, { children: jsxRuntime.jsx(kuiBasic.Heading, __assign({ size: size === "sm" ? "h4" : "h1", colorGroup: "brand", color: "main" }, { children: formattedName !== null && formattedName !== void 0 ? formattedName : "?" })) }))) })));
|
|
2094
2094
|
}
|
|
2095
2095
|
var previewSizesStyles = {
|
|
2096
|
-
lg: react.css(templateObject_1$
|
|
2097
|
-
sm: react.css(templateObject_2$
|
|
2096
|
+
lg: react.css(templateObject_1$G || (templateObject_1$G = __makeTemplateObject(["\n width: 88px;\n height: 88px;\n border-radius: 16px;\n "], ["\n width: 88px;\n height: 88px;\n border-radius: 16px;\n "]))),
|
|
2097
|
+
sm: react.css(templateObject_2$q || (templateObject_2$q = __makeTemplateObject(["\n width: 32px;\n height: 32px;\n border-radius: 8px;\n "], ["\n width: 32px;\n height: 32px;\n border-radius: 8px;\n "]))),
|
|
2098
2098
|
};
|
|
2099
2099
|
var StyledImage$7 = styled__default["default"].img(templateObject_3$n || (templateObject_3$n = __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"])));
|
|
2100
2100
|
var StyledWrapper$c = styled__default["default"].div(templateObject_4$8 || (templateObject_4$8 = __makeTemplateObject(["\n overflow: hidden;\n ", ";\n"], ["\n overflow: hidden;\n ", ";\n"])), function (_a) {
|
|
@@ -2102,14 +2102,14 @@ var StyledWrapper$c = styled__default["default"].div(templateObject_4$8 || (temp
|
|
|
2102
2102
|
return previewSizesStyles[size];
|
|
2103
2103
|
});
|
|
2104
2104
|
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);
|
|
2105
|
-
var templateObject_1$
|
|
2105
|
+
var templateObject_1$G, templateObject_2$q, templateObject_3$n, templateObject_4$8, templateObject_5$5;
|
|
2106
2106
|
|
|
2107
2107
|
function Modal(_a) {
|
|
2108
2108
|
var open = _a.open, other = __rest(_a, ["open"]);
|
|
2109
2109
|
return jsxRuntime.jsx(StyledModal$3, __assign({ isScrollable: true, isOpen: open }, other));
|
|
2110
2110
|
}
|
|
2111
|
-
var StyledModal$3 = styled__default["default"](kuiBasic.Modal)(templateObject_1$
|
|
2112
|
-
var templateObject_1$
|
|
2111
|
+
var StyledModal$3 = styled__default["default"](kuiBasic.Modal)(templateObject_1$F || (templateObject_1$F = __makeTemplateObject(["\n max-height: calc(100% - 64px);\n .KUI-Modal_header {\n text-align: left;\n }\n .KUI-Modal_title {\n font-size: 24px;\n line-height: 32px;\n padding-bottom: 20px;\n }\n"], ["\n max-height: calc(100% - 64px);\n .KUI-Modal_header {\n text-align: left;\n }\n .KUI-Modal_title {\n font-size: 24px;\n line-height: 32px;\n padding-bottom: 20px;\n }\n"])));
|
|
2112
|
+
var templateObject_1$F;
|
|
2113
2113
|
|
|
2114
2114
|
const isValidWithMaskExp = /^[^_]+$/;
|
|
2115
2115
|
|
|
@@ -2133,8 +2133,8 @@ function AutocompleteOption(_a) {
|
|
|
2133
2133
|
var label = _a.label;
|
|
2134
2134
|
return (jsxRuntime.jsx(StyledWrapper$b, { children: jsxRuntime.jsx(kuiBasic.Caption, __assign({ size: "s", weight: 500 }, { children: label })) }));
|
|
2135
2135
|
}
|
|
2136
|
-
var StyledWrapper$b = styled__default["default"].div(templateObject_1$
|
|
2137
|
-
var templateObject_1$
|
|
2136
|
+
var StyledWrapper$b = styled__default["default"].div(templateObject_1$E || (templateObject_1$E = __makeTemplateObject(["\n padding: 8px;\n border-radius: 8px;\n cursor: pointer;\n &:hover {\n background: ", ";\n },\n"], ["\n padding: 8px;\n border-radius: 8px;\n cursor: pointer;\n &:hover {\n background: ", ";\n },\n"])), kuiBasic.theme.palette.background.light2);
|
|
2137
|
+
var templateObject_1$E;
|
|
2138
2138
|
|
|
2139
2139
|
var parentClassName$1 = "KUI-ErrorPopup_container";
|
|
2140
2140
|
var timeout = 5000;
|
|
@@ -2181,10 +2181,10 @@ function ErrorPopup(_a) {
|
|
|
2181
2181
|
var parentNode = document.querySelector(".".concat(parentClassName$1)) || createParentNode$1();
|
|
2182
2182
|
return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(react.Global, { styles: containerCSS$1 }), ReactDOM.createPortal(jsxRuntime.jsx(StyledWrapper$a, __assign({ onMouseEnter: startHover, onMouseLeave: handleMouseLeave, className: "KUI-ErrorPopup", container: true, alignItems: "center" }, { children: jsxRuntime.jsx(kuiBasic.Caption, __assign({ size: "xs", weight: 600, color: "zero" }, { children: jsxRuntime.jsx(StyledContent$1, { children: label ? "Error in ".concat(label) : "Error" }) })) })), parentNode)] }));
|
|
2183
2183
|
}
|
|
2184
|
-
var containerCSS$1 = react.css(templateObject_1$
|
|
2185
|
-
var StyledWrapper$a = styled__default["default"](kuiBasic.Grid)(templateObject_2$
|
|
2184
|
+
var containerCSS$1 = react.css(templateObject_1$D || (templateObject_1$D = __makeTemplateObject(["\n body {\n position: relative;\n }\n .KUI-ErrorPopup_container {\n display: flex;\n position: fixed;\n top: 120px;\n justify-content: center;\n flex-direction: column;\n width: 100%;\n align-items: center;\n z-index: 10000;\n }\n"], ["\n body {\n position: relative;\n }\n .KUI-ErrorPopup_container {\n display: flex;\n position: fixed;\n top: 120px;\n justify-content: center;\n flex-direction: column;\n width: 100%;\n align-items: center;\n z-index: 10000;\n }\n"])));
|
|
2185
|
+
var StyledWrapper$a = styled__default["default"](kuiBasic.Grid)(templateObject_2$p || (templateObject_2$p = __makeTemplateObject(["\n height: 46px;\n border-radius: 12px;\n background: rgba(25, 25, 25, 0.8);\n box-shadow: 0px 26px 34px rgba(0, 0, 0, 0.1);\n padding: 0 24px;\n margin-bottom: 16px;\n width: max-content;\n max-width: calc(100vh - 32px);\n &:last-child {\n margin-bottom: 0;\n }\n"], ["\n height: 46px;\n border-radius: 12px;\n background: rgba(25, 25, 25, 0.8);\n box-shadow: 0px 26px 34px rgba(0, 0, 0, 0.1);\n padding: 0 24px;\n margin-bottom: 16px;\n width: max-content;\n max-width: calc(100vh - 32px);\n &:last-child {\n margin-bottom: 0;\n }\n"])));
|
|
2186
2186
|
var StyledContent$1 = styled__default["default"].pre(templateObject_3$m || (templateObject_3$m = __makeTemplateObject(["\n margin: 0;\n padding: 0;\n"], ["\n margin: 0;\n padding: 0;\n"])));
|
|
2187
|
-
var templateObject_1$
|
|
2187
|
+
var templateObject_1$D, templateObject_2$p, templateObject_3$m;
|
|
2188
2188
|
|
|
2189
2189
|
var parentClassName = "KUI-LoadingPopup_container";
|
|
2190
2190
|
var createParentNode = function () {
|
|
@@ -2208,12 +2208,12 @@ function LoaderPopup(_a) {
|
|
|
2208
2208
|
var parentNode = document.querySelector(".".concat(parentClassName)) || createParentNode();
|
|
2209
2209
|
return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(react.Global, { styles: containerCSS }), ReactDOM.createPortal(jsxRuntime.jsxs(StyledWrapper$9, __assign({ className: "KUI-LoadingPopup", container: true, alignItems: "center" }, { children: [jsxRuntime.jsx(StyledLoader, {}), jsxRuntime.jsxs(StyledCaption$4, __assign({ size: "xs", weight: 600, color: "zero" }, { children: ["Loading ", label] })), jsxRuntime.jsx(CloseIconWrapper, __assign({ onClick: handleClose }, { children: jsxRuntime.jsx(kuiIcon.CrossWithCircleIcon, {}) }))] })), parentNode)] }));
|
|
2210
2210
|
}
|
|
2211
|
-
var containerCSS = react.css(templateObject_1$
|
|
2212
|
-
var StyledWrapper$9 = styled__default["default"](kuiBasic.Grid)(templateObject_2$
|
|
2211
|
+
var containerCSS = react.css(templateObject_1$C || (templateObject_1$C = __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"])));
|
|
2212
|
+
var StyledWrapper$9 = styled__default["default"](kuiBasic.Grid)(templateObject_2$o || (templateObject_2$o = __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"])));
|
|
2213
2213
|
var StyledCaption$4 = styled__default["default"](kuiBasic.Caption)(templateObject_3$l || (templateObject_3$l = __makeTemplateObject(["\n padding: 0 14px;\n"], ["\n padding: 0 14px;\n"])));
|
|
2214
2214
|
var StyledLoader = styled__default["default"](kuiBasic.CircularProgress)(templateObject_4$7 || (templateObject_4$7 = __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"])));
|
|
2215
2215
|
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"])));
|
|
2216
|
-
var templateObject_1$
|
|
2216
|
+
var templateObject_1$C, templateObject_2$o, templateObject_3$l, templateObject_4$7, templateObject_5$4;
|
|
2217
2217
|
|
|
2218
2218
|
function LoaderState(_a) {
|
|
2219
2219
|
var loader = _a.loader, onlyError = _a.onlyError;
|
|
@@ -2388,17 +2388,17 @@ function ModalWithMap(props) {
|
|
|
2388
2388
|
return (jsxRuntime.jsxs(StyledModal$2, __assign({ handleClose: handleClose, open: open }, { children: [jsxRuntime.jsx(kuiComplex.MapWrapper, { children: jsxRuntime.jsx(MapComponent$1, { setMap: setMap }) }), !disabled && (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(StyledInput$3, { name: "mapAddress", label: "Address", form: form, handlePlaceSelect: handlePlaceSelect }), jsxRuntime.jsx(StyledButton$5, __assign({ size: "s", onClick: form.handleSubmit(handleSave), endIcon: jsxRuntime.jsx(kuiIcon.CheckIcon, {}) }, { children: "Save" }))] }))] })));
|
|
2389
2389
|
}
|
|
2390
2390
|
var ModalWithMap$1 = mobxReact.observer(ModalWithMap);
|
|
2391
|
-
var StyledModal$2 = styled__default["default"](Modal)(templateObject_1$
|
|
2392
|
-
var StyledInput$3 = styled__default["default"](kuiComplex.InputWithAddressAutocomplete)(templateObject_2$
|
|
2391
|
+
var StyledModal$2 = styled__default["default"](Modal)(templateObject_1$B || (templateObject_1$B = __makeTemplateObject(["\n max-width: 1295px !important;\n max-height: 736px !important;\n height: 100%;\n width: 100%;\n overflow: hidden;\n position: relative;\n .KUI-Modal_close-button {\n width: 32px;\n height: 32px;\n background: white;\n border-color: ", ";\n svg {\n width: 16px;\n height: 16px;\n path {\n fill: ", ";\n }\n }\n }\n"], ["\n max-width: 1295px !important;\n max-height: 736px !important;\n height: 100%;\n width: 100%;\n overflow: hidden;\n position: relative;\n .KUI-Modal_close-button {\n width: 32px;\n height: 32px;\n background: white;\n border-color: ", ";\n svg {\n width: 16px;\n height: 16px;\n path {\n fill: ", ";\n }\n }\n }\n"])), kuiBasic.theme.palette.grey.fifteenB, kuiBasic.theme.palette.grey.seventy);
|
|
2392
|
+
var StyledInput$3 = styled__default["default"](kuiComplex.InputWithAddressAutocomplete)(templateObject_2$n || (templateObject_2$n = __makeTemplateObject(["\n position: absolute;\n top: 24px;\n left: 24px;\n max-width: 25%;\n"], ["\n position: absolute;\n top: 24px;\n left: 24px;\n max-width: 25%;\n"])));
|
|
2393
2393
|
var StyledButton$5 = styled__default["default"](kuiBasic.Button)(templateObject_3$k || (templateObject_3$k = __makeTemplateObject(["\n position: absolute;\n bottom: 24px;\n right: 24px;\n"], ["\n position: absolute;\n bottom: 24px;\n right: 24px;\n"])));
|
|
2394
|
-
var templateObject_1$
|
|
2394
|
+
var templateObject_1$B, templateObject_2$n, templateObject_3$k;
|
|
2395
2395
|
|
|
2396
2396
|
function OpenMapButton(props) {
|
|
2397
2397
|
var _a = kuiUtils.useToggle(), isModalOpen = _a[0], handleModalOpen = _a[1], handleModalClose = _a[2];
|
|
2398
2398
|
return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(StyledMapIcon, { onClick: handleModalOpen }), isModalOpen && (jsxRuntime.jsx(ModalWithMap$1, __assign({ open: isModalOpen, handleClose: handleModalClose }, props)))] }));
|
|
2399
2399
|
}
|
|
2400
|
-
var StyledMapIcon = styled__default["default"](kuiIcon.MapIcon)(templateObject_1$
|
|
2401
|
-
var templateObject_1$
|
|
2400
|
+
var StyledMapIcon = styled__default["default"](kuiIcon.MapIcon)(templateObject_1$A || (templateObject_1$A = __makeTemplateObject(["\n cursor: pointer;\n"], ["\n cursor: pointer;\n"])));
|
|
2401
|
+
var templateObject_1$A;
|
|
2402
2402
|
|
|
2403
2403
|
function InputWithMap(_a) {
|
|
2404
2404
|
var form = _a.form, name = _a.name, disabled = _a.disabled, onPlaceSelect = _a.handlePlaceSelect, inputProps = __rest(_a, ["form", "name", "disabled", "handlePlaceSelect"]);
|
|
@@ -2439,11 +2439,11 @@ function PreviewImageCard(props) {
|
|
|
2439
2439
|
var handleBlur = function () { return setCloseButtonOpacity(0); };
|
|
2440
2440
|
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: 16, height: 16 }) })), document.body)] })));
|
|
2441
2441
|
}
|
|
2442
|
-
var Wrapper$6 = styled__default["default"].div(templateObject_1$
|
|
2443
|
-
var StyledImage$6 = styled__default["default"].img(templateObject_2$
|
|
2442
|
+
var Wrapper$6 = styled__default["default"].div(templateObject_1$z || (templateObject_1$z = __makeTemplateObject(["\n margin-top: 8px;\n position: relative;\n width: 56px;\n height: 56px;\n cursor: pointer;\n user-select: none;\n"], ["\n margin-top: 8px;\n position: relative;\n width: 56px;\n height: 56px;\n cursor: pointer;\n user-select: none;\n"])));
|
|
2443
|
+
var StyledImage$6 = styled__default["default"].img(templateObject_2$m || (templateObject_2$m = __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"])));
|
|
2444
2444
|
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"])));
|
|
2445
2445
|
var StyledRemoveButton = styled__default["default"](kuiBasic.Button)(templateObject_4$6 || (templateObject_4$6 = __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"])));
|
|
2446
|
-
var templateObject_1$
|
|
2446
|
+
var templateObject_1$z, templateObject_2$m, templateObject_3$j, templateObject_4$6;
|
|
2447
2447
|
|
|
2448
2448
|
var getURLFromFile = function (fileList) {
|
|
2449
2449
|
return fileList[0] ? URL.createObjectURL(fileList[0]) : null;
|
|
@@ -2483,12 +2483,12 @@ function FileUploaderWithPreview(props) {
|
|
|
2483
2483
|
};
|
|
2484
2484
|
return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsxs(StyledWrapper$8, { children: [jsxRuntime.jsx(kuiBasic.Caption, __assign({ size: "xs", color: "fiftyP" }, { children: label })), jsxRuntime.jsx(StyledInput$2, __assign({ id: "file_input", type: "file", "data-testid": "file_input" }, formRegister, { onChange: handleChange })), filePreview ? (jsxRuntime.jsx(PreviewImageCard, { url: filePreview, onDelete: handleDelete })) : (jsxRuntime.jsx(StyledLabel$1, __assign({ htmlFor: "file_input" }, { children: jsxRuntime.jsx(StyledCircleButton, __assign({ isCircle: true, size: "l", variant: "grayLight" }, { children: jsxRuntime.jsx(kuiIcon.PlusIcon, {}) })) })))] }), error && (jsxRuntime.jsx(StyledErrorMessage, __assign({ size: "xs", colorGroup: "red", color: "seventy" }, { children: error })))] }));
|
|
2485
2485
|
}
|
|
2486
|
-
var StyledWrapper$8 = styled__default["default"].div(templateObject_1$
|
|
2487
|
-
var StyledLabel$1 = styled__default["default"].label(templateObject_2$
|
|
2486
|
+
var StyledWrapper$8 = styled__default["default"].div(templateObject_1$y || (templateObject_1$y = __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);
|
|
2487
|
+
var StyledLabel$1 = styled__default["default"].label(templateObject_2$l || (templateObject_2$l = __makeTemplateObject(["\n margin-top: 8px;\n display: block;\n cursor: pointer;\n"], ["\n margin-top: 8px;\n display: block;\n cursor: pointer;\n"])));
|
|
2488
2488
|
var StyledCircleButton = styled__default["default"](kuiBasic.Button)(templateObject_3$i || (templateObject_3$i = __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);
|
|
2489
2489
|
var StyledInput$2 = styled__default["default"].input(templateObject_4$5 || (templateObject_4$5 = __makeTemplateObject(["\n display: none;\n"], ["\n display: none;\n"])));
|
|
2490
2490
|
var StyledErrorMessage = styled__default["default"](kuiBasic.Caption)(templateObject_5$3 || (templateObject_5$3 = __makeTemplateObject(["\n margin-top: 4px;\n"], ["\n margin-top: 4px;\n"])));
|
|
2491
|
-
var templateObject_1$
|
|
2491
|
+
var templateObject_1$y, templateObject_2$l, templateObject_3$i, templateObject_4$5, templateObject_5$3;
|
|
2492
2492
|
|
|
2493
2493
|
var companyFields = [
|
|
2494
2494
|
{
|
|
@@ -2532,12 +2532,12 @@ FormBottom.defaultProps = {
|
|
|
2532
2532
|
variant: "create",
|
|
2533
2533
|
label: "Create",
|
|
2534
2534
|
};
|
|
2535
|
-
var StyledLoading = styled__default["default"](kuiComplex.Loading)(templateObject_1$
|
|
2535
|
+
var StyledLoading = styled__default["default"](kuiComplex.Loading)(templateObject_1$x || (templateObject_1$x = __makeTemplateObject(["\n .MuiCircularProgress-root {\n color: ", " !important;\n height: 32px !important;\n width: 32px !important;\n }\n"], ["\n .MuiCircularProgress-root {\n color: ", " !important;\n height: 32px !important;\n width: 32px !important;\n }\n"])), kuiBasic.theme.palette.grey.fiftyP);
|
|
2536
2536
|
function Footer(_a) {
|
|
2537
2537
|
_a.isFixed; var children = _a.children, otherProps = __rest(_a, ["isFixed", "children"]);
|
|
2538
2538
|
return jsxRuntime$1.jsx("div", __assign({}, otherProps, { children: children }));
|
|
2539
2539
|
}
|
|
2540
|
-
var StyledFooter = styled__default["default"](Footer)(templateObject_2$
|
|
2540
|
+
var StyledFooter = styled__default["default"](Footer)(templateObject_2$k || (templateObject_2$k = __makeTemplateObject(["\n background: ", ";\n border-radius: 0 0 12px 12px;\n z-index: ", ";\n position: ", ";\n bottom: ", ";\n left: ", ";\n"], ["\n background: ", ";\n border-radius: 0 0 12px 12px;\n z-index: ", ";\n position: ", ";\n bottom: ", ";\n left: ", ";\n"])), kuiBasic.theme.palette.grey.zero, function (_a) {
|
|
2541
2541
|
var isFixed = _a.isFixed;
|
|
2542
2542
|
return (isFixed ? 1000 : 1);
|
|
2543
2543
|
}, function (_a) {
|
|
@@ -2551,7 +2551,7 @@ var StyledFooter = styled__default["default"](Footer)(templateObject_2$j || (tem
|
|
|
2551
2551
|
return (isFixed ? 0 : "auto");
|
|
2552
2552
|
});
|
|
2553
2553
|
var StyledEndButtonWrapper = styled__default["default"].div(templateObject_3$h || (templateObject_3$h = __makeTemplateObject(["\n margin-right: 20px;\n"], ["\n margin-right: 20px;\n"])));
|
|
2554
|
-
var templateObject_1$
|
|
2554
|
+
var templateObject_1$x, templateObject_2$k, templateObject_3$h;
|
|
2555
2555
|
|
|
2556
2556
|
function CompanyCreationForm(_a) {
|
|
2557
2557
|
var handleSubmit = _a.handleSubmit;
|
|
@@ -2736,8 +2736,8 @@ HeadingWithButton.defaultProps = {
|
|
|
2736
2736
|
variant: "white",
|
|
2737
2737
|
showButton: true,
|
|
2738
2738
|
};
|
|
2739
|
-
var StyledWrapper$7 = styled__default["default"](kuiBasic.Grid)(templateObject_1$
|
|
2740
|
-
var templateObject_1$
|
|
2739
|
+
var StyledWrapper$7 = styled__default["default"](kuiBasic.Grid)(templateObject_1$w || (templateObject_1$w = __makeTemplateObject(["\n height: 32px;\n"], ["\n height: 32px;\n"])));
|
|
2740
|
+
var templateObject_1$w;
|
|
2741
2741
|
|
|
2742
2742
|
var meterFeaturesFieldsSchema = {
|
|
2743
2743
|
noTariff: yup__namespace.boolean(),
|
|
@@ -2873,10 +2873,10 @@ var PartialPayer = function (props) {
|
|
|
2873
2873
|
PartialPayer.defaultProps = {
|
|
2874
2874
|
variant: "radio",
|
|
2875
2875
|
};
|
|
2876
|
-
var StyledFieldsGroup = styled__default["default"](kuiBasic.Grid)(templateObject_1$
|
|
2877
|
-
var StyledRadioGroup$1 = styled__default["default"](kuiComplex.RadioGroupWithLabel)(templateObject_2$
|
|
2876
|
+
var StyledFieldsGroup = styled__default["default"](kuiBasic.Grid)(templateObject_1$v || (templateObject_1$v = __makeTemplateObject(["\n background: ", ";\n border-radius: 0 0 8px 8px;\n"], ["\n background: ", ";\n border-radius: 0 0 8px 8px;\n"])), kuiBasic.theme.palette.background.light1);
|
|
2877
|
+
var StyledRadioGroup$1 = styled__default["default"](kuiComplex.RadioGroupWithLabel)(templateObject_2$j || (templateObject_2$j = __makeTemplateObject(["\n padding: 10px;\n background: white;\n"], ["\n padding: 10px;\n background: white;\n"])));
|
|
2878
2878
|
var StyledWrapper$6 = styled__default["default"](kuiBasic.Grid)(templateObject_3$g || (templateObject_3$g = __makeTemplateObject(["\n padding-top: 16px;\n"], ["\n padding-top: 16px;\n"])));
|
|
2879
|
-
var templateObject_1$
|
|
2879
|
+
var templateObject_1$v, templateObject_2$j, templateObject_3$g;
|
|
2880
2880
|
|
|
2881
2881
|
var CommonTariffFieldsSchema = yup__namespace.object().shape({
|
|
2882
2882
|
region: yup__namespace.object({
|
|
@@ -2962,9 +2962,9 @@ function TariffReplacementField(props) {
|
|
|
2962
2962
|
};
|
|
2963
2963
|
return (jsxRuntime.jsx(StyledInputWrapper, { children: jsxRuntime.jsx(TariffGroupAutocomplete$1, __assign({ label: !value && "Tariff group", endIcon: value && jsxRuntime.jsx(StyledCrossIcon, { onClick: handleDelete }), form: form, name: name, filter: "&can_be_replaced=true" }, inputProps)) }));
|
|
2964
2964
|
}
|
|
2965
|
-
var StyledInputWrapper = styled__default["default"].div(templateObject_1$
|
|
2966
|
-
var StyledCrossIcon = styled__default["default"](kuiIcon.CloseIcon)(templateObject_2$
|
|
2967
|
-
var templateObject_1$
|
|
2965
|
+
var StyledInputWrapper = styled__default["default"].div(templateObject_1$u || (templateObject_1$u = __makeTemplateObject(["\n padding-top: 16px;\n &:first-child {\n padding-top: 12px;\n }\n"], ["\n padding-top: 16px;\n &:first-child {\n padding-top: 12px;\n }\n"])));
|
|
2966
|
+
var StyledCrossIcon = styled__default["default"](kuiIcon.CloseIcon)(templateObject_2$i || (templateObject_2$i = __makeTemplateObject(["\n cursor: pointer;\n margin-right: -6px;\n width: 22px;\n height: 22px;\n path {\n fill: ", ";\n }\n"], ["\n cursor: pointer;\n margin-right: -6px;\n width: 22px;\n height: 22px;\n path {\n fill: ", ";\n }\n"])), kuiBasic.theme.palette.grey.fiftyP);
|
|
2967
|
+
var templateObject_1$u, templateObject_2$i;
|
|
2968
2968
|
|
|
2969
2969
|
function TariffReplacementFields(_a) {
|
|
2970
2970
|
var form = _a.form, resource = _a.resource, setReplaceable = _a.setReplaceable;
|
|
@@ -2983,8 +2983,8 @@ function TariffReplacementFields(_a) {
|
|
|
2983
2983
|
}, [fields]);
|
|
2984
2984
|
return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(StyledHeadingWithButton, { title: "REPLACEABLE TARIFF GROUPS", onClick: addTariff, isEditing: true }), jsxRuntime.jsx("div", { children: fields.map(function (item, key) { return (jsxRuntime.jsx(TariffReplacementField, { name: "replaceableTariffsGroups.".concat(key), form: form, resource: resource, index: key, remove: remove }, fields[key].id)); }) })] }));
|
|
2985
2985
|
}
|
|
2986
|
-
var StyledHeadingWithButton = styled__default["default"](HeadingWithButton)(templateObject_1$
|
|
2987
|
-
var templateObject_1$
|
|
2986
|
+
var StyledHeadingWithButton = styled__default["default"](HeadingWithButton)(templateObject_1$t || (templateObject_1$t = __makeTemplateObject(["\n padding-bottom: 0;\n padding-top: 8px;\n h4 {\n font-size: 12px;\n line-height: 14px;\n font-weight: 600;\n }\n"], ["\n padding-bottom: 0;\n padding-top: 8px;\n h4 {\n font-size: 12px;\n line-height: 14px;\n font-weight: 600;\n }\n"])));
|
|
2987
|
+
var templateObject_1$t;
|
|
2988
2988
|
|
|
2989
2989
|
function CommonTariffFields(props) {
|
|
2990
2990
|
var resource = props.resource, setResource = props.setResource, setReplaceable = props.setReplaceable, creationForm = props.creationForm;
|
|
@@ -3008,8 +3008,8 @@ function CommonTariffFields(props) {
|
|
|
3008
3008
|
}), jsxRuntime.jsx(kuiBasic.Grid, __assign({ item: true, xs: 12 }, { children: jsxRuntime.jsx(TariffReplacementFields, { setReplaceable: setReplaceable, resource: resource, form: form }) }))] })) })), jsxRuntime.jsx(FormBottom, { label: "Next", endIcon: jsxRuntime.jsx(kuiIcon.NextArrowIcon, {}), type: "button", handleClick: form.handleSubmit(handleSubmit) })] }));
|
|
3009
3009
|
}
|
|
3010
3010
|
var CommonTariffFields$1 = mobxReact.observer(CommonTariffFields);
|
|
3011
|
-
var StyledRadioGroup = styled__default["default"](kuiComplex.RadioGroupWithLabel)(templateObject_1$
|
|
3012
|
-
var templateObject_1$
|
|
3011
|
+
var StyledRadioGroup = styled__default["default"](kuiComplex.RadioGroupWithLabel)(templateObject_1$s || (templateObject_1$s = __makeTemplateObject(["\n padding: 3px;\n"], ["\n padding: 3px;\n"])));
|
|
3012
|
+
var templateObject_1$s;
|
|
3013
3013
|
|
|
3014
3014
|
var ChangeReasonTariffFieldsSchema = yup__namespace.object().shape({
|
|
3015
3015
|
reason: yup__namespace.object({
|
|
@@ -3059,8 +3059,8 @@ function ElectricityTariffCreationFields(props) {
|
|
|
3059
3059
|
};
|
|
3060
3060
|
return (jsxRuntime.jsxs("form", { children: [jsxRuntime.jsxs(kuiBasic.Box, __assign({ pl: 5, pr: 5, mb: 3 }, { children: [jsxRuntime.jsx(StyledInput$1, { form: form, name: "T1", label: "One-part", type: "number", step: 0.001 }), jsxRuntime.jsx(StyledInput$1, { form: form, name: "T2", label: "Two-part", type: "number", step: 0.001 }), jsxRuntime.jsx(StyledInput$1, { form: form, name: "T3", label: "Three-part", type: "number", step: 0.001 })] })), jsxRuntime.jsx(FormBottom, { label: isReplaceable ? "Next" : "Create", endIcon: isReplaceable ? jsxRuntime.jsx(kuiIcon.NextArrowIcon, {}) : jsxRuntime.jsx(kuiIcon.CheckIcon, {}), type: "button", handleClick: form.handleSubmit(handleFormSubmit) })] }));
|
|
3061
3061
|
}
|
|
3062
|
-
var StyledInput$1 = styled__default["default"](kuiComplex.InputWithController)(templateObject_1$
|
|
3063
|
-
var templateObject_1$
|
|
3062
|
+
var StyledInput$1 = styled__default["default"](kuiComplex.InputWithController)(templateObject_1$r || (templateObject_1$r = __makeTemplateObject(["\n margin-top: 16px;\n &:first-child {\n margin-top: 0;\n }\n"], ["\n margin-top: 16px;\n &:first-child {\n margin-top: 0;\n }\n"])));
|
|
3063
|
+
var templateObject_1$r;
|
|
3064
3064
|
|
|
3065
3065
|
var WaterTariffFieldsSchema = yup__namespace.object().shape({
|
|
3066
3066
|
cold: yup__namespace
|
|
@@ -3092,8 +3092,8 @@ function WaterTariffCreationFields(props) {
|
|
|
3092
3092
|
};
|
|
3093
3093
|
return (jsxRuntime.jsxs("form", { children: [jsxRuntime.jsxs(kuiBasic.Box, __assign({ pl: 5, pr: 5, mb: 3 }, { children: [jsxRuntime.jsx(StyledInput, { form: form, name: "cold", label: "Cold", type: "number", step: 0.001 }), jsxRuntime.jsx(StyledInput, { form: form, name: "hot", label: "Hot", type: "number", step: 0.001 }), jsxRuntime.jsx(StyledInput, { form: form, name: "sewerage", label: "Sewer", type: "number", step: 0.001 })] })), jsxRuntime.jsx(FormBottom, { label: isReplaceable ? "Next" : "Create", endIcon: isReplaceable ? jsxRuntime.jsx(kuiIcon.NextArrowIcon, {}) : jsxRuntime.jsx(kuiIcon.CheckIcon, {}), type: "button", handleClick: form.handleSubmit(handleFormSubmit) })] }));
|
|
3094
3094
|
}
|
|
3095
|
-
var StyledInput = styled__default["default"](kuiComplex.InputWithController)(templateObject_1$
|
|
3096
|
-
var templateObject_1$
|
|
3095
|
+
var StyledInput = styled__default["default"](kuiComplex.InputWithController)(templateObject_1$q || (templateObject_1$q = __makeTemplateObject(["\n margin-top: 16px;\n &:first-child {\n margin-top: 0;\n }\n"], ["\n margin-top: 16px;\n &:first-child {\n margin-top: 0;\n }\n"])));
|
|
3096
|
+
var templateObject_1$q;
|
|
3097
3097
|
|
|
3098
3098
|
var SingleTariffFieldsSchema = yup__namespace.object().shape({
|
|
3099
3099
|
value: yup__namespace
|
|
@@ -3210,9 +3210,9 @@ var LabelWithHint = function (props) {
|
|
|
3210
3210
|
var label = props.label, hintMessage = props.hintMessage;
|
|
3211
3211
|
return (jsxRuntime.jsxs(kuiBasic.Grid, __assign({ container: true, alignItems: "center" }, { children: [jsxRuntime.jsx(kuiBasic.Caption, __assign({ weight: 500, size: "s" }, { children: label })), jsxRuntime.jsx(StyledTooltip$1, __assign({ content: jsxRuntime.jsx(kuiBasic.Caption, __assign({ size: "xs" }, { children: hintMessage })) }, { children: jsxRuntime.jsx(StyledIcon$1, {}) }))] })));
|
|
3212
3212
|
};
|
|
3213
|
-
var StyledIcon$1 = styled__default["default"](kuiIcon.QuestionIcon)(templateObject_1$
|
|
3214
|
-
var StyledTooltip$1 = styled__default["default"](kuiComplex.Tooltip)(templateObject_2$
|
|
3215
|
-
var templateObject_1$
|
|
3213
|
+
var StyledIcon$1 = styled__default["default"](kuiIcon.QuestionIcon)(templateObject_1$p || (templateObject_1$p = __makeTemplateObject(["\n margin-left: 4px;\n path {\n fill: ", ";\n }\n"], ["\n margin-left: 4px;\n path {\n fill: ", ";\n }\n"])), kuiBasic.theme.palette.grey.fiftyP);
|
|
3214
|
+
var StyledTooltip$1 = styled__default["default"](kuiComplex.Tooltip)(templateObject_2$h || (templateObject_2$h = __makeTemplateObject(["\n width: fit-content;\n .Tooltip_content {\n z-index: auto;\n }\n"], ["\n width: fit-content;\n .Tooltip_content {\n z-index: auto;\n }\n"])));
|
|
3215
|
+
var templateObject_1$p, templateObject_2$h;
|
|
3216
3216
|
|
|
3217
3217
|
var CheckboxWithHint = function (props) {
|
|
3218
3218
|
var hintMessage = props.hintMessage, label = props.label, other = __rest(props, ["hintMessage", "label"]);
|
|
@@ -3402,8 +3402,8 @@ function TableBottomLoading(_a) {
|
|
|
3402
3402
|
paddingTop: isLoading ? 20 : 0,
|
|
3403
3403
|
} }, { children: isLoading && jsxRuntime$1.jsx(kuiComplex.Loading, { height: "auto" }) })));
|
|
3404
3404
|
}
|
|
3405
|
-
var StyledWrapper$5 = styled__default["default"].div(templateObject_1$
|
|
3406
|
-
var templateObject_1$
|
|
3405
|
+
var StyledWrapper$5 = styled__default["default"].div(templateObject_1$o || (templateObject_1$o = __makeTemplateObject(["\n transition: all ease-out 0.3s;\n"], ["\n transition: all ease-out 0.3s;\n"])));
|
|
3406
|
+
var templateObject_1$o;
|
|
3407
3407
|
|
|
3408
3408
|
function CopyButton(_a) {
|
|
3409
3409
|
var text = _a.text, otherProps = __rest(_a, ["text"]);
|
|
@@ -3424,23 +3424,23 @@ function CopyButton(_a) {
|
|
|
3424
3424
|
}, [isCopied]);
|
|
3425
3425
|
return (jsxRuntime.jsxs(Wrapper$5, __assign({ container: true, alignItems: "center" }, { children: [jsxRuntime.jsx(CopyIconStyled, __assign({ onClick: handleClick, width: 20, height: 20 }, otherProps)), jsxRuntime.jsx(CardWrapper, __assign({ isCopied: isCopied }, { children: jsxRuntime.jsx(StyledCaption$3, __assign({ size: "xs", disableUserSelect: true }, { children: "Copied to Clipboard" })) }))] })));
|
|
3426
3426
|
}
|
|
3427
|
-
var CopyIconStyled = styled__default["default"](kuiIcon.CopyIcon)(templateObject_1$
|
|
3428
|
-
var StyledCaption$3 = styled__default["default"](kuiBasic.Caption)(templateObject_2$
|
|
3427
|
+
var CopyIconStyled = styled__default["default"](kuiIcon.CopyIcon)(templateObject_1$n || (templateObject_1$n = __makeTemplateObject(["\n cursor: pointer;\n path {\n fill: ", ";\n transition: all ease-out 0.3s;\n }\n &:hover {\n path {\n fill: ", ";\n }\n }\n"], ["\n cursor: pointer;\n path {\n fill: ", ";\n transition: all ease-out 0.3s;\n }\n &:hover {\n path {\n fill: ", ";\n }\n }\n"])), kuiBasic.theme.palette.grey.thirty, kuiBasic.theme.palette.grey.seventy);
|
|
3428
|
+
var StyledCaption$3 = styled__default["default"](kuiBasic.Caption)(templateObject_2$g || (templateObject_2$g = __makeTemplateObject(["\n -webkit-text-fill-color: ", ";\n"], ["\n -webkit-text-fill-color: ", ";\n"])), kuiBasic.theme.palette.grey.seventy);
|
|
3429
3429
|
var CardWrapper = styled__default["default"].div(templateObject_3$f || (templateObject_3$f = __makeTemplateObject(["\n opacity: ", ";\n background: #ffffff;\n box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);\n border-radius: 12px;\n height: 48px;\n width: 217px;\n padding: 0 16px;\n display: flex;\n align-items: center;\n position: absolute;\n top: -2px;\n right: -227px;\n transition: opacity ease-out 0.3s;\n pointer-events: none;\n box-sizing: border-box;\n z-index: 10;\n @media (max-width: 1750px) {\n right: 0;\n top: unset;\n bottom: -50px;\n z-index: 10;\n }\n @media (max-width: ", "px) {\n position: fixed;\n bottom: 24px;\n right: calc(50% - 217px / 2);\n }\n"], ["\n opacity: ", ";\n background: #ffffff;\n box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);\n border-radius: 12px;\n height: 48px;\n width: 217px;\n padding: 0 16px;\n display: flex;\n align-items: center;\n position: absolute;\n top: -2px;\n right: -227px;\n transition: opacity ease-out 0.3s;\n pointer-events: none;\n box-sizing: border-box;\n z-index: 10;\n @media (max-width: 1750px) {\n right: 0;\n top: unset;\n bottom: -50px;\n z-index: 10;\n }\n @media (max-width: ", "px) {\n position: fixed;\n bottom: 24px;\n right: calc(50% - 217px / 2);\n }\n"])), function (_a) {
|
|
3430
3430
|
var isCopied = _a.isCopied;
|
|
3431
3431
|
return (isCopied ? 1 : 0);
|
|
3432
3432
|
}, kuiBasic.theme.breakpoints.sm);
|
|
3433
3433
|
var Wrapper$5 = styled__default["default"](kuiBasic.Grid)(templateObject_4$4 || (templateObject_4$4 = __makeTemplateObject(["\n width: auto;\n position: relative;\n"], ["\n width: auto;\n position: relative;\n"])));
|
|
3434
|
-
var templateObject_1$
|
|
3434
|
+
var templateObject_1$n, templateObject_2$g, templateObject_3$f, templateObject_4$4;
|
|
3435
3435
|
|
|
3436
3436
|
var GalleryNavigation = function (_a) {
|
|
3437
3437
|
var handlePrev = _a.handlePrev, handleNext = _a.handleNext;
|
|
3438
3438
|
return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(PrevButton, __assign({ isCircle: true, size: "s", variant: "blur", onClick: handlePrev }, { children: jsxRuntime.jsx(kuiIcon.HalfPrevArrowIcon, {}) })), jsxRuntime.jsx(NextButton, __assign({ isCircle: true, size: "s", variant: "blur", onClick: handleNext }, { children: jsxRuntime.jsx(kuiIcon.HalfArrowNextIcon, {}) }))] }));
|
|
3439
3439
|
};
|
|
3440
|
-
var buttonStyles = react.css(templateObject_1$
|
|
3441
|
-
var NextButton = styled__default["default"](kuiBasic.Button)(templateObject_2$
|
|
3440
|
+
var buttonStyles = react.css(templateObject_1$m || (templateObject_1$m = __makeTemplateObject(["\n position: absolute;\n top: calc(50% - 20px);\n z-index: 10;\n @media (max-width: 900px) {\n display: none;\n }\n"], ["\n position: absolute;\n top: calc(50% - 20px);\n z-index: 10;\n @media (max-width: 900px) {\n display: none;\n }\n"])));
|
|
3441
|
+
var NextButton = styled__default["default"](kuiBasic.Button)(templateObject_2$f || (templateObject_2$f = __makeTemplateObject(["\n right: 24px;\n ", "\n"], ["\n right: 24px;\n ", "\n"])), buttonStyles);
|
|
3442
3442
|
var PrevButton = styled__default["default"](kuiBasic.Button)(templateObject_3$e || (templateObject_3$e = __makeTemplateObject(["\n left: 24px;\n ", "\n"], ["\n left: 24px;\n ", "\n"])), buttonStyles);
|
|
3443
|
-
var templateObject_1$
|
|
3443
|
+
var templateObject_1$m, templateObject_2$f, templateObject_3$e;
|
|
3444
3444
|
|
|
3445
3445
|
var GalleryThumbnails = function (_a) {
|
|
3446
3446
|
var images = _a.images, activeSlide = _a.activeSlide, handleChange = _a.handleChange;
|
|
@@ -3456,13 +3456,13 @@ var GalleryThumbnails = function (_a) {
|
|
|
3456
3456
|
// css={index === activeSlide && activeStyles(theme)}
|
|
3457
3457
|
onClick: function () { return handleChange(index); } }, { children: jsxRuntime$1.jsx(StyledImage$5, { active: index === activeSlide, src: image.mediumImageUrl, alt: "slide" }) }), index)); }) })) }));
|
|
3458
3458
|
};
|
|
3459
|
-
var Wrapper$4 = styled__default["default"].div(templateObject_1$
|
|
3460
|
-
var StyledImage$5 = styled__default["default"].img(templateObject_2$
|
|
3459
|
+
var Wrapper$4 = styled__default["default"].div(templateObject_1$l || (templateObject_1$l = __makeTemplateObject(["\n padding: 16px;\n background-color: ", ";\n @media (max-width: 601px) {\n padding: 14px 16px 16px;\n }\n"], ["\n padding: 16px;\n background-color: ", ";\n @media (max-width: 601px) {\n padding: 14px 16px 16px;\n }\n"])), kuiBasic.theme.palette.grey.zero);
|
|
3460
|
+
var StyledImage$5 = styled__default["default"].img(templateObject_2$e || (templateObject_2$e = __makeTemplateObject(["\n width: 100%;\n height: 100%;\n object-fit: cover;\n border-radius: 8px;\n box-sizing: border-box;\n border: 2px solid\n ", ";\n"], ["\n width: 100%;\n height: 100%;\n object-fit: cover;\n border-radius: 8px;\n box-sizing: border-box;\n border: 2px solid\n ", ";\n"])), function (_a) {
|
|
3461
3461
|
var active = _a.active;
|
|
3462
3462
|
return (active ? kuiBasic.theme.palette.brand.main : "transparent");
|
|
3463
3463
|
});
|
|
3464
3464
|
var StyledSlide$2 = styled__default["default"].div(templateObject_3$d || (templateObject_3$d = __makeTemplateObject(["\n width: 80px;\n height: 80px;\n //border-radius: 6px;\n @media (max-width: 601px) {\n width: 48px;\n height: 48px;\n }\n"], ["\n width: 80px;\n height: 80px;\n //border-radius: 6px;\n @media (max-width: 601px) {\n width: 48px;\n height: 48px;\n }\n"])));
|
|
3465
|
-
var templateObject_1$
|
|
3465
|
+
var templateObject_1$l, templateObject_2$e, templateObject_3$d;
|
|
3466
3466
|
|
|
3467
3467
|
var GallerySlider = function (_a) {
|
|
3468
3468
|
var images = _a.images, currentIndex = _a.currentIndex, updateCurrentIndex = _a.updateCurrentIndex, swiperRef = _a.swiperRef;
|
|
@@ -3481,10 +3481,10 @@ var GallerySlider = function (_a) {
|
|
|
3481
3481
|
return null;
|
|
3482
3482
|
return (jsxRuntime.jsx(StyledWrapper$4, { children: jsxRuntime.jsx(Swiper__default["default"], __assign({}, params, { ref: swiperRef }, { children: images.map(function (image, key) { return (jsxRuntime.jsx(StyledSlide$1, { children: jsxRuntime.jsx(StyledImage$4, { src: image.largeImageUrl, alt: "slide" }) }, key)); }) })) }));
|
|
3483
3483
|
};
|
|
3484
|
-
var StyledWrapper$4 = styled__default["default"].div(templateObject_1$
|
|
3485
|
-
var StyledSlide$1 = styled__default["default"].div(templateObject_2$
|
|
3484
|
+
var StyledWrapper$4 = styled__default["default"].div(templateObject_1$k || (templateObject_1$k = __makeTemplateObject(["\n padding-top: 64px;\n background-color: #191919;\n"], ["\n padding-top: 64px;\n background-color: #191919;\n"])));
|
|
3485
|
+
var StyledSlide$1 = styled__default["default"].div(templateObject_2$d || (templateObject_2$d = __makeTemplateObject(["\n overflow: hidden;\n border-radius: 14px;\n background-color: #191919;\n width: 100%;\n display: flex;\n justify-content: center;\n align-items: center;\n height: calc(100vh - 64px - 112px - 64px);\n margin-top: -1px;\n @media (max-width: 601px) {\n border-radius: 8px;\n height: calc(75vh - 78px - 64px);\n }\n"], ["\n overflow: hidden;\n border-radius: 14px;\n background-color: #191919;\n width: 100%;\n display: flex;\n justify-content: center;\n align-items: center;\n height: calc(100vh - 64px - 112px - 64px);\n margin-top: -1px;\n @media (max-width: 601px) {\n border-radius: 8px;\n height: calc(75vh - 78px - 64px);\n }\n"])));
|
|
3486
3486
|
var StyledImage$4 = styled__default["default"].img(templateObject_3$c || (templateObject_3$c = __makeTemplateObject(["\n width: auto;\n height: 100%;\n @media (max-width: 601px) {\n width: 100%;\n height: auto;\n }\n"], ["\n width: auto;\n height: 100%;\n @media (max-width: 601px) {\n width: 100%;\n height: auto;\n }\n"])));
|
|
3487
|
-
var templateObject_1$
|
|
3487
|
+
var templateObject_1$k, templateObject_2$d, templateObject_3$c;
|
|
3488
3488
|
|
|
3489
3489
|
var GalleryWithThumbnails = React.forwardRef(function (_a) {
|
|
3490
3490
|
var images = _a.images, activeSlide = _a.activeSlide, onDelete = _a.onDelete, otherProps = __rest(_a, ["images", "activeSlide", "onDelete"]);
|
|
@@ -3515,10 +3515,10 @@ var GalleryWithThumbnails = React.forwardRef(function (_a) {
|
|
|
3515
3515
|
}
|
|
3516
3516
|
return (jsxRuntime.jsx(StyledModal$1, __assign({ "data-testid": "gallery_modal", icon: onDelete && (jsxRuntime.jsx(StyledButton$4, __assign({ isCircle: true, onClick: handleDelete, size: "xs", variant: "transparentLight" }, { children: jsxRuntime.jsx(kuiIcon.TrashIcon, { width: 16, height: 16 }) }))) }, otherProps, { children: jsxRuntime.jsxs(Wrapper$3, { children: [jsxRuntime.jsx(GallerySlider, { images: images, currentIndex: currentIndex, updateCurrentIndex: updateCurrentIndex, swiperRef: swiperRef }), jsxRuntime.jsx(GalleryThumbnails, { images: images, activeSlide: currentIndex, handleChange: handleChange }), jsxRuntime.jsx(GalleryNavigation, { handlePrev: handlePrev, handleNext: handleNext })] }) })));
|
|
3517
3517
|
});
|
|
3518
|
-
var StyledModal$1 = styled__default["default"](kuiBasic.Modal)(templateObject_1$
|
|
3519
|
-
var Wrapper$3 = styled__default["default"].div(templateObject_2$
|
|
3518
|
+
var StyledModal$1 = styled__default["default"](kuiBasic.Modal)(templateObject_1$j || (templateObject_1$j = __makeTemplateObject(["\n width: 1248px;\n height: calc(100vh - 64px);\n max-height: 960px;\n border-radius: 16px;\n overflow: hidden;\n @media (max-width: 601px) {\n height: 75vh;\n }\n .KUI-Modal_close-button {\n path {\n fill: white;\n }\n @media (max-width: 601px) {\n path {\n fill: ", ";\n }\n }\n }\n"], ["\n width: 1248px;\n height: calc(100vh - 64px);\n max-height: 960px;\n border-radius: 16px;\n overflow: hidden;\n @media (max-width: 601px) {\n height: 75vh;\n }\n .KUI-Modal_close-button {\n path {\n fill: white;\n }\n @media (max-width: 601px) {\n path {\n fill: ", ";\n }\n }\n }\n"])), kuiBasic.theme.palette.grey.fourty);
|
|
3519
|
+
var Wrapper$3 = styled__default["default"].div(templateObject_2$c || (templateObject_2$c = __makeTemplateObject(["\n width: 100%;\n height: 100%;\n position: relative;\n"], ["\n width: 100%;\n height: 100%;\n position: relative;\n"])));
|
|
3520
3520
|
var StyledButton$4 = styled__default["default"](kuiBasic.Button)(templateObject_3$b || (templateObject_3$b = __makeTemplateObject(["\n @media (min-width: 901px) {\n display: none;\n }\n"], ["\n @media (min-width: 901px) {\n display: none;\n }\n"])));
|
|
3521
|
-
var templateObject_1$
|
|
3521
|
+
var templateObject_1$j, templateObject_2$c, templateObject_3$b;
|
|
3522
3522
|
|
|
3523
3523
|
var ImageCard = React.forwardRef(function (_a) {
|
|
3524
3524
|
var url = _a.url, onClick = _a.onClick, index = _a.index, otherProps = __rest(_a, ["url", "onClick", "index"]);
|
|
@@ -3527,7 +3527,7 @@ var ImageCard = React.forwardRef(function (_a) {
|
|
|
3527
3527
|
};
|
|
3528
3528
|
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, {}) })] })));
|
|
3529
3529
|
});
|
|
3530
|
-
var Wrapper$2 = styled__default["default"].div(templateObject_1$
|
|
3530
|
+
var Wrapper$2 = styled__default["default"].div(templateObject_1$i || (templateObject_1$i = __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) {
|
|
3531
3531
|
var width = _a.width;
|
|
3532
3532
|
return width || 56;
|
|
3533
3533
|
}, function (_a) {
|
|
@@ -3540,16 +3540,16 @@ var Wrapper$2 = styled__default["default"].div(templateObject_1$h || (templateOb
|
|
|
3540
3540
|
var width = _a.width, mobileWidth = _a.mobileWidth;
|
|
3541
3541
|
return mobileWidth || width || 56;
|
|
3542
3542
|
});
|
|
3543
|
-
var StyledImage$3 = styled__default["default"].img(templateObject_2$
|
|
3543
|
+
var StyledImage$3 = styled__default["default"].img(templateObject_2$b || (templateObject_2$b = __makeTemplateObject(["\n width: 100%;\n height: 100%;\n object-fit: cover;\n"], ["\n width: 100%;\n height: 100%;\n object-fit: cover;\n"])));
|
|
3544
3544
|
var Backdrop = styled__default["default"].div(templateObject_3$a || (templateObject_3$a = __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"])));
|
|
3545
|
-
var templateObject_1$
|
|
3545
|
+
var templateObject_1$i, templateObject_2$b, templateObject_3$a;
|
|
3546
3546
|
|
|
3547
3547
|
var ImageCardWithBackdrop = function (props) {
|
|
3548
3548
|
var count = props.count, width = props.width, mobileWidth = props.mobileWidth, imageCardProps = __rest(props, ["count", "width", "mobileWidth"]);
|
|
3549
3549
|
return (jsxRuntime.jsxs(StyledContainer$1, { children: [jsxRuntime.jsx(StyledImageCard, __assign({ width: width, mobileWidth: mobileWidth }, imageCardProps)), jsxRuntime.jsx(StyledBackdrop, __assign({ width: width, mobileWidth: mobileWidth }, { children: jsxRuntime.jsxs(kuiBasic.Caption, __assign({ weight: 600, color: "zero", disableUserSelect: true }, { children: ["+", count] })) }))] }));
|
|
3550
3550
|
};
|
|
3551
|
-
var StyledImageCard = styled__default["default"](ImageCard)(templateObject_1$
|
|
3552
|
-
var StyledContainer$1 = styled__default["default"].div(templateObject_2$
|
|
3551
|
+
var StyledImageCard = styled__default["default"](ImageCard)(templateObject_1$h || (templateObject_1$h = __makeTemplateObject(["\n & > div:after {\n content: none;\n }\n"], ["\n & > div:after {\n content: none;\n }\n"])));
|
|
3552
|
+
var StyledContainer$1 = styled__default["default"].div(templateObject_2$a || (templateObject_2$a = __makeTemplateObject(["\n position: relative;\n"], ["\n position: relative;\n"])));
|
|
3553
3553
|
var StyledBackdrop = styled__default["default"].div(templateObject_3$9 || (templateObject_3$9 = __makeTemplateObject(["\n position: absolute;\n top: 0;\n left: 0;\n border-radius: 8px;\n background: rgba(0, 0, 0, 0.1);\n backdrop-filter: blur(4px);\n display: flex;\n justify-content: center;\n align-items: center;\n pointer-events: none;\n width: ", "px;\n height: ", "px;\n @media (max-width: ", "px) {\n width: ", "px;\n height: ", "px;\n }\n"], ["\n position: absolute;\n top: 0;\n left: 0;\n border-radius: 8px;\n background: rgba(0, 0, 0, 0.1);\n backdrop-filter: blur(4px);\n display: flex;\n justify-content: center;\n align-items: center;\n pointer-events: none;\n width: ", "px;\n height: ", "px;\n @media (max-width: ", "px) {\n width: ", "px;\n height: ", "px;\n }\n"])), function (_a) {
|
|
3554
3554
|
var width = _a.width;
|
|
3555
3555
|
return width || 56;
|
|
@@ -3563,7 +3563,7 @@ var StyledBackdrop = styled__default["default"].div(templateObject_3$9 || (templ
|
|
|
3563
3563
|
var width = _a.width, mobileWidth = _a.mobileWidth;
|
|
3564
3564
|
return mobileWidth || width || 56;
|
|
3565
3565
|
});
|
|
3566
|
-
var templateObject_1$
|
|
3566
|
+
var templateObject_1$h, templateObject_2$a, templateObject_3$9;
|
|
3567
3567
|
|
|
3568
3568
|
var defaultImageWidth = 64;
|
|
3569
3569
|
var AdaptiveImagesBlock = React.forwardRef(function (props) {
|
|
@@ -3598,15 +3598,15 @@ var AdaptiveImagesBlock = React.forwardRef(function (props) {
|
|
|
3598
3598
|
}, [ref]);
|
|
3599
3599
|
return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsxs(Wrapper$1, __assign({ container: true, ref: ref, spacing: 1, justify: withFlatWidth ? "space-between" : "flex-start" }, otherProps, { children: [displayedImages.map(function (image, index) { return (jsxRuntime.jsx(kuiBasic.Grid, __assign({ item: true }, { children: jsxRuntime.jsx(ImageCard, { url: image.smallImageUrl, index: index, onClick: handleClick, width: realImageWidth, mobileWidth: mobileWidth }) }), image.smallImageUrl)); }), !!blurImage.length && !!notDisplayedImagesCount && (jsxRuntime.jsx(kuiBasic.Grid, __assign({ item: true }, { children: jsxRuntime.jsx(ImageCardWithBackdrop, { url: blurImage[0].smallImageUrl, count: notDisplayedImagesCount, index: displayedImages.length, onClick: handleClick, width: realImageWidth, mobileWidth: mobileWidth }) }))), blurImage.length > 0 && notDisplayedImagesCount === 0 && (jsxRuntime.jsx(kuiBasic.Grid, __assign({ item: true }, { children: jsxRuntime.jsx(ImageCard, { url: blurImage[0].smallImageUrl, index: displayedImages.length, onClick: handleClick, width: realImageWidth, mobileWidth: mobileWidth }) }))), endComponent] })), jsxRuntime.jsx(GalleryWithThumbnails, { images: images, activeSlide: selectedImage, isOpen: isModalOpen, handleClose: handleModalClose, onDelete: onDelete })] }));
|
|
3600
3600
|
});
|
|
3601
|
-
var Wrapper$1 = styled__default["default"](kuiBasic.Grid)(templateObject_1$
|
|
3602
|
-
var templateObject_1$
|
|
3601
|
+
var Wrapper$1 = styled__default["default"](kuiBasic.Grid)(templateObject_1$g || (templateObject_1$g = __makeTemplateObject(["\n overflow: hidden;\n flex-wrap: nowrap;\n"], ["\n overflow: hidden;\n flex-wrap: nowrap;\n"])));
|
|
3602
|
+
var templateObject_1$g;
|
|
3603
3603
|
|
|
3604
3604
|
function MultistepForm(props) {
|
|
3605
3605
|
var form = props.form, children = props.children, stepShift = props.stepShift;
|
|
3606
3606
|
var childrenList = React__default["default"].Children.toArray(children);
|
|
3607
3607
|
return jsxRuntime.jsx("div", { children: childrenList[form.step - (1 + (stepShift || 0))] });
|
|
3608
3608
|
}
|
|
3609
|
-
var index$
|
|
3609
|
+
var index$2 = mobxReact.observer(MultistepForm);
|
|
3610
3610
|
|
|
3611
3611
|
var LinkField = function (props) {
|
|
3612
3612
|
var name = props.name, form = props.form;
|
|
@@ -3708,26 +3708,26 @@ var Link = React.forwardRef(function (props, ref) {
|
|
|
3708
3708
|
};
|
|
3709
3709
|
return (jsxRuntime.jsx(StyledLink$1, __assign({ ref: ref, href: href || undefined, onClick: handleClick }, other)));
|
|
3710
3710
|
});
|
|
3711
|
-
var StyledLink$1 = styled__default["default"].a(templateObject_1$
|
|
3712
|
-
var templateObject_1$
|
|
3711
|
+
var StyledLink$1 = styled__default["default"].a(templateObject_1$f || (templateObject_1$f = __makeTemplateObject(["\n text-decoration: none;\n color: inherit;\n max-width: 100%;\n width: 100%;\n"], ["\n text-decoration: none;\n color: inherit;\n max-width: 100%;\n width: 100%;\n"])));
|
|
3712
|
+
var templateObject_1$f;
|
|
3713
3713
|
|
|
3714
3714
|
function PreviewContent(_a) {
|
|
3715
3715
|
var imageSrc = _a.imageSrc, description = _a.description, content = _a.content, label = _a.label, withoutImage = _a.withoutImage, other = __rest(_a, ["imageSrc", "description", "content", "label", "withoutImage"]);
|
|
3716
3716
|
return (jsxRuntime.jsxs(kuiBasic.Grid, __assign({ container: true, alignItems: "center", wrap: "nowrap" }, other, { children: [!withoutImage && (jsxRuntime.jsx(StyledImage$2, { size: "sm", imageSrc: imageSrc, name: description })), jsxRuntime.jsxs(StyledContent, { children: [content || (jsxRuntime.jsx(StyledCaption$2, __assign({ size: "s", weight: 500 }, { children: description }))), label] })] })));
|
|
3717
3717
|
}
|
|
3718
|
-
var StyledImage$2 = styled__default["default"](SquarePreviewImage)(templateObject_1$
|
|
3719
|
-
var StyledCaption$2 = styled__default["default"](kuiBasic.Caption)(templateObject_2$
|
|
3718
|
+
var StyledImage$2 = styled__default["default"](SquarePreviewImage)(templateObject_1$e || (templateObject_1$e = __makeTemplateObject(["\n margin-right: 10px;\n"], ["\n margin-right: 10px;\n"])));
|
|
3719
|
+
var StyledCaption$2 = styled__default["default"](kuiBasic.Caption)(templateObject_2$9 || (templateObject_2$9 = __makeTemplateObject(["\n max-width: 100%;\n"], ["\n max-width: 100%;\n"])));
|
|
3720
3720
|
var StyledContent = styled__default["default"].div(templateObject_3$8 || (templateObject_3$8 = __makeTemplateObject(["\n width: calc(100% - 10px - 32px);\n display: flex;\n flex-direction: column;\n"], ["\n width: calc(100% - 10px - 32px);\n display: flex;\n flex-direction: column;\n"])));
|
|
3721
|
-
var templateObject_1$
|
|
3721
|
+
var templateObject_1$e, templateObject_2$9, templateObject_3$8;
|
|
3722
3722
|
|
|
3723
3723
|
var Tooltip = styled__default["default"](React.forwardRef(function (_a, ref) {
|
|
3724
3724
|
var otherProps = __rest(_a, []);
|
|
3725
3725
|
return (jsxRuntime.jsx(kuiBasic.Tooltip, __assign({ placement: "bottom-start" }, otherProps)));
|
|
3726
|
-
}))(templateObject_1$
|
|
3726
|
+
}))(templateObject_1$d || (templateObject_1$d = __makeTemplateObject(["\n .KUI-Popper {\n padding-top: 16px;\n max-width: ", " !important;\n }\n"], ["\n .KUI-Popper {\n padding-top: 16px;\n max-width: ", " !important;\n }\n"])), function (_a) {
|
|
3727
3727
|
var title = _a.title;
|
|
3728
3728
|
return String(title).length > 25 ? "217px" : "unset";
|
|
3729
3729
|
});
|
|
3730
|
-
var templateObject_1$
|
|
3730
|
+
var templateObject_1$d;
|
|
3731
3731
|
|
|
3732
3732
|
function UserBadge(props) {
|
|
3733
3733
|
var user = props.user, name = props.name, role = props.role, avatarSize = props.avatarSize, className = props.className, spacing = props.spacing, onlyRole = props.onlyRole, label = props.label, link = props.link, other = __rest(props, ["user", "name", "role", "avatarSize", "className", "spacing", "onlyRole", "label", "link"]);
|
|
@@ -3760,16 +3760,16 @@ function UserBadge(props) {
|
|
|
3760
3760
|
}
|
|
3761
3761
|
var withEllipsis = function (_a) {
|
|
3762
3762
|
var isEllipsisActive = _a.isEllipsisActive;
|
|
3763
|
-
return isEllipsisActive && react.css(templateObject_1$
|
|
3763
|
+
return isEllipsisActive && react.css(templateObject_1$c || (templateObject_1$c = __makeTemplateObject(["\n overflow: hidden;\n text-overflow: ellipsis;\n "], ["\n overflow: hidden;\n text-overflow: ellipsis;\n "])));
|
|
3764
3764
|
};
|
|
3765
|
-
var StyledCaption$1 = styled__default["default"](kuiBasic.Caption)(templateObject_2$
|
|
3765
|
+
var StyledCaption$1 = styled__default["default"](kuiBasic.Caption)(templateObject_2$8 || (templateObject_2$8 = __makeTemplateObject(["\n display: inline-block;\n white-space: nowrap;\n max-width: 100%;\n ", ";\n"], ["\n display: inline-block;\n white-space: nowrap;\n max-width: 100%;\n ", ";\n"])), withEllipsis);
|
|
3766
3766
|
var Wrapper = styled__default["default"].div(templateObject_3$7 || (templateObject_3$7 = __makeTemplateObject(["\n max-width: calc(100% - 32px);\n padding-left: ", "px;\n display: flex;\n flex-direction: column;\n"], ["\n max-width: calc(100% - 32px);\n padding-left: ", "px;\n display: flex;\n flex-direction: column;\n"])), function (_a) {
|
|
3767
3767
|
var spacing = _a.spacing;
|
|
3768
3768
|
return spacing;
|
|
3769
3769
|
});
|
|
3770
3770
|
var StyledTooltip = styled__default["default"](Tooltip)(templateObject_4$3 || (templateObject_4$3 = __makeTemplateObject(["\n .KUI-Popper {\n margin-left: 0;\n }\n"], ["\n .KUI-Popper {\n margin-left: 0;\n }\n"])));
|
|
3771
3771
|
var StyledLabel = styled__default["default"](kuiBasic.Caption)(templateObject_5$2 || (templateObject_5$2 = __makeTemplateObject(["\n white-space: pre-wrap;\n"], ["\n white-space: pre-wrap;\n"])));
|
|
3772
|
-
var templateObject_1$
|
|
3772
|
+
var templateObject_1$c, templateObject_2$8, templateObject_3$7, templateObject_4$3, templateObject_5$2;
|
|
3773
3773
|
|
|
3774
3774
|
var ScrollingContainer = React.forwardRef(function (props, ref) {
|
|
3775
3775
|
var onScrollEnd = props.onScrollEnd, otherProps = __rest(props, ["onScrollEnd"]);
|
|
@@ -3798,11 +3798,11 @@ var ScrollingContainer = React.forwardRef(function (props, ref) {
|
|
|
3798
3798
|
};
|
|
3799
3799
|
return (jsxRuntime.jsx(StyledWrapper$3, __assign({ isScrollable: isScrollable, ref: forwardedRef }, otherProps)));
|
|
3800
3800
|
});
|
|
3801
|
-
var StyledWrapper$3 = styled__default["default"].div(templateObject_1$
|
|
3801
|
+
var StyledWrapper$3 = styled__default["default"].div(templateObject_1$b || (templateObject_1$b = __makeTemplateObject(["\n overflow-y: auto;\n position: relative;\n padding-right: ", "px;\n ::-webkit-scrollbar {\n width: 8px;\n position: absolute;\n right: 8px;\n }\n ::-webkit-scrollbar-track,\n ::-webkit-scrollbar-thumb {\n background: transparent;\n border-radius: 4px;\n transition: all ease-out 0.3s;\n }\n\n ::-webkit-resizer,\n ::-webkit-scrollbar-button,\n ::-webkit-scrollbar-corner {\n display: none;\n }\n &:hover {\n ::-webkit-scrollbar-track {\n background: ", ";\n }\n\n ::-webkit-scrollbar-thumb {\n background: ", ";\n }\n }\n"], ["\n overflow-y: auto;\n position: relative;\n padding-right: ", "px;\n ::-webkit-scrollbar {\n width: 8px;\n position: absolute;\n right: 8px;\n }\n ::-webkit-scrollbar-track,\n ::-webkit-scrollbar-thumb {\n background: transparent;\n border-radius: 4px;\n transition: all ease-out 0.3s;\n }\n\n ::-webkit-resizer,\n ::-webkit-scrollbar-button,\n ::-webkit-scrollbar-corner {\n display: none;\n }\n &:hover {\n ::-webkit-scrollbar-track {\n background: ", ";\n }\n\n ::-webkit-scrollbar-thumb {\n background: ", ";\n }\n }\n"])), function (_a) {
|
|
3802
3802
|
var isScrollable = _a.isScrollable;
|
|
3803
3803
|
return (isScrollable ? 8 : 0);
|
|
3804
3804
|
}, kuiBasic.theme.palette.grey.fifteenB, kuiBasic.theme.palette.grey.thirty);
|
|
3805
|
-
var templateObject_1$
|
|
3805
|
+
var templateObject_1$b;
|
|
3806
3806
|
|
|
3807
3807
|
function Breadcrumbs(_a) {
|
|
3808
3808
|
var routes = _a.routes;
|
|
@@ -3817,17 +3817,17 @@ function Breadcrumbs(_a) {
|
|
|
3817
3817
|
jsxRuntime$1.jsx(StyledLink, __assign({ href: item.link }, { children: jsxRuntime$1.jsx(kuiBasic.Caption, __assign({ size: "xs", weight: 500, color: "fourty", css: item.link && styles }, { children: item.title }), "".concat(item.title, "_").concat(item.link)) }))
|
|
3818
3818
|
], kuiUtils.addToArrayByCondition(index < routes.length - 1, jsxRuntime$1.jsx(StyledIcon, { width: 7, height: 9 })), true); }) })));
|
|
3819
3819
|
}
|
|
3820
|
-
var StyledWrapper$2 = styled__default["default"](kuiBasic.Grid)(templateObject_1$
|
|
3821
|
-
var StyledLink = styled__default["default"](Link)(templateObject_2$
|
|
3820
|
+
var StyledWrapper$2 = styled__default["default"](kuiBasic.Grid)(templateObject_1$a || (templateObject_1$a = __makeTemplateObject(["\n width: auto;\n"], ["\n width: auto;\n"])));
|
|
3821
|
+
var StyledLink = styled__default["default"](Link)(templateObject_2$7 || (templateObject_2$7 = __makeTemplateObject(["\n width: auto;\n &:not(:last-of-type) {\n margin-right: 8px;\n }\n &:not(:first-of-type) {\n margin-left: 8px;\n }\n"], ["\n width: auto;\n &:not(:last-of-type) {\n margin-right: 8px;\n }\n &:not(:first-of-type) {\n margin-left: 8px;\n }\n"])));
|
|
3822
3822
|
var StyledIcon = styled__default["default"](kuiIcon.HalfArrowNextIcon)(templateObject_3$6 || (templateObject_3$6 = __makeTemplateObject(["\n path {\n fill: ", ";\n }\n"], ["\n path {\n fill: ", ";\n }\n"])), kuiBasic.theme.palette.grey.fourty);
|
|
3823
|
-
var templateObject_1$
|
|
3823
|
+
var templateObject_1$a, templateObject_2$7, templateObject_3$6;
|
|
3824
3824
|
|
|
3825
3825
|
var PageBreadcrumbs = function (props) {
|
|
3826
3826
|
var breadcrumbs = props.breadcrumbs, onPrev = props.onPrev;
|
|
3827
3827
|
return (jsxRuntime.jsx(kuiBasic.Grid, __assign({ item: true }, { children: jsxRuntime.jsxs(kuiBasic.Grid, __assign({ container: true, alignItems: "center" }, { children: [jsxRuntime.jsx(kuiBasic.Box, __assign({ mr: 2 }, { children: jsxRuntime.jsx(StyledButton$3, __assign({ isCircle: true, onClick: onPrev, size: "xs", variant: "backgroundLight" }, { children: jsxRuntime.jsx(kuiIcon.PrevArrowIcon, { width: 12, height: 10 }) })) })), jsxRuntime.jsx(Breadcrumbs, { routes: breadcrumbs })] })) })));
|
|
3828
3828
|
};
|
|
3829
|
-
var StyledButton$3 = styled__default["default"](kuiBasic.Button)(templateObject_1$
|
|
3830
|
-
var templateObject_1$
|
|
3829
|
+
var StyledButton$3 = styled__default["default"](kuiBasic.Button)(templateObject_1$9 || (templateObject_1$9 = __makeTemplateObject(["\n background: ", ";\n"], ["\n background: ", ";\n"])), kuiBasic.theme.palette.background.light3);
|
|
3830
|
+
var templateObject_1$9;
|
|
3831
3831
|
|
|
3832
3832
|
function SliderThumbnails(_a) {
|
|
3833
3833
|
var images = _a.images, activeSlide = _a.activeSlide, handleChange = _a.handleChange;
|
|
@@ -3843,23 +3843,23 @@ function SliderThumbnails(_a) {
|
|
|
3843
3843
|
// eslint-disable-next-line react/no-array-index-key
|
|
3844
3844
|
jsxRuntime.jsx(StyledSlide, __assign({ onClick: function () { return handleChange(index); } }, { children: jsxRuntime.jsx(StyledImage$1, { active: index === activeSlide, src: image, alt: "slide" }) }), index)); }) })) }));
|
|
3845
3845
|
}
|
|
3846
|
-
var StyledWrapper$1 = styled__default["default"].div(templateObject_1$
|
|
3847
|
-
var StyledImage$1 = styled__default["default"].img(templateObject_2$
|
|
3846
|
+
var StyledWrapper$1 = styled__default["default"].div(templateObject_1$8 || (templateObject_1$8 = __makeTemplateObject(["\n padding: 16px;\n background-color: ", ";\n @media (max-width: 601px) {\n padding: 14px 16px 16px;\n }\n"], ["\n padding: 16px;\n background-color: ", ";\n @media (max-width: 601px) {\n padding: 14px 16px 16px;\n }\n"])), kuiBasic.theme.palette.grey.zero);
|
|
3847
|
+
var StyledImage$1 = styled__default["default"].img(templateObject_2$6 || (templateObject_2$6 = __makeTemplateObject(["\n width: 100%;\n height: 100%;\n object-fit: cover;\n border-radius: 8px;\n box-sizing: border-box;\n border: 2px solid\n ", ";\n"], ["\n width: 100%;\n height: 100%;\n object-fit: cover;\n border-radius: 8px;\n box-sizing: border-box;\n border: 2px solid\n ", ";\n"])), function (_a) {
|
|
3848
3848
|
var active = _a.active;
|
|
3849
3849
|
return (active ? kuiBasic.theme.palette.brand.main : "transparent");
|
|
3850
3850
|
});
|
|
3851
3851
|
var StyledSlide = styled__default["default"].div(templateObject_3$5 || (templateObject_3$5 = __makeTemplateObject(["\n width: 80px;\n height: 80px;\n //border-radius: 6px;\n @media (max-width: 601px) {\n width: 48px;\n height: 48px;\n }\n"], ["\n width: 80px;\n height: 80px;\n //border-radius: 6px;\n @media (max-width: 601px) {\n width: 48px;\n height: 48px;\n }\n"])));
|
|
3852
|
-
var templateObject_1$
|
|
3852
|
+
var templateObject_1$8, templateObject_2$6, templateObject_3$5;
|
|
3853
3853
|
|
|
3854
3854
|
function FullSliderHeader(props) {
|
|
3855
3855
|
var handleClose = props.handleClose, slidesCount = props.slidesCount, currentSlide = props.currentSlide, renderEndComponent = props.renderEndComponent, slider = props.slider;
|
|
3856
3856
|
return (jsxRuntime.jsxs(StyledHeader, __assign({ container: true, justify: "space-between", alignItems: "center" }, { children: [jsxRuntime.jsxs(kuiBasic.Caption, __assign({ weight: 500, color: "zero" }, { children: [currentSlide + 1, " ", jsxRuntime.jsx(StyledSlash, { children: "/" }), " ", slidesCount] })), jsxRuntime.jsx(kuiBasic.Grid, __assign({ item: true }, { children: jsxRuntime.jsxs(kuiBasic.Grid, __assign({ container: true, justify: "flex-end", alignItems: "center" }, { children: [renderEndComponent &&
|
|
3857
3857
|
renderEndComponent(currentSlide, slider, handleClose), jsxRuntime.jsx(StyledCloseButton, __assign({ role: "button", tabIndex: 0, onClick: handleClose, onKeyDown: handleClose }, { children: jsxRuntime.jsx(kuiIcon.CloseIcon, {}) }))] })) }))] })));
|
|
3858
3858
|
}
|
|
3859
|
-
var StyledHeader = styled__default["default"](kuiBasic.Grid)(templateObject_1$
|
|
3860
|
-
var StyledCloseButton = styled__default["default"].div(templateObject_2$
|
|
3859
|
+
var StyledHeader = styled__default["default"](kuiBasic.Grid)(templateObject_1$7 || (templateObject_1$7 = __makeTemplateObject(["\n padding: 12px 24px;\n background: rgba(25, 25, 25, 0.9);\n backdrop-filter: blur(3.5px);\n position: fixed;\n top: 0;\n left: 0;\n width: 100%;\n z-index: 10;\n"], ["\n padding: 12px 24px;\n background: rgba(25, 25, 25, 0.9);\n backdrop-filter: blur(3.5px);\n position: fixed;\n top: 0;\n left: 0;\n width: 100%;\n z-index: 10;\n"])));
|
|
3860
|
+
var StyledCloseButton = styled__default["default"].div(templateObject_2$5 || (templateObject_2$5 = __makeTemplateObject(["\n width: 25px;\n height: 40px;\n cursor: pointer;\n display: flex;\n justify-content: flex-end;\n align-items: center;\n"], ["\n width: 25px;\n height: 40px;\n cursor: pointer;\n display: flex;\n justify-content: flex-end;\n align-items: center;\n"])));
|
|
3861
3861
|
var StyledSlash = styled__default["default"].span(templateObject_3$4 || (templateObject_3$4 = __makeTemplateObject(["\n color: ", ";\n"], ["\n color: ", ";\n"])), kuiBasic.theme.palette.grey.fiftyP);
|
|
3862
|
-
var templateObject_1$
|
|
3862
|
+
var templateObject_1$7, templateObject_2$5, templateObject_3$4;
|
|
3863
3863
|
|
|
3864
3864
|
function FullSlider(props) {
|
|
3865
3865
|
var handleClose = props.handleClose, active = props.active, images = props.images, renderHeaderComponent = props.renderHeaderComponent, onChange = props.onChange;
|
|
@@ -3915,8 +3915,8 @@ function FullSlider(props) {
|
|
|
3915
3915
|
return (jsxRuntime.jsxs("div", { children: [jsxRuntime.jsx(FullSliderHeader, { currentSlide: currentSlide, handleClose: handleClose, slidesCount: images.length, slider: swiperRef, renderEndComponent: renderHeaderComponent }), jsxRuntime.jsx(StyledSwiper, __assign({}, sliderParams, { swiperRef: swiperRef }, { children: images.map(function (image) { return (jsxRuntime.jsx(StyledImageWrapper, { children: jsxRuntime.jsx(StyledImage, { src: image, alt: "" }) }, image)); }) })), jsxRuntime.jsx(SliderThumbnails, { images: images, activeSlide: currentSlide, handleChange: handleChange }), jsxRuntime.jsx(StyledButton$2, __assign({ isCircle: true, navType: "prev", onClick: prev, size: "s", variant: "blur" }, { children: jsxRuntime.jsx(kuiIcon.HalfPrevArrowIcon, {}) })), jsxRuntime.jsx(StyledButton$2, __assign({ isCircle: true, navType: "next", onClick: next, size: "s", variant: "blur" }, { children: jsxRuntime.jsx(kuiIcon.HalfArrowNextIcon, {}) }))] }));
|
|
3916
3916
|
}
|
|
3917
3917
|
var FullSlider$1 = mobxReact.observer(FullSlider);
|
|
3918
|
-
var StyledImageWrapper = styled__default["default"].div(templateObject_1$
|
|
3919
|
-
var StyledButton$2 = styled__default["default"](kuiBasic.Button)(templateObject_2$
|
|
3918
|
+
var StyledImageWrapper = styled__default["default"].div(templateObject_1$6 || (templateObject_1$6 = __makeTemplateObject(["\n width: 100%;\n padding: 0px;\n margin: 0px;\n text-align: center;\n"], ["\n width: 100%;\n padding: 0px;\n margin: 0px;\n text-align: center;\n"])));
|
|
3919
|
+
var StyledButton$2 = styled__default["default"](kuiBasic.Button)(templateObject_2$4 || (templateObject_2$4 = __makeTemplateObject(["\n position: absolute;\n top: 50%;\n z-index: 10;\n ", ";\n svg {\n margin-left: ", ";\n }\n"], ["\n position: absolute;\n top: 50%;\n z-index: 10;\n ", ";\n svg {\n margin-left: ", ";\n }\n"])), function (_a) {
|
|
3920
3920
|
var navType = _a.navType;
|
|
3921
3921
|
return (navType === "prev" ? "left: 24px" : "right: 24px");
|
|
3922
3922
|
}, function (_a) {
|
|
@@ -3928,14 +3928,14 @@ var StyledSwiper = styled__default["default"](function (_a) {
|
|
|
3928
3928
|
return (jsxRuntime.jsx(Swiper__default["default"], __assign({ containerClass: className, ref: swiperRef }, otherProps)));
|
|
3929
3929
|
})(templateObject_3$3 || (templateObject_3$3 = __makeTemplateObject(["\n width: 100%;\n height: calc(100vh - 112px);\n overflow: hidden;\n background: rgba(25, 25, 25, 0.9);\n border-radius: 0 0 12px 12px;\n"], ["\n width: 100%;\n height: calc(100vh - 112px);\n overflow: hidden;\n background: rgba(25, 25, 25, 0.9);\n border-radius: 0 0 12px 12px;\n"])));
|
|
3930
3930
|
var StyledImage = styled__default["default"].img(templateObject_4$2 || (templateObject_4$2 = __makeTemplateObject(["\n height: 100vh;\n"], ["\n height: 100vh;\n"])));
|
|
3931
|
-
var templateObject_1$
|
|
3931
|
+
var templateObject_1$6, templateObject_2$4, templateObject_3$3, templateObject_4$2;
|
|
3932
3932
|
|
|
3933
3933
|
function FullSliderModal(_a) {
|
|
3934
3934
|
var isOpen = _a.isOpen, handleClose = _a.handleClose, sliderProps = __rest(_a, ["isOpen", "handleClose"]);
|
|
3935
3935
|
return (jsxRuntime.jsx(StyledModal, __assign({ isOpen: isOpen, handleClose: handleClose }, { children: jsxRuntime.jsx(FullSlider$1, __assign({ handleClose: handleClose }, sliderProps)) })));
|
|
3936
3936
|
}
|
|
3937
|
-
var StyledModal = styled__default["default"](kuiBasic.Modal)(templateObject_1$
|
|
3938
|
-
var templateObject_1$
|
|
3937
|
+
var StyledModal = styled__default["default"](kuiBasic.Modal)(templateObject_1$5 || (templateObject_1$5 = __makeTemplateObject(["\n border-radius: unset;\n box-shadow: none;\n max-height: unset !important;\n width: 100%;\n"], ["\n border-radius: unset;\n box-shadow: none;\n max-height: unset !important;\n width: 100%;\n"])));
|
|
3938
|
+
var templateObject_1$5;
|
|
3939
3939
|
|
|
3940
3940
|
var PhotoSlider = function (props) {
|
|
3941
3941
|
var images = props.images, handleClose = props.handleClose; props.onDelete; var other = __rest(props, ["images", "handleClose", "onDelete"]);
|
|
@@ -3969,14 +3969,14 @@ function TextOverflow(props) {
|
|
|
3969
3969
|
}
|
|
3970
3970
|
var multilineCSS = function (_a) {
|
|
3971
3971
|
var multiline = _a.multiline;
|
|
3972
|
-
return react.css(templateObject_1$
|
|
3972
|
+
return react.css(templateObject_1$4 || (templateObject_1$4 = __makeTemplateObject(["\n display: -webkit-box;\n -webkit-line-clamp: ", ";\n -webkit-box-orient: vertical;\n"], ["\n display: -webkit-box;\n -webkit-line-clamp: ", ";\n -webkit-box-orient: vertical;\n"])), multiline);
|
|
3973
3973
|
};
|
|
3974
|
-
var singleLineCSS = react.css(templateObject_2$
|
|
3974
|
+
var singleLineCSS = react.css(templateObject_2$3 || (templateObject_2$3 = __makeTemplateObject(["\n display: inline-block;\n white-space: nowrap;\n text-overflow: ellipsis;\n"], ["\n display: inline-block;\n white-space: nowrap;\n text-overflow: ellipsis;\n"])));
|
|
3975
3975
|
var StyledCaption = styled__default["default"](kuiBasic.Caption)(templateObject_3$2 || (templateObject_3$2 = __makeTemplateObject(["\n max-width: 100%;\n overflow: hidden;\n ", ";\n"], ["\n max-width: 100%;\n overflow: hidden;\n ", ";\n"])), function (_a) {
|
|
3976
3976
|
var multiline = _a.multiline;
|
|
3977
3977
|
return multiline ? multilineCSS({ multiline: multiline }) : singleLineCSS;
|
|
3978
3978
|
});
|
|
3979
|
-
var templateObject_1$
|
|
3979
|
+
var templateObject_1$4, templateObject_2$3, templateObject_3$2;
|
|
3980
3980
|
|
|
3981
3981
|
var AccordionWithSummary = React.forwardRef(function (_a) {
|
|
3982
3982
|
var title = _a.title, children = _a.children, titleSize = _a.titleSize, detailsProps = _a.detailsProps, onChange = _a.onChange, defaultExpanded = _a.expanded, summaryProps = __rest(_a, ["title", "children", "titleSize", "detailsProps", "onChange", "expanded"]);
|
|
@@ -3991,8 +3991,8 @@ var AccordionWithSummary = React.forwardRef(function (_a) {
|
|
|
3991
3991
|
AccordionWithSummary.defaultProps = {
|
|
3992
3992
|
titleSize: "m",
|
|
3993
3993
|
};
|
|
3994
|
-
var StyledDetails = styled__default["default"](kuiBasic.AccordionDetails)(templateObject_1$
|
|
3995
|
-
var StyledTitle = styled__default["default"](kuiBasic.Caption)(templateObject_2$
|
|
3994
|
+
var StyledDetails = styled__default["default"](kuiBasic.AccordionDetails)(templateObject_1$3 || (templateObject_1$3 = __makeTemplateObject(["\n padding: 0 0 40px;\n @media (max-width: 600px) {\n padding-bottom: 16px;\n > div {\n padding-right: 0;\n }\n }\n"], ["\n padding: 0 0 40px;\n @media (max-width: 600px) {\n padding-bottom: 16px;\n > div {\n padding-right: 0;\n }\n }\n"])));
|
|
3995
|
+
var StyledTitle = styled__default["default"](kuiBasic.Caption)(templateObject_2$2 || (templateObject_2$2 = __makeTemplateObject(["\n @media (max-width: 600px) {\n font-weight: 600;\n }\n"], ["\n @media (max-width: 600px) {\n font-weight: 600;\n }\n"])));
|
|
3996
3996
|
var expandedButtonCSS = function (_a) {
|
|
3997
3997
|
var expanded = _a.expanded;
|
|
3998
3998
|
return !expanded && react.css(templateObject_3$1 || (templateObject_3$1 = __makeTemplateObject(["\n svg {\n margin-top: 2px;\n transform: rotate(-180deg);\n }\n "], ["\n svg {\n margin-top: 2px;\n transform: rotate(-180deg);\n }\n "])));
|
|
@@ -4001,7 +4001,66 @@ var StyledButton$1 = styled__default["default"](kuiBasic.Button, {
|
|
|
4001
4001
|
shouldForwardProp: function (prop) { return prop !== "expanded"; },
|
|
4002
4002
|
})(templateObject_4$1 || (templateObject_4$1 = __makeTemplateObject(["\n svg {\n transition: transform linear 0.3s;\n }\n @media (max-width: 600px) {\n width: 24px;\n height: 24px;\n }\n ", ";\n"], ["\n svg {\n transition: transform linear 0.3s;\n }\n @media (max-width: 600px) {\n width: 24px;\n height: 24px;\n }\n ", ";\n"])), expandedButtonCSS);
|
|
4003
4003
|
var StyledSummary = styled__default["default"](kuiBasic.AccordionSummary)(templateObject_5$1 || (templateObject_5$1 = __makeTemplateObject(["\n .KUI-Accordion_Summary-Content {\n align-items: center;\n }\n"], ["\n .KUI-Accordion_Summary-Content {\n align-items: center;\n }\n"])));
|
|
4004
|
-
var templateObject_1$
|
|
4004
|
+
var templateObject_1$3, templateObject_2$2, templateObject_3$1, templateObject_4$1, templateObject_5$1;
|
|
4005
|
+
|
|
4006
|
+
function DropdownMenuBase(_a) {
|
|
4007
|
+
var options = _a.options, isOpen = _a.isOpen, handleClose = _a.handleClose, buttonRef = _a.buttonRef, children = _a.children, menuItemStyles = _a.menuItemStyles, other = __rest(_a, ["options", "isOpen", "handleClose", "buttonRef", "children", "menuItemStyles"]);
|
|
4008
|
+
var dropdownRef = React.useRef(null);
|
|
4009
|
+
React.useEffect(function () {
|
|
4010
|
+
var closeDropdown = function (e) {
|
|
4011
|
+
if (dropdownRef.current && buttonRef && buttonRef.current) {
|
|
4012
|
+
if (!dropdownRef.current.contains(e.target) &&
|
|
4013
|
+
!buttonRef.current.contains(e.target)) {
|
|
4014
|
+
handleClose();
|
|
4015
|
+
}
|
|
4016
|
+
}
|
|
4017
|
+
};
|
|
4018
|
+
document.addEventListener("click", closeDropdown);
|
|
4019
|
+
return function () {
|
|
4020
|
+
document.removeEventListener("click", closeDropdown);
|
|
4021
|
+
};
|
|
4022
|
+
}, [buttonRef, handleClose]);
|
|
4023
|
+
var handleOptionClick = function (callback) {
|
|
4024
|
+
callback();
|
|
4025
|
+
handleClose();
|
|
4026
|
+
};
|
|
4027
|
+
return (jsxRuntime.jsxs(StyledMenu, __assign({ "data-testid": "menu_dropdown", ref: dropdownRef, hidden: !isOpen }, other, { children: [options === null || options === void 0 ? void 0 : options.map(function (option) { return (jsxRuntime.jsxs(StyledMenuItem, __assign({ role: "button", className: menuItemStyles, onClick: function () { return handleOptionClick(option.handleClick); }, onKeyDown: function () { return handleOptionClick(option.handleClick); }, tabIndex: 0 }, { children: [option.icon, jsxRuntime.jsx(kuiBasic.Caption, __assign({ size: "xs", weight: 500 }, { children: option.label }))] }), option.label)); }), children] })));
|
|
4028
|
+
}
|
|
4029
|
+
var StyledMenu = styled__default["default"].div(templateObject_1$2 || (templateObject_1$2 = __makeTemplateObject(["\n padding: 8px;\n background: ", ";\n box-shadow: 0px 26px 34px rgba(0, 0, 0, 0.1);\n border: 1px solid ", ";\n position: absolute;\n right: 0;\n border-radius: 12px;\n width: max-content;\n z-index: 1000;\n"], ["\n padding: 8px;\n background: ", ";\n box-shadow: 0px 26px 34px rgba(0, 0, 0, 0.1);\n border: 1px solid ", ";\n position: absolute;\n right: 0;\n border-radius: 12px;\n width: max-content;\n z-index: 1000;\n"])), kuiBasic.theme.palette.grey.zero, kuiBasic.theme.palette.background.light1);
|
|
4030
|
+
var StyledMenuItem = styled__default["default"].div(templateObject_2$1 || (templateObject_2$1 = __makeTemplateObject(["\n border-radius: 12px;\n padding: 13px 8px;\n cursor: pointer;\n transition: all ease-out 0.2s;\n text-align: left;\n display: flex;\n align-items: center;\n flex-wrap: nowrap;\n svg {\n margin-right: 8px;\n }\n &:hover {\n background-color: ", ";\n }\n"], ["\n border-radius: 12px;\n padding: 13px 8px;\n cursor: pointer;\n transition: all ease-out 0.2s;\n text-align: left;\n display: flex;\n align-items: center;\n flex-wrap: nowrap;\n svg {\n margin-right: 8px;\n }\n &:hover {\n background-color: ", ";\n }\n"])), kuiBasic.theme.palette.background.light1);
|
|
4031
|
+
var templateObject_1$2, templateObject_2$1;
|
|
4032
|
+
|
|
4033
|
+
var menuOffset = 32;
|
|
4034
|
+
var DropdownMenuWithPortal = function (_a) {
|
|
4035
|
+
var buttonRef = _a.buttonRef, other = __rest(_a, ["buttonRef"]);
|
|
4036
|
+
var coords = usePortalPosition(buttonRef);
|
|
4037
|
+
var menuPosition = {
|
|
4038
|
+
right: coords ? coords.right : 0,
|
|
4039
|
+
top: coords ? coords.top + menuOffset : 0,
|
|
4040
|
+
};
|
|
4041
|
+
return ReactDOM.createPortal(jsxRuntime.jsx(DropdownMenuBase, __assign({ buttonRef: buttonRef, style: menuPosition }, other)), document.body);
|
|
4042
|
+
};
|
|
4043
|
+
|
|
4044
|
+
function DropdownMenu(_a) {
|
|
4045
|
+
var buttonRef = _a.buttonRef, other = __rest(_a, ["buttonRef"]);
|
|
4046
|
+
var _b = React.useState(true), isParentSticky = _b[0], setIsParentSticky = _b[1];
|
|
4047
|
+
React.useEffect(function () {
|
|
4048
|
+
function checkParentIsSticky() {
|
|
4049
|
+
var el = buttonRef.current;
|
|
4050
|
+
while (el) {
|
|
4051
|
+
var position = window.getComputedStyle(el).position;
|
|
4052
|
+
if (position === "sticky" || position === "fixed")
|
|
4053
|
+
return true;
|
|
4054
|
+
el = el.parentElement;
|
|
4055
|
+
}
|
|
4056
|
+
return false;
|
|
4057
|
+
}
|
|
4058
|
+
var isSticky = checkParentIsSticky();
|
|
4059
|
+
setIsParentSticky(!!isSticky);
|
|
4060
|
+
}, [buttonRef]);
|
|
4061
|
+
return isParentSticky ? (jsxRuntime.jsx(DropdownMenuBase, __assign({ buttonRef: buttonRef }, other))) : (jsxRuntime.jsx(DropdownMenuWithPortal, __assign({ buttonRef: buttonRef }, other)));
|
|
4062
|
+
}
|
|
4063
|
+
var index$1 = mobxReact.observer(DropdownMenu);
|
|
4005
4064
|
|
|
4006
4065
|
var inputProps = {
|
|
4007
4066
|
step: 0.1,
|
|
@@ -4164,6 +4223,9 @@ exports.CountriesStore = CountriesStore;
|
|
|
4164
4223
|
exports.CountryAutocomplete = CountryAutocomplete$1;
|
|
4165
4224
|
exports.DistrictAutocomplete = DistrictAutocomplete$1;
|
|
4166
4225
|
exports.DistrictsStore = DistrictsStore;
|
|
4226
|
+
exports.DropdownMenu = index$1;
|
|
4227
|
+
exports.DropdownMenuBase = DropdownMenuBase;
|
|
4228
|
+
exports.DropdownMenuWithPortal = DropdownMenuWithPortal;
|
|
4167
4229
|
exports.ElectricityValues = ElectricityValues;
|
|
4168
4230
|
exports.ErrorPopup = ErrorPopup;
|
|
4169
4231
|
exports.FileStore = FileStore;
|
|
@@ -4203,7 +4265,7 @@ exports.MeterFeaturesForm = MeterFeaturesForm;
|
|
|
4203
4265
|
exports.MeterTypeRadioGroup = MeterTypeRadioGroup;
|
|
4204
4266
|
exports.Modal = Modal;
|
|
4205
4267
|
exports.ModalWithMap = ModalWithMap$1;
|
|
4206
|
-
exports.MultistepForm = index$
|
|
4268
|
+
exports.MultistepForm = index$2;
|
|
4207
4269
|
exports.NumberField = NumberField;
|
|
4208
4270
|
exports.OpenMapButton = OpenMapButton;
|
|
4209
4271
|
exports.PageBreadcrumbs = PageBreadcrumbs;
|