krl-alfred 2.18.22 → 2.18.24

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.
Files changed (52) hide show
  1. package/dist/components/Icon/iconList/CheckMarkMd.d.ts +3 -0
  2. package/dist/components/Icon/iconList/CheckMarkMd.js +40 -0
  3. package/dist/components/Icon/iconList/index.d.ts +5 -1
  4. package/dist/components/Icon/iconList/index.js +11 -5
  5. package/dist/components/ListGroup/ListGroup.js +1 -1
  6. package/dist/components/ListGroup/ListGroup.styled.d.ts +2 -0
  7. package/dist/components/ListGroup/ListGroup.styled.js +5 -3
  8. package/dist/components/OtpInput/OtpInput.styled.js +1 -1
  9. package/dist/components/ProductCardCheckbox/ProductCardCheckbox.js +7 -2
  10. package/dist/components/ProductCardCheckbox/ProductCardCheckbox.styled.d.ts +15 -0
  11. package/dist/components/ProductCardCheckbox/ProductCardCheckbox.styled.js +14 -3
  12. package/dist/components/ProductCardRadio/ProductCardRadio.js +8 -2
  13. package/dist/components/ProductCardRadio/ProductCardRadio.styled.d.ts +17 -0
  14. package/dist/components/ProductCardRadio/ProductCardRadio.styled.js +16 -3
  15. package/dist/components/RadioButton/RadioButton.js +3 -0
  16. package/dist/components/RadioButton/layouts/basic/Basic.d.ts +1 -1
  17. package/dist/components/RadioButton/layouts/basic/Basic.js +17 -3
  18. package/dist/components/RadioButton/layouts/basic/Basic.styled.d.ts +4 -0
  19. package/dist/components/RadioButton/layouts/basic/Basic.styled.js +8 -4
  20. package/dist/components/RadioButton/layouts/boxed/Boxed.d.ts +1 -1
  21. package/dist/components/RadioButton/layouts/boxed/Boxed.js +13 -3
  22. package/dist/components/RadioButton/layouts/boxed/Boxed.styled.d.ts +7 -0
  23. package/dist/components/RadioButton/layouts/boxed/Boxed.styled.js +11 -4
  24. package/dist/components/RadioButton/layouts/boxedMd/BoxedMd.d.ts +4 -0
  25. package/dist/components/RadioButton/layouts/boxedMd/BoxedMd.js +37 -0
  26. package/dist/components/RadioButton/layouts/boxedMd/BoxedMd.styled.d.ts +6 -0
  27. package/dist/components/RadioButton/layouts/boxedMd/BoxedMd.styled.js +46 -0
  28. package/dist/components/RadioButton/layouts/boxedMd/index.d.ts +1 -0
  29. package/dist/components/RadioButton/layouts/boxedMd/index.js +8 -0
  30. package/dist/components/RadioButton/layouts/boxedSm/BoxedSm.d.ts +1 -1
  31. package/dist/components/RadioButton/layouts/boxedSm/BoxedSm.js +14 -3
  32. package/dist/components/RadioButton/layouts/boxedSm/BoxedSm.styled.d.ts +3 -0
  33. package/dist/components/RadioButton/layouts/boxedSm/BoxedSm.styled.js +7 -4
  34. package/dist/components/RadioButton/layouts/color/Color.js +7 -1
  35. package/dist/components/RadioButton/layouts/color/Color.styled.d.ts +2 -0
  36. package/dist/components/RadioButton/layouts/color/Color.styled.js +5 -3
  37. package/dist/components/RadioButton/layouts/horizontal/Horizontal.js +12 -2
  38. package/dist/components/RadioButton/layouts/horizontal/Horizontal.styled.d.ts +17 -8
  39. package/dist/components/RadioButton/layouts/horizontal/Horizontal.styled.js +16 -3
  40. package/dist/components/RadioButton/props.d.ts +4 -0
  41. package/dist/components/RadioButton/props.js +4 -1
  42. package/dist/components/RadioButton/stories/RadioButton.stories.d.ts +61 -0
  43. package/dist/components/RadioButton/stories/RadioButton.stories.js +52 -4
  44. package/dist/components/RadioGroup/RadioGroup.d.ts +1 -1
  45. package/dist/components/RadioGroup/RadioGroup.js +5 -4
  46. package/dist/components/RadioGroup/RadioGroup.styled.d.ts +6 -0
  47. package/dist/components/RadioGroup/RadioGroup.styled.js +13 -3
  48. package/dist/components/RadioGroup/props.d.ts +13 -0
  49. package/dist/components/RadioGroup/props.js +7 -2
  50. package/dist/components/RadioGroup/stories/RadioGroup.stories.d.ts +129 -1
  51. package/dist/components/RadioGroup/stories/RadioGroup.stories.js +103 -1
  52. package/package.json +1 -1
@@ -7,12 +7,12 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
7
7
  return (mod && mod.__esModule) ? mod : { "default": mod };
8
8
  };
9
9
  Object.defineProperty(exports, "__esModule", { value: true });
10
- exports.BasicStyled = void 0;
10
+ exports.BasicStyled = exports.DescriptionText = exports.LabelText = exports.LabelsWrapper = exports.Indicator = void 0;
11
11
  var jsx_runtime_1 = require("react/jsx-runtime");
12
12
  var styled_components_1 = __importDefault(require("styled-components"));
13
13
  var Icon_1 = __importDefault(require("../../../Icon/Icon"));
14
14
  var svgToBase64_1 = __importDefault(require("./../../../../utils/svgToBase64"));
