krl-alfred 1.15.0 → 1.16.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.
@@ -0,0 +1,29 @@
1
+ "use strict";
2
+ var __assign = (this && this.__assign) || function () {
3
+ __assign = Object.assign || function(t) {
4
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
5
+ s = arguments[i];
6
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
7
+ t[p] = s[p];
8
+ }
9
+ return t;
10
+ };
11
+ return __assign.apply(this, arguments);
12
+ };
13
+ Object.defineProperty(exports, "__esModule", { value: true });
14
+ var jsx_runtime_1 = require("react/jsx-runtime");
15
+ var CircleProgress_styled_1 = require("./CircleProgress.styled");
16
+ var react_circular_progressbar_1 = require("react-circular-progressbar");
17
+ require("react-circular-progressbar/dist/styles.css");
18
+ var CircleProgress = function (props) {
19
+ var _a, _b;
20
+ return (0, jsx_runtime_1.jsxs)(CircleProgress_styled_1.CircleProgressStyled, __assign({}, props, { children: [(0, jsx_runtime_1.jsx)("div", { className: "icon", children: (0, jsx_runtime_1.jsx)(react_circular_progressbar_1.CircularProgressbarWithChildren, { styles: (0, react_circular_progressbar_1.buildStyles)({
21
+ pathColor: "var(--primary)",
22
+ trailColor: "var(--dark-opacity-5)"
23
+ }), strokeWidth: 12, value: props.activeStep / props.steps.length * 100, children: (0, jsx_runtime_1.jsxs)("div", { className: "text body-bold-14-17", children: [(0, jsx_runtime_1.jsxs)("span", { className: "title-bold-16-19", children: [props.activeStep, "/"] }), props.steps.length] }) }) }), (0, jsx_runtime_1.jsxs)("div", { className: "info", children: [(0, jsx_runtime_1.jsx)("h1", { className: "title-bold-16-19", children: (_a = props.steps.find(function (p) { return p.index === props.activeStep; })) === null || _a === void 0 ? void 0 : _a.text }), (0, jsx_runtime_1.jsx)("p", { className: "body-regular-13-16", children: props.activeStep === props.steps.length ? 'Bütün adımları tamamladınız' : "Sonraki Ad\u0131m: ".concat((_b = props.steps.find(function (p) { return p.index === props.activeStep + 1; })) === null || _b === void 0 ? void 0 : _b.text) })] })] }));
24
+ };
25
+ CircleProgress.defaultProps = {
26
+ steps: [],
27
+ activeStep: 1
28
+ };
29
+ exports.default = CircleProgress;
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
3
+ if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
4
+ return cooked;
5
+ };
6
+ var __importDefault = (this && this.__importDefault) || function (mod) {
7
+ return (mod && mod.__esModule) ? mod : { "default": mod };
8
+ };
9
+ Object.defineProperty(exports, "__esModule", { value: true });
10
+ exports.CircleProgressStyled = void 0;
11
+ var styled_components_1 = __importDefault(require("styled-components"));
12
+ exports.CircleProgressStyled = styled_components_1.default.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n width: 343px;\n display: flex;\n justify-content: space-between;\n font-family: var(--font-family-sans-serif);\n div.icon {\n width: 56px;\n height: 56px;\n }\n\n div.info {\n display: flex;\n flex-direction: column;\n align-items: flex-end;\n \n h1 {\n color: var(--dark);\n margin: 0 0 4px;\n }\n p {\n color: var(--dark-opacity-50);\n margin: 0;\n }\n }\n \n div.text {\n color: var(--dark);\n \n }\n"], ["\n width: 343px;\n display: flex;\n justify-content: space-between;\n font-family: var(--font-family-sans-serif);\n div.icon {\n width: 56px;\n height: 56px;\n }\n\n div.info {\n display: flex;\n flex-direction: column;\n align-items: flex-end;\n \n h1 {\n color: var(--dark);\n margin: 0 0 4px;\n }\n p {\n color: var(--dark-opacity-50);\n margin: 0;\n }\n }\n \n div.text {\n color: var(--dark);\n \n }\n"])));
13
+ var templateObject_1;
@@ -0,0 +1,8 @@
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
+ exports.default = void 0;
7
+ var CircleProgress_1 = require("./CircleProgress");
8
+ Object.defineProperty(exports, "default", { enumerable: true, get: function () { return __importDefault(CircleProgress_1).default; } });
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,19 @@
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
+ exports.Default = void 0;
7
+ var CircleProgress_1 = __importDefault(require("../CircleProgress"));
8
+ exports.default = {
9
+ title: 'Components/CircleProgress',
10
+ component: CircleProgress_1.default,
11
+ tags: ['autodocs'],
12
+ argTypes: {}
13
+ };
14
+ exports.Default = {
15
+ args: {
16
+ steps: [{ index: 1, text: "Step 1" }, { index: 2, text: "Step 2" }, { index: 3, text: "Step 3" }],
17
+ activeStep: 1
18
+ },
19
+ };
@@ -0,0 +1,40 @@
1
+ "use strict";
2
+ var __assign = (this && this.__assign) || function () {
3
+ __assign = Object.assign || function(t) {
4
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
5
+ s = arguments[i];
6
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
7
+ t[p] = s[p];
8
+ }
9
+ return t;
10
+ };
11
+ return __assign.apply(this, arguments);
12
+ };
13
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
14
+ if (k2 === undefined) k2 = k;
15
+ var desc = Object.getOwnPropertyDescriptor(m, k);
16
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
17
+ desc = { enumerable: true, get: function() { return m[k]; } };
18
+ }
19
+ Object.defineProperty(o, k2, desc);
20
+ }) : (function(o, m, k, k2) {
21
+ if (k2 === undefined) k2 = k;
22
+ o[k2] = m[k];
23
+ }));
24
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
25
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
26
+ }) : function(o, v) {
27
+ o["default"] = v;
28
+ });
29
+ var __importStar = (this && this.__importStar) || function (mod) {
30
+ if (mod && mod.__esModule) return mod;
31
+ var result = {};
32
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
33
+ __setModuleDefault(result, mod);
34
+ return result;
35
+ };
36
+ Object.defineProperty(exports, "__esModule", { value: true });
37
+ var jsx_runtime_1 = require("react/jsx-runtime");
38
+ var React = __importStar(require("react"));
39
+ var SvgCheckMark = function (props) { return ((0, jsx_runtime_1.jsx)("svg", __assign({ width: 17, height: 14, viewBox: "0 0 17 14", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, props, { children: (0, jsx_runtime_1.jsx)("path", { d: "M6.98847 8.08784C6.57099 8.54447 5.85167 8.54447 5.43418 8.08784L4.21825 6.75792C3.47877 5.94911 2.20466 5.94911 1.46518 6.75792C0.813691 7.47048 0.81369 8.56245 1.46518 9.27501L4.65703 12.7661C5.492 13.6794 6.93065 13.6794 7.76562 12.7661L16.0119 3.74675C16.6634 3.03418 16.6634 1.94222 16.0119 1.22965C15.2724 0.420845 13.9983 0.420845 13.2588 1.22965L6.98847 8.08784Z", fill: "white" }) }))); };
40
+ exports.default = SvgCheckMark;
@@ -0,0 +1,40 @@
1
+ "use strict";
2
+ var __assign = (this && this.__assign) || function () {
3
+ __assign = Object.assign || function(t) {
4
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
5
+ s = arguments[i];
6
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
7
+ t[p] = s[p];
8
+ }
9
+ return t;
10
+ };
11
+ return __assign.apply(this, arguments);
12
+ };
13
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
14
+ if (k2 === undefined) k2 = k;
15
+ var desc = Object.getOwnPropertyDescriptor(m, k);
16
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
17
+ desc = { enumerable: true, get: function() { return m[k]; } };
18
+ }
19
+ Object.defineProperty(o, k2, desc);
20
+ }) : (function(o, m, k, k2) {
21
+ if (k2 === undefined) k2 = k;
22
+ o[k2] = m[k];
23
+ }));
24
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
25
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
26
+ }) : function(o, v) {
27
+ o["default"] = v;
28
+ });
29
+ var __importStar = (this && this.__importStar) || function (mod) {
30
+ if (mod && mod.__esModule) return mod;
31
+ var result = {};
32
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
33
+ __setModuleDefault(result, mod);
34
+ return result;
35
+ };
36
+ Object.defineProperty(exports, "__esModule", { value: true });
37
+ var jsx_runtime_1 = require("react/jsx-runtime");
38
+ var React = __importStar(require("react"));
39
+ var SvgErrorIcon = function (props) { return ((0, jsx_runtime_1.jsxs)("svg", __assign({ width: 16, height: 16, viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, props, { children: [(0, jsx_runtime_1.jsx)("rect", { width: 16, height: 16, rx: 8, fill: "white" }), (0, jsx_runtime_1.jsx)("circle", { cx: 8, cy: 8, r: 8, fill: "#FF1F1F" }), (0, jsx_runtime_1.jsx)("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M7.99844 4.69844C6.17615 4.69844 4.69844 6.17615 4.69844 7.99844C4.69844 9.82072 6.17615 11.2984 7.99844 11.2984C9.8211 11.2984 11.2984 9.82075 11.2984 7.99844C11.2984 6.17612 9.8211 4.69844 7.99844 4.69844ZM3.89844 7.99844C3.89844 5.73432 5.73432 3.89844 7.99844 3.89844C10.263 3.89844 12.0984 5.73435 12.0984 7.99844C12.0984 10.2625 10.263 12.0984 7.99844 12.0984C5.73432 12.0984 3.89844 10.2626 3.89844 7.99844Z", fill: "white" }), (0, jsx_runtime_1.jsx)("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M7.9957 6.08008C8.21662 6.08008 8.3957 6.25916 8.3957 6.48008V8.24768C8.3957 8.46859 8.21662 8.64768 7.9957 8.64768C7.77479 8.64768 7.5957 8.46859 7.5957 8.24768V6.48008C7.5957 6.25916 7.77479 6.08008 7.9957 6.08008Z", fill: "white" }), (0, jsx_runtime_1.jsx)("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M7.5957 9.51719C7.5957 9.29627 7.77479 9.11719 7.9957 9.11719H7.9997C8.22062 9.11719 8.3997 9.29627 8.3997 9.51719C8.3997 9.7381 8.22062 9.91719 7.9997 9.91719H7.9957C7.77479 9.91719 7.5957 9.7381 7.5957 9.51719Z", fill: "white" })] }))); };
40
+ exports.default = SvgErrorIcon;
@@ -25,7 +25,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
25
25
  return (mod && mod.__esModule) ? mod : { "default": mod };
