@utilitywarehouse/hearth-react 0.32.3 → 0.33.0
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/{chunk-WJCO5MYG.js → chunk-BDJRXINR.js} +2 -2
- package/dist/chunk-DMMORU7Y.cjs +4 -0
- package/dist/chunk-DMMORU7Y.cjs.map +1 -0
- package/dist/{chunk-UB5EHJ4P.cjs → chunk-HE73I4VO.cjs} +2 -2
- package/dist/{chunk-UB5EHJ4P.cjs.map → chunk-HE73I4VO.cjs.map} +1 -1
- package/dist/{chunk-5JUZLZBK.js → chunk-IEKB4IRY.js} +2 -2
- package/dist/chunk-IOZE7MTU.cjs +4 -0
- package/dist/chunk-IOZE7MTU.cjs.map +1 -0
- package/dist/{chunk-5UEDHPFN.cjs → chunk-JCNQCBO7.cjs} +2 -2
- package/dist/{chunk-5UEDHPFN.cjs.map → chunk-JCNQCBO7.cjs.map} +1 -1
- package/dist/chunk-NPCUVYMJ.js +4 -0
- package/dist/chunk-NPCUVYMJ.js.map +1 -0
- package/dist/chunk-OEEEN4T4.js +4 -0
- package/dist/chunk-OEEEN4T4.js.map +1 -0
- package/dist/{chunk-Q55UUMCD.cjs → chunk-P4FX42C6.cjs} +2 -2
- package/dist/{chunk-Q55UUMCD.cjs.map → chunk-P4FX42C6.cjs.map} +1 -1
- package/dist/chunk-Q7M52MR2.cjs +4 -0
- package/dist/chunk-Q7M52MR2.cjs.map +1 -0
- package/dist/{chunk-Y36QMGRW.js → chunk-QVE4N4F2.js} +2 -2
- package/dist/chunk-R5I57J2E.js +4 -0
- package/dist/chunk-R5I57J2E.js.map +1 -0
- package/dist/{chunk-CTVFJHPG.cjs → chunk-R6KCU4S7.cjs} +2 -2
- package/dist/{chunk-CTVFJHPG.cjs.map → chunk-R6KCU4S7.cjs.map} +1 -1
- package/dist/{chunk-FL2DCYWI.js → chunk-S7R53S6F.js} +2 -2
- package/dist/{chunk-6SR47BVO.cjs → chunk-VME2FDDL.cjs} +2 -2
- package/dist/{chunk-6SR47BVO.cjs.map → chunk-VME2FDDL.cjs.map} +1 -1
- package/dist/{chunk-QIPIWJCI.js → chunk-VVBUEPWH.js} +2 -2
- package/dist/components/CardAccordion/CardAccordion.cjs +1 -1
- package/dist/components/CardAccordion/CardAccordion.js +1 -1
- package/dist/components/CardAccordion/CardAccordionButton.cjs +1 -1
- package/dist/components/CardAccordion/CardAccordionButton.js +1 -1
- package/dist/components/CardAccordion/CardAccordionItem.cjs +1 -1
- package/dist/components/CardAccordion/CardAccordionItem.js +1 -1
- package/dist/components/Combobox/Combobox.cjs +1 -1
- package/dist/components/Combobox/Combobox.js +1 -1
- package/dist/components/DatePicker/DatePicker.cjs +1 -1
- package/dist/components/DatePicker/DatePicker.js +1 -1
- package/dist/components/Timeline/Timeline.cjs +4 -0
- package/dist/components/Timeline/Timeline.cjs.map +1 -0
- package/dist/components/Timeline/Timeline.d.ts +12 -0
- package/dist/components/Timeline/Timeline.d.ts.map +1 -0
- package/dist/components/Timeline/Timeline.js +4 -0
- package/dist/components/Timeline/Timeline.js.map +1 -0
- package/dist/components/Timeline/Timeline.props.cjs +4 -0
- package/dist/components/Timeline/Timeline.props.cjs.map +1 -0
- package/dist/components/Timeline/Timeline.props.d.ts +47 -0
- package/dist/components/Timeline/Timeline.props.d.ts.map +1 -0
- package/dist/components/Timeline/Timeline.props.js +4 -0
- package/dist/components/Timeline/Timeline.props.js.map +1 -0
- package/dist/components/Timeline/TimelineItem.cjs +4 -0
- package/dist/components/Timeline/TimelineItem.cjs.map +1 -0
- package/dist/components/Timeline/TimelineItem.d.ts +11 -0
- package/dist/components/Timeline/TimelineItem.d.ts.map +1 -0
- package/dist/components/Timeline/TimelineItem.js +4 -0
- package/dist/components/Timeline/TimelineItem.js.map +1 -0
- package/dist/components/Timeline/TimelineItem.props.cjs +3 -0
- package/dist/components/Timeline/TimelineItem.props.cjs.map +1 -0
- package/dist/components/Timeline/TimelineItem.props.d.ts +17 -0
- package/dist/components/Timeline/TimelineItem.props.d.ts.map +1 -0
- package/dist/components/Timeline/TimelineItem.props.js +3 -0
- package/dist/components/Timeline/TimelineItem.props.js.map +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +4 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/package.json +3 -3
- package/public/llms/components/timeline.md +183 -0
- package/public/llms/docs/getting-started.md +1 -1
- package/public/llms.txt +1 -0
- package/styles.css +1 -1
- /package/dist/{chunk-WJCO5MYG.js.map → chunk-BDJRXINR.js.map} +0 -0
- /package/dist/{chunk-5JUZLZBK.js.map → chunk-IEKB4IRY.js.map} +0 -0
- /package/dist/{chunk-Y36QMGRW.js.map → chunk-QVE4N4F2.js.map} +0 -0
- /package/dist/{chunk-FL2DCYWI.js.map → chunk-S7R53S6F.js.map} +0 -0
- /package/dist/{chunk-QIPIWJCI.js.map → chunk-VVBUEPWH.js.map} +0 -0
|
@@ -0,0 +1,183 @@
|
|
|
1
|
+
# Timeline
|
|
2
|
+
|
|
3
|
+
Use Timeline to show a sequence of events or steps, each rendered as a
|
|
4
|
+
`TimelineItem`, in the order they occur. Use the `progress` variant when
|
|
5
|
+
the sequence represents the user's advancement through it; use `static`
|
|
6
|
+
for a purely informational history or schedule. For a multi-step process
|
|
7
|
+
the user actively navigates, use ProgressStepper instead.
|
|
8
|
+
|
|
9
|
+
- [Usage](#usage)
|
|
10
|
+
- [Variants](#variants)
|
|
11
|
+
- [States](#states)
|
|
12
|
+
- [Dangling rail](#dangling-rail)
|
|
13
|
+
- [API](#api)
|
|
14
|
+
|
|
15
|
+
```tsx
|
|
16
|
+
<Flex direction="column" gap="400">
|
|
17
|
+
{variants.map(variant => (
|
|
18
|
+
<Timeline key={variant} variant={variant}>
|
|
19
|
+
<TimelineItem state="complete" label="Direct debit set up" helperText="1 March 2026" />
|
|
20
|
+
<TimelineItem state="active" label="First payment due" helperText="1 April 2026" />
|
|
21
|
+
<TimelineItem state="incomplete" label="Final payment due" helperText="1 June 2026" />
|
|
22
|
+
</Timeline>
|
|
23
|
+
))}
|
|
24
|
+
</Flex>
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
## Usage
|
|
28
|
+
|
|
29
|
+
Wrap one or more `TimelineItem` components in a `Timeline`. Each item needs a
|
|
30
|
+
`label` and a `state`; `helperText` and `children` are optional for
|
|
31
|
+
supporting detail such as a date or amount.
|
|
32
|
+
|
|
33
|
+
```tsx
|
|
34
|
+
<Timeline {...args}>
|
|
35
|
+
<TimelineItem state="complete" label="Direct debit set up" helperText="1 March 2026" />
|
|
36
|
+
<TimelineItem state="complete" label="First payment collected" helperText="1 April 2026" />
|
|
37
|
+
<TimelineItem state="active" label="Second payment due" helperText="1 June 2026" />
|
|
38
|
+
<TimelineItem state="incomplete" label="Final payment due" helperText="1 July 2026" />
|
|
39
|
+
</Timeline>
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
```tsx
|
|
43
|
+
<Timeline>
|
|
44
|
+
<TimelineItem state="complete" label="Direct debit set up" helperText="1 March 2026" />
|
|
45
|
+
<TimelineItem state="complete" label="First payment collected" helperText="1 April 2026" />
|
|
46
|
+
<TimelineItem state="active" label="Second payment due" helperText="1 June 2026" />
|
|
47
|
+
<TimelineItem state="incomplete" label="Final payment due" helperText="1 July 2026" />
|
|
48
|
+
</Timeline>
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
## Variants
|
|
52
|
+
|
|
53
|
+
`variant` controls the size of each item's indicator:
|
|
54
|
+
|
|
55
|
+
- `static` — a small dot, for a purely informational history or schedule.
|
|
56
|
+
- `progress` — a larger circle that can carry a complete icon, for a
|
|
57
|
+
sequence the user is advancing through.
|
|
58
|
+
|
|
59
|
+
```tsx
|
|
60
|
+
<Timeline {...args}>
|
|
61
|
+
<TimelineItem state="complete" label="Order placed" helperText="12 January 2026" />
|
|
62
|
+
<TimelineItem state="complete" label="Order dispatched" helperText="13 January 2026" />
|
|
63
|
+
<TimelineItem state="incomplete" label="Order delivered" helperText="Estimated 15 January 2026" />
|
|
64
|
+
</Timeline>
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
```tsx
|
|
68
|
+
<Timeline {...args}>
|
|
69
|
+
<TimelineItem state="complete" label="Application submitted" helperText="12 January 2026" />
|
|
70
|
+
<TimelineItem state="complete" label="Documents verified" helperText="14 January 2026" />
|
|
71
|
+
<TimelineItem state="incomplete" label="Final approval" />
|
|
72
|
+
</Timeline>
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
A realistic schedule, mixing `helperText` with `children` for extra
|
|
76
|
+
per-item content:
|
|
77
|
+
|
|
78
|
+
```tsx
|
|
79
|
+
<Timeline {...args}>
|
|
80
|
+
<TimelineItem state="complete" label="Plan starts" helperText="Today">
|
|
81
|
+
<BodyText size="md" color="secondary">
|
|
82
|
+
1 Jun 2025
|
|
83
|
+
</BodyText>
|
|
84
|
+
</TimelineItem>
|
|
85
|
+
<TimelineItem
|
|
86
|
+
state="incomplete"
|
|
87
|
+
label="Plan health check"
|
|
88
|
+
helperText="An automatic review 45 days after joining us to make sure your payments line up with how much energy you actually use."
|
|
89
|
+
>
|
|
90
|
+
<BodyText size="md" color="secondary">
|
|
91
|
+
15 July 2025
|
|
92
|
+
</BodyText>
|
|
93
|
+
</TimelineItem>
|
|
94
|
+
<TimelineItem
|
|
95
|
+
state="incomplete"
|
|
96
|
+
label="Annual plan review"
|
|
97
|
+
helperText="We’ll review your full 12-month energy consumption to adjust your regular payments and get you closer to a zero balance."
|
|
98
|
+
>
|
|
99
|
+
<BodyText size="md" color="secondary">
|
|
100
|
+
By May 2026
|
|
101
|
+
</BodyText>
|
|
102
|
+
</TimelineItem>
|
|
103
|
+
<TimelineItem
|
|
104
|
+
state="incomplete"
|
|
105
|
+
label="Next 12-month cycle begins"
|
|
106
|
+
helperText="Your refreshed plan kicks off for the year ahead, with your next automatic review scheduled for May 2027."
|
|
107
|
+
>
|
|
108
|
+
<BodyText size="md" color="secondary">
|
|
109
|
+
1 Jun 2026
|
|
110
|
+
</BodyText>
|
|
111
|
+
</TimelineItem>
|
|
112
|
+
</Timeline>
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
`children` can also render a `Card`, for content that needs its own visual
|
|
116
|
+
grouping — such as an action the user needs to take:
|
|
117
|
+
|
|
118
|
+
```tsx
|
|
119
|
+
<Timeline {...args}>
|
|
120
|
+
<TimelineItem
|
|
121
|
+
state="complete"
|
|
122
|
+
label="Application started"
|
|
123
|
+
helperText="We have saved your draft"
|
|
124
|
+
/>
|
|
125
|
+
<TimelineItem state="active" label="Additional information" helperText="Action needed">
|
|
126
|
+
<Card variant="subtle" direction="column" gap="100">
|
|
127
|
+
<Badge>Required</Badge>
|
|
128
|
+
<BodyText size="sm">Upload proof of address to continue.</BodyText>
|
|
129
|
+
</Card>
|
|
130
|
+
</TimelineItem>
|
|
131
|
+
<TimelineItem state="incomplete" label="Review complete" helperText="Pending" />
|
|
132
|
+
</Timeline>
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
## States
|
|
136
|
+
|
|
137
|
+
Each `TimelineItem` has one of three states:
|
|
138
|
+
|
|
139
|
+
- `complete`
|
|
140
|
+
- `active`
|
|
141
|
+
- `incomplete`
|
|
142
|
+
|
|
143
|
+
State is expressed purely through the indicator and connector styling —
|
|
144
|
+
there is no separate variant prop on `TimelineItem` itself.
|
|
145
|
+
|
|
146
|
+
## Dangling rail
|
|
147
|
+
|
|
148
|
+
Set `danglingRail` to extend the final item's connector line beyond the
|
|
149
|
+
list, fading it to transparent, to suggest the timeline continues beyond
|
|
150
|
+
what's shown. It only applies to the `progress` variant, and only takes
|
|
151
|
+
effect when the final item's `state` is `incomplete` — a `complete` or
|
|
152
|
+
`active` final item never gets a dangling rail, since there's nothing left
|
|
153
|
+
to continue into.
|
|
154
|
+
|
|
155
|
+
```tsx
|
|
156
|
+
<Timeline {...args} danglingRail>
|
|
157
|
+
<TimelineItem state="complete" label="Direct debit set up" helperText="1 March 2026" />
|
|
158
|
+
<TimelineItem state="active" label="First payment due" helperText="1 April 2026" />
|
|
159
|
+
<TimelineItem state="incomplete" label="Ongoing payments" helperText="Monthly" />
|
|
160
|
+
</Timeline>
|
|
161
|
+
```
|
|
162
|
+
|
|
163
|
+
## API
|
|
164
|
+
|
|
165
|
+
This component is based on the `ol` element and supports the following
|
|
166
|
+
common props:
|
|
167
|
+
|
|
168
|
+
- Margin
|
|
169
|
+
|
|
170
|
+
| Prop | Type | Default | Description |
|
|
171
|
+
| -------------- | ------------------------ | -------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
172
|
+
| `variant` | `"progress" \| "static"` | `static` | Controls the size of each `TimelineItem`'s indicator — `static` renders a small dot, `progress` renders a larger circle that can carry a complete icon. |
|
|
173
|
+
| `danglingRail` | `boolean` | `false` | Extends the final `TimelineItem`'s connector line beyond the list, fading it to transparent, to suggest the timeline continues. Only takes effect when `variant` is `progress` and the final item's `state` is `incomplete`. |
|
|
174
|
+
|
|
175
|
+
### TimelineItem API
|
|
176
|
+
|
|
177
|
+
This component is based on the `li` element.
|
|
178
|
+
|
|
179
|
+
| Prop | Type | Default | Description |
|
|
180
|
+
| ------------ | ---------------------------------------- | ------- | ---------------------------------------------------------------------------- |
|
|
181
|
+
| `label` | `string` | — | The label text to display for this item. |
|
|
182
|
+
| `helperText` | `string` | — | Optional supporting text to display below the label. |
|
|
183
|
+
| `state` | `"complete" \| "active" \| "incomplete"` | — | The current state of this item, driving the indicator and connector styling. |
|
package/public/llms.txt
CHANGED
|
@@ -91,6 +91,7 @@
|
|
|
91
91
|
- [Tabs](llms/components/tabs.md): Use Tabs to organize and navigate between content sections within the same
|
|
92
92
|
- [TextArea](llms/components/text-area.md): Use TextArea for a multi-line text input, such as a comment, message, or
|
|
93
93
|
- [TextInput](llms/components/text-input.md): Use TextInput for a single-line text or data entry field. For passwords,
|
|
94
|
+
- [Timeline](llms/components/timeline.md): Use Timeline to show a sequence of events or steps, each rendered as a
|
|
94
95
|
- [Toast](llms/components/toast.md): Use Toast for a brief, non-intrusive message that provides feedback on an
|
|
95
96
|
- [ToggleButton](llms/components/toggle-button.md): Use ToggleButton as a standalone toggle option within a ToggleGroup, when
|
|
96
97
|
- [ToggleButtonCard](llms/components/toggle-button-card.md): ```tsx
|