krl-alfred 1.50.0 → 1.52.0

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.
@@ -31,6 +31,7 @@ var react_dom_1 = __importDefault(require("react-dom"));
31
31
  var Modal_styled_1 = require("./Modal.styled");
32
32
  var Icon_1 = __importDefault(require("../Icon/Icon"));
33
33
  var Button_1 = __importDefault(require("../Button"));
34
+ var react_device_detect_1 = require("react-device-detect");
34
35
  var Modal = function (props) {
35
36
  var _a = (0, react_1.useState)(props.show), showModal = _a[0], setShowModal = _a[1];
36
37
  (0, react_1.useEffect)(function () {
@@ -49,7 +50,7 @@ var Modal = function (props) {
49
50
  };
50
51
  var onPrimaryAction = props.onPrimaryAction, onSecondaryAction = props.onSecondaryAction, onBack = props.onBack, other = __rest(props, ["onPrimaryAction", "onSecondaryAction", "onBack"]);
51
52
  return (showModal &&
52
- react_dom_1.default.createPortal((0, jsx_runtime_1.jsx)(Modal_styled_1.OverlayStyled, { children: (0, jsx_runtime_1.jsxs)(Modal_styled_1.ModalStyled, __assign({}, other, { children: [(0, jsx_runtime_1.jsxs)("div", { className: "header", children: [props.showBackIcon ? ((0, jsx_runtime_1.jsx)("div", { onClick: onBack, className: "icon", children: (0, jsx_runtime_1.jsx)(Icon_1.default, { name: "ArrowMedium" }) })) : (props.titleAlignment === "center" && (0, jsx_runtime_1.jsx)("div", { className: "empty" })), (0, jsx_runtime_1.jsxs)("div", { className: "title", children: [props.title && ((0, jsx_runtime_1.jsx)("h5", { className: "headline-semi-bold-20-24", children: props.title })), props.titleDescription && ((0, jsx_runtime_1.jsx)("p", { className: "body-regular-14-17", children: props.titleDescription }))] }), props.showCloseIcon ? ((0, jsx_runtime_1.jsx)("div", { onClick: onClose, className: "icon", children: (0, jsx_runtime_1.jsx)(Icon_1.default, { name: "Close" }) })) : ((0, jsx_runtime_1.jsx)("div", { className: "empty" }))] }), (0, jsx_runtime_1.jsx)("div", { className: "content", children: (0, jsx_runtime_1.jsx)("div", { className: "contentInner", children: props.children }) }), (props.showPrimaryButton || props.showSecondaryButton) && (0, jsx_runtime_1.jsxs)("div", { className: "buttons", children: [props.showPrimaryButton && ((0, jsx_runtime_1.jsx)(Button_1.default, { onClick: onPrimaryAction, size: "big", variant: "primary", isLoading: props.isPrimaryButtonLoading, disabled: props.isPrimaryButtonDisabled, width: props.primaryButtonWidth, children: props.primaryButtonText })), props.showSecondaryButton && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [props.buttonsAlignment === "vertical" && ((0, jsx_runtime_1.jsx)("div", { className: "divider caption-medium-12-15", children: "veya" })), (0, jsx_runtime_1.jsx)(Button_1.default, { onClick: onSecondaryAction, size: "big", variant: "inverted", isLoading: props.isSecondaryButtonLoading, disabled: props.isSecondaryButtonDisabled, width: props.secondaryButtonWidth, children: props.secondaryButtonText })] }))] })] })) }), document.body));
53
+ react_dom_1.default.createPortal((0, jsx_runtime_1.jsx)(Modal_styled_1.OverlayStyled, { children: (0, jsx_runtime_1.jsxs)(Modal_styled_1.ModalStyled, __assign({}, other, { children: [(0, jsx_runtime_1.jsxs)("div", { className: "header", children: [props.showBackIcon ? ((0, jsx_runtime_1.jsx)("div", { onClick: onBack, className: "icon", children: (0, jsx_runtime_1.jsx)(Icon_1.default, { name: "ArrowMedium" }) })) : (props.titleAlignment === "center" && (0, jsx_runtime_1.jsx)("div", { className: "empty" })), (0, jsx_runtime_1.jsxs)("div", { className: "title", children: [props.title && ((0, jsx_runtime_1.jsx)("h5", { className: props.titleAlignment === "left" ? (react_device_detect_1.isMobile ? "title-semi-bold-16-19" : "headline-semi-bold-18-22") : "headline-semi-bold-20-24", children: props.title })), props.titleDescription && ((0, jsx_runtime_1.jsx)("p", { className: "body-regular-14-17", children: props.titleDescription }))] }), props.showCloseIcon ? ((0, jsx_runtime_1.jsx)("div", { onClick: onClose, className: "icon", children: (0, jsx_runtime_1.jsx)(Icon_1.default, { name: "Close" }) })) : ((0, jsx_runtime_1.jsx)("div", { className: "empty" }))] }), (0, jsx_runtime_1.jsx)("div", { className: "content", children: (0, jsx_runtime_1.jsx)("div", { className: "contentInner", children: props.children }) }), (props.showPrimaryButton || props.showSecondaryButton) && (0, jsx_runtime_1.jsxs)("div", { className: "buttons", children: [props.showPrimaryButton && ((0, jsx_runtime_1.jsx)(Button_1.default, { onClick: onPrimaryAction, size: "big", variant: "primary", isLoading: props.isPrimaryButtonLoading, disabled: props.isPrimaryButtonDisabled, width: props.primaryButtonWidth, children: props.primaryButtonText })), props.showSecondaryButton && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [props.buttonsAlignment === "vertical" && ((0, jsx_runtime_1.jsx)("div", { className: "divider caption-medium-12-15", children: "veya" })), (0, jsx_runtime_1.jsx)(Button_1.default, { onClick: onSecondaryAction, size: "big", variant: "inverted", isLoading: props.isSecondaryButtonLoading, disabled: props.isSecondaryButtonDisabled, width: props.secondaryButtonWidth, children: props.secondaryButtonText })] }))] })] })) }), document.body));
53
54
  };
54
55
  exports.default = Modal;
55
56
  Modal.defaultProps = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "krl-alfred",
3
- "version": "1.50.0",
3
+ "version": "1.52.0",
4
4
  "files": [
5
5
  "dist"
6
6
  ],