allaw-ui 1.0.42 → 1.0.44

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.
@@ -14,7 +14,7 @@ import "../../../styles/global.css";
14
14
  import TinyInfo from "../typography/TinyInfo";
15
15
  function Select(_a, ref) {
16
16
  var _b;
17
- var items = _a.items, selectedItem = _a.selectedItem, _c = _a.placeholder, placeholder = _c === void 0 ? "Select..." : _c, _d = _a.multiple, multiple = _d === void 0 ? false : _d, _e = _a.isRequired, isRequired = _e === void 0 ? false : _e, _f = _a.showError, showError = _f === void 0 ? false : _f, _g = _a.width, width = _g === void 0 ? 100 : _g, onChange = _a.onChange, onError = _a.onError;
17
+ var items = _a.items, selectedItem = _a.selectedItem, _c = _a.placeholder, placeholder = _c === void 0 ? "Choisir..." : _c, _d = _a.multiple, multiple = _d === void 0 ? false : _d, _e = _a.isRequired, isRequired = _e === void 0 ? false : _e, _f = _a.showError, showError = _f === void 0 ? false : _f, _g = _a.width, width = _g === void 0 ? 100 : _g, onChange = _a.onChange, onError = _a.onError;
18
18
  var _h = useState(false), isOpen = _h[0], setIsOpen = _h[1];
19
19
  var _j = useState((multiple ? selectedItem || [] : selectedItem || "")), selected = _j[0], setSelected = _j[1];
20
20
  var _k = useState(""), error = _k[0], setError = _k[1];
@@ -1,39 +1,58 @@
1
1
  @import "../../../styles/colors.css";
2
2
 
3
3
  .client-link-card {
4
- width: 100%;
5
- display: flex;
6
- padding: 16px;
7
- justify-content: space-between;
8
- align-items: end;
9
- border-radius: 16px;
10
- border: 1px solid var(--Primary-Gris-de-fond, #E6EDF5);
11
- background: var(--Primary-Blanc, #FFF);
4
+ width: 100%;
5
+ display: flex;
6
+ padding: 16px;
7
+ justify-content: space-between;
8
+ align-items: flex-start;
9
+ border-radius: 16px;
10
+ border: 1px solid var(--Primary-Gris-de-fond, #e6edf5);
11
+ background: var(--Primary-Blanc, #fff);
12
+ transition: border-color 0.2s ease;
13
+ }
14
+
15
+ .client-link-card:hover {
16
+ border-color: var(--bleu-allaw, #25beeb);
12
17
  }
13
- .client-link-card-left {
14
- display: flex;
15
- flex-direction: column;
16
- align-items: start;
17
- justify-content: space-between;
18
- gap: 8px;
19
18
 
19
+ .client-link-card-left {
20
+ display: flex;
21
+ flex-direction: column;
22
+ align-items: start;
23
+ gap: 8px;
20
24
  }
25
+
21
26
  .client-link-card-right {
22
- display: flex;
23
- flex-direction: column;
24
- align-items: flex-end;
25
- justify-content: flex-end;
26
- height: 100%;
27
- gap: 8px;
27
+ position: relative;
28
+ display: flex;
29
+ flex-direction: column;
30
+ align-items: flex-end;
31
+ gap: 8px;
32
+ min-height: 45px;
33
+ }
28
34
 
35
+ .client-link-card-right--centered .client-link-card-arrow {
36
+ position: absolute;
37
+ top: 50%;
38
+ transform: translateY(-50%);
29
39
  }
30
40
 
31
41
  .client-link-card-office-tag {
32
- font-size: 13px;
33
- font-family: "Open Sans", sans-serif;
34
- font-weight: 600;
35
- padding: 6px 8px;
36
- border-radius: 8px;
37
- background-color: var(--Tags-Blanc-tag, #EEF5FC);
38
- color: var(--Primary-Mid-black, #171E25);
39
- }
42
+ font-size: 13px;
43
+ font-family: "Open Sans", sans-serif;
44
+ font-weight: 600;
45
+ padding: 6px 8px;
46
+ border-radius: 8px;
47
+ background-color: var(--Tags-Blanc-tag, #eef5fc);
48
+ color: var(--Primary-Mid-black, #171e25);
49
+ }
50
+
51
+ .client-link-card--arrow-on-hover .client-link-card-arrow {
52
+ opacity: 0;
53
+ transition: opacity 0.2s ease;
54
+ }
55
+
56
+ .client-link-card--arrow-on-hover:hover .client-link-card-arrow {
57
+ opacity: 1;
58
+ }
@@ -7,7 +7,8 @@ export type ClientLinkCardProps = {
7
7
  clientMail: string;
8
8
  isLoading?: boolean;
9
9
  company?: string;
10
+ showArrowOnHover?: boolean;
10
11
  onClientCardClick?: () => any;
11
12
  };
12
- declare function ClientLinkCard({ clientFirstName, isLoading, clientName, clientMail, company, onClientCardClick, }: ClientLinkCardProps): React.JSX.Element;
13
+ declare function ClientLinkCard({ clientFirstName, isLoading, clientName, clientMail, company, showArrowOnHover, onClientCardClick, }: ClientLinkCardProps): React.JSX.Element;
13
14
  export default ClientLinkCard;
@@ -4,13 +4,13 @@ import "./ClientLinkCard.css";
4
4
  import "../../../styles/icons.css";
5
5
  import LoadingBox from "../loadingBox/LoadingBox";
6
6
  function ClientLinkCard(_a) {
7
- var clientFirstName = _a.clientFirstName, isLoading = _a.isLoading, clientName = _a.clientName, clientMail = _a.clientMail, company = _a.company, onClientCardClick = _a.onClientCardClick;
8
- return !isLoading ? (React.createElement("div", { className: "client-link-card", style: { cursor: onClientCardClick ? "pointer" : "default" }, onClick: function () { return onClientCardClick && onClientCardClick(); } },
7
+ var clientFirstName = _a.clientFirstName, isLoading = _a.isLoading, clientName = _a.clientName, clientMail = _a.clientMail, company = _a.company, _b = _a.showArrowOnHover, showArrowOnHover = _b === void 0 ? false : _b, onClientCardClick = _a.onClientCardClick;
8
+ return !isLoading ? (React.createElement("div", { className: "client-link-card ".concat(showArrowOnHover ? "client-link-card--arrow-on-hover" : ""), style: { cursor: onClientCardClick ? "pointer" : "default" }, onClick: function () { return onClientCardClick && onClientCardClick(); } },
9
9
  React.createElement("div", { className: "client-link-card-left" },
10
10
  React.createElement(Paragraph, { variant: "semiBold", text: "".concat(clientFirstName, " ").concat(clientName === null || clientName === void 0 ? void 0 : clientName.toUpperCase()), size: "default", maxLines: 1, color: "noir" }),
11
11
  React.createElement(SmallTitle, { variant: "medium12", color: "mid-grey", text: clientMail === null || clientMail === void 0 ? void 0 : clientMail.toLowerCase() })),
12
- React.createElement("div", { className: "client-link-card-right" },
12
+ React.createElement("div", { className: "client-link-card-right ".concat(!company ? "client-link-card-right--centered" : "") },
13
13
  company && (React.createElement("span", { className: "client-link-card-office-tag" }, company)),
14
- React.createElement("i", { className: "allaw-icon-arrow-right" })))) : (React.createElement(LoadingBox, { boxHeight: "91px", boxRadius: "16px", boxWidth: "100%" }));
14
+ React.createElement("i", { className: "allaw-icon-arrow-right client-link-card-arrow" })))) : (React.createElement(LoadingBox, { boxHeight: "91px", boxRadius: "16px", boxWidth: "100%" }));
15
15
  }
16
16
  export default ClientLinkCard;
@@ -345,7 +345,7 @@
345
345
  font-size: 24px;
346
346
  font-style: normal;
347
347
  font-weight: 600;
348
- line-height: 18px;
348
+ line-height: 24px;
349
349
  }
350
350
 
351
351
  .contact-card.editable .info-container {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "allaw-ui",
3
- "version": "1.0.42",
3
+ "version": "1.0.44",
4
4
  "description": "Composants UI pour l'application Allaw",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.esm.js",