@alpic-ai/ui 0.0.0-dev.4a35dc7 → 0.0.0-dev.6953a69

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 (99) hide show
  1. package/dist/components/accordion-card.d.mts +1 -1
  2. package/dist/components/accordion.d.mts +1 -1
  3. package/dist/components/alert.d.mts +1 -1
  4. package/dist/components/attachment-tile.mjs +1 -1
  5. package/dist/components/avatar.d.mts +1 -1
  6. package/dist/components/breadcrumb.d.mts +1 -1
  7. package/dist/components/button.d.mts +1 -1
  8. package/dist/components/card.d.mts +1 -1
  9. package/dist/components/checkbox.d.mts +1 -1
  10. package/dist/components/collapsible.d.mts +1 -1
  11. package/dist/components/combobox.d.mts +1 -1
  12. package/dist/components/combobox.mjs +2 -2
  13. package/dist/components/command.d.mts +1 -1
  14. package/dist/components/copyable.d.mts +1 -1
  15. package/dist/components/copyable.mjs +1 -1
  16. package/dist/components/description-list.d.mts +1 -1
  17. package/dist/components/dialog.d.mts +1 -1
  18. package/dist/components/dialog.mjs +2 -2
  19. package/dist/components/dropdown-menu.d.mts +1 -1
  20. package/dist/components/form.d.mts +119 -0
  21. package/dist/components/form.mjs +192 -0
  22. package/dist/components/input-group.d.mts +1 -1
  23. package/dist/components/input.d.mts +3 -1
  24. package/dist/components/input.mjs +20 -11
  25. package/dist/components/label.d.mts +1 -1
  26. package/dist/components/pagination.d.mts +1 -1
  27. package/dist/components/popover.d.mts +1 -1
  28. package/dist/components/radio-group.d.mts +1 -1
  29. package/dist/components/scroll-area.d.mts +1 -1
  30. package/dist/components/select-trigger-variants.mjs +1 -0
  31. package/dist/components/select.d.mts +2 -10
  32. package/dist/components/select.mjs +8 -28
  33. package/dist/components/separator.d.mts +1 -1
  34. package/dist/components/sheet.d.mts +1 -1
  35. package/dist/components/sidebar.d.mts +1 -1
  36. package/dist/components/sidebar.mjs +8 -8
  37. package/dist/components/sonner.d.mts +1 -1
  38. package/dist/components/switch.d.mts +1 -1
  39. package/dist/components/table.d.mts +1 -1
  40. package/dist/components/tabs.d.mts +1 -1
  41. package/dist/components/tabs.mjs +1 -1
  42. package/dist/components/textarea.d.mts +3 -1
  43. package/dist/components/textarea.mjs +20 -11
  44. package/dist/components/toggle-group.d.mts +1 -1
  45. package/dist/components/toggle-group.mjs +1 -1
  46. package/dist/components/tooltip-icon-button.mjs +1 -1
  47. package/dist/components/tooltip.d.mts +1 -1
  48. package/package.json +10 -11
  49. package/src/components/combobox.tsx +1 -1
  50. package/src/components/dialog.tsx +2 -2
  51. package/src/components/form.tsx +343 -0
  52. package/src/components/input.tsx +12 -0
  53. package/src/components/select-trigger-variants.ts +1 -0
  54. package/src/components/select.tsx +2 -35
  55. package/src/components/sidebar.tsx +8 -10
  56. package/src/components/textarea.tsx +12 -1
  57. package/src/stories/accordion-card.stories.tsx +53 -0
  58. package/src/stories/accordion.stories.tsx +65 -0
  59. package/src/stories/alert.stories.tsx +58 -0
  60. package/src/stories/attachment-tile.stories.tsx +37 -0
  61. package/src/stories/avatar.stories.tsx +54 -0
  62. package/src/stories/badge.stories.tsx +50 -0
  63. package/src/stories/breadcrumb.stories.tsx +107 -0
  64. package/src/stories/button.stories.tsx +342 -0
  65. package/src/stories/card.stories.tsx +89 -0
  66. package/src/stories/checkbox.stories.tsx +56 -0
  67. package/src/stories/collapsible.stories.tsx +69 -0
  68. package/src/stories/combobox.stories.tsx +214 -0
  69. package/src/stories/command.stories.tsx +95 -0
  70. package/src/stories/copyable.stories.tsx +29 -0
  71. package/src/stories/description-list.stories.tsx +71 -0
  72. package/src/stories/dialog.stories.tsx +135 -0
  73. package/src/stories/dropdown-menu.stories.tsx +191 -0
  74. package/src/stories/form.stories.tsx +91 -0
  75. package/src/stories/input-group.stories.tsx +63 -0
  76. package/src/stories/input.stories.tsx +72 -0
  77. package/src/stories/label.stories.tsx +26 -0
  78. package/src/stories/ladle.css +3 -0
  79. package/src/stories/pagination.stories.tsx +35 -0
  80. package/src/stories/popover.stories.tsx +34 -0
  81. package/src/stories/radio-group.stories.tsx +59 -0
  82. package/src/stories/scroll-area.stories.tsx +43 -0
  83. package/src/stories/select.stories.tsx +95 -0
  84. package/src/stories/separator.stories.tsx +36 -0
  85. package/src/stories/sheet.stories.tsx +76 -0
  86. package/src/stories/sidebar.stories.tsx +255 -0
  87. package/src/stories/skeleton.stories.tsx +47 -0
  88. package/src/stories/sonner.stories.tsx +91 -0
  89. package/src/stories/spinner.stories.tsx +66 -0
  90. package/src/stories/status-dot.stories.tsx +27 -0
  91. package/src/stories/switch.stories.tsx +46 -0
  92. package/src/stories/table.stories.tsx +242 -0
  93. package/src/stories/tabs.stories.tsx +169 -0
  94. package/src/stories/tag.stories.tsx +82 -0
  95. package/src/stories/textarea.stories.tsx +60 -0
  96. package/src/stories/toggle-group.stories.tsx +142 -0
  97. package/src/stories/tooltip-icon-button.stories.tsx +59 -0
  98. package/src/stories/tooltip.stories.tsx +54 -0
  99. package/README.md +0 -33
