allaw-ui 0.0.19 → 0.0.293

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 (166) hide show
  1. package/README.md +30 -10
  2. package/dist/app/globals.css +5 -0
  3. package/dist/components/atoms/buttons/ActionCircleButton.css +143 -0
  4. package/dist/components/atoms/buttons/ActionCircleButton.d.ts +9 -0
  5. package/dist/components/atoms/buttons/ActionCircleButton.js +23 -0
  6. package/dist/components/atoms/buttons/AgendaSlot.css +116 -0
  7. package/dist/components/atoms/buttons/AgendaSlot.d.ts +10 -0
  8. package/dist/components/atoms/buttons/AgendaSlot.js +7 -0
  9. package/dist/components/atoms/buttons/FavoriteToggle.css +35 -0
  10. package/dist/components/atoms/buttons/FavoriteToggle.d.ts +8 -0
  11. package/dist/components/atoms/buttons/FavoriteToggle.js +11 -0
  12. package/dist/components/atoms/buttons/FilterButton.css +55 -0
  13. package/dist/components/atoms/buttons/FilterButton.d.ts +9 -0
  14. package/dist/components/atoms/buttons/FilterButton.js +9 -0
  15. package/dist/components/atoms/buttons/GhostButton.css +63 -0
  16. package/dist/components/atoms/buttons/GhostButton.d.ts +14 -0
  17. package/dist/components/atoms/buttons/GhostButton.js +11 -0
  18. package/dist/components/atoms/buttons/IconButton.css +111 -0
  19. package/dist/components/atoms/buttons/IconButton.d.ts +10 -0
  20. package/dist/components/atoms/buttons/IconButton.js +14 -0
  21. package/dist/components/atoms/buttons/PendingDocuments.css +53 -0
  22. package/dist/components/atoms/buttons/PendingDocuments.d.ts +10 -0
  23. package/dist/components/atoms/buttons/PendingDocuments.js +13 -0
  24. package/dist/components/{buttons/ButtonPrimary.css → atoms/buttons/PrimaryButton.css} +11 -7
  25. package/dist/components/atoms/buttons/PrimaryButton.d.ts +15 -0
  26. package/dist/components/atoms/buttons/PrimaryButton.js +11 -0
  27. package/dist/components/atoms/buttons/SecondaryButton.css +123 -0
  28. package/dist/components/atoms/buttons/SecondaryButton.d.ts +14 -0
  29. package/dist/components/atoms/buttons/SecondaryButton.js +11 -0
  30. package/dist/components/atoms/buttons/TabNavigation.css +43 -0
  31. package/dist/components/atoms/buttons/TabNavigation.d.ts +13 -0
  32. package/dist/components/atoms/buttons/TabNavigation.js +10 -0
  33. package/dist/components/atoms/buttons/TertiaryButton.css +63 -0
  34. package/dist/components/atoms/buttons/TertiaryButton.d.ts +10 -0
  35. package/dist/components/atoms/buttons/TertiaryButton.js +10 -0
  36. package/dist/components/atoms/buttons/index.d.ts +18 -0
  37. package/dist/components/atoms/buttons/index.js +9 -0
  38. package/dist/components/atoms/checkboxes/Checkbox.css +50 -0
  39. package/dist/components/atoms/checkboxes/Checkbox.d.ts +10 -0
  40. package/dist/components/atoms/checkboxes/Checkbox.js +19 -0
  41. package/dist/components/atoms/checkboxes/index.d.ts +2 -0
  42. package/dist/components/atoms/checkboxes/index.js +1 -0
  43. package/dist/components/atoms/inputs/Input.css +185 -0
  44. package/dist/components/atoms/inputs/Input.d.ts +22 -0
  45. package/dist/components/atoms/inputs/Input.js +86 -0
  46. package/dist/components/atoms/inputs/SearchBar.css +54 -0
  47. package/dist/components/atoms/inputs/SearchBar.d.ts +12 -0
  48. package/dist/components/atoms/inputs/SearchBar.js +20 -0
  49. package/dist/components/atoms/inputs/index.d.ts +4 -0
  50. package/dist/components/atoms/inputs/index.js +2 -0
  51. package/dist/components/atoms/progressBars/ProgressBar.css +108 -0
  52. package/dist/components/atoms/progressBars/ProgressBar.d.ts +15 -0
  53. package/dist/components/atoms/progressBars/ProgressBar.js +17 -0
  54. package/dist/components/atoms/progressBars/index.d.ts +2 -0
  55. package/dist/components/atoms/progressBars/index.js +1 -0
  56. package/dist/components/atoms/radios/RadioButton.css +98 -0
  57. package/dist/components/atoms/radios/RadioButton.d.ts +11 -0
  58. package/dist/components/atoms/radios/RadioButton.js +10 -0
  59. package/dist/components/atoms/radios/index.d.ts +2 -0
  60. package/dist/components/atoms/radios/index.js +1 -0
  61. package/dist/components/atoms/selects/Select.css +103 -0
  62. package/dist/components/atoms/selects/Select.d.ts +22 -0
  63. package/dist/components/atoms/selects/Select.js +86 -0
  64. package/dist/components/atoms/selects/index.d.ts +2 -0
  65. package/dist/components/atoms/selects/index.js +1 -0
  66. package/dist/components/atoms/tags/AppointementStatusTag.css +113 -13
  67. package/dist/components/atoms/tags/AppointementStatusTag.d.ts +1 -1
  68. package/dist/components/atoms/tags/FolderStatusTag.css +26 -0
  69. package/dist/components/atoms/tags/FolderStatusTag.d.ts +7 -0
  70. package/dist/components/atoms/tags/FolderStatusTag.js +8 -0
  71. package/dist/components/atoms/tags/OtherStatusTag.css +72 -0
  72. package/dist/components/atoms/tags/OtherStatusTag.d.ts +10 -0
  73. package/dist/components/atoms/tags/OtherStatusTag.js +10 -0
  74. package/dist/components/atoms/tags/index.d.ts +6 -0
  75. package/dist/components/atoms/tags/index.js +3 -0
  76. package/dist/components/atoms/typography/Heading.css +68 -0
  77. package/dist/components/atoms/typography/Heading.d.ts +9 -0
  78. package/dist/components/atoms/typography/Heading.js +7 -0
  79. package/dist/components/atoms/typography/Paragraph.css +43 -0
  80. package/dist/components/atoms/typography/Paragraph.d.ts +9 -0
  81. package/dist/components/atoms/typography/Paragraph.js +7 -0
  82. package/dist/components/atoms/typography/SmallTitle.css +53 -0
  83. package/dist/components/atoms/typography/SmallTitle.d.ts +9 -0
  84. package/dist/components/atoms/typography/SmallTitle.js +7 -0
  85. package/dist/components/atoms/typography/Subtitle.css +40 -0
  86. package/dist/components/atoms/typography/Subtitle.d.ts +9 -0
  87. package/dist/components/atoms/typography/Subtitle.js +7 -0
  88. package/dist/components/atoms/typography/TinyInfo.css +56 -0
  89. package/dist/components/atoms/typography/TinyInfo.d.ts +9 -0
  90. package/dist/components/atoms/typography/TinyInfo.js +8 -0
  91. package/dist/components/atoms/typography/index.d.ts +10 -0
  92. package/dist/components/atoms/typography/index.js +5 -0
  93. package/dist/components/atoms/uiVariables/BorderRadius.d.ts +6 -0
  94. package/dist/components/atoms/uiVariables/BorderRadius.js +12 -0
  95. package/dist/components/atoms/uiVariables/BorderRadiusExample.css +31 -0
  96. package/dist/components/atoms/uiVariables/Shadows.d.ts +6 -0
  97. package/dist/components/atoms/uiVariables/Shadows.js +11 -0
  98. package/dist/components/atoms/uiVariables/ShadowsExample.css +27 -0
  99. package/dist/components/atoms/uiVariables/Strokes.d.ts +6 -0
  100. package/dist/components/atoms/uiVariables/Strokes.js +10 -0
  101. package/dist/components/atoms/uiVariables/StrokesExample.css +22 -0
  102. package/dist/components/atoms/uiVariables/index.d.ts +3 -0
  103. package/dist/components/atoms/uiVariables/index.js +3 -0
  104. package/dist/components/molecules/appointmentSlot/AppointmentSlot.css +366 -0
  105. package/dist/components/molecules/appointmentSlot/AppointmentSlot.d.ts +25 -0
  106. package/dist/components/molecules/appointmentSlot/AppointmentSlot.js +109 -0
  107. package/dist/components/molecules/appointmentSlot/TestClic.css +19 -0
  108. package/dist/components/molecules/appointmentSlot/TestClic.d.ts +4 -0
  109. package/dist/components/molecules/appointmentSlot/TestClic.js +28 -0
  110. package/dist/components/molecules/appointmentSlot/index.d.ts +2 -0
  111. package/dist/components/molecules/appointmentSlot/index.js +1 -0
  112. package/dist/components/molecules/caseCard/CaseCard.css +119 -0
  113. package/dist/components/molecules/caseCard/CaseCard.d.ts +14 -0
  114. package/dist/components/molecules/caseCard/CaseCard.js +20 -0
  115. package/dist/components/molecules/caseCard/index.d.ts +2 -0
  116. package/dist/components/molecules/caseCard/index.js +1 -0
  117. package/dist/components/molecules/checkboxForm/CheckboxForm.css +22 -0
  118. package/dist/components/molecules/checkboxForm/CheckboxForm.d.ts +11 -0
  119. package/dist/components/molecules/checkboxForm/CheckboxForm.js +15 -0
  120. package/dist/components/molecules/checkboxForm/index.d.ts +2 -0
  121. package/dist/components/molecules/checkboxForm/index.js +1 -0
  122. package/dist/components/molecules/contactCard/ContactCard.css +386 -0
  123. package/dist/components/molecules/contactCard/ContactCard.d.ts +17 -0
  124. package/dist/components/molecules/contactCard/ContactCard.js +80 -0
  125. package/dist/components/molecules/contactCard/index.d.ts +2 -0
  126. package/dist/components/molecules/contactCard/index.js +1 -0
  127. package/dist/components/molecules/documentCard/DocumentCard.css +130 -0
  128. package/dist/components/molecules/documentCard/DocumentCard.d.ts +14 -0
  129. package/dist/components/molecules/documentCard/DocumentCard.js +59 -0
  130. package/dist/components/molecules/documentCard/index.d.ts +2 -0
  131. package/dist/components/molecules/documentCard/index.js +1 -0
  132. package/dist/components/molecules/employeeCard/EmployeeCard.css +187 -0
  133. package/dist/components/molecules/employeeCard/EmployeeCard.d.ts +15 -0
  134. package/dist/components/molecules/employeeCard/EmployeeCard.js +34 -0
  135. package/dist/components/molecules/employeeCard/index.d.ts +2 -0
  136. package/dist/components/molecules/employeeCard/index.js +1 -0
  137. package/dist/components/molecules/stepper/Stepper.css +80 -0
  138. package/dist/components/molecules/stepper/Stepper.d.ts +27 -0
  139. package/dist/components/molecules/stepper/Stepper.js +66 -0
  140. package/dist/components/molecules/stepper/index.d.ts +2 -0
  141. package/dist/components/molecules/stepper/index.js +1 -0
  142. package/dist/index.d.ts +36 -2
  143. package/dist/index.js +52 -2
  144. package/dist/styles/colors.css +2 -0
  145. package/dist/styles/global.css +9 -0
  146. package/dist/styles/ui-variables/border-radius.css +6 -0
  147. package/dist/styles/ui-variables/shadows.css +5 -0
  148. package/dist/styles/ui-variables/stroke.css +4 -0
  149. package/dist/utils/regex.d.ts +5 -0
  150. package/dist/utils/regex.js +7 -0
  151. package/package.json +36 -16
  152. package/dist/buttons/ButtonPrimary.d.ts +0 -10
  153. package/dist/buttons/ButtonPrimary.js +0 -10
  154. package/dist/components/atoms/buttons/ButtonPrimary.css +0 -52
  155. package/dist/components/atoms/buttons/ButtonPrimary.d.ts +0 -11
  156. package/dist/components/atoms/buttons/ButtonPrimary.js +0 -11
  157. package/dist/components/buttons/ButtonPrimary.d.ts +0 -11
  158. package/dist/components/buttons/ButtonPrimary.js +0 -11
  159. package/dist/components/tags/AppointementStatusTag.css +0 -58
  160. package/dist/components/tags/AppointementStatusTag.d.ts +0 -8
  161. package/dist/components/tags/AppointementStatusTag.js +0 -41
  162. package/dist/stories/button.css +0 -30
  163. package/dist/stories/header.css +0 -32
  164. package/dist/stories/page.css +0 -69
  165. package/dist/tags/AppointementStatusTag.d.ts +0 -8
  166. package/dist/tags/AppointementStatusTag.js +0 -41
