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,184 @@
1
+ @import "../../../styles/colors.css";
2
+
3
+ /* Style commun */
4
+ .Input {
5
+ display: flex;
6
+ flex-direction: column;
7
+ gap: 8px;
8
+ }
9
+
10
+ .Input-title-container {
11
+ display: flex;
12
+ align-items: center;
13
+ }
14
+
15
+ .Input-required {
16
+ color: var(--dark-grey, #456073);
17
+ }
18
+
19
+ .Input-placeholder {
20
+ color: var(--Tags-Mid-grey, rgba(114, 142, 167, 1));
21
+ font-family: "Open Sans";
22
+ font-size: 14px;
23
+ font-style: normal;
24
+ font-weight: 400;
25
+ line-height: normal;
26
+ opacity: 0.8;
27
+ width: 100%;
28
+ padding-left: 4px;
29
+ }
30
+
31
+ /* Style default */
32
+ .Input-default {
33
+ display: flex;
34
+ width: 100%;
35
+ flex-direction: column;
36
+ justify-content: center;
37
+ align-items: flex-start;
38
+ gap: 11px;
39
+ }
40
+
41
+ .Input-default .Input-container {
42
+ display: flex;
43
+ width: 100%;
44
+ flex-direction: column;
45
+ justify-content: center;
46
+ align-items: flex-start;
47
+ }
48
+
49
+ .Input-default .Input-input {
50
+ display: flex;
51
+ width: 100%;
52
+ flex-direction: column;
53
+ align-items: flex-start;
54
+ border-radius: 8px;
55
+ border: 1px solid rgba(114, 142, 167, 1);
56
+ background: var(--Primary-Blanc, #fff);
57
+ padding: 10px;
58
+ }
59
+
60
+ .Input-default .Input-input input {
61
+ width: 100%;
62
+ border: none;
63
+ outline: none;
64
+ color: var(--noir);
65
+ }
66
+
67
+ /* Style variation */
68
+ .Input-variation {
69
+ display: flex;
70
+ width: 100%;
71
+ flex-direction: column;
72
+ justify-content: center;
73
+ align-items: flex-start;
74
+ gap: 11px;
75
+ }
76
+
77
+ .Input-variation .Input-container {
78
+ display: flex;
79
+ width: 100%;
80
+ flex-direction: row;
81
+ justify-content: space-between;
82
+ align-items: center;
83
+ }
84
+
85
+ .Input-variation .Input-input {
86
+ display: flex;
87
+ flex: 1;
88
+ flex-direction: column;
89
+ align-items: flex-start;
90
+ border-radius: 8px;
91
+ border: 1px solid rgba(114, 142, 167, 1);
92
+ background: var(--Primary-Blanc, #fff);
93
+ padding: 10px;
94
+ }
95
+
96
+ .Input-variation .Input-input input {
97
+ width: 100%;
98
+ border: none;
99
+ outline: none;
100
+ color: var(--noir);
101
+ }
102
+
103
+ .Input-variation .Input-icon-button {
104
+ display: flex;
105
+ width: 40px;
106
+ height: 40px;
107
+ justify-content: center;
108
+ align-items: center;
109
+ border-radius: 4px;
110
+ background: var(--Primary-Light-grey, #f4f7fb);
111
+ border: none;
112
+ margin-left: 8px;
113
+ cursor: pointer;
114
+ }
115
+
116
+ .Input-variation .Input-icon-button:hover {
117
+ background: rgba(0, 0, 0, 0.1);
118
+ }
119
+
120
+ .Input-variation .Input-icon-button i {
121
+ width: 19px;
122
+ height: 19px;
123
+ flex-shrink: 0;
124
+ color: var(--dark-grey, #f4f7fb);
125
+ font-size: 18px;
126
+ padding-left: 2px;
127
+ }
128
+
129
+ /* Style password */
130
+ .Input-password {
131
+ display: flex;
132
+ width: 100%;
133
+ flex-direction: column;
134
+ justify-content: center;
135
+ align-items: flex-start;
136
+ gap: 11px;
137
+ }
138
+
139
+ .Input-password .Input-container {
140
+ display: flex;
141
+ width: 100%;
142
+ flex-direction: row;
143
+ justify-content: space-between;
144
+ align-items: center;
145
+ border-radius: 8px;
146
+ border: 1px solid rgba(114, 142, 167, 1);
147
+ background: var(--Primary-Blanc, #fff);
148
+ padding: 10px;
149
+ }
150
+
151
+ .Input-password .Input-input {
152
+ display: flex;
153
+ flex: 1;
154
+ flex-direction: column;
155
+ align-items: flex-start;
156
+ }
157
+
158
+ .Input-password .Input-input input {
159
+ width: 100%;
160
+ border: none;
161
+ outline: none;
162
+ color: var(--noir);
163
+ }
164
+
165
+ .Input-password .Input-button {
166
+ color: var(--Primary-Mid-black, var(--primary-black, #171e25));
167
+ font-family: "Open Sans";
168
+ font-size: 12px;
169
+ font-style: normal;
170
+ font-weight: 600;
171
+ line-height: normal;
172
+ background: none;
173
+ border: none;
174
+ cursor: pointer;
175
+ }
176
+
177
+ .Input-error {
178
+ margin-top: 4px;
179
+ }
180
+
181
+ .error-message {
182
+ padding-top: 4px;
183
+ padding-left: 14px;
184
+ }
@@ -0,0 +1,22 @@
1
+ import React from "react";
2
+ import "./Input.css";
3
+ import "../../../styles/global.css";
4
+ import "../../../styles/icons.css";
5
+ import { commonRegex } from "../../../utils/regex";
6
+ export interface InputProps {
7
+ title: string;
8
+ style?: "default" | "variation" | "password";
9
+ placeholder: string;
10
+ endIcon?: string;
11
+ isRequired?: boolean;
12
+ validate?: RegExp | keyof typeof commonRegex;
13
+ onError?: (error: string) => void;
14
+ onChange?: (value: string) => void;
15
+ value?: string;
16
+ error?: string;
17
+ }
18
+ export interface InputRef {
19
+ validate: () => boolean;
20
+ }
21
+ declare const Input: React.ForwardRefExoticComponent<InputProps & React.RefAttributes<InputRef>>;
22
+ export default Input;
@@ -0,0 +1,86 @@
1
+ import React, { useState, useEffect, useCallback, forwardRef, useImperativeHandle, useRef, } from "react";
2
+ import "./Input.css";
3
+ import "../../../styles/global.css";
4
+ import "../../../styles/icons.css";
5
+ import { commonRegex } from "../../../utils/regex";
6
+ import TinyInfo from "../typography/TinyInfo";
7
+ import Paragraph from "../typography/Paragraph";
8
+ var Input = forwardRef(function (_a, ref) {
9
+ var title = _a.title, _b = _a.style, style = _b === void 0 ? "default" : _b, placeholder = _a.placeholder, endIcon = _a.endIcon, _c = _a.isRequired, isRequired = _c === void 0 ? false : _c, validate = _a.validate, onError = _a.onError, onChange = _a.onChange, propValue = _a.value, propError = _a.error;
10
+ var _d = useState(false), isPasswordVisible = _d[0], setIsPasswordVisible = _d[1];
11
+ var _e = useState(propValue || ""), value = _e[0], setValue = _e[1];
12
+ var _f = useState(propError || ""), error = _f[0], setError = _f[1];
13
+ var _g = useState(false), isTouched = _g[0], setIsTouched = _g[1];
14
+ var inputRef = useRef(null);
15
+ useEffect(function () {
16
+ setValue(propValue || "");
17
+ }, [propValue]);
18
+ useEffect(function () {
19
+ setError(propError || "");
20
+ }, [propError]);
21
+ var validateInput = useCallback(function () {
22
+ var _a;
23
+ // console.log(`Input ${title}: Validating input`);
24
+ var currentValue = ((_a = inputRef.current) === null || _a === void 0 ? void 0 : _a.value) || value;
25
+ // console.log(`Input ${title}: Current value: "${currentValue}"`);
26
+ var errorMessage = "";
27
+ if (isRequired && currentValue.trim() === "") {
28
+ errorMessage = "Ce champ est requis";
29
+ }
30
+ else if (validate && currentValue) {
31
+ var regex = typeof validate === "string" ? commonRegex[validate] : validate;
32
+ // console.log(`Input ${title}: Regex used: ${regex}`);
33
+ if (!regex.test(currentValue)) {
34
+ errorMessage = "Veuillez vérifier votre saisie";
35
+ }
36
+ }
37
+ setError(errorMessage);
38
+ setIsTouched(true);
39
+ // console.log(
40
+ // `Input ${title}: Validation result - ${errorMessage ? "invalid" : "valid"}`
41
+ // );
42
+ onError === null || onError === void 0 ? void 0 : onError(errorMessage);
43
+ return !errorMessage;
44
+ }, [isRequired, value, validate, onError, title]);
45
+ useImperativeHandle(ref, function () { return ({
46
+ validate: validateInput,
47
+ }); });
48
+ var handleChange = function (e) {
49
+ var newValue = e.target.value;
50
+ // console.log(`Input ${title}: Value changed to "${newValue}"`);
51
+ setValue(newValue);
52
+ onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
53
+ if (isTouched) {
54
+ validateInput();
55
+ }
56
+ };
57
+ var handleBlur = function () {
58
+ // console.log(`Input ${title}: Blur event triggered`);
59
+ setIsTouched(true);
60
+ validateInput();
61
+ };
62
+ var renderEndIcon = function () {
63
+ if (style === "variation" && endIcon) {
64
+ return (React.createElement("button", { className: "Input-icon-button" },
65
+ React.createElement("i", { className: endIcon })));
66
+ }
67
+ if (style === "password") {
68
+ return (React.createElement("button", { className: "Input-button", onClick: function () { return setIsPasswordVisible(!isPasswordVisible); } }, isPasswordVisible ? "CACHER" : "AFFICHER"));
69
+ }
70
+ return null;
71
+ };
72
+ return (React.createElement("div", { className: "Input Input-".concat(style) },
73
+ React.createElement("div", { className: "Input-title-container" },
74
+ React.createElement(Paragraph, { variant: "semiBold", color: "noir", text: title }),
75
+ isRequired && title && (React.createElement("span", { className: "Input-required" },
76
+ "\u00A0",
77
+ "*"))),
78
+ React.createElement("div", { className: "Input-container" },
79
+ React.createElement("div", { className: "Input-input ".concat(style === "password" ? "Input-password-input" : "") },
80
+ React.createElement("input", { ref: inputRef, type: style === "password" && !isPasswordVisible ? "password" : "text", placeholder: placeholder, className: "Input-placeholder", value: value, onChange: handleChange, onBlur: handleBlur })),
81
+ renderEndIcon(),
82
+ error && isTouched && (React.createElement("div", { className: "error-message" },
83
+ React.createElement(TinyInfo, { variant: "medium12", color: "actions-error", text: error }))))));
84
+ });
85
+ Input.displayName = "Input";
86
+ export default Input;
@@ -0,0 +1,54 @@
1
+ @import "../../../styles/colors.css";
2
+
3
+ .SearchBar {
4
+ display: flex;
5
+ width: 339px;
6
+ height: 45px;
7
+ padding: 0px 6px 0px 14px;
8
+ align-items: center;
9
+ gap: 73px;
10
+ flex-shrink: 0;
11
+ border-radius: 73px;
12
+ border: 1px solid var(--venom-grey, #e6edf5);
13
+ background: var(--Primary-Blanc, #fff);
14
+ }
15
+
16
+ .SearchBar-placeholder {
17
+ color: var(--Tags-Mid-grey, var(--light-grey, #728ea7));
18
+ font-family: "Open Sans";
19
+ font-size: 16px;
20
+ font-style: normal;
21
+ font-weight: 400;
22
+ line-height: normal;
23
+ opacity: 0.9;
24
+ border: none;
25
+ outline: none;
26
+ width: 100%;
27
+ padding-left: 3px;
28
+ }
29
+
30
+ .SearchBar-icon-button {
31
+ display: flex;
32
+ width: 33px;
33
+ height: 33px;
34
+ padding: 7.6px;
35
+ flex-direction: column;
36
+ align-items: center;
37
+ justify-content: center;
38
+ gap: 5px;
39
+ border-radius: 20px;
40
+ border: 1px solid rgba(0, 0, 0, 0.05);
41
+ background: var(--primary-blue, #25beeb);
42
+ cursor: pointer;
43
+ }
44
+
45
+ .SearchBar-icon-button i {
46
+ width: 18px;
47
+ height: 18px;
48
+ flex-shrink: 0;
49
+ color: #fff;
50
+ display: flex;
51
+ flex-direction: row;
52
+ align-items: center;
53
+ justify-content: center;
54
+ }
@@ -0,0 +1,12 @@
1
+ import React from "react";
2
+ import "./SearchBar.css";
3
+ import "../../../styles/global.css";
4
+ import "../../../styles/icons.css";
5
+ export interface SearchBarProps {
6
+ placeholder?: string;
7
+ endIcon?: string;
8
+ value?: string;
9
+ onChange?: (value: string) => void;
10
+ }
11
+ declare const SearchBar: React.FC<SearchBarProps>;
12
+ export default SearchBar;
@@ -0,0 +1,20 @@
1
+ import React, { useState } from "react";
2
+ import "./SearchBar.css";
3
+ import "../../../styles/global.css";
4
+ import "../../../styles/icons.css";
5
+ var SearchBar = function (_a) {
6
+ var _b = _a.placeholder, placeholder = _b === void 0 ? "Faites une recherche" : _b, _c = _a.endIcon, endIcon = _c === void 0 ? "allaw-icon-search" : _c, _d = _a.value, controlledValue = _d === void 0 ? "" : _d, onChange = _a.onChange;
7
+ var _e = useState(controlledValue), value = _e[0], setValue = _e[1];
8
+ var handleChange = function (event) {
9
+ var newValue = event.target.value;
10
+ setValue(newValue);
11
+ if (onChange) {
12
+ onChange(newValue);
13
+ }
14
+ };
15
+ return (React.createElement("div", { className: "SearchBar" },
16
+ React.createElement("input", { type: "text", placeholder: placeholder, className: "SearchBar-placeholder", value: controlledValue || value, onChange: handleChange }),
17
+ React.createElement("button", { className: "SearchBar-icon-button" },
18
+ React.createElement("i", { className: endIcon }))));
19
+ };
20
+ export default SearchBar;
@@ -0,0 +1,4 @@
1
+ export { default as Input } from "./Input";
2
+ export { default as SearchBar } from "./SearchBar";
3
+ export type { InputProps, InputRef } from "./Input";
4
+ export type { SearchBarProps } from "./SearchBar";
@@ -0,0 +1,2 @@
1
+ export { default as Input } from "./Input";
2
+ export { default as SearchBar } from "./SearchBar";
@@ -0,0 +1,109 @@
1
+ @import "../../../styles/colors.css";
2
+
3
+ .progress-bar-container {
4
+ display: flex;
5
+ width: 100%;
6
+ justify-content: space-between;
7
+ align-items: center;
8
+ height: 32px;
9
+ gap: 1rem;
10
+ }
11
+
12
+ .progress-bar-background {
13
+ display: flex;
14
+ width: 100%;
15
+ height: 8px;
16
+ align-items: center;
17
+ border-radius: 8px;
18
+ background: var(--venom-grey, #e6edf5);
19
+ margin: 0 10px;
20
+ }
21
+
22
+ .progress-bar-background.hidden-content {
23
+ visibility: hidden;
24
+ }
25
+
26
+ .progress-bar-icon-container {
27
+ width: 32px;
28
+ height: 32px;
29
+ flex-shrink: 0;
30
+ display: flex;
31
+ justify-content: center;
32
+ align-items: center;
33
+ }
34
+
35
+ .progress-bar-chevron {
36
+ width: 32px;
37
+ height: 32px;
38
+ cursor: pointer;
39
+ background: none;
40
+ border: none;
41
+ color: var(--noir, #171e25);
42
+ font-size: 14px;
43
+ padding: 0;
44
+ display: flex;
45
+ justify-content: center;
46
+ align-items: center;
47
+ border-radius: 50%;
48
+ transition: background-color 0.2s ease;
49
+ }
50
+
51
+ .progress-bar-chevron:hover {
52
+ background-color: var(--venom-grey, #e6edf5);
53
+ }
54
+ .progress-bar-chevron:active {
55
+ background-color: var(--venom-grey-dark, #d1dce8);
56
+ }
57
+
58
+ .progress-bar-background {
59
+ display: flex;
60
+ width: 100%;
61
+ height: 8px;
62
+ align-items: center;
63
+ border-radius: 8px;
64
+ background: var(--venom-grey, #e6edf5);
65
+ margin: 0 10px;
66
+ }
67
+
68
+ .progress-bar-fill {
69
+ height: 8px;
70
+ border-radius: 8px;
71
+ background: var(--primary-blue, #25beeb);
72
+ transition: width 0.35s ease;
73
+ }
74
+
75
+ .progress-bar-close {
76
+ display: flex;
77
+ flex-direction: row;
78
+ justify-content: center;
79
+ align-items: center;
80
+ width: 32px;
81
+ height: 32px;
82
+ /* padding: 5px; */
83
+ padding-right: 2px;
84
+ flex-shrink: 0;
85
+ cursor: pointer;
86
+ background: none;
87
+ border: none;
88
+ color: var(--noir, #171e25);
89
+ border-radius: 50%;
90
+ transition: background-color 0.2s ease;
91
+ }
92
+
93
+ .progress-bar-close:hover {
94
+ background-color: var(--venom-grey, #e6edf5);
95
+ }
96
+ .progress-bar-close:active {
97
+ background-color: var(--venom-grey-dark, #d1dce8);
98
+ }
99
+
100
+ .progress-bar-close i {
101
+ width: 14px;
102
+ height: 14px;
103
+ flex-shrink: 0;
104
+ font-size: 14px;
105
+ padding-left: 2px;
106
+ display: flex;
107
+ justify-content: center;
108
+ align-items: center;
109
+ }
@@ -0,0 +1,15 @@
1
+ import React from "react";
2
+ import "./ProgressBar.css";
3
+ import "../../../styles/global.css";
4
+ import "../../../styles/icons.css";
5
+ export interface ProgressBarProps {
6
+ steps: number;
7
+ currentStep: number;
8
+ startIcon?: boolean;
9
+ endIcon?: boolean;
10
+ onStartIconClick?: () => void;
11
+ onEndIconClick?: () => void;
12
+ showProgressBar?: boolean;
13
+ }
14
+ declare const ProgressBar: React.FC<ProgressBarProps>;
15
+ export default ProgressBar;
@@ -0,0 +1,17 @@
1
+ import React from "react";
2
+ import "./ProgressBar.css";
3
+ import "../../../styles/global.css";
4
+ import "../../../styles/icons.css";
5
+ var ProgressBar = function (_a) {
6
+ var steps = _a.steps, currentStep = _a.currentStep, _b = _a.startIcon, startIcon = _b === void 0 ? true : _b, _c = _a.endIcon, endIcon = _c === void 0 ? true : _c, onStartIconClick = _a.onStartIconClick, onEndIconClick = _a.onEndIconClick, _d = _a.showProgressBar, showProgressBar = _d === void 0 ? true : _d;
7
+ var constrainedCurrentStep = Math.max(1, Math.min(currentStep, steps));
8
+ var progressWidth = ((constrainedCurrentStep - 1) / (steps - 1)) * 100;
9
+ return (React.createElement("div", { className: "progress-bar-container" },
10
+ React.createElement("div", { className: "progress-bar-icon-container" }, startIcon && currentStep > 1 && (React.createElement("button", { className: "progress-bar-chevron", onClick: onStartIconClick },
11
+ React.createElement("i", { className: "allaw-icon-chevron-left" })))),
12
+ React.createElement("div", { className: "progress-bar-background ".concat(showProgressBar ? "" : "hidden-content") },
13
+ React.createElement("div", { className: "progress-bar-fill", style: { width: "".concat(progressWidth, "%") } })),
14
+ endIcon && (React.createElement("button", { className: "progress-bar-close", onClick: onEndIconClick },
15
+ React.createElement("i", { className: "allaw-icon-close" })))));
16
+ };
17
+ export default ProgressBar;
@@ -0,0 +1,2 @@
1
+ export { default as ProgressBar } from "./ProgressBar";
2
+ export type { ProgressBarProps } from "./ProgressBar";
@@ -0,0 +1 @@
1
+ export { default as ProgressBar } from "./ProgressBar";
@@ -0,0 +1,98 @@
1
+ .radio-button {
2
+ display: flex;
3
+ align-items: center;
4
+ gap: 8px;
5
+ border: none;
6
+ background: none;
7
+ cursor: pointer;
8
+ transition:
9
+ color 0.15s,
10
+ border-bottom 0.15s;
11
+ }
12
+
13
+ .radio-button-user {
14
+ width: 362px;
15
+ height: 48px;
16
+ padding: 12px 24px;
17
+ flex-shrink: 0;
18
+ border-radius: 16px;
19
+ background: var(--secondary-light-grey, #f4f7fb);
20
+ }
21
+
22
+ .radio-button-user-active {
23
+ background: var(--venom-grey, #e6edf5);
24
+ }
25
+
26
+ .radio-button-hybride {
27
+ display: flex;
28
+ align-items: center;
29
+ gap: 8px;
30
+ }
31
+
32
+ .radio-button-hybride-active {
33
+ display: inline-flex;
34
+ align-items: center;
35
+ gap: 8px;
36
+ }
37
+
38
+ .radio-button-icon {
39
+ display: flex;
40
+ align-items: center;
41
+ justify-content: center;
42
+ border-radius: 50%;
43
+ background: var(--Primary-Blanc, #fff);
44
+ }
45
+
46
+ .radio-button-user .radio-button-icon {
47
+ width: 24px;
48
+ height: 24px;
49
+ border: 1px solid #d1dce7;
50
+ border-radius: 50%;
51
+ }
52
+
53
+ .radio-button-user-active .radio-button-icon {
54
+ width: 24px;
55
+ height: 24px;
56
+ padding: 3px;
57
+ border: 1px solid #d1dce7;
58
+ border-radius: 50%;
59
+ }
60
+
61
+ .radio-button-user-active .radio-button-icon-inner {
62
+ width: 16px;
63
+ height: 16px;
64
+ border-radius: 50%;
65
+ background: var(--primary-blue, #25beeb);
66
+ }
67
+
68
+ .radio-button-hybride .radio-button-icon {
69
+ width: 18px;
70
+ height: 18px;
71
+ border: 1px solid #d1dce7;
72
+ border-radius: 50%;
73
+ }
74
+
75
+ .radio-button-hybride-active .radio-button-icon {
76
+ width: 18px;
77
+ height: 18px;
78
+ padding: 3px;
79
+ border: 0.75px solid #d1dce7;
80
+ border-radius: 50%;
81
+ }
82
+
83
+ .radio-button-hybride-active .radio-button-icon-inner {
84
+ width: 12px;
85
+ height: 12px;
86
+ flex-shrink: 0;
87
+ border-radius: 24px;
88
+ background: var(--primary-blue, #25beeb);
89
+ }
90
+
91
+ .radio-button-label {
92
+ font-family: "Open Sans", sans-serif;
93
+ font-size: 16px;
94
+ font-style: normal;
95
+ font-weight: 600;
96
+ line-height: normal;
97
+ color: var(--Primary-Mid-black, var(--primary-black, #171e25));
98
+ }
@@ -0,0 +1,11 @@
1
+ import React from "react";
2
+ import "./RadioButton.css";
3
+ import "../../../styles/global.css";
4
+ export interface RadioButtonProps {
5
+ label: string;
6
+ style?: "user" | "hybride";
7
+ isActive: boolean;
8
+ onClick: () => void;
9
+ }
10
+ declare const RadioButton: React.FC<RadioButtonProps>;
11
+ export default RadioButton;
@@ -0,0 +1,10 @@
1
+ import React from "react";
2
+ import "./RadioButton.css";
3
+ import "../../../styles/global.css";
4
+ var RadioButton = function (_a) {
5
+ var label = _a.label, _b = _a.style, style = _b === void 0 ? "user" : _b, isActive = _a.isActive, onClick = _a.onClick;
6
+ return (React.createElement("button", { className: "radio-button radio-button-".concat(style, " ").concat(isActive ? "radio-button-".concat(style, "-active") : ""), onClick: onClick },
7
+ React.createElement("span", { className: "radio-button-icon" }, isActive && React.createElement("span", { className: "radio-button-icon-inner" })),
8
+ React.createElement("span", { className: "radio-button-label" }, label)));
9
+ };
10
+ export default RadioButton;
@@ -0,0 +1,2 @@
1
+ export { default as RadioButton } from "./RadioButton";
2
+ export type { RadioButtonProps } from "./RadioButton";
@@ -0,0 +1 @@
1
+ export { default as RadioButton } from "./RadioButton";