design-zystem 1.0.251 → 1.0.252
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 +20 -1
- package/dist/index.d.ts +20 -1
- package/dist/index.js +163 -29
- package/dist/index.mjs +162 -29
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -911,6 +911,25 @@ interface EmptyStateProps {
|
|
|
911
911
|
}
|
|
912
912
|
declare const EmptyState: ({ icon, title, description, actionLabel, onAction, }: EmptyStateProps) => react_jsx_runtime.JSX.Element;
|
|
913
913
|
|
|
914
|
+
interface FloatingAction {
|
|
915
|
+
id: string;
|
|
916
|
+
label: string;
|
|
917
|
+
icon: string;
|
|
918
|
+
badge?: number;
|
|
919
|
+
onClick: () => void;
|
|
920
|
+
}
|
|
921
|
+
interface FloatingButtonProps {
|
|
922
|
+
isOpen: boolean;
|
|
923
|
+
onToggle: () => void;
|
|
924
|
+
actions: FloatingAction[];
|
|
925
|
+
mainBadge?: number;
|
|
926
|
+
label?: string;
|
|
927
|
+
icon?: string;
|
|
928
|
+
openIcon?: string;
|
|
929
|
+
variant?: keyof typeof colors;
|
|
930
|
+
}
|
|
931
|
+
declare const FloatingButton: ({ isOpen, onToggle, actions, mainBadge, label, icon, openIcon, variant, }: FloatingButtonProps) => react_jsx_runtime.JSX.Element;
|
|
932
|
+
|
|
914
933
|
interface ProgressBarProps {
|
|
915
934
|
/** Filled portion, 0–100. Values outside the range are clamped. */
|
|
916
935
|
value: number;
|
|
@@ -1030,4 +1049,4 @@ interface OptimizeImageOptions {
|
|
|
1030
1049
|
}
|
|
1031
1050
|
declare const optimizeImage: (file: File | null | undefined, desiredBaseName: string, opts?: OptimizeImageOptions) => Promise<OptimizeImageResult>;
|
|
1032
1051
|
|
|
1033
|
-
export { Accordion, type AccordionItem, Avatar, BorderedRow, Box, Bubble, Bulk, Button, CardSkeleton, Checkbox, Col, Collapse, ColorPicker, DatePicker, Divider, Drawer, EmptyState, FileUploadZone, 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, optimizeImage, truncateFileName, truncateText };
|
|
1052
|
+
export { Accordion, type AccordionItem, Avatar, BorderedRow, 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, optimizeImage, truncateFileName, truncateText };
|
package/dist/index.d.ts
CHANGED
|
@@ -911,6 +911,25 @@ interface EmptyStateProps {
|
|
|
911
911
|
}
|
|
912
912
|
declare const EmptyState: ({ icon, title, description, actionLabel, onAction, }: EmptyStateProps) => react_jsx_runtime.JSX.Element;
|
|
913
913
|
|
|
914
|
+
interface FloatingAction {
|
|
915
|
+
id: string;
|
|
916
|
+
label: string;
|
|
917
|
+
icon: string;
|
|
918
|
+
badge?: number;
|
|
919
|
+
onClick: () => void;
|
|
920
|
+
}
|
|
921
|
+
interface FloatingButtonProps {
|
|
922
|
+
isOpen: boolean;
|
|
923
|
+
onToggle: () => void;
|
|
924
|
+
actions: FloatingAction[];
|
|
925
|
+
mainBadge?: number;
|
|
926
|
+
label?: string;
|
|
927
|
+
icon?: string;
|
|
928
|
+
openIcon?: string;
|
|
929
|
+
variant?: keyof typeof colors;
|
|
930
|
+
}
|
|
931
|
+
declare const FloatingButton: ({ isOpen, onToggle, actions, mainBadge, label, icon, openIcon, variant, }: FloatingButtonProps) => react_jsx_runtime.JSX.Element;
|
|
932
|
+
|
|
914
933
|
interface ProgressBarProps {
|
|
915
934
|
/** Filled portion, 0–100. Values outside the range are clamped. */
|
|
916
935
|
value: number;
|
|
@@ -1030,4 +1049,4 @@ interface OptimizeImageOptions {
|
|
|
1030
1049
|
}
|
|
1031
1050
|
declare const optimizeImage: (file: File | null | undefined, desiredBaseName: string, opts?: OptimizeImageOptions) => Promise<OptimizeImageResult>;
|
|
1032
1051
|
|
|
1033
|
-
export { Accordion, type AccordionItem, Avatar, BorderedRow, Box, Bubble, Bulk, Button, CardSkeleton, Checkbox, Col, Collapse, ColorPicker, DatePicker, Divider, Drawer, EmptyState, FileUploadZone, 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, optimizeImage, truncateFileName, truncateText };
|
|
1052
|
+
export { Accordion, type AccordionItem, Avatar, BorderedRow, 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, optimizeImage, truncateFileName, truncateText };
|
package/dist/index.js
CHANGED
|
@@ -76,6 +76,7 @@ __export(index_exports, {
|
|
|
76
76
|
Drawer: () => Drawer,
|
|
77
77
|
EmptyState: () => EmptyState,
|
|
78
78
|
FileUploadZone: () => FileUploadZone,
|
|
79
|
+
FloatingButton: () => FloatingButton,
|
|
79
80
|
Grid: () => Grid,
|
|
80
81
|
Icon: () => Icon,
|
|
81
82
|
IconTabs: () => IconTabs,
|
|
@@ -5250,17 +5251,149 @@ var EmptyState = ({
|
|
|
5250
5251
|
);
|
|
5251
5252
|
};
|
|
5252
5253
|
|
|
5253
|
-
// src/Components/
|
|
5254
|
+
// src/Components/FloatingButton/FloatingButton.tsx
|
|
5254
5255
|
var import_styled_components45 = __toESM(require("styled-components"));
|
|
5255
5256
|
var import_jsx_runtime56 = require("react/jsx-runtime");
|
|
5257
|
+
var FloatingButton = ({
|
|
5258
|
+
isOpen,
|
|
5259
|
+
onToggle,
|
|
5260
|
+
actions,
|
|
5261
|
+
mainBadge = 0,
|
|
5262
|
+
label = "Menu",
|
|
5263
|
+
icon = "comment",
|
|
5264
|
+
openIcon = "xmark",
|
|
5265
|
+
variant = "blue_700"
|
|
5266
|
+
}) => {
|
|
5267
|
+
const accent = colors[variant];
|
|
5268
|
+
return /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(Container6, { children: [
|
|
5269
|
+
actions.map((action, index) => {
|
|
5270
|
+
var _a;
|
|
5271
|
+
return /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(
|
|
5272
|
+
SubButton,
|
|
5273
|
+
{
|
|
5274
|
+
type: "button",
|
|
5275
|
+
"aria-label": action.label,
|
|
5276
|
+
$isOpen: isOpen,
|
|
5277
|
+
$transform: arcTransform(index, actions.length),
|
|
5278
|
+
onClick: action.onClick,
|
|
5279
|
+
children: [
|
|
5280
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(Icon, { name: action.icon, family: "regular", size: "s", color: accent }),
|
|
5281
|
+
((_a = action.badge) != null ? _a : 0) > 0 && /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(CountBadge, { children: action.badge })
|
|
5282
|
+
]
|
|
5283
|
+
},
|
|
5284
|
+
action.id
|
|
5285
|
+
);
|
|
5286
|
+
}),
|
|
5287
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(
|
|
5288
|
+
MainButton,
|
|
5289
|
+
{
|
|
5290
|
+
type: "button",
|
|
5291
|
+
"aria-label": label,
|
|
5292
|
+
"aria-expanded": isOpen,
|
|
5293
|
+
$accent: accent,
|
|
5294
|
+
onClick: onToggle,
|
|
5295
|
+
children: [
|
|
5296
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
5297
|
+
Icon,
|
|
5298
|
+
{
|
|
5299
|
+
name: isOpen ? openIcon : icon,
|
|
5300
|
+
family: "regular",
|
|
5301
|
+
size: "m",
|
|
5302
|
+
color: colors.white
|
|
5303
|
+
}
|
|
5304
|
+
),
|
|
5305
|
+
!isOpen && mainBadge > 0 && /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(CountBadge, { children: mainBadge })
|
|
5306
|
+
]
|
|
5307
|
+
}
|
|
5308
|
+
)
|
|
5309
|
+
] });
|
|
5310
|
+
};
|
|
5311
|
+
var FAB_SIZE = 56;
|
|
5312
|
+
var SUB_SIZE = 48;
|
|
5313
|
+
var ARC_RADIUS = 64;
|
|
5314
|
+
var ARC_START_ANGLE = 90;
|
|
5315
|
+
var ARC_MAX_STEP = 65;
|
|
5316
|
+
var ARC_MAX_SPAN = 90;
|
|
5317
|
+
var arcTransform = (index, total) => {
|
|
5318
|
+
const step = total > 1 ? Math.min(ARC_MAX_STEP, ARC_MAX_SPAN / (total - 1)) : 0;
|
|
5319
|
+
const angle = (ARC_START_ANGLE + index * step) * Math.PI / 180;
|
|
5320
|
+
const x = Math.round(Math.cos(angle) * ARC_RADIUS);
|
|
5321
|
+
const y = Math.round(-Math.sin(angle) * ARC_RADIUS);
|
|
5322
|
+
return `translate(${x}px, ${y}px)`;
|
|
5323
|
+
};
|
|
5324
|
+
var Container6 = import_styled_components45.default.div`
|
|
5325
|
+
position: fixed;
|
|
5326
|
+
right: 32px;
|
|
5327
|
+
bottom: 32px;
|
|
5328
|
+
width: ${FAB_SIZE}px;
|
|
5329
|
+
height: ${FAB_SIZE}px;
|
|
5330
|
+
z-index: 1000;
|
|
5331
|
+
`;
|
|
5332
|
+
var MainButton = import_styled_components45.default.button`
|
|
5333
|
+
position: absolute;
|
|
5334
|
+
inset: 0;
|
|
5335
|
+
display: flex;
|
|
5336
|
+
align-items: center;
|
|
5337
|
+
justify-content: center;
|
|
5338
|
+
border: none;
|
|
5339
|
+
border-radius: 50%;
|
|
5340
|
+
background: ${({ $accent }) => $accent};
|
|
5341
|
+
cursor: pointer;
|
|
5342
|
+
box-shadow:
|
|
5343
|
+
0 8px 5px rgba(0, 0, 0, 0.1),
|
|
5344
|
+
0 20px 12.5px rgba(0, 0, 0, 0.1);
|
|
5345
|
+
`;
|
|
5346
|
+
var SubButton = import_styled_components45.default.button`
|
|
5347
|
+
position: absolute;
|
|
5348
|
+
left: ${(FAB_SIZE - SUB_SIZE) / 2}px;
|
|
5349
|
+
top: ${(FAB_SIZE - SUB_SIZE) / 2}px;
|
|
5350
|
+
display: flex;
|
|
5351
|
+
align-items: center;
|
|
5352
|
+
justify-content: center;
|
|
5353
|
+
width: ${SUB_SIZE}px;
|
|
5354
|
+
height: ${SUB_SIZE}px;
|
|
5355
|
+
border: 1px solid ${colors.grey_300};
|
|
5356
|
+
border-radius: 50%;
|
|
5357
|
+
background: ${colors.white};
|
|
5358
|
+
cursor: pointer;
|
|
5359
|
+
box-shadow:
|
|
5360
|
+
0 4px 3px rgba(0, 0, 0, 0.1),
|
|
5361
|
+
0 10px 7.5px rgba(0, 0, 0, 0.1);
|
|
5362
|
+
transition:
|
|
5363
|
+
transform 0.2s ease,
|
|
5364
|
+
opacity 0.2s ease;
|
|
5365
|
+
transform: ${({ $isOpen, $transform }) => $isOpen ? $transform : "scale(0.4)"};
|
|
5366
|
+
opacity: ${({ $isOpen }) => $isOpen ? 1 : 0};
|
|
5367
|
+
pointer-events: ${({ $isOpen }) => $isOpen ? "auto" : "none"};
|
|
5368
|
+
`;
|
|
5369
|
+
var CountBadge = import_styled_components45.default.span`
|
|
5370
|
+
position: absolute;
|
|
5371
|
+
top: -4px;
|
|
5372
|
+
right: -4px;
|
|
5373
|
+
display: flex;
|
|
5374
|
+
align-items: center;
|
|
5375
|
+
justify-content: center;
|
|
5376
|
+
min-width: 18px;
|
|
5377
|
+
height: 18px;
|
|
5378
|
+
padding: 0 5px;
|
|
5379
|
+
border-radius: 9px;
|
|
5380
|
+
background: ${colors.red_950};
|
|
5381
|
+
color: ${colors.white};
|
|
5382
|
+
font-size: 11px;
|
|
5383
|
+
font-weight: 700;
|
|
5384
|
+
`;
|
|
5385
|
+
|
|
5386
|
+
// src/Components/ProgressBar/ProgressBar.tsx
|
|
5387
|
+
var import_styled_components46 = __toESM(require("styled-components"));
|
|
5388
|
+
var import_jsx_runtime57 = require("react/jsx-runtime");
|
|
5256
5389
|
var clampPercent = (value) => Math.max(0, Math.min(100, value));
|
|
5257
|
-
var Wrapper5 =
|
|
5390
|
+
var Wrapper5 = import_styled_components46.default.div`
|
|
5258
5391
|
display: flex;
|
|
5259
5392
|
align-items: center;
|
|
5260
5393
|
gap: 8px;
|
|
5261
5394
|
width: 100%;
|
|
5262
5395
|
`;
|
|
5263
|
-
var Track2 =
|
|
5396
|
+
var Track2 = import_styled_components46.default.div`
|
|
5264
5397
|
position: relative;
|
|
5265
5398
|
flex: 1;
|
|
5266
5399
|
height: ${({ $height }) => $height}px;
|
|
@@ -5268,7 +5401,7 @@ var Track2 = import_styled_components45.default.div`
|
|
|
5268
5401
|
border-radius: ${({ $height }) => $height}px;
|
|
5269
5402
|
overflow: hidden;
|
|
5270
5403
|
`;
|
|
5271
|
-
var Fill =
|
|
5404
|
+
var Fill = import_styled_components46.default.div`
|
|
5272
5405
|
height: 100%;
|
|
5273
5406
|
width: ${({ $percent }) => $percent}%;
|
|
5274
5407
|
background: ${({ $color }) => $color};
|
|
@@ -5283,9 +5416,9 @@ var ProgressBar = ({
|
|
|
5283
5416
|
showLabel = false
|
|
5284
5417
|
}) => {
|
|
5285
5418
|
const percent = clampPercent(value);
|
|
5286
|
-
return /* @__PURE__ */ (0,
|
|
5287
|
-
/* @__PURE__ */ (0,
|
|
5288
|
-
showLabel && /* @__PURE__ */ (0,
|
|
5419
|
+
return /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(Wrapper5, { children: [
|
|
5420
|
+
/* @__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 }) }),
|
|
5421
|
+
showLabel && /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(Text, { size: "s", weight: "600", children: [
|
|
5289
5422
|
Math.round(percent),
|
|
5290
5423
|
" %"
|
|
5291
5424
|
] })
|
|
@@ -5293,24 +5426,24 @@ var ProgressBar = ({
|
|
|
5293
5426
|
};
|
|
5294
5427
|
|
|
5295
5428
|
// src/Components/Timeline/Timeline.tsx
|
|
5296
|
-
var
|
|
5297
|
-
var
|
|
5298
|
-
var List2 =
|
|
5429
|
+
var import_styled_components47 = __toESM(require("styled-components"));
|
|
5430
|
+
var import_jsx_runtime58 = require("react/jsx-runtime");
|
|
5431
|
+
var List2 = import_styled_components47.default.div`
|
|
5299
5432
|
display: flex;
|
|
5300
5433
|
flex-direction: column;
|
|
5301
5434
|
`;
|
|
5302
|
-
var Item2 =
|
|
5435
|
+
var Item2 = import_styled_components47.default.div`
|
|
5303
5436
|
display: flex;
|
|
5304
5437
|
gap: 12px;
|
|
5305
5438
|
align-items: stretch;
|
|
5306
5439
|
`;
|
|
5307
|
-
var Rail =
|
|
5440
|
+
var Rail = import_styled_components47.default.div`
|
|
5308
5441
|
display: flex;
|
|
5309
5442
|
flex-direction: column;
|
|
5310
5443
|
align-items: center;
|
|
5311
5444
|
width: 16px;
|
|
5312
5445
|
`;
|
|
5313
|
-
var Dot2 =
|
|
5446
|
+
var Dot2 = import_styled_components47.default.div`
|
|
5314
5447
|
width: 10px;
|
|
5315
5448
|
height: 10px;
|
|
5316
5449
|
border-radius: 50%;
|
|
@@ -5318,13 +5451,13 @@ var Dot2 = import_styled_components46.default.div`
|
|
|
5318
5451
|
flex: 0 0 auto;
|
|
5319
5452
|
background: ${({ $color }) => $color};
|
|
5320
5453
|
`;
|
|
5321
|
-
var Line =
|
|
5454
|
+
var Line = import_styled_components47.default.div`
|
|
5322
5455
|
width: 2px;
|
|
5323
5456
|
flex: 1;
|
|
5324
5457
|
min-height: 16px;
|
|
5325
5458
|
background: ${({ $color }) => $color};
|
|
5326
5459
|
`;
|
|
5327
|
-
var Content =
|
|
5460
|
+
var Content = import_styled_components47.default.div`
|
|
5328
5461
|
display: flex;
|
|
5329
5462
|
flex-direction: column;
|
|
5330
5463
|
gap: 2px;
|
|
@@ -5336,30 +5469,30 @@ var Timeline = ({
|
|
|
5336
5469
|
emptyLabel = "Aucun \xE9v\xE9nement"
|
|
5337
5470
|
}) => {
|
|
5338
5471
|
if (items.length === 0) {
|
|
5339
|
-
return /* @__PURE__ */ (0,
|
|
5472
|
+
return /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(Text, { size: "s", color: colors.grey_600, children: emptyLabel });
|
|
5340
5473
|
}
|
|
5341
|
-
return /* @__PURE__ */ (0,
|
|
5474
|
+
return /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(List2, { children: items.map((item, index) => {
|
|
5342
5475
|
var _a;
|
|
5343
5476
|
const isLast = index === items.length - 1;
|
|
5344
5477
|
const dotColor = (_a = item.color) != null ? _a : colors.blue_700;
|
|
5345
|
-
return /* @__PURE__ */ (0,
|
|
5346
|
-
/* @__PURE__ */ (0,
|
|
5347
|
-
/* @__PURE__ */ (0,
|
|
5348
|
-
!isLast && /* @__PURE__ */ (0,
|
|
5478
|
+
return /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(Item2, { children: [
|
|
5479
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(Rail, { children: [
|
|
5480
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)(Dot2, { $color: dotColor }),
|
|
5481
|
+
!isLast && /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(Line, { $color: lineColor })
|
|
5349
5482
|
] }),
|
|
5350
|
-
/* @__PURE__ */ (0,
|
|
5351
|
-
/* @__PURE__ */ (0,
|
|
5352
|
-
item.subtitle && /* @__PURE__ */ (0,
|
|
5353
|
-
item.description && /* @__PURE__ */ (0,
|
|
5483
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(Content, { $last: isLast, children: [
|
|
5484
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)(Text, { size: "s", weight: item.highlighted ? "700" : "600", children: item.title }),
|
|
5485
|
+
item.subtitle && /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(Text, { size: "xs", color: colors.grey_600, children: item.subtitle }),
|
|
5486
|
+
item.description && /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(Text, { size: "xs", fontStyle: "italic", children: item.description })
|
|
5354
5487
|
] })
|
|
5355
5488
|
] }, item.id);
|
|
5356
5489
|
}) });
|
|
5357
5490
|
};
|
|
5358
5491
|
|
|
5359
5492
|
// src/Components/BorderedRow/BorderedRow.tsx
|
|
5360
|
-
var
|
|
5361
|
-
var
|
|
5362
|
-
var Wrapper6 =
|
|
5493
|
+
var import_styled_components48 = __toESM(require("styled-components"));
|
|
5494
|
+
var import_jsx_runtime59 = require("react/jsx-runtime");
|
|
5495
|
+
var Wrapper6 = import_styled_components48.default.div`
|
|
5363
5496
|
box-sizing: border-box;
|
|
5364
5497
|
position: relative;
|
|
5365
5498
|
width: 100%;
|
|
@@ -5395,7 +5528,7 @@ var BorderedRow = ({
|
|
|
5395
5528
|
bordered = false,
|
|
5396
5529
|
children,
|
|
5397
5530
|
onClick
|
|
5398
|
-
}) => /* @__PURE__ */ (0,
|
|
5531
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
5399
5532
|
Wrapper6,
|
|
5400
5533
|
{
|
|
5401
5534
|
$borderColor: borderColor,
|
|
@@ -5673,6 +5806,7 @@ var optimizeImage_default = optimizeImage;
|
|
|
5673
5806
|
Drawer,
|
|
5674
5807
|
EmptyState,
|
|
5675
5808
|
FileUploadZone,
|
|
5809
|
+
FloatingButton,
|
|
5676
5810
|
Grid,
|
|
5677
5811
|
Icon,
|
|
5678
5812
|
IconTabs,
|
package/dist/index.mjs
CHANGED
|
@@ -5173,17 +5173,149 @@ var EmptyState = ({
|
|
|
5173
5173
|
);
|
|
5174
5174
|
};
|
|
5175
5175
|
|
|
5176
|
-
// src/Components/
|
|
5176
|
+
// src/Components/FloatingButton/FloatingButton.tsx
|
|
5177
5177
|
import styled45 from "styled-components";
|
|
5178
5178
|
import { jsx as jsx56, jsxs as jsxs30 } from "react/jsx-runtime";
|
|
5179
|
+
var FloatingButton = ({
|
|
5180
|
+
isOpen,
|
|
5181
|
+
onToggle,
|
|
5182
|
+
actions,
|
|
5183
|
+
mainBadge = 0,
|
|
5184
|
+
label = "Menu",
|
|
5185
|
+
icon = "comment",
|
|
5186
|
+
openIcon = "xmark",
|
|
5187
|
+
variant = "blue_700"
|
|
5188
|
+
}) => {
|
|
5189
|
+
const accent = colors[variant];
|
|
5190
|
+
return /* @__PURE__ */ jsxs30(Container6, { children: [
|
|
5191
|
+
actions.map((action, index) => {
|
|
5192
|
+
var _a;
|
|
5193
|
+
return /* @__PURE__ */ jsxs30(
|
|
5194
|
+
SubButton,
|
|
5195
|
+
{
|
|
5196
|
+
type: "button",
|
|
5197
|
+
"aria-label": action.label,
|
|
5198
|
+
$isOpen: isOpen,
|
|
5199
|
+
$transform: arcTransform(index, actions.length),
|
|
5200
|
+
onClick: action.onClick,
|
|
5201
|
+
children: [
|
|
5202
|
+
/* @__PURE__ */ jsx56(Icon, { name: action.icon, family: "regular", size: "s", color: accent }),
|
|
5203
|
+
((_a = action.badge) != null ? _a : 0) > 0 && /* @__PURE__ */ jsx56(CountBadge, { children: action.badge })
|
|
5204
|
+
]
|
|
5205
|
+
},
|
|
5206
|
+
action.id
|
|
5207
|
+
);
|
|
5208
|
+
}),
|
|
5209
|
+
/* @__PURE__ */ jsxs30(
|
|
5210
|
+
MainButton,
|
|
5211
|
+
{
|
|
5212
|
+
type: "button",
|
|
5213
|
+
"aria-label": label,
|
|
5214
|
+
"aria-expanded": isOpen,
|
|
5215
|
+
$accent: accent,
|
|
5216
|
+
onClick: onToggle,
|
|
5217
|
+
children: [
|
|
5218
|
+
/* @__PURE__ */ jsx56(
|
|
5219
|
+
Icon,
|
|
5220
|
+
{
|
|
5221
|
+
name: isOpen ? openIcon : icon,
|
|
5222
|
+
family: "regular",
|
|
5223
|
+
size: "m",
|
|
5224
|
+
color: colors.white
|
|
5225
|
+
}
|
|
5226
|
+
),
|
|
5227
|
+
!isOpen && mainBadge > 0 && /* @__PURE__ */ jsx56(CountBadge, { children: mainBadge })
|
|
5228
|
+
]
|
|
5229
|
+
}
|
|
5230
|
+
)
|
|
5231
|
+
] });
|
|
5232
|
+
};
|
|
5233
|
+
var FAB_SIZE = 56;
|
|
5234
|
+
var SUB_SIZE = 48;
|
|
5235
|
+
var ARC_RADIUS = 64;
|
|
5236
|
+
var ARC_START_ANGLE = 90;
|
|
5237
|
+
var ARC_MAX_STEP = 65;
|
|
5238
|
+
var ARC_MAX_SPAN = 90;
|
|
5239
|
+
var arcTransform = (index, total) => {
|
|
5240
|
+
const step = total > 1 ? Math.min(ARC_MAX_STEP, ARC_MAX_SPAN / (total - 1)) : 0;
|
|
5241
|
+
const angle = (ARC_START_ANGLE + index * step) * Math.PI / 180;
|
|
5242
|
+
const x = Math.round(Math.cos(angle) * ARC_RADIUS);
|
|
5243
|
+
const y = Math.round(-Math.sin(angle) * ARC_RADIUS);
|
|
5244
|
+
return `translate(${x}px, ${y}px)`;
|
|
5245
|
+
};
|
|
5246
|
+
var Container6 = styled45.div`
|
|
5247
|
+
position: fixed;
|
|
5248
|
+
right: 32px;
|
|
5249
|
+
bottom: 32px;
|
|
5250
|
+
width: ${FAB_SIZE}px;
|
|
5251
|
+
height: ${FAB_SIZE}px;
|
|
5252
|
+
z-index: 1000;
|
|
5253
|
+
`;
|
|
5254
|
+
var MainButton = styled45.button`
|
|
5255
|
+
position: absolute;
|
|
5256
|
+
inset: 0;
|
|
5257
|
+
display: flex;
|
|
5258
|
+
align-items: center;
|
|
5259
|
+
justify-content: center;
|
|
5260
|
+
border: none;
|
|
5261
|
+
border-radius: 50%;
|
|
5262
|
+
background: ${({ $accent }) => $accent};
|
|
5263
|
+
cursor: pointer;
|
|
5264
|
+
box-shadow:
|
|
5265
|
+
0 8px 5px rgba(0, 0, 0, 0.1),
|
|
5266
|
+
0 20px 12.5px rgba(0, 0, 0, 0.1);
|
|
5267
|
+
`;
|
|
5268
|
+
var SubButton = styled45.button`
|
|
5269
|
+
position: absolute;
|
|
5270
|
+
left: ${(FAB_SIZE - SUB_SIZE) / 2}px;
|
|
5271
|
+
top: ${(FAB_SIZE - SUB_SIZE) / 2}px;
|
|
5272
|
+
display: flex;
|
|
5273
|
+
align-items: center;
|
|
5274
|
+
justify-content: center;
|
|
5275
|
+
width: ${SUB_SIZE}px;
|
|
5276
|
+
height: ${SUB_SIZE}px;
|
|
5277
|
+
border: 1px solid ${colors.grey_300};
|
|
5278
|
+
border-radius: 50%;
|
|
5279
|
+
background: ${colors.white};
|
|
5280
|
+
cursor: pointer;
|
|
5281
|
+
box-shadow:
|
|
5282
|
+
0 4px 3px rgba(0, 0, 0, 0.1),
|
|
5283
|
+
0 10px 7.5px rgba(0, 0, 0, 0.1);
|
|
5284
|
+
transition:
|
|
5285
|
+
transform 0.2s ease,
|
|
5286
|
+
opacity 0.2s ease;
|
|
5287
|
+
transform: ${({ $isOpen, $transform }) => $isOpen ? $transform : "scale(0.4)"};
|
|
5288
|
+
opacity: ${({ $isOpen }) => $isOpen ? 1 : 0};
|
|
5289
|
+
pointer-events: ${({ $isOpen }) => $isOpen ? "auto" : "none"};
|
|
5290
|
+
`;
|
|
5291
|
+
var CountBadge = styled45.span`
|
|
5292
|
+
position: absolute;
|
|
5293
|
+
top: -4px;
|
|
5294
|
+
right: -4px;
|
|
5295
|
+
display: flex;
|
|
5296
|
+
align-items: center;
|
|
5297
|
+
justify-content: center;
|
|
5298
|
+
min-width: 18px;
|
|
5299
|
+
height: 18px;
|
|
5300
|
+
padding: 0 5px;
|
|
5301
|
+
border-radius: 9px;
|
|
5302
|
+
background: ${colors.red_950};
|
|
5303
|
+
color: ${colors.white};
|
|
5304
|
+
font-size: 11px;
|
|
5305
|
+
font-weight: 700;
|
|
5306
|
+
`;
|
|
5307
|
+
|
|
5308
|
+
// src/Components/ProgressBar/ProgressBar.tsx
|
|
5309
|
+
import styled46 from "styled-components";
|
|
5310
|
+
import { jsx as jsx57, jsxs as jsxs31 } from "react/jsx-runtime";
|
|
5179
5311
|
var clampPercent = (value) => Math.max(0, Math.min(100, value));
|
|
5180
|
-
var Wrapper5 =
|
|
5312
|
+
var Wrapper5 = styled46.div`
|
|
5181
5313
|
display: flex;
|
|
5182
5314
|
align-items: center;
|
|
5183
5315
|
gap: 8px;
|
|
5184
5316
|
width: 100%;
|
|
5185
5317
|
`;
|
|
5186
|
-
var Track2 =
|
|
5318
|
+
var Track2 = styled46.div`
|
|
5187
5319
|
position: relative;
|
|
5188
5320
|
flex: 1;
|
|
5189
5321
|
height: ${({ $height }) => $height}px;
|
|
@@ -5191,7 +5323,7 @@ var Track2 = styled45.div`
|
|
|
5191
5323
|
border-radius: ${({ $height }) => $height}px;
|
|
5192
5324
|
overflow: hidden;
|
|
5193
5325
|
`;
|
|
5194
|
-
var Fill =
|
|
5326
|
+
var Fill = styled46.div`
|
|
5195
5327
|
height: 100%;
|
|
5196
5328
|
width: ${({ $percent }) => $percent}%;
|
|
5197
5329
|
background: ${({ $color }) => $color};
|
|
@@ -5206,9 +5338,9 @@ var ProgressBar = ({
|
|
|
5206
5338
|
showLabel = false
|
|
5207
5339
|
}) => {
|
|
5208
5340
|
const percent = clampPercent(value);
|
|
5209
|
-
return /* @__PURE__ */
|
|
5210
|
-
/* @__PURE__ */
|
|
5211
|
-
showLabel && /* @__PURE__ */
|
|
5341
|
+
return /* @__PURE__ */ jsxs31(Wrapper5, { children: [
|
|
5342
|
+
/* @__PURE__ */ jsx57(Track2, { $height: height, $trackColor: trackColor, children: /* @__PURE__ */ jsx57(Fill, { $height: height, $color: color, $percent: percent }) }),
|
|
5343
|
+
showLabel && /* @__PURE__ */ jsxs31(Text, { size: "s", weight: "600", children: [
|
|
5212
5344
|
Math.round(percent),
|
|
5213
5345
|
" %"
|
|
5214
5346
|
] })
|
|
@@ -5216,24 +5348,24 @@ var ProgressBar = ({
|
|
|
5216
5348
|
};
|
|
5217
5349
|
|
|
5218
5350
|
// src/Components/Timeline/Timeline.tsx
|
|
5219
|
-
import
|
|
5220
|
-
import { jsx as
|
|
5221
|
-
var List2 =
|
|
5351
|
+
import styled47 from "styled-components";
|
|
5352
|
+
import { jsx as jsx58, jsxs as jsxs32 } from "react/jsx-runtime";
|
|
5353
|
+
var List2 = styled47.div`
|
|
5222
5354
|
display: flex;
|
|
5223
5355
|
flex-direction: column;
|
|
5224
5356
|
`;
|
|
5225
|
-
var Item2 =
|
|
5357
|
+
var Item2 = styled47.div`
|
|
5226
5358
|
display: flex;
|
|
5227
5359
|
gap: 12px;
|
|
5228
5360
|
align-items: stretch;
|
|
5229
5361
|
`;
|
|
5230
|
-
var Rail =
|
|
5362
|
+
var Rail = styled47.div`
|
|
5231
5363
|
display: flex;
|
|
5232
5364
|
flex-direction: column;
|
|
5233
5365
|
align-items: center;
|
|
5234
5366
|
width: 16px;
|
|
5235
5367
|
`;
|
|
5236
|
-
var Dot2 =
|
|
5368
|
+
var Dot2 = styled47.div`
|
|
5237
5369
|
width: 10px;
|
|
5238
5370
|
height: 10px;
|
|
5239
5371
|
border-radius: 50%;
|
|
@@ -5241,13 +5373,13 @@ var Dot2 = styled46.div`
|
|
|
5241
5373
|
flex: 0 0 auto;
|
|
5242
5374
|
background: ${({ $color }) => $color};
|
|
5243
5375
|
`;
|
|
5244
|
-
var Line =
|
|
5376
|
+
var Line = styled47.div`
|
|
5245
5377
|
width: 2px;
|
|
5246
5378
|
flex: 1;
|
|
5247
5379
|
min-height: 16px;
|
|
5248
5380
|
background: ${({ $color }) => $color};
|
|
5249
5381
|
`;
|
|
5250
|
-
var Content =
|
|
5382
|
+
var Content = styled47.div`
|
|
5251
5383
|
display: flex;
|
|
5252
5384
|
flex-direction: column;
|
|
5253
5385
|
gap: 2px;
|
|
@@ -5259,30 +5391,30 @@ var Timeline = ({
|
|
|
5259
5391
|
emptyLabel = "Aucun \xE9v\xE9nement"
|
|
5260
5392
|
}) => {
|
|
5261
5393
|
if (items.length === 0) {
|
|
5262
|
-
return /* @__PURE__ */
|
|
5394
|
+
return /* @__PURE__ */ jsx58(Text, { size: "s", color: colors.grey_600, children: emptyLabel });
|
|
5263
5395
|
}
|
|
5264
|
-
return /* @__PURE__ */
|
|
5396
|
+
return /* @__PURE__ */ jsx58(List2, { children: items.map((item, index) => {
|
|
5265
5397
|
var _a;
|
|
5266
5398
|
const isLast = index === items.length - 1;
|
|
5267
5399
|
const dotColor = (_a = item.color) != null ? _a : colors.blue_700;
|
|
5268
|
-
return /* @__PURE__ */
|
|
5269
|
-
/* @__PURE__ */
|
|
5270
|
-
/* @__PURE__ */
|
|
5271
|
-
!isLast && /* @__PURE__ */
|
|
5400
|
+
return /* @__PURE__ */ jsxs32(Item2, { children: [
|
|
5401
|
+
/* @__PURE__ */ jsxs32(Rail, { children: [
|
|
5402
|
+
/* @__PURE__ */ jsx58(Dot2, { $color: dotColor }),
|
|
5403
|
+
!isLast && /* @__PURE__ */ jsx58(Line, { $color: lineColor })
|
|
5272
5404
|
] }),
|
|
5273
|
-
/* @__PURE__ */
|
|
5274
|
-
/* @__PURE__ */
|
|
5275
|
-
item.subtitle && /* @__PURE__ */
|
|
5276
|
-
item.description && /* @__PURE__ */
|
|
5405
|
+
/* @__PURE__ */ jsxs32(Content, { $last: isLast, children: [
|
|
5406
|
+
/* @__PURE__ */ jsx58(Text, { size: "s", weight: item.highlighted ? "700" : "600", children: item.title }),
|
|
5407
|
+
item.subtitle && /* @__PURE__ */ jsx58(Text, { size: "xs", color: colors.grey_600, children: item.subtitle }),
|
|
5408
|
+
item.description && /* @__PURE__ */ jsx58(Text, { size: "xs", fontStyle: "italic", children: item.description })
|
|
5277
5409
|
] })
|
|
5278
5410
|
] }, item.id);
|
|
5279
5411
|
}) });
|
|
5280
5412
|
};
|
|
5281
5413
|
|
|
5282
5414
|
// src/Components/BorderedRow/BorderedRow.tsx
|
|
5283
|
-
import
|
|
5284
|
-
import { jsx as
|
|
5285
|
-
var Wrapper6 =
|
|
5415
|
+
import styled48 from "styled-components";
|
|
5416
|
+
import { jsx as jsx59 } from "react/jsx-runtime";
|
|
5417
|
+
var Wrapper6 = styled48.div`
|
|
5286
5418
|
box-sizing: border-box;
|
|
5287
5419
|
position: relative;
|
|
5288
5420
|
width: 100%;
|
|
@@ -5318,7 +5450,7 @@ var BorderedRow = ({
|
|
|
5318
5450
|
bordered = false,
|
|
5319
5451
|
children,
|
|
5320
5452
|
onClick
|
|
5321
|
-
}) => /* @__PURE__ */
|
|
5453
|
+
}) => /* @__PURE__ */ jsx59(
|
|
5322
5454
|
Wrapper6,
|
|
5323
5455
|
{
|
|
5324
5456
|
$borderColor: borderColor,
|
|
@@ -5595,6 +5727,7 @@ export {
|
|
|
5595
5727
|
Drawer,
|
|
5596
5728
|
EmptyState,
|
|
5597
5729
|
FileUploadZone,
|
|
5730
|
+
FloatingButton,
|
|
5598
5731
|
Grid,
|
|
5599
5732
|
Icon,
|
|
5600
5733
|
IconTabs,
|