@trsys-tech/matrix-library 1.1.3 → 1.1.5

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.
@@ -1,13 +1,20 @@
1
1
  import { default as React } from 'react';
2
2
  export type TimelineStatus = "pending" | "active" | "completed" | "error";
3
- export interface TimelineItem {
3
+ /** Describes one step in the timeline's primary path. */
4
+ export type TimelineItem = {
5
+ /** Stable identifier for the step; branch origins reference this value. */
4
6
  id: string;
7
+ /** Primary content displayed beside the step marker. */
5
8
  label: React.ReactNode;
9
+ /** Optional content displayed above the step marker. */
6
10
  superTitle?: React.ReactNode;
11
+ /** Optional secondary content displayed below the super title. */
7
12
  superSubtitle?: React.ReactNode;
13
+ /** Optional supporting content displayed below the label. */
8
14
  subData?: React.ReactNode;
9
15
  /** Arbitrary content shown on the bottom row. */
10
16
  footer?: React.ReactNode;
17
+ /** Lifecycle state used to determine the marker and connector appearance. */
11
18
  status?: TimelineStatus;
12
19
  /** Override the marker color (any CSS color). */
13
20
  color?: string;
@@ -15,26 +22,60 @@ export interface TimelineItem {
15
22
  connectorColor?: string | false;
16
23
  /** Localized status announcement, independent of the visible label. */
17
24
  statusLabel?: string;
18
- }
19
- export interface TimelineBranch extends TimelineItem {
25
+ };
26
+ /** Describes a secondary path that diverges from a primary timeline step. */
27
+ export type TimelineBranch = TimelineItem & {
20
28
  /** ID of the main step from which this branch diverges. */
21
29
  from: string;
22
30
  /** Branch paths are explicitly controlled, independently of main steps. */
23
31
  active?: boolean;
24
32
  /** Used for the activated branch path and endpoint. */
25
33
  activeColor?: string;
26
- }
27
- export interface TimelineProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "children" | "title"> {
34
+ };
35
+ /** Configuration and content props for the Timeline component. */
36
+ export type TimelineProps = Omit<React.HTMLAttributes<HTMLDivElement>, "children" | "title"> & {
37
+ /** Ordered steps in the timeline's primary path. */
28
38
  items: readonly TimelineItem[];
39
+ /** Optional secondary paths that diverge from the primary path. */
29
40
  branches?: readonly TimelineBranch[];
41
+ /** Optional heading rendered above the timeline. */
30
42
  title?: React.ReactNode;
43
+ /** Shows a structure-preserving skeleton while timeline data is loading. */
44
+ loading?: boolean;
45
+ /** Visual scale of the timeline. */
46
+ size?: "sm" | "md" | "lg";
47
+ /** Color used for active markers and connectors. */
31
48
  activeColor?: string;
49
+ /** Color used for completed markers and connectors. */
32
50
  completedColor?: string;
51
+ /** Color used for error markers and active branches by default. */
33
52
  errorColor?: string;
53
+ /** Color used for pending markers and inactive connectors. */
34
54
  inactiveColor?: string;
35
55
  /** Minimum column width in pixels; narrower containers scroll horizontally. */
36
56
  minItemWidth?: number;
37
- }
38
- declare const Timeline: React.ForwardRefExoticComponent<TimelineProps & React.RefAttributes<HTMLDivElement>>;
57
+ };
58
+ declare const Timeline: React.ForwardRefExoticComponent<Omit<React.HTMLAttributes<HTMLDivElement>, "title" | "children"> & {
59
+ /** Ordered steps in the timeline's primary path. */
60
+ items: readonly TimelineItem[];
61
+ /** Optional secondary paths that diverge from the primary path. */
62
+ branches?: readonly TimelineBranch[];
63
+ /** Optional heading rendered above the timeline. */
64
+ title?: React.ReactNode;
65
+ /** Shows a structure-preserving skeleton while timeline data is loading. */
66
+ loading?: boolean;
67
+ /** Visual scale of the timeline. */
68
+ size?: "sm" | "md" | "lg";
69
+ /** Color used for active markers and connectors. */
70
+ activeColor?: string;
71
+ /** Color used for completed markers and connectors. */
72
+ completedColor?: string;
73
+ /** Color used for error markers and active branches by default. */
74
+ errorColor?: string;
75
+ /** Color used for pending markers and inactive connectors. */
76
+ inactiveColor?: string;
77
+ /** Minimum column width in pixels; narrower containers scroll horizontally. */
78
+ minItemWidth?: number;
79
+ } & React.RefAttributes<HTMLDivElement>>;
39
80
  export { Timeline };
40
81
  //# sourceMappingURL=Timeline.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Timeline.d.ts","sourceRoot":"","sources":["../../../src/components/timeline/Timeline.tsx"],"names":[],"mappings":"AAEA,OAAO,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