@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.
- package/dist/components/accordion-card.d.mts +1 -1
- package/dist/components/accordion.d.mts +1 -1
- package/dist/components/alert.d.mts +1 -1
- package/dist/components/attachment-tile.mjs +1 -1
- package/dist/components/avatar.d.mts +1 -1
- package/dist/components/breadcrumb.d.mts +1 -1
- package/dist/components/button.d.mts +1 -1
- package/dist/components/card.d.mts +1 -1
- package/dist/components/checkbox.d.mts +1 -1
- package/dist/components/collapsible.d.mts +1 -1
- package/dist/components/combobox.d.mts +1 -1
- package/dist/components/combobox.mjs +2 -2
- package/dist/components/command.d.mts +1 -1
- package/dist/components/copyable.d.mts +1 -1
- package/dist/components/copyable.mjs +1 -1
- package/dist/components/description-list.d.mts +1 -1
- package/dist/components/dialog.d.mts +1 -1
- package/dist/components/dialog.mjs +2 -2
- package/dist/components/dropdown-menu.d.mts +1 -1
- package/dist/components/form.d.mts +119 -0
- package/dist/components/form.mjs +192 -0
- package/dist/components/input-group.d.mts +1 -1
- package/dist/components/input.d.mts +3 -1
- package/dist/components/input.mjs +20 -11
- package/dist/components/label.d.mts +1 -1
- package/dist/components/pagination.d.mts +1 -1
- package/dist/components/popover.d.mts +1 -1
- package/dist/components/radio-group.d.mts +1 -1
- package/dist/components/scroll-area.d.mts +1 -1
- package/dist/components/select-trigger-variants.mjs +1 -0
- package/dist/components/select.d.mts +2 -10
- package/dist/components/select.mjs +8 -28
- package/dist/components/separator.d.mts +1 -1
- package/dist/components/sheet.d.mts +1 -1
- package/dist/components/sidebar.d.mts +1 -1
- package/dist/components/sidebar.mjs +8 -8
- package/dist/components/sonner.d.mts +1 -1
- package/dist/components/switch.d.mts +1 -1
- package/dist/components/table.d.mts +1 -1
- package/dist/components/tabs.d.mts +1 -1
- package/dist/components/tabs.mjs +1 -1
- package/dist/components/textarea.d.mts +3 -1
- package/dist/components/textarea.mjs +20 -11
- package/dist/components/toggle-group.d.mts +1 -1
- package/dist/components/toggle-group.mjs +1 -1
- package/dist/components/tooltip-icon-button.mjs +1 -1
- package/dist/components/tooltip.d.mts +1 -1
- package/package.json +10 -11
- package/src/components/combobox.tsx +1 -1
- package/src/components/dialog.tsx +2 -2
- package/src/components/form.tsx +343 -0
- package/src/components/input.tsx +12 -0
- package/src/components/select-trigger-variants.ts +1 -0
- package/src/components/select.tsx +2 -35
- package/src/components/sidebar.tsx +8 -10
- package/src/components/textarea.tsx +12 -1
- package/src/stories/accordion-card.stories.tsx +53 -0
- package/src/stories/accordion.stories.tsx +65 -0
- package/src/stories/alert.stories.tsx +58 -0
- package/src/stories/attachment-tile.stories.tsx +37 -0
- package/src/stories/avatar.stories.tsx +54 -0
- package/src/stories/badge.stories.tsx +50 -0
- package/src/stories/breadcrumb.stories.tsx +107 -0
- package/src/stories/button.stories.tsx +342 -0
- package/src/stories/card.stories.tsx +89 -0
- package/src/stories/checkbox.stories.tsx +56 -0
- package/src/stories/collapsible.stories.tsx +69 -0
- package/src/stories/combobox.stories.tsx +214 -0
- package/src/stories/command.stories.tsx +95 -0
- package/src/stories/copyable.stories.tsx +29 -0
- package/src/stories/description-list.stories.tsx +71 -0
- package/src/stories/dialog.stories.tsx +135 -0
- package/src/stories/dropdown-menu.stories.tsx +191 -0
- package/src/stories/form.stories.tsx +91 -0
- package/src/stories/input-group.stories.tsx +63 -0
- package/src/stories/input.stories.tsx +72 -0
- package/src/stories/label.stories.tsx +26 -0
- package/src/stories/ladle.css +3 -0
- package/src/stories/pagination.stories.tsx +35 -0
- package/src/stories/popover.stories.tsx +34 -0
- package/src/stories/radio-group.stories.tsx +59 -0
- package/src/stories/scroll-area.stories.tsx +43 -0
- package/src/stories/select.stories.tsx +95 -0
- package/src/stories/separator.stories.tsx +36 -0
- package/src/stories/sheet.stories.tsx +76 -0
- package/src/stories/sidebar.stories.tsx +255 -0
- package/src/stories/skeleton.stories.tsx +47 -0
- package/src/stories/sonner.stories.tsx +91 -0
- package/src/stories/spinner.stories.tsx +66 -0
- package/src/stories/status-dot.stories.tsx +27 -0
- package/src/stories/switch.stories.tsx +46 -0
- package/src/stories/table.stories.tsx +242 -0
- package/src/stories/tabs.stories.tsx +169 -0
- package/src/stories/tag.stories.tsx +82 -0
- package/src/stories/textarea.stories.tsx +60 -0
- package/src/stories/toggle-group.stories.tsx +142 -0
- package/src/stories/tooltip-icon-button.stories.tsx +59 -0
- package/src/stories/tooltip.stories.tsx +54 -0
- package/README.md +0 -33
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import type { Story } from "@ladle/react";
|
|
2
|
+
import { Tag, TagCount, TagDismissible } from "../components/tag";
|
|
3
|
+
|
|
4
|
+
const PlaceholderIcon = () => (
|
|
5
|
+
<svg
|
|
6
|
+
aria-hidden="true"
|
|
7
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
8
|
+
width="16"
|
|
9
|
+
height="16"
|
|
10
|
+
viewBox="0 0 24 24"
|
|
11
|
+
fill="none"
|
|
12
|
+
stroke="currentColor"
|
|
13
|
+
strokeWidth="2"
|
|
14
|
+
strokeLinecap="round"
|
|
15
|
+
strokeLinejoin="round"
|
|
16
|
+
>
|
|
17
|
+
<circle cx="12" cy="12" r="10" />
|
|
18
|
+
</svg>
|
|
19
|
+
);
|
|
20
|
+
|
|
21
|
+
export const AllVariants: Story = () => (
|
|
22
|
+
<div className="flex flex-col gap-6">
|
|
23
|
+
<div className="flex flex-col gap-1.5">
|
|
24
|
+
<p className="type-text-xs font-medium text-subtle-foreground">Text only</p>
|
|
25
|
+
<div className="flex gap-1.5">
|
|
26
|
+
<Tag>Design</Tag>
|
|
27
|
+
<Tag>Engineering</Tag>
|
|
28
|
+
<Tag>Product</Tag>
|
|
29
|
+
</div>
|
|
30
|
+
</div>
|
|
31
|
+
|
|
32
|
+
<div className="flex flex-col gap-1.5">
|
|
33
|
+
<p className="type-text-xs font-medium text-subtle-foreground">Text only + icon</p>
|
|
34
|
+
<div className="flex gap-1.5">
|
|
35
|
+
<Tag icon={<PlaceholderIcon />}>Design</Tag>
|
|
36
|
+
<Tag icon={<PlaceholderIcon />}>Engineering</Tag>
|
|
37
|
+
</div>
|
|
38
|
+
</div>
|
|
39
|
+
|
|
40
|
+
<div className="flex flex-col gap-1.5">
|
|
41
|
+
<p className="type-text-xs font-medium text-subtle-foreground">Dismissible</p>
|
|
42
|
+
<div className="flex gap-1.5">
|
|
43
|
+
<TagDismissible onDismiss={() => {}}>Olivia</TagDismissible>
|
|
44
|
+
<TagDismissible onDismiss={() => {}}>Phoenix</TagDismissible>
|
|
45
|
+
<TagDismissible onDismiss={() => {}}>Lana</TagDismissible>
|
|
46
|
+
</div>
|
|
47
|
+
</div>
|
|
48
|
+
|
|
49
|
+
<div className="flex flex-col gap-1.5">
|
|
50
|
+
<p className="type-text-xs font-medium text-subtle-foreground">Dismissible + icon</p>
|
|
51
|
+
<div className="flex gap-1.5">
|
|
52
|
+
<TagDismissible icon={<PlaceholderIcon />} onDismiss={() => {}}>
|
|
53
|
+
Label
|
|
54
|
+
</TagDismissible>
|
|
55
|
+
<TagDismissible icon={<PlaceholderIcon />} onDismiss={() => {}}>
|
|
56
|
+
Design
|
|
57
|
+
</TagDismissible>
|
|
58
|
+
</div>
|
|
59
|
+
</div>
|
|
60
|
+
|
|
61
|
+
<div className="flex flex-col gap-1.5">
|
|
62
|
+
<p className="type-text-xs font-medium text-subtle-foreground">Count</p>
|
|
63
|
+
<div className="flex gap-1.5">
|
|
64
|
+
<TagCount count={5}>Label</TagCount>
|
|
65
|
+
<TagCount count={3}>Product</TagCount>
|
|
66
|
+
<TagCount count={12}>Engineering</TagCount>
|
|
67
|
+
</div>
|
|
68
|
+
</div>
|
|
69
|
+
|
|
70
|
+
<div className="flex flex-col gap-1.5">
|
|
71
|
+
<p className="type-text-xs font-medium text-subtle-foreground">Count + icon</p>
|
|
72
|
+
<div className="flex gap-1.5">
|
|
73
|
+
<TagCount icon={<PlaceholderIcon />} count={5}>
|
|
74
|
+
Label
|
|
75
|
+
</TagCount>
|
|
76
|
+
<TagCount icon={<PlaceholderIcon />} count={3}>
|
|
77
|
+
Product
|
|
78
|
+
</TagCount>
|
|
79
|
+
</div>
|
|
80
|
+
</div>
|
|
81
|
+
</div>
|
|
82
|
+
);
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { Textarea } from "../components/textarea";
|
|
2
|
+
|
|
3
|
+
const SECTION_HEADER = "type-text-xs text-muted-foreground font-semibold uppercase tracking-wide pt-4";
|
|
4
|
+
|
|
5
|
+
export const AllVariants = () => {
|
|
6
|
+
return (
|
|
7
|
+
<div className="flex flex-col gap-6 p-8 max-w-sm">
|
|
8
|
+
<span className={SECTION_HEADER}>Default</span>
|
|
9
|
+
<Textarea id="default" placeholder="Enter a description..." />
|
|
10
|
+
|
|
11
|
+
<span className={SECTION_HEADER}>With label</span>
|
|
12
|
+
<Textarea id="with-label" label="Description" placeholder="Enter a description..." />
|
|
13
|
+
|
|
14
|
+
<span className={SECTION_HEADER}>Required + hint</span>
|
|
15
|
+
<Textarea
|
|
16
|
+
id="required-hint"
|
|
17
|
+
label="Description"
|
|
18
|
+
required
|
|
19
|
+
placeholder="Enter a description..."
|
|
20
|
+
hint="This is a hint text to help user."
|
|
21
|
+
/>
|
|
22
|
+
|
|
23
|
+
<span className={SECTION_HEADER}>With tooltip</span>
|
|
24
|
+
<Textarea
|
|
25
|
+
id="with-tooltip"
|
|
26
|
+
label="Description"
|
|
27
|
+
required
|
|
28
|
+
tooltip="Briefly describe what this project is about."
|
|
29
|
+
placeholder="Enter a description..."
|
|
30
|
+
/>
|
|
31
|
+
|
|
32
|
+
<span className={SECTION_HEADER}>Filled</span>
|
|
33
|
+
<Textarea
|
|
34
|
+
id="filled"
|
|
35
|
+
label="Description"
|
|
36
|
+
required
|
|
37
|
+
defaultValue="A little about the company and the team that you'll be working with."
|
|
38
|
+
hint="This is a hint text to help user."
|
|
39
|
+
/>
|
|
40
|
+
|
|
41
|
+
<span className={SECTION_HEADER}>Error</span>
|
|
42
|
+
<Textarea
|
|
43
|
+
id="error"
|
|
44
|
+
label="Description"
|
|
45
|
+
required
|
|
46
|
+
placeholder="Enter a description..."
|
|
47
|
+
error="Description is required."
|
|
48
|
+
/>
|
|
49
|
+
|
|
50
|
+
<span className={SECTION_HEADER}>Disabled</span>
|
|
51
|
+
<Textarea
|
|
52
|
+
id="disabled"
|
|
53
|
+
label="Description"
|
|
54
|
+
placeholder="Enter a description..."
|
|
55
|
+
hint="This is a hint text to help user."
|
|
56
|
+
disabled
|
|
57
|
+
/>
|
|
58
|
+
</div>
|
|
59
|
+
);
|
|
60
|
+
};
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
import { Bold, Bug, CircleX, Info, Italic, Strikethrough, TriangleAlert, Underline } from "lucide-react";
|
|
2
|
+
|
|
3
|
+
import { ToggleGroup, ToggleGroupItem } from "../components/toggle-group";
|
|
4
|
+
|
|
5
|
+
const SECTION_HEADER = "type-text-xs text-muted-foreground font-semibold uppercase tracking-wide pt-4";
|
|
6
|
+
const ROW = "flex items-center gap-4";
|
|
7
|
+
const LABEL = "type-text-xs text-muted-foreground w-20 shrink-0";
|
|
8
|
+
|
|
9
|
+
export const AllVariants = () => (
|
|
10
|
+
<div className="flex flex-col gap-4 p-8">
|
|
11
|
+
{/* ── Default variant ──────────────────────────────────────────────── */}
|
|
12
|
+
<span className={SECTION_HEADER}>Default variant</span>
|
|
13
|
+
|
|
14
|
+
<div className={ROW}>
|
|
15
|
+
<span className={LABEL}>Single</span>
|
|
16
|
+
<ToggleGroup type="single" defaultValue="bold">
|
|
17
|
+
<ToggleGroupItem value="bold" aria-label="Bold">
|
|
18
|
+
<Bold />
|
|
19
|
+
</ToggleGroupItem>
|
|
20
|
+
<ToggleGroupItem value="italic" aria-label="Italic">
|
|
21
|
+
<Italic />
|
|
22
|
+
</ToggleGroupItem>
|
|
23
|
+
<ToggleGroupItem value="underline" aria-label="Underline">
|
|
24
|
+
<Underline />
|
|
25
|
+
</ToggleGroupItem>
|
|
26
|
+
<ToggleGroupItem value="strikethrough" aria-label="Strikethrough">
|
|
27
|
+
<Strikethrough />
|
|
28
|
+
</ToggleGroupItem>
|
|
29
|
+
</ToggleGroup>
|
|
30
|
+
</div>
|
|
31
|
+
|
|
32
|
+
<div className={ROW}>
|
|
33
|
+
<span className={LABEL}>Multiple</span>
|
|
34
|
+
<ToggleGroup type="multiple" defaultValue={["bold", "italic"]}>
|
|
35
|
+
<ToggleGroupItem value="bold" aria-label="Bold">
|
|
36
|
+
<Bold />
|
|
37
|
+
</ToggleGroupItem>
|
|
38
|
+
<ToggleGroupItem value="italic" aria-label="Italic">
|
|
39
|
+
<Italic />
|
|
40
|
+
</ToggleGroupItem>
|
|
41
|
+
<ToggleGroupItem value="underline" aria-label="Underline">
|
|
42
|
+
<Underline />
|
|
43
|
+
</ToggleGroupItem>
|
|
44
|
+
</ToggleGroup>
|
|
45
|
+
</div>
|
|
46
|
+
|
|
47
|
+
{/* ── Outline variant ─────────────────────────────────────────────── */}
|
|
48
|
+
<span className={SECTION_HEADER}>Outline variant</span>
|
|
49
|
+
|
|
50
|
+
<div className={ROW}>
|
|
51
|
+
<span className={LABEL}>Single</span>
|
|
52
|
+
<ToggleGroup variant="outline" type="single" defaultValue="bold">
|
|
53
|
+
<ToggleGroupItem value="bold" aria-label="Bold">
|
|
54
|
+
<Bold />
|
|
55
|
+
</ToggleGroupItem>
|
|
56
|
+
<ToggleGroupItem value="italic" aria-label="Italic">
|
|
57
|
+
<Italic />
|
|
58
|
+
</ToggleGroupItem>
|
|
59
|
+
<ToggleGroupItem value="underline" aria-label="Underline">
|
|
60
|
+
<Underline />
|
|
61
|
+
</ToggleGroupItem>
|
|
62
|
+
</ToggleGroup>
|
|
63
|
+
</div>
|
|
64
|
+
|
|
65
|
+
<div className={ROW}>
|
|
66
|
+
<span className={LABEL}>Multiple</span>
|
|
67
|
+
<ToggleGroup variant="outline" type="multiple" defaultValue={["bold", "italic"]}>
|
|
68
|
+
<ToggleGroupItem value="bold" aria-label="Bold">
|
|
69
|
+
<Bold />
|
|
70
|
+
</ToggleGroupItem>
|
|
71
|
+
<ToggleGroupItem value="italic" aria-label="Italic">
|
|
72
|
+
<Italic />
|
|
73
|
+
</ToggleGroupItem>
|
|
74
|
+
<ToggleGroupItem value="underline" aria-label="Underline">
|
|
75
|
+
<Underline />
|
|
76
|
+
</ToggleGroupItem>
|
|
77
|
+
</ToggleGroup>
|
|
78
|
+
</div>
|
|
79
|
+
|
|
80
|
+
{/* ── Sizes ───────────────────────────────────────────────────────── */}
|
|
81
|
+
<span className={SECTION_HEADER}>Sizes</span>
|
|
82
|
+
|
|
83
|
+
<div className={ROW}>
|
|
84
|
+
<span className={LABEL}>Default</span>
|
|
85
|
+
<ToggleGroup variant="outline" type="single" defaultValue="bold">
|
|
86
|
+
<ToggleGroupItem value="bold" aria-label="Bold">
|
|
87
|
+
<Bold />
|
|
88
|
+
</ToggleGroupItem>
|
|
89
|
+
<ToggleGroupItem value="italic" aria-label="Italic">
|
|
90
|
+
<Italic />
|
|
91
|
+
</ToggleGroupItem>
|
|
92
|
+
</ToggleGroup>
|
|
93
|
+
</div>
|
|
94
|
+
|
|
95
|
+
<div className={ROW}>
|
|
96
|
+
<span className={LABEL}>Small</span>
|
|
97
|
+
<ToggleGroup variant="outline" type="single" size="sm" defaultValue="bold">
|
|
98
|
+
<ToggleGroupItem value="bold" aria-label="Bold">
|
|
99
|
+
<Bold />
|
|
100
|
+
</ToggleGroupItem>
|
|
101
|
+
<ToggleGroupItem value="italic" aria-label="Italic">
|
|
102
|
+
<Italic />
|
|
103
|
+
</ToggleGroupItem>
|
|
104
|
+
</ToggleGroup>
|
|
105
|
+
</div>
|
|
106
|
+
|
|
107
|
+
{/* ── Disabled ────────────────────────────────────────────────────── */}
|
|
108
|
+
<span className={SECTION_HEADER}>Disabled</span>
|
|
109
|
+
|
|
110
|
+
<div className={ROW}>
|
|
111
|
+
<span className={LABEL}>Group</span>
|
|
112
|
+
<ToggleGroup variant="outline" type="single" disabled>
|
|
113
|
+
<ToggleGroupItem value="bold" aria-label="Bold">
|
|
114
|
+
<Bold />
|
|
115
|
+
</ToggleGroupItem>
|
|
116
|
+
<ToggleGroupItem value="italic" aria-label="Italic">
|
|
117
|
+
<Italic />
|
|
118
|
+
</ToggleGroupItem>
|
|
119
|
+
</ToggleGroup>
|
|
120
|
+
</div>
|
|
121
|
+
|
|
122
|
+
{/* ── Real-world: Log level filter ────────────────────────────────── */}
|
|
123
|
+
<span className={SECTION_HEADER}>Log level filter (real-world)</span>
|
|
124
|
+
|
|
125
|
+
<div className={ROW}>
|
|
126
|
+
<ToggleGroup variant="outline" type="multiple" defaultValue={["INFO", "ERROR"]}>
|
|
127
|
+
<ToggleGroupItem value="INFO" className="data-[state=on]:bg-code-foreground/10" aria-label="Info">
|
|
128
|
+
<Info className="text-code-foreground" />
|
|
129
|
+
</ToggleGroupItem>
|
|
130
|
+
<ToggleGroupItem value="DEBUG" className="data-[state=on]:bg-code-debug/10" aria-label="Debug">
|
|
131
|
+
<Bug className="text-code-debug" />
|
|
132
|
+
</ToggleGroupItem>
|
|
133
|
+
<ToggleGroupItem value="WARNING" className="data-[state=on]:bg-code-warning/10" aria-label="Warning">
|
|
134
|
+
<TriangleAlert className="text-code-warning" />
|
|
135
|
+
</ToggleGroupItem>
|
|
136
|
+
<ToggleGroupItem value="ERROR" className="data-[state=on]:bg-code-error/10" aria-label="Error">
|
|
137
|
+
<CircleX className="text-code-error" />
|
|
138
|
+
</ToggleGroupItem>
|
|
139
|
+
</ToggleGroup>
|
|
140
|
+
</div>
|
|
141
|
+
</div>
|
|
142
|
+
);
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import type { Story } from "@ladle/react";
|
|
2
|
+
import { Heart, Plus, Settings, Trash2, X } from "lucide-react";
|
|
3
|
+
import { TooltipIconButton } from "../components/tooltip-icon-button";
|
|
4
|
+
|
|
5
|
+
export const AllVariants: Story = () => (
|
|
6
|
+
<div className="flex flex-col gap-10 p-10">
|
|
7
|
+
<div className="flex flex-col gap-1.5">
|
|
8
|
+
<p className="type-text-xs font-medium text-subtle-foreground">Default (tertiary, icon)</p>
|
|
9
|
+
<div className="flex gap-2">
|
|
10
|
+
<TooltipIconButton tooltip="Settings">
|
|
11
|
+
<Settings />
|
|
12
|
+
</TooltipIconButton>
|
|
13
|
+
<TooltipIconButton tooltip="Add">
|
|
14
|
+
<Plus />
|
|
15
|
+
</TooltipIconButton>
|
|
16
|
+
<TooltipIconButton tooltip="Favorite">
|
|
17
|
+
<Heart />
|
|
18
|
+
</TooltipIconButton>
|
|
19
|
+
</div>
|
|
20
|
+
</div>
|
|
21
|
+
|
|
22
|
+
<div className="flex flex-col gap-1.5">
|
|
23
|
+
<p className="type-text-xs font-medium text-subtle-foreground">Rounded</p>
|
|
24
|
+
<div className="flex gap-2">
|
|
25
|
+
<TooltipIconButton tooltip="Close" size="icon-rounded">
|
|
26
|
+
<X />
|
|
27
|
+
</TooltipIconButton>
|
|
28
|
+
<TooltipIconButton tooltip="Delete" size="icon-rounded" variant="destructive">
|
|
29
|
+
<Trash2 />
|
|
30
|
+
</TooltipIconButton>
|
|
31
|
+
</div>
|
|
32
|
+
</div>
|
|
33
|
+
|
|
34
|
+
<div className="flex flex-col gap-1.5">
|
|
35
|
+
<p className="type-text-xs font-medium text-subtle-foreground">Tooltip sides</p>
|
|
36
|
+
<div className="flex gap-6">
|
|
37
|
+
<TooltipIconButton tooltip="Top" side="top">
|
|
38
|
+
<Settings />
|
|
39
|
+
</TooltipIconButton>
|
|
40
|
+
<TooltipIconButton tooltip="Right" side="right">
|
|
41
|
+
<Settings />
|
|
42
|
+
</TooltipIconButton>
|
|
43
|
+
<TooltipIconButton tooltip="Bottom" side="bottom">
|
|
44
|
+
<Settings />
|
|
45
|
+
</TooltipIconButton>
|
|
46
|
+
<TooltipIconButton tooltip="Left" side="left">
|
|
47
|
+
<Settings />
|
|
48
|
+
</TooltipIconButton>
|
|
49
|
+
</div>
|
|
50
|
+
</div>
|
|
51
|
+
|
|
52
|
+
<div className="flex flex-col gap-1.5">
|
|
53
|
+
<p className="type-text-xs font-medium text-subtle-foreground">Disabled</p>
|
|
54
|
+
<TooltipIconButton tooltip="Disabled action" disabled>
|
|
55
|
+
<Settings />
|
|
56
|
+
</TooltipIconButton>
|
|
57
|
+
</div>
|
|
58
|
+
</div>
|
|
59
|
+
);
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import type { Story } from "@ladle/react";
|
|
2
|
+
import { Tooltip, TooltipContent, TooltipTrigger } from "../components/tooltip";
|
|
3
|
+
|
|
4
|
+
export const AllVariants: Story = () => (
|
|
5
|
+
<div className="flex flex-col gap-10 p-10">
|
|
6
|
+
<div className="flex flex-col gap-1.5">
|
|
7
|
+
<p className="type-text-xs font-medium text-subtle-foreground">Default (with arrow)</p>
|
|
8
|
+
<Tooltip defaultOpen>
|
|
9
|
+
<TooltipTrigger asChild>
|
|
10
|
+
<button type="button" className="w-fit rounded-md border px-3 py-2 type-text-sm">
|
|
11
|
+
Hover me
|
|
12
|
+
</button>
|
|
13
|
+
</TooltipTrigger>
|
|
14
|
+
<TooltipContent>This is a tooltip</TooltipContent>
|
|
15
|
+
</Tooltip>
|
|
16
|
+
</div>
|
|
17
|
+
|
|
18
|
+
<div className="flex flex-col gap-1.5">
|
|
19
|
+
<p className="type-text-xs font-medium text-subtle-foreground">Side: right</p>
|
|
20
|
+
<Tooltip defaultOpen>
|
|
21
|
+
<TooltipTrigger asChild>
|
|
22
|
+
<button type="button" className="w-fit rounded-md border px-3 py-2 type-text-sm">
|
|
23
|
+
Right tooltip
|
|
24
|
+
</button>
|
|
25
|
+
</TooltipTrigger>
|
|
26
|
+
<TooltipContent side="right">Tooltip on the right</TooltipContent>
|
|
27
|
+
</Tooltip>
|
|
28
|
+
</div>
|
|
29
|
+
|
|
30
|
+
<div className="flex flex-col gap-1.5">
|
|
31
|
+
<p className="type-text-xs font-medium text-subtle-foreground">Side: bottom</p>
|
|
32
|
+
<Tooltip defaultOpen>
|
|
33
|
+
<TooltipTrigger asChild>
|
|
34
|
+
<button type="button" className="w-fit rounded-md border px-3 py-2 type-text-sm">
|
|
35
|
+
Bottom tooltip
|
|
36
|
+
</button>
|
|
37
|
+
</TooltipTrigger>
|
|
38
|
+
<TooltipContent side="bottom">Tooltip on the bottom</TooltipContent>
|
|
39
|
+
</Tooltip>
|
|
40
|
+
</div>
|
|
41
|
+
|
|
42
|
+
<div className="flex flex-col gap-1.5">
|
|
43
|
+
<p className="type-text-xs font-medium text-subtle-foreground">Side: left</p>
|
|
44
|
+
<Tooltip defaultOpen>
|
|
45
|
+
<TooltipTrigger asChild>
|
|
46
|
+
<button type="button" className="w-fit rounded-md border px-3 py-2 type-text-sm">
|
|
47
|
+
Left tooltip
|
|
48
|
+
</button>
|
|
49
|
+
</TooltipTrigger>
|
|
50
|
+
<TooltipContent side="left">Tooltip on the left</TooltipContent>
|
|
51
|
+
</Tooltip>
|
|
52
|
+
</div>
|
|
53
|
+
</div>
|
|
54
|
+
);
|
package/README.md
DELETED
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
# @alpic-ai/ui
|
|
2
|
-
|
|
3
|
-
Alpic's shared design system — React 19 components built on Radix UI, Tailwind CSS v4, and CVA.
|
|
4
|
-
|
|
5
|
-
## Install
|
|
6
|
-
|
|
7
|
-
```bash
|
|
8
|
-
pnpm add @alpic-ai/ui
|
|
9
|
-
```
|
|
10
|
-
|
|
11
|
-
Peer dependencies: `react`, `react-dom`, `tailwindcss@^4`, `lucide-react`, `tw-animate-css`, `sonner`.
|
|
12
|
-
|
|
13
|
-
## Setup
|
|
14
|
-
|
|
15
|
-
Add to your main CSS:
|
|
16
|
-
|
|
17
|
-
```css
|
|
18
|
-
@import "tailwindcss";
|
|
19
|
-
@import "tw-animate-css";
|
|
20
|
-
@import "@alpic-ai/ui/theme";
|
|
21
|
-
```
|
|
22
|
-
|
|
23
|
-
## Usage
|
|
24
|
-
|
|
25
|
-
```tsx
|
|
26
|
-
import { Button } from "@alpic-ai/ui/components/button";
|
|
27
|
-
import { Card, CardContent } from "@alpic-ai/ui/components/card";
|
|
28
|
-
import { cn } from "@alpic-ai/ui/lib/cn";
|
|
29
|
-
```
|
|
30
|
-
|
|
31
|
-
## Components
|
|
32
|
-
|
|
33
|
-
accordion, alert, avatar, badge, breadcrumb, button, card, checkbox, collapsible, combobox, command, copyable, description-list, dialog, dropdown-menu, input, input-group, label, pagination, popover, radio-group, scroll-area, select, separator, sheet, sidebar, skeleton, sonner, spinner, status-dot, switch, table, tabs, tag, textarea, toggle-group, tooltip
|