torch-glare-mcp 1.1.0 → 1.2.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/index.js CHANGED
File without changes
@@ -0,0 +1,244 @@
1
+ ---
2
+ title: FormStepper
3
+ description: Pill-shaped multi-step indicator for forms and wizards. Three semantic step types (default, success, negative) with resting, hover, selected, and selected-hover states. Full LTR and RTL support.
4
+ component: true
5
+ group: Forms
6
+ keywords: [form-stepper, stepper, wizard, steps, pill, multi-step, form, indicator, RTL]
7
+ ---
8
+
9
+ # FormStepper
10
+
11
+ A pill-shaped multi-step indicator for forms and wizards. Each step renders a circular indicator and a label inside a pill. Selection swaps the pill background to black with a white label; hover deepens the shadow on selected pills and grows the label gap on non-selected ones. The status badge on the indicator switches the visual to `success` (green check) or `negative` (red info).
12
+
13
+ The component is composed of `FormStepper`, `FormStep`, `FormStepIndicator`, and `FormStepLabel`.
14
+
15
+ ## Installation
16
+
17
+ ```bash
18
+ npx torch-glare@latest add FormStepper
19
+ ```
20
+
21
+ ## Imports
22
+
23
+ ```typescript
24
+ import {
25
+ FormStepper,
26
+ FormStep,
27
+ FormStepIndicator,
28
+ FormStepLabel,
29
+ } from '@/components/FormStepper'
30
+ ```
31
+
32
+ ## Basic Usage
33
+
34
+ ```tsx
35
+ import { useState } from 'react'
36
+ import {
37
+ FormStepper,
38
+ FormStep,
39
+ FormStepIndicator,
40
+ FormStepLabel,
41
+ } from '@/components/FormStepper'
42
+
43
+ export function BasicFormStepper() {
44
+ const [activeStep, setActiveStep] = useState(0)
45
+
46
+ return (
47
+ <FormStepper activeStep={activeStep}>
48
+ <FormStep index={0} type="success" onClick={() => setActiveStep(0)}>
49
+ <FormStepIndicator />
50
+ <FormStepLabel>Account</FormStepLabel>
51
+ </FormStep>
52
+ <FormStep index={1} type="default" onClick={() => setActiveStep(1)}>
53
+ <FormStepIndicator />
54
+ <FormStepLabel>Profile</FormStepLabel>
55
+ </FormStep>
56
+ <FormStep index={2} type="negative" onClick={() => setActiveStep(2)}>
57
+ <FormStepIndicator />
58
+ <FormStepLabel>Payment</FormStepLabel>
59
+ </FormStep>
60
+ <FormStep index={3} type="default" onClick={() => setActiveStep(3)}>
61
+ <FormStepIndicator />
62
+ <FormStepLabel>Confirm</FormStepLabel>
63
+ </FormStep>
64
+ </FormStepper>
65
+ )
66
+ }
67
+ ```
68
+
69
+ `FormStepper.activeStep` drives which pill renders selected — each `FormStep` auto-selects when its `index` matches. Pass `selected` on a step to override the match.
70
+
71
+ ## Examples
72
+
73
+ ### Step Types
74
+
75
+ Three semantic types. `success` and `negative` add a small status badge on the indicator (check / info icon) and use filled colors when selected. `default` uses a gray ring at rest, blue ring on hover, and a solid blue fill when selected.
76
+
77
+ ```tsx
78
+ export function StepTypes() {
79
+ return (
80
+ <FormStepper>
81
+ <FormStep index={0} type="default" selected={false}>
82
+ <FormStepIndicator />
83
+ <FormStepLabel>Default</FormStepLabel>
84
+ </FormStep>
85
+ <FormStep index={1} type="success" selected={false}>
86
+ <FormStepIndicator />
87
+ <FormStepLabel>Success</FormStepLabel>
88
+ </FormStep>
89
+ <FormStep index={2} type="negative" selected={false}>
90
+ <FormStepIndicator />
91
+ <FormStepLabel>Negative</FormStepLabel>
92
+ </FormStep>
93
+ </FormStepper>
94
+ )
95
+ }
96
+ ```
97
+
98
+ ### Selected state
99
+
100
+ ```tsx
101
+ export function SelectedSteps() {
102
+ return (
103
+ <FormStepper>
104
+ <FormStep index={0} type="default" selected>
105
+ <FormStepIndicator />
106
+ <FormStepLabel>Default</FormStepLabel>
107
+ </FormStep>
108
+ <FormStep index={1} type="success" selected>
109
+ <FormStepIndicator />
110
+ <FormStepLabel>Success</FormStepLabel>
111
+ </FormStep>
112
+ <FormStep index={2} type="negative" selected>
113
+ <FormStepIndicator />
114
+ <FormStepLabel>Negative</FormStepLabel>
115
+ </FormStep>
116
+ </FormStepper>
117
+ )
118
+ }
119
+ ```
120
+
121
+ ### RTL direction
122
+
123
+ The pill, label spacing, and indicator badge all flip under `dir="rtl"`.
124
+
125
+ ```tsx
126
+ export function RTLFormStepper() {
127
+ return (
128
+ <div dir="rtl">
129
+ <FormStepper>
130
+ <FormStep index={0} type="default" selected>
131
+ <FormStepIndicator />
132
+ <FormStepLabel>افتراضي</FormStepLabel>
133
+ </FormStep>
134
+ <FormStep index={1} type="success">
135
+ <FormStepIndicator />
136
+ <FormStepLabel>نجاح</FormStepLabel>
137
+ </FormStep>
138
+ <FormStep index={2} type="negative">
139
+ <FormStepIndicator />
140
+ <FormStepLabel>خطأ</FormStepLabel>
141
+ </FormStep>
142
+ </FormStepper>
143
+ </div>
144
+ )
145
+ }
146
+ ```
147
+
148
+ ### Custom badge icon
149
+
150
+ `FormStepIndicator.badgeIcon` overrides the default check / info icon for `success` / `negative` types.
151
+
152
+ ```tsx
153
+ <FormStep index={0} type="success" selected>
154
+ <FormStepIndicator badgeIcon={<i className="ri-shield-check-line" />} />
155
+ <FormStepLabel>Verified</FormStepLabel>
156
+ </FormStep>
157
+ ```
158
+
159
+ ### Custom indicator content
160
+
161
+ Children of `FormStepIndicator` replace the auto-rendered step number.
162
+
163
+ ```tsx
164
+ <FormStep index={0} type="default" selected>
165
+ <FormStepIndicator>
166
+ <i className="ri-user-line" />
167
+ </FormStepIndicator>
168
+ <FormStepLabel>Account</FormStepLabel>
169
+ </FormStep>
170
+ ```
171
+
172
+ ## API Reference
173
+
174
+ ### FormStepper
175
+
176
+ | Prop | Type | Default | Description |
177
+ | ------------ | ------------------------------- | ------- | ----------------------------------------------------------------- |
178
+ | `activeStep` | `number` | `0` | Zero-based index of the currently selected step. |
179
+ | `theme` | `'dark' \| 'light' \| 'default'` | — | Theme override applied via `data-theme`. |
180
+ | `className` | `string` | — | Extra classes merged onto the root `<div>`. |
181
+
182
+ Standard `HTMLAttributes<HTMLDivElement>` are forwarded.
183
+
184
+ ### FormStep
185
+
186
+ | Prop | Type | Default | Description |
187
+ | ----------- | --------------------------------------- | ----------- | -------------------------------------------------------------------------- |
188
+ | `index` | `number` | `0` | Zero-based step index. Matched against `FormStepper.activeStep`. |
189
+ | `type` | `'default' \| 'success' \| 'negative'` | `'default'` | Visual type. `success` and `negative` add a status badge on the indicator. |
190
+ | `selected` | `boolean` | — | Force the selected state, overriding the index/`activeStep` match. |
191
+ | `className` | `string` | — | Extra classes merged onto the pill root. |
192
+
193
+ Standard `HTMLAttributes<HTMLDivElement>` (minus `type`) are forwarded — typical use is `onClick` for navigation.
194
+
195
+ ### FormStepIndicator
196
+
197
+ | Prop | Type | Default | Description |
198
+ | ----------- | ----------- | ------- | ----------------------------------------------------------------------------- |
199
+ | `badgeIcon` | `ReactNode` | — | Override the default badge icon (check for `success`, info for `negative`). |
200
+ | `children` | `ReactNode` | — | Replaces the auto-rendered step number. |
201
+ | `className` | `string` | — | Extra classes merged onto the indicator `<div>`. |
202
+
203
+ ### FormStepLabel
204
+
205
+ Forwards `HTMLAttributes<HTMLDivElement>`. Color and label spacing follow the parent `FormStep` selection state.
206
+
207
+ ## Styling
208
+
209
+ - Pill height: `28px`, fully rounded, `2px` inner padding.
210
+ - Indicator: `24×24px` circle, `border-[3px]` for `default`, solid fill for `success`/`negative`.
211
+ - Status badge: `15×15px` circle pinned to the top-right of the indicator (top-left under RTL), with `border` matching the page background.
212
+ - Selection: `bg-[#000000]` pill with `text-[#FFFFFF]` label and a `0 0 32px 2px rgba(0,0,0,0.05)` shadow that deepens on hover.
213
+ - Non-selected hover: `bg-[#FFFFFF]` pill, label gap grows from `6px` to `9px`, ring color flips to `#004699`.
214
+
215
+ ## TypeScript Types
216
+
217
+ ```typescript
218
+ type FormStepperType = 'default' | 'success' | 'negative'
219
+
220
+ interface FormStepperProps extends React.HTMLAttributes<HTMLDivElement> {
221
+ activeStep?: number
222
+ theme?: 'dark' | 'light' | 'default'
223
+ }
224
+
225
+ interface FormStepProps
226
+ extends Omit<React.HTMLAttributes<HTMLDivElement>, 'type'> {
227
+ index?: number
228
+ type?: FormStepperType
229
+ selected?: boolean
230
+ }
231
+ ```
232
+
233
+ ## Accessibility
234
+
235
+ - Each `FormStep` is a focusable interactive surface — attach `onClick` and (if needed) `role="button"` plus `tabIndex={0}` for keyboard navigation.
236
+ - The status badge is `aria-hidden`; the meaning should be carried by the label text (e.g. `"Payment — error"`).
237
+ - Color is never the sole signal for `success`/`negative` — pair with text or an off-screen description.
238
+
239
+ ## Best Practices
240
+
241
+ 1. Drive selection with `activeStep` from the parent form state — avoid setting `selected` per step manually.
242
+ 2. Use `success` only for *completed and validated* steps, `negative` only for *failed* steps. Default = pending or current.
243
+ 3. Keep labels short — the pill grows by `~3px` on hover, and long labels make that animation jittery.
244
+ 4. Wire `onClick` for non-linear navigation (jump-to-step). For strict wizards, omit `onClick` on future steps.
@@ -0,0 +1,215 @@
1
+ ---
2
+ title: Stepper
3
+ description: Generic horizontal/vertical stepper with pending, active, completed, and error states. Composed of Stepper, Step, StepIndicator, StepConnector, StepLabel, and StepDescription.
4
+ component: true
5
+ group: Forms
6
+ keywords: [stepper, steps, wizard, progress, multi-step, vertical, horizontal]
7
+ ---
8
+
9
+ # Stepper
10
+
11
+ A generic step-progress component for wizards, onboarding flows, and multi-section forms. Each step has four states — `pending`, `active`, `completed`, `error` — derived automatically from `activeStep` or set explicitly per `Step`.
12
+
13
+ The component is composed of `Stepper`, `Step`, `StepIndicator`, `StepConnector`, `StepLabel`, and `StepDescription`. Compare to [`FormStepper`](./form-stepper.md), which is a pill-shaped variant with no connector line.
14
+
15
+ ## Installation
16
+
17
+ ```bash
18
+ npx torch-glare@latest add Stepper
19
+ ```
20
+
21
+ ## Imports
22
+
23
+ ```typescript
24
+ import {
25
+ Stepper,
26
+ Step,
27
+ StepIndicator,
28
+ StepConnector,
29
+ StepLabel,
30
+ StepDescription,
31
+ } from '@/components/Stepper'
32
+ ```
33
+
34
+ ## Basic Usage
35
+
36
+ ```tsx
37
+ import { useState } from 'react'
38
+ import {
39
+ Stepper,
40
+ Step,
41
+ StepIndicator,
42
+ StepConnector,
43
+ StepLabel,
44
+ } from '@/components/Stepper'
45
+
46
+ export function BasicStepper() {
47
+ const [activeStep, setActiveStep] = useState(1)
48
+
49
+ return (
50
+ <Stepper activeStep={activeStep}>
51
+ <Step index={0}>
52
+ <StepIndicator />
53
+ <StepLabel>Account</StepLabel>
54
+ </Step>
55
+ <StepConnector />
56
+ <Step index={1}>
57
+ <StepIndicator />
58
+ <StepLabel>Profile</StepLabel>
59
+ </Step>
60
+ <StepConnector />
61
+ <Step index={2}>
62
+ <StepIndicator />
63
+ <StepLabel>Confirm</StepLabel>
64
+ </Step>
65
+ </Stepper>
66
+ )
67
+ }
68
+ ```
69
+
70
+ State derivation: `index < activeStep` → `completed`, `index === activeStep` → `active`, otherwise `pending`. Pass `isCompleted`, `isActive`, or `isError` on a `Step` to override.
71
+
72
+ ## Examples
73
+
74
+ ### Vertical orientation with descriptions
75
+
76
+ ```tsx
77
+ <Stepper orientation="vertical" activeStep={1}>
78
+ <Step index={0}>
79
+ <StepIndicator />
80
+ <div>
81
+ <StepLabel>Create account</StepLabel>
82
+ <StepDescription>Email and password.</StepDescription>
83
+ </div>
84
+ </Step>
85
+ <StepConnector />
86
+ <Step index={1}>
87
+ <StepIndicator />
88
+ <div>
89
+ <StepLabel>Verify email</StepLabel>
90
+ <StepDescription>Check your inbox for a code.</StepDescription>
91
+ </div>
92
+ </Step>
93
+ <StepConnector />
94
+ <Step index={2}>
95
+ <StepIndicator />
96
+ <div>
97
+ <StepLabel>Done</StepLabel>
98
+ <StepDescription>You're all set.</StepDescription>
99
+ </div>
100
+ </Step>
101
+ </Stepper>
102
+ ```
103
+
104
+ ### Error state
105
+
106
+ ```tsx
107
+ <Stepper activeStep={2}>
108
+ <Step index={0}>
109
+ <StepIndicator />
110
+ <StepLabel>Account</StepLabel>
111
+ </Step>
112
+ <StepConnector />
113
+ <Step index={1} isError>
114
+ <StepIndicator />
115
+ <StepLabel>Payment</StepLabel>
116
+ </Step>
117
+ <StepConnector />
118
+ <Step index={2}>
119
+ <StepIndicator />
120
+ <StepLabel>Confirm</StepLabel>
121
+ </Step>
122
+ </Stepper>
123
+ ```
124
+
125
+ `StepIndicator` auto-renders a check icon for `completed`, a close icon for `error`, and the step number otherwise. Override via `icon`, `completedIcon`, or `errorIcon`.
126
+
127
+ ### Custom indicators
128
+
129
+ ```tsx
130
+ <Step index={0} isCompleted>
131
+ <StepIndicator
132
+ completedIcon={<i className="ri-shield-check-line" />}
133
+ errorIcon={<i className="ri-shield-cross-line" />}
134
+ />
135
+ <StepLabel>Verified</StepLabel>
136
+ </Step>
137
+ ```
138
+
139
+ ### Sizes
140
+
141
+ ```tsx
142
+ <Stepper size="S" activeStep={1}> {/* 22px indicators */} </Stepper>
143
+ <Stepper size="M" activeStep={1}> {/* 28px — default */} </Stepper>
144
+ <Stepper size="L" activeStep={1}> {/* 34px */} </Stepper>
145
+ ```
146
+
147
+ ## API Reference
148
+
149
+ ### Stepper
150
+
151
+ | Prop | Type | Default | Description |
152
+ | ------------- | --------------------------------- | -------------- | ---------------------------------------------------- |
153
+ | `activeStep` | `number` | `0` | Zero-based index of the active step. |
154
+ | `orientation` | `'horizontal' \| 'vertical'` | `'horizontal'` | Layout direction. |
155
+ | `size` | `'S' \| 'M' \| 'L'` | `'M'` | Indicator size for all children. |
156
+ | `theme` | `'dark' \| 'light' \| 'default'` | — | Theme override applied via `data-theme`. |
157
+
158
+ ### Step
159
+
160
+ | Prop | Type | Default | Description |
161
+ | ------------- | --------- | ------- | ------------------------------------------------------------ |
162
+ | `index` | `number` | `0` | Zero-based step index. Compared with `Stepper.activeStep`. |
163
+ | `isActive` | `boolean` | — | Force the active state. |
164
+ | `isCompleted` | `boolean` | — | Force the completed state. |
165
+ | `isError` | `boolean` | — | Force the error state. Overrides active and completed. |
166
+
167
+ ### StepIndicator
168
+
169
+ | Prop | Type | Default | Description |
170
+ | --------------- | ----------- | ------- | ------------------------------------------------- |
171
+ | `icon` | `ReactNode` | — | Replaces the step number for the pending state. |
172
+ | `completedIcon` | `ReactNode` | — | Replaces the default check icon when completed. |
173
+ | `errorIcon` | `ReactNode` | — | Replaces the default close icon on error. |
174
+
175
+ ### StepConnector
176
+
177
+ The line between steps. No props beyond standard HTML attributes — orientation comes from the parent `Stepper`.
178
+
179
+ ### StepLabel / StepDescription
180
+
181
+ Forward `HTMLAttributes<HTMLDivElement>`. Their colors follow the parent `Step` state automatically.
182
+
183
+ ## Styling
184
+
185
+ - Default state: `bg-background-presentation-action-disabled`, gray border, disabled foreground.
186
+ - Active: blue informational background + focus ring.
187
+ - Completed: green success background and ring; check icon.
188
+ - Error: red negative background and ring; close icon.
189
+ - Connectors: `2px` line, gray when pending, focus-blue when the preceding step is completed.
190
+
191
+ ## TypeScript Types
192
+
193
+ ```typescript
194
+ import type { VariantProps } from 'class-variance-authority'
195
+ import type { stepperStyles, stepIndicatorStyles } from '@/components/Stepper'
196
+
197
+ type StepperVariants = VariantProps<typeof stepperStyles>
198
+ // { orientation?: 'horizontal' | 'vertical' }
199
+
200
+ type IndicatorVariants = VariantProps<typeof stepIndicatorStyles>
201
+ // { state?: 'pending' | 'active' | 'completed' | 'error'; size?: 'S' | 'M' | 'L' }
202
+ ```
203
+
204
+ ## Accessibility
205
+
206
+ - Wrap the stepper in a `<nav aria-label="Progress">` when it represents real navigation.
207
+ - Use `aria-current="step"` on the active step's container when steps are interactive.
208
+ - Don't rely on color alone for error — pair with `StepDescription` or an off-screen message.
209
+
210
+ ## Best Practices
211
+
212
+ 1. Use `Stepper` when you need a connector line + numbered/iconified steps. Use `FormStepper` when you want pill-shaped buttons without a line.
213
+ 2. Keep `Step` count to 3–5 horizontal, 3–7 vertical. Beyond that, switch to a checklist or summary.
214
+ 3. Drive state from `activeStep` in the parent — only fall back to `isActive`/`isCompleted` for non-linear flows.
215
+ 4. Provide a `StepDescription` only on vertical steppers — descriptions wrap horizontal layouts awkwardly.
@@ -0,0 +1,248 @@
1
+ ---
2
+ title: Timeline
3
+ description: Vertical or horizontal timeline for activity logs, audit trails, and history. Composed of indicator, separator, content, heading, and description parts with five semantic variants.
4
+ component: true
5
+ group: Data Display
6
+ keywords: [timeline, activity, history, audit, log, events, vertical, horizontal]
7
+ ---
8
+
9
+ # Timeline
10
+
11
+ A composable timeline for activity logs, change history, audit trails, and event sequences. Each item has an indicator, a connecting separator, and a content block. The indicator supports five variants — `default`, `active`, `completed`, `error`, `warning` — each with built-in icons and color tokens.
12
+
13
+ The component is composed of `Timeline`, `TimelineItem`, `TimelineIndicator`, `TimelineSeparator`, `TimelineConnector`, `TimelineContent`, `TimelineHeading`, and `TimelineDescription`. Unlike [`Stepper`](./stepper.md), Timeline doesn't track an `activeStep` — each item's variant is set explicitly.
14
+
15
+ ## Installation
16
+
17
+ ```bash
18
+ npx torch-glare@latest add Timeline
19
+ ```
20
+
21
+ ## Imports
22
+
23
+ ```typescript
24
+ import {
25
+ Timeline,
26
+ TimelineItem,
27
+ TimelineIndicator,
28
+ TimelineSeparator,
29
+ TimelineConnector,
30
+ TimelineContent,
31
+ TimelineHeading,
32
+ TimelineDescription,
33
+ } from '@/components/Timeline'
34
+ ```
35
+
36
+ ## Basic Usage
37
+
38
+ ```tsx
39
+ import {
40
+ Timeline,
41
+ TimelineItem,
42
+ TimelineIndicator,
43
+ TimelineSeparator,
44
+ TimelineConnector,
45
+ TimelineContent,
46
+ TimelineHeading,
47
+ TimelineDescription,
48
+ } from '@/components/Timeline'
49
+
50
+ export function BasicTimeline() {
51
+ return (
52
+ <Timeline>
53
+ <TimelineItem>
54
+ <TimelineConnector>
55
+ <TimelineIndicator variant="completed" />
56
+ <TimelineSeparator />
57
+ </TimelineConnector>
58
+ <TimelineContent>
59
+ <TimelineHeading>Account created</TimelineHeading>
60
+ <TimelineDescription>March 5, 2026 · 9:14 AM</TimelineDescription>
61
+ </TimelineContent>
62
+ </TimelineItem>
63
+
64
+ <TimelineItem>
65
+ <TimelineConnector>
66
+ <TimelineIndicator variant="active" />
67
+ <TimelineSeparator active />
68
+ </TimelineConnector>
69
+ <TimelineContent>
70
+ <TimelineHeading>Email verified</TimelineHeading>
71
+ <TimelineDescription>March 5, 2026 · 9:32 AM</TimelineDescription>
72
+ </TimelineContent>
73
+ </TimelineItem>
74
+
75
+ <TimelineItem>
76
+ <TimelineConnector>
77
+ <TimelineIndicator variant="default" />
78
+ </TimelineConnector>
79
+ <TimelineContent>
80
+ <TimelineHeading>Profile setup</TimelineHeading>
81
+ <TimelineDescription>Pending</TimelineDescription>
82
+ </TimelineContent>
83
+ </TimelineItem>
84
+ </Timeline>
85
+ )
86
+ }
87
+ ```
88
+
89
+ The last `TimelineItem` should typically omit `TimelineSeparator` so the line ends at the final indicator. `TimelineContent` auto-removes its bottom padding on the last item via `group-last/item:pb-0`.
90
+
91
+ ## Examples
92
+
93
+ ### Indicator variants
94
+
95
+ `completed` renders a check icon, `error` renders a close icon, `warning` renders an alert icon. `default` and `active` render a `6×6` filled dot. Pass `icon` or `children` to override.
96
+
97
+ ```tsx
98
+ <TimelineIndicator variant="default" />
99
+ <TimelineIndicator variant="active" />
100
+ <TimelineIndicator variant="completed" />
101
+ <TimelineIndicator variant="error" />
102
+ <TimelineIndicator variant="warning" />
103
+ <TimelineIndicator variant="active" icon={<i className="ri-flashlight-line" />} />
104
+ ```
105
+
106
+ ### Sizes
107
+
108
+ Indicators support `S` (`22px`), `M` (`28px`, default), and `L` (`34px`).
109
+
110
+ ```tsx
111
+ <TimelineIndicator size="S" variant="completed" />
112
+ <TimelineIndicator size="M" variant="completed" />
113
+ <TimelineIndicator size="L" variant="completed" />
114
+ ```
115
+
116
+ ### Horizontal orientation
117
+
118
+ ```tsx
119
+ <Timeline orientation="horizontal">
120
+ <TimelineItem>
121
+ <TimelineConnector orientation="horizontal">
122
+ <TimelineIndicator variant="completed" />
123
+ <TimelineSeparator orientation="horizontal" active />
124
+ </TimelineConnector>
125
+ <TimelineContent>
126
+ <TimelineHeading>Submitted</TimelineHeading>
127
+ <TimelineDescription>2:14 PM</TimelineDescription>
128
+ </TimelineContent>
129
+ </TimelineItem>
130
+
131
+ <TimelineItem>
132
+ <TimelineConnector orientation="horizontal">
133
+ <TimelineIndicator variant="active" />
134
+ </TimelineConnector>
135
+ <TimelineContent>
136
+ <TimelineHeading>Reviewing</TimelineHeading>
137
+ <TimelineDescription>Now</TimelineDescription>
138
+ </TimelineContent>
139
+ </TimelineItem>
140
+ </Timeline>
141
+ ```
142
+
143
+ Pass `orientation="horizontal"` on `Timeline`, `TimelineItem`, `TimelineConnector`, and `TimelineSeparator` — the orientation isn't propagated through context.
144
+
145
+ ### Activity log
146
+
147
+ ```tsx
148
+ const events = [
149
+ { id: 1, variant: 'completed', heading: 'Order placed', when: 'Mar 5 · 9:14 AM' },
150
+ { id: 2, variant: 'completed', heading: 'Payment received', when: 'Mar 5 · 9:15 AM' },
151
+ { id: 3, variant: 'active', heading: 'Preparing order', when: 'Mar 5 · 10:02 AM' },
152
+ { id: 4, variant: 'default', heading: 'Shipped', when: 'Pending' },
153
+ { id: 5, variant: 'default', heading: 'Delivered', when: 'Pending' },
154
+ ] as const
155
+
156
+ export function OrderTimeline() {
157
+ return (
158
+ <Timeline>
159
+ {events.map((e, i) => (
160
+ <TimelineItem key={e.id}>
161
+ <TimelineConnector>
162
+ <TimelineIndicator variant={e.variant} />
163
+ {i < events.length - 1 && (
164
+ <TimelineSeparator active={e.variant === 'completed' || e.variant === 'active'} />
165
+ )}
166
+ </TimelineConnector>
167
+ <TimelineContent>
168
+ <TimelineHeading>{e.heading}</TimelineHeading>
169
+ <TimelineDescription>{e.when}</TimelineDescription>
170
+ </TimelineContent>
171
+ </TimelineItem>
172
+ ))}
173
+ </Timeline>
174
+ )
175
+ }
176
+ ```
177
+
178
+ ## API Reference
179
+
180
+ ### Timeline
181
+
182
+ | Prop | Type | Default | Description |
183
+ | ------------- | ------------------------------- | ------------ | ---------------------------------------- |
184
+ | `orientation` | `'vertical' \| 'horizontal'` | `'vertical'` | Layout direction. |
185
+ | `theme` | `'dark' \| 'light' \| 'default'` | — | Theme override applied via `data-theme`. |
186
+
187
+ ### TimelineItem
188
+
189
+ | Prop | Type | Default | Description |
190
+ | ------------- | ---------------------------- | ------------ | ---------------------------------------------- |
191
+ | `orientation` | `'vertical' \| 'horizontal'` | `'vertical'` | Should match the parent `Timeline`. |
192
+
193
+ ### TimelineIndicator
194
+
195
+ | Prop | Type | Default | Description |
196
+ | --------- | --------------------------------------------------------------- | ----------- | ---------------------------------------------------------------------- |
197
+ | `variant` | `'default' \| 'active' \| 'completed' \| 'error' \| 'warning'` | `'default'` | Visual state. Drives both color tokens and the auto-rendered icon. |
198
+ | `size` | `'S' \| 'M' \| 'L'` | `'M'` | Indicator diameter (`22 / 28 / 34px`). |
199
+ | `icon` | `ReactNode` | — | Custom icon — overrides the variant's default. |
200
+ | `children`| `ReactNode` | — | Custom content — used when `icon` is not set. |
201
+
202
+ ### TimelineSeparator
203
+
204
+ | Prop | Type | Default | Description |
205
+ | ------------- | ---------------------------- | ------------ | ---------------------------------------------------------- |
206
+ | `orientation` | `'vertical' \| 'horizontal'` | `'vertical'` | Line direction. |
207
+ | `active` | `boolean` | `false` | Render the line in focus blue (use after completed steps). |
208
+
209
+ ### TimelineConnector
210
+
211
+ Wraps the indicator and separator. Pass `orientation` to switch between column (vertical) and row (horizontal) layout.
212
+
213
+ ### TimelineContent / TimelineHeading / TimelineDescription
214
+
215
+ Forward `HTMLAttributes<HTMLDivElement>`. `TimelineContent` removes its bottom padding on the last item; `TimelineHeading` uses `typography-body-medium-medium`; `TimelineDescription` uses `typography-body-small-regular` with secondary text color.
216
+
217
+ ## Styling
218
+
219
+ - Indicators use the standard state token set: `state-information-primary`, `state-success-primary`, `state-negative-primary`, `state-warning-primary`.
220
+ - Separator: `1px` neutral line by default, focus-blue when `active`.
221
+ - Vertical content: `pb-6 pt-[2px]` — gives breathing room between items.
222
+ - Horizontal content: aligned under the indicator with `gap-3`.
223
+
224
+ ## TypeScript Types
225
+
226
+ ```typescript
227
+ import type { VariantProps } from 'class-variance-authority'
228
+ import type { timelineStyles, indicatorStyles, separatorStyles } from '@/components/Timeline'
229
+
230
+ type TimelineVariants = VariantProps<typeof timelineStyles>
231
+ type IndicatorVariants = VariantProps<typeof indicatorStyles>
232
+ // { variant?: 'default' | 'active' | 'completed' | 'error' | 'warning'; size?: 'S' | 'M' | 'L' }
233
+ type SeparatorVariants = VariantProps<typeof separatorStyles>
234
+ // { orientation?: 'vertical' | 'horizontal'; active?: boolean }
235
+ ```
236
+
237
+ ## Accessibility
238
+
239
+ - Use `<ol>` semantics when the order matters (audit logs, order tracking) — wrap `Timeline` in `<ol>` and each `TimelineItem` in `<li>`.
240
+ - Variants like `error` and `warning` should be paired with text in `TimelineDescription` — color is never the sole signal.
241
+ - Decorative icons inside indicators don't need labels; the heading carries the meaning.
242
+
243
+ ## Best Practices
244
+
245
+ 1. Reach for Timeline when items are events at points in time. Reach for Stepper when items are tasks the user has to complete.
246
+ 2. Always omit `TimelineSeparator` on the last item so the line doesn't dangle.
247
+ 3. Use `active` on the separator after a `completed` indicator to color the connecting segment blue — it visually links progress.
248
+ 4. Cap visible items at 5–7 in vertical mode; collapse the rest behind a "show earlier" affordance for long histories.
@@ -2,7 +2,7 @@
2
2
  "library": {
3
3
  "name": "torch-glare",
4
4
  "version": "2.1.1",
5
- "description": "A comprehensive React component library with 55+ modern UI components",
5
+ "description": "A comprehensive React component library with 60+ modern UI components",
6
6
  "license": "MIT",
7
7
  "homepage": "https://glare.torchcorp.com",
8
8
  "repository": "https://github.com/torch-corp/torch-glare"
@@ -19,9 +19,9 @@
19
19
  }