15
- exports.BasicStyled = styled_components_1.default.label(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n position: relative;\n display: flex;\n align-items:", ";\n justify-content: ", ";\n cursor: pointer;\n ", "\n ", "\n input[type=\"radio\"] {\n height: 0;\n width: 0;\n opacity: 0;\n z-index: -1;\n position: absolute;\n\n &:checked ~ .indicator {\n background-image:url('", "');\n }\n }\n\n div.indicator {\n flex: 0 0 auto;\n background-image: url('", "');\n background-size: 100% 100%;\n display: block;\n position: relative;\n margin: ", " ", " 0 0;\n width: ", ";\n height: ", ";\n\n &:disabled {\n cursor: not-allowed;\n }\n }\n\n div.labelsWrapper {\n position: relative;\n display: grid;\n row-gap: 8px;\n cursor: ", ";\n margin: 0;\n padding: ", ";\n color: ", ";\n ", "\n label.label {\n display: block;\n cursor: inherit;\n font: ", ";\n }\n\n label.description {\n display: block;\n margin: 0;\n cursor: inherit;\n font: var(--body-medium-14-17);\n color: var(--grey-50);\n }\n }\n"], ["\n position: relative;\n display: flex;\n align-items:", ";\n justify-content: ", ";\n cursor: pointer;\n ", "\n ", "\n input[type=\"radio\"] {\n height: 0;\n width: 0;\n opacity: 0;\n z-index: -1;\n position: absolute;\n\n &:checked ~ .indicator {\n background-image:url('", "');\n }\n }\n\n div.indicator {\n flex: 0 0 auto;\n background-image: url('", "');\n background-size: 100% 100%;\n display: block;\n position: relative;\n margin: ", " ", " 0 0;\n width: ", ";\n height: ", ";\n\n &:disabled {\n cursor: not-allowed;\n }\n }\n\n div.labelsWrapper {\n position: relative;\n display: grid;\n row-gap: 8px;\n cursor: ", ";\n margin: 0;\n padding: ", ";\n color: ", ";\n ", "\n label.label {\n display: block;\n cursor: inherit;\n font: ", ";\n }\n\n label.description {\n display: block;\n margin: 0;\n cursor: inherit;\n font: var(--body-medium-14-17);\n color: var(--grey-50);\n }\n }\n"])), function (props) { return props.$verticalAlign; }, function (props) { return props.$alignment === "vertical" ? "center" : "flex-start"; }, function (props) { return props.$alignment === "vertical" && "\n flex-direction: column-reverse;\n text-align: center;\n "; }, function (props) { return props.$hasNoneClick && "\n user-select:none;\n pointer-events:none;\n "; }, function (props) { return (0, svgToBase64_1.default)((0, jsx_runtime_1.jsx)(Icon_1.default, { hasWrapper: false, color: "".concat(props.$color), name: "RadioButtonElementChecked" })); }, function (props) { return props.$disabled ? (0, svgToBase64_1.default)((0, jsx_runtime_1.jsx)(Icon_1.default, { hasWrapper: false, color: "#C2C3CE", name: "RadioButtonElementDisabled" })) : (props.$valid ? (0, svgToBase64_1.default)((0, jsx_runtime_1.jsx)(Icon_1.default, { hasWrapper: false, color: "#9763F6", name: "RadioButtonElementUnchecked" })) : (0, svgToBase64_1.default)((0, jsx_runtime_1.jsx)(Icon_1.default, { hasWrapper: false, color: "#FF1F1F", name: "RadioButtonElementInvalid" }))); }, function (props) { return props.$alignment === "vertical" ? "0.5rem" : props.$verticalAlign === "flex-start" ? "1px" : 0; }, function (props) { return props.$labelOffset; }, function (props) {
15
+ exports.Indicator = styled_components_1.default.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n flex: 0 0 auto;\n background-image: url('", "');\n background-size: 100% 100%;\n display: block;\n position: relative;\n margin: ", " ", " 0 0;\n width: ", ";\n height: ", ";\n"], ["\n flex: 0 0 auto;\n background-image: url('", "');\n background-size: 100% 100%;\n display: block;\n position: relative;\n margin: ", " ", " 0 0;\n width: ", ";\n height: ", ";\n"])), function (props) { return props.$disabled ? (0, svgToBase64_1.default)((0, jsx_runtime_1.jsx)(Icon_1.default, { hasWrapper: false, color: "#C2C3CE", name: "RadioButtonElementDisabled" })) : (props.$valid ? (0, svgToBase64_1.default)((0, jsx_runtime_1.jsx)(Icon_1.default, { hasWrapper: false, color: "#9763F6", name: "RadioButtonElementUnchecked" })) : (0, svgToBase64_1.default)((0, jsx_runtime_1.jsx)(Icon_1.default, { hasWrapper: false, color: "#FF1F1F", name: "RadioButtonElementInvalid" }))); }, function (props) { return props.$alignment === "vertical" ? "0.5rem" : props.$verticalAlign === "flex-start" ? "1px" : 0; }, function (props) { return props.$labelOffset; }, function (props) {
16
16
  switch (props.$size) {
17
17
  case 'xsmall':
18
18
  return "16px";
@@ -34,7 +34,9 @@ exports.BasicStyled = styled_components_1.default.label(templateObject_1 || (tem
34
34
  default:
35
35
  return "16px";
36
36
  }
37
- }, function (props) { return (props.$disabled ? "not-allowed" : "pointer"); }, function (props) { return props.$verticalAlign === "flex-start" ? "5px 0 0 0" : "0"; }, function (props) { return props.$valid ? 'var(--dark)' : 'var(--red)'; }, function (props) { return !props.$isWrapText && "\n -webkit-line-clamp: 1;\n -webkit-box-orient: vertical;\n overflow: hidden;\n word-break: break-word;\n display: -webkit-inline-box;\n "; }, function (props) {
37
+ });
38
+ exports.LabelsWrapper = styled_components_1.default.div(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n position: relative;\n display: grid;\n row-gap: 8px;\n cursor: ", ";\n margin: 0;\n padding: ", ";\n color: ", ";\n ", "\n"], ["\n position: relative;\n display: grid;\n row-gap: 8px;\n cursor: ", ";\n margin: 0;\n padding: ", ";\n color: ", ";\n ", "\n"])), function (props) { return (props.$disabled ? "not-allowed" : "pointer"); }, function (props) { return props.$verticalAlign === "flex-start" ? "5px 0 0 0" : "0"; }, function (props) { return props.$valid ? 'var(--dark)' : 'var(--red)'; }, function (props) { return !props.$isWrapText && "\n -webkit-line-clamp: 1;\n -webkit-box-orient: vertical;\n overflow: hidden;\n word-break: break-word;\n display: -webkit-inline-box;\n "; });
39
+ exports.LabelText = styled_components_1.default.label(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n display: block;\n cursor: inherit;\n font: ", ";\n"], ["\n display: block;\n cursor: inherit;\n font: ", ";\n"])), function (props) {
38
40
  switch (props.$textSize) {
39
41
  case 'small':
40
42
  return "var(--body-medium-13-16)";
@@ -46,4 +48,6 @@ exports.BasicStyled = styled_components_1.default.label(templateObject_1 || (tem
46
48
  return "var(--body-medium-14-17)";
47
49
  }
48
50
  });
49
- var templateObject_1;
51
+ exports.DescriptionText = styled_components_1.default.label(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n display: block;\n margin: 0;\n cursor: inherit;\n font: var(--body-medium-14-17);\n color: var(--grey-50);\n"], ["\n display: block;\n margin: 0;\n cursor: inherit;\n font: var(--body-medium-14-17);\n color: var(--grey-50);\n"])));
52
+ exports.BasicStyled = styled_components_1.default.label(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n position: relative;\n display: flex;\n align-items:", ";\n justify-content: ", ";\n cursor: pointer;\n ", "\n ", "\n input[type=\"radio\"] {\n height: 0;\n width: 0;\n opacity: 0;\n z-index: -1;\n position: absolute;\n\n &:checked ~ ", " {\n background-image:url('", "');\n }\n }\n"], ["\n position: relative;\n display: flex;\n align-items:", ";\n justify-content: ", ";\n cursor: pointer;\n ", "\n ", "\n input[type=\"radio\"] {\n height: 0;\n width: 0;\n opacity: 0;\n z-index: -1;\n position: absolute;\n\n &:checked ~ ", " {\n background-image:url('", "');\n }\n }\n"])), function (props) { return props.$verticalAlign; }, function (props) { return props.$alignment === "vertical" ? "center" : "flex-start"; }, function (props) { return props.$alignment === "vertical" && "\n flex-direction: column-reverse;\n text-align: center;\n "; }, function (props) { return props.$hasNoneClick && "\n user-select:none;\n pointer-events:none;\n "; }, exports.Indicator, function (props) { return (0, svgToBase64_1.default)((0, jsx_runtime_1.jsx)(Icon_1.default, { hasWrapper: false, color: "".concat(props.$color), name: "RadioButtonElementChecked" })); });
53
+ var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5;
@@ -1,4 +1,4 @@
1
1
  import React from "react";
2
2
  import { RadioButtonProps } from "./../../props";
3
- declare const Boxed: ({ value, checked, onChange, onClick, name, label, disabled, description, image, hasBadge, badgeText, badgeVariant, labelSm, readOnly, id, size, valid, labelOffset, textSize, color }: RadioButtonProps) => React.JSX.Element;
3
+ declare const Boxed: ({ value, checked, onChange, onClick, name, label, disabled, description, image, hasBadge, badgeText, badgeVariant, labelSm, readOnly, id, size, valid, labelOffset, textSize, color, showIndicator, }: RadioButtonProps) => React.JSX.Element;
4
4
  export default Boxed;
@@ -20,11 +20,21 @@ var props_1 = require("./../../props");
20
20
  var Boxed_styled_1 = require("./Boxed.styled");
21
21
  var Badges_1 = __importDefault(require("../../../Badges"));
22
22
  var Boxed = function (_a) {
23
- var value = _a.value, checked = _a.checked, onChange = _a.onChange, onClick = _a.onClick, name = _a.name, label = _a.label, disabled = _a.disabled, description = _a.description, image = _a.image, hasBadge = _a.hasBadge, badgeText = _a.badgeText, badgeVariant = _a.badgeVariant, labelSm = _a.labelSm, readOnly = _a.readOnly, _b = _a.id, id = _b === void 0 ? props_1.BoxedDefault.id : _b, _c = _a.size, size = _c === void 0 ? props_1.BoxedDefault.size : _c, _d = _a.valid, valid = _d === void 0 ? props_1.BoxedDefault.valid : _d, _e = _a.labelOffset, labelOffset = _e === void 0 ? props_1.BoxedDefault.labelOffset : _e, _f = _a.textSize, textSize = _f === void 0 ? props_1.BoxedDefault.textSize : _f, _g = _a.color, color = _g === void 0 ? props_1.BoxedDefault.color : _g;
24
- var _h = (0, react_1.useState)(color), inputColor = _h[0], setInputColor = _h[1];
23
+ var value = _a.value, checked = _a.checked, onChange = _a.onChange, onClick = _a.onClick, name = _a.name, label = _a.label, disabled = _a.disabled, description = _a.description, image = _a.image, hasBadge = _a.hasBadge, badgeText = _a.badgeText, badgeVariant = _a.badgeVariant, labelSm = _a.labelSm, readOnly = _a.readOnly, _b = _a.id, id = _b === void 0 ? props_1.BoxedDefault.id : _b, _c = _a.size, size = _c === void 0 ? props_1.BoxedDefault.size : _c, _d = _a.valid, valid = _d === void 0 ? props_1.BoxedDefault.valid : _d, _e = _a.labelOffset, labelOffset = _e === void 0 ? props_1.BoxedDefault.labelOffset : _e, _f = _a.textSize, textSize = _f === void 0 ? props_1.BoxedDefault.textSize : _f, _g = _a.color, color = _g === void 0 ? props_1.BoxedDefault.color : _g, _h = _a.showIndicator, showIndicator = _h === void 0 ? true : _h;
24
+ var _j = (0, react_1.useState)(color), inputColor = _j[0], setInputColor = _j[1];
25
25
  (0, react_1.useEffect)(function () {
26
26
  setInputColor(window.getComputedStyle(document.body).getPropertyValue('--primary'));
27
27
  });
28
- return ((0, jsx_runtime_1.jsxs)(Boxed_styled_1.BoxedStyled, __assign({ htmlFor: id, "$disabled": disabled, "$checked": checked, "$size": size, "$valid": valid, "$labelOffset": labelOffset, "$readOnly": readOnly, "$color": inputColor, "$textSize": textSize }, { children: [(0, jsx_runtime_1.jsx)("input", { id: id, type: "radio", name: name, value: value, disabled: disabled, checked: checked, onChange: onChange, onClick: onClick, readOnly: readOnly }), (0, jsx_runtime_1.jsx)("div", { className: "indicator" }), (label || description || image) && ((0, jsx_runtime_1.jsxs)("div", __assign({ className: "labelsWrapper" }, { children: [label && ((0, jsx_runtime_1.jsxs)("label", __assign({ className: "label", htmlFor: id }, { children: [label, labelSm && (0, jsx_runtime_1.jsx)("span", __assign({ className: "labelSm" }, { children: labelSm }))] }))), description && ((0, jsx_runtime_1.jsx)("label", __assign({ className: "description", htmlFor: id }, { children: description }))), image && ((0, jsx_runtime_1.jsx)("label", __assign({ htmlFor: id }, { children: image })))] }))), hasBadge && ((0, jsx_runtime_1.jsx)("div", __assign({ className: "boxedBadgesWrapper" }, { children: (0, jsx_runtime_1.jsx)(Badges_1.default, { title: badgeText, layout: "belt", variant: badgeVariant, hasResponsive: true }) })))] })));
28
+ var styledProps = {
29
+ $disabled: disabled,
30
+ $checked: checked,
31
+ $size: size,
32
+ $valid: valid,
33
+ $labelOffset: labelOffset,
34
+ $readOnly: readOnly,
35
+ $color: inputColor,
36
+ $textSize: textSize,
37
+ };
38
+ return ((0, jsx_runtime_1.jsxs)(Boxed_styled_1.BoxedStyled, __assign({ htmlFor: id }, styledProps, { children: [(0, jsx_runtime_1.jsx)("input", { id: id, type: "radio", name: name, value: value, disabled: disabled, checked: checked, onChange: onChange, onClick: onClick, readOnly: readOnly }), showIndicator && (0, jsx_runtime_1.jsx)(Boxed_styled_1.Indicator, __assign({}, styledProps)), (label || description || image) && ((0, jsx_runtime_1.jsxs)(Boxed_styled_1.LabelsWrapper, __assign({}, styledProps, { children: [label && ((0, jsx_runtime_1.jsxs)(Boxed_styled_1.LabelText, __assign({ htmlFor: id }, { children: [label, labelSm && (0, jsx_runtime_1.jsx)(Boxed_styled_1.LabelSm, { children: labelSm })] }))), description && ((0, jsx_runtime_1.jsx)(Boxed_styled_1.DescriptionText, __assign({ htmlFor: id }, { children: description }))), image && ((0, jsx_runtime_1.jsx)(Boxed_styled_1.ImageLabel, __assign({ htmlFor: id }, { children: image })))] }))), hasBadge && ((0, jsx_runtime_1.jsx)(Boxed_styled_1.BoxedBadgesWrapper, { children: (0, jsx_runtime_1.jsx)(Badges_1.default, { title: badgeText, layout: "belt", variant: badgeVariant, hasResponsive: true }) }))] })));
29
39
  };
30
40
  exports.default = Boxed;
@@ -1,3 +1,10 @@
1
1
  /// <reference types="react" />
2
2
  import { RadioButtonStyledProps } from "./../../props";
3
+ export declare const Indicator: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof RadioButtonStyledProps> & RadioButtonStyledProps, never> & Partial<Pick<import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof RadioButtonStyledProps> & RadioButtonStyledProps, never>>> & string;
4
+ export declare const LabelsWrapper: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof RadioButtonStyledProps> & RadioButtonStyledProps, never> & Partial<Pick<import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof RadioButtonStyledProps> & RadioButtonStyledProps, never>>> & string;
5
+ export declare const LabelText: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").LabelHTMLAttributes<HTMLLabelElement>, HTMLLabelElement>, never> & Partial<Pick<import("react").DetailedHTMLProps<import("react").LabelHTMLAttributes<HTMLLabelElement>, HTMLLabelElement>, never>>> & string;
6
+ export declare const LabelSm: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, never> & Partial<Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, never>>> & string;
7
+ export declare const DescriptionText: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").LabelHTMLAttributes<HTMLLabelElement>, HTMLLabelElement>, never> & Partial<Pick<import("react").DetailedHTMLProps<import("react").LabelHTMLAttributes<HTMLLabelElement>, HTMLLabelElement>, never>>> & string;
8
+ export declare const ImageLabel: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").LabelHTMLAttributes<HTMLLabelElement>, HTMLLabelElement>, never> & Partial<Pick<import("react").DetailedHTMLProps<import("react").LabelHTMLAttributes<HTMLLabelElement>, HTMLLabelElement>, never>>> & string;
9
+ export declare const BoxedBadgesWrapper: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never> & Partial<Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>>> & string;
3
10
  export declare const BoxedStyled: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").LabelHTMLAttributes<HTMLLabelElement>, HTMLLabelElement>, keyof RadioButtonStyledProps> & RadioButtonStyledProps, never> & Partial<Pick<import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").LabelHTMLAttributes<HTMLLabelElement>, HTMLLabelElement>, keyof RadioButtonStyledProps> & RadioButtonStyledProps, never>>> & string;
@@ -7,13 +7,13 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
7
7
  return (mod && mod.__esModule) ? mod : { "default": mod };
8
8
  };
