allaw-ui 0.1.39 → 0.1.42

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.
@@ -4,6 +4,7 @@ import "../../../styles/global.css";
4
4
  export interface IconButtonProps {
5
5
  style: "smallFilled" | "largeFilled" | "mediumOutline" | "iconOnly";
6
6
  iconName: string;
7
+ color?: string;
7
8
  onClick?: () => void;
8
9
  }
9
10
  declare const IconButton: React.FC<IconButtonProps>;
@@ -2,8 +2,8 @@ import React from "react";
2
2
  import "./IconButton.css";
3
3
  import "../../../styles/global.css";
4
4
  var IconButton = function (_a) {
5
- var style = _a.style, iconName = _a.iconName, onClick = _a.onClick;
6
- return (React.createElement("button", { className: "icon-button ".concat(style), onClick: onClick },
5
+ var style = _a.style, iconName = _a.iconName, _b = _a.color, color = _b === void 0 ? "var(--secondary-light-grey, #f4f7fb)" : _b, onClick = _a.onClick;
6
+ return (React.createElement("button", { className: "icon-button ".concat(style), onClick: onClick, style: { backgroundColor: color } },
7
7
  React.createElement("i", { className: "icon ".concat(iconName) })));
8
8
  };
9
9
  IconButton.defaultProps = {
@@ -0,0 +1,54 @@
1
+ @import "../../../styles/colors.css";
2
+
3
+ .case-card-link {
4
+ display: flex;
5
+
6
+ align-items: flex-start;
7
+ align-self: stretch;
8
+ border-radius: 8px;
9
+ background: var(--Primary-Light-grey, #F4F7FB);
10
+ display: flex;
11
+ padding: 16px;
12
+ align-items: center;
13
+ gap: 16px;
14
+ }
15
+
16
+ .case-card-link-right {
17
+ display: flex;
18
+ flex-direction: column;
19
+ justify-content: flex-end;
20
+ align-items: flex-start;
21
+ flex: 1 0 0;
22
+ }
23
+
24
+ .case-card-link-folder-icon {
25
+ border-radius: 8px;
26
+ background: rgba(255, 255, 255, 0.90);
27
+ display: flex;
28
+ padding: 12px 14px;
29
+ flex-direction: column;
30
+ justify-content: center;
31
+ align-items: center;
32
+ align-self: stretch;
33
+ }
34
+
35
+ .case-card-link-info-row {
36
+ display: flex;
37
+ width: 100%;
38
+ flex-direction: row;
39
+ justify-content: space-between;
40
+ }
41
+
42
+ .case-card-link-info-row-bottom {
43
+ display: flex;
44
+ width: 100%;
45
+ flex-direction: row;
46
+ justify-content: space-between;
47
+ align-items: end;
48
+ }
49
+
50
+ .case-card-link-info-col {
51
+ display: flex;
52
+ flex-direction:column;
53
+ justify-content: space-between;
54
+ }
@@ -0,0 +1,10 @@
1
+ import React from "react";
2
+ import "./CaseLinkCard.css";
3
+ export type CaseLinkCardProps = {
4
+ proName: string;
5
+ caseName: string;
6
+ createdDate: Date;
7
+ onCaseCardClick?: () => any;
8
+ };
9
+ declare function CaseLinkCard({ proName, caseName, createdDate, onCaseCardClick }: CaseLinkCardProps): React.JSX.Element;
10
+ export default CaseLinkCard;
@@ -0,0 +1,29 @@
1
+ import React from "react";
2
+ import "./CaseLinkCard.css";
3
+ import { Paragraph, SmallTitle } from "../../atoms/typography";
4
+ function CaseLinkCard(_a) {
5
+ var proName = _a.proName, caseName = _a.caseName, createdDate = _a.createdDate, onCaseCardClick = _a.onCaseCardClick;
6
+ var formatDate = function (date) {
7
+ return date.toLocaleDateString("fr-FR", {
8
+ day: "2-digit",
9
+ month: "2-digit",
10
+ year: "2-digit",
11
+ });
12
+ };
13
+ var formatProName = function (name) {
14
+ return "Ma\u00EEtre ".concat(name).toUpperCase();
15
+ };
16
+ return React.createElement("div", { className: "case-card-link", onClick: function () { return onCaseCardClick && onCaseCardClick(); }, style: { cursor: onCaseCardClick ? "pointer" : "default" } },
17
+ React.createElement("div", { className: "case-card-link-folder-icon" },
18
+ React.createElement("i", { className: "allaw-icon-folder", style: { fontSize: "20px" } })),
19
+ React.createElement("div", { className: "case-card-link-right" },
20
+ React.createElement("div", { className: "case-card-link-info-row" },
21
+ React.createElement(SmallTitle, { text: "DOSSIER", variant: "semiBold12", color: "dark-grey" }),
22
+ React.createElement(SmallTitle, { text: "Cr\u00E9\u00E9 le ".concat(formatDate(createdDate)), variant: "semiBold12", color: "dark-grey" })),
23
+ React.createElement("div", { className: "case-card-link-info-row-bottom" },
24
+ React.createElement("div", { className: "case-card-link-info-col" },
25
+ React.createElement(Paragraph, { variant: "bold", size: "default", text: caseName, maxLines: 1 }),
26
+ React.createElement(SmallTitle, { variant: "medium12", color: "mid-grey", text: formatProName(proName) })),
27
+ React.createElement("i", { className: "allaw-icon-arrow-right" }))));
28
+ }
29
+ export default CaseLinkCard;
@@ -0,0 +1,2 @@
1
+ export { default as CaseCardLink } from "./CaseLinkCard";
2
+ export type { CaseLinkCardProps } from "./CaseLinkCard";
@@ -0,0 +1 @@
1
+ export { default as CaseCardLink } from "./CaseLinkCard";
@@ -0,0 +1,39 @@
1
+ @import "../../../styles/colors.css";
2
+
3
+ .client-link-card {
4
+ width: 100%;
5
+ display: flex;
6
+ padding: 16px;
7
+ justify-content: space-between;
8
+ align-items: center;
9
+ border-radius: 16px;
10
+ border: 1px solid var(--Primary-Gris-de-fond, #E6EDF5);
11
+ background: var(--Primary-Blanc, #FFF);
12
+ }
13
+ .client-link-card-left {
14
+
15
+ display: flex;
16
+ flex-direction: column;
17
+ align-items: start;
18
+ justify-content: space-between;
19
+ gap: 8px;
20
+
21
+ }
22
+ .client-link-card-right {
23
+ display: flex;
24
+ flex-direction: column;
25
+ align-items: flex-end;
26
+ justify-content: center;
27
+ gap: 8px;
28
+
29
+ }
30
+
31
+ .client-link-card-office-tag {
32
+ font-size: 14px;
33
+ font-family: "Open Sans", sans-serif;
34
+ font-weight: 600;
35
+ padding: 8px 10px;
36
+ border-radius: 8px;
37
+ background-color: var(--Tags-Blanc-tag, #EEF5FC);
38
+ color: var(--Primary-Mid-black, #171E25);
39
+ }
@@ -0,0 +1,12 @@
1
+ import React from "react";
2
+ import "./ClientLinkCard.css";
3
+ import "../../../styles/icons.css";
4
+ export type ClientLinkCardProps = {
5
+ clientFirstName: string;
6
+ clientName: string;
7
+ clientMail: string;
8
+ company?: string;
9
+ onClientCardClick?: () => any;
10
+ };
11
+ declare function ClientLinkCard({ clientFirstName, clientName, clientMail, company, onClientCardClick }: ClientLinkCardProps): React.JSX.Element;
12
+ export default ClientLinkCard;
@@ -0,0 +1,15 @@
1
+ import React from "react";
2
+ import { Paragraph, SmallTitle } from "../../atoms/typography";
3
+ import "./ClientLinkCard.css";
4
+ import "../../../styles/icons.css";
5
+ function ClientLinkCard(_a) {
6
+ var clientFirstName = _a.clientFirstName, clientName = _a.clientName, clientMail = _a.clientMail, company = _a.company, onClientCardClick = _a.onClientCardClick;
7
+ return React.createElement("div", { className: "client-link-card", style: { cursor: onClientCardClick ? "pointer" : "default" }, onClick: function () { return onClientCardClick && onClientCardClick(); } },
8
+ React.createElement("div", { className: "client-link-card-left" },
9
+ React.createElement(Paragraph, { variant: "semiBold", text: "".concat(clientFirstName, " ").concat(clientName === null || clientName === void 0 ? void 0 : clientName.toUpperCase()), size: "default", maxLines: 1, color: "noir" }),
10
+ React.createElement(SmallTitle, { variant: "medium12", color: "mid-grey", text: clientMail === null || clientMail === void 0 ? void 0 : clientMail.toLowerCase() })),
11
+ React.createElement("div", { className: "client-link-card-right" },
12
+ company && React.createElement("span", { className: "client-link-card-office-tag" }, company),
13
+ React.createElement("i", { className: "allaw-icon-arrow-right" })));
14
+ }
15
+ export default ClientLinkCard;
@@ -0,0 +1,2 @@
1
+ export { default as ClientLinkCard } from "./ClientLinkCard";
2
+ export type { ClientLinkCardProps } from "./ClientLinkCard";
@@ -0,0 +1 @@
1
+ export { default as ClientLinkCard } from "./ClientLinkCard";
package/dist/index.d.ts CHANGED
@@ -35,6 +35,8 @@ export { default as Strokes } from "./components/atoms/uiVariables/Strokes";
35
35
  export { default as AppointmentSlot } from "./components/molecules/appointmentSlot/AppointmentSlot";
36
36
  export { default as CaseCard } from "./components/molecules/caseCard/CaseCard";
37
37
  export { default as ContactCard } from "./components/molecules/contactCard/ContactCard";
38
+ export { default as CaseCardLink } from "./components/molecules/caseLinkCard/CaseLinkCard";
39
+ export { default as ClientLinkCard } from "./components/molecules/clientLinkCard/ClientLinkCard";
38
40
  export { default as DocumentCard } from "./components/molecules/documentCard/DocumentCard";
39
41
  export { default as EmployeeCard } from "./components/molecules/employeeCard/EmployeeCard";
40
42
  export { default as Stepper } from "./components/molecules/stepper/Stepper";
package/dist/index.js CHANGED
@@ -47,6 +47,10 @@ export { default as AppointmentSlot } from "./components/molecules/appointmentSl
47
47
  export { default as CaseCard } from "./components/molecules/caseCard/CaseCard";
48
48
  // Contact Card
49
49
  export { default as ContactCard } from "./components/molecules/contactCard/ContactCard";
50
+ // Case Link Card
51
+ export { default as CaseCardLink } from "./components/molecules/caseLinkCard/CaseLinkCard";
52
+ // Case Link Card
53
+ export { default as ClientLinkCard } from "./components/molecules/clientLinkCard/ClientLinkCard";
50
54
  // Document Card
51
55
  export { default as DocumentCard } from "./components/molecules/documentCard/DocumentCard";
52
56
  // Employee Card
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "allaw-ui",
3
- "version": "0.1.39",
3
+ "version": "0.1.42",
4
4
  "description": "Composants UI pour l'application Allaw",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.esm.js",