krl-alfred 2.20.0 → 2.20.2
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/dist/components/ActionButton/ActionButton.d.ts +1 -1
- package/dist/components/ActionButton/ActionButton.js +6 -6
- package/dist/components/ActionButton/ActionButton.styled.d.ts +2 -0
- package/dist/components/ActionButton/ActionButton.styled.js +15 -13
- package/dist/components/ActionButton/props.d.ts +5 -1
- package/dist/components/ActionButton/props.js +2 -0
- package/dist/components/ActionButton/stories/ActionButton.stories.d.ts +16 -1
- package/dist/components/ActionButton/stories/ActionButton.stories.js +38 -1
- package/dist/components/AddressCard/AddressCard.styled.js +1 -1
- package/dist/components/DescriptionCard/DescriptionCard.d.ts +1 -1
- package/dist/components/DescriptionCard/DescriptionCard.js +4 -6
- package/dist/components/DescriptionCard/DescriptionCard.styled.d.ts +11 -0
- package/dist/components/DescriptionCard/DescriptionCard.styled.js +20 -13
- package/dist/components/DescriptionCard/props.d.ts +12 -0
- package/dist/components/DescriptionCard/props.js +8 -1
- package/dist/components/DescriptionCard/stories/DescriptionCard.stories.d.ts +93 -1
- package/dist/components/DescriptionCard/stories/DescriptionCard.stories.js +43 -1
- package/dist/components/Icon/iconList/RadioButtonElementChecked.js +1 -1
- package/dist/components/InfoBox/InfoBox.js +1 -1
- package/dist/components/InfoBox/props.d.ts +2 -2
- package/dist/components/InfoBox/stories/InfoBox.stories.d.ts +15 -8
- package/dist/components/InfoBox/stories/InfoBox.stories.js +7 -4
- package/dist/components/Modal/Modal.d.ts +1 -1
- package/dist/components/Modal/Modal.js +29 -13
- package/dist/components/Modal/props.d.ts +2 -0
- package/dist/components/Modal/props.js +1 -0
- package/dist/components/Modal/stories/Modal.stories.d.ts +1 -1
- package/dist/components/ProductCardHorizontalSm/ProductCardHorizontalSm.d.ts +1 -1
- package/dist/components/ProductCardHorizontalSm/ProductCardHorizontalSm.js +3 -2
- package/dist/components/ProductCardHorizontalSm/ProductCardHorizontalSm.styled.d.ts +1 -1
- package/dist/components/ProductCardHorizontalSm/ProductCardHorizontalSm.styled.js +5 -2
- package/dist/components/ProductCardHorizontalSm/props.d.ts +5 -3
- package/dist/components/ProductCardHorizontalSm/props.js +1 -0
- package/dist/components/ProductCardHorizontalSm/stories/ProductCardHorizontalSm.stories.d.ts +68 -1
- package/dist/components/ProductCardHorizontalSm/stories/ProductCardHorizontalSm.stories.js +9 -2
- package/dist/components/RadioGroup/RadioGroup.d.ts +1 -1
- package/dist/components/RadioGroup/RadioGroup.js +3 -3
- package/dist/components/RadioGroup/RadioGroup.styled.js +7 -2
- package/dist/components/RadioGroup/props.d.ts +17 -3
- package/dist/components/RadioGroup/props.js +3 -2
- package/dist/components/RadioGroup/stories/RadioGroup.stories.d.ts +114 -1
- package/dist/components/RadioGroup/stories/RadioGroup.stories.js +128 -2
- package/dist/components/Tabs/Tabs.d.ts +1 -1
- package/dist/components/Tabs/Tabs.js +4 -4
- package/dist/components/Tabs/Tabs.styled.js +1 -1
- package/dist/components/Tabs/props.d.ts +3 -0
- package/dist/components/Tabs/stories/Tabs.stories.d.ts +12 -1
- package/dist/components/Tabs/stories/Tabs.stories.js +12 -1
- package/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
declare const _default: {
|
|
3
3
|
title: string;
|
|
4
|
-
component: ({ title, headerButtonText, hasHeaderDropdown, list, hasBadge, badgeText, hasHeader, hasRounded, hasBorder, headerImage, dropdownList, dropdownWidth, accordionList, boxSize, hasHeaderButton, headerButtonWidth, hasHeaderPrimaryButton, headerPrimaryButtonAction, headerPrimaryButtonText, headerButtonAction, customColumnSpan }: import("../props").DescriptionCard) => React.JSX.Element;
|
|
4
|
+
component: ({ title, headerButtonText, hasHeaderDropdown, list, hasBadge, badgeText, hasHeader, hasHeaderBackground, hasHeaderBorder, hasRounded, hasBorder, headerImage, dropdownList, dropdownWidth, accordionList, boxSize, hasHeaderButton, headerButtonWidth, hasHeaderPrimaryButton, headerPrimaryButtonAction, headerPrimaryButtonText, headerPrimaryButtonIcon, headerPrimaryButtonSize, content, headerButtonAction, customColumnSpan }: import("../props").DescriptionCard) => React.JSX.Element;
|
|
5
5
|
tags: string[];
|
|
6
6
|
argTypes: {
|
|
7
7
|
title: {
|
|
@@ -16,6 +16,12 @@ declare const _default: {
|
|
|
16
16
|
hasHeader: {
|
|
17
17
|
control: string;
|
|
18
18
|
};
|
|
19
|
+
hasHeaderBackground: {
|
|
20
|
+
control: string;
|
|
21
|
+
};
|
|
22
|
+
hasHeaderBorder: {
|
|
23
|
+
control: string;
|
|
24
|
+
};
|
|
19
25
|
hasRounded: {
|
|
20
26
|
control: string;
|
|
21
27
|
};
|
|
@@ -101,6 +107,72 @@ export declare const WithBadge: {
|
|
|
101
107
|
headerImage: React.JSX.Element;
|
|
102
108
|
};
|
|
103
109
|
};
|
|
110
|
+
export declare const WithHeaderBackground: {
|
|
111
|
+
args: {
|
|
112
|
+
hasHeaderBackground: boolean;
|
|
113
|
+
title: string;
|
|
114
|
+
hasBadge: boolean;
|
|
115
|
+
badgeText: string;
|
|
116
|
+
hasHeaderDropdown: boolean;
|
|
117
|
+
headerButtonText: string;
|
|
118
|
+
list: {
|
|
119
|
+
display: string;
|
|
120
|
+
title: string;
|
|
121
|
+
}[];
|
|
122
|
+
hasHeader: boolean;
|
|
123
|
+
hasRounded: boolean;
|
|
124
|
+
hasBorder: boolean;
|
|
125
|
+
hasHeaderButton: boolean;
|
|
126
|
+
headerButtonWidth: any;
|
|
127
|
+
hasHeaderPrimaryButton: boolean;
|
|
128
|
+
headerPrimaryButtonText: string;
|
|
129
|
+
headerPrimaryButtonAction: () => void;
|
|
130
|
+
headerButtonAction: () => void;
|
|
131
|
+
boxSize: number;
|
|
132
|
+
customColumnSpan: {
|
|
133
|
+
0: number;
|
|
134
|
+
};
|
|
135
|
+
dropdownList: {
|
|
136
|
+
name: string;
|
|
137
|
+
component: ({ children }: any) => React.JSX.Element;
|
|
138
|
+
}[];
|
|
139
|
+
dropdownWidth: string;
|
|
140
|
+
headerImage: React.JSX.Element;
|
|
141
|
+
};
|
|
142
|
+
};
|
|
143
|
+
export declare const WithoutHeaderBorder: {
|
|
144
|
+
args: {
|
|
145
|
+
hasHeaderBorder: boolean;
|
|
146
|
+
title: string;
|
|
147
|
+
hasBadge: boolean;
|
|
148
|
+
badgeText: string;
|
|
149
|
+
hasHeaderDropdown: boolean;
|
|
150
|
+
headerButtonText: string;
|
|
151
|
+
list: {
|
|
152
|
+
display: string;
|
|
153
|
+
title: string;
|
|
154
|
+
}[];
|
|
155
|
+
hasHeader: boolean;
|
|
156
|
+
hasRounded: boolean;
|
|
157
|
+
hasBorder: boolean;
|
|
158
|
+
hasHeaderButton: boolean;
|
|
159
|
+
headerButtonWidth: any;
|
|
160
|
+
hasHeaderPrimaryButton: boolean;
|
|
161
|
+
headerPrimaryButtonText: string;
|
|
162
|
+
headerPrimaryButtonAction: () => void;
|
|
163
|
+
headerButtonAction: () => void;
|
|
164
|
+
boxSize: number;
|
|
165
|
+
customColumnSpan: {
|
|
166
|
+
0: number;
|
|
167
|
+
};
|
|
168
|
+
dropdownList: {
|
|
169
|
+
name: string;
|
|
170
|
+
component: ({ children }: any) => React.JSX.Element;
|
|
171
|
+
}[];
|
|
172
|
+
dropdownWidth: string;
|
|
173
|
+
headerImage: React.JSX.Element;
|
|
174
|
+
};
|
|
175
|
+
};
|
|
104
176
|
export declare const WithHeaderButton: {
|
|
105
177
|
args: {
|
|
106
178
|
hasHeaderButton: boolean;
|
|
@@ -458,3 +530,23 @@ export declare const HasAccordion: {
|
|
|
458
530
|
dropdownWidth: string;
|
|
459
531
|
};
|
|
460
532
|
};
|
|
533
|
+
export declare const WithContent: {
|
|
534
|
+
args: {
|
|
535
|
+
title: string;
|
|
536
|
+
hasBadge: boolean;
|
|
537
|
+
badgeText: string;
|
|
538
|
+
hasHeader: boolean;
|
|
539
|
+
hasRounded: boolean;
|
|
540
|
+
hasBorder: boolean;
|
|
541
|
+
hasHeaderPrimaryButton: boolean;
|
|
542
|
+
headerPrimaryButtonText: string;
|
|
543
|
+
headerPrimaryButtonAction: () => void;
|
|
544
|
+
headerImage: any;
|
|
545
|
+
list: any[];
|
|
546
|
+
content: React.JSX.Element;
|
|
547
|
+
};
|
|
548
|
+
decorators: ((Story: any) => React.JSX.Element)[];
|
|
549
|
+
};
|
|
550
|
+
export declare const SubscriptionRules: {
|
|
551
|
+
render: () => React.JSX.Element;
|
|
552
|
+
};
|
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
|
|
3
|
+
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
|
|
4
|
+
return cooked;
|
|
5
|
+
};
|
|
2
6
|
var __assign = (this && this.__assign) || function () {
|
|
3
7
|
__assign = Object.assign || function(t) {
|
|
4
8
|
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
@@ -14,8 +18,9 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
14
18
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
15
19
|
};
|
|
16
20
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
exports.HasAccordion = exports.CustomColumnSpan = exports.WithoutHeaderImage = exports.EmptyList = exports.MinimalList = exports.WithoutRounded = exports.WithoutBorder = exports.WithoutHeader = exports.WithHeaderDropdown = exports.WithHeaderPrimaryButton = exports.WithHeaderButton = exports.WithBadge = exports.Default = void 0;
|
|
21
|
+
exports.SubscriptionRules = exports.WithContent = exports.HasAccordion = exports.CustomColumnSpan = exports.WithoutHeaderImage = exports.EmptyList = exports.MinimalList = exports.WithoutRounded = exports.WithoutBorder = exports.WithoutHeader = exports.WithHeaderDropdown = exports.WithHeaderPrimaryButton = exports.WithHeaderButton = exports.WithoutHeaderBorder = exports.WithHeaderBackground = exports.WithBadge = exports.Default = void 0;
|
|
18
22
|
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
23
|
+
var styled_components_1 = __importDefault(require("styled-components"));
|
|
19
24
|
var DescriptionCard_1 = __importDefault(require("../DescriptionCard"));
|
|
20
25
|
var descriptionList_json_1 = __importDefault(require("./../../../jsons/descriptionList.json"));
|
|
21
26
|
var defaultHeaderImage = (0, jsx_runtime_1.jsx)("img", { src: "https://kiralarsin.s3.eu-central-1.amazonaws.com/products/4MOMSMAMAROOANAKUC_1.jpg", alt: "test" });
|
|
@@ -60,6 +65,8 @@ exports.default = {
|
|
|
60
65
|
hasBadge: { control: 'boolean' },
|
|
61
66
|
badgeText: { control: 'text' },
|
|
62
67
|
hasHeader: { control: 'boolean' },
|
|
68
|
+
hasHeaderBackground: { control: 'boolean' },
|
|
69
|
+
hasHeaderBorder: { control: 'boolean' },
|
|
63
70
|
hasRounded: { control: 'boolean' },
|
|
64
71
|
hasBorder: { control: 'boolean' },
|
|
65
72
|
hasHeaderButton: { control: 'boolean' },
|
|
@@ -74,6 +81,12 @@ exports.Default = {
|
|
|
74
81
|
exports.WithBadge = {
|
|
75
82
|
args: __assign(__assign({}, defaultArgs), { hasBadge: true, badgeText: "Yeni" }),
|
|
76
83
|
};
|
|
84
|
+
exports.WithHeaderBackground = {
|
|
85
|
+
args: __assign(__assign({}, defaultArgs), { hasHeaderBackground: true }),
|
|
86
|
+
};
|
|
87
|
+
exports.WithoutHeaderBorder = {
|
|
88
|
+
args: __assign(__assign({}, defaultArgs), { hasHeaderBorder: false }),
|
|
89
|
+
};
|
|
77
90
|
exports.WithHeaderButton = {
|
|
78
91
|
args: __assign(__assign({}, defaultArgs), { hasHeaderButton: true, headerButtonText: "Seçenekler" }),
|
|
79
92
|
};
|
|
@@ -150,3 +163,32 @@ exports.HasAccordion = {
|
|
|
150
163
|
}
|
|
151
164
|
], headerImage: (0, jsx_runtime_1.jsx)("img", { src: "https://kiralarsin.s3.eu-central-1.amazonaws.com/products/4MOMSMAMAROOANAKUC_1.jpg", alt: "test" }) }),
|
|
152
165
|
};
|
|
166
|
+
var SubscriptionRuleContentWrapper = styled_components_1.default.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n display: block;\n"], ["\n display: block;\n"])));
|
|
167
|
+
var SubscriptionRuleDescription = styled_components_1.default.p(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n margin: 0;\n font: var(--body-medium-14-17);\n color: var(--dark-opacity-75);\n"], ["\n margin: 0;\n font: var(--body-medium-14-17);\n color: var(--dark-opacity-75);\n"])));
|
|
168
|
+
var SubscriptionRuleDivider = styled_components_1.default.div(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n border-bottom: 1px solid var(--dark-opacity-10);\n margin: 1rem 0;\n"], ["\n border-bottom: 1px solid var(--dark-opacity-10);\n margin: 1rem 0;\n"])));
|
|
169
|
+
var SubscriptionRuleMeta = styled_components_1.default.div(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n display: flex;\n align-items: center;\n flex-wrap: wrap;\n gap: 1.5rem;\n"], ["\n display: flex;\n align-items: center;\n flex-wrap: wrap;\n gap: 1.5rem;\n"])));
|
|
170
|
+
var SubscriptionRuleMetaItem = styled_components_1.default.span(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n font: var(--body-medium-14-17);\n color: var(--dark-opacity-75);\n"], ["\n font: var(--body-medium-14-17);\n color: var(--dark-opacity-75);\n"])));
|
|
171
|
+
var subscriptionRuleContent = function (description, meta) { return ((0, jsx_runtime_1.jsxs)(SubscriptionRuleContentWrapper, { children: [(0, jsx_runtime_1.jsx)(SubscriptionRuleDescription, { children: description }), (0, jsx_runtime_1.jsx)(SubscriptionRuleDivider, {}), (0, jsx_runtime_1.jsx)(SubscriptionRuleMeta, { children: meta.map(function (item) { return ((0, jsx_runtime_1.jsx)(SubscriptionRuleMetaItem, { children: item }, item)); }) })] })); };
|
|
172
|
+
exports.WithContent = {
|
|
173
|
+
args: {
|
|
174
|
+
title: "Standart esnek",
|
|
175
|
+
hasBadge: true,
|
|
176
|
+
badgeText: "Esnek",
|
|
177
|
+
hasHeader: true,
|
|
178
|
+
hasRounded: true,
|
|
179
|
+
hasBorder: true,
|
|
180
|
+
hasHeaderPrimaryButton: true,
|
|
181
|
+
headerPrimaryButtonText: "Düzenle",
|
|
182
|
+
headerPrimaryButtonAction: function () { return console.log("edit clicked"); },
|
|
183
|
+
headerImage: null,
|
|
184
|
+
list: [],
|
|
185
|
+
content: subscriptionRuleContent("Çekirdek kahve ürünleri için varsayılan abonelik kuralı. Müşteriler istedikleri zaman aboneliklerini duraklatabilir veya iptal edebilir.", ["5 Ürün kullanıyor", "32 Aktif abone", "Son güncelleme: iki hafta önce"]),
|
|
186
|
+
},
|
|
187
|
+
decorators: [
|
|
188
|
+
function (Story) { return ((0, jsx_runtime_1.jsx)("div", __assign({ style: { maxWidth: "900px", width: "100%" } }, { children: (0, jsx_runtime_1.jsx)(Story, {}) }))); },
|
|
189
|
+
],
|
|
190
|
+
};
|
|
191
|
+
exports.SubscriptionRules = {
|
|
192
|
+
render: function () { return ((0, jsx_runtime_1.jsxs)("div", __assign({ style: { display: "flex", flexDirection: "column", gap: "1rem", maxWidth: "900px", width: "100%" } }, { children: [(0, jsx_runtime_1.jsx)(DescriptionCard_1.default, { title: "Standart esnek", hasBadge: true, badgeText: "Esnek", hasHeader: true, hasRounded: true, hasBorder: true, hasHeaderPrimaryButton: true, headerPrimaryButtonText: "D\u00FCzenle", headerPrimaryButtonAction: function () { return console.log("edit clicked"); }, list: [], content: subscriptionRuleContent("Çekirdek kahve ürünleri için varsayılan abonelik kuralı. Müşteriler istedikleri zaman aboneliklerini duraklatabilir veya iptal edebilir.", ["5 Ürün kullanıyor", "32 Aktif abone", "Son güncelleme: iki hafta önce"]) }), (0, jsx_runtime_1.jsx)(DescriptionCard_1.default, { title: "Standart Taahh\u00FCtl\u00FC", hasBadge: true, badgeText: "Taahh\u00FCtl\u00FC", hasHeader: true, hasRounded: true, hasBorder: true, hasHeaderPrimaryButton: true, headerPrimaryButtonText: "D\u00FCzenle", headerPrimaryButtonAction: function () { return console.log("edit clicked"); }, list: [], content: subscriptionRuleContent("Çekirdek kahve ürünleri için taahhütlü abonelik kuralı. Müşteriler belirlenen süre boyunca aboneliklerini devam ettirmekle yükümlüdür.", ["3 Ürün kullanıyor", "18 Aktif abone", "Son güncelleme: bir hafta önce"]) })] }))); },
|
|
193
|
+
};
|
|
194
|
+
var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5;
|
|
@@ -36,5 +36,5 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
36
36
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
37
37
|
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
38
38
|
var React = __importStar(require("react"));
|
|
39
|
-
var SvgRadioButtonElementChecked = function (props) { return ((0, jsx_runtime_1.jsxs)("svg", __assign({ width: 24, height: 24, viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, props, { children: [(0, jsx_runtime_1.jsx)("circle", { cx: 12, cy: 12, r: 12, fill: "
|
|
39
|
+
var SvgRadioButtonElementChecked = function (props) { return ((0, jsx_runtime_1.jsxs)("svg", __assign({ width: 24, height: 24, viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, props, { children: [(0, jsx_runtime_1.jsx)("circle", { cx: 12, cy: 12, r: 12, fill: "currentColor" }), (0, jsx_runtime_1.jsx)("circle", { cx: 12, cy: 12, r: 6, fill: "white" })] }))); };
|
|
40
40
|
exports.default = SvgRadioButtonElementChecked;
|
|
@@ -55,7 +55,7 @@ var InfoBox = function (_a) {
|
|
|
55
55
|
}, false);
|
|
56
56
|
}
|
|
57
57
|
});
|
|
58
|
-
}, []);
|
|
58
|
+
}, [description]);
|
|
59
59
|
return ((0, jsx_runtime_1.jsxs)(InfoBox_styled_1.InfoBoxStyled, __assign({ onClick: onClick, "$radius": radius, "$variant": variant, "$hasLink": !!onClick, "$size": size }, { children: [hasIcon && ((0, jsx_runtime_1.jsx)(InfoBox_styled_1.IconWrapper, __assign({ "$variant": variant }, { children: (0, jsx_runtime_1.jsx)(Icon_1.default, { name: variant === "danger" ? "Danger" : icon }) }))), (0, jsx_runtime_1.jsxs)(InfoBox_styled_1.TextWrapper, { children: [title && (0, jsx_runtime_1.jsx)(InfoBox_styled_1.Title, { dangerouslySetInnerHTML: { __html: title } }), description && (0, jsx_runtime_1.jsx)(InfoBox_styled_1.Description, __assign({ "$size": size, ref: descriptionRef }, { children: description })), (0, jsx_runtime_1.jsx)(InfoBox_styled_1.AlertStyled, __assign({ "$visible": alert, "$alertLeft": alertLeft, "$alertTop": alertTop }, { children: t('copied') })), (0, jsx_runtime_1.jsx)(InfoBox_styled_1.Input, { ref: inputRef, id: "infoBoxInput" })] }), !!onClick && ((0, jsx_runtime_1.jsx)(InfoBox_styled_1.LinkIconWrapper, { children: (0, jsx_runtime_1.jsx)(Icon_1.default, { name: "ArrowRightBig" }) }))] })));
|
|
60
60
|
};
|
|
61
61
|
exports.default = InfoBox;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
import React from "react";
|
|
2
2
|
export declare const sizes: string[];
|
|
3
3
|
export declare const variants: string[];
|
|
4
4
|
export declare const iconNames: string[];
|
|
@@ -27,5 +27,5 @@ export interface AlertProps {
|
|
|
27
27
|
$visible?: boolean;
|
|
28
28
|
}
|
|
29
29
|
export declare const InfoBoxDefault: InfoBox;
|
|
30
|
-
export type InfoBoxProps =
|
|
30
|
+
export type InfoBoxProps = InfoBox;
|
|
31
31
|
export {};
|
|
@@ -37,14 +37,6 @@ export declare const Default: {
|
|
|
37
37
|
onClick: () => void;
|
|
38
38
|
};
|
|
39
39
|
};
|
|
40
|
-
export declare const WithoutIcon: {
|
|
41
|
-
args: {
|
|
42
|
-
hasIcon: boolean;
|
|
43
|
-
title: string;
|
|
44
|
-
description: string;
|
|
45
|
-
onClick: () => void;
|
|
46
|
-
};
|
|
47
|
-
};
|
|
48
40
|
export declare const Primary: {
|
|
49
41
|
args: {
|
|
50
42
|
variant: string;
|
|
@@ -77,6 +69,14 @@ export declare const Secondary: {
|
|
|
77
69
|
description: string;
|
|
78
70
|
};
|
|
79
71
|
};
|
|
72
|
+
export declare const WithoutIcon: {
|
|
73
|
+
args: {
|
|
74
|
+
hasIcon: boolean;
|
|
75
|
+
title: string;
|
|
76
|
+
description: string;
|
|
77
|
+
onClick: () => void;
|
|
78
|
+
};
|
|
79
|
+
};
|
|
80
80
|
export declare const Small: {
|
|
81
81
|
args: {
|
|
82
82
|
size: string;
|
|
@@ -152,6 +152,13 @@ export declare const SimpleDescription: {
|
|
|
152
152
|
onClick: () => void;
|
|
153
153
|
};
|
|
154
154
|
};
|
|
155
|
+
export declare const ReactNodeDescription: {
|
|
156
|
+
args: {
|
|
157
|
+
title: string;
|
|
158
|
+
description: React.JSX.Element;
|
|
159
|
+
onClick: any;
|
|
160
|
+
};
|
|
161
|
+
};
|
|
155
162
|
export declare const WithCustomRadius: {
|
|
156
163
|
args: {
|
|
157
164
|
radius: string;
|
|
@@ -14,7 +14,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
14
14
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
exports.WithCustomRadius = exports.SimpleDescription = exports.Minimal = exports.WithoutDescription = exports.WithoutTitle = exports.WithoutOnClick = exports.AllSizes = exports.AllVariants = exports.Large = exports.Medium = exports.Small = exports.
|
|
17
|
+
exports.WithCustomRadius = exports.ReactNodeDescription = exports.SimpleDescription = exports.Minimal = exports.WithoutDescription = exports.WithoutTitle = exports.WithoutOnClick = exports.AllSizes = exports.AllVariants = exports.Large = exports.Medium = exports.Small = exports.WithoutIcon = exports.Secondary = exports.Warning = exports.Danger = exports.Primary = exports.Default = void 0;
|
|
18
18
|
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
19
19
|
var InfoBox_1 = __importDefault(require("../InfoBox"));
|
|
20
20
|
var props_1 = require("../props");
|
|
@@ -41,9 +41,6 @@ exports.default = {
|
|
|
41
41
|
exports.Default = {
|
|
42
42
|
args: defaultArgs,
|
|
43
43
|
};
|
|
44
|
-
exports.WithoutIcon = {
|
|
45
|
-
args: __assign(__assign({}, defaultArgs), { hasIcon: false }),
|
|
46
|
-
};
|
|
47
44
|
// Variant stories
|
|
48
45
|
exports.Primary = {
|
|
49
46
|
args: __assign(__assign({}, defaultArgs), { variant: 'primary' }),
|
|
@@ -57,6 +54,9 @@ exports.Warning = {
|
|
|
57
54
|
exports.Secondary = {
|
|
58
55
|
args: __assign(__assign({}, defaultArgs), { variant: 'secondary', onClick: undefined }),
|
|
59
56
|
};
|
|
57
|
+
exports.WithoutIcon = {
|
|
58
|
+
args: __assign(__assign({}, defaultArgs), { hasIcon: false, title: "İkon olmadan" }),
|
|
59
|
+
};
|
|
60
60
|
// Size stories
|
|
61
61
|
exports.Small = {
|
|
62
62
|
args: __assign(__assign({}, defaultArgs), { size: 'small' }),
|
|
@@ -92,6 +92,9 @@ exports.Minimal = {
|
|
|
92
92
|
exports.SimpleDescription = {
|
|
93
93
|
args: __assign(__assign({}, defaultArgs), { title: "Basit bilgi", description: "Bu sadece düz metin açıklamasıdır. HTML veya kopyalanabilir alan içermez." }),
|
|
94
94
|
};
|
|
95
|
+
exports.ReactNodeDescription = {
|
|
96
|
+
args: __assign(__assign({}, defaultArgs), { title: "React node açıklama", description: ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("p", { children: "\u0130ade g\u00FCn\u00FCn kiralama biti\u015F g\u00FCn\u00FCnd\u00FCr." }), (0, jsx_runtime_1.jsxs)("p", { children: ["Detaylar i\u00E7in ", (0, jsx_runtime_1.jsx)("b", { children: "info@kiralarsin.com" }), " adresine yazabilirsin."] })] })), onClick: undefined }),
|
|
97
|
+
};
|
|
95
98
|
exports.WithCustomRadius = {
|
|
96
99
|
args: __assign(__assign({}, defaultArgs), { radius: "16px" }),
|
|
97
100
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { ModalProps } from "./props";
|
|
3
|
-
declare const Modal: ({ size, showCloseIcon, showSkipButton, skipButtonText, onSkip, showBackIcon, backIconType, hasCloseOnOutsideClick, onClose, onBack, show, showDivider, title, children, modalFooter, showPrimaryButton, showSecondaryButton, onPrimaryAction, onSecondaryAction, buttonsAlignment, buttonsAlignmentOnMobile, primaryButtonText, secondaryButtonText, showHeaderBorder, showFooterBorder, autoHeight, titleAlignment, titleDescription, isPrimaryButtonLoading, primaryButtonIcon, secondaryButtonIcon, isSecondaryButtonLoading, isPrimaryButtonDisabled, isSecondaryButtonDisabled, primaryButtonWidth, secondaryButtonWidth, customContent, showHeader, id, renderInDOM, hasHeaderMinHeight, ...other }: ModalProps) => React.
|
|
3
|
+
declare const Modal: ({ size, showCloseIcon, showSkipButton, skipButtonText, onSkip, showBackIcon, backIconType, hasCloseOnOutsideClick, onClose, onBack, show, showDivider, title, children, modalFooter, showPrimaryButton, showSecondaryButton, onPrimaryAction, onSecondaryAction, buttonsAlignment, buttonsAlignmentOnMobile, primaryButtonText, secondaryButtonText, showHeaderBorder, showFooterBorder, autoHeight, titleAlignment, titleDescription, isPrimaryButtonLoading, primaryButtonIcon, secondaryButtonIcon, isSecondaryButtonLoading, isPrimaryButtonDisabled, isSecondaryButtonDisabled, primaryButtonWidth, secondaryButtonWidth, customContent, showHeader, id, renderInDOM, portalContainer, hasHeaderMinHeight, ...other }: ModalProps) => React.ReactPortal;
|
|
4
4
|
export default Modal;
|
|
@@ -37,21 +37,35 @@ var TextLink_1 = __importDefault(require("../TextLink"));
|
|
|
37
37
|
var useOnClickOutside_1 = __importDefault(require("../../hooks/useOnClickOutside"));
|
|
38
38
|
var react_i18next_1 = require("react-i18next");
|
|
39
39
|
var Modal = function (_a) {
|
|
40
|
-
var _b = _a.size, size = _b === void 0 ? props_1.ModalDefault.size : _b, _c = _a.showCloseIcon, showCloseIcon = _c === void 0 ? props_1.ModalDefault.showCloseIcon : _c, _d = _a.showSkipButton, showSkipButton = _d === void 0 ? props_1.ModalDefault.showSkipButton : _d, _e = _a.skipButtonText, skipButtonText = _e === void 0 ? props_1.ModalDefault.skipButtonText : _e, _f = _a.onSkip, onSkip = _f === void 0 ? props_1.ModalDefault.onSkip : _f, _g = _a.showBackIcon, showBackIcon = _g === void 0 ? props_1.ModalDefault.showBackIcon : _g, _h = _a.backIconType, backIconType = _h === void 0 ? props_1.ModalDefault.backIconType : _h, _j = _a.hasCloseOnOutsideClick, hasCloseOnOutsideClick = _j === void 0 ? props_1.ModalDefault.hasCloseOnOutsideClick : _j, _k = _a.onClose, onClose = _k === void 0 ? props_1.ModalDefault.onClose : _k, _l = _a.onBack, onBack = _l === void 0 ? props_1.ModalDefault.onBack : _l, _m = _a.show, show = _m === void 0 ? props_1.ModalDefault.show : _m, _o = _a.showDivider, showDivider = _o === void 0 ? props_1.ModalDefault.showDivider : _o, _p = _a.title, title = _p === void 0 ? props_1.ModalDefault.title : _p, _q = _a.children, children = _q === void 0 ? props_1.ModalDefault.children : _q, _r = _a.modalFooter, modalFooter = _r === void 0 ? props_1.ModalDefault.modalFooter : _r, _s = _a.showPrimaryButton, showPrimaryButton = _s === void 0 ? props_1.ModalDefault.showPrimaryButton : _s, _t = _a.showSecondaryButton, showSecondaryButton = _t === void 0 ? props_1.ModalDefault.showSecondaryButton : _t, _u = _a.onPrimaryAction, onPrimaryAction = _u === void 0 ? props_1.ModalDefault.onPrimaryAction : _u, _v = _a.onSecondaryAction, onSecondaryAction = _v === void 0 ? props_1.ModalDefault.onSecondaryAction : _v, _w = _a.buttonsAlignment, buttonsAlignment = _w === void 0 ? props_1.ModalDefault.buttonsAlignment : _w, _x = _a.buttonsAlignmentOnMobile, buttonsAlignmentOnMobile = _x === void 0 ? props_1.ModalDefault.buttonsAlignmentOnMobile : _x, _y = _a.primaryButtonText, primaryButtonText = _y === void 0 ? props_1.ModalDefault.primaryButtonText : _y, _z = _a.secondaryButtonText, secondaryButtonText = _z === void 0 ? props_1.ModalDefault.secondaryButtonText : _z, _0 = _a.showHeaderBorder, showHeaderBorder = _0 === void 0 ? props_1.ModalDefault.showHeaderBorder : _0, _1 = _a.showFooterBorder, showFooterBorder = _1 === void 0 ? props_1.ModalDefault.showFooterBorder : _1, _2 = _a.autoHeight, autoHeight = _2 === void 0 ? props_1.ModalDefault.autoHeight : _2, _3 = _a.titleAlignment, titleAlignment = _3 === void 0 ? props_1.ModalDefault.titleAlignment : _3, _4 = _a.titleDescription, titleDescription = _4 === void 0 ? props_1.ModalDefault.titleDescription : _4, _5 = _a.isPrimaryButtonLoading, isPrimaryButtonLoading = _5 === void 0 ? props_1.ModalDefault.isPrimaryButtonLoading : _5, _6 = _a.primaryButtonIcon, primaryButtonIcon = _6 === void 0 ? props_1.ModalDefault.primaryButtonIcon : _6, _7 = _a.secondaryButtonIcon, secondaryButtonIcon = _7 === void 0 ? props_1.ModalDefault.secondaryButtonIcon : _7, _8 = _a.isSecondaryButtonLoading, isSecondaryButtonLoading = _8 === void 0 ? props_1.ModalDefault.isSecondaryButtonLoading : _8, _9 = _a.isPrimaryButtonDisabled, isPrimaryButtonDisabled = _9 === void 0 ? props_1.ModalDefault.isPrimaryButtonDisabled : _9, _10 = _a.isSecondaryButtonDisabled, isSecondaryButtonDisabled = _10 === void 0 ? props_1.ModalDefault.isSecondaryButtonDisabled : _10, _11 = _a.primaryButtonWidth, primaryButtonWidth = _11 === void 0 ? props_1.ModalDefault.primaryButtonWidth : _11, _12 = _a.secondaryButtonWidth, secondaryButtonWidth = _12 === void 0 ? props_1.ModalDefault.secondaryButtonWidth : _12, _13 = _a.customContent, customContent = _13 === void 0 ? props_1.ModalDefault.customContent : _13, _14 = _a.showHeader, showHeader = _14 === void 0 ? props_1.ModalDefault.showHeader : _14, _15 = _a.id, id = _15 === void 0 ? props_1.ModalDefault.id : _15, _16 = _a.renderInDOM, renderInDOM = _16 === void 0 ? props_1.ModalDefault.renderInDOM : _16, _17 = _a.hasHeaderMinHeight, hasHeaderMinHeight =
|
|
41
|
-
var
|
|
40
|
+
var _b = _a.size, size = _b === void 0 ? props_1.ModalDefault.size : _b, _c = _a.showCloseIcon, showCloseIcon = _c === void 0 ? props_1.ModalDefault.showCloseIcon : _c, _d = _a.showSkipButton, showSkipButton = _d === void 0 ? props_1.ModalDefault.showSkipButton : _d, _e = _a.skipButtonText, skipButtonText = _e === void 0 ? props_1.ModalDefault.skipButtonText : _e, _f = _a.onSkip, onSkip = _f === void 0 ? props_1.ModalDefault.onSkip : _f, _g = _a.showBackIcon, showBackIcon = _g === void 0 ? props_1.ModalDefault.showBackIcon : _g, _h = _a.backIconType, backIconType = _h === void 0 ? props_1.ModalDefault.backIconType : _h, _j = _a.hasCloseOnOutsideClick, hasCloseOnOutsideClick = _j === void 0 ? props_1.ModalDefault.hasCloseOnOutsideClick : _j, _k = _a.onClose, onClose = _k === void 0 ? props_1.ModalDefault.onClose : _k, _l = _a.onBack, onBack = _l === void 0 ? props_1.ModalDefault.onBack : _l, _m = _a.show, show = _m === void 0 ? props_1.ModalDefault.show : _m, _o = _a.showDivider, showDivider = _o === void 0 ? props_1.ModalDefault.showDivider : _o, _p = _a.title, title = _p === void 0 ? props_1.ModalDefault.title : _p, _q = _a.children, children = _q === void 0 ? props_1.ModalDefault.children : _q, _r = _a.modalFooter, modalFooter = _r === void 0 ? props_1.ModalDefault.modalFooter : _r, _s = _a.showPrimaryButton, showPrimaryButton = _s === void 0 ? props_1.ModalDefault.showPrimaryButton : _s, _t = _a.showSecondaryButton, showSecondaryButton = _t === void 0 ? props_1.ModalDefault.showSecondaryButton : _t, _u = _a.onPrimaryAction, onPrimaryAction = _u === void 0 ? props_1.ModalDefault.onPrimaryAction : _u, _v = _a.onSecondaryAction, onSecondaryAction = _v === void 0 ? props_1.ModalDefault.onSecondaryAction : _v, _w = _a.buttonsAlignment, buttonsAlignment = _w === void 0 ? props_1.ModalDefault.buttonsAlignment : _w, _x = _a.buttonsAlignmentOnMobile, buttonsAlignmentOnMobile = _x === void 0 ? props_1.ModalDefault.buttonsAlignmentOnMobile : _x, _y = _a.primaryButtonText, primaryButtonText = _y === void 0 ? props_1.ModalDefault.primaryButtonText : _y, _z = _a.secondaryButtonText, secondaryButtonText = _z === void 0 ? props_1.ModalDefault.secondaryButtonText : _z, _0 = _a.showHeaderBorder, showHeaderBorder = _0 === void 0 ? props_1.ModalDefault.showHeaderBorder : _0, _1 = _a.showFooterBorder, showFooterBorder = _1 === void 0 ? props_1.ModalDefault.showFooterBorder : _1, _2 = _a.autoHeight, autoHeight = _2 === void 0 ? props_1.ModalDefault.autoHeight : _2, _3 = _a.titleAlignment, titleAlignment = _3 === void 0 ? props_1.ModalDefault.titleAlignment : _3, _4 = _a.titleDescription, titleDescription = _4 === void 0 ? props_1.ModalDefault.titleDescription : _4, _5 = _a.isPrimaryButtonLoading, isPrimaryButtonLoading = _5 === void 0 ? props_1.ModalDefault.isPrimaryButtonLoading : _5, _6 = _a.primaryButtonIcon, primaryButtonIcon = _6 === void 0 ? props_1.ModalDefault.primaryButtonIcon : _6, _7 = _a.secondaryButtonIcon, secondaryButtonIcon = _7 === void 0 ? props_1.ModalDefault.secondaryButtonIcon : _7, _8 = _a.isSecondaryButtonLoading, isSecondaryButtonLoading = _8 === void 0 ? props_1.ModalDefault.isSecondaryButtonLoading : _8, _9 = _a.isPrimaryButtonDisabled, isPrimaryButtonDisabled = _9 === void 0 ? props_1.ModalDefault.isPrimaryButtonDisabled : _9, _10 = _a.isSecondaryButtonDisabled, isSecondaryButtonDisabled = _10 === void 0 ? props_1.ModalDefault.isSecondaryButtonDisabled : _10, _11 = _a.primaryButtonWidth, primaryButtonWidth = _11 === void 0 ? props_1.ModalDefault.primaryButtonWidth : _11, _12 = _a.secondaryButtonWidth, secondaryButtonWidth = _12 === void 0 ? props_1.ModalDefault.secondaryButtonWidth : _12, _13 = _a.customContent, customContent = _13 === void 0 ? props_1.ModalDefault.customContent : _13, _14 = _a.showHeader, showHeader = _14 === void 0 ? props_1.ModalDefault.showHeader : _14, _15 = _a.id, id = _15 === void 0 ? props_1.ModalDefault.id : _15, _16 = _a.renderInDOM, renderInDOM = _16 === void 0 ? props_1.ModalDefault.renderInDOM : _16, _17 = _a.portalContainer, portalContainer = _17 === void 0 ? props_1.ModalDefault.portalContainer : _17, _18 = _a.hasHeaderMinHeight, hasHeaderMinHeight = _18 === void 0 ? props_1.ModalDefault.hasHeaderMinHeight : _18, other = __rest(_a, ["size", "showCloseIcon", "showSkipButton", "skipButtonText", "onSkip", "showBackIcon", "backIconType", "hasCloseOnOutsideClick", "onClose", "onBack", "show", "showDivider", "title", "children", "modalFooter", "showPrimaryButton", "showSecondaryButton", "onPrimaryAction", "onSecondaryAction", "buttonsAlignment", "buttonsAlignmentOnMobile", "primaryButtonText", "secondaryButtonText", "showHeaderBorder", "showFooterBorder", "autoHeight", "titleAlignment", "titleDescription", "isPrimaryButtonLoading", "primaryButtonIcon", "secondaryButtonIcon", "isSecondaryButtonLoading", "isPrimaryButtonDisabled", "isSecondaryButtonDisabled", "primaryButtonWidth", "secondaryButtonWidth", "customContent", "showHeader", "id", "renderInDOM", "portalContainer", "hasHeaderMinHeight"]);
|
|
41
|
+
var generatedId = (0, react_1.useId)();
|
|
42
42
|
var t = (0, react_i18next_1.useTranslation)().t;
|
|
43
|
-
var
|
|
43
|
+
var _19 = (0, react_1.useState)(show), showModal = _19[0], setShowModal = _19[1];
|
|
44
|
+
var _20 = (0, react_1.useState)(null), uniqueId = _20[0], setUniqueId = _20[1];
|
|
45
|
+
var _21 = (0, react_1.useState)(null), defaultPortalContainer = _21[0], setDefaultPortalContainer = _21[1];
|
|
44
46
|
(0, react_1.useEffect)(function () {
|
|
47
|
+
if (!uniqueId) {
|
|
48
|
+
setUniqueId(generatedId);
|
|
49
|
+
}
|
|
50
|
+
}, [uniqueId, generatedId]);
|
|
51
|
+
(0, react_1.useEffect)(function () {
|
|
52
|
+
setDefaultPortalContainer(document.body);
|
|
53
|
+
}, []);
|
|
54
|
+
var resolvedPortalContainer = portalContainer !== null && portalContainer !== void 0 ? portalContainer : defaultPortalContainer;
|
|
55
|
+
(0, react_1.useEffect)(function () {
|
|
56
|
+
if (!uniqueId)
|
|
57
|
+
return;
|
|
45
58
|
setShowModal(show);
|
|
59
|
+
var modalClass = "modalActive_".concat(uniqueId);
|
|
46
60
|
if (!show) {
|
|
47
|
-
|
|
48
|
-
|
|
61
|
+
if (document.body.classList.contains(modalClass)) {
|
|
62
|
+
document.body.classList.remove(modalClass);
|
|
63
|
+
}
|
|
49
64
|
}
|
|
50
|
-
else {
|
|
51
|
-
|
|
52
|
-
document.body.classList.add("modalActive_".concat(uniqueId));
|
|
65
|
+
else if (!document.body.classList.contains(modalClass)) {
|
|
66
|
+
document.body.classList.add(modalClass);
|
|
53
67
|
}
|
|
54
|
-
}, [show]);
|
|
68
|
+
}, [show, uniqueId]);
|
|
55
69
|
var handleClose = function () {
|
|
56
70
|
if (onClose) {
|
|
57
71
|
onClose();
|
|
@@ -71,10 +85,12 @@ var Modal = function (_a) {
|
|
|
71
85
|
var modalRef = (0, react_1.useRef)();
|
|
72
86
|
(0, useOnClickOutside_1.default)(modalRef, onClose, hasCloseOnOutsideClick);
|
|
73
87
|
var modalContent = ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: (0, jsx_runtime_1.jsx)(Modal_styled_1.OverlayStyled, __assign({ id: "modalBackdrop_".concat(id), "$show": renderInDOM ? showModal : true }, { children: (0, jsx_runtime_1.jsxs)(Modal_styled_1.ModalStyled, __assign({ ref: modalRef, "$size": size, "$autoHeight": autoHeight, "$showHeaderBorder": showHeaderBorder, "$titleAlignment": titleAlignment, "$customContent": customContent, "$showFooterBorder": showFooterBorder, "$buttonsAlignment": buttonsAlignment, "$showSecondaryButton": showSecondaryButton, "$showDivider": showDivider, "$showHeader": showHeader, "$buttonsAlignmentOnMobile": buttonsAlignmentOnMobile, id: id, "$hasHeaderMinHeight": hasHeaderMinHeight }, other, { children: [(0, jsx_runtime_1.jsxs)("div", __assign({ className: "header" }, { children: [showBackIcon ? (backIconType === 2 ? ((0, jsx_runtime_1.jsx)("div", __assign({ className: "modalTextLinkWrapper" }, { children: (0, jsx_runtime_1.jsx)(TextLink_1.default, __assign({ onClick: onBack, icon: "ArrowSmallLeft" }, { children: t("back") })) }))) : ((0, jsx_runtime_1.jsx)("div", __assign({ onClick: onBack, className: "icon" }, { children: (0, jsx_runtime_1.jsx)(Icon_1.default, { name: "ArrowLeftBig" }) })))) : (titleAlignment === "center" && (0, jsx_runtime_1.jsx)("div", { className: "empty" })), (0, jsx_runtime_1.jsxs)("div", __assign({ className: "title" }, { children: [title && ((0, jsx_runtime_1.jsx)("h5", { children: title })), titleDescription && (0, jsx_runtime_1.jsx)("p", { children: titleDescription })] })), showCloseIcon ? ((0, jsx_runtime_1.jsx)("div", __assign({ onClick: handleClose, className: "icon" }, { children: (0, jsx_runtime_1.jsx)(Icon_1.default, { name: "Closebig" }) }))) : showSkipButton ? ((0, jsx_runtime_1.jsx)("div", __assign({ className: "modalTextLinkWrapper skipButton" }, { children: (0, jsx_runtime_1.jsx)(TextLink_1.default, __assign({ onClick: handleSkip }, { children: skipButtonText })) }))) : ((0, jsx_runtime_1.jsx)("div", { className: "empty" }))] })), (0, jsx_runtime_1.jsx)("div", __assign({ className: "content" }, { children: (0, jsx_runtime_1.jsx)("div", __assign({ className: "contentInner" }, { children: children })) })), modalFooter ? modalFooter : (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: (showPrimaryButton || showSecondaryButton) && (0, jsx_runtime_1.jsxs)("div", __assign({ className: "buttons" }, { children: [showPrimaryButton && ((0, jsx_runtime_1.jsx)(Button_1.default, __assign({ onClick: onPrimaryAction, size: "big", variant: "primary", isLoading: isPrimaryButtonLoading, disabled: isPrimaryButtonDisabled, width: primaryButtonWidth, icon: primaryButtonIcon }, { children: primaryButtonText }))), showSecondaryButton && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [buttonsAlignment === "vertical" && showDivider && ((0, jsx_runtime_1.jsx)(Divider_1.default, { text: t("or") })), (0, jsx_runtime_1.jsx)(Button_1.default, __assign({ onClick: onSecondaryAction, size: "big", variant: "inverted", isLoading: isSecondaryButtonLoading, disabled: isSecondaryButtonDisabled, width: secondaryButtonWidth, icon: secondaryButtonIcon }, { children: secondaryButtonText }))] }))] })) })] })) })) }));
|
|
74
|
-
if (
|
|
75
|
-
return
|
|
88
|
+
if (!resolvedPortalContainer) {
|
|
89
|
+
return null;
|
|
90
|
+
}
|
|
91
|
+
if (!renderInDOM && !showModal) {
|
|
92
|
+
return null;
|
|
76
93
|
}
|
|
77
|
-
return (
|
|
78
|
-
react_dom_1.default.createPortal(modalContent, document.body));
|
|
94
|
+
return react_dom_1.default.createPortal(modalContent, resolvedPortalContainer);
|
|
79
95
|
};
|
|
80
96
|
exports.default = Modal;
|
|
@@ -45,6 +45,8 @@ export interface Modal {
|
|
|
45
45
|
showHeader?: boolean;
|
|
46
46
|
id?: string;
|
|
47
47
|
renderInDOM?: boolean;
|
|
48
|
+
/** Portal hedefi — varsayılan `document.body` */
|
|
49
|
+
portalContainer?: HTMLElement | null;
|
|
48
50
|
showSkipButton?: boolean;
|
|
49
51
|
skipButtonText?: string;
|
|
50
52
|
onSkip?: () => void;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
declare const _default: {
|
|
3
3
|
title: string;
|
|
4
|
-
component: ({ size, showCloseIcon, showSkipButton, skipButtonText, onSkip, showBackIcon, backIconType, hasCloseOnOutsideClick, onClose, onBack, show, showDivider, title, children, modalFooter, showPrimaryButton, showSecondaryButton, onPrimaryAction, onSecondaryAction, buttonsAlignment, buttonsAlignmentOnMobile, primaryButtonText, secondaryButtonText, showHeaderBorder, showFooterBorder, autoHeight, titleAlignment, titleDescription, isPrimaryButtonLoading, primaryButtonIcon, secondaryButtonIcon, isSecondaryButtonLoading, isPrimaryButtonDisabled, isSecondaryButtonDisabled, primaryButtonWidth, secondaryButtonWidth, customContent, showHeader, id, renderInDOM, hasHeaderMinHeight, ...other }: import("../props").Modal) => React.
|
|
4
|
+
component: ({ size, showCloseIcon, showSkipButton, skipButtonText, onSkip, showBackIcon, backIconType, hasCloseOnOutsideClick, onClose, onBack, show, showDivider, title, children, modalFooter, showPrimaryButton, showSecondaryButton, onPrimaryAction, onSecondaryAction, buttonsAlignment, buttonsAlignmentOnMobile, primaryButtonText, secondaryButtonText, showHeaderBorder, showFooterBorder, autoHeight, titleAlignment, titleDescription, isPrimaryButtonLoading, primaryButtonIcon, secondaryButtonIcon, isSecondaryButtonLoading, isPrimaryButtonDisabled, isSecondaryButtonDisabled, primaryButtonWidth, secondaryButtonWidth, customContent, showHeader, id, renderInDOM, portalContainer, hasHeaderMinHeight, ...other }: import("../props").Modal) => React.ReactPortal;
|
|
5
5
|
tags: string[];
|
|
6
6
|
argTypes: {
|
|
7
7
|
showDivider: {
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
declare const _default: React.MemoExoticComponent<({ title, description, price, priceSm, slug, period, image, component, imageComponent, hasImageBorder, imageWidth, imageHeight, infoPosition, hasButton, buttonVariant, buttonText, hasBorder, isSelected, hasTitleWrap, hasButtonRemoveMdDown, hasBordeHover, hasTooltip, tooltipSelectorTitle, tooltipDescription, isDisabled, imageInnerWidth, imageInnerHeight, hasImageRounded, }: import("./props").ProductCardHorizontalSm) => React.JSX.Element>;
|
|
2
|
+
declare const _default: React.MemoExoticComponent<({ title, description, price, priceSm, slug, period, image, component, imageComponent, hasImageBorder, imageWidth, imageHeight, infoPosition, hasButton, buttonVariant, buttonText, hasBorder, isSelected, hasTitleWrap, hasButtonRemoveMdDown, hasDescriptionHideMdDown, hasBordeHover, hasTooltip, tooltipSelectorTitle, tooltipDescription, isDisabled, imageInnerWidth, imageInnerHeight, hasImageRounded, }: import("./props").ProductCardHorizontalSm) => React.JSX.Element>;
|
|
3
3
|
export default _default;
|
|
@@ -40,7 +40,8 @@ var ImageContent = (0, react_1.memo)(function (_a) {
|
|
|
40
40
|
prev.imageComponent === next.imageComponent;
|
|
41
41
|
});
|
|
42
42
|
var ProductCardHorizontalSm = function (_a) {
|
|
43
|
-
var _b = _a.title, title = _b === void 0 ? props_1.ProductCardHorizontalSmDefault.title : _b, _c = _a.description, description = _c === void 0 ? props_1.ProductCardHorizontalSmDefault.description : _c, _d = _a.price, price = _d === void 0 ? props_1.ProductCardHorizontalSmDefault.price : _d, _e = _a.priceSm, priceSm = _e === void 0 ? props_1.ProductCardHorizontalSmDefault.priceSm : _e, _f = _a.slug, slug = _f === void 0 ? props_1.ProductCardHorizontalSmDefault.slug : _f, _g = _a.period, period = _g === void 0 ? props_1.ProductCardHorizontalSmDefault.period : _g, _h = _a.image, image = _h === void 0 ? props_1.ProductCardHorizontalSmDefault.image : _h, _j = _a.component, component = _j === void 0 ? props_1.ProductCardHorizontalSmDefault.component : _j, _k = _a.imageComponent, imageComponent = _k === void 0 ? props_1.ProductCardHorizontalSmDefault.imageComponent : _k, _l = _a.hasImageBorder, hasImageBorder = _l === void 0 ? props_1.ProductCardHorizontalSmDefault.hasImageBorder : _l, _m = _a.imageWidth, imageWidth = _m === void 0 ? props_1.ProductCardHorizontalSmDefault.imageWidth : _m, _o = _a.imageHeight, imageHeight = _o === void 0 ? props_1.ProductCardHorizontalSmDefault.imageHeight : _o, _p = _a.infoPosition, infoPosition = _p === void 0 ? props_1.ProductCardHorizontalSmDefault.infoPosition : _p, _q = _a.hasButton, hasButton = _q === void 0 ? props_1.ProductCardHorizontalSmDefault.hasButton : _q, _r = _a.buttonVariant, buttonVariant = _r === void 0 ? props_1.ProductCardHorizontalSmDefault.buttonVariant : _r, _s = _a.buttonText, buttonText = _s === void 0 ? props_1.ProductCardHorizontalSmDefault.buttonText : _s, _t = _a.hasBorder, hasBorder = _t === void 0 ? props_1.ProductCardHorizontalSmDefault.hasBorder : _t, _u = _a.isSelected, isSelected = _u === void 0 ? props_1.ProductCardHorizontalSmDefault.isSelected : _u, _v = _a.hasTitleWrap, hasTitleWrap = _v === void 0 ? props_1.ProductCardHorizontalSmDefault.hasTitleWrap : _v, _w = _a.hasButtonRemoveMdDown, hasButtonRemoveMdDown = _w === void 0 ? props_1.ProductCardHorizontalSmDefault.hasButtonRemoveMdDown : _w, _x = _a.
|
|
44
|
-
|
|
43
|
+
var _b = _a.title, title = _b === void 0 ? props_1.ProductCardHorizontalSmDefault.title : _b, _c = _a.description, description = _c === void 0 ? props_1.ProductCardHorizontalSmDefault.description : _c, _d = _a.price, price = _d === void 0 ? props_1.ProductCardHorizontalSmDefault.price : _d, _e = _a.priceSm, priceSm = _e === void 0 ? props_1.ProductCardHorizontalSmDefault.priceSm : _e, _f = _a.slug, slug = _f === void 0 ? props_1.ProductCardHorizontalSmDefault.slug : _f, _g = _a.period, period = _g === void 0 ? props_1.ProductCardHorizontalSmDefault.period : _g, _h = _a.image, image = _h === void 0 ? props_1.ProductCardHorizontalSmDefault.image : _h, _j = _a.component, component = _j === void 0 ? props_1.ProductCardHorizontalSmDefault.component : _j, _k = _a.imageComponent, imageComponent = _k === void 0 ? props_1.ProductCardHorizontalSmDefault.imageComponent : _k, _l = _a.hasImageBorder, hasImageBorder = _l === void 0 ? props_1.ProductCardHorizontalSmDefault.hasImageBorder : _l, _m = _a.imageWidth, imageWidth = _m === void 0 ? props_1.ProductCardHorizontalSmDefault.imageWidth : _m, _o = _a.imageHeight, imageHeight = _o === void 0 ? props_1.ProductCardHorizontalSmDefault.imageHeight : _o, _p = _a.infoPosition, infoPosition = _p === void 0 ? props_1.ProductCardHorizontalSmDefault.infoPosition : _p, _q = _a.hasButton, hasButton = _q === void 0 ? props_1.ProductCardHorizontalSmDefault.hasButton : _q, _r = _a.buttonVariant, buttonVariant = _r === void 0 ? props_1.ProductCardHorizontalSmDefault.buttonVariant : _r, _s = _a.buttonText, buttonText = _s === void 0 ? props_1.ProductCardHorizontalSmDefault.buttonText : _s, _t = _a.hasBorder, hasBorder = _t === void 0 ? props_1.ProductCardHorizontalSmDefault.hasBorder : _t, _u = _a.isSelected, isSelected = _u === void 0 ? props_1.ProductCardHorizontalSmDefault.isSelected : _u, _v = _a.hasTitleWrap, hasTitleWrap = _v === void 0 ? props_1.ProductCardHorizontalSmDefault.hasTitleWrap : _v, _w = _a.hasButtonRemoveMdDown, hasButtonRemoveMdDown = _w === void 0 ? props_1.ProductCardHorizontalSmDefault.hasButtonRemoveMdDown : _w, _x = _a.hasDescriptionHideMdDown, hasDescriptionHideMdDown = _x === void 0 ? props_1.ProductCardHorizontalSmDefault.hasDescriptionHideMdDown : _x, _y = _a.hasBordeHover, hasBordeHover = _y === void 0 ? props_1.ProductCardHorizontalSmDefault.hasBordeHover : _y, _z = _a.hasTooltip, hasTooltip = _z === void 0 ? props_1.ProductCardHorizontalSmDefault.hasTooltip : _z, _0 = _a.tooltipSelectorTitle, tooltipSelectorTitle = _0 === void 0 ? props_1.ProductCardHorizontalSmDefault.tooltipSelectorTitle : _0, _1 = _a.tooltipDescription, tooltipDescription = _1 === void 0 ? props_1.ProductCardHorizontalSmDefault.tooltipDescription : _1, _2 = _a.isDisabled, isDisabled = _2 === void 0 ? props_1.ProductCardHorizontalSmDefault.isDisabled : _2, _3 = _a.imageInnerWidth, imageInnerWidth = _3 === void 0 ? props_1.ProductCardHorizontalSmDefault.imageInnerWidth : _3, _4 = _a.imageInnerHeight, imageInnerHeight = _4 === void 0 ? props_1.ProductCardHorizontalSmDefault.imageInnerHeight : _4, _5 = _a.hasImageRounded, hasImageRounded = _5 === void 0 ? props_1.ProductCardHorizontalSmDefault.hasImageRounded : _5;
|
|
44
|
+
var hasPeriod = period != null && period !== "";
|
|
45
|
+
return ((0, jsx_runtime_1.jsxs)(ProductCardHorizontalSm_styled_1.ProductCardHorizontalSmStyled, __assign({ "$hasImageBorder": hasImageBorder, "$imageWidth": imageWidth, "$imageHeight": imageHeight, "$isSelected": isSelected, "$hasBordeHover": hasBordeHover, "$isDisabled": isDisabled }, { children: [(0, jsx_runtime_1.jsx)(ProductCardHorizontalSm_styled_1.Border, { "$isSelected": isSelected, "$hasBordeHover": hasBordeHover, "$hasBorder": hasBorder }), (0, jsx_runtime_1.jsx)(LinkComponent, __assign({ component: component, slug: slug }, { children: (0, jsx_runtime_1.jsxs)(ProductCardHorizontalSm_styled_1.HorizontalSmWrapper, { children: [(0, jsx_runtime_1.jsx)(ImageContent, { image: image, title: title, imageInnerWidth: imageInnerWidth, imageInnerHeight: imageInnerHeight, imageHeight: imageHeight, imageWidth: imageWidth, hasImageBorder: hasImageBorder, hasImageRounded: hasImageRounded, imageComponent: imageComponent }), (0, jsx_runtime_1.jsxs)(ProductCardHorizontalSm_styled_1.TextWrapper, __assign({ "$hasPeriod": hasPeriod }, { children: [(0, jsx_runtime_1.jsx)(ProductCardHorizontalSm_styled_1.Title, __assign({ "$hasTitleWrap": hasTitleWrap }, { children: title })), description && ((0, jsx_runtime_1.jsx)(ProductCardHorizontalSm_styled_1.Description, __assign({ "$hasDescriptionHideMdDown": hasDescriptionHideMdDown }, { children: description }))), infoPosition === "left" && ((0, jsx_runtime_1.jsxs)(ProductCardHorizontalSm_styled_1.PriceContent, __assign({ "$infoPosition": infoPosition }, { children: [(0, jsx_runtime_1.jsxs)(ProductCardHorizontalSm_styled_1.Price, { children: [price, priceSm && (0, jsx_runtime_1.jsx)("small", { children: priceSm })] }), (0, jsx_runtime_1.jsx)(ProductCardHorizontalSm_styled_1.Period, __assign({ "$infoPosition": infoPosition }, { children: period }))] })))] })), (0, jsx_runtime_1.jsxs)(ProductCardHorizontalSm_styled_1.RightContentWrapper, __assign({ "$hasButtonRemoveMdDown": hasButtonRemoveMdDown }, { children: [infoPosition === "right" && ((0, jsx_runtime_1.jsxs)(ProductCardHorizontalSm_styled_1.PriceContent, __assign({ "$infoPosition": infoPosition }, { children: [(0, jsx_runtime_1.jsx)(ProductCardHorizontalSm_styled_1.Period, __assign({ "$infoPosition": infoPosition }, { children: period })), (0, jsx_runtime_1.jsxs)(ProductCardHorizontalSm_styled_1.Price, { children: [price, priceSm && (0, jsx_runtime_1.jsx)("small", { children: priceSm })] })] }))), hasButton && ((0, jsx_runtime_1.jsx)(Button_1.default, __assign({ disabled: isDisabled, variant: buttonVariant, size: "xsmall" }, { children: buttonText }))), hasTooltip && ((0, jsx_runtime_1.jsx)(Tooltip_1.default, __assign({ selectorTitle: tooltipSelectorTitle, popupWidth: "238px", position: "topRight", popupSize: "medium" }, { children: tooltipDescription })))] }))] }) }))] })));
|
|
45
46
|
};
|
|
46
47
|
exports.default = (0, react_1.memo)(ProductCardHorizontalSm);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { ProductCardHorizontalSmStyledProps } from "./props";
|
|
3
3
|
export declare const Title: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, keyof ProductCardHorizontalSmStyledProps> & ProductCardHorizontalSmStyledProps, never> & Partial<Pick<import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, keyof ProductCardHorizontalSmStyledProps> & ProductCardHorizontalSmStyledProps, never>>> & string;
|
|
4
|
-
export declare const Description: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>, never> & Partial<Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>, never>>> & string;
|
|
4
|
+
export declare const Description: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>, keyof ProductCardHorizontalSmStyledProps> & ProductCardHorizontalSmStyledProps, never> & Partial<Pick<import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>, keyof ProductCardHorizontalSmStyledProps> & ProductCardHorizontalSmStyledProps, never>>> & string;
|
|
5
5
|
export declare const Border: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof ProductCardHorizontalSmStyledProps> & ProductCardHorizontalSmStyledProps, never> & Partial<Pick<import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof ProductCardHorizontalSmStyledProps> & ProductCardHorizontalSmStyledProps, never>>> & string;
|
|
6
6
|
export declare const ProductCardHorizontalSmStyled: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof ProductCardHorizontalSmStyledProps> & ProductCardHorizontalSmStyledProps, never> & Partial<Pick<import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof ProductCardHorizontalSmStyledProps> & ProductCardHorizontalSmStyledProps, never>>> & string;
|
|
7
7
|
export declare const HorizontalSmWrapper: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never> & Partial<Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>>> & string;
|
|
@@ -11,7 +11,10 @@ exports.RightContentWrapper = exports.Period = exports.Price = exports.PriceCont
|
|
|
11
11
|
var styled_components_1 = __importDefault(require("styled-components"));
|
|
12
12
|
var devices_1 = require("../../constants/devices");
|
|
13
13
|
exports.Title = styled_components_1.default.strong(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n display: -webkit-box;\n -webkit-line-clamp: ", ";\n -webkit-box-orient: vertical;\n overflow: hidden;\n word-break: break-word;\n font: var(--body-semi-bold-14-17);\n transition: color 0.2s ease;\n"], ["\n display: -webkit-box;\n -webkit-line-clamp: ", ";\n -webkit-box-orient: vertical;\n overflow: hidden;\n word-break: break-word;\n font: var(--body-semi-bold-14-17);\n transition: color 0.2s ease;\n"])), function (props) { return (props.$hasTitleWrap ? "2" : "1"); });
|
|
14
|
-
exports.Description = styled_components_1.default.p(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n margin: 0.25rem 0 0;\n display: -webkit-box;\n -webkit-line-clamp: 2;\n -webkit-box-orient: vertical;\n overflow: hidden;\n word-break: break-word;\n font: var(--caption-medium-12-15);\n color: var(--grey-50);\n"], ["\n margin: 0.25rem 0 0;\n display: -webkit-box;\n -webkit-line-clamp: 2;\n -webkit-box-orient: vertical;\n overflow: hidden;\n word-break: break-word;\n font: var(--caption-medium-12-15);\n color: var(--grey-50);\n"])))
|
|
14
|
+
exports.Description = styled_components_1.default.p(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n margin: 0.25rem 0 0;\n display: -webkit-box;\n -webkit-line-clamp: 2;\n -webkit-box-orient: vertical;\n overflow: hidden;\n word-break: break-word;\n font: var(--caption-medium-12-15);\n color: var(--grey-50);\n\n ", "\n"], ["\n margin: 0.25rem 0 0;\n display: -webkit-box;\n -webkit-line-clamp: 2;\n -webkit-box-orient: vertical;\n overflow: hidden;\n word-break: break-word;\n font: var(--caption-medium-12-15);\n color: var(--grey-50);\n\n ", "\n"])), function (props) {
|
|
15
|
+
return props.$hasDescriptionHideMdDown &&
|
|
16
|
+
"\n @media only screen and ".concat(devices_1.devices.md, " {\n display: none;\n }\n ");
|
|
17
|
+
});
|
|
15
18
|
exports.Border = styled_components_1.default.div(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n user-select: none;\n pointer-events: none;\n position: absolute;\n inset: 0;\n border-radius: inherit;\n border: 1px solid transparent;\n opacity: ", ";\n transition: border-color 0.2s ease, opacity 0.2s ease;\n border-color: ", ";\n ", "\n"], ["\n user-select: none;\n pointer-events: none;\n position: absolute;\n inset: 0;\n border-radius: inherit;\n border: 1px solid transparent;\n opacity: ", ";\n transition: border-color 0.2s ease, opacity 0.2s ease;\n border-color: ", ";\n ", "\n"])), function (p) { return (p.$hasBorder ? 1 : 0); }, function (p) { return (p.$hasBorder ? "var(--grey-10)" : "transparent"); }, function (p) { return p.$isSelected && "border-color: var(--primary);border-width: 2px;"; });
|
|
16
19
|
exports.ProductCardHorizontalSmStyled = styled_components_1.default.div(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n color: var(--dark);\n padding: 0 0.5rem;\n border-radius: 0.5rem;\n position: relative;\n transition: color 0.2s ease;\n\n ", "\n\n ", "\n\n a {\n text-decoration: none;\n color: inherit;\n\n @media ((hover: hover) and (pointer: fine)) {\n &:hover {\n ", " {\n color: var(--primary-hover);\n }\n }\n }\n\n &:active {\n ", " {\n color: var(--primary-hover);\n }\n }\n }\n"], ["\n color: var(--dark);\n padding: 0 0.5rem;\n border-radius: 0.5rem;\n position: relative;\n transition: color 0.2s ease;\n\n ", "\n\n ", "\n\n a {\n text-decoration: none;\n color: inherit;\n\n @media ((hover: hover) and (pointer: fine)) {\n &:hover {\n ", " {\n color: var(--primary-hover);\n }\n }\n }\n\n &:active {\n ", " {\n color: var(--primary-hover);\n }\n }\n }\n"])), function (props) {
|
|
17
20
|
return props.$isDisabled &&
|
|
@@ -22,7 +25,7 @@ exports.ProductCardHorizontalSmStyled = styled_components_1.default.div(template
|
|
|
22
25
|
}, exports.Title, exports.Title);
|
|
23
26
|
exports.HorizontalSmWrapper = styled_components_1.default.div(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n text-decoration: none;\n display: grid;\n grid-template-columns: auto 1fr auto;\n align-items: center;\n min-height: 66px;\n padding-right: 0.5rem;\n"], ["\n text-decoration: none;\n display: grid;\n grid-template-columns: auto 1fr auto;\n align-items: center;\n min-height: 66px;\n padding-right: 0.5rem;\n"])));
|
|
24
27
|
exports.ImgWrapper = styled_components_1.default.div(templateObject_6 || (templateObject_6 = __makeTemplateObject(["\n border: ", ";\n border-radius: 0.5rem;\n position: relative;\n overflow: hidden;\n width: ", ";\n height: ", ";\n display: flex;\n align-items: center;\n justify-content: center;\n margin-right: 1rem;\n background: white;\n transform: translateZ(0);\n\n img {\n vertical-align: middle !important;\n display: block !important;\n object-fit: cover !important;\n border-radius: ", " !important;\n }\n"], ["\n border: ", ";\n border-radius: 0.5rem;\n position: relative;\n overflow: hidden;\n width: ", ";\n height: ", ";\n display: flex;\n align-items: center;\n justify-content: center;\n margin-right: 1rem;\n background: white;\n transform: translateZ(0);\n\n img {\n vertical-align: middle !important;\n display: block !important;\n object-fit: cover !important;\n border-radius: ", " !important;\n }\n"])), function (props) { return (props.$hasImageBorder ? "1px solid var(--dark-opacity-5)" : "none"); }, function (props) { return (props.$imageWidth ? props.$imageWidth : "71px"); }, function (props) { return (props.$imageHeight ? props.$imageHeight : "50px"); }, function (props) { return (props.$hasImageRounded ? "4px" : "0"); });
|
|
25
|
-
exports.TextWrapper = styled_components_1.default.div(templateObject_7 || (templateObject_7 = __makeTemplateObject(["\n padding-right: ", ";\n"], ["\n padding-right: ", ";\n"])), function (props) { return (props.$
|
|
28
|
+
exports.TextWrapper = styled_components_1.default.div(templateObject_7 || (templateObject_7 = __makeTemplateObject(["\n padding-right: ", ";\n"], ["\n padding-right: ", ";\n"])), function (props) { return (props.$hasPeriod ? "1rem" : "0.5rem"); });
|
|
26
29
|
exports.PriceContent = styled_components_1.default.div(templateObject_8 || (templateObject_8 = __makeTemplateObject(["\n ", "\n"], ["\n ", "\n"])), function (props) {
|
|
27
30
|
return (props === null || props === void 0 ? void 0 : props.$infoPosition) === "left"
|
|
28
31
|
? "\n text-align: start;\n display: flex;\n align-items: flex-end;\n margin-top: 8px;\n "
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
import React from "react";
|
|
2
2
|
import { variants } from "../Button/props";
|
|
3
3
|
type VARIANT = typeof variants[number];
|
|
4
4
|
export interface ProductCardHorizontalSm {
|
|
@@ -7,7 +7,7 @@ export interface ProductCardHorizontalSm {
|
|
|
7
7
|
price?: string;
|
|
8
8
|
priceSm?: string;
|
|
9
9
|
slug?: string;
|
|
10
|
-
period?:
|
|
10
|
+
period?: React.ReactNode;
|
|
11
11
|
image?: string;
|
|
12
12
|
component?: React.ElementType | null;
|
|
13
13
|
/** Örn. `import Image from "next/image"` → `imageComponent={Image}` */
|
|
@@ -23,6 +23,7 @@ export interface ProductCardHorizontalSm {
|
|
|
23
23
|
isSelected?: boolean;
|
|
24
24
|
hasTitleWrap?: boolean;
|
|
25
25
|
hasButtonRemoveMdDown?: boolean;
|
|
26
|
+
hasDescriptionHideMdDown?: boolean;
|
|
26
27
|
hasBordeHover?: boolean;
|
|
27
28
|
hasTooltip?: boolean;
|
|
28
29
|
tooltipSelectorTitle?: string;
|
|
@@ -33,7 +34,7 @@ export interface ProductCardHorizontalSm {
|
|
|
33
34
|
hasImageRounded?: boolean;
|
|
34
35
|
}
|
|
35
36
|
export interface ProductCardHorizontalSmStyledProps {
|
|
36
|
-
$
|
|
37
|
+
$hasPeriod?: boolean;
|
|
37
38
|
$hasImageBorder?: boolean;
|
|
38
39
|
$imageWidth?: string;
|
|
39
40
|
$imageHeight?: string;
|
|
@@ -42,6 +43,7 @@ export interface ProductCardHorizontalSmStyledProps {
|
|
|
42
43
|
$isSelected?: boolean;
|
|
43
44
|
$hasTitleWrap?: boolean;
|
|
44
45
|
$hasButtonRemoveMdDown?: boolean;
|
|
46
|
+
$hasDescriptionHideMdDown?: boolean;
|
|
45
47
|
$hasBordeHover?: boolean;
|
|
46
48
|
$isDisabled?: boolean;
|
|
47
49
|
$hasImageRounded?: boolean;
|