krl-alfred 2.17.41 → 2.17.43

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 { ProductCardHorizontalSmProps } from "./props";
2
- declare const ProductCardHorizontalSm: ({ title, price, priceSm, slug, period, image, component, hasImageBorder, imageWidth, imageHeight, infoPosition, hasButton, buttonVariant, buttonText, hasBorder, isSelected, hasTitleWrap, hasButtonRemoveMdDown, hasBordeHover, hasTooltip, tooltipSelectorTitle, tooltipDescription, }: ProductCardHorizontalSmProps) => import("react/jsx-runtime").JSX.Element;
2
+ declare const ProductCardHorizontalSm: ({ title, price, priceSm, slug, period, image, component, hasImageBorder, imageWidth, imageHeight, infoPosition, hasButton, buttonVariant, buttonText, hasBorder, isSelected, hasTitleWrap, hasButtonRemoveMdDown, hasBordeHover, hasTooltip, tooltipSelectorTitle, tooltipDescription, isDisabled, }: ProductCardHorizontalSmProps) => import("react/jsx-runtime").JSX.Element;
3
3
  export default ProductCardHorizontalSm;
@@ -21,11 +21,11 @@ var ProductCardHorizontalSm_styled_1 = require("./ProductCardHorizontalSm.styled
21
21
  var Button_1 = __importDefault(require("../Button"));
22
22
  var Tooltip_1 = __importDefault(require("../Tooltip"));
23
23
  var ProductCardHorizontalSm = function (_a) {
24
- 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;
24
+ 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;
25
25
  var LinkComponent = function (_a) {
26
26
  var item = _a.item, children = _a.children;
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
- return ((0, jsx_runtime_1.jsxs)(ProductCardHorizontalSm_styled_1.ProductCardHorizontalSmStyled, __assign({ "$period": period, "$hasImageBorder": hasImageBorder, "$imageWidth": imageWidth, "$imageHeight": imageHeight, "$isSelected": isSelected, "$hasBordeHover": hasBordeHover }, { children: [hasBorder && (0, jsx_runtime_1.jsx)(ProductCardHorizontalSm_styled_1.Border, { "$isSelected": isSelected, "$hasBordeHover": hasBordeHover }), (0, jsx_runtime_1.jsx)(LinkComponent, __assign({ item: { component: component, slug: slug } }, { children: (0, jsx_runtime_1.jsxs)(ProductCardHorizontalSm_styled_1.HorizontalSmWrapper, { children: [(0, jsx_runtime_1.jsx)(ProductCardHorizontalSm_styled_1.ImgWrapper, __assign({ "$imageHeight": imageHeight, "$imageWidth": imageWidth }, { children: image })), (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({ 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 })))] }))] }) }))] })));
29
+ 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: [hasBorder && (0, jsx_runtime_1.jsx)(ProductCardHorizontalSm_styled_1.Border, { "$isSelected": isSelected, "$hasBordeHover": hasBordeHover }), (0, jsx_runtime_1.jsx)(LinkComponent, __assign({ item: { component: component, slug: slug } }, { children: (0, jsx_runtime_1.jsxs)(ProductCardHorizontalSm_styled_1.HorizontalSmWrapper, { children: [(0, jsx_runtime_1.jsx)(ProductCardHorizontalSm_styled_1.ImgWrapper, __assign({ "$imageHeight": imageHeight, "$imageWidth": imageWidth }, { children: image })), (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 })))] }))] }) }))] })));
30
30
  };
31
31
  exports.default = ProductCardHorizontalSm;
