allaw-ui 0.0.345 → 0.0.347
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.
- package/dist/components/atoms/filter/Basefiler.css +94 -3
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/package.json +1 -1
- package/dist/app/layout.d.ts +0 -0
- package/dist/app/layout.js +0 -0
- package/dist/components/atoms/buttons/ActionCircleButton.d.ts +0 -9
- package/dist/components/atoms/buttons/ActionCircleButton.js +0 -23
- package/dist/components/atoms/buttons/AgendaSlot.d.ts +0 -10
- package/dist/components/atoms/buttons/AgendaSlot.js +0 -7
- package/dist/components/atoms/buttons/FavoriteToggle.d.ts +0 -8
- package/dist/components/atoms/buttons/FavoriteToggle.js +0 -11
- package/dist/components/atoms/buttons/FilterButton.d.ts +0 -9
- package/dist/components/atoms/buttons/FilterButton.js +0 -9
- package/dist/components/atoms/buttons/FilterButtonPrimary.d.ts +0 -9
- package/dist/components/atoms/buttons/FilterButtonPrimary.js +0 -46
- package/dist/components/atoms/buttons/GhostButton.d.ts +0 -14
- package/dist/components/atoms/buttons/GhostButton.js +0 -11
- package/dist/components/atoms/buttons/IconButton.d.ts +0 -10
- package/dist/components/atoms/buttons/IconButton.js +0 -14
- package/dist/components/atoms/buttons/OAuthProviderButton.d.ts +0 -12
- package/dist/components/atoms/buttons/OAuthProviderButton.js +0 -143
- package/dist/components/atoms/buttons/PendingDocuments.d.ts +0 -10
- package/dist/components/atoms/buttons/PendingDocuments.js +0 -13
- package/dist/components/atoms/buttons/PrimaryButton.d.ts +0 -16
- package/dist/components/atoms/buttons/PrimaryButton.js +0 -11
- package/dist/components/atoms/buttons/SecondaryButton.d.ts +0 -14
- package/dist/components/atoms/buttons/SecondaryButton.js +0 -11
- package/dist/components/atoms/buttons/TabNavigation.d.ts +0 -13
- package/dist/components/atoms/buttons/TabNavigation.js +0 -10
- package/dist/components/atoms/buttons/TertiaryButton.d.ts +0 -10
- package/dist/components/atoms/buttons/TertiaryButton.js +0 -10
- package/dist/components/atoms/buttons/index.d.ts +0 -22
- package/dist/components/atoms/buttons/index.js +0 -11
- package/dist/components/atoms/checkboxes/Checkbox.d.ts +0 -13
- package/dist/components/atoms/checkboxes/Checkbox.js +0 -19
- package/dist/components/atoms/checkboxes/index.d.ts +0 -2
- package/dist/components/atoms/checkboxes/index.js +0 -1
- package/dist/components/atoms/filter/Filter.d.ts +0 -22
- package/dist/components/atoms/filter/Filter.js +0 -87
- package/dist/components/atoms/filter/index.d.ts +0 -2
- package/dist/components/atoms/filter/index.js +0 -1
- package/dist/components/atoms/inputs/Input.d.ts +0 -22
- package/dist/components/atoms/inputs/Input.js +0 -86
- package/dist/components/atoms/inputs/SearchBar.d.ts +0 -12
- package/dist/components/atoms/inputs/SearchBar.js +0 -20
- package/dist/components/atoms/inputs/index.d.ts +0 -4
- package/dist/components/atoms/inputs/index.js +0 -2
- package/dist/components/atoms/progressBars/ProgressBar.d.ts +0 -15
- package/dist/components/atoms/progressBars/ProgressBar.js +0 -17
- package/dist/components/atoms/progressBars/index.d.ts +0 -2
- package/dist/components/atoms/progressBars/index.js +0 -1
- package/dist/components/atoms/radios/RadioButton.d.ts +0 -11
- package/dist/components/atoms/radios/RadioButton.js +0 -10
- package/dist/components/atoms/radios/index.d.ts +0 -2
- package/dist/components/atoms/radios/index.js +0 -1
- package/dist/components/atoms/selects/Select.d.ts +0 -24
- package/dist/components/atoms/selects/Select.js +0 -84
- package/dist/components/atoms/selects/index.d.ts +0 -2
- package/dist/components/atoms/selects/index.js +0 -1
- package/dist/components/atoms/tags/AppointementStatusTag.d.ts +0 -8
- package/dist/components/atoms/tags/AppointementStatusTag.js +0 -41
- package/dist/components/atoms/tags/FolderStatusTag.d.ts +0 -7
- package/dist/components/atoms/tags/FolderStatusTag.js +0 -8
- package/dist/components/atoms/tags/OtherStatusTag.d.ts +0 -10
- package/dist/components/atoms/tags/OtherStatusTag.js +0 -10
- package/dist/components/atoms/tags/index.d.ts +0 -6
- package/dist/components/atoms/tags/index.js +0 -3
- package/dist/components/atoms/typography/Heading.d.ts +0 -10
- package/dist/components/atoms/typography/Heading.js +0 -7
- package/dist/components/atoms/typography/Paragraph.d.ts +0 -12
- package/dist/components/atoms/typography/Paragraph.js +0 -24
- package/dist/components/atoms/typography/SmallTitle.d.ts +0 -9
- package/dist/components/atoms/typography/SmallTitle.js +0 -7
- package/dist/components/atoms/typography/Subtitle.d.ts +0 -9
- package/dist/components/atoms/typography/Subtitle.js +0 -7
- package/dist/components/atoms/typography/TinyInfo.d.ts +0 -12
- package/dist/components/atoms/typography/TinyInfo.js +0 -15
- package/dist/components/atoms/typography/index.d.ts +0 -10
- package/dist/components/atoms/typography/index.js +0 -5
- package/dist/components/atoms/uiVariables/BorderRadius.d.ts +0 -6
- package/dist/components/atoms/uiVariables/BorderRadius.js +0 -12
- package/dist/components/atoms/uiVariables/Shadows.d.ts +0 -6
- package/dist/components/atoms/uiVariables/Shadows.js +0 -11
- package/dist/components/atoms/uiVariables/Strokes.d.ts +0 -6
- package/dist/components/atoms/uiVariables/Strokes.js +0 -10
- package/dist/components/atoms/uiVariables/index.d.ts +0 -3
- package/dist/components/atoms/uiVariables/index.js +0 -3
- package/dist/components/molecules/appointmentSlot/AppointmentSlot.d.ts +0 -25
- package/dist/components/molecules/appointmentSlot/AppointmentSlot.js +0 -109
- package/dist/components/molecules/appointmentSlot/index.d.ts +0 -2
- package/dist/components/molecules/appointmentSlot/index.js +0 -1
- package/dist/components/molecules/breadcrumb/Breadcrumb.d.ts +0 -12
- package/dist/components/molecules/breadcrumb/Breadcrumb.js +0 -12
- package/dist/components/molecules/breadcrumb/index.d.ts +0 -2
- package/dist/components/molecules/breadcrumb/index.js +0 -1
- package/dist/components/molecules/caseCard/CaseCard.d.ts +0 -14
- package/dist/components/molecules/caseCard/CaseCard.js +0 -20
- package/dist/components/molecules/caseCard/index.d.ts +0 -2
- package/dist/components/molecules/caseCard/index.js +0 -1
- package/dist/components/molecules/checkboxForm/CheckboxForm.d.ts +0 -16
- package/dist/components/molecules/checkboxForm/CheckboxForm.js +0 -24
- package/dist/components/molecules/checkboxForm/index.d.ts +0 -2
- package/dist/components/molecules/checkboxForm/index.js +0 -1
- package/dist/components/molecules/contactCard/ContactCard.d.ts +0 -17
- package/dist/components/molecules/contactCard/ContactCard.js +0 -80
- package/dist/components/molecules/contactCard/index.d.ts +0 -2
- package/dist/components/molecules/contactCard/index.js +0 -1
- package/dist/components/molecules/documentCard/DocumentCard.d.ts +0 -14
- package/dist/components/molecules/documentCard/DocumentCard.js +0 -59
- package/dist/components/molecules/documentCard/index.d.ts +0 -2
- package/dist/components/molecules/documentCard/index.js +0 -1
- package/dist/components/molecules/employeeCard/EmployeeCard.d.ts +0 -15
- package/dist/components/molecules/employeeCard/EmployeeCard.js +0 -34
- package/dist/components/molecules/employeeCard/index.d.ts +0 -2
- package/dist/components/molecules/employeeCard/index.js +0 -1
- package/dist/components/molecules/proCard/ProCard.d.ts +0 -13
- package/dist/components/molecules/proCard/ProCard.js +0 -25
- package/dist/components/molecules/proCard/index.d.ts +0 -2
- package/dist/components/molecules/proCard/index.js +0 -1
- package/dist/components/molecules/stepper/Stepper.d.ts +0 -27
- package/dist/components/molecules/stepper/Stepper.js +0 -68
- package/dist/components/molecules/stepper/index.d.ts +0 -2
- package/dist/components/molecules/stepper/index.js +0 -1
- package/dist/index.d.ts +0 -40
- package/dist/index.js +0 -59
- package/dist/utils/regex.d.ts +0 -5
- package/dist/utils/regex.js +0 -7
|
@@ -1,143 +0,0 @@
|
|
|
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;
|
|
@@ -1,10 +0,0 @@
|
|
|
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;
|
|
@@ -1,13 +0,0 @@
|
|
|
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,16 +0,0 @@
|
|
|
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;
|
|
@@ -1,11 +0,0 @@
|
|
|
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;
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import "./SecondaryButton.css";
|
|
3
|
-
import "../../../styles/global.css";
|
|
4
|
-
export interface SecondaryButtonProps {
|
|
5
|
-
startIcon?: React.ReactNode;
|
|
6
|
-
endIcon?: React.ReactNode;
|
|
7
|
-
label: string;
|
|
8
|
-
disabled?: boolean;
|
|
9
|
-
mode?: "dark" | "light";
|
|
10
|
-
onClick?: () => void;
|
|
11
|
-
fullWidth?: boolean;
|
|
12
|
-
}
|
|
13
|
-
declare const SecondaryButton: React.FC<SecondaryButtonProps>;
|
|
14
|
-
export default SecondaryButton;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import "./SecondaryButton.css";
|
|
3
|
-
import "../../../styles/global.css";
|
|
4
|
-
var SecondaryButton = function (_a) {
|
|
5
|
-
var startIcon = _a.startIcon, endIcon = _a.endIcon, label = _a.label, _b = _a.disabled, disabled = _b === void 0 ? false : _b, _c = _a.mode, mode = _c === void 0 ? "dark" : _c, onClick = _a.onClick, _d = _a.fullWidth, fullWidth = _d === void 0 ? false : _d;
|
|
6
|
-
return (React.createElement("button", { className: "secondary-button ".concat(disabled ? "secondary-button-disabled" : "secondary-button-enabled", " secondary-button-").concat(mode, " ").concat(fullWidth ? "secondary-button-full-width" : ""), disabled: disabled, onClick: onClick },
|
|
7
|
-
startIcon && React.createElement("span", { className: "secondary-button-icon ".concat(startIcon) }),
|
|
8
|
-
React.createElement("span", { className: "secondary-button-label" }, label),
|
|
9
|
-
endIcon && React.createElement("span", { className: "secondary-button-icon ".concat(endIcon) })));
|
|
10
|
-
};
|
|
11
|
-
export default SecondaryButton;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import "./TabNavigation.css";
|
|
3
|
-
import "../../../styles/global.css";
|
|
4
|
-
export interface TabNavigationProps {
|
|
5
|
-
tabs: {
|
|
6
|
-
label: string;
|
|
7
|
-
isActive: boolean;
|
|
8
|
-
hasNotification: boolean;
|
|
9
|
-
}[];
|
|
10
|
-
onTabClick: (index: number) => void;
|
|
11
|
-
}
|
|
12
|
-
declare const TabNavigation: React.FC<TabNavigationProps>;
|
|
13
|
-
export default TabNavigation;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import "./TabNavigation.css";
|
|
3
|
-
import "../../../styles/global.css";
|
|
4
|
-
var TabNavigation = function (_a) {
|
|
5
|
-
var tabs = _a.tabs, onTabClick = _a.onTabClick;
|
|
6
|
-
return (React.createElement("div", { className: "tab-navigation" }, tabs.map(function (tab, index) { return (React.createElement("div", { key: index, className: "tab-item ".concat(tab.isActive ? "active" : "inactive"), onClick: function () { return onTabClick(index); } },
|
|
7
|
-
React.createElement("span", { className: "tab-label" }, tab.label),
|
|
8
|
-
tab.hasNotification && React.createElement("span", { className: "tab-notification-dot" }))); })));
|
|
9
|
-
};
|
|
10
|
-
export default TabNavigation;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import "./TertiaryButton.css";
|
|
3
|
-
import "../../../styles/global.css";
|
|
4
|
-
export interface TertiaryButtonProps {
|
|
5
|
-
startIcon?: React.ReactNode;
|
|
6
|
-
label: string;
|
|
7
|
-
variant?: boolean;
|
|
8
|
-
}
|
|
9
|
-
declare const TertiaryButton: React.FC<TertiaryButtonProps>;
|
|
10
|
-
export default TertiaryButton;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import "./TertiaryButton.css";
|
|
3
|
-
import "../../../styles/global.css";
|
|
4
|
-
var TertiaryButton = function (_a) {
|
|
5
|
-
var startIcon = _a.startIcon, label = _a.label, _b = _a.variant, variant = _b === void 0 ? false : _b;
|
|
6
|
-
return (React.createElement("button", { className: "tertiary-button ".concat(variant ? "tertiary-button-variant" : "tertiary-button-default") },
|
|
7
|
-
startIcon && React.createElement("span", { className: "tertiary-button-icon ".concat(startIcon) }),
|
|
8
|
-
React.createElement("span", { className: "tertiary-button-label" }, label)));
|
|
9
|
-
};
|
|
10
|
-
export default TertiaryButton;
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
export { default as FavoriteToggle } from "./FavoriteToggle";
|
|
2
|
-
export { default as FilterButtonPrimary } from "./FilterButtonPrimary";
|
|
3
|
-
export { default as FilterButton } from "./FilterButton";
|
|
4
|
-
export { default as GhostButton } from "./GhostButton";
|
|
5
|
-
export { default as IconButton } from "./IconButton";
|
|
6
|
-
export { default as PendingDocuments } from "./PendingDocuments";
|
|
7
|
-
export { default as PrimaryButton } from "./PrimaryButton";
|
|
8
|
-
export { default as SecondaryButton } from "./SecondaryButton";
|
|
9
|
-
export { default as TabNavigation } from "./TabNavigation";
|
|
10
|
-
export { default as TertiaryButton } from "./TertiaryButton";
|
|
11
|
-
export { default as OAuthProviderButton } from "./OAuthProviderButton";
|
|
12
|
-
export type { FavoriteToggleProps } from "./FavoriteToggle";
|
|
13
|
-
export type { FilterButtonProps } from "./FilterButton";
|
|
14
|
-
export type { GhostButtonProps } from "./GhostButton";
|
|
15
|
-
export type { IconButtonProps } from "./IconButton";
|
|
16
|
-
export type { PendingDocumentsProps } from "./PendingDocuments";
|
|
17
|
-
export type { PrimaryButtonProps } from "./PrimaryButton";
|
|
18
|
-
export type { SecondaryButtonProps } from "./SecondaryButton";
|
|
19
|
-
export type { TabNavigationProps } from "./TabNavigation";
|
|
20
|
-
export type { TertiaryButtonProps } from "./TertiaryButton";
|
|
21
|
-
export type { OAuthProviderButtonProps } from "./OAuthProviderButton";
|
|
22
|
-
export type { FilterButtonPrimaryProps } from "./FilterButtonPrimary";
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
export { default as FavoriteToggle } from "./FavoriteToggle";
|
|
2
|
-
export { default as FilterButtonPrimary } from "./FilterButtonPrimary";
|
|
3
|
-
export { default as FilterButton } from "./FilterButton";
|
|
4
|
-
export { default as GhostButton } from "./GhostButton";
|
|
5
|
-
export { default as IconButton } from "./IconButton";
|
|
6
|
-
export { default as PendingDocuments } from "./PendingDocuments";
|
|
7
|
-
export { default as PrimaryButton } from "./PrimaryButton";
|
|
8
|
-
export { default as SecondaryButton } from "./SecondaryButton";
|
|
9
|
-
export { default as TabNavigation } from "./TabNavigation";
|
|
10
|
-
export { default as TertiaryButton } from "./TertiaryButton";
|
|
11
|
-
export { default as OAuthProviderButton } from "./OAuthProviderButton";
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import "./Checkbox.css";
|
|
3
|
-
import "../../../styles/global.css";
|
|
4
|
-
export interface CheckboxProps {
|
|
5
|
-
id?: string;
|
|
6
|
-
checked?: boolean;
|
|
7
|
-
onChange?: (checked: boolean) => void;
|
|
8
|
-
color?: string;
|
|
9
|
-
size?: "default" | "small";
|
|
10
|
-
style?: "default" | "light";
|
|
11
|
-
}
|
|
12
|
-
declare const Checkbox: React.FC<CheckboxProps>;
|
|
13
|
-
export default Checkbox;
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import React, { useState } from "react";
|
|
2
|
-
import "./Checkbox.css";
|
|
3
|
-
import "../../../styles/global.css";
|
|
4
|
-
var Checkbox = function (_a) {
|
|
5
|
-
var id = _a.id, _b = _a.checked, checked = _b === void 0 ? false : _b, onChange = _a.onChange, _c = _a.color, color = _c === void 0 ? "noir" : _c, _d = _a.size, size = _d === void 0 ? "default" : _d, _e = _a.style, style = _e === void 0 ? "default" : _e;
|
|
6
|
-
var _f = useState(checked), isChecked = _f[0], setIsChecked = _f[1];
|
|
7
|
-
var handleClick = function (e) {
|
|
8
|
-
e.preventDefault();
|
|
9
|
-
e.stopPropagation();
|
|
10
|
-
var newChecked = !isChecked;
|
|
11
|
-
setIsChecked(newChecked);
|
|
12
|
-
if (onChange) {
|
|
13
|
-
onChange(newChecked);
|
|
14
|
-
}
|
|
15
|
-
};
|
|
16
|
-
var checkboxColor = style === "light" ? "light" : color;
|
|
17
|
-
return (React.createElement("button", { id: id, className: "checkbox ".concat(isChecked ? "checkbox-pressed" : "checkbox-default", " ").concat("checkbox-".concat(checkboxColor), " ").concat(size === "small" ? "checkbox-small" : "", " ").concat(style === "light" ? "checkbox-light" : ""), onClick: handleClick }, isChecked && (React.createElement("span", { className: "checkbox-icon allaw-icon-close ".concat("checkbox-icon-".concat(checkboxColor), " ").concat(style === "light" ? "checkbox-icon-light" : "") }))));
|
|
18
|
-
};
|
|
19
|
-
export default Checkbox;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default as Checkbox } from "./Checkbox";
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import "./Basefiler.css";
|
|
3
|
-
export type FilterProps = {
|
|
4
|
-
tooltipContent: string;
|
|
5
|
-
tooltipId: string;
|
|
6
|
-
showIcon: boolean;
|
|
7
|
-
defaultSelectedValues?: string[];
|
|
8
|
-
filterData: {
|
|
9
|
-
value: string;
|
|
10
|
-
name: string;
|
|
11
|
-
}[];
|
|
12
|
-
setFilters: any;
|
|
13
|
-
multiselect?: boolean;
|
|
14
|
-
iconName?: string;
|
|
15
|
-
children?: any;
|
|
16
|
-
props?: any;
|
|
17
|
-
required?: boolean;
|
|
18
|
-
showNumIndic?: boolean;
|
|
19
|
-
isStatusTag?: boolean;
|
|
20
|
-
};
|
|
21
|
-
declare function BaseFilter({ tooltipContent, tooltipId, showNumIndic, required, isStatusTag, defaultSelectedValues, filterData, multiselect, setFilters, showIcon, iconName, children, ...props }: FilterProps): React.JSX.Element;
|
|
22
|
-
export default BaseFilter;
|
|
@@ -1,87 +0,0 @@
|
|
|
1
|
-
var __assign = (this && this.__assign) || function () {
|
|
2
|
-
__assign = Object.assign || function(t) {
|
|
3
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
-
s = arguments[i];
|
|
5
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
-
t[p] = s[p];
|
|
7
|
-
}
|
|
8
|
-
return t;
|
|
9
|
-
};
|
|
10
|
-
return __assign.apply(this, arguments);
|
|
11
|
-
};
|
|
12
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
|
13
|
-
var t = {};
|
|
14
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
15
|
-
t[p] = s[p];
|
|
16
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
17
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
18
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
19
|
-
t[p[i]] = s[p[i]];
|
|
20
|
-
}
|
|
21
|
-
return t;
|
|
22
|
-
};
|
|
23
|
-
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
24
|
-
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
25
|
-
if (ar || !(i in from)) {
|
|
26
|
-
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
27
|
-
ar[i] = from[i];
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
return to.concat(ar || Array.prototype.slice.call(from));
|
|
31
|
-
};
|
|
32
|
-
import React, { useState } from "react";
|
|
33
|
-
import "./Basefiler.css";
|
|
34
|
-
import { AppointementStatusTag } from "../tags";
|
|
35
|
-
import { FilterButtonPrimary } from "../buttons";
|
|
36
|
-
function BaseFilter(_a) {
|
|
37
|
-
var tooltipContent = _a.tooltipContent, tooltipId = _a.tooltipId, _b = _a.showNumIndic, showNumIndic = _b === void 0 ? true : _b, _c = _a.required, required = _c === void 0 ? true : _c, isStatusTag = _a.isStatusTag, defaultSelectedValues = _a.defaultSelectedValues, filterData = _a.filterData, _d = _a.multiselect, multiselect = _d === void 0 ? false : _d, setFilters = _a.setFilters, showIcon = _a.showIcon, iconName = _a.iconName, children = _a.children, props = __rest(_a, ["tooltipContent", "tooltipId", "showNumIndic", "required", "isStatusTag", "defaultSelectedValues", "filterData", "multiselect", "setFilters", "showIcon", "iconName", "children"]);
|
|
38
|
-
var _e = useState(false), isOpen = _e[0], setIsOpen = _e[1];
|
|
39
|
-
var _f = useState(defaultSelectedValues ? defaultSelectedValues : []), selectedValues = _f[0], setSelectedValues = _f[1];
|
|
40
|
-
var handleButtonTap = function () {
|
|
41
|
-
isOpen ? handleClose() : setIsOpen(true);
|
|
42
|
-
};
|
|
43
|
-
var selectItem = function (value) {
|
|
44
|
-
if (multiselect) {
|
|
45
|
-
if (selectedValues &&
|
|
46
|
-
selectedValues.length > 0 &&
|
|
47
|
-
selectedValues.includes(value)) {
|
|
48
|
-
if (required && selectedValues.length == 1) {
|
|
49
|
-
return;
|
|
50
|
-
}
|
|
51
|
-
setSelectedValues(function (prevItems) {
|
|
52
|
-
return prevItems.filter(function (item) { return item !== value; });
|
|
53
|
-
});
|
|
54
|
-
}
|
|
55
|
-
else {
|
|
56
|
-
setSelectedValues(function (prevItems) { return __spreadArray(__spreadArray([], prevItems, true), [value], false); });
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
else {
|
|
60
|
-
setSelectedValues(value);
|
|
61
|
-
handleClose([value]);
|
|
62
|
-
}
|
|
63
|
-
};
|
|
64
|
-
var handleClose = function (values) {
|
|
65
|
-
setFilters(values ? values : selectedValues);
|
|
66
|
-
setIsOpen(false);
|
|
67
|
-
};
|
|
68
|
-
var Item = function (_a) {
|
|
69
|
-
var name = _a.name, value = _a.value;
|
|
70
|
-
return (React.createElement("button", { className: "item", onClick: function () { return selectItem(value); } },
|
|
71
|
-
React.createElement("div", { className: "round" },
|
|
72
|
-
React.createElement("div", { className: (selectedValues === null || selectedValues === void 0 ? void 0 : selectedValues.includes(value))
|
|
73
|
-
? "selected"
|
|
74
|
-
: "notSelected" })),
|
|
75
|
-
isStatusTag ? (React.createElement(AppointementStatusTag, { status: value })) : (React.createElement("span", null, name))));
|
|
76
|
-
};
|
|
77
|
-
return (React.createElement(React.Fragment, null,
|
|
78
|
-
React.createElement("div", __assign({ className: "baseFilter" }, props),
|
|
79
|
-
React.createElement(FilterButtonPrimary, { onClick: function () { return handleButtonTap(); }, zIndex: isOpen ? "2000" : "+1" },
|
|
80
|
-
children,
|
|
81
|
-
React.createElement("p", { style: { color: "#25BEEB", fontWeight: "600" } }, showNumIndic && "(".concat(selectedValues.length, ")"))),
|
|
82
|
-
isOpen && (React.createElement("div", { className: "options" }, filterData &&
|
|
83
|
-
(filterData === null || filterData === void 0 ? void 0 : filterData.length) > 0 &&
|
|
84
|
-
filterData.map(function (item, idx) { return (React.createElement(Item, { name: item === null || item === void 0 ? void 0 : item.name, value: item === null || item === void 0 ? void 0 : item.value, key: idx })); })))),
|
|
85
|
-
isOpen && (React.createElement("div", { className: "backdrop", onClick: function () { return handleClose(); } }))));
|
|
86
|
-
}
|
|
87
|
-
export default BaseFilter;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default } from "./Filter";
|
|
@@ -1,22 +0,0 @@
|
|
|
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;
|
|
@@ -1,86 +0,0 @@
|
|
|
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;
|
|
@@ -1,12 +0,0 @@
|
|
|
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;
|
|
@@ -1,20 +0,0 @@
|
|
|
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;
|