krl-alfred 2.17.52 → 2.17.54
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/ProductCardHorizontalSm/ProductCardHorizontalSm.d.ts +1 -1
- package/dist/components/ProductCardHorizontalSm/ProductCardHorizontalSm.js +4 -4
- package/dist/components/ProductCardHorizontalSm/ProductCardHorizontalSm.styled.js +3 -3
- package/dist/components/ProductCardHorizontalSm/props.d.ts +2 -0
- package/dist/components/ProductCardHorizontalSm/props.js +1 -0
- package/dist/components/SelectBox/SelectBox.js +27 -3
- package/dist/components/SelectBox/props.d.ts +18 -2
- package/dist/components/ShoppingCartProduct/ShoppingCartProduct.js +1 -1
- package/package.json +1 -1
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
declare const _default: React.MemoExoticComponent<({ title, price, priceSm, slug, period, image, component, hasImageBorder, imageWidth, imageHeight, infoPosition, hasButton, buttonVariant, buttonText, hasBorder, isSelected, hasTitleWrap, hasButtonRemoveMdDown, hasBordeHover, hasTooltip, tooltipSelectorTitle, tooltipDescription, isDisabled, imageInnerWidth, imageInnerHeight, }: import("./props").ProductCardHorizontalSm) => import("react/jsx-runtime").JSX.Element>;
|
|
2
|
+
declare const _default: React.MemoExoticComponent<({ title, price, priceSm, slug, period, image, component, hasImageBorder, imageWidth, imageHeight, infoPosition, hasButton, buttonVariant, buttonText, hasBorder, isSelected, hasTitleWrap, hasButtonRemoveMdDown, hasBordeHover, hasTooltip, tooltipSelectorTitle, tooltipDescription, isDisabled, imageInnerWidth, imageInnerHeight, hasImageRounded, }: import("./props").ProductCardHorizontalSm) => import("react/jsx-runtime").JSX.Element>;
|
|
3
3
|
export default _default;
|
|
@@ -27,8 +27,8 @@ var LinkComponent = (0, react_1.memo)(function (_a) {
|
|
|
27
27
|
return Component ? (0, jsx_runtime_1.jsx)(Component, __assign({ href: slug }, { children: children })) : (0, jsx_runtime_1.jsx)("a", __assign({ href: slug }, { children: children }));
|
|
28
28
|
});
|
|
29
29
|
var ImageContent = (0, react_1.memo)(function (_a) {
|
|
30
|
-
var image = _a.image, title = _a.title, imageInnerWidth = _a.imageInnerWidth, imageInnerHeight = _a.imageInnerHeight, imageHeight = _a.imageHeight, imageWidth = _a.imageWidth, hasImageBorder = _a.hasImageBorder;
|
|
31
|
-
return ((0, jsx_runtime_1.jsx)(ProductCardHorizontalSm_styled_1.ImgWrapper, __assign({ "$imageHeight": imageHeight, "$imageWidth": imageWidth, "$hasImageBorder": hasImageBorder }, { children: (0, jsx_runtime_1.jsx)(image_1.default, { src: image, alt: title || "", width: imageInnerWidth, height: imageInnerHeight }) })));
|
|
30
|
+
var image = _a.image, title = _a.title, imageInnerWidth = _a.imageInnerWidth, imageInnerHeight = _a.imageInnerHeight, imageHeight = _a.imageHeight, imageWidth = _a.imageWidth, hasImageBorder = _a.hasImageBorder, hasImageRounded = _a.hasImageRounded;
|
|
31
|
+
return ((0, jsx_runtime_1.jsx)(ProductCardHorizontalSm_styled_1.ImgWrapper, __assign({ "$imageHeight": imageHeight, "$imageWidth": imageWidth, "$hasImageBorder": hasImageBorder, "$hasImageRounded": hasImageRounded }, { children: (0, jsx_runtime_1.jsx)(image_1.default, { src: image, alt: title || "", width: imageInnerWidth, height: imageInnerHeight }) })));
|
|
32
32
|
}, function (prev, next) {
|
|
33
33
|
return prev.image === next.image &&
|
|
34
34
|
prev.title === next.title &&
|
|
@@ -39,7 +39,7 @@ var ImageContent = (0, react_1.memo)(function (_a) {
|
|
|
39
39
|
prev.hasImageBorder === next.hasImageBorder;
|
|
40
40
|
});
|
|
41
41
|
var ProductCardHorizontalSm = function (_a) {
|
|
42
|
-
var _b = _a.title, title = _b === void 0 ? props_1.ProductCardHorizontalSmDefault.title : _b, _c = _a.price, price = _c === void 0 ? props_1.ProductCardHorizontalSmDefault.price : _c, _d = _a.priceSm, priceSm = _d === void 0 ? props_1.ProductCardHorizontalSmDefault.priceSm : _d, _e = _a.slug, slug = _e === void 0 ? props_1.ProductCardHorizontalSmDefault.slug : _e, _f = _a.period, period = _f === void 0 ? props_1.ProductCardHorizontalSmDefault.period : _f, _g = _a.image, image = _g === void 0 ? props_1.ProductCardHorizontalSmDefault.image : _g, _h = _a.component, component = _h === void 0 ? props_1.ProductCardHorizontalSmDefault.component : _h, _j = _a.hasImageBorder, hasImageBorder = _j === void 0 ? props_1.ProductCardHorizontalSmDefault.hasImageBorder : _j, _k = _a.imageWidth, imageWidth = _k === void 0 ? props_1.ProductCardHorizontalSmDefault.imageWidth : _k, _l = _a.imageHeight, imageHeight = _l === void 0 ? props_1.ProductCardHorizontalSmDefault.imageHeight : _l, _m = _a.infoPosition, infoPosition = _m === void 0 ? props_1.ProductCardHorizontalSmDefault.infoPosition : _m, _o = _a.hasButton, hasButton = _o === void 0 ? props_1.ProductCardHorizontalSmDefault.hasButton : _o, _p = _a.buttonVariant, buttonVariant = _p === void 0 ? props_1.ProductCardHorizontalSmDefault.buttonVariant : _p, _q = _a.buttonText, buttonText = _q === void 0 ? props_1.ProductCardHorizontalSmDefault.buttonText : _q, _r = _a.hasBorder, hasBorder = _r === void 0 ? props_1.ProductCardHorizontalSmDefault.hasBorder : _r, _s = _a.isSelected, isSelected = _s === void 0 ? props_1.ProductCardHorizontalSmDefault.isSelected : _s, _t = _a.hasTitleWrap, hasTitleWrap = _t === void 0 ? props_1.ProductCardHorizontalSmDefault.hasTitleWrap : _t, _u = _a.hasButtonRemoveMdDown, hasButtonRemoveMdDown = _u === void 0 ? props_1.ProductCardHorizontalSmDefault.hasButtonRemoveMdDown : _u, _v = _a.hasBordeHover, hasBordeHover = _v === void 0 ? props_1.ProductCardHorizontalSmDefault.hasBordeHover : _v, _w = _a.hasTooltip, hasTooltip = _w === void 0 ? props_1.ProductCardHorizontalSmDefault.hasTooltip : _w, _x = _a.tooltipSelectorTitle, tooltipSelectorTitle = _x === void 0 ? props_1.ProductCardHorizontalSmDefault.tooltipSelectorTitle : _x, _y = _a.tooltipDescription, tooltipDescription = _y === void 0 ? props_1.ProductCardHorizontalSmDefault.tooltipDescription : _y, _z = _a.isDisabled, isDisabled = _z === void 0 ? props_1.ProductCardHorizontalSmDefault.isDisabled : _z, _0 = _a.imageInnerWidth, imageInnerWidth = _0 === void 0 ? props_1.ProductCardHorizontalSmDefault.imageInnerWidth : _0, _1 = _a.imageInnerHeight, imageInnerHeight = _1 === void 0 ? props_1.ProductCardHorizontalSmDefault.imageInnerHeight : _1;
|
|
43
|
-
return ((0, jsx_runtime_1.jsxs)(ProductCardHorizontalSm_styled_1.ProductCardHorizontalSmStyled, __assign({ "$period": period, "$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 }), (0, jsx_runtime_1.jsxs)(ProductCardHorizontalSm_styled_1.TextWrapper, __assign({ "$period": period }, { children: [(0, jsx_runtime_1.jsx)(ProductCardHorizontalSm_styled_1.Title, __assign({ "$hasTitleWrap": hasTitleWrap }, { children: title })), 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 })))] }))] }) }))] })));
|
|
42
|
+
var _b = _a.title, title = _b === void 0 ? props_1.ProductCardHorizontalSmDefault.title : _b, _c = _a.price, price = _c === void 0 ? props_1.ProductCardHorizontalSmDefault.price : _c, _d = _a.priceSm, priceSm = _d === void 0 ? props_1.ProductCardHorizontalSmDefault.priceSm : _d, _e = _a.slug, slug = _e === void 0 ? props_1.ProductCardHorizontalSmDefault.slug : _e, _f = _a.period, period = _f === void 0 ? props_1.ProductCardHorizontalSmDefault.period : _f, _g = _a.image, image = _g === void 0 ? props_1.ProductCardHorizontalSmDefault.image : _g, _h = _a.component, component = _h === void 0 ? props_1.ProductCardHorizontalSmDefault.component : _h, _j = _a.hasImageBorder, hasImageBorder = _j === void 0 ? props_1.ProductCardHorizontalSmDefault.hasImageBorder : _j, _k = _a.imageWidth, imageWidth = _k === void 0 ? props_1.ProductCardHorizontalSmDefault.imageWidth : _k, _l = _a.imageHeight, imageHeight = _l === void 0 ? props_1.ProductCardHorizontalSmDefault.imageHeight : _l, _m = _a.infoPosition, infoPosition = _m === void 0 ? props_1.ProductCardHorizontalSmDefault.infoPosition : _m, _o = _a.hasButton, hasButton = _o === void 0 ? props_1.ProductCardHorizontalSmDefault.hasButton : _o, _p = _a.buttonVariant, buttonVariant = _p === void 0 ? props_1.ProductCardHorizontalSmDefault.buttonVariant : _p, _q = _a.buttonText, buttonText = _q === void 0 ? props_1.ProductCardHorizontalSmDefault.buttonText : _q, _r = _a.hasBorder, hasBorder = _r === void 0 ? props_1.ProductCardHorizontalSmDefault.hasBorder : _r, _s = _a.isSelected, isSelected = _s === void 0 ? props_1.ProductCardHorizontalSmDefault.isSelected : _s, _t = _a.hasTitleWrap, hasTitleWrap = _t === void 0 ? props_1.ProductCardHorizontalSmDefault.hasTitleWrap : _t, _u = _a.hasButtonRemoveMdDown, hasButtonRemoveMdDown = _u === void 0 ? props_1.ProductCardHorizontalSmDefault.hasButtonRemoveMdDown : _u, _v = _a.hasBordeHover, hasBordeHover = _v === void 0 ? props_1.ProductCardHorizontalSmDefault.hasBordeHover : _v, _w = _a.hasTooltip, hasTooltip = _w === void 0 ? props_1.ProductCardHorizontalSmDefault.hasTooltip : _w, _x = _a.tooltipSelectorTitle, tooltipSelectorTitle = _x === void 0 ? props_1.ProductCardHorizontalSmDefault.tooltipSelectorTitle : _x, _y = _a.tooltipDescription, tooltipDescription = _y === void 0 ? props_1.ProductCardHorizontalSmDefault.tooltipDescription : _y, _z = _a.isDisabled, isDisabled = _z === void 0 ? props_1.ProductCardHorizontalSmDefault.isDisabled : _z, _0 = _a.imageInnerWidth, imageInnerWidth = _0 === void 0 ? props_1.ProductCardHorizontalSmDefault.imageInnerWidth : _0, _1 = _a.imageInnerHeight, imageInnerHeight = _1 === void 0 ? props_1.ProductCardHorizontalSmDefault.imageInnerHeight : _1, _2 = _a.hasImageRounded, hasImageRounded = _2 === void 0 ? props_1.ProductCardHorizontalSmDefault.hasImageRounded : _2;
|
|
43
|
+
return ((0, jsx_runtime_1.jsxs)(ProductCardHorizontalSm_styled_1.ProductCardHorizontalSmStyled, __assign({ "$period": period, "$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 }), (0, jsx_runtime_1.jsxs)(ProductCardHorizontalSm_styled_1.TextWrapper, __assign({ "$period": period }, { children: [(0, jsx_runtime_1.jsx)(ProductCardHorizontalSm_styled_1.Title, __assign({ "$hasTitleWrap": hasTitleWrap }, { children: title })), 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 })))] }))] }) }))] })));
|
|
44
44
|
};
|
|
45
45
|
exports.default = (0, react_1.memo)(ProductCardHorizontalSm);
|
|
@@ -11,16 +11,16 @@ 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.Border = styled_components_1.default.div(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n user-select: none;\n pointer-events: none;\n position: absolute;\n inset: 0;\n border-radius: inherit;\n\n /* \u2705 border-width SAB\u0130T \u2192 flicker kesilir */\n border:
|
|
14
|
+
exports.Border = styled_components_1.default.div(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n user-select: none;\n pointer-events: none;\n position: absolute;\n inset: 0;\n border-radius: inherit;\n\n /* \u2705 border-width SAB\u0130T \u2192 flicker kesilir */\n border: 1px solid transparent;\n\n /* hasBorder false ise g\u00F6r\u00FCnmesin ama DOM\u2019dan d\u00FC\u015Fmesin */\n opacity: ", ";\n transition: border-color 0.2s ease, opacity 0.2s ease;\n\n /* default */\n border-color: ", ";\n\n /* selected */\n ", "\n"], ["\n user-select: none;\n pointer-events: none;\n position: absolute;\n inset: 0;\n border-radius: inherit;\n\n /* \u2705 border-width SAB\u0130T \u2192 flicker kesilir */\n border: 1px solid transparent;\n\n /* hasBorder false ise g\u00F6r\u00FCnmesin ama DOM\u2019dan d\u00FC\u015Fmesin */\n opacity: ", ";\n transition: border-color 0.2s ease, opacity 0.2s ease;\n\n /* default */\n border-color: ", ";\n\n /* selected */\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;"; });
|
|
15
15
|
exports.ProductCardHorizontalSmStyled = styled_components_1.default.div(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n color: var(--dark);\n padding: 0 0.5rem;\n border-radius: 0.5rem;\n position: relative;\n\n /* \u274C transition: all \u2192 paint/layout tetikler; sadece laz\u0131m olanlar\u0131 b\u0131rak */\n transition: color 0.2s ease;\n\n ", "\n\n ", "\n\n a {\n text-decoration: none;\n color: inherit;\n\n @media only screen and ", " {\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\n /* \u274C transition: all \u2192 paint/layout tetikler; sadece laz\u0131m olanlar\u0131 b\u0131rak */\n transition: color 0.2s ease;\n\n ", "\n\n ", "\n\n a {\n text-decoration: none;\n color: inherit;\n\n @media only screen and ", " {\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) {
|
|
16
16
|
return props.$isDisabled &&
|
|
17
17
|
"\n user-select: none;\n pointer-events: none;\n cursor: not-allowed;\n ";
|
|
18
18
|
}, function (props) {
|
|
19
19
|
return props.$hasBordeHover &&
|
|
20
|
-
"\n cursor: pointer;\n &:hover {\n ".concat(exports.Border, " {\n border-color: var(--primary);\n }\n }\n ");
|
|
20
|
+
"\n cursor: pointer;\n &:hover {\n ".concat(exports.Border, " {\n border-color: var(--primary);\n border-width: 2px;\n }\n }\n ");
|
|
21
21
|
}, devices_1.devices.mdUp, exports.Title, exports.Title);
|
|
22
22
|
exports.HorizontalSmWrapper = styled_components_1.default.div(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n text-decoration: none;\n display: grid;\n grid-template-columns: auto 1fr auto;\n align-items: center;\n 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 height: 66px;\n padding-right: 0.5rem;\n"])));
|
|
23
|
-
exports.ImgWrapper = styled_components_1.default.div(templateObject_5 || (templateObject_5 = __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\n /* \u2705 layer stabilize */\n transform: translateZ(0);\n\n img {\n vertical-align: middle !important;\n display: block !important;\n object-fit: cover !important;\n border-radius:
|
|
23
|
+
exports.ImgWrapper = styled_components_1.default.div(templateObject_5 || (templateObject_5 = __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\n /* \u2705 layer stabilize */\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\n /* \u2705 layer stabilize */\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"); });
|
|
24
24
|
exports.TextWrapper = styled_components_1.default.div(templateObject_6 || (templateObject_6 = __makeTemplateObject(["\n padding-right: ", ";\n"], ["\n padding-right: ", ";\n"])), function (props) { return (props.$period ? "1rem" : "0.5rem"); });
|
|
25
25
|
exports.PriceContent = styled_components_1.default.div(templateObject_7 || (templateObject_7 = __makeTemplateObject(["\n ", "\n"], ["\n ", "\n"])), function (props) {
|
|
26
26
|
return (props === null || props === void 0 ? void 0 : props.$infoPosition) === "left"
|
|
@@ -27,6 +27,7 @@ export interface ProductCardHorizontalSm {
|
|
|
27
27
|
isDisabled?: boolean;
|
|
28
28
|
imageInnerWidth?: number;
|
|
29
29
|
imageInnerHeight?: number;
|
|
30
|
+
hasImageRounded?: boolean;
|
|
30
31
|
}
|
|
31
32
|
export interface ProductCardHorizontalSmStyledProps {
|
|
32
33
|
$period?: string;
|
|
@@ -40,6 +41,7 @@ export interface ProductCardHorizontalSmStyledProps {
|
|
|
40
41
|
$hasButtonRemoveMdDown?: boolean;
|
|
41
42
|
$hasBordeHover?: boolean;
|
|
42
43
|
$isDisabled?: boolean;
|
|
44
|
+
$hasImageRounded?: boolean;
|
|
43
45
|
}
|
|
44
46
|
export declare const ProductCardHorizontalSmDefault: ProductCardHorizontalSm;
|
|
45
47
|
export type ProductCardHorizontalSmProps = typeof ProductCardHorizontalSmDefault;
|
|
@@ -110,7 +110,7 @@ var SelectBox = (0, react_1.forwardRef)(function (_a, ref) {
|
|
|
110
110
|
// Add +N indicator if there are additional selections
|
|
111
111
|
var additionalCount = selectedValues.length - 1;
|
|
112
112
|
var additionalText = additionalCount > 0 ? " (+".concat(additionalCount, ")") : '';
|
|
113
|
-
return ((0, jsx_runtime_1.jsxs)("div", __assign({ className: "customSelect__multi-value" }, { children: [(0, jsx_runtime_1.jsxs)("div", __assign({ className: "customSelect__multi-value__label" }, { children: [(0, jsx_runtime_1.jsx)("span", { children: firstLabel }), (0, jsx_runtime_1.jsx)("span", { children: additionalText })] })), (0, jsx_runtime_1.jsx)("div", __assign({ className: "customSelect__multi-value__remove", onClick: function (e) {
|
|
113
|
+
return ((0, jsx_runtime_1.jsxs)("div", __assign({ className: "customSelect__multi-value" }, { children: [(0, jsx_runtime_1.jsxs)("div", __assign({ className: "customSelect__multi-value__label" }, { children: [(0, jsx_runtime_1.jsx)("span", { children: firstLabel }), additionalText && (0, jsx_runtime_1.jsx)("span", { children: additionalText })] })), (0, jsx_runtime_1.jsx)("div", __assign({ className: "customSelect__multi-value__remove", onClick: function (e) {
|
|
114
114
|
e.stopPropagation();
|
|
115
115
|
// Use onChange to clear all selections
|
|
116
116
|
if (selectProps.onChange) {
|
|
@@ -122,6 +122,30 @@ var SelectBox = (0, react_1.forwardRef)(function (_a, ref) {
|
|
|
122
122
|
var ValueContainer = function (props) {
|
|
123
123
|
return ((0, jsx_runtime_1.jsx)(react_select_1.components.ValueContainer, __assign({}, props, { children: props.children })));
|
|
124
124
|
};
|
|
125
|
+
// Helper function to extract string label from option for search/filtering
|
|
126
|
+
var getOptionLabel = function (option) {
|
|
127
|
+
var _a, _b, _c, _d, _e;
|
|
128
|
+
if (!option)
|
|
129
|
+
return '';
|
|
130
|
+
// If label is a React component, try to extract text or use a fallback
|
|
131
|
+
if (react_1.default.isValidElement(option.label)) {
|
|
132
|
+
// For React components, try to get text content or use value as fallback
|
|
133
|
+
return ((_a = option.value) === null || _a === void 0 ? void 0 : _a.toString()) || '';
|
|
134
|
+
}
|
|
135
|
+
if (react_1.default.isValidElement(option.optionLabel)) {
|
|
136
|
+
return ((_b = option.value) === null || _b === void 0 ? void 0 : _b.toString()) || '';
|
|
137
|
+
}
|
|
138
|
+
// Return string label or optionLabel
|
|
139
|
+
return ((_c = option.optionLabel) === null || _c === void 0 ? void 0 : _c.toString()) || ((_d = option.label) === null || _d === void 0 ? void 0 : _d.toString()) || ((_e = option.value) === null || _e === void 0 ? void 0 : _e.toString()) || '';
|
|
140
|
+
};
|
|
141
|
+
// Wrapper for filterOption to handle React component labels
|
|
142
|
+
var wrappedFilterOption = filterOption ? function (option, inputValue) {
|
|
143
|
+
// Create a normalized option with string labels for filtering
|
|
144
|
+
var normalizedOption = __assign(__assign({}, option), { label: getOptionLabel(option), optionLabel: typeof option.optionLabel === 'string' ? option.optionLabel : getOptionLabel(option) });
|
|
145
|
+
return filterOption(normalizedOption, inputValue);
|
|
146
|
+
} : undefined;
|
|
147
|
+
// Remove filterOption from other to avoid duplicate props
|
|
148
|
+
var _5 = other, _ = _5.filterOption, restOther = __rest(_5, ["filterOption"]);
|
|
125
149
|
return ((0, jsx_runtime_1.jsxs)(SelectBox_styled_1.Container, __assign({ "$width": width, "$hasError": hasError, "$maxOptionListHeight": maxOptionListHeight, "$hasShowDropdownIcon": hasShowDropdownIcon, "$MenuPlacement": menuPlacement, "$size": size, "$isMulti": isMulti, "$menuPosition": menuPosition }, { children: [label && ((0, jsx_runtime_1.jsx)("div", __assign({ className: "top" }, { children: (0, jsx_runtime_1.jsx)("label", __assign({ htmlFor: id }, { children: label })) }))), (0, jsx_runtime_1.jsx)("div", __assign({ className: "select" }, { children: isAsync ? ((0, jsx_runtime_1.jsx)(async_1.default, __assign({ components: {
|
|
126
150
|
Option: CustomOption,
|
|
127
151
|
Input: Input,
|
|
@@ -129,13 +153,13 @@ var SelectBox = (0, react_1.forwardRef)(function (_a, ref) {
|
|
|
129
153
|
MenuList: MenuList,
|
|
130
154
|
LoadingIndicator: LoadingIndicator,
|
|
131
155
|
MultiValue: MultiValue
|
|
132
|
-
}, options: options || [], instanceId: instanceId, filterOption:
|
|
156
|
+
}, options: options || [], instanceId: instanceId, getOptionLabel: getOptionLabel, filterOption: wrappedFilterOption, isSearchable: isSearchable, name: name, menuIsOpen: menuIsOpen, onChange: onChange, classNamePrefix: "customSelect", className: (0, classnames_1.default)("customSelect", (_b = {}, _b['isSearchable'] = isSearchable && hasShowSearchIcon, _b), (_c = {}, _c['lightBg'] = lightBg, _c)), placeholder: placeholder, noOptionsMessage: function () { return 'Sonuç bulunamadı'; }, loadingMessage: function () { return 'Sonuç bulunamadı'; }, captureMenuScroll: false, isClearable: isClearable, defaultValue: defaultValue, isMulti: isMulti, closeMenuOnSelect: !isMulti }, restOther, { ref: ref, id: id }))) : ((0, jsx_runtime_1.jsx)(react_select_1.default, __assign({ components: {
|
|
133
157
|
Option: CustomOption,
|
|
134
158
|
Input: Input,
|
|
135
159
|
DropdownIndicator: DropdownIndicator,
|
|
136
160
|
MenuList: MenuList,
|
|
137
161
|
LoadingIndicator: LoadingIndicator,
|
|
138
162
|
MultiValue: MultiValue
|
|
139
|
-
}, options: options || [], instanceId: instanceId, filterOption:
|
|
163
|
+
}, options: options || [], instanceId: instanceId, getOptionLabel: getOptionLabel, filterOption: wrappedFilterOption, isSearchable: isSearchable, name: name, menuIsOpen: menuIsOpen, onChange: onChange, classNamePrefix: "customSelect", className: (0, classnames_1.default)("customSelect", (_d = {}, _d['isSearchable'] = isSearchable && hasShowSearchIcon, _d), (_e = {}, _e['lightBg'] = lightBg, _e)), placeholder: placeholder, noOptionsMessage: function () { return 'Sonuç bulunamadı'; }, captureMenuScroll: false, isClearable: isClearable, defaultValue: defaultValue, isMulti: isMulti, closeMenuOnSelect: !isMulti, hideSelectedOptions: false }, restOther, { ref: ref, id: id }))) })), hasError && ((0, jsx_runtime_1.jsxs)("div", __assign({ className: "error" }, { children: [(0, jsx_runtime_1.jsx)(Icon_1.default, { name: "SwitchPassive" }), (0, jsx_runtime_1.jsx)("p", { children: errorMessage })] })))] })));
|
|
140
164
|
});
|
|
141
165
|
exports.default = SelectBox;
|
|
@@ -1,5 +1,21 @@
|
|
|
1
|
+
import React from "react";
|
|
1
2
|
export declare const sizes: string[];
|
|
2
3
|
type SIZES = typeof sizes[number];
|
|
4
|
+
export interface SelectBoxOption {
|
|
5
|
+
label?: string | React.ReactNode;
|
|
6
|
+
value?: any;
|
|
7
|
+
optionLabel?: string | React.ReactNode;
|
|
8
|
+
labelBottom?: string | React.ReactNode;
|
|
9
|
+
price?: string;
|
|
10
|
+
priceSm?: string;
|
|
11
|
+
period?: string;
|
|
12
|
+
isCustom?: boolean;
|
|
13
|
+
customContent?: React.ReactNode;
|
|
14
|
+
isFixedBottom?: boolean;
|
|
15
|
+
isDisabled?: boolean;
|
|
16
|
+
isHideSelected?: boolean;
|
|
17
|
+
[key: string]: any;
|
|
18
|
+
}
|
|
3
19
|
export interface SelectBox {
|
|
4
20
|
size?: SIZES;
|
|
5
21
|
isSearchable?: boolean;
|
|
@@ -9,10 +25,10 @@ export interface SelectBox {
|
|
|
9
25
|
name?: string;
|
|
10
26
|
placeholder?: string;
|
|
11
27
|
instanceId?: string;
|
|
12
|
-
options?:
|
|
28
|
+
options?: SelectBoxOption[];
|
|
13
29
|
lightBg?: boolean;
|
|
14
30
|
onChange?(): void;
|
|
15
|
-
filterOption?():
|
|
31
|
+
filterOption?(option: SelectBoxOption, inputValue: string): boolean;
|
|
16
32
|
hasError?: boolean;
|
|
17
33
|
isClearable?: boolean;
|
|
18
34
|
errorMessage?: string;
|
|
@@ -27,6 +27,6 @@ var ShoppingCartProduct = function (_a) {
|
|
|
27
27
|
return item.component ? ((0, jsx_runtime_1.jsx)(item.component, { children: children })) : ((0, jsx_runtime_1.jsx)("a", __assign({ href: item.slug }, { children: children })));
|
|
28
28
|
};
|
|
29
29
|
return ((0, jsx_runtime_1.jsxs)(ShoppingCartProduct_styled_1.ShoppingCartProductStyled, __assign({ "$discountRate": discountRate, "$hasDisableActions": hasDisableActions, "$hasInsurance": !hasLoading && toggleInsurance }, { children: [(0, jsx_runtime_1.jsxs)("div", __assign({ className: "inner" }, { children: [(0, jsx_runtime_1.jsx)("div", __assign({ className: "img" }, { children: (0, jsx_runtime_1.jsx)(LinkComponent, __assign({ item: { component: component, slug: slug } }, { children: image })) })), (0, jsx_runtime_1.jsx)("div", __assign({ className: "text" }, { children: (0, jsx_runtime_1.jsxs)(LinkComponent, __assign({ item: { component: component, slug: slug } }, { children: [(0, jsx_runtime_1.jsx)("strong", __assign({ className: "productCardTitle" }, { children: title })), (0, jsx_runtime_1.jsxs)("div", __assign({ className: "productCardPriceContent" }, { children: [discountRate > 0 && (0, jsx_runtime_1.jsxs)("div", __assign({ className: "discountRate" }, { children: ["%", discountRate] })), (0, jsx_runtime_1.jsxs)("div", { children: [oldPrice && ((0, jsx_runtime_1.jsxs)("div", __assign({ className: "oldPrice" }, { children: [(0, jsx_runtime_1.jsxs)("div", __assign({ className: "price" }, { children: [oldPrice, oldPriceSm && (0, jsx_runtime_1.jsx)("small", { children: oldPriceSm })] })), oldPricePeriod && (0, jsx_runtime_1.jsx)("div", __assign({ className: "period" }, { children: "/".concat(oldPricePeriod) }))] }))), (0, jsx_runtime_1.jsxs)("div", __assign({ className: "newPrice" }, { children: [(0, jsx_runtime_1.jsxs)("div", __assign({ className: "price" }, { children: [price, priceSm && (0, jsx_runtime_1.jsx)("small", { children: priceSm })] })), period && (0, jsx_runtime_1.jsx)("div", __assign({ className: "period" }, { children: "/".concat(period) }))] }))] })] })), (0, jsx_runtime_1.jsxs)("p", __assign({ className: "productCardDeliveryText" }, { children: [deliveryDangerText &&
|
|
30
|
-
(0, jsx_runtime_1.jsx)("span", __assign({ className: "productCardDeliveryDanger" }, { children: deliveryDangerText })), deliveryText] }))] })) })), (0, jsx_runtime_1.jsxs)("div", __assign({ className: "actions" }, { children: [!hasDisableActions && ((0, jsx_runtime_1.jsxs)(ShoppingCartProduct_styled_1.ActionButton, __assign({ disabled: hasLoading || hasError || hasDisableIncrement, onClick: onIncrement, className: "actionButton" }, { children: [(0, jsx_runtime_1.jsx)(Icon_1.default, { name: "PlusSmall" }), hasError && (0, jsx_runtime_1.jsx)("div",
|
|
30
|
+
(0, jsx_runtime_1.jsx)("span", __assign({ className: "productCardDeliveryDanger" }, { children: deliveryDangerText })), deliveryText] }))] })) })), (0, jsx_runtime_1.jsxs)("div", __assign({ className: "actions" }, { children: [!hasDisableActions && ((0, jsx_runtime_1.jsxs)(ShoppingCartProduct_styled_1.ActionButton, __assign({ disabled: hasLoading || hasError || hasDisableIncrement, onClick: onIncrement, className: "actionButton" }, { children: [(0, jsx_runtime_1.jsx)(Icon_1.default, { name: "PlusSmall" }), hasError && (0, jsx_runtime_1.jsx)("div", { className: "popup", dangerouslySetInnerHTML: { __html: errorText } })] }))), (0, jsx_runtime_1.jsx)("div", __assign({ className: "quantity" }, { children: hasLoading ? (0, jsx_runtime_1.jsx)(Loader_1.default, { variant: "primary", width: "16px", height: "16px" }) : quantity })), !hasDisableActions && (hasRemove ? ((0, jsx_runtime_1.jsx)(ShoppingCartProduct_styled_1.ActionButton, __assign({ disabled: hasLoading, onClick: onRemove, className: "actionButton" }, { children: (0, jsx_runtime_1.jsx)(Icon_1.default, { name: "DeleteSmall" }) }))) : ((0, jsx_runtime_1.jsx)(ShoppingCartProduct_styled_1.ActionButton, __assign({ disabled: hasLoading, onClick: onDecrement, className: "actionButton" }, { children: (0, jsx_runtime_1.jsx)(Icon_1.default, { name: "NegativeSmall" }) }))))] }))] })), hasInsurance && ((0, jsx_runtime_1.jsxs)("div", __assign({ className: "insurance" }, { children: [(0, jsx_runtime_1.jsx)("div", __assign({ className: "insuranceImg", onClick: !hasLoading ? toggleInsuranceLogo : undefined }, { children: (0, jsx_runtime_1.jsx)(Icon_1.default, { color: "var(--primary)", name: "Tamamlarsin", width: "80px", height: "9.14px" }) })), (0, jsx_runtime_1.jsxs)("div", __assign({ onClick: !hasLoading ? toggleInsurance : undefined, className: "insuranceContent" }, { children: [(0, jsx_runtime_1.jsxs)("div", __assign({ className: "text" }, { children: [insuranceText, insurancePrice && (0, jsx_runtime_1.jsx)("p", __assign({ className: "price" }, { children: hasInsuranceLoading ? (0, jsx_runtime_1.jsx)(Loader_1.default, { type: "wave", variant: "primary" }) : (0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("b", { dangerouslySetInnerHTML: { __html: insurancePrice } }), (0, jsx_runtime_1.jsx)("span", __assign({ className: "quantity" }, { children: insuranceQuantity }))] }) }))] })), hasInsuranceActions && ((0, jsx_runtime_1.jsx)("div", __assign({ className: "actions" }, { children: hasInsuranceTooltip ? ((0, jsx_runtime_1.jsx)(Tooltip_1.default, __assign({ popupRight: "-16px", hasClickAction: hasInsuranceTooltipClickAction, popupWidth: insuranceTooltipWidth, position: "bottomRight" }, { children: insuranceTooltipText }))) : (hasInsurancePriceAdded ? ((0, jsx_runtime_1.jsx)(ShoppingCartProduct_styled_1.ActionButton, __assign({ "$hasShadow": true, disabled: hasLoading, className: "actionButton" }, { children: (0, jsx_runtime_1.jsx)(Icon_1.default, { name: "DeleteSmall" }) }))) : ((0, jsx_runtime_1.jsx)(ShoppingCartProduct_styled_1.ActionButton, __assign({ "$hasShadow": true, disabled: hasLoading, className: "actionButton" }, { children: (0, jsx_runtime_1.jsx)(Icon_1.default, { name: "PlusSmall" }) })))) })))] }))] })))] })));
|
|
31
31
|
};
|
|
32
32
|
exports.default = ShoppingCartProduct;
|