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.
Files changed (49) hide show
  1. package/dist/components/ActionButton/ActionButton.d.ts +1 -1
  2. package/dist/components/ActionButton/ActionButton.js +6 -6
  3. package/dist/components/ActionButton/ActionButton.styled.d.ts +2 -0
  4. package/dist/components/ActionButton/ActionButton.styled.js +15 -13
  5. package/dist/components/ActionButton/props.d.ts +5 -1
  6. package/dist/components/ActionButton/props.js +2 -0
  7. package/dist/components/ActionButton/stories/ActionButton.stories.d.ts +16 -1
  8. package/dist/components/ActionButton/stories/ActionButton.stories.js +38 -1
  9. package/dist/components/AddressCard/AddressCard.styled.js +1 -1
  10. package/dist/components/DescriptionCard/DescriptionCard.d.ts +1 -1
  11. package/dist/components/DescriptionCard/DescriptionCard.js +4 -6
  12. package/dist/components/DescriptionCard/DescriptionCard.styled.d.ts +11 -0
  13. package/dist/components/DescriptionCard/DescriptionCard.styled.js +20 -13
  14. package/dist/components/DescriptionCard/props.d.ts +12 -0
  15. package/dist/components/DescriptionCard/props.js +8 -1
  16. package/dist/components/DescriptionCard/stories/DescriptionCard.stories.d.ts +93 -1
  17. package/dist/components/DescriptionCard/stories/DescriptionCard.stories.js +43 -1
  18. package/dist/components/Icon/iconList/RadioButtonElementChecked.js +1 -1
  19. package/dist/components/InfoBox/InfoBox.js +1 -1
  20. package/dist/components/InfoBox/props.d.ts +2 -2
  21. package/dist/components/InfoBox/stories/InfoBox.stories.d.ts +15 -8
  22. package/dist/components/InfoBox/stories/InfoBox.stories.js +7 -4
  23. package/dist/components/Modal/Modal.d.ts +1 -1
  24. package/dist/components/Modal/Modal.js +29 -13
  25. package/dist/components/Modal/props.d.ts +2 -0
  26. package/dist/components/Modal/props.js +1 -0
  27. package/dist/components/Modal/stories/Modal.stories.d.ts +1 -1
  28. package/dist/components/ProductCardHorizontalSm/ProductCardHorizontalSm.d.ts +1 -1
  29. package/dist/components/ProductCardHorizontalSm/ProductCardHorizontalSm.js +3 -2
  30. package/dist/components/ProductCardHorizontalSm/ProductCardHorizontalSm.styled.d.ts +1 -1
  31. package/dist/components/ProductCardHorizontalSm/ProductCardHorizontalSm.styled.js +5 -2
  32. package/dist/components/ProductCardHorizontalSm/props.d.ts +5 -3
  33. package/dist/components/ProductCardHorizontalSm/props.js +1 -0
  34. package/dist/components/ProductCardHorizontalSm/stories/ProductCardHorizontalSm.stories.d.ts +68 -1
  35. package/dist/components/ProductCardHorizontalSm/stories/ProductCardHorizontalSm.stories.js +9 -2
  36. package/dist/components/RadioGroup/RadioGroup.d.ts +1 -1
  37. package/dist/components/RadioGroup/RadioGroup.js +3 -3
  38. package/dist/components/RadioGroup/RadioGroup.styled.js +7 -2
  39. package/dist/components/RadioGroup/props.d.ts +17 -3
  40. package/dist/components/RadioGroup/props.js +3 -2
  41. package/dist/components/RadioGroup/stories/RadioGroup.stories.d.ts +114 -1
  42. package/dist/components/RadioGroup/stories/RadioGroup.stories.js +128 -2
  43. package/dist/components/Tabs/Tabs.d.ts +1 -1
  44. package/dist/components/Tabs/Tabs.js +4 -4
  45. package/dist/components/Tabs/Tabs.styled.js +1 -1
  46. package/dist/components/Tabs/props.d.ts +3 -0
  47. package/dist/components/Tabs/stories/Tabs.stories.d.ts +12 -1
  48. package/dist/components/Tabs/stories/Tabs.stories.js +12 -1
  49. package/package.json +1 -1
@@ -20,7 +20,7 @@ declare const _default: {
20
20
  control: string;
21
21
  };
22
22
  period: {
23
- control: string;
23
+ control: boolean;
24
24
  };