20
20
  },
21
21
  "statistics": {
22
- "totalComponents": 55,
23
- "documentedComponents": 2,
24
- "coverage": 3.6,
22
+ "totalComponents": 65,
23
+ "documentedComponents": 62,
24
+ "coverage": 95.4,
25
25
  "totalHooks": 4,
26
26
  "totalProviders": 1,
27
27
  "totalPlugins": 4,
@@ -29,106 +29,113 @@
29
29
  },
30
30
  "components": {
31
31
  "buttons": {
32
- "count": 4,
32
+ "count": 6,
33
33
  "items": [
34
34
  { "name": "Button", "version": "1.1.15", "documented": true },
35
- { "name": "ActionButton", "version": "1.1.15", "documented": false },
36
- { "name": "LinkButton", "version": "1.1.15", "documented": false },
37
- { "name": "LoginButton", "version": "1.1.15", "documented": false }
35
+ { "name": "ActionButton", "version": "1.1.15", "documented": true },
36
+ { "name": "LinkButton", "version": "1.1.15", "documented": true },
37
+ { "name": "LoginButton", "version": "1.1.15", "documented": true },
38
+ { "name": "ButtonGroup", "version": "1.1.15", "documented": true },
39
+ { "name": "ToggleButton", "version": "1.1.15", "documented": true }
38
40
  ]
39
41
  },
40
42
  "forms": {
41
- "count": 16,
43
+ "count": 18,
42
44
  "items": [
43
- { "name": "Input", "version": "1.1.15", "documented": false },
44
- { "name": "InputField", "version": "1.1.15", "documented": false },
45
- { "name": "Textarea", "version": "1.1.15", "documented": false },
46
- { "name": "Checkbox", "version": "1.1.15", "documented": false },
47
- { "name": "LabeledCheckBox", "version": "1.1.15", "documented": false },
48
- { "name": "Radio", "version": "1.1.15", "documented": false },
49
- { "name": "LabeledRadio", "version": "1.1.15", "documented": false },
50
- { "name": "RadioCard", "version": "1.1.15", "documented": false },
51
- { "name": "Select", "version": "1.1.15", "documented": false },
52
- { "name": "SimpleSelect", "version": "1.1.15", "documented": false },
53
- { "name": "Switch", "version": "1.1.15", "documented": false },
54
- { "name": "Toggle", "version": "1.1.15", "documented": false },
55
- { "name": "SearchField", "version": "1.1.15", "documented": false },
56
- { "name": "InputOTP", "version": "1.1.15", "documented": false },
57
- { "name": "Form", "version": "1.1.15", "documented": false },
58
- { "name": "TabFormItem", "version": "1.1.15", "documented": false }
45
+ { "name": "Input", "version": "1.1.15", "documented": true },
46
+ { "name": "InputField", "version": "1.1.15", "documented": true },
47
+ { "name": "Textarea", "version": "1.1.15", "documented": true },
48
+ { "name": "Checkbox", "version": "1.1.15", "documented": true },
49
+ { "name": "LabeledCheckBox", "version": "1.1.15", "documented": true },
50
+ { "name": "Radio", "version": "1.1.15", "documented": true },
51
+ { "name": "LabeledRadio", "version": "1.1.15", "documented": true },
52
+ { "name": "RadioCard", "version": "1.1.15", "documented": true },
53
+ { "name": "Select", "version": "1.1.15", "documented": true },
54
+ { "name": "SimpleSelect", "version": "1.1.15", "documented": true },
55
+ { "name": "Switch", "version": "1.1.15", "documented": true },
56
+ { "name": "Toggle", "version": "1.1.15", "documented": true },
57
+ { "name": "SearchField", "version": "1.1.15", "documented": true },
58
+ { "name": "InputOTP", "version": "1.1.15", "documented": true },
59
+ { "name": "Form", "version": "1.1.15", "documented": true },
60
+ { "name": "TabFormItem", "version": "1.1.15", "documented": true },
61
+ { "name": "FormStepper", "version": "2.1.1", "documented": true },
62
+ { "name": "Stepper", "version": "2.1.1", "documented": true }
59
63
  ]
60
64
  },
61
65
  "layout": {
62
66
  "count": 7,
63
67
  "items": [
64
- { "name": "Card", "version": "1.1.15", "documented": false },
65
- { "name": "CNLayout", "version": "1.1.15", "documented": false },
66
- { "name": "FieldSection", "version": "1.1.15", "documented": false },
68
+ { "name": "Card", "version": "1.1.15", "documented": true },
69
+ { "name": "CNLayout", "version": "1.1.15", "documented": true },
70
+ { "name": "FieldSection", "version": "1.1.15", "documented": true },
67
71
  { "name": "SectionBlock", "version": "1.1.22", "documented": true },
68
- { "name": "TreeSubLayout", "version": "1.1.15", "documented": false },
69
- { "name": "Divider", "version": "1.1.15", "documented": false },
70
- { "name": "ScrollArea", "version": "1.1.15", "documented": false }
72
+ { "name": "TreeSubLayout", "version": "1.1.15", "documented": true },
73
+ { "name": "Divider", "version": "1.1.15", "documented": true },
74
+ { "name": "ScrollArea", "version": "1.1.15", "documented": true }
71
75
  ]
72
76
  },
73
77
  "dataDisplay": {
74
- "count": 8,
78
+ "count": 10,
75
79
  "items": [
76
80
  { "name": "Badge", "version": "1.1.15", "documented": true },
77
- { "name": "BadgeField", "version": "1.1.15", "documented": false },
78
- { "name": "CountBadge", "version": "1.1.15", "documented": false },
79
- { "name": "Avatar", "version": "1.1.15", "documented": false },
80
- { "name": "Table", "version": "1.1.15", "documented": false },
81
- { "name": "DataTable", "version": "1.1.15", "documented": false },
82
- { "name": "TreeDropDown", "version": "1.1.15", "documented": false },
83
- { "name": "Skeleton", "version": "1.1.15", "documented": false }
81
+ { "name": "BadgeField", "version": "1.1.15", "documented": true },
82
+ { "name": "CountBadge", "version": "1.1.15", "documented": true },
83
+ { "name": "Avatar", "version": "1.1.15", "documented": true },
84
+ { "name": "Table", "version": "1.1.15", "documented": true },
85
+ { "name": "DataTable", "version": "1.1.15", "documented": true },
86
+ { "name": "TreeDropDown", "version": "1.1.15", "documented": true },
87
+ { "name": "Skeleton", "version": "1.1.15", "documented": true },
88
+ { "name": "Timeline", "version": "2.1.1", "documented": true },
89
+ { "name": "Breadcrumb", "version": "1.1.15", "documented": true }
84
90
  ]
85
91
  },
86
92
  "overlays": {
87
93
  "count": 7,
88
94
  "items": [
89
- { "name": "Dialog", "version": "1.1.15", "documented": false },
90
- { "name": "AlertDialog", "version": "1.1.15", "documented": false },
91
- { "name": "Drawer", "version": "1.1.15", "documented": false },
92
- { "name": "Popover", "version": "1.1.15", "documented": false },
93
- { "name": "Tooltip", "version": "1.1.15", "documented": false },
94
- { "name": "DropdownMenu", "version": "1.1.15", "documented": false },
95
- { "name": "ProfileMenu", "version": "1.1.15", "documented": false }
95
+ { "name": "Dialog", "version": "1.1.15", "documented": true },
96
+ { "name": "AlertDialog", "version": "1.1.15", "documented": true },
97
+ { "name": "Drawer", "version": "1.1.15", "documented": true },
98
+ { "name": "Popover", "version": "1.1.15", "documented": true },
99
+ { "name": "Tooltip", "version": "1.1.15", "documented": true },
100
+ { "name": "DropdownMenu", "version": "1.1.15", "documented": true },
101
+ { "name": "ProfileMenu", "version": "1.1.15", "documented": true }
96
102
  ]
97
103
  },
98
104
  "dateTime": {
99
105
  "count": 4,
100
106
  "items": [
101
- { "name": "Calendar", "version": "1.1.15", "documented": false },
102
- { "name": "DatePicker", "version": "1.1.15", "documented": false },
103
- { "name": "SlideDatePicker", "version": "1.1.15", "documented": false },
107
+ { "name": "Calendar", "version": "1.1.15", "documented": true },
108
+ { "name": "DatePicker", "version": "1.1.15", "documented": true },
109
+ { "name": "SlideDatePicker", "version": "1.1.15", "documented": true },
104
110
  { "name": "IosDatePicker", "version": "experimental", "documented": false }
105
111
  ]
106
112
  },
107
113
  "feedback": {
108
114
  "count": 4,
109
115
  "items": [
110
- { "name": "Toast", "version": "1.1.15", "documented": false },
111
- { "name": "SpinLoading", "version": "1.1.15", "documented": false },
112
- { "name": "PasswordLevel", "version": "1.1.15", "documented": false },
113
- { "name": "FieldHint", "version": "1.1.15", "documented": false }
116
+ { "name": "Toast", "version": "1.1.15", "documented": true },
117
+ { "name": "SpinLoading", "version": "1.1.15", "documented": true },
118
+ { "name": "PasswordLevel", "version": "1.1.15", "documented": true },
119
+ { "name": "FieldHint", "version": "1.1.15", "documented": true }
114
120
  ]
115
121
  },
116
122
  "labels": {
117
123
  "count": 4,
118
124
  "items": [
119
- { "name": "Label", "version": "1.1.15", "documented": false },
120
- { "name": "LabelField", "version": "1.1.15", "documented": false },
121
- { "name": "InnerLabelField", "version": "1.1.15", "documented": false },
122
- { "name": "TransparentLabel", "version": "1.1.15", "documented": false }
125
+ { "name": "Label", "version": "1.1.15", "documented": true },
126
+ { "name": "LabelField", "version": "1.1.15", "documented": true },
127
+ { "name": "InnerLabelField", "version": "1.1.15", "documented": true },
128
+ { "name": "TransparentLabel", "version": "1.1.15", "documented": true }
123
129
  ]
124
130
  },
125
131
  "advanced": {
126
- "count": 4,
132
+ "count": 5,
127
133
  "items": [
128
134
  { "name": "Charts", "version": "experimental", "documented": false },
129
135
  { "name": "Command", "version": "experimental", "documented": false },
130
- { "name": "ImageAttachment", "version": "1.1.15", "documented": false },
131
- { "name": "ActionsGroup", "version": "1.1.15", "documented": false }
136
+ { "name": "ImageAttachment", "version": "1.1.15", "documented": true },
137
+ { "name": "ActionsGroup", "version": "1.1.15", "documented": true },
138
+ { "name": "TextEditor", "version": "1.1.15", "documented": true }
132
139
  ]
133
140
  }
134
141
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "torch-glare-mcp",
3
- "version": "1.1.0",
3
+ "version": "1.2.0",
4
4
  "description": "MCP server for TORCH Glare component library — gives AI assistants full access to component docs, API references, code examples, and design system info",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -12,6 +12,13 @@
12
12
  "docs",
13
13
  "README.md"
14
14
  ],