9
9
  Object.defineProperty(exports, "__esModule", { value: true });
10
- exports.BoxedStyled = void 0;
10
+ exports.BoxedStyled = exports.BoxedBadgesWrapper = exports.ImageLabel = exports.DescriptionText = exports.LabelSm = exports.LabelText = exports.LabelsWrapper = exports.Indicator = void 0;
11
11
  var jsx_runtime_1 = require("react/jsx-runtime");
12
12
  var styled_components_1 = __importDefault(require("styled-components"));
13
13
  var Icon_1 = __importDefault(require("../../../Icon/Icon"));
14
14
  var svgToBase64_1 = __importDefault(require("./../../../../utils/svgToBase64"));
15
15
  var devices_1 = require("../../../../constants/devices");
16
- exports.BoxedStyled = styled_components_1.default.label(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n border: 1px solid var(--dark-opacity-10);\n position: relative;\n border-radius: 0.5rem;\n display: flex;\n align-items: center;\n justify-content: center;\n height: 128px;\n cursor: ", ";\n @media only screen and ", " {\n height: 69px;\n }\n\n input[type=\"radio\"] {\n height: 0;\n width: 0;\n opacity: 0;\n z-index: -1;\n position: absolute;\n\n &:checked ~ .indicator {\n background-image:url('", "');\n }\n\n &:checked ", " {\n ~ div.labelsWrapper {\n &:before {\n content: \"\";\n position: absolute;\n inset: -1px;\n border-radius: 0.5rem;\n user-select: none;\n pointer-events: none;\n }\n }\n }\n \n &:checked {\n ~ div.labelsWrapper {\n &:before {\n border: 2px solid var(--primary) !important;\n }\n }\n }\n ", "\n }\n\n div.indicator {\n background-image: url('", "');\n background-size: 100% 100%;\n display: block;\n position: absolute;\n left: 12px;\n top: 12px;\n margin: ", ";\n width: ", ";\n height: ", ";\n\n &:disabled {\n cursor: not-allowed;\n }\n }\n\n div.labelsWrapper {\n row-gap: 4px;\n cursor: ", ";\n margin: 0;\n color: ", ";\n padding: 0;\n display: grid;\n text-align: center;\n\n @media only screen and ", " {\n //display: flex;\n //align-items: center;\n //justify-content: center;\n row-gap: 4px;\n }\n label.label {\n display: block;\n margin: 0 0 4px 0;\n vertical-align: middle;\n cursor: pointer;\n font:var(--title-bold-16-19);\n .labelSm{\n font:var(--body-regular-14-17);\n margin-left: 0.25rem;\n }\n @media only screen and ", " {\n margin: 0;\n }\n }\n\n label.description {\n display: block;\n vertical-align: middle;\n margin: 0;\n cursor: pointer;\n font:var(--body-regular-14-17);\n @media only screen and ", " {\n margin: 0 0 0 4px;\n }\n }\n }\n .boxedBadgesWrapper{\n position: absolute;\n right: -9px;\n top: -8px;\n transform: rotate(90deg);\n @media only screen and ", " {\n right: -6px;\n top: -6px;\n }\n }\n"], ["\n border: 1px solid var(--dark-opacity-10);\n position: relative;\n border-radius: 0.5rem;\n display: flex;\n align-items: center;\n justify-content: center;\n height: 128px;\n cursor: ", ";\n @media only screen and ", " {\n height: 69px;\n }\n\n input[type=\"radio\"] {\n height: 0;\n width: 0;\n opacity: 0;\n z-index: -1;\n position: absolute;\n\n &:checked ~ .indicator {\n background-image:url('", "');\n }\n\n &:checked ", " {\n ~ div.labelsWrapper {\n &:before {\n content: \"\";\n position: absolute;\n inset: -1px;\n border-radius: 0.5rem;\n user-select: none;\n pointer-events: none;\n }\n }\n }\n \n &:checked {\n ~ div.labelsWrapper {\n &:before {\n border: 2px solid var(--primary) !important;\n }\n }\n }\n ", "\n }\n\n div.indicator {\n background-image: url('", "');\n background-size: 100% 100%;\n display: block;\n position: absolute;\n left: 12px;\n top: 12px;\n margin: ", ";\n width: ", ";\n height: ", ";\n\n &:disabled {\n cursor: not-allowed;\n }\n }\n\n div.labelsWrapper {\n row-gap: 4px;\n cursor: ", ";\n margin: 0;\n color: ", ";\n padding: 0;\n display: grid;\n text-align: center;\n\n @media only screen and ", " {\n //display: flex;\n //align-items: center;\n //justify-content: center;\n row-gap: 4px;\n }\n label.label {\n display: block;\n margin: 0 0 4px 0;\n vertical-align: middle;\n cursor: pointer;\n font:var(--title-bold-16-19);\n .labelSm{\n font:var(--body-regular-14-17);\n margin-left: 0.25rem;\n }\n @media only screen and ", " {\n margin: 0;\n }\n }\n\n label.description {\n display: block;\n vertical-align: middle;\n margin: 0;\n cursor: pointer;\n font:var(--body-regular-14-17);\n @media only screen and ", " {\n margin: 0 0 0 4px;\n }\n }\n }\n .boxedBadgesWrapper{\n position: absolute;\n right: -9px;\n top: -8px;\n transform: rotate(90deg);\n @media only screen and ", " {\n right: -6px;\n top: -6px;\n }\n }\n"])), function (props) { return (props.$disabled ? "not-allowed" : "pointer"); }, devices_1.devices.lg, function (props) { return (0, svgToBase64_1.default)((0, jsx_runtime_1.jsx)(Icon_1.default, { hasWrapper: false, color: "".concat(props.$color), name: "RadioButtonElementChecked" })); }, function (props) { return !props.$readOnly && " , &:hover"; }, function (props) { return !props.$readOnly && " \n &:hover {\n ~ div.labelsWrapper {\n &:before {\n border: 1px solid var(--primary-hover);\n }\n }\n }\n "; }, function (props) { return props.$disabled ? (0, svgToBase64_1.default)((0, jsx_runtime_1.jsx)(Icon_1.default, { hasWrapper: false, name: "RadioButtonElementDisabled" })) : (props.$valid ? (0, svgToBase64_1.default)((0, jsx_runtime_1.jsx)(Icon_1.default, { hasWrapper: false, name: "RadioButtonElementUnchecked" })) : (0, svgToBase64_1.default)((0, jsx_runtime_1.jsx)(Icon_1.default, { hasWrapper: false, name: "RadioButtonElementInvalid" }))); }, function (props) { return (props.$size === "small" ? "0 8px 0 0" : "0 16px 0 0"); }, function (props) {
16
+ exports.Indicator = styled_components_1.default.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n background-image: url('", "');\n background-size: 100% 100%;\n display: block;\n position: absolute;\n left: 12px;\n top: 12px;\n margin: ", ";\n width: ", ";\n height: ", ";\n"], ["\n background-image: url('", "');\n background-size: 100% 100%;\n display: block;\n position: absolute;\n left: 12px;\n top: 12px;\n margin: ", ";\n width: ", ";\n height: ", ";\n"])), function (props) { return props.$disabled ? (0, svgToBase64_1.default)((0, jsx_runtime_1.jsx)(Icon_1.default, { hasWrapper: false, name: "RadioButtonElementDisabled" })) : (props.$valid ? (0, svgToBase64_1.default)((0, jsx_runtime_1.jsx)(Icon_1.default, { hasWrapper: false, name: "RadioButtonElementUnchecked" })) : (0, svgToBase64_1.default)((0, jsx_runtime_1.jsx)(Icon_1.default, { hasWrapper: false, name: "RadioButtonElementInvalid" }))); }, function (props) { return (props.$size === "small" ? "0 8px 0 0" : "0 16px 0 0"); }, function (props) {
17
17
  switch (props.$size) {
18
18
  case 'small':
19
19
  return "16px";
@@ -31,5 +31,12 @@ exports.BoxedStyled = styled_components_1.default.label(templateObject_1 || (tem
31
31
  default:
32
32
  return "16px";
33
33
  }
34
- }, function (props) { return (props.$disabled ? "not-allowed" : "pointer"); }, function (props) { return props.$valid ? 'var(--dark)' : 'var(--red)'; }, devices_1.devices.lg, devices_1.devices.lg, devices_1.devices.lg, devices_1.devices.lg);
35
- var templateObject_1;
34
+ });
35
+ exports.LabelsWrapper = styled_components_1.default.div(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n row-gap: 4px;\n cursor: ", ";\n margin: 0;\n color: ", ";\n padding: 0;\n display: grid;\n text-align: center;\n position: relative;\n\n @media only screen and ", " {\n row-gap: 4px;\n }\n"], ["\n row-gap: 4px;\n cursor: ", ";\n margin: 0;\n color: ", ";\n padding: 0;\n display: grid;\n text-align: center;\n position: relative;\n\n @media only screen and ", " {\n row-gap: 4px;\n }\n"])), function (props) { return (props.$disabled ? "not-allowed" : "pointer"); }, function (props) { return props.$valid ? 'var(--dark)' : 'var(--red)'; }, devices_1.devices.lg);
36
+ exports.LabelText = styled_components_1.default.label(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n display: block;\n margin: 0 0 4px 0;\n vertical-align: middle;\n cursor: pointer;\n font:var(--title-bold-16-19);\n\n @media only screen and ", " {\n margin: 0;\n }\n"], ["\n display: block;\n margin: 0 0 4px 0;\n vertical-align: middle;\n cursor: pointer;\n font:var(--title-bold-16-19);\n\n @media only screen and ", " {\n margin: 0;\n }\n"])), devices_1.devices.lg);
37
+ exports.LabelSm = styled_components_1.default.span(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n font:var(--body-regular-14-17);\n margin-left: 0.25rem;\n"], ["\n font:var(--body-regular-14-17);\n margin-left: 0.25rem;\n"])));
38
+ exports.DescriptionText = styled_components_1.default.label(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n display: block;\n vertical-align: middle;\n margin: 0;\n cursor: pointer;\n font:var(--body-regular-14-17);\n\n @media only screen and ", " {\n margin: 0 0 0 4px;\n }\n"], ["\n display: block;\n vertical-align: middle;\n margin: 0;\n cursor: pointer;\n font:var(--body-regular-14-17);\n\n @media only screen and ", " {\n margin: 0 0 0 4px;\n }\n"])), devices_1.devices.lg);
39
+ exports.ImageLabel = styled_components_1.default.label(templateObject_6 || (templateObject_6 = __makeTemplateObject(["\n display: block;\n cursor: pointer;\n"], ["\n display: block;\n cursor: pointer;\n"])));
40
+ exports.BoxedBadgesWrapper = styled_components_1.default.div(templateObject_7 || (templateObject_7 = __makeTemplateObject(["\n position: absolute;\n right: -9px;\n top: -8px;\n transform: rotate(90deg);\n\n @media only screen and ", " {\n right: -6px;\n top: -6px;\n }\n"], ["\n position: absolute;\n right: -9px;\n top: -8px;\n transform: rotate(90deg);\n\n @media only screen and ", " {\n right: -6px;\n top: -6px;\n }\n"])), devices_1.devices.lg);
41
+ exports.BoxedStyled = styled_components_1.default.label(templateObject_8 || (templateObject_8 = __makeTemplateObject(["\n border: 1px solid var(--dark-opacity-10);\n position: relative;\n border-radius: 0.5rem;\n display: flex;\n align-items: center;\n justify-content: center;\n height: 128px;\n cursor: ", ";\n\n @media only screen and ", " {\n height: 69px;\n }\n\n input[type=\"radio\"] {\n height: 0;\n width: 0;\n opacity: 0;\n z-index: -1;\n position: absolute;\n\n &:checked ~ ", " {\n background-image:url('", "');\n }\n\n &:checked ", " {\n ~ ", " {\n &:before {\n content: \"\";\n position: absolute;\n inset: -1px;\n border-radius: 0.5rem;\n user-select: none;\n pointer-events: none;\n }\n }\n }\n\n &:checked {\n ~ ", " {\n &:before {\n border: 2px solid var(--primary) !important;\n }\n }\n }\n\n ", "\n }\n"], ["\n border: 1px solid var(--dark-opacity-10);\n position: relative;\n border-radius: 0.5rem;\n display: flex;\n align-items: center;\n justify-content: center;\n height: 128px;\n cursor: ", ";\n\n @media only screen and ", " {\n height: 69px;\n }\n\n input[type=\"radio\"] {\n height: 0;\n width: 0;\n opacity: 0;\n z-index: -1;\n position: absolute;\n\n &:checked ~ ", " {\n background-image:url('", "');\n }\n\n &:checked ", " {\n ~ ", " {\n &:before {\n content: \"\";\n position: absolute;\n inset: -1px;\n border-radius: 0.5rem;\n user-select: none;\n pointer-events: none;\n }\n }\n }\n\n &:checked {\n ~ ", " {\n &:before {\n border: 2px solid var(--primary) !important;\n }\n }\n }\n\n ", "\n }\n"])), function (props) { return (props.$disabled ? "not-allowed" : "pointer"); }, devices_1.devices.lg, exports.Indicator, function (props) { return (0, svgToBase64_1.default)((0, jsx_runtime_1.jsx)(Icon_1.default, { hasWrapper: false, color: "".concat(props.$color), name: "RadioButtonElementChecked" })); }, function (props) { return !props.$readOnly && " , &:hover"; }, exports.LabelsWrapper, exports.LabelsWrapper, function (props) { return !props.$readOnly && " \n &:hover {\n ~ ".concat(exports.LabelsWrapper, " {\n &:before {\n border: 1px solid var(--primary-hover);\n }\n }\n }\n "); });
42
+ var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5, templateObject_6, templateObject_7, templateObject_8;
@@ -0,0 +1,4 @@
1
+ /// <reference types="react" />
2
+ import { RadioButtonProps } from "./../../props";
3
+ declare const BoxedMd: ({ value, checked, onChange, onClick, name, label, disabled, description, image, readOnly, id, size, valid, labelOffset, textSize, color, showIndicator, }: RadioButtonProps) => import("react").JSX.Element;
4
+ export default BoxedMd;
@@ -0,0 +1,37 @@
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 react_1 = require("react");
16
+ var props_1 = require("./../../props");
17
+ var BoxedMd_styled_1 = require("./BoxedMd.styled");
18
+ var BoxedMd = function (_a) {
19
+ var value = _a.value, checked = _a.checked, onChange = _a.onChange, onClick = _a.onClick, name = _a.name, label = _a.label, disabled = _a.disabled, description = _a.description, image = _a.image, readOnly = _a.readOnly, _b = _a.id, id = _b === void 0 ? props_1.BoxedDefault.id : _b, _c = _a.size, size = _c === void 0 ? props_1.BoxedDefault.size : _c, _d = _a.valid, valid = _d === void 0 ? props_1.BoxedDefault.valid : _d, _e = _a.labelOffset, labelOffset = _e === void 0 ? props_1.BoxedDefault.labelOffset : _e, _f = _a.textSize, textSize = _f === void 0 ? props_1.BoxedDefault.textSize : _f, _g = _a.color, color = _g === void 0 ? props_1.BoxedDefault.color : _g, _h = _a.showIndicator, showIndicator = _h === void 0 ? true : _h;
20
+ var _j = (0, react_1.useState)(color), inputColor = _j[0], setInputColor = _j[1];
21
+ (0, react_1.useEffect)(function () {
22
+ setInputColor(window.getComputedStyle(document.body).getPropertyValue('--primary'));
23
+ });
24
+ var styledProps = {
25
+ $disabled: disabled,
26
+ $checked: checked,
27
+ $size: size,
28
+ $valid: valid,
29
+ $labelOffset: labelOffset,
30
+ $readOnly: readOnly,
31
+ $color: inputColor,
32
+ $textSize: textSize,
33
+ $showIndicator: showIndicator,
34
+ };
35
+ return ((0, jsx_runtime_1.jsxs)(BoxedMd_styled_1.BoxedMdStyled, __assign({ htmlFor: id }, styledProps, { children: [(0, jsx_runtime_1.jsx)("input", { id: id, type: "radio", name: name, value: value, disabled: disabled, checked: checked, onChange: onChange, onClick: onClick, readOnly: readOnly }), showIndicator && (0, jsx_runtime_1.jsx)(BoxedMd_styled_1.Indicator, __assign({}, styledProps)), (label || description || image) && ((0, jsx_runtime_1.jsx)(BoxedMd_styled_1.LabelsWrapper, __assign({}, styledProps, { children: label && ((0, jsx_runtime_1.jsx)(BoxedMd_styled_1.LabelText, __assign({ htmlFor: id }, styledProps, { children: label }))) })))] })));
36
+ };
37
+ exports.default = BoxedMd;
@@ -0,0 +1,6 @@
1
+ /// <reference types="react" />
2
+ import { RadioButtonStyledProps } from "./../../props";
3
+ export declare const Indicator: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof RadioButtonStyledProps> & RadioButtonStyledProps, never> & Partial<Pick<import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof RadioButtonStyledProps> & RadioButtonStyledProps, never>>> & string;
4
+ export declare const LabelsWrapper: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof RadioButtonStyledProps> & RadioButtonStyledProps, never> & Partial<Pick<import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof RadioButtonStyledProps> & RadioButtonStyledProps, never>>> & string;
5
+ export declare const LabelText: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").LabelHTMLAttributes<HTMLLabelElement>, HTMLLabelElement>, keyof RadioButtonStyledProps> & RadioButtonStyledProps, never> & Partial<Pick<import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").LabelHTMLAttributes<HTMLLabelElement>, HTMLLabelElement>, keyof RadioButtonStyledProps> & RadioButtonStyledProps, never>>> & string;
6
+ export declare const BoxedMdStyled: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").LabelHTMLAttributes<HTMLLabelElement>, HTMLLabelElement>, keyof RadioButtonStyledProps> & RadioButtonStyledProps, never> & Partial<Pick<import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").LabelHTMLAttributes<HTMLLabelElement>, HTMLLabelElement>, keyof RadioButtonStyledProps> & RadioButtonStyledProps, never>>> & string;
@@ -0,0 +1,46 @@
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.BoxedMdStyled = exports.LabelText = exports.LabelsWrapper = exports.Indicator = void 0;
11
+ var jsx_runtime_1 = require("react/jsx-runtime");
12
+ var styled_components_1 = __importDefault(require("styled-components"));
13
+ var Icon_1 = __importDefault(require("../../../Icon/Icon"));
14
+ var svgToBase64_1 = __importDefault(require("./../../../../utils/svgToBase64"));
15
+ exports.Indicator = styled_components_1.default.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n background-image: url('", "');\n background-size: 100% 100%;\n display: block;\n position: absolute;\n left: 1.5rem;\n top: 50%;\n transform: translateY(-50%);\n margin: ", ";\n width: ", ";\n height: ", ";\n"], ["\n background-image: url('", "');\n background-size: 100% 100%;\n display: block;\n position: absolute;\n left: 1.5rem;\n top: 50%;\n transform: translateY(-50%);\n margin: ", ";\n width: ", ";\n height: ", ";\n"])), function (props) { return props.$disabled ? (0, svgToBase64_1.default)((0, jsx_runtime_1.jsx)(Icon_1.default, { hasWrapper: false, name: "RadioButtonElementDisabled" })) : (props.$valid ? (0, svgToBase64_1.default)((0, jsx_runtime_1.jsx)(Icon_1.default, { hasWrapper: false, name: "RadioButtonElementUnchecked" })) : (0, svgToBase64_1.default)((0, jsx_runtime_1.jsx)(Icon_1.default, { hasWrapper: false, name: "RadioButtonElementInvalid" }))); }, function (props) { return (props.$size === "small" ? "0 8px 0 0" : "0 16px 0 0"); }, function (props) {
16
+ switch (props.$size) {
17
+ case 'small':
18
+ return "16px";
19
+ case 'medium':
20
+ return "24px";
21
+ default:
22
+ return "16px";
23
+ }
24
+ }, function (props) {
25
+ switch (props.$size) {
26
+ case 'small':
27
+ return "16px";
28
+ case 'medium':
29
+ return "24px";
30
+ default:
31
+ return "16px";
32
+ }
33
+ });
34
+ exports.LabelsWrapper = styled_components_1.default.div(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n row-gap: 4px;\n cursor: ", ";\n margin: 0;\n color: ", ";\n padding: 0 0 0 ", ";\n display: grid;\n"], ["\n row-gap: 4px;\n cursor: ", ";\n margin: 0;\n color: ", ";\n padding: 0 0 0 ", ";\n display: grid;\n"])), function (props) { return (props.$disabled ? "not-allowed" : "pointer"); }, function (props) { return props.$valid ? 'var(--dark)' : 'var(--red)'; }, function (props) { return props.$showIndicator ? "2rem" : "0"; });
35
+ exports.LabelText = styled_components_1.default.label(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n display: block;\n margin: 0;\n vertical-align: middle;\n cursor: pointer;\n font: ", ";\n"], ["\n display: block;\n margin: 0;\n vertical-align: middle;\n cursor: pointer;\n font: ", ";\n"])), function (props) {
36
+ switch (props.$textSize) {
37
+ case 'small':
38
+ return "var(--caption-semi-bold-12-15)";
39
+ case 'medium':
40
+ return "var(--body-semi-bold-14-17)";
41
+ default:
42
+ return "var(--body-semi-bold-14-17)";
43
+ }
44
+ });
45
+ exports.BoxedMdStyled = styled_components_1.default.label(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n border: 1px solid var(--dark-opacity-10);\n position: relative;\n border-radius: 0.5rem;\n display: flex;\n align-items: center;\n justify-content: flex-start;\n cursor: ", ";\n padding: 0.5rem 1.5rem;\n min-height: 48px;\n\n input[type=\"radio\"] {\n height: 0;\n width: 0;\n opacity: 0;\n z-index: -1;\n position: absolute;\n\n &:checked ~ ", " {\n background-image:url('", "');\n }\n\n &:checked ", " {\n ~ ", " {\n &:before {\n content: \"\";\n position: absolute;\n inset: -1px;\n border-radius: 0.5rem;\n user-select: none;\n pointer-events: none;\n }\n }\n }\n\n &:checked {\n ~ ", " {\n &:before {\n border: 2px solid var(--primary) !important;\n }\n }\n }\n }\n"], ["\n border: 1px solid var(--dark-opacity-10);\n position: relative;\n border-radius: 0.5rem;\n display: flex;\n align-items: center;\n justify-content: flex-start;\n cursor: ", ";\n padding: 0.5rem 1.5rem;\n min-height: 48px;\n\n input[type=\"radio\"] {\n height: 0;\n width: 0;\n opacity: 0;\n z-index: -1;\n position: absolute;\n\n &:checked ~ ", " {\n background-image:url('", "');\n }\n\n &:checked ", " {\n ~ ", " {\n &:before {\n content: \"\";\n position: absolute;\n inset: -1px;\n border-radius: 0.5rem;\n user-select: none;\n pointer-events: none;\n }\n }\n }\n\n &:checked {\n ~ ", " {\n &:before {\n border: 2px solid var(--primary) !important;\n }\n }\n }\n }\n"])), function (props) { return (props.$disabled ? "not-allowed" : "pointer"); }, exports.Indicator, function (props) { return (0, svgToBase64_1.default)((0, jsx_runtime_1.jsx)(Icon_1.default, { hasWrapper: false, color: "".concat(props.$color), name: "RadioButtonElementChecked" })); }, function (props) { return !props.$readOnly && " , &:hover"; }, exports.LabelsWrapper, exports.LabelsWrapper);
46
+ var templateObject_1, templateObject_2, templateObject_3, templateObject_4;
@@ -0,0 +1 @@
1
+ export { default } from './BoxedMd';
@@ -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 BoxedMd_1 = require("./BoxedMd");
8
+ Object.defineProperty(exports, "default", { enumerable: true, get: function () { return __importDefault(BoxedMd_1).default; } });
@@ -1,4 +1,4 @@
1
1
  /// <reference types="react" />
