krl-alfred 1.71.9 → 1.72.0

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.
@@ -19,7 +19,7 @@ var react_1 = require("react");
19
19
  var Agreement_styled_1 = require("./Agreement.styled");
20
20
  var Checkbox_1 = __importDefault(require("../Checkbox"));
21
21
  var Icon_1 = __importDefault(require("../Icon/Icon"));
22
- var Spinner_1 = __importDefault(require("../Spinner"));
22
+ var Loader_1 = __importDefault(require("../Loader"));
23
23
  var Agreement = function (props) {
24
24
  var _a = (0, react_1.useState)(props.expanded), expanded = _a[0], setExpanded = _a[1];
25
25
  (0, react_1.useEffect)(function () {
@@ -36,7 +36,7 @@ var Agreement = function (props) {
36
36
  var toggleExpand = function () { return setExpanded(function (prevState) { return !prevState; }); };
37
37
  return (0, jsx_runtime_1.jsxs)(Agreement_styled_1.AgreementStyled, __assign({}, props, { children: [(0, jsx_runtime_1.jsxs)("div", { className: "agreement", children: [(0, jsx_runtime_1.jsxs)("div", { className: "top", children: [(0, jsx_runtime_1.jsx)(Checkbox_1.default, { label: props.title, name: props.name, valid: !props.hasError, size: "medium", checked: props.checked, disabled: props.disabled, onChange: onCheckBoxChange, value: props.value }), (0, jsx_runtime_1.jsx)("div", { className: "icon", onClick: toggleExpand, children: expanded ? (0, jsx_runtime_1.jsx)(Icon_1.default, { name: "AgreementArrowUp" }) :
38
38
  (0, jsx_runtime_1.jsx)(Icon_1.default, { name: "AgreementArrowDown" }) })] }), expanded && (0, jsx_runtime_1.jsx)("div", { className: "content body-regular-14-17", children: props.content ? (0, jsx_runtime_1.jsx)("div", { className: "text", dangerouslySetInnerHTML: { __html: props.content } }) :
39
- (0, jsx_runtime_1.jsx)(Spinner_1.default, { variant: "primary", width: "24px", height: "24px" }) })] }), props.hasError && props.errorMessage && (0, jsx_runtime_1.jsxs)("div", { className: "error", children: [(0, jsx_runtime_1.jsx)(Icon_1.default, { name: "ErrorIcon" }), " ", (0, jsx_runtime_1.jsx)("p", { className: "caption-semi-bold-11-13", children: props === null || props === void 0 ? void 0 : props.errorMessage })] })] }));
39
+ (0, jsx_runtime_1.jsx)(Loader_1.default, { variant: "primary", width: "24px", height: "24px" }) })] }), props.hasError && props.errorMessage && (0, jsx_runtime_1.jsxs)("div", { className: "error", children: [(0, jsx_runtime_1.jsx)(Icon_1.default, { name: "ErrorIcon" }), " ", (0, jsx_runtime_1.jsx)("p", { className: "caption-semi-bold-11-13", children: props === null || props === void 0 ? void 0 : props.errorMessage })] })] }));
40
40
  };
41
41
  Agreement.defaultProps = {
42
42
  title: "Title",
@@ -16,9 +16,9 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  var jsx_runtime_1 = require("react/jsx-runtime");
18
18
  var Button_styled_1 = require("./Button.styled");
19
- var Spinner_1 = __importDefault(require("../Spinner"));
20
19
  var classnames_1 = __importDefault(require("classnames"));
21
20
  var Icon_1 = __importDefault(require("../Icon/Icon"));
21
+ var Loader_1 = __importDefault(require("../Loader"));
22
22
  var Children = function (props) {
23
23
  var children = props.children, icon = props.icon;
24
24
  return (0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("div", { className: "children", children: children }), icon && (0, jsx_runtime_1.jsx)(Button_styled_1.IconStyled, __assign({}, props, { children: (0, jsx_runtime_1.jsx)(Icon_1.default, { name: icon, width: "16px", height: "16px" }) }))] });