@@ -0,0 +1,89 @@
1
+ import type { Story } from "@ladle/react";
2
+ import { Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle } from "../components/card";
3
+
4
+ export const AllVariants: Story = () => (
5
+ <div className="flex flex-col gap-6 max-w-md">
6
+ <div className="flex flex-col gap-1.5">
7
+ <p className="type-text-xs font-medium text-subtle-foreground">Basic card</p>
8
+ <Card>
9
+ <CardHeader>
10
+ <CardTitle>Project Settings</CardTitle>
11
+ <CardDescription>Manage your project configuration and preferences.</CardDescription>
12
+ </CardHeader>
13
+ <CardContent>
14
+ <p className="type-text-sm text-muted-foreground">
15
+ Configure your project's name, description, and other settings.
16
+ </p>
17
+ </CardContent>
18
+ </Card>
19
+ </div>
20
+
21
+ <div className="flex flex-col gap-1.5">
22
+ <p className="type-text-xs font-medium text-subtle-foreground">With footer</p>
23
+ <Card>
24
+ <CardHeader>
25
+ <CardTitle>Danger Zone</CardTitle>
26
+ <CardDescription>Irreversible actions for this project.</CardDescription>
27
+ </CardHeader>
28
+ <CardContent>
29
+ <p className="type-text-sm text-muted-foreground">
30
+ Deleting a project removes all associated data permanently.
31
+ </p>
32
+ </CardContent>
33
+ <CardFooter className="justify-end gap-3">
34
+ <button type="button" className="type-text-sm font-medium text-muted-foreground">
35
+ Cancel
36
+ </button>
37
+ <button type="button" className="type-text-sm font-medium text-destructive">
38
+ Delete Project
39
+ </button>
40
+ </CardFooter>
41
+ </Card>
42
+ </div>
43
+
44
+ <div className="flex flex-col gap-1.5">
45
+ <p className="type-text-xs font-medium text-subtle-foreground">With action slot</p>
46
+ <Card>
47
+ <CardHeader>
48
+ <CardTitle>Environment Variables</CardTitle>
49
+ <CardDescription>Secrets and configuration for your deployment.</CardDescription>
50
+ <CardAction>
51
+ <button type="button" className="type-text-sm font-medium text-primary">
52
+ Edit
53
+ </button>
54
+ </CardAction>
55
+ </CardHeader>
56
+ <CardContent>
57
+ <p className="type-text-sm text-muted-foreground">3 variables configured</p>
58
+ </CardContent>
59
+ </Card>
60
+ </div>
61
+
62
+ <div className="flex flex-col gap-1.5">
63
+ <p className="type-text-xs font-medium text-subtle-foreground">Content only (minimal)</p>
64
+ <Card>
65
+ <CardContent>
66
+ <p className="type-text-sm text-muted-foreground">A card with only content, no header or footer.</p>
67
+ </CardContent>
68
+ </Card>
69
+ </div>
70
+
71
+ <div className="flex flex-col gap-1.5">
72
+ <p className="type-text-xs font-medium text-subtle-foreground">Header with border separator</p>
73
+ <Card>
74
+ <CardHeader className="border-b">
75
+ <CardTitle>API Keys</CardTitle>
76
+ <CardDescription>Manage access tokens for external integrations.</CardDescription>
77
+ </CardHeader>
78
+ <CardContent>
79
+ <p className="type-text-sm text-muted-foreground">No API keys configured yet.</p>
80
+ </CardContent>
81
+ <CardFooter className="border-t justify-end">
82
+ <button type="button" className="type-text-sm font-medium text-primary">
83
+ Create Key
84
+ </button>
85
+ </CardFooter>
86
+ </Card>
87
+ </div>
88
+ </div>
89
+ );
@@ -0,0 +1,56 @@
1
+ import type { Story } from "@ladle/react";
2
+ import { useState } from "react";
3
+ import { Checkbox } from "../components/checkbox";
4
+ import { Label } from "../components/label";
5
+
6
+ export const AllVariants: Story = () => {
7
+ const [indeterminate, setIndeterminate] = useState<boolean | "indeterminate">("indeterminate");
8
+
9
+ return (
10
+ <div className="flex flex-col gap-6">
11
+ <div className="flex flex-col gap-1.5">
12
+ <p className="type-text-xs font-medium text-subtle-foreground">Unchecked</p>
13
+ <Checkbox />
14
+ </div>
15
+
16
+ <div className="flex flex-col gap-1.5">
17
+ <p className="type-text-xs font-medium text-subtle-foreground">Checked</p>
18
+ <Checkbox defaultChecked />
19
+ </div>
20
+
21
+ <div className="flex flex-col gap-1.5">
22
+ <p className="type-text-xs font-medium text-subtle-foreground">Indeterminate</p>
23
+ <Checkbox checked={indeterminate} onCheckedChange={setIndeterminate} />
24
+ </div>
25
+
26
+ <div className="flex flex-col gap-1.5">
27
+ <p className="type-text-xs font-medium text-subtle-foreground">Disabled (unchecked)</p>
28
+ <Checkbox disabled />
29
+ </div>
30
+
31
+ <div className="flex flex-col gap-1.5">
32
+ <p className="type-text-xs font-medium text-subtle-foreground">Disabled (checked)</p>
33
+ <Checkbox disabled defaultChecked />
34
+ </div>
35
+
36
+ <div className="flex flex-col gap-1.5">
37
+ <p className="type-text-xs font-medium text-subtle-foreground">With label</p>
38
+ <div className="flex items-center gap-2">
39
+ <Checkbox id="with-label" />
40
+ <Label htmlFor="with-label">Remember me</Label>
41
+ </div>
42
+ </div>
43
+
44
+ <div className="flex flex-col gap-1.5">
45
+ <p className="type-text-xs font-medium text-subtle-foreground">With label and description</p>
46
+ <div className="flex gap-2">
47
+ <Checkbox id="with-description" className="mt-0.5" />
48
+ <div className="flex flex-col">
49
+ <Label htmlFor="with-description">Remember me</Label>
50
+ <p className="type-text-sm text-subtle-foreground">Save my login details for next time.</p>
51
+ </div>
52
+ </div>
53
+ </div>
54
+ </div>
55
+ );
56
+ };
@@ -0,0 +1,69 @@
1
+ import type { Story } from "@ladle/react";
2
+ import { ChevronDownIcon } from "lucide-react";
3
+ import { useState } from "react";
4
+ import { Button } from "../components/button";
5
+ import { Collapsible, CollapsibleContent, CollapsibleTrigger } from "../components/collapsible";
6
+
7
+ export const AllVariants: Story = () => {
8
+ const [defaultOpen, setDefaultOpen] = useState(true);
9
+ const [controlledOpen, setControlledOpen] = useState(false);
10
+
11
+ return (
12
+ <div className="flex flex-col gap-8 p-6">
13
+ <div className="flex flex-col gap-1.5">
14
+ <p className="type-text-xs font-medium text-subtle-foreground">Default open</p>
15
+ <Collapsible open={defaultOpen} onOpenChange={setDefaultOpen}>
16
+ <CollapsibleTrigger asChild>
17
+ <Button variant="secondary" className="w-full justify-between">
18
+ Toggle section
19
+ <ChevronDownIcon
20
+ className={`size-4 transition-transform duration-200 ${defaultOpen ? "rotate-180" : ""}`}
21
+ />
22
+ </Button>
23
+ </CollapsibleTrigger>
24
+ <CollapsibleContent className="pt-2">
25
+ <div className="rounded-md border border-border p-4 type-text-sm text-muted-foreground">
26
+ This content is visible by default and can be toggled.
27
+ </div>
28
+ </CollapsibleContent>
29
+ </Collapsible>
30
+ </div>
31
+
32
+ <div className="flex flex-col gap-1.5">
33
+ <p className="type-text-xs font-medium text-subtle-foreground">Collapsed by default</p>
34
+ <Collapsible open={controlledOpen} onOpenChange={setControlledOpen}>
35
+ <CollapsibleTrigger asChild>
36
+ <Button variant="secondary" className="w-full justify-between">
37
+ Show more details
38
+ <ChevronDownIcon
39
+ className={`size-4 transition-transform duration-200 ${controlledOpen ? "rotate-180" : ""}`}
40
+ />
41
+ </Button>
42
+ </CollapsibleTrigger>
43
+ <CollapsibleContent className="pt-2">
44
+ <div className="rounded-md border border-border p-4 type-text-sm text-muted-foreground">
45
+ Hidden content revealed on click.
46
+ </div>
47
+ </CollapsibleContent>
48
+ </Collapsible>
49
+ </div>
50
+
51
+ <div className="flex flex-col gap-1.5">
52
+ <p className="type-text-xs font-medium text-subtle-foreground">Disabled</p>
53
+ <Collapsible disabled>
54
+ <CollapsibleTrigger asChild>
55
+ <Button variant="secondary" className="w-full justify-between" disabled>
56
+ Cannot toggle
57
+ <ChevronDownIcon className="size-4" />
58
+ </Button>
59
+ </CollapsibleTrigger>
60
+ <CollapsibleContent className="pt-2">
61
+ <div className="rounded-md border border-border p-4 type-text-sm text-muted-foreground">
62
+ This content is not reachable.
63
+ </div>
64
+ </CollapsibleContent>
65
+ </Collapsible>
66
+ </div>
67
+ </div>
68
+ );
69
+ };
@@ -0,0 +1,214 @@
1
+ import type { Story } from "@ladle/react";
2
+ import { GitBranch, Globe, Plus } from "lucide-react";
3
+ import { useState } from "react";
4
+ import {
5
+ Combobox,
6
+ ComboboxContent,
7
+ ComboboxEmpty,
8
+ ComboboxGroup,
9
+ ComboboxItem,
10
+ ComboboxItemText,
11
+ ComboboxList,
12
+ ComboboxSearch,
13
+ ComboboxSeparator,
14
+ ComboboxTrigger,
15
+ } from "../components/combobox";
16
+ import { CommandItem } from "../components/command";
17
+
18
+ /* ── With search ──────────────────────────────────────────────────────────── */
19
+
20
+ const branches = ["main", "develop", "feature/auth", "feature/dashboard", "fix/login-bug", "release/v2.0"];
21
+
22
+ function SearchCombobox() {
23
+ const [value, setValue] = useState<string | null>("main");
24
+ return (
25
+ <Combobox value={value} onValueChange={setValue}>
26
+ <ComboboxTrigger size="md" placeholder="Select branch..." className="w-full">
27
+ <GitBranch className="size-4" />
28
+ {value}
29
+ </ComboboxTrigger>
30
+ <ComboboxContent>
31
+ <ComboboxSearch placeholder="Search branches..." />
32
+ <ComboboxList>
33
+ <ComboboxEmpty>No branches found.</ComboboxEmpty>
34
+ <ComboboxGroup>
35
+ {branches.map((branch) => (
36
+ <ComboboxItem key={branch} itemValue={branch}>
37
+ {branch}
38
+ </ComboboxItem>
39
+ ))}
40
+ </ComboboxGroup>
41
+ </ComboboxList>
42
+ </ComboboxContent>
43
+ </Combobox>
44
+ );
45
+ }
46
+
47
+ /* ── Custom trigger content (avatars + supporting text) ──────────────────── */
48
+
49
+ const people = [
50
+ { id: "olivia", name: "Olivia Rhye", handle: "@olivia" },
51
+ { id: "phoenix", name: "Phoenix Baker", handle: "@phoenix" },
52
+ { id: "lana", name: "Lana Steiner", handle: "@lana" },
53
+ { id: "demi", name: "Demi Wilkinson", handle: "@demi" },
54
+ ];
55
+
56
+ function AvatarCombobox() {
57
+ const [value, setValue] = useState<string | null>("olivia");
58
+ const selected = people.find((person) => person.id === value);
59
+ return (
60
+ <Combobox value={value} onValueChange={setValue}>
61
+ <ComboboxTrigger size="md" placeholder="Select team member..." className="w-full">
62
+ {selected && (
63
+ <>
64
+ <div className="flex size-5 items-center justify-center rounded-full bg-primary text-primary-foreground type-text-xs font-semibold">
65
+ {selected.name.charAt(0)}
66
+ </div>
67
+ {selected.name}
68
+ <ComboboxItemText>{selected.handle}</ComboboxItemText>
69
+ </>
70
+ )}
71
+ </ComboboxTrigger>
72
+ <ComboboxContent>
73
+ <ComboboxSearch placeholder="Search people..." />
74
+ <ComboboxList>
75
+ <ComboboxEmpty>No one found.</ComboboxEmpty>
76
+ <ComboboxGroup>
77
+ {people.map((person) => (
78
+ <ComboboxItem key={person.id} itemValue={person.id}>
79
+ <div className="flex size-5 items-center justify-center rounded-full bg-primary text-primary-foreground type-text-xs font-semibold">
80
+ {person.name.charAt(0)}
81
+ </div>
82
+ {person.name}
83
+ <ComboboxItemText>{person.handle}</ComboboxItemText>
84
+ </ComboboxItem>
85
+ ))}
86
+ </ComboboxGroup>
87
+ </ComboboxList>
88
+ </ComboboxContent>
89
+ </Combobox>
90
+ );
91
+ }
92
+
93
+ /* ── With CommandItem action ─────────────────────────────────────────────── */
94
+
95
+ const namespaces = [
96
+ { id: "acme", name: "acme-corp" },
97
+ { id: "personal", name: "johndoe" },
98
+ ];
99
+
100
+ function CommandActionCombobox() {
101
+ const [value, setValue] = useState<string | null>("acme");
102
+ const selected = namespaces.find((ns) => ns.id === value);
103
+ return (
104
+ <Combobox value={value} onValueChange={setValue}>
105
+ <ComboboxTrigger size="sm" placeholder="Select account..." className="w-full">
106
+ {selected?.name}
107
+ </ComboboxTrigger>
108
+ <ComboboxContent>
109
+ <ComboboxList>
110
+ <ComboboxGroup>
111
+ {namespaces.map((ns) => (
112
+ <ComboboxItem key={ns.id} itemValue={ns.id}>
113
+ {ns.name}
114
+ </ComboboxItem>
115
+ ))}
116
+ </ComboboxGroup>
117
+ <ComboboxSeparator />
118
+ <ComboboxGroup>
119
+ <CommandItem onSelect={() => alert("Add account action triggered")}>
120
+ <Plus />
121
+ <span>Add Account</span>
122
+ </CommandItem>
123
+ </ComboboxGroup>
124
+ </ComboboxList>
125
+ </ComboboxContent>
126
+ </Combobox>
127
+ );
128
+ }
129
+
130
+ /* ── Grouped with headings ───────────────────────────────────────────────── */
131
+
132
+ function GroupedCombobox() {
133
+ const [value, setValue] = useState<string | null>(null);
134
+ return (
135
+ <Combobox value={value} onValueChange={setValue}>
136
+ <ComboboxTrigger size="md" placeholder="Select a region..." className="w-full">
137
+ <Globe className="size-4" />
138
+ {value}
139
+ </ComboboxTrigger>
140
+ <ComboboxContent>
141
+ <ComboboxList>
142
+ <ComboboxGroup heading="North America">
143
+ <ComboboxItem itemValue="us-east-1">US East (N. Virginia)</ComboboxItem>
144
+ <ComboboxItem itemValue="us-west-2">US West (Oregon)</ComboboxItem>
145
+ </ComboboxGroup>
146
+ <ComboboxSeparator />
147
+ <ComboboxGroup heading="Europe">
148
+ <ComboboxItem itemValue="eu-west-1">EU West (Ireland)</ComboboxItem>
149
+ <ComboboxItem itemValue="eu-central-1">EU Central (Frankfurt)</ComboboxItem>
150
+ </ComboboxGroup>
151
+ </ComboboxList>
152
+ </ComboboxContent>
153
+ </Combobox>
154
+ );
155
+ }
156
+
157
+ /* ── Multi-select with tags ───────────────────────────────────────────────── */
158
+
159
+ function MultiCombobox() {
160
+ const [values, setValues] = useState<string[]>(["phoenix", "olivia"]);
161
+ return (
162
+ <Combobox multiple value={values} onValueChange={setValues}>
163
+ <ComboboxTrigger size="md" placeholder="Select team members..." className="w-full" />
164
+ <ComboboxContent>
165
+ <ComboboxSearch placeholder="Search people..." />
166
+ <ComboboxList>
167
+ <ComboboxEmpty>No one found.</ComboboxEmpty>
168
+ <ComboboxGroup>
169
+ {people.map((person) => (
170
+ <ComboboxItem key={person.id} itemValue={person.id}>
171
+ <div className="flex size-5 items-center justify-center rounded-full bg-primary text-primary-foreground type-text-xs font-semibold">
172
+ {person.name.charAt(0)}
173
+ </div>
174
+ {person.name}
175
+ <ComboboxItemText>{person.handle}</ComboboxItemText>
176
+ </ComboboxItem>
177
+ ))}
178
+ </ComboboxGroup>
179
+ </ComboboxList>
180
+ </ComboboxContent>
181
+ </Combobox>
182
+ );
183
+ }
184
+
185
+ /* ── Story ────────────────────────────────────────────────────────────────── */
186
+
187
+ export const AllVariants: Story = () => (
188
+ <div className="grid grid-cols-1 gap-10 p-10 md:grid-cols-2">
189
+ <div className="flex flex-col gap-1.5">
190
+ <p className="type-text-xs font-medium text-subtle-foreground">Search with filtering</p>
191
+ <SearchCombobox />
192
+ </div>
193
+
194
+ <div className="flex flex-col gap-1.5">
195
+ <p className="type-text-xs font-medium text-subtle-foreground">Custom trigger (avatars + supporting text)</p>
196
+ <AvatarCombobox />
197
+ </div>
198
+
199
+ <div className="flex flex-col gap-1.5">
200
+ <p className="type-text-xs font-medium text-subtle-foreground">CommandItem action (Add Account)</p>
201
+ <CommandActionCombobox />
202
+ </div>
203
+
204
+ <div className="flex flex-col gap-1.5">
205
+ <p className="type-text-xs font-medium text-subtle-foreground">Grouped with headings</p>
206
+ <GroupedCombobox />
207
+ </div>
208
+
209
+ <div className="flex flex-col gap-1.5 md:col-span-2">
210
+ <p className="type-text-xs font-medium text-subtle-foreground">Multi-select with tags</p>
211
+ <MultiCombobox />
212
+ </div>
213
+ </div>
214
+ );
@@ -0,0 +1,95 @@
1
+ import type { Story } from "@ladle/react";
2
+ import { Calculator, Calendar, CreditCard, Settings, Smile, User } from "lucide-react";
3
+
4
+ import {
5
+ Command,
6
+ CommandEmpty,
7
+ CommandGroup,
8
+ CommandInput,
9
+ CommandItem,
10
+ CommandList,
11
+ CommandSeparator,
12
+ CommandShortcut,
13
+ } from "../components/command";
14
+
15
+ export const AllVariants: Story = () => (
16
+ <div className="flex flex-col gap-8">
17
+ <div className="flex flex-col gap-1.5">
18
+ <p className="type-text-xs font-medium text-subtle-foreground">Default with groups</p>
19
+ <Command className="max-w-[400px] rounded-lg border shadow-md">
20
+ <CommandInput placeholder="Type a command or search..." />
21
+ <CommandList>
22
+ <CommandEmpty>No results found.</CommandEmpty>
23
+ <CommandGroup heading="Suggestions">
24
+ <CommandItem>
25
+ <Calendar />
26
+ <span>Calendar</span>
27
+ </CommandItem>
28
+ <CommandItem>
29
+ <Smile />
30
+ <span>Search Emoji</span>
31
+ </CommandItem>
32
+ <CommandItem>
33
+ <Calculator />
34
+ <span>Calculator</span>
35
+ </CommandItem>
36
+ </CommandGroup>
37
+ <CommandSeparator />
38
+ <CommandGroup heading="Settings">
39
+ <CommandItem>
40
+ <User />
41
+ <span>Profile</span>
42
+ <CommandShortcut>⌘P</CommandShortcut>
43
+ </CommandItem>
44
+ <CommandItem>
45
+ <CreditCard />
46
+ <span>Billing</span>
47
+ <CommandShortcut>⌘B</CommandShortcut>
48
+ </CommandItem>
49
+ <CommandItem>
50
+ <Settings />
51
+ <span>Settings</span>
52
+ <CommandShortcut>⌘S</CommandShortcut>
53
+ </CommandItem>
54
+ </CommandGroup>
55
+ </CommandList>
56
+ </Command>
57
+ </div>
58
+
59
+ <div className="flex flex-col gap-1.5">
60
+ <p className="type-text-xs font-medium text-subtle-foreground">Disabled items</p>
61
+ <Command className="max-w-[400px] rounded-lg border shadow-md">
62
+ <CommandInput placeholder="Search..." />
63
+ <CommandList>
64
+ <CommandEmpty>No results found.</CommandEmpty>
65
+ <CommandGroup heading="Actions">
66
+ <CommandItem>
67
+ <Calendar />
68
+ <span>Available action</span>
69
+ </CommandItem>
70
+ <CommandItem disabled>
71
+ <Settings />
72
+ <span>Disabled action</span>
73
+ </CommandItem>
74
+ </CommandGroup>
75
+ </CommandList>
76
+ </Command>
77
+ </div>
78
+
79
+ <div className="flex flex-col gap-1.5">
80
+ <p className="type-text-xs font-medium text-subtle-foreground">Empty state</p>
81
+ <Command className="max-w-[400px] rounded-lg border shadow-md">
82
+ <CommandInput placeholder="Search..." value="zzzzz" />
83
+ <CommandList>
84
+ <CommandEmpty>No results found.</CommandEmpty>
85
+ <CommandGroup heading="Items">
86
+ <CommandItem>
87
+ <Calendar />
88
+ <span>Calendar</span>
89
+ </CommandItem>
90
+ </CommandGroup>
91
+ </CommandList>
92
+ </Command>
93
+ </div>
94
+ </div>
95
+ );
@@ -0,0 +1,29 @@
1
+ import type { Story } from "@ladle/react";
2
+ import { Copyable, CopyableUrl } from "../components/copyable";
3
+
4
+ export const AllVariants: Story = () => (
5
+ <div className="flex flex-col gap-6">
6
+ <div className="flex flex-col gap-1.5">
7
+ <p className="type-text-xs font-medium text-subtle-foreground">With plain text</p>
8
+ <Copyable content="sk-1234-abcd-5678">
9
+ <span className="type-text-sm font-mono">sk-1234-abcd-5678</span>
10
+ </Copyable>
11
+ </div>
12
+ <div className="flex flex-col gap-1.5">
13
+ <p className="type-text-xs font-medium text-subtle-foreground">With URL</p>
14
+ <Copyable content="https://api.example.com/v1">
15
+ <span className="type-text-sm font-semibold">api.example.com</span>
16
+ </Copyable>
17
+ </div>
18
+ <div className="flex flex-col gap-1.5">
19
+ <p className="type-text-xs font-medium text-subtle-foreground">With styled content</p>
20
+ <Copyable content="npm install @alpic/sdk">
21
+ <code className="type-text-sm rounded-sm bg-muted px-1.5 py-0.5 font-mono">npm install @alpic/sdk</code>
22
+ </Copyable>
23
+ </div>
24
+ <div className="flex flex-col gap-1.5">
25
+ <p className="type-text-xs font-medium text-subtle-foreground">CopyableUrl</p>
26
+ <CopyableUrl url={new URL("https://api.example.com/v1/mcp")} />
27
+ </div>
28
+ </div>
29
+ );
@@ -0,0 +1,71 @@
1
+ import type { Story } from "@ladle/react";
2
+ import { DescriptionItem, DescriptionList, DescriptionTitle, DescriptionValue } from "../components/description-list";
3
+
4
+ export const AllVariants: Story = () => (
5
+ <div className="flex flex-col gap-10">
6
+ <div className="flex flex-col gap-1.5">
7
+ <p className="type-text-xs font-medium text-subtle-foreground">Default — 4 columns on xl</p>
8
+ <DescriptionList>
9
+ <DescriptionItem>
10
+ <DescriptionTitle>Status</DescriptionTitle>
11
+ <DescriptionValue>Deployed</DescriptionValue>
12
+ </DescriptionItem>
13
+ <DescriptionItem>
14
+ <DescriptionTitle>Duration</DescriptionTitle>
15
+ <DescriptionValue>2m 34s</DescriptionValue>
16
+ </DescriptionItem>
17
+ <DescriptionItem>
18
+ <DescriptionTitle>Branch</DescriptionTitle>
19
+ <DescriptionValue>main</DescriptionValue>
20
+ </DescriptionItem>
21
+ <DescriptionItem>
22
+ <DescriptionTitle>Created by</DescriptionTitle>
23
+ <DescriptionValue>val</DescriptionValue>
24
+ </DescriptionItem>
25
+ </DescriptionList>
26
+ </div>
27
+
28
+ <div className="flex flex-col gap-1.5">
29
+ <p className="type-text-xs font-medium text-subtle-foreground">Spanning columns</p>
30
+ <DescriptionList>
31
+ <DescriptionItem className="xl:col-span-2">
32
+ <DescriptionTitle>Name</DescriptionTitle>
33
+ <DescriptionValue>Production Environment</DescriptionValue>
34
+ </DescriptionItem>
35
+ <DescriptionItem className="xl:col-span-2">
36
+ <DescriptionTitle>Live URL</DescriptionTitle>
37
+ <DescriptionValue>https://my-server.alpic.dev/sse</DescriptionValue>
38
+ </DescriptionItem>
39
+ </DescriptionList>
40
+ </div>
41
+
42
+ <div className="flex flex-col gap-1.5">
43
+ <p className="type-text-xs font-medium text-subtle-foreground">With muted placeholder values</p>
44
+ <DescriptionList>
45
+ <DescriptionItem>
46
+ <DescriptionTitle>Branch</DescriptionTitle>
47
+ <DescriptionValue className="text-muted-foreground">No branch tracked</DescriptionValue>
48
+ </DescriptionItem>
49
+ <DescriptionItem>
50
+ <DescriptionTitle>Domain</DescriptionTitle>
51
+ <DescriptionValue className="text-muted-foreground">No domain configured</DescriptionValue>
52
+ </DescriptionItem>
53
+ </DescriptionList>
54
+ </div>
55
+
56
+ <div className="flex flex-col gap-1.5">
57
+ <p className="type-text-xs font-medium text-subtle-foreground">Truncation on long values</p>
58
+ <div className="max-w-md">
59
+ <DescriptionList className="grid-cols-1">
60
+ <DescriptionItem>
61
+ <DescriptionTitle>Commit message</DescriptionTitle>
62
+ <DescriptionValue>
63
+ fix: resolve issue with authentication middleware causing session tokens to be stored incorrectly in
64
+ production environments
65
+ </DescriptionValue>
66
+ </DescriptionItem>
67
+ </DescriptionList>
68
+ </div>
69
+ </div>
70
+ </div>
71
+ );