krl-alfred 1.80.20 → 1.81.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.
- package/dist/components/Icon/iconList/Wallet2.js +1 -1
- package/dist/components/RadioScale/RadioScale.js +28 -0
- package/dist/components/RadioScale/RadioScale.styled.js +15 -0
- package/dist/components/RadioScale/index.js +8 -0
- package/dist/components/RadioScale/props.js +13 -0
- package/dist/components/RadioScale/stories/RadioScale.stories.js +38 -0
- package/dist/index.js +3 -1
- package/package.json +1 -1
|
@@ -36,5 +36,5 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
36
36
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
37
37
|
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
38
38
|
var React = __importStar(require("react"));
|
|
39
|
-
var SvgWallet2 = function (props) { return ((0, jsx_runtime_1.jsxs)("svg", __assign({ width: 24, height: 24, viewBox: "0 0 24
|
|
39
|
+
var SvgWallet2 = function (props) { return ((0, jsx_runtime_1.jsxs)("svg", __assign({ width: 24, height: 24, viewBox: "0 0 24 25", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, props, { children: [(0, jsx_runtime_1.jsx)("path", { d: "M2.48438 19.7977V8.40825C2.48438 7.42322 3.25787 6.86914 4.03137 6.86914H4.65017H15.7885H17.9543C19.0063 6.86914 19.5787 7.79261 19.5787 8.33129V18.4125C19.5787 19.459 18.8825 19.9516 18.2637 19.9516H17.1808C17.1808 20.7981 16.3919 21.4907 15.4018 21.4907H4.18607C3.19599 21.4907 2.48438 20.6442 2.48438 19.7977Z", fill: "white" }), (0, jsx_runtime_1.jsx)("path", { d: "M2.48438 8.40825V19.7977C2.48438 20.6442 3.19599 21.4907 4.18607 21.4907H15.4018C16.3919 21.4907 17.1808 20.7981 17.1808 19.9516M2.48438 8.40825C2.48438 7.42322 3.25787 6.86914 4.03137 6.86914H4.65017H15.7885H17.9543C19.0063 6.86914 19.5787 7.79261 19.5787 8.33129V18.4125C19.5787 19.459 18.8825 19.9516 18.2637 19.9516H17.1808M2.48438 8.40825C2.48438 9.51641 3.56727 9.79345 4.10872 9.79345H15.7885C16.6548 9.79345 17.1808 10.7169 17.1808 11.1786V19.9516", stroke: "currentColor", strokeWidth: 1.5 }), (0, jsx_runtime_1.jsx)("path", { d: "M2.48438 8.40825V19.7977C2.48438 20.6442 3.19599 21.4907 4.18607 21.4907H15.4018C16.3919 21.4907 17.1808 20.7981 17.1808 19.9516M2.48438 8.40825C2.48438 7.42322 3.25787 6.86914 4.03137 6.86914H4.65017H15.7885H17.9543C19.0063 6.86914 19.5787 7.79261 19.5787 8.33129V18.4125C19.5787 19.459 18.8825 19.9516 18.2637 19.9516H17.1808M2.48438 8.40825C2.48438 9.51641 3.56727 9.79345 4.10872 9.79345H15.7885C16.6548 9.79345 17.1808 10.7169 17.1808 11.1786V19.9516", stroke: "currentColor", strokeOpacity: 0.2, strokeWidth: 1.5 }), (0, jsx_runtime_1.jsx)("path", { d: "M2.48438 8.40825V19.7977C2.48438 20.6442 3.19599 21.4907 4.18607 21.4907H15.4018C16.3919 21.4907 17.1808 20.7981 17.1808 19.9516M2.48438 8.40825C2.48438 7.42322 3.25787 6.86914 4.03137 6.86914H4.65017H15.7885H17.9543C19.0063 6.86914 19.5787 7.79261 19.5787 8.33129V18.4125C19.5787 19.459 18.8825 19.9516 18.2637 19.9516H17.1808M2.48438 8.40825C2.48438 9.51641 3.56727 9.79345 4.10872 9.79345H15.7885C16.6548 9.79345 17.1808 10.7169 17.1808 11.1786V19.9516", stroke: "currentColor", strokeOpacity: 0.2, strokeWidth: 1.5 }), (0, jsx_runtime_1.jsx)("path", { d: "M10.1172 14.7146C10.1172 13.9244 10.5792 13.6509 11.1952 13.6509H17.5269C18.6598 13.6509 19.5782 12.7325 19.5782 11.5996C21.1182 11.5996 21.5134 12.2156 21.5134 12.8912V16.2341C21.5134 17.2977 20.5124 17.2977 20.0504 17.2977H19.6654H11.1952C10.5792 17.2977 10.1172 17.0242 10.1172 16.2341V14.7146Z", fill: "white" }), (0, jsx_runtime_1.jsx)("path", { d: "M13.3687 15.4497H15.0627M11.5802 15.4497H11.8112M11.1952 13.6509C10.5792 13.6509 10.1172 13.9244 10.1172 14.7146V16.2341C10.1172 17.0242 10.5792 17.2977 11.1952 17.2977H19.6654H20.0504C20.5124 17.2977 21.5134 17.2977 21.5134 16.2341V12.8912C21.5134 12.2156 21.1182 11.5996 19.5782 11.5996V11.5996C19.5782 12.7325 18.6598 13.6509 17.5269 13.6509H11.1952Z", stroke: "currentColor", strokeWidth: 1.3, strokeLinecap: "round" }), (0, jsx_runtime_1.jsx)("path", { d: "M13.3687 15.4497H15.0627M11.5802 15.4497H11.8112M11.1952 13.6509C10.5792 13.6509 10.1172 13.9244 10.1172 14.7146V16.2341C10.1172 17.0242 10.5792 17.2977 11.1952 17.2977H19.6654H20.0504C20.5124 17.2977 21.5134 17.2977 21.5134 16.2341V12.8912C21.5134 12.2156 21.1182 11.5996 19.5782 11.5996V11.5996C19.5782 12.7325 18.6598 13.6509 17.5269 13.6509H11.1952Z", stroke: "currentColor", strokeOpacity: 0.2, strokeWidth: 1.3, strokeLinecap: "round" }), (0, jsx_runtime_1.jsx)("path", { d: "M13.3687 15.4497H15.0627M11.5802 15.4497H11.8112M11.1952 13.6509C10.5792 13.6509 10.1172 13.9244 10.1172 14.7146V16.2341C10.1172 17.0242 10.5792 17.2977 11.1952 17.2977H19.6654H20.0504C20.5124 17.2977 21.5134 17.2977 21.5134 16.2341V12.8912C21.5134 12.2156 21.1182 11.5996 19.5782 11.5996V11.5996C19.5782 12.7325 18.6598 13.6509 17.5269 13.6509H11.1952Z", stroke: "currentColor", strokeOpacity: 0.2, strokeWidth: 1.3, strokeLinecap: "round" }), (0, jsx_runtime_1.jsx)("path", { d: "M4.63477 9.6657V6.44778C4.63477 6.09023 4.86771 5.37513 5.79947 5.37513H6.80888V3.91941C6.80888 3.4597 7.11947 3 7.89594 3H14.7289C15.5054 3 15.8159 3.4597 15.8159 3.91941V9.6657H13.4089H10.3806H8.20653H4.63477Z", fill: "white" }), (0, jsx_runtime_1.jsx)("path", { d: "M13.4089 9.6657V6.44778C13.4089 6.09023 13.1759 5.37513 12.2442 5.37513H10.3806M13.4089 9.6657H10.3806M13.4089 9.6657H15.8159V3.91941C15.8159 3.4597 15.5054 3 14.7289 3H7.89594C7.11947 3 6.80888 3.4597 6.80888 3.91941V5.37513M8.20653 5.37513V9.6657M8.20653 5.37513H10.3806M8.20653 5.37513H6.80888M8.20653 9.6657H4.63477V6.44778C4.63477 6.09023 4.86771 5.37513 5.79947 5.37513H6.80888M8.20653 9.6657H10.3806M10.3806 5.37513V9.6657M6.49829 7.06071V7.9035", stroke: "currentColor", strokeWidth: 1.5, strokeLinecap: "round", strokeLinejoin: "round" }), (0, jsx_runtime_1.jsx)("path", { d: "M13.4089 9.6657V6.44778C13.4089 6.09023 13.1759 5.37513 12.2442 5.37513H10.3806M13.4089 9.6657H10.3806M13.4089 9.6657H15.8159V3.91941C15.8159 3.4597 15.5054 3 14.7289 3H7.89594C7.11947 3 6.80888 3.4597 6.80888 3.91941V5.37513M8.20653 5.37513V9.6657M8.20653 5.37513H10.3806M8.20653 5.37513H6.80888M8.20653 9.6657H4.63477V6.44778C4.63477 6.09023 4.86771 5.37513 5.79947 5.37513H6.80888M8.20653 9.6657H10.3806M10.3806 5.37513V9.6657M6.49829 7.06071V7.9035", stroke: "currentColor", strokeOpacity: 0.2, strokeWidth: 1.5, strokeLinecap: "round", strokeLinejoin: "round" }), (0, jsx_runtime_1.jsx)("path", { d: "M13.4089 9.6657V6.44778C13.4089 6.09023 13.1759 5.37513 12.2442 5.37513H10.3806M13.4089 9.6657H10.3806M13.4089 9.6657H15.8159V3.91941C15.8159 3.4597 15.5054 3 14.7289 3H7.89594C7.11947 3 6.80888 3.4597 6.80888 3.91941V5.37513M8.20653 5.37513V9.6657M8.20653 5.37513H10.3806M8.20653 5.37513H6.80888M8.20653 9.6657H4.63477V6.44778C4.63477 6.09023 4.86771 5.37513 5.79947 5.37513H6.80888M8.20653 9.6657H10.3806M10.3806 5.37513V9.6657M6.49829 7.06071V7.9035", stroke: "currentColor", strokeOpacity: 0.2, strokeWidth: 1.5, strokeLinecap: "round", strokeLinejoin: "round" })] }))); };
|
|
40
40
|
exports.default = SvgWallet2;
|
|
@@ -0,0 +1,28 @@
|
|
|
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 props_1 = require("./props");
|
|
19
|
+
var RadioScale_styled_1 = require("./RadioScale.styled");
|
|
20
|
+
var RadioButton_1 = __importDefault(require("../RadioButton"));
|
|
21
|
+
var RadioScale = function (_a) {
|
|
22
|
+
var _b = _a.disabled, disabled = _b === void 0 ? props_1.RadioScaleDefault.disabled : _b, _c = _a.value, value = _c === void 0 ? props_1.RadioScaleDefault.value : _c, _d = _a.valid, valid = _d === void 0 ? props_1.RadioScaleDefault.valid : _d, _e = _a.onChange, onChange = _e === void 0 ? props_1.RadioScaleDefault.onChange : _e, _f = _a.name, name = _f === void 0 ? props_1.RadioScaleDefault.name : _f, _g = _a.id, id = _g === void 0 ? props_1.RadioScaleDefault.id : _g, _h = _a.label, label = _h === void 0 ? props_1.RadioScaleDefault.label : _h, _j = _a.readOnly, readOnly = _j === void 0 ? props_1.RadioScaleDefault.readOnly : _j, _k = _a.length, length = _k === void 0 ? props_1.RadioScaleDefault.length : _k, _l = _a.alignment, alignment = _l === void 0 ? props_1.RadioScaleDefault.alignment : _l;
|
|
23
|
+
return ((0, jsx_runtime_1.jsxs)(RadioScale_styled_1.RadioScaleStyled, { children: [label && ((0, jsx_runtime_1.jsx)(RadioScale_styled_1.LabelWrapper, { children: (0, jsx_runtime_1.jsx)("label", __assign({ htmlFor: id }, { children: label })) })), (0, jsx_runtime_1.jsx)(RadioScale_styled_1.ScaleList, { children: Array.from({ length: length }).map(function (scaleValue, index) {
|
|
24
|
+
scaleValue = index + 1;
|
|
25
|
+
return ((0, jsx_runtime_1.jsx)(RadioButton_1.default, { id: "".concat(id, "_").concat(index), onChange: onChange, disabled: disabled, name: name, value: scaleValue, checked: parseInt(value) === scaleValue || value === scaleValue, label: String(scaleValue), valid: valid, alignment: alignment, readOnly: readOnly, labelOffset: alignment === "vertical" ? '0' : '0.5rem', size: "small", textSize: "medium" }));
|
|
26
|
+
}) })] }));
|
|
27
|
+
};
|
|
28
|
+
exports.default = RadioScale;
|
|
@@ -0,0 +1,15 @@
|
|
|
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.ScaleList = exports.LabelWrapper = exports.RadioScaleStyled = void 0;
|
|
11
|
+
var styled_components_1 = __importDefault(require("styled-components"));
|
|
12
|
+
exports.RadioScaleStyled = styled_components_1.default.div(templateObject_1 || (templateObject_1 = __makeTemplateObject([" "], [" "])));
|
|
13
|
+
exports.LabelWrapper = styled_components_1.default.div(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n display: flex;\n margin-bottom: 16px;\n font:var(--caption-bold-12-15);\n label {\n margin: 0;\n color: var(--dark-opacity-50);\n display: block;\n }\n"], ["\n display: flex;\n margin-bottom: 16px;\n font:var(--caption-bold-12-15);\n label {\n margin: 0;\n color: var(--dark-opacity-50);\n display: block;\n }\n"])));
|
|
14
|
+
exports.ScaleList = styled_components_1.default.div(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n display: flex;\n align-items: center;\n justify-content: space-between;\n"], ["\n display: flex;\n align-items: center;\n justify-content: space-between;\n"])));
|
|
15
|
+
var templateObject_1, templateObject_2, templateObject_3;
|
|
@@ -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 RadioScale_1 = require("./RadioScale");
|
|
8
|
+
Object.defineProperty(exports, "default", { enumerable: true, get: function () { return __importDefault(RadioScale_1).default; } });
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.RadioScaleDefault = exports.alignment = void 0;
|
|
4
|
+
exports.alignment = ["vertical", "horizontal"];
|
|
5
|
+
exports.RadioScaleDefault = {
|
|
6
|
+
disabled: false,
|
|
7
|
+
valid: true,
|
|
8
|
+
readOnly: false,
|
|
9
|
+
id: "radio",
|
|
10
|
+
length: 10,
|
|
11
|
+
alignment: "horizontal",
|
|
12
|
+
label: "Label",
|
|
13
|
+
};
|
|
@@ -0,0 +1,38 @@
|
|
|
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
|
+
exports.Default = void 0;
|
|
18
|
+
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
19
|
+
var RadioScale_1 = __importDefault(require("../RadioScale"));
|
|
20
|
+
var props_1 = require("../props");
|
|
21
|
+
exports.default = {
|
|
22
|
+
title: 'Components/RadioScale',
|
|
23
|
+
component: function (props) { return (0, jsx_runtime_1.jsx)("div", __assign({ style: { maxWidth: '350px' } }, { children: (0, jsx_runtime_1.jsx)(RadioScale_1.default, __assign({}, props)) })); },
|
|
24
|
+
tags: ['autodocs'],
|
|
25
|
+
argTypes: {
|
|
26
|
+
alignment: { control: 'select', options: props_1.alignment },
|
|
27
|
+
}
|
|
28
|
+
};
|
|
29
|
+
exports.Default = {
|
|
30
|
+
args: {
|
|
31
|
+
alignment: "vertical",
|
|
32
|
+
length: 5,
|
|
33
|
+
value: 3,
|
|
34
|
+
label: "Label",
|
|
35
|
+
disabled: false,
|
|
36
|
+
readOnly: false,
|
|
37
|
+
},
|
|
38
|
+
};
|
package/dist/index.js
CHANGED
|
@@ -4,7 +4,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.ProductCardCheckbox = exports.PaymentCart = exports.Tabs = exports.ProductCardHorizontalSm = exports.ProductCardHorizontal = exports.ProductCardVertical = exports.BannerCard = exports.AutocompleteInput = exports.InstallmentBox = exports.AddressCard = exports.ReviewCard = exports.useTranslation = exports.trLocale = exports.enLocale = exports.initi18n = exports.initReactI18next = exports.CampaignCard = exports.Dropdown = exports.InlineProgress = exports.Loader = exports.ShoppingCartProduct = exports.CouponCode = exports.InfoBox = exports.ListGroup = exports.InsuranceBox = exports.Tooltip = exports.TextLink = exports.SelectBox = exports.Badges = exports.SuggestBox = exports.Toaster = exports.toast = exports.Accordion = exports.Divider = exports.SearchBox = exports.Textarea = exports.ActionButton = exports.RadioButton = exports.Icon = exports.Agreement = exports.Alert = exports.Stepper = exports.OtpInput = exports.Modal = exports.Input = exports.CircleProgress = exports.Checkbox = exports.CategoryMenu = exports.Breadcrumbs = exports.Button = void 0;
|
|
7
|
-
exports.SkeletonLoader = exports.Pagination = exports.DescriptionCard = exports.Table = exports.DropdownButton = exports.OptionMenu = void 0;
|
|
7
|
+
exports.RadioScale = exports.SkeletonLoader = exports.Pagination = exports.DescriptionCard = exports.Table = exports.DropdownButton = exports.OptionMenu = void 0;
|
|
8
8
|
var react_i18next_1 = require("react-i18next");
|
|
9
9
|
Object.defineProperty(exports, "initReactI18next", { enumerable: true, get: function () { return react_i18next_1.initReactI18next; } });
|
|
10
10
|
Object.defineProperty(exports, "useTranslation", { enumerable: true, get: function () { return react_i18next_1.useTranslation; } });
|
|
@@ -115,3 +115,5 @@ var Pagination_1 = __importDefault(require("./components/Pagination"));
|
|
|
115
115
|
exports.Pagination = Pagination_1.default;
|
|
116
116
|
var SkeletonLoader_1 = __importDefault(require("./components/SkeletonLoader"));
|
|
117
117
|
exports.SkeletonLoader = SkeletonLoader_1.default;
|
|
118
|
+
var RadioScale_1 = __importDefault(require("./components/RadioScale"));
|
|
119
|
+
exports.RadioScale = RadioScale_1.default;
|