@@ -12,7 +12,7 @@ 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: all .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: all .2s ease;\n"])), function (props) { return props.$hasTitleWrap ? '2' : '1'; });
14
14
  exports.Border = styled_components_1.default.div(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n border: ", ";\n user-select: none;\n pointer-events: none;\n position: absolute;\n inset: 0;\n border-radius: inherit;\n"], ["\n border: ", ";\n user-select: none;\n pointer-events: none;\n position: absolute;\n inset: 0;\n border-radius: inherit;\n"])), function (props) { return props.$isSelected ? '2px solid var(--primary) !important' : '1px solid var(--grey-10)'; });
15
- exports.ProductCardHorizontalSmStyled = styled_components_1.default.div(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n color: var(--dark);\n padding: 0 0.5rem;\n transition: all .2s ease;\n border-radius: 0.5rem;\n position: relative;\n ", "\n a {\n text-decoration: none;\n color: inherit;\n @media only screen and ", " {\n &:hover{\n ", " {\n color: var(--primary-hover);\n }\n }\n }\n &:active {\n ", "{\n color: var(--primary-hover);\n }\n }\n }\n \n"], ["\n color: var(--dark);\n padding: 0 0.5rem;\n transition: all .2s ease;\n border-radius: 0.5rem;\n position: relative;\n ", "\n a {\n text-decoration: none;\n color: inherit;\n @media only screen and ", " {\n &:hover{\n ", " {\n color: var(--primary-hover);\n }\n }\n }\n &:active {\n ", "{\n color: var(--primary-hover);\n }\n }\n }\n \n"])), function (props) { return props.$hasBordeHover && "\n cursor: pointer;\n &:hover {\n ".concat(exports.Border, " {\n border: 1px solid var(--primary);\n }\n }\n "); }, devices_1.devices.mdUp, exports.Title, exports.Title);
15
+ exports.ProductCardHorizontalSmStyled = styled_components_1.default.div(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n color: var(--dark);\n padding: 0 0.5rem;\n transition: all .2s ease;\n border-radius: 0.5rem;\n position: relative;\n ", "\n ", "\n a {\n text-decoration: none;\n color: inherit;\n @media only screen and ", " {\n &:hover{\n ", " {\n color: var(--primary-hover);\n }\n }\n }\n &:active {\n ", "{\n color: var(--primary-hover);\n }\n }\n }\n \n"], ["\n color: var(--dark);\n padding: 0 0.5rem;\n transition: all .2s ease;\n border-radius: 0.5rem;\n position: relative;\n ", "\n ", "\n a {\n text-decoration: none;\n color: inherit;\n @media only screen and ", " {\n &:hover{\n ", " {\n color: var(--primary-hover);\n }\n }\n }\n &:active {\n ", "{\n color: var(--primary-hover);\n }\n }\n }\n \n"])), function (props) { return props.$isDisabled && "\n user-select: none;\n pointer-events: none;\n cursor: not-allowed;\n "; }, function (props) { return props.$hasBordeHover && "\n cursor: pointer;\n &:hover {\n ".concat(exports.Border, " {\n border: 1px solid var(--primary);\n }\n }\n "); }, devices_1.devices.mdUp, exports.Title, exports.Title);
16
16
  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"])));
17
17
  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 img {\n vertical-align: middle !important;\n display: block !important;\n object-fit: cover !important;\n border-radius: 4px !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 img {\n vertical-align: middle !important;\n display: block !important;\n object-fit: cover !important;\n border-radius: 4px !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'; });
18
18
  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"; });
@@ -24,6 +24,7 @@ export interface ProductCardHorizontalSm {
24
24
  hasTooltip?: boolean;
25
25
  tooltipSelectorTitle?: string;
26
26
  tooltipDescription?: React.ReactNode;
27
+ isDisabled?: boolean;
27
28
  }
28
29
  export interface ProductCardHorizontalSmStyledProps {
29
30
  $period?: string;
@@ -36,6 +37,7 @@ export interface ProductCardHorizontalSmStyledProps {
36
37
  $hasTitleWrap?: boolean;
37
38
  $hasButtonRemoveMdDown?: boolean;
38
39
  $hasBordeHover?: boolean;
40
+ $isDisabled?: boolean;
39
41
  }
40
42
  export declare const ProductCardHorizontalSmDefault: ProductCardHorizontalSm;
41
43
  export type ProductCardHorizontalSmProps = typeof ProductCardHorizontalSmDefault;
@@ -24,4 +24,5 @@ exports.ProductCardHorizontalSmDefault = {
24
24
  hasTooltip: false,
25
25
  tooltipSelectorTitle: null,
26
26
  tooltipDescription: null,
27
+ isDisabled: false,
27
28
  };
@@ -46,5 +46,6 @@ export declare const Default: {
46
46
  hasTooltip: boolean;
47
47
  tooltipSelectorTitle: string;
48
48
  tooltipDescription: string;
49
+ isDisabled: boolean;
49
50
  };
50
51
  };
@@ -66,5 +66,6 @@ exports.Default = {
66
66
  hasTooltip: true,
67
67
  tooltipSelectorTitle: "Tooltip Title",
68
68
  tooltipDescription: "Tooltip Description",
69
+ isDisabled: false,
69
70
  },
70
71
  };
@@ -1,3 +1,3 @@
1
1
  import { TooltipProps } from "./props";
2
- declare const Tooltip: ({ iconWidth, iconHeight, children, title, popupWidth, hasClickAction, hasCloseOnOutsideClick, isOpen, position, popupSize, popupLeft, popupRight, id, selectorTitle, }: TooltipProps) => import("react/jsx-runtime").JSX.Element;
2
+ declare const Tooltip: ({ iconWidth, iconHeight, children, title, popupWidth, hasClickAction, hasCloseOnOutsideClick, isOpen, position, popupSize, popupLeft, popupRight, id, selectorTitle, popupRightSm, }: TooltipProps) => import("react/jsx-runtime").JSX.Element;
3
3
  export default Tooltip;
@@ -21,13 +21,13 @@ var Tooltip_styled_1 = require("./Tooltip.styled");
21
21
  var Icon_1 = __importDefault(require("../Icon/Icon"));
22
22
  var useOnClickOutside_1 = __importDefault(require("../../hooks/useOnClickOutside"));
23
23
  var Tooltip = function (_a) {
24
- var _b = _a.iconWidth, iconWidth = _b === void 0 ? props_1.TooltipDefault.iconWidth : _b, _c = _a.iconHeight, iconHeight = _c === void 0 ? props_1.TooltipDefault.iconHeight : _c, _d = _a.children, children = _d === void 0 ? props_1.TooltipDefault.children : _d, _e = _a.title, title = _e === void 0 ? props_1.TooltipDefault.title : _e, _f = _a.popupWidth, popupWidth = _f === void 0 ? props_1.TooltipDefault.popupWidth : _f, _g = _a.hasClickAction, hasClickAction = _g === void 0 ? props_1.TooltipDefault.hasClickAction : _g, _h = _a.hasCloseOnOutsideClick, hasCloseOnOutsideClick = _h === void 0 ? props_1.TooltipDefault.hasCloseOnOutsideClick : _h, _j = _a.isOpen, isOpen = _j === void 0 ? props_1.TooltipDefault.isOpen : _j, _k = _a.position, position = _k === void 0 ? props_1.TooltipDefault.position : _k, _l = _a.popupSize, popupSize = _l === void 0 ? props_1.TooltipDefault.popupSize : _l, _m = _a.popupLeft, popupLeft = _m === void 0 ? props_1.TooltipDefault.popupLeft : _m, _o = _a.popupRight, popupRight = _o === void 0 ? props_1.TooltipDefault.popupRight : _o, _p = _a.id, id = _p === void 0 ? props_1.TooltipDefault.id : _p, _q = _a.selectorTitle, selectorTitle = _q === void 0 ? props_1.TooltipDefault.selectorTitle : _q;
25
- var _r = (0, react_1.useState)(isOpen), isOpenTooltip = _r[0], setIsOpenTooltip = _r[1];
24
+ var _b = _a.iconWidth, iconWidth = _b === void 0 ? props_1.TooltipDefault.iconWidth : _b, _c = _a.iconHeight, iconHeight = _c === void 0 ? props_1.TooltipDefault.iconHeight : _c, _d = _a.children, children = _d === void 0 ? props_1.TooltipDefault.children : _d, _e = _a.title, title = _e === void 0 ? props_1.TooltipDefault.title : _e, _f = _a.popupWidth, popupWidth = _f === void 0 ? props_1.TooltipDefault.popupWidth : _f, _g = _a.hasClickAction, hasClickAction = _g === void 0 ? props_1.TooltipDefault.hasClickAction : _g, _h = _a.hasCloseOnOutsideClick, hasCloseOnOutsideClick = _h === void 0 ? props_1.TooltipDefault.hasCloseOnOutsideClick : _h, _j = _a.isOpen, isOpen = _j === void 0 ? props_1.TooltipDefault.isOpen : _j, _k = _a.position, position = _k === void 0 ? props_1.TooltipDefault.position : _k, _l = _a.popupSize, popupSize = _l === void 0 ? props_1.TooltipDefault.popupSize : _l, _m = _a.popupLeft, popupLeft = _m === void 0 ? props_1.TooltipDefault.popupLeft : _m, _o = _a.popupRight, popupRight = _o === void 0 ? props_1.TooltipDefault.popupRight : _o, _p = _a.id, id = _p === void 0 ? props_1.TooltipDefault.id : _p, _q = _a.selectorTitle, selectorTitle = _q === void 0 ? props_1.TooltipDefault.selectorTitle : _q, _r = _a.popupRightSm, popupRightSm = _r === void 0 ? props_1.TooltipDefault.popupRightSm : _r;
25
+ var _s = (0, react_1.useState)(isOpen), isOpenTooltip = _s[0], setIsOpenTooltip = _s[1];
26
26
  (0, react_1.useEffect)(function () {
27
27
  setIsOpenTooltip(isOpen);
28
28
  }, [isOpen]);
29
29
  var tooltipRef = (0, react_1.useRef)();
30
30
  (0, useOnClickOutside_1.default)(tooltipRef, function () { return setIsOpenTooltip(false); }, hasCloseOnOutsideClick);
31
- return ((0, jsx_runtime_1.jsxs)(Tooltip_styled_1.TooltipStyled, __assign({ id: id, ref: tooltipRef, "$hasClickAction": hasClickAction }, { children: [(0, jsx_runtime_1.jsxs)(Tooltip_styled_1.Selector, __assign({ "$isOpen": isOpenTooltip, "$position": position, "$hasClickAction": hasClickAction, onClick: function () { return setIsOpenTooltip(!isOpenTooltip); } }, { children: [(0, jsx_runtime_1.jsx)(Tooltip_styled_1.SelectorIconWrapper, __assign({ "$isOpen": isOpenTooltip, "$position": position, "$hasClickAction": hasClickAction }, { children: (0, jsx_runtime_1.jsx)(Icon_1.default, { name: iconWidth === "16px" ? "InfoSquareSmall" : "InfoSquare", width: iconWidth, height: iconHeight }) })), selectorTitle && (0, jsx_runtime_1.jsx)(Tooltip_styled_1.SelectorTitle, { children: selectorTitle })] })), (0, jsx_runtime_1.jsx)(Tooltip_styled_1.PopupWrapper, __assign({ "$iconWidth": iconWidth }, { children: (0, jsx_runtime_1.jsxs)(Tooltip_styled_1.Popup, __assign({ "$popupSize": popupSize, "$position": position, "$popupWidth": popupWidth, "$isOpen": isOpenTooltip, "$hasClickAction": hasClickAction, "$popupLeft": popupLeft, "$popupRight": popupRight, className: "customPopup" }, { children: [title && (0, jsx_runtime_1.jsx)(Tooltip_styled_1.Title, { children: title }), children] })) }))] })));
31
+ return ((0, jsx_runtime_1.jsxs)(Tooltip_styled_1.TooltipStyled, __assign({ id: id, ref: tooltipRef, "$hasClickAction": hasClickAction }, { children: [(0, jsx_runtime_1.jsxs)(Tooltip_styled_1.Selector, __assign({ "$isOpen": isOpenTooltip, "$position": position, "$hasClickAction": hasClickAction, onClick: function () { return setIsOpenTooltip(!isOpenTooltip); } }, { children: [(0, jsx_runtime_1.jsx)(Tooltip_styled_1.SelectorIconWrapper, __assign({ "$isOpen": isOpenTooltip, "$position": position, "$hasClickAction": hasClickAction }, { children: (0, jsx_runtime_1.jsx)(Icon_1.default, { name: iconWidth === "16px" ? "InfoSquareSmall" : "InfoSquare", width: iconWidth, height: iconHeight }) })), selectorTitle && (0, jsx_runtime_1.jsx)(Tooltip_styled_1.SelectorTitle, { children: selectorTitle })] })), (0, jsx_runtime_1.jsx)(Tooltip_styled_1.PopupWrapper, __assign({ "$iconWidth": iconWidth }, { children: (0, jsx_runtime_1.jsxs)(Tooltip_styled_1.Popup, __assign({ "$popupSize": popupSize, "$position": position, "$popupWidth": popupWidth, "$isOpen": isOpenTooltip, "$hasClickAction": hasClickAction, "$popupLeft": popupLeft, "$popupRight": popupRight, "$popupRightSm": popupRightSm, className: "customPopup" }, { children: [title && (0, jsx_runtime_1.jsx)(Tooltip_styled_1.Title, { children: title }), children] })) }))] })));
32
32
  };
33
33
  exports.default = Tooltip;
@@ -58,6 +58,6 @@ exports.Popup = styled_components_1.default.div(templateObject_6 || (templateObj
58
58
  default:
59
59
  return "\n left: 50%;\n bottom: calc(100% + 10px);\n transform: translateX(-50%);\n ";
60
60
  }
61
- }, devices_1.devices.xl, function (props) { return props.$popupRight || "-1.5rem"; });
61
+ }, devices_1.devices.xl, function (props) { return props.$popupRight || props.$popupRightSm || "-1.5rem"; });
62
62
  exports.PopupWrapper = styled_components_1.default.div(templateObject_7 || (templateObject_7 = __makeTemplateObject(["\n position: absolute;\n left: 0;\n top: 50%;\n transform: translateY(-50%);\n width: ", ";\n height: 100%;\n"], ["\n position: absolute;\n left: 0;\n top: 50%;\n transform: translateY(-50%);\n width: ", ";\n height: 100%;\n"])), function (props) { return props.$iconWidth ? props.$iconWidth : "16px"; });
63
63
  var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5, templateObject_6, templateObject_7;
@@ -16,12 +16,14 @@ export interface Tooltip {
16
16
  popupSize?: SIZE;
17
17
  popupLeft?: string;
18
18
  popupRight?: string;
19
+ popupRightSm?: string;
19
20
  id?: string;
20
21
  selectorTitle?: React.ReactNode;
21
22
  }
22
23
  export interface TooltipStyledProps {
23
24
  $iconWidth?: string;
24
25
  $popupRight?: string;
26
+ $popupRightSm?: string;
25
27
  $hasClickAction?: boolean;
26
28
  $isOpen?: boolean;
27
29
  $position?: POSITION;
@@ -16,6 +16,7 @@ exports.TooltipDefault = {
16
16
  popupSize: "",
17
17
  popupLeft: "",
18
18
  popupRight: "",
19
+ popupRightSm: "",
19
20
  id: "",
20
21
  selectorTitle: "",
21
22
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "krl-alfred",
3
- "version": "2.17.41",
3
+ "version": "2.17.43",
4
4
  "files": [
5
5
  "dist"
6
6
  ],