krl-alfred 2.17.56 → 2.17.57
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/ProductCardHorizontalSm/ProductCardHorizontalSm.d.ts +1 -1
- package/dist/components/ProductCardHorizontalSm/ProductCardHorizontalSm.js +17 -6
- package/dist/components/ProductCardHorizontalSm/props.d.ts +1 -0
- package/dist/components/ProductCardHorizontalSm/props.js +1 -0
- package/dist/components/SelectBox/SelectBox.js +24 -3
- package/dist/components/SelectBox/SelectBox.styled.js +1 -1
- package/dist/components/SelectBox/props.d.ts +2 -0
- package/dist/components/SelectBox/props.js +3 -1
- package/dist/components/SelectBox/stories/SelectBox.stories.d.ts +46 -0
- package/dist/components/SelectBox/stories/SelectBox.stories.js +7 -1
- package/package.json +1 -1
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
declare const _default: React.MemoExoticComponent<({ title, price, priceSm, slug, period, image, component, hasImageBorder, imageWidth, imageHeight, infoPosition, hasButton, buttonVariant, buttonText, hasBorder, isSelected, hasTitleWrap, hasButtonRemoveMdDown, hasBordeHover, hasTooltip, tooltipSelectorTitle, tooltipDescription, isDisabled, imageInnerWidth, imageInnerHeight, hasImageRounded, }: import("./props").ProductCardHorizontalSm) => import("react/jsx-runtime").JSX.Element>;
|
|
2
|
+
declare const _default: React.MemoExoticComponent<({ title, price, priceSm, slug, period, image, component, imageComponent, hasImageBorder, imageWidth, imageHeight, infoPosition, hasButton, buttonVariant, buttonText, hasBorder, isSelected, hasTitleWrap, hasButtonRemoveMdDown, hasBordeHover, hasTooltip, tooltipSelectorTitle, tooltipDescription, isDisabled, imageInnerWidth, imageInnerHeight, hasImageRounded, }: import("./props").ProductCardHorizontalSm) => import("react/jsx-runtime").JSX.Element>;
|
|
3
3
|
export default _default;
|
|
@@ -17,9 +17,17 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
17
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
18
|
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
19
19
|
var react_1 = require("react");
|
|
20
|
-
var image_1 = __importDefault(require("next/image"));
|
|
21
20
|
var Button_1 = __importDefault(require("../Button"));
|
|
22
21
|
var Tooltip_1 = __importDefault(require("../Tooltip"));
|
|
22
|
+
// next/image'i opsiyonel olarak yükle - CRA projelerinde çalışması için
|
|
23
|
+
var NextImage = null;
|
|
24
|
+
try {
|
|
25
|
+
// eslint-disable-next-line @typescript-eslint/no-require-imports
|
|
26
|
+
NextImage = require("next/image").default;
|
|
27
|
+
}
|
|
28
|
+
catch (_a) {
|
|
29
|
+
// next/image bulunamadı, native img kullanılacak
|
|
30
|
+
}
|
|
23
31
|
var ProductCardHorizontalSm_styled_1 = require("./ProductCardHorizontalSm.styled");
|
|
24
32
|
var props_1 = require("./props");
|
|
25
33
|
var LinkComponent = (0, react_1.memo)(function (_a) {
|
|
@@ -27,8 +35,10 @@ var LinkComponent = (0, react_1.memo)(function (_a) {
|
|
|
27
35
|
return Component ? (0, jsx_runtime_1.jsx)(Component, __assign({ href: slug }, { children: children })) : (0, jsx_runtime_1.jsx)("a", __assign({ href: slug }, { children: children }));
|
|
28
36
|
});
|
|
29
37
|
var ImageContent = (0, react_1.memo)(function (_a) {
|
|
30
|
-
var image = _a.image, title = _a.title, imageInnerWidth = _a.imageInnerWidth, imageInnerHeight = _a.imageInnerHeight, imageHeight = _a.imageHeight, imageWidth = _a.imageWidth, hasImageBorder = _a.hasImageBorder, hasImageRounded = _a.hasImageRounded;
|
|
31
|
-
|
|
38
|
+
var image = _a.image, title = _a.title, imageInnerWidth = _a.imageInnerWidth, imageInnerHeight = _a.imageInnerHeight, imageHeight = _a.imageHeight, imageWidth = _a.imageWidth, hasImageBorder = _a.hasImageBorder, hasImageRounded = _a.hasImageRounded, ImageComponent = _a.imageComponent;
|
|
39
|
+
// Öncelik: 1) imageComponent prop'u, 2) next/image (varsa), 3) native img
|
|
40
|
+
var ResolvedImage = ImageComponent || NextImage || "img";
|
|
41
|
+
return ((0, jsx_runtime_1.jsx)(ProductCardHorizontalSm_styled_1.ImgWrapper, __assign({ "$imageHeight": imageHeight, "$imageWidth": imageWidth, "$hasImageBorder": hasImageBorder, "$hasImageRounded": hasImageRounded }, { children: (0, jsx_runtime_1.jsx)(ResolvedImage, { src: image, alt: title || "", width: imageInnerWidth, height: imageInnerHeight }) })));
|
|
32
42
|
}, function (prev, next) {
|
|
33
43
|
return prev.image === next.image &&
|
|
34
44
|
prev.title === next.title &&
|
|
@@ -36,10 +46,11 @@ var ImageContent = (0, react_1.memo)(function (_a) {
|
|
|
36
46
|
prev.imageInnerHeight === next.imageInnerHeight &&
|
|
37
47
|
prev.imageHeight === next.imageHeight &&
|
|
38
48
|
prev.imageWidth === next.imageWidth &&
|
|
39
|
-
prev.hasImageBorder === next.hasImageBorder
|
|
49
|
+
prev.hasImageBorder === next.hasImageBorder &&
|
|
50
|
+
prev.imageComponent === next.imageComponent;
|
|
40
51
|
});
|
|
41
52
|
var ProductCardHorizontalSm = function (_a) {
|
|
42
|
-
var _b = _a.title, title = _b === void 0 ? props_1.ProductCardHorizontalSmDefault.title : _b, _c = _a.price, price = _c === void 0 ? props_1.ProductCardHorizontalSmDefault.price : _c, _d = _a.priceSm, priceSm = _d === void 0 ? props_1.ProductCardHorizontalSmDefault.priceSm : _d, _e = _a.slug, slug = _e === void 0 ? props_1.ProductCardHorizontalSmDefault.slug : _e, _f = _a.period, period = _f === void 0 ? props_1.ProductCardHorizontalSmDefault.period : _f, _g = _a.image, image = _g === void 0 ? props_1.ProductCardHorizontalSmDefault.image : _g, _h = _a.component, component = _h === void 0 ? props_1.ProductCardHorizontalSmDefault.component : _h, _j = _a.
|
|
43
|
-
return ((0, jsx_runtime_1.jsxs)(ProductCardHorizontalSm_styled_1.ProductCardHorizontalSmStyled, __assign({ "$period": period, "$hasImageBorder": hasImageBorder, "$imageWidth": imageWidth, "$imageHeight": imageHeight, "$isSelected": isSelected, "$hasBordeHover": hasBordeHover, "$isDisabled": isDisabled }, { children: [(0, jsx_runtime_1.jsx)(ProductCardHorizontalSm_styled_1.Border, { "$isSelected": isSelected, "$hasBordeHover": hasBordeHover, "$hasBorder": hasBorder }), (0, jsx_runtime_1.jsx)(LinkComponent, __assign({ component: component, slug: slug }, { children: (0, jsx_runtime_1.jsxs)(ProductCardHorizontalSm_styled_1.HorizontalSmWrapper, { children: [(0, jsx_runtime_1.jsx)(ImageContent, { image: image, title: title, imageInnerWidth: imageInnerWidth, imageInnerHeight: imageInnerHeight, imageHeight: imageHeight, imageWidth: imageWidth, hasImageBorder: hasImageBorder, hasImageRounded: hasImageRounded }), (0, jsx_runtime_1.jsxs)(ProductCardHorizontalSm_styled_1.TextWrapper, __assign({ "$period": period }, { children: [(0, jsx_runtime_1.jsx)(ProductCardHorizontalSm_styled_1.Title, __assign({ "$hasTitleWrap": hasTitleWrap }, { children: title })), infoPosition === "left" && ((0, jsx_runtime_1.jsxs)(ProductCardHorizontalSm_styled_1.PriceContent, __assign({ "$infoPosition": infoPosition }, { children: [(0, jsx_runtime_1.jsxs)(ProductCardHorizontalSm_styled_1.Price, { children: [price, priceSm && (0, jsx_runtime_1.jsx)("small", { children: priceSm })] }), (0, jsx_runtime_1.jsx)(ProductCardHorizontalSm_styled_1.Period, __assign({ "$infoPosition": infoPosition }, { children: period }))] })))] })), (0, jsx_runtime_1.jsxs)(ProductCardHorizontalSm_styled_1.RightContentWrapper, __assign({ "$hasButtonRemoveMdDown": hasButtonRemoveMdDown }, { children: [infoPosition === "right" && ((0, jsx_runtime_1.jsxs)(ProductCardHorizontalSm_styled_1.PriceContent, __assign({ "$infoPosition": infoPosition }, { children: [(0, jsx_runtime_1.jsx)(ProductCardHorizontalSm_styled_1.Period, __assign({ "$infoPosition": infoPosition }, { children: period })), (0, jsx_runtime_1.jsxs)(ProductCardHorizontalSm_styled_1.Price, { children: [price, priceSm && (0, jsx_runtime_1.jsx)("small", { children: priceSm })] })] }))), hasButton && ((0, jsx_runtime_1.jsx)(Button_1.default, __assign({ disabled: isDisabled, variant: buttonVariant, size: "xsmall" }, { children: buttonText }))), hasTooltip && ((0, jsx_runtime_1.jsx)(Tooltip_1.default, __assign({ selectorTitle: tooltipSelectorTitle, popupWidth: "238px", position: "topRight", popupSize: "medium" }, { children: tooltipDescription })))] }))] }) }))] })));
|
|
53
|
+
var _b = _a.title, title = _b === void 0 ? props_1.ProductCardHorizontalSmDefault.title : _b, _c = _a.price, price = _c === void 0 ? props_1.ProductCardHorizontalSmDefault.price : _c, _d = _a.priceSm, priceSm = _d === void 0 ? props_1.ProductCardHorizontalSmDefault.priceSm : _d, _e = _a.slug, slug = _e === void 0 ? props_1.ProductCardHorizontalSmDefault.slug : _e, _f = _a.period, period = _f === void 0 ? props_1.ProductCardHorizontalSmDefault.period : _f, _g = _a.image, image = _g === void 0 ? props_1.ProductCardHorizontalSmDefault.image : _g, _h = _a.component, component = _h === void 0 ? props_1.ProductCardHorizontalSmDefault.component : _h, _j = _a.imageComponent, imageComponent = _j === void 0 ? props_1.ProductCardHorizontalSmDefault.imageComponent : _j, _k = _a.hasImageBorder, hasImageBorder = _k === void 0 ? props_1.ProductCardHorizontalSmDefault.hasImageBorder : _k, _l = _a.imageWidth, imageWidth = _l === void 0 ? props_1.ProductCardHorizontalSmDefault.imageWidth : _l, _m = _a.imageHeight, imageHeight = _m === void 0 ? props_1.ProductCardHorizontalSmDefault.imageHeight : _m, _o = _a.infoPosition, infoPosition = _o === void 0 ? props_1.ProductCardHorizontalSmDefault.infoPosition : _o, _p = _a.hasButton, hasButton = _p === void 0 ? props_1.ProductCardHorizontalSmDefault.hasButton : _p, _q = _a.buttonVariant, buttonVariant = _q === void 0 ? props_1.ProductCardHorizontalSmDefault.buttonVariant : _q, _r = _a.buttonText, buttonText = _r === void 0 ? props_1.ProductCardHorizontalSmDefault.buttonText : _r, _s = _a.hasBorder, hasBorder = _s === void 0 ? props_1.ProductCardHorizontalSmDefault.hasBorder : _s, _t = _a.isSelected, isSelected = _t === void 0 ? props_1.ProductCardHorizontalSmDefault.isSelected : _t, _u = _a.hasTitleWrap, hasTitleWrap = _u === void 0 ? props_1.ProductCardHorizontalSmDefault.hasTitleWrap : _u, _v = _a.hasButtonRemoveMdDown, hasButtonRemoveMdDown = _v === void 0 ? props_1.ProductCardHorizontalSmDefault.hasButtonRemoveMdDown : _v, _w = _a.hasBordeHover, hasBordeHover = _w === void 0 ? props_1.ProductCardHorizontalSmDefault.hasBordeHover : _w, _x = _a.hasTooltip, hasTooltip = _x === void 0 ? props_1.ProductCardHorizontalSmDefault.hasTooltip : _x, _y = _a.tooltipSelectorTitle, tooltipSelectorTitle = _y === void 0 ? props_1.ProductCardHorizontalSmDefault.tooltipSelectorTitle : _y, _z = _a.tooltipDescription, tooltipDescription = _z === void 0 ? props_1.ProductCardHorizontalSmDefault.tooltipDescription : _z, _0 = _a.isDisabled, isDisabled = _0 === void 0 ? props_1.ProductCardHorizontalSmDefault.isDisabled : _0, _1 = _a.imageInnerWidth, imageInnerWidth = _1 === void 0 ? props_1.ProductCardHorizontalSmDefault.imageInnerWidth : _1, _2 = _a.imageInnerHeight, imageInnerHeight = _2 === void 0 ? props_1.ProductCardHorizontalSmDefault.imageInnerHeight : _2, _3 = _a.hasImageRounded, hasImageRounded = _3 === void 0 ? props_1.ProductCardHorizontalSmDefault.hasImageRounded : _3;
|
|
54
|
+
return ((0, jsx_runtime_1.jsxs)(ProductCardHorizontalSm_styled_1.ProductCardHorizontalSmStyled, __assign({ "$period": period, "$hasImageBorder": hasImageBorder, "$imageWidth": imageWidth, "$imageHeight": imageHeight, "$isSelected": isSelected, "$hasBordeHover": hasBordeHover, "$isDisabled": isDisabled }, { children: [(0, jsx_runtime_1.jsx)(ProductCardHorizontalSm_styled_1.Border, { "$isSelected": isSelected, "$hasBordeHover": hasBordeHover, "$hasBorder": hasBorder }), (0, jsx_runtime_1.jsx)(LinkComponent, __assign({ component: component, slug: slug }, { children: (0, jsx_runtime_1.jsxs)(ProductCardHorizontalSm_styled_1.HorizontalSmWrapper, { children: [(0, jsx_runtime_1.jsx)(ImageContent, { image: image, title: title, imageInnerWidth: imageInnerWidth, imageInnerHeight: imageInnerHeight, imageHeight: imageHeight, imageWidth: imageWidth, hasImageBorder: hasImageBorder, hasImageRounded: hasImageRounded, imageComponent: imageComponent }), (0, jsx_runtime_1.jsxs)(ProductCardHorizontalSm_styled_1.TextWrapper, __assign({ "$period": period }, { children: [(0, jsx_runtime_1.jsx)(ProductCardHorizontalSm_styled_1.Title, __assign({ "$hasTitleWrap": hasTitleWrap }, { children: title })), infoPosition === "left" && ((0, jsx_runtime_1.jsxs)(ProductCardHorizontalSm_styled_1.PriceContent, __assign({ "$infoPosition": infoPosition }, { children: [(0, jsx_runtime_1.jsxs)(ProductCardHorizontalSm_styled_1.Price, { children: [price, priceSm && (0, jsx_runtime_1.jsx)("small", { children: priceSm })] }), (0, jsx_runtime_1.jsx)(ProductCardHorizontalSm_styled_1.Period, __assign({ "$infoPosition": infoPosition }, { children: period }))] })))] })), (0, jsx_runtime_1.jsxs)(ProductCardHorizontalSm_styled_1.RightContentWrapper, __assign({ "$hasButtonRemoveMdDown": hasButtonRemoveMdDown }, { children: [infoPosition === "right" && ((0, jsx_runtime_1.jsxs)(ProductCardHorizontalSm_styled_1.PriceContent, __assign({ "$infoPosition": infoPosition }, { children: [(0, jsx_runtime_1.jsx)(ProductCardHorizontalSm_styled_1.Period, __assign({ "$infoPosition": infoPosition }, { children: period })), (0, jsx_runtime_1.jsxs)(ProductCardHorizontalSm_styled_1.Price, { children: [price, priceSm && (0, jsx_runtime_1.jsx)("small", { children: priceSm })] })] }))), hasButton && ((0, jsx_runtime_1.jsx)(Button_1.default, __assign({ disabled: isDisabled, variant: buttonVariant, size: "xsmall" }, { children: buttonText }))), hasTooltip && ((0, jsx_runtime_1.jsx)(Tooltip_1.default, __assign({ selectorTitle: tooltipSelectorTitle, popupWidth: "238px", position: "topRight", popupSize: "medium" }, { children: tooltipDescription })))] }))] }) }))] })));
|
|
44
55
|
};
|
|
45
56
|
exports.default = (0, react_1.memo)(ProductCardHorizontalSm);
|
|
@@ -61,7 +61,7 @@ var Loader_1 = __importDefault(require("../Loader"));
|
|
|
61
61
|
var Checkbox_1 = __importDefault(require("../Checkbox"));
|
|
62
62
|
var SelectBox = (0, react_1.forwardRef)(function (_a, ref) {
|
|
63
63
|
var _b, _c, _d, _e;
|
|
64
|
-
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.name, name = _k === void 0 ? props_1.SelectBoxDefault.name : _k, _l = _a.placeholder, placeholder = _l === void 0 ? props_1.SelectBoxDefault.placeholder : _l, _m = _a.instanceId, instanceId = _m === void 0 ? props_1.SelectBoxDefault.instanceId : _m, _o = _a.options, options = _o === void 0 ? props_1.SelectBoxDefault.options : _o, _p = _a.lightBg, lightBg = _p === void 0 ? props_1.SelectBoxDefault.lightBg : _p, _q = _a.onChange, onChange = _q === void 0 ? props_1.SelectBoxDefault.onChange : _q, _r = _a.filterOption, filterOption = _r === void 0 ? props_1.SelectBoxDefault.filterOption : _r, _s = _a.hasError, hasError = _s === void 0 ? props_1.SelectBoxDefault.hasError : _s, _t = _a.errorMessage, errorMessage = _t === void 0 ? props_1.SelectBoxDefault.errorMessage : _t, _u = _a.maxOptionListHeight, maxOptionListHeight = _u === void 0 ? props_1.SelectBoxDefault.maxOptionListHeight : _u, _v = _a.isAsync, isAsync = _v === void 0 ? props_1.SelectBoxDefault.isAsync : _v, _w = _a.hasShowDropdownIcon, hasShowDropdownIcon = _w === void 0 ? props_1.SelectBoxDefault.hasShowDropdownIcon : _w, _x = _a.hasShowSearchIcon, hasShowSearchIcon = _x === void 0 ? props_1.SelectBoxDefault.hasShowSearchIcon : _x, _y = _a.autoComplete, autoComplete = _y === void 0 ? props_1.SelectBoxDefault.autoComplete : _y, _z = _a.menuPlacement, menuPlacement = _z === void 0 ? props_1.SelectBoxDefault.menuPlacement : _z, _0 = _a.id, id = _0 === void 0 ? props_1.SelectBoxDefault.id : _0, _1 = _a.isClearable, isClearable = _1 === void 0 ? props_1.SelectBoxDefault.isClearable : _1, _2 = _a.size, size = _2 === void 0 ? props_1.SelectBoxDefault.size : _2, _3 = _a.isMulti, isMulti = _3 === void 0 ? props_1.SelectBoxDefault.isMulti : _3, _4 = _a.menuPosition, menuPosition = _4 === void 0 ? props_1.SelectBoxDefault.menuPosition : _4, defaultValue = _a.defaultValue, other = __rest(_a, ["isSearchable", "menuIsOpen", "label", "width", "name", "placeholder", "instanceId", "options", "lightBg", "onChange", "filterOption", "hasError", "errorMessage", "maxOptionListHeight", "isAsync", "hasShowDropdownIcon", "hasShowSearchIcon", "autoComplete", "menuPlacement", "id", "isClearable", "size", "isMulti", "menuPosition", "defaultValue"]);
|
|
64
|
+
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.name, name = _k === void 0 ? props_1.SelectBoxDefault.name : _k, _l = _a.placeholder, placeholder = _l === void 0 ? props_1.SelectBoxDefault.placeholder : _l, _m = _a.instanceId, instanceId = _m === void 0 ? props_1.SelectBoxDefault.instanceId : _m, _o = _a.options, options = _o === void 0 ? props_1.SelectBoxDefault.options : _o, _p = _a.lightBg, lightBg = _p === void 0 ? props_1.SelectBoxDefault.lightBg : _p, _q = _a.onChange, onChange = _q === void 0 ? props_1.SelectBoxDefault.onChange : _q, _r = _a.filterOption, filterOption = _r === void 0 ? props_1.SelectBoxDefault.filterOption : _r, _s = _a.hasError, hasError = _s === void 0 ? props_1.SelectBoxDefault.hasError : _s, _t = _a.errorMessage, errorMessage = _t === void 0 ? props_1.SelectBoxDefault.errorMessage : _t, _u = _a.maxOptionListHeight, maxOptionListHeight = _u === void 0 ? props_1.SelectBoxDefault.maxOptionListHeight : _u, _v = _a.isAsync, isAsync = _v === void 0 ? props_1.SelectBoxDefault.isAsync : _v, _w = _a.hasShowDropdownIcon, hasShowDropdownIcon = _w === void 0 ? props_1.SelectBoxDefault.hasShowDropdownIcon : _w, _x = _a.hasShowSearchIcon, hasShowSearchIcon = _x === void 0 ? props_1.SelectBoxDefault.hasShowSearchIcon : _x, _y = _a.autoComplete, autoComplete = _y === void 0 ? props_1.SelectBoxDefault.autoComplete : _y, _z = _a.menuPlacement, menuPlacement = _z === void 0 ? props_1.SelectBoxDefault.menuPlacement : _z, _0 = _a.id, id = _0 === void 0 ? props_1.SelectBoxDefault.id : _0, _1 = _a.isClearable, isClearable = _1 === void 0 ? props_1.SelectBoxDefault.isClearable : _1, _2 = _a.size, size = _2 === void 0 ? props_1.SelectBoxDefault.size : _2, _3 = _a.isMulti, isMulti = _3 === void 0 ? props_1.SelectBoxDefault.isMulti : _3, _4 = _a.menuPosition, menuPosition = _4 === void 0 ? props_1.SelectBoxDefault.menuPosition : _4, _5 = _a.hasSelectAll, hasSelectAll = _5 === void 0 ? props_1.SelectBoxDefault.hasSelectAll : _5, _6 = _a.selectAllLabel, selectAllLabel = _6 === void 0 ? props_1.SelectBoxDefault.selectAllLabel : _6, defaultValue = _a.defaultValue, other = __rest(_a, ["isSearchable", "menuIsOpen", "label", "width", "name", "placeholder", "instanceId", "options", "lightBg", "onChange", "filterOption", "hasError", "errorMessage", "maxOptionListHeight", "isAsync", "hasShowDropdownIcon", "hasShowSearchIcon", "autoComplete", "menuPlacement", "id", "isClearable", "size", "isMulti", "menuPosition", "hasSelectAll", "selectAllLabel", "defaultValue"]);
|
|
65
65
|
var CustomOption = react_1.default.forwardRef(function (props, ref) {
|
|
66
66
|
var _a;
|
|
67
67
|
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`
|
|
@@ -90,8 +90,29 @@ var SelectBox = (0, react_1.forwardRef)(function (_a, ref) {
|
|
|
90
90
|
var DropdownIndicator = function (props) { return (0, jsx_runtime_1.jsx)("div", __assign({ className: "customSelect__indicator customSelect__dropdown-indicator" }, { children: size === "small" ? (0, jsx_runtime_1.jsx)(Icon_1.default, { color: "var(--dark)", name: "ArrowSmallDown" }) : (0, jsx_runtime_1.jsx)(Icon_1.default, { color: "var(--dark)", name: "ArrowDownBig" }) })); };
|
|
91
91
|
var LoadingIndicator = function (props) { return (0, jsx_runtime_1.jsx)("div", __assign({ className: "customSelect__indicator customSelect__loading-indicator css-o9ehiq-loadingIndicator", "aria-hidden": "true" }, { children: (0, jsx_runtime_1.jsx)(Loader_1.default, { width: "1rem", height: "1rem", variant: "primary" }) })); };
|
|
92
92
|
var MenuList = function (props) {
|
|
93
|
+
var selectProps = props.selectProps;
|
|
94
|
+
var currentValue = selectProps.value || [];
|
|
95
|
+
// For async select, get options from selectProps.options (loaded options)
|
|
96
|
+
// For regular select, use the options prop from parent scope
|
|
97
|
+
var availableOptions = selectProps.options || options || [];
|
|
98
|
+
var allOptions = availableOptions.filter(function (opt) { return !opt.isDisabled; }) || [];
|
|
99
|
+
var isAllSelected = allOptions.length > 0 && currentValue.length === allOptions.length;
|
|
100
|
+
var handleSelectAll = function (e) {
|
|
101
|
+
e.preventDefault();
|
|
102
|
+
e.stopPropagation();
|
|
103
|
+
if (selectProps.onChange) {
|
|
104
|
+
if (isAllSelected) {
|
|
105
|
+
// If all are selected, deselect all
|
|
106
|
+
selectProps.onChange([], { action: 'clear', removedValues: currentValue });
|
|
107
|
+
}
|
|
108
|
+
else {
|
|
109
|
+
// Select all non-disabled options
|
|
110
|
+
selectProps.onChange(allOptions, { action: 'select-option', option: allOptions[0] });
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
};
|
|
93
114
|
// Simple MenuList without SimpleBar to avoid hasOwnProperty errors
|
|
94
|
-
return ((0, jsx_runtime_1.
|
|
115
|
+
return ((0, jsx_runtime_1.jsxs)(react_select_1.components.MenuList, __assign({}, props, { children: [isMulti && hasSelectAll && allOptions.length > 0 && ((0, jsx_runtime_1.jsx)("div", __assign({ className: "customSelect__option option optionSm fixedTop", onClick: handleSelectAll }, { children: (0, jsx_runtime_1.jsxs)("div", __assign({ className: "option-container" }, { children: [(0, jsx_runtime_1.jsx)("div", __assign({ className: "checkbox-container" }, { children: (0, jsx_runtime_1.jsx)(Checkbox_1.default, { id: "select-all-checkbox", checked: isAllSelected, size: "small", onChange: function () { } }) })), (0, jsx_runtime_1.jsx)("div", __assign({ className: "option-content" }, { children: (0, jsx_runtime_1.jsx)("div", __assign({ className: "left" }, { children: (0, jsx_runtime_1.jsx)("strong", { children: selectAllLabel }) })) }))] })) }))), props.children] })));
|
|
95
116
|
};
|
|
96
117
|
// Custom components for multi-select appearance
|
|
97
118
|
var MultiValue = function (props) {
|
|
@@ -145,7 +166,7 @@ var SelectBox = (0, react_1.forwardRef)(function (_a, ref) {
|
|
|
145
166
|
return filterOption(normalizedOption, inputValue);
|
|
146
167
|
} : undefined;
|
|
147
168
|
// Remove filterOption from other to avoid duplicate props
|
|
148
|
-
var
|
|
169
|
+
var _7 = other, _ = _7.filterOption, restOther = __rest(_7, ["filterOption"]);
|
|
149
170
|
return ((0, jsx_runtime_1.jsxs)(SelectBox_styled_1.Container, __assign({ "$width": width, "$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: {
|
|
150
171
|
Option: CustomOption,
|
|
151
172
|
Input: Input,
|
|
@@ -14,7 +14,7 @@ var styled_components_1 = __importDefault(require("styled-components"));
|
|
|
14
14
|
var Icon_1 = __importDefault(require("../Icon/Icon"));
|
|
15
15
|
var svgToBase64_1 = __importDefault(require("./../../utils/svgToBase64"));
|
|
16
16
|
var devices_1 = require("../../constants/devices");
|
|
17
|
-
exports.Container = styled_components_1.default.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n /* Checkbox styling for multi-select options */\n .option-container {\n display: flex;\n align-items: center;\n width: 100%;\n }\n \n .checkbox-container {\n display: flex;\n align-items: center;\n }\n \n .custom-checkbox {\n width: 16px;\n height: 16px;\n border: 1px solid var(--dark-opacity-10);\n border-radius: 3px;\n display: flex;\n align-items: center;\n justify-content: center;\n background-color: white;\n }\n \n .custom-checkbox.checked {\n background-color: var(--primary);\n border-color: var(--primary);\n }\n \n .option-content {\n display: flex;\n align-items: center;\n justify-content: space-between;\n width: 100%;\n }\n display: flex;\n flex-direction: column;\n width: ", ";\n\n .top {\n display: flex;\n margin-bottom: 16px;\n font: var(--caption-bold-12-15);\n\n &.justify-between {\n justify-content: space-between;\n }\n\n label {\n margin: 0;\n color: var(--dark-opacity-50);\n display: block;\n }\n }\n\n [data-simplebar] {\n max-height: ", " !important;\n height: auto !important;\n padding: 0 !important;\n\n .simplebar-track.simplebar-vertical {\n width: 9px !important;\n }\n }\n\n .error {\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\n .select {\n position: relative;\n z-index: 2;\n .customSelect {\n &:is(.lightBg) {\n .customSelect__control {\n background-color: white;\n }\n }\n\n .customSelect__control {\n background-color: var(--dark-opacity-3);\n border: 0;\n padding: ", ";\n cursor: pointer;\n\n &:before {\n content: \"\";\n position: absolute;\n inset: 0;\n user-select: none;\n pointer-events: none;\n border-width: ", ";\n border-style: solid;\n border-radius: 0.5rem;\n border-color: ", ";\n }\n ", "\n /*&:hover {\n &:before{\n border-color: var(--primary);\n border-width: 2px;\n }\n }*/\n\n .customSelect__value-container {\n padding: 0;\n min-height: ", ";\n\n &:is(.customSelect__value-container--is-multi) {\n display: block;\n padding: 1rem 0;\n }\n\n .customSelect__multi-value {\n border: 1px solid var(--grey-10);\n border-radius: 0.25rem;\n background-color: var(--dark-opacity-3);\n margin: 0;\n justify-content: space-between;\n display: grid;\n grid-template-columns: 1fr auto;\n position: relative;\n z-index: 5;\n + .customSelect__multi-value {\n margin-top: 0.5rem;\n }\n\n .customSelect__multi-value__label {\n font: var(--body-semi-bold-13-16); \n white-space: nowrap;\n border-radius: 2px;\n color: hsl(0, 0%, 20%);\n padding: 3px 3px 3px 6px;\n box-sizing: border-box;\n display: grid;\n align-items: center;\n grid-template-columns: auto auto;\n justify-content: flex-start;\n span{\n overflow: hidden;\n text-overflow: ellipsis;\n &:nth-child(2){\n margin-left: 0.25rem;\n }\n }\n }\n\n .customSelect__multi-value__remove {\n background-color: transparent !important;\n color: var(--dark) !important;\n -webkit-align-items: center;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n display: -webkit-box;\n display: -webkit-flex;\n display: -ms-flexbox;\n display: flex;\n border-radius: 2px;\n padding-left: 4px;\n padding-right: 4px;\n box-sizing: border-box;\n svg{\n width: 1rem;\n height: 1rem;\n }\n }\n }\n\n .customSelect__placeholder {\n font: var(--body-semi-bold-14-17);\n color: ", ";\n margin: 0;\n line-height: 1.5rem;\n }\n\n .customSelect__single-value {\n margin: 0;\n padding: 0;\n font: var(--body-semi-bold-14-17);\n color: ", ";\n }\n\n .customSelect__input-container {\n margin: 0;\n padding: 0;\n position: absolute;\n bottom: 0;\n top: 0;\n margin-top: 0;\n width: 100% !important;\n display: block !important;\n &:after {\n display: none;\n }\n\n input {\n font: var(--body-semi-bold-14-17) !important;\n width: 100% !important;\n display: block !important;\n height: 100% !important;\n }\n }\n }\n .customSelect__value-container--has-value{\n .customSelect__input-container {\n margin-top: ", " !important;\n //position: static !important;\n }\n }\n .customSelect__indicators{\n height: ", ";\n }\n .customSelect__indicator {\n padding: 0;\n //margin: 0 0 0 0.5rem;\n width: 1.5rem;\n height: 1.5rem;\n transition: all .2s ease;\n align-items: center;\n justify-content: center;\n &:is(.customSelect__dropdown-indicator) {\n ", ";\n }\n\n &:is(.customSelect__clear-indicator) {\n width: 1.5rem;\n height: 1.5rem;\n display: block !important;\n background-image: url('", "');\n background-repeat: no-repeat;\n background-position: center center;\n svg {\n display: none;\n }\n\n ~ .customSelect__dropdown-indicator {\n display: none;\n }\n }\n\n div {\n display: block;\n }\n }\n\n .customSelect__indicator-separator {\n display: none;\n }\n .customSelect__loading-indicator{\n width: 1.5rem;\n span{\n display: none;\n }\n ~ *{\n display: none !important;\n ~ *{\n display: none !important;\n }\n }\n }\n }\n\n &:is(.isSearchable) {\n .customSelect__value-container {\n background-image: url('data:image/svg+xml;charset=utf-8,%3C%3Fxml%20version%3D%221.0%22%20standalone%3D%22no%22%3F%3E%0D%0A%3Csvg%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20width%3D%2216px%22%20height%3D%2216px%22%20viewBox%3D%220%200%2016%2016%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20name%3D%22Search%22%3E%3Cg%20id%3D%22Search%22%3E%3Ccircle%20id%3D%22Ellipse_739%22%20cx%3D%227.33203%22%20cy%3D%227.33398%22%20r%3D%226%22%20stroke%3D%22%23", "%22%20stroke-width%3D%222%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3C%2Fcircle%3E%3Cpath%20id%3D%22Line_181%22%20d%3D%22M12%2012L14.6667%2014.6667%22%20stroke%3D%22%23", "%22%20stroke-width%3D%222%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3C%2Fpath%3E%3C%2Fg%3E%3C%2Fsvg%3E');\n background-repeat: no-repeat;\n background-position: 0 center;\n padding: 11px 24px 11px 2rem;\n\n &.customSelect__value-container--has-value {\n background-image: ", ";\n }\n }\n }\n .customSelect__control--is-focused {\n border-color: var(--primary);\n box-shadow: none;\n .customSelect__input-container {\n margin-top: 0 !important;\n }\n .customSelect__value-container--has-value{\n .customSelect__input-container {\n margin-top: ", ";\n position: static;\n\n input {\n\n }\n }\n }\n }\n\n .customSelect__menu-notice {\n text-align: start;\n padding: 1rem 1.5rem;\n font: var(--body-medium-14-17);\n color: var(--dark-opacity-50);\n }\n\n .customSelect__menu {\n margin: 0;\n border-radius: 0 0 0.5rem 0.5rem;\n box-shadow: none;\n border: 1px solid var(--dark-opacity-10);\n overflow: hidden;\n position: ", ";\n .customSelect__menu-list {\n padding: 0;\n max-height: ", ";\n //max-height: initial !important;\n //scroll-margin: 0 10px 30px 0;\n //scrollbar-color: var(--dark-opacity-10) var(--dark-opacity-10);\n //scrollbar-width: thin;\n\n &::-webkit-scrollbar {\n width: 4px;\n background-color: #ffffff;\n }\n\n &::-webkit-scrollbar-track {\n border-radius: 10px;\n background: white;\n }\n\n &::-webkit-scrollbar-thumb {\n border-radius: 10px;\n background: var(--dark-opacity-10);\n }\n\n .option {\n height: 70px;\n padding: 0 1.5rem;\n display: flex;\n align-items: center;\n justify-content: space-between;\n background-color: #fff;\n position: relative;\n color: var(--dark);\n cursor: pointer;\n box-sizing: border-box;\n\n &:hover, &:is(.customSelect__option--is-selected) {\n background-color: var(--dark-opacity-3) !important;\n\n @media only screen and ", " {\n //background-color: transparent !important;\n }\n }\n\n &:is(.customSelect__option--is-focused) {\n background-color: transparent;\n }\n\n &:active {\n background-color: var(--dark-opacity-3);\n\n @media only screen and ", " {\n background-color: transparent !important;\n }\n }\n\n &:is(.optionSm) {\n height: auto;\n min-height: 51px;\n padding: 1rem 1.5rem;\n }\n\n &:is(.fixedBottom) {\n position: sticky;\n bottom: 0;\n left: 0;\n right: 0;\n z-index: 4;\n\n strong {\n color: var(--dark-opacity-50);\n }\n }\n\n > div {\n display: flex;\n align-items: center;\n justify-content: space-between;\n width: 100%;\n\n .left {\n strong {\n display: block;\n font: var(--title-bold-16-19);\n }\n\n span {\n display: block;\n font: var(--body-medium-13-16);\n }\n }\n\n .right {\n display: flex;\n align-items: end;\n justify-content: flex-end;\n\n strong {\n display: block;\n font: var(--title-extra-bold-16-19);\n line-height: 17px;\n\n small {\n font: var(--body-extra-bold-14-17);\n }\n }\n\n span {\n display: block;\n font: var(--body-regular-13-16);\n margin-left: 0.2rem;\n }\n }\n }\n\n }\n }\n }\n\n &:is(.isSearchable) {\n .customSelect__control--menu-is-open {\n .customSelect__value-container {\n background-image: url('", "') !important;\n }\n }\n }\n\n .customSelect__control--menu-is-open {\n &:before {\n border-color: var(--primary);\n border-width: 2px;\n border-bottom-left-radius: 0;\n border-bottom-right-radius: 0;\n }\n\n box-shadow: none;\n\n .customSelect__indicator {\n &:is(.customSelect__dropdown-indicator) {\n transform: rotate(180deg);\n }\n }\n\n .customSelect__value-container {\n .customSelect__placeholder {\n color: var(--dark-opacity-50);\n }\n }\n\n\n .customSelect__clear-indicator {\n display: none !important;\n }\n\n\n .customSelect__single-value {\n color: var(--dark) !important;\n }\n }\n }\n }\n\n .placement-top {\n .customSelect__menu {\n border-radius: 0.5rem 0.5rem 0 0 !important;\n top: auto !important;\n bottom: 100% !important;\n }\n\n .customSelect__control--menu-is-open {\n &:before {\n border-radius: 0 0 0.5rem 0.5rem !important;\n }\n }\n }\n"], ["\n /* Checkbox styling for multi-select options */\n .option-container {\n display: flex;\n align-items: center;\n width: 100%;\n }\n \n .checkbox-container {\n display: flex;\n align-items: center;\n }\n \n .custom-checkbox {\n width: 16px;\n height: 16px;\n border: 1px solid var(--dark-opacity-10);\n border-radius: 3px;\n display: flex;\n align-items: center;\n justify-content: center;\n background-color: white;\n }\n \n .custom-checkbox.checked {\n background-color: var(--primary);\n border-color: var(--primary);\n }\n \n .option-content {\n display: flex;\n align-items: center;\n justify-content: space-between;\n width: 100%;\n }\n display: flex;\n flex-direction: column;\n width: ", ";\n\n .top {\n display: flex;\n margin-bottom: 16px;\n font: var(--caption-bold-12-15);\n\n &.justify-between {\n justify-content: space-between;\n }\n\n label {\n margin: 0;\n color: var(--dark-opacity-50);\n display: block;\n }\n }\n\n [data-simplebar] {\n max-height: ", " !important;\n height: auto !important;\n padding: 0 !important;\n\n .simplebar-track.simplebar-vertical {\n width: 9px !important;\n }\n }\n\n .error {\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\n .select {\n position: relative;\n z-index: 2;\n .customSelect {\n &:is(.lightBg) {\n .customSelect__control {\n background-color: white;\n }\n }\n\n .customSelect__control {\n background-color: var(--dark-opacity-3);\n border: 0;\n padding: ", ";\n cursor: pointer;\n\n &:before {\n content: \"\";\n position: absolute;\n inset: 0;\n user-select: none;\n pointer-events: none;\n border-width: ", ";\n border-style: solid;\n border-radius: 0.5rem;\n border-color: ", ";\n }\n ", "\n /*&:hover {\n &:before{\n border-color: var(--primary);\n border-width: 2px;\n }\n }*/\n\n .customSelect__value-container {\n padding: 0;\n min-height: ", ";\n\n &:is(.customSelect__value-container--is-multi) {\n display: block;\n padding: 1rem 0;\n }\n\n .customSelect__multi-value {\n border: 1px solid var(--grey-10);\n border-radius: 0.25rem;\n background-color: var(--dark-opacity-3);\n margin: 0;\n justify-content: space-between;\n display: grid;\n grid-template-columns: 1fr auto;\n position: relative;\n z-index: 5;\n + .customSelect__multi-value {\n margin-top: 0.5rem;\n }\n\n .customSelect__multi-value__label {\n font: var(--body-semi-bold-13-16); \n white-space: nowrap;\n border-radius: 2px;\n color: hsl(0, 0%, 20%);\n padding: 3px 3px 3px 6px;\n box-sizing: border-box;\n display: grid;\n align-items: center;\n grid-template-columns: auto auto;\n justify-content: flex-start;\n span{\n overflow: hidden;\n text-overflow: ellipsis;\n &:nth-child(2){\n margin-left: 0.25rem;\n }\n }\n }\n\n .customSelect__multi-value__remove {\n background-color: transparent !important;\n color: var(--dark) !important;\n -webkit-align-items: center;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n display: -webkit-box;\n display: -webkit-flex;\n display: -ms-flexbox;\n display: flex;\n border-radius: 2px;\n padding-left: 4px;\n padding-right: 4px;\n box-sizing: border-box;\n svg{\n width: 1rem;\n height: 1rem;\n }\n }\n }\n\n .customSelect__placeholder {\n font: var(--body-semi-bold-14-17);\n color: ", ";\n margin: 0;\n line-height: 1.5rem;\n }\n\n .customSelect__single-value {\n margin: 0;\n padding: 0;\n font: var(--body-semi-bold-14-17);\n color: ", ";\n }\n\n .customSelect__input-container {\n margin: 0;\n padding: 0;\n position: absolute;\n bottom: 0;\n top: 0;\n margin-top: 0;\n width: 100% !important;\n display: block !important;\n &:after {\n display: none;\n }\n\n input {\n font: var(--body-semi-bold-14-17) !important;\n width: 100% !important;\n display: block !important;\n height: 100% !important;\n }\n }\n }\n .customSelect__value-container--has-value{\n .customSelect__input-container {\n margin-top: ", " !important;\n //position: static !important;\n }\n }\n .customSelect__indicators{\n height: ", ";\n }\n .customSelect__indicator {\n padding: 0;\n //margin: 0 0 0 0.5rem;\n width: 1.5rem;\n height: 1.5rem;\n transition: all .2s ease;\n align-items: center;\n justify-content: center;\n &:is(.customSelect__dropdown-indicator) {\n ", ";\n }\n\n &:is(.customSelect__clear-indicator) {\n width: 1.5rem;\n height: 1.5rem;\n display: block !important;\n background-image: url('", "');\n background-repeat: no-repeat;\n background-position: center center;\n svg {\n display: none;\n }\n\n ~ .customSelect__dropdown-indicator {\n display: none;\n }\n }\n\n div {\n display: block;\n }\n }\n\n .customSelect__indicator-separator {\n display: none;\n }\n .customSelect__loading-indicator{\n width: 1.5rem;\n span{\n display: none;\n }\n ~ *{\n display: none !important;\n ~ *{\n display: none !important;\n }\n }\n }\n }\n\n &:is(.isSearchable) {\n .customSelect__value-container {\n background-image: url('data:image/svg+xml;charset=utf-8,%3C%3Fxml%20version%3D%221.0%22%20standalone%3D%22no%22%3F%3E%0D%0A%3Csvg%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20width%3D%2216px%22%20height%3D%2216px%22%20viewBox%3D%220%200%2016%2016%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20name%3D%22Search%22%3E%3Cg%20id%3D%22Search%22%3E%3Ccircle%20id%3D%22Ellipse_739%22%20cx%3D%227.33203%22%20cy%3D%227.33398%22%20r%3D%226%22%20stroke%3D%22%23", "%22%20stroke-width%3D%222%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3C%2Fcircle%3E%3Cpath%20id%3D%22Line_181%22%20d%3D%22M12%2012L14.6667%2014.6667%22%20stroke%3D%22%23", "%22%20stroke-width%3D%222%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3C%2Fpath%3E%3C%2Fg%3E%3C%2Fsvg%3E');\n background-repeat: no-repeat;\n background-position: 0 center;\n padding: 11px 24px 11px 2rem;\n\n &.customSelect__value-container--has-value {\n background-image: ", ";\n }\n }\n }\n .customSelect__control--is-focused {\n border-color: var(--primary);\n box-shadow: none;\n .customSelect__input-container {\n margin-top: 0 !important;\n }\n .customSelect__value-container--has-value{\n .customSelect__input-container {\n margin-top: ", ";\n position: static;\n\n input {\n\n }\n }\n }\n }\n\n .customSelect__menu-notice {\n text-align: start;\n padding: 1rem 1.5rem;\n font: var(--body-medium-14-17);\n color: var(--dark-opacity-50);\n }\n\n .customSelect__menu {\n margin: 0;\n border-radius: 0 0 0.5rem 0.5rem;\n box-shadow: none;\n border: 1px solid var(--dark-opacity-10);\n overflow: hidden;\n position: ", ";\n .customSelect__menu-list {\n padding: 0;\n max-height: ", ";\n //max-height: initial !important;\n //scroll-margin: 0 10px 30px 0;\n //scrollbar-color: var(--dark-opacity-10) var(--dark-opacity-10);\n //scrollbar-width: thin;\n\n &::-webkit-scrollbar {\n width: 4px;\n background-color: #ffffff;\n }\n\n &::-webkit-scrollbar-track {\n border-radius: 10px;\n background: white;\n }\n\n &::-webkit-scrollbar-thumb {\n border-radius: 10px;\n background: var(--dark-opacity-10);\n }\n\n .option {\n height: 70px;\n padding: 0 1.5rem;\n display: flex;\n align-items: center;\n justify-content: space-between;\n background-color: #fff;\n position: relative;\n color: var(--dark);\n cursor: pointer;\n box-sizing: border-box;\n\n &:hover, &:is(.customSelect__option--is-selected) {\n background-color: var(--dark-opacity-3) !important;\n\n @media only screen and ", " {\n //background-color: transparent !important;\n }\n }\n\n &:is(.customSelect__option--is-focused) {\n background-color: transparent;\n }\n\n &:active {\n background-color: var(--dark-opacity-3);\n\n @media only screen and ", " {\n background-color: transparent !important;\n }\n }\n\n &:is(.optionSm) {\n height: auto;\n min-height: 51px;\n padding: 1rem 1.5rem;\n }\n\n &:is(.fixedBottom) {\n position: sticky;\n bottom: 0;\n left: 0;\n right: 0;\n z-index: 4;\n\n strong {\n color: var(--dark-opacity-50);\n }\n }\n\n > div {\n display: flex;\n align-items: center;\n justify-content: space-between;\n width: 100%;\n\n .left {\n strong {\n display: block;\n font: var(--title-bold-16-19);\n }\n\n span {\n display: block;\n font: var(--body-medium-13-16);\n }\n }\n\n .right {\n display: flex;\n align-items: end;\n justify-content: flex-end;\n\n strong {\n display: block;\n font: var(--title-extra-bold-16-19);\n line-height: 17px;\n\n small {\n font: var(--body-extra-bold-14-17);\n }\n }\n\n span {\n display: block;\n font: var(--body-regular-13-16);\n margin-left: 0.2rem;\n }\n }\n }\n\n }\n }\n }\n\n &:is(.isSearchable) {\n .customSelect__control--menu-is-open {\n .customSelect__value-container {\n background-image: url('", "') !important;\n }\n }\n }\n\n .customSelect__control--menu-is-open {\n &:before {\n border-color: var(--primary);\n border-width: 2px;\n border-bottom-left-radius: 0;\n border-bottom-right-radius: 0;\n }\n\n box-shadow: none;\n\n .customSelect__indicator {\n &:is(.customSelect__dropdown-indicator) {\n transform: rotate(180deg);\n }\n }\n\n .customSelect__value-container {\n .customSelect__placeholder {\n color: var(--dark-opacity-50);\n }\n }\n\n\n .customSelect__clear-indicator {\n display: none !important;\n }\n\n\n .customSelect__single-value {\n color: var(--dark) !important;\n }\n }\n }\n }\n\n .placement-top {\n .customSelect__menu {\n border-radius: 0.5rem 0.5rem 0 0 !important;\n top: auto !important;\n bottom: 100% !important;\n }\n\n .customSelect__control--menu-is-open {\n &:before {\n border-radius: 0 0 0.5rem 0.5rem !important;\n }\n }\n }\n"])), function (props) { return props.$width || '370px'; }, function (props) { return props.$maxOptionListHeight && props.$maxOptionListHeight; }, function (props) { return props.$hasShowDropdownIcon ? "0 1rem 0 1.5rem" : "0 1.5rem"; }, function (props) { return props.$hasError ? "2px" : "1px"; }, function (props) { return props.$hasError ? "var(--red)" : "var(--dark-opacity-10)"; }, function (props) { return props.$isMulti ? "\n &:is(.customSelect__control--menu-is-open){\n background-color: white !important;\n }\n " : ""; }, function (props) {
|
|
17
|
+
exports.Container = styled_components_1.default.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n /* Checkbox styling for multi-select options */\n .option-container {\n display: flex;\n align-items: center;\n width: 100%;\n }\n \n .checkbox-container {\n display: flex;\n align-items: center;\n }\n \n .custom-checkbox {\n width: 16px;\n height: 16px;\n border: 1px solid var(--dark-opacity-10);\n border-radius: 3px;\n display: flex;\n align-items: center;\n justify-content: center;\n background-color: white;\n }\n \n .custom-checkbox.checked {\n background-color: var(--primary);\n border-color: var(--primary);\n }\n \n .option-content {\n display: flex;\n align-items: center;\n justify-content: space-between;\n width: 100%;\n }\n display: flex;\n flex-direction: column;\n width: ", ";\n\n .top {\n display: flex;\n margin-bottom: 16px;\n font: var(--caption-bold-12-15);\n\n &.justify-between {\n justify-content: space-between;\n }\n\n label {\n margin: 0;\n color: var(--dark-opacity-50);\n display: block;\n }\n }\n\n [data-simplebar] {\n max-height: ", " !important;\n height: auto !important;\n padding: 0 !important;\n\n .simplebar-track.simplebar-vertical {\n width: 9px !important;\n }\n }\n\n .error {\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\n .select {\n position: relative;\n z-index: 2;\n .customSelect {\n &:is(.lightBg) {\n .customSelect__control {\n background-color: white;\n }\n }\n\n .customSelect__control {\n background-color: var(--dark-opacity-3);\n border: 0;\n padding: ", ";\n cursor: pointer;\n\n &:before {\n content: \"\";\n position: absolute;\n inset: 0;\n user-select: none;\n pointer-events: none;\n border-width: ", ";\n border-style: solid;\n border-radius: 0.5rem;\n border-color: ", ";\n }\n ", "\n /*&:hover {\n &:before{\n border-color: var(--primary);\n border-width: 2px;\n }\n }*/\n\n .customSelect__value-container {\n padding: 0;\n min-height: ", ";\n\n &:is(.customSelect__value-container--is-multi) {\n display: block;\n padding: 1rem 0;\n }\n\n .customSelect__multi-value {\n border: 1px solid var(--grey-10);\n border-radius: 0.25rem;\n background-color: var(--dark-opacity-3);\n margin: 0;\n justify-content: space-between;\n display: grid;\n grid-template-columns: 1fr auto;\n position: relative;\n z-index: 5;\n + .customSelect__multi-value {\n margin-top: 0.5rem;\n }\n\n .customSelect__multi-value__label {\n font: var(--body-semi-bold-13-16); \n white-space: nowrap;\n border-radius: 2px;\n color: hsl(0, 0%, 20%);\n padding: 3px 3px 3px 6px;\n box-sizing: border-box;\n display: grid;\n align-items: center;\n grid-template-columns: auto auto;\n justify-content: flex-start;\n span{\n overflow: hidden;\n text-overflow: ellipsis;\n &:nth-child(2){\n margin-left: 0.25rem;\n }\n }\n }\n\n .customSelect__multi-value__remove {\n background-color: transparent !important;\n color: var(--dark) !important;\n -webkit-align-items: center;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n display: -webkit-box;\n display: -webkit-flex;\n display: -ms-flexbox;\n display: flex;\n border-radius: 2px;\n padding-left: 4px;\n padding-right: 4px;\n box-sizing: border-box;\n svg{\n width: 1rem;\n height: 1rem;\n }\n }\n }\n\n .customSelect__placeholder {\n font: var(--body-semi-bold-14-17);\n color: ", ";\n margin: 0;\n line-height: 1.5rem;\n }\n\n .customSelect__single-value {\n margin: 0;\n padding: 0;\n font: var(--body-semi-bold-14-17);\n color: ", ";\n }\n\n .customSelect__input-container {\n margin: 0;\n padding: 0;\n position: absolute;\n bottom: 0;\n top: 0;\n margin-top: 0;\n width: 100% !important;\n display: block !important;\n &:after {\n display: none;\n }\n\n input {\n font: var(--body-semi-bold-14-17) !important;\n width: 100% !important;\n display: block !important;\n height: 100% !important;\n }\n }\n }\n .customSelect__value-container--has-value{\n .customSelect__input-container {\n margin-top: ", " !important;\n //position: static !important;\n }\n }\n .customSelect__indicators{\n height: ", ";\n }\n .customSelect__indicator {\n padding: 0;\n //margin: 0 0 0 0.5rem;\n width: 1.5rem;\n height: 1.5rem;\n transition: all .2s ease;\n align-items: center;\n justify-content: center;\n &:is(.customSelect__dropdown-indicator) {\n ", ";\n }\n\n &:is(.customSelect__clear-indicator) {\n width: 1.5rem;\n height: 1.5rem;\n display: block !important;\n background-image: url('", "');\n background-repeat: no-repeat;\n background-position: center center;\n svg {\n display: none;\n }\n\n ~ .customSelect__dropdown-indicator {\n display: none;\n }\n }\n\n div {\n display: block;\n }\n }\n\n .customSelect__indicator-separator {\n display: none;\n }\n .customSelect__loading-indicator{\n width: 1.5rem;\n span{\n display: none;\n }\n ~ *{\n display: none !important;\n ~ *{\n display: none !important;\n }\n }\n }\n }\n\n &:is(.isSearchable) {\n .customSelect__value-container {\n background-image: url('data:image/svg+xml;charset=utf-8,%3C%3Fxml%20version%3D%221.0%22%20standalone%3D%22no%22%3F%3E%0D%0A%3Csvg%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20width%3D%2216px%22%20height%3D%2216px%22%20viewBox%3D%220%200%2016%2016%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20name%3D%22Search%22%3E%3Cg%20id%3D%22Search%22%3E%3Ccircle%20id%3D%22Ellipse_739%22%20cx%3D%227.33203%22%20cy%3D%227.33398%22%20r%3D%226%22%20stroke%3D%22%23", "%22%20stroke-width%3D%222%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3C%2Fcircle%3E%3Cpath%20id%3D%22Line_181%22%20d%3D%22M12%2012L14.6667%2014.6667%22%20stroke%3D%22%23", "%22%20stroke-width%3D%222%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3C%2Fpath%3E%3C%2Fg%3E%3C%2Fsvg%3E');\n background-repeat: no-repeat;\n background-position: 0 center;\n padding: 11px 24px 11px 2rem;\n\n &.customSelect__value-container--has-value {\n background-image: ", ";\n }\n }\n }\n .customSelect__control--is-focused {\n border-color: var(--primary);\n box-shadow: none;\n .customSelect__input-container {\n margin-top: 0 !important;\n }\n .customSelect__value-container--has-value{\n .customSelect__input-container {\n margin-top: ", ";\n position: static;\n\n input {\n\n }\n }\n }\n }\n\n .customSelect__menu-notice {\n text-align: start;\n padding: 1rem 1.5rem;\n font: var(--body-medium-14-17);\n color: var(--dark-opacity-50);\n }\n\n .customSelect__menu {\n margin: 0;\n border-radius: 0 0 0.5rem 0.5rem;\n box-shadow: none;\n border: 1px solid var(--dark-opacity-10);\n overflow: hidden;\n position: ", ";\n .customSelect__menu-list {\n padding: 0;\n max-height: ", ";\n //max-height: initial !important;\n //scroll-margin: 0 10px 30px 0;\n //scrollbar-color: var(--dark-opacity-10) var(--dark-opacity-10);\n //scrollbar-width: thin;\n\n &::-webkit-scrollbar {\n width: 4px;\n background-color: #ffffff;\n }\n\n &::-webkit-scrollbar-track {\n border-radius: 10px;\n background: white;\n }\n\n &::-webkit-scrollbar-thumb {\n border-radius: 10px;\n background: var(--dark-opacity-10);\n }\n\n .option {\n height: 70px;\n padding: 0 1.5rem;\n display: flex;\n align-items: center;\n justify-content: space-between;\n background-color: #fff;\n position: relative;\n color: var(--dark);\n cursor: pointer;\n box-sizing: border-box;\n\n &:hover, &:is(.customSelect__option--is-selected) {\n background-color: var(--dark-opacity-3) !important;\n\n @media only screen and ", " {\n //background-color: transparent !important;\n }\n }\n\n &:is(.customSelect__option--is-focused) {\n background-color: transparent;\n }\n\n &:active {\n background-color: var(--dark-opacity-3);\n\n @media only screen and ", " {\n background-color: transparent !important;\n }\n }\n\n &:is(.optionSm) {\n height: auto;\n min-height: 51px;\n padding: 1rem 1.5rem;\n }\n\n &:is(.fixedBottom) {\n position: sticky;\n bottom: 0;\n left: 0;\n right: 0;\n z-index: 4;\n\n strong {\n color: var(--dark-opacity-50);\n }\n }\n\n &:is(.fixedTop) {\n position: sticky;\n top: 0;\n left: 0;\n right: 0;\n z-index: 4;\n background-color: #fff;\n border-bottom: 1px solid var(--dark-opacity-10);\n \n &:hover {\n background-color: var(--dark-opacity-3) !important;\n }\n }\n\n > div {\n display: flex;\n align-items: center;\n justify-content: space-between;\n width: 100%;\n\n .left {\n strong {\n display: block;\n font: var(--title-bold-16-19);\n }\n\n span {\n display: block;\n font: var(--body-medium-13-16);\n }\n }\n\n .right {\n display: flex;\n align-items: end;\n justify-content: flex-end;\n\n strong {\n display: block;\n font: var(--title-extra-bold-16-19);\n line-height: 17px;\n\n small {\n font: var(--body-extra-bold-14-17);\n }\n }\n\n span {\n display: block;\n font: var(--body-regular-13-16);\n margin-left: 0.2rem;\n }\n }\n }\n\n }\n }\n }\n\n &:is(.isSearchable) {\n .customSelect__control--menu-is-open {\n .customSelect__value-container {\n background-image: url('", "') !important;\n }\n }\n }\n\n .customSelect__control--menu-is-open {\n &:before {\n border-color: var(--primary);\n border-width: 2px;\n border-bottom-left-radius: 0;\n border-bottom-right-radius: 0;\n }\n\n box-shadow: none;\n\n .customSelect__indicator {\n &:is(.customSelect__dropdown-indicator) {\n transform: rotate(180deg);\n }\n }\n\n .customSelect__value-container {\n .customSelect__placeholder {\n color: var(--dark-opacity-50);\n }\n }\n\n\n .customSelect__clear-indicator {\n display: none !important;\n }\n\n\n .customSelect__single-value {\n color: var(--dark) !important;\n }\n }\n }\n }\n\n .placement-top {\n .customSelect__menu {\n border-radius: 0.5rem 0.5rem 0 0 !important;\n top: auto !important;\n bottom: 100% !important;\n }\n\n .customSelect__control--menu-is-open {\n &:before {\n border-radius: 0 0 0.5rem 0.5rem !important;\n }\n }\n }\n"], ["\n /* Checkbox styling for multi-select options */\n .option-container {\n display: flex;\n align-items: center;\n width: 100%;\n }\n \n .checkbox-container {\n display: flex;\n align-items: center;\n }\n \n .custom-checkbox {\n width: 16px;\n height: 16px;\n border: 1px solid var(--dark-opacity-10);\n border-radius: 3px;\n display: flex;\n align-items: center;\n justify-content: center;\n background-color: white;\n }\n \n .custom-checkbox.checked {\n background-color: var(--primary);\n border-color: var(--primary);\n }\n \n .option-content {\n display: flex;\n align-items: center;\n justify-content: space-between;\n width: 100%;\n }\n display: flex;\n flex-direction: column;\n width: ", ";\n\n .top {\n display: flex;\n margin-bottom: 16px;\n font: var(--caption-bold-12-15);\n\n &.justify-between {\n justify-content: space-between;\n }\n\n label {\n margin: 0;\n color: var(--dark-opacity-50);\n display: block;\n }\n }\n\n [data-simplebar] {\n max-height: ", " !important;\n height: auto !important;\n padding: 0 !important;\n\n .simplebar-track.simplebar-vertical {\n width: 9px !important;\n }\n }\n\n .error {\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\n .select {\n position: relative;\n z-index: 2;\n .customSelect {\n &:is(.lightBg) {\n .customSelect__control {\n background-color: white;\n }\n }\n\n .customSelect__control {\n background-color: var(--dark-opacity-3);\n border: 0;\n padding: ", ";\n cursor: pointer;\n\n &:before {\n content: \"\";\n position: absolute;\n inset: 0;\n user-select: none;\n pointer-events: none;\n border-width: ", ";\n border-style: solid;\n border-radius: 0.5rem;\n border-color: ", ";\n }\n ", "\n /*&:hover {\n &:before{\n border-color: var(--primary);\n border-width: 2px;\n }\n }*/\n\n .customSelect__value-container {\n padding: 0;\n min-height: ", ";\n\n &:is(.customSelect__value-container--is-multi) {\n display: block;\n padding: 1rem 0;\n }\n\n .customSelect__multi-value {\n border: 1px solid var(--grey-10);\n border-radius: 0.25rem;\n background-color: var(--dark-opacity-3);\n margin: 0;\n justify-content: space-between;\n display: grid;\n grid-template-columns: 1fr auto;\n position: relative;\n z-index: 5;\n + .customSelect__multi-value {\n margin-top: 0.5rem;\n }\n\n .customSelect__multi-value__label {\n font: var(--body-semi-bold-13-16); \n white-space: nowrap;\n border-radius: 2px;\n color: hsl(0, 0%, 20%);\n padding: 3px 3px 3px 6px;\n box-sizing: border-box;\n display: grid;\n align-items: center;\n grid-template-columns: auto auto;\n justify-content: flex-start;\n span{\n overflow: hidden;\n text-overflow: ellipsis;\n &:nth-child(2){\n margin-left: 0.25rem;\n }\n }\n }\n\n .customSelect__multi-value__remove {\n background-color: transparent !important;\n color: var(--dark) !important;\n -webkit-align-items: center;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n display: -webkit-box;\n display: -webkit-flex;\n display: -ms-flexbox;\n display: flex;\n border-radius: 2px;\n padding-left: 4px;\n padding-right: 4px;\n box-sizing: border-box;\n svg{\n width: 1rem;\n height: 1rem;\n }\n }\n }\n\n .customSelect__placeholder {\n font: var(--body-semi-bold-14-17);\n color: ", ";\n margin: 0;\n line-height: 1.5rem;\n }\n\n .customSelect__single-value {\n margin: 0;\n padding: 0;\n font: var(--body-semi-bold-14-17);\n color: ", ";\n }\n\n .customSelect__input-container {\n margin: 0;\n padding: 0;\n position: absolute;\n bottom: 0;\n top: 0;\n margin-top: 0;\n width: 100% !important;\n display: block !important;\n &:after {\n display: none;\n }\n\n input {\n font: var(--body-semi-bold-14-17) !important;\n width: 100% !important;\n display: block !important;\n height: 100% !important;\n }\n }\n }\n .customSelect__value-container--has-value{\n .customSelect__input-container {\n margin-top: ", " !important;\n //position: static !important;\n }\n }\n .customSelect__indicators{\n height: ", ";\n }\n .customSelect__indicator {\n padding: 0;\n //margin: 0 0 0 0.5rem;\n width: 1.5rem;\n height: 1.5rem;\n transition: all .2s ease;\n align-items: center;\n justify-content: center;\n &:is(.customSelect__dropdown-indicator) {\n ", ";\n }\n\n &:is(.customSelect__clear-indicator) {\n width: 1.5rem;\n height: 1.5rem;\n display: block !important;\n background-image: url('", "');\n background-repeat: no-repeat;\n background-position: center center;\n svg {\n display: none;\n }\n\n ~ .customSelect__dropdown-indicator {\n display: none;\n }\n }\n\n div {\n display: block;\n }\n }\n\n .customSelect__indicator-separator {\n display: none;\n }\n .customSelect__loading-indicator{\n width: 1.5rem;\n span{\n display: none;\n }\n ~ *{\n display: none !important;\n ~ *{\n display: none !important;\n }\n }\n }\n }\n\n &:is(.isSearchable) {\n .customSelect__value-container {\n background-image: url('data:image/svg+xml;charset=utf-8,%3C%3Fxml%20version%3D%221.0%22%20standalone%3D%22no%22%3F%3E%0D%0A%3Csvg%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20width%3D%2216px%22%20height%3D%2216px%22%20viewBox%3D%220%200%2016%2016%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20name%3D%22Search%22%3E%3Cg%20id%3D%22Search%22%3E%3Ccircle%20id%3D%22Ellipse_739%22%20cx%3D%227.33203%22%20cy%3D%227.33398%22%20r%3D%226%22%20stroke%3D%22%23", "%22%20stroke-width%3D%222%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3C%2Fcircle%3E%3Cpath%20id%3D%22Line_181%22%20d%3D%22M12%2012L14.6667%2014.6667%22%20stroke%3D%22%23", "%22%20stroke-width%3D%222%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3C%2Fpath%3E%3C%2Fg%3E%3C%2Fsvg%3E');\n background-repeat: no-repeat;\n background-position: 0 center;\n padding: 11px 24px 11px 2rem;\n\n &.customSelect__value-container--has-value {\n background-image: ", ";\n }\n }\n }\n .customSelect__control--is-focused {\n border-color: var(--primary);\n box-shadow: none;\n .customSelect__input-container {\n margin-top: 0 !important;\n }\n .customSelect__value-container--has-value{\n .customSelect__input-container {\n margin-top: ", ";\n position: static;\n\n input {\n\n }\n }\n }\n }\n\n .customSelect__menu-notice {\n text-align: start;\n padding: 1rem 1.5rem;\n font: var(--body-medium-14-17);\n color: var(--dark-opacity-50);\n }\n\n .customSelect__menu {\n margin: 0;\n border-radius: 0 0 0.5rem 0.5rem;\n box-shadow: none;\n border: 1px solid var(--dark-opacity-10);\n overflow: hidden;\n position: ", ";\n .customSelect__menu-list {\n padding: 0;\n max-height: ", ";\n //max-height: initial !important;\n //scroll-margin: 0 10px 30px 0;\n //scrollbar-color: var(--dark-opacity-10) var(--dark-opacity-10);\n //scrollbar-width: thin;\n\n &::-webkit-scrollbar {\n width: 4px;\n background-color: #ffffff;\n }\n\n &::-webkit-scrollbar-track {\n border-radius: 10px;\n background: white;\n }\n\n &::-webkit-scrollbar-thumb {\n border-radius: 10px;\n background: var(--dark-opacity-10);\n }\n\n .option {\n height: 70px;\n padding: 0 1.5rem;\n display: flex;\n align-items: center;\n justify-content: space-between;\n background-color: #fff;\n position: relative;\n color: var(--dark);\n cursor: pointer;\n box-sizing: border-box;\n\n &:hover, &:is(.customSelect__option--is-selected) {\n background-color: var(--dark-opacity-3) !important;\n\n @media only screen and ", " {\n //background-color: transparent !important;\n }\n }\n\n &:is(.customSelect__option--is-focused) {\n background-color: transparent;\n }\n\n &:active {\n background-color: var(--dark-opacity-3);\n\n @media only screen and ", " {\n background-color: transparent !important;\n }\n }\n\n &:is(.optionSm) {\n height: auto;\n min-height: 51px;\n padding: 1rem 1.5rem;\n }\n\n &:is(.fixedBottom) {\n position: sticky;\n bottom: 0;\n left: 0;\n right: 0;\n z-index: 4;\n\n strong {\n color: var(--dark-opacity-50);\n }\n }\n\n &:is(.fixedTop) {\n position: sticky;\n top: 0;\n left: 0;\n right: 0;\n z-index: 4;\n background-color: #fff;\n border-bottom: 1px solid var(--dark-opacity-10);\n \n &:hover {\n background-color: var(--dark-opacity-3) !important;\n }\n }\n\n > div {\n display: flex;\n align-items: center;\n justify-content: space-between;\n width: 100%;\n\n .left {\n strong {\n display: block;\n font: var(--title-bold-16-19);\n }\n\n span {\n display: block;\n font: var(--body-medium-13-16);\n }\n }\n\n .right {\n display: flex;\n align-items: end;\n justify-content: flex-end;\n\n strong {\n display: block;\n font: var(--title-extra-bold-16-19);\n line-height: 17px;\n\n small {\n font: var(--body-extra-bold-14-17);\n }\n }\n\n span {\n display: block;\n font: var(--body-regular-13-16);\n margin-left: 0.2rem;\n }\n }\n }\n\n }\n }\n }\n\n &:is(.isSearchable) {\n .customSelect__control--menu-is-open {\n .customSelect__value-container {\n background-image: url('", "') !important;\n }\n }\n }\n\n .customSelect__control--menu-is-open {\n &:before {\n border-color: var(--primary);\n border-width: 2px;\n border-bottom-left-radius: 0;\n border-bottom-right-radius: 0;\n }\n\n box-shadow: none;\n\n .customSelect__indicator {\n &:is(.customSelect__dropdown-indicator) {\n transform: rotate(180deg);\n }\n }\n\n .customSelect__value-container {\n .customSelect__placeholder {\n color: var(--dark-opacity-50);\n }\n }\n\n\n .customSelect__clear-indicator {\n display: none !important;\n }\n\n\n .customSelect__single-value {\n color: var(--dark) !important;\n }\n }\n }\n }\n\n .placement-top {\n .customSelect__menu {\n border-radius: 0.5rem 0.5rem 0 0 !important;\n top: auto !important;\n bottom: 100% !important;\n }\n\n .customSelect__control--menu-is-open {\n &:before {\n border-radius: 0 0 0.5rem 0.5rem !important;\n }\n }\n }\n"])), function (props) { return props.$width || '370px'; }, function (props) { return props.$maxOptionListHeight && props.$maxOptionListHeight; }, function (props) { return props.$hasShowDropdownIcon ? "0 1rem 0 1.5rem" : "0 1.5rem"; }, function (props) { return props.$hasError ? "2px" : "1px"; }, function (props) { return props.$hasError ? "var(--red)" : "var(--dark-opacity-10)"; }, function (props) { return props.$isMulti ? "\n &:is(.customSelect__control--menu-is-open){\n background-color: white !important;\n }\n " : ""; }, function (props) {
|
|
18
18
|
switch (props.$size) {
|
|
19
19
|
case 'medium':
|
|
20
20
|
return "56px";
|
|
@@ -14,6 +14,15 @@ declare const _default: {
|
|
|
14
14
|
control: string;
|
|
15
15
|
options: string[];
|
|
16
16
|
};
|
|
17
|
+
isMulti: {
|
|
18
|
+
control: string;
|
|
19
|
+
};
|
|
20
|
+
hasSelectAll: {
|
|
21
|
+
control: string;
|
|
22
|
+
};
|
|
23
|
+
selectAllLabel: {
|
|
24
|
+
control: string;
|
|
25
|
+
};
|
|
17
26
|
};
|
|
18
27
|
};
|
|
19
28
|
export default _default;
|
|
@@ -85,3 +94,40 @@ export declare const Multiple: {
|
|
|
85
94
|
id: string;
|
|
86
95
|
};
|
|
87
96
|
};
|
|
97
|
+
export declare const MultipleWithSelectAll: {
|
|
98
|
+
args: {
|
|
99
|
+
placeholder: string;
|
|
100
|
+
isSearchable: boolean;
|
|
101
|
+
hasShowDropdownIcon: boolean;
|
|
102
|
+
isMulti: boolean;
|
|
103
|
+
hasSelectAll: boolean;
|
|
104
|
+
selectAllLabel: string;
|
|
105
|
+
closeMenuOnSelect: boolean;
|
|
106
|
+
hasShowSearchIcon: boolean;
|
|
107
|
+
isClearable: boolean;
|
|
108
|
+
lightBg: boolean;
|
|
109
|
+
label: string;
|
|
110
|
+
name: string;
|
|
111
|
+
options: ({
|
|
112
|
+
value: string;
|
|
113
|
+
label: string;
|
|
114
|
+
price: string;
|
|
115
|
+
priceSm: string;
|
|
116
|
+
period: string;
|
|
117
|
+
labelBottom?: undefined;
|
|
118
|
+
} | {
|
|
119
|
+
value: string;
|
|
120
|
+
label: string;
|
|
121
|
+
labelBottom: string;
|
|
122
|
+
price?: undefined;
|
|
123
|
+
priceSm?: undefined;
|
|
124
|
+
period?: undefined;
|
|
125
|
+
})[];
|
|
126
|
+
width: string;
|
|
127
|
+
hasError: boolean;
|
|
128
|
+
errorMessage: string;
|
|
129
|
+
maxOptionListHeight: string;
|
|
130
|
+
MenuPlacement: string;
|
|
131
|
+
id: string;
|
|
132
|
+
};
|
|
133
|
+
};
|
|
@@ -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.Multiple = exports.Default = void 0;
|
|
17
|
+
exports.MultipleWithSelectAll = exports.Multiple = exports.Default = void 0;
|
|
18
18
|
var SelectBox_1 = __importDefault(require("../SelectBox"));
|
|
19
19
|
var SelectValues_json_1 = __importDefault(require("./../../../jsons/SelectValues.json"));
|
|
20
20
|
var props_1 = require("../props");
|
|
@@ -26,6 +26,9 @@ exports.default = {
|
|
|
26
26
|
hasError: { control: 'boolean' },
|
|
27
27
|
hasShowDropdownIcon: { control: 'boolean' },
|
|
28
28
|
size: { control: 'select', options: props_1.sizes },
|
|
29
|
+
isMulti: { control: 'boolean' },
|
|
30
|
+
hasSelectAll: { control: 'boolean' },
|
|
31
|
+
selectAllLabel: { control: 'text' },
|
|
29
32
|
}
|
|
30
33
|
};
|
|
31
34
|
exports.Default = {
|
|
@@ -51,3 +54,6 @@ exports.Default = {
|
|
|
51
54
|
exports.Multiple = {
|
|
52
55
|
args: __assign(__assign({}, exports.Default.args), { placeholder: "Placeholder", isSearchable: true, hasShowDropdownIcon: true, isMulti: true, closeMenuOnSelect: true }),
|
|
53
56
|
};
|
|
57
|
+
exports.MultipleWithSelectAll = {
|
|
58
|
+
args: __assign(__assign({}, exports.Default.args), { placeholder: "Seçim yapın...", isSearchable: true, hasShowDropdownIcon: true, isMulti: true, hasSelectAll: true, selectAllLabel: "Tümünü Seç", closeMenuOnSelect: false }),
|
|
59
|
+
};
|