allaw-ui 0.0.19 → 0.0.35

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.
Files changed (202) hide show
  1. package/README.md +30 -10
  2. package/dist/app/globals.css +5 -0
  3. package/dist/app/layout.d.ts +0 -0
  4. package/dist/app/layout.js +0 -0
  5. package/dist/assets/NoPhoto.png +0 -0
  6. package/dist/assets/NoPhoto.svg +22 -0
  7. package/dist/assets/allaw-font.eot +0 -0
  8. package/dist/assets/allaw-font.svg +8 -2
  9. package/dist/assets/allaw-font.ttf +0 -0
  10. package/dist/assets/allaw-font.woff +0 -0
  11. package/dist/components/atoms/buttons/ActionCircleButton.css +143 -0
  12. package/dist/components/atoms/buttons/ActionCircleButton.d.ts +9 -0
  13. package/dist/components/atoms/buttons/ActionCircleButton.js +23 -0
  14. package/dist/components/atoms/buttons/AgendaSlot.css +116 -0
  15. package/dist/components/atoms/buttons/AgendaSlot.d.ts +10 -0
  16. package/dist/components/atoms/buttons/AgendaSlot.js +7 -0
  17. package/dist/components/atoms/buttons/FavoriteToggle.css +35 -0
  18. package/dist/components/atoms/buttons/FavoriteToggle.d.ts +8 -0
  19. package/dist/components/atoms/buttons/FavoriteToggle.js +11 -0
  20. package/dist/components/atoms/buttons/FilterButton.css +55 -0
  21. package/dist/components/atoms/buttons/FilterButton.d.ts +9 -0
  22. package/dist/components/atoms/buttons/FilterButton.js +9 -0
  23. package/dist/components/atoms/buttons/FilterButtonPrimary.d.ts +9 -0
  24. package/dist/components/atoms/buttons/FilterButtonPrimary.js +46 -0
  25. package/dist/components/atoms/buttons/GhostButton.css +63 -0
  26. package/dist/components/atoms/buttons/GhostButton.d.ts +14 -0
  27. package/dist/components/atoms/buttons/GhostButton.js +11 -0
  28. package/dist/components/atoms/buttons/IconButton.css +111 -0
  29. package/dist/components/atoms/buttons/IconButton.d.ts +10 -0
  30. package/dist/components/atoms/buttons/IconButton.js +14 -0
  31. package/dist/components/atoms/buttons/OAuthProviderButton.css +117 -0
  32. package/dist/components/atoms/buttons/OAuthProviderButton.d.ts +12 -0
  33. package/dist/components/atoms/buttons/OAuthProviderButton.js +143 -0
  34. package/dist/components/atoms/buttons/PendingDocuments.css +53 -0
  35. package/dist/components/atoms/buttons/PendingDocuments.d.ts +10 -0
  36. package/dist/components/atoms/buttons/PendingDocuments.js +13 -0
  37. package/dist/components/{buttons/ButtonPrimary.css → atoms/buttons/PrimaryButton.css} +12 -7
  38. package/dist/components/atoms/buttons/PrimaryButton.d.ts +16 -0
  39. package/dist/components/atoms/buttons/PrimaryButton.js +11 -0
  40. package/dist/components/atoms/buttons/SecondaryButton.css +124 -0
  41. package/dist/components/atoms/buttons/SecondaryButton.d.ts +14 -0
  42. package/dist/components/atoms/buttons/SecondaryButton.js +11 -0
  43. package/dist/components/atoms/buttons/TabNavigation.css +43 -0
  44. package/dist/components/atoms/buttons/TabNavigation.d.ts +13 -0
  45. package/dist/components/atoms/buttons/TabNavigation.js +10 -0
  46. package/dist/components/atoms/buttons/TertiaryButton.css +63 -0
  47. package/dist/components/atoms/buttons/TertiaryButton.d.ts +10 -0
  48. package/dist/components/atoms/buttons/TertiaryButton.js +10 -0
  49. package/dist/components/atoms/buttons/index.d.ts +22 -0
  50. package/dist/components/atoms/buttons/index.js +11 -0
  51. package/dist/components/atoms/checkboxes/Checkbox.css +50 -0
  52. package/dist/components/atoms/checkboxes/Checkbox.d.ts +11 -0
  53. package/dist/components/atoms/checkboxes/Checkbox.js +15 -0
  54. package/dist/components/atoms/checkboxes/index.d.ts +2 -0
  55. package/dist/components/atoms/checkboxes/index.js +1 -0
  56. package/dist/components/atoms/filter/Basefiler.css +80 -0
  57. package/dist/components/atoms/filter/Filter.d.ts +23 -0
  58. package/dist/components/atoms/filter/Filter.js +87 -0
  59. package/dist/components/atoms/filter/index.d.ts +2 -0
  60. package/dist/components/atoms/filter/index.js +1 -0
  61. package/dist/components/atoms/inputs/Input.css +184 -0
  62. package/dist/components/atoms/inputs/Input.d.ts +22 -0
  63. package/dist/components/atoms/inputs/Input.js +86 -0
  64. package/dist/components/atoms/inputs/SearchBar.css +54 -0
  65. package/dist/components/atoms/inputs/SearchBar.d.ts +12 -0
  66. package/dist/components/atoms/inputs/SearchBar.js +20 -0
  67. package/dist/components/atoms/inputs/index.d.ts +4 -0
  68. package/dist/components/atoms/inputs/index.js +2 -0
  69. package/dist/components/atoms/progressBars/ProgressBar.css +109 -0
  70. package/dist/components/atoms/progressBars/ProgressBar.d.ts +15 -0
  71. package/dist/components/atoms/progressBars/ProgressBar.js +17 -0
  72. package/dist/components/atoms/progressBars/index.d.ts +2 -0
  73. package/dist/components/atoms/progressBars/index.js +1 -0
  74. package/dist/components/atoms/radios/RadioButton.css +98 -0
  75. package/dist/components/atoms/radios/RadioButton.d.ts +11 -0
  76. package/dist/components/atoms/radios/RadioButton.js +10 -0
  77. package/dist/components/atoms/radios/index.d.ts +2 -0
  78. package/dist/components/atoms/radios/index.js +1 -0
  79. package/dist/components/atoms/selects/Select.css +103 -0
  80. package/dist/components/atoms/selects/Select.d.ts +24 -0
  81. package/dist/components/atoms/selects/Select.js +84 -0
  82. package/dist/components/atoms/selects/index.d.ts +2 -0
  83. package/dist/components/atoms/selects/index.js +1 -0
  84. package/dist/components/atoms/tags/AppointementStatusTag.css +113 -13
  85. package/dist/components/atoms/tags/AppointementStatusTag.d.ts +1 -1
  86. package/dist/components/atoms/tags/FolderStatusTag.css +26 -0
  87. package/dist/components/atoms/tags/FolderStatusTag.d.ts +7 -0
  88. package/dist/components/atoms/tags/FolderStatusTag.js +8 -0
  89. package/dist/components/atoms/tags/OtherStatusTag.css +72 -0
  90. package/dist/components/atoms/tags/OtherStatusTag.d.ts +10 -0
  91. package/dist/components/atoms/tags/OtherStatusTag.js +10 -0
  92. package/dist/components/atoms/tags/index.d.ts +6 -0
  93. package/dist/components/atoms/tags/index.js +3 -0
  94. package/dist/components/atoms/typography/Heading.css +77 -0
  95. package/dist/components/atoms/typography/Heading.d.ts +10 -0
  96. package/dist/components/atoms/typography/Heading.js +7 -0
  97. package/dist/components/atoms/typography/Paragraph.css +43 -0
  98. package/dist/components/atoms/typography/Paragraph.d.ts +11 -0
  99. package/dist/components/atoms/typography/Paragraph.js +24 -0
  100. package/dist/components/atoms/typography/SmallTitle.css +53 -0
  101. package/dist/components/atoms/typography/SmallTitle.d.ts +9 -0
  102. package/dist/components/atoms/typography/SmallTitle.js +7 -0
  103. package/dist/components/atoms/typography/Subtitle.css +40 -0
  104. package/dist/components/atoms/typography/Subtitle.d.ts +9 -0
  105. package/dist/components/atoms/typography/Subtitle.js +7 -0
  106. package/dist/components/atoms/typography/TinyInfo.css +56 -0
  107. package/dist/components/atoms/typography/TinyInfo.d.ts +12 -0
  108. package/dist/components/atoms/typography/TinyInfo.js +15 -0
  109. package/dist/components/atoms/typography/index.d.ts +10 -0
  110. package/dist/components/atoms/typography/index.js +5 -0
  111. package/dist/components/atoms/uiVariables/BorderRadius.d.ts +6 -0
  112. package/dist/components/atoms/uiVariables/BorderRadius.js +12 -0
  113. package/dist/components/atoms/uiVariables/BorderRadiusExample.css +31 -0
  114. package/dist/components/atoms/uiVariables/Shadows.d.ts +6 -0
  115. package/dist/components/atoms/uiVariables/Shadows.js +11 -0
  116. package/dist/components/atoms/uiVariables/ShadowsExample.css +27 -0
  117. package/dist/components/atoms/uiVariables/Strokes.d.ts +6 -0
  118. package/dist/components/atoms/uiVariables/Strokes.js +10 -0
  119. package/dist/components/atoms/uiVariables/StrokesExample.css +22 -0
  120. package/dist/components/atoms/uiVariables/index.d.ts +3 -0
  121. package/dist/components/atoms/uiVariables/index.js +3 -0
  122. package/dist/components/molecules/appointmentSlot/AppointmentSlot.css +366 -0
  123. package/dist/components/molecules/appointmentSlot/AppointmentSlot.d.ts +25 -0
  124. package/dist/components/molecules/appointmentSlot/AppointmentSlot.js +109 -0
  125. package/dist/components/molecules/appointmentSlot/index.d.ts +2 -0
  126. package/dist/components/molecules/appointmentSlot/index.js +1 -0
  127. package/dist/components/molecules/breadcrumb/Breadcrumb.css +32 -0
  128. package/dist/components/molecules/breadcrumb/Breadcrumb.d.ts +12 -0
  129. package/dist/components/molecules/breadcrumb/Breadcrumb.js +12 -0
  130. package/dist/components/molecules/breadcrumb/index.d.ts +2 -0
  131. package/dist/components/molecules/breadcrumb/index.js +1 -0
  132. package/dist/components/molecules/caseCard/CaseCard.css +119 -0
  133. package/dist/components/molecules/caseCard/CaseCard.d.ts +14 -0
  134. package/dist/components/molecules/caseCard/CaseCard.js +20 -0
  135. package/dist/components/molecules/caseCard/index.d.ts +2 -0
  136. package/dist/components/molecules/caseCard/index.js +1 -0
  137. package/dist/components/molecules/checkboxForm/CheckboxForm.css +60 -0
  138. package/dist/components/molecules/checkboxForm/CheckboxForm.d.ts +15 -0
  139. package/dist/components/molecules/checkboxForm/CheckboxForm.js +28 -0
  140. package/dist/components/molecules/checkboxForm/index.d.ts +2 -0
  141. package/dist/components/molecules/checkboxForm/index.js +1 -0
  142. package/dist/components/molecules/contactCard/ContactCard.css +386 -0
  143. package/dist/components/molecules/contactCard/ContactCard.d.ts +17 -0
  144. package/dist/components/molecules/contactCard/ContactCard.js +80 -0
  145. package/dist/components/molecules/contactCard/index.d.ts +2 -0
  146. package/dist/components/molecules/contactCard/index.js +1 -0
  147. package/dist/components/molecules/documentCard/DocumentCard.css +130 -0
  148. package/dist/components/molecules/documentCard/DocumentCard.d.ts +14 -0
  149. package/dist/components/molecules/documentCard/DocumentCard.js +59 -0
  150. package/dist/components/molecules/documentCard/index.d.ts +2 -0
  151. package/dist/components/molecules/documentCard/index.js +1 -0
  152. package/dist/components/molecules/employeeCard/EmployeeCard.css +187 -0
  153. package/dist/components/molecules/employeeCard/EmployeeCard.d.ts +15 -0
  154. package/dist/components/molecules/employeeCard/EmployeeCard.js +34 -0
  155. package/dist/components/molecules/employeeCard/index.d.ts +2 -0
  156. package/dist/components/molecules/employeeCard/index.js +1 -0
  157. package/dist/components/molecules/proCard/ProCard.css +117 -0
  158. package/dist/components/molecules/proCard/ProCard.d.ts +13 -0
  159. package/dist/components/molecules/proCard/ProCard.js +25 -0
  160. package/dist/components/molecules/proCard/index.d.ts +2 -0
  161. package/dist/components/molecules/proCard/index.js +1 -0
  162. package/dist/components/molecules/stepper/Stepper.css +80 -0
  163. package/dist/components/molecules/stepper/Stepper.d.ts +27 -0
  164. package/dist/components/molecules/stepper/Stepper.js +68 -0
  165. package/dist/components/molecules/stepper/index.d.ts +2 -0
  166. package/dist/components/molecules/stepper/index.js +1 -0
  167. package/dist/index.d.ts +40 -2
  168. package/dist/index.js +59 -2
  169. package/dist/stories/assets/accessibility.png +0 -0
  170. package/dist/stories/assets/addon-library.png +0 -0
  171. package/dist/stories/assets/assets.png +0 -0
  172. package/dist/stories/assets/context.png +0 -0
  173. package/dist/stories/assets/docs.png +0 -0
  174. package/dist/stories/assets/figma-plugin.png +0 -0
  175. package/dist/stories/assets/share.png +0 -0
  176. package/dist/stories/assets/styling.png +0 -0
  177. package/dist/stories/assets/testing.png +0 -0
  178. package/dist/stories/assets/theming.png +0 -0
  179. package/dist/styles/colors.css +2 -0
  180. package/dist/styles/global.css +25 -0
  181. package/dist/styles/icons.css +32 -0
  182. package/dist/styles/ui-variables/border-radius.css +6 -0
  183. package/dist/styles/ui-variables/shadows.css +5 -0
  184. package/dist/styles/ui-variables/stroke.css +4 -0
  185. package/dist/utils/regex.d.ts +5 -0
  186. package/dist/utils/regex.js +7 -0
  187. package/package.json +37 -16
  188. package/dist/buttons/ButtonPrimary.d.ts +0 -10
  189. package/dist/buttons/ButtonPrimary.js +0 -10
  190. package/dist/components/atoms/buttons/ButtonPrimary.css +0 -52
  191. package/dist/components/atoms/buttons/ButtonPrimary.d.ts +0 -11
  192. package/dist/components/atoms/buttons/ButtonPrimary.js +0 -11
  193. package/dist/components/buttons/ButtonPrimary.d.ts +0 -11
  194. package/dist/components/buttons/ButtonPrimary.js +0 -11
  195. package/dist/components/tags/AppointementStatusTag.css +0 -58
  196. package/dist/components/tags/AppointementStatusTag.d.ts +0 -8
  197. package/dist/components/tags/AppointementStatusTag.js +0 -41
  198. package/dist/stories/button.css +0 -30
  199. package/dist/stories/header.css +0 -32
  200. package/dist/stories/page.css +0 -69
  201. package/dist/tags/AppointementStatusTag.d.ts +0 -8
  202. package/dist/tags/AppointementStatusTag.js +0 -41