26
26
  };
27
27
  Object.defineProperty(exports, "__esModule", { value: true });
28
- exports.iconList = exports.Watch = exports.SwitchPassive = exports.Show = exports.Laptop = exports.KeyboardClose = exports.InfoSquare = exports.House = exports.Hide = exports.Heart = exports.Game = exports.Discovery = exports.Danger = exports.CloseHover = exports.Close = exports.CheckboxElementUncheck = exports.CheckboxElementInvalid = exports.CheckboxElementDisabled = exports.CheckboxElementChecked = exports.Campaign = exports.Call = exports.Baby = exports.ArrowSmallUp = exports.ArrowSmallRight = exports.ArrowSmallDown = exports.ArrowRight = exports.ArrowMediumRight = exports.ArrowMedium = exports.ArrowLeft = exports.ArrowDown = exports.Again = void 0;
28
+ exports.iconList = exports.Watch = exports.SwitchPassive = exports.Show = exports.Laptop = exports.KeyboardClose = exports.InfoSquare = exports.House = exports.Hide = exports.Heart = exports.Game = exports.ErrorIcon = exports.Discovery = exports.Danger = exports.CloseHover = exports.Close = exports.CheckMark = exports.CheckboxElementUncheck = exports.CheckboxElementInvalid = exports.CheckboxElementDisabled = exports.CheckboxElementChecked = exports.Campaign = exports.Call = exports.Baby = exports.ArrowSmallUp = exports.ArrowSmallRight = exports.ArrowSmallDown = exports.ArrowRight = exports.ArrowMediumRight = exports.ArrowMedium = exports.ArrowLeft = exports.ArrowDown = exports.Again = void 0;
29
29
  var jsx_runtime_1 = require("react/jsx-runtime");
