allaw-ui 1.0.182 → 2.0.0

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.
@@ -0,0 +1,55 @@
1
+ .animated-border-card {
2
+ width: fit-content;
3
+ height: fit-content;
4
+ border-radius: 5px;
5
+ padding: 1px;
6
+ cursor: pointer;
7
+ }
8
+
9
+ .exemple {
10
+ position: relative;
11
+ overflow: hidden;
12
+ display: flex;
13
+ align-items: center;
14
+ justify-content: center;
15
+ }
16
+
17
+ .exemple::before {
18
+ content: "";
19
+ display: block;
20
+ background: #25beeb;
21
+ height: 150px;
22
+ width: 20px;
23
+ transform: translate(0);
24
+ position: absolute;
25
+ animation: rotate 5s linear forwards infinite;
26
+ z-index: 0;
27
+ top: 50%;
28
+ transform-origin: top center;
29
+ }
30
+
31
+ .animated-border-inner {
32
+ background-color: #f4f7fb;
33
+ z-index: 2;
34
+ border: 1px solid var(--primary-venom-grey, #e6edf5);
35
+ color: #fff;
36
+ border-radius: 4px;
37
+ position: relative;
38
+ width: fit-content;
39
+ height: fit-content;
40
+ display: flex;
41
+ align-items: center;
42
+ justify-content: center;
43
+ color: #171e25;
44
+ padding: 0.5rem 1rem;
45
+ font-family: "Open Sans", sans-serif;
46
+ }
47
+
48
+ @keyframes rotate {
49
+ from {
50
+ transform: rotate(0deg);
51
+ }
52
+ to {
53
+ transform: rotate(360deg);
54
+ }
55
+ }
@@ -0,0 +1,4 @@
1
+ import React from "react";
2
+ import "./AnimatedBorder.css";
3
+ declare const AnimatedBorder: () => React.JSX.Element;
4
+ export default AnimatedBorder;
@@ -0,0 +1,11 @@
1
+ import React from "react";
2
+ import "./AnimatedBorder.css";
3
+ var AnimatedBorder = function () {
4
+ return (React.createElement("div", { className: "animated-border-wrapper" },
5
+ React.createElement("div", { className: "animated-border-card exemple" },
6
+ React.createElement("div", { className: "animated-border-inner" }, "Contenu du cube"))));
7
+ };
8
+ export default AnimatedBorder;
9
+ /*
10
+
11
+ */
@@ -0,0 +1,17 @@
1
+ declare namespace _default {
2
+ export let title: string;
3
+ export { AnimatedBorder as component };
4
+ export namespace parameters {
5
+ namespace backgrounds {
6
+ let _default: string;
7
+ export { _default as default };
8
+ export let values: {
9
+ name: string;
10
+ value: string;
11
+ }[];
12
+ }
13
+ }
14
+ }
15
+ export default _default;
16
+ export const Default: any;
17
+ import AnimatedBorder from "./AnimatedBorder";
@@ -0,0 +1,20 @@
1
+ import React from "react";
2
+ import AnimatedBorder from "./AnimatedBorder";
3
+ export default {
4
+ title: "Components/Molecules/AnimatedBorder",
5
+ component: AnimatedBorder,
6
+ parameters: {
7
+ backgrounds: {
8
+ default: "light",
9
+ values: [
10
+ { name: "light", value: "#ffffff" },
11
+ { name: "grey", value: "#728ea7" },
12
+ { name: "figma", value: "#404040" },
13
+ { name: "dark", value: "#171e25" },
14
+ ],
15
+ },
16
+ },
17
+ };
18
+ var Template = function () { return (React.createElement("div", null,
19
+ React.createElement(AnimatedBorder, null))); };
20
+ export var Default = Template.bind({});
@@ -1,4 +1,4 @@
1
- import React from "react";
1
+ import React, { ReactNode } from "react";
2
2
  export interface ContactCardProps {
3
3
  name: string;
4
4
  status: string;
@@ -8,7 +8,7 @@ export interface ContactCardProps {
8
8
  onEdit?: () => void;
9
9
  onClick?: () => void;
10
10
  gender: "male" | "female";
11
- onAddAppointment?: () => void;
11
+ actionsButton?: ReactNode;
12
12
  actionIconName?: string;
13
13
  clientLabel?: string;
14
14
  }
@@ -4,11 +4,11 @@ import OtherStatusTag from "../../atoms/tags/OtherStatusTag";
4
4
  import IconButton from "../../atoms/buttons/IconButton";
5
5
  import Link from "next/link";
6
6
  var ContactCard = function (_a) {
7
- var name = _a.name, status = _a.status, phone = _a.phone, email = _a.email, isEditable = _a.isEditable, onEdit = _a.onEdit, onClick = _a.onClick, onAddAppointment = _a.onAddAppointment, _b = _a.actionIconName, actionIconName = _b === void 0 ? "allaw-icon-edit-2" : _b, clientLabel = _a.clientLabel;
7
+ var name = _a.name, status = _a.status, phone = _a.phone, email = _a.email, isEditable = _a.isEditable, onEdit = _a.onEdit, onClick = _a.onClick, actionsButton = _a.actionsButton, _b = _a.actionIconName, actionIconName = _b === void 0 ? "allaw-icon-edit-2" : _b, clientLabel = _a.clientLabel;
8
8
  var isPhoneEmpty = !phone || phone.trim() === "";
9
9
  var isEmailEmpty = !email || email.trim() === "";
10
10
  var displayClientLabel = clientLabel || "Client de l'\u00E9tude";
11
- return (React.createElement("div", { className: styles.contactCard, onClick: function () { return onClick && onClick(); }, style: { cursor: "pointer" } },
11
+ return (React.createElement("div", { className: styles.contactCard, onClick: function () { return onClick && onClick(); }, style: { cursor: onClick ? "pointer" : "default" } },
12
12
  React.createElement("div", { className: styles.contentContainer },
13
13
  React.createElement("div", { className: styles.nameTagContainer },
14
14
  React.createElement("h3", { className: styles.contactName }, name),
@@ -25,8 +25,7 @@ var ContactCard = function (_a) {
25
25
  React.createElement("i", { className: "allaw-icon-mail ".concat(styles.infoIcon, " ").concat(isEmailEmpty ? styles.infoIconDisabled : "") }),
26
26
  React.createElement("span", { className: "".concat(styles.infoText, " ").concat(styles.contact, " ").concat(isEmailEmpty ? styles.emptyField : "") }, isEmailEmpty ? ("Non renseigné") : (React.createElement(Link, { style: { color: "#171E25", textDecoration: "underline" }, href: "mailTo:".concat(email) }, email))))))),
27
27
  React.createElement("div", { className: styles.actionsContainer },
28
- onAddAppointment && (React.createElement("div", { className: styles.actionButtonContainer },
29
- React.createElement(IconButton, { style: "largeFilled", iconName: "allaw-icon-calendar", onClick: onAddAppointment }))),
28
+ actionsButton ? actionsButton : null,
30
29
  isEditable && (React.createElement("div", { className: styles.actionButtonContainer },
31
30
  React.createElement(IconButton, { style: "largeFilled", iconName: actionIconName, onClick: onEdit }))),
32
31
  onClick && (React.createElement("div", { className: styles.actionButtonContainer },
package/dist/index.d.ts CHANGED
@@ -43,8 +43,8 @@ export { default as Strokes } from "./components/atoms/uiVariables/Strokes";
43
43
  export { default as AppointmentSlot } from "./components/molecules/appointmentSlot/AppointmentSlot";
44
44
  export { default as BillingCount } from "./components/molecules/billingCount/BillingCount";
45
45
  export { default as CaseCard } from "./components/molecules/caseCard/CaseCard";
46
- export { default as ContactCard } from "./components/molecules/contactCard/ContactCard";
47
46
  export type { ContactCardProps } from "./components/molecules/contactCard/ContactCard";
47
+ export { default as ContactCard } from "./components/molecules/contactCard/ContactCard";
48
48
  export { default as DetailedContactCard } from "./components/molecules/contactCard/DetailedContactCard";
49
49
  export type { DetailedContactCardProps } from "./components/molecules/contactCard/DetailedContactCard";
50
50
  export { default as CaseCardLink } from "./components/molecules/caseLinkCard/CaseLinkCard";
package/dist/index.js CHANGED
@@ -53,7 +53,6 @@ export { default as AppointmentSlot } from "./components/molecules/appointmentSl
53
53
  export { default as BillingCount } from "./components/molecules/billingCount/BillingCount";
54
54
  // Case Card
55
55
  export { default as CaseCard } from "./components/molecules/caseCard/CaseCard";
56
- // Contact Cards
57
56
  export { default as ContactCard } from "./components/molecules/contactCard/ContactCard";
58
57
  export { default as DetailedContactCard } from "./components/molecules/contactCard/DetailedContactCard";
59
58
  // Case Link Card
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "allaw-ui",
3
- "version": "1.0.182",
3
+ "version": "2.0.0",
4
4
  "description": "Composants UI pour l'application Allaw",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.esm.js",