@syscore/ui-library 1.20.0 → 1.22.0
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/AlphaIcon.tsx +33 -4
- package/client/components/icons/UtilityClose.tsx +1 -1
- package/client/components/icons/UtilityCompare.tsx +18 -18
- package/client/components/icons/UtilityFeedback.tsx +3 -3
- package/client/components/icons/UtilityMessage.tsx +4 -4
- package/client/components/icons/UtilityTrash.tsx +9 -9
- package/client/components/icons/achievement-badges/BadgeCertificationGold.tsx +25 -25
- package/client/components/icons/imperative-badges/BadgeImperativePrimary.tsx +9 -9
- package/client/components/icons/imperative-badges/BadgeImperativeSecondary.tsx +13 -13
- package/client/components/ui/accordion.tsx +4 -3
- package/client/components/ui/dialog.tsx +8 -3
- package/client/components/ui/tabs.tsx +352 -204
- package/client/components/ui/tooltip.tsx +2 -2
- package/client/global.css +89 -18
- package/client/ui/MobileNav.stories.tsx +1 -15
- package/client/ui/Tabs.stories.tsx +156 -53
- package/dist/index.cjs.js +1 -1
- package/dist/index.d.ts +0 -3
- package/dist/index.es.js +437 -271
- package/package.json +10 -2
package/client/global.css
CHANGED
|
@@ -1432,6 +1432,8 @@ body {
|
|
|
1432
1432
|
|
|
1433
1433
|
.well-input ::placeholder {
|
|
1434
1434
|
color: var(--color-gray-500, #71747d);
|
|
1435
|
+
font-family: "Mazzard Soft M", serif;
|
|
1436
|
+
font-weight: 400;
|
|
1435
1437
|
}
|
|
1436
1438
|
|
|
1437
1439
|
.well-input [type="file"] {
|
|
@@ -1553,12 +1555,14 @@ body {
|
|
|
1553
1555
|
/* Checkbox Styles */
|
|
1554
1556
|
.checkbox {
|
|
1555
1557
|
display: flex;
|
|
1558
|
+
flex-direction: column;
|
|
1556
1559
|
align-items: center;
|
|
1557
1560
|
justify-content: center;
|
|
1558
|
-
|
|
1559
|
-
|
|
1561
|
+
width: 16px;
|
|
1562
|
+
height: 16px;
|
|
1560
1563
|
flex-shrink: 0;
|
|
1561
|
-
|
|
1564
|
+
aspect-ratio: 1 / 1;
|
|
1565
|
+
border-radius: 3px;
|
|
1562
1566
|
border: 1.5px solid var(--color-gray-400, #9fa2ab);
|
|
1563
1567
|
transition: all 0.15s ease-in-out;
|
|
1564
1568
|
}
|
|
@@ -1582,7 +1586,7 @@ body {
|
|
|
1582
1586
|
}
|
|
1583
1587
|
|
|
1584
1588
|
.checkbox[data-state="unchecked"] {
|
|
1585
|
-
background-color:
|
|
1589
|
+
background-color: var(--color-white, #fff);
|
|
1586
1590
|
border-color: var(--color-gray-400, #9fa2ab);
|
|
1587
1591
|
color: var(--color-gray-100, #eff1f2);
|
|
1588
1592
|
}
|
|
@@ -1756,6 +1760,7 @@ body {
|
|
|
1756
1760
|
.tag-general {
|
|
1757
1761
|
display: inline-flex;
|
|
1758
1762
|
align-items: center;
|
|
1763
|
+
justify-content: center;
|
|
1759
1764
|
height: 32px;
|
|
1760
1765
|
padding-left: 12px;
|
|
1761
1766
|
padding-right: 12px;
|
|
@@ -1767,6 +1772,12 @@ body {
|
|
|
1767
1772
|
transition: all 0.2s ease-in-out;
|
|
1768
1773
|
}
|
|
1769
1774
|
|
|
1775
|
+
/* Neutralize capsize trim inside tags — the tag handles centering */
|
|
1776
|
+
.tag-general::before,
|
|
1777
|
+
.tag-general::after {
|
|
1778
|
+
display: none;
|
|
1779
|
+
}
|
|
1780
|
+
|
|
1770
1781
|
.tag-general:focus-visible {
|
|
1771
1782
|
outline: none;
|
|
1772
1783
|
box-shadow:
|
|
@@ -2161,6 +2172,13 @@ body {
|
|
|
2161
2172
|
transform: translateY(-50%) rotate(90deg);
|
|
2162
2173
|
}
|
|
2163
2174
|
|
|
2175
|
+
[data-slot="tooltip-close"] {
|
|
2176
|
+
position: absolute;
|
|
2177
|
+
top: 1rem;
|
|
2178
|
+
right: 1rem;
|
|
2179
|
+
cursor: pointer;
|
|
2180
|
+
}
|
|
2181
|
+
|
|
2164
2182
|
@media (max-width: 639px) {
|
|
2165
2183
|
.tooltip-content {
|
|
2166
2184
|
max-width: calc(100vw - 2rem);
|
|
@@ -2340,28 +2358,44 @@ body {
|
|
|
2340
2358
|
display: flex;
|
|
2341
2359
|
flex-shrink: 0;
|
|
2342
2360
|
justify-content: center;
|
|
2343
|
-
align-items:
|
|
2361
|
+
align-items: start;
|
|
2344
2362
|
position: relative;
|
|
2345
2363
|
z-index: 0;
|
|
2346
|
-
|
|
2347
|
-
|
|
2348
|
-
|
|
2364
|
+
min-height: 2rem;
|
|
2365
|
+
gap: 1rem;
|
|
2366
|
+
}
|
|
2367
|
+
|
|
2368
|
+
@media (min-width: 640px) {
|
|
2369
|
+
.tabs-nav {
|
|
2370
|
+
gap: 2.5rem;
|
|
2371
|
+
}
|
|
2372
|
+
}
|
|
2373
|
+
|
|
2374
|
+
@media (min-width: 640px) {
|
|
2375
|
+
.tabs-nav--full-width {
|
|
2376
|
+
width: 100%;
|
|
2377
|
+
gap: 0;
|
|
2378
|
+
}
|
|
2379
|
+
|
|
2380
|
+
.tabs-nav--full-width > .tabs-nav-button {
|
|
2381
|
+
flex: 1;
|
|
2382
|
+
justify-content: center;
|
|
2383
|
+
padding: 1px 0.75rem 0;
|
|
2384
|
+
}
|
|
2349
2385
|
}
|
|
2350
2386
|
|
|
2351
2387
|
.tabs-nav-button {
|
|
2352
|
-
font-family: var(--font-overline-large, inherit);
|
|
2353
2388
|
position: relative;
|
|
2354
2389
|
border-radius: 0.375rem;
|
|
2355
2390
|
display: flex;
|
|
2356
2391
|
align-items: center;
|
|
2357
|
-
height: 2rem;
|
|
2358
2392
|
z-index: 20;
|
|
2359
2393
|
background-color: transparent;
|
|
2360
2394
|
cursor: pointer;
|
|
2361
2395
|
user-select: none;
|
|
2362
2396
|
transition: color 0.15s ease-in-out;
|
|
2363
2397
|
border: none;
|
|
2364
|
-
padding: 0;
|
|
2398
|
+
padding: 1px 0 0 0;
|
|
2365
2399
|
}
|
|
2366
2400
|
|
|
2367
2401
|
.tabs-nav-button-text {
|
|
@@ -2423,6 +2457,43 @@ body {
|
|
|
2423
2457
|
justify-content: space-between;
|
|
2424
2458
|
overflow-x: auto;
|
|
2425
2459
|
overflow-y: hidden;
|
|
2460
|
+
scrollbar-width: none;
|
|
2461
|
+
-ms-overflow-style: none;
|
|
2462
|
+
}
|
|
2463
|
+
|
|
2464
|
+
.tabs-container-inner::-webkit-scrollbar {
|
|
2465
|
+
display: none;
|
|
2466
|
+
}
|
|
2467
|
+
|
|
2468
|
+
.tabs-container-inner[data-scroll-left="true"][data-scroll-right="true"] {
|
|
2469
|
+
mask-image: linear-gradient(
|
|
2470
|
+
to right,
|
|
2471
|
+
transparent,
|
|
2472
|
+
black 3rem,
|
|
2473
|
+
black calc(100% - 3rem),
|
|
2474
|
+
transparent
|
|
2475
|
+
);
|
|
2476
|
+
-webkit-mask-image: linear-gradient(
|
|
2477
|
+
to right,
|
|
2478
|
+
transparent,
|
|
2479
|
+
black 3rem,
|
|
2480
|
+
black calc(100% - 3rem),
|
|
2481
|
+
transparent
|
|
2482
|
+
);
|
|
2483
|
+
}
|
|
2484
|
+
|
|
2485
|
+
.tabs-container-inner[data-scroll-left="true"]:not([data-scroll-right="true"]) {
|
|
2486
|
+
mask-image: linear-gradient(to right, transparent, black 3rem);
|
|
2487
|
+
-webkit-mask-image: linear-gradient(to right, transparent, black 3rem);
|
|
2488
|
+
}
|
|
2489
|
+
|
|
2490
|
+
.tabs-container-inner:not([data-scroll-left="true"])[data-scroll-right="true"] {
|
|
2491
|
+
mask-image: linear-gradient(to right, black calc(100% - 3rem), transparent);
|
|
2492
|
+
-webkit-mask-image: linear-gradient(
|
|
2493
|
+
to right,
|
|
2494
|
+
black calc(100% - 3rem),
|
|
2495
|
+
transparent
|
|
2496
|
+
);
|
|
2426
2497
|
}
|
|
2427
2498
|
|
|
2428
2499
|
/* Breadcrumb Styles */
|
|
@@ -2491,7 +2562,7 @@ body {
|
|
|
2491
2562
|
overflow-y: auto;
|
|
2492
2563
|
padding-top: 4rem;
|
|
2493
2564
|
padding-bottom: 4rem;
|
|
2494
|
-
background-color: rgba(0, 0, 0, 0.
|
|
2565
|
+
background-color: rgba(0, 0, 0, 0.2);
|
|
2495
2566
|
cursor: zoom-out;
|
|
2496
2567
|
}
|
|
2497
2568
|
|
|
@@ -2559,7 +2630,7 @@ body {
|
|
|
2559
2630
|
}
|
|
2560
2631
|
}
|
|
2561
2632
|
|
|
2562
|
-
.dialog-close {
|
|
2633
|
+
/* .dialog-close {
|
|
2563
2634
|
position: absolute;
|
|
2564
2635
|
top: 1rem;
|
|
2565
2636
|
right: 1rem;
|
|
@@ -2583,20 +2654,20 @@ body {
|
|
|
2583
2654
|
flex-shrink: 0;
|
|
2584
2655
|
color: var(--color-gray-400);
|
|
2585
2656
|
transition: color 0.2s ease-in-out;
|
|
2586
|
-
}
|
|
2657
|
+
} */
|
|
2587
2658
|
|
|
2588
|
-
.dialog-close:hover svg {
|
|
2659
|
+
/* .dialog-close:hover svg {
|
|
2589
2660
|
color: var(--color-gray-500);
|
|
2590
2661
|
}
|
|
2591
2662
|
|
|
2592
2663
|
.dialog-close-icon {
|
|
2593
2664
|
color: var(--color-gray-400);
|
|
2594
2665
|
transition: color 0.2s ease-in-out;
|
|
2595
|
-
}
|
|
2666
|
+
} */
|
|
2596
2667
|
|
|
2597
|
-
.dialog-close:hover .dialog-close-icon {
|
|
2668
|
+
/* .dialog-close:hover .dialog-close-icon {
|
|
2598
2669
|
color: var(--color-gray-500);
|
|
2599
|
-
}
|
|
2670
|
+
} */
|
|
2600
2671
|
|
|
2601
2672
|
.dialog-header {
|
|
2602
2673
|
display: flex;
|
|
@@ -5,13 +5,7 @@ import {
|
|
|
5
5
|
MobileNavBar,
|
|
6
6
|
MobileNavTrigger,
|
|
7
7
|
} from "../components/ui/mobile-nav";
|
|
8
|
-
import {
|
|
9
|
-
Workflow,
|
|
10
|
-
PenLine,
|
|
11
|
-
MessageSquare,
|
|
12
|
-
TriangleAlert,
|
|
13
|
-
X,
|
|
14
|
-
} from "lucide-react";
|
|
8
|
+
import { TriangleAlert, X } from "lucide-react";
|
|
15
9
|
import { useState } from "react";
|
|
16
10
|
import { UtilityText } from "../components/icons/UtilityText";
|
|
17
11
|
import { UtilityCompare } from "../components/icons/UtilityCompare";
|
|
@@ -25,14 +19,6 @@ import {
|
|
|
25
19
|
DialogHeader,
|
|
26
20
|
DialogTitle,
|
|
27
21
|
} from "@/components/ui/dialog";
|
|
28
|
-
import { useIsMobile } from "@/hooks/use-mobile";
|
|
29
|
-
import {
|
|
30
|
-
DrawerTitle,
|
|
31
|
-
DrawerHeader,
|
|
32
|
-
DrawerContent,
|
|
33
|
-
Drawer,
|
|
34
|
-
DrawerTrigger,
|
|
35
|
-
} from "@/components/ui/drawer";
|
|
36
22
|
|
|
37
23
|
const meta = {
|
|
38
24
|
title: "Review/MobileNav",
|
|
@@ -1,14 +1,22 @@
|
|
|
1
1
|
import type { Meta, StoryObj } from "@storybook/react";
|
|
2
|
-
import {
|
|
2
|
+
import {
|
|
3
|
+
Tabs,
|
|
4
|
+
TabsList,
|
|
5
|
+
TabsTrigger,
|
|
6
|
+
TabsContent,
|
|
7
|
+
} from "../components/ui/tabs";
|
|
8
|
+
import { Button } from "@/components/ui/button";
|
|
9
|
+
import { useState } from "react";
|
|
10
|
+
import { Dialog, DialogContent, DialogTrigger } from "@/components/ui/dialog";
|
|
3
11
|
|
|
4
12
|
const meta = {
|
|
5
13
|
title: "Review/Tabs",
|
|
6
|
-
component:
|
|
14
|
+
component: Tabs,
|
|
7
15
|
tags: ["autodocs"],
|
|
8
16
|
parameters: {
|
|
9
17
|
layout: "padded",
|
|
10
18
|
},
|
|
11
|
-
} satisfies Meta<typeof
|
|
19
|
+
} satisfies Meta<typeof Tabs>;
|
|
12
20
|
|
|
13
21
|
export default meta;
|
|
14
22
|
|
|
@@ -23,19 +31,19 @@ const HomeContent = () => (
|
|
|
23
31
|
team.
|
|
24
32
|
</p>
|
|
25
33
|
<div className="grid grid-cols-1 md:grid-cols-3 gap-4">
|
|
26
|
-
<div className="p-4 bg-white
|
|
34
|
+
<div className="p-4 bg-white rounded-lg">
|
|
27
35
|
<h3 className="font-semibold mb-2">Quick Start</h3>
|
|
28
36
|
<p className="text-sm text-zinc-600 dark:text-zinc-400">
|
|
29
37
|
Get started with our platform in minutes
|
|
30
38
|
</p>
|
|
31
39
|
</div>
|
|
32
|
-
<div className="p-4 bg-white
|
|
40
|
+
<div className="p-4 bg-white rounded-lg">
|
|
33
41
|
<h3 className="font-semibold mb-2">Latest Updates</h3>
|
|
34
42
|
<p className="text-sm text-zinc-600 dark:text-zinc-400">
|
|
35
43
|
See what's new in our latest release
|
|
36
44
|
</p>
|
|
37
45
|
</div>
|
|
38
|
-
<div className="p-4 bg-white
|
|
46
|
+
<div className="p-4 bg-white rounded-lg">
|
|
39
47
|
<h3 className="font-semibold mb-2">Resources</h3>
|
|
40
48
|
<p className="text-sm text-zinc-600 dark:text-zinc-400">
|
|
41
49
|
Access guides and documentation
|
|
@@ -46,13 +54,13 @@ const HomeContent = () => (
|
|
|
46
54
|
<div>
|
|
47
55
|
<h3 className="text-xl font-semibold mb-4">Recent Activity</h3>
|
|
48
56
|
<div className="space-y-3">
|
|
49
|
-
<div className="flex items-center gap-3 p-3 bg-white
|
|
57
|
+
<div className="flex items-center gap-3 p-3 bg-white rounded-lg">
|
|
50
58
|
<div className="w-2 h-2 bg-green-500 rounded-full"></div>
|
|
51
59
|
<p className="text-sm">
|
|
52
60
|
Project "Marketing Campaign" was updated 2 hours ago
|
|
53
61
|
</p>
|
|
54
62
|
</div>
|
|
55
|
-
<div className="flex items-center gap-3 p-3 bg-white
|
|
63
|
+
<div className="flex items-center gap-3 p-3 bg-white rounded-lg">
|
|
56
64
|
<div className="w-2 h-2 bg-blue-500 rounded-full"></div>
|
|
57
65
|
<p className="text-sm">
|
|
58
66
|
New team member John Doe joined the platform
|
|
@@ -126,14 +134,14 @@ const ContactContent = () => (
|
|
|
126
134
|
<label className="block text-sm font-medium mb-1">Name</label>
|
|
127
135
|
<input
|
|
128
136
|
type="text"
|
|
129
|
-
className="w-full p-2 rounded-md border
|
|
137
|
+
className="w-full p-2 rounded-md border dark:border-zinc-700"
|
|
130
138
|
/>
|
|
131
139
|
</div>
|
|
132
140
|
<div>
|
|
133
141
|
<label className="block text-sm font-medium mb-1">Email</label>
|
|
134
142
|
<input
|
|
135
143
|
type="email"
|
|
136
|
-
className="w-full p-2 rounded-md border
|
|
144
|
+
className="w-full p-2 rounded-md border dark:border-zinc-700"
|
|
137
145
|
/>
|
|
138
146
|
</div>
|
|
139
147
|
<button className="w-full bg-black text-white dark:bg-white dark:text-black py-2 rounded-md font-medium">
|
|
@@ -144,54 +152,149 @@ const ContactContent = () => (
|
|
|
144
152
|
</div>
|
|
145
153
|
);
|
|
146
154
|
|
|
147
|
-
const
|
|
148
|
-
|
|
149
|
-
<
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
</
|
|
159
|
-
<
|
|
160
|
-
<
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
Delete Account
|
|
167
|
-
</button>
|
|
168
|
-
</div>
|
|
169
|
-
</div>
|
|
155
|
+
export const Default: Story = {
|
|
156
|
+
render: () => (
|
|
157
|
+
<div className="bg-gray-50 p-10">
|
|
158
|
+
<Tabs defaultValue="home">
|
|
159
|
+
<TabsList>
|
|
160
|
+
<TabsTrigger value="home">Home</TabsTrigger>
|
|
161
|
+
<TabsTrigger value="about">About</TabsTrigger>
|
|
162
|
+
<TabsTrigger value="contact">Contact</TabsTrigger>
|
|
163
|
+
</TabsList>
|
|
164
|
+
<TabsContent value="home">
|
|
165
|
+
<HomeContent />
|
|
166
|
+
</TabsContent>
|
|
167
|
+
<TabsContent value="about">
|
|
168
|
+
<AboutContent />
|
|
169
|
+
</TabsContent>
|
|
170
|
+
<TabsContent value="contact">
|
|
171
|
+
<ContactContent />
|
|
172
|
+
</TabsContent>
|
|
173
|
+
</Tabs>
|
|
170
174
|
</div>
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
const tabs = [
|
|
175
|
-
{ label: "Home", value: "home", content: <HomeContent /> },
|
|
176
|
-
{ label: "About", value: "about", content: <AboutContent /> },
|
|
177
|
-
{ label: "Contact", value: "contact", content: <ContactContent /> },
|
|
178
|
-
];
|
|
175
|
+
),
|
|
176
|
+
};
|
|
179
177
|
|
|
180
|
-
export const
|
|
181
|
-
|
|
182
|
-
|
|
178
|
+
export const Scrollable: Story = {
|
|
179
|
+
parameters: {
|
|
180
|
+
docs: {
|
|
181
|
+
description: {
|
|
182
|
+
story:
|
|
183
|
+
"Use `containerClassName` on `TabsList` to constrain the scroll container width. The selected tab automatically centers — adjacent tabs remain visible on both sides.",
|
|
184
|
+
},
|
|
185
|
+
},
|
|
186
|
+
viewport: { defaultViewport: "mobile1" },
|
|
183
187
|
},
|
|
188
|
+
render: () => (
|
|
189
|
+
<div className="bg-gray-50 p-4">
|
|
190
|
+
<Tabs defaultValue="overview">
|
|
191
|
+
<TabsList containerClassName="max-w-md">
|
|
192
|
+
<TabsTrigger value="overview">Overview</TabsTrigger>
|
|
193
|
+
<TabsTrigger value="features">Features</TabsTrigger>
|
|
194
|
+
<TabsTrigger value="performance">Performance</TabsTrigger>
|
|
195
|
+
<TabsTrigger value="compliance">Compliance</TabsTrigger>
|
|
196
|
+
<TabsTrigger value="reports">Reports</TabsTrigger>
|
|
197
|
+
<TabsTrigger value="team">Team</TabsTrigger>
|
|
198
|
+
<TabsTrigger value="settings">Settings</TabsTrigger>
|
|
199
|
+
</TabsList>
|
|
200
|
+
<TabsContent value="overview">
|
|
201
|
+
<div className="mt-6">
|
|
202
|
+
<p>Overview content.</p>
|
|
203
|
+
</div>
|
|
204
|
+
</TabsContent>
|
|
205
|
+
<TabsContent value="features">
|
|
206
|
+
<div className="mt-6">
|
|
207
|
+
<p>Features content.</p>
|
|
208
|
+
</div>
|
|
209
|
+
</TabsContent>
|
|
210
|
+
<TabsContent value="performance">
|
|
211
|
+
<div className="mt-6">
|
|
212
|
+
<p>Performance content.</p>
|
|
213
|
+
</div>
|
|
214
|
+
</TabsContent>
|
|
215
|
+
<TabsContent value="compliance">
|
|
216
|
+
<div className="mt-6">
|
|
217
|
+
<p>Compliance content.</p>
|
|
218
|
+
</div>
|
|
219
|
+
</TabsContent>
|
|
220
|
+
<TabsContent value="reports">
|
|
221
|
+
<div className="mt-6">
|
|
222
|
+
<p>Reports content.</p>
|
|
223
|
+
</div>
|
|
224
|
+
</TabsContent>
|
|
225
|
+
<TabsContent value="team">
|
|
226
|
+
<div className="mt-6">
|
|
227
|
+
<p>Team content.</p>
|
|
228
|
+
</div>
|
|
229
|
+
</TabsContent>
|
|
230
|
+
<TabsContent value="settings">
|
|
231
|
+
<div className="mt-6">
|
|
232
|
+
<p>Settings content.</p>
|
|
233
|
+
</div>
|
|
234
|
+
</TabsContent>
|
|
235
|
+
</Tabs>
|
|
236
|
+
</div>
|
|
237
|
+
),
|
|
184
238
|
};
|
|
185
239
|
|
|
186
|
-
export const
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
value: "danger-zone",
|
|
193
|
-
content: <DangerZoneContent />,
|
|
240
|
+
export const FullWidth: Story = {
|
|
241
|
+
parameters: {
|
|
242
|
+
docs: {
|
|
243
|
+
description: {
|
|
244
|
+
story:
|
|
245
|
+
"Use `fullWidth` on `TabsList` to expand the tab bar to full width with equal-width triggers. Suited for contained layouts like panels, dialogs, or mobile views.",
|
|
194
246
|
},
|
|
195
|
-
|
|
247
|
+
},
|
|
248
|
+
},
|
|
249
|
+
render: () => (
|
|
250
|
+
<div className="bg-gray-50 p-10">
|
|
251
|
+
<Tabs defaultValue="comments">
|
|
252
|
+
<TabsList fullWidth>
|
|
253
|
+
<TabsTrigger value="comments">Comments</TabsTrigger>
|
|
254
|
+
<TabsTrigger value="rating">Rating</TabsTrigger>
|
|
255
|
+
</TabsList>
|
|
256
|
+
<TabsContent value="comments">
|
|
257
|
+
<div className="mt-6">
|
|
258
|
+
<p>Comments.</p>
|
|
259
|
+
</div>
|
|
260
|
+
</TabsContent>
|
|
261
|
+
<TabsContent value="rating">
|
|
262
|
+
<div className="mt-6">
|
|
263
|
+
<p>Rate your experience.</p>
|
|
264
|
+
</div>
|
|
265
|
+
</TabsContent>
|
|
266
|
+
</Tabs>
|
|
267
|
+
</div>
|
|
268
|
+
),
|
|
269
|
+
};
|
|
270
|
+
|
|
271
|
+
export const WithModal: Story = {
|
|
272
|
+
render: () => {
|
|
273
|
+
const [open, setOpen] = useState(false);
|
|
274
|
+
return (
|
|
275
|
+
<div className="bg-gray-50 p-10">
|
|
276
|
+
<Dialog open={open} onOpenChange={setOpen}>
|
|
277
|
+
<DialogTrigger asChild>
|
|
278
|
+
<Button size="large" variant="general-primary">
|
|
279
|
+
Open Tabs
|
|
280
|
+
</Button>
|
|
281
|
+
</DialogTrigger>
|
|
282
|
+
<DialogContent className="w-[800px]" showCloseButton={false}>
|
|
283
|
+
<Tabs defaultValue="comments">
|
|
284
|
+
<TabsList fullWidth>
|
|
285
|
+
<TabsTrigger value="comments">Comments</TabsTrigger>
|
|
286
|
+
<TabsTrigger value="rating">Rating</TabsTrigger>
|
|
287
|
+
</TabsList>
|
|
288
|
+
<TabsContent value="comments">
|
|
289
|
+
<HomeContent />
|
|
290
|
+
</TabsContent>
|
|
291
|
+
<TabsContent value="rating">
|
|
292
|
+
<AboutContent />
|
|
293
|
+
</TabsContent>
|
|
294
|
+
</Tabs>
|
|
295
|
+
</DialogContent>
|
|
296
|
+
</Dialog>
|
|
297
|
+
</div>
|
|
298
|
+
);
|
|
196
299
|
},
|
|
197
300
|
};
|