allaw-ui 0.0.347 → 0.0.352
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/buttons/ActionCircleButton.d.ts +9 -0
- package/dist/components/atoms/buttons/ActionCircleButton.js +23 -0
- package/dist/components/atoms/buttons/AgendaSlot.d.ts +10 -0
- package/dist/components/atoms/buttons/AgendaSlot.js +7 -0
- package/dist/components/atoms/buttons/FavoriteToggle.d.ts +8 -0
- package/dist/components/atoms/buttons/FavoriteToggle.js +11 -0
- package/dist/components/atoms/buttons/FilterButton.d.ts +9 -0
- package/dist/components/atoms/buttons/FilterButton.js +9 -0
- package/dist/components/atoms/buttons/FilterButtonPrimary.d.ts +9 -0
- package/dist/components/atoms/buttons/FilterButtonPrimary.js +46 -0
- package/dist/components/atoms/buttons/GhostButton.d.ts +14 -0
- package/dist/components/atoms/buttons/GhostButton.js +11 -0
- package/dist/components/atoms/buttons/IconButton.d.ts +10 -0
- package/dist/components/atoms/buttons/IconButton.js +14 -0
- package/dist/components/atoms/buttons/OAuthProviderButton.d.ts +12 -0
- package/dist/components/atoms/buttons/OAuthProviderButton.js +143 -0
- package/dist/components/atoms/buttons/PendingDocuments.d.ts +10 -0
- package/dist/components/atoms/buttons/PendingDocuments.js +13 -0
- package/dist/components/atoms/buttons/PrimaryButton.d.ts +16 -0
- package/dist/components/atoms/buttons/PrimaryButton.js +34 -0
- package/dist/components/atoms/buttons/SecondaryButton.d.ts +14 -0
- package/dist/components/atoms/buttons/SecondaryButton.js +11 -0
- package/dist/components/atoms/buttons/TabNavigation.d.ts +13 -0
- package/dist/components/atoms/buttons/TabNavigation.js +10 -0
- package/dist/components/atoms/buttons/TertiaryButton.d.ts +10 -0
- package/dist/components/atoms/buttons/TertiaryButton.js +10 -0
- package/dist/components/atoms/buttons/index.d.ts +22 -0
- package/dist/components/atoms/buttons/index.js +11 -0
- package/dist/components/atoms/checkboxes/Checkbox.d.ts +13 -0
- package/dist/components/atoms/checkboxes/Checkbox.js +19 -0
- package/dist/components/atoms/checkboxes/index.d.ts +2 -0
- package/dist/components/atoms/checkboxes/index.js +1 -0
- package/dist/components/atoms/filter/Filter.d.ts +17 -0
- package/dist/components/atoms/filter/Filter.js +70 -0
- package/dist/components/atoms/filter/index.d.ts +2 -0
- package/dist/components/atoms/filter/index.js +1 -0
- package/dist/components/atoms/filters/SingleFilter.css +172 -0
- package/dist/components/atoms/filters/SingleFilter.d.ts +17 -0
- package/dist/components/atoms/filters/SingleFilter.js +70 -0
- package/dist/components/atoms/filters/index.d.ts +2 -0
- package/dist/components/atoms/filters/index.js +1 -0
- package/dist/components/atoms/inputs/Input.d.ts +22 -0
- package/dist/components/atoms/inputs/Input.js +86 -0
- package/dist/components/atoms/inputs/SearchBar.d.ts +12 -0
- package/dist/components/atoms/inputs/SearchBar.js +20 -0
- package/dist/components/atoms/inputs/index.d.ts +4 -0
- package/dist/components/atoms/inputs/index.js +2 -0
- package/dist/components/atoms/progressBars/ProgressBar.d.ts +15 -0
- package/dist/components/atoms/progressBars/ProgressBar.js +17 -0
- package/dist/components/atoms/progressBars/index.d.ts +2 -0
- package/dist/components/atoms/progressBars/index.js +1 -0
- package/dist/components/atoms/radios/RadioButton.d.ts +11 -0
- package/dist/components/atoms/radios/RadioButton.js +10 -0
- package/dist/components/atoms/radios/index.d.ts +2 -0
- package/dist/components/atoms/radios/index.js +1 -0
- package/dist/components/atoms/selects/Select.d.ts +24 -0
- package/dist/components/atoms/selects/Select.js +84 -0
- package/dist/components/atoms/selects/index.d.ts +2 -0
- package/dist/components/atoms/selects/index.js +1 -0
- package/dist/components/atoms/tags/AppointementStatusTag.d.ts +8 -0
- package/dist/components/atoms/tags/AppointementStatusTag.js +41 -0
- package/dist/components/atoms/tags/FolderStatusTag.d.ts +7 -0
- package/dist/components/atoms/tags/FolderStatusTag.js +8 -0
- package/dist/components/atoms/tags/OtherStatusTag.d.ts +10 -0
- package/dist/components/atoms/tags/OtherStatusTag.js +10 -0
- package/dist/components/atoms/tags/index.d.ts +6 -0
- package/dist/components/atoms/tags/index.js +3 -0
- package/dist/components/atoms/typography/Heading.d.ts +10 -0
- package/dist/components/atoms/typography/Heading.js +7 -0
- package/dist/components/atoms/typography/Paragraph.d.ts +12 -0
- package/dist/components/atoms/typography/Paragraph.js +24 -0
- package/dist/components/atoms/typography/SmallTitle.d.ts +9 -0
- package/dist/components/atoms/typography/SmallTitle.js +7 -0
- package/dist/components/atoms/typography/Subtitle.d.ts +9 -0
- package/dist/components/atoms/typography/Subtitle.js +7 -0
- package/dist/components/atoms/typography/TinyInfo.d.ts +12 -0
- package/dist/components/atoms/typography/TinyInfo.js +15 -0
- package/dist/components/atoms/typography/index.d.ts +10 -0
- package/dist/components/atoms/typography/index.js +5 -0
- package/dist/components/atoms/uiVariables/BorderRadius.d.ts +6 -0
- package/dist/components/atoms/uiVariables/BorderRadius.js +12 -0
- package/dist/components/atoms/uiVariables/Shadows.d.ts +6 -0
- package/dist/components/atoms/uiVariables/Shadows.js +11 -0
- package/dist/components/atoms/uiVariables/Strokes.d.ts +6 -0
- package/dist/components/atoms/uiVariables/Strokes.js +10 -0
- package/dist/components/atoms/uiVariables/index.d.ts +3 -0
- package/dist/components/atoms/uiVariables/index.js +3 -0
- package/dist/components/molecules/appointmentSlot/AppointmentSlot.d.ts +25 -0
- package/dist/components/molecules/appointmentSlot/AppointmentSlot.js +109 -0
- package/dist/components/molecules/appointmentSlot/index.d.ts +2 -0
- package/dist/components/molecules/appointmentSlot/index.js +1 -0
- package/dist/components/molecules/breadcrumb/Breadcrumb.d.ts +12 -0
- package/dist/components/molecules/breadcrumb/Breadcrumb.js +12 -0
- package/dist/components/molecules/breadcrumb/index.d.ts +2 -0
- package/dist/components/molecules/breadcrumb/index.js +1 -0
- package/dist/components/molecules/caseCard/CaseCard.d.ts +14 -0
- package/dist/components/molecules/caseCard/CaseCard.js +20 -0
- package/dist/components/molecules/caseCard/index.d.ts +2 -0
- package/dist/components/molecules/caseCard/index.js +1 -0
- package/dist/components/molecules/checkboxForm/CheckboxForm.d.ts +16 -0
- package/dist/components/molecules/checkboxForm/CheckboxForm.js +24 -0
- package/dist/components/molecules/checkboxForm/index.d.ts +2 -0
- package/dist/components/molecules/checkboxForm/index.js +1 -0
- package/dist/components/molecules/contactCard/ContactCard.d.ts +17 -0
- package/dist/components/molecules/contactCard/ContactCard.js +80 -0
- package/dist/components/molecules/contactCard/index.d.ts +2 -0
- package/dist/components/molecules/contactCard/index.js +1 -0
- package/dist/components/molecules/documentCard/DocumentCard.d.ts +14 -0
- package/dist/components/molecules/documentCard/DocumentCard.js +59 -0
- package/dist/components/molecules/documentCard/index.d.ts +2 -0
- package/dist/components/molecules/documentCard/index.js +1 -0
- package/dist/components/molecules/employeeCard/EmployeeCard.d.ts +15 -0
- package/dist/components/molecules/employeeCard/EmployeeCard.js +34 -0
- package/dist/components/molecules/employeeCard/index.d.ts +2 -0
- package/dist/components/molecules/employeeCard/index.js +1 -0
- package/dist/components/molecules/proCard/ProCard.d.ts +13 -0
- package/dist/components/molecules/proCard/ProCard.js +25 -0
- package/dist/components/molecules/proCard/index.d.ts +2 -0
- package/dist/components/molecules/proCard/index.js +1 -0
- package/dist/components/molecules/stepper/Stepper.d.ts +27 -0
- package/dist/components/molecules/stepper/Stepper.js +68 -0
- package/dist/components/molecules/stepper/index.d.ts +2 -0
- package/dist/components/molecules/stepper/index.js +1 -0
- package/dist/index.d.ts +41 -0
- package/dist/index.js +60 -0
- package/dist/utils/regex.d.ts +5 -0
- package/dist/utils/regex.js +7 -0
- package/package.json +2 -1
- package/dist/tsconfig.tsbuildinfo +0 -1
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import "./ActionCircleButton.css";
|
|
3
|
+
interface ActionCircleButtonProps {
|
|
4
|
+
status: "approved" | "rejected" | "dual";
|
|
5
|
+
onApprove?: () => void;
|
|
6
|
+
onReject?: () => void;
|
|
7
|
+
}
|
|
8
|
+
declare const ActionCircleButton: React.FC<ActionCircleButtonProps>;
|
|
9
|
+
export default ActionCircleButton;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import "./ActionCircleButton.css";
|
|
3
|
+
var ActionCircleButton = function (_a) {
|
|
4
|
+
var status = _a.status, onApprove = _a.onApprove, onReject = _a.onReject;
|
|
5
|
+
if (status === "approved") {
|
|
6
|
+
return (React.createElement("button", { className: "approved-circle", onClick: onApprove },
|
|
7
|
+
React.createElement("span", { className: "allaw-icon-check approved-icon" })));
|
|
8
|
+
}
|
|
9
|
+
if (status === "rejected") {
|
|
10
|
+
return (React.createElement("button", { className: "rejected-circle", onClick: onReject },
|
|
11
|
+
React.createElement("span", { className: "allaw-icon-close rejected-icon" })));
|
|
12
|
+
}
|
|
13
|
+
if (status === "dual") {
|
|
14
|
+
return (React.createElement("div", { className: "dual-button" },
|
|
15
|
+
React.createElement("button", { className: "dual-rejected-icon", onClick: onReject },
|
|
16
|
+
React.createElement("span", { className: "allaw-icon-close" })),
|
|
17
|
+
React.createElement("span", { className: "separator" }),
|
|
18
|
+
React.createElement("button", { className: "dual-approved-icon", onClick: onApprove },
|
|
19
|
+
React.createElement("span", { className: "allaw-icon-check" }))));
|
|
20
|
+
}
|
|
21
|
+
return null;
|
|
22
|
+
};
|
|
23
|
+
export default ActionCircleButton;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import "./AgendaSlot.css";
|
|
3
|
+
interface AgendaSlotProps {
|
|
4
|
+
time: string;
|
|
5
|
+
appearance: "pro" | "hybride" | "user";
|
|
6
|
+
isDisabled?: boolean;
|
|
7
|
+
onClick?: () => void;
|
|
8
|
+
}
|
|
9
|
+
declare const AgendaSlot: React.FC<AgendaSlotProps>;
|
|
10
|
+
export default AgendaSlot;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import "./AgendaSlot.css";
|
|
3
|
+
var AgendaSlot = function (_a) {
|
|
4
|
+
var time = _a.time, appearance = _a.appearance, _b = _a.isDisabled, isDisabled = _b === void 0 ? false : _b, onClick = _a.onClick;
|
|
5
|
+
return (React.createElement("div", { className: "agenda-slot ".concat(appearance, " ").concat(isDisabled ? "disabled" : ""), onClick: !isDisabled ? onClick : undefined }, time));
|
|
6
|
+
};
|
|
7
|
+
export default AgendaSlot;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import "./FavoriteToggle.css";
|
|
3
|
+
export interface FavoriteToggleProps {
|
|
4
|
+
isFavorite: boolean;
|
|
5
|
+
onToggle: (isFavorite: boolean) => void;
|
|
6
|
+
}
|
|
7
|
+
declare const FavoriteToggle: React.FC<FavoriteToggleProps>;
|
|
8
|
+
export default FavoriteToggle;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import "./FavoriteToggle.css";
|
|
3
|
+
var FavoriteToggle = function (_a) {
|
|
4
|
+
var isFavorite = _a.isFavorite, onToggle = _a.onToggle;
|
|
5
|
+
var handleToggle = function () {
|
|
6
|
+
onToggle(!isFavorite);
|
|
7
|
+
};
|
|
8
|
+
return (React.createElement("div", { className: "favorite-toggle", onClick: handleToggle },
|
|
9
|
+
React.createElement("i", { className: "icon ".concat(isFavorite ? "favorite allaw-icon-star-fill" : "not-favorite allaw-icon-star-unfill") })));
|
|
10
|
+
};
|
|
11
|
+
export default FavoriteToggle;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import "./FilterButton.css";
|
|
3
|
+
import "../../../styles/global.css";
|
|
4
|
+
export interface FilterButtonProps {
|
|
5
|
+
label: string;
|
|
6
|
+
isActive: boolean;
|
|
7
|
+
}
|
|
8
|
+
declare const FilterButton: React.FC<FilterButtonProps>;
|
|
9
|
+
export default FilterButton;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import "./FilterButton.css";
|
|
3
|
+
import "../../../styles/global.css";
|
|
4
|
+
var FilterButton = function (_a) {
|
|
5
|
+
var label = _a.label, isActive = _a.isActive;
|
|
6
|
+
return (React.createElement("button", { className: "filter-button ".concat(isActive ? "filter-button-active" : "filter-button-inactive") },
|
|
7
|
+
React.createElement("span", { className: "filter-button-label" }, label)));
|
|
8
|
+
};
|
|
9
|
+
export default FilterButton;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
export type FilterButtonPrimaryProps = {
|
|
3
|
+
onClick: any;
|
|
4
|
+
zIndex?: string;
|
|
5
|
+
children: any;
|
|
6
|
+
props?: any;
|
|
7
|
+
};
|
|
8
|
+
declare function FilterButtonPrimary({ onClick, zIndex, children, ...props }: FilterButtonPrimaryProps | any): React.JSX.Element;
|
|
9
|
+
export default FilterButtonPrimary;
|
|
@@ -0,0 +1,46 @@
|
|
|
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
|
+
import React from "react";
|
|
24
|
+
function FilterButtonPrimary(_a) {
|
|
25
|
+
var onClick = _a.onClick, _b = _a.zIndex, zIndex = _b === void 0 ? "100" : _b, children = _a.children, props = __rest(_a, ["onClick", "zIndex", "children"]);
|
|
26
|
+
return (React.createElement("button", __assign({ style: {
|
|
27
|
+
fontWeight: "600",
|
|
28
|
+
backgroundColor: "var(--primary-light-grey, #F4F7FB)",
|
|
29
|
+
padding: "10px",
|
|
30
|
+
borderRadius: "5px",
|
|
31
|
+
fontSize: "14px",
|
|
32
|
+
textWrap: "nowrap",
|
|
33
|
+
border: "1px solid var(--primary-venom-grey, #E6EDF5)",
|
|
34
|
+
position: "sticky",
|
|
35
|
+
color: "#000",
|
|
36
|
+
display: "flex",
|
|
37
|
+
cursor: "pointer",
|
|
38
|
+
flexDirection: "row",
|
|
39
|
+
gap: "0.5rem",
|
|
40
|
+
alignItems: "center",
|
|
41
|
+
zIndex: zIndex,
|
|
42
|
+
}, onClick: function () { return onClick && onClick(); } }, props),
|
|
43
|
+
React.createElement("i", { className: "allaw-icon-filter", style: { fontSize: "14px", color: "#25BEEB" } }),
|
|
44
|
+
children));
|
|
45
|
+
}
|
|
46
|
+
export default FilterButtonPrimary;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import "./GhostButton.css";
|
|
3
|
+
import "../../../styles/global.css";
|
|
4
|
+
export interface GhostButtonProps {
|
|
5
|
+
startIcon?: React.ReactNode;
|
|
6
|
+
endIcon?: React.ReactNode;
|
|
7
|
+
label: string;
|
|
8
|
+
variant?: boolean;
|
|
9
|
+
startIconName?: string;
|
|
10
|
+
endIconName?: string;
|
|
11
|
+
onClick?: () => void;
|
|
12
|
+
}
|
|
13
|
+
declare const GhostButton: React.FC<GhostButtonProps>;
|
|
14
|
+
export default GhostButton;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import "./GhostButton.css";
|
|
3
|
+
import "../../../styles/global.css";
|
|
4
|
+
var GhostButton = function (_a) {
|
|
5
|
+
var startIcon = _a.startIcon, endIcon = _a.endIcon, label = _a.label, _b = _a.variant, variant = _b === void 0 ? false : _b, startIconName = _a.startIconName, endIconName = _a.endIconName, onClick = _a.onClick;
|
|
6
|
+
return (React.createElement("button", { className: "ghost-button ".concat(variant ? "ghost-button-variant" : "ghost-button-default"), onClick: onClick },
|
|
7
|
+
startIcon && React.createElement("span", { className: "ghost-button-icon ".concat(startIconName) }),
|
|
8
|
+
React.createElement("span", { className: "ghost-button-label" }, label),
|
|
9
|
+
endIcon && React.createElement("span", { className: "ghost-button-icon ".concat(endIconName) })));
|
|
10
|
+
};
|
|
11
|
+
export default GhostButton;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import "./IconButton.css";
|
|
3
|
+
import "../../../styles/global.css";
|
|
4
|
+
export interface IconButtonProps {
|
|
5
|
+
style: "smallFilled" | "largeFilled" | "mediumOutline" | "iconOnly";
|
|
6
|
+
iconName: string;
|
|
7
|
+
onClick?: () => void;
|
|
8
|
+
}
|
|
9
|
+
declare const IconButton: React.FC<IconButtonProps>;
|
|
10
|
+
export default IconButton;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import "./IconButton.css";
|
|
3
|
+
import "../../../styles/global.css";
|
|
4
|
+
var IconButton = function (_a) {
|
|
5
|
+
var style = _a.style, iconName = _a.iconName, onClick = _a.onClick;
|
|
6
|
+
return (React.createElement("button", { className: "icon-button ".concat(style), onClick: onClick },
|
|
7
|
+
React.createElement("i", { className: "icon ".concat(iconName) })));
|
|
8
|
+
};
|
|
9
|
+
IconButton.defaultProps = {
|
|
10
|
+
style: "smallFilled",
|
|
11
|
+
iconName: "allaw-icon-calendar",
|
|
12
|
+
onClick: function () { },
|
|
13
|
+
};
|
|
14
|
+
export default IconButton;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import "./OAuthProviderButton.css";
|
|
3
|
+
import "../../../styles/global.css";
|
|
4
|
+
export interface OAuthProviderButtonProps {
|
|
5
|
+
provider: "google" | "apple" | "linkedin";
|
|
6
|
+
type: "login" | "signup";
|
|
7
|
+
url: string;
|
|
8
|
+
size: 14 | 16 | 18 | 20 | 22 | 24;
|
|
9
|
+
onClick?: () => void;
|
|
10
|
+
}
|
|
11
|
+
declare const OAuthProviderButton: React.FC<OAuthProviderButtonProps>;
|
|
12
|
+
export default OAuthProviderButton;
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
import React, { useState, useEffect, useRef } from "react";
|
|
2
|
+
import "./OAuthProviderButton.css";
|
|
3
|
+
import "../../../styles/global.css";
|
|
4
|
+
var OAuthProviderButton = function (_a) {
|
|
5
|
+
var provider = _a.provider, type = _a.type, url = _a.url, size = _a.size, onClick = _a.onClick;
|
|
6
|
+
var _b = useState(""), label = _b[0], setLabel = _b[1];
|
|
7
|
+
var buttonRef = useRef(null);
|
|
8
|
+
var getLabels = function () {
|
|
9
|
+
var labels = {
|
|
10
|
+
google: {
|
|
11
|
+
login: "Continuer avec Google",
|
|
12
|
+
signup: "S'inscrire avec Google",
|
|
13
|
+
},
|
|
14
|
+
apple: {
|
|
15
|
+
login: "Continuer avec Apple",
|
|
16
|
+
signup: "S'inscrire avec Apple",
|
|
17
|
+
},
|
|
18
|
+
linkedin: {
|
|
19
|
+
login: "Continuer avec LinkedIn",
|
|
20
|
+
signup: "S'inscrire avec LinkedIn",
|
|
21
|
+
},
|
|
22
|
+
};
|
|
23
|
+
var shortLabels = {
|
|
24
|
+
google: "Google",
|
|
25
|
+
apple: "Apple",
|
|
26
|
+
linkedin: "LinkedIn",
|
|
27
|
+
};
|
|
28
|
+
return { labels: labels, shortLabels: shortLabels };
|
|
29
|
+
};
|
|
30
|
+
var getThresholdWidth = function (size) {
|
|
31
|
+
switch (size) {
|
|
32
|
+
case 14:
|
|
33
|
+
return 210;
|
|
34
|
+
case 16:
|
|
35
|
+
return 220;
|
|
36
|
+
case 18:
|
|
37
|
+
return 230;
|
|
38
|
+
case 20:
|
|
39
|
+
return 240;
|
|
40
|
+
case 22:
|
|
41
|
+
return 260;
|
|
42
|
+
case 24:
|
|
43
|
+
return 290;
|
|
44
|
+
default:
|
|
45
|
+
return 250;
|
|
46
|
+
}
|
|
47
|
+
};
|
|
48
|
+
var updateLabel = function () {
|
|
49
|
+
var _a, _b;
|
|
50
|
+
var _c = getLabels(), labels = _c.labels, shortLabels = _c.shortLabels;
|
|
51
|
+
var maxWidth = (_b = (_a = buttonRef.current) === null || _a === void 0 ? void 0 : _a.offsetWidth) !== null && _b !== void 0 ? _b : 0;
|
|
52
|
+
var thresholdWidth = getThresholdWidth(size);
|
|
53
|
+
var newLabel = maxWidth < thresholdWidth
|
|
54
|
+
? shortLabels[provider]
|
|
55
|
+
: labels[provider][type];
|
|
56
|
+
setLabel(newLabel);
|
|
57
|
+
};
|
|
58
|
+
useEffect(function () {
|
|
59
|
+
var resizeObserver = new ResizeObserver(function () {
|
|
60
|
+
updateLabel();
|
|
61
|
+
});
|
|
62
|
+
if (buttonRef.current) {
|
|
63
|
+
resizeObserver.observe(buttonRef.current);
|
|
64
|
+
}
|
|
65
|
+
return function () {
|
|
66
|
+
if (buttonRef.current) {
|
|
67
|
+
resizeObserver.unobserve(buttonRef.current);
|
|
68
|
+
}
|
|
69
|
+
};
|
|
70
|
+
}, [provider, type, size]);
|
|
71
|
+
// Force an update after the first render to ensure the correct label is set
|
|
72
|
+
useEffect(function () {
|
|
73
|
+
if (buttonRef.current) {
|
|
74
|
+
updateLabel();
|
|
75
|
+
}
|
|
76
|
+
}, []);
|
|
77
|
+
var renderIcon = function () {
|
|
78
|
+
var iconSizes = {
|
|
79
|
+
google: size * 0.8,
|
|
80
|
+
apple: size * 1.2,
|
|
81
|
+
linkedin: size * 0.8,
|
|
82
|
+
};
|
|
83
|
+
var iconClasses = {
|
|
84
|
+
google: "allaw-icon-google",
|
|
85
|
+
apple: "allaw-icon-apple",
|
|
86
|
+
linkedin: "allaw-icon-linkedin",
|
|
87
|
+
};
|
|
88
|
+
var iconSize = iconSizes[provider];
|
|
89
|
+
var iconClass = iconClasses[provider];
|
|
90
|
+
if (provider === "google") {
|
|
91
|
+
return (React.createElement("span", { className: iconClass, style: { fontSize: "".concat(iconSize, "px") } },
|
|
92
|
+
React.createElement("span", { className: "path1" }),
|
|
93
|
+
React.createElement("span", { className: "path2" }),
|
|
94
|
+
React.createElement("span", { className: "path3" }),
|
|
95
|
+
React.createElement("span", { className: "path4" })));
|
|
96
|
+
}
|
|
97
|
+
else if (provider === "linkedin") {
|
|
98
|
+
var containerSize = size * 1.4;
|
|
99
|
+
return (React.createElement("div", { className: "linkedin-icon-container", style: {
|
|
100
|
+
fontSize: "".concat(iconSize, "px"),
|
|
101
|
+
width: "".concat(containerSize, "px"),
|
|
102
|
+
height: "".concat(containerSize, "px"),
|
|
103
|
+
minWidth: "".concat(containerSize, "px"),
|
|
104
|
+
minHeight: "".concat(containerSize, "px"),
|
|
105
|
+
} },
|
|
106
|
+
React.createElement("i", { className: iconClass, style: { fontSize: "".concat(iconSize, "px") } })));
|
|
107
|
+
}
|
|
108
|
+
else {
|
|
109
|
+
return (React.createElement("i", { className: iconClass, style: { fontSize: "".concat(iconSize, "px") } }));
|
|
110
|
+
}
|
|
111
|
+
};
|
|
112
|
+
var handleClick = function () {
|
|
113
|
+
if (onClick) {
|
|
114
|
+
onClick();
|
|
115
|
+
}
|
|
116
|
+
else {
|
|
117
|
+
window.open(url, "_blank");
|
|
118
|
+
}
|
|
119
|
+
};
|
|
120
|
+
var getMaxWidth = function () {
|
|
121
|
+
switch (size) {
|
|
122
|
+
case 14:
|
|
123
|
+
return "200px";
|
|
124
|
+
case 16:
|
|
125
|
+
return "300px";
|
|
126
|
+
case 18:
|
|
127
|
+
return "320px";
|
|
128
|
+
case 20:
|
|
129
|
+
return "370px";
|
|
130
|
+
case 22:
|
|
131
|
+
return "380px";
|
|
132
|
+
case 24:
|
|
133
|
+
return "400px";
|
|
134
|
+
default:
|
|
135
|
+
return "400px";
|
|
136
|
+
}
|
|
137
|
+
};
|
|
138
|
+
var maxWidth = getMaxWidth();
|
|
139
|
+
return (React.createElement("button", { ref: buttonRef, className: "oauth-provider-button ".concat(provider), onClick: handleClick, style: { height: "".concat(size * 2.55, "px"), maxWidth: maxWidth } },
|
|
140
|
+
renderIcon(),
|
|
141
|
+
React.createElement("span", { className: "label", style: { fontSize: "".concat(size, "px") } }, label)));
|
|
142
|
+
};
|
|
143
|
+
export default OAuthProviderButton;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import "./PendingDocuments.css";
|
|
3
|
+
import "../../../styles/global.css";
|
|
4
|
+
export interface PendingDocumentsProps {
|
|
5
|
+
icon?: React.ReactNode;
|
|
6
|
+
pendingCount: number;
|
|
7
|
+
onClick?: () => void;
|
|
8
|
+
}
|
|
9
|
+
declare const PendingDocuments: React.FC<PendingDocumentsProps>;
|
|
10
|
+
export default PendingDocuments;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import "./PendingDocuments.css";
|
|
3
|
+
import "../../../styles/global.css";
|
|
4
|
+
var PendingDocuments = function (_a) {
|
|
5
|
+
var icon = _a.icon, pendingCount = _a.pendingCount, onClick = _a.onClick;
|
|
6
|
+
var isPending = pendingCount > 0;
|
|
7
|
+
return (React.createElement("div", { className: "pending-documents ".concat(isPending ? "pending-documents-pending" : "pending-documents-none"), onClick: isPending ? onClick : undefined },
|
|
8
|
+
icon && React.createElement("span", { className: "pending-documents-icon" }, icon),
|
|
9
|
+
React.createElement("span", { className: "pending-documents-label" }, isPending
|
|
10
|
+
? "".concat(pendingCount, " demandes en attente")
|
|
11
|
+
: "Aucune demande en attente")));
|
|
12
|
+
};
|
|
13
|
+
export default PendingDocuments;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import React, { ButtonHTMLAttributes } from "react";
|
|
2
|
+
import "./PrimaryButton.css";
|
|
3
|
+
import "../../../styles/global.css";
|
|
4
|
+
export interface PrimaryButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {
|
|
5
|
+
startIcon?: React.ReactNode;
|
|
6
|
+
endIcon?: React.ReactNode;
|
|
7
|
+
startIconName?: string;
|
|
8
|
+
endIconName?: string;
|
|
9
|
+
label: string;
|
|
10
|
+
disabled?: boolean;
|
|
11
|
+
onClick?: () => void;
|
|
12
|
+
fullWidth?: boolean;
|
|
13
|
+
type?: "button" | "submit" | "reset";
|
|
14
|
+
}
|
|
15
|
+
declare const PrimaryButton: React.ForwardRefExoticComponent<PrimaryButtonProps & React.RefAttributes<HTMLButtonElement>>;
|
|
16
|
+
export default PrimaryButton;
|
|
@@ -0,0 +1,34 @@
|
|
|
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
|
+
import React, { forwardRef } from "react";
|
|
24
|
+
import "./PrimaryButton.css";
|
|
25
|
+
import "../../../styles/global.css";
|
|
26
|
+
var PrimaryButton = forwardRef(function (_a, ref) {
|
|
27
|
+
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, props = __rest(_a, ["startIcon", "endIcon", "startIconName", "endIconName", "label", "disabled", "onClick", "fullWidth", "type"]);
|
|
28
|
+
return (React.createElement("button", __assign({ ref: ref, className: "primary-button ".concat(disabled ? "primary-button-disabled" : "primary-button-enabled", " ").concat(fullWidth ? "primary-button-full-width" : ""), disabled: disabled, onClick: onClick, type: type }, props),
|
|
29
|
+
startIcon && (React.createElement("span", { className: "primary-button-icon ".concat(startIconName) })),
|
|
30
|
+
React.createElement("span", { className: "primary-button-label" }, label),
|
|
31
|
+
endIcon && React.createElement("span", { className: "primary-button-icon ".concat(endIconName) })));
|
|
32
|
+
});
|
|
33
|
+
PrimaryButton.displayName = "PrimaryButton";
|
|
34
|
+
export default PrimaryButton;
|
|
@@ -0,0 +1,14 @@
|
|
|
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;
|
|
@@ -0,0 +1,11 @@
|
|
|
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;
|
|
@@ -0,0 +1,13 @@
|
|
|
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;
|
|
@@ -0,0 +1,10 @@
|
|
|
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;
|
|
@@ -0,0 +1,10 @@
|
|
|
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;
|
|
@@ -0,0 +1,10 @@
|
|
|
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;
|
|
@@ -0,0 +1,22 @@
|
|
|
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";
|
|
@@ -0,0 +1,11 @@
|
|
|
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";
|
|
@@ -0,0 +1,13 @@
|
|
|
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;
|
|
@@ -0,0 +1,19 @@
|
|
|
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;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as Checkbox } from "./Checkbox";
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import "./Basefiler.css";
|
|
2
|
+
import React from "react";
|
|
3
|
+
export type FilterProps = {
|
|
4
|
+
defaultSelectedValue?: string;
|
|
5
|
+
filterData: {
|
|
6
|
+
value: string;
|
|
7
|
+
name: string;
|
|
8
|
+
}[];
|
|
9
|
+
setFilter: (selectedValue: string) => void;
|
|
10
|
+
children?: React.ReactNode;
|
|
11
|
+
required?: boolean;
|
|
12
|
+
showNumIndic?: boolean;
|
|
13
|
+
showBackdrop?: boolean;
|
|
14
|
+
isStatusTag?: boolean;
|
|
15
|
+
};
|
|
16
|
+
declare const BaseFilter: ({ showNumIndic, required, defaultSelectedValue, filterData, setFilter, showBackdrop, children, ...props }: FilterProps) => React.JSX.Element;
|
|
17
|
+
export default BaseFilter;
|