gladvn 0.2.16 → 0.2.18
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/bin/cli.js +9 -6
- package/dist/components/macro/accordion-preset.d.ts.map +1 -1
- package/dist/components/macro/alert-dialog-preset.d.ts.map +1 -1
- package/dist/components/macro/alert-preset.d.ts.map +1 -1
- package/dist/components/macro/avatar-preset.d.ts.map +1 -1
- package/dist/components/macro/breadcrumb-preset.d.ts.map +1 -1
- package/dist/components/macro/card-preset.d.ts.map +1 -1
- package/dist/components/macro/carousel-preset.d.ts.map +1 -1
- package/dist/components/macro/checkbox-preset.d.ts.map +1 -1
- package/dist/components/macro/combobox-preset.d.ts.map +1 -1
- package/dist/components/macro/command-preset.d.ts +1 -1
- package/dist/components/macro/command-preset.d.ts.map +1 -1
- package/dist/components/macro/date-picker.d.ts.map +1 -1
- package/dist/components/macro/dialog-preset.d.ts.map +1 -1
- package/dist/components/macro/empty-preset.d.ts.map +1 -1
- package/dist/components/macro/field-preset.d.ts.map +1 -1
- package/dist/components/macro/input-otp-preset.d.ts +6 -0
- package/dist/components/macro/input-otp-preset.d.ts.map +1 -1
- package/dist/components/macro/input-preset.d.ts +1 -1
- package/dist/components/macro/input-preset.d.ts.map +1 -1
- package/dist/components/macro/pagination-preset.d.ts.map +1 -1
- package/dist/components/macro/progress-preset.d.ts.map +1 -1
- package/dist/components/macro/radio-group-preset.d.ts.map +1 -1
- package/dist/components/macro/select-preset.d.ts.map +1 -1
- package/dist/components/macro/slider-preset.d.ts.map +1 -1
- package/dist/components/macro/switch-preset.d.ts.map +1 -1
- package/dist/components/macro/tabs-preset.d.ts +1 -1
- package/dist/components/macro/tabs-preset.d.ts.map +1 -1
- package/dist/components/macro/textarea-preset.d.ts +1 -1
- package/dist/components/macro/textarea-preset.d.ts.map +1 -1
- package/dist/components/micro/accordion.d.ts +7 -0
- package/dist/components/micro/accordion.d.ts.map +1 -1
- package/dist/components/micro/alert-dialog.d.ts.map +1 -1
- package/dist/components/micro/alert.d.ts +7 -0
- package/dist/components/micro/alert.d.ts.map +1 -1
- package/dist/components/micro/aspect-ratio.d.ts +7 -0
- package/dist/components/micro/aspect-ratio.d.ts.map +1 -1
- package/dist/components/micro/avatar.d.ts.map +1 -1
- package/dist/components/micro/badge.d.ts +8 -1
- package/dist/components/micro/badge.d.ts.map +1 -1
- package/dist/components/micro/breadcrumb.d.ts +7 -0
- package/dist/components/micro/breadcrumb.d.ts.map +1 -1
- package/dist/components/micro/button.d.ts +8 -1
- package/dist/components/micro/button.d.ts.map +1 -1
- package/dist/components/micro/calendar.d.ts +2 -2
- package/dist/components/micro/calendar.d.ts.map +1 -1
- package/dist/components/micro/carousel.d.ts.map +1 -1
- package/dist/components/micro/chart.d.ts.map +1 -1
- package/dist/components/micro/checkbox.d.ts.map +1 -1
- package/dist/components/micro/collapsible.d.ts.map +1 -1
- package/dist/components/micro/combobox.d.ts.map +1 -1
- package/dist/components/micro/command.d.ts.map +1 -1
- package/dist/components/micro/context-menu.d.ts.map +1 -1
- package/dist/components/micro/dialog.d.ts.map +1 -1
- package/dist/components/micro/drawer.d.ts.map +1 -1
- package/dist/components/micro/dropdown-menu.d.ts.map +1 -1
- package/dist/components/micro/empty.d.ts +7 -0
- package/dist/components/micro/empty.d.ts.map +1 -1
- package/dist/components/micro/field.d.ts.map +1 -1
- package/dist/components/micro/hover-card.d.ts +1 -1
- package/dist/components/micro/hover-card.d.ts.map +1 -1
- package/dist/components/micro/input-group.d.ts.map +1 -1
- package/dist/components/micro/input-otp.d.ts.map +1 -1
- package/dist/components/micro/input.d.ts +7 -0
- package/dist/components/micro/input.d.ts.map +1 -1
- package/dist/components/micro/item.d.ts.map +1 -1
- package/dist/components/micro/label.d.ts.map +1 -1
- package/dist/components/micro/menubar.d.ts.map +1 -1
- package/dist/components/micro/navigation-menu.d.ts +8 -1
- package/dist/components/micro/navigation-menu.d.ts.map +1 -1
- package/dist/components/micro/pagination.d.ts.map +1 -1
- package/dist/components/micro/popover.d.ts.map +1 -1
- package/dist/components/micro/progress.d.ts.map +1 -1
- package/dist/components/micro/radio-group.d.ts.map +1 -1
- package/dist/components/micro/select.d.ts +1 -1
- package/dist/components/micro/select.d.ts.map +1 -1
- package/dist/components/micro/sheet.d.ts.map +1 -1
- package/dist/components/micro/sidebar.d.ts.map +1 -1
- package/dist/components/micro/skeleton.d.ts +7 -0
- package/dist/components/micro/skeleton.d.ts.map +1 -1
- package/dist/components/micro/slider.d.ts +7 -0
- package/dist/components/micro/slider.d.ts.map +1 -1
- package/dist/components/micro/sonner.d.ts.map +1 -1
- package/dist/components/micro/spinner.d.ts.map +1 -1
- package/dist/components/micro/switch.d.ts.map +1 -1
- package/dist/components/micro/table.d.ts.map +1 -1
- package/dist/components/micro/tabs.d.ts +1 -1
- package/dist/components/micro/tabs.d.ts.map +1 -1
- package/dist/components/micro/textarea.d.ts +7 -0
- package/dist/components/micro/textarea.d.ts.map +1 -1
- package/dist/components/micro/toggle-group.d.ts.map +1 -1
- package/dist/components/micro/toggle.d.ts.map +1 -1
- package/dist/components/micro/tooltip.d.ts +1 -1
- package/dist/components/micro/tooltip.d.ts.map +1 -1
- package/dist/dev/App.d.ts.map +1 -1
- package/dist/dev/components/code-highlighter.d.ts.map +1 -1
- package/dist/dev/components/dev-context.d.ts.map +1 -1
- package/dist/dev/components/showcase.d.ts +1 -1
- package/dist/dev/components/showcase.d.ts.map +1 -1
- package/dist/dev/data.d.ts.map +1 -1
- package/dist/dev/main.d.ts.map +1 -1
- package/dist/dev/sections/buttons.d.ts.map +1 -1
- package/dist/dev/sections/feedback.d.ts.map +1 -1
- package/dist/dev/sections/overview.d.ts.map +1 -1
- package/dist/dev/showcase/accordion.d.ts.map +1 -1
- package/dist/dev/showcase/alert-dialog.d.ts.map +1 -1
- package/dist/dev/showcase/alert.d.ts.map +1 -1
- package/dist/dev/showcase/aspect-ratio.d.ts.map +1 -1
- package/dist/dev/showcase/avatar.d.ts.map +1 -1
- package/dist/dev/showcase/breadcrumb.d.ts.map +1 -1
- package/dist/dev/showcase/button.d.ts.map +1 -1
- package/dist/dev/showcase/calendar.d.ts.map +1 -1
- package/dist/dev/showcase/card.d.ts.map +1 -1
- package/dist/dev/showcase/carousel.d.ts.map +1 -1
- package/dist/dev/showcase/chart.d.ts.map +1 -1
- package/dist/dev/showcase/checkbox.d.ts.map +1 -1
- package/dist/dev/showcase/collapsible.d.ts.map +1 -1
- package/dist/dev/showcase/combobox.d.ts.map +1 -1
- package/dist/dev/showcase/command.d.ts.map +1 -1
- package/dist/dev/showcase/context-menu.d.ts.map +1 -1
- package/dist/dev/showcase/dialog.d.ts.map +1 -1
- package/dist/dev/showcase/drawer.d.ts.map +1 -1
- package/dist/dev/showcase/dropdown-menu.d.ts.map +1 -1
- package/dist/dev/showcase/empty.d.ts.map +1 -1
- package/dist/dev/showcase/hover-card.d.ts.map +1 -1
- package/dist/dev/showcase/input-group.d.ts.map +1 -1
- package/dist/dev/showcase/input-otp.d.ts.map +1 -1
- package/dist/dev/showcase/input.d.ts.map +1 -1
- package/dist/dev/showcase/item.d.ts.map +1 -1
- package/dist/dev/showcase/kbd.d.ts.map +1 -1
- package/dist/dev/showcase/label.d.ts.map +1 -1
- package/dist/dev/showcase/menubar.d.ts.map +1 -1
- package/dist/dev/showcase/navigation-menu.d.ts.map +1 -1
- package/dist/dev/showcase/overview.d.ts.map +1 -1
- package/dist/dev/showcase/pagination.d.ts.map +1 -1
- package/dist/dev/showcase/popover.d.ts.map +1 -1
- package/dist/dev/showcase/progress.d.ts.map +1 -1
- package/dist/dev/showcase/radio-group.d.ts.map +1 -1
- package/dist/dev/showcase/resizable.d.ts.map +1 -1
- package/dist/dev/showcase/scroll-area.d.ts.map +1 -1
- package/dist/dev/showcase/select.d.ts.map +1 -1
- package/dist/dev/showcase/separator.d.ts.map +1 -1
- package/dist/dev/showcase/sheet.d.ts.map +1 -1
- package/dist/dev/showcase/sidebar.d.ts.map +1 -1
- package/dist/dev/showcase/skeleton.d.ts.map +1 -1
- package/dist/dev/showcase/slider.d.ts.map +1 -1
- package/dist/dev/showcase/sonner.d.ts.map +1 -1
- package/dist/dev/showcase/spinner.d.ts.map +1 -1
- package/dist/dev/showcase/switch.d.ts.map +1 -1
- package/dist/dev/showcase/table.d.ts.map +1 -1
- package/dist/dev/showcase/tabs.d.ts.map +1 -1
- package/dist/dev/showcase/textarea.d.ts.map +1 -1
- package/dist/dev/showcase/theme-provider.d.ts.map +1 -1
- package/dist/dev/showcase/toast.d.ts.map +1 -1
- package/dist/dev/showcase/toggle-group.d.ts.map +1 -1
- package/dist/dev/showcase/toggle.d.ts.map +1 -1
- package/dist/dev/showcase/tooltip.d.ts.map +1 -1
- package/dist/index.cjs +2 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/lib/utils.d.ts.map +1 -1
- package/package.json +3 -1
- package/scripts/format-codestrings.ts +87 -0
- package/scripts/organize-imports.ts +21 -0
- package/scripts/regex-format.cjs +67 -0
- package/scripts/tmp.tsx +25 -0
- package/src/components/macro/accordion-preset.test.tsx +1 -0
- package/src/components/macro/accordion-preset.tsx +2 -1
- package/src/components/macro/alert-dialog-preset.tsx +44 -43
- package/src/components/macro/alert-preset.tsx +7 -3
- package/src/components/macro/avatar-preset.tsx +2 -1
- package/src/components/macro/breadcrumb-preset.tsx +2 -1
- package/src/components/macro/card-preset.tsx +2 -1
- package/src/components/macro/carousel-preset.tsx +5 -2
- package/src/components/macro/checkbox-preset.test.tsx +1 -0
- package/src/components/macro/checkbox-preset.tsx +6 -2
- package/src/components/macro/combobox-preset.tsx +6 -3
- package/src/components/macro/command-preset.tsx +7 -3
- package/src/components/macro/date-picker.tsx +77 -59
- package/src/components/macro/dialog-preset.tsx +42 -38
- package/src/components/macro/empty-preset.tsx +2 -1
- package/src/components/macro/field-preset.test.tsx +1 -0
- package/src/components/macro/field-preset.tsx +2 -1
- package/src/components/macro/input-otp-preset.tsx +6 -2
- package/src/components/macro/input-preset.test.tsx +1 -0
- package/src/components/macro/input-preset.tsx +4 -2
- package/src/components/macro/pagination-preset.tsx +3 -1
- package/src/components/macro/progress-preset.test.tsx +1 -0
- package/src/components/macro/progress-preset.tsx +2 -1
- package/src/components/macro/radio-group-preset.tsx +4 -1
- package/src/components/macro/select-preset.tsx +35 -30
- package/src/components/macro/slider-preset.test.tsx +1 -0
- package/src/components/macro/slider-preset.tsx +4 -1
- package/src/components/macro/switch-preset.test.tsx +1 -0
- package/src/components/macro/switch-preset.tsx +4 -1
- package/src/components/macro/tabs-preset.test.tsx +1 -0
- package/src/components/macro/tabs-preset.tsx +4 -2
- package/src/components/macro/textarea-preset.test.tsx +1 -0
- package/src/components/macro/textarea-preset.tsx +4 -1
- package/src/components/micro/accordion.tsx +3 -2
- package/src/components/micro/alert-dialog.tsx +2 -1
- package/src/components/micro/alert.tsx +3 -2
- package/src/components/micro/aspect-ratio.tsx +2 -1
- package/src/components/micro/avatar.tsx +2 -1
- package/src/components/micro/badge.tsx +3 -3
- package/src/components/micro/breadcrumb.tsx +3 -2
- package/src/components/micro/button.test.tsx +1 -0
- package/src/components/micro/button.tsx +3 -3
- package/src/components/micro/calendar.tsx +10 -9
- package/src/components/micro/carousel.tsx +3 -2
- package/src/components/micro/chart.tsx +1 -0
- package/src/components/micro/checkbox.tsx +2 -2
- package/src/components/micro/collapsible.tsx +4 -2
- package/src/components/micro/combobox.tsx +47 -29
- package/src/components/micro/command.tsx +23 -16
- package/src/components/micro/context-menu.tsx +3 -2
- package/src/components/micro/dialog.tsx +2 -1
- package/src/components/micro/drawer.tsx +2 -1
- package/src/components/micro/dropdown-menu.tsx +3 -2
- package/src/components/micro/empty.tsx +2 -1
- package/src/components/micro/field.tsx +4 -3
- package/src/components/micro/hover-card.tsx +20 -19
- package/src/components/micro/input-group.tsx +5 -4
- package/src/components/micro/input-otp.tsx +3 -2
- package/src/components/micro/input.tsx +3 -2
- package/src/components/micro/item.tsx +1 -0
- package/src/components/micro/label.tsx +2 -1
- package/src/components/micro/menubar.tsx +2 -1
- package/src/components/micro/navigation-menu.tsx +18 -17
- package/src/components/micro/pagination.tsx +2 -1
- package/src/components/micro/popover.tsx +2 -1
- package/src/components/micro/progress.tsx +2 -1
- package/src/components/micro/radio-group.tsx +3 -3
- package/src/components/micro/select.tsx +5 -4
- package/src/components/micro/sheet.tsx +2 -1
- package/src/components/micro/sidebar.tsx +4 -1
- package/src/components/micro/skeleton.tsx +2 -1
- package/src/components/micro/slider.tsx +4 -1
- package/src/components/micro/sonner.tsx +2 -1
- package/src/components/micro/spinner.tsx +1 -2
- package/src/components/micro/switch.tsx +2 -2
- package/src/components/micro/table.tsx +2 -1
- package/src/components/micro/tabs.tsx +4 -3
- package/src/components/micro/textarea.tsx +2 -1
- package/src/components/micro/toggle-group.tsx +1 -0
- package/src/components/micro/toggle.tsx +1 -3
- package/src/components/micro/tooltip.tsx +9 -3
- package/src/dev/App.tsx +66 -41
- package/src/dev/components/code-highlighter.tsx +2 -1
- package/src/dev/components/dev-context.tsx +1 -0
- package/src/dev/components/showcase.tsx +13 -14
- package/src/dev/data.ts +206 -52
- package/src/dev/main.tsx +4 -4
- package/src/dev/sections/buttons.tsx +14 -12
- package/src/dev/sections/feedback.tsx +7 -2
- package/src/dev/sections/forms.tsx +11 -11
- package/src/dev/sections/overview.tsx +2 -1
- package/src/dev/showcase/accordion.tsx +399 -314
- package/src/dev/showcase/alert-dialog.tsx +387 -384
- package/src/dev/showcase/alert.tsx +271 -258
- package/src/dev/showcase/aspect-ratio.tsx +102 -105
- package/src/dev/showcase/avatar.tsx +216 -145
- package/src/dev/showcase/badge.tsx +78 -50
- package/src/dev/showcase/breadcrumb.tsx +88 -85
- package/src/dev/showcase/button.tsx +72 -96
- package/src/dev/showcase/calendar.tsx +41 -39
- package/src/dev/showcase/card.tsx +170 -148
- package/src/dev/showcase/carousel.tsx +239 -77
- package/src/dev/showcase/chart.tsx +5 -4
- package/src/dev/showcase/checkbox.tsx +206 -140
- package/src/dev/showcase/collapsible.tsx +108 -84
- package/src/dev/showcase/combobox.tsx +272 -199
- package/src/dev/showcase/command.tsx +31 -28
- package/src/dev/showcase/context-menu.tsx +94 -77
- package/src/dev/showcase/dialog.tsx +445 -424
- package/src/dev/showcase/drawer.tsx +142 -135
- package/src/dev/showcase/dropdown-menu.tsx +165 -161
- package/src/dev/showcase/empty.tsx +173 -158
- package/src/dev/showcase/hover-card.tsx +92 -52
- package/src/dev/showcase/input-group.tsx +193 -160
- package/src/dev/showcase/input-otp.tsx +109 -99
- package/src/dev/showcase/input.tsx +78 -42
- package/src/dev/showcase/item.tsx +101 -98
- package/src/dev/showcase/kbd.tsx +78 -62
- package/src/dev/showcase/label.tsx +16 -23
- package/src/dev/showcase/menubar.tsx +274 -251
- package/src/dev/showcase/navigation-menu.tsx +175 -170
- package/src/dev/showcase/overview.tsx +164 -148
- package/src/dev/showcase/pagination.tsx +101 -69
- package/src/dev/showcase/popover.tsx +113 -86
- package/src/dev/showcase/progress.tsx +99 -69
- package/src/dev/showcase/radio-group.tsx +217 -134
- package/src/dev/showcase/resizable.tsx +65 -55
- package/src/dev/showcase/scroll-area.tsx +32 -22
- package/src/dev/showcase/select.tsx +192 -136
- package/src/dev/showcase/separator.tsx +28 -24
- package/src/dev/showcase/sheet.tsx +182 -134
- package/src/dev/showcase/sidebar.tsx +9 -5
- package/src/dev/showcase/skeleton.tsx +54 -59
- package/src/dev/showcase/slider.tsx +158 -129
- package/src/dev/showcase/sonner.tsx +3 -5
- package/src/dev/showcase/spinner.tsx +22 -18
- package/src/dev/showcase/switch.tsx +207 -110
- package/src/dev/showcase/table.tsx +44 -32
- package/src/dev/showcase/tabs.tsx +272 -267
- package/src/dev/showcase/textarea.tsx +162 -116
- package/src/dev/showcase/theme-provider.tsx +596 -534
- package/src/dev/showcase/toast.tsx +37 -38
- package/src/dev/showcase/toggle-group.tsx +87 -39
- package/src/dev/showcase/toggle.tsx +36 -27
- package/src/dev/showcase/tooltip.tsx +154 -119
- package/src/lib/utils.test.ts +1 -0
- package/src/lib/utils.ts +1 -1
- package/src/styles/gladvn.css +1 -1
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { useState } from "react";
|
|
2
|
+
|
|
1
3
|
import { CarouselPreset } from "../../components/macro/carousel-preset";
|
|
2
4
|
import { Card, CardContent } from "../../components/micro/card";
|
|
3
5
|
import {
|
|
@@ -16,7 +18,6 @@ import {
|
|
|
16
18
|
ShowcaseDocs,
|
|
17
19
|
} from "../../dev/components/showcase";
|
|
18
20
|
import { cn } from "../../lib/utils";
|
|
19
|
-
import { useState } from "react";
|
|
20
21
|
|
|
21
22
|
const SLIDES = [
|
|
22
23
|
{
|
|
@@ -127,12 +128,45 @@ function CarouselMacroShowcase() {
|
|
|
127
128
|
label="Tiêu chuẩn (Standard)"
|
|
128
129
|
description="Băng chuyền cơ bản nhất với cầu trượt."
|
|
129
130
|
codeString={`<CarouselPreset
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
131
|
+
items={[
|
|
132
|
+
{
|
|
133
|
+
id: "std-1",
|
|
134
|
+
content: (
|
|
135
|
+
<div className="p-1 border border-border rounded-xl">
|
|
136
|
+
<div className="flex aspect-square items-center justify-center p-6 bg-muted/20 rounded-lg">
|
|
137
|
+
<span className="text-4xl font-semibold">
|
|
138
|
+
1
|
|
139
|
+
</span>
|
|
140
|
+
</div>
|
|
141
|
+
</div>
|
|
142
|
+
),
|
|
143
|
+
},
|
|
144
|
+
{
|
|
145
|
+
id: "std-2",
|
|
146
|
+
content: (
|
|
147
|
+
<div className="p-1 border border-border rounded-xl">
|
|
148
|
+
<div className="flex aspect-square items-center justify-center p-6 bg-muted/20 rounded-lg">
|
|
149
|
+
<span className="text-4xl font-semibold">
|
|
150
|
+
2
|
|
151
|
+
</span>
|
|
152
|
+
</div>
|
|
153
|
+
</div>
|
|
154
|
+
),
|
|
155
|
+
},
|
|
156
|
+
{
|
|
157
|
+
id: "std-3",
|
|
158
|
+
content: (
|
|
159
|
+
<div className="p-1 border border-border rounded-xl">
|
|
160
|
+
<div className="flex aspect-square items-center justify-center p-6 bg-muted/20 rounded-lg">
|
|
161
|
+
<span className="text-4xl font-semibold">
|
|
162
|
+
3
|
|
163
|
+
</span>
|
|
164
|
+
</div>
|
|
165
|
+
</div>
|
|
166
|
+
),
|
|
167
|
+
},
|
|
168
|
+
]}
|
|
169
|
+
/>`}
|
|
136
170
|
>
|
|
137
171
|
<div className="w-full max-w-sm px-12">
|
|
138
172
|
<CarouselPreset
|
|
@@ -176,12 +210,39 @@ function CarouselMacroShowcase() {
|
|
|
176
210
|
label="Thư viện ảnh (Image Gallery)"
|
|
177
211
|
description="Sử dụng hình ảnh thực làm nội dung slide."
|
|
178
212
|
codeString={`<CarouselPreset
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
213
|
+
items={[
|
|
214
|
+
{
|
|
215
|
+
id: "img-1",
|
|
216
|
+
content: (
|
|
217
|
+
<img
|
|
218
|
+
src="https://images.unsplash.com/photo-1707343843437-caacff5cfa74?q=80&w=600&h=400&auto=format&fit=crop"
|
|
219
|
+
alt="Slide 1"
|
|
220
|
+
className="rounded-xl object-cover"
|
|
221
|
+
/>
|
|
222
|
+
),
|
|
223
|
+
},
|
|
224
|
+
{
|
|
225
|
+
id: "img-2",
|
|
226
|
+
content: (
|
|
227
|
+
<img
|
|
228
|
+
src="https://images.unsplash.com/photo-1682687220742-aba13b6e50ba?q=80&w=600&h=400&auto=format&fit=crop"
|
|
229
|
+
alt="Slide 2"
|
|
230
|
+
className="rounded-xl object-cover"
|
|
231
|
+
/>
|
|
232
|
+
),
|
|
233
|
+
},
|
|
234
|
+
{
|
|
235
|
+
id: "img-3",
|
|
236
|
+
content: (
|
|
237
|
+
<img
|
|
238
|
+
src="https://images.unsplash.com/photo-1707343843437-caacff5cfa74?q=80&w=600&h=400&auto=format&fit=crop"
|
|
239
|
+
alt="Slide 3"
|
|
240
|
+
className="rounded-xl object-cover"
|
|
241
|
+
/>
|
|
242
|
+
),
|
|
243
|
+
},
|
|
244
|
+
]}
|
|
245
|
+
/>`}
|
|
185
246
|
>
|
|
186
247
|
<div className="w-full max-w-sm px-12">
|
|
187
248
|
<CarouselPreset
|
|
@@ -227,14 +288,47 @@ function CarouselMacroShowcase() {
|
|
|
227
288
|
label="Vòng lặp vô hạn (Loop Enabled)"
|
|
228
289
|
description="Chỉ hiển thị dấu chấm (ẩn mũi tên)."
|
|
229
290
|
codeString={`<CarouselPreset
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
291
|
+
opts={{ loop: true }}
|
|
292
|
+
showArrows={false}
|
|
293
|
+
items={[
|
|
294
|
+
{
|
|
295
|
+
id: "loop-1",
|
|
296
|
+
content: (
|
|
297
|
+
<div className="p-1 border border-border rounded-xl">
|
|
298
|
+
<div className="flex aspect-square items-center justify-center p-6 bg-gradient-to-tr from-violet-500 to-purple-500 rounded-lg text-white">
|
|
299
|
+
<span className="text-4xl font-semibold">
|
|
300
|
+
1
|
|
301
|
+
</span>
|
|
302
|
+
</div>
|
|
303
|
+
</div>
|
|
304
|
+
),
|
|
305
|
+
},
|
|
306
|
+
{
|
|
307
|
+
id: "loop-2",
|
|
308
|
+
content: (
|
|
309
|
+
<div className="p-1 border border-border rounded-xl">
|
|
310
|
+
<div className="flex aspect-square items-center justify-center p-6 bg-gradient-to-tr from-pink-500 to-rose-500 rounded-lg text-white">
|
|
311
|
+
<span className="text-4xl font-semibold">
|
|
312
|
+
2
|
|
313
|
+
</span>
|
|
314
|
+
</div>
|
|
315
|
+
</div>
|
|
316
|
+
),
|
|
317
|
+
},
|
|
318
|
+
{
|
|
319
|
+
id: "loop-3",
|
|
320
|
+
content: (
|
|
321
|
+
<div className="p-1 border border-border rounded-xl">
|
|
322
|
+
<div className="flex aspect-square items-center justify-center p-6 bg-gradient-to-tr from-blue-500 to-cyan-500 rounded-lg text-white">
|
|
323
|
+
<span className="text-4xl font-semibold">
|
|
324
|
+
3
|
|
325
|
+
</span>
|
|
326
|
+
</div>
|
|
327
|
+
</div>
|
|
328
|
+
),
|
|
329
|
+
},
|
|
330
|
+
]}
|
|
331
|
+
/>`}
|
|
238
332
|
>
|
|
239
333
|
<div className="w-full max-w-sm">
|
|
240
334
|
<CarouselPreset
|
|
@@ -280,13 +374,46 @@ function CarouselMacroShowcase() {
|
|
|
280
374
|
label="Chỉ mũi tên (Arrows Only)"
|
|
281
375
|
description="Mũi tên điều hướng không có dấu chấm."
|
|
282
376
|
codeString={`<CarouselPreset
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
377
|
+
showDots={false}
|
|
378
|
+
items={[
|
|
379
|
+
{
|
|
380
|
+
id: "arr-1",
|
|
381
|
+
content: (
|
|
382
|
+
<div className="p-1 border border-border rounded-xl">
|
|
383
|
+
<div className="flex aspect-square items-center justify-center p-6 bg-muted/20 rounded-lg">
|
|
384
|
+
<span className="text-4xl font-semibold">
|
|
385
|
+
A
|
|
386
|
+
</span>
|
|
387
|
+
</div>
|
|
388
|
+
</div>
|
|
389
|
+
),
|
|
390
|
+
},
|
|
391
|
+
{
|
|
392
|
+
id: "arr-2",
|
|
393
|
+
content: (
|
|
394
|
+
<div className="p-1 border border-border rounded-xl">
|
|
395
|
+
<div className="flex aspect-square items-center justify-center p-6 bg-muted/20 rounded-lg">
|
|
396
|
+
<span className="text-4xl font-semibold">
|
|
397
|
+
B
|
|
398
|
+
</span>
|
|
399
|
+
</div>
|
|
400
|
+
</div>
|
|
401
|
+
),
|
|
402
|
+
},
|
|
403
|
+
{
|
|
404
|
+
id: "arr-3",
|
|
405
|
+
content: (
|
|
406
|
+
<div className="p-1 border border-border rounded-xl">
|
|
407
|
+
<div className="flex aspect-square items-center justify-center p-6 bg-muted/20 rounded-lg">
|
|
408
|
+
<span className="text-4xl font-semibold">
|
|
409
|
+
C
|
|
410
|
+
</span>
|
|
411
|
+
</div>
|
|
412
|
+
</div>
|
|
413
|
+
),
|
|
414
|
+
},
|
|
415
|
+
]}
|
|
416
|
+
/>`}
|
|
290
417
|
>
|
|
291
418
|
<div className="w-full max-w-sm px-12">
|
|
292
419
|
<CarouselPreset
|
|
@@ -349,16 +476,37 @@ return (
|
|
|
349
476
|
label="Theo chiều dọc (Vertical Orientation)"
|
|
350
477
|
description="Băng chuyền macro cuộn theo chiều dọc."
|
|
351
478
|
codeString={`<CarouselPreset
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
479
|
+
className="w-full"
|
|
480
|
+
orientation="vertical"
|
|
481
|
+
contentClassName="h-[300px]"
|
|
482
|
+
itemClassName="basis-[250px]"
|
|
483
|
+
items={[
|
|
484
|
+
{
|
|
485
|
+
id: "v1",
|
|
486
|
+
content: (
|
|
487
|
+
<div className="h-full w-full border border-border rounded-xl flex items-center justify-center bg-muted/20 text-4xl font-semibold">
|
|
488
|
+
A
|
|
489
|
+
</div>
|
|
490
|
+
),
|
|
491
|
+
},
|
|
492
|
+
{
|
|
493
|
+
id: "v2",
|
|
494
|
+
content: (
|
|
495
|
+
<div className="h-full w-full border border-border rounded-xl flex items-center justify-center bg-muted/20 text-4xl font-semibold">
|
|
496
|
+
B
|
|
497
|
+
</div>
|
|
498
|
+
),
|
|
499
|
+
},
|
|
500
|
+
{
|
|
501
|
+
id: "v3",
|
|
502
|
+
content: (
|
|
503
|
+
<div className="h-full w-full border border-border rounded-xl flex items-center justify-center bg-muted/20 text-4xl font-semibold">
|
|
504
|
+
C
|
|
505
|
+
</div>
|
|
506
|
+
),
|
|
507
|
+
},
|
|
508
|
+
]}
|
|
509
|
+
/>`}
|
|
362
510
|
>
|
|
363
511
|
<div className="w-full max-w-sm px-12 py-12 flex justify-center">
|
|
364
512
|
<CarouselPreset
|
|
@@ -409,18 +557,21 @@ function CarouselMicroShowcase() {
|
|
|
409
557
|
<ExampleSection
|
|
410
558
|
label="Hero Banner (Overlay Navigation)"
|
|
411
559
|
description="Mũi tên kính mờ nằm đè trên Banner, chỉ hiện khi hover. Dấu chấm nằm sát mép dưới."
|
|
412
|
-
codeString={`<Carousel
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
560
|
+
codeString={`<Carousel
|
|
561
|
+
opts={{ loop: true }}
|
|
562
|
+
className="group relative w-full overflow-hidden rounded-2xl shadow-xl"
|
|
563
|
+
>
|
|
564
|
+
<CarouselContent className="-ml-4">
|
|
565
|
+
<CarouselItem className="pl-4">...</CarouselItem>
|
|
566
|
+
</CarouselContent>
|
|
567
|
+
<div className="pointer-events-none absolute inset-0 z-10 flex items-center justify-between p-4 opacity-0 transition-opacity duration-300 group-hover:opacity-100">
|
|
568
|
+
<CarouselPrevious className="pointer-events-auto bg-background/50 backdrop-blur-md" />
|
|
569
|
+
<CarouselNext className="pointer-events-auto bg-background/50 backdrop-blur-md" />
|
|
570
|
+
</div>
|
|
571
|
+
<div className="absolute bottom-4 left-0 right-0 z-10">
|
|
572
|
+
<CarouselDots className="[&>[data-slot=carousel-dot][data-active]]:bg-white [&>[data-slot=carousel-dot]]:bg-white/40" />
|
|
573
|
+
</div>
|
|
574
|
+
</Carousel>`}
|
|
424
575
|
>
|
|
425
576
|
<div className="mx-auto w-full max-w-4xl">
|
|
426
577
|
<Carousel
|
|
@@ -463,35 +614,46 @@ function CarouselMicroShowcase() {
|
|
|
463
614
|
label="Nhiều phần tử trên 1 slide (Product Gallery)"
|
|
464
615
|
description="Hiển thị nhiều Card (vd: basis-1/2, lg:basis-1/3) trên cùng một Slide của Băng chuyền."
|
|
465
616
|
codeString={`<div className="mx-auto w-full max-w-5xl px-12">
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
617
|
+
<Carousel
|
|
618
|
+
opts={{ align: "start" }}
|
|
619
|
+
className="w-full relative"
|
|
620
|
+
>
|
|
621
|
+
<CarouselContent className="-ml-4">
|
|
622
|
+
{Array.from({ length: 10 }).map((_, index) => (
|
|
623
|
+
<CarouselItem
|
|
624
|
+
key={index}
|
|
625
|
+
className="pl-4 md:basis-1/2 lg:basis-1/3"
|
|
626
|
+
>
|
|
627
|
+
<div className="p-1">
|
|
628
|
+
<Card className="overflow-hidden transition-all duration-300 hover:shadow-lg hover:-translate-y-1">
|
|
629
|
+
<div className="aspect-4/3 bg-muted flex items-center justify-center relative group">
|
|
630
|
+
<span className="text-4xl font-black text-muted-foreground/30 transition-transform duration-500 group-hover:scale-110">
|
|
631
|
+
0{index + 1}
|
|
632
|
+
</span>
|
|
633
|
+
<div className="absolute inset-0 bg-linear-to-t from-black/60 to-transparent opacity-0 transition-opacity duration-300 group-hover:opacity-100 flex items-end p-4">
|
|
634
|
+
<span className="text-white font-medium">
|
|
635
|
+
View Item {index + 1}
|
|
636
|
+
</span>
|
|
637
|
+
</div>
|
|
478
638
|
</div>
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
639
|
+
<CardContent className="p-4">
|
|
640
|
+
<div className="text-sm font-medium text-muted-foreground mb-1">
|
|
641
|
+
Category
|
|
642
|
+
</div>
|
|
643
|
+
<h4 className="font-semibold text-lg leading-none">
|
|
644
|
+
Featured Item {index + 1}
|
|
645
|
+
</h4>
|
|
646
|
+
</CardContent>
|
|
647
|
+
</Card>
|
|
648
|
+
</div>
|
|
649
|
+
</CarouselItem>
|
|
650
|
+
))}
|
|
651
|
+
</CarouselContent>
|
|
489
652
|
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
</div
|
|
494
|
-
`}
|
|
653
|
+
<CarouselPrevious className="absolute -left-12 top-1/2 -translate-y-1/2 border-border shadow-sm hover:bg-accent" />
|
|
654
|
+
<CarouselNext className="absolute -right-12 top-1/2 -translate-y-1/2 border-border shadow-sm hover:bg-accent" />
|
|
655
|
+
</Carousel>
|
|
656
|
+
</div>`}
|
|
495
657
|
>
|
|
496
658
|
<div className="mx-auto w-full max-w-5xl px-12">
|
|
497
659
|
<Carousel opts={{ align: "start" }} className="w-full relative">
|
|
@@ -23,10 +23,11 @@ export default function ChartShowcase() {
|
|
|
23
23
|
generalConcept={
|
|
24
24
|
<ShowcaseDocs>
|
|
25
25
|
<DocsP>
|
|
26
|
-
Component wrapper cho thư viện <DocsCode>Recharts</DocsCode>. Cung
|
|
27
|
-
<DocsCode>ChartContainer</DocsCode> để cấu hình theme màu sắc,{" "}
|
|
28
|
-
<DocsCode>ChartTooltip</DocsCode> và
|
|
29
|
-
để hiển thị thông tin bổ sung khi
|
|
26
|
+
Component wrapper cho thư viện <DocsCode>Recharts</DocsCode>. Cung
|
|
27
|
+
cấp <DocsCode>ChartContainer</DocsCode> để cấu hình theme màu sắc,{" "}
|
|
28
|
+
<DocsCode>ChartTooltip</DocsCode> và{" "}
|
|
29
|
+
<DocsCode>ChartLegend</DocsCode> để hiển thị thông tin bổ sung khi
|
|
30
|
+
hover.
|
|
30
31
|
</DocsP>
|
|
31
32
|
</ShowcaseDocs>
|
|
32
33
|
}
|