@getsoren/design-system 4.55.0 → 4.56.1

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.
@@ -0,0 +1,14 @@
1
+ import { BookingTimelineProps } from './types';
2
+ /**
3
+ * Rental timeline: a vertical rail carrying the Delivery / Start / End / Retrieval bookends,
4
+ * with every event of the rental displayed in between on a single line (status flag node,
5
+ * name, photo pile, declarant avatar, date).
6
+ *
7
+ * Purely presentational — dates and labels arrive formatted; the host app adapts its data.
8
+ * The arrival / departure arrows belong to Delivery / Retrieval: when those bookends are
9
+ * absent (delivery on the start day / retrieval on the end day, folded into the start / end
10
+ * anchors) the anchors keep the arrows, otherwise the start shows a play icon and the end
11
+ * a finish flag.
12
+ */
13
+ declare const BookingTimeline: ({ start, end, delivery, retrieval, isLoading, emptyMessage, labels, events, "data-test": dataTest, "data-testid": dataTestId, }: BookingTimelineProps) => import("@emotion/react/jsx-runtime").JSX.Element;
14
+ export default BookingTimeline;
@@ -0,0 +1,14 @@
1
+ interface RailSegmentProps {
2
+ variant: "top" | "mid" | "bottom";
3
+ /** Vertical bounds of the node within the row: the rail leaves a real gap there instead of
4
+ * being masked, so it renders correctly on any background colour. */
5
+ gap: readonly [number, number];
6
+ }
7
+ /** Vertical rail of a node row, interrupted around the node. "top" starts below the node,
8
+ * "bottom" stops above it, "mid" runs through with a gap. */
9
+ export declare const RailSegment: ({ variant, gap }: RailSegmentProps) => import("@emotion/react/jsx-runtime").JSX.Element;
10
+ /** Empty stretch of rail — adds vertical breathing room while the line runs through. */
11
+ export declare const RailSpacer: ({ height }: {
12
+ height: number;
13
+ }) => import("@emotion/react/jsx-runtime").JSX.Element;
14
+ export {};
@@ -0,0 +1,10 @@
1
+ import { ReactNode } from 'react';
2
+ import { BookingTimelineAnchor } from '../types';
3
+ interface TimelineAnchorProps {
4
+ anchor: BookingTimelineAnchor;
5
+ icon: ReactNode;
6
+ railVariant: "top" | "mid" | "bottom";
7
+ }
8
+ /** Début / Fin / Livraison / Reprise bookend on the rail: node + overline + title (+ content). */
9
+ declare const TimelineAnchor: ({ anchor, icon, railVariant }: TimelineAnchorProps) => import("@emotion/react/jsx-runtime").JSX.Element;
10
+ export default TimelineAnchor;
@@ -0,0 +1,8 @@
1
+ import { BookingTimelineEvent, BookingTimelineLabels } from '../types';
2
+ interface TimelineEventProps {
3
+ event: BookingTimelineEvent;
4
+ labels: BookingTimelineLabels;
5
+ }
6
+ /** Event row: status / icon node on the rail + one-line card (name, photos, avatar, date, chevron). */
7
+ declare const TimelineEvent: ({ event, labels }: TimelineEventProps) => import("@emotion/react/jsx-runtime").JSX.Element;
8
+ export default TimelineEvent;
@@ -0,0 +1,6 @@
1
+ export declare const RAIL_X = 20;
2
+ export declare const ANCHOR_COL = 40;
3
+ export declare const NODE_SIZE = 34;
4
+ export declare const CARD_GAP = 12;
5
+ export declare const ANCHOR_NODE_GAP: readonly [11, number];
6
+ export declare const EVENT_NODE_GAP: readonly [3, number];
@@ -0,0 +1,3 @@
1
+ import { default as BookingTimeline } from './BookingTimeline';
2
+ export default BookingTimeline;
3
+ export * from './types';
@@ -0,0 +1,78 @@
1
+ import { ReactNode } from 'react';
2
+ /**
3
+ * Built-in UI strings; each falls back to the design-system locale (en/fr) when not overridden.
4
+ */
5
+ export interface BookingTimelineLabels {
6
+ /** Status tooltip of a closed event. */
7
+ closed: string;
8
+ /** Status tooltip of an open event. */
9
+ open: string;
10
+ }
11
+ /** Début / Fin / Livraison / Reprise milestone on the rail. */
12
+ export interface BookingTimelineAnchor {
13
+ /** Small uppercase grey overline above the title (e.g. "Début"). */
14
+ overline?: string;
15
+ /** Main line — typically the formatted date (e.g. "Lundi 3 juin"). */
16
+ title: string;
17
+ /** Smaller muted text inline after the title (e.g. "(Livraison 8h - 12h)"). */
18
+ titleSuffix?: string;
19
+ /** Colours the title in warning (e.g. overdue end date). */
20
+ warning?: boolean;
21
+ /** Filled teal node (milestone reached) vs hollow grey ring (still to come). */
22
+ reached?: boolean;
23
+ /** Rendered below the title (e.g. the overdue extend / terminate call to action). */
24
+ content?: ReactNode;
25
+ }
26
+ export interface BookingTimelineUser {
27
+ avatar?: string | null;
28
+ /** Avatar fallback when there is no image. */
29
+ initials?: string;
30
+ }
31
+ export interface BookingTimelinePhoto {
32
+ src: string;
33
+ name?: string;
34
+ }
35
+ /** One chronological event row between the bookends. */
36
+ export interface BookingTimelineEvent {
37
+ key: string;
38
+ /** Event name; may embed custom content (e.g. a coloured quantity delta). */
39
+ label: ReactNode;
40
+ /** Plain-text version of the label, shown in the overflow tooltip when the name is truncated. */
41
+ labelText: string;
42
+ /** Neutral icon shown on the rail for events without an open/closed status. */
43
+ icon?: ReactNode;
44
+ /** Renders the flag status node — green when closed, orange when open — with its tooltip. */
45
+ status?: "open" | "closed";
46
+ /** Right-aligned formatted date (e.g. "5 juin"). */
47
+ date?: string;
48
+ /** Declarant avatar, next to the date. */
49
+ user?: BookingTimelineUser;
50
+ /** Tooltip of the avatar + date cluster (e.g. "Léa Girard · 09:15"). */
51
+ tooltip?: string;
52
+ /** Photo thumbnails, stacked as a pile before the avatar. */
53
+ photos?: BookingTimelinePhoto[];
54
+ /** Makes the row clickable and shows the chevron. */
55
+ onClick?: () => void;
56
+ }
57
+ export interface BookingTimelineProps {
58
+ /** Rental start bookend. */
59
+ start?: BookingTimelineAnchor;
60
+ /** Rental end bookend. */
61
+ end?: BookingTimelineAnchor;
62
+ /** Delivery bookend above the start — only when it happens on a different day. */
63
+ delivery?: BookingTimelineAnchor;
64
+ /** Retrieval bookend below the end — only when it happens on a different day. */
65
+ retrieval?: BookingTimelineAnchor;
66
+ /** Chronological events between the bookends. */
67
+ events?: BookingTimelineEvent[];
68
+ /** If true, a skeleton loading state is displayed. */
69
+ isLoading?: boolean;
70
+ /** Message displayed when there is nothing to show. */
71
+ emptyMessage?: string;
72
+ /** Override the built-in labels (e.g. to plug the host app's i18n). */
73
+ labels?: Partial<BookingTimelineLabels>;
74
+ /** Data attributes for testing purposes. */
75
+ "data-test"?: string;
76
+ /** Data attributes for testing purposes. */
77
+ "data-testid"?: string;
78
+ }
@@ -0,0 +1,3 @@
1
+ import { SvgIconProps } from '@mui/material/SvgIcon';
2
+ declare const ArrowBackRoundedIcon: (props: SvgIconProps) => import("@emotion/react/jsx-runtime").JSX.Element;
3
+ export default ArrowBackRoundedIcon;
@@ -0,0 +1,3 @@
1
+ import { SvgIconProps } from '@mui/material/SvgIcon';
2
+ declare const ArrowForwardRoundedIcon: (props: SvgIconProps) => import("@emotion/react/jsx-runtime").JSX.Element;
3
+ export default ArrowForwardRoundedIcon;
@@ -0,0 +1,3 @@
1
+ import { SvgIconProps } from '@mui/material/SvgIcon';
2
+ declare const FlagOutlinedIcon: (props: SvgIconProps) => import("@emotion/react/jsx-runtime").JSX.Element;
3
+ export default FlagOutlinedIcon;
@@ -0,0 +1,3 @@
1
+ import { SvgIconProps } from '@mui/material/SvgIcon';
2
+ declare const PlayArrowRoundedIcon: (props: SvgIconProps) => import("@emotion/react/jsx-runtime").JSX.Element;
3
+ export default PlayArrowRoundedIcon;
@@ -0,0 +1,3 @@
1
+ import { SvgIconProps } from '@mui/material/SvgIcon';
2
+ declare const SportsScoreIcon: (props: SvgIconProps) => import("@emotion/react/jsx-runtime").JSX.Element;
3
+ export default SportsScoreIcon;
@@ -2,11 +2,13 @@ declare const _default: {
2
2
  apply: string;
3
3
  clickToUpload: string;
4
4
  close: string;
5
+ closed: string;
5
6
  day: string;
6
7
  escape: string;
7
8
  files: string;
8
9
  month: string;
9
10
  noResult: string;
11
+ open: string;
10
12
  openFullPage: string;
11
13
  openFullScreen: string;
12
14
  reset: string;
@@ -2,11 +2,13 @@ declare const _default: {
2
2
  apply: string;
3
3
  clickToUpload: string;
4
4
  close: string;
5
+ closed: string;
5
6
  day: string;
6
7
  escape: string;
7
8
  files: string;
8
9
  month: string;
9
10
  noResult: string;
11
+ open: string;
10
12
  openFullPage: string;
11
13
  openFullScreen: string;
12
14
  reset: string;
@@ -7,6 +7,8 @@ export { default as Avatar } from './components/DataDisplay/Avatar';
7
7
  export type { AvatarProps } from './components/DataDisplay/Avatar/Avatar';
8
8
  export * from './components/DataDisplay/AvatarAppBar';
9
9
  export { default as AvatarAppBar } from './components/DataDisplay/AvatarAppBar';
10
+ export * from './components/DataDisplay/BookingTimeline';
11
+ export { default as BookingTimeline } from './components/DataDisplay/BookingTimeline';
10
12
  export * from './components/DataDisplay/Chat/Chat';
11
13
  export { default as Chat } from './components/DataDisplay/Chat/Chat';
12
14
  export { default as ChatConversationDetail } from './components/DataDisplay/Chat/components/ChatConversationDetail';
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@getsoren/design-system",
3
3
  "description": "Design System React library",
4
4
  "sideEffects": false,
5
- "version": "4.55.0",
5
+ "version": "4.56.1",
6
6
  "license": "ISC",
7
7
  "type": "module",
8
8
  "types": "./dist/src/main.d.ts",