albinasoft-ui-package 1.0.77 → 1.0.79
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.
@@ -7,7 +7,7 @@
|
|
7
7
|
.react-datepicker__year-read-view--down-arrow,
|
8
8
|
.react-datepicker__month-read-view--down-arrow,
|
9
9
|
.react-datepicker__month-year-read-view--down-arrow {
|
10
|
-
border-color: var(--bs-
|
10
|
+
border-color: var(--bs-body-color);
|
11
11
|
border-style: solid;
|
12
12
|
border-width: 3px 3px 0 0;
|
13
13
|
content: "";
|
@@ -28,7 +28,7 @@
|
|
28
28
|
font-family: var(--bs-body-font-family, "Helvetica Neue", Helvetica, Arial, sans-serif);
|
29
29
|
font-size: 0.8rem;
|
30
30
|
background-color: var(--bs-body-bg);
|
31
|
-
color: var(--bs-
|
31
|
+
color: var(--bs-text-primary);
|
32
32
|
border: 1px solid var(--bs-border-color);
|
33
33
|
border-radius: var(--bs-border-radius);
|
34
34
|
display: inline-block;
|
@@ -38,12 +38,14 @@
|
|
38
38
|
|
39
39
|
/* Zaman Seçimi */
|
40
40
|
.react-datepicker--time-only .react-datepicker__time-container {
|
41
|
+
height:auto;
|
41
42
|
border-left: 0;
|
42
43
|
}
|
43
44
|
.react-datepicker--time-only .react-datepicker__time,
|
44
45
|
.react-datepicker--time-only .react-datepicker__time-box {
|
45
46
|
border-bottom-left-radius: 0.3rem;
|
46
47
|
border-bottom-right-radius: 0.3rem;
|
48
|
+
height: auto;
|
47
49
|
}
|
48
50
|
|
49
51
|
.react-datepicker-popper {
|
@@ -54,8 +56,8 @@
|
|
54
56
|
stroke: var(--bs-border-color);
|
55
57
|
}
|
56
58
|
.react-datepicker-popper[data-placement^="bottom"] .react-datepicker__triangle {
|
57
|
-
fill: var(--bs-
|
58
|
-
color: var(--bs-
|
59
|
+
fill: var(--bs-body-bg);
|
60
|
+
color: var(--bs-body-bg);
|
59
61
|
}
|
60
62
|
.react-datepicker-popper[data-placement^="top"] .react-datepicker__triangle {
|
61
63
|
fill: var(--bs-white);
|
@@ -99,7 +101,7 @@
|
|
99
101
|
.react-datepicker-time__header,
|
100
102
|
.react-datepicker-year-header {
|
101
103
|
margin-top: 0;
|
102
|
-
color: var(--bs-
|
104
|
+
color: var(--bs-text-primary);
|
103
105
|
font-weight: bold;
|
104
106
|
font-size: 0.944rem;
|
105
107
|
}
|
@@ -247,7 +249,7 @@ h2.react-datepicker__current-month {
|
|
247
249
|
/* Zaman Kutucuğu */
|
248
250
|
.react-datepicker__time-container {
|
249
251
|
float: right;
|
250
|
-
border-left: 1px solid var(--bs-border-color);
|
252
|
+
/* border-left: 1px solid var(--bs-border-color); */
|
251
253
|
width: 85px;
|
252
254
|
}
|
253
255
|
.react-datepicker__time-container--with-today-button {
|
@@ -260,7 +262,7 @@ h2.react-datepicker__current-month {
|
|
260
262
|
}
|
261
263
|
.react-datepicker__time-container .react-datepicker__time {
|
262
264
|
position: relative;
|
263
|
-
background: var(--bs-
|
265
|
+
background: var(--bs-body-bg) !important;
|
264
266
|
border-bottom-right-radius: 0.3rem;
|
265
267
|
}
|
266
268
|
.react-datepicker__time-container .react-datepicker__time .react-datepicker__time-box {
|
@@ -273,7 +275,8 @@ h2.react-datepicker__current-month {
|
|
273
275
|
.react-datepicker__time-container .react-datepicker__time .react-datepicker__time-box ul.react-datepicker__time-list {
|
274
276
|
list-style: none;
|
275
277
|
margin: 0;
|
276
|
-
height: calc(
|
278
|
+
/* height: calc(250px + 1.7rem / 2); */
|
279
|
+
height: 250px;
|
277
280
|
overflow-y: scroll;
|
278
281
|
padding-right: 0;
|
279
282
|
padding-left: 0;
|
@@ -284,6 +287,7 @@ h2.react-datepicker__current-month {
|
|
284
287
|
height: 30px;
|
285
288
|
padding: 5px 10px;
|
286
289
|
white-space: nowrap;
|
290
|
+
color: var(--bs-text-primary) !important;
|
287
291
|
}
|
288
292
|
.react-datepicker__time-container .react-datepicker__time .react-datepicker__time-box ul.react-datepicker__time-list li.react-datepicker__time-list-item:hover {
|
289
293
|
cursor: pointer;
|
@@ -334,7 +338,7 @@ h2.react-datepicker__current-month {
|
|
334
338
|
.react-datepicker__day-name,
|
335
339
|
.react-datepicker__day,
|
336
340
|
.react-datepicker__time-name {
|
337
|
-
color: var(--bs-
|
341
|
+
color: var(--bs-text-primary);
|
338
342
|
display: inline-block;
|
339
343
|
width: 1.7rem;
|
340
344
|
line-height: 1.7rem;
|
@@ -552,13 +556,13 @@ h2.react-datepicker__current-month {
|
|
552
556
|
.react-datepicker__month-year-read-view:hover {
|
553
557
|
cursor: pointer;
|
554
558
|
}
|
555
|
-
.react-datepicker__year-read-view:hover .react-datepicker__year-read-view--down-arrow,
|
559
|
+
/* .react-datepicker__year-read-view:hover .react-datepicker__year-read-view--down-arrow,
|
556
560
|
.react-datepicker__month-read-view:hover .react-datepicker__year-read-view--down-arrow,
|
557
561
|
.react-datepicker__month-read-view:hover .react-datepicker__month-read-view--down-arrow,
|
558
562
|
.react-datepicker__month-year-read-view:hover .react-datepicker__year-read-view--down-arrow,
|
559
563
|
.react-datepicker__month-year-read-view:hover .react-datepicker__month-read-view--down-arrow {
|
560
564
|
border-top-color: var(--bs-gray-400, var(--bs-gray, rgb(178,178,178)));
|
561
|
-
}
|
565
|
+
} */
|
562
566
|
.react-datepicker__year-read-view--down-arrow,
|
563
567
|
.react-datepicker__month-read-view--down-arrow,
|
564
568
|
.react-datepicker__month-year-read-view--down-arrow {
|
@@ -571,7 +575,8 @@ h2.react-datepicker__current-month {
|
|
571
575
|
.react-datepicker__year-dropdown,
|
572
576
|
.react-datepicker__month-dropdown,
|
573
577
|
.react-datepicker__month-year-dropdown {
|
574
|
-
background-color: var(--bs-
|
578
|
+
background-color: var(--bs-body-bg) !important;
|
579
|
+
border: 1px solid var(--bs-border-color) !important;
|
575
580
|
position: absolute;
|
576
581
|
width: 50%;
|
577
582
|
left: 25%;
|
@@ -579,7 +584,6 @@ h2.react-datepicker__current-month {
|
|
579
584
|
z-index: 1;
|
580
585
|
text-align: center;
|
581
586
|
border-radius: 0.3rem;
|
582
|
-
border: 1px solid var(--bs-border-color);
|
583
587
|
}
|
584
588
|
.react-datepicker__year-dropdown:hover,
|
585
589
|
.react-datepicker__month-dropdown:hover,
|
@@ -597,6 +601,7 @@ h2.react-datepicker__current-month {
|
|
597
601
|
.react-datepicker__year-option,
|
598
602
|
.react-datepicker__month-option,
|
599
603
|
.react-datepicker__month-year-option {
|
604
|
+
color: var(--bs-text-primary) !important;
|
600
605
|
line-height: 20px;
|
601
606
|
width: 100%;
|
602
607
|
display: block;
|
@@ -754,7 +759,7 @@ h2.react-datepicker__current-month {
|
|
754
759
|
right: 8px;
|
755
760
|
top: 70%;
|
756
761
|
transform: translateY(-50%) rotate(-135deg);
|
757
|
-
border: solid var(--bs-
|
762
|
+
border: solid var(--bs-body-color);
|
758
763
|
border-width: 0 2px 2px 0;
|
759
764
|
display: inline-block;
|
760
765
|
width: 15px;
|
@@ -766,7 +771,7 @@ h2.react-datepicker__current-month {
|
|
766
771
|
right: 8px;
|
767
772
|
top: 30%;
|
768
773
|
transform: translateY(-50%) rotate(45deg);
|
769
|
-
border: solid var(--bs-
|
774
|
+
border: solid var(--bs-body-color);
|
770
775
|
border-width: 0 2px 2px 0;
|
771
776
|
display: inline-block;
|
772
777
|
width: 15px;
|
@@ -25,6 +25,7 @@ interface CustomDateTimePickerProps {
|
|
25
25
|
showYearDropdown?: boolean;
|
26
26
|
timeFormat?: TimeFormat;
|
27
27
|
timeIntervals?: number;
|
28
|
+
submitted?: boolean;
|
28
29
|
onChange: (date: Date | null) => void;
|
29
30
|
}
|
30
31
|
declare const CustomDateTimePicker: React.FC<CustomDateTimePickerProps>;
|
@@ -21,18 +21,25 @@ var customTrLocale = {
|
|
21
21
|
localize: {
|
22
22
|
month: function (n) {
|
23
23
|
var months = [
|
24
|
-
"Ocak",
|
25
|
-
"
|
24
|
+
"Ocak",
|
25
|
+
"Şubat",
|
26
|
+
"Mart",
|
27
|
+
"Nisan",
|
28
|
+
"Mayıs",
|
29
|
+
"Haziran",
|
30
|
+
"Temmuz",
|
31
|
+
"Ağustos",
|
32
|
+
"Eylül",
|
33
|
+
"Ekim",
|
34
|
+
"Kasım",
|
35
|
+
"Aralık",
|
26
36
|
];
|
27
37
|
return months[n];
|
28
38
|
},
|
29
39
|
day: function (n) {
|
30
|
-
var days = [
|
31
|
-
"Pzr", "Pts", "Sal", "Çrş", "Prş", "Cum", "Cts"
|
32
|
-
];
|
40
|
+
var days = ["Pzr", "Pts", "Sal", "Çrş", "Prş", "Cum", "Cts"];
|
33
41
|
return days[n];
|
34
42
|
},
|
35
|
-
// Diğer lokalizasyon fonksiyonları eklenebilir
|
36
43
|
},
|
37
44
|
formatLong: {
|
38
45
|
date: function () { return "dd.MM.yyyy"; },
|
@@ -40,18 +47,20 @@ var customTrLocale = {
|
|
40
47
|
dateTime: function () { return "dd.MM.yyyy HH:mm"; },
|
41
48
|
},
|
42
49
|
options: {
|
43
|
-
weekStartsOn: 1
|
44
|
-
}
|
50
|
+
weekStartsOn: 1,
|
51
|
+
},
|
45
52
|
};
|
46
53
|
var CustomDateTimePicker = function (_a) {
|
47
|
-
var id = _a.id, name = _a.name, label = _a.label, value = _a.value, placeholder = _a.placeholder, _b = _a.required, required = _b === void 0 ? false : _b, errorMessage = _a.errorMessage, _c = _a.conditionalErrorVisible, conditionalErrorVisible = _c === void 0 ? false : _c, conditionalErrorMessage = _a.conditionalErrorMessage, tooltip = _a.tooltip, description = _a.description, _d = _a.disabled, disabled = _d === void 0 ? false : _d, className = _a.className, style = _a.style, showTimeSelect = _a.showTimeSelect, showTimeSelectOnly = _a.showTimeSelectOnly, showYearDropdown = _a.showYearDropdown, _e = _a.timeFormat, timeFormat = _e === void 0 ? TimeFormat.HM : _e, timeIntervals = _a.timeIntervals, onChange = _a.onChange;
|
54
|
+
var id = _a.id, name = _a.name, label = _a.label, value = _a.value, placeholder = _a.placeholder, _b = _a.required, required = _b === void 0 ? false : _b, errorMessage = _a.errorMessage, _c = _a.conditionalErrorVisible, conditionalErrorVisible = _c === void 0 ? false : _c, conditionalErrorMessage = _a.conditionalErrorMessage, tooltip = _a.tooltip, description = _a.description, _d = _a.disabled, disabled = _d === void 0 ? false : _d, className = _a.className, style = _a.style, showTimeSelect = _a.showTimeSelect, showTimeSelectOnly = _a.showTimeSelectOnly, showYearDropdown = _a.showYearDropdown, _e = _a.timeFormat, timeFormat = _e === void 0 ? TimeFormat.HM : _e, timeIntervals = _a.timeIntervals, submitted = _a.submitted, onChange = _a.onChange;
|
55
|
+
// Eğer form gönderildiyse ve required field boşsa hata durumu geçerli olsun.
|
56
|
+
var isInvalid = submitted && required && !value;
|
48
57
|
return (react_1.default.createElement("div", { className: "col-12", style: style },
|
49
58
|
react_1.default.createElement("div", { className: "form-group" },
|
50
59
|
react_1.default.createElement("label", { htmlFor: id, className: "form-label" }, label),
|
51
60
|
react_1.default.createElement("div", { className: "position-relative" },
|
52
61
|
react_1.default.createElement(react_bootstrap_1.OverlayTrigger, { placement: "bottom", overlay: tooltip ? (react_1.default.createElement(react_bootstrap_1.Tooltip, { id: "tooltip-".concat(id) }, tooltip)) : (react_1.default.createElement(react_1.default.Fragment, null)) },
|
53
62
|
react_1.default.createElement("div", null,
|
54
|
-
react_1.default.createElement(react_datepicker_1.default, { id: id, name: name, selected: value, onChange: onChange, className: "form-control ".concat(className || ""), placeholderText: placeholder, disabled: disabled, required: required, showTimeSelect: showTimeSelect || false, showTimeSelectOnly: showTimeSelectOnly || false, showYearDropdown: showYearDropdown || false, showTimeCaption: false, timeFormat: timeFormat, locale: customTrLocale, dateFormat: showTimeSelectOnly
|
63
|
+
react_1.default.createElement(react_datepicker_1.default, { id: id, name: name, selected: value, onChange: onChange, className: "form-control ".concat(className || "", " ").concat(submitted ? (isInvalid ? "is-invalid" : "is-valid") : ""), placeholderText: placeholder, disabled: disabled, required: required, showTimeSelect: showTimeSelect || false, showTimeSelectOnly: showTimeSelectOnly || false, showYearDropdown: showYearDropdown || false, showTimeCaption: false, timeFormat: timeFormat, locale: customTrLocale, dateFormat: showTimeSelectOnly
|
55
64
|
? timeFormat
|
56
65
|
: showTimeSelect
|
57
66
|
? "dd.MM.yyyy HH:mm"
|
@@ -62,11 +71,11 @@ var CustomDateTimePicker = function (_a) {
|
|
62
71
|
: timeIntervals
|
63
72
|
? timeIntervals
|
64
73
|
: 30 }))),
|
65
|
-
|
74
|
+
react_1.default.createElement("div", { className: "invalid-feedback text-danger mt-2 ".concat(isInvalid ? "d-flex" : "") },
|
66
75
|
react_1.default.createElement("div", { className: "description-icon" },
|
67
76
|
react_1.default.createElement(fa_1.FaExclamationTriangle, null)),
|
68
77
|
react_1.default.createElement("div", { className: "description-text" },
|
69
|
-
react_1.default.createElement("span", null, errorMessage || "
|
78
|
+
react_1.default.createElement("span", null, errorMessage || "Tarih seçimi zorunludur."))),
|
70
79
|
conditionalErrorVisible && (react_1.default.createElement("div", { className: "conditional-error-message text-warning mt-2" },
|
71
80
|
react_1.default.createElement("div", { className: "description-icon" },
|
72
81
|
react_1.default.createElement(fa_1.FaExclamationTriangle, null)),
|