2
2
  import { RadioButtonProps } from "./../../props";
3
- declare const BoxedSm: ({ value, checked, onChange, onClick, name, label, disabled, description, image, readOnly, id, size, valid, labelOffset, textSize, color }: RadioButtonProps) => import("react").JSX.Element;
3
+ declare const BoxedSm: ({ value, checked, onChange, onClick, name, label, disabled, description, image, readOnly, id, size, valid, labelOffset, textSize, color, showIndicator, }: RadioButtonProps) => import("react").JSX.Element;
4
4
  export default BoxedSm;
@@ -16,11 +16,22 @@ var react_1 = require("react");
16
16
  var props_1 = require("./../../props");
17
17
  var BoxedSm_styled_1 = require("./BoxedSm.styled");
18
18
  var BoxedSm = function (_a) {
19
- var value = _a.value, checked = _a.checked, onChange = _a.onChange, onClick = _a.onClick, name = _a.name, label = _a.label, disabled = _a.disabled, description = _a.description, image = _a.image, readOnly = _a.readOnly, _b = _a.id, id = _b === void 0 ? props_1.BoxedDefault.id : _b, _c = _a.size, size = _c === void 0 ? props_1.BoxedDefault.size : _c, _d = _a.valid, valid = _d === void 0 ? props_1.BoxedDefault.valid : _d, _e = _a.labelOffset, labelOffset = _e === void 0 ? props_1.BoxedDefault.labelOffset : _e, _f = _a.textSize, textSize = _f === void 0 ? props_1.BoxedDefault.textSize : _f, _g = _a.color, color = _g === void 0 ? props_1.BoxedDefault.color : _g;
20
- var _h = (0, react_1.useState)(color), inputColor = _h[0], setInputColor = _h[1];
19
+ var value = _a.value, checked = _a.checked, onChange = _a.onChange, onClick = _a.onClick, name = _a.name, label = _a.label, disabled = _a.disabled, description = _a.description, image = _a.image, readOnly = _a.readOnly, _b = _a.id, id = _b === void 0 ? props_1.BoxedDefault.id : _b, _c = _a.size, size = _c === void 0 ? props_1.BoxedDefault.size : _c, _d = _a.valid, valid = _d === void 0 ? props_1.BoxedDefault.valid : _d, _e = _a.labelOffset, labelOffset = _e === void 0 ? props_1.BoxedDefault.labelOffset : _e, _f = _a.textSize, textSize = _f === void 0 ? props_1.BoxedDefault.textSize : _f, _g = _a.color, color = _g === void 0 ? props_1.BoxedDefault.color : _g, _h = _a.showIndicator, showIndicator = _h === void 0 ? true : _h;
20
+ var _j = (0, react_1.useState)(color), inputColor = _j[0], setInputColor = _j[1];
21
21
  (0, react_1.useEffect)(function () {
22
22
  setInputColor(window.getComputedStyle(document.body).getPropertyValue('--primary'));
23
23
  });
24
- return ((0, jsx_runtime_1.jsxs)(BoxedSm_styled_1.BoxedSmStyled, __assign({ htmlFor: id, "$disabled": disabled, "$checked": checked, "$size": size, "$valid": valid, "$labelOffset": labelOffset, "$readOnly": readOnly, "$color": inputColor, "$textSize": textSize }, { children: [(0, jsx_runtime_1.jsx)("input", { id: id, type: "radio", name: name, value: value, disabled: disabled, checked: checked, onChange: onChange, onClick: onClick, readOnly: readOnly }), (0, jsx_runtime_1.jsx)("div", { className: "indicator" }), (label || description || image) && ((0, jsx_runtime_1.jsx)("div", __assign({ className: "labelsWrapper" }, { children: label && ((0, jsx_runtime_1.jsx)("label", __assign({ className: "label", htmlFor: id }, { children: label }))) })))] })));
24
+ var styledProps = {
25
+ $disabled: disabled,
26
+ $checked: checked,
27
+ $size: size,
28
+ $valid: valid,
29
+ $labelOffset: labelOffset,
30
+ $readOnly: readOnly,
31
+ $color: inputColor,
32
+ $textSize: textSize,
33
+ $showIndicator: showIndicator,
34
+ };
35
+ return ((0, jsx_runtime_1.jsxs)(BoxedSm_styled_1.BoxedSmStyled, __assign({ htmlFor: id }, styledProps, { children: [(0, jsx_runtime_1.jsx)("input", { id: id, type: "radio", name: name, value: value, disabled: disabled, checked: checked, onChange: onChange, onClick: onClick, readOnly: readOnly }), showIndicator && (0, jsx_runtime_1.jsx)(BoxedSm_styled_1.Indicator, __assign({}, styledProps)), (label || description || image) && ((0, jsx_runtime_1.jsx)(BoxedSm_styled_1.LabelsWrapper, __assign({}, styledProps, { children: label && ((0, jsx_runtime_1.jsx)(BoxedSm_styled_1.LabelText, __assign({ htmlFor: id }, styledProps, { children: label }))) })))] })));
25
36
  };
