@syscore/ui-library 1.1.12 → 1.1.13
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/client/components/icons/AchievementBadges.tsx +33 -0
- package/client/components/icons/ConceptIcons.tsx +169 -22
- package/client/components/icons/NavLogo.tsx +4 -4
- package/client/components/icons/ProviderBadges.tsx +28 -28
- package/client/components/icons/ProviderSeals.tsx +35 -35
- package/client/components/icons/StandardLogo.tsx +47 -0
- package/client/components/icons/UtilityChevronDown.tsx +1 -1
- package/client/components/icons/UtilityClearRegular.tsx +43 -0
- package/client/components/icons/UtilityCompare.tsx +71 -0
- package/client/components/icons/UtilityHome.tsx +26 -0
- package/client/components/icons/UtilityReset.tsx +7 -7
- package/client/components/icons/UtilitySave.tsx +35 -0
- package/client/components/icons/UtilityScopeLarge.tsx +86 -0
- package/client/components/icons/UtilityShow.tsx +41 -0
- package/client/components/icons/UtilityTarget.tsx +21 -0
- package/client/components/icons/UtilityTargetActive.tsx +34 -0
- package/client/components/icons/UtilityText.tsx +8 -8
- package/client/components/ui/breadcrumb.tsx +26 -4
- package/client/components/ui/button.tsx +30 -18
- package/client/components/ui/card.tsx +2 -2
- package/client/components/ui/code-badge.tsx +25 -0
- package/client/components/ui/dialog.tsx +4 -4
- package/client/components/ui/input.tsx +53 -9
- package/client/components/ui/label.tsx +2 -2
- package/client/components/ui/{Navigation.tsx → navigation.tsx} +291 -250
- package/client/components/ui/select.tsx +20 -20
- package/client/components/ui/tabs.tsx +27 -178
- package/client/components/ui/{Tag.tsx → tag.tsx} +11 -10
- package/client/components/ui/textarea.tsx +1 -1
- package/client/components/ui/toggle-group.tsx +19 -2
- package/client/components/ui/toggle.tsx +2 -2
- package/client/components/ui/tooltip.tsx +148 -8
- package/client/global.css +18 -11
- package/client/ui/AspectRatio.stories.tsx +1 -1
- package/client/ui/Button.stories.tsx +5 -5
- package/client/ui/Card.stories.tsx +223 -2
- package/client/ui/CodeBadge.stories.tsx +76 -0
- package/client/ui/Dialog.stories.tsx +52 -5
- package/client/ui/Icons.stories.tsx +31 -31
- package/client/ui/Input.stories.tsx +125 -0
- package/client/ui/Label.stories.tsx +8 -11
- package/client/ui/Navigation.stories.tsx +1 -1
- package/client/ui/RadioGroup/RadioGroup.stories.tsx +1 -1
- package/client/ui/SearchField.stories.tsx +1 -1
- package/client/ui/{Select/Select.stories.tsx → Select.stories.tsx} +2 -2
- package/client/ui/{Switch/Switch.stories.tsx → Switch.stories.tsx} +3 -3
- package/client/ui/Tabs.stories.tsx +174 -10
- package/client/ui/Tag.stories.tsx +48 -1
- package/client/ui/{Textarea/Textarea.stories.tsx → Textarea.stories.tsx} +9 -10
- package/client/ui/Toggle.stories.tsx +3 -3
- package/client/ui/Tooltip.stories.tsx +28 -4
- package/client/ui/WELLDashboard/WELLDashboard.stories.tsx +1 -1
- package/dist/ui/index.cjs.js +1 -1
- package/dist/ui/index.d.ts +4 -5
- package/dist/ui/index.es.js +460 -518
- package/package.json +2 -2
- package/client/components/ui/StrategyTable.tsx +0 -303
- package/client/ui/Input/Input.stories.tsx +0 -69
- package/client/ui/StrategyTable.stories.tsx +0 -138
- /package/client/components/ui/{SearchField.tsx → search.tsx} +0 -0
- /package/client/hooks/{UseTabs.tsx → use-tabs.tsx} +0 -0
|
@@ -10,45 +10,45 @@ import {
|
|
|
10
10
|
IconConceptNourishment,
|
|
11
11
|
IconConceptSound,
|
|
12
12
|
IconConceptMaterials,
|
|
13
|
-
} from "
|
|
14
|
-
import { NavLogo } from "
|
|
15
|
-
import { NavAccount } from "
|
|
16
|
-
import { NavBullet } from "
|
|
17
|
-
import { UtilityAccordion } from "
|
|
18
|
-
import { UtilityChevronDown } from "
|
|
19
|
-
import { UtilityClassification } from "
|
|
20
|
-
import { UtilityClose } from "
|
|
21
|
-
import { UtilityDrag } from "
|
|
22
|
-
import { UtilityEdit } from "
|
|
23
|
-
import { UtilityOptions } from "
|
|
24
|
-
import { UtilityPortfolio } from "
|
|
25
|
-
import { UtilityReset } from "
|
|
26
|
-
import { UtilityScoring } from "
|
|
27
|
-
import { UtilitySearch } from "
|
|
28
|
-
import { UtilitySort } from "
|
|
29
|
-
import { UtilityText } from "
|
|
30
|
-
import { SealWell } from "
|
|
31
|
-
import { SealIwbiMember } from "
|
|
32
|
-
import { SealWellCertification } from "
|
|
33
|
-
import { SealWellCommunity } from "
|
|
34
|
-
import { SealWellResidence } from "
|
|
35
|
-
import { SealWorksWithWell } from "
|
|
36
|
-
import { SealEnterpriseProvider } from "
|
|
37
|
-
import { SealPerformanceTestingProvider } from "
|
|
38
|
-
import { SealSurveyProvider } from "
|
|
13
|
+
} from "../components/icons/ConceptIcons";
|
|
14
|
+
import { NavLogo } from "../components/icons/NavLogo";
|
|
15
|
+
import { NavAccount } from "../components/icons/NavAccount";
|
|
16
|
+
import { NavBullet } from "../components/icons/NavBullet";
|
|
17
|
+
import { UtilityAccordion } from "../components/icons/UtilityAccordion";
|
|
18
|
+
import { UtilityChevronDown } from "../components/icons/UtilityChevronDown";
|
|
19
|
+
import { UtilityClassification } from "../components/icons/UtilityClassification";
|
|
20
|
+
import { UtilityClose } from "../components/icons/UtilityClose";
|
|
21
|
+
import { UtilityDrag } from "../components/icons/UtilityDrag";
|
|
22
|
+
import { UtilityEdit } from "../components/icons/UtilityEdit";
|
|
23
|
+
import { UtilityOptions } from "../components/icons/UtilityOptions";
|
|
24
|
+
import { UtilityPortfolio } from "../components/icons/UtilityPortfolio";
|
|
25
|
+
import { UtilityReset } from "../components/icons/UtilityReset";
|
|
26
|
+
import { UtilityScoring } from "../components/icons/UtilityScoring";
|
|
27
|
+
import { UtilitySearch } from "../components/icons/UtilitySearch";
|
|
28
|
+
import { UtilitySort } from "../components/icons/UtilitySort";
|
|
29
|
+
import { UtilityText } from "../components/icons/UtilityText";
|
|
30
|
+
import { SealWell } from "../components/icons/SealWell";
|
|
31
|
+
import { SealIwbiMember } from "../components/icons/SealIwbiMember";
|
|
32
|
+
import { SealWellCertification } from "../components/icons/SealWellCertification";
|
|
33
|
+
import { SealWellCommunity } from "../components/icons/SealWellCommunity";
|
|
34
|
+
import { SealWellResidence } from "../components/icons/SealWellResidence";
|
|
35
|
+
import { SealWorksWithWell } from "../components/icons/SealWorksWithWell";
|
|
36
|
+
import { SealEnterpriseProvider } from "../components/icons/ProviderSeals";
|
|
37
|
+
import { SealPerformanceTestingProvider } from "../components/icons/ProviderSeals";
|
|
38
|
+
import { SealSurveyProvider } from "../components/icons/ProviderSeals";
|
|
39
39
|
import {
|
|
40
40
|
BadgeEnterpriseProvider,
|
|
41
41
|
BadgePerformanceTestingProvider,
|
|
42
42
|
BadgeProductProvider,
|
|
43
43
|
BadgeSurveyProvider,
|
|
44
|
-
} from "
|
|
45
|
-
import { WatermarkMemberOrg } from "
|
|
46
|
-
import { WaterMarkWWWProducts } from "
|
|
47
|
-
import { WaterMarkWellProjects } from "
|
|
44
|
+
} from "../components/icons/ProviderBadges";
|
|
45
|
+
import { WatermarkMemberOrg } from "../components/icons/WatermarkMemberOrg";
|
|
46
|
+
import { WaterMarkWWWProducts } from "../components/icons/WaterMarkWWWProducts";
|
|
47
|
+
import { WaterMarkWellProjects } from "../components/icons/WaterMarkWellProjects";
|
|
48
48
|
import {
|
|
49
49
|
SealProductProvider,
|
|
50
50
|
SealProviders,
|
|
51
|
-
} from "
|
|
51
|
+
} from "../components/icons/ProviderSeals";
|
|
52
52
|
|
|
53
53
|
const meta = {
|
|
54
54
|
title: "Review/Icons",
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from "@storybook/react";
|
|
2
|
+
import { Input } from "../components/ui/input";
|
|
3
|
+
import { Label } from "../components/ui/label";
|
|
4
|
+
import { Button } from "../components/ui/button";
|
|
5
|
+
import { Search, Copy } from "lucide-react";
|
|
6
|
+
|
|
7
|
+
const meta = {
|
|
8
|
+
title: "Review/Input",
|
|
9
|
+
component: Input,
|
|
10
|
+
tags: ["autodocs"],
|
|
11
|
+
parameters: {
|
|
12
|
+
layout: "centered",
|
|
13
|
+
},
|
|
14
|
+
} satisfies Meta<typeof Input>;
|
|
15
|
+
|
|
16
|
+
export default meta;
|
|
17
|
+
|
|
18
|
+
type Story = StoryObj<typeof meta>;
|
|
19
|
+
|
|
20
|
+
export const Default: Story = {
|
|
21
|
+
args: {
|
|
22
|
+
placeholder: "Enter text...",
|
|
23
|
+
},
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
export const WithType: Story = {
|
|
27
|
+
render: () => (
|
|
28
|
+
<div className="space-y-4 w-full max-w-md">
|
|
29
|
+
<div className="space-y-3">
|
|
30
|
+
<Label>Text</Label>
|
|
31
|
+
<Input type="text" placeholder="Enter text..." />
|
|
32
|
+
</div>
|
|
33
|
+
<div className="space-y-3">
|
|
34
|
+
<Label>Email</Label>
|
|
35
|
+
<Input type="email" placeholder="Enter email..." />
|
|
36
|
+
</div>
|
|
37
|
+
<div className="space-y-3">
|
|
38
|
+
<Label>Password</Label>
|
|
39
|
+
<Input type="password" placeholder="Enter password..." />
|
|
40
|
+
</div>
|
|
41
|
+
<div className="space-y-3">
|
|
42
|
+
<Label>Number</Label>
|
|
43
|
+
<Input type="number" placeholder="Enter number..." />
|
|
44
|
+
</div>
|
|
45
|
+
</div>
|
|
46
|
+
),
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
export const Disabled: Story = {
|
|
50
|
+
args: {
|
|
51
|
+
placeholder: "Disabled input",
|
|
52
|
+
disabled: true,
|
|
53
|
+
},
|
|
54
|
+
};
|
|
55
|
+
|
|
56
|
+
export const ReadOnly: Story = {
|
|
57
|
+
args: {
|
|
58
|
+
placeholder: "Read-only input",
|
|
59
|
+
value: "This is read-only",
|
|
60
|
+
readOnly: true,
|
|
61
|
+
},
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
export const WithIcons: Story = {
|
|
65
|
+
render: () => (
|
|
66
|
+
<div className="space-y-4 min-w-[300px]">
|
|
67
|
+
<div className="space-y-3">
|
|
68
|
+
<Label>Currency (Span)</Label>
|
|
69
|
+
<Input
|
|
70
|
+
placeholder="0.00"
|
|
71
|
+
type="number"
|
|
72
|
+
startIcon={<span>€</span>}
|
|
73
|
+
endIcon={<span>EUR</span>}
|
|
74
|
+
/>
|
|
75
|
+
</div>
|
|
76
|
+
|
|
77
|
+
<div className="space-y-3">
|
|
78
|
+
<Label>Search (Icon)</Label>
|
|
79
|
+
<Input
|
|
80
|
+
placeholder="Search..."
|
|
81
|
+
startIcon={<Search className="h-4 w-4" />}
|
|
82
|
+
/>
|
|
83
|
+
</div>
|
|
84
|
+
</div>
|
|
85
|
+
),
|
|
86
|
+
};
|
|
87
|
+
|
|
88
|
+
export const WithButton: Story = {
|
|
89
|
+
render: () => (
|
|
90
|
+
<div className="space-y-4 min-w-[400px]">
|
|
91
|
+
<div className="space-y-3">
|
|
92
|
+
<Label>Icon Button</Label>
|
|
93
|
+
<Input
|
|
94
|
+
placeholder="Copy link"
|
|
95
|
+
value="https://example.com/share/123"
|
|
96
|
+
readOnly
|
|
97
|
+
endIcon={
|
|
98
|
+
<button
|
|
99
|
+
className="hover:text-gray-900 transition-colors"
|
|
100
|
+
onClick={() => alert("Copied!")}
|
|
101
|
+
>
|
|
102
|
+
<Copy className="h-4 w-4" />
|
|
103
|
+
</button>
|
|
104
|
+
}
|
|
105
|
+
/>
|
|
106
|
+
</div>
|
|
107
|
+
|
|
108
|
+
<div className="space-y-3">
|
|
109
|
+
<Label>Wide Button (Auto-fit)</Label>
|
|
110
|
+
<Input
|
|
111
|
+
placeholder="Enter email"
|
|
112
|
+
endIcon={
|
|
113
|
+
<Button
|
|
114
|
+
size="utility"
|
|
115
|
+
className="h-8 px-3"
|
|
116
|
+
onClick={() => alert("Subscribed!")}
|
|
117
|
+
>
|
|
118
|
+
Subscribe
|
|
119
|
+
</Button>
|
|
120
|
+
}
|
|
121
|
+
/>
|
|
122
|
+
</div>
|
|
123
|
+
</div>
|
|
124
|
+
),
|
|
125
|
+
};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { Meta, StoryObj } from "@storybook/react";
|
|
2
|
-
import { Label } from "../components/ui/
|
|
2
|
+
import { Label } from "../components/ui/label";
|
|
3
3
|
import { Input } from "../components/ui/input";
|
|
4
|
+
import { Textarea } from "../components/ui/textarea";
|
|
4
5
|
|
|
5
6
|
const meta = {
|
|
6
7
|
title: "Review/Label",
|
|
@@ -23,7 +24,7 @@ export const Default: Story = {
|
|
|
23
24
|
|
|
24
25
|
export const WithInput: Story = {
|
|
25
26
|
render: () => (
|
|
26
|
-
<div className="
|
|
27
|
+
<div className="flex flex-col gap-y-3 w-full max-w-md">
|
|
27
28
|
<Label htmlFor="email">Email</Label>
|
|
28
29
|
<Input id="email" type="email" placeholder="Enter your email" />
|
|
29
30
|
</div>
|
|
@@ -33,21 +34,17 @@ export const WithInput: Story = {
|
|
|
33
34
|
export const Multiple: Story = {
|
|
34
35
|
render: () => (
|
|
35
36
|
<div className="space-y-6 w-full max-w-md">
|
|
36
|
-
<div className="
|
|
37
|
+
<div className=" flex flex-col gap-y-3">
|
|
37
38
|
<Label htmlFor="name">Name</Label>
|
|
38
39
|
<Input id="name" placeholder="Enter your name" />
|
|
39
40
|
</div>
|
|
40
|
-
<div className="
|
|
41
|
+
<div className=" flex flex-col gap-y-3">
|
|
41
42
|
<Label htmlFor="email">Email</Label>
|
|
42
43
|
<Input id="email" type="email" placeholder="Enter your email" />
|
|
43
44
|
</div>
|
|
44
|
-
<div className="
|
|
45
|
+
<div className=" flex flex-col gap-y-3">
|
|
45
46
|
<Label htmlFor="message">Message</Label>
|
|
46
|
-
<
|
|
47
|
-
id="message"
|
|
48
|
-
className="flex h-20 w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50"
|
|
49
|
-
placeholder="Enter your message"
|
|
50
|
-
/>
|
|
47
|
+
<Textarea id="message" placeholder="Enter your message" />
|
|
51
48
|
</div>
|
|
52
49
|
</div>
|
|
53
50
|
),
|
|
@@ -55,7 +52,7 @@ export const Multiple: Story = {
|
|
|
55
52
|
|
|
56
53
|
export const Required: Story = {
|
|
57
54
|
render: () => (
|
|
58
|
-
<div className="
|
|
55
|
+
<div className=" flex flex-col gap-y-3 w-full max-w-md">
|
|
59
56
|
<Label htmlFor="required">
|
|
60
57
|
Field Name
|
|
61
58
|
<span className="text-red-500 ml-1">*</span>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Meta, StoryObj } from "@storybook/react";
|
|
2
2
|
import { RadioGroup, RadioGroupItem } from "../../components/ui/radio-group";
|
|
3
|
-
import { Label } from "../../components/ui/
|
|
3
|
+
import { Label } from "../../components/ui/label";
|
|
4
4
|
import { useState } from "react";
|
|
5
5
|
|
|
6
6
|
const meta = {
|
|
@@ -5,11 +5,11 @@ import {
|
|
|
5
5
|
SelectItem,
|
|
6
6
|
SelectTrigger,
|
|
7
7
|
SelectValue,
|
|
8
|
-
} from "
|
|
8
|
+
} from "../components/ui/select";
|
|
9
9
|
import { useState } from "react";
|
|
10
10
|
|
|
11
11
|
const meta = {
|
|
12
|
-
title: "
|
|
12
|
+
title: "Review/Select",
|
|
13
13
|
component: Select,
|
|
14
14
|
tags: ["autodocs"],
|
|
15
15
|
parameters: {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import type { Meta, StoryObj } from "@storybook/react";
|
|
2
|
-
import { Switch } from "
|
|
3
|
-
import { Label } from "
|
|
2
|
+
import { Switch } from "../components/ui/switch";
|
|
3
|
+
import { Label } from "../components/ui/label";
|
|
4
4
|
import { useState } from "react";
|
|
5
5
|
|
|
6
6
|
const meta = {
|
|
7
|
-
title: "
|
|
7
|
+
title: "Review/Switch",
|
|
8
8
|
component: Switch,
|
|
9
9
|
tags: ["autodocs"],
|
|
10
10
|
parameters: {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Meta, StoryObj } from "@storybook/react";
|
|
2
|
-
import { AnimatedTabs } from "
|
|
2
|
+
import { AnimatedTabs } from "../components/ui/tabs";
|
|
3
3
|
|
|
4
4
|
const meta = {
|
|
5
5
|
title: "Review/Tabs",
|
|
@@ -14,20 +14,184 @@ export default meta;
|
|
|
14
14
|
|
|
15
15
|
type Story = StoryObj<typeof meta>;
|
|
16
16
|
|
|
17
|
+
const HomeContent = () => (
|
|
18
|
+
<div className="space-y-6 mt-12">
|
|
19
|
+
<div className="border-b pb-6 dark:border-zinc-800">
|
|
20
|
+
<h2 className="text-3xl font-bold mb-4">Welcome to Our Platform</h2>
|
|
21
|
+
<p className="text-zinc-600 dark:text-zinc-400 mb-4">
|
|
22
|
+
Discover a new way to manage your projects and collaborate with your
|
|
23
|
+
team.
|
|
24
|
+
</p>
|
|
25
|
+
<div className="grid grid-cols-1 md:grid-cols-3 gap-4">
|
|
26
|
+
<div className="p-4 bg-white dark:bg-zinc-800 rounded-lg">
|
|
27
|
+
<h3 className="font-semibold mb-2">Quick Start</h3>
|
|
28
|
+
<p className="text-sm text-zinc-600 dark:text-zinc-400">
|
|
29
|
+
Get started with our platform in minutes
|
|
30
|
+
</p>
|
|
31
|
+
</div>
|
|
32
|
+
<div className="p-4 bg-white dark:bg-zinc-800 rounded-lg">
|
|
33
|
+
<h3 className="font-semibold mb-2">Latest Updates</h3>
|
|
34
|
+
<p className="text-sm text-zinc-600 dark:text-zinc-400">
|
|
35
|
+
See what's new in our latest release
|
|
36
|
+
</p>
|
|
37
|
+
</div>
|
|
38
|
+
<div className="p-4 bg-white dark:bg-zinc-800 rounded-lg">
|
|
39
|
+
<h3 className="font-semibold mb-2">Resources</h3>
|
|
40
|
+
<p className="text-sm text-zinc-600 dark:text-zinc-400">
|
|
41
|
+
Access guides and documentation
|
|
42
|
+
</p>
|
|
43
|
+
</div>
|
|
44
|
+
</div>
|
|
45
|
+
</div>
|
|
46
|
+
<div>
|
|
47
|
+
<h3 className="text-xl font-semibold mb-4">Recent Activity</h3>
|
|
48
|
+
<div className="space-y-3">
|
|
49
|
+
<div className="flex items-center gap-3 p-3 bg-white dark:bg-zinc-800 rounded-lg">
|
|
50
|
+
<div className="w-2 h-2 bg-green-500 rounded-full"></div>
|
|
51
|
+
<p className="text-sm">
|
|
52
|
+
Project "Marketing Campaign" was updated 2 hours ago
|
|
53
|
+
</p>
|
|
54
|
+
</div>
|
|
55
|
+
<div className="flex items-center gap-3 p-3 bg-white dark:bg-zinc-800 rounded-lg">
|
|
56
|
+
<div className="w-2 h-2 bg-blue-500 rounded-full"></div>
|
|
57
|
+
<p className="text-sm">
|
|
58
|
+
New team member John Doe joined the platform
|
|
59
|
+
</p>
|
|
60
|
+
</div>
|
|
61
|
+
</div>
|
|
62
|
+
</div>
|
|
63
|
+
</div>
|
|
64
|
+
);
|
|
65
|
+
|
|
66
|
+
const AboutContent = () => (
|
|
67
|
+
<div className="space-y-8 mt-12">
|
|
68
|
+
<div>
|
|
69
|
+
<h2 className="text-3xl font-bold mb-4">About Us</h2>
|
|
70
|
+
<p className="text-zinc-600 dark:text-zinc-400 mb-6">
|
|
71
|
+
We're a team of passionate individuals working together to create
|
|
72
|
+
amazing solutions for our clients.
|
|
73
|
+
</p>
|
|
74
|
+
<div className="grid grid-cols-1 md:grid-cols-2 gap-6">
|
|
75
|
+
<div>
|
|
76
|
+
<h3 className="text-xl font-semibold mb-3">Our Mission</h3>
|
|
77
|
+
<p className="text-zinc-600 dark:text-zinc-400">
|
|
78
|
+
To empower businesses with innovative tools and solutions that drive
|
|
79
|
+
growth and success in the digital age.
|
|
80
|
+
</p>
|
|
81
|
+
</div>
|
|
82
|
+
<div>
|
|
83
|
+
<h3 className="text-xl font-semibold mb-3">Our Vision</h3>
|
|
84
|
+
<p className="text-zinc-600 dark:text-zinc-400">
|
|
85
|
+
To become the leading platform for business transformation and
|
|
86
|
+
digital innovation worldwide.
|
|
87
|
+
</p>
|
|
88
|
+
</div>
|
|
89
|
+
</div>
|
|
90
|
+
</div>
|
|
91
|
+
</div>
|
|
92
|
+
);
|
|
93
|
+
|
|
94
|
+
const ContactContent = () => (
|
|
95
|
+
<div className="max-w-2xl mx-auto mt-12">
|
|
96
|
+
<h2 className="text-3xl font-bold mb-6">Get in Touch</h2>
|
|
97
|
+
<div className="grid grid-cols-1 md:grid-cols-2 gap-8 mb-8">
|
|
98
|
+
<div>
|
|
99
|
+
<h3 className="text-xl font-semibold mb-4">Contact Information</h3>
|
|
100
|
+
<div className="space-y-4">
|
|
101
|
+
<div>
|
|
102
|
+
<p className="font-medium">Address</p>
|
|
103
|
+
<p className="text-zinc-600 dark:text-zinc-400">
|
|
104
|
+
123 Business Street
|
|
105
|
+
</p>
|
|
106
|
+
<p className="text-zinc-600 dark:text-zinc-400">
|
|
107
|
+
San Francisco, CA 94105
|
|
108
|
+
</p>
|
|
109
|
+
</div>
|
|
110
|
+
<div>
|
|
111
|
+
<p className="font-medium">Email</p>
|
|
112
|
+
<p className="text-zinc-600 dark:text-zinc-400">
|
|
113
|
+
contact@example.com
|
|
114
|
+
</p>
|
|
115
|
+
</div>
|
|
116
|
+
<div>
|
|
117
|
+
<p className="font-medium">Phone</p>
|
|
118
|
+
<p className="text-zinc-600 dark:text-zinc-400">
|
|
119
|
+
+1 (555) 123-4567
|
|
120
|
+
</p>
|
|
121
|
+
</div>
|
|
122
|
+
</div>
|
|
123
|
+
</div>
|
|
124
|
+
<div className="space-y-4">
|
|
125
|
+
<div>
|
|
126
|
+
<label className="block text-sm font-medium mb-1">Name</label>
|
|
127
|
+
<input
|
|
128
|
+
type="text"
|
|
129
|
+
className="w-full p-2 rounded-md border dark:bg-zinc-800 dark:border-zinc-700"
|
|
130
|
+
/>
|
|
131
|
+
</div>
|
|
132
|
+
<div>
|
|
133
|
+
<label className="block text-sm font-medium mb-1">Email</label>
|
|
134
|
+
<input
|
|
135
|
+
type="email"
|
|
136
|
+
className="w-full p-2 rounded-md border dark:bg-zinc-800 dark:border-zinc-700"
|
|
137
|
+
/>
|
|
138
|
+
</div>
|
|
139
|
+
<button className="w-full bg-black text-white dark:bg-white dark:text-black py-2 rounded-md font-medium">
|
|
140
|
+
Send Message
|
|
141
|
+
</button>
|
|
142
|
+
</div>
|
|
143
|
+
</div>
|
|
144
|
+
</div>
|
|
145
|
+
);
|
|
146
|
+
|
|
147
|
+
const DangerZoneContent = () => (
|
|
148
|
+
<div className="max-w-2xl mx-auto mt-12">
|
|
149
|
+
<h2 className="text-2xl font-bold mb-6 text-red-500">Caution!</h2>
|
|
150
|
+
<div className="space-y-6">
|
|
151
|
+
<div className="border border-red-200 dark:border-red-900 rounded-lg p-6 bg-red-50 dark:bg-red-900/20">
|
|
152
|
+
<h3 className="text-lg font-semibold text-red-600 dark:text-red-400 mb-2">
|
|
153
|
+
Delete Account
|
|
154
|
+
</h3>
|
|
155
|
+
<p className="text-red-600/80 dark:text-red-400/80 mb-4">
|
|
156
|
+
This action cannot be undone. This will permanently delete your
|
|
157
|
+
account and remove your data from our servers.
|
|
158
|
+
</p>
|
|
159
|
+
<div className="flex items-center gap-4">
|
|
160
|
+
<input
|
|
161
|
+
type="text"
|
|
162
|
+
placeholder="Type 'delete' to confirm"
|
|
163
|
+
className="flex-1 p-2 rounded-md border border-red-200 dark:border-red-800 dark:bg-red-900/30"
|
|
164
|
+
/>
|
|
165
|
+
<button className="bg-red-500 text-white px-4 py-2 rounded-md hover:bg-red-600 transition-colors">
|
|
166
|
+
Delete Account
|
|
167
|
+
</button>
|
|
168
|
+
</div>
|
|
169
|
+
</div>
|
|
170
|
+
</div>
|
|
171
|
+
</div>
|
|
172
|
+
);
|
|
173
|
+
|
|
17
174
|
const tabs = [
|
|
18
|
-
{ label: "Home", value: "home" },
|
|
19
|
-
{ label: "About", value: "about" },
|
|
20
|
-
{ label: "Contact", value: "contact" },
|
|
175
|
+
{ label: "Home", value: "home", content: <HomeContent /> },
|
|
176
|
+
{ label: "About", value: "about", content: <AboutContent /> },
|
|
177
|
+
{ label: "Contact", value: "contact", content: <ContactContent /> },
|
|
21
178
|
];
|
|
22
179
|
|
|
23
180
|
export const Default: Story = {
|
|
24
|
-
|
|
181
|
+
args: {
|
|
182
|
+
tabs: tabs,
|
|
183
|
+
},
|
|
25
184
|
};
|
|
26
185
|
|
|
27
186
|
export const WithDangerZone: Story = {
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
187
|
+
args: {
|
|
188
|
+
tabs: [
|
|
189
|
+
...tabs,
|
|
190
|
+
{
|
|
191
|
+
label: "Danger Zone",
|
|
192
|
+
value: "danger-zone",
|
|
193
|
+
content: <DangerZoneContent />,
|
|
194
|
+
},
|
|
195
|
+
],
|
|
196
|
+
},
|
|
33
197
|
};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { Meta, StoryObj } from "@storybook/react";
|
|
2
|
-
import {
|
|
2
|
+
import { useState } from "react";
|
|
3
|
+
import { Tag } from "../components/ui/tag";
|
|
3
4
|
|
|
4
5
|
const meta = {
|
|
5
6
|
title: "Review/Tag",
|
|
@@ -188,3 +189,49 @@ export const AllVariants: Story = {
|
|
|
188
189
|
</div>
|
|
189
190
|
),
|
|
190
191
|
};
|
|
192
|
+
|
|
193
|
+
export const InteractiveGroup: Story = {
|
|
194
|
+
args: {
|
|
195
|
+
active: false,
|
|
196
|
+
variant: "light",
|
|
197
|
+
children: "Tag",
|
|
198
|
+
},
|
|
199
|
+
render: () => {
|
|
200
|
+
const [selected, setSelected] = useState<string[]>(["design"]);
|
|
201
|
+
|
|
202
|
+
const toggleTag = (value: string) => {
|
|
203
|
+
setSelected((prev) =>
|
|
204
|
+
prev.includes(value)
|
|
205
|
+
? prev.filter((t) => t !== value)
|
|
206
|
+
: [...prev, value],
|
|
207
|
+
);
|
|
208
|
+
};
|
|
209
|
+
|
|
210
|
+
const options = ["design", "development", "marketing", "sales"];
|
|
211
|
+
|
|
212
|
+
return (
|
|
213
|
+
<div className="space-y-4">
|
|
214
|
+
<div>
|
|
215
|
+
<p className="text-sm text-gray-600 mb-2">
|
|
216
|
+
Interactive Selection (Form Mode)
|
|
217
|
+
</p>
|
|
218
|
+
<div className="flex flex-wrap gap-2">
|
|
219
|
+
{options.map((opt) => (
|
|
220
|
+
<Tag
|
|
221
|
+
key={opt}
|
|
222
|
+
active={selected.includes(opt)}
|
|
223
|
+
onClick={() => toggleTag(opt)}
|
|
224
|
+
type="button"
|
|
225
|
+
>
|
|
226
|
+
{opt.charAt(0).toUpperCase() + opt.slice(1)}
|
|
227
|
+
</Tag>
|
|
228
|
+
))}
|
|
229
|
+
</div>
|
|
230
|
+
<div className="mt-4 text-sm text-gray-500">
|
|
231
|
+
Selected: {selected.join(", ") || "none"}
|
|
232
|
+
</div>
|
|
233
|
+
</div>
|
|
234
|
+
</div>
|
|
235
|
+
);
|
|
236
|
+
},
|
|
237
|
+
};
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import type { Meta, StoryObj } from "@storybook/react";
|
|
2
|
-
import { Textarea } from "
|
|
2
|
+
import { Textarea } from "../components/ui/textarea";
|
|
3
|
+
import { Label } from "../components/ui/label";
|
|
3
4
|
|
|
4
5
|
const meta = {
|
|
5
|
-
title: "
|
|
6
|
+
title: "Review/Textarea",
|
|
6
7
|
component: Textarea,
|
|
7
8
|
tags: ["autodocs"],
|
|
8
9
|
parameters: {
|
|
@@ -37,18 +38,16 @@ export const Disabled: Story = {
|
|
|
37
38
|
export const Rows: Story = {
|
|
38
39
|
render: () => (
|
|
39
40
|
<div className="space-y-4 w-full max-w-md">
|
|
40
|
-
<div>
|
|
41
|
-
<
|
|
41
|
+
<div className="flex flex-col gap-y-2">
|
|
42
|
+
<Label> mall (3 rows)</Label>
|
|
42
43
|
<Textarea placeholder="Type here..." rows={3} />
|
|
43
44
|
</div>
|
|
44
|
-
<div>
|
|
45
|
-
<
|
|
46
|
-
Medium (5 rows)
|
|
47
|
-
</label>
|
|
45
|
+
<div className="flex flex-col gap-y-2">
|
|
46
|
+
<Label>Medium (5 rows)</Label>
|
|
48
47
|
<Textarea placeholder="Type here..." rows={5} />
|
|
49
48
|
</div>
|
|
50
|
-
<div>
|
|
51
|
-
<
|
|
49
|
+
<div className="flex flex-col gap-y-2">
|
|
50
|
+
<Label>Large (8 rows)</Label>
|
|
52
51
|
<Textarea placeholder="Type here..." rows={8} />
|
|
53
52
|
</div>
|
|
54
53
|
</div>
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import type { Meta, StoryObj } from "@storybook/react";
|
|
2
|
-
import { SegmentedControl } from "../components/ui/
|
|
2
|
+
import { SegmentedControl } from "../components/ui/toggle";
|
|
3
3
|
import { useState } from "react";
|
|
4
4
|
import { cn } from "../lib/utils";
|
|
5
|
-
import { UtilityAccordion } from "
|
|
6
|
-
import { UtilityText } from "
|
|
5
|
+
import { UtilityAccordion } from "../components/icons/UtilityAccordion";
|
|
6
|
+
import { UtilityText } from "../components/icons/UtilityText";
|
|
7
7
|
|
|
8
8
|
const meta = {
|
|
9
9
|
title: "Review/Toggle",
|