solid-tom-ui 1.0.11 → 1.0.15

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.
Files changed (119) hide show
  1. package/README.md +246 -246
  2. package/dist/README.md +246 -246
  3. package/dist/components/avatar/avatar.js.map +1 -1
  4. package/dist/components/badge/badge.js.map +1 -1
  5. package/dist/components/breadcrumb/breadcrumb.js.map +1 -1
  6. package/dist/components/button/button.js.map +1 -1
  7. package/dist/components/carousel/carousel.js.map +1 -1
  8. package/dist/components/chat-bubble/chatBubble.js.map +1 -1
  9. package/dist/components/checkbox/checkbox.js.map +1 -1
  10. package/dist/components/collapse/collapse.js.map +1 -1
  11. package/dist/components/context-menu/context-menu.js.map +1 -1
  12. package/dist/components/context-menu/context-menu.store.js.map +1 -1
  13. package/dist/components/divider/divider.js.map +1 -1
  14. package/dist/components/dropdown/dropdown.js.map +1 -1
  15. package/dist/components/dropdown/dropdown.store.js.map +1 -1
  16. package/dist/components/float-button/float-button.js.map +1 -1
  17. package/dist/components/hover-3d-image/hover-3d-image.js.map +1 -1
  18. package/dist/components/image-preview/image-preview.js.map +1 -1
  19. package/dist/components/input/input.js.map +1 -1
  20. package/dist/components/input/input.utils.js.map +1 -1
  21. package/dist/components/input/variants/input-color.js.map +1 -1
  22. package/dist/components/input/variants/input-date.js.map +1 -1
  23. package/dist/components/input/variants/input-number.d.ts.map +1 -1
  24. package/dist/components/input/variants/input-number.js +1 -1
  25. package/dist/components/input/variants/input-number.js.map +1 -1
  26. package/dist/components/input/variants/input-otp.js.map +1 -1
  27. package/dist/components/input/variants/input-password.js.map +1 -1
  28. package/dist/components/input/variants/input-radio.js.map +1 -1
  29. package/dist/components/input/variants/input-range.js.map +1 -1
  30. package/dist/components/input/variants/input-text.d.ts.map +1 -1
  31. package/dist/components/input/variants/input-text.js +1 -1
  32. package/dist/components/input/variants/input-text.js.map +1 -1
  33. package/dist/components/input/variants/input-textarea.js.map +1 -1
  34. package/dist/components/loading/loading.js.map +1 -1
  35. package/dist/components/mansory/mansory.js.map +1 -1
  36. package/dist/components/menu/menu.js.map +1 -1
  37. package/dist/components/modal/modal.js.map +1 -1
  38. package/dist/components/modal/modalContext.js.map +1 -1
  39. package/dist/components/pagination/pagination.js.map +1 -1
  40. package/dist/components/progress-bar/progress-bar.js.map +1 -1
  41. package/dist/components/qr-code/qr-code.js.map +1 -1
  42. package/dist/components/select/select.js +1 -1
  43. package/dist/components/select/select.js.map +1 -1
  44. package/dist/components/select-zone/select-zone.js.map +1 -1
  45. package/dist/components/skeleton/skeleton.js.map +1 -1
  46. package/dist/components/slider/slider.js.map +1 -1
  47. package/dist/components/splitter/splitter.js.map +1 -1
  48. package/dist/components/steps/steps.js.map +1 -1
  49. package/dist/components/swap/swap.js.map +1 -1
  50. package/dist/components/switch/switch.js.map +1 -1
  51. package/dist/components/tab/tab.js.map +1 -1
  52. package/dist/components/table/table.js.map +1 -1
  53. package/dist/components/timeline/timeline.js.map +1 -1
  54. package/dist/components/toast/icons/ErrorIcon.js.map +1 -1
  55. package/dist/components/toast/icons/IconCircle.js.map +1 -1
  56. package/dist/components/toast/icons/InfoIcon.js.map +1 -1
  57. package/dist/components/toast/icons/LoaderIcon.js.map +1 -1
  58. package/dist/components/toast/icons/SuccessIcon.js.map +1 -1
  59. package/dist/components/toast/icons/WarningIcon.js.map +1 -1
  60. package/dist/components/toast/toast.js.map +1 -1
  61. package/dist/components/toast/toast.store.js.map +1 -1
  62. package/dist/components/tooltip/tooltip.js.map +1 -1
  63. package/dist/components/tour/tour.js.map +1 -1
  64. package/dist/components/upload/upload.js.map +1 -1
  65. package/dist/components/z-index/z-index.context.js.map +1 -1
  66. package/dist/components/z-index/z-index.js.map +1 -1
  67. package/dist/components/z-index/z-index.store.js.map +1 -1
  68. package/dist/components/z-index/z-index.types.js.map +1 -1
  69. package/dist/package.json +1 -1
  70. package/dist/skill/avatar.skill.md.txt +255 -255
  71. package/dist/skill/badge.skill.md.txt +223 -223
  72. package/dist/skill/breadcrumb.skill.md.txt +177 -177
  73. package/dist/skill/button.skill.md.txt +198 -198
  74. package/dist/skill/carousel.skill.md.txt +406 -406
  75. package/dist/skill/chat-bubble.skill.md.txt +342 -342
  76. package/dist/skill/checkbox.skill.md.txt +326 -326
  77. package/dist/skill/code-preview.skill.md.txt +240 -240
  78. package/dist/skill/collapse.skill.md.txt +329 -329
  79. package/dist/skill/context-menu.skill.md.txt +233 -233
  80. package/dist/skill/diff.skill.md.txt +244 -244
  81. package/dist/skill/divider.skill.md.txt +151 -151
  82. package/dist/skill/doc.skill.md.txt +191 -191
  83. package/dist/skill/drawer.skill.md.txt +157 -157
  84. package/dist/skill/dropdown.skill.md.txt +198 -198
  85. package/dist/skill/float-button.skill.md.txt +315 -315
  86. package/dist/skill/hover-3d-image.skill.md.txt +120 -120
  87. package/dist/skill/iframe.skill.md.txt +114 -114
  88. package/dist/skill/image-preview.skill.md.txt +162 -162
  89. package/dist/skill/indicator.skill.md.txt +60 -60
  90. package/dist/skill/input.skill.md.txt +489 -489
  91. package/dist/skill/loading.skill.md.txt +127 -127
  92. package/dist/skill/menu.skill.md.txt +476 -476
  93. package/dist/skill/modal.skill.md.txt +359 -359
  94. package/dist/skill/pagination.skill.md.txt +405 -405
  95. package/dist/skill/progress-bar.skill.md.txt +207 -207
  96. package/dist/skill/qr-code.skill.md.txt +136 -136
  97. package/dist/skill/rating.skill.md.txt +167 -167
  98. package/dist/skill/select-zone.skill.md.txt +93 -93
  99. package/dist/skill/select.skill.md.txt +663 -663
  100. package/dist/skill/skeleton.skill.md.txt +192 -192
  101. package/dist/skill/slider.skill.md.txt +404 -404
  102. package/dist/skill/splitter.skill.md.txt +411 -411
  103. package/dist/skill/steps.skill.md.txt +264 -264
  104. package/dist/skill/swap.skill.md.txt +139 -139
  105. package/dist/skill/switch.skill.md.txt +191 -191
  106. package/dist/skill/tab.skill.md.txt +484 -484
  107. package/dist/skill/table.example.header.md.txt +666 -666
  108. package/dist/skill/table.skill.md.txt +1407 -1407
  109. package/dist/skill/text-rotate.skill.md.txt +186 -186
  110. package/dist/skill/timeline.skill.md.txt +247 -247
  111. package/dist/skill/toast.skill.md.txt +531 -531
  112. package/dist/skill/tooltip.skill.md.txt +222 -222
  113. package/dist/skill/tour.skill.md.txt +156 -156
  114. package/dist/skill/upload.skill.md.txt +358 -358
  115. package/dist/utils/cn.js.map +1 -1
  116. package/dist/utils/element-tracker.js.map +1 -1
  117. package/dist/utils/helper.js.map +1 -1
  118. package/dist/utils/hoc.js.map +1 -1
  119. package/package.json +132 -133