26
37
  exports.default = BoxedSm;
@@ -1,3 +1,6 @@
1
1
  /// <reference types="react" />
2
2
  import { RadioButtonStyledProps } from "./../../props";
3
+ export declare const Indicator: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof RadioButtonStyledProps> & RadioButtonStyledProps, never> & Partial<Pick<import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof RadioButtonStyledProps> & RadioButtonStyledProps, never>>> & string;
4
+ export declare const LabelsWrapper: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof RadioButtonStyledProps> & RadioButtonStyledProps, never> & Partial<Pick<import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof RadioButtonStyledProps> & RadioButtonStyledProps, never>>> & string;
5
+ export declare const LabelText: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").LabelHTMLAttributes<HTMLLabelElement>, HTMLLabelElement>, keyof RadioButtonStyledProps> & RadioButtonStyledProps, never> & Partial<Pick<import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").LabelHTMLAttributes<HTMLLabelElement>, HTMLLabelElement>, keyof RadioButtonStyledProps> & RadioButtonStyledProps, never>>> & string;
3
6
  export declare const BoxedSmStyled: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").LabelHTMLAttributes<HTMLLabelElement>, HTMLLabelElement>, keyof RadioButtonStyledProps> & RadioButtonStyledProps, never> & Partial<Pick<import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").LabelHTMLAttributes<HTMLLabelElement>, HTMLLabelElement>, keyof RadioButtonStyledProps> & RadioButtonStyledProps, never>>> & string;
