@boxcustodia/library 2.0.0-alpha.12 → 2.0.0-alpha.14
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.cjs.js +1 -138
- package/dist/index.d.ts +1087 -720
- package/dist/index.es.js +7011 -56097
- package/dist/theme.css +1 -1
- package/package.json +34 -26
- package/src/__doc__/Examples.tsx +1 -1
- package/src/__doc__/Intro.mdx +3 -3
- package/src/__doc__/Tabs.mdx +112 -0
- package/src/__doc__/V2.mdx +1246 -0
- package/src/components/accordion/accordion.stories.tsx +143 -0
- package/src/components/accordion/accordion.tsx +135 -0
- package/src/components/accordion/index.ts +1 -0
- package/src/components/alert/alert.stories.tsx +24 -4
- package/src/components/alert/alert.tsx +17 -9
- package/src/components/alert-dialog/alert-dialog.stories.tsx +24 -0
- package/src/components/alert-dialog/alert-dialog.test.tsx +1 -1
- package/src/components/alert-dialog/alert-dialog.tsx +58 -10
- package/src/components/auto-complete/auto-complete.stories.tsx +616 -200
- package/src/components/auto-complete/auto-complete.tsx +420 -68
- package/src/components/auto-complete/index.ts +0 -1
- package/src/components/avatar/avatar.stories.tsx +162 -21
- package/src/components/avatar/avatar.tsx +79 -20
- package/src/components/button/button.stories.tsx +219 -294
- package/src/components/button/button.test.tsx +10 -17
- package/src/components/button/button.tsx +78 -19
- package/src/components/button/components/base-button.tsx +30 -53
- package/src/components/button/index.ts +0 -1
- package/src/components/calendar/calendar.stories.tsx +1 -1
- package/src/components/calendar/calendar.tsx +4 -4
- package/src/components/card/card.stories.tsx +141 -69
- package/src/components/card/card.tsx +155 -54
- package/src/components/center/center.stories.tsx +22 -39
- package/src/components/checkbox/checkbox.stories.tsx +25 -5
- package/src/components/checkbox/checkbox.tsx +76 -15
- package/src/components/checkbox-group/checkbox-group.stories.tsx +116 -28
- package/src/components/checkbox-group/checkbox-group.tsx +84 -3
- package/src/components/combobox/combobox.stories.tsx +33 -23
- package/src/components/combobox/combobox.tsx +99 -77
- package/src/components/date-picker/date-input.stories.tsx +14 -6
- package/src/components/date-picker/date-input.tsx +2 -2
- package/src/components/date-picker/date-picker.model.ts +13 -4
- package/src/components/date-picker/date-picker.stories.tsx +38 -12
- package/src/components/date-picker/date-picker.tsx +28 -14
- package/src/components/dialog/dialog.stories.tsx +18 -0
- package/src/components/dialog/dialog.test.tsx +1 -1
- package/src/components/dialog/dialog.tsx +51 -20
- package/src/components/divider/divider.stories.tsx +126 -51
- package/src/components/divider/divider.tsx +16 -16
- package/src/components/dropzone/dropzone.stories.tsx +71 -90
- package/src/components/dropzone/dropzone.tsx +383 -105
- package/src/components/dropzone/index.ts +0 -1
- package/src/components/empty/empty.stories.tsx +165 -0
- package/src/components/empty/empty.tsx +156 -0
- package/src/components/empty/index.ts +1 -0
- package/src/components/field/field.stories.tsx +227 -4
- package/src/components/field/field.tsx +77 -42
- package/src/components/form/form.stories.tsx +320 -197
- package/src/components/form/form.tsx +3 -23
- package/src/components/index.ts +2 -6
- package/src/components/input/input.stories.tsx +5 -5
- package/src/components/input/input.tsx +4 -4
- package/src/components/kbd/kbd.stories.tsx +1 -0
- package/src/components/label/label.stories.tsx +16 -0
- package/src/components/label/label.tsx +13 -2
- package/src/components/loader/loader.stories.tsx +7 -5
- package/src/components/loader/loader.tsx +8 -3
- package/src/components/menu/menu-primitives.tsx +207 -196
- package/src/components/menu/menu.stories.tsx +276 -146
- package/src/components/menu/menu.tsx +146 -54
- package/src/components/number-input/number-input.stories.tsx +27 -4
- package/src/components/number-input/number-input.test.tsx +2 -2
- package/src/components/number-input/number-input.tsx +31 -33
- package/src/components/otp/index.ts +1 -0
- package/src/components/otp/otp.stories.tsx +209 -0
- package/src/components/otp/otp.tsx +100 -0
- package/src/components/pagination/index.ts +1 -0
- package/src/components/pagination/pagination.model.ts +2 -0
- package/src/components/pagination/pagination.stories.tsx +154 -59
- package/src/components/pagination/pagination.test.tsx +122 -57
- package/src/components/pagination/pagination.tsx +575 -77
- package/src/components/password/password.stories.tsx +18 -3
- package/src/components/password/password.tsx +29 -9
- package/src/components/popover/popover.stories.tsx +26 -5
- package/src/components/popover/popover.tsx +15 -23
- package/src/components/progress/progress.stories.tsx +1 -0
- package/src/components/radio-group/index.ts +1 -0
- package/src/components/radio-group/radio-group.stories.tsx +251 -0
- package/src/components/radio-group/radio-group.tsx +212 -0
- package/src/components/scroll-area/scroll-area.stories.tsx +1 -0
- package/src/components/select/select.stories.tsx +118 -19
- package/src/components/select/select.tsx +67 -62
- package/src/components/skeleton/skeleton.stories.tsx +1 -0
- package/src/components/stack/stack.stories.tsx +179 -89
- package/src/components/stack/stack.tsx +2 -2
- package/src/components/stepper/index.ts +1 -1
- package/src/components/stepper/stepper.stories.tsx +767 -83
- package/src/components/stepper/stepper.test.tsx +18 -18
- package/src/components/stepper/stepper.tsx +554 -0
- package/src/components/switch/switch.stories.tsx +15 -1
- package/src/components/switch/switch.tsx +17 -4
- package/src/components/table/index.ts +0 -2
- package/src/components/table/table.stories.tsx +131 -18
- package/src/components/table/table.test.tsx +1 -1
- package/src/components/table/table.tsx +183 -77
- package/src/components/tabs/tabs.stories.tsx +373 -155
- package/src/components/tabs/tabs.test.tsx +12 -12
- package/src/components/tabs/tabs.tsx +72 -149
- package/src/components/tag/index.ts +0 -1
- package/src/components/tag/tag.stories.tsx +155 -120
- package/src/components/tag/tag.tsx +47 -95
- package/src/components/textarea/textarea.stories.tsx +8 -22
- package/src/components/textarea/textarea.tsx +17 -79
- package/src/components/timeline/timeline.stories.tsx +323 -42
- package/src/components/timeline/timeline.tsx +359 -132
- package/src/components/toast/toast.stories.tsx +1 -0
- package/src/components/tooltip/tooltip.tsx +11 -9
- package/src/components/tree/index.ts +0 -1
- package/src/components/tree/tree.stories.tsx +365 -408
- package/src/components/tree/tree.test.tsx +163 -0
- package/src/components/tree/tree.tsx +212 -36
- package/src/hooks/useAsync/__doc__/useAsync.stories.tsx +5 -5
- package/src/hooks/useClipboard/__doc__/useClipboard.stories.tsx +1 -3
- package/src/hooks/useDebounceCallback/__doc__/useDebouncedCallback.stories.tsx +6 -6
- package/src/hooks/useDocumentTitle/__doc__/useDocumentTitle.stories.tsx +1 -1
- package/src/hooks/useEventListener/__test__/useEventListener.test.tsx +1 -1
- package/src/hooks/useLocalStorage/__doc__/useLocalStorage.stories.tsx +1 -1
- package/src/hooks/usePagination/usePagination.tsx +36 -24
- package/src/styles/theme.css +1 -1
- package/src/utils/form.tsx +67 -37
- package/src/utils/index.ts +1 -1
- package/src/__doc__/Migration.mdx +0 -475
- package/src/components/auto-complete/auto-complete-primitives.tsx +0 -155
- package/src/components/background-image/background-image.stories.tsx +0 -21
- package/src/components/background-image/background-image.test.tsx +0 -29
- package/src/components/background-image/background-image.tsx +0 -23
- package/src/components/background-image/index.ts +0 -1
- package/src/components/button/button.variants.ts +0 -44
- package/src/components/button/components/loader-overlay.tsx +0 -21
- package/src/components/button/components/loading-icon.tsx +0 -47
- package/src/components/dropzone/upload-primitives.tsx +0 -310
- package/src/components/dropzone/use-dropzone.ts +0 -122
- package/src/components/empty-state/empty-state.stories.tsx +0 -56
- package/src/components/empty-state/empty-state.tsx +0 -39
- package/src/components/empty-state/index.ts +0 -1
- package/src/components/heading/heading.stories.tsx +0 -74
- package/src/components/heading/heading.tsx +0 -28
- package/src/components/heading/heading.variants.ts +0 -27
- package/src/components/heading/index.ts +0 -1
- package/src/components/kbd/kbd.variants.ts +0 -26
- package/src/components/menu/util/render-menu-item.tsx +0 -54
- package/src/components/multi-select/hooks/use-multi-select.ts +0 -66
- package/src/components/multi-select/index.ts +0 -1
- package/src/components/multi-select/multi-select.stories.tsx +0 -294
- package/src/components/multi-select/multi-select.tsx +0 -300
- package/src/components/multi-select/multi-select.variants.ts +0 -22
- package/src/components/pagination/components/pagination-option.tsx +0 -27
- package/src/components/show/index.ts +0 -1
- package/src/components/show/show.stories.tsx +0 -197
- package/src/components/show/show.test.tsx +0 -41
- package/src/components/show/show.tsx +0 -16
- package/src/components/stepper/Stepper.tsx +0 -190
- package/src/components/stepper/context/stepper-context.tsx +0 -11
- package/src/components/table/table-primitives.tsx +0 -122
- package/src/components/table/table.model.ts +0 -20
- package/src/components/table-pagination/index.ts +0 -2
- package/src/components/table-pagination/table-pagination.model.ts +0 -2
- package/src/components/table-pagination/table-pagination.stories.tsx +0 -23
- package/src/components/table-pagination/table-pagination.test.tsx +0 -32
- package/src/components/table-pagination/table-pagination.tsx +0 -108
- package/src/components/tabs/context/tabs-context.tsx +0 -14
- package/src/components/tag/tag.variants.ts +0 -31
- package/src/components/timeline/timeline-status.ts +0 -5
- package/src/components/tree/hooks/use-controllable-tree-state.ts +0 -80
- package/src/components/tree/tree-primitives.tsx +0 -126
|
@@ -1,84 +1,365 @@
|
|
|
1
|
-
import { Meta, StoryObj } from "@storybook/react-vite";
|
|
2
|
-
import {
|
|
3
|
-
|
|
1
|
+
import type { Meta, StoryObj } from "@storybook/react-vite";
|
|
2
|
+
import {
|
|
3
|
+
GitCompareArrowsIcon,
|
|
4
|
+
GitForkIcon,
|
|
5
|
+
GitMergeIcon,
|
|
6
|
+
GitPullRequestArrowIcon,
|
|
7
|
+
} from "lucide-react";
|
|
8
|
+
import { useState } from "react";
|
|
9
|
+
import { Tag } from "../tag/tag";
|
|
10
|
+
import {
|
|
11
|
+
Timeline,
|
|
12
|
+
TimelineContent,
|
|
13
|
+
TimelineDate,
|
|
14
|
+
TimelineHeader,
|
|
15
|
+
TimelineIndicator,
|
|
16
|
+
TimelineItem,
|
|
17
|
+
TimelineRoot,
|
|
18
|
+
TimelineSeparator,
|
|
19
|
+
TimelineTitle,
|
|
20
|
+
} from "./timeline";
|
|
4
21
|
|
|
22
|
+
/**
|
|
23
|
+
* Vertical or horizontal timeline that highlights progress up to an active step.
|
|
24
|
+
* Use the composite `Timeline` for simple item lists, or compose primitives
|
|
25
|
+
* (`TimelineRoot`, `TimelineItem`, `TimelineHeader`, `TimelineTitle`, `TimelineDate`,
|
|
26
|
+
* `TimelineIndicator`, `TimelineSeparator`, `TimelineContent`) for full control.
|
|
27
|
+
* The `value` / `defaultValue` prop marks the active step — every item with
|
|
28
|
+
* `step <= value` renders as completed.
|
|
29
|
+
*/
|
|
5
30
|
const meta: Meta<typeof Timeline> = {
|
|
6
|
-
title: "
|
|
31
|
+
title: "Components/Timeline",
|
|
7
32
|
component: Timeline,
|
|
33
|
+
args: {
|
|
34
|
+
defaultValue: 2,
|
|
35
|
+
items: [
|
|
36
|
+
{
|
|
37
|
+
date: "Mar 15, 2024",
|
|
38
|
+
title: "Project kickoff",
|
|
39
|
+
content: "Initial planning and team alignment session.",
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
date: "Mar 22, 2024",
|
|
43
|
+
title: "Design review",
|
|
44
|
+
content: "First round of feedback on wireframes.",
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
date: "Apr 02, 2024",
|
|
48
|
+
title: "Development",
|
|
49
|
+
content: "Implementation of core features begins.",
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
date: "Apr 18, 2024",
|
|
53
|
+
title: "Launch",
|
|
54
|
+
content: "Public release and marketing rollout.",
|
|
55
|
+
},
|
|
56
|
+
],
|
|
57
|
+
},
|
|
58
|
+
tags: ["beta"],
|
|
59
|
+
parameters: {
|
|
60
|
+
layout: "centered",
|
|
61
|
+
},
|
|
8
62
|
};
|
|
9
63
|
|
|
10
64
|
export default meta;
|
|
11
|
-
|
|
12
65
|
type Story = StoryObj<typeof Timeline>;
|
|
13
66
|
|
|
14
67
|
export const Default: Story = {
|
|
68
|
+
render: (args) => (
|
|
69
|
+
<div className="w-[400px]">
|
|
70
|
+
<Timeline {...args} />
|
|
71
|
+
</div>
|
|
72
|
+
),
|
|
73
|
+
};
|
|
74
|
+
|
|
75
|
+
export const Horizontal: Story = {
|
|
76
|
+
args: {
|
|
77
|
+
orientation: "horizontal",
|
|
78
|
+
},
|
|
79
|
+
render: (args) => (
|
|
80
|
+
<div className="w-full">
|
|
81
|
+
<Timeline {...args} />
|
|
82
|
+
</div>
|
|
83
|
+
),
|
|
84
|
+
};
|
|
85
|
+
|
|
86
|
+
/**
|
|
87
|
+
* Controlled timeline — external state drives which step is active.
|
|
88
|
+
*/
|
|
89
|
+
export const Controlled: Story = {
|
|
90
|
+
render: (args) => {
|
|
91
|
+
const [value, setValue] = useState(1);
|
|
92
|
+
return (
|
|
93
|
+
<div className="flex w-[400px] flex-col gap-4">
|
|
94
|
+
<Timeline {...args} value={value} onValueChange={setValue} />
|
|
95
|
+
<div className="flex gap-2">
|
|
96
|
+
{args.items?.map((_, i) => (
|
|
97
|
+
<button
|
|
98
|
+
key={i}
|
|
99
|
+
type="button"
|
|
100
|
+
onClick={() => setValue(i + 1)}
|
|
101
|
+
className="rounded border px-3 py-1 text-sm"
|
|
102
|
+
>
|
|
103
|
+
Step {i + 1}
|
|
104
|
+
</button>
|
|
105
|
+
))}
|
|
106
|
+
</div>
|
|
107
|
+
</div>
|
|
108
|
+
);
|
|
109
|
+
},
|
|
110
|
+
};
|
|
111
|
+
|
|
112
|
+
/**
|
|
113
|
+
* Custom indicators with icons inside larger dots, and the date moved below
|
|
114
|
+
* the description via primitives composed in `description`. Override the
|
|
115
|
+
* `indicator`, `separator`, `item` and `title` slots in `classNames` to
|
|
116
|
+
* retune offsets when the dot size changes.
|
|
117
|
+
*/
|
|
118
|
+
export const WithIndicator: Story = {
|
|
15
119
|
args: {
|
|
120
|
+
defaultValue: 3,
|
|
121
|
+
className: "w-full max-w-md",
|
|
122
|
+
classNames: {
|
|
123
|
+
item: "group-data-[orientation=vertical]/timeline:ms-10",
|
|
124
|
+
title: "mt-0.5",
|
|
125
|
+
indicator:
|
|
126
|
+
"bg-primary/10 group-data-completed/timeline-item:bg-primary group-data-completed/timeline-item:text-primary-foreground flex size-6 items-center justify-center border-none group-data-[orientation=vertical]/timeline:-left-7",
|
|
127
|
+
separator:
|
|
128
|
+
"group-data-[orientation=vertical]/timeline:-left-7 group-data-[orientation=vertical]/timeline:h-[calc(100%-1.5rem-0.25rem)] group-data-[orientation=vertical]/timeline:translate-y-6.5",
|
|
129
|
+
},
|
|
16
130
|
items: [
|
|
17
131
|
{
|
|
18
|
-
|
|
19
|
-
|
|
132
|
+
title: "Forked Repository",
|
|
133
|
+
content: (
|
|
134
|
+
<>
|
|
135
|
+
Forked the repository to create a new branch for development.
|
|
136
|
+
<TimelineDate className="mt-2 mb-0">15 minutes ago</TimelineDate>
|
|
137
|
+
</>
|
|
138
|
+
),
|
|
139
|
+
indicator: <GitForkIcon className="size-4" />,
|
|
20
140
|
},
|
|
21
141
|
{
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
142
|
+
title: "Pull Request Submitted",
|
|
143
|
+
content: (
|
|
144
|
+
<>
|
|
145
|
+
Submitted PR #342 with new feature implementation. Waiting for code
|
|
146
|
+
review.
|
|
147
|
+
<TimelineDate className="mt-2 mb-0">10 minutes ago</TimelineDate>
|
|
148
|
+
</>
|
|
149
|
+
),
|
|
150
|
+
indicator: <GitPullRequestArrowIcon className="size-3.5" />,
|
|
25
151
|
},
|
|
26
152
|
{
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
153
|
+
title: (
|
|
154
|
+
<span className="inline-flex items-center gap-2">
|
|
155
|
+
Comparing Branches
|
|
156
|
+
<Tag variant="error">Build failed</Tag>
|
|
157
|
+
</span>
|
|
158
|
+
),
|
|
159
|
+
content: (
|
|
160
|
+
<>
|
|
161
|
+
CI build failed on the feature branch. Tests are red — review
|
|
162
|
+
required before merge.
|
|
163
|
+
<TimelineDate className="mt-2 mb-0">5 minutes ago</TimelineDate>
|
|
164
|
+
</>
|
|
165
|
+
),
|
|
166
|
+
indicator: <GitCompareArrowsIcon className="size-3.5" />,
|
|
167
|
+
},
|
|
168
|
+
{
|
|
169
|
+
title: "Merged Branch",
|
|
170
|
+
content: (
|
|
171
|
+
<>
|
|
172
|
+
Merged the feature branch into the main branch. Ready for
|
|
173
|
+
deployment.
|
|
174
|
+
<TimelineDate className="mt-2 mb-0">Just now</TimelineDate>
|
|
175
|
+
</>
|
|
176
|
+
),
|
|
177
|
+
indicator: <GitMergeIcon className="size-3.5" />,
|
|
30
178
|
},
|
|
31
179
|
],
|
|
32
180
|
},
|
|
33
181
|
};
|
|
34
182
|
|
|
35
|
-
|
|
183
|
+
/**
|
|
184
|
+
* Custom content in `description` — pass any ReactNode to render rich layouts
|
|
185
|
+
* (links, lists, badges, avatars) inside each item.
|
|
186
|
+
*/
|
|
187
|
+
export const CustomContent: Story = {
|
|
36
188
|
args: {
|
|
189
|
+
defaultValue: 2,
|
|
37
190
|
items: [
|
|
38
191
|
{
|
|
192
|
+
date: "Mar 15, 2024",
|
|
193
|
+
title: "Pull request merged",
|
|
39
194
|
content: (
|
|
40
|
-
<div>
|
|
41
|
-
<
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
195
|
+
<div className="flex flex-col gap-2">
|
|
196
|
+
<p>
|
|
197
|
+
<a
|
|
198
|
+
href="#"
|
|
199
|
+
className="font-medium text-foreground underline underline-offset-2"
|
|
200
|
+
>
|
|
201
|
+
#482 — Add Timeline component
|
|
202
|
+
</a>{" "}
|
|
203
|
+
merged into <code className="text-xs">main</code>.
|
|
204
|
+
</p>
|
|
205
|
+
<div className="flex flex-wrap gap-1">
|
|
206
|
+
<span className="rounded-md bg-success/10 px-2 py-0.5 text-xs font-medium text-success">
|
|
207
|
+
+1.2k
|
|
208
|
+
</span>
|
|
209
|
+
<span className="rounded-md bg-error/10 px-2 py-0.5 text-xs font-medium text-error">
|
|
210
|
+
-34
|
|
211
|
+
</span>
|
|
212
|
+
<span className="rounded-md bg-muted px-2 py-0.5 text-xs font-medium">
|
|
213
|
+
6 files
|
|
214
|
+
</span>
|
|
215
|
+
</div>
|
|
55
216
|
</div>
|
|
56
217
|
),
|
|
57
|
-
status: "done",
|
|
58
218
|
},
|
|
59
219
|
{
|
|
220
|
+
date: "Mar 22, 2024",
|
|
221
|
+
title: "Review requested",
|
|
60
222
|
content: (
|
|
61
|
-
<
|
|
62
|
-
<
|
|
63
|
-
<
|
|
64
|
-
|
|
223
|
+
<ul className="list-disc space-y-1 pl-4">
|
|
224
|
+
<li>Add stories covering horizontal orientation</li>
|
|
225
|
+
<li>Document the controlled API in the meta JSDoc</li>
|
|
226
|
+
<li>Verify line alignment in RTL mode</li>
|
|
227
|
+
</ul>
|
|
65
228
|
),
|
|
66
|
-
status: "done",
|
|
67
229
|
},
|
|
68
230
|
{
|
|
231
|
+
date: "Apr 02, 2024",
|
|
232
|
+
title: "Released",
|
|
69
233
|
content: (
|
|
70
|
-
<
|
|
71
|
-
|
|
72
|
-
<
|
|
73
|
-
|
|
234
|
+
<p>
|
|
235
|
+
Shipped in{" "}
|
|
236
|
+
<code className="rounded bg-muted px-1 py-0.5 text-xs">
|
|
237
|
+
v2.0.0-alpha.15
|
|
238
|
+
</code>
|
|
239
|
+
. See the{" "}
|
|
240
|
+
<a
|
|
241
|
+
href="#"
|
|
242
|
+
className="font-medium text-foreground underline underline-offset-2"
|
|
243
|
+
>
|
|
244
|
+
changelog
|
|
245
|
+
</a>
|
|
246
|
+
.
|
|
247
|
+
</p>
|
|
74
248
|
),
|
|
75
|
-
status: "pending",
|
|
76
249
|
},
|
|
77
250
|
],
|
|
78
251
|
},
|
|
79
|
-
|
|
252
|
+
};
|
|
253
|
+
|
|
254
|
+
const roadmap = [
|
|
255
|
+
{
|
|
256
|
+
date: "Jan 2025",
|
|
257
|
+
title: "AI Engine Integration",
|
|
258
|
+
content:
|
|
259
|
+
"Deep integration of advanced LLMs for real-time code generation and context-aware suggestions.",
|
|
260
|
+
},
|
|
261
|
+
{
|
|
262
|
+
date: "Feb 2025",
|
|
263
|
+
title: "Collaborative Editing",
|
|
264
|
+
content:
|
|
265
|
+
"Multi-user real-time collaboration with shared cursors and instant synchronization across workspaces.",
|
|
266
|
+
},
|
|
267
|
+
{
|
|
268
|
+
date: "Mar 2025",
|
|
269
|
+
title: "Visual Theme Builder",
|
|
270
|
+
content:
|
|
271
|
+
"Interactive interface for creating and managing custom design systems with automated CSS variable generation.",
|
|
272
|
+
},
|
|
273
|
+
{
|
|
274
|
+
date: "Apr 2025",
|
|
275
|
+
title: "Enterprise Security",
|
|
276
|
+
content:
|
|
277
|
+
"Role-based access control, SOC2 compliance audit, and enhanced data encryption protocols.",
|
|
278
|
+
},
|
|
279
|
+
];
|
|
280
|
+
|
|
281
|
+
const milestones = [
|
|
282
|
+
{
|
|
283
|
+
date: "Jan 2024",
|
|
284
|
+
title: "Seed Funding",
|
|
285
|
+
content: "$2M raised to kick off product development.",
|
|
286
|
+
},
|
|
287
|
+
{
|
|
288
|
+
date: "Mar 2024",
|
|
289
|
+
title: "Product MVP",
|
|
290
|
+
content: "First working version shipped to beta testers.",
|
|
291
|
+
},
|
|
292
|
+
{
|
|
293
|
+
date: "May 2024",
|
|
294
|
+
title: "First Client",
|
|
295
|
+
content: "Signed first enterprise deal with a Fortune 500.",
|
|
296
|
+
},
|
|
297
|
+
{
|
|
298
|
+
date: "Jul 2024",
|
|
299
|
+
title: "Series A",
|
|
300
|
+
content: "$18M round led by Accel Partners.",
|
|
301
|
+
},
|
|
302
|
+
{
|
|
303
|
+
date: "Sep 2024",
|
|
304
|
+
title: "Global Expansion",
|
|
305
|
+
content: "Opened offices in London and Singapore.",
|
|
306
|
+
},
|
|
307
|
+
];
|
|
308
|
+
|
|
309
|
+
export const DateLeft: Story = {
|
|
310
|
+
args: {
|
|
311
|
+
variant: "date-left",
|
|
312
|
+
defaultValue: 2,
|
|
313
|
+
className: "w-full max-w-md",
|
|
314
|
+
items: roadmap,
|
|
315
|
+
},
|
|
316
|
+
};
|
|
317
|
+
|
|
318
|
+
export const Alternate: Story = {
|
|
319
|
+
args: {
|
|
320
|
+
variant: "alternate",
|
|
321
|
+
defaultValue: 3,
|
|
322
|
+
className: "w-[24rem]",
|
|
323
|
+
items: milestones,
|
|
324
|
+
},
|
|
325
|
+
};
|
|
326
|
+
|
|
327
|
+
/**
|
|
328
|
+
* Build the timeline manually with primitives when you need custom slots,
|
|
329
|
+
* extra markup, or conditional content per step.
|
|
330
|
+
*/
|
|
331
|
+
export const Primitive: Story = {
|
|
332
|
+
render: () => (
|
|
80
333
|
<div className="w-[400px]">
|
|
81
|
-
<
|
|
334
|
+
<TimelineRoot defaultValue={2}>
|
|
335
|
+
<TimelineItem step={1}>
|
|
336
|
+
<TimelineHeader>
|
|
337
|
+
<TimelineDate>Mar 15, 2024</TimelineDate>
|
|
338
|
+
<TimelineTitle>Kickoff</TimelineTitle>
|
|
339
|
+
</TimelineHeader>
|
|
340
|
+
<TimelineIndicator />
|
|
341
|
+
<TimelineSeparator />
|
|
342
|
+
<TimelineContent>Project planning starts.</TimelineContent>
|
|
343
|
+
</TimelineItem>
|
|
344
|
+
<TimelineItem step={2}>
|
|
345
|
+
<TimelineHeader>
|
|
346
|
+
<TimelineDate>Apr 02, 2024</TimelineDate>
|
|
347
|
+
<TimelineTitle>Development</TimelineTitle>
|
|
348
|
+
</TimelineHeader>
|
|
349
|
+
<TimelineIndicator />
|
|
350
|
+
<TimelineSeparator />
|
|
351
|
+
<TimelineContent>Feature implementation in progress.</TimelineContent>
|
|
352
|
+
</TimelineItem>
|
|
353
|
+
<TimelineItem step={3}>
|
|
354
|
+
<TimelineHeader>
|
|
355
|
+
<TimelineDate>Apr 18, 2024</TimelineDate>
|
|
356
|
+
<TimelineTitle>Launch</TimelineTitle>
|
|
357
|
+
</TimelineHeader>
|
|
358
|
+
<TimelineIndicator />
|
|
359
|
+
<TimelineSeparator />
|
|
360
|
+
<TimelineContent>Public release.</TimelineContent>
|
|
361
|
+
</TimelineItem>
|
|
362
|
+
</TimelineRoot>
|
|
82
363
|
</div>
|
|
83
364
|
),
|
|
84
365
|
};
|