krl-alfred 2.17.30 → 2.17.32

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.
@@ -1,3 +1,3 @@
1
1
  import React from "react";
2
- declare const _default: React.MemoExoticComponent<({ title, description, hasDiscount, price, oldPrice, oldPricePeriod, slug, period, discountRate, isResponsive, image, hasCustomBadge, customBadge, hasNewImageType, hasOutOfStock, hasBeltBadge, beltBadgeVariant, beltBadgeTitle, imageInfoText, ...other }: import("./props").ProductCardVertical) => import("react/jsx-runtime").JSX.Element>;
2
+ declare const _default: React.MemoExoticComponent<({ title, description, hasDiscount, price, oldPrice, oldPricePeriod, slug, period, discountRate, isResponsive, image, hasCustomBadge, customBadge, hasNewImageType, hasOutOfStock, hasBeltBadge, beltBadgeVariant, beltBadgeTitle, imageInfoText, imageInfoTextVariant, ...other }: import("./props").ProductCardVertical) => import("react/jsx-runtime").JSX.Element>;
3
3
  export default _default;
@@ -32,8 +32,8 @@ var ProductCardVertical_styled_1 = require("./ProductCardVertical.styled");
32
32
  var react_i18next_1 = require("react-i18next");
33
33
  var Badges_1 = __importDefault(require("../Badges"));
