design-zystem 1.0.247 → 1.0.249

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 CHANGED
@@ -31,6 +31,7 @@ interface BoxProps extends Omit<HTMLAttributes<HTMLDivElement>, 'color'> {
31
31
  alignSelf?: string;
32
32
  justifyContent?: string;
33
33
  borderRadius?: string;
34
+ border?: string;
34
35
  style?: CSSProperties;
35
36
  }
36
37
  declare const Box: ({ children, hasShadow, ...rest }: BoxProps) => react_jsx_runtime.JSX.Element;
@@ -189,9 +190,11 @@ interface DrawerProps {
189
190
  isLoading?: boolean;
190
191
  leftVariant?: string;
191
192
  variant?: string;
193
+ leftOutline?: boolean;
194
+ rightOutline?: boolean;
192
195
  footer?: ReactNode;
193
196
  }
194
- declare const Drawer: ({ showDrawer, closeDrawer, title, width, children, leftButtonLabel, leftButtonAction, leftButtonDisabled, rightButtonLabel, rightButtonAction, rightButtonDisabled, isLoading, leftVariant, variant, footer, }: DrawerProps) => react_jsx_runtime.JSX.Element | null;
197
+ declare const Drawer: ({ showDrawer, closeDrawer, title, width, children, leftButtonLabel, leftButtonAction, leftButtonDisabled, rightButtonLabel, rightButtonAction, rightButtonDisabled, isLoading, leftVariant, variant, leftOutline, rightOutline, footer, }: DrawerProps) => react_jsx_runtime.JSX.Element | null;
195
198
 
196
199
  type SizeKey = 'xxs' | 'xs' | 's' | 'm' | 'l' | 'xl' | 'xxl';
