gladvn 0.2.36 → 0.2.37
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/README.md +1 -1
- package/package.json +1 -1
- package/scripts/strip-comments.ts +79 -0
- package/src/blocks/auth-form.tsx +34 -30
- package/src/blocks/auth-recovery.tsx +9 -13
- package/src/blocks/auth-split.tsx +46 -36
- package/src/blocks/settings.tsx +84 -117
- package/src/components/macro/alert-preset.tsx +3 -1
- package/src/components/macro/carousel-preset.tsx +0 -1
- package/src/components/macro/checkbox-preset.test.tsx +2 -2
- package/src/components/macro/checkbox-preset.tsx +1 -2
- package/src/components/macro/command-preset.tsx +1 -1
- package/src/components/macro/date-picker.tsx +5 -18
- package/src/components/macro/dialog-preset.tsx +5 -3
- package/src/components/macro/input-preset.tsx +0 -1
- package/src/components/macro/select-preset.tsx +1 -1
- package/src/components/macro/switch-preset.test.tsx +1 -1
- package/src/components/micro/accordion.test.tsx +6 -12
- package/src/components/micro/alert-dialog.tsx +0 -2
- package/src/components/micro/alert.test.tsx +5 -8
- package/src/components/micro/alert.tsx +0 -2
- package/src/components/micro/badge.test.tsx +5 -7
- package/src/components/micro/badge.tsx +1 -3
- package/src/components/micro/button.test.tsx +19 -26
- package/src/components/micro/button.tsx +3 -11
- package/src/components/micro/calendar.tsx +12 -13
- package/src/components/micro/card.test.tsx +3 -5
- package/src/components/micro/carousel.tsx +0 -1
- package/src/components/micro/chart.tsx +3 -2
- package/src/components/micro/checkbox.test.tsx +9 -18
- package/src/components/micro/combobox.tsx +1 -3
- package/src/components/micro/command.tsx +23 -11
- package/src/components/micro/context-menu.tsx +0 -2
- package/src/components/micro/dialog.test.tsx +6 -14
- package/src/components/micro/dialog.tsx +0 -2
- package/src/components/micro/drawer.tsx +0 -3
- package/src/components/micro/dropdown-menu.test.tsx +8 -14
- package/src/components/micro/dropdown-menu.tsx +0 -2
- package/src/components/micro/field.tsx +3 -3
- package/src/components/micro/hover-card.tsx +0 -2
- package/src/components/micro/input-group.tsx +9 -42
- package/src/components/micro/input.test.tsx +15 -24
- package/src/components/micro/navigation-menu.tsx +0 -2
- package/src/components/micro/popover.test.tsx +5 -9
- package/src/components/micro/progress.tsx +5 -1
- package/src/components/micro/select.test.tsx +5 -18
- package/src/components/micro/select.tsx +3 -5
- package/src/components/micro/separator.tsx +1 -1
- package/src/components/micro/sheet.test.tsx +6 -14
- package/src/components/micro/sheet.tsx +0 -2
- package/src/components/micro/sidebar.tsx +5 -6
- package/src/components/micro/sonner.tsx +0 -1
- package/src/components/micro/switch.test.tsx +9 -18
- package/src/components/micro/switch.tsx +1 -1
- package/src/components/micro/tabs.test.tsx +5 -11
- package/src/components/micro/theme-provider.tsx +0 -12
- package/src/components/micro/toggle-group.tsx +1 -12
- package/src/components/micro/tooltip.test.tsx +7 -12
- package/src/dev/App.tsx +6 -6
- package/src/dev/components/BlockViewer.tsx +15 -4
- package/src/dev/components/Container.tsx +20 -0
- package/src/dev/components/GladvnLogo.tsx +3 -9
- package/src/dev/components/code-highlighter.tsx +5 -3
- package/src/dev/components/showcase.tsx +116 -168
- package/src/dev/sections/buttons.tsx +4 -9
- package/src/dev/sections/display.tsx +68 -72
- package/src/dev/sections/feedback.tsx +304 -314
- package/src/dev/sections/forms.tsx +10 -14
- package/src/dev/sections/interactive.tsx +32 -32
- package/src/dev/sections/overview.tsx +2 -10
- package/src/dev/showcase/accordion.tsx +512 -554
- package/src/dev/showcase/alert-dialog.tsx +525 -565
- package/src/dev/showcase/alert.tsx +352 -402
- package/src/dev/showcase/aspect-ratio.tsx +167 -193
- package/src/dev/showcase/avatar.tsx +231 -269
- package/src/dev/showcase/badge.tsx +92 -140
- package/src/dev/showcase/breadcrumb.tsx +113 -135
- package/src/dev/showcase/button.tsx +140 -173
- package/src/dev/showcase/calendar.tsx +187 -237
- package/src/dev/showcase/card.tsx +229 -261
- package/src/dev/showcase/carousel.tsx +288 -315
- package/src/dev/showcase/chart.tsx +44 -50
- package/src/dev/showcase/checkbox.tsx +286 -330
- package/src/dev/showcase/collapsible.tsx +143 -160
- package/src/dev/showcase/combobox.tsx +327 -369
- package/src/dev/showcase/command.tsx +106 -120
- package/src/dev/showcase/context-menu.tsx +93 -107
- package/src/dev/showcase/dialog.tsx +585 -630
- package/src/dev/showcase/drawer.tsx +176 -196
- package/src/dev/showcase/dropdown-menu.tsx +183 -201
- package/src/dev/showcase/empty.tsx +232 -274
- package/src/dev/showcase/hover-card.tsx +153 -180
- package/src/dev/showcase/input-group.tsx +221 -253
- package/src/dev/showcase/input-otp.tsx +204 -250
- package/src/dev/showcase/input.tsx +246 -325
- package/src/dev/showcase/item.tsx +134 -152
- package/src/dev/showcase/kbd.tsx +149 -172
- package/src/dev/showcase/label.tsx +50 -68
- package/src/dev/showcase/menubar.tsx +194 -213
- package/src/dev/showcase/navigation-menu.tsx +119 -133
- package/src/dev/showcase/overview-components/ArchitectureSection.tsx +126 -0
- package/src/dev/showcase/overview-components/CodeBlock.tsx +50 -0
- package/src/dev/showcase/overview-components/ColorPaletteSection.tsx +44 -0
- package/src/dev/showcase/overview-components/DashboardPreview.tsx +159 -0
- package/src/dev/showcase/overview-components/FeatureGridSection.tsx +535 -0
- package/src/dev/showcase/overview-components/FooterCTA.tsx +137 -0
- package/src/dev/showcase/overview-components/HeroSection.tsx +65 -0
- package/src/dev/showcase/overview-components/PrinciplesSection.tsx +128 -0
- package/src/dev/showcase/overview.tsx +21 -1163
- package/src/dev/showcase/pagination.tsx +144 -190
- package/src/dev/showcase/popover.tsx +181 -196
- package/src/dev/showcase/progress.tsx +141 -189
- package/src/dev/showcase/radio-group.tsx +272 -332
- package/src/dev/showcase/resizable.tsx +119 -141
- package/src/dev/showcase/scroll-area.tsx +21 -36
- package/src/dev/showcase/select.tsx +262 -322
- package/src/dev/showcase/separator.tsx +75 -73
- package/src/dev/showcase/sheet.tsx +333 -361
- package/src/dev/showcase/sidebar.tsx +53 -59
- package/src/dev/showcase/skeleton.tsx +93 -112
- package/src/dev/showcase/slider.tsx +244 -296
- package/src/dev/showcase/sonner.tsx +251 -258
- package/src/dev/showcase/spinner.tsx +46 -67
- package/src/dev/showcase/switch.tsx +298 -362
- package/src/dev/showcase/table.tsx +76 -80
- package/src/dev/showcase/tabs.tsx +302 -355
- package/src/dev/showcase/textarea.tsx +240 -293
- package/src/dev/showcase/toast.tsx +48 -54
- package/src/dev/showcase/toggle-group.tsx +104 -129
- package/src/dev/showcase/toggle.tsx +82 -102
- package/src/dev/showcase/tooltip.tsx +173 -192
- package/src/dev/showcase/why.tsx +6 -12
- package/src/hooks/use-mobile.test.ts +3 -2
- package/src/lib/utils.test.ts +5 -4
|
@@ -18,25 +18,19 @@ import { useDevContext } from "../../dev/components/dev-context";
|
|
|
18
18
|
import {
|
|
19
19
|
DocsP,
|
|
20
20
|
ExampleGrid,
|
|
21
|
-
|
|
21
|
+
ShowcaseExample,
|
|
22
22
|
Showcase,
|
|
23
23
|
ShowcaseDocs
|
|
24
24
|
} from "../../dev/components/showcase";
|
|
25
25
|
import { type Size } from "../../lib/types";
|
|
26
26
|
|
|
27
|
-
// ──────────────────────────────────────────────────────────
|
|
28
|
-
// SECTION 2: Micro Content (không export)
|
|
29
|
-
// ──────────────────────────────────────────────────────────
|
|
30
27
|
function PopoverMicroShowcase({ globalSize }: { globalSize: Size }) {
|
|
31
28
|
const [isOpen, setIsOpen] = useState(false);
|
|
32
29
|
|
|
33
30
|
return (
|
|
34
|
-
<div className="space-y-10
|
|
31
|
+
<div className="space-y-10">
|
|
35
32
|
<ExampleGrid>
|
|
36
|
-
<
|
|
37
|
-
label="Default"
|
|
38
|
-
description="Cửa sổ Popover tiêu chuẩn."
|
|
39
|
-
codeString={`<Popover>
|
|
33
|
+
<ShowcaseExample title="Mặc định" description="Cửa sổ Popover tiêu chuẩn." code={`<Popover>
|
|
40
34
|
<PopoverTrigger
|
|
41
35
|
render={
|
|
42
36
|
<Button variant="outline" size="${globalSize}">
|
|
@@ -53,7 +47,7 @@ function PopoverMicroShowcase({ globalSize }: { globalSize: Size }) {
|
|
|
53
47
|
</PopoverHeader>
|
|
54
48
|
<div className="grid gap-4 mt-4">
|
|
55
49
|
<div className="grid grid-cols-3 items-center gap-4">
|
|
56
|
-
<Label htmlFor="width">
|
|
50
|
+
<Label htmlFor="width">Chiều rộng</Label>
|
|
57
51
|
<Input
|
|
58
52
|
id="width"
|
|
59
53
|
defaultValue="100%"
|
|
@@ -71,51 +65,49 @@ function PopoverMicroShowcase({ globalSize }: { globalSize: Size }) {
|
|
|
71
65
|
</div>
|
|
72
66
|
</PopoverContent>
|
|
73
67
|
</Popover>
|
|
74
|
-
`}
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
68
|
+
`} preview={
|
|
69
|
+
<>
|
|
70
|
+
<Popover>
|
|
71
|
+
<PopoverTrigger
|
|
72
|
+
render={
|
|
73
|
+
<Button variant="outline" size={globalSize}>
|
|
74
|
+
Open Popover
|
|
75
|
+
</Button>
|
|
76
|
+
}
|
|
77
|
+
/>
|
|
84
78
|
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
79
|
+
<PopoverContent className="w-80" sideOffset={8}>
|
|
80
|
+
<PopoverHeader>
|
|
81
|
+
<PopoverTitle>Dimensions</PopoverTitle>
|
|
82
|
+
<PopoverDescription>
|
|
83
|
+
Cài đặt kích thước cho layer.
|
|
84
|
+
</PopoverDescription>
|
|
85
|
+
</PopoverHeader>
|
|
86
|
+
<div className="grid gap-4 mt-4">
|
|
87
|
+
<div className="grid grid-cols-3 items-center gap-4">
|
|
88
|
+
<Label htmlFor="width">Chiều rộng</Label>
|
|
89
|
+
<Input
|
|
90
|
+
id="width"
|
|
91
|
+
defaultValue="100%"
|
|
92
|
+
className="col-span-2 h-8"
|
|
93
|
+
/>
|
|
94
|
+
</div>
|
|
95
|
+
<div className="grid grid-cols-3 items-center gap-4">
|
|
96
|
+
<Label htmlFor="height">Height</Label>
|
|
97
|
+
<Input
|
|
98
|
+
id="height"
|
|
99
|
+
defaultValue="200px"
|
|
100
|
+
className="col-span-2 h-8"
|
|
101
|
+
/>
|
|
102
|
+
</div>
|
|
103
|
+
</div>
|
|
104
|
+
</PopoverContent>
|
|
105
|
+
|
|
106
|
+
</Popover>
|
|
107
|
+
</>
|
|
108
|
+
} />
|
|
114
109
|
|
|
115
|
-
<
|
|
116
|
-
label="Icon Trigger"
|
|
117
|
-
description="Mở Popover bằng Icon Button."
|
|
118
|
-
codeString={`<div className="flex gap-4">
|
|
110
|
+
<ShowcaseExample title="Icon Trigger" description="Mở Popover bằng Icon Button." code={`<div className="flex gap-4">
|
|
119
111
|
<Popover>
|
|
120
112
|
<PopoverTrigger
|
|
121
113
|
render={
|
|
@@ -181,72 +173,70 @@ function PopoverMicroShowcase({ globalSize }: { globalSize: Size }) {
|
|
|
181
173
|
</PopoverContent>
|
|
182
174
|
|
|
183
175
|
</Popover>
|
|
184
|
-
</div>`}
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
176
|
+
</div>`} preview={
|
|
177
|
+
<>
|
|
178
|
+
<div className="flex gap-4">
|
|
179
|
+
<Popover>
|
|
180
|
+
<PopoverTrigger
|
|
181
|
+
render={
|
|
182
|
+
<Button
|
|
183
|
+
variant="ghost"
|
|
184
|
+
size="md"
|
|
185
|
+
iconOnly
|
|
186
|
+
className="rounded-full"
|
|
187
|
+
>
|
|
188
|
+
<Bell className="size-4" />
|
|
189
|
+
</Button>
|
|
190
|
+
}
|
|
191
|
+
/>
|
|
200
192
|
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
193
|
+
<PopoverContent className="w-64" sideOffset={8} align="start">
|
|
194
|
+
<PopoverHeader>
|
|
195
|
+
<PopoverTitle>Thông báo</PopoverTitle>
|
|
196
|
+
<PopoverDescription>
|
|
197
|
+
Bạn có 3 tin nhắn chưa đọc.
|
|
198
|
+
</PopoverDescription>
|
|
199
|
+
</PopoverHeader>
|
|
200
|
+
</PopoverContent>
|
|
201
|
+
|
|
202
|
+
</Popover>
|
|
211
203
|
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
204
|
+
<Popover>
|
|
205
|
+
<PopoverTrigger
|
|
206
|
+
render={
|
|
207
|
+
<Button variant="outline" size="md" iconOnly>
|
|
208
|
+
<Settings className="size-4" />
|
|
209
|
+
</Button>
|
|
210
|
+
}
|
|
211
|
+
/>
|
|
220
212
|
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
213
|
+
<PopoverContent className="w-56" sideOffset={8}>
|
|
214
|
+
<PopoverHeader>
|
|
215
|
+
<PopoverTitle>Cài đặt nhanh</PopoverTitle>
|
|
216
|
+
</PopoverHeader>
|
|
217
|
+
<div className="flex flex-col gap-2 mt-2">
|
|
218
|
+
<Button variant="ghost" className="justify-start">
|
|
219
|
+
Tài khoản
|
|
220
|
+
</Button>
|
|
221
|
+
<Button variant="ghost" className="justify-start">
|
|
222
|
+
Giao diện
|
|
223
|
+
</Button>
|
|
224
|
+
<Button
|
|
225
|
+
variant="ghost"
|
|
226
|
+
className="justify-start text-destructive hover:text-destructive"
|
|
227
|
+
>
|
|
228
|
+
Đăng xuất
|
|
229
|
+
</Button>
|
|
230
|
+
</div>
|
|
231
|
+
</PopoverContent>
|
|
232
|
+
|
|
233
|
+
</Popover>
|
|
234
|
+
</div>
|
|
235
|
+
</>
|
|
236
|
+
} />
|
|
244
237
|
</ExampleGrid>
|
|
245
238
|
|
|
246
|
-
<
|
|
247
|
-
label="Placement (Vị trí)"
|
|
248
|
-
description="Popover có thể hiển thị ở nhiều hướng khác nhau so với trigger (Top, Bottom, Left, Right)."
|
|
249
|
-
codeString={`<Popover>
|
|
239
|
+
<ShowcaseExample title="Placement (Vị trí)" description="Popover có thể hiển thị ở nhiều hướng khác nhau so với trigger (Top, Bottom, Left, Right)." code={`<Popover>
|
|
250
240
|
<PopoverTrigger asChild>
|
|
251
241
|
<Button variant="outline">top</Button>
|
|
252
242
|
</PopoverTrigger>
|
|
@@ -259,40 +249,38 @@ function PopoverMicroShowcase({ globalSize }: { globalSize: Size }) {
|
|
|
259
249
|
Hiển thị ở phía <strong>top</strong>
|
|
260
250
|
</PopoverContent>
|
|
261
251
|
|
|
262
|
-
</Popover>`}
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
252
|
+
</Popover>`} preview={
|
|
253
|
+
<>
|
|
254
|
+
<div className="flex flex-wrap items-center justify-center gap-4 py-8">
|
|
255
|
+
{(["top", "right", "bottom", "left"] as const).map((side) => (
|
|
256
|
+
<Popover key={side}>
|
|
257
|
+
<PopoverTrigger
|
|
258
|
+
render={
|
|
259
|
+
<Button
|
|
260
|
+
variant="outline"
|
|
261
|
+
size={globalSize}
|
|
262
|
+
className="capitalize"
|
|
263
|
+
>
|
|
264
|
+
{side}
|
|
265
|
+
</Button>
|
|
266
|
+
}
|
|
267
|
+
/>
|
|
268
|
+
|
|
269
|
+
<PopoverContent
|
|
270
|
+
side={side}
|
|
271
|
+
sideOffset={8}
|
|
272
|
+
className="w-48 text-center text-sm p-4"
|
|
273
|
+
>
|
|
274
|
+
Hiển thị ở phía <strong className="capitalize">{side}</strong>
|
|
275
|
+
</PopoverContent>
|
|
276
|
+
|
|
277
|
+
</Popover>
|
|
278
|
+
))}
|
|
279
|
+
</div>
|
|
280
|
+
</>
|
|
281
|
+
} />
|
|
291
282
|
|
|
292
|
-
<
|
|
293
|
-
label="Controlled State"
|
|
294
|
-
description="Quản lý trạng thái đóng/mở của Popover thông qua React state (open và onOpenChange)."
|
|
295
|
-
codeString={`const [isOpen, setIsOpen] = React.useState(false) return (
|
|
283
|
+
<ShowcaseExample title="Controlled State" description="Quản lý trạng thái đóng/mở của Popover thông qua React state (open và onOpenChange)." code={`const [isOpen, setIsOpen] = React.useState(false) return (
|
|
296
284
|
<Popover open={isOpen} onOpenChange={setIsOpen}>
|
|
297
285
|
<PopoverTrigger asChild>
|
|
298
286
|
<Button variant="outline">
|
|
@@ -320,50 +308,51 @@ function PopoverMicroShowcase({ globalSize }: { globalSize: Size }) {
|
|
|
320
308
|
</PopoverContent>
|
|
321
309
|
|
|
322
310
|
</Popover>
|
|
323
|
-
)`}
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
311
|
+
)`} preview={
|
|
312
|
+
<>
|
|
313
|
+
<div className="flex items-center gap-4">
|
|
314
|
+
<Popover open={isOpen} onOpenChange={setIsOpen}>
|
|
315
|
+
<PopoverTrigger
|
|
316
|
+
render={
|
|
317
|
+
<Button variant="outline" size={globalSize}>
|
|
318
|
+
Toggle Controlled Popover
|
|
319
|
+
</Button>
|
|
320
|
+
}
|
|
321
|
+
/>
|
|
322
|
+
|
|
323
|
+
<PopoverContent className="w-80" sideOffset={8}>
|
|
324
|
+
<PopoverHeader>
|
|
325
|
+
<PopoverTitle>Controlled Mode</PopoverTitle>
|
|
326
|
+
<PopoverDescription>
|
|
327
|
+
Popover này được control bởi state. Bạn có thể đóng nó bằng
|
|
328
|
+
nút bên dưới hoặc click ra ngoài.
|
|
329
|
+
</PopoverDescription>
|
|
330
|
+
</PopoverHeader>
|
|
331
|
+
<div className="mt-4 flex justify-end">
|
|
332
|
+
<Button
|
|
333
|
+
size="sm"
|
|
334
|
+
color="secondary"
|
|
335
|
+
onClick={() => setIsOpen(false)}
|
|
336
|
+
>
|
|
337
|
+
Đóng Popover
|
|
338
|
+
</Button>
|
|
339
|
+
</div>
|
|
340
|
+
</PopoverContent>
|
|
341
|
+
|
|
342
|
+
</Popover>
|
|
355
343
|
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
344
|
+
<div className="text-sm text-muted-foreground">
|
|
345
|
+
Trạng thái hiện tại:{" "}
|
|
346
|
+
<strong
|
|
347
|
+
data-active={isOpen ? "" : undefined}
|
|
348
|
+
className="data-active:text-primary"
|
|
349
|
+
>
|
|
350
|
+
{isOpen ? "Mở" : "Đóng"}
|
|
351
|
+
</strong>
|
|
352
|
+
</div>
|
|
353
|
+
</div>
|
|
354
|
+
</>
|
|
355
|
+
} />
|
|
367
356
|
</div>
|
|
368
357
|
);
|
|
369
358
|
}
|
|
@@ -377,7 +366,7 @@ export default function PopoverShowcase() {
|
|
|
377
366
|
<Showcase
|
|
378
367
|
title="Popover"
|
|
379
368
|
description="Popup nội dung phong phú, kích hoạt bằng một nút hoặc trigger."
|
|
380
|
-
|
|
369
|
+
guideline={
|
|
381
370
|
<ShowcaseDocs>
|
|
382
371
|
<DocsP>
|
|
383
372
|
Popover là một floating panel hiển thị khi người dùng click vào một
|
|
@@ -387,11 +376,7 @@ export default function PopoverShowcase() {
|
|
|
387
376
|
</DocsP>
|
|
388
377
|
</ShowcaseDocs>
|
|
389
378
|
}
|
|
390
|
-
|
|
391
|
-
{
|
|
392
|
-
label: "Micro (Primitive)",
|
|
393
|
-
content: <PopoverMicroShowcase globalSize={globalSize} /> },
|
|
394
|
-
]}
|
|
379
|
+
micro={{ content: <PopoverMicroShowcase globalSize={globalSize} /> }}
|
|
395
380
|
/>
|
|
396
381
|
);
|
|
397
382
|
}
|