@@ -0,0 +1,63 @@
1
+ @import "../../../styles/colors.css";
2
+
3
+ .ghost-button {
4
+ display: inline-flex;
5
+ align-items: center;
6
+ gap: 8px;
7
+ padding: 4px 0px;
8
+ border: none;
9
+ background: none;
10
+ cursor: pointer;
11
+ transition:
12
+ color 0.15s,
13
+ transform 0.03s;
14
+ }
15
+
16
+ .ghost-button:active {
17
+ transform: scale(0.98);
18
+ }
19
+
20
+ .ghost-button-default {
21
+ color: var(--Primary-Blanc, #fff);
22
+ }
23
+
24
+ .ghost-button-default:hover {
25
+ color: var(--Primary-Blanc, #fff);
26
+ }
27
+
28
+ .ghost-button-variant {
29
+ color: var(--actions-error, #e15151);
30
+ }
31
+
32
+ .ghost-button-variant:hover {
33
+ color: var(--actions-error, #e15151);
34
+ }
35
+
36
+ .ghost-button-icon {
37
+ display: flex;
38
+ align-items: center;
39
+ justify-content: center;
40
+ width: 16px;
41
+ height: 16px;
42
+ padding: 3.333px;
43
+ }
44
+
45
+ .ghost-button-label {
46
+ font-family: "Open Sans", sans-serif;
47
+ font-size: 14px;
48
+ font-style: normal;
49
+ line-height: normal;
50
+ letter-spacing: 0em;
51
+ }
52
+
53
+ /* Styles spécifiques pour variant=false */
54
+ .ghost-button-default .ghost-button-label {
55
+ font-weight: 400;
56
+ color: var(--Primary-Blanc, #fff);
57
+ }
58
+
59
+ /* Styles spécifiques pour variant=true */
60
+ .ghost-button-variant .ghost-button-label {
61
+ font-weight: 400;
62
+ color: var(--actions-error, #e15151);
63
+ }
@@ -0,0 +1,14 @@
1
+ import React from "react";
2
+ import "./GhostButton.css";
3
+ import "../../../styles/global.css";
4
+ export interface GhostButtonProps {
5
+ startIcon?: React.ReactNode;
6
+ endIcon?: React.ReactNode;
7
+ label: string;
8
+ variant?: boolean;
9
+ startIconName?: string;
10
+ endIconName?: string;
11
+ onClick?: () => void;
12
+ }
13
+ declare const GhostButton: React.FC<GhostButtonProps>;
14
+ export default GhostButton;
@@ -0,0 +1,11 @@
1
+ import React from "react";
2
+ import "./GhostButton.css";
3
+ import "../../../styles/global.css";
4
+ var GhostButton = function (_a) {
5
+ var startIcon = _a.startIcon, endIcon = _a.endIcon, label = _a.label, _b = _a.variant, variant = _b === void 0 ? false : _b, startIconName = _a.startIconName, endIconName = _a.endIconName, onClick = _a.onClick;
6
+ return (React.createElement("button", { className: "ghost-button ".concat(variant ? "ghost-button-variant" : "ghost-button-default"), onClick: onClick },
7
+ startIcon && React.createElement("span", { className: "ghost-button-icon ".concat(startIconName) }),
8
+ React.createElement("span", { className: "ghost-button-label" }, label),
9
+ endIcon && React.createElement("span", { className: "ghost-button-icon ".concat(endIconName) })));
10
+ };
11
+ export default GhostButton;
@@ -0,0 +1,111 @@
1
+ @import "../../../styles/colors.css";
2
+
3
+ /* Small, square, with background and icon */
4
+ .icon-button.smallFilled {
5
+ display: flex;
6
+ flex-direction: row;
7
+ width: 24px;
8
+ height: 24px;
9
+ padding: 6px 6px 6px 6px;
10
+ justify-content: center;
11
+ align-items: center;
12
+ flex-shrink: 0;
13
+ border-radius: 3px;
14
+ background: var(--secondary-light-grey, #f4f7fb);
15
+ cursor: pointer;
16
+ }
17
+
18
+ .icon-button.smallFilled:hover {
19
+ background: var(--grey-venom, #e6edf5);
20
+ }
21
+
22
+ .icon-button.smallFilled:active {
23
+ background: #d8e1eb;
24
+ }
25
+
26
+ .icon-button.smallFilled .icon {
27
+ width: 12px;
28
+ height: 12px;
29
+ flex-shrink: 0;
30
+ color: #456073;
31
+ font-size: 11px;
32
+ display: flex;
33
+ flex-direction: row;
34
+ justify-content: center;
35
+ align-items: center;
36
+ }
37
+
38
+ /* Large, square, with background and icon */
39
+ .icon-button.largeFilled {
40
+ display: flex;
41
+ flex-direction: row;
42
+ width: 40px;
43
+ height: 40px;
44
+ padding: 0;
45
+ justify-content: center;
46
+ align-items: center;
47
+ flex-shrink: 0;
48
+ border-radius: 4px;
49
+ background: var(--secondary-light-grey, #f4f7fb);
50
+ cursor: pointer;
51
+ }
52
+
53
+ .icon-button.largeFilled:hover {
54
+ background: var(--grey-venom, #e6edf5);
55
+ }
56
+
57
+ .icon-button.largeFilled:active {
58
+ background: #d8e1eb;
59
+ }
60
+
61
+ .icon-button.largeFilled .icon {
62
+ width: 19px;
63
+ height: 19px;
64
+ flex-shrink: 0;
65
+ color: #456073;
66
+ font-size: 18px;
67
+ display: flex;
68
+ flex-direction: row;
69
+ justify-content: center;
70
+ align-items: center;
71
+ }
72
+
73
+ /* Medium, square, transparent background with outline */
74
+ .icon-button.mediumOutline {
75
+ display: flex;
76
+ width: 35px;
77
+ height: 35px;
78
+ padding: 8px;
79
+ justify-content: center;
80
+ align-items: center;
81
+ gap: 8px;
82
+ flex-shrink: 0;
83
+ border-radius: 4px;
84
+ border: 1px solid var(--primary-blue, #25beeb);
85
+ background: transparent;
86
+ }
87
+
88
+ .icon-button.mediumOutline .icon {
89
+ width: 24px;
90
+ height: 24px;
91
+ flex-shrink: 0;
92
+ color: var(--bleu-allaw, #25beeb);
93
+ display: flex;
94
+ flex-direction: row;
95
+ justify-content: center;
96
+ align-items: center;
97
+ font-size: 18px;
98
+ }
99
+
100
+ /* Just the outline icons */
101
+ .icon-button.iconOnly {
102
+ width: 32px;
103
+ height: 32px;
104
+ flex-shrink: 0;
105
+ color: #25beeb;
106
+ flex-direction: row;
107
+ justify-content: center;
108
+ align-items: center;
109
+ font-size: 18px;
110
+ background: transparent;
111
+ }
@@ -0,0 +1,10 @@
1
+ import React from "react";
2
+ import "./IconButton.css";
3
+ import "../../../styles/global.css";
4
+ export interface IconButtonProps {
5
+ style: "smallFilled" | "largeFilled" | "mediumOutline" | "iconOnly";
6
+ iconName: string;
7
+ onClick?: () => void;
8
+ }
9
+ declare const IconButton: React.FC<IconButtonProps>;
10
+ export default IconButton;
@@ -0,0 +1,14 @@
1
+ import React from "react";
2
+ import "./IconButton.css";
3
+ import "../../../styles/global.css";
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 },
7
+ React.createElement("i", { className: "icon ".concat(iconName) })));
8
+ };
9
+ IconButton.defaultProps = {
10
+ style: "smallFilled",
11
+ iconName: "allaw-icon-calendar",
12
+ onClick: function () { },
13
+ };
14
+ export default IconButton;
@@ -0,0 +1,117 @@
1
+ @import "../../../styles/colors.css";
2
+
3
+ .oauth-provider-button {
4
+ display: flex;
5
+ align-items: center;
6
+ justify-content: center;
7
+ gap: 15px;
8
+ cursor: pointer;
9
+ min-width: 210px;
10
+ border-radius: 10px;
11
+ padding: 6px;
12
+ }
13
+
14
+ .oauth-provider-button:hover {
15
+ opacity: 0.8;
16
+ }
17
+
18
+ .oauth-provider-button:active {
19
+ opacity: 1;
20
+ }
21
+
22
+ .oauth-provider-button.google {
23
+ width: 100%;
24
+ background: #ffffff;
25
+ box-shadow:
26
+ 0px 2px 3px 0px #0000002b,
27
+ 0px 0px 3px 0px #00000015;
28
+ }
29
+
30
+ .oauth-provider-button.google .label {
31
+ font-family: Roboto;
32
+ font-weight: 500;
33
+ text-align: left;
34
+ color: #0000008a;
35
+ white-space: nowrap;
36
+ overflow: hidden;
37
+ text-overflow: ellipsis;
38
+ }
39
+
40
+ .oauth-provider-button.apple {
41
+ background: #000000;
42
+ width: 100%;
43
+ }
44
+
45
+ .oauth-provider-button.linkedin {
46
+ background: #0a66c2;
47
+ width: 100%;
48
+ padding-left: 10px;
49
+ padding-right: 10px;
50
+ }
51
+
52
+ .oauth-provider-button.apple .label {
53
+ font-family: "SF Pro Display", sans-serif;
54
+ font-weight: 500;
55
+ text-align: left;
56
+ color: #ffffff;
57
+ letter-spacing: 0.005em;
58
+ white-space: nowrap;
59
+ overflow: hidden;
60
+ text-overflow: ellipsis;
61
+ }
62
+
63
+ .oauth-provider-button.linkedin .label {
64
+ font-family: "Source Sans Pro", sans-serif;
65
+ font-weight: 500;
66
+ text-align: left;
67
+ color: #ffffff;
68
+ white-space: nowrap;
69
+ overflow: hidden;
70
+ text-overflow: ellipsis;
71
+ }
72
+
73
+ .allaw-icon-google {
74
+ display: flex;
75
+ }
76
+
77
+ .allaw-icon-apple {
78
+ display: flex;
79
+ color: #ffffff;
80
+ padding-bottom: 2px;
81
+ }
82
+
83
+ .allaw-icon-linkedin {
84
+ display: flex;
85
+ color: #0a66c2;
86
+ padding-bottom: 0px;
87
+ }
88
+
89
+ .allaw-icon-google .path1:before {
90
+ content: "\e94a";
91
+ color: rgb(66, 133, 244);
92
+ }
93
+ .allaw-icon-google .path2:before {
94
+ content: "\e94b";
95
+ margin-left: -1em;
96
+ color: rgb(52, 168, 83);
97
+ }
98
+ .allaw-icon-google .path3:before {
99
+ content: "\e94c";
100
+ margin-left: -1em;
101
+ color: rgb(251, 188, 5);
102
+ }
103
+ .allaw-icon-google .path4:before {
104
+ content: "\e94d";
105
+ margin-left: -1em;
106
+ color: rgb(235, 67, 53);
107
+ }
108
+
109
+ .linkedin-icon-container {
110
+ display: flex;
111
+ align-items: center;
112
+ justify-content: center;
113
+ width: 24px;
114
+ height: 24px;
115
+ border-radius: 4px;
116
+ background: #ffffff;
117
+ }
@@ -0,0 +1,12 @@
1
+ import React from "react";
2
+ import "./OAuthProviderButton.css";
3
+ import "../../../styles/global.css";
4
+ export interface OAuthProviderButtonProps {
5
+ provider: "google" | "apple" | "linkedin";
6
+ type: "login" | "signup";
7
+ url: string;
8
+ size: 14 | 16 | 18 | 20 | 22 | 24;
9
+ onClick?: () => void;
10
+ }
11
+ declare const OAuthProviderButton: React.FC<OAuthProviderButtonProps>;
12
+ export default OAuthProviderButton;
@@ -0,0 +1,143 @@
1
+ import React, { useState, useEffect, useRef } from "react";
2
+ import "./OAuthProviderButton.css";
3
+ import "../../../styles/global.css";
4
+ var OAuthProviderButton = function (_a) {
5
+ var provider = _a.provider, type = _a.type, url = _a.url, size = _a.size, onClick = _a.onClick;
6
+ var _b = useState(""), label = _b[0], setLabel = _b[1];
7
+ var buttonRef = useRef(null);
8
+ var getLabels = function () {
9
+ var labels = {
10
+ google: {
11
+ login: "Continuer avec Google",
12
+ signup: "S'inscrire avec Google",
13
+ },
14
+ apple: {
15
+ login: "Continuer avec Apple",
16
+ signup: "S'inscrire avec Apple",
17
+ },
18
+ linkedin: {
19
+ login: "Continuer avec LinkedIn",
20
+ signup: "S'inscrire avec LinkedIn",
21
+ },
22
+ };
23
+ var shortLabels = {
24
+ google: "Google",
25
+ apple: "Apple",
26
+ linkedin: "LinkedIn",
27
+ };
28
+ return { labels: labels, shortLabels: shortLabels };
29
+ };
30
+ var getThresholdWidth = function (size) {
31
+ switch (size) {
32
+ case 14:
33
+ return 210;
34
+ case 16:
35
+ return 220;
36
+ case 18:
37
+ return 230;
38
+ case 20:
39
+ return 240;
40
+ case 22:
41
+ return 260;
42
+ case 24:
43
+ return 290;
44
+ default:
45
+ return 250;
46
+ }
47
+ };
48
+ var updateLabel = function () {
49
+ var _a, _b;
50
+ var _c = getLabels(), labels = _c.labels, shortLabels = _c.shortLabels;
51
+ var maxWidth = (_b = (_a = buttonRef.current) === null || _a === void 0 ? void 0 : _a.offsetWidth) !== null && _b !== void 0 ? _b : 0;
52
+ var thresholdWidth = getThresholdWidth(size);
53
+ var newLabel = maxWidth < thresholdWidth
54
+ ? shortLabels[provider]
55
+ : labels[provider][type];
56
+ setLabel(newLabel);
57
+ };
58
+ useEffect(function () {
59
+ var resizeObserver = new ResizeObserver(function () {
60
+ updateLabel();
61
+ });
62
+ if (buttonRef.current) {
63
+ resizeObserver.observe(buttonRef.current);
64
+ }
65
+ return function () {
66
+ if (buttonRef.current) {
67
+ resizeObserver.unobserve(buttonRef.current);
68
+ }
69
+ };
70
+ }, [provider, type, size]);
71
+ // Force an update after the first render to ensure the correct label is set
72
+ useEffect(function () {
73
+ if (buttonRef.current) {
74
+ updateLabel();
75
+ }
76
+ }, []);
77
+ var renderIcon = function () {
78
+ var iconSizes = {
79
+ google: size * 0.8,
80
+ apple: size * 1.2,
81
+ linkedin: size * 0.8,
82
+ };
83
+ var iconClasses = {
84
+ google: "allaw-icon-google",
85
+ apple: "allaw-icon-apple",
86
+ linkedin: "allaw-icon-linkedin",
87
+ };
88
+ var iconSize = iconSizes[provider];
89
+ var iconClass = iconClasses[provider];
90
+ if (provider === "google") {
91
+ return (React.createElement("span", { className: iconClass, style: { fontSize: "".concat(iconSize, "px") } },
92
+ React.createElement("span", { className: "path1" }),
93
+ React.createElement("span", { className: "path2" }),
94
+ React.createElement("span", { className: "path3" }),
95
+ React.createElement("span", { className: "path4" })));
96
+ }
97
+ else if (provider === "linkedin") {
98
+ var containerSize = size * 1.4;
99
+ return (React.createElement("div", { className: "linkedin-icon-container", style: {
100
+ fontSize: "".concat(iconSize, "px"),
101
+ width: "".concat(containerSize, "px"),
102
+ height: "".concat(containerSize, "px"),
103
+ minWidth: "".concat(containerSize, "px"),
104
+ minHeight: "".concat(containerSize, "px"),
105
+ } },
106
+ React.createElement("i", { className: iconClass, style: { fontSize: "".concat(iconSize, "px") } })));
107
+ }
108
+ else {
109
+ return (React.createElement("i", { className: iconClass, style: { fontSize: "".concat(iconSize, "px") } }));
110
+ }
111
+ };
112
+ var handleClick = function () {
113
+ if (onClick) {
114
+ onClick();
115
+ }
116
+ else {
117
+ window.open(url, "_blank");
118
+ }
119
+ };
120
+ var getMaxWidth = function () {
121
+ switch (size) {
122
+ case 14:
123
+ return "200px";
124
+ case 16:
125
+ return "300px";
126
+ case 18:
127
+ return "320px";
128
+ case 20:
129
+ return "370px";
130
+ case 22:
131
+ return "380px";
132
+ case 24:
133
+ return "400px";
134
+ default:
135
+ return "400px";
136
+ }
137
+ };
138
+ var maxWidth = getMaxWidth();
139
+ return (React.createElement("button", { ref: buttonRef, className: "oauth-provider-button ".concat(provider), onClick: handleClick, style: { height: "".concat(size * 2.55, "px"), maxWidth: maxWidth } },
140
+ renderIcon(),
141
+ React.createElement("span", { className: "label", style: { fontSize: "".concat(size, "px") } }, label)));
142
+ };
143
+ export default OAuthProviderButton;
@@ -0,0 +1,53 @@
1
+ .pending-documents {
2
+ display: inline-flex;
3
+ align-items: center;
4
+ gap: 8px;
5
+ padding: 8px;
6
+ border-radius: 8px;
7
+ justify-content: center;
8
+ color: inherit;
9
+ transition: transform 0.03s;
10
+ }
11
+
12
+ .pending-documents-pending {
13
+ background: var(--tag-red-light, #fdf2f2);
14
+ color: var(--Tags-Rouge, #e15151);
15
+ cursor: pointer;
16
+ }
17
+
18
+ .pending-documents-pending:active {
19
+ transform: scale(0.98);
20
+ }
21
+
22
+ .pending-documents-none {
23
+ background: var(--tag-blue-light, #daebfb);
24
+ color: var(--Tags-Bleu-fonc, var(--tag-blue, #1985e8));
25
+ }
26
+
27
+ .pending-documents-icon {
28
+ display: flex;
29
+ align-items: center;
30
+ justify-content: center;
31
+ width: 24px;
32
+ height: 24px;
33
+ color: inherit;
34
+ font-size: 24px;
35
+ }
36
+
37
+ .pending-documents-label {
38
+ font-family: "Open Sans", sans-serif;
39
+ font-size: 16px;
40
+ font-style: normal;
41
+ font-weight: 600;
42
+ line-height: normal;
43
+ letter-spacing: 0em;
44
+ color: inherit;
45
+ }
46
+
47
+ .pending-documents-pending .pending-documents-label {
48
+ color: var(--Tags-Rouge, #e15151);
49
+ }
50
+
51
+ .pending-documents-none .pending-documents-label {
52
+ color: var(--Tags-Bleu-fonc, var(--tag-blue, #1985e8));
53
+ }
@@ -0,0 +1,10 @@
1
+ import React from "react";
2
+ import "./PendingDocuments.css";
3
+ import "../../../styles/global.css";
4
+ export interface PendingDocumentsProps {
5
+ icon?: React.ReactNode;
6
+ pendingCount: number;
7
+ onClick?: () => void;
8
+ }
9
+ declare const PendingDocuments: React.FC<PendingDocumentsProps>;
10
+ export default PendingDocuments;
@@ -0,0 +1,13 @@
1
+ import React from "react";
2
+ import "./PendingDocuments.css";
3
+ import "../../../styles/global.css";
4
+ var PendingDocuments = function (_a) {
5
+ var icon = _a.icon, pendingCount = _a.pendingCount, onClick = _a.onClick;
6
+ var isPending = pendingCount > 0;
7
+ return (React.createElement("div", { className: "pending-documents ".concat(isPending ? "pending-documents-pending" : "pending-documents-none"), onClick: isPending ? onClick : undefined },
8
+ icon && React.createElement("span", { className: "pending-documents-icon" }, icon),
9
+ React.createElement("span", { className: "pending-documents-label" }, isPending
10
+ ? "".concat(pendingCount, " demandes en attente")
11
+ : "Aucune demande en attente")));
12
+ };
13
+ export default PendingDocuments;
@@ -1,4 +1,4 @@
1
- .button-primary {
1
+ .primary-button {
2
2
  display: flex;
3
3
  align-items: center;
4
4
  justify-content: center;
@@ -11,30 +11,31 @@
11
11
  background-color 0.2s,
12
12
  opacity 0.2s;
13
13
  border: 0px;
14
+ cursor: pointer;
14
15
  }
15
16
 
16
- .button-primary-enabled {
17
+ .primary-button-enabled {
17
18
  background-color: #171e25;
18
19
  color: white;
19
20
  }
20
21
 
21
- .button-primary-enabled:hover {
22
+ .primary-button-enabled:hover {
22
23
  background-color: #1985e8;
23
24
  }
24
25
 
25
- .button-primary-enabled:active {
26
+ .primary-button-enabled:active {
26
27
  background-color: #1985e8;
27
28
  opacity: 0.7;
28
29
  }
29
30
 
30
- .button-primary-disabled {
31
+ .primary-button-disabled {
31
32
  background-color: #b9b9b9;
32
33
  opacity: 0.5;
33
34
  color: #9b9b9b;
34
35
  cursor: not-allowed;
35
36
  }
36
37
 
37
- .button-primary-icon {
38
+ .primary-button-icon {
38
39
  display: flex;
39
40
  align-items: center;
40
41
  justify-content: center;
@@ -43,10 +44,14 @@
43
44
  color: white;
44
45
  }
45
46
 
46
- .button-primary-label {
47
+ .primary-button-label {
47
48
  font-family: "Open Sans", sans-serif;
48
49
  font-weight: 500;
49
50
  font-size: 14px;
50
51
  line-height: 22px;
51
52
  letter-spacing: 0em;
52
53
  }
54
+
55
+ .primary-button-full-width {
56
+ width: 100%;
57
+ }
@@ -0,0 +1,16 @@
1
+ import React, { ButtonHTMLAttributes } from "react";
2
+ import "./PrimaryButton.css";
3
+ import "../../../styles/global.css";
4
+ export interface PrimaryButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {
5
+ startIcon?: React.ReactNode;
6
+ endIcon?: React.ReactNode;
7
+ startIconName?: string;
8
+ endIconName?: string;
9
+ label: string;
10
+ disabled?: boolean;
11
+ onClick?: () => void;
12
+ fullWidth?: boolean;
13
+ type?: "button" | "submit" | "reset";
14
+ }
15
+ declare const PrimaryButton: React.FC<PrimaryButtonProps>;
16
+ export default PrimaryButton;
@@ -0,0 +1,11 @@
1
+ import React from "react";
2
+ import "./PrimaryButton.css";
3
+ import "../../../styles/global.css";
4
+ var PrimaryButton = function (_a) {
5
+ var startIcon = _a.startIcon, endIcon = _a.endIcon, startIconName = _a.startIconName, endIconName = _a.endIconName, label = _a.label, _b = _a.disabled, disabled = _b === void 0 ? false : _b, onClick = _a.onClick, _c = _a.fullWidth, fullWidth = _c === void 0 ? false : _c, _d = _a.type, type = _d === void 0 ? "button" : _d;
6
+ return (React.createElement("button", { className: "primary-button ".concat(disabled ? "primary-button-disabled" : "primary-button-enabled", " ").concat(fullWidth ? "primary-button-full-width" : ""), disabled: disabled, onClick: onClick, type: type },
7
+ startIcon && React.createElement("span", { className: "primary-button-icon ".concat(startIconName) }),
8
+ React.createElement("span", { className: "primary-button-label" }, label),
9
+ endIcon && React.createElement("span", { className: "primary-button-icon ".concat(endIconName) })));
10
+ };
11
+ export default PrimaryButton;