krl-alfred 1.10.0 → 1.11.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.
|
@@ -33,10 +33,10 @@ var Breadcrumbs = function (props) {
|
|
|
33
33
|
var data = _a.data, item = _a.item;
|
|
34
34
|
var grid = subMenuRowLength && Math.ceil(data.length / subMenuRowLength);
|
|
35
35
|
var dataWithColumn = (0, refactorColumn_1.default)(data, subMenuRowLength || 0);
|
|
36
|
-
return ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: (0, jsx_runtime_1.jsx)(Breadcrumbs_styled_1.DropdownList, { gridTemplateColumns: grid, children: dataWithColumn === null || dataWithColumn === void 0 ? void 0 : dataWithColumn.map(function (childColumn) {
|
|
36
|
+
return ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: (0, jsx_runtime_1.jsx)(Breadcrumbs_styled_1.DropdownList, { gridTemplateColumns: grid, children: dataWithColumn === null || dataWithColumn === void 0 ? void 0 : dataWithColumn.map(function (childColumn, key) {
|
|
37
37
|
return ((0, jsx_runtime_1.jsx)(Breadcrumbs_styled_1.SubCategoryItem, { children: (0, jsx_runtime_1.jsx)(Breadcrumbs_styled_1.SubCategoryItemList, { children: childColumn === null || childColumn === void 0 ? void 0 : childColumn.map(function (child) {
|
|
38
|
-
return ((0, jsx_runtime_1.jsx)(Breadcrumbs_styled_1.SubCategoryItemListItem, { isActive: child.isActive, isSeeAll: child.isSeeAll, className: "caption-medium-12-15", children: (0, jsx_runtime_1.jsx)(ButtonLinkComponent, { item: child, children: child.name }) }));
|
|
39
|
-
}) }) }));
|
|
38
|
+
return ((0, jsx_runtime_1.jsx)(Breadcrumbs_styled_1.SubCategoryItemListItem, { isActive: child.isActive, isSeeAll: child.isSeeAll, className: "caption-medium-12-15", children: (0, jsx_runtime_1.jsx)(ButtonLinkComponent, { item: child, children: child.name }) }, child.id));
|
|
39
|
+
}) }) }, key));
|
|
40
40
|
}) }) }));
|
|
41
41
|
};
|
|
42
42
|
var SubMenuMobile = function () {
|
|
@@ -45,7 +45,7 @@ var Breadcrumbs = function (props) {
|
|
|
45
45
|
var _a;
|
|
46
46
|
return ((0, jsx_runtime_1.jsx)(Breadcrumbs_styled_1.SubMenuMobileItem, { isActive: item.isActive, className: (0, classnames_1.default)("caption-bold-12-15", (_a = {},
|
|
47
47
|
_a["active"] = item.isActive,
|
|
48
|
-
_a)), children: (0, jsx_runtime_1.jsx)(ButtonLinkComponent, { item: item, children: item.name }) }));
|
|
48
|
+
_a)), children: (0, jsx_runtime_1.jsx)(ButtonLinkComponent, { item: item, children: item.name }) }, item.id));
|
|
49
49
|
}) }));
|
|
50
50
|
};
|
|
51
51
|
return ((0, jsx_runtime_1.jsxs)(Breadcrumbs_styled_1.BreadcrumbsWrapper, { children: [(0, jsx_runtime_1.jsx)(Breadcrumbs_styled_1.BreadcrumbsList, { children: data === null || data === void 0 ? void 0 : data.map(function (breadCrumbItem, key) {
|
|
@@ -44,25 +44,24 @@ var Modal = function (props) {
|
|
|
44
44
|
(props === null || props === void 0 ? void 0 : props.onClose) && props.onClose();
|
|
45
45
|
};
|
|
46
46
|
var onPrimaryAction = props.onPrimaryAction, onSecondaryAction = props.onSecondaryAction, onBack = props.onBack, other = __rest(props, ["onPrimaryAction", "onSecondaryAction", "onBack"]);
|
|
47
|
-
return showModal &&
|
|
47
|
+
return (showModal &&
|
|
48
|
+
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.jsxs)("div", { className: "content", children: [props.contentTitle && ((0, jsx_runtime_1.jsx)("strong", { className: "contentTitle headline-semi-bold-20-24", children: props.contentTitle })), (0, jsx_runtime_1.jsx)("div", { className: "contentInner", children: props.children })] }), (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, 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, children: props.secondaryButtonText })] }))] })] })) }), document.body));
|
|
48
49
|
};
|
|
49
50
|
exports.default = Modal;
|
|
50
51
|
Modal.defaultProps = {
|
|
51
|
-
size:
|
|
52
|
+
size: "small",
|
|
52
53
|
showBackIcon: true,
|
|
53
54
|
showCloseIcon: true,
|
|
54
55
|
show: true,
|
|
55
|
-
buttonsAlignment:
|
|
56
|
-
primaryButtonText:
|
|
57
|
-
secondaryButtonText:
|
|
58
|
-
onPrimaryAction: function () {
|
|
59
|
-
},
|
|
60
|
-
onSecondaryAction: function () {
|
|
61
|
-
},
|
|
56
|
+
buttonsAlignment: "vertical",
|
|
57
|
+
primaryButtonText: "Primary",
|
|
58
|
+
secondaryButtonText: "Secondary",
|
|
59
|
+
onPrimaryAction: function () { },
|
|
60
|
+
onSecondaryAction: function () { },
|
|
62
61
|
showHeaderBorder: false,
|
|
63
62
|
showFooterBorder: false,
|
|
64
63
|
showContentBorder: false,
|
|
65
64
|
hasFixedHeight: false,
|
|
66
|
-
titleAlignment:
|
|
67
|
-
contentTitle:
|
|
65
|
+
titleAlignment: "center",
|
|
66
|
+
contentTitle: "",
|
|
68
67
|
};
|