@@ -7,12 +7,12 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
7
7
  return (mod && mod.__esModule) ? mod : { "default": mod };
8
8
  };
9
9
  Object.defineProperty(exports, "__esModule", { value: true });
10
- exports.BoxedSmStyled = void 0;
10
+ exports.BoxedSmStyled = exports.LabelText = exports.LabelsWrapper = exports.Indicator = void 0;
11
11
  var jsx_runtime_1 = require("react/jsx-runtime");
12
12
  var styled_components_1 = __importDefault(require("styled-components"));
13
13
  var Icon_1 = __importDefault(require("../../../Icon/Icon"));
14
14
  var svgToBase64_1 = __importDefault(require("./../../../../utils/svgToBase64"));
15
- exports.BoxedSmStyled = styled_components_1.default.label(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n border: 1px solid var(--dark-opacity-10);\n position: relative;\n border-radius: 0.5rem;\n display: flex;\n align-items: center;\n justify-content: flex-start;\n cursor: ", ";\n padding: calc(0.75rem - 0.5px) 1rem;\n input[type=\"radio\"] {\n height: 0;\n width: 0;\n opacity: 0;\n z-index: -1;\n position: absolute;\n\n &:checked ~ .indicator {\n background-image:url('", "');\n }\n\n &:checked ", " {\n ~ div.labelsWrapper {\n &:before {\n content: \"\";\n position: absolute;\n inset: -1px;\n border-radius: 0.5rem;\n user-select: none;\n pointer-events: none;\n }\n }\n }\n \n &:checked {\n ~ div.labelsWrapper {\n &:before {\n border: 2px solid var(--primary) !important;\n }\n }\n }\n }\n\n div.indicator {\n background-image: url('", "');\n background-size: 100% 100%;\n display: block;\n position: absolute;\n left: 1rem;\n top: 50%;\n transform: translateY(-50%);\n margin: ", ";\n width: ", ";\n height: ", ";\n\n &:disabled {\n cursor: not-allowed;\n }\n }\n\n div.labelsWrapper {\n row-gap: 4px;\n cursor: ", ";\n margin: 0;\n color: ", ";\n padding: 0 0 0 1.5rem;\n display: grid;\n\n label.label {\n display: block;\n margin: 0;\n vertical-align: middle;\n cursor: pointer;\n font: ", ";\n }\n }\n"], ["\n border: 1px solid var(--dark-opacity-10);\n position: relative;\n border-radius: 0.5rem;\n display: flex;\n align-items: center;\n justify-content: flex-start;\n cursor: ", ";\n padding: calc(0.75rem - 0.5px) 1rem;\n input[type=\"radio\"] {\n height: 0;\n width: 0;\n opacity: 0;\n z-index: -1;\n position: absolute;\n\n &:checked ~ .indicator {\n background-image:url('", "');\n }\n\n &:checked ", " {\n ~ div.labelsWrapper {\n &:before {\n content: \"\";\n position: absolute;\n inset: -1px;\n border-radius: 0.5rem;\n user-select: none;\n pointer-events: none;\n }\n }\n }\n \n &:checked {\n ~ div.labelsWrapper {\n &:before {\n border: 2px solid var(--primary) !important;\n }\n }\n }\n }\n\n div.indicator {\n background-image: url('", "');\n background-size: 100% 100%;\n display: block;\n position: absolute;\n left: 1rem;\n top: 50%;\n transform: translateY(-50%);\n margin: ", ";\n width: ", ";\n height: ", ";\n\n &:disabled {\n cursor: not-allowed;\n }\n }\n\n div.labelsWrapper {\n row-gap: 4px;\n cursor: ", ";\n margin: 0;\n color: ", ";\n padding: 0 0 0 1.5rem;\n display: grid;\n\n label.label {\n display: block;\n margin: 0;\n vertical-align: middle;\n cursor: pointer;\n font: ", ";\n }\n }\n"])), function (props) { return (props.$disabled ? "not-allowed" : "pointer"); }, function (props) { return (0, svgToBase64_1.default)((0, jsx_runtime_1.jsx)(Icon_1.default, { hasWrapper: false, color: "".concat(props.$color), name: "RadioButtonElementChecked" })); }, function (props) { return !props.$readOnly && " , &:hover"; }, function (props) { return props.$disabled ? (0, svgToBase64_1.default)((0, jsx_runtime_1.jsx)(Icon_1.default, { hasWrapper: false, name: "RadioButtonElementDisabled" })) : (props.$valid ? (0, svgToBase64_1.default)((0, jsx_runtime_1.jsx)(Icon_1.default, { hasWrapper: false, name: "RadioButtonElementUnchecked" })) : (0, svgToBase64_1.default)((0, jsx_runtime_1.jsx)(Icon_1.default, { hasWrapper: false, name: "RadioButtonElementInvalid" }))); }, function (props) { return (props.$size === "small" ? "0 8px 0 0" : "0 16px 0 0"); }, function (props) {
15
+ exports.Indicator = styled_components_1.default.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n background-image: url('", "');\n background-size: 100% 100%;\n display: block;\n position: absolute;\n left: 1rem;\n top: 50%;\n transform: translateY(-50%);\n margin: ", ";\n width: ", ";\n height: ", ";\n"], ["\n background-image: url('", "');\n background-size: 100% 100%;\n display: block;\n position: absolute;\n left: 1rem;\n top: 50%;\n transform: translateY(-50%);\n margin: ", ";\n width: ", ";\n height: ", ";\n"])), function (props) { return props.$disabled ? (0, svgToBase64_1.default)((0, jsx_runtime_1.jsx)(Icon_1.default, { hasWrapper: false, name: "RadioButtonElementDisabled" })) : (props.$valid ? (0, svgToBase64_1.default)((0, jsx_runtime_1.jsx)(Icon_1.default, { hasWrapper: false, name: "RadioButtonElementUnchecked" })) : (0, svgToBase64_1.default)((0, jsx_runtime_1.jsx)(Icon_1.default, { hasWrapper: false, name: "RadioButtonElementInvalid" }))); }, function (props) { return (props.$size === "small" ? "0 8px 0 0" : "0 16px 0 0"); }, function (props) {
16
16
  switch (props.$size) {
17
17
  case 'small':
18
18
  return "16px";
@@ -30,7 +30,9 @@ exports.BoxedSmStyled = styled_components_1.default.label(templateObject_1 || (t
30
30
  default:
31
31
  return "16px";
32
32
  }
33
- }, function (props) { return (props.$disabled ? "not-allowed" : "pointer"); }, function (props) { return props.$valid ? 'var(--dark)' : 'var(--red)'; }, function (props) {
33
+ });
34
+ exports.LabelsWrapper = styled_components_1.default.div(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n row-gap: 4px;\n cursor: ", ";\n margin: 0;\n color: ", ";\n padding: 0 0 0 ", ";\n display: grid;\n position: relative;\n"], ["\n row-gap: 4px;\n cursor: ", ";\n margin: 0;\n color: ", ";\n padding: 0 0 0 ", ";\n display: grid;\n position: relative;\n"])), function (props) { return (props.$disabled ? "not-allowed" : "pointer"); }, function (props) { return props.$valid ? 'var(--dark)' : 'var(--red)'; }, function (props) { return props.$showIndicator ? "1.5rem" : "0"; });
35
+ exports.LabelText = styled_components_1.default.label(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n display: block;\n margin: 0;\n vertical-align: middle;\n cursor: pointer;\n font: ", ";\n"], ["\n display: block;\n margin: 0;\n vertical-align: middle;\n cursor: pointer;\n font: ", ";\n"])), function (props) {
34
36
  switch (props.$textSize) {
35
37
  case 'small':
36
38
  return "var(--caption-semi-bold-12-15)";
@@ -40,4 +42,5 @@ exports.BoxedSmStyled = styled_components_1.default.label(templateObject_1 || (t
40
42
  return "var(--body-semi-bold-14-17)";
41
43
  }
42
44
  });
43
- var templateObject_1;
45
+ exports.BoxedSmStyled = styled_components_1.default.label(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n border: 1px solid var(--dark-opacity-10);\n position: relative;\n border-radius: 0.5rem;\n display: flex;\n align-items: center;\n justify-content: flex-start;\n cursor: ", ";\n padding: calc(0.75rem - 0.5px) 1rem;\n\n input[type=\"radio\"] {\n height: 0;\n width: 0;\n opacity: 0;\n z-index: -1;\n position: absolute;\n\n &:checked ~ ", " {\n background-image:url('", "');\n }\n\n &:checked ", " {\n ~ ", " {\n &:before {\n content: \"\";\n position: absolute;\n inset: -1px;\n border-radius: 0.5rem;\n user-select: none;\n pointer-events: none;\n }\n }\n }\n\n &:checked {\n ~ ", " {\n &:before {\n border: 2px solid var(--primary) !important;\n }\n }\n }\n }\n"], ["\n border: 1px solid var(--dark-opacity-10);\n position: relative;\n border-radius: 0.5rem;\n display: flex;\n align-items: center;\n justify-content: flex-start;\n cursor: ", ";\n padding: calc(0.75rem - 0.5px) 1rem;\n\n input[type=\"radio\"] {\n height: 0;\n width: 0;\n opacity: 0;\n z-index: -1;\n position: absolute;\n\n &:checked ~ ", " {\n background-image:url('", "');\n }\n\n &:checked ", " {\n ~ ", " {\n &:before {\n content: \"\";\n position: absolute;\n inset: -1px;\n border-radius: 0.5rem;\n user-select: none;\n pointer-events: none;\n }\n }\n }\n\n &:checked {\n ~ ", " {\n &:before {\n border: 2px solid var(--primary) !important;\n }\n }\n }\n }\n"])), function (props) { return (props.$disabled ? "not-allowed" : "pointer"); }, exports.Indicator, function (props) { return (0, svgToBase64_1.default)((0, jsx_runtime_1.jsx)(Icon_1.default, { hasWrapper: false, color: "".concat(props.$color), name: "RadioButtonElementChecked" })); }, function (props) { return !props.$readOnly && " , &:hover"; }, exports.LabelsWrapper, exports.LabelsWrapper);
46
+ var templateObject_1, templateObject_2, templateObject_3, templateObject_4;
@@ -16,6 +16,12 @@ var props_1 = require("./../../props");
16
16
  var Color_styled_1 = require("./Color.styled");
17
17
  var Color = function (_a) {
18
18
  var value = _a.value, checked = _a.checked, onChange = _a.onChange, onClick = _a.onClick, name = _a.name, label = _a.label, disabled = _a.disabled, readOnly = _a.readOnly, _b = _a.id, id = _b === void 0 ? props_1.BasicDefault.id : _b, _c = _a.size, size = _c === void 0 ? props_1.BasicDefault.size : _c, color = _a.color;
19
- return ((0, jsx_runtime_1.jsxs)(Color_styled_1.ColorStyled, __assign({ htmlFor: id, "$disabled": disabled, "$checked": checked, "$color": color, "$size": size }, { children: [(0, jsx_runtime_1.jsx)("input", { id: id, type: "radio", name: name, value: value, disabled: disabled, checked: checked, onChange: onChange, onClick: onClick, readOnly: readOnly }), (0, jsx_runtime_1.jsx)("div", { className: "colorIndicator" }), label && ((0, jsx_runtime_1.jsx)("span", __assign({ className: "colorLabel" }, { children: label })))] })));
19
+ var styledProps = {
20
+ $disabled: disabled,
21
+ $checked: checked,
22
+ $color: color,
23
+ $size: size,
24
+ };
25
+ return ((0, jsx_runtime_1.jsxs)(Color_styled_1.ColorStyled, __assign({ htmlFor: id }, styledProps, { children: [(0, jsx_runtime_1.jsx)("input", { id: id, type: "radio", name: name, value: value, disabled: disabled, checked: checked, onChange: onChange, onClick: onClick, readOnly: readOnly }), (0, jsx_runtime_1.jsx)(Color_styled_1.ColorIndicator, __assign({}, styledProps)), label && (0, jsx_runtime_1.jsx)(Color_styled_1.ColorLabel, __assign({}, styledProps, { children: label }))] })));
20
26
  };
21
27
  exports.default = Color;
@@ -5,4 +5,6 @@ export interface ColorStyledProps {
5
5
  $color?: string;
6
6
  $size?: string;
7
7
  }
8
+ export declare const ColorIndicator: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof ColorStyledProps> & ColorStyledProps, never> & Partial<Pick<import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof ColorStyledProps> & ColorStyledProps, never>>> & string;
9
+ export declare const ColorLabel: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, keyof ColorStyledProps> & ColorStyledProps, never> & Partial<Pick<import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, keyof ColorStyledProps> & ColorStyledProps, never>>> & string;
8
10
  export declare const ColorStyled: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").LabelHTMLAttributes<HTMLLabelElement>, HTMLLabelElement>, keyof ColorStyledProps> & ColorStyledProps, never> & Partial<Pick<import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").LabelHTMLAttributes<HTMLLabelElement>, HTMLLabelElement>, keyof ColorStyledProps> & ColorStyledProps, never>>> & string;
