krl-alfred 1.77.28 → 1.77.30
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/Accordion/Accordion.js +5 -5
- package/dist/components/Accordion/AccordionItem.js +5 -5
- package/dist/components/Accordion/props.js +9 -4
- package/dist/components/ActionButton/ActionButton.js +22 -14
- package/dist/components/ActionButton/ActionButton.styled.js +1 -1
- package/dist/components/ActionButton/props.js +5 -2
- package/dist/components/AddressCard/AddressCard.js +4 -6
- package/dist/components/AddressCard/props.js +14 -0
- package/dist/components/Agreement/Agreement.js +13 -15
- package/dist/components/Agreement/Agreement.styled.js +1 -1
- package/dist/components/Agreement/props.js +15 -0
- package/dist/components/Agreement/stories/Agreement.stories.js +1 -0
- package/dist/components/Alert/Alert.js +3 -10
- package/dist/components/Alert/Alert.styled.js +2 -2
- package/dist/components/Alert/props.js +12 -1
- package/dist/components/AutocompleteInput/AutocompleteInput.js +11 -24
- package/dist/components/AutocompleteInput/AutocompleteInput.styled.js +3 -3
- package/dist/components/AutocompleteInput/props.js +14 -0
- package/dist/components/Badges/Badges.js +0 -3
- package/dist/components/Badges/layouts/belt/index.js +4 -4
- package/dist/components/Badges/layouts/dark/index.js +6 -6
- package/dist/components/Badges/layouts/text/index.js +4 -3
- package/dist/components/Badges/props.js +4 -1
- package/dist/components/BannerCard/BannerCard.js +5 -4
- package/dist/components/BannerCard/props.js +12 -2
- package/dist/components/BannerCard/stories/BannerCard.stories.js +2 -2
- package/dist/components/Breadcrumbs/Breadcrumbs.js +5 -22
- package/dist/components/Breadcrumbs/Breadcrumbs.styled.js +5 -9
- package/dist/components/Breadcrumbs/props.js +6 -1
- package/dist/components/Button/props.js +2 -2
- package/dist/components/CampaignCard/CampaignCard.js +4 -3
- package/dist/components/CampaignCard/CampaignCard.styled.js +1 -1
- package/dist/components/CampaignCard/props.js +13 -2
- package/dist/components/CategoryMenu/CategoryMenu.js +5 -22
- package/dist/components/CategoryMenu/CategoryMenu.styled.js +3 -7
- package/dist/components/CategoryMenu/props.js +6 -1
- package/dist/components/Checkbox/Checkbox.js +4 -22
- package/dist/components/Checkbox/Checkbox.styled.js +1 -1
- package/dist/components/Checkbox/props.js +10 -3
- package/dist/components/Checkbox/stories/Checkbox.stories.js +2 -6
- package/dist/components/CircleProgress/CircleProgress.js +6 -8
- package/dist/components/CircleProgress/props.js +9 -0
- package/dist/components/CouponCode/CouponCode.js +5 -18
- package/dist/components/CouponCode/props.js +17 -0
- package/dist/components/Divider/Divider.js +2 -7
- package/dist/components/Divider/props.js +4 -2
- package/dist/components/Dropdown/Dropdown.js +8 -12
- package/dist/components/Dropdown/props.js +10 -2
- package/dist/components/Icon/Icon.js +15 -6
- package/dist/components/Icon/props.js +5 -2
- package/dist/components/Icon/stories/Icons.stories.js +1 -1
- package/dist/components/InfoBox/InfoBox.js +7 -9
- package/dist/components/InfoBox/props.js +9 -1
- package/dist/components/InlineProgress/InlineProgress.js +6 -5
- package/dist/components/InlineProgress/props.js +5 -0
- package/dist/components/Input/Input.js +8 -14
- package/dist/components/Input/Input.styled.js +1 -1
- package/dist/components/Input/props.js +24 -0
- package/dist/components/Input/stories/Input.stories.js +1 -1
- package/dist/components/InstallmentBox/InstallmentBox.js +4 -3
- package/dist/components/InstallmentBox/props.js +14 -0
- package/dist/components/InsuranceBox/InsuranceBox.js +4 -16
- package/dist/components/InsuranceBox/props.js +23 -1
- package/dist/components/ListGroup/ListGroup.js +4 -6
- package/dist/components/ListGroup/props.js +4 -0
- package/dist/components/Loader/Loader.js +2 -5
- package/dist/components/Loader/Loader.styled.js +1 -1
- package/dist/components/Modal/Modal.js +12 -29
- package/dist/components/Modal/props.js +31 -6
- package/dist/components/OptionMenu/OptionMenu.js +32 -0
- package/dist/components/OptionMenu/OptionMenu.styled.js +17 -0
- package/dist/components/{ContentBox → OptionMenu}/index.js +2 -2
- package/dist/components/OptionMenu/props.js +8 -0
- package/dist/components/{Banner/Banner.js → OptionMenu/stories/OptionMenu.stories.js} +14 -15
- package/dist/components/OtpInput/Otp.js +4 -8
- package/dist/components/OtpInput/props.js +9 -0
- package/dist/components/PaymentCart/PaymentCart.js +12 -20
- package/dist/components/PaymentCart/props.js +25 -1
- package/dist/components/PaymentCart/stories/PaymentCart.stories.js +1 -1
- package/dist/components/ProductCardCheckbox/ProductCardCheckbox.js +4 -5
- package/dist/components/ProductCardCheckbox/ProductCardCheckbox.styled.js +1 -37
- package/dist/components/ProductCardCheckbox/props.js +13 -4
- package/dist/components/ProductCardCheckbox/stories/ProductCardCheckbox.stories.js +1 -10
- package/dist/components/ProductCardHorizontal/ProductCardHorizontal.js +4 -4
- package/dist/components/ProductCardHorizontal/props.js +11 -0
- package/dist/components/ProductCardHorizontalSm/ProductCardHorizontalSm.js +4 -4
- package/dist/components/ProductCardHorizontalSm/props.js +13 -0
- package/dist/components/ProductCardVertical/ProductCardVertical.js +4 -10
- package/dist/components/ProductCardVertical/props.js +14 -2
- package/dist/components/ProductCardVertical/stories/ProductCardVertical.stories.js +0 -2
- package/dist/components/RadioButton/RadioButton.js +0 -14
- package/dist/components/RadioButton/layouts/basic/Basic.js +3 -24
- package/dist/components/RadioButton/layouts/boxed/Boxed.js +3 -18
- package/dist/components/RadioButton/props.js +14 -1
- package/dist/components/ReviewCard/ReviewCard.js +4 -5
- package/dist/components/ReviewCard/props.js +10 -2
- package/dist/components/SearchBox/SearchBox.js +8 -14
- package/dist/components/SearchBox/SearchBox.styled.js +1 -1
- package/dist/components/SearchBox/props.js +13 -0
- package/dist/components/SearchBox/stories/SearchBox.stories.js +2 -2
- package/dist/components/SelectBox/SelectBox.js +5 -4
- package/dist/components/SelectBox/props.js +18 -7
- package/dist/components/ShoppingCartProduct/ShoppingCartProduct.js +5 -15
- package/dist/components/ShoppingCartProduct/props.js +35 -0
- package/dist/components/Stepper/Stepper.js +10 -25
- package/dist/components/Stepper/Stepper.styled.js +6 -5
- package/dist/components/Stepper/props.js +7 -0
- package/dist/components/SuggestBox/SuggestBox.js +3 -13
- package/dist/components/SuggestBox/props.js +7 -0
- package/dist/components/Tabs/TabItem.js +11 -9
- package/dist/components/Tabs/Tabs.js +19 -18
- package/dist/components/Tabs/props.js +14 -0
- package/dist/components/TextLink/TextLink.js +3 -10
- package/dist/components/TextLink/props.js +9 -1
- package/dist/components/Textarea/Textarea.js +4 -10
- package/dist/components/Textarea/props.js +13 -1
- package/dist/components/Toast/Toast.js +24 -25
- package/dist/components/Toast/Toast.styled.js +9 -9
- package/dist/components/Toast/core/state.js +41 -0
- package/dist/components/Toast/index.js +3 -5
- package/dist/components/Toast/props.js +16 -7
- package/dist/components/Toast/stories/Toast.stories.js +18 -4
- package/dist/components/Tooltip/Tooltip.js +4 -10
- package/dist/components/Tooltip/props.js +16 -1
- package/dist/index.js +7 -12
- package/dist/style/style.min.css.map +1 -1
- package/package.json +1 -1
- package/dist/components/Banner/index.js +0 -8
- package/dist/components/Banner/layouts/layout3/index.js +0 -20
- package/dist/components/Banner/layouts/layout3/layout3.styled.js +0 -14
- package/dist/components/Banner/props.js +0 -7
- package/dist/components/Banner/stories/Banner.stories.js +0 -59
- package/dist/components/ContentBox/ContentBox.js +0 -24
- package/dist/components/ContentBox/ContentBox.styled.js +0 -26
- package/dist/components/ContentBox/props.js +0 -5
- package/dist/components/ContentBox/stories/ContentBox.stories.js +0 -23
- package/dist/components/ProductCard/ProductCard.js +0 -51
- package/dist/components/ProductCard/ProductCard.styled.js +0 -51
- package/dist/components/ProductCard/index.js +0 -8
- package/dist/components/ProductCard/layouts/Checklist.js +0 -37
- package/dist/components/ProductCard/layouts/HorizontalSm.js +0 -24
- package/dist/components/ProductCard/props.js +0 -14
- package/dist/components/ProductCard/stories/ProductCard.stories.js +0 -73
- package/dist/components/ValueProposition/ValueProposition.js +0 -42
- package/dist/components/ValueProposition/index.js +0 -8
- package/dist/components/ValueProposition/layouts/horizontal/Horizontal.styled.js +0 -18
- package/dist/components/ValueProposition/layouts/horizontal/index.js +0 -9
- package/dist/components/ValueProposition/layouts/square/Square.styled.js +0 -19
- package/dist/components/ValueProposition/layouts/square/index.js +0 -13
- package/dist/components/ValueProposition/layouts/vertical/Vertical.styled.js +0 -19
- package/dist/components/ValueProposition/layouts/vertical/index.js +0 -20
- package/dist/components/ValueProposition/props.js +0 -8
- package/dist/components/ValueProposition/stories/ValueProposition.stories.js +0 -60
|
@@ -16,12 +16,13 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
18
18
|
var react_1 = require("react");
|
|
19
|
+
var props_1 = require("./props");
|
|
19
20
|
var Accordion_styled_1 = require("./Accordion.styled");
|
|
20
21
|
var AccordionItem_1 = __importDefault(require("./AccordionItem"));
|
|
21
22
|
var TextLink_1 = __importDefault(require("./../TextLink"));
|
|
22
|
-
var Accordion = function (
|
|
23
|
-
var
|
|
24
|
-
var
|
|
23
|
+
var Accordion = function (_a) {
|
|
24
|
+
var _b = _a.data, data = _b === void 0 ? props_1.AccordionDefault.data : _b, _c = _a.linkOnClick, linkOnClick = _c === void 0 ? props_1.AccordionDefault.linkOnClick : _c, _d = _a.collapseAll, collapseAll = _d === void 0 ? props_1.AccordionDefault.collapseAll : _d, _e = _a.size, size = _e === void 0 ? props_1.AccordionDefault.size : _e, _f = _a.hasScrollOnFocus, hasScrollOnFocus = _f === void 0 ? props_1.AccordionDefault.hasScrollOnFocus : _f, _g = _a.activeIndex, activeIndex = _g === void 0 ? props_1.AccordionDefault.activeIndex : _g, _h = _a.showLink, showLink = _h === void 0 ? props_1.AccordionDefault.showLink : _h, _j = _a.linkText, linkText = _j === void 0 ? props_1.AccordionDefault.linkText : _j;
|
|
25
|
+
var _k = (0, react_1.useState)(0), active = _k[0], setActive = _k[1];
|
|
25
26
|
var wrapperRef = (0, react_1.useRef)();
|
|
26
27
|
(0, react_1.useEffect)(function () {
|
|
27
28
|
setActive(activeIndex);
|
|
@@ -34,7 +35,6 @@ var Accordion = function (props) {
|
|
|
34
35
|
}, 800);
|
|
35
36
|
}
|
|
36
37
|
}, [hasScrollOnFocus, activeIndex]);
|
|
37
|
-
return ((0, jsx_runtime_1.jsxs)(Accordion_styled_1.AccordionStyled, { children: [
|
|
38
|
+
return ((0, jsx_runtime_1.jsxs)(Accordion_styled_1.AccordionStyled, { children: [(0, jsx_runtime_1.jsx)(Accordion_styled_1.Wrapper, __assign({ ref: wrapperRef }, { children: data === null || data === void 0 ? void 0 : data.map(function (item, key) { return ((0, jsx_runtime_1.jsx)(AccordionItem_1.default, { active: active, setActive: setActive, size: size, collapseAll: collapseAll, index: key, title: item.question, content: item.answer }, key)); }) })), showLink && ((0, jsx_runtime_1.jsx)(Accordion_styled_1.Footer, { children: (0, jsx_runtime_1.jsx)(TextLink_1.default, __assign({ onClick: linkOnClick }, { children: linkText })) }))] }));
|
|
38
39
|
};
|
|
39
|
-
Accordion.defaultProps = {};
|
|
40
40
|
exports.default = Accordion;
|
|
@@ -18,15 +18,15 @@ var jsx_runtime_1 = require("react/jsx-runtime");
|
|
|
18
18
|
var react_1 = require("react");
|
|
19
19
|
var Accordion_styled_1 = require("./Accordion.styled");
|
|
20
20
|
var Icon_1 = __importDefault(require("../Icon/Icon"));
|
|
21
|
-
var AccordionItem = function (
|
|
22
|
-
var title =
|
|
23
|
-
var
|
|
21
|
+
var AccordionItem = function (_a) {
|
|
22
|
+
var title = _a.title, content = _a.content, index = _a.index, collapseAll = _a.collapseAll, size = _a.size, active = _a.active, setActive = _a.setActive;
|
|
23
|
+
var _b = (0, react_1.useState)(0), height = _b[0], setHeight = _b[1];
|
|
24
|
+
var _c = (0, react_1.useState)(collapseAll ? true : false), activeItem = _c[0], setActiveItem = _c[1];
|
|
24
25
|
var itemRef = (0, react_1.useRef)();
|
|
25
26
|
(0, react_1.useEffect)(function () {
|
|
26
27
|
var _a, _b;
|
|
27
28
|
setHeight((active === index || activeItem) ? (_b = (_a = itemRef === null || itemRef === void 0 ? void 0 : itemRef.current) === null || _a === void 0 ? void 0 : _a.children[0]) === null || _b === void 0 ? void 0 : _b.clientHeight : 0);
|
|
28
|
-
});
|
|
29
|
-
var _b = (0, react_1.useState)(collapseAll ? true : false), activeItem = _b[0], setActiveItem = _b[1];
|
|
29
|
+
}, [active, activeItem, index]);
|
|
30
30
|
var handleCollapse = function () {
|
|
31
31
|
if (collapseAll) {
|
|
32
32
|
setActiveItem(!activeItem);
|
|
@@ -1,10 +1,15 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.sizes = void 0;
|
|
3
|
+
exports.AccordionDefault = exports.sizes = void 0;
|
|
4
4
|
exports.sizes = ['large', 'medium'];
|
|
5
|
-
|
|
5
|
+
exports.AccordionDefault = {
|
|
6
|
+
data: [],
|
|
7
|
+
active: false,
|
|
6
8
|
activeIndex: 0,
|
|
7
|
-
linkText: 'Daha Fazla Soru Göster',
|
|
8
9
|
showLink: false,
|
|
9
|
-
|
|
10
|
+
collapseAll: false,
|
|
11
|
+
linkText: 'Daha Fazla Soru Göster',
|
|
12
|
+
linkOnClick: null,
|
|
13
|
+
size: "medium",
|
|
14
|
+
hasScrollOnFocus: false,
|
|
10
15
|
};
|
|
@@ -10,25 +10,38 @@ var __assign = (this && this.__assign) || function () {
|
|
|
10
10
|
};
|
|
11
11
|
return __assign.apply(this, arguments);
|
|
12
12
|
};
|
|
13
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
14
|
+
var t = {};
|
|
15
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
16
|
+
t[p] = s[p];
|
|
17
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
18
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
19
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
20
|
+
t[p[i]] = s[p[i]];
|
|
21
|
+
}
|
|
22
|
+
return t;
|
|
23
|
+
};
|
|
13
24
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
14
25
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
15
26
|
};
|
|
16
27
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
28
|
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
18
29
|
var react_1 = require("react");
|
|
30
|
+
var props_1 = require("./props");
|
|
19
31
|
var ActionButton_styled_1 = require("./ActionButton.styled");
|
|
20
32
|
var Icon_1 = __importDefault(require("../Icon/Icon"));
|
|
21
33
|
var Button_1 = __importDefault(require("../Button"));
|
|
22
34
|
var date_fns_1 = require("date-fns");
|
|
23
35
|
var react_i18next_1 = require("react-i18next");
|
|
24
|
-
var ActionButton = function (
|
|
36
|
+
var ActionButton = function (_a) {
|
|
37
|
+
var _b = _a.width, width = _b === void 0 ? props_1.ActionButtonDefault.width : _b, _c = _a.title, title = _c === void 0 ? props_1.ActionButtonDefault.title : _c, _d = _a.date, date = _d === void 0 ? props_1.ActionButtonDefault.date : _d, _e = _a.icon, icon = _e === void 0 ? props_1.ActionButtonDefault.icon : _e, _f = _a.iconStrokeWidth, iconStrokeWidth = _f === void 0 ? props_1.ActionButtonDefault.iconStrokeWidth : _f, _g = _a.isMonthVisible, isMonthVisible = _g === void 0 ? props_1.ActionButtonDefault.isMonthVisible : _g, other = __rest(_a, ["width", "title", "date", "icon", "iconStrokeWidth", "isMonthVisible"]);
|
|
25
38
|
var t = (0, react_i18next_1.useTranslation)().t;
|
|
26
|
-
var
|
|
27
|
-
var
|
|
28
|
-
var
|
|
29
|
-
var
|
|
39
|
+
var _h = (0, react_1.useState)(0), months = _h[0], setMonths = _h[1];
|
|
40
|
+
var _j = (0, react_1.useState)(0), days = _j[0], setDays = _j[1];
|
|
41
|
+
var _k = (0, react_1.useState)(0), minutes = _k[0], setMinutes = _k[1];
|
|
42
|
+
var _l = (0, react_1.useState)(0), hours = _l[0], setHours = _l[1];
|
|
30
43
|
//const [secounds,setSecounds] = useState(0);
|
|
31
|
-
var deadline = new Date(
|
|
44
|
+
var deadline = new Date(date).getTime();
|
|
32
45
|
var count = function () {
|
|
33
46
|
var now = new Date().getTime();
|
|
34
47
|
var duration = (0, date_fns_1.intervalToDuration)({
|
|
@@ -36,7 +49,7 @@ var ActionButton = function (props) {
|
|
|
36
49
|
end: now
|
|
37
50
|
});
|
|
38
51
|
setMonths(deadline - now > 0 ? (0, date_fns_1.differenceInMonths)(deadline, now) : 0);
|
|
39
|
-
setDays(deadline - now > 0 ?
|
|
52
|
+
setDays(deadline - now > 0 ? isMonthVisible ? duration === null || duration === void 0 ? void 0 : duration.days : (0, date_fns_1.differenceInDays)(deadline, now) : 0);
|
|
40
53
|
setMinutes(deadline - now > 0 ? duration === null || duration === void 0 ? void 0 : duration.minutes : 0);
|
|
41
54
|
setHours(deadline - now > 0 ? duration === null || duration === void 0 ? void 0 : duration.hours : 0);
|
|
42
55
|
//setSecounds(deadline - now > 0 ? duration?.seconds : 0)
|
|
@@ -46,12 +59,7 @@ var ActionButton = function (props) {
|
|
|
46
59
|
var timer = setInterval(count, 60 * 1000);
|
|
47
60
|
(0, react_1.useEffect)(function () {
|
|
48
61
|
count();
|
|
49
|
-
}, [
|
|
50
|
-
return ((0, jsx_runtime_1.jsxs)(ActionButton_styled_1.ActionButtonStyled, __assign({},
|
|
51
|
-
};
|
|
52
|
-
ActionButton.defaultProps = {
|
|
53
|
-
title: "Title",
|
|
54
|
-
width: "100%",
|
|
55
|
-
icon: 'TimeCircle',
|
|
62
|
+
}, [date]);
|
|
63
|
+
return ((0, jsx_runtime_1.jsxs)(ActionButton_styled_1.ActionButtonStyled, __assign({ "$width": width }, other, { children: [(0, jsx_runtime_1.jsxs)("div", __assign({ className: "top" }, { children: [(0, jsx_runtime_1.jsx)("div", __assign({ className: "icon" }, { children: (0, jsx_runtime_1.jsx)(Icon_1.default, { strokeWidth: iconStrokeWidth, name: icon, color: "var(--primary)", width: "45px", height: "45px" }) })), (0, jsx_runtime_1.jsx)("strong", __assign({ className: "title" }, { children: title }))] })), (0, jsx_runtime_1.jsxs)("div", __assign({ className: "bottom" }, { children: [(0, jsx_runtime_1.jsx)("div", {}), (0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsxs)("div", __assign({ className: "timer" }, { children: [isMonthVisible && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)("div", __assign({ className: "box" }, { children: [(0, jsx_runtime_1.jsx)("div", __assign({ className: "timerTitle" }, { children: months })), (0, jsx_runtime_1.jsx)("div", __assign({ className: "timerDescription" }, { children: t('month') }))] })), (0, jsx_runtime_1.jsx)("div", __assign({ className: "dots" }, { children: ":" }))] })), (0, jsx_runtime_1.jsxs)("div", __assign({ className: "box" }, { children: [(0, jsx_runtime_1.jsx)("div", __assign({ className: "timerTitle" }, { children: days })), (0, jsx_runtime_1.jsx)("div", __assign({ className: "timerDescription" }, { children: t('day') }))] })), (0, jsx_runtime_1.jsx)("div", __assign({ className: "dots" }, { children: ":" })), (0, jsx_runtime_1.jsxs)("div", __assign({ className: "box" }, { children: [(0, jsx_runtime_1.jsx)("div", __assign({ className: "timerTitle" }, { children: hours.toString().padStart(2, '0') })), (0, jsx_runtime_1.jsx)("div", __assign({ className: "timerDescription" }, { children: t('hour') }))] })), !isMonthVisible && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("div", __assign({ className: "dots" }, { children: ":" })), (0, jsx_runtime_1.jsxs)("div", __assign({ className: "box" }, { children: [(0, jsx_runtime_1.jsx)("div", __assign({ className: "timerTitle" }, { children: minutes.toString().padStart(2, '0') })), (0, jsx_runtime_1.jsx)("div", __assign({ className: "timerDescription" }, { children: t('minute') }))] }))] }))] })), (0, jsx_runtime_1.jsx)(Button_1.default, { iconStrokeWidth: "3px", size: "xsmall", width: "32px", icon: "ArrowMediumRight", variant: "primary" })] })] }))] })));
|
|
56
64
|
};
|
|
57
65
|
exports.default = ActionButton;
|
|
@@ -9,5 +9,5 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
9
9
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
10
|
exports.ActionButtonStyled = void 0;
|
|
11
11
|
var styled_components_1 = __importDefault(require("styled-components"));
|
|
12
|
-
exports.ActionButtonStyled = styled_components_1.default.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n border-radius: 0.5rem;\n background-color: var(--primary-opacity-5);\n padding: 1rem 1.5rem;\n width: ", ";\n align-items: center;\n justify-content: space-between;\n color: var(--dark);\n box-sizing: border-box;\n cursor: pointer;\n .top ,.bottom{\n display: grid;\n grid-template-columns: 61px 1fr;\n align-content: center;\n align-items: center;\n }\n .top{\n .icon{\n svg{\n display: block;\n }\n margin-right: 1rem;\n }\n .title{\n display: block;\n font:var(--body-bold-14-17);\n }\n }\n .bottom{\n margin-top: 0.5rem;\n > div{\n display: grid;\n grid-template-columns: 1fr auto;\n align-content: center;\n align-items: center;\n justify-content: space-between;\n .timer{\n display: grid;\n grid-template-columns: repeat(5,auto);\n align-items:center;\n justify-content: start;\n .box{\n width: 40px;\n height: 48px;\n background-color: white;\n border-radius: 4px;\n text-align: center;\n display: grid;\n align-items: center;\n align-content: center;\n box-shadow: 0 6px 30px 0 var(--box-shadow-color);\n .timerTitle{\n font:var(--title-extra-bold-16-19);\n }\n .timerDescription{\n font:var(--caption-regular-10-12);\n }\n }\n .dots{ \n margin: 0 4px;\n width: 4px;\n font:var(--caption-bold-12-15);\n }\n }\n }\n } \n"], ["\n border-radius: 0.5rem;\n background-color: var(--primary-opacity-5);\n padding: 1rem 1.5rem;\n width: ", ";\n align-items: center;\n justify-content: space-between;\n color: var(--dark);\n box-sizing: border-box;\n cursor: pointer;\n .top ,.bottom{\n display: grid;\n grid-template-columns: 61px 1fr;\n align-content: center;\n align-items: center;\n }\n .top{\n .icon{\n svg{\n display: block;\n }\n margin-right: 1rem;\n }\n .title{\n display: block;\n font:var(--body-bold-14-17);\n }\n }\n .bottom{\n margin-top: 0.5rem;\n > div{\n display: grid;\n grid-template-columns: 1fr auto;\n align-content: center;\n align-items: center;\n justify-content: space-between;\n .timer{\n display: grid;\n grid-template-columns: repeat(5,auto);\n align-items:center;\n justify-content: start;\n .box{\n width: 40px;\n height: 48px;\n background-color: white;\n border-radius: 4px;\n text-align: center;\n display: grid;\n align-items: center;\n align-content: center;\n box-shadow: 0 6px 30px 0 var(--box-shadow-color);\n .timerTitle{\n font:var(--title-extra-bold-16-19);\n }\n .timerDescription{\n font:var(--caption-regular-10-12);\n }\n }\n .dots{ \n margin: 0 4px;\n width: 4px;\n font:var(--caption-bold-12-15);\n }\n }\n }\n } \n"])), function (props) { return props
|
|
12
|
+
exports.ActionButtonStyled = styled_components_1.default.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n border-radius: 0.5rem;\n background-color: var(--primary-opacity-5);\n padding: 1rem 1.5rem;\n width: ", ";\n align-items: center;\n justify-content: space-between;\n color: var(--dark);\n box-sizing: border-box;\n cursor: pointer;\n .top ,.bottom{\n display: grid;\n grid-template-columns: 61px 1fr;\n align-content: center;\n align-items: center;\n }\n .top{\n .icon{\n svg{\n display: block;\n }\n margin-right: 1rem;\n }\n .title{\n display: block;\n font:var(--body-bold-14-17);\n }\n }\n .bottom{\n margin-top: 0.5rem;\n > div{\n display: grid;\n grid-template-columns: 1fr auto;\n align-content: center;\n align-items: center;\n justify-content: space-between;\n .timer{\n display: grid;\n grid-template-columns: repeat(5,auto);\n align-items:center;\n justify-content: start;\n .box{\n width: 40px;\n height: 48px;\n background-color: white;\n border-radius: 4px;\n text-align: center;\n display: grid;\n align-items: center;\n align-content: center;\n box-shadow: 0 6px 30px 0 var(--box-shadow-color);\n .timerTitle{\n font:var(--title-extra-bold-16-19);\n }\n .timerDescription{\n font:var(--caption-regular-10-12);\n }\n }\n .dots{ \n margin: 0 4px;\n width: 4px;\n font:var(--caption-bold-12-15);\n }\n }\n }\n } \n"], ["\n border-radius: 0.5rem;\n background-color: var(--primary-opacity-5);\n padding: 1rem 1.5rem;\n width: ", ";\n align-items: center;\n justify-content: space-between;\n color: var(--dark);\n box-sizing: border-box;\n cursor: pointer;\n .top ,.bottom{\n display: grid;\n grid-template-columns: 61px 1fr;\n align-content: center;\n align-items: center;\n }\n .top{\n .icon{\n svg{\n display: block;\n }\n margin-right: 1rem;\n }\n .title{\n display: block;\n font:var(--body-bold-14-17);\n }\n }\n .bottom{\n margin-top: 0.5rem;\n > div{\n display: grid;\n grid-template-columns: 1fr auto;\n align-content: center;\n align-items: center;\n justify-content: space-between;\n .timer{\n display: grid;\n grid-template-columns: repeat(5,auto);\n align-items:center;\n justify-content: start;\n .box{\n width: 40px;\n height: 48px;\n background-color: white;\n border-radius: 4px;\n text-align: center;\n display: grid;\n align-items: center;\n align-content: center;\n box-shadow: 0 6px 30px 0 var(--box-shadow-color);\n .timerTitle{\n font:var(--title-extra-bold-16-19);\n }\n .timerDescription{\n font:var(--caption-regular-10-12);\n }\n }\n .dots{ \n margin: 0 4px;\n width: 4px;\n font:var(--caption-bold-12-15);\n }\n }\n }\n } \n"])), function (props) { return props.$width; });
|
|
13
13
|
var templateObject_1;
|
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.iconNames = void 0;
|
|
3
|
+
exports.ActionButtonDefault = exports.iconNames = void 0;
|
|
4
4
|
var Icon_1 = require("../Icon");
|
|
5
5
|
exports.iconNames = Object.keys(Icon_1.iconList);
|
|
6
|
-
|
|
6
|
+
exports.ActionButtonDefault = {
|
|
7
7
|
width: '100%',
|
|
8
8
|
title: 'title',
|
|
9
|
+
date: new Date(),
|
|
9
10
|
icon: 'TimeCircle',
|
|
11
|
+
iconStrokeWidth: '',
|
|
12
|
+
isMonthVisible: false,
|
|
10
13
|
};
|
|
@@ -15,16 +15,14 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
18
|
+
var props_1 = require("./props");
|
|
18
19
|
var AddressCard_styled_1 = require("./AddressCard.styled");
|
|
19
20
|
var RadioButton_1 = __importDefault(require("../RadioButton"));
|
|
20
21
|
var TextLink_1 = __importDefault(require("../TextLink"));
|
|
21
22
|
var react_i18next_1 = require("react-i18next");
|
|
22
|
-
var AddressCard = function (
|
|
23
|
+
var AddressCard = function (_a) {
|
|
24
|
+
var _b = _a.title, title = _b === void 0 ? props_1.AddressCardDefault.title : _b, _c = _a.description, description = _c === void 0 ? props_1.AddressCardDefault.description : _c, _d = _a.handleUpdate, handleUpdate = _d === void 0 ? props_1.AddressCardDefault.handleUpdate : _d, _e = _a.onChange, onChange = _e === void 0 ? props_1.AddressCardDefault.onChange : _e, _f = _a.checked, checked = _f === void 0 ? props_1.AddressCardDefault.checked : _f, _g = _a.isShowEditBtn, isShowEditBtn = _g === void 0 ? props_1.AddressCardDefault.isShowEditBtn : _g, _h = _a.id, id = _h === void 0 ? props_1.AddressCardDefault.id : _h, _j = _a.minHeight, minHeight = _j === void 0 ? props_1.AddressCardDefault.minHeight : _j, _k = _a.name, name = _k === void 0 ? props_1.AddressCardDefault.name : _k, _l = _a.value, value = _l === void 0 ? props_1.AddressCardDefault.value : _l, _m = _a.disabled, disabled = _m === void 0 ? props_1.AddressCardDefault.disabled : _m;
|
|
23
25
|
var t = (0, react_i18next_1.useTranslation)().t;
|
|
24
|
-
return ((0, jsx_runtime_1.jsxs)(AddressCard_styled_1.AddressCardStyled, __assign({ htmlFor:
|
|
25
|
-
};
|
|
26
|
-
AddressCard.defaultProps = {
|
|
27
|
-
isShowEditBtn: true,
|
|
28
|
-
minHeight: "68px",
|
|
26
|
+
return ((0, jsx_runtime_1.jsxs)(AddressCard_styled_1.AddressCardStyled, __assign({ htmlFor: id, checked: checked, "$minHeight": minHeight }, { children: [(0, jsx_runtime_1.jsxs)("div", __assign({ className: "head" }, { children: [(0, jsx_runtime_1.jsx)(RadioButton_1.default, { id: id, onChange: onChange, checked: checked, isWrapText: false, layout: "basic", size: "small", label: title, name: name, value: value, disabled: disabled }), isShowEditBtn && ((0, jsx_runtime_1.jsx)("label", __assign({ htmlFor: "xxxxx", className: "editBtn" }, { children: (0, jsx_runtime_1.jsx)(TextLink_1.default, __assign({ onClick: handleUpdate }, { children: t("edit") })) })))] })), (0, jsx_runtime_1.jsx)("div", __assign({ className: "description" }, { children: description }))] })));
|
|
29
27
|
};
|
|
30
28
|
exports.default = AddressCard;
|
|
@@ -1,2 +1,16 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AddressCardDefault = void 0;
|
|
4
|
+
exports.AddressCardDefault = {
|
|
5
|
+
title: "",
|
|
6
|
+
description: "",
|
|
7
|
+
handleUpdate: null,
|
|
8
|
+
onChange: null,
|
|
9
|
+
checked: false,
|
|
10
|
+
id: "",
|
|
11
|
+
name: "",
|
|
12
|
+
value: "",
|
|
13
|
+
disabled: false,
|
|
14
|
+
isShowEditBtn: true,
|
|
15
|
+
minHeight: "68px",
|
|
16
|
+
};
|
|
@@ -16,28 +16,26 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
18
18
|
var react_1 = require("react");
|
|
19
|
+
var props_1 = require("./props");
|
|
19
20
|
var Agreement_styled_1 = require("./Agreement.styled");
|
|
20
21
|
var Checkbox_1 = __importDefault(require("../Checkbox"));
|
|
21
22
|
var Icon_1 = __importDefault(require("../Icon/Icon"));
|
|
22
23
|
var Loader_1 = __importDefault(require("../Loader"));
|
|
23
|
-
var Agreement = function (
|
|
24
|
-
var _a =
|
|
24
|
+
var Agreement = function (_a) {
|
|
25
|
+
var _b = _a.disabled, disabled = _b === void 0 ? props_1.AgreementDefault.disabled : _b, _c = _a.value, value = _c === void 0 ? props_1.AgreementDefault.value : _c, _d = _a.checked, checked = _d === void 0 ? props_1.AgreementDefault.checked : _d, _e = _a.name, name = _e === void 0 ? props_1.AgreementDefault.name : _e, _f = _a.hasError, hasError = _f === void 0 ? props_1.AgreementDefault.hasError : _f, _g = _a.errorMessage, errorMessage = _g === void 0 ? props_1.AgreementDefault.errorMessage : _g, _h = _a.onChange, onChange = _h === void 0 ? props_1.AgreementDefault.onChange : _h, _j = _a.title, title = _j === void 0 ? props_1.AgreementDefault.title : _j, _k = _a.expanded, expanded = _k === void 0 ? props_1.AgreementDefault.expanded : _k, _l = _a.onExpanded, onExpanded = _l === void 0 ? props_1.AgreementDefault.onExpanded : _l, _m = _a.content, content = _m === void 0 ? props_1.AgreementDefault.content : _m, _o = _a.id, id = _o === void 0 ? props_1.AgreementDefault.id : _o;
|
|
26
|
+
var _p = (0, react_1.useState)(expanded), isExpanded = _p[0], setIsExpanded = _p[1];
|
|
25
27
|
(0, react_1.useEffect)(function () {
|
|
26
|
-
|
|
27
|
-
}, [
|
|
28
|
+
onExpanded({ isExpanded: isExpanded });
|
|
29
|
+
}, [isExpanded]);
|
|
28
30
|
(0, react_1.useEffect)(function () {
|
|
29
|
-
|
|
30
|
-
}, [
|
|
31
|
+
setIsExpanded(expanded);
|
|
32
|
+
}, [expanded]);
|
|
31
33
|
var onCheckBoxChange = function (event) {
|
|
32
|
-
if (!
|
|
33
|
-
|
|
34
|
-
|
|
34
|
+
if (!isExpanded && event.target.checked)
|
|
35
|
+
setIsExpanded(true);
|
|
36
|
+
onChange(event);
|
|
35
37
|
};
|
|
36
|
-
var toggleExpand = function () { return
|
|
37
|
-
return ((0, jsx_runtime_1.jsxs)(Agreement_styled_1.AgreementStyled, __assign({
|
|
38
|
-
};
|
|
39
|
-
Agreement.defaultProps = {
|
|
40
|
-
title: "Title",
|
|
41
|
-
expanded: false
|
|
38
|
+
var toggleExpand = function () { return setIsExpanded(function (prevState) { return !prevState; }); };
|
|
39
|
+
return ((0, jsx_runtime_1.jsxs)(Agreement_styled_1.AgreementStyled, __assign({ "$hasError": hasError, id: id }, { children: [(0, jsx_runtime_1.jsxs)("div", __assign({ className: "agreement" }, { children: [(0, jsx_runtime_1.jsxs)("div", __assign({ className: "top" }, { children: [(0, jsx_runtime_1.jsx)(Checkbox_1.default, { label: title, name: name, valid: !hasError, size: "medium", checked: checked, disabled: disabled, onChange: onCheckBoxChange, value: value }), (0, jsx_runtime_1.jsx)("div", __assign({ className: "icon", onClick: toggleExpand }, { children: isExpanded ? (0, jsx_runtime_1.jsx)(Icon_1.default, { name: "AgreementArrowUp" }) : (0, jsx_runtime_1.jsx)(Icon_1.default, { name: "AgreementArrowDown" }) }))] })), isExpanded && ((0, jsx_runtime_1.jsx)("div", __assign({ className: "content" }, { children: content ? (0, jsx_runtime_1.jsx)("div", { className: "text", dangerouslySetInnerHTML: { __html: content } }) : (0, jsx_runtime_1.jsx)(Loader_1.default, { variant: "primary", width: "24px", height: "24px" }) })))] })), hasError && errorMessage && ((0, jsx_runtime_1.jsxs)("div", __assign({ className: "error" }, { children: [(0, jsx_runtime_1.jsx)(Icon_1.default, { name: "ErrorIcon" }), (0, jsx_runtime_1.jsx)("p", { children: errorMessage })] })))] })));
|
|
42
40
|
};
|
|
43
41
|
exports.default = Agreement;
|
|
@@ -9,5 +9,5 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
9
9
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
10
|
exports.AgreementStyled = void 0;
|
|
11
11
|
var styled_components_1 = __importDefault(require("styled-components"));
|
|
12
|
-
exports.AgreementStyled = styled_components_1.default.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n display: flex;\n flex-direction: column;\n margin-bottom: 24px;\n\n .agreement {\n padding: ", ";\n border-radius: 8px;\n border: ", ";\n box-sizing: border-box;\n display: flex;\n flex-direction: column;\n\n .top {\n align-items: center;\n gap: 8px;\n display: flex;\n box-sizing: border-box;\n width: 100%;\n\n .icon {\n cursor: pointer;\n }\n\n .title {\n width: 100%;\n color: ", ";\n }\n }\n\n .content {\n margin-top: 16px;\n border-radius: 8px;\n border: 1px solid var(--dark-opacity-5);\n padding: 8px 16px;\n max-height: 88px;\n box-sizing: border-box;\n overflow-y: auto;\n -ms-overflow-style: none;\n scrollbar-width: none;\n color: var(--dark);\n font:var(--body-regular-14-17);\n div:not(.text) {\n margin: 0 auto;\n }\n\n &::-webkit-scrollbar {\n display: none;\n }\n }\n }\n\n .error {\n margin-top: 8px;\n display: flex;\n align-items: center;\n color: var(--red);\n p {\n margin: 0 !important;\n font:var(--caption-semi-bold-11-13);\n }\n\n svg {\n margin-right: 8px;\n }\n }\n"], ["\n display: flex;\n flex-direction: column;\n margin-bottom: 24px;\n\n .agreement {\n padding: ", ";\n border-radius: 8px;\n border: ", ";\n box-sizing: border-box;\n display: flex;\n flex-direction: column;\n\n .top {\n align-items: center;\n gap: 8px;\n display: flex;\n box-sizing: border-box;\n width: 100%;\n\n .icon {\n cursor: pointer;\n }\n\n .title {\n width: 100%;\n color: ", ";\n }\n }\n\n .content {\n margin-top: 16px;\n border-radius: 8px;\n border: 1px solid var(--dark-opacity-5);\n padding: 8px 16px;\n max-height: 88px;\n box-sizing: border-box;\n overflow-y: auto;\n -ms-overflow-style: none;\n scrollbar-width: none;\n color: var(--dark);\n font:var(--body-regular-14-17);\n div:not(.text) {\n margin: 0 auto;\n }\n\n &::-webkit-scrollbar {\n display: none;\n }\n }\n }\n\n .error {\n margin-top: 8px;\n display: flex;\n align-items: center;\n color: var(--red);\n p {\n margin: 0 !important;\n font:var(--caption-semi-bold-11-13);\n }\n\n svg {\n margin-right: 8px;\n }\n }\n"])), function (props) { return props
|
|
12
|
+
exports.AgreementStyled = styled_components_1.default.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n display: flex;\n flex-direction: column;\n margin-bottom: 24px;\n\n .agreement {\n padding: ", ";\n border-radius: 8px;\n border: ", ";\n box-sizing: border-box;\n display: flex;\n flex-direction: column;\n\n .top {\n align-items: center;\n gap: 8px;\n display: flex;\n box-sizing: border-box;\n width: 100%;\n\n .icon {\n cursor: pointer;\n }\n\n .title {\n width: 100%;\n color: ", ";\n }\n }\n\n .content {\n margin-top: 16px;\n border-radius: 8px;\n border: 1px solid var(--dark-opacity-5);\n padding: 8px 16px;\n max-height: 88px;\n box-sizing: border-box;\n overflow-y: auto;\n -ms-overflow-style: none;\n scrollbar-width: none;\n color: var(--dark);\n font:var(--body-regular-14-17);\n div:not(.text) {\n margin: 0 auto;\n }\n\n &::-webkit-scrollbar {\n display: none;\n }\n }\n }\n\n .error {\n margin-top: 8px;\n display: flex;\n align-items: center;\n color: var(--red);\n p {\n margin: 0 !important;\n font:var(--caption-semi-bold-11-13);\n }\n\n svg {\n margin-right: 8px;\n }\n }\n"], ["\n display: flex;\n flex-direction: column;\n margin-bottom: 24px;\n\n .agreement {\n padding: ", ";\n border-radius: 8px;\n border: ", ";\n box-sizing: border-box;\n display: flex;\n flex-direction: column;\n\n .top {\n align-items: center;\n gap: 8px;\n display: flex;\n box-sizing: border-box;\n width: 100%;\n\n .icon {\n cursor: pointer;\n }\n\n .title {\n width: 100%;\n color: ", ";\n }\n }\n\n .content {\n margin-top: 16px;\n border-radius: 8px;\n border: 1px solid var(--dark-opacity-5);\n padding: 8px 16px;\n max-height: 88px;\n box-sizing: border-box;\n overflow-y: auto;\n -ms-overflow-style: none;\n scrollbar-width: none;\n color: var(--dark);\n font:var(--body-regular-14-17);\n div:not(.text) {\n margin: 0 auto;\n }\n\n &::-webkit-scrollbar {\n display: none;\n }\n }\n }\n\n .error {\n margin-top: 8px;\n display: flex;\n align-items: center;\n color: var(--red);\n p {\n margin: 0 !important;\n font:var(--caption-semi-bold-11-13);\n }\n\n svg {\n margin-right: 8px;\n }\n }\n"])), function (props) { return props.$hasError ? "15px" : "16px"; }, function (props) { return props.$hasError ? "2px solid var(--red)" : "1px solid var(--dark-opacity-5)"; }, function (props) { return props.$hasError ? ' var(--red)' : ' var(--dark)'; });
|
|
13
13
|
var templateObject_1;
|
|
@@ -1,2 +1,17 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AgreementDefault = void 0;
|
|
4
|
+
exports.AgreementDefault = {
|
|
5
|
+
disabled: false,
|
|
6
|
+
value: "",
|
|
7
|
+
checked: false,
|
|
8
|
+
name: "",
|
|
9
|
+
hasError: false,
|
|
10
|
+
errorMessage: "",
|
|
11
|
+
onChange: null,
|
|
12
|
+
title: "",
|
|
13
|
+
expanded: false,
|
|
14
|
+
onExpanded: null,
|
|
15
|
+
content: "",
|
|
16
|
+
id: "",
|
|
17
|
+
};
|
|
@@ -18,15 +18,8 @@ var jsx_runtime_1 = require("react/jsx-runtime");
|
|
|
18
18
|
var props_1 = require("./props");
|
|
19
19
|
var Alert_styled_1 = require("./Alert.styled");
|
|
20
20
|
var Icon_1 = __importDefault(require("../Icon/Icon"));
|
|
21
|
-
var Alert = function (
|
|
22
|
-
var _a, _b;
|
|
23
|
-
return
|
|
24
|
-
};
|
|
25
|
-
Alert.defaultProps = {
|
|
26
|
-
title: (0, jsx_runtime_1.jsx)("span", { children: "Bir hata olu\u015Ftu" }),
|
|
27
|
-
messages: [],
|
|
28
|
-
show: false,
|
|
29
|
-
variant: "warning",
|
|
30
|
-
icon: "Danger",
|
|
21
|
+
var Alert = function (_a) {
|
|
22
|
+
var _b = _a.title, title = _b === void 0 ? props_1.AlertDefault.title : _b, _c = _a.children, children = _c === void 0 ? props_1.AlertDefault.children : _c, _d = _a.messages, messages = _d === void 0 ? props_1.AlertDefault.messages : _d, _e = _a.show, show = _e === void 0 ? props_1.AlertDefault.show : _e, _f = _a.width, width = _f === void 0 ? props_1.AlertDefault.width : _f, _g = _a.top, top = _g === void 0 ? props_1.AlertDefault.top : _g, _h = _a.bottom, bottom = _h === void 0 ? props_1.AlertDefault.bottom : _h, _j = _a.variant, variant = _j === void 0 ? props_1.AlertDefault.variant : _j, _k = _a.icon, icon = _k === void 0 ? props_1.AlertDefault.icon : _k;
|
|
23
|
+
return show && ((0, jsx_runtime_1.jsxs)(Alert_styled_1.AlertStyled, __assign({ "$width": width, "$top": top, "$bottom": bottom, "$variant": variant }, { children: [(0, jsx_runtime_1.jsx)("div", __assign({ className: "left" }, { children: (0, jsx_runtime_1.jsx)(Icon_1.default, { name: icon, color: props_1.variants[variant] }) })), (0, jsx_runtime_1.jsxs)("div", __assign({ className: "right" }, { children: [(0, jsx_runtime_1.jsx)("h1", { children: title }), (messages === null || messages === void 0 ? void 0 : messages.length) > 0 && (messages === null || messages === void 0 ? void 0 : messages.map(function (message, index) { return (0, jsx_runtime_1.jsx)("p", { children: message }, index); })), children && (0, jsx_runtime_1.jsx)("div", __assign({ className: "description" }, { children: children }))] }))] })));
|
|
31
24
|
};
|
|
32
25
|
exports.default = Alert;
|
|
@@ -10,7 +10,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
10
10
|
exports.AlertStyled = void 0;
|
|
11
11
|
var styled_components_1 = __importDefault(require("styled-components"));
|
|
12
12
|
exports.AlertStyled = styled_components_1.default.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n border-radius: 8px;\n border-left: 8px solid ", ";\n box-shadow: 0 6px 30px 0 var(--box-shadow-color);\n width: ", ";\n display: flex;\n padding: 1rem;\n box-sizing: border-box;\n margin-top: ", ";\n margin-bottom: ", ";\n\n .left {\n padding-right: 1rem;\n > div {\n display: block;\n svg {\n display: block;\n } \n }\n }\n\n .right {\n display: flex;\n flex-direction: column;\n color: var(--dark);\n\n h1 {\n margin: 0;\n padding-top: 3px;\n font:var(--title-semi-bold-16-19);\n }\n\n p {\n margin: 0.5rem 0 0 0;\n font:var(--body-medium-14-17);\n }\n .description{\n font:var(--body-medium-14-17);\n ul{\n padding-left: 1.5rem;\n } \n }\n }\n"], ["\n border-radius: 8px;\n border-left: 8px solid ", ";\n box-shadow: 0 6px 30px 0 var(--box-shadow-color);\n width: ", ";\n display: flex;\n padding: 1rem;\n box-sizing: border-box;\n margin-top: ", ";\n margin-bottom: ", ";\n\n .left {\n padding-right: 1rem;\n > div {\n display: block;\n svg {\n display: block;\n } \n }\n }\n\n .right {\n display: flex;\n flex-direction: column;\n color: var(--dark);\n\n h1 {\n margin: 0;\n padding-top: 3px;\n font:var(--title-semi-bold-16-19);\n }\n\n p {\n margin: 0.5rem 0 0 0;\n font:var(--body-medium-14-17);\n }\n .description{\n font:var(--body-medium-14-17);\n ul{\n padding-left: 1.5rem;\n } \n }\n }\n"])), function (props) {
|
|
13
|
-
switch (props
|
|
13
|
+
switch (props.$variant) {
|
|
14
14
|
case 'warning':
|
|
15
15
|
return "var(--yellow)";
|
|
16
16
|
case 'danger':
|
|
@@ -20,5 +20,5 @@ exports.AlertStyled = styled_components_1.default.div(templateObject_1 || (templ
|
|
|
20
20
|
default:
|
|
21
21
|
return "var(--yellow)";
|
|
22
22
|
}
|
|
23
|
-
}, function (props) { return props
|
|
23
|
+
}, function (props) { return props.$width || "100%"; }, function (props) { return props.$top || "unset"; }, function (props) { return props.$bottom || "unset"; });
|
|
24
24
|
var templateObject_1;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.iconNames = exports.variants = void 0;
|
|
3
|
+
exports.AlertDefault = exports.iconNames = exports.variants = void 0;
|
|
4
4
|
var Icon_1 = require("../Icon");
|
|
5
5
|
exports.variants = {
|
|
6
6
|
warning: "var(--yellow)",
|
|
@@ -8,3 +8,14 @@ exports.variants = {
|
|
|
8
8
|
success: "var(--green)",
|
|
9
9
|
};
|
|
10
10
|
exports.iconNames = Object.keys(Icon_1.iconList);
|
|
11
|
+
exports.AlertDefault = {
|
|
12
|
+
title: "Bir hata oluştu",
|
|
13
|
+
children: null,
|
|
14
|
+
messages: ["Test Message"],
|
|
15
|
+
show: false,
|
|
16
|
+
width: "",
|
|
17
|
+
top: "",
|
|
18
|
+
bottom: "",
|
|
19
|
+
variant: "warning",
|
|
20
|
+
icon: "Danger",
|
|
21
|
+
};
|
|
@@ -16,6 +16,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
18
18
|
var react_1 = require("react");
|
|
19
|
+
var props_1 = require("./props");
|
|
19
20
|
var AutocompleteInput_styled_1 = require("./AutocompleteInput.styled");
|
|
20
21
|
var classnames_1 = __importDefault(require("classnames"));
|
|
21
22
|
var Icon_1 = __importDefault(require("../Icon/Icon"));
|
|
@@ -24,14 +25,14 @@ var Loader_1 = __importDefault(require("../Loader"));
|
|
|
24
25
|
var useOnClickOutside_1 = __importDefault(require("../../hooks/useOnClickOutside"));
|
|
25
26
|
var genericUtils_1 = require("../../utils/genericUtils");
|
|
26
27
|
var simplebar_react_1 = __importDefault(require("simplebar-react"));
|
|
27
|
-
var AutocompleteInput = function (
|
|
28
|
-
var
|
|
29
|
-
var
|
|
30
|
-
var hasError =
|
|
31
|
-
var
|
|
32
|
-
var
|
|
33
|
-
var
|
|
34
|
-
var
|
|
28
|
+
var AutocompleteInput = function (_a) {
|
|
29
|
+
var _b;
|
|
30
|
+
var _c, _d;
|
|
31
|
+
var _e = _a.hasError, hasError = _e === void 0 ? props_1.AutocompleteInputDefault.hasError : _e, _f = _a.label, label = _f === void 0 ? props_1.AutocompleteInputDefault.label : _f, _g = _a.type, type = _g === void 0 ? props_1.AutocompleteInputDefault.type : _g, _h = _a.width, width = _h === void 0 ? props_1.AutocompleteInputDefault.width : _h, _j = _a.dropdownMaxHeight, dropdownMaxHeight = _j === void 0 ? props_1.AutocompleteInputDefault.dropdownMaxHeight : _j, _k = _a.value, value = _k === void 0 ? props_1.AutocompleteInputDefault.value : _k, _l = _a.noResultTemplate, noResultTemplate = _l === void 0 ? props_1.AutocompleteInputDefault.noResultTemplate : _l, _m = _a.onBlur, onBlur = _m === void 0 ? props_1.AutocompleteInputDefault.onBlur : _m, _o = _a.onKeyUp, onKeyUp = _o === void 0 ? props_1.AutocompleteInputDefault.onKeyUp : _o, _p = _a.onKeyDown, onKeyDown = _p === void 0 ? props_1.AutocompleteInputDefault.onKeyDown : _p, _q = _a.autoComplete, autoComplete = _q === void 0 ? props_1.AutocompleteInputDefault.autoComplete : _q, disabled = _a.disabled, customLinkText = _a.customLinkText, customLinkHref = _a.customLinkHref, onCustomLinkClick = _a.onCustomLinkClick, onChange = _a.onChange, errorMessage = _a.errorMessage, name = _a.name, placeholder = _a.placeholder, readonly = _a.readonly, autofocus = _a.autofocus, dropdownList = _a.dropdownList, hasLoading = _a.hasLoading, isShowDropdown = _a.isShowDropdown, onClear = _a.onClear, onFocus = _a.onFocus;
|
|
32
|
+
var _r = (0, react_1.useState)(isShowDropdown), showDropdown = _r[0], setShowDropdown = _r[1];
|
|
33
|
+
var _s = (0, react_1.useState)(false), hasClear = _s[0], setHasClear = _s[1];
|
|
34
|
+
var _t = (0, react_1.useState)(value), inputValue = _t[0], setInputValue = _t[1];
|
|
35
|
+
var _u = (0, react_1.useState)(0), selectedIndex = _u[0], setSelectedIndex = _u[1];
|
|
35
36
|
var inputRef = (0, react_1.useRef)(null);
|
|
36
37
|
var realInputRef = (0, react_1.useRef)(null);
|
|
37
38
|
var containerRef = (0, react_1.useRef)(null);
|
|
@@ -55,7 +56,7 @@ var AutocompleteInput = function (props) {
|
|
|
55
56
|
else {
|
|
56
57
|
setHasClear(false);
|
|
57
58
|
}
|
|
58
|
-
}, [(
|
|
59
|
+
}, [(_c = realInputRef === null || realInputRef === void 0 ? void 0 : realInputRef.current) === null || _c === void 0 ? void 0 : _c.value, (_d = inputRef === null || inputRef === void 0 ? void 0 : inputRef.current) === null || _d === void 0 ? void 0 : _d.value]);
|
|
59
60
|
(0, react_1.useEffect)(function () {
|
|
60
61
|
if ((inputValue === null || inputValue === void 0 ? void 0 : inputValue.value) || (inputValue === null || inputValue === void 0 ? void 0 : inputValue.value) === null) {
|
|
61
62
|
var nativeInputValueSetter = Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype, 'value').set;
|
|
@@ -137,22 +138,8 @@ var AutocompleteInput = function (props) {
|
|
|
137
138
|
if (e === void 0) { e = null; }
|
|
138
139
|
onChange(__assign(__assign({}, e), { target: __assign(__assign({}, e === null || e === void 0 ? void 0 : e.target), { value: inputValue }) }));
|
|
139
140
|
};
|
|
140
|
-
return ((0, jsx_runtime_1.jsxs)(AutocompleteInput_styled_1.Container, __assign({ width: width, ref: containerRef }, { children: [label && ((0, jsx_runtime_1.jsxs)("div", __assign({ className: (0, classnames_1.default)("top", (
|
|
141
|
+
return ((0, jsx_runtime_1.jsxs)(AutocompleteInput_styled_1.Container, __assign({ "$width": width, ref: containerRef }, { children: [label && ((0, jsx_runtime_1.jsxs)("div", __assign({ className: (0, classnames_1.default)("top", (_b = {}, _b["justify-between"] = customLinkText, _b)) }, { children: [(0, jsx_runtime_1.jsx)("p", { children: label }), customLinkText && (0, jsx_runtime_1.jsx)(TextLink_1.default, __assign({}, (customLinkHref && { href: customLinkHref }), { onClick: onCustomLinkClick }, { children: customLinkText }))] }))), (0, jsx_runtime_1.jsxs)("div", __assign({ className: "input" }, { children: [(0, jsx_runtime_1.jsx)(AutocompleteInput_styled_1.InputStyled, { ref: inputRef, placeholder: placeholder, autofocus: autofocus, readOnly: readonly, disabled: disabled, "$hasError": hasError, "$isShowDropdown": showDropdown, onKeyUp: handleKeyUp, onBlur: handleBlur, onFocus: onFocus, onKeyDown: handleKeyDown, autoComplete: autoComplete, type: type }), (0, jsx_runtime_1.jsx)("input", { ref: realInputRef, type: "text", name: name, onChange: handleChange, className: "hiddenInput", autoComplete: autoComplete }), hasLoading && (0, jsx_runtime_1.jsx)("div", __assign({ className: "inputIcon" }, { children: (0, jsx_runtime_1.jsx)(Loader_1.default, { variant: "primary", width: "16px", height: "16px" }) })), hasClear && !hasLoading && ((0, jsx_runtime_1.jsx)("div", __assign({ className: "inputIcon", onClick: handleClear }, { children: (0, jsx_runtime_1.jsx)(Icon_1.default, { name: "Close", color: "var(--dark)", strokeWidth: "3px", width: "16px", height: "16px" }) }))), showDropdown && ((0, jsx_runtime_1.jsx)(AutocompleteInput_styled_1.DropdownStyled, __assign({ "$dropdownMaxHeight": dropdownMaxHeight }, { children: (0, jsx_runtime_1.jsx)(simplebar_react_1.default, __assign({ ref: simplebarRef, autoHide: false }, { children: (0, jsx_runtime_1.jsx)(AutocompleteInput_styled_1.DropdownInnerStyled, __assign({ ref: dropdownRef, "$dropdownMaxHeight": dropdownMaxHeight }, { children: dropdownList.length > 0 ? (dropdownList.map(function (item, key) {
|
|
141
142
|
return (0, jsx_runtime_1.jsx)("li", __assign({ className: (0, classnames_1.default)({ "isFixedBottom": item.isFixedBottom }, { "isSelected": key === selectedIndex }), onClick: function () { return handleSelectValue(item.value, item.label); } }, { children: item.label }));
|
|
142
143
|
})) : (0, jsx_runtime_1.jsx)("li", __assign({ className: "isFixedBottom hasNoResult" }, { children: noResultTemplate() })) })) })) })))] })), hasError && ((0, jsx_runtime_1.jsxs)("div", __assign({ className: "error" }, { children: [(0, jsx_runtime_1.jsx)(Icon_1.default, { name: "ErrorIcon" }), (0, jsx_runtime_1.jsx)("p", { children: errorMessage })] })))] })));
|
|
143
144
|
};
|
|
144
|
-
AutocompleteInput.defaultValues = {
|
|
145
|
-
hasError: false,
|
|
146
|
-
label: "Label",
|
|
147
|
-
type: "text",
|
|
148
|
-
width: "370px",
|
|
149
|
-
dropdownMaxHeight: "370px",
|
|
150
|
-
mask: "_",
|
|
151
|
-
value: null,
|
|
152
|
-
noResultTemplate: function () { return (0, jsx_runtime_1.jsx)("div", { children: "No Result" }); },
|
|
153
|
-
onBlur: function (e) { },
|
|
154
|
-
onKeyUp: function (e) { },
|
|
155
|
-
onKeyDown: function (e) { },
|
|
156
|
-
autoComplete: '',
|
|
157
|
-
};
|
|
158
145
|
exports.default = AutocompleteInput;
|
|
@@ -9,8 +9,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
9
9
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
10
|
exports.DropdownInnerStyled = exports.DropdownStyled = exports.InputStyled = exports.Container = void 0;
|
|
11
11
|
var styled_components_1 = __importDefault(require("styled-components"));
|
|
12
|
-
exports.Container = styled_components_1.default.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n display: flex;\n flex-direction: column;\n width: ", ";\n\n .top {\n display: flex;\n margin-bottom: 16px;\n font:var(--caption-bold-12-15);\n &.justify-between {\n justify-content: space-between;\n }\n\n p {\n margin: 0;\n color: var(--dark-opacity-50);\n }\n\n /*a {\n margin: 0;\n color: var(--primary);\n text-decoration: none;\n cursor: pointer;\n &:hover,:focus,:active{\n color: var(--primary-hover) !important;\n }\n }*/\n }\n\n .input {\n position: relative;\n .hiddenInput{\n opacity: 0;\n user-select: none;\n pointer-events: none;\n position: absolute;\n left: 0;\n width: 0;\n }\n .inputIcon {\n position: absolute;\n top: 50%;\n right: 24px;\n transform: translateY(-50%);\n cursor: pointer;\n div{\n display: block;\n }\n }\n }\n\n .error {\n display: flex;\n align-items: center;\n margin-top: 8px;\n color: var(--red);\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 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 &.justify-between {\n justify-content: space-between;\n }\n\n p {\n margin: 0;\n color: var(--dark-opacity-50);\n }\n\n /*a {\n margin: 0;\n color: var(--primary);\n text-decoration: none;\n cursor: pointer;\n &:hover,:focus,:active{\n color: var(--primary-hover) !important;\n }\n }*/\n }\n\n .input {\n position: relative;\n .hiddenInput{\n opacity: 0;\n user-select: none;\n pointer-events: none;\n position: absolute;\n left: 0;\n width: 0;\n }\n .inputIcon {\n position: absolute;\n top: 50%;\n right: 24px;\n transform: translateY(-50%);\n cursor: pointer;\n div{\n display: block;\n }\n }\n }\n\n .error {\n display: flex;\n align-items: center;\n margin-top: 8px;\n color: var(--red);\n svg {\n margin-right: 8px;\n }\n\n p {\n margin: 0;\n font:var(--caption-semi-bold-11-13);\n }\n }\n"])), function (props) { return props
|
|
13
|
-
exports.InputStyled = styled_components_1.default.input(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n box-sizing: border-box;\n width: 100%;\n height: 56px;\n background: ", ";\n border-radius: ", ";\n border: ", ";\n padding: ", ";\n color: ", ";\n font : var(--body-semi-bold-14-17);\n outline: none;\n user-select: ", ";\n pointer-events: ", ";\n text-transform: uppercase;\n &::placeholder {\n color: ", ";\n text-transform: initial;\n }\n &:focus {\n padding: 18.5px 23px;\n border: 2px solid ", ";\n color: ", ";\n background: white;\n }\n &:is([disabled]){\n color: var(--dark-opacity-25);\n }\n\n"], ["\n box-sizing: border-box;\n width: 100%;\n height: 56px;\n background: ", ";\n border-radius: ", ";\n border: ", ";\n padding: ", ";\n color: ", ";\n font : var(--body-semi-bold-14-17);\n outline: none;\n user-select: ", ";\n pointer-events: ", ";\n text-transform: uppercase;\n &::placeholder {\n color: ", ";\n text-transform: initial;\n }\n &:focus {\n padding: 18.5px 23px;\n border: 2px solid ", ";\n color: ", ";\n background: white;\n }\n &:is([disabled]){\n color: var(--dark-opacity-25);\n }\n\n"])), function (props) { return props.disabled ? 'var(--dark-opacity-5)' : (props
|
|
14
|
-
exports.DropdownStyled = styled_components_1.default.div(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n border-radius: 0 0 8px 8px;\n box-shadow: none;\n border: 1px solid var(--dark-opacity-10);\n overflow: hidden;\n max-height: ", ";\n border-top: 0;\n position: absolute;\n top: 100%;\n left: 0;\n right: 0;\n z-index: 10;\n padding: 0;\n margin: 0;\n background-color: white;\n [data-simplebar] {\n height: auto !important;\n max-height: ", " !important;\n padding: 0 !important;\n .simplebar-track.simplebar-vertical {\n width: 9px !important;\n }\n }\n"], ["\n border-radius: 0 0 8px 8px;\n box-shadow: none;\n border: 1px solid var(--dark-opacity-10);\n overflow: hidden;\n max-height: ", ";\n border-top: 0;\n position: absolute;\n top: 100%;\n left: 0;\n right: 0;\n z-index: 10;\n padding: 0;\n margin: 0;\n background-color: white;\n [data-simplebar] {\n height: auto !important;\n max-height: ", " !important;\n padding: 0 !important;\n .simplebar-track.simplebar-vertical {\n width: 9px !important;\n }\n }\n"])), function (props) { return props
|
|
12
|
+
exports.Container = styled_components_1.default.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\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 &.justify-between {\n justify-content: space-between;\n }\n\n p {\n margin: 0;\n color: var(--dark-opacity-50);\n }\n\n /*a {\n margin: 0;\n color: var(--primary);\n text-decoration: none;\n cursor: pointer;\n &:hover,:focus,:active{\n color: var(--primary-hover) !important;\n }\n }*/\n }\n\n .input {\n position: relative;\n .hiddenInput{\n opacity: 0;\n user-select: none;\n pointer-events: none;\n position: absolute;\n left: 0;\n width: 0;\n }\n .inputIcon {\n position: absolute;\n top: 50%;\n right: 24px;\n transform: translateY(-50%);\n cursor: pointer;\n div{\n display: block;\n }\n }\n }\n\n .error {\n display: flex;\n align-items: center;\n margin-top: 8px;\n color: var(--red);\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 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 &.justify-between {\n justify-content: space-between;\n }\n\n p {\n margin: 0;\n color: var(--dark-opacity-50);\n }\n\n /*a {\n margin: 0;\n color: var(--primary);\n text-decoration: none;\n cursor: pointer;\n &:hover,:focus,:active{\n color: var(--primary-hover) !important;\n }\n }*/\n }\n\n .input {\n position: relative;\n .hiddenInput{\n opacity: 0;\n user-select: none;\n pointer-events: none;\n position: absolute;\n left: 0;\n width: 0;\n }\n .inputIcon {\n position: absolute;\n top: 50%;\n right: 24px;\n transform: translateY(-50%);\n cursor: pointer;\n div{\n display: block;\n }\n }\n }\n\n .error {\n display: flex;\n align-items: center;\n margin-top: 8px;\n color: var(--red);\n svg {\n margin-right: 8px;\n }\n\n p {\n margin: 0;\n font:var(--caption-semi-bold-11-13);\n }\n }\n"])), function (props) { return props.$width || '370px'; });
|
|
13
|
+
exports.InputStyled = styled_components_1.default.input(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n box-sizing: border-box;\n width: 100%;\n height: 56px;\n background: ", ";\n border-radius: ", ";\n border: ", ";\n padding: ", ";\n color: ", ";\n font : var(--body-semi-bold-14-17);\n outline: none;\n user-select: ", ";\n pointer-events: ", ";\n text-transform: uppercase;\n &::placeholder {\n color: ", ";\n text-transform: initial;\n }\n &:focus {\n padding: 18.5px 23px;\n border: 2px solid ", ";\n color: ", ";\n background: white;\n }\n &:is([disabled]){\n color: var(--dark-opacity-25);\n }\n\n"], ["\n box-sizing: border-box;\n width: 100%;\n height: 56px;\n background: ", ";\n border-radius: ", ";\n border: ", ";\n padding: ", ";\n color: ", ";\n font : var(--body-semi-bold-14-17);\n outline: none;\n user-select: ", ";\n pointer-events: ", ";\n text-transform: uppercase;\n &::placeholder {\n color: ", ";\n text-transform: initial;\n }\n &:focus {\n padding: 18.5px 23px;\n border: 2px solid ", ";\n color: ", ";\n background: white;\n }\n &:is([disabled]){\n color: var(--dark-opacity-25);\n }\n\n"])), function (props) { return props.disabled ? 'var(--dark-opacity-5)' : (props.$hasError ? 'white' : 'var(--dark-opacity-3)'); }, function (props) { return props.$isShowDropdown ? '8px 8px 0 0' : '8px 8px 8px 8px'; }, function (props) { return props.$hasError ? '2px solid var(--red)' : '1px solid var(--dark-opacity-10)'; }, function (props) { return props.$hasError ? '18.5px 23px' : '19.5px 24px'; }, function (props) { return props.$hasError ? 'var(--red)' : 'var(--dark)'; }, function (props) { return props.readOnly ? 'none' : 'initial'; }, function (props) { return props.readOnly ? 'none' : 'initial'; }, function (props) { return props.$hasError ? 'var(--red)' : 'var(--dark-opacity-50)'; }, function (props) { return props.$hasError ? 'var(--red)' : 'var(--primary)'; }, function (props) { return props.$hasError ? 'var(--red)' : 'var(--dark)'; });
|
|
14
|
+
exports.DropdownStyled = styled_components_1.default.div(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n border-radius: 0 0 8px 8px;\n box-shadow: none;\n border: 1px solid var(--dark-opacity-10);\n overflow: hidden;\n max-height: ", ";\n border-top: 0;\n position: absolute;\n top: 100%;\n left: 0;\n right: 0;\n z-index: 10;\n padding: 0;\n margin: 0;\n background-color: white;\n [data-simplebar] {\n height: auto !important;\n max-height: ", " !important;\n padding: 0 !important;\n .simplebar-track.simplebar-vertical {\n width: 9px !important;\n }\n }\n"], ["\n border-radius: 0 0 8px 8px;\n box-shadow: none;\n border: 1px solid var(--dark-opacity-10);\n overflow: hidden;\n max-height: ", ";\n border-top: 0;\n position: absolute;\n top: 100%;\n left: 0;\n right: 0;\n z-index: 10;\n padding: 0;\n margin: 0;\n background-color: white;\n [data-simplebar] {\n height: auto !important;\n max-height: ", " !important;\n padding: 0 !important;\n .simplebar-track.simplebar-vertical {\n width: 9px !important;\n }\n }\n"])), function (props) { return props.$dropdownMaxHeight && props.$dropdownMaxHeight; }, function (props) { return props.$dropdownMaxHeight && props.$dropdownMaxHeight; });
|
|
15
15
|
exports.DropdownInnerStyled = styled_components_1.default.ul(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n padding: 0;\n margin: 0;\n overflow: hidden;\n position: relative;\n > li {\n height: 51px;\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 font : var(--title-bold-16-19);\n &:not(.hasNoResult):hover{\n background-color: var(--dark-opacity-3);\n }\n &:is(.isSelected){\n background-color: var(--dark-opacity-3);\n }\n &.isFixedBottom{\n color: var(--dark-opacity-50);\n position: sticky;\n bottom: 0;\n left: 0;\n right: 0;\n z-index: 4;\n }\n &.hasNoResult{\n cursor: initial;\n height: auto;\n }\n }\n"], ["\n padding: 0;\n margin: 0;\n overflow: hidden;\n position: relative;\n > li {\n height: 51px;\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 font : var(--title-bold-16-19);\n &:not(.hasNoResult):hover{\n background-color: var(--dark-opacity-3);\n }\n &:is(.isSelected){\n background-color: var(--dark-opacity-3);\n }\n &.isFixedBottom{\n color: var(--dark-opacity-50);\n position: sticky;\n bottom: 0;\n left: 0;\n right: 0;\n z-index: 4;\n }\n &.hasNoResult{\n cursor: initial;\n height: auto;\n }\n }\n"])));
|
|
16
16
|
var templateObject_1, templateObject_2, templateObject_3, templateObject_4;
|
|
@@ -1,2 +1,16 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AutocompleteInputDefault = void 0;
|
|
4
|
+
exports.AutocompleteInputDefault = {
|
|
5
|
+
hasError: false,
|
|
6
|
+
label: "Label",
|
|
7
|
+
type: "text",
|
|
8
|
+
width: "370px",
|
|
9
|
+
dropdownMaxHeight: "370px",
|
|
10
|
+
value: null,
|
|
11
|
+
noResultTemplate: "No Result",
|
|
12
|
+
onBlur: function (e) { },
|
|
13
|
+
onKeyUp: function (e) { },
|
|
14
|
+
onKeyDown: function (e) { },
|
|
15
|
+
autoComplete: '',
|
|
16
|
+
};
|
|
@@ -15,11 +15,11 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
18
|
+
var props_1 = require("./../../props");
|
|
18
19
|
var belt_styled_1 = require("./belt.styled");
|
|
19
20
|
var Icon_1 = __importDefault(require("../../../Icon/Icon"));
|
|
20
|
-
var Belt = function (
|
|
21
|
-
var title =
|
|
22
|
-
return ((0, jsx_runtime_1.jsxs)(belt_styled_1.BadgesStyled, __assign({ "$hasResponsive":
|
|
21
|
+
var Belt = function (_a) {
|
|
22
|
+
var _b = _a.title, title = _b === void 0 ? props_1.BadgesDefault.title : _b, _c = _a.size, size = _c === void 0 ? props_1.BadgesDefault.size : _c, _d = _a.hasResponsive, hasResponsive = _d === void 0 ? props_1.BadgesDefault.hasResponsive : _d;
|
|
23
|
+
return ((0, jsx_runtime_1.jsxs)(belt_styled_1.BadgesStyled, __assign({ "$hasResponsive": hasResponsive, "$size": size }, { children: [(0, jsx_runtime_1.jsx)(Icon_1.default, { name: "Rectangle", width: size === "small" ? "56px" : "90px", height: size === "small" ? "56px" : "90px" }), (0, jsx_runtime_1.jsx)("div", __assign({ className: "text" }, { children: title }))] })));
|
|
23
24
|
};
|
|
24
|
-
Belt.defaultProps = {};
|
|
25
25
|
exports.default = Belt;
|
|
@@ -16,12 +16,13 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
18
18
|
var react_1 = require("react");
|
|
19
|
+
var props_1 = require("./../../props");
|
|
19
20
|
var dark_styled_1 = require("./dark.styled");
|
|
20
21
|
var Icon_1 = __importDefault(require("../../../Icon/Icon"));
|
|
21
|
-
var Belt = function (
|
|
22
|
-
var size =
|
|
23
|
-
var
|
|
24
|
-
var
|
|
22
|
+
var Belt = function (_a) {
|
|
23
|
+
var _b = _a.size, size = _b === void 0 ? props_1.BadgesDefault.size : _b, _c = _a.left, left = _c === void 0 ? props_1.BadgesDefault.left : _c, _d = _a.top, top = _d === void 0 ? props_1.BadgesDefault.top : _d;
|
|
24
|
+
var _e = (0, react_1.useState)("24px"), width = _e[0], setWidth = _e[1];
|
|
25
|
+
var _f = (0, react_1.useState)("24px"), height = _f[0], setHeight = _f[1];
|
|
25
26
|
(0, react_1.useEffect)(function () {
|
|
26
27
|
if (size === 'xsmall') {
|
|
27
28
|
setWidth("24px");
|
|
@@ -40,7 +41,6 @@ var Belt = function (props) {
|
|
|
40
41
|
setHeight("80px");
|
|
41
42
|
}
|
|
42
43
|
}, [size]);
|
|
43
|
-
return ((0, jsx_runtime_1.jsx)(dark_styled_1.DarkStyled, __assign({ "$left":
|
|
44
|
+
return ((0, jsx_runtime_1.jsx)(dark_styled_1.DarkStyled, __assign({ "$left": left, "$top": top }, { children: (0, jsx_runtime_1.jsx)(Icon_1.default, { name: "DarkBadge", width: width, height: height }) })));
|
|
44
45
|
};
|
|
45
|
-
Belt.defaultProps = {};
|
|
46
46
|
exports.default = Belt;
|