allaw-ui 5.0.7 → 5.0.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,34 +1,34 @@
1
1
  import React from "react";
2
2
  import styles from "./entityCard.module.css";
3
+ import TertiaryButton from "../../atoms/buttons/TertiaryButton";
4
+ import TinyInfo from "../../atoms/typography/TinyInfo";
3
5
  var ActionButton = function (_a) {
4
6
  var type = _a.type, action = _a.action;
5
7
  var elements = {
6
8
  QUIT: {
7
9
  text: "Quitter l'organisation",
8
10
  icon: "allaw-icon-close",
9
- color: "#E15151",
11
+ color: "actions-error",
10
12
  },
11
13
  REQUEST: {
12
14
  text: "Demander à rejoindre",
13
15
  icon: "allaw-icon-arrow-right",
14
- color: "#25BEEB",
16
+ color: "bleu-allaw",
15
17
  },
16
18
  REMOVE_REQUEST: {
17
19
  text: "Annuler la demande",
18
20
  icon: "allaw-icon-close",
19
- color: "#E15151",
21
+ color: "actions-error",
20
22
  },
21
23
  NONE: {
22
24
  text: "",
23
25
  icon: "",
24
- color: "",
26
+ color: "noir",
25
27
  },
26
28
  };
27
- return (React.createElement("button", { style: { color: elements[type].color }, className: styles.actionButton, onClick: function () {
29
+ return (React.createElement(TertiaryButton, { label: elements[type].text, endIcon: elements[type].icon, color: elements[type].color, variant: true, onClick: function () {
28
30
  action && action();
29
- } },
30
- elements[type].text,
31
- React.createElement("i", { className: elements[type].icon })));
31
+ } }));
32
32
  };
33
33
  function EntityCard(_a) {
34
34
  var entityName = _a.entityName, numberOfMembers = _a.numberOfMembers, formatedAddress = _a.formatedAddress, immat = _a.immat, actionType = _a.actionType, onActionButtonClick = _a.onActionButtonClick, onCardClick = _a.onCardClick;
@@ -38,16 +38,11 @@ function EntityCard(_a) {
38
38
  React.createElement("div", { className: styles.dataInfo },
39
39
  React.createElement("div", { className: styles.basicsInfo },
40
40
  React.createElement("span", { className: styles.entityName }, entityName),
41
- React.createElement("span", { className: styles.numberOfMembers }, formatedAddress)),
42
- React.createElement("div", { className: styles.detailsInfo },
43
- React.createElement("span", { className: styles.detail },
44
- React.createElement("i", { className: "allaw-icon-users" }),
45
- numberOfMembers,
46
- " membre",
47
- numberOfMembers > 1 ? "s" : ""),
48
- React.createElement("span", { className: styles.detail },
49
- React.createElement("i", { className: "allaw-icon-prestation" }),
50
- immat))),
41
+ React.createElement(TinyInfo, { variant: "medium14", color: "dark-grey", text: formatedAddress || "", startIcon: "allaw-icon-map-pin", align: "left" })),
42
+ React.createElement("div", { className: styles.detailsInfoContainer },
43
+ React.createElement("div", { className: styles.detailsInfo },
44
+ React.createElement(TinyInfo, { variant: "medium14", color: "dark-grey", text: "".concat(numberOfMembers, " membre").concat(numberOfMembers > 1 ? "s" : ""), startIcon: "allaw-icon-users", align: "left" }),
45
+ React.createElement(TinyInfo, { variant: "medium14", color: "dark-grey", text: immat || "", startIcon: "allaw-icon-prestation", align: "left" })))),
51
46
  actionType != "NONE" && (React.createElement(ActionButton, { type: actionType, action: onActionButtonClick }))));
52
47
  }
53
48
  export default EntityCard;
@@ -38,8 +38,6 @@
38
38
  flex-direction: column;
39
39
  gap: 0.25rem;
40
40
  align-items: start;
41
- flex: 1;
42
- min-width: 200px;
43
41
  }
44
42
 
45
43
  .entityName {
@@ -72,13 +70,24 @@
72
70
  white-space: nowrap;
73
71
  }
74
72
 
75
- .detailsInfo {
73
+ .detailsInfoContainer {
76
74
  display: flex;
77
- flex-direction: row;
78
- gap: 1rem;
75
+ flex-direction: column;
76
+ /* gap: 1rem; */
79
77
  align-items: center;
80
78
  flex-wrap: wrap;
81
79
  flex-shrink: 0;
80
+ flex: 1;
81
+ }
82
+ .detailsInfo {
83
+ display: flex;
84
+ flex-direction: column;
85
+ /* gap: 1rem; */
86
+ align-items: flex-start;
87
+ flex-wrap: wrap;
88
+ flex-shrink: 0;
89
+ flex: 1;
90
+ gap: 0.4rem;
82
91
  }
83
92
 
84
93
  .detail {
@@ -121,6 +130,11 @@
121
130
  font-size: 12px;
122
131
  }
123
132
 
133
+ .actionButtonWrapper {
134
+ margin-left: auto;
135
+ flex-shrink: 0;
136
+ }
137
+
124
138
  /* Media queries pour la responsivité */
125
139
  @media (max-width: 820px) {
126
140
  .card {
@@ -131,12 +145,12 @@
131
145
  gap: 1.5rem;
132
146
  }
133
147
 
134
- .detailsInfo {
148
+ /* .detailsInfo {
135
149
  gap: 0.75rem;
136
- }
150
+ } */
137
151
  }
138
152
 
139
- @media (max-width: 640px) {
153
+ @media (max-width: 740px) {
140
154
  .card {
141
155
  flex-direction: column;
142
156
  align-items: flex-start;
@@ -201,3 +215,27 @@
201
215
  padding: 6px 10px;
202
216
  }
203
217
  }
218
+
219
+ /* @media (max-width: 941px) {
220
+ .detailsInfoContainer {
221
+ align-items: flex-start;
222
+ }
223
+ } */
224
+
225
+ @media (max-width: 940px) {
226
+ .detailsInfoContainer {
227
+ align-items: flex-start;
228
+ }
229
+ }
230
+
231
+ @media (max-width: 600px) {
232
+ .actionButtonWrapper {
233
+ margin-left: 0;
234
+ width: 100%;
235
+ order: 10;
236
+ }
237
+
238
+ .card {
239
+ flex-wrap: wrap;
240
+ }
241
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "allaw-ui",
3
- "version": "5.0.7",
3
+ "version": "5.0.8",
4
4
  "description": "Composants UI pour l'application Allaw",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.esm.js",