25
25
  image: {
26
26
  control: string;
@@ -76,6 +76,9 @@ declare const _default: {
76
76
  hasButtonRemoveMdDown: {
77
77
  control: string;
78
78
  };
79
+ hasDescriptionHideMdDown: {
80
+ control: string;
81
+ };
79
82
  hasTooltip: {
80
83
  control: string;
81
84
  };
@@ -154,6 +157,39 @@ export declare const WithDescription: {
154
157
  isDisabled: boolean;
155
158
  };
156
159
  };
160
+ export declare const DescriptionHideMdDown: {
161
+ args: {
162
+ description: string;
163
+ hasDescriptionHideMdDown: boolean;
164
+ title: string;
165
+ price: string;
166
+ priceSm: string;
167
+ slug: string;
168
+ period: string;
169
+ image: string;
170
+ component: ({ children }: {
171
+ children: any;
172
+ }) => React.JSX.Element;
173
+ hasImageBorder: boolean;
174
+ imageWidth: string;
175
+ imageHeight: string;
176
+ imageInnerWidth: number;
177
+ imageInnerHeight: number;
178
+ infoPosition: string;
179
+ hasButton: boolean;
180
+ buttonVariant: string;
181
+ buttonText: string;
182
+ hasBorder: boolean;
183
+ hasBordeHover: boolean;
184
+ isSelected: boolean;
185
+ hasTitleWrap: boolean;
186
+ hasButtonRemoveMdDown: boolean;
187
+ hasTooltip: boolean;
188
+ tooltipSelectorTitle: string;
189
+ tooltipDescription: string;
190
+ isDisabled: boolean;
191
+ };
192
+ };
157
193
  export declare const WithButton: {
158
194
  args: {
159
195
  hasButton: boolean;
@@ -216,6 +252,37 @@ export declare const RightAlignedInfo: {
216
252
  isDisabled: boolean;
217
253
  };
218
254
  };
255
+ export declare const CustomPeriod: {
256
+ args: {
257
+ infoPosition: string;
258
+ period: React.JSX.Element;
259
+ title: string;
260
+ price: string;
261
+ priceSm: string;
262
+ slug: string;
263
+ image: string;
264
+ component: ({ children }: {
265
+ children: any;
266
+ }) => React.JSX.Element;
267
+ hasImageBorder: boolean;
268
+ imageWidth: string;
269
+ imageHeight: string;
270
+ imageInnerWidth: number;
271
+ imageInnerHeight: number;
272
+ hasButton: boolean;
273
+ buttonVariant: string;
274
+ buttonText: string;
275
+ hasBorder: boolean;
276
+ hasBordeHover: boolean;
277
+ isSelected: boolean;
278
+ hasTitleWrap: boolean;
279
+ hasButtonRemoveMdDown: boolean;
280
+ hasTooltip: boolean;
281
+ tooltipSelectorTitle: string;
282
+ tooltipDescription: string;
283
+ isDisabled: boolean;
284
+ };
285
+ };
219
286
  export declare const WithImageBorder: {
220
287
  args: {
221
288
  hasImageBorder: boolean;
@@ -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.WithBorderHover = exports.WithImageRounded = exports.WithoutBorder = exports.WithoutTooltip = exports.Selected = exports.Disabled = exports.WithImageBorder = exports.RightAlignedInfo = exports.WithButton = exports.WithDescription = exports.Default = void 0;
17
+ exports.WithBorderHover = exports.WithImageRounded = exports.WithoutBorder = exports.WithoutTooltip = exports.Selected = exports.Disabled = exports.WithImageBorder = exports.CustomPeriod = exports.RightAlignedInfo = exports.WithButton = exports.DescriptionHideMdDown = exports.WithDescription = exports.Default = void 0;
18
18
  var jsx_runtime_1 = require("react/jsx-runtime");
19
19
  var ProductCardHorizontalSm_1 = __importDefault(require("../ProductCardHorizontalSm"));
20
20
  var props_1 = require("../../Button/props");
@@ -28,7 +28,7 @@ exports.default = {
28
28
  price: { control: "text" },
29
29
  priceSm: { control: "text" },
30
30
  slug: { control: "text" },
31
- period: { control: "text" },
31
+ period: { control: false },
32
32
  image: { control: "text" },
33
33
  component: { control: "none" },
34
34
  imageComponent: {
@@ -55,6 +55,7 @@ exports.default = {
55
55
  isSelected: { control: "boolean" },
56
56
  hasTitleWrap: { control: "boolean" },
57
57
  hasButtonRemoveMdDown: { control: "boolean" },
58
+ hasDescriptionHideMdDown: { control: "boolean" },
58
59
  hasTooltip: { control: "boolean" },
59
60
  tooltipSelectorTitle: { control: "text" },
60
61
  tooltipDescription: { control: "text" },
@@ -97,12 +98,18 @@ exports.Default = {
97
98
  exports.WithDescription = {
98
99
  args: __assign(__assign({}, exports.Default.args), { description: "İki ayda bir gönderim" }),
99
100
  };
101
+ exports.DescriptionHideMdDown = {
102
+ args: __assign(__assign({}, exports.Default.args), { description: "İki ayda bir gönderim", hasDescriptionHideMdDown: true }),
103
+ };
100
104
  exports.WithButton = {
101
105
  args: __assign(__assign({}, exports.Default.args), { hasButton: true, buttonText: "Kirala", buttonVariant: "secondary" }),
102
106
  };
103
107
  exports.RightAlignedInfo = {
104
108
  args: __assign(__assign({}, exports.Default.args), { infoPosition: "right" }),
105
109
  };
110
+ exports.CustomPeriod = {
111
+ args: __assign(__assign({}, exports.Default.args), { infoPosition: "right", period: ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("span", __assign({ className: "period-mobile" }, { children: "/ay" })), (0, jsx_runtime_1.jsx)("span", __assign({ className: "period-desktop" }, { children: "/hafta" }))] })) }),
112
+ };
106
113
  exports.WithImageBorder = {
107
114
  args: __assign(__assign({}, exports.Default.args), { hasImageBorder: true }),
108
115
  };
@@ -1,4 +1,4 @@
1
1
  import React from "react";
2
2
  import { RadioGroupProps } from "./props";
3
- declare const RadioGroup: ({ options, value, onChange, name, label, disabled, size, textSize, layout, radioLayout, valid, labelOffset, color, verticalAlign, readOnly, gap, isFilled, showIndicator, hasInfo, infoText, infoIcon, gridColumnLength }: RadioGroupProps) => React.JSX.Element;
3
+ declare const RadioGroup: ({ options, value, onChange, name, label, disabled, size, textSize, layout, radioLayout, valid, labelOffset, color, verticalAlign, readOnly, gap, isFilled, showIndicator, hasInfo, infoText, infoIcon, gridColumnLength, isHorizontalOnMobile, }: RadioGroupProps) => React.JSX.Element;
4
4
  export default RadioGroup;
@@ -21,16 +21,16 @@ var RadioGroup_styled_1 = require("./RadioGroup.styled");
21
21
  var RadioButton_1 = __importDefault(require("../RadioButton"));
22
22
  var Icon_1 = __importDefault(require("../Icon/Icon"));
23
23
  var RadioGroup = function (_a) {
24
- var _b = _a.options, options = _b === void 0 ? props_1.RadioGroupDefault.options : _b, _c = _a.value, value = _c === void 0 ? props_1.RadioGroupDefault.value : _c, _d = _a.onChange, onChange = _d === void 0 ? props_1.RadioGroupDefault.onChange : _d, _e = _a.name, name = _e === void 0 ? props_1.RadioGroupDefault.name : _e, _f = _a.label, label = _f === void 0 ? props_1.RadioGroupDefault.label : _f, _g = _a.disabled, disabled = _g === void 0 ? props_1.RadioGroupDefault.disabled : _g, _h = _a.size, size = _h === void 0 ? props_1.RadioGroupDefault.size : _h, _j = _a.textSize, textSize = _j === void 0 ? props_1.RadioGroupDefault.textSize : _j, _k = _a.layout, layout = _k === void 0 ? props_1.RadioGroupDefault.layout : _k, _l = _a.radioLayout, radioLayout = _l === void 0 ? props_1.RadioGroupDefault.radioLayout : _l, _m = _a.valid, valid = _m === void 0 ? props_1.RadioGroupDefault.valid : _m, _o = _a.labelOffset, labelOffset = _o === void 0 ? props_1.RadioGroupDefault.labelOffset : _o, _p = _a.color, color = _p === void 0 ? props_1.RadioGroupDefault.color : _p, _q = _a.verticalAlign, verticalAlign = _q === void 0 ? props_1.RadioGroupDefault.verticalAlign : _q, _r = _a.readOnly, readOnly = _r === void 0 ? props_1.RadioGroupDefault.readOnly : _r, _s = _a.gap, gap = _s === void 0 ? props_1.RadioGroupDefault.gap : _s, _t = _a.isFilled, isFilled = _t === void 0 ? props_1.RadioGroupDefault.isFilled : _t, _u = _a.showIndicator, showIndicator = _u === void 0 ? props_1.RadioGroupDefault.showIndicator : _u, _v = _a.hasInfo, hasInfo = _v === void 0 ? props_1.RadioGroupDefault.hasInfo : _v, _w = _a.infoText, infoText = _w === void 0 ? props_1.RadioGroupDefault.infoText : _w, _x = _a.infoIcon, infoIcon = _x === void 0 ? props_1.RadioGroupDefault.infoIcon : _x, _y = _a.gridColumnLength, gridColumnLength = _y === void 0 ? props_1.RadioGroupDefault.gridColumnLength : _y;
24
+ var _b = _a.options, options = _b === void 0 ? props_1.RadioGroupDefault.options : _b, _c = _a.value, value = _c === void 0 ? props_1.RadioGroupDefault.value : _c, _d = _a.onChange, onChange = _d === void 0 ? props_1.RadioGroupDefault.onChange : _d, _e = _a.name, name = _e === void 0 ? props_1.RadioGroupDefault.name : _e, _f = _a.label, label = _f === void 0 ? props_1.RadioGroupDefault.label : _f, _g = _a.disabled, disabled = _g === void 0 ? props_1.RadioGroupDefault.disabled : _g, _h = _a.size, size = _h === void 0 ? props_1.RadioGroupDefault.size : _h, _j = _a.textSize, textSize = _j === void 0 ? props_1.RadioGroupDefault.textSize : _j, _k = _a.layout, layout = _k === void 0 ? props_1.RadioGroupDefault.layout : _k, _l = _a.radioLayout, radioLayout = _l === void 0 ? props_1.RadioGroupDefault.radioLayout : _l, _m = _a.valid, valid = _m === void 0 ? props_1.RadioGroupDefault.valid : _m, _o = _a.labelOffset, labelOffset = _o === void 0 ? props_1.RadioGroupDefault.labelOffset : _o, _p = _a.color, color = _p === void 0 ? props_1.RadioGroupDefault.color : _p, _q = _a.verticalAlign, verticalAlign = _q === void 0 ? props_1.RadioGroupDefault.verticalAlign : _q, _r = _a.readOnly, readOnly = _r === void 0 ? props_1.RadioGroupDefault.readOnly : _r, _s = _a.gap, gap = _s === void 0 ? props_1.RadioGroupDefault.gap : _s, _t = _a.isFilled, isFilled = _t === void 0 ? props_1.RadioGroupDefault.isFilled : _t, _u = _a.showIndicator, showIndicator = _u === void 0 ? props_1.RadioGroupDefault.showIndicator : _u, _v = _a.hasInfo, hasInfo = _v === void 0 ? props_1.RadioGroupDefault.hasInfo : _v, _w = _a.infoText, infoText = _w === void 0 ? props_1.RadioGroupDefault.infoText : _w, _x = _a.infoIcon, infoIcon = _x === void 0 ? props_1.RadioGroupDefault.infoIcon : _x, _y = _a.gridColumnLength, gridColumnLength = _y === void 0 ? props_1.RadioGroupDefault.gridColumnLength : _y, _z = _a.isHorizontalOnMobile, isHorizontalOnMobile = _z === void 0 ? props_1.RadioGroupDefault.isHorizontalOnMobile : _z;
25
25
  var handleRadioChange = function (optionValue) {
26
26
  if (!onChange)
27
27
  return;
28
28
  onChange(optionValue);
29
29
  };
30
- return ((0, jsx_runtime_1.jsxs)(RadioGroup_styled_1.RadioGroupStyled, { children: [label && ((0, jsx_runtime_1.jsx)(RadioGroup_styled_1.GroupLabelWrapper, __assign({ "$emphasizedLabel": hasInfo }, { children: (0, jsx_runtime_1.jsx)(RadioGroup_styled_1.GroupLabel, __assign({ "$emphasizedLabel": hasInfo }, { children: label })) }))), hasInfo && infoText && ((0, jsx_runtime_1.jsxs)(RadioGroup_styled_1.InfoArea, { children: [(0, jsx_runtime_1.jsx)(RadioGroup_styled_1.InfoIconWrapper, { children: (0, jsx_runtime_1.jsx)(Icon_1.default, { name: (infoIcon || props_1.RadioGroupDefault.infoIcon), width: "24", height: "24", hasWrapper: false }) }), (0, jsx_runtime_1.jsx)(RadioGroup_styled_1.InfoText, { children: infoText })] })), (0, jsx_runtime_1.jsx)(RadioGroup_styled_1.RadioButtonsWrapper, __assign({ "$layout": layout, "$gap": gap, "$isFilled": isFilled, "$gridColumnLength": gridColumnLength }, { children: options.map(function (option, index) {
30
+ return ((0, jsx_runtime_1.jsxs)(RadioGroup_styled_1.RadioGroupStyled, { children: [label && ((0, jsx_runtime_1.jsx)(RadioGroup_styled_1.GroupLabelWrapper, __assign({ "$emphasizedLabel": hasInfo }, { children: (0, jsx_runtime_1.jsx)(RadioGroup_styled_1.GroupLabel, __assign({ "$emphasizedLabel": hasInfo }, { children: label })) }))), hasInfo && infoText && ((0, jsx_runtime_1.jsxs)(RadioGroup_styled_1.InfoArea, { children: [(0, jsx_runtime_1.jsx)(RadioGroup_styled_1.InfoIconWrapper, { children: (0, jsx_runtime_1.jsx)(Icon_1.default, { name: (infoIcon || props_1.RadioGroupDefault.infoIcon), width: "24", height: "24", hasWrapper: false }) }), (0, jsx_runtime_1.jsx)(RadioGroup_styled_1.InfoText, { children: infoText })] })), (0, jsx_runtime_1.jsx)(RadioGroup_styled_1.RadioButtonsWrapper, __assign({ "$layout": layout, "$gap": gap, "$isFilled": isFilled, "$gridColumnLength": gridColumnLength, "$isHorizontalOnMobile": isHorizontalOnMobile }, { children: options.map(function (option, index) {
31
31
  var radioId = option.id || "".concat(name, "_").concat(index);
32
32
  var isChecked = value === option.value;
33
- return ((0, jsx_runtime_1.jsx)(RadioButton_1.default, { id: radioId, name: name, value: option.value, checked: isChecked, onChange: function (e) { return handleRadioChange(option.value); }, label: option.label, description: option.description, image: option.image, disabled: disabled || option.disabled, alignment: option.alignment, isWrapText: option.isWrapText, size: size, textSize: textSize, layout: radioLayout, valid: valid, labelOffset: labelOffset, color: option.color || color, verticalAlign: verticalAlign, readOnly: readOnly, showIndicator: showIndicator, titleBadgePosition: option.titleBadgePosition, hasTitleBadge: option.hasTitleBadge, titleBadgeLayout: option.titleBadgeLayout, titleBadgeText: option.titleBadgeText }, radioId));
33
+ return ((0, jsx_runtime_1.jsx)(RadioButton_1.default, { id: radioId, name: name, value: option.value, checked: isChecked, onChange: function (e) { return handleRadioChange(option.value); }, label: option.label, description: option.description, image: option.image, disabled: disabled || option.disabled, alignment: option.alignment, isWrapText: option.isWrapText, size: size, textSize: textSize, layout: radioLayout, valid: valid, labelOffset: labelOffset, color: option.color || color, verticalAlign: verticalAlign, readOnly: readOnly, labelSm: option.labelSm, hasBadge: option.hasBadge, badgeText: option.badgeText, badgeVariant: option.badgeVariant, price: option.price, priceDesc: option.priceDesc, hasTitleBadge: option.hasTitleBadge, titleBadgeLayout: option.titleBadgeLayout, titleBadgeText: option.titleBadgeText, hasPriceBadge: option.hasPriceBadge, priceBadgeLayout: option.priceBadgeLayout, priceBadgeText: option.priceBadgeText, iconName: option.iconName, iconColor: option.iconColor, content: option.content, showIndicator: showIndicator, titleBadgePosition: option.titleBadgePosition }, radioId));
34
34
  }) }))] }));
35
35
  };
36
36
  exports.default = RadioGroup;
@@ -9,14 +9,19 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
9
9
  Object.defineProperty(exports, "__esModule", { value: true });
10
10
  exports.RadioGroupStyled = exports.RadioButtonsWrapper = exports.InfoText = exports.InfoIconWrapper = exports.InfoArea = exports.GroupLabel = exports.GroupLabelWrapper = void 0;
11
11
  var styled_components_1 = __importDefault(require("styled-components"));
12
+ var devices_1 = require("../../constants/devices");
12
13
  exports.GroupLabelWrapper = styled_components_1.default.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n display: flex;\n margin-bottom: ", ";\n"], ["\n display: flex;\n margin-bottom: ", ";\n"])), function (props) { return props.$emphasizedLabel ? "0.5rem" : "1rem"; });
13
14
  exports.GroupLabel = styled_components_1.default.label(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n margin: 0;\n display: block;\n color: var(--dark-opacity-50);\n font: var(--caption-bold-12-15);\n"], ["\n margin: 0;\n display: block;\n color: var(--dark-opacity-50);\n font: var(--caption-bold-12-15);\n"])));
14
15
  exports.InfoArea = styled_components_1.default.div(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n display: flex;\n align-items: center;\n gap: 0.75rem;\n padding: 0 0;\n margin-bottom: 1rem;\n"], ["\n display: flex;\n align-items: center;\n gap: 0.75rem;\n padding: 0 0;\n margin-bottom: 1rem;\n"])));
15
16
  exports.InfoIconWrapper = styled_components_1.default.div(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n flex-shrink: 0;\n display: flex;\n align-items: center;\n justify-content: center;\n width: 24px;\n height: 24px;\n color: var(--dark-opacity-50);\n"], ["\n flex-shrink: 0;\n display: flex;\n align-items: center;\n justify-content: center;\n width: 24px;\n height: 24px;\n color: var(--dark-opacity-50);\n"])));
16
17
  exports.InfoText = styled_components_1.default.div(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n margin: 0;\n flex: 1;\n font: var(--caption-medium-12-15);\n color: var(--dark-opacity-50);\n"], ["\n margin: 0;\n flex: 1;\n font: var(--caption-medium-12-15);\n color: var(--dark-opacity-50);\n"])));
17
18
  exports.RadioButtonsWrapper = styled_components_1.default.div(templateObject_6 || (templateObject_6 = __makeTemplateObject(["\n gap: ", ";\n width: 100%;\n\n ", "\n"], ["\n gap: ", ";\n width: 100%;\n\n ", "\n"])), function (props) { return props.$gap || "0.5rem"; }, function (props) { return props.$gridColumnLength
18
- ? "\n display: grid;\n grid-template-columns: repeat(".concat(props.$gridColumnLength, ", minmax(0, 1fr));\n ")
19
- : "\n display: flex;\n flex-direction: ".concat(props.$layout === "horizontal" ? "row" : "column", ";\n flex-wrap: ").concat(props.$layout === "horizontal" ? "wrap" : "nowrap", ";\n ").concat(props.$isFilled
19
+ ? "\n display: grid;\n grid-template-columns: repeat(".concat(props.$gridColumnLength, ", minmax(0, 1fr));\n ").concat(props.$isHorizontalOnMobile
20
+ ? "\n @media only screen and ".concat(devices_1.devices.md, " {\n grid-template-columns: 1fr;\n }\n ")
21
+ : "", "\n ")
22
+ : "\n display: flex;\n ".concat(props.$isHorizontalOnMobile && props.$layout === "horizontal"
23
+ ? "\n flex-direction: row;\n flex-wrap: wrap;\n @media only screen and ".concat(devices_1.devices.md, " {\n flex-direction: column;\n flex-wrap: nowrap;\n }\n ")
24
+ : "\n flex-direction: ".concat(props.$layout === "horizontal" ? "row" : "column", ";\n flex-wrap: ").concat(props.$layout === "horizontal" ? "wrap" : "nowrap", ";\n "), "\n ").concat(props.$isFilled
20
25
  ? "\n > * {\n flex: 1 1 0;\n }\n "
21
26
  : "", "\n "); });
22
27
  exports.RadioGroupStyled = styled_components_1.default.div(templateObject_7 || (templateObject_7 = __makeTemplateObject(["\n display: flex;\n flex-direction: column;\n"], ["\n display: flex;\n flex-direction: column;\n"])));
@@ -1,5 +1,4 @@
1
1
  import React from "react";
2
- import { variants } from "../Badges/props";
3
2
  export declare const layouts: string[];
4
3
  export declare const sizes: string[];
5
4
  export declare const textSizes: string[];
@@ -20,10 +19,22 @@ export interface RadioOption {
20
19
  color?: string;
21
20
  alignment?: ALIGNMENTS;
22
21
  isWrapText?: boolean;
23
- titleBadgePosition?: "inline" | "below";
22
+ labelSm?: string;
23
+ hasBadge?: boolean;
24
+ badgeText?: string;
25
+ badgeVariant?: string;
26
+ price?: string;
27
+ priceDesc?: string;
24
28
  hasTitleBadge?: boolean;
25
- titleBadgeLayout?: (typeof variants)[number];
29
+ titleBadgeLayout?: string;
26
30
  titleBadgeText?: string;
31
+ hasPriceBadge?: boolean;
32
+ priceBadgeLayout?: string;
33
+ priceBadgeText?: string;
34
+ iconName?: string;
35
+ iconColor?: string;
36
+ content?: React.ReactNode;
37
+ titleBadgePosition?: "inline" | "below";
27
38
  }
28
39
  export interface RadioGroup {
29
40
  options?: RadioOption[];
@@ -49,6 +60,8 @@ export interface RadioGroup {
49
60
  infoIcon?: string;
50
61
  /** Satır başına sütun sayısı — verildiğinde flex yerine grid kullanılır */
51
62
  gridColumnLength?: number;
63
+ /** Mobilde layout uyarlaması: flex vertical → row; grid → tek sütun (alt alta) */
64
+ isHorizontalOnMobile?: boolean;
52
65
  }
53
66
  export declare const RadioGroupDefault: RadioGroup;
54
67
  export interface RadioGroupStyledProps {
@@ -57,6 +70,7 @@ export interface RadioGroupStyledProps {
57
70
  $isFilled?: boolean;
58
71
  $emphasizedLabel?: boolean;
59
72
  $gridColumnLength?: number;
73
+ $isHorizontalOnMobile?: boolean;
60
74
  }
61
75
  export type RadioGroupProps = typeof RadioGroupDefault;
62
76
  export {};
@@ -4,7 +4,7 @@ exports.RadioGroupDefault = exports.alignments = exports.radioLayouts = exports.
4
4
  exports.layouts = ["vertical", "horizontal"];
5
5
  exports.sizes = ["small", "medium"];
6
6
  exports.textSizes = ["small", "medium", "large", "xlarge"];
7
- exports.radioLayouts = ["basic", "boxed", "boxedSm", "boxedMd", "horizontal", "color"];
7
+ exports.radioLayouts = ["basic", "boxed", "boxedSm", "boxedMd", "boxedWithIcon", "horizontal", "color"];
8
8
  exports.alignments = ["vertical", "horizontal"];
9
9
  exports.RadioGroupDefault = {
10
10
  options: [],
@@ -28,5 +28,6 @@ exports.RadioGroupDefault = {
28
28
  hasInfo: false,
29
29
  infoText: null,
30
30
  infoIcon: "InfoSquare",
31
- gridColumnLength: undefined
31
+ gridColumnLength: undefined,
32
+ isHorizontalOnMobile: false,
32
33
  };
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
2
  declare const _default: {
3
3
  title: string;
4
- component: ({ options, value, onChange, name, label, disabled, size, textSize, layout, radioLayout, valid, labelOffset, color, verticalAlign, readOnly, gap, isFilled, showIndicator, hasInfo, infoText, infoIcon, gridColumnLength }: import("../props").RadioGroup) => React.JSX.Element;
4
+ component: ({ options, value, onChange, name, label, disabled, size, textSize, layout, radioLayout, valid, labelOffset, color, verticalAlign, readOnly, gap, isFilled, showIndicator, hasInfo, infoText, infoIcon, gridColumnLength, isHorizontalOnMobile, }: import("../props").RadioGroup) => React.JSX.Element;
5
5
  tags: string[];
6
6
  argTypes: {
7
7
  layout: {
@@ -49,6 +49,9 @@ declare const _default: {
49
49
  min: number;
50
50
  max: number;
51
51
  };
52
+ isHorizontalOnMobile: {
53
+ control: string;
54
+ };
52
55
  };
53
56
  };
54
57
  export default _default;
@@ -86,6 +89,24 @@ export declare const WithoutIndicator: {
86
89
  textSize: string;
87
90
  };
88
91
  };
92
+ export declare const VerticalHorizontalOnMobile: {
93
+ args: {
94
+ layout: string;
95
+ isHorizontalOnMobile: boolean;
96
+ options: {
97
+ label: string;
98
+ value: string;
99
+ }[];
100
+ name: string;
101
+ label: string;
102
+ value: string;
103
+ onChange: (value: any) => void;
104
+ radioLayout: string;
105
+ size: string;
106
+ textSize: string;
107
+ showIndicator: boolean;
108
+ };
109
+ };
89
110
  export declare const Horizontal: {
90
111
  args: {
91
112
  name: string;
@@ -240,6 +261,25 @@ export declare const GridTwoColumns: {
240
261
  };
241
262
  render: (args: any) => React.JSX.Element;
242
263
  };
264
+ export declare const GridStackedOnMobile: {
265
+ args: {
266
+ isHorizontalOnMobile: boolean;
267
+ options: {
268
+ label: string;
269
+ value: string;
270
+ }[];
271
+ name: string;
272
+ label: string;
273
+ value: string;
274
+ onChange: (value: any) => void;
275
+ radioLayout: string;
276
+ size: string;
277
+ gridColumnLength: number;
278
+ gap: string;
279
+ showIndicator: boolean;
280
+ };
281
+ render: (args: any) => React.JSX.Element;
282
+ };
243
283
  export declare const ColorPicker: {
244
284
  args: {
245
285
  name: string;
@@ -288,3 +328,76 @@ export declare const WithDescriptions: {
288
328
  size: string;
289
329
  };
290
330
  };
331
+ export declare const BoxedWithIconLayout: {
332
+ args: {
333
+ name: string;
334
+ label: string;
335
+ options: {
336
+ label: string;
337
+ value: string;
338
+ iconName: string;
339
+ iconColor: string;
340
+ content: React.JSX.Element;
341
+ }[];
342
+ value: string;
343
+ onChange: (value: any) => void;
344
+ layout: string;
345
+ radioLayout: string;
346
+ gap: string;
347
+ };
348
+ decorators: ((Story: any) => React.JSX.Element)[];
349
+ };
350
+ export declare const HorizontalInstallment: {
351
+ args: {
352
+ name: string;
353
+ label: string;
354
+ options: ({
355
+ label: string;
356
+ value: string;
357
+ description: string;
358
+ price: string;
359
+ priceDesc: string;
360
+ hasTitleBadge: boolean;
361
+ titleBadgeLayout: string;
362
+ titleBadgeText: string;
363
+ hasPriceBadge: boolean;
364
+ priceBadgeLayout: string;
365
+ priceBadgeText: string;
366
+ disabled?: undefined;
367
+ } | {
368
+ label: string;
369
+ value: string;
370
+ description: string;
371
+ price: string;
372
+ priceDesc: string;
373
+ hasTitleBadge: boolean;
374
+ hasPriceBadge: boolean;
375
+ titleBadgeLayout?: undefined;
376
+ titleBadgeText?: undefined;
377
+ priceBadgeLayout?: undefined;
378
+ priceBadgeText?: undefined;
379
+ disabled?: undefined;
380
+ } | {
381
+ label: string;
382
+ value: string;
383
+ description: string;
384
+ price: string;
385
+ priceDesc: string;
386
+ hasTitleBadge: boolean;
387
+ titleBadgeLayout: string;
388
+ titleBadgeText: string;
389
+ hasPriceBadge: boolean;
390
+ priceBadgeLayout: string;
391
+ priceBadgeText: string;
392
+ disabled: boolean;
393
+ })[];
394
+ value: string;
395
+ onChange: (value: any) => void;
396
+ layout: string;
397
+ radioLayout: string;
398
+ gap: string;
399
+ };
400
+ };
401
+ export declare const AllRadioLayouts: {
402
+ render: () => React.JSX.Element;
403
+ };
@@ -14,10 +14,88 @@ 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.WithDescriptions = exports.WithDisabledOptions = exports.ColorPicker = exports.GridTwoColumns = exports.WithInfoArea = exports.BoxedMdWithoutIndicator = exports.BoxedMdFilled = exports.BoxedMdLayout = exports.BoxedSmFilled = exports.BoxedSmLayout = exports.BoxedLayout = exports.Horizontal = exports.WithoutIndicator = exports.Default = void 0;
17
+ exports.AllRadioLayouts = exports.HorizontalInstallment = exports.BoxedWithIconLayout = exports.WithDescriptions = exports.WithDisabledOptions = exports.ColorPicker = exports.GridStackedOnMobile = exports.GridTwoColumns = exports.WithInfoArea = exports.BoxedMdWithoutIndicator = exports.BoxedMdFilled = exports.BoxedMdLayout = exports.BoxedSmFilled = exports.BoxedSmLayout = exports.BoxedLayout = exports.Horizontal = exports.VerticalHorizontalOnMobile = exports.WithoutIndicator = exports.Default = void 0;
18
18
  var jsx_runtime_1 = require("react/jsx-runtime");
19
19
  var RadioGroup_1 = __importDefault(require("../RadioGroup"));
20
20
  var props_1 = require("../props");
21
+ var onChange = function (value) { return console.log("Selected value:", value); };
22
+ var basicOptions = [
23
+ { label: "Option 1", value: "option1", description: "Description 1" },
24
+ { label: "Option 2", value: "option2", description: "Description 2" },
25
+ { label: "Option 3", value: "option3", description: "Description 3" },
26
+ ];
27
+ var boxedOptions = [
28
+ { label: "99.999,99 TL", labelSm: "/ay", description: "1 hafta", value: "weekly" },
29
+ { label: "199.999,99 TL", labelSm: "/ay", description: "1 ay", value: "monthly", hasBadge: true, badgeText: "Avantajlı", badgeVariant: "primary" },
30
+ { label: "299.999,99 TL", labelSm: "/ay", description: "3 ay", value: "quarterly" },
31
+ ];
32
+ var boxedSmOptions = [
33
+ { label: "1.999,99 TL", value: "monthly", description: "12 ay" },
34
+ { label: "3.499,99 TL", value: "biannual", description: "6 ay" },
35
+ { label: "5.999,99 TL", value: "annual", description: "3 ay" },
36
+ ];
37
+ var boxedWithIconOptions = [
38
+ {
39
+ label: "İş Bankası müşterisiyim",
40
+ value: "customer",
41
+ iconName: "ShieldDoneLg",
42
+ iconColor: "var(--green)",
43
+ content: ((0, jsx_runtime_1.jsxs)("ul", { children: [(0, jsx_runtime_1.jsx)("li", { children: "\u0130\u015FCep'e giri\u015F yap" }), (0, jsx_runtime_1.jsx)("li", { children: "Mevduat hesab\u0131n\u0131 a\u00E7" }), (0, jsx_runtime_1.jsx)("li", { children: "\u0130\u015Flemine devam etmek i\u00E7in telefonuna gelen SMS ile devam et" })] })),
44
+ },
45
+ {
46
+ label: "İş Bankası müşterisi değilim",
47
+ value: "nonCustomer",
48
+ iconName: "UserPlusLg",
49
+ iconColor: "var(--yellow)",
50
+ content: ((0, jsx_runtime_1.jsxs)("ul", { children: [(0, jsx_runtime_1.jsx)("li", { children: "\u00D6nce \u0130\u015FCep uygulamas\u0131n\u0131 indir" }), (0, jsx_runtime_1.jsx)("li", { children: "\u0130\u015F Bankas\u0131 m\u00FC\u015Fterisi ol ad\u0131m\u0131ndan m\u00FC\u015Fteri ol" }), (0, jsx_runtime_1.jsx)("li", { children: "M\u00FC\u015Fteri olduktan sonra \u0130\u015FCep'ten \u00E7\u0131k\u0131\u015F yap" })] })),
51
+ },
52
+ ];
53
+ var horizontalOptions = [
54
+ {
55
+ label: "Taksitli Ödeme",
56
+ value: "installment",
57
+ description: "10 taksit seçeneği ile ödeme yapabilirsiniz",
58
+ price: "1.250 TL",
59
+ priceDesc: "12.500 TL",
60
+ hasTitleBadge: true,
61
+ titleBadgeLayout: "secondary",
62
+ titleBadgeText: "Peşin fiyatına",
63
+ hasPriceBadge: true,
64
+ priceBadgeLayout: "primary",
65
+ priceBadgeText: "Avantajlı",
66
+ },
67
+ {
68
+ label: "Tek Çekim",
69
+ value: "single",
70
+ description: "Tek seferde ödeme yapın",
71
+ price: "12.500 TL",
72
+ priceDesc: "12.500 TL",
73
+ hasTitleBadge: false,
74
+ hasPriceBadge: false,
75
+ },
76
+ {
77
+ label: "Taksitli Ödeme",
78
+ value: "disabled",
79
+ description: "Bu seçenek şu an kullanılamıyor",
80
+ price: "1.250 TL",
81
+ priceDesc: "12.500 TL",
82
+ hasTitleBadge: true,
83
+ titleBadgeLayout: "secondary",
84
+ titleBadgeText: "Peşin fiyatına",
85
+ hasPriceBadge: true,
86
+ priceBadgeLayout: "disabled",
87
+ priceBadgeText: "Satışta yok",
88
+ disabled: true,
89
+ },
90
+ ];
91
+ var colorOptions = [
92
+ { value: "black", color: "#000000" },
93
+ { value: "white", color: "#FFFFFF" },
94
+ { value: "red", color: "#FF1F1F" },
95
+ { value: "blue", color: "#2563EB" },
96
+ { value: "green", color: "#16A34A" },
97
+ { value: "purple", color: "#9763F6" },
98
+ ];
21
99
  exports.default = {
22
100
  title: 'Components/RadioGroup',
23
101
  component: RadioGroup_1.default,
@@ -36,6 +114,7 @@ exports.default = {
36
114
  infoText: { control: 'text' },
37
115
  infoIcon: { control: 'text' },
38
116
  gridColumnLength: { control: 'number', min: 1, max: 6 },
117
+ isHorizontalOnMobile: { control: 'boolean' },
39
118
  }
40
119
  };
41
120
  exports.Default = {
@@ -59,6 +138,14 @@ exports.Default = {
59
138
  exports.WithoutIndicator = {
60
139
  args: __assign(__assign({}, exports.Default.args), { showIndicator: false }),
61
140
  };
141
+ exports.VerticalHorizontalOnMobile = {
142
+ args: __assign(__assign({}, exports.Default.args), { layout: "vertical", isHorizontalOnMobile: true, options: [
143
+ { label: "Option 1", value: "option1" },
144
+ { label: "Option 2", value: "option2" },
145
+ { label: "Option 3", value: "option3" },
146
+ { label: "Option 4", value: "option4" },
147
+ ] }),
148
+ };
62
149
  exports.Horizontal = {
63
150
  args: {
64
151
  name: "horizontalRadioGroup",
@@ -204,6 +291,15 @@ exports.GridTwoColumns = {
204
291
  },
205
292
  render: function (args) { return ((0, jsx_runtime_1.jsx)("div", __assign({ style: { maxWidth: "720px" } }, { children: (0, jsx_runtime_1.jsx)(RadioGroup_1.default, __assign({}, args)) }))); },
206
293
  };
294
+ exports.GridStackedOnMobile = {
295
+ args: __assign(__assign({}, exports.GridTwoColumns.args), { isHorizontalOnMobile: true, options: [
296
+ { label: "Esnek", value: "flexible" },
297
+ { label: "Taahhütlü", value: "committed" },
298
+ { label: "Seçenek 3", value: "option3" },
299
+ { label: "Seçenek 4", value: "option4" },
300
+ ] }),
301
+ render: exports.GridTwoColumns.render,
302
+ };
207
303
  exports.ColorPicker = {
208
304
  args: {
209
305
  name: "colorRadioGroup",
@@ -258,9 +354,39 @@ exports.WithDescriptions = {
258
354
  },
259
355
  ],
260
356
  value: "standard",
261
- onChange: function (value) { return console.log("Selected value:", value); },
357
+ onChange: onChange,
262
358
  layout: "vertical",
263
359
  radioLayout: "horizontal",
264
360
  size: "small",
265
361
  },
266
362
  };
363
+ exports.BoxedWithIconLayout = {
364
+ args: {
365
+ name: "boxedWithIconRadioGroup",
366
+ label: "Müşteri Tipi",
367
+ options: boxedWithIconOptions,
368
+ value: "customer",
369
+ onChange: onChange,
370
+ layout: "vertical",
371
+ radioLayout: "boxedWithIcon",
372
+ gap: "0.75rem",
373
+ },
374
+ decorators: [
375
+ function (Story) { return ((0, jsx_runtime_1.jsx)("div", __assign({ style: { maxWidth: "400px" } }, { children: (0, jsx_runtime_1.jsx)(Story, {}) }))); },
376
+ ],
377
+ };
378
+ exports.HorizontalInstallment = {
379
+ args: {
380
+ name: "horizontalInstallmentRadioGroup",
381
+ label: "Ödeme Seçenekleri",
382
+ options: horizontalOptions,
383
+ value: "installment",
384
+ onChange: onChange,
385
+ layout: "vertical",
386
+ radioLayout: "horizontal",
387
+ gap: "0.75rem",
388
+ },
389
+ };
390
+ exports.AllRadioLayouts = {
391
+ render: function () { return ((0, jsx_runtime_1.jsxs)("div", __assign({ style: { display: "flex", flexDirection: "column", gap: "2.5rem" } }, { children: [(0, jsx_runtime_1.jsx)(RadioGroup_1.default, { name: "allBasic", label: "Basic", options: basicOptions, value: "option1", onChange: onChange, radioLayout: "basic" }), (0, jsx_runtime_1.jsx)(RadioGroup_1.default, { name: "allBoxed", label: "Boxed", options: boxedOptions, value: "weekly", onChange: onChange, layout: "horizontal", radioLayout: "boxed", gap: "0.75rem" }), (0, jsx_runtime_1.jsx)("div", __assign({ style: { maxWidth: "179px" } }, { children: (0, jsx_runtime_1.jsx)(RadioGroup_1.default, { name: "allBoxedSm", label: "BoxedSm", options: boxedSmOptions, value: "monthly", onChange: onChange, layout: "vertical", radioLayout: "boxedSm", gap: "0.75rem" }) })), (0, jsx_runtime_1.jsx)("div", __assign({ style: { maxWidth: "400px" } }, { children: (0, jsx_runtime_1.jsx)(RadioGroup_1.default, { name: "allBoxedWithIcon", label: "BoxedWithIcon", options: boxedWithIconOptions, value: "customer", onChange: onChange, layout: "vertical", radioLayout: "boxedWithIcon", gap: "0.75rem" }) })), (0, jsx_runtime_1.jsx)(RadioGroup_1.default, { name: "allHorizontal", label: "Horizontal", options: horizontalOptions, value: "installment", onChange: onChange, layout: "vertical", radioLayout: "horizontal", gap: "0.75rem" }), (0, jsx_runtime_1.jsx)(RadioGroup_1.default, { name: "allColor", label: "Color", options: colorOptions, value: "black", onChange: onChange, layout: "horizontal", radioLayout: "color", gap: "1rem" })] }))); },
392
+ };
@@ -1,4 +1,4 @@
1
1
  import React from "react";
2
2
  import { TabsProps } from "./props";
3
- declare const Tabs: ({ tabs, activeTab, defaultTab, size, hasAutoFlex, isHideTabHeaderOnMobile, onChange, }: TabsProps) => React.JSX.Element;
3
+ declare const Tabs: ({ tabs, activeTab, defaultTab, size, hasAutoFlex, isHideTabHeaderOnMobile, tabButtonWidth, onChange, }: TabsProps) => React.JSX.Element;
4
4
  export default Tabs;
@@ -17,15 +17,15 @@ var props_1 = require("./props");
17
17
  var Tabs_styled_1 = require("./Tabs.styled");
18
18
  var Tabs = function (_a) {
19
19
  var _b;
20
- var _c = _a.tabs, tabs = _c === void 0 ? props_1.TabsDefault.tabs : _c, activeTab = _a.activeTab, defaultTab = _a.defaultTab, _d = _a.size, size = _d === void 0 ? props_1.TabsDefault.size : _d, _e = _a.hasAutoFlex, hasAutoFlex = _e === void 0 ? props_1.TabsDefault.hasAutoFlex : _e, _f = _a.isHideTabHeaderOnMobile, isHideTabHeaderOnMobile = _f === void 0 ? props_1.TabsDefault.isHideTabHeaderOnMobile : _f, onChange = _a.onChange;
21
- var _g = (0, react_1.useState)(function () {
20
+ var _c = _a.tabs, tabs = _c === void 0 ? props_1.TabsDefault.tabs : _c, activeTab = _a.activeTab, defaultTab = _a.defaultTab, _d = _a.size, size = _d === void 0 ? props_1.TabsDefault.size : _d, _e = _a.hasAutoFlex, hasAutoFlex = _e === void 0 ? props_1.TabsDefault.hasAutoFlex : _e, _f = _a.isHideTabHeaderOnMobile, isHideTabHeaderOnMobile = _f === void 0 ? props_1.TabsDefault.isHideTabHeaderOnMobile : _f, _g = _a.tabButtonWidth, tabButtonWidth = _g === void 0 ? props_1.TabsDefault.tabButtonWidth : _g, onChange = _a.onChange;
21
+ var _h = (0, react_1.useState)(function () {
22
22
  var _a;
23
23
  if (activeTab)
24
24
  return activeTab;
25
25
  if (defaultTab)
26
26
  return defaultTab;
27
27
  return ((_a = tabs[0]) === null || _a === void 0 ? void 0 : _a.key) || '';
28
- }), currentTab = _g[0], setCurrentTab = _g[1];
28
+ }), currentTab = _h[0], setCurrentTab = _h[1];
29
29
  var headerRef = (0, react_1.useRef)(null);
30
30
  // Sync with controlled activeTab prop
31
31
  (0, react_1.useEffect)(function () {
@@ -60,6 +60,6 @@ var Tabs = function (_a) {
60
60
  setCurrentTab(key);
61
61
  };
62
62
  var activeTabContent = (_b = tabs.find(function (tab) { return tab.key === currentTab; })) === null || _b === void 0 ? void 0 : _b.content;
63
- return ((0, jsx_runtime_1.jsxs)(Tabs_styled_1.TabsStyled, { children: [(0, jsx_runtime_1.jsx)(Tabs_styled_1.TabHeaderStyled, __assign({ ref: headerRef, "$size": size, "$hasAutoFlex": hasAutoFlex, "$isHideTabHeaderOnMobile": isHideTabHeaderOnMobile }, { children: tabs.map(function (tab) { return ((0, jsx_runtime_1.jsx)(Tabs_styled_1.TabItemStyled, __assign({ "data-key": tab.key, "$size": size, "$isActive": currentTab === tab.key, "$isDisabled": tab.isDisabled, "$hasAutoFlex": hasAutoFlex }, { children: (0, jsx_runtime_1.jsx)(Tabs_styled_1.TabItemTitleStyled, __assign({ "$size": size, "$isActive": currentTab === tab.key, "$hasAutoFlex": hasAutoFlex, onClick: function () { return !tab.isDisabled && handleTabChange(tab.key); } }, { children: tab.title })) }), tab.key)); }) })), (0, jsx_runtime_1.jsx)(Tabs_styled_1.TabItemContentStyled, __assign({ "$size": size }, { children: activeTabContent }))] }));
63
+ return ((0, jsx_runtime_1.jsxs)(Tabs_styled_1.TabsStyled, { children: [(0, jsx_runtime_1.jsx)(Tabs_styled_1.TabHeaderStyled, __assign({ ref: headerRef, "$size": size, "$hasAutoFlex": hasAutoFlex, "$isHideTabHeaderOnMobile": isHideTabHeaderOnMobile, "$tabButtonWidth": tabButtonWidth }, { children: tabs.map(function (tab) { return ((0, jsx_runtime_1.jsx)(Tabs_styled_1.TabItemStyled, __assign({ "data-key": tab.key, "$size": size, "$isActive": currentTab === tab.key, "$isDisabled": tab.isDisabled, "$hasAutoFlex": hasAutoFlex, "$tabButtonWidth": tabButtonWidth }, { children: (0, jsx_runtime_1.jsx)(Tabs_styled_1.TabItemTitleStyled, __assign({ "$size": size, "$isActive": currentTab === tab.key, "$hasAutoFlex": hasAutoFlex, "$tabButtonWidth": tabButtonWidth, onClick: function () { return !tab.isDisabled && handleTabChange(tab.key); } }, { children: tab.title })) }), tab.key)); }) })), (0, jsx_runtime_1.jsx)(Tabs_styled_1.TabItemContentStyled, __assign({ "$size": size }, { children: activeTabContent }))] }));
64
64
  };
65
65
  exports.default = Tabs;
@@ -41,7 +41,7 @@ var getTabSize = function ($size) {
41
41
  };
42
42
  exports.TabsStyled = styled_components_1.default.div(templateObject_1 || (templateObject_1 = __makeTemplateObject([""], [""])));
43
43
  exports.TabHeaderStyled = styled_components_1.default.div(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n display: flex;\n align-items: center;\n justify-content: ", ";\n column-gap: ", ";\n ", "\n ", "\n"], ["\n display: flex;\n align-items: center;\n justify-content: ", ";\n column-gap: ", ";\n ", "\n ", "\n"])), function (props) { return props.$hasAutoFlex ? "center" : "flex-start"; }, function (props) { return getTabSize(props.$size).columnGap; }, function (props) { return !props.$hasAutoFlex && "\n scroll-snap-type: x proximity;\n -webkit-overflow-scrolling: touch;\n scrollbar-width: none;\n overflow-x: scroll;\n padding: 2rem;\n margin: -2rem;\n @media only screen and (".concat(devices_1.devices.xl, ") {\n padding: 2rem 1rem;\n margin: -2rem -1rem;\n column-gap: ").concat(getTabSize(props.$size).columnGapSm, ";\n }\n "); }, function (props) { return props.$isHideTabHeaderOnMobile ? "\n @media only screen and (".concat(devices_1.devices.lg, ") {\n display: none;\n }\n ") : ""; });
44
- exports.TabItemStyled = styled_components_1.default.div(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n flex: ", ";\n ", "\n"], ["\n flex: ", ";\n ", "\n"])), function (props) { return props.$hasAutoFlex ? "1 0" : "auto 0"; }, function (props) { return props.$isDisabled ? "\n cursor: no-drop;\n pointer-events: none;\n user-select: none;\n " : ""; });
44
+ exports.TabItemStyled = styled_components_1.default.div(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n flex: ", ";\n width: ", ";\n ", "\n"], ["\n flex: ", ";\n width: ", ";\n ", "\n"])), function (props) { return props.$tabButtonWidth ? "0 0 ".concat(props.$tabButtonWidth, "px") : props.$hasAutoFlex ? "1 0" : "auto 0"; }, function (props) { return props.$tabButtonWidth ? "".concat(props.$tabButtonWidth, "px") : "auto"; }, function (props) { return props.$isDisabled ? "\n cursor: no-drop;\n pointer-events: none;\n user-select: none;\n " : ""; });
45
45
  exports.TabItemTitleStyled = styled_components_1.default.button(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n background: transparent;\n color: ", ";\n border: 1px solid ", ";\n width: 100%;\n box-shadow: 0 6px 30px 0 ", ";\n border-radius: 0.5rem;\n transition: all .2s ease;\n padding: ", ";\n height: ", ";\n cursor: pointer;\n font: var(--body-semi-bold-14-17);\n white-space: ", ";\n outline: none !important;\n &:hover {\n color: var(--dark);\n border: 1px solid var(--grey-10);\n box-shadow: 0 6px 30px 0 var(--box-shadow-color);\n }\n"], ["\n background: transparent;\n color: ", ";\n border: 1px solid ", ";\n width: 100%;\n box-shadow: 0 6px 30px 0 ", ";\n border-radius: 0.5rem;\n transition: all .2s ease;\n padding: ", ";\n height: ", ";\n cursor: pointer;\n font: var(--body-semi-bold-14-17);\n white-space: ", ";\n outline: none !important;\n &:hover {\n color: var(--dark);\n border: 1px solid var(--grey-10);\n box-shadow: 0 6px 30px 0 var(--box-shadow-color);\n }\n"])), function (props) { return props.$isActive ? "var(--dark)" : "var(--dark-opacity-75)"; }, function (props) { return props.$isActive ? "var(--grey-10)" : "transparent"; }, function (props) { return props.$isActive ? "var(--box-shadow-color)" : "transparent"; }, function (props) { return props.$hasAutoFlex ? "0" : getTabSize(props.$size).padding; }, function (props) { return getTabSize(props.$size).height; }, function (props) { return props.$hasAutoFlex ? "pre-wrap" : "nowrap"; });
46
46
  exports.TabItemContentStyled = styled_components_1.default.div(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n padding-top: ", ";\n @media only screen and (", ") {\n padding-top: ", ";\n }\n"], ["\n padding-top: ", ";\n @media only screen and (", ") {\n padding-top: ", ";\n }\n"])), function (props) { return getTabSize(props.$size).paddingTop; }, devices_1.devices.lg, function (props) { return getTabSize(props.$size).paddingTop; });
47
47
  var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5;