ui-arreya-components 0.0.16 → 0.1.2
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.d.mts +342 -0
- package/dist/index.d.ts +342 -0
- package/dist/index.js +1682 -0
- package/dist/index.js.map +1 -0
- package/dist/index.mjs +1495 -0
- package/dist/index.mjs.map +1 -0
- package/package.json +61 -106
- package/.github/workflows/npm-publish.yml +0 -35
- package/.storybook/main.ts +0 -18
- package/.storybook/preview.ts +0 -16
- package/.storybook/vitest.setup.ts +0 -9
- package/README.md +0 -62
- package/components.json +0 -21
- package/dist/styles.css +0 -3
- package/dist/ui.cjs.js +0 -242
- package/dist/ui.es.js +0 -25142
- package/dist/ui.umd.js +0 -242
- package/eslint.config.js +0 -28
- package/postcss.config.js +0 -6
- package/scripts/build-index-ts.sh +0 -16
- package/scripts/template.sh +0 -57
- package/src/components/feature/graph-card.stories.tsx +0 -138
- package/src/components/feature/graph-card.tsx +0 -113
- package/src/components/feature/header.stories.tsx +0 -129
- package/src/components/feature/header.tsx +0 -78
- package/src/components/feature/login-form.stories.tsx +0 -35
- package/src/components/feature/login-form.tsx +0 -97
- package/src/components/feature/search-bar.stories.tsx +0 -35
- package/src/components/feature/search-bar.tsx +0 -141
- package/src/components/feature/wizard.stories.tsx +0 -199
- package/src/components/feature/wizard.tsx +0 -278
- package/src/components/ui/accordion.stories.tsx.disabled +0 -36
- package/src/components/ui/accordion.tsx +0 -55
- package/src/components/ui/alert-dialog.stories.tsx +0 -46
- package/src/components/ui/alert-dialog.tsx +0 -139
- package/src/components/ui/alert.stories.tsx +0 -45
- package/src/components/ui/alert.tsx +0 -59
- package/src/components/ui/aspect-ratio.stories.tsx +0 -24
- package/src/components/ui/aspect-ratio.tsx +0 -5
- package/src/components/ui/avatar.stories.tsx +0 -29
- package/src/components/ui/avatar.tsx +0 -48
- package/src/components/ui/badge.stories.tsx +0 -43
- package/src/components/ui/badge.tsx +0 -36
- package/src/components/ui/breadcrumb.stories.tsx +0 -146
- package/src/components/ui/breadcrumb.tsx +0 -115
- package/src/components/ui/button.stories.tsx +0 -87
- package/src/components/ui/button.tsx +0 -57
- package/src/components/ui/card.stories.tsx +0 -99
- package/src/components/ui/card.tsx +0 -76
- package/src/components/ui/carousel.stories.tsx +0 -47
- package/src/components/ui/carousel.tsx +0 -260
- package/src/components/ui/chart.stories.tsx.disabled +0 -44
- package/src/components/ui/chart.tsx +0 -363
- package/src/components/ui/checkbox.stories.tsx +0 -56
- package/src/components/ui/checkbox.tsx +0 -28
- package/src/components/ui/collapsible.stories.tsx +0 -58
- package/src/components/ui/collapsible.tsx +0 -9
- package/src/components/ui/context-menu.stories.tsx +0 -34
- package/src/components/ui/context-menu.tsx +0 -198
- package/src/components/ui/dialog.stories.tsx +0 -40
- package/src/components/ui/dialog.tsx +0 -120
- package/src/components/ui/drawer.stories.tsx +0 -48
- package/src/components/ui/drawer.tsx +0 -116
- package/src/components/ui/dropdown-menu.stories.tsx +0 -92
- package/src/components/ui/dropdown-menu.tsx +0 -199
- package/src/components/ui/form.tsx +0 -176
- package/src/components/ui/hover-card.stories.tsx +0 -31
- package/src/components/ui/hover-card.tsx +0 -27
- package/src/components/ui/input-otp.tsx +0 -69
- package/src/components/ui/input.stories.tsx +0 -63
- package/src/components/ui/input.tsx +0 -22
- package/src/components/ui/label.tsx +0 -24
- package/src/components/ui/menubar.tsx +0 -254
- package/src/components/ui/navigation-menu.tsx +0 -128
- package/src/components/ui/pagination.tsx +0 -117
- package/src/components/ui/popover.tsx +0 -31
- package/src/components/ui/progress.tsx +0 -26
- package/src/components/ui/radio-group.tsx +0 -42
- package/src/components/ui/resizable.tsx +0 -43
- package/src/components/ui/scroll-area.tsx +0 -46
- package/src/components/ui/select.tsx +0 -157
- package/src/components/ui/separator.tsx +0 -29
- package/src/components/ui/sheet.tsx +0 -138
- package/src/components/ui/sidebar.tsx +0 -771
- package/src/components/ui/skeleton.tsx +0 -15
- package/src/components/ui/slider.tsx +0 -26
- package/src/components/ui/sonner.tsx +0 -29
- package/src/components/ui/switch.tsx +0 -27
- package/src/components/ui/table.tsx +0 -120
- package/src/components/ui/tabs.tsx +0 -53
- package/src/components/ui/textarea.tsx +0 -22
- package/src/components/ui/toast.tsx +0 -127
- package/src/components/ui/toaster.tsx +0 -33
- package/src/components/ui/toggle-group.tsx +0 -59
- package/src/components/ui/toggle.tsx +0 -43
- package/src/components/ui/tooltip.tsx +0 -30
- package/src/hooks/use-mobile.tsx +0 -19
- package/src/hooks/use-toast.ts +0 -194
- package/src/index.css +0 -3633
- package/src/index.ts +0 -51
- package/src/lib/types.ts +0 -5
- package/src/lib/utils.ts +0 -6
- package/src/styles/tailwind.css +0 -100
- package/tailwind.config.js +0 -94
- package/tsconfig.app.json +0 -30
- package/tsconfig.json +0 -13
- package/tsconfig.node.json +0 -24
- package/vite.config.ts +0 -33
- package/vitest.workspace.ts +0 -32
|
@@ -1,97 +0,0 @@
|
|
|
1
|
-
import { cn } from "@/lib/utils"
|
|
2
|
-
import { Button } from "@/components/ui/button"
|
|
3
|
-
import {
|
|
4
|
-
Card,
|
|
5
|
-
CardContent,
|
|
6
|
-
CardDescription,
|
|
7
|
-
CardHeader,
|
|
8
|
-
CardTitle,
|
|
9
|
-
} from "@/components/ui/card"
|
|
10
|
-
import { Input } from "@/components/ui/input"
|
|
11
|
-
import { Label } from "@/components/ui/label"
|
|
12
|
-
|
|
13
|
-
export function LoginForm({
|
|
14
|
-
className,
|
|
15
|
-
...props
|
|
16
|
-
}: React.ComponentPropsWithoutRef<"div">) {
|
|
17
|
-
return (
|
|
18
|
-
<div className={cn("flex flex-col gap-6", className)} {...props}>
|
|
19
|
-
<Card>
|
|
20
|
-
<CardHeader className="text-center">
|
|
21
|
-
<CardTitle className="text-xl">Welcome back</CardTitle>
|
|
22
|
-
<CardDescription>
|
|
23
|
-
Login with your Apple or Google account
|
|
24
|
-
</CardDescription>
|
|
25
|
-
</CardHeader>
|
|
26
|
-
<CardContent>
|
|
27
|
-
<form>
|
|
28
|
-
<div className="grid gap-6">
|
|
29
|
-
<div className="flex flex-col gap-4">
|
|
30
|
-
<Button variant="outline" className="w-full">
|
|
31
|
-
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
|
|
32
|
-
<path
|
|
33
|
-
d="M12.152 6.896c-.948 0-2.415-1.078-3.96-1.04-2.04.027-3.91 1.183-4.961 3.014-2.117 3.675-.546 9.103 1.519 12.09 1.013 1.454 2.208 3.09 3.792 3.039 1.52-.065 2.09-.987 3.935-.987 1.831 0 2.35.987 3.96.948 1.637-.026 2.676-1.48 3.676-2.948 1.156-1.688 1.636-3.325 1.662-3.415-.039-.013-3.182-1.221-3.22-4.857-.026-3.04 2.48-4.494 2.597-4.559-1.429-2.09-3.623-2.324-4.39-2.376-2-.156-3.675 1.09-4.61 1.09zM15.53 3.83c.843-1.012 1.4-2.427 1.245-3.83-1.207.052-2.662.805-3.532 1.818-.78.896-1.454 2.338-1.273 3.714 1.338.104 2.715-.688 3.559-1.701"
|
|
34
|
-
fill="currentColor"
|
|
35
|
-
/>
|
|
36
|
-
</svg>
|
|
37
|
-
Login with Apple
|
|
38
|
-
</Button>
|
|
39
|
-
<Button variant="outline" className="w-full">
|
|
40
|
-
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
|
|
41
|
-
<path
|
|
42
|
-
d="M12.48 10.92v3.28h7.84c-.24 1.84-.853 3.187-1.787 4.133-1.147 1.147-2.933 2.4-6.053 2.4-4.827 0-8.6-3.893-8.6-8.72s3.773-8.72 8.6-8.72c2.6 0 4.507 1.027 5.907 2.347l2.307-2.307C18.747 1.44 16.133 0 12.48 0 5.867 0 .307 5.387.307 12s5.56 12 12.173 12c3.573 0 6.267-1.173 8.373-3.36 2.16-2.16 2.84-5.213 2.84-7.667 0-.76-.053-1.467-.173-2.053H12.48z"
|
|
43
|
-
fill="currentColor"
|
|
44
|
-
/>
|
|
45
|
-
</svg>
|
|
46
|
-
Login with Google
|
|
47
|
-
</Button>
|
|
48
|
-
</div>
|
|
49
|
-
<div className="relative text-center text-sm after:absolute after:inset-0 after:top-1/2 after:z-0 after:flex after:items-center after:border-t after:border-border">
|
|
50
|
-
<span className="relative z-10 bg-background px-2 text-muted-foreground">
|
|
51
|
-
Or continue with
|
|
52
|
-
</span>
|
|
53
|
-
</div>
|
|
54
|
-
<div className="grid gap-6">
|
|
55
|
-
<div className="grid gap-2">
|
|
56
|
-
<Label htmlFor="email">Email</Label>
|
|
57
|
-
<Input
|
|
58
|
-
id="email"
|
|
59
|
-
type="email"
|
|
60
|
-
placeholder="m@example.com"
|
|
61
|
-
required
|
|
62
|
-
/>
|
|
63
|
-
</div>
|
|
64
|
-
<div className="grid gap-2">
|
|
65
|
-
<div className="flex items-center">
|
|
66
|
-
<Label htmlFor="password">Password</Label>
|
|
67
|
-
<a
|
|
68
|
-
href="#"
|
|
69
|
-
className="ml-auto text-sm underline-offset-4 hover:underline"
|
|
70
|
-
>
|
|
71
|
-
Forgot your password?
|
|
72
|
-
</a>
|
|
73
|
-
</div>
|
|
74
|
-
<Input id="password" type="password" required />
|
|
75
|
-
</div>
|
|
76
|
-
<Button type="submit" className="w-full">
|
|
77
|
-
Login
|
|
78
|
-
</Button>
|
|
79
|
-
</div>
|
|
80
|
-
<div className="text-center text-sm">
|
|
81
|
-
Don't have an account?{" "}
|
|
82
|
-
<a href="#" className="underline underline-offset-4">
|
|
83
|
-
Sign up
|
|
84
|
-
</a>
|
|
85
|
-
</div>
|
|
86
|
-
</div>
|
|
87
|
-
</form>
|
|
88
|
-
</CardContent>
|
|
89
|
-
</Card>
|
|
90
|
-
<div className="text-balance text-center text-xs text-muted-foreground [&_a]:underline [&_a]:underline-offset-4 [&_a]:hover:text-primary ">
|
|
91
|
-
By clicking continue, you agree to our <a href="#">Terms of Service</a>{" "}
|
|
92
|
-
and <a href="#">Privacy Policy</a>.
|
|
93
|
-
</div>
|
|
94
|
-
</div>
|
|
95
|
-
)
|
|
96
|
-
}
|
|
97
|
-
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import { Meta, StoryObj } from "@storybook/react"
|
|
2
|
-
import { SearchBar } from "@/components/feature/search-bar"
|
|
3
|
-
|
|
4
|
-
const meta = {
|
|
5
|
-
title: "Feature/SearchBar",
|
|
6
|
-
component: SearchBar,
|
|
7
|
-
parameters: {
|
|
8
|
-
layout: "centered",
|
|
9
|
-
},
|
|
10
|
-
tags: ["autodocs"],
|
|
11
|
-
} satisfies Meta<typeof SearchBar>
|
|
12
|
-
|
|
13
|
-
export default meta
|
|
14
|
-
type Story = StoryObj<typeof meta>
|
|
15
|
-
|
|
16
|
-
export const Default: Story = {
|
|
17
|
-
args: {
|
|
18
|
-
options: [
|
|
19
|
-
"First",
|
|
20
|
-
"Second",
|
|
21
|
-
"Third"
|
|
22
|
-
],
|
|
23
|
-
search: [
|
|
24
|
-
"How to use React hooks",
|
|
25
|
-
"Tailwind CSS tutorial",
|
|
26
|
-
"Next.js documentation",
|
|
27
|
-
"JavaScript best practices",
|
|
28
|
-
"TypeScript interfaces",
|
|
29
|
-
"CSS Grid layout examples",
|
|
30
|
-
"React performance optimization",
|
|
31
|
-
"State management in React",
|
|
32
|
-
],
|
|
33
|
-
submit: (search, option) => { console.log(`pressed ${search} ${option}`) },
|
|
34
|
-
}
|
|
35
|
-
}
|
|
@@ -1,141 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
useEffect,
|
|
3
|
-
useState,
|
|
4
|
-
useRef,
|
|
5
|
-
} from 'react'
|
|
6
|
-
|
|
7
|
-
import { Search, ChevronDown } from 'lucide-react'
|
|
8
|
-
|
|
9
|
-
type SearchBarProps = {
|
|
10
|
-
search: string[],
|
|
11
|
-
options?: string[]
|
|
12
|
-
submit: (search:string, option?: string) => void
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
export const SearchBar = ({ search, options, submit }: SearchBarProps): JSX.Element => {
|
|
16
|
-
const firstDropdownOption = (options && options.length > 0) ? options[0] : ""
|
|
17
|
-
|
|
18
|
-
const [isOptionsOpen, setIsOptionsOpen] = useState(false)
|
|
19
|
-
const [isSearchOpen, setIsSearchOpen] = useState(false)
|
|
20
|
-
const [searchValue, setSearchValue] = useState("")
|
|
21
|
-
const [selectedOption, setSelectedOption] = useState(firstDropdownOption)
|
|
22
|
-
|
|
23
|
-
const optionsDropdownRef = useRef<HTMLDivElement>(null)
|
|
24
|
-
const searchDropdownRef = useRef<HTMLDivElement>(null)
|
|
25
|
-
const searchInputRef = useRef<HTMLInputElement>(null)
|
|
26
|
-
|
|
27
|
-
// TODO if no dropdownOptions make it a regular search bar
|
|
28
|
-
|
|
29
|
-
// Filtered search options based on input
|
|
30
|
-
const filteredOptions = searchValue
|
|
31
|
-
? search.filter((option) => option?.toLowerCase().includes(searchValue.toLowerCase()))
|
|
32
|
-
: []
|
|
33
|
-
|
|
34
|
-
const onSubmit = () => {
|
|
35
|
-
submit(searchValue, selectedOption)
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
// Close dropdowns when clicking outside
|
|
39
|
-
useEffect(() => {
|
|
40
|
-
function handleClickOutside(event: MouseEvent) {
|
|
41
|
-
if (optionsDropdownRef.current && !optionsDropdownRef.current.contains(event.target as Node)) {
|
|
42
|
-
setIsOptionsOpen(false)
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
if (
|
|
46
|
-
searchDropdownRef.current &&
|
|
47
|
-
!searchDropdownRef.current.contains(event.target as Node) &&
|
|
48
|
-
event.target !== searchInputRef.current
|
|
49
|
-
|
|
50
|
-
) {
|
|
51
|
-
setIsSearchOpen(false)
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
document.addEventListener("mousedown", handleClickOutside)
|
|
56
|
-
return () => document.removeEventListener("mousedown", handleClickOutside)
|
|
57
|
-
}, [])
|
|
58
|
-
|
|
59
|
-
// Handle search input changes
|
|
60
|
-
const handleSearchChange = (e: React.ChangeEvent<HTMLInputElement>) => {
|
|
61
|
-
const value = e.target.value
|
|
62
|
-
setSearchValue(value)
|
|
63
|
-
setIsSearchOpen(value.length > 0)
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
// Handle search option selection
|
|
67
|
-
const handleSelectSearchOption = (option: string) => {
|
|
68
|
-
setSearchValue(option)
|
|
69
|
-
setIsSearchOpen(false)
|
|
70
|
-
searchInputRef.current?.focus()
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
return (
|
|
74
|
-
<div className="flex max-w-xl rounded-lg border border-blue-100 bg-white">
|
|
75
|
-
<div className="relative flex-1" ref={searchDropdownRef}>
|
|
76
|
-
<input
|
|
77
|
-
ref={searchInputRef}
|
|
78
|
-
type="search"
|
|
79
|
-
placeholder="Search..."
|
|
80
|
-
value={searchValue}
|
|
81
|
-
onChange={handleSearchChange}
|
|
82
|
-
onFocus={() => searchValue && setIsSearchOpen(true)}
|
|
83
|
-
className="h-9 w-full border-0 bg-transparent px-3 py-2 outline-none"
|
|
84
|
-
/>
|
|
85
|
-
|
|
86
|
-
{isSearchOpen && filteredOptions.length > 0 && (
|
|
87
|
-
<div className="absolute left-0 top-full z-10 mt-1 w-full rounded-md border border-gray-200 bg-white py-1 shadow-lg">
|
|
88
|
-
{filteredOptions.map((option) => (
|
|
89
|
-
<button
|
|
90
|
-
key={option}
|
|
91
|
-
className="flex w-full px-4 py-2 text-left text-sm hover:bg-gray-50"
|
|
92
|
-
onClick={() => handleSelectSearchOption(option)}
|
|
93
|
-
>
|
|
94
|
-
{option}
|
|
95
|
-
</button>
|
|
96
|
-
))}
|
|
97
|
-
</div>
|
|
98
|
-
)}
|
|
99
|
-
</div>
|
|
100
|
-
|
|
101
|
-
<div className="flex items-center">
|
|
102
|
-
<div className="h-5 w-[1px] bg-slate-200" />
|
|
103
|
-
<div className="relative" ref={optionsDropdownRef}>
|
|
104
|
-
<button
|
|
105
|
-
onClick={() => setIsOptionsOpen(!isOptionsOpen)}
|
|
106
|
-
className="flex h-9 items-center gap-1 px-3 text-sm font-normal text-gray-700 hover:bg-gray-50"
|
|
107
|
-
>
|
|
108
|
-
{selectedOption}
|
|
109
|
-
<ChevronDown className="h-4 w-4 opacity-50" />
|
|
110
|
-
</button>
|
|
111
|
-
|
|
112
|
-
{isOptionsOpen && (
|
|
113
|
-
<div className="absolute right-0 top-full z-10 mt-1 w-48 rounded-md border border-gray-200 bg-white py-1 shadow-lg">
|
|
114
|
-
{options?.map((option) => (
|
|
115
|
-
<button
|
|
116
|
-
key={option}
|
|
117
|
-
className="flex w-full px-4 py-2 text-left text-sm hover:bg-gray-50"
|
|
118
|
-
onClick={() => {
|
|
119
|
-
setSelectedOption(option)
|
|
120
|
-
setIsOptionsOpen(false)
|
|
121
|
-
}}
|
|
122
|
-
>
|
|
123
|
-
{option}
|
|
124
|
-
</button>
|
|
125
|
-
))}
|
|
126
|
-
</div>
|
|
127
|
-
)}
|
|
128
|
-
</div>
|
|
129
|
-
<div className="h-5 w-[1px] bg-slate-200" />
|
|
130
|
-
<button
|
|
131
|
-
className="flex h-9 w-9 items-center justify-center text-gray-500 hover:bg-gray-50"
|
|
132
|
-
onClick={onSubmit}
|
|
133
|
-
>
|
|
134
|
-
<Search className="h-2 w-2" />
|
|
135
|
-
</button>
|
|
136
|
-
</div>
|
|
137
|
-
</div>
|
|
138
|
-
)
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
SearchBar.displayName = "SearchBar"
|
|
@@ -1,199 +0,0 @@
|
|
|
1
|
-
import type { Meta, StoryObj } from "@storybook/react"
|
|
2
|
-
import { Wizard, WizardStepContent, WizardCompletion } from "./wizard"
|
|
3
|
-
import { Button } from "@/components/ui/button"
|
|
4
|
-
import { Input } from "@/components/ui/input"
|
|
5
|
-
import { Label } from "@/components/ui/label"
|
|
6
|
-
import { Card, CardContent } from "@/components/ui/card"
|
|
7
|
-
|
|
8
|
-
const meta: Meta<typeof Wizard> = {
|
|
9
|
-
title: "Feature/Wizard",
|
|
10
|
-
component: Wizard,
|
|
11
|
-
parameters: {
|
|
12
|
-
layout: "centered",
|
|
13
|
-
},
|
|
14
|
-
tags: ["autodocs"],
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
export default meta
|
|
18
|
-
type Story = StoryObj<typeof Wizard>
|
|
19
|
-
|
|
20
|
-
export const Default: Story = {
|
|
21
|
-
render: () => (
|
|
22
|
-
<Card className="w-full max-w-2xl">
|
|
23
|
-
<CardContent className="p-6">
|
|
24
|
-
<Wizard
|
|
25
|
-
steps={[
|
|
26
|
-
{ id: "step1", title: "Step 1", description: "Personal Info" },
|
|
27
|
-
{ id: "step2", title: "Step 2", description: "Account Details" },
|
|
28
|
-
{ id: "step3", title: "Step 3", description: "Confirmation" },
|
|
29
|
-
]}
|
|
30
|
-
>
|
|
31
|
-
<WizardStepContent stepId="step1">
|
|
32
|
-
<div className="space-y-4 py-4">
|
|
33
|
-
<h3 className="text-lg font-medium">Personal Information</h3>
|
|
34
|
-
<p className="text-sm text-muted-foreground">Please provide your personal details.</p>
|
|
35
|
-
<div className="grid gap-4">
|
|
36
|
-
<div className="grid gap-2">
|
|
37
|
-
<Label htmlFor="name">Full Name</Label>
|
|
38
|
-
<Input id="name" placeholder="John Doe" />
|
|
39
|
-
</div>
|
|
40
|
-
<div className="grid gap-2">
|
|
41
|
-
<Label htmlFor="email">Email</Label>
|
|
42
|
-
<Input id="email" type="email" placeholder="john@example.com" />
|
|
43
|
-
</div>
|
|
44
|
-
</div>
|
|
45
|
-
</div>
|
|
46
|
-
</WizardStepContent>
|
|
47
|
-
|
|
48
|
-
<WizardStepContent stepId="step2">
|
|
49
|
-
<div className="space-y-4 py-4">
|
|
50
|
-
<h3 className="text-lg font-medium">Account Details</h3>
|
|
51
|
-
<p className="text-sm text-muted-foreground">Set up your account preferences.</p>
|
|
52
|
-
<div className="grid gap-4">
|
|
53
|
-
<div className="grid gap-2">
|
|
54
|
-
<Label htmlFor="username">Username</Label>
|
|
55
|
-
<Input id="username" placeholder="johndoe" />
|
|
56
|
-
</div>
|
|
57
|
-
<div className="grid gap-2">
|
|
58
|
-
<Label htmlFor="password">Password</Label>
|
|
59
|
-
<Input id="password" type="password" />
|
|
60
|
-
</div>
|
|
61
|
-
</div>
|
|
62
|
-
</div>
|
|
63
|
-
</WizardStepContent>
|
|
64
|
-
|
|
65
|
-
<WizardStepContent stepId="step3">
|
|
66
|
-
<div className="space-y-4 py-4">
|
|
67
|
-
<h3 className="text-lg font-medium">Confirmation</h3>
|
|
68
|
-
<p className="text-sm text-muted-foreground">Review your information before submitting.</p>
|
|
69
|
-
<div className="rounded-lg border p-4">
|
|
70
|
-
<div className="grid grid-cols-2 gap-4">
|
|
71
|
-
<div className="text-sm font-medium">Name</div>
|
|
72
|
-
<div className="text-sm">John Doe</div>
|
|
73
|
-
<div className="text-sm font-medium">Email</div>
|
|
74
|
-
<div className="text-sm">john@example.com</div>
|
|
75
|
-
<div className="text-sm font-medium">Username</div>
|
|
76
|
-
<div className="text-sm">johndoe</div>
|
|
77
|
-
</div>
|
|
78
|
-
</div>
|
|
79
|
-
</div>
|
|
80
|
-
</WizardStepContent>
|
|
81
|
-
|
|
82
|
-
<WizardCompletion>
|
|
83
|
-
<div className="flex flex-col items-center justify-center py-8 text-center">
|
|
84
|
-
<div className="rounded-full bg-primary/10 p-3 mb-4">
|
|
85
|
-
<svg
|
|
86
|
-
className="h-8 w-8 text-primary"
|
|
87
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
88
|
-
width="24"
|
|
89
|
-
height="24"
|
|
90
|
-
viewBox="0 0 24 24"
|
|
91
|
-
fill="none"
|
|
92
|
-
stroke="currentColor"
|
|
93
|
-
strokeWidth="2"
|
|
94
|
-
strokeLinecap="round"
|
|
95
|
-
strokeLinejoin="round"
|
|
96
|
-
>
|
|
97
|
-
<path d="M20 6L9 17l-5-5" />
|
|
98
|
-
</svg>
|
|
99
|
-
</div>
|
|
100
|
-
<h3 className="text-2xl font-semibold mb-2">Setup Complete!</h3>
|
|
101
|
-
<p className="text-muted-foreground mb-6">Your account has been successfully created.</p>
|
|
102
|
-
<Button>Go to Dashboard</Button>
|
|
103
|
-
</div>
|
|
104
|
-
</WizardCompletion>
|
|
105
|
-
</Wizard>
|
|
106
|
-
</CardContent>
|
|
107
|
-
</Card>
|
|
108
|
-
),
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
export const WithoutStepIndicator: Story = {
|
|
112
|
-
render: () => (
|
|
113
|
-
<Card className="w-full max-w-2xl">
|
|
114
|
-
<CardContent className="p-6">
|
|
115
|
-
<Wizard
|
|
116
|
-
steps={[
|
|
117
|
-
{ id: "step1", title: "Step 1" },
|
|
118
|
-
{ id: "step2", title: "Step 2" },
|
|
119
|
-
{ id: "step3", title: "Step 3" },
|
|
120
|
-
]}
|
|
121
|
-
showStepIndicator={false}
|
|
122
|
-
>
|
|
123
|
-
<WizardStepContent stepId="step1">
|
|
124
|
-
<div className="space-y-4 py-4">
|
|
125
|
-
<h3 className="text-lg font-medium">Step 1 Content</h3>
|
|
126
|
-
<p className="text-sm text-muted-foreground">This wizard doesn't show the step indicator.</p>
|
|
127
|
-
</div>
|
|
128
|
-
</WizardStepContent>
|
|
129
|
-
|
|
130
|
-
<WizardStepContent stepId="step2">
|
|
131
|
-
<div className="space-y-4 py-4">
|
|
132
|
-
<h3 className="text-lg font-medium">Step 2 Content</h3>
|
|
133
|
-
<p className="text-sm text-muted-foreground">Navigation is still available at the bottom.</p>
|
|
134
|
-
</div>
|
|
135
|
-
</WizardStepContent>
|
|
136
|
-
|
|
137
|
-
<WizardStepContent stepId="step3">
|
|
138
|
-
<div className="space-y-4 py-4">
|
|
139
|
-
<h3 className="text-lg font-medium">Step 3 Content</h3>
|
|
140
|
-
<p className="text-sm text-muted-foreground">This is the final step.</p>
|
|
141
|
-
</div>
|
|
142
|
-
</WizardStepContent>
|
|
143
|
-
|
|
144
|
-
<WizardCompletion>
|
|
145
|
-
<div className="py-4 text-center">
|
|
146
|
-
<h3 className="text-lg font-medium">All Done!</h3>
|
|
147
|
-
</div>
|
|
148
|
-
</WizardCompletion>
|
|
149
|
-
</Wizard>
|
|
150
|
-
</CardContent>
|
|
151
|
-
</Card>
|
|
152
|
-
),
|
|
153
|
-
}
|
|
154
|
-
|
|
155
|
-
export const TopNavigation: Story = {
|
|
156
|
-
render: () => (
|
|
157
|
-
<Card className="w-full max-w-2xl">
|
|
158
|
-
<CardContent className="p-6">
|
|
159
|
-
<Wizard
|
|
160
|
-
steps={[
|
|
161
|
-
{ id: "step1", title: "Step 1" },
|
|
162
|
-
{ id: "step2", title: "Step 2" },
|
|
163
|
-
{ id: "step3", title: "Step 3" },
|
|
164
|
-
]}
|
|
165
|
-
navigationPosition="top"
|
|
166
|
-
>
|
|
167
|
-
<WizardStepContent stepId="step1">
|
|
168
|
-
<div className="space-y-4 py-4">
|
|
169
|
-
<h3 className="text-lg font-medium">Step 1 Content</h3>
|
|
170
|
-
<p className="text-sm text-muted-foreground">This wizard has navigation at the top.</p>
|
|
171
|
-
</div>
|
|
172
|
-
</WizardStepContent>
|
|
173
|
-
|
|
174
|
-
<WizardStepContent stepId="step2">
|
|
175
|
-
<div className="space-y-4 py-4">
|
|
176
|
-
<h3 className="text-lg font-medium">Step 2 Content</h3>
|
|
177
|
-
<p className="text-sm text-muted-foreground">Navigation buttons are above the content.</p>
|
|
178
|
-
</div>
|
|
179
|
-
</WizardStepContent>
|
|
180
|
-
|
|
181
|
-
<WizardStepContent stepId="step3">
|
|
182
|
-
<div className="space-y-4 py-4">
|
|
183
|
-
<h3 className="text-lg font-medium">Step 3 Content</h3>
|
|
184
|
-
<p className="text-sm text-muted-foreground">This is the final step.</p>
|
|
185
|
-
</div>
|
|
186
|
-
</WizardStepContent>
|
|
187
|
-
|
|
188
|
-
<WizardCompletion>
|
|
189
|
-
<div className="py-4 text-center">
|
|
190
|
-
<h3 className="text-lg font-medium">All Done!</h3>
|
|
191
|
-
</div>
|
|
192
|
-
</WizardCompletion>
|
|
193
|
-
</Wizard>
|
|
194
|
-
</CardContent>
|
|
195
|
-
</Card>
|
|
196
|
-
),
|
|
197
|
-
}
|
|
198
|
-
|
|
199
|
-
|