197
200
  interface TagBubbleProps extends HTMLAttributes<HTMLDivElement> {
@@ -266,6 +269,7 @@ interface TextProps extends Omit<HTMLAttributes<HTMLElement>, 'color'> {
266
269
  p?: boolean;
267
270
  max?: number | string;
268
271
  wrap?: string;
272
+ lineClamp?: number;
269
273
  onClick?: (e: MouseEvent) => void;
270
274
  style?: CSSProperties;
271
275
  className?: string;
@@ -597,6 +601,7 @@ interface TableProps extends HTMLAttributes<HTMLDivElement> {
597
601
  className?: string;
598
602
  fullWidth?: boolean;
599
603
  borderRadius?: string;
604
+ hasShadow?: boolean;
600
605
  }
601
606
  declare const Table: react.ForwardRefExoticComponent<TableProps & react.RefAttributes<HTMLDivElement>>;
602
607
 
@@ -902,6 +907,79 @@ interface EmptyStateProps {
902
907
  }
903
908
  declare const EmptyState: ({ icon, title, description, actionLabel, onAction, }: EmptyStateProps) => react_jsx_runtime.JSX.Element;
904
909
 
910
+ interface ProgressBarProps {
911
+ /** Filled portion, 0–100. Values outside the range are clamped. */
912
+ value: number;
913
+ /** Fill color (DZ color token). */
914
+ color?: string;
915
+ /** Track (unfilled) color (DZ color token). */
916
+ trackColor?: string;
917
+ /** Bar thickness in px. */
918
+ height?: number;
919
+ /** Show the "xx %" label on the right. */
920
+ showLabel?: boolean;
921
+ }
922
+ /**
923
+ * Horizontal coverage/progress bar. Track + fill, optional right-aligned label.
924
+ */
925
+ declare const ProgressBar: ({ value, color, trackColor, height, showLabel, }: ProgressBarProps) => react_jsx_runtime.JSX.Element;
926
+
927
+ interface TimelineItem {
928
+ /** Stable key for the row. */
929
+ id: string | number;
930
+ /** Main line (event label, mission name…). */
931
+ title: string;
932
+ /** Secondary line (date, author…). */
933
+ subtitle?: string;
934
+ /** Optional free text under the title. */
935
+ description?: string;
936
+ /** Dot color (DZ color token). */
937
+ color?: string;
938
+ /** Emphasize this point (e.g. the coverage point in a simulation). */
939
+ highlighted?: boolean;
940
+ }
941
+ interface TimelineProps {
942
+ items: TimelineItem[];
943
+ /** Color of the connecting line (DZ color token). */
944
+ lineColor?: string;
945
+ /** Text shown when there is no event. */
946
+ emptyLabel?: string;
947
+ }
948
+ /**
949
+ * Vertical timeline. Used for event logs (feedback history) and chronological
950
+ * lists (recovery simulation). Each point has a colored dot + title/subtitle.
951
+ */
952
+ declare const Timeline: ({ items, lineColor, emptyLabel, }: TimelineProps) => react_jsx_runtime.JSX.Element;
953
+
954
+ interface BorderedRowProps {
955
+ /** Accent color (DZ color token) — used to encode a score/status/level. */
956
+ borderColor?: string;
957
+ /** Accent thickness in px. */
958
+ borderWidth?: number;
959
+ /** Background color (DZ color token). */
960
+ background?: string;
961
+ /** Inner padding. */
962
+ padding?: string;
963
+ /** Corner radius — pass "0" for flush table rows, default rounded card. */
964
+ borderRadius?: string;
965
+ /**
966
+ * Accent style:
967
+ * - 'edge' (default): full-height colored left border (flush rows / score bars).
968
+ * - 'bar': short rounded inset accent bar, centered (white card look).
969
+ */
970
+ accent?: 'edge' | 'bar';
971
+ /** Subtle 1px full border around the card (card look). */
972
+ bordered?: boolean;
973
+ children: ReactNode;
974
+ onClick?: () => void;
975
+ }
976
+ /**
977
+ * Row/card with a colored accent, used to encode a status (recovery score,
978
+ * feedback level…). Flush table rows: accent="edge" + borderRadius="0".
979
+ * White cards: accent="bar" + bordered + background.
980
+ */
981
+ declare const BorderedRow: ({ borderColor, borderWidth, background, padding, borderRadius, accent, bordered, children, onClick, }: BorderedRowProps) => react_jsx_runtime.JSX.Element;
982
+
905
983
  /**
906
984
  * formatDate(date, type?, language?)
907
985
  * - language : fr/en/es/... (locale inferred), default "en"
@@ -948,4 +1026,4 @@ interface OptimizeImageOptions {
948
1026
  }
949
1027
  declare const optimizeImage: (file: File | null | undefined, desiredBaseName: string, opts?: OptimizeImageOptions) => Promise<OptimizeImageResult>;
950
1028
 
951
- export { Accordion, type AccordionItem, Avatar, 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, 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, Tooltip, colors, formatDate, formatDistance, formatDuration, optimizeImage, truncateFileName, truncateText };
1029
+ 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 };
package/dist/index.d.ts CHANGED
@@ -31,6 +31,7 @@ interface BoxProps extends Omit<HTMLAttributes<HTMLDivElement>, 'color'> {
31
31
  alignSelf?: string;
32
32
  justifyContent?: string;
33
33
  borderRadius?: string;
34
+ border?: string;
34
35
  style?: CSSProperties;
35
36
  }
36
37
  declare const Box: ({ children, hasShadow, ...rest }: BoxProps) => react_jsx_runtime.JSX.Element;
@@ -189,9 +190,11 @@ interface DrawerProps {
189
190
  isLoading?: boolean;
190
191
  leftVariant?: string;
191
192
  variant?: string;
193
+ leftOutline?: boolean;
194
+ rightOutline?: boolean;
192
195
  footer?: ReactNode;
193
196
  }
194
- declare const Drawer: ({ showDrawer, closeDrawer, title, width, children, leftButtonLabel, leftButtonAction, leftButtonDisabled, rightButtonLabel, rightButtonAction, rightButtonDisabled, isLoading, leftVariant, variant, footer, }: DrawerProps) => react_jsx_runtime.JSX.Element | null;
197
+ declare const Drawer: ({ showDrawer, closeDrawer, title, width, children, leftButtonLabel, leftButtonAction, leftButtonDisabled, rightButtonLabel, rightButtonAction, rightButtonDisabled, isLoading, leftVariant, variant, leftOutline, rightOutline, footer, }: DrawerProps) => react_jsx_runtime.JSX.Element | null;
195
198
 
196
199
  type SizeKey = 'xxs' | 'xs' | 's' | 'm' | 'l' | 'xl' | 'xxl';
197
200
  interface TagBubbleProps extends HTMLAttributes<HTMLDivElement> {
@@ -266,6 +269,7 @@ interface TextProps extends Omit<HTMLAttributes<HTMLElement>, 'color'> {
266
269
  p?: boolean;
267
270
  max?: number | string;
268
271
  wrap?: string;
272
+ lineClamp?: number;
269
273
  onClick?: (e: MouseEvent) => void;
270
274
  style?: CSSProperties;
271
275
  className?: string;
@@ -597,6 +601,7 @@ interface TableProps extends HTMLAttributes<HTMLDivElement> {
597
601
  className?: string;
598
602
  fullWidth?: boolean;
599
603
  borderRadius?: string;
604
+ hasShadow?: boolean;
600
605
  }
601
606
  declare const Table: react.ForwardRefExoticComponent<TableProps & react.RefAttributes<HTMLDivElement>>;
602
607
 
@@ -902,6 +907,79 @@ interface EmptyStateProps {
902
907
  }
903
908
  declare const EmptyState: ({ icon, title, description, actionLabel, onAction, }: EmptyStateProps) => react_jsx_runtime.JSX.Element;
904
909
 
910
+ interface ProgressBarProps {
911
+ /** Filled portion, 0–100. Values outside the range are clamped. */
912
+ value: number;
913
+ /** Fill color (DZ color token). */
914
+ color?: string;
915
+ /** Track (unfilled) color (DZ color token). */
916
+ trackColor?: string;
917
+ /** Bar thickness in px. */
918
+ height?: number;
919
+ /** Show the "xx %" label on the right. */
920
+ showLabel?: boolean;
921
+ }
922
+ /**
923
+ * Horizontal coverage/progress bar. Track + fill, optional right-aligned label.
924
+ */
925
+ declare const ProgressBar: ({ value, color, trackColor, height, showLabel, }: ProgressBarProps) => react_jsx_runtime.JSX.Element;
926
+
927
+ interface TimelineItem {
928
+ /** Stable key for the row. */
929
+ id: string | number;
930
+ /** Main line (event label, mission name…). */
931
+ title: string;
932
+ /** Secondary line (date, author…). */
933
+ subtitle?: string;
934
+ /** Optional free text under the title. */
935
+ description?: string;
936
+ /** Dot color (DZ color token). */
937
+ color?: string;
938
+ /** Emphasize this point (e.g. the coverage point in a simulation). */
939
+ highlighted?: boolean;
940
+ }
941
+ interface TimelineProps {
942
+ items: TimelineItem[];
943
+ /** Color of the connecting line (DZ color token). */
944
+ lineColor?: string;
945
+ /** Text shown when there is no event. */
946
+ emptyLabel?: string;
947
+ }
948
+ /**
949
+ * Vertical timeline. Used for event logs (feedback history) and chronological
950
+ * lists (recovery simulation). Each point has a colored dot + title/subtitle.
951
+ */
952
+ declare const Timeline: ({ items, lineColor, emptyLabel, }: TimelineProps) => react_jsx_runtime.JSX.Element;
953
+
954
+ interface BorderedRowProps {
955
+ /** Accent color (DZ color token) — used to encode a score/status/level. */
956
+ borderColor?: string;
957
+ /** Accent thickness in px. */
958
+ borderWidth?: number;
959
+ /** Background color (DZ color token). */
960
+ background?: string;
961
+ /** Inner padding. */
962
+ padding?: string;
963
+ /** Corner radius — pass "0" for flush table rows, default rounded card. */
964
+ borderRadius?: string;
965
+ /**
966
+ * Accent style:
967
+ * - 'edge' (default): full-height colored left border (flush rows / score bars).
968
+ * - 'bar': short rounded inset accent bar, centered (white card look).
969
+ */
970
+ accent?: 'edge' | 'bar';
971
+ /** Subtle 1px full border around the card (card look). */
972
+ bordered?: boolean;
973
+ children: ReactNode;
974
+ onClick?: () => void;
975
+ }
976
+ /**
977
+ * Row/card with a colored accent, used to encode a status (recovery score,
978
+ * feedback level…). Flush table rows: accent="edge" + borderRadius="0".
979
+ * White cards: accent="bar" + bordered + background.
980
+ */
981
+ declare const BorderedRow: ({ borderColor, borderWidth, background, padding, borderRadius, accent, bordered, children, onClick, }: BorderedRowProps) => react_jsx_runtime.JSX.Element;
982
+
905
983
  /**
906
984
  * formatDate(date, type?, language?)
907
985
  * - language : fr/en/es/... (locale inferred), default "en"
@@ -948,4 +1026,4 @@ interface OptimizeImageOptions {
948
1026
  }
949
1027
  declare const optimizeImage: (file: File | null | undefined, desiredBaseName: string, opts?: OptimizeImageOptions) => Promise<OptimizeImageResult>;
950
1028
 
951
- export { Accordion, type AccordionItem, Avatar, 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, 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, Tooltip, colors, formatDate, formatDistance, formatDuration, optimizeImage, truncateFileName, truncateText };
1029
+ 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 };
package/dist/index.js CHANGED
@@ -61,6 +61,7 @@ var index_exports = {};
61
61
  __export(index_exports, {
62
62
  Accordion: () => Accordion,
63
63
  Avatar: () => Avatar,
64
+ BorderedRow: () => BorderedRow,
64
65
  Box: () => Box,
65
66
  Bubble: () => Bubble,
66
67
  Bulk: () => Bulk,
@@ -92,6 +93,7 @@ __export(index_exports, {
92
93
  PageContainer: () => PageContainer,
93
94
  Pagination: () => Pagination,
94
95
  Popover: () => Popover,
96
+ ProgressBar: () => ProgressBar,
95
97
  Radio: () => Radio,
96
98
  Row: () => Row,
97
99
  Select: () => Select,
@@ -113,6 +115,7 @@ __export(index_exports, {
113
115
  Tabs: () => Tabs,
114
116
  TagBubble: () => TagBubble,
115
117
  Text: () => Text,
118
+ Timeline: () => Timeline,
116
119
  Tooltip: () => Tooltip,
117
120
  colors: () => colors,
118
121
  formatDate: () => formatDate,
@@ -325,12 +328,16 @@ var shouldForwardProp2 = (prop) => ![
325
328
  "isScrollable",
326
329
  "hasShadow",
327
330
  "borderRadius",
331
+ "border",
328
332
  "height"
329
333
  ].includes(prop);
330
334
  var StyledBox = import_styled_components2.default.div.withConfig({ shouldForwardProp: shouldForwardProp2 })`
331
335
  position: relative;
332
336
  display: flex;
333
- border: 1px solid ${colors.grey_300};
337
+ border: ${(props) => {
338
+ var _a;
339
+ return (_a = props.border) != null ? _a : `1px solid ${colors.grey_300}`;
340
+ }};
334
341
 
335
342
  border-radius: ${(props) => props.borderRadius || "8px"};
336
343
 
@@ -508,6 +515,7 @@ var Text = (props) => {
508
515
  p,
509
516
  max,
510
517
  wrap,
518
+ lineClamp,
511
519
  onClick
512
520
  } = _a, rest = __objRest(_a, [
513
521
  "size",
@@ -525,9 +533,10 @@ var Text = (props) => {
525
533
  "p",
526
534
  "max",
527
535
  "wrap",
536
+ "lineClamp",
528
537
  "onClick"
529
538
  ]);
530
- const textStyle = {
539
+ const textStyle = __spreadValues({
531
540
  fontSize: textSizes[size] || size,
532
541
  fontWeight: weight,
533
542
  color: color || colors[variant],
@@ -539,11 +548,15 @@ var Text = (props) => {
539
548
  fontStyle: fontStyle || "normal",
540
549
  cursor: onClick ? "pointer" : "inherit",
541
550
  maxWidth: max ? max + "ch" : "none",
542
- display: max ? "inline-block" : "",
551
+ display: lineClamp ? "-webkit-box" : max ? "inline-block" : "",
543
552
  overflow: "hidden",
544
553
  textOverflow: max ? "ellipsis" : "",
545
554
  whiteSpace: wrap || ""
546
- };
555
+ }, lineClamp ? {
556
+ WebkitLineClamp: lineClamp,
557
+ WebkitBoxOrient: "vertical",
558
+ wordBreak: "break-word"
559
+ } : {});
547
560
  if (p) {
548
561
  return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("p", __spreadProps(__spreadValues({ style: textStyle, onClick }, rest), { children }));
549
562
  } else {
@@ -1505,6 +1518,8 @@ var Drawer = ({
1505
1518
  isLoading = false,
1506
1519
  leftVariant,
1507
1520
  variant = "blue_700",
1521
+ leftOutline = true,
1522
+ rightOutline = false,
1508
1523
  footer
1509
1524
  }) => {
1510
1525
  const [isRendered, setIsRendered] = (0, import_react6.useState)(showDrawer);
@@ -1552,7 +1567,7 @@ var Drawer = ({
1552
1567
  leftButtonLabel && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
1553
1568
  Button,
1554
1569
  {
1555
- outline: true,
1570
+ outline: leftOutline,
1556
1571
  onClick: leftButtonAction,
1557
1572
  disabled: leftButtonDisabled,
1558
1573
  variant: leftVariant ? leftVariant : variant,
@@ -1563,6 +1578,7 @@ var Drawer = ({
1563
1578
  rightButtonLabel && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
1564
1579
  Button,
1565
1580
  {
1581
+ outline: rightOutline,
1566
1582
  onClick: rightButtonAction,
1567
1583
  isLoading,
1568
1584
  disabled: rightButtonDisabled,
@@ -1989,7 +2005,7 @@ var SearchInput = import_styled_components17.default.input`
1989
2005
  var Option = import_styled_components17.default.div`
1990
2006
  padding: 8px;
1991
2007
  cursor: pointer;
1992
- background-color: ${(props) => props.isActive ? colors.grey_100 : "transparent"};
2008
+ background-color: ${(props) => props.$isActive ? colors.grey_100 : "transparent"};
1993
2009
 
1994
2010
  &:hover {
1995
2011
  background: ${colors.grey_100};
@@ -2146,7 +2162,7 @@ var Select = ({
2146
2162
  /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(DropdownList, { children: filteredOptions.map((option, index) => /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
2147
2163
  Option,
2148
2164
  {
2149
- isActive: index === activeIndex,
2165
+ $isActive: index === activeIndex,
2150
2166
  onMouseEnter: () => setActiveIndex(index),
2151
2167
  onClick: () => handleSelect(option),
2152
2168
  style: { pointerEvents: "auto" },
@@ -3233,7 +3249,8 @@ var shouldForwardPropTable = (prop) => ![
3233
3249
  "height",
3234
3250
  "maxHeight",
3235
3251
  "fullWidth",
3236
- "borderRadius"
3252
+ "borderRadius",
3253
+ "hasShadow"
3237
3254
  ].includes(prop);
3238
3255
  var StyledTable = import_styled_components26.default.div.withConfig({
3239
3256
  shouldForwardProp: shouldForwardPropTable
@@ -3258,6 +3275,7 @@ var StyledContainer3 = import_styled_components26.default.div.withConfig({
3258
3275
  height: ${(props) => props.height || "100%"};
3259
3276
  border-radius: ${(props) => props.borderRadius || "8px"};
3260
3277
  border: 1.4px solid ${colors.grey_200};
3278
+ box-shadow: ${(props) => props.hasShadow ? "0 2px 12px 0 rgba(198, 198, 198, 0.25)" : "none"};
3261
3279
  `;
3262
3280
  var Table = (0, import_react14.forwardRef)((props, ref) => {
3263
3281
  const _a = props, { children } = _a, otherProps = __objRest(_a, ["children"]);
@@ -5213,6 +5231,167 @@ var EmptyState = ({
5213
5231
  );
5214
5232
  };
5215
5233
 
5234
+ // src/Components/ProgressBar/ProgressBar.tsx
5235
+ var import_styled_components45 = __toESM(require("styled-components"));
5236
+ var import_jsx_runtime56 = require("react/jsx-runtime");
5237
+ var clampPercent = (value) => Math.max(0, Math.min(100, value));
5238
+ var Wrapper5 = import_styled_components45.default.div`
5239
+ display: flex;
5240
+ align-items: center;
5241
+ gap: 8px;
5242
+ width: 100%;
5243
+ `;
5244
+ var Track2 = import_styled_components45.default.div`
5245
+ position: relative;
5246
+ flex: 1;
5247
+ height: ${({ $height }) => $height}px;
5248
+ background: ${({ $trackColor }) => $trackColor};
5249
+ border-radius: ${({ $height }) => $height}px;
5250
+ overflow: hidden;
5251
+ `;
5252
+ var Fill = import_styled_components45.default.div`
5253
+ height: 100%;
5254
+ width: ${({ $percent }) => $percent}%;
5255
+ background: ${({ $color }) => $color};
5256
+ border-radius: ${({ $height }) => $height}px;
5257
+ transition: width 0.2s ease;
5258
+ `;
5259
+ var ProgressBar = ({
5260
+ value,
5261
+ color = colors.blue_700,
5262
+ trackColor = colors.grey_200,
5263
+ height = 8,
5264
+ showLabel = false
5265
+ }) => {
5266
+ const percent = clampPercent(value);
5267
+ return /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(Wrapper5, { children: [
5268
+ /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(Track2, { $height: height, $trackColor: trackColor, children: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(Fill, { $height: height, $color: color, $percent: percent }) }),
5269
+ showLabel && /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(Text, { size: "s", weight: "600", children: [
5270
+ Math.round(percent),
5271
+ " %"
5272
+ ] })
5273
+ ] });
5274
+ };
5275
+
5276
+ // src/Components/Timeline/Timeline.tsx
5277
+ var import_styled_components46 = __toESM(require("styled-components"));
5278
+ var import_jsx_runtime57 = require("react/jsx-runtime");
5279
+ var List2 = import_styled_components46.default.div`
5280
+ display: flex;
5281
+ flex-direction: column;
5282
+ `;
5283
+ var Item2 = import_styled_components46.default.div`
5284
+ display: flex;
5285
+ gap: 12px;
5286
+ align-items: stretch;
5287
+ `;
5288
+ var Rail = import_styled_components46.default.div`
5289
+ display: flex;
5290
+ flex-direction: column;
5291
+ align-items: center;
5292
+ width: 16px;
5293
+ `;
5294
+ var Dot2 = import_styled_components46.default.div`
5295
+ width: 10px;
5296
+ height: 10px;
5297
+ border-radius: 50%;
5298
+ margin-top: 4px;
5299
+ flex: 0 0 auto;
5300
+ background: ${({ $color }) => $color};
5301
+ `;
5302
+ var Line = import_styled_components46.default.div`
5303
+ width: 2px;
5304
+ flex: 1;
5305
+ min-height: 16px;
5306
+ background: ${({ $color }) => $color};
5307
+ `;
5308
+ var Content = import_styled_components46.default.div`
5309
+ display: flex;
5310
+ flex-direction: column;
5311
+ gap: 2px;
5312
+ padding-bottom: ${({ $last }) => $last ? "0" : "16px"};
5313
+ `;
5314
+ var Timeline = ({
5315
+ items,
5316
+ lineColor = colors.grey_200,
5317
+ emptyLabel = "Aucun \xE9v\xE9nement"
5318
+ }) => {
5319
+ if (items.length === 0) {
5320
+ return /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(Text, { size: "s", color: colors.grey_600, children: emptyLabel });
5321
+ }
5322
+ return /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(List2, { children: items.map((item, index) => {
5323
+ var _a;
5324
+ const isLast = index === items.length - 1;
5325
+ const dotColor = (_a = item.color) != null ? _a : colors.blue_700;
5326
+ return /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(Item2, { children: [
5327
+ /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(Rail, { children: [
5328
+ /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(Dot2, { $color: dotColor }),
5329
+ !isLast && /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(Line, { $color: lineColor })
5330
+ ] }),
5331
+ /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(Content, { $last: isLast, children: [
5332
+ /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(Text, { size: "s", weight: item.highlighted ? "700" : "600", children: item.title }),
5333
+ item.subtitle && /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(Text, { size: "xs", color: colors.grey_600, children: item.subtitle }),
5334
+ item.description && /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(Text, { size: "xs", fontStyle: "italic", children: item.description })
5335
+ ] })
5336
+ ] }, item.id);
5337
+ }) });
5338
+ };
5339
+
5340
+ // src/Components/BorderedRow/BorderedRow.tsx
5341
+ var import_styled_components47 = __toESM(require("styled-components"));
5342
+ var import_jsx_runtime58 = require("react/jsx-runtime");
5343
+ var Wrapper6 = import_styled_components47.default.div`
5344
+ box-sizing: border-box;
5345
+ position: relative;
5346
+ width: 100%;
5347
+ padding: ${({ $padding }) => $padding};
5348
+ ${({ $accent, $borderWidth }) => $accent === "bar" ? `padding-left: ${$borderWidth + 16}px;` : ""}
5349
+ border-radius: ${({ $borderRadius }) => $borderRadius};
5350
+ background: ${({ $background }) => $background || "transparent"};
5351
+ cursor: ${({ $clickable }) => $clickable ? "pointer" : "default"};
5352
+ ${({ $bordered }) => $bordered ? `border: 1px solid ${colors.grey_300};` : ""}
5353
+ ${({ $accent, $borderWidth, $borderColor }) => $accent === "edge" ? `border-left: ${$borderWidth}px solid ${$borderColor};` : ""}
5354
+
5355
+ ${({ $accent, $borderWidth, $borderColor }) => $accent === "bar" ? `
5356
+ &::before {
5357
+ content: '';
5358
+ position: absolute;
5359
+ left: 10px;
5360
+ top: 50%;
5361
+ transform: translateY(-50%);
5362
+ height: 62%;
5363
+ width: ${$borderWidth}px;
5364
+ border-radius: ${$borderWidth}px;
5365
+ background: ${$borderColor};
5366
+ }
5367
+ ` : ""}
5368
+ `;
5369
+ var BorderedRow = ({
5370
+ borderColor = colors.blue_700,
5371
+ borderWidth = 4,
5372
+ background,
5373
+ padding = "12px",
5374
+ borderRadius = "8px",
5375
+ accent = "edge",
5376
+ bordered = false,
5377
+ children,
5378
+ onClick
5379
+ }) => /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
5380
+ Wrapper6,
5381
+ {
5382
+ $borderColor: borderColor,
5383
+ $borderWidth: borderWidth,
5384
+ $background: background,
5385
+ $padding: padding,
5386
+ $borderRadius: borderRadius,
5387
+ $accent: accent,
5388
+ $bordered: bordered,
5389
+ $clickable: !!onClick,
5390
+ onClick,
5391
+ children
5392
+ }
5393
+ );
5394
+
5216
5395
  // src/data/globalMethods.ts
5217
5396
  var formatDate = (dateString, type = "date", language = "en") => {
5218
5397
  if (!dateString) return "";
@@ -5460,6 +5639,7 @@ var optimizeImage_default = optimizeImage;
5460
5639
  0 && (module.exports = {
5461
5640
  Accordion,
5462
5641
  Avatar,
5642
+ BorderedRow,
5463
5643
  Box,
5464
5644
  Bubble,
5465
5645
  Bulk,
@@ -5491,6 +5671,7 @@ var optimizeImage_default = optimizeImage;
5491
5671
  PageContainer,
5492
5672
  Pagination,
5493
5673
  Popover,
5674
+ ProgressBar,
5494
5675
  Radio,
5495
5676
  Row,
5496
5677
  Select,
@@ -5512,6 +5693,7 @@ var optimizeImage_default = optimizeImage;
5512
5693
  Tabs,
5513
5694
  TagBubble,
5514
5695
  Text,
5696
+ Timeline,
5515
5697
  Tooltip,
5516
5698
  colors,
5517
5699
  formatDate,
package/dist/index.mjs CHANGED
@@ -231,12 +231,16 @@ var shouldForwardProp2 = (prop) => ![
231
231
  "isScrollable",
232
232
  "hasShadow",
233
233
  "borderRadius",
234
+ "border",
234
235
  "height"
235
236
  ].includes(prop);
236
237
  var StyledBox = styled2.div.withConfig({ shouldForwardProp: shouldForwardProp2 })`
237
238
  position: relative;
238
239
  display: flex;
239
- border: 1px solid ${colors.grey_300};
240
+ border: ${(props) => {
241
+ var _a;
242
+ return (_a = props.border) != null ? _a : `1px solid ${colors.grey_300}`;
243
+ }};
240
244
 
241
245
  border-radius: ${(props) => props.borderRadius || "8px"};
242
246
 
@@ -414,6 +418,7 @@ var Text = (props) => {
414
418
  p,
415
419
  max,
416
420
  wrap,
421
+ lineClamp,
417
422
  onClick
418
423
  } = _a, rest = __objRest(_a, [
419
424
  "size",
@@ -431,9 +436,10 @@ var Text = (props) => {
431
436
  "p",
432
437
  "max",
433
438
  "wrap",
439
+ "lineClamp",
434
440
  "onClick"
435
441
  ]);
436
- const textStyle = {
442
+ const textStyle = __spreadValues({
437
443
  fontSize: textSizes[size] || size,
438
444
  fontWeight: weight,
439
445
  color: color || colors[variant],
@@ -445,11 +451,15 @@ var Text = (props) => {
445
451
  fontStyle: fontStyle || "normal",
446
452
  cursor: onClick ? "pointer" : "inherit",
447
453
  maxWidth: max ? max + "ch" : "none",
448
- display: max ? "inline-block" : "",
454
+ display: lineClamp ? "-webkit-box" : max ? "inline-block" : "",
449
455
  overflow: "hidden",
450
456
  textOverflow: max ? "ellipsis" : "",
451
457
  whiteSpace: wrap || ""
452
- };
458
+ }, lineClamp ? {
459
+ WebkitLineClamp: lineClamp,
460
+ WebkitBoxOrient: "vertical",
461
+ wordBreak: "break-word"
462
+ } : {});
453
463
  if (p) {
454
464
  return /* @__PURE__ */ jsx6("p", __spreadProps(__spreadValues({ style: textStyle, onClick }, rest), { children }));
455
465
  } else {
@@ -1411,6 +1421,8 @@ var Drawer = ({
1411
1421
  isLoading = false,
1412
1422
  leftVariant,
1413
1423
  variant = "blue_700",
1424
+ leftOutline = true,
1425
+ rightOutline = false,
1414
1426
  footer
1415
1427
  }) => {
1416
1428
  const [isRendered, setIsRendered] = useState3(showDrawer);
@@ -1458,7 +1470,7 @@ var Drawer = ({
1458
1470
  leftButtonLabel && /* @__PURE__ */ jsx16(
1459
1471
  Button,
1460
1472
  {
1461
- outline: true,
1473
+ outline: leftOutline,
1462
1474
  onClick: leftButtonAction,
1463
1475
  disabled: leftButtonDisabled,
1464
1476
  variant: leftVariant ? leftVariant : variant,
@@ -1469,6 +1481,7 @@ var Drawer = ({
1469
1481
  rightButtonLabel && /* @__PURE__ */ jsx16(
1470
1482
  Button,
1471
1483
  {
1484
+ outline: rightOutline,
1472
1485
  onClick: rightButtonAction,
1473
1486
  isLoading,
1474
1487
  disabled: rightButtonDisabled,
@@ -1895,7 +1908,7 @@ var SearchInput = styled17.input`
1895
1908
  var Option = styled17.div`
1896
1909
  padding: 8px;
1897
1910
  cursor: pointer;
1898
- background-color: ${(props) => props.isActive ? colors.grey_100 : "transparent"};
1911
+ background-color: ${(props) => props.$isActive ? colors.grey_100 : "transparent"};
1899
1912
 
1900
1913
  &:hover {
1901
1914
  background: ${colors.grey_100};
@@ -2052,7 +2065,7 @@ var Select = ({
2052
2065
  /* @__PURE__ */ jsx21(DropdownList, { children: filteredOptions.map((option, index) => /* @__PURE__ */ jsx21(
2053
2066
  Option,
2054
2067
  {
2055
- isActive: index === activeIndex,
2068
+ $isActive: index === activeIndex,
2056
2069
  onMouseEnter: () => setActiveIndex(index),
2057
2070
  onClick: () => handleSelect(option),
2058
2071
  style: { pointerEvents: "auto" },
@@ -3145,7 +3158,8 @@ var shouldForwardPropTable = (prop) => ![
3145
3158
  "height",
3146
3159
  "maxHeight",
3147
3160
  "fullWidth",
3148
- "borderRadius"
3161
+ "borderRadius",
3162
+ "hasShadow"
3149
3163
  ].includes(prop);
3150
3164
  var StyledTable = styled26.div.withConfig({
3151
3165
  shouldForwardProp: shouldForwardPropTable
@@ -3170,6 +3184,7 @@ var StyledContainer3 = styled26.div.withConfig({
3170
3184
  height: ${(props) => props.height || "100%"};
3171
3185
  border-radius: ${(props) => props.borderRadius || "8px"};
3172
3186
  border: 1.4px solid ${colors.grey_200};
3187
+ box-shadow: ${(props) => props.hasShadow ? "0 2px 12px 0 rgba(198, 198, 198, 0.25)" : "none"};
3173
3188
  `;
3174
3189
  var Table = forwardRef5((props, ref) => {
3175
3190
  const _a = props, { children } = _a, otherProps = __objRest(_a, ["children"]);
@@ -5139,6 +5154,167 @@ var EmptyState = ({
5139
5154
  );
5140
5155
  };
5141
5156
 
5157
+ // src/Components/ProgressBar/ProgressBar.tsx
5158
+ import styled45 from "styled-components";
5159
+ import { jsx as jsx56, jsxs as jsxs30 } from "react/jsx-runtime";
5160
+ var clampPercent = (value) => Math.max(0, Math.min(100, value));
5161
+ var Wrapper5 = styled45.div`
5162
+ display: flex;
5163
+ align-items: center;
5164
+ gap: 8px;
5165
+ width: 100%;
5166
+ `;
5167
+ var Track2 = styled45.div`
5168
+ position: relative;
5169
+ flex: 1;
5170
+ height: ${({ $height }) => $height}px;
5171
+ background: ${({ $trackColor }) => $trackColor};
5172
+ border-radius: ${({ $height }) => $height}px;
5173
+ overflow: hidden;
5174
+ `;
5175
+ var Fill = styled45.div`
5176
+ height: 100%;
5177
+ width: ${({ $percent }) => $percent}%;
5178
+ background: ${({ $color }) => $color};
5179
+ border-radius: ${({ $height }) => $height}px;
5180
+ transition: width 0.2s ease;
5181
+ `;
5182
+ var ProgressBar = ({
5183
+ value,
5184
+ color = colors.blue_700,
5185
+ trackColor = colors.grey_200,
5186
+ height = 8,
5187
+ showLabel = false
5188
+ }) => {
5189
+ const percent = clampPercent(value);
5190
+ return /* @__PURE__ */ jsxs30(Wrapper5, { children: [
5191
+ /* @__PURE__ */ jsx56(Track2, { $height: height, $trackColor: trackColor, children: /* @__PURE__ */ jsx56(Fill, { $height: height, $color: color, $percent: percent }) }),
5192
+ showLabel && /* @__PURE__ */ jsxs30(Text, { size: "s", weight: "600", children: [
5193
+ Math.round(percent),
5194
+ " %"
5195
+ ] })
5196
+ ] });
5197
+ };
5198
+
5199
+ // src/Components/Timeline/Timeline.tsx
5200
+ import styled46 from "styled-components";
5201
+ import { jsx as jsx57, jsxs as jsxs31 } from "react/jsx-runtime";
5202
+ var List2 = styled46.div`
5203
+ display: flex;
5204
+ flex-direction: column;
5205
+ `;
5206
+ var Item2 = styled46.div`
5207
+ display: flex;
5208
+ gap: 12px;
5209
+ align-items: stretch;
5210
+ `;
5211
+ var Rail = styled46.div`
5212
+ display: flex;
5213
+ flex-direction: column;
5214
+ align-items: center;
5215
+ width: 16px;
5216
+ `;
5217
+ var Dot2 = styled46.div`
5218
+ width: 10px;
5219
+ height: 10px;
5220
+ border-radius: 50%;
5221
+ margin-top: 4px;
5222
+ flex: 0 0 auto;
5223
+ background: ${({ $color }) => $color};
5224
+ `;
5225
+ var Line = styled46.div`
5226
+ width: 2px;
5227
+ flex: 1;
5228
+ min-height: 16px;
5229
+ background: ${({ $color }) => $color};
5230
+ `;
5231
+ var Content = styled46.div`
5232
+ display: flex;
5233
+ flex-direction: column;
5234
+ gap: 2px;
5235
+ padding-bottom: ${({ $last }) => $last ? "0" : "16px"};
5236
+ `;
5237
+ var Timeline = ({
5238
+ items,
5239
+ lineColor = colors.grey_200,
5240
+ emptyLabel = "Aucun \xE9v\xE9nement"
5241
+ }) => {
5242
+ if (items.length === 0) {
5243
+ return /* @__PURE__ */ jsx57(Text, { size: "s", color: colors.grey_600, children: emptyLabel });
5244
+ }
5245
+ return /* @__PURE__ */ jsx57(List2, { children: items.map((item, index) => {
5246
+ var _a;
5247
+ const isLast = index === items.length - 1;
5248
+ const dotColor = (_a = item.color) != null ? _a : colors.blue_700;
5249
+ return /* @__PURE__ */ jsxs31(Item2, { children: [
5250
+ /* @__PURE__ */ jsxs31(Rail, { children: [
5251
+ /* @__PURE__ */ jsx57(Dot2, { $color: dotColor }),
5252
+ !isLast && /* @__PURE__ */ jsx57(Line, { $color: lineColor })
5253
+ ] }),
5254
+ /* @__PURE__ */ jsxs31(Content, { $last: isLast, children: [
5255
+ /* @__PURE__ */ jsx57(Text, { size: "s", weight: item.highlighted ? "700" : "600", children: item.title }),
5256
+ item.subtitle && /* @__PURE__ */ jsx57(Text, { size: "xs", color: colors.grey_600, children: item.subtitle }),
5257
+ item.description && /* @__PURE__ */ jsx57(Text, { size: "xs", fontStyle: "italic", children: item.description })
5258
+ ] })
5259
+ ] }, item.id);
5260
+ }) });
5261
+ };
5262
+
5263
+ // src/Components/BorderedRow/BorderedRow.tsx
5264
+ import styled47 from "styled-components";
5265
+ import { jsx as jsx58 } from "react/jsx-runtime";
5266
+ var Wrapper6 = styled47.div`
5267
+ box-sizing: border-box;
5268
+ position: relative;
5269
+ width: 100%;
5270
+ padding: ${({ $padding }) => $padding};
5271
+ ${({ $accent, $borderWidth }) => $accent === "bar" ? `padding-left: ${$borderWidth + 16}px;` : ""}
5272
+ border-radius: ${({ $borderRadius }) => $borderRadius};
5273
+ background: ${({ $background }) => $background || "transparent"};
5274
+ cursor: ${({ $clickable }) => $clickable ? "pointer" : "default"};
5275
+ ${({ $bordered }) => $bordered ? `border: 1px solid ${colors.grey_300};` : ""}
5276
+ ${({ $accent, $borderWidth, $borderColor }) => $accent === "edge" ? `border-left: ${$borderWidth}px solid ${$borderColor};` : ""}
5277
+
5278
+ ${({ $accent, $borderWidth, $borderColor }) => $accent === "bar" ? `
5279
+ &::before {
5280
+ content: '';
5281
+ position: absolute;
5282
+ left: 10px;
5283
+ top: 50%;
5284
+ transform: translateY(-50%);
5285
+ height: 62%;
5286
+ width: ${$borderWidth}px;
5287
+ border-radius: ${$borderWidth}px;
5288
+ background: ${$borderColor};
5289
+ }
5290
+ ` : ""}
5291
+ `;
5292
+ var BorderedRow = ({
5293
+ borderColor = colors.blue_700,
5294
+ borderWidth = 4,
5295
+ background,
5296
+ padding = "12px",
5297
+ borderRadius = "8px",
5298
+ accent = "edge",
5299
+ bordered = false,
5300
+ children,
5301
+ onClick
5302
+ }) => /* @__PURE__ */ jsx58(
5303
+ Wrapper6,
5304
+ {
5305
+ $borderColor: borderColor,
5306
+ $borderWidth: borderWidth,
5307
+ $background: background,
5308
+ $padding: padding,
5309
+ $borderRadius: borderRadius,
5310
+ $accent: accent,
5311
+ $bordered: bordered,
5312
+ $clickable: !!onClick,
5313
+ onClick,
5314
+ children
5315
+ }
5316
+ );
5317
+
5142
5318
  // src/data/globalMethods.ts
5143
5319
  var formatDate = (dateString, type = "date", language = "en") => {
5144
5320
  if (!dateString) return "";
@@ -5385,6 +5561,7 @@ var optimizeImage_default = optimizeImage;
5385
5561
  export {
5386
5562
  Accordion,
5387
5563
  Avatar,
5564
+ BorderedRow,
5388
5565
  Box,
5389
5566
  Bubble,
5390
5567
  Bulk,
@@ -5416,6 +5593,7 @@ export {
5416
5593
  PageContainer,
5417
5594
  Pagination,
5418
5595
  Popover,
5596
+ ProgressBar,
5419
5597
  Radio,
5420
5598
  Row,
5421
5599
  Select,
@@ -5437,6 +5615,7 @@ export {
5437
5615
  Tabs,
5438
5616
  TagBubble,
5439
5617
  Text,
5618
+ Timeline,
5440
5619
  Tooltip,
5441
5620
  colors,
5442
5621
  formatDate,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "design-zystem",
3
- "version": "1.0.247",
3
+ "version": "1.0.249",
4
4
  "description": "A React design system of importable components",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
@@ -32,6 +32,7 @@
32
32
  "@storybook/react-vite": "^10.2.17",
33
33
  "@testing-library/jest-dom": "^6.9.1",
34
34
  "@testing-library/react": "^16.3.2",
35
+ "@types/node": "^25.9.3",
35
36
  "@types/react-dom": "^18.3.1",
36
37
  "@typescript-eslint/parser": "^8.56.1",
37
38
  "@vitest/browser-playwright": "^4.0.18",