@@ -7,7 +7,9 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
7
7
  return (mod && mod.__esModule) ? mod : { "default": mod };
8
8
  };
9
9
  Object.defineProperty(exports, "__esModule", { value: true });
10
- exports.ColorStyled = void 0;
10
+ exports.ColorStyled = exports.ColorLabel = exports.ColorIndicator = void 0;
11
11
  var styled_components_1 = __importDefault(require("styled-components"));
12
- exports.ColorStyled = styled_components_1.default.label(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n position: relative;\n display: inline-flex;\n flex-direction: column;\n align-items: center;\n gap: 8px;\n cursor: ", ";\n ", "\n\n input[type=\"radio\"] {\n height: 0;\n width: 0;\n opacity: 0;\n z-index: -1;\n position: absolute;\n }\n\n .colorIndicator {\n width: ", ";\n height: ", ";\n border-radius: 50%;\n background-color: ", ";\n box-sizing: border-box;\n outline: ", ";\n outline-offset: 2px;\n }\n\n .colorLabel {\n font: var(--caption-medium-12-15);\n color: ", ";\n text-align: center;\n white-space: nowrap;\n }\n"], ["\n position: relative;\n display: inline-flex;\n flex-direction: column;\n align-items: center;\n gap: 8px;\n cursor: ", ";\n ", "\n\n input[type=\"radio\"] {\n height: 0;\n width: 0;\n opacity: 0;\n z-index: -1;\n position: absolute;\n }\n\n .colorIndicator {\n width: ", ";\n height: ", ";\n border-radius: 50%;\n background-color: ", ";\n box-sizing: border-box;\n outline: ", ";\n outline-offset: 2px;\n }\n\n .colorLabel {\n font: var(--caption-medium-12-15);\n color: ", ";\n text-align: center;\n white-space: nowrap;\n }\n"])), function (props) { return (props.$disabled ? "not-allowed" : "pointer"); }, function (props) { return props.$disabled && "\n opacity: 0.4;\n "; }, function (props) { return props.$size === "medium" ? "40px" : "32px"; }, function (props) { return props.$size === "medium" ? "40px" : "32px"; }, function (props) { return props.$color || "var(--dark)"; }, function (props) { return props.$checked ? "2px solid var(--primary)" : "2px solid transparent"; }, function (props) { return props.$checked ? "var(--primary)" : "var(--dark-opacity-50)"; });
13
- var templateObject_1;
12
+ exports.ColorIndicator = styled_components_1.default.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n width: ", ";\n height: ", ";\n border-radius: 50%;\n background-color: ", ";\n box-sizing: border-box;\n outline: ", ";\n outline-offset: 2px;\n"], ["\n width: ", ";\n height: ", ";\n border-radius: 50%;\n background-color: ", ";\n box-sizing: border-box;\n outline: ", ";\n outline-offset: 2px;\n"])), function (props) { return props.$size === "medium" ? "40px" : "32px"; }, function (props) { return props.$size === "medium" ? "40px" : "32px"; }, function (props) { return props.$color || "var(--dark)"; }, function (props) { return props.$checked ? "2px solid var(--primary)" : "2px solid transparent"; });
13
+ exports.ColorLabel = styled_components_1.default.span(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n font: var(--caption-medium-12-15);\n color: ", ";\n text-align: center;\n white-space: nowrap;\n"], ["\n font: var(--caption-medium-12-15);\n color: ", ";\n text-align: center;\n white-space: nowrap;\n"])), function (props) { return props.$checked ? "var(--primary)" : "var(--dark-opacity-50)"; });
14
+ exports.ColorStyled = styled_components_1.default.label(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n position: relative;\n display: inline-flex;\n flex-direction: column;\n align-items: center;\n gap: 8px;\n cursor: ", ";\n ", "\n\n input[type=\"radio\"] {\n height: 0;\n width: 0;\n opacity: 0;\n z-index: -1;\n position: absolute;\n }\n"], ["\n position: relative;\n display: inline-flex;\n flex-direction: column;\n align-items: center;\n gap: 8px;\n cursor: ", ";\n ", "\n\n input[type=\"radio\"] {\n height: 0;\n width: 0;\n opacity: 0;\n z-index: -1;\n position: absolute;\n }\n"])), function (props) { return (props.$disabled ? "not-allowed" : "pointer"); }, function (props) { return props.$disabled && "\n opacity: 0.4;\n "; });
15
+ var templateObject_1, templateObject_2, templateObject_3;
@@ -18,7 +18,17 @@ var jsx_runtime_1 = require("react/jsx-runtime");
18
18
  var Badges_1 = __importDefault(require("../../../Badges"));
