design-zystem 1.0.251 → 1.0.253
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/index.d.mts +27 -30
- package/dist/index.d.ts +27 -30
- package/dist/index.js +173 -82
- package/dist/index.mjs +170 -81
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -32,6 +32,8 @@ interface BoxProps extends Omit<HTMLAttributes<HTMLDivElement>, 'color'> {
|
|
|
32
32
|
justifyContent?: string;
|
|
33
33
|
borderRadius?: string;
|
|
34
34
|
border?: string;
|
|
35
|
+
/** Colored left accent bar (status/score encoding), painted over the box border. */
|
|
36
|
+
borderColor?: string;
|
|
35
37
|
style?: CSSProperties;
|
|
36
38
|
}
|
|
37
39
|
declare const Box: ({ children, hasShadow, ...rest }: BoxProps) => react_jsx_runtime.JSX.Element;
|
|
@@ -911,6 +913,25 @@ interface EmptyStateProps {
|
|
|
911
913
|
}
|
|
912
914
|
declare const EmptyState: ({ icon, title, description, actionLabel, onAction, }: EmptyStateProps) => react_jsx_runtime.JSX.Element;
|
|
913
915
|
|
|
916
|
+
interface FloatingAction {
|
|
917
|
+
id: string;
|
|
918
|
+
label: string;
|
|
919
|
+
icon: string;
|
|
920
|
+
badge?: number;
|
|
921
|
+
onClick: () => void;
|
|
922
|
+
}
|
|
923
|
+
interface FloatingButtonProps {
|
|
924
|
+
isOpen: boolean;
|
|
925
|
+
onToggle: () => void;
|
|
926
|
+
actions: FloatingAction[];
|
|
927
|
+
mainBadge?: number;
|
|
928
|
+
label?: string;
|
|
929
|
+
icon?: string;
|
|
930
|
+
openIcon?: string;
|
|
931
|
+
variant?: keyof typeof colors;
|
|
932
|
+
}
|
|
933
|
+
declare const FloatingButton: ({ isOpen, onToggle, actions, mainBadge, label, icon, openIcon, variant, }: FloatingButtonProps) => react_jsx_runtime.JSX.Element;
|
|
934
|
+
|
|
914
935
|
interface ProgressBarProps {
|
|
915
936
|
/** Filled portion, 0–100. Values outside the range are clamped. */
|
|
916
937
|
value: number;
|
|
@@ -955,35 +976,6 @@ interface TimelineProps {
|
|
|
955
976
|
*/
|
|
956
977
|
declare const Timeline: ({ items, lineColor, emptyLabel, }: TimelineProps) => react_jsx_runtime.JSX.Element;
|
|
957
978
|
|
|
958
|
-
interface BorderedRowProps {
|
|
959
|
-
/** Accent color (DZ color token) — used to encode a score/status/level. */
|
|
960
|
-
borderColor?: string;
|
|
961
|
-
/** Accent thickness in px. */
|
|
962
|
-
borderWidth?: number;
|
|
963
|
-
/** Background color (DZ color token). */
|
|
964
|
-
background?: string;
|
|
965
|
-
/** Inner padding. */
|
|
966
|
-
padding?: string;
|
|
967
|
-
/** Corner radius — pass "0" for flush table rows, default rounded card. */
|
|
968
|
-
borderRadius?: string;
|
|
969
|
-
/**
|
|
970
|
-
* Accent style:
|
|
971
|
-
* - 'edge' (default): full-height colored left border (flush rows / score bars).
|
|
972
|
-
* - 'bar': short rounded inset accent bar, centered (white card look).
|
|
973
|
-
*/
|
|
974
|
-
accent?: 'edge' | 'bar';
|
|
975
|
-
/** Subtle 1px full border around the card (card look). */
|
|
976
|
-
bordered?: boolean;
|
|
977
|
-
children: ReactNode;
|
|
978
|
-
onClick?: () => void;
|
|
979
|
-
}
|
|
980
|
-
/**
|
|
981
|
-
* Row/card with a colored accent, used to encode a status (recovery score,
|
|
982
|
-
* feedback level…). Flush table rows: accent="edge" + borderRadius="0".
|
|
983
|
-
* White cards: accent="bar" + bordered + background.
|
|
984
|
-
*/
|
|
985
|
-
declare const BorderedRow: ({ borderColor, borderWidth, background, padding, borderRadius, accent, bordered, children, onClick, }: BorderedRowProps) => react_jsx_runtime.JSX.Element;
|
|
986
|
-
|
|
987
979
|
/**
|
|
988
980
|
* formatDate(date, type?, language?)
|
|
989
981
|
* - language : fr/en/es/... (locale inferred), default "en"
|
|
@@ -1002,6 +994,11 @@ declare const formatDistance: (distanceKm: number | string | null | undefined, l
|
|
|
1002
994
|
declare const formatDuration: (minutes: number | null | undefined, language?: string) => string;
|
|
1003
995
|
declare const truncateText: (text: string | null | undefined, maxLength?: number) => string;
|
|
1004
996
|
declare const truncateFileName: (fileName: string | null | undefined, maxLength?: number) => string;
|
|
997
|
+
declare const formatEuro: (amount?: number | null) => string;
|
|
998
|
+
declare const formatName: (person?: {
|
|
999
|
+
firstname?: string | null;
|
|
1000
|
+
lastname?: string | null;
|
|
1001
|
+
} | null, fallback?: string) => string;
|
|
1005
1002
|
|
|
1006
1003
|
/**
|
|
1007
1004
|
* Optimiser image:
|
|
@@ -1030,4 +1027,4 @@ interface OptimizeImageOptions {
|
|
|
1030
1027
|
}
|
|
1031
1028
|
declare const optimizeImage: (file: File | null | undefined, desiredBaseName: string, opts?: OptimizeImageOptions) => Promise<OptimizeImageResult>;
|
|
1032
1029
|
|
|
1033
|
-
export { Accordion, type AccordionItem, Avatar,
|
|
1030
|
+
export { Accordion, type AccordionItem, Avatar, Box, Bubble, Bulk, Button, CardSkeleton, Checkbox, Col, Collapse, ColorPicker, DatePicker, Divider, Drawer, EmptyState, FileUploadZone, type FloatingAction, FloatingButton, type FloatingButtonProps, Grid, Icon, IconTabs, Image, Input, Link, List, ListItem, MetricCard, Modal, ModalConfirmation, MultiSelect, NewModal, Options, PageContainer, Pagination, Popover, ProgressBar, Radio, Row, Select, type SelectOption, type SelectProps, SkeletonRow, SliderInput, type SortOrder, Spinner, Stepper, Switch, Table, TableBody, TableCell, TableFooter, TableFooterCell, TableFooterRow, TableHeader, TableHeaderCell, type TableHeaderCellProps, TableHeaderRow, TableRow, Tabs, TagBubble, Text, Timeline, type TimelineItem, Tooltip, colors, formatDate, formatDistance, formatDuration, formatEuro, formatName, optimizeImage, truncateFileName, truncateText };
|
package/dist/index.d.ts
CHANGED
|
@@ -32,6 +32,8 @@ interface BoxProps extends Omit<HTMLAttributes<HTMLDivElement>, 'color'> {
|
|
|
32
32
|
justifyContent?: string;
|
|
33
33
|
borderRadius?: string;
|
|
34
34
|
border?: string;
|
|
35
|
+
/** Colored left accent bar (status/score encoding), painted over the box border. */
|
|
36
|
+
borderColor?: string;
|
|
35
37
|
style?: CSSProperties;
|
|
36
38
|
}
|
|
37
39
|
declare const Box: ({ children, hasShadow, ...rest }: BoxProps) => react_jsx_runtime.JSX.Element;
|
|
@@ -911,6 +913,25 @@ interface EmptyStateProps {
|
|
|
911
913
|
}
|
|
912
914
|
declare const EmptyState: ({ icon, title, description, actionLabel, onAction, }: EmptyStateProps) => react_jsx_runtime.JSX.Element;
|
|
913
915
|
|
|
916
|
+
interface FloatingAction {
|
|
917
|
+
id: string;
|
|
918
|
+
label: string;
|
|
919
|
+
icon: string;
|
|
920
|
+
badge?: number;
|
|
921
|
+
onClick: () => void;
|
|
922
|
+
}
|
|
923
|
+
interface FloatingButtonProps {
|
|
924
|
+
isOpen: boolean;
|
|
925
|
+
onToggle: () => void;
|
|
926
|
+
actions: FloatingAction[];
|
|
927
|
+
mainBadge?: number;
|
|
928
|
+
label?: string;
|
|
929
|
+
icon?: string;
|
|
930
|
+
openIcon?: string;
|
|
931
|
+
variant?: keyof typeof colors;
|
|
932
|
+
}
|
|
933
|
+
declare const FloatingButton: ({ isOpen, onToggle, actions, mainBadge, label, icon, openIcon, variant, }: FloatingButtonProps) => react_jsx_runtime.JSX.Element;
|
|
934
|
+
|
|
914
935
|
interface ProgressBarProps {
|
|
915
936
|
/** Filled portion, 0–100. Values outside the range are clamped. */
|
|
916
937
|
value: number;
|
|
@@ -955,35 +976,6 @@ interface TimelineProps {
|
|
|
955
976
|
*/
|
|
956
977
|
declare const Timeline: ({ items, lineColor, emptyLabel, }: TimelineProps) => react_jsx_runtime.JSX.Element;
|
|
957
978
|
|
|
958
|
-
interface BorderedRowProps {
|
|
959
|
-
/** Accent color (DZ color token) — used to encode a score/status/level. */
|
|
960
|
-
borderColor?: string;
|
|
961
|
-
/** Accent thickness in px. */
|
|
962
|
-
borderWidth?: number;
|
|
963
|
-
/** Background color (DZ color token). */
|
|
964
|
-
background?: string;
|
|
965
|
-
/** Inner padding. */
|
|
966
|
-
padding?: string;
|
|
967
|
-
/** Corner radius — pass "0" for flush table rows, default rounded card. */
|
|
968
|
-
borderRadius?: string;
|
|
969
|
-
/**
|
|
970
|
-
* Accent style:
|
|
971
|
-
* - 'edge' (default): full-height colored left border (flush rows / score bars).
|
|
972
|
-
* - 'bar': short rounded inset accent bar, centered (white card look).
|
|
973
|
-
*/
|
|
974
|
-
accent?: 'edge' | 'bar';
|
|
975
|
-
/** Subtle 1px full border around the card (card look). */
|
|
976
|
-
bordered?: boolean;
|
|
977
|
-
children: ReactNode;
|
|
978
|
-
onClick?: () => void;
|
|
979
|
-
}
|
|
980
|
-
/**
|
|
981
|
-
* Row/card with a colored accent, used to encode a status (recovery score,
|
|
982
|
-
* feedback level…). Flush table rows: accent="edge" + borderRadius="0".
|
|
983
|
-
* White cards: accent="bar" + bordered + background.
|
|
984
|
-
*/
|
|
985
|
-
declare const BorderedRow: ({ borderColor, borderWidth, background, padding, borderRadius, accent, bordered, children, onClick, }: BorderedRowProps) => react_jsx_runtime.JSX.Element;
|
|
986
|
-
|
|
987
979
|
/**
|
|
988
980
|
* formatDate(date, type?, language?)
|
|
989
981
|
* - language : fr/en/es/... (locale inferred), default "en"
|
|
@@ -1002,6 +994,11 @@ declare const formatDistance: (distanceKm: number | string | null | undefined, l
|
|
|
1002
994
|
declare const formatDuration: (minutes: number | null | undefined, language?: string) => string;
|
|
1003
995
|
declare const truncateText: (text: string | null | undefined, maxLength?: number) => string;
|
|
1004
996
|
declare const truncateFileName: (fileName: string | null | undefined, maxLength?: number) => string;
|
|
997
|
+
declare const formatEuro: (amount?: number | null) => string;
|
|
998
|
+
declare const formatName: (person?: {
|
|
999
|
+
firstname?: string | null;
|
|
1000
|
+
lastname?: string | null;
|
|
1001
|
+
} | null, fallback?: string) => string;
|
|
1005
1002
|
|
|
1006
1003
|
/**
|
|
1007
1004
|
* Optimiser image:
|
|
@@ -1030,4 +1027,4 @@ interface OptimizeImageOptions {
|
|
|
1030
1027
|
}
|
|
1031
1028
|
declare const optimizeImage: (file: File | null | undefined, desiredBaseName: string, opts?: OptimizeImageOptions) => Promise<OptimizeImageResult>;
|
|
1032
1029
|
|
|
1033
|
-
export { Accordion, type AccordionItem, Avatar,
|
|
1030
|
+
export { Accordion, type AccordionItem, Avatar, Box, Bubble, Bulk, Button, CardSkeleton, Checkbox, Col, Collapse, ColorPicker, DatePicker, Divider, Drawer, EmptyState, FileUploadZone, type FloatingAction, FloatingButton, type FloatingButtonProps, Grid, Icon, IconTabs, Image, Input, Link, List, ListItem, MetricCard, Modal, ModalConfirmation, MultiSelect, NewModal, Options, PageContainer, Pagination, Popover, ProgressBar, Radio, Row, Select, type SelectOption, type SelectProps, SkeletonRow, SliderInput, type SortOrder, Spinner, Stepper, Switch, Table, TableBody, TableCell, TableFooter, TableFooterCell, TableFooterRow, TableHeader, TableHeaderCell, type TableHeaderCellProps, TableHeaderRow, TableRow, Tabs, TagBubble, Text, Timeline, type TimelineItem, Tooltip, colors, formatDate, formatDistance, formatDuration, formatEuro, formatName, optimizeImage, truncateFileName, truncateText };
|
package/dist/index.js
CHANGED
|
@@ -61,7 +61,6 @@ var index_exports = {};
|
|
|
61
61
|
__export(index_exports, {
|
|
62
62
|
Accordion: () => Accordion,
|
|
63
63
|
Avatar: () => Avatar,
|
|
64
|
-
BorderedRow: () => BorderedRow,
|
|
65
64
|
Box: () => Box,
|
|
66
65
|
Bubble: () => Bubble,
|
|
67
66
|
Bulk: () => Bulk,
|
|
@@ -76,6 +75,7 @@ __export(index_exports, {
|
|
|
76
75
|
Drawer: () => Drawer,
|
|
77
76
|
EmptyState: () => EmptyState,
|
|
78
77
|
FileUploadZone: () => FileUploadZone,
|
|
78
|
+
FloatingButton: () => FloatingButton,
|
|
79
79
|
Grid: () => Grid,
|
|
80
80
|
Icon: () => Icon,
|
|
81
81
|
IconTabs: () => IconTabs,
|
|
@@ -121,6 +121,8 @@ __export(index_exports, {
|
|
|
121
121
|
formatDate: () => formatDate,
|
|
122
122
|
formatDistance: () => formatDistance,
|
|
123
123
|
formatDuration: () => formatDuration,
|
|
124
|
+
formatEuro: () => formatEuro,
|
|
125
|
+
formatName: () => formatName,
|
|
124
126
|
optimizeImage: () => optimizeImage_default,
|
|
125
127
|
truncateFileName: () => truncateFileName,
|
|
126
128
|
truncateText: () => truncateText
|
|
@@ -329,6 +331,7 @@ var shouldForwardProp2 = (prop) => ![
|
|
|
329
331
|
"hasShadow",
|
|
330
332
|
"borderRadius",
|
|
331
333
|
"border",
|
|
334
|
+
"borderColor",
|
|
332
335
|
"height"
|
|
333
336
|
].includes(prop);
|
|
334
337
|
var StyledBox = import_styled_components2.default.div.withConfig({ shouldForwardProp: shouldForwardProp2 })`
|
|
@@ -338,6 +341,7 @@ var StyledBox = import_styled_components2.default.div.withConfig({ shouldForward
|
|
|
338
341
|
var _a;
|
|
339
342
|
return (_a = props.border) != null ? _a : `1px solid ${colors.grey_300}`;
|
|
340
343
|
}};
|
|
344
|
+
${(props) => props.borderColor ? `border-left: 4px solid ${colors[props.borderColor] || props.borderColor};` : ""}
|
|
341
345
|
|
|
342
346
|
border-radius: ${(props) => props.borderRadius || "8px"};
|
|
343
347
|
|
|
@@ -5250,17 +5254,149 @@ var EmptyState = ({
|
|
|
5250
5254
|
);
|
|
5251
5255
|
};
|
|
5252
5256
|
|
|
5253
|
-
// src/Components/
|
|
5257
|
+
// src/Components/FloatingButton/FloatingButton.tsx
|
|
5254
5258
|
var import_styled_components45 = __toESM(require("styled-components"));
|
|
5255
5259
|
var import_jsx_runtime56 = require("react/jsx-runtime");
|
|
5260
|
+
var FloatingButton = ({
|
|
5261
|
+
isOpen,
|
|
5262
|
+
onToggle,
|
|
5263
|
+
actions,
|
|
5264
|
+
mainBadge = 0,
|
|
5265
|
+
label = "Menu",
|
|
5266
|
+
icon = "comment",
|
|
5267
|
+
openIcon = "xmark",
|
|
5268
|
+
variant = "blue_700"
|
|
5269
|
+
}) => {
|
|
5270
|
+
const accent = colors[variant];
|
|
5271
|
+
return /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(Container6, { children: [
|
|
5272
|
+
actions.map((action, index) => {
|
|
5273
|
+
var _a;
|
|
5274
|
+
return /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(
|
|
5275
|
+
SubButton,
|
|
5276
|
+
{
|
|
5277
|
+
type: "button",
|
|
5278
|
+
"aria-label": action.label,
|
|
5279
|
+
$isOpen: isOpen,
|
|
5280
|
+
$transform: arcTransform(index, actions.length),
|
|
5281
|
+
onClick: action.onClick,
|
|
5282
|
+
children: [
|
|
5283
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(Icon, { name: action.icon, family: "regular", size: "s", color: accent }),
|
|
5284
|
+
((_a = action.badge) != null ? _a : 0) > 0 && /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(CountBadge, { children: action.badge })
|
|
5285
|
+
]
|
|
5286
|
+
},
|
|
5287
|
+
action.id
|
|
5288
|
+
);
|
|
5289
|
+
}),
|
|
5290
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(
|
|
5291
|
+
MainButton,
|
|
5292
|
+
{
|
|
5293
|
+
type: "button",
|
|
5294
|
+
"aria-label": label,
|
|
5295
|
+
"aria-expanded": isOpen,
|
|
5296
|
+
$accent: accent,
|
|
5297
|
+
onClick: onToggle,
|
|
5298
|
+
children: [
|
|
5299
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
5300
|
+
Icon,
|
|
5301
|
+
{
|
|
5302
|
+
name: isOpen ? openIcon : icon,
|
|
5303
|
+
family: "regular",
|
|
5304
|
+
size: "m",
|
|
5305
|
+
color: colors.white
|
|
5306
|
+
}
|
|
5307
|
+
),
|
|
5308
|
+
!isOpen && mainBadge > 0 && /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(CountBadge, { children: mainBadge })
|
|
5309
|
+
]
|
|
5310
|
+
}
|
|
5311
|
+
)
|
|
5312
|
+
] });
|
|
5313
|
+
};
|
|
5314
|
+
var FAB_SIZE = 56;
|
|
5315
|
+
var SUB_SIZE = 48;
|
|
5316
|
+
var ARC_RADIUS = 64;
|
|
5317
|
+
var ARC_START_ANGLE = 90;
|
|
5318
|
+
var ARC_MAX_STEP = 65;
|
|
5319
|
+
var ARC_MAX_SPAN = 90;
|
|
5320
|
+
var arcTransform = (index, total) => {
|
|
5321
|
+
const step = total > 1 ? Math.min(ARC_MAX_STEP, ARC_MAX_SPAN / (total - 1)) : 0;
|
|
5322
|
+
const angle = (ARC_START_ANGLE + index * step) * Math.PI / 180;
|
|
5323
|
+
const x = Math.round(Math.cos(angle) * ARC_RADIUS);
|
|
5324
|
+
const y = Math.round(-Math.sin(angle) * ARC_RADIUS);
|
|
5325
|
+
return `translate(${x}px, ${y}px)`;
|
|
5326
|
+
};
|
|
5327
|
+
var Container6 = import_styled_components45.default.div`
|
|
5328
|
+
position: fixed;
|
|
5329
|
+
right: 32px;
|
|
5330
|
+
bottom: 32px;
|
|
5331
|
+
width: ${FAB_SIZE}px;
|
|
5332
|
+
height: ${FAB_SIZE}px;
|
|
5333
|
+
z-index: 1000;
|
|
5334
|
+
`;
|
|
5335
|
+
var MainButton = import_styled_components45.default.button`
|
|
5336
|
+
position: absolute;
|
|
5337
|
+
inset: 0;
|
|
5338
|
+
display: flex;
|
|
5339
|
+
align-items: center;
|
|
5340
|
+
justify-content: center;
|
|
5341
|
+
border: none;
|
|
5342
|
+
border-radius: 50%;
|
|
5343
|
+
background: ${({ $accent }) => $accent};
|
|
5344
|
+
cursor: pointer;
|
|
5345
|
+
box-shadow:
|
|
5346
|
+
0 8px 5px rgba(0, 0, 0, 0.1),
|
|
5347
|
+
0 20px 12.5px rgba(0, 0, 0, 0.1);
|
|
5348
|
+
`;
|
|
5349
|
+
var SubButton = import_styled_components45.default.button`
|
|
5350
|
+
position: absolute;
|
|
5351
|
+
left: ${(FAB_SIZE - SUB_SIZE) / 2}px;
|
|
5352
|
+
top: ${(FAB_SIZE - SUB_SIZE) / 2}px;
|
|
5353
|
+
display: flex;
|
|
5354
|
+
align-items: center;
|
|
5355
|
+
justify-content: center;
|
|
5356
|
+
width: ${SUB_SIZE}px;
|
|
5357
|
+
height: ${SUB_SIZE}px;
|
|
5358
|
+
border: 1px solid ${colors.grey_300};
|
|
5359
|
+
border-radius: 50%;
|
|
5360
|
+
background: ${colors.white};
|
|
5361
|
+
cursor: pointer;
|
|
5362
|
+
box-shadow:
|
|
5363
|
+
0 4px 3px rgba(0, 0, 0, 0.1),
|
|
5364
|
+
0 10px 7.5px rgba(0, 0, 0, 0.1);
|
|
5365
|
+
transition:
|
|
5366
|
+
transform 0.2s ease,
|
|
5367
|
+
opacity 0.2s ease;
|
|
5368
|
+
transform: ${({ $isOpen, $transform }) => $isOpen ? $transform : "scale(0.4)"};
|
|
5369
|
+
opacity: ${({ $isOpen }) => $isOpen ? 1 : 0};
|
|
5370
|
+
pointer-events: ${({ $isOpen }) => $isOpen ? "auto" : "none"};
|
|
5371
|
+
`;
|
|
5372
|
+
var CountBadge = import_styled_components45.default.span`
|
|
5373
|
+
position: absolute;
|
|
5374
|
+
top: -4px;
|
|
5375
|
+
right: -4px;
|
|
5376
|
+
display: flex;
|
|
5377
|
+
align-items: center;
|
|
5378
|
+
justify-content: center;
|
|
5379
|
+
min-width: 18px;
|
|
5380
|
+
height: 18px;
|
|
5381
|
+
padding: 0 5px;
|
|
5382
|
+
border-radius: 9px;
|
|
5383
|
+
background: ${colors.red_950};
|
|
5384
|
+
color: ${colors.white};
|
|
5385
|
+
font-size: 11px;
|
|
5386
|
+
font-weight: 700;
|
|
5387
|
+
`;
|
|
5388
|
+
|
|
5389
|
+
// src/Components/ProgressBar/ProgressBar.tsx
|
|
5390
|
+
var import_styled_components46 = __toESM(require("styled-components"));
|
|
5391
|
+
var import_jsx_runtime57 = require("react/jsx-runtime");
|
|
5256
5392
|
var clampPercent = (value) => Math.max(0, Math.min(100, value));
|
|
5257
|
-
var Wrapper5 =
|
|
5393
|
+
var Wrapper5 = import_styled_components46.default.div`
|
|
5258
5394
|
display: flex;
|
|
5259
5395
|
align-items: center;
|
|
5260
5396
|
gap: 8px;
|
|
5261
5397
|
width: 100%;
|
|
5262
5398
|
`;
|
|
5263
|
-
var Track2 =
|
|
5399
|
+
var Track2 = import_styled_components46.default.div`
|
|
5264
5400
|
position: relative;
|
|
5265
5401
|
flex: 1;
|
|
5266
5402
|
height: ${({ $height }) => $height}px;
|
|
@@ -5268,7 +5404,7 @@ var Track2 = import_styled_components45.default.div`
|
|
|
5268
5404
|
border-radius: ${({ $height }) => $height}px;
|
|
5269
5405
|
overflow: hidden;
|
|
5270
5406
|
`;
|
|
5271
|
-
var Fill =
|
|
5407
|
+
var Fill = import_styled_components46.default.div`
|
|
5272
5408
|
height: 100%;
|
|
5273
5409
|
width: ${({ $percent }) => $percent}%;
|
|
5274
5410
|
background: ${({ $color }) => $color};
|
|
@@ -5283,9 +5419,9 @@ var ProgressBar = ({
|
|
|
5283
5419
|
showLabel = false
|
|
5284
5420
|
}) => {
|
|
5285
5421
|
const percent = clampPercent(value);
|
|
5286
|
-
return /* @__PURE__ */ (0,
|
|
5287
|
-
/* @__PURE__ */ (0,
|
|
5288
|
-
showLabel && /* @__PURE__ */ (0,
|
|
5422
|
+
return /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(Wrapper5, { children: [
|
|
5423
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)(Track2, { $height: height, $trackColor: trackColor, children: /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(Fill, { $height: height, $color: color, $percent: percent }) }),
|
|
5424
|
+
showLabel && /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(Text, { size: "s", weight: "600", children: [
|
|
5289
5425
|
Math.round(percent),
|
|
5290
5426
|
" %"
|
|
5291
5427
|
] })
|
|
@@ -5293,24 +5429,24 @@ var ProgressBar = ({
|
|
|
5293
5429
|
};
|
|
5294
5430
|
|
|
5295
5431
|
// src/Components/Timeline/Timeline.tsx
|
|
5296
|
-
var
|
|
5297
|
-
var
|
|
5298
|
-
var List2 =
|
|
5432
|
+
var import_styled_components47 = __toESM(require("styled-components"));
|
|
5433
|
+
var import_jsx_runtime58 = require("react/jsx-runtime");
|
|
5434
|
+
var List2 = import_styled_components47.default.div`
|
|
5299
5435
|
display: flex;
|
|
5300
5436
|
flex-direction: column;
|
|
5301
5437
|
`;
|
|
5302
|
-
var Item2 =
|
|
5438
|
+
var Item2 = import_styled_components47.default.div`
|
|
5303
5439
|
display: flex;
|
|
5304
5440
|
gap: 12px;
|
|
5305
5441
|
align-items: stretch;
|
|
5306
5442
|
`;
|
|
5307
|
-
var Rail =
|
|
5443
|
+
var Rail = import_styled_components47.default.div`
|
|
5308
5444
|
display: flex;
|
|
5309
5445
|
flex-direction: column;
|
|
5310
5446
|
align-items: center;
|
|
5311
5447
|
width: 16px;
|
|
5312
5448
|
`;
|
|
5313
|
-
var Dot2 =
|
|
5449
|
+
var Dot2 = import_styled_components47.default.div`
|
|
5314
5450
|
width: 10px;
|
|
5315
5451
|
height: 10px;
|
|
5316
5452
|
border-radius: 50%;
|
|
@@ -5318,13 +5454,13 @@ var Dot2 = import_styled_components46.default.div`
|
|
|
5318
5454
|
flex: 0 0 auto;
|
|
5319
5455
|
background: ${({ $color }) => $color};
|
|
5320
5456
|
`;
|
|
5321
|
-
var Line =
|
|
5457
|
+
var Line = import_styled_components47.default.div`
|
|
5322
5458
|
width: 2px;
|
|
5323
5459
|
flex: 1;
|
|
5324
5460
|
min-height: 16px;
|
|
5325
5461
|
background: ${({ $color }) => $color};
|
|
5326
5462
|
`;
|
|
5327
|
-
var Content =
|
|
5463
|
+
var Content = import_styled_components47.default.div`
|
|
5328
5464
|
display: flex;
|
|
5329
5465
|
flex-direction: column;
|
|
5330
5466
|
gap: 2px;
|
|
@@ -5336,81 +5472,26 @@ var Timeline = ({
|
|
|
5336
5472
|
emptyLabel = "Aucun \xE9v\xE9nement"
|
|
5337
5473
|
}) => {
|
|
5338
5474
|
if (items.length === 0) {
|
|
5339
|
-
return /* @__PURE__ */ (0,
|
|
5475
|
+
return /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(Text, { size: "s", color: colors.grey_600, children: emptyLabel });
|
|
5340
5476
|
}
|
|
5341
|
-
return /* @__PURE__ */ (0,
|
|
5477
|
+
return /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(List2, { children: items.map((item, index) => {
|
|
5342
5478
|
var _a;
|
|
5343
5479
|
const isLast = index === items.length - 1;
|
|
5344
5480
|
const dotColor = (_a = item.color) != null ? _a : colors.blue_700;
|
|
5345
|
-
return /* @__PURE__ */ (0,
|
|
5346
|
-
/* @__PURE__ */ (0,
|
|
5347
|
-
/* @__PURE__ */ (0,
|
|
5348
|
-
!isLast && /* @__PURE__ */ (0,
|
|
5481
|
+
return /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(Item2, { children: [
|
|
5482
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(Rail, { children: [
|
|
5483
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)(Dot2, { $color: dotColor }),
|
|
5484
|
+
!isLast && /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(Line, { $color: lineColor })
|
|
5349
5485
|
] }),
|
|
5350
|
-
/* @__PURE__ */ (0,
|
|
5351
|
-
/* @__PURE__ */ (0,
|
|
5352
|
-
item.subtitle && /* @__PURE__ */ (0,
|
|
5353
|
-
item.description && /* @__PURE__ */ (0,
|
|
5486
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(Content, { $last: isLast, children: [
|
|
5487
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)(Text, { size: "s", weight: item.highlighted ? "700" : "600", children: item.title }),
|
|
5488
|
+
item.subtitle && /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(Text, { size: "xs", color: colors.grey_600, children: item.subtitle }),
|
|
5489
|
+
item.description && /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(Text, { size: "xs", fontStyle: "italic", children: item.description })
|
|
5354
5490
|
] })
|
|
5355
5491
|
] }, item.id);
|
|
5356
5492
|
}) });
|
|
5357
5493
|
};
|
|
5358
5494
|
|
|
5359
|
-
// src/Components/BorderedRow/BorderedRow.tsx
|
|
5360
|
-
var import_styled_components47 = __toESM(require("styled-components"));
|
|
5361
|
-
var import_jsx_runtime58 = require("react/jsx-runtime");
|
|
5362
|
-
var Wrapper6 = import_styled_components47.default.div`
|
|
5363
|
-
box-sizing: border-box;
|
|
5364
|
-
position: relative;
|
|
5365
|
-
width: 100%;
|
|
5366
|
-
padding: ${({ $padding }) => $padding};
|
|
5367
|
-
${({ $accent, $borderWidth }) => $accent === "bar" ? `padding-left: ${$borderWidth + 16}px;` : ""}
|
|
5368
|
-
border-radius: ${({ $borderRadius }) => $borderRadius};
|
|
5369
|
-
background: ${({ $background }) => $background || "transparent"};
|
|
5370
|
-
cursor: ${({ $clickable }) => $clickable ? "pointer" : "default"};
|
|
5371
|
-
${({ $bordered }) => $bordered ? `border: 1px solid ${colors.grey_300};` : ""}
|
|
5372
|
-
${({ $accent, $borderWidth, $borderColor }) => $accent === "edge" ? `border-left: ${$borderWidth}px solid ${$borderColor};` : ""}
|
|
5373
|
-
|
|
5374
|
-
${({ $accent, $borderWidth, $borderColor }) => $accent === "bar" ? `
|
|
5375
|
-
&::before {
|
|
5376
|
-
content: '';
|
|
5377
|
-
position: absolute;
|
|
5378
|
-
left: 10px;
|
|
5379
|
-
top: 50%;
|
|
5380
|
-
transform: translateY(-50%);
|
|
5381
|
-
height: 62%;
|
|
5382
|
-
width: ${$borderWidth}px;
|
|
5383
|
-
border-radius: ${$borderWidth}px;
|
|
5384
|
-
background: ${$borderColor};
|
|
5385
|
-
}
|
|
5386
|
-
` : ""}
|
|
5387
|
-
`;
|
|
5388
|
-
var BorderedRow = ({
|
|
5389
|
-
borderColor = colors.blue_700,
|
|
5390
|
-
borderWidth = 4,
|
|
5391
|
-
background,
|
|
5392
|
-
padding = "12px",
|
|
5393
|
-
borderRadius = "8px",
|
|
5394
|
-
accent = "edge",
|
|
5395
|
-
bordered = false,
|
|
5396
|
-
children,
|
|
5397
|
-
onClick
|
|
5398
|
-
}) => /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
|
|
5399
|
-
Wrapper6,
|
|
5400
|
-
{
|
|
5401
|
-
$borderColor: borderColor,
|
|
5402
|
-
$borderWidth: borderWidth,
|
|
5403
|
-
$background: background,
|
|
5404
|
-
$padding: padding,
|
|
5405
|
-
$borderRadius: borderRadius,
|
|
5406
|
-
$accent: accent,
|
|
5407
|
-
$bordered: bordered,
|
|
5408
|
-
$clickable: !!onClick,
|
|
5409
|
-
onClick,
|
|
5410
|
-
children
|
|
5411
|
-
}
|
|
5412
|
-
);
|
|
5413
|
-
|
|
5414
5495
|
// src/data/globalMethods.ts
|
|
5415
5496
|
var formatDate = (dateString, type = "date", language = "en") => {
|
|
5416
5497
|
if (!dateString) return "";
|
|
@@ -5520,6 +5601,14 @@ var truncateFileName = (fileName, maxLength = 20) => {
|
|
|
5520
5601
|
}
|
|
5521
5602
|
return fileName;
|
|
5522
5603
|
};
|
|
5604
|
+
var formatEuro = (amount) => `${(amount != null ? amount : 0).toLocaleString("fr-FR", {
|
|
5605
|
+
minimumFractionDigits: 2,
|
|
5606
|
+
maximumFractionDigits: 2
|
|
5607
|
+
})} \u20AC`;
|
|
5608
|
+
var formatName = (person, fallback = "") => {
|
|
5609
|
+
var _a, _b;
|
|
5610
|
+
return person ? `${(_a = person.firstname) != null ? _a : ""} ${(_b = person.lastname) != null ? _b : ""}`.trim() || fallback : fallback;
|
|
5611
|
+
};
|
|
5523
5612
|
|
|
5524
5613
|
// src/services/optimizeImage/optimizeImage.ts
|
|
5525
5614
|
var hasDocument = () => typeof document !== "undefined";
|
|
@@ -5658,7 +5747,6 @@ var optimizeImage_default = optimizeImage;
|
|
|
5658
5747
|
0 && (module.exports = {
|
|
5659
5748
|
Accordion,
|
|
5660
5749
|
Avatar,
|
|
5661
|
-
BorderedRow,
|
|
5662
5750
|
Box,
|
|
5663
5751
|
Bubble,
|
|
5664
5752
|
Bulk,
|
|
@@ -5673,6 +5761,7 @@ var optimizeImage_default = optimizeImage;
|
|
|
5673
5761
|
Drawer,
|
|
5674
5762
|
EmptyState,
|
|
5675
5763
|
FileUploadZone,
|
|
5764
|
+
FloatingButton,
|
|
5676
5765
|
Grid,
|
|
5677
5766
|
Icon,
|
|
5678
5767
|
IconTabs,
|
|
@@ -5718,6 +5807,8 @@ var optimizeImage_default = optimizeImage;
|
|
|
5718
5807
|
formatDate,
|
|
5719
5808
|
formatDistance,
|
|
5720
5809
|
formatDuration,
|
|
5810
|
+
formatEuro,
|
|
5811
|
+
formatName,
|
|
5721
5812
|
optimizeImage,
|
|
5722
5813
|
truncateFileName,
|
|
5723
5814
|
truncateText
|
package/dist/index.mjs
CHANGED
|
@@ -232,6 +232,7 @@ var shouldForwardProp2 = (prop) => ![
|
|
|
232
232
|
"hasShadow",
|
|
233
233
|
"borderRadius",
|
|
234
234
|
"border",
|
|
235
|
+
"borderColor",
|
|
235
236
|
"height"
|
|
236
237
|
].includes(prop);
|
|
237
238
|
var StyledBox = styled2.div.withConfig({ shouldForwardProp: shouldForwardProp2 })`
|
|
@@ -241,6 +242,7 @@ var StyledBox = styled2.div.withConfig({ shouldForwardProp: shouldForwardProp2 }
|
|
|
241
242
|
var _a;
|
|
242
243
|
return (_a = props.border) != null ? _a : `1px solid ${colors.grey_300}`;
|
|
243
244
|
}};
|
|
245
|
+
${(props) => props.borderColor ? `border-left: 4px solid ${colors[props.borderColor] || props.borderColor};` : ""}
|
|
244
246
|
|
|
245
247
|
border-radius: ${(props) => props.borderRadius || "8px"};
|
|
246
248
|
|
|
@@ -5173,17 +5175,149 @@ var EmptyState = ({
|
|
|
5173
5175
|
);
|
|
5174
5176
|
};
|
|
5175
5177
|
|
|
5176
|
-
// src/Components/
|
|
5178
|
+
// src/Components/FloatingButton/FloatingButton.tsx
|
|
5177
5179
|
import styled45 from "styled-components";
|
|
5178
5180
|
import { jsx as jsx56, jsxs as jsxs30 } from "react/jsx-runtime";
|
|
5181
|
+
var FloatingButton = ({
|
|
5182
|
+
isOpen,
|
|
5183
|
+
onToggle,
|
|
5184
|
+
actions,
|
|
5185
|
+
mainBadge = 0,
|
|
5186
|
+
label = "Menu",
|
|
5187
|
+
icon = "comment",
|
|
5188
|
+
openIcon = "xmark",
|
|
5189
|
+
variant = "blue_700"
|
|
5190
|
+
}) => {
|
|
5191
|
+
const accent = colors[variant];
|
|
5192
|
+
return /* @__PURE__ */ jsxs30(Container6, { children: [
|
|
5193
|
+
actions.map((action, index) => {
|
|
5194
|
+
var _a;
|
|
5195
|
+
return /* @__PURE__ */ jsxs30(
|
|
5196
|
+
SubButton,
|
|
5197
|
+
{
|
|
5198
|
+
type: "button",
|
|
5199
|
+
"aria-label": action.label,
|
|
5200
|
+
$isOpen: isOpen,
|
|
5201
|
+
$transform: arcTransform(index, actions.length),
|
|
5202
|
+
onClick: action.onClick,
|
|
5203
|
+
children: [
|
|
5204
|
+
/* @__PURE__ */ jsx56(Icon, { name: action.icon, family: "regular", size: "s", color: accent }),
|
|
5205
|
+
((_a = action.badge) != null ? _a : 0) > 0 && /* @__PURE__ */ jsx56(CountBadge, { children: action.badge })
|
|
5206
|
+
]
|
|
5207
|
+
},
|
|
5208
|
+
action.id
|
|
5209
|
+
);
|
|
5210
|
+
}),
|
|
5211
|
+
/* @__PURE__ */ jsxs30(
|
|
5212
|
+
MainButton,
|
|
5213
|
+
{
|
|
5214
|
+
type: "button",
|
|
5215
|
+
"aria-label": label,
|
|
5216
|
+
"aria-expanded": isOpen,
|
|
5217
|
+
$accent: accent,
|
|
5218
|
+
onClick: onToggle,
|
|
5219
|
+
children: [
|
|
5220
|
+
/* @__PURE__ */ jsx56(
|
|
5221
|
+
Icon,
|
|
5222
|
+
{
|
|
5223
|
+
name: isOpen ? openIcon : icon,
|
|
5224
|
+
family: "regular",
|
|
5225
|
+
size: "m",
|
|
5226
|
+
color: colors.white
|
|
5227
|
+
}
|
|
5228
|
+
),
|
|
5229
|
+
!isOpen && mainBadge > 0 && /* @__PURE__ */ jsx56(CountBadge, { children: mainBadge })
|
|
5230
|
+
]
|
|
5231
|
+
}
|
|
5232
|
+
)
|
|
5233
|
+
] });
|
|
5234
|
+
};
|
|
5235
|
+
var FAB_SIZE = 56;
|
|
5236
|
+
var SUB_SIZE = 48;
|
|
5237
|
+
var ARC_RADIUS = 64;
|
|
5238
|
+
var ARC_START_ANGLE = 90;
|
|
5239
|
+
var ARC_MAX_STEP = 65;
|
|
5240
|
+
var ARC_MAX_SPAN = 90;
|
|
5241
|
+
var arcTransform = (index, total) => {
|
|
5242
|
+
const step = total > 1 ? Math.min(ARC_MAX_STEP, ARC_MAX_SPAN / (total - 1)) : 0;
|
|
5243
|
+
const angle = (ARC_START_ANGLE + index * step) * Math.PI / 180;
|
|
5244
|
+
const x = Math.round(Math.cos(angle) * ARC_RADIUS);
|
|
5245
|
+
const y = Math.round(-Math.sin(angle) * ARC_RADIUS);
|
|
5246
|
+
return `translate(${x}px, ${y}px)`;
|
|
5247
|
+
};
|
|
5248
|
+
var Container6 = styled45.div`
|
|
5249
|
+
position: fixed;
|
|
5250
|
+
right: 32px;
|
|
5251
|
+
bottom: 32px;
|
|
5252
|
+
width: ${FAB_SIZE}px;
|
|
5253
|
+
height: ${FAB_SIZE}px;
|
|
5254
|
+
z-index: 1000;
|
|
5255
|
+
`;
|
|
5256
|
+
var MainButton = styled45.button`
|
|
5257
|
+
position: absolute;
|
|
5258
|
+
inset: 0;
|
|
5259
|
+
display: flex;
|
|
5260
|
+
align-items: center;
|
|
5261
|
+
justify-content: center;
|
|
5262
|
+
border: none;
|
|
5263
|
+
border-radius: 50%;
|
|
5264
|
+
background: ${({ $accent }) => $accent};
|
|
5265
|
+
cursor: pointer;
|
|
5266
|
+
box-shadow:
|
|
5267
|
+
0 8px 5px rgba(0, 0, 0, 0.1),
|
|
5268
|
+
0 20px 12.5px rgba(0, 0, 0, 0.1);
|
|
5269
|
+
`;
|
|
5270
|
+
var SubButton = styled45.button`
|
|
5271
|
+
position: absolute;
|
|
5272
|
+
left: ${(FAB_SIZE - SUB_SIZE) / 2}px;
|
|
5273
|
+
top: ${(FAB_SIZE - SUB_SIZE) / 2}px;
|
|
5274
|
+
display: flex;
|
|
5275
|
+
align-items: center;
|
|
5276
|
+
justify-content: center;
|
|
5277
|
+
width: ${SUB_SIZE}px;
|
|
5278
|
+
height: ${SUB_SIZE}px;
|
|
5279
|
+
border: 1px solid ${colors.grey_300};
|
|
5280
|
+
border-radius: 50%;
|
|
5281
|
+
background: ${colors.white};
|
|
5282
|
+
cursor: pointer;
|
|
5283
|
+
box-shadow:
|
|
5284
|
+
0 4px 3px rgba(0, 0, 0, 0.1),
|
|
5285
|
+
0 10px 7.5px rgba(0, 0, 0, 0.1);
|
|
5286
|
+
transition:
|
|
5287
|
+
transform 0.2s ease,
|
|
5288
|
+
opacity 0.2s ease;
|
|
5289
|
+
transform: ${({ $isOpen, $transform }) => $isOpen ? $transform : "scale(0.4)"};
|
|
5290
|
+
opacity: ${({ $isOpen }) => $isOpen ? 1 : 0};
|
|
5291
|
+
pointer-events: ${({ $isOpen }) => $isOpen ? "auto" : "none"};
|
|
5292
|
+
`;
|
|
5293
|
+
var CountBadge = styled45.span`
|
|
5294
|
+
position: absolute;
|
|
5295
|
+
top: -4px;
|
|
5296
|
+
right: -4px;
|
|
5297
|
+
display: flex;
|
|
5298
|
+
align-items: center;
|
|
5299
|
+
justify-content: center;
|
|
5300
|
+
min-width: 18px;
|
|
5301
|
+
height: 18px;
|
|
5302
|
+
padding: 0 5px;
|
|
5303
|
+
border-radius: 9px;
|
|
5304
|
+
background: ${colors.red_950};
|
|
5305
|
+
color: ${colors.white};
|
|
5306
|
+
font-size: 11px;
|
|
5307
|
+
font-weight: 700;
|
|
5308
|
+
`;
|
|
5309
|
+
|
|
5310
|
+
// src/Components/ProgressBar/ProgressBar.tsx
|
|
5311
|
+
import styled46 from "styled-components";
|
|
5312
|
+
import { jsx as jsx57, jsxs as jsxs31 } from "react/jsx-runtime";
|
|
5179
5313
|
var clampPercent = (value) => Math.max(0, Math.min(100, value));
|
|
5180
|
-
var Wrapper5 =
|
|
5314
|
+
var Wrapper5 = styled46.div`
|
|
5181
5315
|
display: flex;
|
|
5182
5316
|
align-items: center;
|
|
5183
5317
|
gap: 8px;
|
|
5184
5318
|
width: 100%;
|
|
5185
5319
|
`;
|
|
5186
|
-
var Track2 =
|
|
5320
|
+
var Track2 = styled46.div`
|
|
5187
5321
|
position: relative;
|
|
5188
5322
|
flex: 1;
|
|
5189
5323
|
height: ${({ $height }) => $height}px;
|
|
@@ -5191,7 +5325,7 @@ var Track2 = styled45.div`
|
|
|
5191
5325
|
border-radius: ${({ $height }) => $height}px;
|
|
5192
5326
|
overflow: hidden;
|
|
5193
5327
|
`;
|
|
5194
|
-
var Fill =
|
|
5328
|
+
var Fill = styled46.div`
|
|
5195
5329
|
height: 100%;
|
|
5196
5330
|
width: ${({ $percent }) => $percent}%;
|
|
5197
5331
|
background: ${({ $color }) => $color};
|
|
@@ -5206,9 +5340,9 @@ var ProgressBar = ({
|
|
|
5206
5340
|
showLabel = false
|
|
5207
5341
|
}) => {
|
|
5208
5342
|
const percent = clampPercent(value);
|
|
5209
|
-
return /* @__PURE__ */
|
|
5210
|
-
/* @__PURE__ */
|
|
5211
|
-
showLabel && /* @__PURE__ */
|
|
5343
|
+
return /* @__PURE__ */ jsxs31(Wrapper5, { children: [
|
|
5344
|
+
/* @__PURE__ */ jsx57(Track2, { $height: height, $trackColor: trackColor, children: /* @__PURE__ */ jsx57(Fill, { $height: height, $color: color, $percent: percent }) }),
|
|
5345
|
+
showLabel && /* @__PURE__ */ jsxs31(Text, { size: "s", weight: "600", children: [
|
|
5212
5346
|
Math.round(percent),
|
|
5213
5347
|
" %"
|
|
5214
5348
|
] })
|
|
@@ -5216,24 +5350,24 @@ var ProgressBar = ({
|
|
|
5216
5350
|
};
|
|
5217
5351
|
|
|
5218
5352
|
// src/Components/Timeline/Timeline.tsx
|
|
5219
|
-
import
|
|
5220
|
-
import { jsx as
|
|
5221
|
-
var List2 =
|
|
5353
|
+
import styled47 from "styled-components";
|
|
5354
|
+
import { jsx as jsx58, jsxs as jsxs32 } from "react/jsx-runtime";
|
|
5355
|
+
var List2 = styled47.div`
|
|
5222
5356
|
display: flex;
|
|
5223
5357
|
flex-direction: column;
|
|
5224
5358
|
`;
|
|
5225
|
-
var Item2 =
|
|
5359
|
+
var Item2 = styled47.div`
|
|
5226
5360
|
display: flex;
|
|
5227
5361
|
gap: 12px;
|
|
5228
5362
|
align-items: stretch;
|
|
5229
5363
|
`;
|
|
5230
|
-
var Rail =
|
|
5364
|
+
var Rail = styled47.div`
|
|
5231
5365
|
display: flex;
|
|
5232
5366
|
flex-direction: column;
|
|
5233
5367
|
align-items: center;
|
|
5234
5368
|
width: 16px;
|
|
5235
5369
|
`;
|
|
5236
|
-
var Dot2 =
|
|
5370
|
+
var Dot2 = styled47.div`
|
|
5237
5371
|
width: 10px;
|
|
5238
5372
|
height: 10px;
|
|
5239
5373
|
border-radius: 50%;
|
|
@@ -5241,13 +5375,13 @@ var Dot2 = styled46.div`
|
|
|
5241
5375
|
flex: 0 0 auto;
|
|
5242
5376
|
background: ${({ $color }) => $color};
|
|
5243
5377
|
`;
|
|
5244
|
-
var Line =
|
|
5378
|
+
var Line = styled47.div`
|
|
5245
5379
|
width: 2px;
|
|
5246
5380
|
flex: 1;
|
|
5247
5381
|
min-height: 16px;
|
|
5248
5382
|
background: ${({ $color }) => $color};
|
|
5249
5383
|
`;
|
|
5250
|
-
var Content =
|
|
5384
|
+
var Content = styled47.div`
|
|
5251
5385
|
display: flex;
|
|
5252
5386
|
flex-direction: column;
|
|
5253
5387
|
gap: 2px;
|
|
@@ -5259,81 +5393,26 @@ var Timeline = ({
|
|
|
5259
5393
|
emptyLabel = "Aucun \xE9v\xE9nement"
|
|
5260
5394
|
}) => {
|
|
5261
5395
|
if (items.length === 0) {
|
|
5262
|
-
return /* @__PURE__ */
|
|
5396
|
+
return /* @__PURE__ */ jsx58(Text, { size: "s", color: colors.grey_600, children: emptyLabel });
|
|
5263
5397
|
}
|
|
5264
|
-
return /* @__PURE__ */
|
|
5398
|
+
return /* @__PURE__ */ jsx58(List2, { children: items.map((item, index) => {
|
|
5265
5399
|
var _a;
|
|
5266
5400
|
const isLast = index === items.length - 1;
|
|
5267
5401
|
const dotColor = (_a = item.color) != null ? _a : colors.blue_700;
|
|
5268
|
-
return /* @__PURE__ */
|
|
5269
|
-
/* @__PURE__ */
|
|
5270
|
-
/* @__PURE__ */
|
|
5271
|
-
!isLast && /* @__PURE__ */
|
|
5402
|
+
return /* @__PURE__ */ jsxs32(Item2, { children: [
|
|
5403
|
+
/* @__PURE__ */ jsxs32(Rail, { children: [
|
|
5404
|
+
/* @__PURE__ */ jsx58(Dot2, { $color: dotColor }),
|
|
5405
|
+
!isLast && /* @__PURE__ */ jsx58(Line, { $color: lineColor })
|
|
5272
5406
|
] }),
|
|
5273
|
-
/* @__PURE__ */
|
|
5274
|
-
/* @__PURE__ */
|
|
5275
|
-
item.subtitle && /* @__PURE__ */
|
|
5276
|
-
item.description && /* @__PURE__ */
|
|
5407
|
+
/* @__PURE__ */ jsxs32(Content, { $last: isLast, children: [
|
|
5408
|
+
/* @__PURE__ */ jsx58(Text, { size: "s", weight: item.highlighted ? "700" : "600", children: item.title }),
|
|
5409
|
+
item.subtitle && /* @__PURE__ */ jsx58(Text, { size: "xs", color: colors.grey_600, children: item.subtitle }),
|
|
5410
|
+
item.description && /* @__PURE__ */ jsx58(Text, { size: "xs", fontStyle: "italic", children: item.description })
|
|
5277
5411
|
] })
|
|
5278
5412
|
] }, item.id);
|
|
5279
5413
|
}) });
|
|
5280
5414
|
};
|
|
5281
5415
|
|
|
5282
|
-
// src/Components/BorderedRow/BorderedRow.tsx
|
|
5283
|
-
import styled47 from "styled-components";
|
|
5284
|
-
import { jsx as jsx58 } from "react/jsx-runtime";
|
|
5285
|
-
var Wrapper6 = styled47.div`
|
|
5286
|
-
box-sizing: border-box;
|
|
5287
|
-
position: relative;
|
|
5288
|
-
width: 100%;
|
|
5289
|
-
padding: ${({ $padding }) => $padding};
|
|
5290
|
-
${({ $accent, $borderWidth }) => $accent === "bar" ? `padding-left: ${$borderWidth + 16}px;` : ""}
|
|
5291
|
-
border-radius: ${({ $borderRadius }) => $borderRadius};
|
|
5292
|
-
background: ${({ $background }) => $background || "transparent"};
|
|
5293
|
-
cursor: ${({ $clickable }) => $clickable ? "pointer" : "default"};
|
|
5294
|
-
${({ $bordered }) => $bordered ? `border: 1px solid ${colors.grey_300};` : ""}
|
|
5295
|
-
${({ $accent, $borderWidth, $borderColor }) => $accent === "edge" ? `border-left: ${$borderWidth}px solid ${$borderColor};` : ""}
|
|
5296
|
-
|
|
5297
|
-
${({ $accent, $borderWidth, $borderColor }) => $accent === "bar" ? `
|
|
5298
|
-
&::before {
|
|
5299
|
-
content: '';
|
|
5300
|
-
position: absolute;
|
|
5301
|
-
left: 10px;
|
|
5302
|
-
top: 50%;
|
|
5303
|
-
transform: translateY(-50%);
|
|
5304
|
-
height: 62%;
|
|
5305
|
-
width: ${$borderWidth}px;
|
|
5306
|
-
border-radius: ${$borderWidth}px;
|
|
5307
|
-
background: ${$borderColor};
|
|
5308
|
-
}
|
|
5309
|
-
` : ""}
|
|
5310
|
-
`;
|
|
5311
|
-
var BorderedRow = ({
|
|
5312
|
-
borderColor = colors.blue_700,
|
|
5313
|
-
borderWidth = 4,
|
|
5314
|
-
background,
|
|
5315
|
-
padding = "12px",
|
|
5316
|
-
borderRadius = "8px",
|
|
5317
|
-
accent = "edge",
|
|
5318
|
-
bordered = false,
|
|
5319
|
-
children,
|
|
5320
|
-
onClick
|
|
5321
|
-
}) => /* @__PURE__ */ jsx58(
|
|
5322
|
-
Wrapper6,
|
|
5323
|
-
{
|
|
5324
|
-
$borderColor: borderColor,
|
|
5325
|
-
$borderWidth: borderWidth,
|
|
5326
|
-
$background: background,
|
|
5327
|
-
$padding: padding,
|
|
5328
|
-
$borderRadius: borderRadius,
|
|
5329
|
-
$accent: accent,
|
|
5330
|
-
$bordered: bordered,
|
|
5331
|
-
$clickable: !!onClick,
|
|
5332
|
-
onClick,
|
|
5333
|
-
children
|
|
5334
|
-
}
|
|
5335
|
-
);
|
|
5336
|
-
|
|
5337
5416
|
// src/data/globalMethods.ts
|
|
5338
5417
|
var formatDate = (dateString, type = "date", language = "en") => {
|
|
5339
5418
|
if (!dateString) return "";
|
|
@@ -5443,6 +5522,14 @@ var truncateFileName = (fileName, maxLength = 20) => {
|
|
|
5443
5522
|
}
|
|
5444
5523
|
return fileName;
|
|
5445
5524
|
};
|
|
5525
|
+
var formatEuro = (amount) => `${(amount != null ? amount : 0).toLocaleString("fr-FR", {
|
|
5526
|
+
minimumFractionDigits: 2,
|
|
5527
|
+
maximumFractionDigits: 2
|
|
5528
|
+
})} \u20AC`;
|
|
5529
|
+
var formatName = (person, fallback = "") => {
|
|
5530
|
+
var _a, _b;
|
|
5531
|
+
return person ? `${(_a = person.firstname) != null ? _a : ""} ${(_b = person.lastname) != null ? _b : ""}`.trim() || fallback : fallback;
|
|
5532
|
+
};
|
|
5446
5533
|
|
|
5447
5534
|
// src/services/optimizeImage/optimizeImage.ts
|
|
5448
5535
|
var hasDocument = () => typeof document !== "undefined";
|
|
@@ -5580,7 +5667,6 @@ var optimizeImage_default = optimizeImage;
|
|
|
5580
5667
|
export {
|
|
5581
5668
|
Accordion,
|
|
5582
5669
|
Avatar,
|
|
5583
|
-
BorderedRow,
|
|
5584
5670
|
Box,
|
|
5585
5671
|
Bubble,
|
|
5586
5672
|
Bulk,
|
|
@@ -5595,6 +5681,7 @@ export {
|
|
|
5595
5681
|
Drawer,
|
|
5596
5682
|
EmptyState,
|
|
5597
5683
|
FileUploadZone,
|
|
5684
|
+
FloatingButton,
|
|
5598
5685
|
Grid,
|
|
5599
5686
|
Icon,
|
|
5600
5687
|
IconTabs,
|
|
@@ -5640,6 +5727,8 @@ export {
|
|
|
5640
5727
|
formatDate,
|
|
5641
5728
|
formatDistance,
|
|
5642
5729
|
formatDuration,
|
|
5730
|
+
formatEuro,
|
|
5731
|
+
formatName,
|
|
5643
5732
|
optimizeImage_default as optimizeImage,
|
|
5644
5733
|
truncateFileName,
|
|
5645
5734
|
truncateText
|