krl-alfred 2.23.6 → 2.23.8
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/DescriptionCard/DescriptionCard.d.ts +1 -1
- package/dist/components/DescriptionCard/DescriptionCard.js +9 -3
- package/dist/components/DescriptionCard/DescriptionCard.styled.d.ts +5 -1
- package/dist/components/DescriptionCard/DescriptionCard.styled.js +18 -12
- package/dist/components/DescriptionCard/props.d.ts +11 -1
- package/dist/components/DescriptionCard/props.js +3 -1
- package/dist/components/DescriptionCard/stories/DescriptionCard.stories.d.ts +1 -1
- package/dist/components/DescriptionCard/stories/DescriptionCard.stories.js +11 -6
- package/dist/components/Icon/iconList/ShowSm.d.ts +3 -0
- package/dist/components/Icon/iconList/ShowSm.js +40 -0
- package/dist/components/Icon/iconList/index.d.ts +5 -1
- package/dist/components/Icon/iconList/index.js +9 -3
- package/dist/components/Input/Input.styled.js +8 -2
- package/dist/components/RadioButton/layouts/horizontal/Horizontal.js +4 -2
- package/dist/components/RadioButton/layouts/horizontal/Horizontal.styled.d.ts +4 -1
- package/dist/components/RadioButton/layouts/horizontal/Horizontal.styled.js +34 -14
- package/dist/components/RadioButton/props.d.ts +2 -0
- package/dist/components/RadioButton/props.js +6 -2
- package/dist/components/RadioButton/stories/RadioButton.stories.d.ts +29 -0
- package/dist/components/RadioButton/stories/RadioButton.stories.js +7 -1
- package/dist/components/RadioGroup/RadioGroup.d.ts +1 -1
- package/dist/components/RadioGroup/RadioGroup.js +4 -2
- package/dist/components/RadioGroup/props.d.ts +4 -1
- package/dist/components/RadioGroup/props.js +1 -0
- package/dist/components/RadioGroup/stories/RadioGroup.stories.d.ts +99 -1
- package/dist/components/RadioGroup/stories/RadioGroup.stories.js +9 -1
- package/dist/components/SelectBox/SelectBox.js +5 -5
- package/dist/components/SelectBox/SelectBox.styled.js +20 -2
- package/dist/components/SelectBox/props.d.ts +2 -0
- package/dist/components/SelectBox/props.js +1 -0
- package/dist/components/SelectBox/stories/SelectBox.stories.d.ts +39 -0
- package/dist/components/SelectBox/stories/SelectBox.stories.js +5 -1
- package/dist/components/Uploader/Uploader.d.ts +1 -1
- package/dist/components/Uploader/Uploader.js +6 -5
- package/dist/components/Uploader/Uploader.styled.d.ts +9 -5
- package/dist/components/Uploader/Uploader.styled.js +3 -3
- package/dist/components/Uploader/props.d.ts +11 -0
- package/dist/components/Uploader/props.js +4 -1
- package/dist/components/Uploader/stories/Uploader.stories.d.ts +11 -2
- package/dist/components/Uploader/stories/Uploader.stories.js +24 -3
- package/package.json +1 -1
|
@@ -17,9 +17,10 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
17
17
|
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
18
18
|
var getRootCssVariable_1 = require("../../../../utils/getRootCssVariable");
|
|
19
19
|
var Badges_1 = __importDefault(require("../../../Badges"));
|
|
20
|
+
var Icon_1 = __importDefault(require("../../../Icon/Icon"));
|
|
20
21
|
var Horizontal_styled_1 = require("./Horizontal.styled");
|
|
21
22
|
var Horizontal = function (props) {
|
|
22
|
-
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, _d = props.showIndicator, showIndicator = _d === void 0 ? true : _d, content = props.content, _e = props.size, size = _e === void 0 ? "small" : _e;
|
|
23
|
+
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, _d = props.showIndicator, showIndicator = _d === void 0 ? true : _d, content = props.content, _e = props.size, size = _e === void 0 ? "small" : _e, _f = props.hasError, hasError = _f === void 0 ? false : _f, errorMessage = props.errorMessage;
|
|
23
24
|
var titleBadgeBelow = titleBadgePosition === "below";
|
|
24
25
|
var titleBadgeTopRight = titleBadgePosition === "topRight";
|
|
25
26
|
var hasContent = Boolean(content);
|
|
@@ -27,6 +28,7 @@ var Horizontal = function (props) {
|
|
|
27
28
|
checked: checked,
|
|
28
29
|
$disabled: disabled,
|
|
29
30
|
$valid: valid,
|
|
31
|
+
$hasError: hasError,
|
|
30
32
|
$color: (0, getRootCssVariable_1.getRadioPrimaryColor)(),
|
|
31
33
|
$labelOffset: labelOffset,
|
|
32
34
|
$titleBadgeBelow: titleBadgeBelow,
|
|
@@ -36,6 +38,6 @@ var Horizontal = function (props) {
|
|
|
36
38
|
};
|
|
37
39
|
var titleBadgeElement = ((0, jsx_runtime_1.jsx)(Badges_1.default, { layout: "text", variant: titleBadgeLayout, title: titleBadgeText }));
|
|
38
40
|
var titleBadge = hasTitleBadge && !titleBadgeTopRight && ((0, jsx_runtime_1.jsx)(Horizontal_styled_1.BadgesWrapper, __assign({}, styledProps, { children: titleBadgeElement })));
|
|
39
|
-
return ((0, jsx_runtime_1.jsxs)(Horizontal_styled_1.HorizontalBoxStyled, __assign({}, styledProps, { children: [hasTitleBadge && titleBadgeTopRight && ((0, jsx_runtime_1.jsx)(Horizontal_styled_1.TitleBadgeTopRight, { children: titleBadgeElement })), (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] }))] })) })] }) }), checked && content && ((0, jsx_runtime_1.jsx)(Horizontal_styled_1.ContentArea, { children: content }))] })));
|
|
41
|
+
return ((0, jsx_runtime_1.jsxs)(Horizontal_styled_1.HorizontalRoot, { children: [(0, jsx_runtime_1.jsxs)(Horizontal_styled_1.HorizontalBoxStyled, __assign({}, styledProps, { children: [hasTitleBadge && titleBadgeTopRight && ((0, jsx_runtime_1.jsx)(Horizontal_styled_1.TitleBadgeTopRight, { children: titleBadgeElement })), (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, "aria-invalid": hasError, "aria-describedby": hasError && errorMessage ? "".concat(id, "-error") : undefined }), 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] }))] })) })] }) }), checked && content && ((0, jsx_runtime_1.jsx)(Horizontal_styled_1.ContentArea, { children: content }))] })), hasError && errorMessage && ((0, jsx_runtime_1.jsxs)(Horizontal_styled_1.ErrorMessage, __assign({ id: id ? "".concat(id, "-error") : undefined }, { children: [(0, jsx_runtime_1.jsx)(Icon_1.default, { name: "SwitchPassive" }), (0, jsx_runtime_1.jsx)("p", { children: errorMessage })] })))] }));
|
|
40
42
|
};
|
|
41
43
|
exports.default = Horizontal;
|
|
@@ -5,6 +5,7 @@ export type HorizontalStyledProps = {
|
|
|
5
5
|
checked?: boolean;
|
|
6
6
|
$disabled?: boolean;
|
|
7
7
|
$valid: boolean;
|
|
8
|
+
$hasError?: boolean;
|
|
8
9
|
$color?: string;
|
|
9
10
|
$labelOffset?: string;
|
|
10
11
|
$titleBadgeBelow?: boolean;
|
|
@@ -21,7 +22,9 @@ export declare const LabelWrapper: import("styled-components/dist/types").IStyle
|
|
|
21
22
|
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;
|
|
22
23
|
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;
|
|
23
24
|
export declare const TitleBadgeTopRight: 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;
|
|
24
|
-
export declare const Description: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<
|
|
25
|
+
export declare const Description: 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;
|
|
26
|
+
export declare const ErrorMessage: 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;
|
|
27
|
+
export declare const HorizontalRoot: 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;
|
|
25
28
|
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;
|
|
26
29
|
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;
|
|
27
30
|
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;
|
|
@@ -7,7 +7,7 @@ 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.HorizontalBoxStyled = exports.ContentArea = exports.TotalLabel = exports.TotalPrice = exports.Price = exports.RightContent = exports.Description = exports.TitleBadgeTopRight = exports.BadgesWrapper = exports.TitleLabel = exports.LabelWrapper = exports.LabelContent = exports.Indicator = exports.LeftContent = exports.Inner = exports.HorizontalLabel = void 0;
|
|
10
|
+
exports.HorizontalBoxStyled = exports.ContentArea = exports.TotalLabel = exports.TotalPrice = exports.Price = exports.RightContent = exports.HorizontalRoot = exports.ErrorMessage = exports.Description = exports.TitleBadgeTopRight = exports.BadgesWrapper = exports.TitleLabel = exports.LabelWrapper = exports.LabelContent = exports.Indicator = exports.LeftContent = exports.Inner = exports.HorizontalLabel = 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 devices_1 = require("../../../../constants/devices");
|
|
@@ -24,21 +24,41 @@ var getIndicatorSize = function (size) {
|
|
|
24
24
|
exports.HorizontalLabel = styled_components_1.default.label(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n display: flex;\n flex-direction: column;\n width: 100%;\n align-items: stretch;\n justify-content: center;\n cursor: inherit;\n"], ["\n display: flex;\n flex-direction: column;\n width: 100%;\n align-items: stretch;\n justify-content: center;\n cursor: inherit;\n"])));
|
|
25
25
|
exports.Inner = styled_components_1.default.div(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n width: 100%;\n padding: 1rem 1.5rem;\n min-height: 70px;\n display: flex;\n align-items: center;\n justify-content: space-between;\n box-sizing: border-box;\n\n @media only screen and ", " {\n padding: 0 1rem;\n }\n"], ["\n width: 100%;\n padding: 1rem 1.5rem;\n min-height: 70px;\n display: flex;\n align-items: center;\n justify-content: space-between;\n box-sizing: border-box;\n\n @media only screen and ", " {\n padding: 0 1rem;\n }\n"])), devices_1.devices.sm);
|
|
26
26
|
exports.LeftContent = styled_components_1.default.div(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n display: flex;\n align-items: center;\n justify-content: flex-start;\n width: auto;\n position: relative;\n"], ["\n display: flex;\n align-items: center;\n justify-content: flex-start;\n width: auto;\n position: relative;\n"])));
|
|
27
|
-
exports.Indicator = styled_components_1.default.div(templateObject_4 || (templateObject_4 = __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 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 0;\n width: ", ";\n height: ", ";\n"])), function (props) {
|
|
27
|
+
exports.Indicator = styled_components_1.default.div(templateObject_4 || (templateObject_4 = __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 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 0;\n width: ", ";\n height: ", ";\n"])), function (props) {
|
|
28
|
+
if (props.$disabled) {
|
|
29
|
+
return (0, svgToBase64_1.default)((0, jsx_runtime_1.jsx)(Icon_1.default, { hasWrapper: false, color: "#C2C3CE", name: "RadioButtonElementDisabled" }));
|
|
30
|
+
}
|
|
31
|
+
if (props.$hasError) {
|
|
32
|
+
return (0, svgToBase64_1.default)((0, jsx_runtime_1.jsx)(Icon_1.default, { hasWrapper: false, color: "#FF1F1F", name: "RadioButtonElementInvalid" }));
|
|
33
|
+
}
|
|
34
|
+
if (props.checked) {
|
|
35
|
+
return (0, svgToBase64_1.default)((0, jsx_runtime_1.jsx)(Icon_1.default, { hasWrapper: false, color: props.$color || "#9763F6", name: "RadioButtonElementChecked" }));
|
|
36
|
+
}
|
|
37
|
+
if (props.$valid) {
|
|
38
|
+
return (0, svgToBase64_1.default)((0, jsx_runtime_1.jsx)(Icon_1.default, { hasWrapper: false, color: "#9763F6", name: "RadioButtonElementUnchecked" }));
|
|
39
|
+
}
|
|
40
|
+
return (0, svgToBase64_1.default)((0, jsx_runtime_1.jsx)(Icon_1.default, { hasWrapper: false, color: "#FF1F1F", name: "RadioButtonElementInvalid" }));
|
|
41
|
+
}, function (props) { return props.$labelOffset || "0.5rem"; }, function (props) { return getIndicatorSize(props.$size); }, function (props) { return getIndicatorSize(props.$size); });
|
|
28
42
|
exports.LabelContent = styled_components_1.default.div(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n display: grid;\n align-items: center;\n justify-content: flex-start;\n"], ["\n display: grid;\n align-items: center;\n justify-content: flex-start;\n"])));
|
|
29
43
|
exports.LabelWrapper = styled_components_1.default.div(templateObject_6 || (templateObject_6 = __makeTemplateObject(["\n display: flex;\n align-items: ", ";\n justify-content: flex-start;\n flex-direction: ", ";\n font: var(--body-semi-bold-14-17);\n row-gap: ", ";\n\n @media only screen and ", " {\n ", "\n }\n"], ["\n display: flex;\n align-items: ", ";\n justify-content: flex-start;\n flex-direction: ", ";\n font: var(--body-semi-bold-14-17);\n row-gap: ", ";\n\n @media only screen and ", " {\n ", "\n }\n"])), function (props) { return (props.$titleBadgeBelow ? "flex-start" : "center"); }, function (props) { return (props.$titleBadgeBelow ? "column" : "row"); }, function (props) { return (props.$titleBadgeBelow ? "0.25rem" : "0"); }, devices_1.devices.sm, function (props) { return !props.$titleBadgeBelow && "display: block;"; });
|
|
30
44
|
exports.TitleLabel = styled_components_1.default.span(templateObject_7 || (templateObject_7 = __makeTemplateObject(["\n display: block;\n"], ["\n display: block;\n"])));
|
|
31
45
|
exports.BadgesWrapper = styled_components_1.default.div(templateObject_8 || (templateObject_8 = __makeTemplateObject(["\n display: flex;\n align-items: center;\n justify-content: flex-start;\n margin-left: ", ";\n margin-top: ", ";\n"], ["\n display: flex;\n align-items: center;\n justify-content: flex-start;\n margin-left: ", ";\n margin-top: ", ";\n"])), function (props) { return (props.$titleBadgeBelow ? "0" : "1rem"); }, function (props) { return (props.$titleBadgeBelow ? "0.25rem" : "0"); });
|
|
32
46
|
exports.TitleBadgeTopRight = styled_components_1.default.div(templateObject_9 || (templateObject_9 = __makeTemplateObject(["\n position: absolute;\n top: 0.5rem;\n right: 0.5rem;\n display: flex;\n align-items: center;\n z-index: 1;\n"], ["\n position: absolute;\n top: 0.5rem;\n right: 0.5rem;\n display: flex;\n align-items: center;\n z-index: 1;\n"])));
|
|
33
|
-
exports.Description = styled_components_1.default.
|
|
34
|
-
exports.
|
|
35
|
-
exports.
|
|
36
|
-
exports.
|
|
37
|
-
exports.
|
|
38
|
-
exports.
|
|
39
|
-
exports.
|
|
40
|
-
|
|
41
|
-
: props
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
47
|
+
exports.Description = styled_components_1.default.div(templateObject_10 || (templateObject_10 = __makeTemplateObject(["\n color: var(--dark-opacity-50);\n font: var(--caption-medium-12-15);\n margin-top: 0.5rem;\n margin-bottom: 0;\n width: 100%;\n display: block;\n\n p {\n margin: 0;\n }\n\n a {\n color: inherit;\n }\n"], ["\n color: var(--dark-opacity-50);\n font: var(--caption-medium-12-15);\n margin-top: 0.5rem;\n margin-bottom: 0;\n width: 100%;\n display: block;\n\n p {\n margin: 0;\n }\n\n a {\n color: inherit;\n }\n"])));
|
|
48
|
+
exports.ErrorMessage = styled_components_1.default.div(templateObject_11 || (templateObject_11 = __makeTemplateObject(["\n display: flex;\n align-items: center;\n margin-top: 8px;\n color: var(--red);\n\n svg {\n margin-right: 8px;\n }\n\n p {\n margin: 0;\n font: var(--caption-semi-bold-11-13);\n }\n"], ["\n display: flex;\n align-items: center;\n margin-top: 8px;\n color: var(--red);\n\n svg {\n margin-right: 8px;\n }\n\n p {\n margin: 0;\n font: var(--caption-semi-bold-11-13);\n }\n"])));
|
|
49
|
+
exports.HorizontalRoot = styled_components_1.default.div(templateObject_12 || (templateObject_12 = __makeTemplateObject(["\n display: block;\n width: 100%;\n"], ["\n display: block;\n width: 100%;\n"])));
|
|
50
|
+
exports.RightContent = styled_components_1.default.div(templateObject_13 || (templateObject_13 = __makeTemplateObject(["\n flex: 0 0 auto;\n width: auto;\n text-align: end;\n row-gap: 0.25rem;\n display: grid;\n"], ["\n flex: 0 0 auto;\n width: auto;\n text-align: end;\n row-gap: 0.25rem;\n display: grid;\n"])));
|
|
51
|
+
exports.Price = styled_components_1.default.strong(templateObject_14 || (templateObject_14 = __makeTemplateObject(["\n color: var(--dark);\n font: var(--title-bold-16-19);\n"], ["\n color: var(--dark);\n font: var(--title-bold-16-19);\n"])));
|
|
52
|
+
exports.TotalPrice = styled_components_1.default.strong(templateObject_15 || (templateObject_15 = __makeTemplateObject(["\n display: block;\n color: var(--dark-opacity-50);\n font: var(--caption-semi-bold-12-15);\n"], ["\n display: block;\n color: var(--dark-opacity-50);\n font: var(--caption-semi-bold-12-15);\n"])));
|
|
53
|
+
exports.TotalLabel = styled_components_1.default.span(templateObject_16 || (templateObject_16 = __makeTemplateObject(["\n @media only screen and ", " {\n display: none;\n }\n"], ["\n @media only screen and ", " {\n display: none;\n }\n"])), devices_1.devices.sm);
|
|
54
|
+
exports.ContentArea = styled_components_1.default.div(templateObject_17 || (templateObject_17 = __makeTemplateObject(["\n width: 100%;\n padding: 0 1.5rem 1.5rem;\n box-sizing: border-box;\n cursor: default;\n\n @media only screen and ", " {\n padding: 0 1rem 1rem;\n }\n"], ["\n width: 100%;\n padding: 0 1.5rem 1.5rem;\n box-sizing: border-box;\n cursor: default;\n\n @media only screen and ", " {\n padding: 0 1rem 1rem;\n }\n"])), devices_1.devices.sm);
|
|
55
|
+
exports.HorizontalBoxStyled = styled_components_1.default.div(templateObject_18 || (templateObject_18 = __makeTemplateObject(["\n display: block;\n position: relative;\n flex: none !important;\n border-radius: 0.5rem;\n background-color: ", ";\n box-sizing: border-box;\n\n &:before {\n content: \"\";\n position: absolute;\n inset: 0;\n border-radius: inherit;\n border: ", ";\n box-sizing: border-box;\n pointer-events: none;\n z-index: 1;\n }\n\n ", "\n\n ", " {\n cursor: ", ";\n }\n\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\n ", "\n }\n"], ["\n display: block;\n position: relative;\n flex: none !important;\n border-radius: 0.5rem;\n background-color: ", ";\n box-sizing: border-box;\n\n &:before {\n content: \"\";\n position: absolute;\n inset: 0;\n border-radius: inherit;\n border: ", ";\n box-sizing: border-box;\n pointer-events: none;\n z-index: 1;\n }\n\n ", "\n\n ", " {\n cursor: ", ";\n }\n\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\n ", "\n }\n"])), function (props) { return props.$disabled ? 'var(--dark-opacity-3)' : 'white'; }, function (props) {
|
|
56
|
+
if (props.$disabled)
|
|
57
|
+
return '1px solid var(--grey-10)';
|
|
58
|
+
if (props.$hasError)
|
|
59
|
+
return '2px solid var(--red)';
|
|
60
|
+
if (props.checked)
|
|
61
|
+
return '2px solid var(--primary)';
|
|
62
|
+
return '1px solid var(--dark-opacity-10)';
|
|
63
|
+
}, function (props) { return !props.checked && !props.$disabled && !props.$hasError && "\n @media only screen and ".concat(devices_1.devices.lgUp, " {\n &:hover:before {\n border: 1px solid var(--primary);\n }\n }\n "); }, exports.HorizontalLabel, function (props) { return props.$disabled ? 'not-allowed' : 'pointer'; }, function (props) { return props.$hasError && !props.$disabled && "\n ".concat(exports.LabelWrapper, ",\n ").concat(exports.TitleLabel, ",\n ").concat(exports.Description, ",\n ").concat(exports.Price, ",\n ").concat(exports.TotalPrice, " {\n color: var(--red);\n }\n\n ").concat(exports.Description, " a {\n color: var(--red);\n }\n "); }, function (props) { return !props.$disabled && !props.$hasError ? "\n &:checked ~ ".concat(exports.Indicator, " {\n background-image: url('").concat((0, svgToBase64_1.default)((0, jsx_runtime_1.jsx)(Icon_1.default, { hasWrapper: false, color: props.$color || "#9763F6", name: "RadioButtonElementChecked" })), "');\n }\n ") : ""; }, function (props) { return props.$disabled ? "\n pointer-events: none;\n user-select:none;\n " : ""; });
|
|
64
|
+
var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5, templateObject_6, templateObject_7, templateObject_8, templateObject_9, templateObject_10, templateObject_11, templateObject_12, templateObject_13, templateObject_14, templateObject_15, templateObject_16, templateObject_17, templateObject_18;
|
|
@@ -48,6 +48,8 @@ interface RadioButton {
|
|
|
48
48
|
iconColor?: string;
|
|
49
49
|
content?: React.ReactNode;
|
|
50
50
|
showIndicator?: boolean;
|
|
51
|
+
hasError?: boolean;
|
|
52
|
+
errorMessage?: React.ReactNode;
|
|
51
53
|
}
|
|
52
54
|
declare const RadioButtonDefault: RadioButton;
|
|
53
55
|
export declare const BoxedDefault: RadioButton;
|
|
@@ -27,7 +27,9 @@ var RadioButtonDefault = {
|
|
|
27
27
|
titleBadgePosition: "inline",
|
|
28
28
|
hasPriceBadge: false,
|
|
29
29
|
priceBadgeLayout: "primary",
|
|
30
|
-
priceBadgeText: "Avantajlı"
|
|
30
|
+
priceBadgeText: "Avantajlı",
|
|
31
|
+
hasError: false,
|
|
32
|
+
errorMessage: null,
|
|
31
33
|
};
|
|
32
34
|
exports.BoxedDefault = {
|
|
33
35
|
id: "styledChecbox_".concat(Math.floor(Math.random() * (99999999999 - 11111111111) + 11111111111)),
|
|
@@ -74,5 +76,7 @@ exports.HorizontalDefault = {
|
|
|
74
76
|
hasPriceBadge: false,
|
|
75
77
|
priceBadgeLayout: "disabled",
|
|
76
78
|
priceBadgeText: "Satışta yok",
|
|
77
|
-
description: null
|
|
79
|
+
description: null,
|
|
80
|
+
hasError: false,
|
|
81
|
+
errorMessage: null,
|
|
78
82
|
};
|
|
@@ -51,6 +51,12 @@ declare const _default: {
|
|
|
51
51
|
valid: {
|
|
52
52
|
control: string;
|
|
53
53
|
};
|
|
54
|
+
hasError: {
|
|
55
|
+
control: string;
|
|
56
|
+
};
|
|
57
|
+
errorMessage: {
|
|
58
|
+
control: string;
|
|
59
|
+
};
|
|
54
60
|
readOnly: {
|
|
55
61
|
control: string;
|
|
56
62
|
};
|
|
@@ -337,6 +343,29 @@ export declare const HorizontalTitleBadgeTopRight: {
|
|
|
337
343
|
};
|
|
338
344
|
render: (args: any) => import("react").JSX.Element;
|
|
339
345
|
};
|
|
346
|
+
export declare const HorizontalWithError: {
|
|
347
|
+
name: string;
|
|
348
|
+
args: {
|
|
349
|
+
id: string;
|
|
350
|
+
hasError: boolean;
|
|
351
|
+
errorMessage: string;
|
|
352
|
+
label: string;
|
|
353
|
+
description: string;
|
|
354
|
+
valid: boolean;
|
|
355
|
+
layout: string;
|
|
356
|
+
price: string;
|
|
357
|
+
priceDesc: string;
|
|
358
|
+
hasTitleBadge: boolean;
|
|
359
|
+
titleBadgeLayout: string;
|
|
360
|
+
titleBadgeText: string;
|
|
361
|
+
hasPriceBadge: boolean;
|
|
362
|
+
priceBadgeLayout: string;
|
|
363
|
+
priceBadgeText: string;
|
|
364
|
+
checked: boolean;
|
|
365
|
+
color: string;
|
|
366
|
+
labelOffset: string;
|
|
367
|
+
};
|
|
368
|
+
};
|
|
340
369
|
export declare const HorizontalDisabled: {
|
|
341
370
|
args: {
|
|
342
371
|
label: string;
|
|
@@ -14,7 +14,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
14
14
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
exports.HorizontalChecked = exports.WithoutDescription = exports.BoxedWithBadge = exports.AllLayouts = exports.AllSizes = exports.VerticalAlignment = exports.ReadOnly = exports.Disabled = exports.Invalid = exports.Unchecked = exports.Checked = exports.ColorPicker = exports.HorizontalWithDangerBadge = exports.HorizontalWithContent = exports.HorizontalDisabled = exports.HorizontalTitleBadgeTopRight = exports.HorizontalTitleBadgeBelowWithDescription = exports.HorizontalTitleBadgeBelow = exports.Horizontal = exports.BoxedMdWithoutIndicator = exports.BoxedMdUnchecked = exports.BoxedMd = exports.BoxedSm = exports.BoxedWithIconGroup = exports.BoxedWithIconUnselected = exports.BoxedWithIcon = exports.Boxed = exports.Basic = exports.Default = void 0;
|
|
17
|
+
exports.HorizontalChecked = exports.WithoutDescription = exports.BoxedWithBadge = exports.AllLayouts = exports.AllSizes = exports.VerticalAlignment = exports.ReadOnly = exports.Disabled = exports.Invalid = exports.Unchecked = exports.Checked = exports.ColorPicker = exports.HorizontalWithDangerBadge = exports.HorizontalWithContent = exports.HorizontalDisabled = exports.HorizontalWithError = exports.HorizontalTitleBadgeTopRight = exports.HorizontalTitleBadgeBelowWithDescription = exports.HorizontalTitleBadgeBelow = exports.Horizontal = exports.BoxedMdWithoutIndicator = exports.BoxedMdUnchecked = exports.BoxedMd = exports.BoxedSm = exports.BoxedWithIconGroup = exports.BoxedWithIconUnselected = exports.BoxedWithIcon = exports.Boxed = exports.Basic = exports.Default = void 0;
|
|
18
18
|
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
19
19
|
var RadioButton_1 = __importDefault(require("../RadioButton"));
|
|
20
20
|
var props_1 = require("../props");
|
|
@@ -43,6 +43,8 @@ exports.default = {
|
|
|
43
43
|
name: { control: "text" },
|
|
44
44
|
checked: { control: "boolean" },
|
|
45
45
|
valid: { control: "boolean" },
|
|
46
|
+
hasError: { control: "boolean" },
|
|
47
|
+
errorMessage: { control: "text" },
|
|
46
48
|
readOnly: { control: "boolean" },
|
|
47
49
|
disabled: { control: "boolean" },
|
|
48
50
|
isWrapText: { control: "boolean" },
|
|
@@ -274,6 +276,10 @@ exports.HorizontalTitleBadgeTopRight = {
|
|
|
274
276
|
},
|
|
275
277
|
render: function (args) { return ((0, jsx_runtime_1.jsx)("div", __assign({ style: { maxWidth: "360px" } }, { children: (0, jsx_runtime_1.jsx)(RadioButton_1.default, __assign({}, args)) }))); },
|
|
276
278
|
};
|
|
279
|
+
exports.HorizontalWithError = {
|
|
280
|
+
name: "Horizontal — error",
|
|
281
|
+
args: __assign(__assign({}, exports.Horizontal.args), { id: "horizontal_error", hasError: true, errorMessage: "Bu alan zorunludur" }),
|
|
282
|
+
};
|
|
277
283
|
exports.HorizontalDisabled = {
|
|
278
284
|
args: {
|
|
279
285
|
label: "Taksitli Ödeme",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { RadioGroupProps } from "./props";
|
|
3
|
-
declare const RadioGroup: ({ options, value, onChange, name, label, disabled, size, textSize, layout, radioLayout, valid, labelOffset, color, verticalAlign, readOnly, gap, isFilled, showIndicator, hasInfo, infoText, infoIcon, gridColumnLength, isHorizontalOnMobile, }: RadioGroupProps) => React.JSX.Element;
|
|
3
|
+
declare const RadioGroup: ({ options, value, onChange, name, label, disabled, size, textSize, layout, radioLayout, valid, labelOffset, color, verticalAlign, readOnly, gap, isFilled, showIndicator, hasInfo, infoText, infoIcon, gridColumnLength, isHorizontalOnMobile, hasError, }: RadioGroupProps) => React.JSX.Element;
|
|
4
4
|
export default RadioGroup;
|
|
@@ -21,16 +21,18 @@ var RadioGroup_styled_1 = require("./RadioGroup.styled");
|
|
|
21
21
|
var RadioButton_1 = __importDefault(require("../RadioButton"));
|
|
22
22
|
var Icon_1 = __importDefault(require("../Icon/Icon"));
|
|
23
23
|
var RadioGroup = function (_a) {
|
|
24
|
-
var _b = _a.options, options = _b === void 0 ? props_1.RadioGroupDefault.options : _b, _c = _a.value, value = _c === void 0 ? props_1.RadioGroupDefault.value : _c, _d = _a.onChange, onChange = _d === void 0 ? props_1.RadioGroupDefault.onChange : _d, _e = _a.name, name = _e === void 0 ? props_1.RadioGroupDefault.name : _e, _f = _a.label, label = _f === void 0 ? props_1.RadioGroupDefault.label : _f, _g = _a.disabled, disabled = _g === void 0 ? props_1.RadioGroupDefault.disabled : _g, _h = _a.size, size = _h === void 0 ? props_1.RadioGroupDefault.size : _h, _j = _a.textSize, textSize = _j === void 0 ? props_1.RadioGroupDefault.textSize : _j, _k = _a.layout, layout = _k === void 0 ? props_1.RadioGroupDefault.layout : _k, _l = _a.radioLayout, radioLayout = _l === void 0 ? props_1.RadioGroupDefault.radioLayout : _l, _m = _a.valid, valid = _m === void 0 ? props_1.RadioGroupDefault.valid : _m, _o = _a.labelOffset, labelOffset = _o === void 0 ? props_1.RadioGroupDefault.labelOffset : _o, _p = _a.color, color = _p === void 0 ? props_1.RadioGroupDefault.color : _p, _q = _a.verticalAlign, verticalAlign = _q === void 0 ? props_1.RadioGroupDefault.verticalAlign : _q, _r = _a.readOnly, readOnly = _r === void 0 ? props_1.RadioGroupDefault.readOnly : _r, _s = _a.gap, gap = _s === void 0 ? props_1.RadioGroupDefault.gap : _s, _t = _a.isFilled, isFilled = _t === void 0 ? props_1.RadioGroupDefault.isFilled : _t, _u = _a.showIndicator, showIndicator = _u === void 0 ? props_1.RadioGroupDefault.showIndicator : _u, _v = _a.hasInfo, hasInfo = _v === void 0 ? props_1.RadioGroupDefault.hasInfo : _v, _w = _a.infoText, infoText = _w === void 0 ? props_1.RadioGroupDefault.infoText : _w, _x = _a.infoIcon, infoIcon = _x === void 0 ? props_1.RadioGroupDefault.infoIcon : _x, _y = _a.gridColumnLength, gridColumnLength = _y === void 0 ? props_1.RadioGroupDefault.gridColumnLength : _y, _z = _a.isHorizontalOnMobile, isHorizontalOnMobile = _z === void 0 ? props_1.RadioGroupDefault.isHorizontalOnMobile : _z;
|
|
24
|
+
var _b = _a.options, options = _b === void 0 ? props_1.RadioGroupDefault.options : _b, _c = _a.value, value = _c === void 0 ? props_1.RadioGroupDefault.value : _c, _d = _a.onChange, onChange = _d === void 0 ? props_1.RadioGroupDefault.onChange : _d, _e = _a.name, name = _e === void 0 ? props_1.RadioGroupDefault.name : _e, _f = _a.label, label = _f === void 0 ? props_1.RadioGroupDefault.label : _f, _g = _a.disabled, disabled = _g === void 0 ? props_1.RadioGroupDefault.disabled : _g, _h = _a.size, size = _h === void 0 ? props_1.RadioGroupDefault.size : _h, _j = _a.textSize, textSize = _j === void 0 ? props_1.RadioGroupDefault.textSize : _j, _k = _a.layout, layout = _k === void 0 ? props_1.RadioGroupDefault.layout : _k, _l = _a.radioLayout, radioLayout = _l === void 0 ? props_1.RadioGroupDefault.radioLayout : _l, _m = _a.valid, valid = _m === void 0 ? props_1.RadioGroupDefault.valid : _m, _o = _a.labelOffset, labelOffset = _o === void 0 ? props_1.RadioGroupDefault.labelOffset : _o, _p = _a.color, color = _p === void 0 ? props_1.RadioGroupDefault.color : _p, _q = _a.verticalAlign, verticalAlign = _q === void 0 ? props_1.RadioGroupDefault.verticalAlign : _q, _r = _a.readOnly, readOnly = _r === void 0 ? props_1.RadioGroupDefault.readOnly : _r, _s = _a.gap, gap = _s === void 0 ? props_1.RadioGroupDefault.gap : _s, _t = _a.isFilled, isFilled = _t === void 0 ? props_1.RadioGroupDefault.isFilled : _t, _u = _a.showIndicator, showIndicator = _u === void 0 ? props_1.RadioGroupDefault.showIndicator : _u, _v = _a.hasInfo, hasInfo = _v === void 0 ? props_1.RadioGroupDefault.hasInfo : _v, _w = _a.infoText, infoText = _w === void 0 ? props_1.RadioGroupDefault.infoText : _w, _x = _a.infoIcon, infoIcon = _x === void 0 ? props_1.RadioGroupDefault.infoIcon : _x, _y = _a.gridColumnLength, gridColumnLength = _y === void 0 ? props_1.RadioGroupDefault.gridColumnLength : _y, _z = _a.isHorizontalOnMobile, isHorizontalOnMobile = _z === void 0 ? props_1.RadioGroupDefault.isHorizontalOnMobile : _z, _0 = _a.hasError, hasError = _0 === void 0 ? props_1.RadioGroupDefault.hasError : _0;
|
|
25
25
|
var handleRadioChange = function (optionValue) {
|
|
26
26
|
if (!onChange)
|
|
27
27
|
return;
|
|
28
28
|
onChange(optionValue);
|
|
29
29
|
};
|
|
30
30
|
return ((0, jsx_runtime_1.jsxs)(RadioGroup_styled_1.RadioGroupStyled, { children: [label && ((0, jsx_runtime_1.jsx)(RadioGroup_styled_1.GroupLabelWrapper, __assign({ "$emphasizedLabel": hasInfo }, { children: (0, jsx_runtime_1.jsx)(RadioGroup_styled_1.GroupLabel, __assign({ "$emphasizedLabel": hasInfo }, { children: label })) }))), hasInfo && infoText && ((0, jsx_runtime_1.jsxs)(RadioGroup_styled_1.InfoArea, { children: [(0, jsx_runtime_1.jsx)(RadioGroup_styled_1.InfoIconWrapper, { children: (0, jsx_runtime_1.jsx)(Icon_1.default, { name: (infoIcon || props_1.RadioGroupDefault.infoIcon), width: "24", height: "24", hasWrapper: false }) }), (0, jsx_runtime_1.jsx)(RadioGroup_styled_1.InfoText, { children: infoText })] })), (0, jsx_runtime_1.jsx)(RadioGroup_styled_1.RadioButtonsWrapper, __assign({ "$layout": layout, "$gap": gap, "$isFilled": isFilled, "$gridColumnLength": gridColumnLength, "$isHorizontalOnMobile": isHorizontalOnMobile }, { children: options.map(function (option, index) {
|
|
31
|
+
var _a;
|
|
31
32
|
var radioId = option.id || "".concat(name, "_").concat(index);
|
|
32
33
|
var isChecked = value === option.value;
|
|
33
|
-
|
|
34
|
+
var optionHasError = (_a = option.hasError) !== null && _a !== void 0 ? _a : hasError;
|
|
35
|
+
return ((0, jsx_runtime_1.jsx)(RadioButton_1.default, { id: radioId, name: name, value: option.value, checked: isChecked, onChange: function (e) { return handleRadioChange(option.value); }, label: option.label, description: option.description, image: option.image, disabled: disabled || option.disabled, alignment: option.alignment, isWrapText: option.isWrapText, size: size, textSize: textSize, layout: radioLayout, valid: valid, labelOffset: labelOffset, color: option.color || color, verticalAlign: verticalAlign, readOnly: readOnly, labelSm: option.labelSm, hasBadge: option.hasBadge, badgeText: option.badgeText, badgeVariant: option.badgeVariant, price: option.price, priceDesc: option.priceDesc, hasTitleBadge: option.hasTitleBadge, titleBadgeLayout: option.titleBadgeLayout, titleBadgeText: option.titleBadgeText, hasPriceBadge: option.hasPriceBadge, priceBadgeLayout: option.priceBadgeLayout, priceBadgeText: option.priceBadgeText, iconName: option.iconName, iconColor: option.iconColor, content: option.content, showIndicator: showIndicator, titleBadgePosition: option.titleBadgePosition, hasError: optionHasError, errorMessage: option.errorMessage }, radioId));
|
|
34
36
|
}) }))] }));
|
|
35
37
|
};
|
|
36
38
|
exports.default = RadioGroup;
|
|
@@ -34,7 +34,9 @@ export interface RadioOption {
|
|
|
34
34
|
iconName?: string;
|
|
35
35
|
iconColor?: string;
|
|
36
36
|
content?: React.ReactNode;
|
|
37
|
-
titleBadgePosition?: "inline" | "below";
|
|
37
|
+
titleBadgePosition?: "inline" | "below" | "topRight";
|
|
38
|
+
hasError?: boolean;
|
|
39
|
+
errorMessage?: React.ReactNode;
|
|
38
40
|
}
|
|
39
41
|
export interface RadioGroup {
|
|
40
42
|
options?: RadioOption[];
|
|
@@ -62,6 +64,7 @@ export interface RadioGroup {
|
|
|
62
64
|
gridColumnLength?: number;
|
|
63
65
|
/** Mobilde layout uyarlaması: flex vertical → row; grid → tek sütun (alt alta) */
|
|
64
66
|
isHorizontalOnMobile?: boolean;
|
|
67
|
+
hasError?: boolean;
|
|
65
68
|
}
|
|
66
69
|
export declare const RadioGroupDefault: RadioGroup;
|
|
67
70
|
export interface RadioGroupStyledProps {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
declare const _default: {
|
|
3
3
|
title: string;
|
|
4
|
-
component: ({ options, value, onChange, name, label, disabled, size, textSize, layout, radioLayout, valid, labelOffset, color, verticalAlign, readOnly, gap, isFilled, showIndicator, hasInfo, infoText, infoIcon, gridColumnLength, isHorizontalOnMobile, }: import("../props").RadioGroup) => React.JSX.Element;
|
|
4
|
+
component: ({ options, value, onChange, name, label, disabled, size, textSize, layout, radioLayout, valid, labelOffset, color, verticalAlign, readOnly, gap, isFilled, showIndicator, hasInfo, infoText, infoIcon, gridColumnLength, isHorizontalOnMobile, hasError, }: import("../props").RadioGroup) => React.JSX.Element;
|
|
5
5
|
tags: string[];
|
|
6
6
|
argTypes: {
|
|
7
7
|
layout: {
|
|
@@ -52,6 +52,9 @@ declare const _default: {
|
|
|
52
52
|
isHorizontalOnMobile: {
|
|
53
53
|
control: string;
|
|
54
54
|
};
|
|
55
|
+
hasError: {
|
|
56
|
+
control: string;
|
|
57
|
+
};
|
|
55
58
|
};
|
|
56
59
|
};
|
|
57
60
|
export default _default;
|
|
@@ -398,6 +401,101 @@ export declare const HorizontalInstallment: {
|
|
|
398
401
|
gap: string;
|
|
399
402
|
};
|
|
400
403
|
};
|
|
404
|
+
export declare const HorizontalInstallmentWithError: {
|
|
405
|
+
name: string;
|
|
406
|
+
args: {
|
|
407
|
+
name: string;
|
|
408
|
+
hasError: boolean;
|
|
409
|
+
options: ({
|
|
410
|
+
label: string;
|
|
411
|
+
value: string;
|
|
412
|
+
description: string;
|
|
413
|
+
price: string;
|
|
414
|
+
priceDesc: string;
|
|
415
|
+
hasTitleBadge: boolean;
|
|
416
|
+
titleBadgeLayout: string;
|
|
417
|
+
titleBadgeText: string;
|
|
418
|
+
hasPriceBadge: boolean;
|
|
419
|
+
priceBadgeLayout: string;
|
|
420
|
+
priceBadgeText: string;
|
|
421
|
+
disabled?: undefined;
|
|
422
|
+
} | {
|
|
423
|
+
label: string;
|
|
424
|
+
value: string;
|
|
425
|
+
description: string;
|
|
426
|
+
price: string;
|
|
427
|
+
priceDesc: string;
|
|
428
|
+
hasTitleBadge: boolean;
|
|
429
|
+
hasPriceBadge: boolean;
|
|
430
|
+
titleBadgeLayout?: undefined;
|
|
431
|
+
titleBadgeText?: undefined;
|
|
432
|
+
priceBadgeLayout?: undefined;
|
|
433
|
+
priceBadgeText?: undefined;
|
|
434
|
+
disabled?: undefined;
|
|
435
|
+
} | {
|
|
436
|
+
label: string;
|
|
437
|
+
value: string;
|
|
438
|
+
description: string;
|
|
439
|
+
price: string;
|
|
440
|
+
priceDesc: string;
|
|
441
|
+
hasTitleBadge: boolean;
|
|
442
|
+
titleBadgeLayout: string;
|
|
443
|
+
titleBadgeText: string;
|
|
444
|
+
hasPriceBadge: boolean;
|
|
445
|
+
priceBadgeLayout: string;
|
|
446
|
+
priceBadgeText: string;
|
|
447
|
+
disabled: boolean;
|
|
448
|
+
} | {
|
|
449
|
+
errorMessage: string;
|
|
450
|
+
label: string;
|
|
451
|
+
value: string;
|
|
452
|
+
description: string;
|
|
453
|
+
price: string;
|
|
454
|
+
priceDesc: string;
|
|
455
|
+
hasTitleBadge: boolean;
|
|
456
|
+
titleBadgeLayout: string;
|
|
457
|
+
titleBadgeText: string;
|
|
458
|
+
hasPriceBadge: boolean;
|
|
459
|
+
priceBadgeLayout: string;
|
|
460
|
+
priceBadgeText: string;
|
|
461
|
+
disabled?: undefined;
|
|
462
|
+
} | {
|
|
463
|
+
errorMessage: string;
|
|
464
|
+
label: string;
|
|
465
|
+
value: string;
|
|
466
|
+
description: string;
|
|
467
|
+
price: string;
|
|
468
|
+
priceDesc: string;
|
|
469
|
+
hasTitleBadge: boolean;
|
|
470
|
+
hasPriceBadge: boolean;
|
|
471
|
+
titleBadgeLayout?: undefined;
|
|
472
|
+
titleBadgeText?: undefined;
|
|
473
|
+
priceBadgeLayout?: undefined;
|
|
474
|
+
priceBadgeText?: undefined;
|
|
475
|
+
disabled?: undefined;
|
|
476
|
+
} | {
|
|
477
|
+
errorMessage: string;
|
|
478
|
+
label: string;
|
|
479
|
+
value: string;
|
|
480
|
+
description: string;
|
|
481
|
+
price: string;
|
|
482
|
+
priceDesc: string;
|
|
483
|
+
hasTitleBadge: boolean;
|
|
484
|
+
titleBadgeLayout: string;
|
|
485
|
+
titleBadgeText: string;
|
|
486
|
+
hasPriceBadge: boolean;
|
|
487
|
+
priceBadgeLayout: string;
|
|
488
|
+
priceBadgeText: string;
|
|
489
|
+
disabled: boolean;
|
|
490
|
+
})[];
|
|
491
|
+
label: string;
|
|
492
|
+
value: string;
|
|
493
|
+
onChange: (value: any) => void;
|
|
494
|
+
layout: string;
|
|
495
|
+
radioLayout: string;
|
|
496
|
+
gap: string;
|
|
497
|
+
};
|
|
498
|
+
};
|
|
401
499
|
export declare const VariantPricing: {
|
|
402
500
|
name: string;
|
|
403
501
|
render: () => React.JSX.Element;
|
|
@@ -14,7 +14,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
14
14
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
exports.AllRadioLayouts = exports.VariantPricing = exports.HorizontalInstallment = exports.BoxedWithIconLayout = exports.WithDescriptions = exports.WithDisabledOptions = exports.ColorPicker = exports.GridStackedOnMobile = exports.GridTwoColumns = exports.WithInfoArea = exports.BoxedMdWithoutIndicator = exports.BoxedMdFilled = exports.BoxedMdLayout = exports.BoxedSmFilled = exports.BoxedSmLayout = exports.BoxedLayout = exports.Horizontal = exports.VerticalHorizontalOnMobile = exports.WithoutIndicator = exports.Default = void 0;
|
|
17
|
+
exports.AllRadioLayouts = exports.VariantPricing = exports.HorizontalInstallmentWithError = exports.HorizontalInstallment = exports.BoxedWithIconLayout = exports.WithDescriptions = exports.WithDisabledOptions = exports.ColorPicker = exports.GridStackedOnMobile = exports.GridTwoColumns = exports.WithInfoArea = exports.BoxedMdWithoutIndicator = exports.BoxedMdFilled = exports.BoxedMdLayout = exports.BoxedSmFilled = exports.BoxedSmLayout = exports.BoxedLayout = exports.Horizontal = exports.VerticalHorizontalOnMobile = exports.WithoutIndicator = exports.Default = void 0;
|
|
18
18
|
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
19
19
|
var react_1 = __importDefault(require("react"));
|
|
20
20
|
var RadioGroup_1 = __importDefault(require("../RadioGroup"));
|
|
@@ -116,6 +116,7 @@ exports.default = {
|
|
|
116
116
|
infoIcon: { control: 'text' },
|
|
117
117
|
gridColumnLength: { control: 'number', min: 1, max: 6 },
|
|
118
118
|
isHorizontalOnMobile: { control: 'boolean' },
|
|
119
|
+
hasError: { control: 'boolean' },
|
|
119
120
|
}
|
|
120
121
|
};
|
|
121
122
|
exports.Default = {
|
|
@@ -388,6 +389,13 @@ exports.HorizontalInstallment = {
|
|
|
388
389
|
gap: "0.75rem",
|
|
389
390
|
},
|
|
390
391
|
};
|
|
392
|
+
exports.HorizontalInstallmentWithError = {
|
|
393
|
+
name: "Horizontal — error",
|
|
394
|
+
args: __assign(__assign({}, exports.HorizontalInstallment.args), { name: "horizontalInstallmentErrorRadioGroup", hasError: true, options: horizontalOptions.map(function (option, index) {
|
|
395
|
+
return index === 0
|
|
396
|
+
? __assign(__assign({}, option), { errorMessage: "Bu alan zorunludur" }) : option;
|
|
397
|
+
}) }),
|
|
398
|
+
};
|
|
391
399
|
var variantPricingContent = ((0, jsx_runtime_1.jsxs)("div", __assign({ style: { display: "flex", flexDirection: "column", gap: "1rem" } }, { children: [(0, jsx_runtime_1.jsx)("div", __assign({ style: { padding: "1rem", borderRadius: "0.5rem", background: "var(--dark-opacity-3)" } }, { children: "\u00DCr\u00FCn g\u00F6rselleri alan\u0131" })), (0, jsx_runtime_1.jsxs)("div", __assign({ style: { display: "grid", gridTemplateColumns: "repeat(3, 1fr)", gap: "0.5rem" } }, { children: [(0, jsx_runtime_1.jsx)("div", { style: { height: "48px", borderRadius: "0.5rem", background: "var(--dark-opacity-5)" } }), (0, jsx_runtime_1.jsx)("div", { style: { height: "48px", borderRadius: "0.5rem", background: "var(--dark-opacity-5)" } }), (0, jsx_runtime_1.jsx)("div", { style: { height: "48px", borderRadius: "0.5rem", background: "var(--dark-opacity-5)" } })] })), (0, jsx_runtime_1.jsxs)("div", __assign({ style: { display: "grid", gridTemplateColumns: "1fr 1fr", gap: "0.5rem" } }, { children: [(0, jsx_runtime_1.jsx)("div", { style: { height: "48px", borderRadius: "0.5rem", background: "var(--dark-opacity-5)" } }), (0, jsx_runtime_1.jsx)("div", { style: { height: "48px", borderRadius: "0.5rem", background: "var(--dark-opacity-5)" } })] }))] })));
|
|
392
400
|
var VariantPricingStory = function () {
|
|
393
401
|
var _a = react_1.default.useState("noVariant"), value = _a[0], setValue = _a[1];
|
|
@@ -62,7 +62,7 @@ var Loader_1 = __importDefault(require("../Loader"));
|
|
|
62
62
|
var Checkbox_1 = __importDefault(require("../Checkbox"));
|
|
63
63
|
var SelectBox = (0, react_1.forwardRef)(function (_a, ref) {
|
|
64
64
|
var _b, _c, _d, _e;
|
|
65
|
-
var _f = _a.isSearchable, isSearchable = _f === void 0 ? props_1.SelectBoxDefault.isSearchable : _f, _g = _a.menuIsOpen, menuIsOpen = _g === void 0 ? props_1.SelectBoxDefault.menuIsOpen : _g, _h = _a.label, label = _h === void 0 ? props_1.SelectBoxDefault.label : _h, _j = _a.width, width = _j === void 0 ? props_1.SelectBoxDefault.width : _j, _k = _a.menuWidth, menuWidth = _k === void 0 ? props_1.SelectBoxDefault.menuWidth : _k, _l = _a.menuAlign, menuAlign = _l === void 0 ? props_1.SelectBoxDefault.menuAlign : _l, _m = _a.hasMenuShadow, hasMenuShadow = _m === void 0 ? props_1.SelectBoxDefault.hasMenuShadow : _m, _o = _a.name, name = _o === void 0 ? props_1.SelectBoxDefault.name : _o, _p = _a.placeholder, placeholder = _p === void 0 ? props_1.SelectBoxDefault.placeholder : _p, _q = _a.instanceId, instanceId = _q === void 0 ? props_1.SelectBoxDefault.instanceId : _q, _r = _a.options, options = _r === void 0 ? props_1.SelectBoxDefault.options : _r, _s = _a.lightBg, lightBg = _s === void 0 ? props_1.SelectBoxDefault.lightBg : _s, _t = _a.onChange, onChange = _t === void 0 ? props_1.SelectBoxDefault.onChange : _t, _u = _a.filterOption, filterOption = _u === void 0 ? props_1.SelectBoxDefault.filterOption : _u, _v = _a.hasError, hasError = _v === void 0 ? props_1.SelectBoxDefault.hasError : _v, _w = _a.errorMessage, errorMessage = _w === void 0 ? props_1.SelectBoxDefault.errorMessage : _w, _x = _a.maxOptionListHeight, maxOptionListHeight = _x === void 0 ? props_1.SelectBoxDefault.maxOptionListHeight : _x, _y = _a.isAsync, isAsync = _y === void 0 ? props_1.SelectBoxDefault.isAsync : _y, _z = _a.hasShowDropdownIcon, hasShowDropdownIcon = _z === void 0 ? props_1.SelectBoxDefault.hasShowDropdownIcon : _z, _0 = _a.hasShowSearchIcon, hasShowSearchIcon = _0 === void 0 ? props_1.SelectBoxDefault.hasShowSearchIcon : _0, _1 = _a.autoComplete, autoComplete = _1 === void 0 ? props_1.SelectBoxDefault.autoComplete : _1, _2 = _a.menuPlacement, menuPlacement = _2 === void 0 ? props_1.SelectBoxDefault.menuPlacement : _2, _3 = _a.id, id = _3 === void 0 ? props_1.SelectBoxDefault.id : _3, _4 = _a.isClearable, isClearable = _4 === void 0 ? props_1.SelectBoxDefault.isClearable : _4, _5 = _a.size, size = _5 === void 0 ? props_1.SelectBoxDefault.size : _5, _6 = _a.isMulti, isMulti = _6 === void 0 ? props_1.SelectBoxDefault.isMulti : _6, _7 = _a.menuPosition, menuPosition = _7 === void 0 ? props_1.SelectBoxDefault.menuPosition : _7, _8 = _a.hasSelectAll, hasSelectAll = _8 === void 0 ? props_1.SelectBoxDefault.hasSelectAll : _8, _9 = _a.selectAllLabel, selectAllLabel = _9 === void 0 ? props_1.SelectBoxDefault.selectAllLabel : _9, _10 = _a.description, description = _10 === void 0 ? props_1.SelectBoxDefault.description : _10, defaultValue = _a.defaultValue, other = __rest(_a, ["isSearchable", "menuIsOpen", "label", "width", "menuWidth", "menuAlign", "hasMenuShadow", "name", "placeholder", "instanceId", "options", "lightBg", "onChange", "filterOption", "hasError", "errorMessage", "maxOptionListHeight", "isAsync", "hasShowDropdownIcon", "hasShowSearchIcon", "autoComplete", "menuPlacement", "id", "isClearable", "size", "isMulti", "menuPosition", "hasSelectAll", "selectAllLabel", "description", "defaultValue"]);
|
|
65
|
+
var _f = _a.isSearchable, isSearchable = _f === void 0 ? props_1.SelectBoxDefault.isSearchable : _f, _g = _a.menuIsOpen, menuIsOpen = _g === void 0 ? props_1.SelectBoxDefault.menuIsOpen : _g, _h = _a.label, label = _h === void 0 ? props_1.SelectBoxDefault.label : _h, _j = _a.width, width = _j === void 0 ? props_1.SelectBoxDefault.width : _j, _k = _a.menuWidth, menuWidth = _k === void 0 ? props_1.SelectBoxDefault.menuWidth : _k, _l = _a.menuAlign, menuAlign = _l === void 0 ? props_1.SelectBoxDefault.menuAlign : _l, _m = _a.hasMenuShadow, hasMenuShadow = _m === void 0 ? props_1.SelectBoxDefault.hasMenuShadow : _m, _o = _a.name, name = _o === void 0 ? props_1.SelectBoxDefault.name : _o, _p = _a.placeholder, placeholder = _p === void 0 ? props_1.SelectBoxDefault.placeholder : _p, _q = _a.instanceId, instanceId = _q === void 0 ? props_1.SelectBoxDefault.instanceId : _q, _r = _a.options, options = _r === void 0 ? props_1.SelectBoxDefault.options : _r, _s = _a.lightBg, lightBg = _s === void 0 ? props_1.SelectBoxDefault.lightBg : _s, _t = _a.onChange, onChange = _t === void 0 ? props_1.SelectBoxDefault.onChange : _t, _u = _a.filterOption, filterOption = _u === void 0 ? props_1.SelectBoxDefault.filterOption : _u, _v = _a.hasError, hasError = _v === void 0 ? props_1.SelectBoxDefault.hasError : _v, _w = _a.errorMessage, errorMessage = _w === void 0 ? props_1.SelectBoxDefault.errorMessage : _w, _x = _a.maxOptionListHeight, maxOptionListHeight = _x === void 0 ? props_1.SelectBoxDefault.maxOptionListHeight : _x, _y = _a.isAsync, isAsync = _y === void 0 ? props_1.SelectBoxDefault.isAsync : _y, _z = _a.hasShowDropdownIcon, hasShowDropdownIcon = _z === void 0 ? props_1.SelectBoxDefault.hasShowDropdownIcon : _z, _0 = _a.hasShowSearchIcon, hasShowSearchIcon = _0 === void 0 ? props_1.SelectBoxDefault.hasShowSearchIcon : _0, _1 = _a.autoComplete, autoComplete = _1 === void 0 ? props_1.SelectBoxDefault.autoComplete : _1, _2 = _a.menuPlacement, menuPlacement = _2 === void 0 ? props_1.SelectBoxDefault.menuPlacement : _2, _3 = _a.id, id = _3 === void 0 ? props_1.SelectBoxDefault.id : _3, _4 = _a.isClearable, isClearable = _4 === void 0 ? props_1.SelectBoxDefault.isClearable : _4, _5 = _a.size, size = _5 === void 0 ? props_1.SelectBoxDefault.size : _5, _6 = _a.isMulti, isMulti = _6 === void 0 ? props_1.SelectBoxDefault.isMulti : _6, _7 = _a.menuPosition, menuPosition = _7 === void 0 ? props_1.SelectBoxDefault.menuPosition : _7, _8 = _a.hasSelectAll, hasSelectAll = _8 === void 0 ? props_1.SelectBoxDefault.hasSelectAll : _8, _9 = _a.selectAllLabel, selectAllLabel = _9 === void 0 ? props_1.SelectBoxDefault.selectAllLabel : _9, _10 = _a.description, description = _10 === void 0 ? props_1.SelectBoxDefault.description : _10, _11 = _a.disabled, disabled = _11 === void 0 ? props_1.SelectBoxDefault.disabled : _11, defaultValue = _a.defaultValue, other = __rest(_a, ["isSearchable", "menuIsOpen", "label", "width", "menuWidth", "menuAlign", "hasMenuShadow", "name", "placeholder", "instanceId", "options", "lightBg", "onChange", "filterOption", "hasError", "errorMessage", "maxOptionListHeight", "isAsync", "hasShowDropdownIcon", "hasShowSearchIcon", "autoComplete", "menuPlacement", "id", "isClearable", "size", "isMulti", "menuPosition", "hasSelectAll", "selectAllLabel", "description", "disabled", "defaultValue"]);
|
|
66
66
|
var CustomOption = react_1.default.forwardRef(function (props, ref) {
|
|
67
67
|
var _a;
|
|
68
68
|
var innerProps = props.innerProps, isDisabled = props.isDisabled, data = props.data, isFocused = props.isFocused, isSelected = props.isSelected, isMulti = props.isMulti, children = props.children // children is part of OptionProps, but we render custom content based on `data`
|
|
@@ -179,21 +179,21 @@ var SelectBox = (0, react_1.forwardRef)(function (_a, ref) {
|
|
|
179
179
|
return filterOption(normalizedOption, inputValue);
|
|
180
180
|
} : undefined;
|
|
181
181
|
// Remove filterOption from other to avoid duplicate props
|
|
182
|
-
var
|
|
183
|
-
return ((0, jsx_runtime_1.jsxs)(SelectBox_styled_1.Container, __assign({ "$width": width, "$menuWidth": menuWidth, "$menuAlign": menuAlign, "$hasMenuShadow": hasMenuShadow, "$hasError": hasError, "$maxOptionListHeight": maxOptionListHeight, "$hasShowDropdownIcon": hasShowDropdownIcon, "$MenuPlacement": menuPlacement, "$size": size, "$isMulti": isMulti, "$menuPosition": menuPosition }, { children: [label && ((0, jsx_runtime_1.jsx)("div", __assign({ className: "top" }, { children: (0, jsx_runtime_1.jsx)("label", __assign({ htmlFor: id }, { children: label })) }))), (0, jsx_runtime_1.jsx)("div", __assign({ className: "select" }, { children: isAsync ? ((0, jsx_runtime_1.jsx)(async_1.default, __assign({ components: {
|
|
182
|
+
var _12 = other, _ = _12.filterOption, restOther = __rest(_12, ["filterOption"]);
|
|
183
|
+
return ((0, jsx_runtime_1.jsxs)(SelectBox_styled_1.Container, __assign({ "$width": width, "$menuWidth": menuWidth, "$menuAlign": menuAlign, "$hasMenuShadow": hasMenuShadow, "$hasError": hasError, "$maxOptionListHeight": maxOptionListHeight, "$hasShowDropdownIcon": hasShowDropdownIcon, "$MenuPlacement": menuPlacement, "$size": size, "$isMulti": isMulti, "$menuPosition": menuPosition, "$disabled": disabled }, { children: [label && ((0, jsx_runtime_1.jsx)("div", __assign({ className: "top" }, { children: (0, jsx_runtime_1.jsx)("label", __assign({ htmlFor: id }, { children: label })) }))), (0, jsx_runtime_1.jsx)("div", __assign({ className: "select" }, { children: isAsync ? ((0, jsx_runtime_1.jsx)(async_1.default, __assign({ components: {
|
|
184
184
|
Option: CustomOption,
|
|
185
185
|
Input: Input,
|
|
186
186
|
DropdownIndicator: DropdownIndicator,
|
|
187
187
|
MenuList: MenuList,
|
|
188
188
|
LoadingIndicator: LoadingIndicator,
|
|
189
189
|
MultiValue: MultiValue
|
|
190
|
-
}, options: options || [], instanceId: instanceId, getOptionLabel: getOptionLabel, formatOptionLabel: formatOptionLabel, filterOption: wrappedFilterOption, isSearchable: isSearchable, name: name, menuIsOpen: menuIsOpen, onChange: onChange, classNamePrefix: "customSelect", className: (0, classnames_1.default)("customSelect", (_b = {}, _b['isSearchable'] = isSearchable && hasShowSearchIcon, _b), (_c = {}, _c['lightBg'] = lightBg, _c)), placeholder: placeholder, noOptionsMessage: function () { return 'Sonuç bulunamadı'; }, loadingMessage: function () { return 'Sonuç bulunamadı'; }, captureMenuScroll: false, isClearable: isClearable, defaultValue: defaultValue, isMulti: isMulti, closeMenuOnSelect: !isMulti }, restOther, { ref: ref, id: id }))) : ((0, jsx_runtime_1.jsx)(react_select_1.default, __assign({ components: {
|
|
190
|
+
}, options: options || [], instanceId: instanceId, getOptionLabel: getOptionLabel, formatOptionLabel: formatOptionLabel, filterOption: wrappedFilterOption, isSearchable: isSearchable, name: name, menuIsOpen: menuIsOpen, onChange: onChange, classNamePrefix: "customSelect", className: (0, classnames_1.default)("customSelect", (_b = {}, _b['isSearchable'] = isSearchable && hasShowSearchIcon, _b), (_c = {}, _c['lightBg'] = lightBg, _c)), placeholder: placeholder, noOptionsMessage: function () { return 'Sonuç bulunamadı'; }, loadingMessage: function () { return 'Sonuç bulunamadı'; }, captureMenuScroll: false, isClearable: isClearable, defaultValue: defaultValue, isMulti: isMulti, closeMenuOnSelect: !isMulti, isDisabled: disabled }, restOther, { ref: ref, id: id }))) : ((0, jsx_runtime_1.jsx)(react_select_1.default, __assign({ components: {
|
|
191
191
|
Option: CustomOption,
|
|
192
192
|
Input: Input,
|
|
193
193
|
DropdownIndicator: DropdownIndicator,
|
|
194
194
|
MenuList: MenuList,
|
|
195
195
|
LoadingIndicator: LoadingIndicator,
|
|
196
196
|
MultiValue: MultiValue
|
|
197
|
-
}, options: options || [], instanceId: instanceId, getOptionLabel: getOptionLabel, formatOptionLabel: formatOptionLabel, filterOption: wrappedFilterOption, isSearchable: isSearchable, name: name, menuIsOpen: menuIsOpen, onChange: onChange, classNamePrefix: "customSelect", className: (0, classnames_1.default)("customSelect", (_d = {}, _d['isSearchable'] = isSearchable && hasShowSearchIcon, _d), (_e = {}, _e['lightBg'] = lightBg, _e)), placeholder: placeholder, noOptionsMessage: function () { return 'Sonuç bulunamadı'; }, captureMenuScroll: false, isClearable: isClearable, defaultValue: defaultValue, isMulti: isMulti, closeMenuOnSelect: !isMulti, hideSelectedOptions: false }, restOther, { ref: ref, id: id }))) })),
|
|
197
|
+
}, options: options || [], instanceId: instanceId, getOptionLabel: getOptionLabel, formatOptionLabel: formatOptionLabel, filterOption: wrappedFilterOption, isSearchable: isSearchable, name: name, menuIsOpen: menuIsOpen, onChange: onChange, classNamePrefix: "customSelect", className: (0, classnames_1.default)("customSelect", (_d = {}, _d['isSearchable'] = isSearchable && hasShowSearchIcon, _d), (_e = {}, _e['lightBg'] = lightBg, _e)), placeholder: placeholder, noOptionsMessage: function () { return 'Sonuç bulunamadı'; }, captureMenuScroll: false, isClearable: isClearable, defaultValue: defaultValue, isMulti: isMulti, closeMenuOnSelect: !isMulti, hideSelectedOptions: false, isDisabled: disabled }, restOther, { ref: ref, id: id }))) })), hasError && errorMessage && ((0, jsx_runtime_1.jsxs)("div", __assign({ className: "error" }, { children: [(0, jsx_runtime_1.jsx)(Icon_1.default, { name: "SwitchPassive" }), (0, jsx_runtime_1.jsx)("p", { children: errorMessage })] }))), description && (0, jsx_runtime_1.jsx)(Input_styled_1.FieldDescription, { children: description })] })));
|
|
198
198
|
});
|
|
199
199
|
exports.default = SelectBox;
|