@@ -1,247 +1,247 @@
1
- ## COMPONENT IDENTITY
2
- - **Import**: `import { Timeline } from 'solid-tom-ui';`
3
- - **Export**: `Timeline` (named export), `TimelineItem` (type export)
4
- - **Framework**: SolidJS
5
- - **Purpose**: Display a sequence of events, milestones, or process steps in chronological order — for history/audit trails, NOT a navigation wizard (use `Steps` for that)
6
-
7
- **Good fit:**
8
- - Order tracking (e-commerce shipment status)
9
- - Audit / activity log (newest-first with `reverse`)
10
- - Multi-level approval workflow
11
- - Project roadmap or release history
12
-
13
- ---
14
-
15
- ## Props Reference
16
-
17
- ### `TimelineProps`
18
-
19
- | Prop | Type | Default | Description |
20
- |---------------|-------------------------------------|----------------|-------------|
21
- | `items` | `TimelineItem[]` | `[]` | Array of timeline items |
22
- | `color` | `BaseColorProps` | `'primary'` | Global color for the entire timeline |
23
- | `orientation` | `'vertical' \| 'horizontal'` | `'vertical'` | Layout direction |
24
- | `mode` | `'start' \| 'end' \| 'alternate'` | `'alternate'` | Content position relative to the axis |
25
- | `reverse` | `boolean` | `false` | Reverse the display order (does NOT mutate the data array) |
26
- | `class` | `TimelineClassSlots` | — | Per-slot class overrides |
27
-
28
- All other native `<div>` HTML attributes are forwarded to the root element.
29
-
30
- ### `TimelineItem`
31
-
32
- | Prop | Type | Description |
33
- |-------------|---------------------------------------------------|-------------|
34
- | `title` | `JSXElement` | Short milestone label |
35
- | `content` | `JSXElement` | Detail text or description |
36
- | `timestamp` | `JSXElement` | Date, time, or relative label |
37
- | `icon` | `() => JSX.Element` | **Factory function** returning a custom icon (replaces default icon) |
38
- | `color` | `BaseColorProps` | Per-item color — overrides global `color` |
39
- | `status` | `'pending' \| 'active' \| 'done' \| 'error'` | Item status — drives default color and icon |
40
- | `loading` | `boolean` | Show a spinner instead of the icon |
41
- | `position` | `'start' \| 'end'` | Override content side for this specific item |
42
-
43
- ### Class Slots
44
-
45
- ```ts
46
- class?: {
47
- root?: string; // outermost wrapper div
48
- item?: string; // each timeline row/column
49
- dot?: string; // circular marker
50
- connector?: string; // line connecting dots
51
- label?: string; // column/row that holds content
52
- content?: string; // inner content box
53
- title?: string; // title text
54
- description?: string; // content/detail text
55
- timestamp?: string; // timestamp text
56
- }
57
- ```
58
-
59
- ---
60
-
61
- ## Color Priority
62
-
63
- Color is resolved per-item using this chain (first match wins):
64
-
65
- ```
66
- item.color → STATUS_COLOR[item.status] → global props.color
67
- ```
68
-
69
- Default status → color mapping:
70
-
71
- | Status | Auto color | Default icon |
72
- |-----------|-------------|---------------|
73
- | `done` | `success` | Checkmark |
74
- | `active` | `primary` | Empty dot + ring pulse |
75
- | `error` | `error` | Alert circle |
76
- | `pending` | `neutral` | Clock |
77
-
78
- **Rule:** Only set `item.color` when you need to override the automatic status color.
79
- Redundant color props (e.g. `status="done" color="success"`) are harmless but noisy.
80
-
81
- ---
82
-
83
- ## Mode — Layout Behavior
84
-
85
- | Mode | Vertical | Horizontal |
86
- |---------------|-----------------------------------|---------------------------------|
87
- | `'alternate'` | Content alternates left / right (default) | Content alternates top / bottom |
88
- | `'start'` | All content on the **left** | All content **above** the axis |
89
- | `'end'` | All content on the **right** | All content **below** the axis |
90
-
91
- **Decision guide:**
92
- - Use `mode="alternate"` for rich timelines with long descriptions (balanced layout).
93
- - Use `mode="end"` for compact audit logs or sidebar widgets (all content on one side).
94
- - Use `mode="start"` when you need a right-to-left reading order.
95
-
96
- Individual items can override `mode` via `position="start" | "end"` on the item itself.
97
-
98
- ---
99
-
100
- ## Common Patterns
101
-
102
- ### Basic order tracking
103
-
104
- ```tsx
105
- const items: TimelineItem[] = [
106
- { title: 'Order placed', status: 'done', timestamp: '08:30' },
107
- { title: 'Payment verified', status: 'done', timestamp: '08:32' },
108
- { title: 'Packing', status: 'active', loading: true },
109
- { title: 'Shipped', status: 'pending', timestamp: 'ETA 14:00' },
110
- { title: 'Delivered', status: 'pending' },
111
- ];
112
-
113
- <Timeline items={items} color="primary" />
114
- ```
115
-
116
- ### Audit log — newest first
117
-
118
- ```tsx
119
- <Timeline
120
- items={auditLogs}
121
- color="neutral"
122
- orientation="vertical"
123
- mode="end"
124
- reverse
125
- class={{ root: 'max-w-sm' }}
126
- />
127
- ```
128
-
129
- ### Horizontal process steps
130
-
131
- ```tsx
132
- <Timeline
133
- items={steps}
134
- orientation="horizontal"
135
- mode="alternate"
136
- color="success"
137
- class={{ root: 'w-full' }}
138
- />
139
- ```
140
-
141
- ### Custom icon per item
142
-
143
- ```tsx
144
- import Truck from 'lucide-solid/icons/truck';
145
-
146
- // icon must be a factory function: () => JSX.Element
147
- const items: TimelineItem[] = [
148
- { title: 'Shipped', status: 'done', icon: () => <Truck size={14} /> },
149
- ];
150
- ```
151
-
152
- ### Per-item color
153
-
154
- ```tsx
155
- const items: TimelineItem[] = [
156
- { title: 'Success', status: 'done', color: 'success' },
157
- { title: 'Warning', status: 'error', color: 'warning' },
158
- { title: 'Info', status: 'active', color: 'info' },
159
- ];
160
- <Timeline items={items} orientation="vertical" mode="end" />
161
- ```
162
-
163
- ### Force a specific item position (override `mode`)
164
-
165
- ```tsx
166
- // mode="alternate" but item B is always on the right
167
- const items: TimelineItem[] = [
168
- { title: 'A', status: 'done' },
169
- { title: 'B (forced right)', status: 'done', position: 'end' },
170
- { title: 'C', status: 'active' },
171
- ];
172
- <Timeline items={items} mode="alternate" />
173
- ```
174
-
175
- ### Reactive loading state (SolidJS signal)
176
-
177
- ```tsx
178
- const [isProcessing, setIsProcessing] = createSignal(false);
179
-
180
- const items = (): TimelineItem[] => [
181
- { title: 'Step 1', status: 'done' },
182
- {
183
- title: 'Step 2',
184
- status: isProcessing() ? 'active' : 'done',
185
- loading: isProcessing(),
186
- content: isProcessing() ? 'Processing…' : 'Completed',
187
- },
188
- { title: 'Step 3', status: 'pending' },
189
- ];
190
-
191
- <Timeline items={items()} color="primary" mode="end" />
192
- ```
193
-
194
- ### Style slot overrides
195
-
196
- ```tsx
197
- <Timeline
198
- items={items}
199
- color="accent"
200
- mode="end"
201
- class={{
202
- root: 'bg-base-200 rounded-2xl p-5 max-w-sm',
203
- title: 'text-base font-semibold',
204
- description: 'italic text-sm',
205
- timestamp: 'font-mono text-xs',
206
- }}
207
- />
208
- ```
209
-
210
- ---
211
-
212
- ## Gotchas & Constraints
213
-
214
- ### `icon` must be a factory function
215
- ```tsx
216
- // WRONG — JSX evaluated immediately, not reactive
217
- icon: <Truck size={14} />
218
-
219
- // CORRECT — factory function
220
- icon: () => <Truck size={14} />
221
- ```
222
-
223
- ### `loading` overrides `icon`
224
- When `loading={true}`, the custom icon is hidden and replaced by a spinner.
225
- The icon reappears automatically once `loading` is set back to `false`.
226
-
227
- ### Connector color is global
228
- The connector line uses the global `--tl-color` CSS variable (set by the root `color` prop).
229
- Per-item connector color is not supported out of the box — override via `class.connector`
230
- and a CSS custom property if needed.
231
-
232
- ### `reverse` does not mutate data
233
- `reverse={true}` creates a reversed copy internally. The original `items` array is
234
- never modified. Do not pre-reverse your data array and also pass `reverse` — that
235
- would double-reverse and show original order.
236
-
237
- ### Horizontal layout — item count limit
238
- Each item takes `flex: 1` of the container width. Keep horizontal timelines to **≤ 6 items**
239
- to prevent content from becoming too narrow to read.
240
-
241
- ### `mode="start"` vertical — right column collapses
242
- In `mode="start"`, the right column has `width: 0`. Any content accidentally rendered
243
- there (e.g. via a wrong `position` override) will be clipped and invisible.
244
-
245
- ### `title`, `content`, `timestamp` accept `JSXElement`
246
- All three fields accept any JSX, not just strings. You can embed badges, icons,
247
- or interactive elements — but keep them lightweight since they render once per item.
1
+ ## COMPONENT IDENTITY
2
+ - **Import**: `import { Timeline } from 'solid-tom-ui';`
3
+ - **Export**: `Timeline` (named export), `TimelineItem` (type export)
4
+ - **Framework**: SolidJS
5
+ - **Purpose**: Display a sequence of events, milestones, or process steps in chronological order — for history/audit trails, NOT a navigation wizard (use `Steps` for that)
6
+
7
+ **Good fit:**
8
+ - Order tracking (e-commerce shipment status)
9
+ - Audit / activity log (newest-first with `reverse`)
10
+ - Multi-level approval workflow
11
+ - Project roadmap or release history
12
+
13
+ ---
14
+
15
+ ## Props Reference
16
+
17
+ ### `TimelineProps`
18
+
19
+ | Prop | Type | Default | Description |
20
+ |---------------|-------------------------------------|----------------|-------------|
21
+ | `items` | `TimelineItem[]` | `[]` | Array of timeline items |
22
+ | `color` | `BaseColorProps` | `'primary'` | Global color for the entire timeline |
23
+ | `orientation` | `'vertical' \| 'horizontal'` | `'vertical'` | Layout direction |
24
+ | `mode` | `'start' \| 'end' \| 'alternate'` | `'alternate'` | Content position relative to the axis |
25
+ | `reverse` | `boolean` | `false` | Reverse the display order (does NOT mutate the data array) |
26
+ | `class` | `TimelineClassSlots` | — | Per-slot class overrides |
27
+
28
+ All other native `<div>` HTML attributes are forwarded to the root element.
29
+
30
+ ### `TimelineItem`
31
+
32
+ | Prop | Type | Description |
33
+ |-------------|---------------------------------------------------|-------------|
34
+ | `title` | `JSXElement` | Short milestone label |
35
+ | `content` | `JSXElement` | Detail text or description |
36
+ | `timestamp` | `JSXElement` | Date, time, or relative label |
37
+ | `icon` | `() => JSX.Element` | **Factory function** returning a custom icon (replaces default icon) |
38
+ | `color` | `BaseColorProps` | Per-item color — overrides global `color` |
39
+ | `status` | `'pending' \| 'active' \| 'done' \| 'error'` | Item status — drives default color and icon |
40
+ | `loading` | `boolean` | Show a spinner instead of the icon |
41
+ | `position` | `'start' \| 'end'` | Override content side for this specific item |
42
+
43
+ ### Class Slots
44
+
45
+ ```ts
46
+ class?: {
47
+ root?: string; // outermost wrapper div
48
+ item?: string; // each timeline row/column
49
+ dot?: string; // circular marker
50
+ connector?: string; // line connecting dots
51
+ label?: string; // column/row that holds content
52
+ content?: string; // inner content box
53
+ title?: string; // title text
54
+ description?: string; // content/detail text
55
+ timestamp?: string; // timestamp text
56
+ }
57
+ ```
58
+
59
+ ---
60
+
61
+ ## Color Priority
62
+
63
+ Color is resolved per-item using this chain (first match wins):
64
+
65
+ ```
66
+ item.color → STATUS_COLOR[item.status] → global props.color
67
+ ```
68
+
69
+ Default status → color mapping:
70
+
71
+ | Status | Auto color | Default icon |
72
+ |-----------|-------------|---------------|
73
+ | `done` | `success` | Checkmark |
74
+ | `active` | `primary` | Empty dot + ring pulse |
75
+ | `error` | `error` | Alert circle |
76
+ | `pending` | `neutral` | Clock |
77
+
78
+ **Rule:** Only set `item.color` when you need to override the automatic status color.
79
+ Redundant color props (e.g. `status="done" color="success"`) are harmless but noisy.
80
+
81
+ ---
82
+
83
+ ## Mode — Layout Behavior
84
+
85
+ | Mode | Vertical | Horizontal |
86
+ |---------------|-----------------------------------|---------------------------------|
87
+ | `'alternate'` | Content alternates left / right (default) | Content alternates top / bottom |
88
+ | `'start'` | All content on the **left** | All content **above** the axis |
89
+ | `'end'` | All content on the **right** | All content **below** the axis |
90
+
91
+ **Decision guide:**
92
+ - Use `mode="alternate"` for rich timelines with long descriptions (balanced layout).
93
+ - Use `mode="end"` for compact audit logs or sidebar widgets (all content on one side).
94
+ - Use `mode="start"` when you need a right-to-left reading order.
95
+
96
+ Individual items can override `mode` via `position="start" | "end"` on the item itself.
97
+
98
+ ---
99
+
100
+ ## Common Patterns
101
+
102
+ ### Basic order tracking
103
+
104
+ ```tsx
105
+ const items: TimelineItem[] = [
106
+ { title: 'Order placed', status: 'done', timestamp: '08:30' },
107
+ { title: 'Payment verified', status: 'done', timestamp: '08:32' },
108
+ { title: 'Packing', status: 'active', loading: true },
109
+ { title: 'Shipped', status: 'pending', timestamp: 'ETA 14:00' },
110
+ { title: 'Delivered', status: 'pending' },
111
+ ];
112
+
113
+ <Timeline items={items} color="primary" />
114
+ ```
115
+
116
+ ### Audit log — newest first
117
+
118
+ ```tsx
119
+ <Timeline
120
+ items={auditLogs}
121
+ color="neutral"
122
+ orientation="vertical"
123
+ mode="end"
124
+ reverse
125
+ class={{ root: 'max-w-sm' }}
126
+ />
127
+ ```
128
+
129
+ ### Horizontal process steps
130
+
131
+ ```tsx
132
+ <Timeline
133
+ items={steps}
134
+ orientation="horizontal"
135
+ mode="alternate"
136
+ color="success"
137
+ class={{ root: 'w-full' }}
138
+ />
139
+ ```
140
+
141
+ ### Custom icon per item
142
+
143
+ ```tsx
144
+ import Truck from 'lucide-solid/icons/truck';
145
+
146
+ // icon must be a factory function: () => JSX.Element
147
+ const items: TimelineItem[] = [
148
+ { title: 'Shipped', status: 'done', icon: () => <Truck size={14} /> },
149
+ ];
150
+ ```
151
+
152
+ ### Per-item color
153
+
154
+ ```tsx
155
+ const items: TimelineItem[] = [
156
+ { title: 'Success', status: 'done', color: 'success' },
157
+ { title: 'Warning', status: 'error', color: 'warning' },
158
+ { title: 'Info', status: 'active', color: 'info' },
159
+ ];
160
+ <Timeline items={items} orientation="vertical" mode="end" />
161
+ ```
162
+
163
+ ### Force a specific item position (override `mode`)
164
+
165
+ ```tsx
166
+ // mode="alternate" but item B is always on the right
167
+ const items: TimelineItem[] = [
168
+ { title: 'A', status: 'done' },
169
+ { title: 'B (forced right)', status: 'done', position: 'end' },
170
+ { title: 'C', status: 'active' },
171
+ ];
172
+ <Timeline items={items} mode="alternate" />
173
+ ```
174
+
175
+ ### Reactive loading state (SolidJS signal)
176
+
177
+ ```tsx
178
+ const [isProcessing, setIsProcessing] = createSignal(false);
179
+
180
+ const items = (): TimelineItem[] => [
181
+ { title: 'Step 1', status: 'done' },
182
+ {
183
+ title: 'Step 2',
184
+ status: isProcessing() ? 'active' : 'done',
185
+ loading: isProcessing(),
186
+ content: isProcessing() ? 'Processing…' : 'Completed',
187
+ },
188
+ { title: 'Step 3', status: 'pending' },
189
+ ];
190
+
191
+ <Timeline items={items()} color="primary" mode="end" />
192
+ ```
193
+
194
+ ### Style slot overrides
195
+
196
+ ```tsx
197
+ <Timeline
198
+ items={items}
199
+ color="accent"
200
+ mode="end"
201
+ class={{
202
+ root: 'bg-base-200 rounded-2xl p-5 max-w-sm',
203
+ title: 'text-base font-semibold',
204
+ description: 'italic text-sm',
205
+ timestamp: 'font-mono text-xs',
206
+ }}
207
+ />
208
+ ```
209
+
210
+ ---
211
+
212
+ ## Gotchas & Constraints
213
+
214
+ ### `icon` must be a factory function
215
+ ```tsx
216
+ // WRONG — JSX evaluated immediately, not reactive
217
+ icon: <Truck size={14} />
218
+
219
+ // CORRECT — factory function
220
+ icon: () => <Truck size={14} />
221
+ ```
222
+
223
+ ### `loading` overrides `icon`
224
+ When `loading={true}`, the custom icon is hidden and replaced by a spinner.
225
+ The icon reappears automatically once `loading` is set back to `false`.
226
+
227
+ ### Connector color is global
228
+ The connector line uses the global `--tl-color` CSS variable (set by the root `color` prop).
229
+ Per-item connector color is not supported out of the box — override via `class.connector`
230
+ and a CSS custom property if needed.
231
+
232
+ ### `reverse` does not mutate data
233
+ `reverse={true}` creates a reversed copy internally. The original `items` array is
234
+ never modified. Do not pre-reverse your data array and also pass `reverse` — that
235
+ would double-reverse and show original order.
236
+
237
+ ### Horizontal layout — item count limit
238
+ Each item takes `flex: 1` of the container width. Keep horizontal timelines to **≤ 6 items**
239
+ to prevent content from becoming too narrow to read.
240
+
241
+ ### `mode="start"` vertical — right column collapses
242
+ In `mode="start"`, the right column has `width: 0`. Any content accidentally rendered
243
+ there (e.g. via a wrong `position` override) will be clipped and invisible.
244
+
245
+ ### `title`, `content`, `timestamp` accept `JSXElement`
246
+ All three fields accept any JSX, not just strings. You can embed badges, icons,
247
+ or interactive elements — but keep them lightweight since they render once per item.