@@ -26,7 +26,7 @@ var Children = function (props) {
26
26
  var Button = function (props) {
27
27
  var _a, _b, _c, _d, _e, _f;
28
28
  var isLoading = props.isLoading, onClick = props.onClick, disabled = props.disabled, size = props.size, variant = props.variant, width = props.width, icon = props.icon, children = props.children;
29
- return ((0, jsx_runtime_1.jsx)(Button_styled_1.ButtonStyled, { className: (0, classnames_1.default)((_a = {}, _a["loading"] = isLoading, _a), (_b = {}, _b["caption-bold-12-15"] = size === 'xsmall' && variant !== 'ghost', _b), (_c = {}, _c["body-bold-13-16"] = size === 'xsmall' && variant === 'ghost', _c), (_d = {}, _d["body-bold-13-16"] = size === 'small', _d), (_e = {}, _e["body-bold-14-17"] = size === 'big', _e), (_f = {}, _f["body-bold-14-17"] = size === 'medium', _f)), onClick: onClick, disabled: disabled || isLoading, size: size, variant: variant, width: width, icon: icon, children: isLoading ? (0, jsx_runtime_1.jsx)(Spinner_1.default, { width: size === "big" ? "24px" : "16px", height: size === "big" ? "24px" : "16px", variant: variant === 'primary' ? 'secondary' : 'primary' }) :
29
+ return ((0, jsx_runtime_1.jsx)(Button_styled_1.ButtonStyled, { className: (0, classnames_1.default)((_a = {}, _a["loading"] = isLoading, _a), (_b = {}, _b["caption-bold-12-15"] = size === 'xsmall' && variant !== 'ghost', _b), (_c = {}, _c["body-bold-13-16"] = size === 'xsmall' && variant === 'ghost', _c), (_d = {}, _d["body-bold-13-16"] = size === 'small', _d), (_e = {}, _e["body-bold-14-17"] = size === 'big', _e), (_f = {}, _f["body-bold-14-17"] = size === 'medium', _f)), onClick: onClick, disabled: disabled || isLoading, size: size, variant: variant, width: width, icon: icon, children: isLoading ? (0, jsx_runtime_1.jsx)(Loader_1.default, { width: size === "big" ? "24px" : "16px", height: size === "big" ? "24px" : "16px", variant: variant === 'primary' ? 'secondary' : 'primary' }) :
30
30
  (0, jsx_runtime_1.jsx)(Children, { icon: icon, children: children }) }));
31
31
  };
32
32
  exports.default = Button;
@@ -0,0 +1,23 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ var jsx_runtime_1 = require("react/jsx-runtime");
7
+ var Loader_styled_1 = require("./Loader.styled");
8
+ var SpinnerIcon_1 = __importDefault(require("../../assets/svg/SpinnerIcon"));
9
+ var Loader = function (props) {
10
+ var width = props.width, height = props.height, variant = props.variant, type = props.type;
11
+ switch (props.type) {
12
+ case 'spinner':
13
+ return ((0, jsx_runtime_1.jsx)(Loader_styled_1.SpinnerStyled, { width: width, height: height, variant: variant, children: (0, jsx_runtime_1.jsx)(SpinnerIcon_1.default, { width: width, height: height }) }));
14
+ case 'wave':
15
+ return ((0, jsx_runtime_1.jsxs)(Loader_styled_1.WaveStyled, { children: [(0, jsx_runtime_1.jsx)("span", { className: "dot" }), (0, jsx_runtime_1.jsx)("span", { className: "dot" }), (0, jsx_runtime_1.jsx)("span", { className: "dot" })] }));
16
+ default:
17
+ return ((0, jsx_runtime_1.jsx)(Loader_styled_1.SpinnerStyled, { width: width, height: height, variant: variant, children: (0, jsx_runtime_1.jsx)(SpinnerIcon_1.default, { width: width, height: height }) }));
18
+ }
19
+ };
20
+ Loader.defaultProps = {
21
+ type: "spinner"
22
+ };
23
+ exports.default = Loader;
@@ -27,8 +27,10 @@ var __importStar = (this && this.__importStar) || function (mod) {
27
27
  return result;
28
28
  };
29
29
  Object.defineProperty(exports, "__esModule", { value: true });
30
- exports.SpinnerStyled = void 0;
30
+ exports.WaveStyled = exports.SpinnerStyled = void 0;
31
31
  var styled_components_1 = __importStar(require("styled-components"));
32
32
  var spin = (0, styled_components_1.keyframes)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n from {\n transform:rotate(0deg);\n }\n to {\n transform:rotate(360deg);\n }\n"], ["\n from {\n transform:rotate(0deg);\n }\n to {\n transform:rotate(360deg);\n }\n"])));
33
- exports.SpinnerStyled = styled_components_1.default.div(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n width: ", ";\n height: ", ";\n \n svg {\n animation-name: ", ";\n animation-duration: 500ms;\n animation-iteration-count: infinite;\n animation-timing-function: linear; \n\n * {\n fill: ", ";\n }\n }\n"], ["\n width: ", ";\n height: ", ";\n \n svg {\n animation-name: ", ";\n animation-duration: 500ms;\n animation-iteration-count: infinite;\n animation-timing-function: linear; \n\n * {\n fill: ", ";\n }\n }\n"])), function (props) { return props.width; }, function (props) { return props.height; }, spin, function (props) { return props.variant === 'primary' ? 'var(--primary)' : 'white'; });
34
- var templateObject_1, templateObject_2;
33
+ var wave = (0, styled_components_1.keyframes)(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n 0% {\n transform: scale(0.5);\n }\n 50% {\n transform: scale(1);\n }\n 100% {\n transform: scale(0.5);\n }\n"], ["\n 0% {\n transform: scale(0.5);\n }\n 50% {\n transform: scale(1);\n }\n 100% {\n transform: scale(0.5);\n }\n"])));
34
+ exports.SpinnerStyled = styled_components_1.default.div(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n width: ", ";\n height: ", ";\n \n svg {\n animation-name: ", ";\n animation-duration: 500ms;\n animation-iteration-count: infinite;\n animation-timing-function: linear; \n\n * {\n fill: ", ";\n }\n }\n"], ["\n width: ", ";\n height: ", ";\n \n svg {\n animation-name: ", ";\n animation-duration: 500ms;\n animation-iteration-count: infinite;\n animation-timing-function: linear; \n\n * {\n fill: ", ";\n }\n }\n"])), function (props) { return props.width; }, function (props) { return props.height; }, spin, function (props) { return props.variant === 'primary' ? 'var(--primary)' : 'white'; });
35
+ exports.WaveStyled = styled_components_1.default.div(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n span {\n border-radius: 50%;\n display: inline-block;\n margin: 0 2px;\n vertical-align: middle;\n width: 7px;\n height: 7px;\n &:first-child {\n background-color: var(--grey-20);\n animation: ", " 0.5s 0.1s linear infinite;\n }\n &:nth-child(2) {\n background-color: var(--grey-30);\n animation: ", " 0.5s 0.2s linear infinite;\n }\n &:nth-child(3) {\n background-color: var(--grey-40);\n animation: ", " 0.5s 0.3s linear infinite;\n }\n }\n"], ["\n span {\n border-radius: 50%;\n display: inline-block;\n margin: 0 2px;\n vertical-align: middle;\n width: 7px;\n height: 7px;\n &:first-child {\n background-color: var(--grey-20);\n animation: ", " 0.5s 0.1s linear infinite;\n }\n &:nth-child(2) {\n background-color: var(--grey-30);\n animation: ", " 0.5s 0.2s linear infinite;\n }\n &:nth-child(3) {\n background-color: var(--grey-40);\n animation: ", " 0.5s 0.3s linear infinite;\n }\n }\n"])), wave, wave, wave);
36
+ var templateObject_1, templateObject_2, templateObject_3, templateObject_4;
@@ -4,5 +4,5 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.default = void 0;
7
- var Spinner_1 = require("./Spinner");
8
- Object.defineProperty(exports, "default", { enumerable: true, get: function () { return __importDefault(Spinner_1).default; } });
7
+ var Loader_1 = require("./Loader");
8
+ Object.defineProperty(exports, "default", { enumerable: true, get: function () { return __importDefault(Loader_1).default; } });
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.types = exports.variants = void 0;
4
+ exports.variants = ['primary', 'secondary'];
5
+ exports.types = ['spinner', 'wave'];
6
+ var LoaderDefault = {
7
+ width: '16px',
8
+ height: '16px',
9
+ variant: 'primary',
10
+ type: 'spinner',
11
+ };
@@ -4,20 +4,22 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.Default = void 0;
7
- var Spinner_1 = __importDefault(require("../Spinner"));
7
+ var Loader_1 = __importDefault(require("../Loader"));
8
8
  var props_1 = require("../props");
9
9
  exports.default = {
10
- title: 'Components/Spinner',
11
- component: Spinner_1.default,
10
+ title: 'Components/Loader',
11
+ component: Loader_1.default,
12
12
  tags: ['autodocs'],
13
13
  argTypes: {
14
- variant: { control: 'select', options: props_1.variants }
14
+ variant: { control: 'select', options: props_1.variants },
15
+ type: { control: 'select', options: props_1.types },
15
16
  }
16
17
  };
17
18
  exports.Default = {
18
19
  args: {
19
20
  variant: props_1.variants[0],
20
21
  width: "16px",
21
- height: "16px"
22
+ height: "16px",
23
+ type: props_1.types[0]
22
24
  },
23
25
  };
@@ -7,13 +7,13 @@ var jsx_runtime_1 = require("react/jsx-runtime");
7
7
  var react_1 = require("react");
8
8
  var SearchBox_styled_1 = require("./SearchBox.styled");
9
9
  var Icon_1 = __importDefault(require("../Icon/Icon"));
10
- var Spinner_1 = __importDefault(require("../Spinner"));
10
+ var Loader_1 = __importDefault(require("../Loader"));
11
11
  var SearchBox = function (props) {
12
12
  var _a;
13
13
  var onKeyUp = props.onKeyUp, onBlur = props.onBlur, onFocus = props.onFocus, children = props.children, isLoading = props.isLoading, showResultList = props.showResultList, placeholder = props.placeholder;
14
14
  var _b = (0, react_1.useState)("48px"), shadowHeight = _b[0], setShadowHeight = _b[1];
15
15
  var LoadingContent = function () {
16
- return (0, jsx_runtime_1.jsx)(SearchBox_styled_1.LoadingStyled, { children: (0, jsx_runtime_1.jsx)(Spinner_1.default, { variant: "primary", width: "32px", height: "32px" }) });
16
+ return (0, jsx_runtime_1.jsx)(SearchBox_styled_1.LoadingStyled, { children: (0, jsx_runtime_1.jsx)(Loader_1.default, { variant: "primary", width: "32px", height: "32px" }) });
17
17
  };
18
18
  var resultRef = (0, react_1.useRef)();
19
19
  (0, react_1.useEffect)(function () {
@@ -19,13 +19,13 @@ var ShoppingCartProduct_styled_1 = require("./ShoppingCartProduct.styled");
19
19
  var classnames_1 = __importDefault(require("classnames"));
20
20
  var Icon_1 = __importDefault(require("../Icon/Icon"));
21
21
  var Tooltip_1 = __importDefault(require("../Tooltip"));
22
- var Spinner_1 = __importDefault(require("../Spinner"));
22
+ var Loader_1 = __importDefault(require("../Loader"));
23
23
  var ShoppingCartProduct = function (props) {
24
24
  var LinkComponent = function (_a) {
25
25
  var item = _a.item, children = _a.children;
26
26
  return item.component ? ((0, jsx_runtime_1.jsx)(item.component, { children: children })) : ((0, jsx_runtime_1.jsx)("a", { href: item.slug, children: children }));
27
27
  };
28
- return ((0, jsx_runtime_1.jsxs)(ShoppingCartProduct_styled_1.ShoppingCartProductStyled, __assign({}, props, { children: [(0, jsx_runtime_1.jsxs)("div", { className: "inner", children: [(0, jsx_runtime_1.jsx)("div", { className: "img", children: props.image }), (0, jsx_runtime_1.jsxs)("div", { className: "text", children: [(0, jsx_runtime_1.jsx)(LinkComponent, { item: props, children: (0, jsx_runtime_1.jsx)("strong", { className: "productCardTitle title-semi-bold-16-19", children: props.title }) }), (0, jsx_runtime_1.jsxs)("div", { className: "productCardPriceContent", children: [props.discountRate > 0 && (0, jsx_runtime_1.jsxs)("div", { className: "discountRate body-extra-bold-13-16", children: ["%", props.discountRate] }), (0, jsx_runtime_1.jsxs)("div", { children: [props.oldPrice && props.discountRate > 0 && ((0, jsx_runtime_1.jsxs)("div", { className: "oldPrice", children: [(0, jsx_runtime_1.jsx)("div", { className: "price caption-semi-bold-12-15", children: props.oldPrice }), (0, jsx_runtime_1.jsxs)("div", { className: "period caption-regular-12-15", children: ["/ ", props.oldPricePeriod] })] })), (0, jsx_runtime_1.jsxs)("div", { className: "newPrice", children: [(0, jsx_runtime_1.jsx)("div", { className: "price body-extra-bold-14-17", children: props.price }), (0, jsx_runtime_1.jsxs)("div", { className: "period body-regular-13-16", children: ["/ ", props.period] })] })] })] }), (0, jsx_runtime_1.jsxs)("p", { className: "productCardDeliveryText body-medium-13-16", children: [props.deliveryDangerText && (0, jsx_runtime_1.jsx)("span", { className: "productCardDeliveryDanger", children: props.deliveryDangerText }), props.deliveryText] })] }), (0, jsx_runtime_1.jsxs)("div", { className: "actions", children: [(0, jsx_runtime_1.jsxs)(ShoppingCartProduct_styled_1.ActionButton, { disabled: props.hasLoading || props.hasError, onClick: props.onIncrement, className: "actionButton", children: [(0, jsx_runtime_1.jsx)(Icon_1.default, { name: "PlusSmall", width: "16px", height: "16px" }), props.hasError && (0, jsx_runtime_1.jsx)("div", { className: (0, classnames_1.default)("popup", "caption-semi-bold-12-15"), children: props.errorText })] }), (0, jsx_runtime_1.jsx)("div", { className: "quantity body-extra-bold-13-16", children: props.hasLoading ? (0, jsx_runtime_1.jsx)(Spinner_1.default, { variant: "primary", width: "16px", height: "16px" }) : props.quantity }), props.hasRemove ? ((0, jsx_runtime_1.jsx)(ShoppingCartProduct_styled_1.ActionButton, { disabled: props.hasLoading, onClick: props.onRemove, className: "actionButton", children: (0, jsx_runtime_1.jsx)(Icon_1.default, { name: "Delete", width: "16px", height: "16px" }) })) : ((0, jsx_runtime_1.jsx)(ShoppingCartProduct_styled_1.ActionButton, { disabled: props.hasLoading, onClick: props.onDecrement, className: "actionButton", children: (0, jsx_runtime_1.jsx)(Icon_1.default, { name: "NegativeSmall", width: "16px", height: "16px" }) }))] })] }), props.hasInsurance && ((0, jsx_runtime_1.jsxs)("div", { onClick: !props.hasLoading && props.toggleInsurance, className: "insurance", children: [(0, jsx_runtime_1.jsx)("div", { className: "insuranceImg", children: (0, jsx_runtime_1.jsx)(Icon_1.default, { name: "Tamamlarsin", width: "64.51px", height: "7.37px" }) }), (0, jsx_runtime_1.jsxs)("div", { className: "text caption-semi-bold-12-15", children: [props.insuranceText, props.insurancePrice && (0, jsx_runtime_1.jsxs)("p", { className: "price caption-extra-bold-12-15", children: [props.insurancePrice, (0, jsx_runtime_1.jsx)("span", { className: "quantity", children: props.insuranceQuantity })] })] }), (0, jsx_runtime_1.jsx)("div", { className: "actions", children: props.hasInsuranceTooltip ? ((0, jsx_runtime_1.jsx)(Tooltip_1.default, { popupRight: "-16px", hasClickAction: props.hasInsuranceTooltipClickAction, popupWidth: props.insuranceTooltipWidth, position: "bottomRight", children: props.insuranceTooltipText })) : (props.insurancePrice ? ((0, jsx_runtime_1.jsx)(ShoppingCartProduct_styled_1.ActionButton, { disabled: props.hasLoading, className: "actionButton", children: (0, jsx_runtime_1.jsx)(Icon_1.default, { name: "Delete", width: "16px", height: "16px" }) })) : ((0, jsx_runtime_1.jsx)(ShoppingCartProduct_styled_1.ActionButton, { disabled: props.hasLoading, className: "actionButton", children: (0, jsx_runtime_1.jsx)(Icon_1.default, { name: "ArrowSmallRight", width: "24px", height: "24px" }) }))) })] }))] })));
28
+ return ((0, jsx_runtime_1.jsxs)(ShoppingCartProduct_styled_1.ShoppingCartProductStyled, __assign({}, props, { children: [(0, jsx_runtime_1.jsxs)("div", { className: "inner", children: [(0, jsx_runtime_1.jsx)("div", { className: "img", children: props.image }), (0, jsx_runtime_1.jsxs)("div", { className: "text", children: [(0, jsx_runtime_1.jsx)(LinkComponent, { item: props, children: (0, jsx_runtime_1.jsx)("strong", { className: "productCardTitle title-semi-bold-16-19", children: props.title }) }), (0, jsx_runtime_1.jsxs)("div", { className: "productCardPriceContent", children: [props.discountRate > 0 && (0, jsx_runtime_1.jsxs)("div", { className: "discountRate body-extra-bold-13-16", children: ["%", props.discountRate] }), (0, jsx_runtime_1.jsxs)("div", { children: [props.oldPrice && props.discountRate > 0 && ((0, jsx_runtime_1.jsxs)("div", { className: "oldPrice", children: [(0, jsx_runtime_1.jsx)("div", { className: "price caption-semi-bold-12-15", children: props.oldPrice }), (0, jsx_runtime_1.jsxs)("div", { className: "period caption-regular-12-15", children: ["/ ", props.oldPricePeriod] })] })), (0, jsx_runtime_1.jsxs)("div", { className: "newPrice", children: [(0, jsx_runtime_1.jsx)("div", { className: "price body-extra-bold-14-17", children: props.price }), (0, jsx_runtime_1.jsxs)("div", { className: "period body-regular-13-16", children: ["/ ", props.period] })] })] })] }), (0, jsx_runtime_1.jsxs)("p", { className: "productCardDeliveryText body-medium-13-16", children: [props.deliveryDangerText && (0, jsx_runtime_1.jsx)("span", { className: "productCardDeliveryDanger", children: props.deliveryDangerText }), props.deliveryText] })] }), (0, jsx_runtime_1.jsxs)("div", { className: "actions", children: [(0, jsx_runtime_1.jsxs)(ShoppingCartProduct_styled_1.ActionButton, { disabled: props.hasLoading || props.hasError, onClick: props.onIncrement, className: "actionButton", children: [(0, jsx_runtime_1.jsx)(Icon_1.default, { name: "PlusSmall", width: "16px", height: "16px" }), props.hasError && (0, jsx_runtime_1.jsx)("div", { className: (0, classnames_1.default)("popup", "caption-semi-bold-12-15"), children: props.errorText })] }), (0, jsx_runtime_1.jsx)("div", { className: "quantity body-extra-bold-13-16", children: props.hasLoading ? (0, jsx_runtime_1.jsx)(Loader_1.default, { variant: "primary", width: "16px", height: "16px" }) : props.quantity }), props.hasRemove ? ((0, jsx_runtime_1.jsx)(ShoppingCartProduct_styled_1.ActionButton, { disabled: props.hasLoading, onClick: props.onRemove, className: "actionButton", children: (0, jsx_runtime_1.jsx)(Icon_1.default, { name: "Delete", width: "16px", height: "16px" }) })) : ((0, jsx_runtime_1.jsx)(ShoppingCartProduct_styled_1.ActionButton, { disabled: props.hasLoading, onClick: props.onDecrement, className: "actionButton", children: (0, jsx_runtime_1.jsx)(Icon_1.default, { name: "NegativeSmall", width: "16px", height: "16px" }) }))] })] }), props.hasInsurance && ((0, jsx_runtime_1.jsxs)("div", { onClick: !props.hasLoading && props.toggleInsurance, className: "insurance", children: [(0, jsx_runtime_1.jsx)("div", { className: "insuranceImg", children: (0, jsx_runtime_1.jsx)(Icon_1.default, { name: "Tamamlarsin", width: "80px", height: "9.14px" }) }), (0, jsx_runtime_1.jsxs)("div", { className: "text caption-semi-bold-12-15", children: [props.insuranceText, props.insurancePrice && (0, jsx_runtime_1.jsxs)("p", { className: "price caption-extra-bold-12-15", children: [props.insurancePrice, (0, jsx_runtime_1.jsx)("span", { className: "quantity", children: props.insuranceQuantity })] })] }), (0, jsx_runtime_1.jsx)("div", { className: "actions", children: props.hasInsuranceTooltip ? ((0, jsx_runtime_1.jsx)(Tooltip_1.default, { popupRight: "-16px", hasClickAction: props.hasInsuranceTooltipClickAction, popupWidth: props.insuranceTooltipWidth, position: "bottomRight", children: props.insuranceTooltipText })) : (props.insurancePrice ? ((0, jsx_runtime_1.jsx)(ShoppingCartProduct_styled_1.ActionButton, { disabled: props.hasLoading, className: "actionButton", children: (0, jsx_runtime_1.jsx)(Icon_1.default, { name: "Delete", width: "16px", height: "16px" }) })) : ((0, jsx_runtime_1.jsx)(ShoppingCartProduct_styled_1.ActionButton, { disabled: props.hasLoading, className: "actionButton", children: (0, jsx_runtime_1.jsx)(Icon_1.default, { name: "ArrowSmallRight", width: "24px", height: "24px" }) }))) })] }))] })));
29
29
  };
30
30
  ShoppingCartProduct.defaultProps = {
31
31
  insuranceText: "Tamamlayıcı ek güvence ekle",
@@ -18,12 +18,13 @@ var jsx_runtime_1 = require("react/jsx-runtime");
18
18
  var TextLink_styled_1 = require("./TextLink.styled");
19
19
  var Icon_1 = __importDefault(require("../Icon/Icon"));
20
20
  var TextLink = function (props) {
21
- var onClick = props.onClick, children = props.children, href = props.href, target = props.target, icon = props.icon, iconWidth = props.iconWidth, iconHeight = props.iconHeight;
22
- return ((0, jsx_runtime_1.jsx)(TextLink_styled_1.TextLinkStyled, __assign({ href: href, target: target, onClick: onClick }, props, { children: (0, jsx_runtime_1.jsxs)(TextLink_styled_1.Inner, { children: [icon && ((0, jsx_runtime_1.jsx)(TextLink_styled_1.IconStyled, { children: (0, jsx_runtime_1.jsx)(Icon_1.default, { name: icon, width: iconWidth, height: iconHeight }) })), children] }) })));
21
+ var onClick = props.onClick, children = props.children, href = props.href, target = props.target, icon = props.icon, iconWidth = props.iconWidth, iconHeight = props.iconHeight, size = props.size;
22
+ return ((0, jsx_runtime_1.jsx)(TextLink_styled_1.TextLinkStyled, __assign({ size: size, href: href, target: target, onClick: onClick }, props, { children: (0, jsx_runtime_1.jsxs)(TextLink_styled_1.Inner, { children: [icon && ((0, jsx_runtime_1.jsx)(TextLink_styled_1.IconStyled, { children: (0, jsx_runtime_1.jsx)(Icon_1.default, { name: icon, width: iconWidth, height: iconHeight }) })), children] }) })));
23
23
  };
24
24
  TextLink.defaultProps = {
25
25
  iconWidth: "24px",
26
26
  iconHeight: "24px",
27
27
  variant: "primary",
28
+ size: "small",
28
29
  };
29
30
  exports.default = TextLink;
@@ -9,7 +9,16 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
9
9
  Object.defineProperty(exports, "__esModule", { value: true });
10
10
  exports.Inner = exports.IconStyled = exports.TextLinkStyled = void 0;
11
11
  var styled_components_1 = __importDefault(require("styled-components"));
12
- exports.TextLinkStyled = styled_components_1.default.a(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n color: ", ";\n font-size: inherit;\n font-family: inherit;\n font-weight: inherit;\n display: inline-block;\n text-decoration: none;\n cursor: pointer;\n svg{\n display: block;\n path, rect{\n stroke : ", ";\n }\n circle{\n fill : ", ";\n ~ path{\n stroke : white;\n }\n }\n }\n &:hover , :focus , :active {\n color: ", ";\n svg{\n display: block;\n path, rect{\n stroke : ", ";\n }\n circle{\n fill : ", ";\n ~ path{\n stroke : white;\n }\n }\n }\n }\n"], ["\n color: ", ";\n font-size: inherit;\n font-family: inherit;\n font-weight: inherit;\n display: inline-block;\n text-decoration: none;\n cursor: pointer;\n svg{\n display: block;\n path, rect{\n stroke : ", ";\n }\n circle{\n fill : ", ";\n ~ path{\n stroke : white;\n }\n }\n }\n &:hover , :focus , :active {\n color: ", ";\n svg{\n display: block;\n path, rect{\n stroke : ", ";\n }\n circle{\n fill : ", ";\n ~ path{\n stroke : white;\n }\n }\n }\n }\n"])), function (props) { return props.variant === "primary" ? "var(--primary)" : "var(--grey-50)"; }, function (props) { return props.variant === "primary" ? "var(--primary)" : "var(--grey-50)"; }, function (props) { return props.variant === "primary" ? "var(--primary)" : "var(--grey-50)"; }, function (props) { return props.variant === "primary" ? "var(--primary-hover)" : "var(--grey-50)"; }, function (props) { return props.variant === "primary" ? "var(--primary-hover)" : "var(--grey-50)"; }, function (props) { return props.variant === "primary" ? "var(--primary-hover)" : "var(--grey-50)"; });
12
+ exports.TextLinkStyled = styled_components_1.default.a(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n color: ", ";\n font-size: inherit;\n font-family: inherit;\n font-weight: inherit;\n display: inline-block;\n text-decoration: none;\n cursor: pointer;\n padding: ", ";\n svg{\n display: block;\n path, rect{\n stroke : ", ";\n }\n circle{\n fill : ", ";\n ~ path{\n stroke : white;\n }\n }\n }\n &:hover , :focus , :active {\n color: ", ";\n svg{\n display: block;\n path, rect{\n stroke : ", ";\n }\n circle{\n fill : ", ";\n ~ path{\n stroke : white;\n }\n }\n }\n }\n"], ["\n color: ", ";\n font-size: inherit;\n font-family: inherit;\n font-weight: inherit;\n display: inline-block;\n text-decoration: none;\n cursor: pointer;\n padding: ", ";\n svg{\n display: block;\n path, rect{\n stroke : ", ";\n }\n circle{\n fill : ", ";\n ~ path{\n stroke : white;\n }\n }\n }\n &:hover , :focus , :active {\n color: ", ";\n svg{\n display: block;\n path, rect{\n stroke : ", ";\n }\n circle{\n fill : ", ";\n ~ path{\n stroke : white;\n }\n }\n }\n }\n"])), function (props) { return props.variant === "primary" ? "var(--primary)" : "var(--grey-50)"; }, function (props) {
13
+ switch (props.size) {
14
+ case 'small':
15
+ return "0";
16
+ case 'medium':
17
+ return "0.5rem 0 0.5rem 0";
18
+ default:
19
+ return "0";
20
+ }
21
+ }, function (props) { return props.variant === "primary" ? "var(--primary)" : "var(--grey-50)"; }, function (props) { return props.variant === "primary" ? "var(--primary)" : "var(--grey-50)"; }, function (props) { return props.variant === "primary" ? "var(--primary-hover)" : "var(--grey-50)"; }, function (props) { return props.variant === "primary" ? "var(--primary-hover)" : "var(--grey-50)"; }, function (props) { return props.variant === "primary" ? "var(--primary-hover)" : "var(--grey-50)"; });
13
22
  exports.IconStyled = styled_components_1.default.div(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n margin-right: 0.5rem;\n"], ["\n margin-right: 0.5rem;\n"])));
14
23
  exports.Inner = styled_components_1.default.div(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n display: flex;\n align-items: center;\n justify-content: flex-start;\n"], ["\n display: flex;\n align-items: center;\n justify-content: flex-start;\n"])));
15
24
  var templateObject_1, templateObject_2, templateObject_3;
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.iconNames = exports.variants = void 0;
3
+ exports.iconNames = exports.sizes = exports.variants = void 0;
4
4
  var Icon_1 = require("../Icon");
5
5
  exports.variants = ['primary', 'secondary'];
6
+ exports.sizes = ['small', 'medium'];
6
7
  exports.iconNames = Object.keys(Icon_1.iconList);
@@ -13,6 +13,7 @@ exports.default = {
13
13
  tags: ['autodocs'],
14
14
  argTypes: {
15
15
  variant: { control: 'select', options: props_1.variants },
16
+ size: { control: 'select', options: props_1.sizes },
16
17
  icon: { control: 'select', options: Object.keys(Icon_1.iconList) },
17
18
  }
18
19
  };
@@ -20,5 +21,6 @@ exports.Default = {
20
21
  args: {
21
22
  children: "Text Link",
22
23
  variant: "primary",
24
+ size: "small",
23
25
  },
24
26
  };
package/dist/index.js CHANGED
@@ -3,11 +3,9 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.ShoppingCartProduct = exports.CouponCode = exports.InfoBox = exports.ContentBox = exports.ListGroup = exports.InsuranceBox = exports.Tooltip = exports.TextLink = exports.SelectBox = exports.Badges = exports.Carousel = exports.SuggestBox = exports.Toast = exports.Banner = exports.Accordion = exports.Divider = exports.SearchBox = exports.ValueProposition = exports.Textarea = exports.ActionButton = exports.RadioButton = exports.Icon = exports.Agreement = exports.Alert = exports.Stepper = exports.ProductCard = exports.OtpInput = exports.Modal = exports.Input = exports.CircleProgress = exports.Checkbox = exports.CategoryMenu = exports.Breadcrumbs = exports.Spinner = exports.Button = void 0;
6
+ exports.Loader = exports.ShoppingCartProduct = exports.CouponCode = exports.InfoBox = exports.ContentBox = exports.ListGroup = exports.InsuranceBox = exports.Tooltip = exports.TextLink = exports.SelectBox = exports.Badges = exports.Carousel = exports.SuggestBox = exports.Toast = exports.Banner = exports.Accordion = exports.Divider = exports.SearchBox = exports.ValueProposition = exports.Textarea = exports.ActionButton = exports.RadioButton = exports.Icon = exports.Agreement = exports.Alert = exports.Stepper = exports.ProductCard = exports.OtpInput = exports.Modal = exports.Input = exports.CircleProgress = exports.Checkbox = exports.CategoryMenu = exports.Breadcrumbs = exports.Button = void 0;
7
7
  var Button_1 = __importDefault(require("./components/Button"));
8
8
  exports.Button = Button_1.default;
9
- var Spinner_1 = __importDefault(require("./components/Spinner"));
10
- exports.Spinner = Spinner_1.default;
11
9
  var Breadcrumbs_1 = __importDefault(require("./components/Breadcrumbs"));
12
10
  exports.Breadcrumbs = Breadcrumbs_1.default;
13
11
  var CategoryMenu_1 = __importDefault(require("./components/CategoryMenu"));
@@ -74,3 +72,5 @@ var CouponCode_1 = __importDefault(require("./components/CouponCode"));
74
72
  exports.CouponCode = CouponCode_1.default;
75
73
  var ShoppingCartProduct_1 = __importDefault(require("./components/ShoppingCartProduct"));
76
74
  exports.ShoppingCartProduct = ShoppingCartProduct_1.default;
75
+ var Loader_1 = __importDefault(require("./components/Loader"));
76
+ exports.Loader = Loader_1.default;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "krl-alfred",
3
- "version": "1.71.9",
3
+ "version": "1.72.0",
4
4
  "files": [
5
5
  "dist"
6
6
  ],
@@ -1,13 +0,0 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- var jsx_runtime_1 = require("react/jsx-runtime");
7
- var Spinner_styled_1 = require("./Spinner.styled");
8
- var SpinnerIcon_1 = __importDefault(require("../../assets/svg/SpinnerIcon"));
9
- var Spinner = function (props) {
10
- var width = props.width, height = props.height, variant = props.variant;
11
- return ((0, jsx_runtime_1.jsx)(Spinner_styled_1.SpinnerStyled, { width: width, height: height, variant: variant, children: (0, jsx_runtime_1.jsx)(SpinnerIcon_1.default, { width: width, height: height }) }));
12
- };
13
- exports.default = Spinner;
@@ -1,5 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.variants = void 0;
4
- exports.variants = ['primary', 'secondary'];
5
- var SpinnerDefault = { width: '16px', height: '16px', variant: 'primary' };