34
34
  var ProductCardVertical = function (_a) {
35
- var _b = _a.title, title = _b === void 0 ? props_1.ProductCardVerticalDefault.title : _b, _c = _a.description, description = _c === void 0 ? props_1.ProductCardVerticalDefault.description : _c, _d = _a.hasDiscount, hasDiscount = _d === void 0 ? props_1.ProductCardVerticalDefault.hasDiscount : _d, _e = _a.price, price = _e === void 0 ? props_1.ProductCardVerticalDefault.price : _e, _f = _a.oldPrice, oldPrice = _f === void 0 ? props_1.ProductCardVerticalDefault.oldPrice : _f, _g = _a.oldPricePeriod, oldPricePeriod = _g === void 0 ? props_1.ProductCardVerticalDefault.oldPricePeriod : _g, _h = _a.slug, slug = _h === void 0 ? props_1.ProductCardVerticalDefault.slug : _h, _j = _a.period, period = _j === void 0 ? props_1.ProductCardVerticalDefault.period : _j, _k = _a.discountRate, discountRate = _k === void 0 ? props_1.ProductCardVerticalDefault.discountRate : _k, _l = _a.isResponsive, isResponsive = _l === void 0 ? props_1.ProductCardVerticalDefault.isResponsive : _l, _m = _a.image, image = _m === void 0 ? props_1.ProductCardVerticalDefault.image : _m, _o = _a.hasCustomBadge, hasCustomBadge = _o === void 0 ? props_1.ProductCardVerticalDefault.hasCustomBadge : _o, _p = _a.customBadge, customBadge = _p === void 0 ? props_1.ProductCardVerticalDefault.customBadge : _p, _q = _a.hasNewImageType, hasNewImageType = _q === void 0 ? props_1.ProductCardVerticalDefault.hasNewImageType : _q, _r = _a.hasOutOfStock, hasOutOfStock = _r === void 0 ? props_1.ProductCardVerticalDefault.hasOutOfStock : _r, _s = _a.hasBeltBadge, hasBeltBadge = _s === void 0 ? props_1.ProductCardVerticalDefault.hasBeltBadge : _s, _t = _a.beltBadgeVariant, beltBadgeVariant = _t === void 0 ? props_1.ProductCardVerticalDefault.beltBadgeVariant : _t, _u = _a.beltBadgeTitle, beltBadgeTitle = _u === void 0 ? props_1.ProductCardVerticalDefault.beltBadgeTitle : _u, _v = _a.imageInfoText, imageInfoText = _v === void 0 ? props_1.ProductCardVerticalDefault.imageInfoText : _v, other = __rest(_a, ["title", "description", "hasDiscount", "price", "oldPrice", "oldPricePeriod", "slug", "period", "discountRate", "isResponsive", "image", "hasCustomBadge", "customBadge", "hasNewImageType", "hasOutOfStock", "hasBeltBadge", "beltBadgeVariant", "beltBadgeTitle", "imageInfoText"]);
35
+ var _b = _a.title, title = _b === void 0 ? props_1.ProductCardVerticalDefault.title : _b, _c = _a.description, description = _c === void 0 ? props_1.ProductCardVerticalDefault.description : _c, _d = _a.hasDiscount, hasDiscount = _d === void 0 ? props_1.ProductCardVerticalDefault.hasDiscount : _d, _e = _a.price, price = _e === void 0 ? props_1.ProductCardVerticalDefault.price : _e, _f = _a.oldPrice, oldPrice = _f === void 0 ? props_1.ProductCardVerticalDefault.oldPrice : _f, _g = _a.oldPricePeriod, oldPricePeriod = _g === void 0 ? props_1.ProductCardVerticalDefault.oldPricePeriod : _g, _h = _a.slug, slug = _h === void 0 ? props_1.ProductCardVerticalDefault.slug : _h, _j = _a.period, period = _j === void 0 ? props_1.ProductCardVerticalDefault.period : _j, _k = _a.discountRate, discountRate = _k === void 0 ? props_1.ProductCardVerticalDefault.discountRate : _k, _l = _a.isResponsive, isResponsive = _l === void 0 ? props_1.ProductCardVerticalDefault.isResponsive : _l, _m = _a.image, image = _m === void 0 ? props_1.ProductCardVerticalDefault.image : _m, _o = _a.hasCustomBadge, hasCustomBadge = _o === void 0 ? props_1.ProductCardVerticalDefault.hasCustomBadge : _o, _p = _a.customBadge, customBadge = _p === void 0 ? props_1.ProductCardVerticalDefault.customBadge : _p, _q = _a.hasNewImageType, hasNewImageType = _q === void 0 ? props_1.ProductCardVerticalDefault.hasNewImageType : _q, _r = _a.hasOutOfStock, hasOutOfStock = _r === void 0 ? props_1.ProductCardVerticalDefault.hasOutOfStock : _r, _s = _a.hasBeltBadge, hasBeltBadge = _s === void 0 ? props_1.ProductCardVerticalDefault.hasBeltBadge : _s, _t = _a.beltBadgeVariant, beltBadgeVariant = _t === void 0 ? props_1.ProductCardVerticalDefault.beltBadgeVariant : _t, _u = _a.beltBadgeTitle, beltBadgeTitle = _u === void 0 ? props_1.ProductCardVerticalDefault.beltBadgeTitle : _u, _v = _a.imageInfoText, imageInfoText = _v === void 0 ? props_1.ProductCardVerticalDefault.imageInfoText : _v, _w = _a.imageInfoTextVariant, imageInfoTextVariant = _w === void 0 ? props_1.ProductCardVerticalDefault.imageInfoTextVariant : _w, other = __rest(_a, ["title", "description", "hasDiscount", "price", "oldPrice", "oldPricePeriod", "slug", "period", "discountRate", "isResponsive", "image", "hasCustomBadge", "customBadge", "hasNewImageType", "hasOutOfStock", "hasBeltBadge", "beltBadgeVariant", "beltBadgeTitle", "imageInfoText", "imageInfoTextVariant"]);
36
36
  var t = (0, react_i18next_1.useTranslation)().t;
37
- return ((0, jsx_runtime_1.jsx)(ProductCardVertical_styled_1.ProductCardVerticalStyled, __assign({ "$isResponsive": isResponsive, "$discountRate": discountRate, "$hasNewImageType": hasNewImageType, "$hasOutOfStock": hasOutOfStock }, { children: (0, jsx_runtime_1.jsxs)("div", { children: [hasBeltBadge && !hasCustomBadge && (0, jsx_runtime_1.jsx)("div", __assign({ className: "cartBadge" }, { children: (0, jsx_runtime_1.jsx)(Badges_1.default, { variant: beltBadgeVariant, size: "medium", left: (isResponsive ? '16px' : '8px'), top: (isResponsive ? '16px' : '8px'), title: beltBadgeTitle }) })), hasCustomBadge && (0, jsx_runtime_1.jsx)("div", __assign({ className: "cartBadge hasInset" }, { children: customBadge })), (0, jsx_runtime_1.jsxs)("div", __assign({ className: "img" }, { children: [image, hasOutOfStock && (0, jsx_runtime_1.jsx)("div", __assign({ className: "outOfStock" }, { children: (0, jsx_runtime_1.jsx)(Badges_1.default, { layout: "text", variant: "light", title: t("ALL_RENTED") }) })), imageInfoText && (0, jsx_runtime_1.jsx)("div", { className: "imageInfoText", dangerouslySetInnerHTML: { __html: imageInfoText } })] })), (0, jsx_runtime_1.jsxs)("div", __assign({ className: "productCardContent" }, { children: [(0, jsx_runtime_1.jsx)("strong", __assign({ className: "productCardTitle" }, { children: title })), (0, jsx_runtime_1.jsx)("p", __assign({ className: "productCardDescription" }, { children: description })), (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 && discountRate > 0 && ((0, jsx_runtime_1.jsxs)("div", __assign({ className: "oldPrice" }, { children: [(0, jsx_runtime_1.jsx)("div", __assign({ className: "price" }, { children: oldPrice })), (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.jsx)("div", __assign({ className: "price" }, { children: price })), (0, jsx_runtime_1.jsx)("div", __assign({ className: "period" }, { children: "/".concat(period) }))] }))] })] }))] }))] }) })));
37
+ return ((0, jsx_runtime_1.jsx)(ProductCardVertical_styled_1.ProductCardVerticalStyled, __assign({ "$isResponsive": isResponsive, "$discountRate": discountRate, "$hasNewImageType": hasNewImageType, "$hasOutOfStock": hasOutOfStock, "$imageInfoTextVariant": imageInfoTextVariant }, { children: (0, jsx_runtime_1.jsxs)("div", { children: [hasBeltBadge && !hasCustomBadge && (0, jsx_runtime_1.jsx)("div", __assign({ className: "cartBadge" }, { children: (0, jsx_runtime_1.jsx)(Badges_1.default, { variant: beltBadgeVariant, size: "medium", left: (isResponsive ? '16px' : '8px'), top: (isResponsive ? '16px' : '8px'), title: beltBadgeTitle }) })), hasCustomBadge && (0, jsx_runtime_1.jsx)("div", __assign({ className: "cartBadge hasInset" }, { children: customBadge })), (0, jsx_runtime_1.jsxs)("div", __assign({ className: "img" }, { children: [image, hasOutOfStock && (0, jsx_runtime_1.jsx)("div", __assign({ className: "outOfStock" }, { children: (0, jsx_runtime_1.jsx)(Badges_1.default, { layout: "text", variant: "light", title: t("ALL_RENTED") }) })), imageInfoText && (0, jsx_runtime_1.jsx)("div", { className: "imageInfoText", dangerouslySetInnerHTML: { __html: imageInfoText } })] })), (0, jsx_runtime_1.jsxs)("div", __assign({ className: "productCardContent" }, { children: [(0, jsx_runtime_1.jsx)("strong", __assign({ className: "productCardTitle" }, { children: title })), (0, jsx_runtime_1.jsx)("p", __assign({ className: "productCardDescription" }, { children: description })), (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 && discountRate > 0 && ((0, jsx_runtime_1.jsxs)("div", __assign({ className: "oldPrice" }, { children: [(0, jsx_runtime_1.jsx)("div", __assign({ className: "price" }, { children: oldPrice })), (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.jsx)("div", __assign({ className: "price" }, { children: price })), (0, jsx_runtime_1.jsx)("div", __assign({ className: "period" }, { children: "/".concat(period) }))] }))] })] }))] }))] }) })));
38
38
  };
39
39
  exports.default = (0, react_1.memo)(ProductCardVertical);
@@ -10,5 +10,5 @@ Object.defineProperty(exports, "__esModule", { value: true });
10
10
  exports.ProductCardVerticalStyled = void 0;
11
11
  var styled_components_1 = __importDefault(require("styled-components"));
12
12
  var devices_1 = require("../../constants/devices");
