allaw-ui 1.0.23 → 1.0.25

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.
@@ -34,13 +34,13 @@
34
34
  }
35
35
 
36
36
  /* Style round */
37
- .tab-navigation.round {
37
+ .tab-navigation.tab-navigation--round {
38
38
  padding: 4px;
39
39
  border-radius: 8px;
40
40
  gap: 8px;
41
41
  }
42
42
 
43
- .tab-navigation.round .tab-item {
43
+ .tab-navigation.tab-navigation--round .tab-item {
44
44
  display: flex;
45
45
  padding: 8px 16px;
46
46
  justify-content: center;
@@ -51,7 +51,7 @@
51
51
  border-radius: 6px;
52
52
  }
53
53
 
54
- .tab-navigation.round .tab-item.active {
54
+ .tab-navigation.tab-navigation--round .tab-item.active {
55
55
  background: var(--dark-grey, #456073);
56
56
  color: var(--pure-white, #fff);
57
57
  height: 35px;
@@ -60,12 +60,12 @@
60
60
  border: 0px;
61
61
  }
62
62
 
63
- .tab-navigation.round .tab-item.active:hover {
63
+ .tab-navigation.tab-navigation--round .tab-item.active:hover {
64
64
  background: #3c5364;
65
65
  color: var(--pure-white, #fff);
66
66
  }
67
67
 
68
- .tab-navigation.round .tab-item.inactive {
68
+ .tab-navigation.tab-navigation--round .tab-item.inactive {
69
69
  background: var(--grey-light, #f6fcfe);
70
70
  color: var(--noir, #171e25);
71
71
  height: 35px;
@@ -74,7 +74,7 @@
74
74
  border: 1px solid var(--grey-venom, #e6edf5);
75
75
  }
76
76
 
77
- .tab-navigation.round .tab-item.inactive:hover {
77
+ .tab-navigation.tab-navigation--round .tab-item.inactive:hover {
78
78
  background: var(--grey-venom, #e6edf5);
79
79
  }
80
80
 
@@ -100,6 +100,6 @@
100
100
  top: 7px;
101
101
  }
102
102
 
103
- .tab-navigation.round .tab-notification-dot {
103
+ .tab-navigation.tab-navigation--round .tab-notification-dot {
104
104
  top: 15px;
105
105
  }
@@ -3,7 +3,7 @@ import "./TabNavigation.css";
3
3
  import "../../../styles/global.css";
4
4
  var TabNavigation = function (_a) {
5
5
  var tabs = _a.tabs, onTabClick = _a.onTabClick, _b = _a.size, size = _b === void 0 ? "normal" : _b, _c = _a.variant, variant = _c === void 0 ? "normal" : _c;
6
- return (React.createElement("div", { className: "tab-navigation ".concat(size, " ").concat(variant) }, tabs.map(function (tab, index) { return (React.createElement("div", { key: index, className: "tab-item ".concat(tab.isActive ? "active" : "inactive"), onClick: function () { return onTabClick(index); } },
6
+ return (React.createElement("div", { className: "tab-navigation ".concat(size, " ").concat(variant === "round" ? "tab-navigation--round" : "") }, tabs.map(function (tab, index) { return (React.createElement("div", { key: index, className: "tab-item ".concat(tab.isActive ? "active" : "inactive"), onClick: function () { return onTabClick(index); } },
7
7
  React.createElement("span", { className: "tab-label" }, tab.label),
8
8
  tab.hasNotification && React.createElement("span", { className: "tab-notification-dot" }))); })));
9
9
  };
@@ -6,6 +6,7 @@ export interface DatepickerProps {
6
6
  value?: Date;
7
7
  onChange?: (date: Date) => void;
8
8
  placeholder?: string;
9
+ yearDropdownItemNumber?: number;
9
10
  }
10
11
  declare const Datepicker: React.FC<DatepickerProps>;
11
12
  export default Datepicker;
@@ -1,3 +1,14 @@
1
+ var __assign = (this && this.__assign) || function () {
2
+ __assign = Object.assign || function(t) {
3
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
4
+ s = arguments[i];
5
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
+ t[p] = s[p];
7
+ }
8
+ return t;
9
+ };
10
+ return __assign.apply(this, arguments);
11
+ };
1
12
  import React, { forwardRef, useState, useRef, useEffect } from "react";
2
13
  import ReactDatePicker from "react-datepicker";
3
14
  import ReactDOM from "react-dom";
@@ -8,24 +19,66 @@ import { fr } from "date-fns/locale";
8
19
  import { format } from "date-fns";
9
20
  var CustomInput = forwardRef(function (_a, ref) {
10
21
  var value = _a.value, onClick = _a.onClick, placeholder = _a.placeholder;
22
+ var _b = useState(placeholder), displayedPlaceholder = _b[0], setDisplayedPlaceholder = _b[1];
23
+ var containerRef = useRef(null);
24
+ var testRef = useRef(null);
25
+ useEffect(function () {
26
+ var checkTextFit = function () {
27
+ if (containerRef.current && testRef.current && placeholder) {
28
+ // Élément de test invisible pour mesurer la largeur réelle du texte complet
29
+ testRef.current.style.visibility = "hidden";
30
+ testRef.current.style.position = "absolute";
31
+ testRef.current.textContent = placeholder;
32
+ var containerWidth = containerRef.current.offsetWidth;
33
+ var textWidth = testRef.current.offsetWidth;
34
+ // Ajouter une marge pour l'icône et le padding (40px)
35
+ setDisplayedPlaceholder(textWidth + 40 > containerWidth ? "Date" : placeholder);
36
+ }
37
+ };
38
+ checkTextFit();
39
+ window.addEventListener("resize", checkTextFit);
40
+ return function () { return window.removeEventListener("resize", checkTextFit); };
41
+ }, [placeholder]);
11
42
  return (React.createElement("button", { type: "button", className: "datepicker", onClick: onClick, ref: ref },
12
- React.createElement("span", { className: "datepicker-text" }, value || placeholder),
13
- React.createElement("i", { className: "datepicker-icon allaw-icon-calendar" })));
43
+ React.createElement("span", { className: "datepicker-content", ref: containerRef },
44
+ React.createElement("span", { className: "datepicker-text" }, value || displayedPlaceholder),
45
+ React.createElement("i", { className: "datepicker-icon allaw-icon-calendar" })),
46
+ React.createElement("span", { className: "datepicker-test-text", ref: testRef, "aria-hidden": "true" })));
14
47
  });
15
48
  CustomInput.displayName = "CustomInput";
16
49
  var Datepicker = function (_a) {
17
- var value = _a.value, onChange = _a.onChange, _b = _a.placeholder, placeholder = _b === void 0 ? "Sélectionner une date" : _b;
18
- var _c = useState(value), selectedDate = _c[0], setSelectedDate = _c[1];
19
- var _d = useState(false), isOpen = _d[0], setIsOpen = _d[1];
20
- var _e = useState({ top: 0, left: 0 }), position = _e[0], setPosition = _e[1];
50
+ var value = _a.value, onChange = _a.onChange, _b = _a.placeholder, placeholder = _b === void 0 ? "Sélectionner une date" : _b, _c = _a.yearDropdownItemNumber, yearDropdownItemNumber = _c === void 0 ? 10 : _c;
51
+ var _d = useState(value), selectedDate = _d[0], setSelectedDate = _d[1];
52
+ var _e = useState(false), isOpen = _e[0], setIsOpen = _e[1];
53
+ var _f = useState({ top: 0, left: 0 }), position = _f[0], setPosition = _f[1];
21
54
  var buttonRef = useRef(null);
22
55
  var calendarRef = useRef(null);
56
+ var _g = useState("bottom"), placement = _g[0], setPlacement = _g[1];
23
57
  var updatePosition = function () {
24
58
  if (buttonRef.current) {
25
59
  var rect = buttonRef.current.getBoundingClientRect();
60
+ var windowHeight = window.innerHeight;
61
+ var calendarHeight = 380; // Hauteur approximative du calendrier
62
+ // Vérifier s'il y a assez d'espace en dessous
63
+ var spaceBelow = windowHeight - rect.bottom;
64
+ var shouldShowBelow = spaceBelow >= calendarHeight;
65
+ setPlacement(shouldShowBelow ? "bottom" : "top");
66
+ // Calcul de la position horizontale centrée
67
+ var buttonCenter = rect.left + rect.width / 2;
68
+ var calendarWidth = 300; // Largeur du calendrier (définie dans le CSS)
69
+ var leftPosition = buttonCenter - calendarWidth / 2;
70
+ // Ajuster si le calendrier dépasse de l'écran
71
+ if (leftPosition + calendarWidth > window.innerWidth) {
72
+ leftPosition = window.innerWidth - calendarWidth - 16;
73
+ }
74
+ if (leftPosition < 16) {
75
+ leftPosition = 16;
76
+ }
26
77
  setPosition({
27
- top: rect.bottom + window.scrollY,
28
- left: rect.left + window.scrollX,
78
+ top: shouldShowBelow
79
+ ? rect.bottom + window.scrollY
80
+ : rect.top + window.scrollY,
81
+ left: leftPosition + window.scrollX,
29
82
  });
30
83
  }
31
84
  };
@@ -66,12 +119,10 @@ var Datepicker = function (_a) {
66
119
  document.removeEventListener("mousedown", handleClickOutside);
67
120
  };
68
121
  }, [isOpen]);
69
- var renderCalendar = function () { return (React.createElement("div", { ref: calendarRef, className: "datepicker-portal", style: {
70
- position: "absolute",
71
- top: "".concat(position.top, "px"),
72
- left: "".concat(position.left, "px"),
73
- } },
74
- React.createElement(ReactDatePicker, { selected: selectedDate, onChange: handleDateChange, locale: fr, inline: true, dateFormat: "dd MMMM yyyy", calendarClassName: "custom-calendar", showMonthDropdown: true, showYearDropdown: true, dropdownMode: "select", yearItemNumber: 15, maxDate: new Date() }))); };
122
+ var renderCalendar = function () { return (React.createElement("div", { ref: calendarRef, className: "datepicker-portal ".concat(placement), style: __assign({ left: "".concat(position.left, "px") }, (placement === "bottom"
123
+ ? { top: "".concat(position.top, "px") }
124
+ : { top: "".concat(position.top, "px") })) },
125
+ React.createElement(ReactDatePicker, { selected: selectedDate, onChange: handleDateChange, locale: fr, inline: true, dateFormat: "dd MMMM yyyy", calendarClassName: "custom-calendar", showMonthDropdown: true, showYearDropdown: true, dropdownMode: "select", maxDate: new Date(), minDate: new Date(new Date().setFullYear(new Date().getFullYear() - yearDropdownItemNumber)) }))); };
75
126
  return (React.createElement("div", { className: "datepicker-container", ref: buttonRef },
76
127
  React.createElement(CustomInput, { value: selectedDate
77
128
  ? format(selectedDate, "dd MMMM yyyy", { locale: fr })
@@ -7,15 +7,13 @@
7
7
  display: flex;
8
8
  height: 40px;
9
9
  padding: 8px 16px;
10
- justify-content: center;
10
+ justify-content: space-between;
11
11
  align-items: center;
12
- gap: 8px;
13
- align-self: stretch;
14
12
  border-radius: 8px;
15
13
  background: var(--Primary-Light-grey, #f4f7fb);
16
14
  border: none;
17
15
  cursor: pointer;
18
- min-width: 200px;
16
+ min-width: 120px;
19
17
  width: 100%;
20
18
  }
21
19
 
@@ -23,6 +21,14 @@
23
21
  background: var(--grey-venom, #e6edf5);
24
22
  }
25
23
 
24
+ .datepicker-content {
25
+ display: flex;
26
+ align-items: center;
27
+ gap: 8px;
28
+ width: 100%;
29
+ justify-content: space-between;
30
+ }
31
+
26
32
  .datepicker-text {
27
33
  color: var(--Primary-Mid-black, #171e25);
28
34
  font-family: "Open Sans";
@@ -33,12 +39,22 @@
33
39
  white-space: nowrap;
34
40
  overflow: hidden;
35
41
  text-overflow: ellipsis;
42
+ flex: 1;
36
43
  }
37
44
 
38
45
  .datepicker-icon {
39
46
  color: var(--Primary-Dark-grey, #456073);
40
47
  font-size: 16px;
41
- padding-left: 6px;
48
+ flex-shrink: 0;
49
+ }
50
+
51
+ .datepicker-test-text {
52
+ visibility: hidden;
53
+ position: absolute;
54
+ white-space: nowrap;
55
+ font-family: "Open Sans";
56
+ font-size: 16px;
57
+ font-weight: 700;
42
58
  }
43
59
 
44
60
  /* Customisation du calendrier */
@@ -147,6 +163,15 @@
147
163
  box-shadow: 0px 4px 8px 0px rgba(9, 30, 66, 0.15);
148
164
  }
149
165
 
166
+ .datepicker-portal.top {
167
+ bottom: 8px;
168
+ transform: translateY(-100%);
169
+ }
170
+
171
+ .datepicker-portal.bottom {
172
+ top: 8px;
173
+ }
174
+
150
175
  /* Customisation des flèches de navigation */
151
176
  .react-datepicker__navigation {
152
177
  padding: 8px;
@@ -12,6 +12,7 @@ export interface ContactCardProps {
12
12
  isEditable: boolean;
13
13
  onEdit: () => void;
14
14
  gender: "male" | "female";
15
+ actionIconName?: string;
15
16
  }
16
17
  declare const ContactCard: React.FC<ContactCardProps>;
17
18
  export default ContactCard;
@@ -5,7 +5,7 @@ import IconButton from "../../atoms/buttons/IconButton";
5
5
  import Image from "next/image";
6
6
  var NoPhoto = "/assets/NoPhoto.png";
7
7
  var ContactCard = function (_a) {
8
- var size = _a.size, name = _a.name, birthDate = _a.birthDate, avatarUrl = _a.avatarUrl, status = _a.status, address = _a.address, phone = _a.phone, email = _a.email, onEdit = _a.onEdit, gender = _a.gender;
8
+ var size = _a.size, name = _a.name, birthDate = _a.birthDate, avatarUrl = _a.avatarUrl, status = _a.status, address = _a.address, phone = _a.phone, email = _a.email, onEdit = _a.onEdit, gender = _a.gender, _b = _a.actionIconName, actionIconName = _b === void 0 ? "allaw-icon-edit-2" : _b;
9
9
  var renderContent = function () {
10
10
  switch (size) {
11
11
  case "small":
@@ -73,7 +73,7 @@ var ContactCard = function (_a) {
73
73
  React.createElement("i", { className: "allaw-icon-mail info-icon" }),
74
74
  React.createElement("span", { className: "info-text contact" }, email))))),
75
75
  React.createElement("div", { className: "action-button-container" },
76
- React.createElement(IconButton, { style: "largeFilled", iconName: "allaw-icon-edit-2", onClick: onEdit }))));
76
+ React.createElement(IconButton, { style: "largeFilled", iconName: actionIconName, onClick: onEdit }))));
77
77
  }
78
78
  };
79
79
  return React.createElement("div", { className: "contact-card ".concat(size) }, renderContent());
@@ -1,5 +1,4 @@
1
1
  import React from "react";
2
- import "react-datepicker/dist/react-datepicker.css";
3
2
  import "./datepickerForm.css";
4
3
  import "../../../styles/global.css";
5
4
  export interface DatepickerFormProps {
@@ -9,6 +8,7 @@ export interface DatepickerFormProps {
9
8
  text?: string;
10
9
  variant?: "bold" | "semiBold" | "medium";
11
10
  color?: "bleu-allaw" | "mid-grey" | "dark-grey" | "noir" | "pure-white" | "grey-venom" | "venom-grey-dark";
11
+ yearDropdownItemNumber?: number;
12
12
  }
13
13
  declare const DatepickerForm: React.FC<DatepickerFormProps>;
14
14
  export default DatepickerForm;
@@ -1,84 +1,12 @@
1
- import React, { forwardRef, useState, useRef, useEffect } from "react";
2
- import ReactDatePicker from "react-datepicker";
3
- import ReactDOM from "react-dom";
4
- import "react-datepicker/dist/react-datepicker.css";
1
+ import React from "react";
5
2
  import "./datepickerForm.css";
6
3
  import "../../../styles/global.css";
7
- import { fr } from "date-fns/locale";
8
- import { format } from "date-fns";
9
4
  import Paragraph from "../../atoms/typography/Paragraph";
10
- var CustomInput = forwardRef(function (_a, ref) {
11
- var value = _a.value, onClick = _a.onClick, placeholder = _a.placeholder;
12
- return (React.createElement("button", { type: "button", className: "datepicker-form", onClick: onClick, ref: ref },
13
- React.createElement("span", { className: "datepicker-form-text" }, value || placeholder),
14
- React.createElement("i", { className: "datepicker-form-icon allaw-icon-calendar" })));
15
- });
16
- CustomInput.displayName = "CustomInput";
5
+ import Datepicker from "../../atoms/datepickers/Datepicker";
17
6
  var DatepickerForm = function (_a) {
18
- var value = _a.value, onChange = _a.onChange, _b = _a.placeholder, placeholder = _b === void 0 ? "Sélectionner une date" : _b, text = _a.text, _c = _a.variant, variant = _c === void 0 ? "medium" : _c, _d = _a.color, color = _d === void 0 ? "noir" : _d;
19
- var _e = useState(value), selectedDate = _e[0], setSelectedDate = _e[1];
20
- var _f = useState(false), isOpen = _f[0], setIsOpen = _f[1];
21
- var _g = useState({ top: 0, left: 0 }), position = _g[0], setPosition = _g[1];
22
- var buttonRef = useRef(null);
23
- var calendarRef = useRef(null);
24
- var updatePosition = function () {
25
- if (buttonRef.current) {
26
- var rect = buttonRef.current.getBoundingClientRect();
27
- setPosition({
28
- top: rect.bottom + window.scrollY,
29
- left: rect.left + window.scrollX,
30
- });
31
- }
32
- };
33
- useEffect(function () {
34
- if (isOpen) {
35
- updatePosition();
36
- window.addEventListener("scroll", updatePosition);
37
- window.addEventListener("resize", updatePosition);
38
- }
39
- return function () {
40
- window.removeEventListener("scroll", updatePosition);
41
- window.removeEventListener("resize", updatePosition);
42
- };
43
- }, [isOpen]);
44
- var handleDateChange = function (date) {
45
- if (date) {
46
- setSelectedDate(date);
47
- onChange === null || onChange === void 0 ? void 0 : onChange(date);
48
- setIsOpen(false);
49
- }
50
- };
51
- var handleClickOutside = function (event) {
52
- if (buttonRef.current &&
53
- !buttonRef.current.contains(event.target) &&
54
- calendarRef.current &&
55
- !calendarRef.current.contains(event.target)) {
56
- setIsOpen(false);
57
- }
58
- };
59
- useEffect(function () {
60
- if (isOpen) {
61
- document.addEventListener("mousedown", handleClickOutside);
62
- }
63
- else {
64
- document.removeEventListener("mousedown", handleClickOutside);
65
- }
66
- return function () {
67
- document.removeEventListener("mousedown", handleClickOutside);
68
- };
69
- }, [isOpen]);
70
- var renderCalendar = function () { return (React.createElement("div", { ref: calendarRef, className: "datepicker-form-portal", style: {
71
- position: "absolute",
72
- top: "".concat(position.top, "px"),
73
- left: "".concat(position.left, "px"),
74
- } },
75
- React.createElement(ReactDatePicker, { selected: selectedDate, onChange: handleDateChange, locale: fr, inline: true, dateFormat: "dd MMMM yyyy", calendarClassName: "custom-calendar", showMonthDropdown: true, showYearDropdown: true, dropdownMode: "select", yearItemNumber: 15, maxDate: new Date() }))); };
7
+ var value = _a.value, onChange = _a.onChange, _b = _a.placeholder, placeholder = _b === void 0 ? "Sélectionner une date" : _b, text = _a.text, _c = _a.variant, variant = _c === void 0 ? "medium" : _c, _d = _a.color, color = _d === void 0 ? "noir" : _d, _e = _a.yearDropdownItemNumber, yearDropdownItemNumber = _e === void 0 ? 10 : _e;
76
8
  return (React.createElement("div", { className: "datepicker-form-wrapper" },
77
9
  text && React.createElement(Paragraph, { text: text, variant: variant, color: color }),
78
- React.createElement("div", { className: "datepicker-form-container", ref: buttonRef },
79
- React.createElement(CustomInput, { value: selectedDate
80
- ? format(selectedDate, "dd MMMM yyyy", { locale: fr })
81
- : "", onClick: function () { return setIsOpen(!isOpen); }, placeholder: placeholder }),
82
- isOpen && ReactDOM.createPortal(renderCalendar(), document.body))));
10
+ React.createElement(Datepicker, { value: value, onChange: onChange, placeholder: placeholder, yearDropdownItemNumber: yearDropdownItemNumber })));
83
11
  };
84
12
  export default DatepickerForm;
@@ -1,214 +1,3 @@
1
- .datepicker-form-container {
2
- position: relative;
3
- width: 100%;
4
- }
5
-
6
- .datepicker-form {
7
- display: flex;
8
- height: 40px;
9
- padding: 8px 16px;
10
- justify-content: center;
11
- align-items: center;
12
- gap: 8px;
13
- align-self: stretch;
14
- border-radius: 8px;
15
- background: var(--Primary-Light-grey, #f4f7fb);
16
- border: none;
17
- cursor: pointer;
18
- min-width: 200px;
19
- width: 100%;
20
- }
21
-
22
- .datepicker-form:hover {
23
- background: var(--grey-venom, #e6edf5);
24
- }
25
-
26
- .datepicker-form-text {
27
- color: var(--Primary-Mid-black, #171e25);
28
- font-family: "Open Sans";
29
- font-size: 16px;
30
- font-style: normal;
31
- font-weight: 700;
32
- line-height: normal;
33
- white-space: nowrap;
34
- overflow: hidden;
35
- text-overflow: ellipsis;
36
- }
37
-
38
- .datepicker-form-icon {
39
- color: var(--Primary-Dark-grey, #456073);
40
- font-size: 16px;
41
- padding-left: 6px;
42
- }
43
-
44
- /* Customisation du calendrier */
45
- .custom-calendar {
46
- border: none !important;
47
- font-family: "Open Sans";
48
- font-size: 16px;
49
- width: 300px !important;
50
- padding: 16px;
51
- }
52
-
53
- .react-datepicker-form__month-container {
54
- width: 100%;
55
- }
56
-
57
- .react-datepicker-form__header {
58
- background: white;
59
- border: none;
60
- padding: 0;
61
- }
62
-
63
- .react-datepicker-form__day-names {
64
- display: flex;
65
- justify-content: space-between;
66
- padding: 16px 8px;
67
- }
68
-
69
- .react-datepicker-form__day-name {
70
- color: var(--Primary-Dark-grey, #456073);
71
- font-weight: 600;
72
- width: 36px;
73
- margin: 0;
74
- }
75
-
76
- .react-datepicker-form__month {
77
- margin: 0;
78
- padding: 8px;
79
- }
80
-
81
- .react-datepicker-form__day {
82
- width: 36px;
83
- height: 36px;
84
- line-height: 36px;
85
- margin: 0;
86
- border-radius: 18px;
87
- color: var(--Primary-Dark-grey, #456073);
88
- font-family: "Open Sans";
89
- }
90
-
91
- .react-datepicker-form__day:hover {
92
- background: var(--grey-venom, #e6edf5);
93
- border-radius: 18px;
94
- }
95
-
96
- .react-datepicker-form__day--selected {
97
- background: var(--bleu-allaw, #1985e8) !important;
98
- border-radius: 18px !important;
99
- color: white !important;
100
- }
101
-
102
- .react-datepicker-form__day--keyboard-selected {
103
- background: var(--grey-venom, #e6edf5);
104
- border-radius: 18px;
105
- color: var(--Primary-Mid-black, #171e25);
106
- }
107
-
108
- .react-datepicker-form__day--keyboard-selected:not(
109
- [aria-disabled="true"]
110
- ):hover,
111
- .react-datepicker-form__month-text--keyboard-selected:not(
112
- [aria-disabled="true"]
113
- ):hover,
114
- .react-datepicker-form__quarter-text--keyboard-selected:not(
115
- [aria-disabled="true"]
116
- ):hover,
117
- .react-datepicker-form__year-text--keyboard-selected:not(
118
- [aria-disabled="true"]
119
- ):hover {
120
- background-color: var(--bleu-allaw, #25beeb);
121
- color: white;
122
- border-radius: 18px;
123
- }
124
-
125
- .custom-header {
126
- margin-bottom: 16px;
127
- }
128
-
129
- .year-dropdown,
130
- .month-dropdown {
131
- padding: 8px;
132
- min-width: 100px;
133
- }
134
-
135
- /* Style pour mobile */
136
- @media (max-width: 768px) {
137
- .datepicker-form {
138
- width: 100%;
139
- min-width: unset;
140
- }
141
- }
142
-
143
- .datepicker-form-portal {
144
- position: absolute;
145
- z-index: 9999;
146
- background: white;
147
- border: 1px solid var(--grey-venom, #e6edf5);
148
- border-radius: 8px;
149
- box-shadow: 0px 4px 8px 0px rgba(9, 30, 66, 0.15);
150
- }
151
-
152
- /* Customisation des flèches de navigation */
153
- .react-datepicker-form__navigation {
154
- padding: 8px;
155
- border-radius: 18px;
156
- margin: 8px;
157
- }
158
-
159
- .react-datepicker-form__navigation--previous {
160
- left: 1px;
161
- }
162
-
163
- .react-datepicker-form__navigation--next {
164
- right: 1px;
165
- }
166
-
167
- .react-datepicker-form__navigation:hover {
168
- background: var(--grey-venom, #e6edf5);
169
- border-radius: 18px;
170
- }
171
-
172
- /* Padding pour le mois en cours */
173
- .react-datepicker-form__current-month {
174
- padding-bottom: 18px;
175
- }
176
-
177
- .react-datepicker-form__current-month.react-datepicker-form__current-month--hasYearDropdown.react-datepicker-form__current-month--hasMonthDropdown {
178
- padding-bottom: 16px;
179
- }
180
-
181
- .react-datepicker-form__month-select,
182
- .react-datepicker-form__year-select {
183
- font-size: 16px;
184
- font-family: "Open Sans";
185
- padding: 6px 10px;
186
- border-radius: 8px;
187
- border: 1px solid var(--grey-venom, #e6edf5);
188
- background-color: white;
189
- cursor: pointer;
190
- }
191
-
192
- .react-datepicker-form__month-select:hover,
193
- .react-datepicker-form__year-select:hover {
194
- background: var(--grey-venom, #e6edf5);
195
- }
196
-
197
- .react-datepicker-form__navigation-icon.react-datepicker-form__navigation-icon--previous {
198
- left: 1px;
199
- }
200
-
201
- .react-datepicker-form__navigation-icon.react-datepicker-form__navigation-icon--next {
202
- right: 1px;
203
- }
204
-
205
- .react-datepicker-form__day:not([aria-disabled="true"]):hover,
206
- .react-datepicker-form__month-text:not([aria-disabled="true"]):hover,
207
- .react-datepicker-form__quarter-text:not([aria-disabled="true"]):hover,
208
- .react-datepicker-form__year-text:not([aria-disabled="true"]):hover {
209
- border-radius: 18px;
210
- }
211
-
212
1
  .datepicker-form-wrapper {
213
2
  display: flex;
214
3
  flex-direction: column;
@@ -63,6 +63,10 @@
63
63
  align-items: flex-end;
64
64
  }
65
65
 
66
+ .document-card-icon-eye {
67
+ color: var(--Primary-Mid-black, var(--mid-grey, #728ea7));
68
+ }
69
+
66
70
  /* Styles spécifiques pour le type "waiting" */
67
71
  .document-card.waiting {
68
72
  width: 425px;
@@ -67,6 +67,9 @@ var DocumentCard = function (_a) {
67
67
  React.createElement(Paragraph, { text: title, variant: "semiBold", size: "default", maxLines: 1, color: "noir" }),
68
68
  React.createElement("span", { className: "document-card-date" }, formatDate(date)))),
69
69
  React.createElement("div", { className: "document-card-right" },
70
- React.createElement(OtherStatusTag, { type: "information", label: getStatusName() }))));
70
+ React.createElement("div", { className: "document-card-status" },
71
+ React.createElement(OtherStatusTag, { type: "information", label: getStatusName() })),
72
+ React.createElement("div", { className: "document-card-icon-eye" },
73
+ React.createElement("i", { className: "allaw-icon-eye" })))));
71
74
  };
72
75
  export default DocumentCard;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "allaw-ui",
3
- "version": "1.0.23",
3
+ "version": "1.0.25",
4
4
  "description": "Composants UI pour l'application Allaw",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.esm.js",