19
19
  var Horizontal_styled_1 = require("./Horizontal.styled");
20
20
  var Horizontal = function (props) {
21
- var label = props.label, description = props.description, id = props.id, checked = props.checked, onChange = props.onChange, onClick = props.onClick, name = props.name, value = props.value, price = props.price, priceDesc = props.priceDesc, hasTitleBadge = props.hasTitleBadge, titleBadgeLayout = props.titleBadgeLayout, titleBadgeText = props.titleBadgeText, hasPriceBadge = props.hasPriceBadge, priceBadgeLayout = props.priceBadgeLayout, priceBadgeText = props.priceBadgeText, _a = props.labelOffset, labelOffset = _a === void 0 ? "1rem" : _a, disabled = props.disabled, _b = props.valid, valid = _b === void 0 ? true : _b, color = props.color;
22
- return ((0, jsx_runtime_1.jsx)(Horizontal_styled_1.HorizontalBoxStyled, __assign({ checked: checked, "$disabled": disabled, "$valid": valid, "$color": color, "$labelOffset": labelOffset }, { children: (0, jsx_runtime_1.jsx)("label", { children: (0, jsx_runtime_1.jsxs)("div", __assign({ className: "inner" }, { children: [(0, jsx_runtime_1.jsxs)("div", __assign({ className: "leftContent" }, { children: [(0, jsx_runtime_1.jsx)("input", { id: id, type: "radio", name: name, value: value, disabled: disabled, checked: checked, onChange: onChange, onClick: onClick }), (0, jsx_runtime_1.jsx)("div", { className: "indicator" }), (0, jsx_runtime_1.jsxs)("div", __assign({ className: "labelContent" }, { children: [label && ((0, jsx_runtime_1.jsxs)("div", __assign({ className: "labelWrapper" }, { children: [label, (0, jsx_runtime_1.jsx)("div", __assign({ className: "badgesWrapper" }, { children: hasTitleBadge && (0, jsx_runtime_1.jsx)(Badges_1.default, { layout: "text", variant: titleBadgeLayout, title: titleBadgeText }) }))] }))), description && (0, jsx_runtime_1.jsx)("p", __assign({ className: "description" }, { children: description }))] }))] })), (0, jsx_runtime_1.jsx)("div", __assign({ className: "rightContent" }, { children: hasPriceBadge ? (0, jsx_runtime_1.jsx)(Badges_1.default, { layout: "text", variant: priceBadgeLayout, title: priceBadgeText }) : ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("strong", __assign({ className: "price" }, { children: price })), priceDesc && ((0, jsx_runtime_1.jsxs)("strong", __assign({ className: "totalPrice" }, { children: [(0, jsx_runtime_1.jsx)("span", __assign({ className: "total" }, { children: "Toplam:" })), " ", priceDesc] })))] })) }))] })) }) })));
21
+ var label = props.label, description = props.description, id = props.id, checked = props.checked, onChange = props.onChange, onClick = props.onClick, name = props.name, value = props.value, price = props.price, priceDesc = props.priceDesc, hasTitleBadge = props.hasTitleBadge, titleBadgeLayout = props.titleBadgeLayout, titleBadgeText = props.titleBadgeText, _a = props.titleBadgePosition, titleBadgePosition = _a === void 0 ? "inline" : _a, hasPriceBadge = props.hasPriceBadge, priceBadgeLayout = props.priceBadgeLayout, priceBadgeText = props.priceBadgeText, _b = props.labelOffset, labelOffset = _b === void 0 ? "1rem" : _b, disabled = props.disabled, _c = props.valid, valid = _c === void 0 ? true : _c, color = props.color, _d = props.showIndicator, showIndicator = _d === void 0 ? true : _d;
22
+ var titleBadgeBelow = titleBadgePosition === "below";
23
+ var styledProps = {
24
+ checked: checked,
25
+ $disabled: disabled,
26
+ $valid: valid,
27
+ $color: color,
28
+ $labelOffset: labelOffset,
29
+ $titleBadgeBelow: titleBadgeBelow,
30
+ };
31
+ var titleBadge = hasTitleBadge && ((0, jsx_runtime_1.jsx)(Horizontal_styled_1.BadgesWrapper, __assign({}, styledProps, { children: (0, jsx_runtime_1.jsx)(Badges_1.default, { layout: "text", variant: titleBadgeLayout, title: titleBadgeText }) })));
32
+ return ((0, jsx_runtime_1.jsx)(Horizontal_styled_1.HorizontalBoxStyled, __assign({}, styledProps, { children: (0, jsx_runtime_1.jsx)(Horizontal_styled_1.HorizontalLabel, { children: (0, jsx_runtime_1.jsxs)(Horizontal_styled_1.Inner, { children: [(0, jsx_runtime_1.jsxs)(Horizontal_styled_1.LeftContent, { children: [(0, jsx_runtime_1.jsx)("input", { id: id, type: "radio", name: name, value: value, disabled: disabled, checked: checked, onChange: onChange, onClick: onClick }), showIndicator && (0, jsx_runtime_1.jsx)(Horizontal_styled_1.Indicator, __assign({}, styledProps)), (0, jsx_runtime_1.jsxs)(Horizontal_styled_1.LabelContent, { children: [label && ((0, jsx_runtime_1.jsx)(Horizontal_styled_1.LabelWrapper, __assign({}, styledProps, { children: titleBadgeBelow ? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(Horizontal_styled_1.TitleLabel, { children: label }), titleBadge] })) : ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [label, titleBadge] })) }))), description && (0, jsx_runtime_1.jsx)(Horizontal_styled_1.Description, { children: description })] })] }), (0, jsx_runtime_1.jsx)(Horizontal_styled_1.RightContent, { children: hasPriceBadge ? ((0, jsx_runtime_1.jsx)(Badges_1.default, { layout: "text", variant: priceBadgeLayout, title: priceBadgeText })) : ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(Horizontal_styled_1.Price, { children: price }), priceDesc && ((0, jsx_runtime_1.jsxs)(Horizontal_styled_1.TotalPrice, { children: [(0, jsx_runtime_1.jsx)(Horizontal_styled_1.TotalLabel, { children: "Toplam:" }), " ", priceDesc] }))] })) })] }) }) })));
23
33
  };
24
34
  exports.default = Horizontal;
@@ -1,14 +1,23 @@
1
1
  /// <reference types="react" />
2
- export declare const HorizontalBoxStyled: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "$color" | "checked" | "$labelOffset" | "$valid" | "$disabled"> & {
2
+ export type HorizontalStyledProps = {
3
3
  checked?: boolean;
4
4
  $disabled?: boolean;
5
5
  $valid: boolean;
6
6
  $color?: string;
7
7
  $labelOffset?: string;
8
- }, never> & Partial<Pick<import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "$color" | "checked" | "$labelOffset" | "$valid" | "$disabled"> & {
9
- checked?: boolean;
10
- $disabled?: boolean;
11
- $valid: boolean;
12
- $color?: string;
13
- $labelOffset?: string;
14
- }, never>>> & string;
8
+ $titleBadgeBelow?: boolean;
9
+ };
10
+ export declare const HorizontalLabel: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").LabelHTMLAttributes<HTMLLabelElement>, HTMLLabelElement>, never> & Partial<Pick<import("react").DetailedHTMLProps<import("react").LabelHTMLAttributes<HTMLLabelElement>, HTMLLabelElement>, never>>> & string;
11
+ export declare const Inner: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never> & Partial<Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>>> & string;
12
+ export declare const LeftContent: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never> & Partial<Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>>> & string;
13
+ export declare const Indicator: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof HorizontalStyledProps> & HorizontalStyledProps, never> & Partial<Pick<import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof HorizontalStyledProps> & HorizontalStyledProps, never>>> & string;
14
+ export declare const LabelContent: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never> & Partial<Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>>> & string;
15
+ export declare const LabelWrapper: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof HorizontalStyledProps> & HorizontalStyledProps, never> & Partial<Pick<import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof HorizontalStyledProps> & HorizontalStyledProps, never>>> & string;
16
+ export declare const TitleLabel: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, never> & Partial<Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, never>>> & string;
17
+ export declare const BadgesWrapper: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof HorizontalStyledProps> & HorizontalStyledProps, never> & Partial<Pick<import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof HorizontalStyledProps> & HorizontalStyledProps, never>>> & string;
18
+ export declare const Description: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>, never> & Partial<Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>, never>>> & string;
19
+ export declare const RightContent: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never> & Partial<Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>>> & string;
20
+ export declare const Price: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, never> & Partial<Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, never>>> & string;
21
+ export declare const TotalPrice: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, never> & Partial<Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, never>>> & string;
22
+ export declare const TotalLabel: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, never> & Partial<Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, never>>> & string;
23
+ export declare const HorizontalBoxStyled: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof HorizontalStyledProps> & HorizontalStyledProps, never> & Partial<Pick<import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof HorizontalStyledProps> & HorizontalStyledProps, never>>> & string;