13
- exports.ProductCardVerticalStyled = styled_components_1.default.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n box-shadow: 0 6px 30px 0 var(--box-shadow-color);\n border-radius: 0.5rem;\n min-width: 240px;\n padding: 1rem;\n transition: all .2s ease;\n position: relative;\n box-sizing: border-box;\n background-color: white;\n .cartBadge {\n position: absolute;\n left: 8px;\n top: 8px;\n z-index: 2;\n\n &:is(.hasInset) {\n left: 7px;\n top: 0;\n }\n }\n\n a {\n text-decoration: none;\n color: inherit;\n }\n\n &:hover {\n box-shadow: 0 4px 15px 0 var(--dark-shadow-color);\n }\n\n .img {\n border-radius: 0.5rem;\n border: 1px solid var(--dark-opacity-5);\n background: #FFF;\n position: relative;\n overflow: hidden;\n height: 150px;\n box-sizing: border-box;\n z-index: 1;\n text-align: center;\n padding: 0.5rem;\n ", "\n .outOfStock{\n width: 100% !important;\n height: 100% !important;\n background-color: #BABBC280;\n > div{\n height: 17px !important;\n aspect-ratio: initial !important;\n }\n }\n .imageInfoText{\n position: absolute;\n bottom: 0;\n left: 0;\n top:auto !important;\n width: 100%;\n height: 24px !important;\n align-items: center;\n justify-content: center;\n display: flex;\n background-color: var(--primary-opacity-10);\n border-radius: 0;\n top: auto;\n transform: none;\n aspect-ratio: initial !important;\n font:var(--caption-semi-bold-10-12);\n color: var(--primary);\n strong{\n font:var(--caption-bold-10-12);\n height: auto !important;\n aspect-ratio: initial !important;\n margin-right: 2px;\n }\n }\n }\n\n .productCardContent {\n padding: 1rem 0 0.5rem 0;\n\n .productCardTitle {\n display: block;\n color: ", ";\n display: -webkit-box;\n -webkit-line-clamp: 2;\n -webkit-box-orient: vertical;\n overflow: hidden;\n height: 38px;\n word-break: break-word;\n font: var(--title-bold-16-19);\n }\n\n .productCardDescription {\n display: block;\n margin-top: 0.5rem;\n color: var(--grey-40);\n margin-bottom: 1.5rem;\n display: -webkit-box;\n -webkit-line-clamp: 2;\n -webkit-box-orient: vertical;\n overflow: hidden;\n height: 34px;\n word-break: break-word;\n font: var(--body-medium-14-17);\n }\n\n .productCardPriceContent {\n display: grid;\n align-items: ", ";\n justify-content: flex-start;\n height: 36px;\n grid-template-columns: ", ";\n color: ", ";\n .discountRate {\n margin-right: 0.5rem;\n width: 48px;\n height: 36px;\n border-radius: 0.5rem;\n background-color: var(--primary-opacity-10);\n color: var(--primary);\n display: flex;\n align-items: center;\n justify-content: center;\n font: var(--body-extra-bold-13-16);\n }\n\n .oldPrice, .newPrice {\n display: flex;\n align-items: end;\n justify-content: flex-start;\n\n .price {\n margin-right: 4px;\n }\n }\n\n .oldPrice {\n color: var(--dark-opacity-25);\n margin-bottom: 2px;\n\n .price, .period {\n text-decoration: line-through;\n }\n\n .price {\n font: var(--caption-semi-bold-12-15);\n }\n\n .period {\n font: var(--caption-regular-12-15);\n }\n }\n\n .newPrice {\n .price {\n font: var(--body-extra-bold-14-17);\n }\n\n .period {\n font: var(--body-regular-13-16);\n }\n }\n }\n }\n\n ", "\n"], ["\n box-shadow: 0 6px 30px 0 var(--box-shadow-color);\n border-radius: 0.5rem;\n min-width: 240px;\n padding: 1rem;\n transition: all .2s ease;\n position: relative;\n box-sizing: border-box;\n background-color: white;\n .cartBadge {\n position: absolute;\n left: 8px;\n top: 8px;\n z-index: 2;\n\n &:is(.hasInset) {\n left: 7px;\n top: 0;\n }\n }\n\n a {\n text-decoration: none;\n color: inherit;\n }\n\n &:hover {\n box-shadow: 0 4px 15px 0 var(--dark-shadow-color);\n }\n\n .img {\n border-radius: 0.5rem;\n border: 1px solid var(--dark-opacity-5);\n background: #FFF;\n position: relative;\n overflow: hidden;\n height: 150px;\n box-sizing: border-box;\n z-index: 1;\n text-align: center;\n padding: 0.5rem;\n ", "\n .outOfStock{\n width: 100% !important;\n height: 100% !important;\n background-color: #BABBC280;\n > div{\n height: 17px !important;\n aspect-ratio: initial !important;\n }\n }\n .imageInfoText{\n position: absolute;\n bottom: 0;\n left: 0;\n top:auto !important;\n width: 100%;\n height: 24px !important;\n align-items: center;\n justify-content: center;\n display: flex;\n background-color: var(--primary-opacity-10);\n border-radius: 0;\n top: auto;\n transform: none;\n aspect-ratio: initial !important;\n font:var(--caption-semi-bold-10-12);\n color: var(--primary);\n strong{\n font:var(--caption-bold-10-12);\n height: auto !important;\n aspect-ratio: initial !important;\n margin-right: 2px;\n }\n }\n }\n\n .productCardContent {\n padding: 1rem 0 0.5rem 0;\n\n .productCardTitle {\n display: block;\n color: ", ";\n display: -webkit-box;\n -webkit-line-clamp: 2;\n -webkit-box-orient: vertical;\n overflow: hidden;\n height: 38px;\n word-break: break-word;\n font: var(--title-bold-16-19);\n }\n\n .productCardDescription {\n display: block;\n margin-top: 0.5rem;\n color: var(--grey-40);\n margin-bottom: 1.5rem;\n display: -webkit-box;\n -webkit-line-clamp: 2;\n -webkit-box-orient: vertical;\n overflow: hidden;\n height: 34px;\n word-break: break-word;\n font: var(--body-medium-14-17);\n }\n\n .productCardPriceContent {\n display: grid;\n align-items: ", ";\n justify-content: flex-start;\n height: 36px;\n grid-template-columns: ", ";\n color: ", ";\n .discountRate {\n margin-right: 0.5rem;\n width: 48px;\n height: 36px;\n border-radius: 0.5rem;\n background-color: var(--primary-opacity-10);\n color: var(--primary);\n display: flex;\n align-items: center;\n justify-content: center;\n font: var(--body-extra-bold-13-16);\n }\n\n .oldPrice, .newPrice {\n display: flex;\n align-items: end;\n justify-content: flex-start;\n\n .price {\n margin-right: 4px;\n }\n }\n\n .oldPrice {\n color: var(--dark-opacity-25);\n margin-bottom: 2px;\n\n .price, .period {\n text-decoration: line-through;\n }\n\n .price {\n font: var(--caption-semi-bold-12-15);\n }\n\n .period {\n font: var(--caption-regular-12-15);\n }\n }\n\n .newPrice {\n .price {\n font: var(--body-extra-bold-14-17);\n }\n\n .period {\n font: var(--body-regular-13-16);\n }\n }\n }\n }\n\n ", "\n"])), function (props) { return props.$hasNewImageType ? "\n *{\n height: 100% !important;\n object-fit: contain;\n max-width: 100%;\n }\n " : "\n > * {\n width: 100%;\n position: absolute;\n left: 50%;\n top: 50%;\n transform: translate(-50%,-50%);\n display: flex;\n align-items: center;\n justify-content: center;\n }\n *{ \n height: calc(100% - 0.5rem) !important;\n aspect-ratio: 1 / 1 !important;\n }\n "; }, function (props) { return props.$hasOutOfStock ? "var(--dark-opacity-50)" : "var(--dark)"; }, function (props) { return props.$discountRate ? 'center' : 'end'; }, function (props) { return props.$discountRate ? 'auto 1fr' : '1fr'; }, function (props) { return props.$hasOutOfStock ? "var(--dark-opacity-50)" : "var(--dark)"; }, function (props) { return props.$isResponsive && "\n @media only screen and ".concat(devices_1.devices.sm, " {\n padding: 1.5rem;\n .cartBadge{\n left: 16px;\n top: 16px;\n &:is(.hasInset){\n left: 15px;\n top: 8px;\n }\n }\n .img {\n height: 215px;\n .imageInfoText{\n font:var(--body-semi-bold-13-16);\n height: 32px !important;\n strong{\n font:var(--body-bold-13-16);\n }\n }\n }\n .productCardContent{\n padding: 1.5rem 0 0.5rem 0;\n .productCardTitle{\n height: 44px;\n font: var(--headline-bold-18-22);\n }\n .productCardDescription{\n margin-bottom: 1.5rem;\n height: 37px;\n font: var(--title-medium-16-19);\n }\n .productCardPriceContent{\n height: 48px;\n .discountRate{\n width: 65px;\n height: 48px;\n font: var(--title-extra-bold-16-19);\n }\n \n .oldPrice {\n .price{\n font: var(--body-semi-bold-13-16);\n }\n }\n .newPrice {\n .price{\n font: var(--title-extra-bold-16-19);\n }\n .period{\n font: var(--body-regular-14-17);\n }\n }\n }\n }\n }\n "); });
13
+ exports.ProductCardVerticalStyled = styled_components_1.default.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n box-shadow: 0 6px 30px 0 var(--box-shadow-color);\n border-radius: 0.5rem;\n min-width: 240px;\n padding: 1rem;\n transition: all .2s ease;\n position: relative;\n box-sizing: border-box;\n background-color: white;\n .cartBadge {\n position: absolute;\n left: 8px;\n top: 8px;\n z-index: 2;\n\n &:is(.hasInset) {\n left: 7px;\n top: 0;\n }\n }\n\n a {\n text-decoration: none;\n color: inherit;\n }\n\n &:hover {\n box-shadow: 0 4px 15px 0 var(--dark-shadow-color);\n }\n\n .img {\n border-radius: 0.5rem;\n border: 1px solid var(--dark-opacity-5);\n background: #FFF;\n position: relative;\n overflow: hidden;\n height: 150px;\n box-sizing: border-box;\n z-index: 1;\n text-align: center;\n padding: 0.5rem;\n ", "\n .outOfStock{\n width: 100% !important;\n height: 100% !important;\n background-color: #BABBC280;\n > div{\n height: 17px !important;\n aspect-ratio: initial !important;\n }\n }\n .imageInfoText{\n position: absolute;\n bottom: 0;\n left: 0;\n top:auto !important;\n width: 100%;\n height: 24px !important;\n align-items: center;\n justify-content: center;\n display: flex;\n ", "\n border-radius: 0;\n top: auto;\n transform: none;\n aspect-ratio: initial !important;\n font:var(--caption-semi-bold-10-12); \n strong{\n font:var(--caption-bold-10-12);\n height: auto !important;\n aspect-ratio: initial !important;\n margin-right: 2px;\n }\n }\n }\n\n .productCardContent {\n padding: 1rem 0 0.5rem 0;\n\n .productCardTitle {\n display: block;\n color: ", ";\n display: -webkit-box;\n -webkit-line-clamp: 2;\n -webkit-box-orient: vertical;\n overflow: hidden;\n height: 38px;\n word-break: break-word;\n font: var(--title-bold-16-19);\n }\n\n .productCardDescription {\n display: block;\n margin-top: 0.5rem;\n color: var(--grey-40);\n margin-bottom: 1.5rem;\n display: -webkit-box;\n -webkit-line-clamp: 2;\n -webkit-box-orient: vertical;\n overflow: hidden;\n height: 34px;\n word-break: break-word;\n font: var(--body-medium-14-17);\n }\n\n .productCardPriceContent {\n display: grid;\n align-items: ", ";\n justify-content: flex-start;\n height: 36px;\n grid-template-columns: ", ";\n color: ", ";\n .discountRate {\n margin-right: 0.5rem;\n width: 48px;\n height: 36px;\n border-radius: 0.5rem;\n background-color: var(--primary-opacity-10);\n color: var(--primary);\n display: flex;\n align-items: center;\n justify-content: center;\n font: var(--body-extra-bold-13-16);\n }\n\n .oldPrice, .newPrice {\n display: flex;\n align-items: end;\n justify-content: flex-start;\n\n .price {\n margin-right: 4px;\n }\n }\n\n .oldPrice {\n color: var(--dark-opacity-25);\n margin-bottom: 2px;\n\n .price, .period {\n text-decoration: line-through;\n }\n\n .price {\n font: var(--caption-semi-bold-12-15);\n }\n\n .period {\n font: var(--caption-regular-12-15);\n }\n }\n\n .newPrice {\n .price {\n font: var(--body-extra-bold-14-17);\n }\n\n .period {\n font: var(--body-regular-13-16);\n }\n }\n }\n }\n\n ", "\n"], ["\n box-shadow: 0 6px 30px 0 var(--box-shadow-color);\n border-radius: 0.5rem;\n min-width: 240px;\n padding: 1rem;\n transition: all .2s ease;\n position: relative;\n box-sizing: border-box;\n background-color: white;\n .cartBadge {\n position: absolute;\n left: 8px;\n top: 8px;\n z-index: 2;\n\n &:is(.hasInset) {\n left: 7px;\n top: 0;\n }\n }\n\n a {\n text-decoration: none;\n color: inherit;\n }\n\n &:hover {\n box-shadow: 0 4px 15px 0 var(--dark-shadow-color);\n }\n\n .img {\n border-radius: 0.5rem;\n border: 1px solid var(--dark-opacity-5);\n background: #FFF;\n position: relative;\n overflow: hidden;\n height: 150px;\n box-sizing: border-box;\n z-index: 1;\n text-align: center;\n padding: 0.5rem;\n ", "\n .outOfStock{\n width: 100% !important;\n height: 100% !important;\n background-color: #BABBC280;\n > div{\n height: 17px !important;\n aspect-ratio: initial !important;\n }\n }\n .imageInfoText{\n position: absolute;\n bottom: 0;\n left: 0;\n top:auto !important;\n width: 100%;\n height: 24px !important;\n align-items: center;\n justify-content: center;\n display: flex;\n ", "\n border-radius: 0;\n top: auto;\n transform: none;\n aspect-ratio: initial !important;\n font:var(--caption-semi-bold-10-12); \n strong{\n font:var(--caption-bold-10-12);\n height: auto !important;\n aspect-ratio: initial !important;\n margin-right: 2px;\n }\n }\n }\n\n .productCardContent {\n padding: 1rem 0 0.5rem 0;\n\n .productCardTitle {\n display: block;\n color: ", ";\n display: -webkit-box;\n -webkit-line-clamp: 2;\n -webkit-box-orient: vertical;\n overflow: hidden;\n height: 38px;\n word-break: break-word;\n font: var(--title-bold-16-19);\n }\n\n .productCardDescription {\n display: block;\n margin-top: 0.5rem;\n color: var(--grey-40);\n margin-bottom: 1.5rem;\n display: -webkit-box;\n -webkit-line-clamp: 2;\n -webkit-box-orient: vertical;\n overflow: hidden;\n height: 34px;\n word-break: break-word;\n font: var(--body-medium-14-17);\n }\n\n .productCardPriceContent {\n display: grid;\n align-items: ", ";\n justify-content: flex-start;\n height: 36px;\n grid-template-columns: ", ";\n color: ", ";\n .discountRate {\n margin-right: 0.5rem;\n width: 48px;\n height: 36px;\n border-radius: 0.5rem;\n background-color: var(--primary-opacity-10);\n color: var(--primary);\n display: flex;\n align-items: center;\n justify-content: center;\n font: var(--body-extra-bold-13-16);\n }\n\n .oldPrice, .newPrice {\n display: flex;\n align-items: end;\n justify-content: flex-start;\n\n .price {\n margin-right: 4px;\n }\n }\n\n .oldPrice {\n color: var(--dark-opacity-25);\n margin-bottom: 2px;\n\n .price, .period {\n text-decoration: line-through;\n }\n\n .price {\n font: var(--caption-semi-bold-12-15);\n }\n\n .period {\n font: var(--caption-regular-12-15);\n }\n }\n\n .newPrice {\n .price {\n font: var(--body-extra-bold-14-17);\n }\n\n .period {\n font: var(--body-regular-13-16);\n }\n }\n }\n }\n\n ", "\n"])), function (props) { return props.$hasNewImageType ? "\n *{\n height: 100% !important;\n object-fit: contain;\n max-width: 100%;\n }\n " : "\n > * {\n width: 100%;\n position: absolute;\n left: 50%;\n top: 50%;\n transform: translate(-50%,-50%);\n display: flex;\n align-items: center;\n justify-content: center;\n }\n *{ \n height: calc(100% - 0.5rem) !important;\n aspect-ratio: 1 / 1 !important;\n }\n "; }, function (props) { return props.$imageInfoTextVariant === "secondary" ? "\n background-color: var(--primary-opacity-10);\n color: var(--primary);\n " : "\n background: linear-gradient(360deg, #411590 0%, #9760FC 100%);\n color: white;\n "; }, function (props) { return props.$hasOutOfStock ? "var(--dark-opacity-50)" : "var(--dark)"; }, function (props) { return props.$discountRate ? 'center' : 'end'; }, function (props) { return props.$discountRate ? 'auto 1fr' : '1fr'; }, function (props) { return props.$hasOutOfStock ? "var(--dark-opacity-50)" : "var(--dark)"; }, function (props) { return props.$isResponsive && "\n @media only screen and ".concat(devices_1.devices.sm, " {\n padding: 1.5rem;\n .cartBadge{\n left: 16px;\n top: 16px;\n &:is(.hasInset){\n left: 15px;\n top: 8px;\n }\n }\n .img {\n height: 215px;\n .imageInfoText{\n font:var(--body-semi-bold-13-16);\n height: 32px !important;\n strong{\n font:var(--body-bold-13-16);\n }\n }\n }\n .productCardContent{\n padding: 1.5rem 0 0.5rem 0;\n .productCardTitle{\n height: 44px;\n font: var(--headline-bold-18-22);\n }\n .productCardDescription{\n margin-bottom: 1.5rem;\n height: 37px;\n font: var(--title-medium-16-19);\n }\n .productCardPriceContent{\n height: 48px;\n .discountRate{\n width: 65px;\n height: 48px;\n font: var(--title-extra-bold-16-19);\n }\n \n .oldPrice {\n .price{\n font: var(--body-semi-bold-13-16);\n }\n }\n .newPrice {\n .price{\n font: var(--title-extra-bold-16-19);\n }\n .period{\n font: var(--body-regular-14-17);\n }\n }\n }\n }\n }\n "); });
14
14
  var templateObject_1;
@@ -1,4 +1,6 @@
1
1
  /// <reference types="react" />
2
+ export declare const imageInfoTextVariants: string[];
3
+ type IMAGE_INFO_TEXT_VARIANT = typeof imageInfoTextVariants[number];
2
4
  export interface ProductCardVertical {
3
5
  title?: string;
4
6
  description?: string;
@@ -19,12 +21,15 @@ export interface ProductCardVertical {
19
21
  beltBadgeVariant?: string;
20
22
  beltBadgeTitle?: string;
21
23
  imageInfoText?: string;
24
+ imageInfoTextVariant?: IMAGE_INFO_TEXT_VARIANT;
22
25
  }
23
26
  export interface ProductCardVerticalStyledProps {
24
27
  $discountRate?: number;
25
28
  $isResponsive?: boolean;
26
29
  $hasNewImageType?: boolean;
27
30
  $hasOutOfStock?: boolean;
31
+ $imageInfoTextVariant?: IMAGE_INFO_TEXT_VARIANT;
28
32
  }
29
33
  export declare const ProductCardVerticalDefault: ProductCardVertical;
30
34
  export type ProductCardVerticalProps = typeof ProductCardVerticalDefault;
35
+ export {};
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ProductCardVerticalDefault = void 0;
3
+ exports.ProductCardVerticalDefault = exports.imageInfoTextVariants = void 0;
4
+ exports.imageInfoTextVariants = ['secondary', 'dark'];
4
5
  exports.ProductCardVerticalDefault = {
5
6
  title: null,
6
7
  description: null,
@@ -20,5 +21,6 @@ exports.ProductCardVerticalDefault = {
20
21
  hasBeltBadge: false,
21
22
  beltBadgeVariant: "primary",
22
23
  beltBadgeTitle: "discount",
23
- imageInfoText: null
24
+ imageInfoText: null,
25
+ imageInfoTextVariant: "secondary"
24
26
  };
@@ -35,5 +35,6 @@ export declare const Default: {
35
35
  hasBeltBadge: boolean;
36
36
  beltBadgeTitle: string;
37
37
  imageInfoText: import("react/jsx-runtime").JSX.Element;
38
+ imageInfoTextVariant: string;
38
39
  };
39
40
  };
@@ -48,5 +48,6 @@ exports.Default = {
48
48
  hasBeltBadge: true,
49
49
  beltBadgeTitle: "discount",
50
50
  imageInfoText: (0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("strong", { children: "A\u011EUST" }), " koduyla sepette 250 TL indirim"] }),
51
+ imageInfoTextVariant: "secondary",
51
52
  },
52
53
  };