30
30
  var Again_1 = __importDefault(require("./Again"));
31
31
  Object.defineProperty(exports, "Again", { enumerable: true, get: function () { return Again_1.default; } });
@@ -59,6 +59,8 @@ var CheckboxElementInvalid_1 = __importDefault(require("./CheckboxElementInvalid
59
59
  Object.defineProperty(exports, "CheckboxElementInvalid", { enumerable: true, get: function () { return CheckboxElementInvalid_1.default; } });
60
60
  var CheckboxElementUncheck_1 = __importDefault(require("./CheckboxElementUncheck"));
61
61
  Object.defineProperty(exports, "CheckboxElementUncheck", { enumerable: true, get: function () { return CheckboxElementUncheck_1.default; } });
62
+ var CheckMark_1 = __importDefault(require("./CheckMark"));
63
+ Object.defineProperty(exports, "CheckMark", { enumerable: true, get: function () { return CheckMark_1.default; } });
62
64
  var Close_1 = __importDefault(require("./Close"));
63
65
  Object.defineProperty(exports, "Close", { enumerable: true, get: function () { return Close_1.default; } });
64
66
  var CloseHover_1 = __importDefault(require("./CloseHover"));
@@ -67,6 +69,8 @@ var Danger_1 = __importDefault(require("./Danger"));
67
69
  Object.defineProperty(exports, "Danger", { enumerable: true, get: function () { return Danger_1.default; } });
68
70
  var Discovery_1 = __importDefault(require("./Discovery"));
69
71
  Object.defineProperty(exports, "Discovery", { enumerable: true, get: function () { return Discovery_1.default; } });
72
+ var ErrorIcon_1 = __importDefault(require("./ErrorIcon"));
73
+ Object.defineProperty(exports, "ErrorIcon", { enumerable: true, get: function () { return ErrorIcon_1.default; } });
70
74
  var Game_1 = __importDefault(require("./Game"));
71
75
  Object.defineProperty(exports, "Game", { enumerable: true, get: function () { return Game_1.default; } });
72
76
  var Heart_1 = __importDefault(require("./Heart"));
@@ -152,6 +156,10 @@ exports.iconList = {
152
156
  var props = __rest(_a, []);
153
157
  return ((0, jsx_runtime_1.jsx)(CheckboxElementUncheck_1.default, __assign({}, props)));
154
158
  },
159
+ CheckMark: function (_a) {
160
+ var props = __rest(_a, []);
161
+ return (0, jsx_runtime_1.jsx)(CheckMark_1.default, __assign({}, props));
162
+ },
155
163
  Close: function (_a) {
156
164
  var props = __rest(_a, []);
157
165
  return (0, jsx_runtime_1.jsx)(Close_1.default, __assign({}, props));
@@ -168,6 +176,10 @@ exports.iconList = {
168
176
  var props = __rest(_a, []);
169
177
  return (0, jsx_runtime_1.jsx)(Discovery_1.default, __assign({}, props));
170
178
  },
179
+ ErrorIcon: function (_a) {
180
+ var props = __rest(_a, []);
181
+ return (0, jsx_runtime_1.jsx)(ErrorIcon_1.default, __assign({}, props));
182
+ },
171
183
  Game: function (_a) {
172
184
  var props = __rest(_a, []);
173
185
  return (0, jsx_runtime_1.jsx)(Game_1.default, __assign({}, props));
@@ -0,0 +1,51 @@
1
+ "use strict";
2
+ var __assign = (this && this.__assign) || function () {
3
+ __assign = Object.assign || function(t) {
4
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
5
+ s = arguments[i];
6
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
7
+ t[p] = s[p];
8
+ }
9
+ return t;
10
+ };
11
+ return __assign.apply(this, arguments);
12
+ };
13
+ var __rest = (this && this.__rest) || function (s, e) {
14
+ var t = {};
15
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
16
+ t[p] = s[p];
17
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
18
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
19
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
20
+ t[p[i]] = s[p[i]];
21
+ }
22
+ return t;
23
+ };
24
+ var __importDefault = (this && this.__importDefault) || function (mod) {
25
+ return (mod && mod.__esModule) ? mod : { "default": mod };
26
+ };
27
+ Object.defineProperty(exports, "__esModule", { value: true });
28
+ var jsx_runtime_1 = require("react/jsx-runtime");
29
+ var react_1 = require("react");
30
+ var Input_styled_1 = require("./Input.styled");
31
+ var classnames_1 = __importDefault(require("classnames"));
32
+ var Icon_1 = __importDefault(require("../Icon/Icon"));
33
+ var Input = function (props) {
34
+ var _a;
35
+ var type = props.type, other = __rest(props, ["type"]);
36
+ var _b = (0, react_1.useState)(type), inputType = _b[0], setInputType = _b[1];
37
+ (0, react_1.useEffect)(function () {
38
+ setInputType(type);
39
+ }, [type]);
40
+ var toggleInputType = function () {
41
+ var newType = inputType === 'password' ? 'text' : 'password';
42
+ setInputType(newType);
43
+ };
44
+ return (0, jsx_runtime_1.jsxs)(Input_styled_1.Container, { children: [(0, jsx_runtime_1.jsxs)("div", { className: (0, classnames_1.default)("top caption-bold-12-15", (_a = {}, _a["justify-between"] = props === null || props === void 0 ? void 0 : props.customLinkText, _a)), children: [(0, jsx_runtime_1.jsx)("p", { children: props === null || props === void 0 ? void 0 : props.label }), (props === null || props === void 0 ? void 0 : props.customLinkText) && (0, jsx_runtime_1.jsx)("a", __assign({}, (props.customLinkHref && { href: props.customLinkHref }), { onClick: props.onCustomLinkClick, children: props === null || props === void 0 ? void 0 : props.customLinkText }))] }), (0, jsx_runtime_1.jsxs)("div", { className: "input", children: [(0, jsx_runtime_1.jsx)(Input_styled_1.InputStyled, __assign({ type: inputType }, other)), (props === null || props === void 0 ? void 0 : props.type) === 'password' && (0, jsx_runtime_1.jsx)("div", { onClick: toggleInputType, className: "showHide", children: (0, jsx_runtime_1.jsx)(Icon_1.default, { name: inputType === 'password' ? 'Show' : 'Hide' }) })] }), (props === null || props === void 0 ? void 0 : props.hasError) && (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 })] })] });
45
+ };
46
+ Input.defaultValues = {
47
+ hasError: false,
48
+ label: "Label",
49
+ type: "text"
50
+ };
51
+ exports.default = Input;
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
3
+ if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
4
+ return cooked;
5
+ };
6
+ var __importDefault = (this && this.__importDefault) || function (mod) {
7
+ return (mod && mod.__esModule) ? mod : { "default": mod };
8
+ };
9
+ Object.defineProperty(exports, "__esModule", { value: true });
10
+ exports.InputStyled = exports.Container = void 0;
11
+ var styled_components_1 = __importDefault(require("styled-components"));
12
+ exports.Container = styled_components_1.default.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n display: flex;\n flex-direction: column;\n width: 370px;\n\n .top {\n display: flex;\n margin-bottom: 16px;\n\n &.justify-between {\n justify-content: space-between;\n }\n\n p {\n margin: 0;\n color: var(--dark-opacity-50);\n }\n\n a {\n margin: 0;\n color: var(--primary);\n text-decoration: none;\n cursor: pointer;\n }\n }\n\n .input {\n position: relative;\n\n .showHide {\n position: absolute;\n width: 24px;\n height: 24px;\n top: 16px;\n right: 16px;\n cursor: pointer;\n }\n }\n\n .error {\n display: flex;\n align-items: center;\n margin-top: 8px;\n\n svg {\n margin-right: 8px;\n margin-left: 4px;\n }\n\n p {\n margin: 0;\n color: var(--red);\n }\n }\n"], ["\n display: flex;\n flex-direction: column;\n width: 370px;\n\n .top {\n display: flex;\n margin-bottom: 16px;\n\n &.justify-between {\n justify-content: space-between;\n }\n\n p {\n margin: 0;\n color: var(--dark-opacity-50);\n }\n\n a {\n margin: 0;\n color: var(--primary);\n text-decoration: none;\n cursor: pointer;\n }\n }\n\n .input {\n position: relative;\n\n .showHide {\n position: absolute;\n width: 24px;\n height: 24px;\n top: 16px;\n right: 16px;\n cursor: pointer;\n }\n }\n\n .error {\n display: flex;\n align-items: center;\n margin-top: 8px;\n\n svg {\n margin-right: 8px;\n margin-left: 4px;\n }\n\n p {\n margin: 0;\n color: var(--red);\n }\n }\n"])));
13
+ exports.InputStyled = styled_components_1.default.input(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n box-sizing: border-box;\n width: 370px;\n height: 56px;\n background: var(--dark-opacity-3);\n border-radius: 8px;\n border: ", ";\n padding: ", ";\n color: ", ";\n font-family: var(--font-family-sans-serif);\n font-style: normal;\n font-weight: 600;\n font-size: 14px;\n line-height: 17px;\n outline: none;\n\n &::placeholder {\n color: ", ";\n }\n\n\n &:focus {\n padding: 18.5px 23px;\n border: 2px solid ", ";\n color: ", ";\n background: white;\n }\n\n"], ["\n box-sizing: border-box;\n width: 370px;\n height: 56px;\n background: var(--dark-opacity-3);\n border-radius: 8px;\n border: ", ";\n padding: ", ";\n color: ", ";\n font-family: var(--font-family-sans-serif);\n font-style: normal;\n font-weight: 600;\n font-size: 14px;\n line-height: 17px;\n outline: none;\n\n &::placeholder {\n color: ", ";\n }\n\n\n &:focus {\n padding: 18.5px 23px;\n border: 2px solid ", ";\n color: ", ";\n background: white;\n }\n\n"])), function (props) { return props.hasError ? '2px solid var(--red)' : '1px solid var(--dark-opacity-10)'; }, function (props) { return props.hasError ? '18.5px 23px' : '19.5px 24px'; }, function (props) { return props.hasError ? 'var(--red)' : 'var(--dark)'; }, function (props) { return props.hasError ? 'var(--red)' : 'var(--dark-opacity-50)'; }, function (props) { return props.hasError ? 'var(--red)' : 'var(--primary)'; }, function (props) { return props.hasError ? 'var(--red)' : 'var(--dark)'; });
14
+ var templateObject_1, templateObject_2;
@@ -0,0 +1,8 @@
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
+ exports.default = void 0;
7
+ var Input_1 = require("./Input");
8
+ Object.defineProperty(exports, "default", { enumerable: true, get: function () { return __importDefault(Input_1).default; } });
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,25 @@
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
+ exports.Default = void 0;
7
+ var Input_1 = __importDefault(require("../Input"));
8
+ exports.default = {
9
+ title: 'Components/Input',
10
+ component: Input_1.default,
11
+ tags: ['autodocs'],
12
+ argTypes: {
13
+ hasError: { control: 'boolean' },
14
+ onCustomLinkClick: { action: 'clicked' },
15
+ type: { control: 'select', options: ["text", "number", "password"] },
16
+ }
17
+ };
18
+ exports.Default = {
19
+ args: {
20
+ placeholder: "Placeholder",
21
+ hasError: false,
22
+ label: "Label",
23
+ type: "text"
24
+ },
25
+ };
@@ -0,0 +1,29 @@
1
+ "use strict";
2
+ var __assign = (this && this.__assign) || function () {
3
+ __assign = Object.assign || function(t) {
4
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
5
+ s = arguments[i];
6
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
7
+ t[p] = s[p];
8
+ }
9
+ return t;
10
+ };
11
+ return __assign.apply(this, arguments);
12
+ };
13
+ var __importDefault = (this && this.__importDefault) || function (mod) {
14
+ return (mod && mod.__esModule) ? mod : { "default": mod };
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ var jsx_runtime_1 = require("react/jsx-runtime");
18
+ var OtpInput_styled_1 = require("./OtpInput.styled");
19
+ var react_otp_input_1 = __importDefault(require("react-otp-input"));
20
+ var Icon_1 = __importDefault(require("../Icon/Icon"));
21
+ var Otp = function (props) {
22
+ return (0, jsx_runtime_1.jsxs)(OtpInput_styled_1.OtpInputStyled, __assign({}, props, { children: [(0, jsx_runtime_1.jsx)(react_otp_input_1.default, { value: props.value, onChange: props.onInputChange, numInputs: props.inputSize, shouldAutoFocus: props.autoFocus, renderInput: function (props) { return (0, jsx_runtime_1.jsx)("input", __assign({}, props)); } }), (props === null || props === void 0 ? void 0 : props.hasError) && (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 })] })] }));
23
+ };
24
+ Otp.defaultProps = {
25
+ inputSize: 4,
26
+ hasError: false,
27
+ autoFocus: true
28
+ };
29
+ exports.default = Otp;
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
3
+ if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
4
+ return cooked;
5
+ };
6
+ var __importDefault = (this && this.__importDefault) || function (mod) {
7
+ return (mod && mod.__esModule) ? mod : { "default": mod };
8
+ };
9
+ Object.defineProperty(exports, "__esModule", { value: true });
10
+ exports.OtpInputStyled = void 0;
11
+ var styled_components_1 = __importDefault(require("styled-components"));
12
+ exports.OtpInputStyled = styled_components_1.default.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n display: flex;\n flex-direction: column;\n\n input {\n font-family: var(--font-family-sans-serif);\n border: none;\n width: 48px !important;\n height: 48px;\n border-bottom: 2px solid ", ";\n text-align: center;\n color: ", ";\n font-weight: 700;\n font-size: 16px;\n line-height: 19px;\n\n &:not(:last-child) {\n margin-right: 18.33px;\n }\n\n &:focus {\n outline: none;\n border-color: ", ";\n }\n }\n\n .error {\n display: flex;\n align-items: center;\n margin-top: 8px;\n\n svg {\n margin-right: 8px;\n }\n\n p {\n margin: 0;\n color: var(--red);\n }\n }\n"], ["\n display: flex;\n flex-direction: column;\n\n input {\n font-family: var(--font-family-sans-serif);\n border: none;\n width: 48px !important;\n height: 48px;\n border-bottom: 2px solid ", ";\n text-align: center;\n color: ", ";\n font-weight: 700;\n font-size: 16px;\n line-height: 19px;\n\n &:not(:last-child) {\n margin-right: 18.33px;\n }\n\n &:focus {\n outline: none;\n border-color: ", ";\n }\n }\n\n .error {\n display: flex;\n align-items: center;\n margin-top: 8px;\n\n svg {\n margin-right: 8px;\n }\n\n p {\n margin: 0;\n color: var(--red);\n }\n }\n"])), function (props) { return props.hasError ? 'var(--red)' : 'var(--dark-opacity-10)'; }, function (props) { return props.hasError ? 'var(--red)' : 'var(--dark)'; }, function (props) { return props.hasError ? 'var(--red)' : 'var(--dark)'; });
13
+ var templateObject_1;
@@ -0,0 +1,8 @@
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
+ exports.default = void 0;
7
+ var Otp_1 = require("./Otp");
8
+ Object.defineProperty(exports, "default", { enumerable: true, get: function () { return __importDefault(Otp_1).default; } });
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,21 @@
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
+ exports.Default = void 0;
7
+ var Otp_1 = __importDefault(require("../Otp"));
8
+ exports.default = {
9
+ title: 'Components/OtpInput',
10
+ component: Otp_1.default,
11
+ tags: ['autodocs'],
12
+ argTypes: {
13
+ onInputChange: { action: 'changed' },
14
+ }
15
+ };
16
+ exports.Default = {
17
+ args: {
18
+ value: "1234",
19
+ autoFocus: true
20
+ },
21
+ };
@@ -0,0 +1,36 @@
1
+ "use strict";
2
+ var __assign = (this && this.__assign) || function () {
3
+ __assign = Object.assign || function(t) {
4
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
5
+ s = arguments[i];
6
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
7
+ t[p] = s[p];
8
+ }
9
+ return t;
10
+ };
11
+ return __assign.apply(this, arguments);
12
+ };
13
+ var __importDefault = (this && this.__importDefault) || function (mod) {
14
+ return (mod && mod.__esModule) ? mod : { "default": mod };
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ var jsx_runtime_1 = require("react/jsx-runtime");
18
+ var Stepper_styled_1 = require("./Stepper.styled");
19
+ var Icon_1 = __importDefault(require("../Icon/Icon"));
20
+ var classnames_1 = __importDefault(require("classnames"));
21
+ var Stepper = function (props) {
22
+ return (0, jsx_runtime_1.jsx)(Stepper_styled_1.StepperStyled, __assign({}, props, { children: props.steps && props.steps.map(function (step) {
23
+ var _a, _b, _c, _d;
24
+ return (0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("div", { className: (0, classnames_1.default)("circle headline-extra-bold-24-29", (_a = {}, _a["active"] = props.activeStep >= step.index || props.allStepsCompleted, _a), (_b = {}, _b["onlyIcon"] = props.onlyIcons, _b)), children: props.activeStep > step.index || props.allStepsCompleted ? (0, jsx_runtime_1.jsx)(Icon_1.default, { name: "CheckMark" }) : step.index }), (props.size === "small" ? (props.activeStep === step.index) : true) && !props.onlyIcons && (0, jsx_runtime_1.jsx)("div", { className: (0, classnames_1.default)("text headline-semi-bold-24-29", (_c = {}, _c["active"] = props.activeStep >= step.index || props.allStepsCompleted, _c)), children: step.text }), props.steps.length > step.index && !props.onlyIcons &&
25
+ (0, jsx_runtime_1.jsx)("div", { className: (0, classnames_1.default)("divider", (_d = {}, _d["active"] = props.activeStep > step.index || props.allStepsCompleted, _d)) })] });
26
+ }) }));
27
+ };
28
+ Stepper.defaultProps = {
29
+ steps: [],
30
+ textOnlyActiveStep: false,
31
+ size: "normal",
32
+ onlyIcons: false,
33
+ activeStep: 1,
34
+ allStepsCompleted: false
35
+ };
36
+ exports.default = Stepper;
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
3
+ if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
4
+ return cooked;
5
+ };
6
+ var __importDefault = (this && this.__importDefault) || function (mod) {
7
+ return (mod && mod.__esModule) ? mod : { "default": mod };
8
+ };
9
+ Object.defineProperty(exports, "__esModule", { value: true });
10
+ exports.StepperStyled = void 0;
11
+ var styled_components_1 = __importDefault(require("styled-components"));
12
+ exports.StepperStyled = styled_components_1.default.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n display: flex;\n align-items: center;\n font-family: var(--font-family-sans-serif);\n\n div.circle {\n border-radius: 50%;\n width: ", ";\n height: ", ";\n display: flex;\n align-items: center;\n justify-content: center;\n background: var(--grey-10);\n color: var(--grey-40);\n\n &.active {\n background: var(--primary);\n color: white;\n }\n \n &.onlyIcon:not(:last-child) {\n margin-right: ", ";\n }\n\n }\n\n div.text {\n color: var(--grey-30);\n margin-left: ", ";\n\n &.active {\n color: var(--dark);\n }\n }\n\n div.divider {\n width: ", ";\n height: 1px;\n background: var(--grey-10);\n margin: ", ";\n\n &.active {\n background: var(--primary);\n }\n }\n\n"], ["\n display: flex;\n align-items: center;\n font-family: var(--font-family-sans-serif);\n\n div.circle {\n border-radius: 50%;\n width: ", ";\n height: ", ";\n display: flex;\n align-items: center;\n justify-content: center;\n background: var(--grey-10);\n color: var(--grey-40);\n\n &.active {\n background: var(--primary);\n color: white;\n }\n \n &.onlyIcon:not(:last-child) {\n margin-right: ", ";\n }\n\n }\n\n div.text {\n color: var(--grey-30);\n margin-left: ", ";\n\n &.active {\n color: var(--dark);\n }\n }\n\n div.divider {\n width: ", ";\n height: 1px;\n background: var(--grey-10);\n margin: ", ";\n\n &.active {\n background: var(--primary);\n }\n }\n\n"])), function (props) { return props.size === 'normal' ? '48px' : '40px'; }, function (props) { return props.size === 'normal' ? '48px' : '40px'; }, function (props) { return props.size === 'normal' ? '17px' : '25px'; }, function (props) { return props.size === 'normal' ? '16px' : '8px'; }, function (props) { return props.size === 'normal' ? '112px' : '16px'; }, function (props) { return props.size === 'normal' ? '0 24px' : '0 22px'; });
13
+ var templateObject_1;
@@ -0,0 +1,8 @@
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
+ exports.default = void 0;
7
+ var Stepper_1 = require("./Stepper");
8
+ Object.defineProperty(exports, "default", { enumerable: true, get: function () { return __importDefault(Stepper_1).default; } });
@@ -0,0 +1,4 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.sizes = void 0;
4
+ exports.sizes = ['normal', 'small'];
@@ -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
+ exports.Default = void 0;
7
+ var Stepper_1 = __importDefault(require("../Stepper"));
8
+ var props_1 = require("../props");
9
+ exports.default = {
10
+ title: 'Components/Stepper',
11
+ component: Stepper_1.default,
12
+ tags: ['autodocs'],
13
+ argTypes: {
14
+ size: { control: 'select', options: props_1.sizes },
15
+ allStepsCompleted: { control: 'boolean' }
16
+ }
17
+ };
18
+ exports.Default = {
19
+ args: {
20
+ steps: [{ index: 1, text: "Step 1" }, { index: 2, text: "Step 2" }, { index: 3, text: "Step 3" }],
21
+ activeStep: 1
22
+ },
23
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "krl-alfred",
3
- "version": "1.15.0",
3
+ "version": "1.16.0",
4
4
  "files": [
5
5
  "dist"
6
6
  ],
@@ -25,8 +25,10 @@
25
25
  "css-loader": "^6.7.3",
26
26
  "plop": "^3.1.2",
27
27
  "react": "^18.2.0",
28
+ "react-circular-progressbar": "^2.1.0",
28
29
  "react-device-detect": "^2.2.3",
29
30
  "react-dom": "^18.2.0",
31
+ "react-otp-input": "^3.0.2",
30
32
  "react-router-dom": "^6.10.0",
31
33
  "react-scripts": "^5.0.1",
32
34
  "sass": "^1.60.0",