15
+ "scripts": {
16
+ "build": "tsc",
17
+ "start": "node dist/index.js",
18
+ "dev": "tsc --watch",
19
+ "prebuild": "node -e \"const fs=require('fs');if(!fs.existsSync('docs')){fs.mkdirSync('docs',{recursive:true});['components','reference','tutorials','how-to'].forEach(d=>{const src='../docs/'+d;const dst='docs/'+d;if(fs.existsSync(src)){fs.cpSync(src,dst,{recursive:true})}});if(fs.existsSync('../llms-manifest.json')){fs.cpSync('../llms-manifest.json','docs/llms-manifest.json')}}\"",
20
+ "prepublishOnly": "npm run build"
21
+ },
15
22
  "keywords": [
16
23
  "mcp",
17
24
  "model-context-protocol",
@@ -34,11 +41,5 @@
34
41
  "devDependencies": {
35
42
  "@types/node": "^22.14.0",
36
43
  "typescript": "^5.8.0"
37
- },
38
- "scripts": {
39
- "build": "tsc",
40
- "start": "node dist/index.js",
41
- "dev": "tsc --watch",
42
- "prebuild": "node -e \"const fs=require('fs');if(!fs.existsSync('docs')){fs.mkdirSync('docs',{recursive:true});['components','reference','tutorials','how-to'].forEach(d=>{const src='../docs/'+d;const dst='docs/'+d;if(fs.existsSync(src)){fs.cpSync(src,dst,{recursive:true})}});if(fs.existsSync('../llms-manifest.json')){fs.cpSync('../llms-manifest.json','docs/llms-manifest.json')}}\""
43
44
  }
44
- }
45
+ }