@@ -0,0 +1,50 @@
1
+ .checkbox {
2
+ display: flex;
3
+ justify-content: center;
4
+ align-items: center;
5
+ width: 24px;
6
+ height: 24px;
7
+ flex-shrink: 0;
8
+ background: none;
9
+ border: none;
10
+ cursor: pointer;
11
+ }
12
+
13
+ .checkbox-default {
14
+ border: 2px solid var(--noir);
15
+ border-radius: 1.92px;
16
+ }
17
+
18
+ .checkbox-pressed {
19
+ border: 2px solid var(--noir);
20
+ border-radius: 1.92px;
21
+ }
22
+
23
+ .checkbox-pressed .checkbox-icon {
24
+ display: flex;
25
+ justify-content: center;
26
+ align-items: center;
27
+ width: 24px;
28
+ height: 24px;
29
+ font-size: 15px;
30
+ padding-left: 1px;
31
+ padding-bottom: 2px;
32
+ }
33
+
34
+ .checkbox-black {
35
+ border-color: var(--noir);
36
+ color: var(--noir);
37
+ }
38
+
39
+ .checkbox-white {
40
+ border-color: var(--pure-white);
41
+ color: var(--pure-white);
42
+ }
43
+
44
+ .checkbox-icon-black {
45
+ color: var(--noir);
46
+ }
47
+
48
+ .checkbox-icon-white {
49
+ color: var(--pure-white);
50
+ }
@@ -0,0 +1,10 @@
1
+ import React from "react";
2
+ import "./Checkbox.css";
3
+ import "../../../styles/global.css";
4
+ export interface CheckboxProps {
5
+ checked?: boolean;
6
+ onChange?: (checked: boolean) => void;
7
+ isWhite?: boolean;
8
+ }
9
+ declare const Checkbox: React.FC<CheckboxProps>;
10
+ export default Checkbox;
@@ -0,0 +1,19 @@
1
+ import React, { useState, useEffect } from "react";
2
+ import "./Checkbox.css";
3
+ import "../../../styles/global.css";
4
+ var Checkbox = function (_a) {
5
+ var _b = _a.checked, checked = _b === void 0 ? false : _b, onChange = _a.onChange, _c = _a.isWhite, isWhite = _c === void 0 ? false : _c;
6
+ var _d = useState(checked), isChecked = _d[0], setIsChecked = _d[1];
7
+ useEffect(function () {
8
+ setIsChecked(checked);
9
+ }, [checked]);
10
+ var handleClick = function () {
11
+ var newChecked = !isChecked;
12
+ setIsChecked(newChecked);
13
+ if (onChange) {
14
+ onChange(newChecked);
15
+ }
16
+ };
17
+ return (React.createElement("button", { className: "checkbox ".concat(isChecked ? "checkbox-pressed" : "checkbox-default", " ").concat(isWhite ? "checkbox-white" : "checkbox-black"), onClick: handleClick }, isChecked && (React.createElement("span", { className: "checkbox-icon allaw-icon-close ".concat(isWhite ? "checkbox-icon-white" : "checkbox-icon-black") }))));
18
+ };
19
+ export default Checkbox;
@@ -0,0 +1,2 @@
1
+ export { default as Checkbox } from "./Checkbox";
2
+ export type { CheckboxProps } from "./Checkbox";
@@ -0,0 +1 @@
1
+ export { default as Checkbox } from "./Checkbox";
@@ -0,0 +1,185 @@
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
+
55
+ border-radius: 8px;
56
+ border: 1px solid rgba(114, 142, 167, 1);
57
+ background: var(--Primary-Blanc, #fff);
58
+ padding: 10px;
59
+ }
60
+
61
+ .Input-default .Input-input input {
62
+ width: 100%;
63
+ border: none;
64
+ outline: none;
65
+ color: var(--noir);
66
+ }
67
+
68
+ /* Style variation */
69
+ .Input-variation {
70
+ display: flex;
71
+ width: 100%;
72
+ flex-direction: column;
73
+ justify-content: center;
74
+ align-items: flex-start;
75
+ gap: 11px;
76
+ }
77
+
78
+ .Input-variation .Input-container {
79
+ display: flex;
80
+ width: 100%;
81
+ flex-direction: row;
82
+ justify-content: space-between;
83
+ align-items: center;
84
+ }
85
+
86
+ .Input-variation .Input-input {
87
+ display: flex;
88
+ flex: 1;
89
+ flex-direction: column;
90
+ align-items: flex-start;
91
+ border-radius: 8px;
92
+ border: 1px solid rgba(114, 142, 167, 1);
93
+ background: var(--Primary-Blanc, #fff);
94
+ padding: 10px;
95
+ }
96
+
97
+ .Input-variation .Input-input input {
98
+ width: 100%;
99
+ border: none;
100
+ outline: none;
101
+ color: var(--noir);
102
+ }
103
+
104
+ .Input-variation .Input-icon-button {
105
+ display: flex;
106
+ width: 40px;
107
+ height: 40px;
108
+ justify-content: center;
109
+ align-items: center;
110
+ border-radius: 4px;
111
+ background: var(--Primary-Light-grey, #f4f7fb);
112
+ border: none;
113
+ margin-left: 8px;
114
+ cursor: pointer;
115
+ }
116
+
117
+ .Input-variation .Input-icon-button:hover {
118
+ background: rgba(0, 0, 0, 0.1);
119
+ }
120
+
121
+ .Input-variation .Input-icon-button i {
122
+ width: 19px;
123
+ height: 19px;
124
+ flex-shrink: 0;
125
+ color: var(--dark-grey, #f4f7fb);
126
+ font-size: 18px;
127
+ padding-left: 2px;
128
+ }
129
+
130
+ /* Style password */
131
+ .Input-password {
132
+ display: flex;
133
+ width: 100%;
134
+ flex-direction: column;
135
+ justify-content: center;
136
+ align-items: flex-start;
137
+ gap: 11px;
138
+ }
139
+
140
+ .Input-password .Input-container {
141
+ display: flex;
142
+ width: 100%;
143
+ flex-direction: row;
144
+ justify-content: space-between;
145
+ align-items: center;
146
+ border-radius: 8px;
147
+ border: 1px solid rgba(114, 142, 167, 1);
148
+ background: var(--Primary-Blanc, #fff);
149
+ padding: 10px;
150
+ }
151
+
152
+ .Input-password .Input-input {
153
+ display: flex;
154
+ flex: 1;
155
+ flex-direction: column;
156
+ align-items: flex-start;
157
+ }
158
+
159
+ .Input-password .Input-input input {
160
+ width: 100%;
161
+ border: none;
162
+ outline: none;
163
+ color: var(--noir);
164
+ }
165
+
166
+ .Input-password .Input-button {
167
+ color: var(--Primary-Mid-black, var(--primary-black, #171e25));
168
+ font-family: "Open Sans";
169
+ font-size: 12px;
170
+ font-style: normal;
171
+ font-weight: 600;
172
+ line-height: normal;
173
+ background: none;
174
+ border: none;
175
+ cursor: pointer;
176
+ }
177
+
178
+ .Input-error {
179
+ margin-top: 4px;
180
+ }
181
+
182
+ .error-message {
183
+ padding-top: 4px;
184
+ padding-left: 14px;
185
+ }
@@ -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,108 @@
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
+ }
10
+
11
+ .progress-bar-background {
12
+ display: flex;
13
+ width: 100%;
14
+ height: 8px;
15
+ align-items: center;
16
+ border-radius: 8px;
17
+ background: var(--venom-grey, #e6edf5);
18
+ margin: 0 10px;
19
+ }
20
+
21
+ .progress-bar-background.hidden-content {
22
+ visibility: hidden;
23
+ }
24
+
25
+ .progress-bar-icon-container {
26
+ width: 32px;
27
+ height: 32px;
28
+ flex-shrink: 0;
29
+ display: flex;
30
+ justify-content: center;
31
+ align-items: center;
32
+ }
33
+
34
+ .progress-bar-chevron {
35
+ width: 32px;
36
+ height: 32px;
37
+ cursor: pointer;
38
+ background: none;
39
+ border: none;
40
+ color: var(--noir, #171e25);
41
+ font-size: 14px;
42
+ padding: 0;
43
+ display: flex;
44
+ justify-content: center;
45
+ align-items: center;
46
+ border-radius: 50%;
47
+ transition: background-color 0.2s ease;
48
+ }
49
+
50
+ .progress-bar-chevron:hover {
51
+ background-color: var(--venom-grey, #e6edf5);
52
+ }
53
+ .progress-bar-chevron:active {
54
+ background-color: var(--venom-grey-dark, #d1dce8);
55
+ }
56
+
57
+ .progress-bar-background {
58
+ display: flex;
59
+ width: 100%;
60
+ height: 8px;
61
+ align-items: center;
62
+ border-radius: 8px;
63
+ background: var(--venom-grey, #e6edf5);
64
+ margin: 0 10px;
65
+ }
66
+
67
+ .progress-bar-fill {
68
+ height: 8px;
69
+ border-radius: 8px;
70
+ background: var(--primary-blue, #25beeb);
71
+ transition: width 0.35s ease;
72
+ }
73
+
74
+ .progress-bar-close {
75
+ display: flex;
76
+ flex-direction: row;
77
+ justify-content: center;
78
+ align-items: center;
79
+ width: 32px;
80
+ height: 32px;
81
+ /* padding: 5px; */
82
+ padding-right: 2px;
83
+ flex-shrink: 0;
84
+ cursor: pointer;
85
+ background: none;
86
+ border: none;
87
+ color: var(--noir, #171e25);
88
+ border-radius: 50%;
89
+ transition: background-color 0.2s ease;
90
+ }
91
+
92
+ .progress-bar-close:hover {
93
+ background-color: var(--venom-grey, #e6edf5);
94
+ }
95
+ .progress-bar-close:active {
96
+ background-color: var(--venom-grey-dark, #d1dce8);
97
+ }
98
+
99
+ .progress-bar-close i {
100
+ width: 14px;
101
+ height: 14px;
102
+ flex-shrink: 0;
103
+ font-size: 14px;
104
+ padding-left: 2px;
105
+ display: flex;
106
+ justify-content: center;
107
+ align-items: center;
108
+ }
@@ -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";