@@ -1,5 +1,5 @@
1
1
  import React from "react";
2
2
  import { ToastProps } from "./props";
3
3
  import { toast } from "./core/state";
4
- declare const Toaster: ({ size, show, children, onSecondaryAction, hasLoading, }: ToastProps) => React.ReactPortal;
4
+ declare const Toaster: ({ size, show, children, onSecondaryAction, hasLoading, showCloseIcon, onClose, }: ToastProps) => React.ReactPortal;
5
5
  export { toast, Toaster };
@@ -26,10 +26,10 @@ var state_1 = require("./core/state");
26
26
  Object.defineProperty(exports, "toast", { enumerable: true, get: function () { return state_1.toast; } });
27
27
  var Loader_1 = __importDefault(require("../Loader"));
28
28
  var Toaster = function (_a) {
29
- var _b = _a.size, size = _b === void 0 ? props_1.ToastDefault.size : _b, _c = _a.show, show = _c === void 0 ? props_1.ToastDefault.show : _c, _d = _a.children, children = _d === void 0 ? props_1.ToastDefault.children : _d, _e = _a.onSecondaryAction, onSecondaryAction = _e === void 0 ? props_1.ToastDefault.onSecondaryAction : _e, _f = _a.hasLoading, hasLoading = _f === void 0 ? props_1.ToastDefault.hasLoading : _f;
30
- var _g = (0, react_1.useState)(show), isShowToast = _g[0], setIsShowToast = _g[1];
31
- var _h = (0, react_1.useState)({}), toastProps = _h[0], setToastProps = _h[1];
32
- var _j = (0, react_1.useState)("24px"), iconSize = _j[0], setIconSize = _j[1];
29
+ var _b = _a.size, size = _b === void 0 ? props_1.ToastDefault.size : _b, _c = _a.show, show = _c === void 0 ? props_1.ToastDefault.show : _c, _d = _a.children, children = _d === void 0 ? props_1.ToastDefault.children : _d, _e = _a.onSecondaryAction, onSecondaryAction = _e === void 0 ? props_1.ToastDefault.onSecondaryAction : _e, _f = _a.hasLoading, hasLoading = _f === void 0 ? props_1.ToastDefault.hasLoading : _f, _g = _a.showCloseIcon, showCloseIcon = _g === void 0 ? props_1.ToastDefault.showCloseIcon : _g, _h = _a.onClose, onClose = _h === void 0 ? props_1.ToastDefault.onClose : _h;
30
+ var _j = (0, react_1.useState)(show), isShowToast = _j[0], setIsShowToast = _j[1];
31
+ var _k = (0, react_1.useState)({}), toastProps = _k[0], setToastProps = _k[1];
32
+ var _l = (0, react_1.useState)("24px"), iconSize = _l[0], setIconSize = _l[1];
33
33
  (0, react_1.useEffect)(function () {
34
34
  return state_1.ToastState.subscribe(function (toast) {
35
35
  setToastProps(__assign(__assign({}, props_1.ToastDefault), toast));
@@ -73,8 +73,16 @@ var Toaster = function (_a) {
73
73
  setIconSize("24px");
74
74
  }
75
75
  }, [toastProps, size]);
76
+ var handleClose = function () {
77
+ if (toastProps.onClose) {
78
+ toastProps.onClose();
79
+ }
80
+ else {
81
+ setIsShowToast(false);
82
+ }
83
+ };
76
84
  return (isShowToast &&
77
- react_dom_1.default.createPortal((0, jsx_runtime_1.jsx)(Toast_styled_1.OverlayStyled, { children: (0, jsx_runtime_1.jsx)(Toast_styled_1.ToastStyled, __assign({ "$size": toastProps.size, "$alignment": toastProps.alignment, "$variant": toastProps.variant }, { children: toastProps.hasLoading ? ((0, jsx_runtime_1.jsxs)("div", { children: [(toastProps.icon) && ((0, jsx_runtime_1.jsx)("div", __assign({ className: "icon" }, { children: (0, jsx_runtime_1.jsx)(Icon_1.default, { name: toastProps.icon, width: iconSize, height: iconSize }) }))), (0, jsx_runtime_1.jsx)("div", __assign({ className: "loaderWrapper" }, { children: (0, jsx_runtime_1.jsx)(Loader_1.default, { variant: "primary", width: "1.5rem", height: "1.5rem" }) }))] })) : ((0, jsx_runtime_1.jsxs)("div", { children: [(toastProps.icon) && ((0, jsx_runtime_1.jsx)("div", __assign({ className: "icon" }, { children: (0, jsx_runtime_1.jsx)(Icon_1.default, { name: toastProps.icon, width: iconSize, height: iconSize }) }))), (toastProps.title) && ((0, jsx_runtime_1.jsx)("h5", { className: "title", dangerouslySetInnerHTML: { __html: toastProps.title } })), (0, jsx_runtime_1.jsx)("div", __assign({ className: "content" }, { children: toastProps.children || children })), (toastProps.showPrimaryButton || toastProps.showSecondaryButton) && ((0, jsx_runtime_1.jsxs)("div", __assign({ className: "bottom" }, { children: [(toastProps.showSecondaryButton) && ((0, jsx_runtime_1.jsx)(Button_1.default, __assign({ onClick: function (e) {
85
+ react_dom_1.default.createPortal((0, jsx_runtime_1.jsx)(Toast_styled_1.OverlayStyled, { children: (0, jsx_runtime_1.jsx)(Toast_styled_1.ToastStyled, __assign({ "$size": toastProps.size, "$alignment": toastProps.alignment, "$variant": toastProps.variant }, { children: toastProps.hasLoading ? ((0, jsx_runtime_1.jsxs)("div", { children: [(toastProps.icon) && ((0, jsx_runtime_1.jsx)("div", __assign({ className: "icon" }, { children: (0, jsx_runtime_1.jsx)(Icon_1.default, { name: toastProps.icon, width: iconSize, height: iconSize }) }))), (0, jsx_runtime_1.jsx)("div", __assign({ className: "loaderWrapper" }, { children: (0, jsx_runtime_1.jsx)(Loader_1.default, { variant: "primary", width: "1.5rem", height: "1.5rem" }) }))] })) : ((0, jsx_runtime_1.jsxs)("div", { children: [toastProps.showCloseIcon && ((0, jsx_runtime_1.jsx)("div", __assign({ className: "toastrHeader" }, { children: (0, jsx_runtime_1.jsx)("div", __assign({ onClick: handleClose, className: "closeIcon" }, { children: (0, jsx_runtime_1.jsx)(Icon_1.default, { name: "Closebig" }) })) }))), (toastProps.icon) && ((0, jsx_runtime_1.jsx)("div", __assign({ className: "icon" }, { children: (0, jsx_runtime_1.jsx)(Icon_1.default, { name: toastProps.icon, width: iconSize, height: iconSize }) }))), (toastProps.title) && ((0, jsx_runtime_1.jsx)("h5", { className: "title", dangerouslySetInnerHTML: { __html: toastProps.title } })), (0, jsx_runtime_1.jsx)("div", __assign({ className: "content" }, { children: toastProps.children || children })), (toastProps.showPrimaryButton || toastProps.showSecondaryButton) && ((0, jsx_runtime_1.jsxs)("div", __assign({ className: "bottom" }, { children: [(toastProps.showSecondaryButton) && ((0, jsx_runtime_1.jsx)(Button_1.default, __assign({ onClick: function (e) {
78
86
  toastProps.onSecondaryAction(e);
79
87
  onSecondaryAction(e);
80
88
  setIsShowToast(false);
@@ -9,7 +9,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
9
9
  Object.defineProperty(exports, "__esModule", { value: true });
10
10
  exports.OverlayStyled = exports.ToastStyled = void 0;
11
11
  var styled_components_1 = __importDefault(require("styled-components"));
12
- exports.ToastStyled = styled_components_1.default.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n background: white;\n border-radius: 0.5rem;\n box-sizing: border-box;\n max-width: calc(100vw - 2rem);\n padding: 2rem;\n display: flex;\n align-items: center;\n ", ";\n width: ", ";\n min-height: ", ";\n > div{\n width: 100%;\n }\n \n .icon{\n width: ", ";\n\n height: ", ";\n border-radius: 50%;\n background-color: ", ";\n text-align: center;\n align-items: center;\n justify-content: center;\n display: flex;\n margin:\n ", ";\n svg{\n\n width: ", ";\n\n height: ", ";\n color: #fff;\n }\n }\n .loaderWrapper{\n display: flex;\n align-items: center;\n justify-content: center;\n }\n\n .title {\n margin: 2rem 0 0 0;\n padding: 0;\n font:var(--title-extra-bold-16-19);\n }\n \n .content {\n margin: 1rem 0 0 0;\n font:var(--body-regular-14-17);\n &:is(:empty){\n display: none;\n }\n }\n .bottom{\n margin: 2rem 0 0 0;\n text-align: center;\n display: flex;\n align-items: center;\n justify-content: center;\n column-gap: 1rem;\n button{\n white-space: nowrap;\n }\n }\n"], ["\n background: white;\n border-radius: 0.5rem;\n box-sizing: border-box;\n max-width: calc(100vw - 2rem);\n padding: 2rem;\n display: flex;\n align-items: center;\n ", ";\n width: ", ";\n min-height: ", ";\n > div{\n width: 100%;\n }\n \n .icon{\n width: ", ";\n\n height: ", ";\n border-radius: 50%;\n background-color: ", ";\n text-align: center;\n align-items: center;\n justify-content: center;\n display: flex;\n margin:\n ", ";\n svg{\n\n width: ", ";\n\n height: ", ";\n color: #fff;\n }\n }\n .loaderWrapper{\n display: flex;\n align-items: center;\n justify-content: center;\n }\n\n .title {\n margin: 2rem 0 0 0;\n padding: 0;\n font:var(--title-extra-bold-16-19);\n }\n \n .content {\n margin: 1rem 0 0 0;\n font:var(--body-regular-14-17);\n &:is(:empty){\n display: none;\n }\n }\n .bottom{\n margin: 2rem 0 0 0;\n text-align: center;\n display: flex;\n align-items: center;\n justify-content: center;\n column-gap: 1rem;\n button{\n white-space: nowrap;\n }\n }\n"])), function (props) {
12
+ exports.ToastStyled = styled_components_1.default.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n background: white;\n border-radius: 0.5rem;\n box-sizing: border-box;\n max-width: calc(100vw - 2rem);\n padding: 2rem;\n display: flex;\n align-items: center;\n position: relative;\n ", ";\n width: ", ";\n min-height: ", ";\n > div{\n width: 100%;\n }\n \n .icon{\n width: ", ";\n\n height: ", ";\n border-radius: 50%;\n background-color: ", ";\n text-align: center;\n align-items: center;\n justify-content: center;\n display: flex;\n margin:\n ", ";\n svg{\n\n width: ", ";\n\n height: ", ";\n color: #fff;\n }\n }\n .loaderWrapper{\n display: flex;\n align-items: center;\n justify-content: center;\n }\n\n .title {\n margin: 2rem 0 0 0;\n padding: 0;\n font:var(--title-extra-bold-16-19);\n }\n \n .content {\n margin: 1rem 0 0 0;\n font:var(--body-regular-14-17);\n &:is(:empty){\n display: none;\n }\n }\n .bottom{\n margin: 2rem 0 0 0;\n text-align: center;\n display: flex;\n align-items: center;\n justify-content: center;\n column-gap: 1rem;\n button{\n white-space: nowrap;\n }\n }\n\n .toastrHeader{\n align-items: center;\n justify-content: flex-end;\n width: 100%;\n padding: 0 0 24px 0;\n display: flex;\n \n .closeIcon {\n width: 32px;\n height: 32px;\n border-radius: 0.5rem;\n cursor: pointer;\n background: white;\n transition: all .2s;\n color: var(--dark);\n display: flex;\n align-items: center;\n justify-content: center;\n z-index: 1;\n &:hover {\n box-shadow: 0 6px 30px var(--box-shadow-color);\n }\n }\n }\n"], ["\n background: white;\n border-radius: 0.5rem;\n box-sizing: border-box;\n max-width: calc(100vw - 2rem);\n padding: 2rem;\n display: flex;\n align-items: center;\n position: relative;\n ", ";\n width: ", ";\n min-height: ", ";\n > div{\n width: 100%;\n }\n \n .icon{\n width: ", ";\n\n height: ", ";\n border-radius: 50%;\n background-color: ", ";\n text-align: center;\n align-items: center;\n justify-content: center;\n display: flex;\n margin:\n ", ";\n svg{\n\n width: ", ";\n\n height: ", ";\n color: #fff;\n }\n }\n .loaderWrapper{\n display: flex;\n align-items: center;\n justify-content: center;\n }\n\n .title {\n margin: 2rem 0 0 0;\n padding: 0;\n font:var(--title-extra-bold-16-19);\n }\n \n .content {\n margin: 1rem 0 0 0;\n font:var(--body-regular-14-17);\n &:is(:empty){\n display: none;\n }\n }\n .bottom{\n margin: 2rem 0 0 0;\n text-align: center;\n display: flex;\n align-items: center;\n justify-content: center;\n column-gap: 1rem;\n button{\n white-space: nowrap;\n }\n }\n\n .toastrHeader{\n align-items: center;\n justify-content: flex-end;\n width: 100%;\n padding: 0 0 24px 0;\n display: flex;\n \n .closeIcon {\n width: 32px;\n height: 32px;\n border-radius: 0.5rem;\n cursor: pointer;\n background: white;\n transition: all .2s;\n color: var(--dark);\n display: flex;\n align-items: center;\n justify-content: center;\n z-index: 1;\n &:hover {\n box-shadow: 0 6px 30px var(--box-shadow-color);\n }\n }\n }\n"])), function (props) {
13
13
  switch (props.$alignment) {
14
14
  case 'left':
15
15
  return "\n justify-content: flex-start;\n text-align: start;\n ";
@@ -1,10 +1,10 @@
1
- import { ToastDefault } from "../props";
1
+ import { Toast } from "../props";
2
2
  declare class Observer {
3
- subscribers: Array<(toast: keyof typeof ToastDefault) => void>;
3
+ subscribers: Array<(toast: Toast) => void>;
4
4
  constructor();
5
- subscribe: (subscriber: (toast: keyof typeof ToastDefault) => void) => () => void;
6
- publish: (data: keyof typeof ToastDefault) => void;
7
- addToast: (data: keyof typeof ToastDefault) => void;
5
+ subscribe: (subscriber: (toast: Toast) => void) => () => void;
6
+ publish: (data: Toast) => void;
7
+ addToast: (data: Toast) => void;
8
8
  }
9
9
  export declare const ToastState: Observer;
10
10
  export declare const toast: any;
@@ -7,12 +7,14 @@ export declare const variant: string[];
7
7
  type VARIANT = typeof variant[number];
8
8
  export declare const iconNames: string[];
9
9
  type ICON = typeof iconNames[any];
10
- interface Toast {
10
+ export interface Toast {
11
11
  size?: SIZES;
12
12
  alignment?: ALIGNMENT;
13
13
  variant?: VARIANT;
14
14
  show?: boolean;
15
15
  hasClosing?: boolean;
16
+ showCloseIcon?: boolean;
17
+ onClose?(): void;
16
18
  title?: string;
17
19
  children?: React.ReactNode;
18
20
  setShow?(b: boolean): void;
@@ -12,6 +12,8 @@ exports.ToastDefault = {
12
12
  variant: null,
13
13
  show: null,
14
14
  hasClosing: true,
15
+ showCloseIcon: false,
16
+ onClose: null,
15
17
  title: null,
16
18
  children: null,
17
19
  setShow: null,
@@ -42,5 +42,6 @@ export declare const Default: {
42
42
  showSecondaryButton: boolean;
43
43
  secondaryButtonText: string;
44
44
  hasLoading: boolean;
45
+ showCloseIcon: boolean;
45
46
  };
46
47
  };
@@ -23,6 +23,7 @@ var Button_1 = __importDefault(require("../../Button"));
23
23
  exports.default = {
24
24
  title: 'Components/Toast',
25
25
  component: function (props) {
26
+ console.log(props);
26
27
  var handleShowToast = function () { return (0, Toast_1.toast)(props); };
27
28
  return ((0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)(Toast_1.Toaster, {}), (0, jsx_runtime_1.jsx)(Button_1.default, __assign({ size: "big", variant: "primary", onClick: handleShowToast }, { children: "Show Toast" }))] }));
28
29
  },
@@ -50,5 +51,6 @@ exports.Default = {
50
51
  showSecondaryButton: false,
51
52
  secondaryButtonText: 'Secondary',
52
53
  hasLoading: false,
54
+ showCloseIcon: true,
53
55
  },
54
56
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "krl-alfred",
3
- "version": "2.17.30",
3
+ "version": "2.17.32",
4
4
  "files": [
5
5
  "dist"
6
6
  ],