gladvn 0.2.35 → 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.
Files changed (134) hide show
  1. package/README.md +1 -1
  2. package/package.json +2 -1
  3. package/scripts/strip-comments.ts +79 -0
  4. package/src/blocks/auth-form.tsx +34 -30
  5. package/src/blocks/auth-recovery.tsx +9 -13
  6. package/src/blocks/auth-split.tsx +46 -36
  7. package/src/blocks/settings.tsx +84 -117
  8. package/src/components/macro/alert-preset.tsx +3 -1
  9. package/src/components/macro/carousel-preset.tsx +0 -1
  10. package/src/components/macro/checkbox-preset.test.tsx +2 -2
  11. package/src/components/macro/checkbox-preset.tsx +1 -2
  12. package/src/components/macro/command-preset.tsx +1 -1
  13. package/src/components/macro/date-picker.tsx +5 -18
  14. package/src/components/macro/dialog-preset.tsx +5 -3
  15. package/src/components/macro/input-preset.tsx +0 -1
  16. package/src/components/macro/select-preset.tsx +1 -1
  17. package/src/components/macro/switch-preset.test.tsx +1 -1
  18. package/src/components/micro/accordion.test.tsx +6 -12
  19. package/src/components/micro/alert-dialog.tsx +0 -2
  20. package/src/components/micro/alert.test.tsx +5 -8
  21. package/src/components/micro/alert.tsx +0 -2
  22. package/src/components/micro/badge.test.tsx +5 -7
  23. package/src/components/micro/badge.tsx +1 -3
  24. package/src/components/micro/button.test.tsx +19 -26
  25. package/src/components/micro/button.tsx +3 -11
  26. package/src/components/micro/calendar.tsx +12 -13
  27. package/src/components/micro/card.test.tsx +3 -5
  28. package/src/components/micro/carousel.tsx +0 -1
  29. package/src/components/micro/chart.tsx +3 -2
  30. package/src/components/micro/checkbox.test.tsx +9 -18
  31. package/src/components/micro/combobox.tsx +1 -3
  32. package/src/components/micro/command.tsx +23 -11
  33. package/src/components/micro/context-menu.tsx +0 -2
  34. package/src/components/micro/dialog.test.tsx +6 -14
  35. package/src/components/micro/dialog.tsx +0 -2
  36. package/src/components/micro/drawer.tsx +0 -3
  37. package/src/components/micro/dropdown-menu.test.tsx +8 -14
  38. package/src/components/micro/dropdown-menu.tsx +0 -2
  39. package/src/components/micro/field.tsx +3 -3
  40. package/src/components/micro/hover-card.tsx +0 -2
  41. package/src/components/micro/input-group.tsx +9 -42
  42. package/src/components/micro/input.test.tsx +15 -24
  43. package/src/components/micro/navigation-menu.tsx +0 -2
  44. package/src/components/micro/popover.test.tsx +5 -9
  45. package/src/components/micro/progress.tsx +5 -1
  46. package/src/components/micro/select.test.tsx +5 -18
  47. package/src/components/micro/select.tsx +3 -5
  48. package/src/components/micro/separator.tsx +1 -1
  49. package/src/components/micro/sheet.test.tsx +6 -14
  50. package/src/components/micro/sheet.tsx +0 -2
  51. package/src/components/micro/sidebar.tsx +5 -6
  52. package/src/components/micro/sonner.tsx +0 -1
  53. package/src/components/micro/switch.test.tsx +9 -18
  54. package/src/components/micro/switch.tsx +1 -1
  55. package/src/components/micro/tabs.test.tsx +5 -11
  56. package/src/components/micro/theme-provider.tsx +0 -12
  57. package/src/components/micro/toggle-group.tsx +1 -12
  58. package/src/components/micro/tooltip.test.tsx +7 -12
  59. package/src/dev/App.tsx +6 -6
  60. package/src/dev/components/BlockViewer.tsx +15 -4
  61. package/src/dev/components/Container.tsx +20 -0
  62. package/src/dev/components/GladvnLogo.tsx +3 -9
  63. package/src/dev/components/code-highlighter.tsx +5 -3
  64. package/src/dev/components/showcase.tsx +116 -168
  65. package/src/dev/sections/buttons.tsx +4 -9
  66. package/src/dev/sections/display.tsx +68 -72
  67. package/src/dev/sections/feedback.tsx +304 -314
  68. package/src/dev/sections/forms.tsx +10 -14
  69. package/src/dev/sections/interactive.tsx +32 -32
  70. package/src/dev/sections/overview.tsx +2 -10
  71. package/src/dev/showcase/accordion.tsx +512 -554
  72. package/src/dev/showcase/alert-dialog.tsx +525 -565
  73. package/src/dev/showcase/alert.tsx +352 -402
  74. package/src/dev/showcase/aspect-ratio.tsx +167 -193
  75. package/src/dev/showcase/avatar.tsx +231 -269
  76. package/src/dev/showcase/badge.tsx +92 -140
  77. package/src/dev/showcase/breadcrumb.tsx +113 -135
  78. package/src/dev/showcase/button.tsx +140 -173
  79. package/src/dev/showcase/calendar.tsx +187 -237
  80. package/src/dev/showcase/card.tsx +229 -261
  81. package/src/dev/showcase/carousel.tsx +288 -315
  82. package/src/dev/showcase/chart.tsx +44 -50
  83. package/src/dev/showcase/checkbox.tsx +286 -330
  84. package/src/dev/showcase/collapsible.tsx +143 -160
  85. package/src/dev/showcase/combobox.tsx +327 -369
  86. package/src/dev/showcase/command.tsx +106 -120
  87. package/src/dev/showcase/context-menu.tsx +93 -107
  88. package/src/dev/showcase/dialog.tsx +585 -630
  89. package/src/dev/showcase/drawer.tsx +176 -196
  90. package/src/dev/showcase/dropdown-menu.tsx +183 -201
  91. package/src/dev/showcase/empty.tsx +232 -274
  92. package/src/dev/showcase/hover-card.tsx +153 -180
  93. package/src/dev/showcase/input-group.tsx +221 -253
  94. package/src/dev/showcase/input-otp.tsx +204 -250
  95. package/src/dev/showcase/input.tsx +246 -325
  96. package/src/dev/showcase/item.tsx +134 -152
  97. package/src/dev/showcase/kbd.tsx +149 -172
  98. package/src/dev/showcase/label.tsx +50 -68
  99. package/src/dev/showcase/menubar.tsx +194 -213
  100. package/src/dev/showcase/navigation-menu.tsx +119 -133
  101. package/src/dev/showcase/overview-components/ArchitectureSection.tsx +126 -0
  102. package/src/dev/showcase/overview-components/CodeBlock.tsx +50 -0
  103. package/src/dev/showcase/overview-components/ColorPaletteSection.tsx +44 -0
  104. package/src/dev/showcase/overview-components/DashboardPreview.tsx +159 -0
  105. package/src/dev/showcase/overview-components/FeatureGridSection.tsx +535 -0
  106. package/src/dev/showcase/overview-components/FooterCTA.tsx +137 -0
  107. package/src/dev/showcase/overview-components/HeroSection.tsx +65 -0
  108. package/src/dev/showcase/overview-components/PrinciplesSection.tsx +128 -0
  109. package/src/dev/showcase/overview.tsx +21 -1163
  110. package/src/dev/showcase/pagination.tsx +144 -190
  111. package/src/dev/showcase/popover.tsx +181 -196
  112. package/src/dev/showcase/progress.tsx +141 -189
  113. package/src/dev/showcase/radio-group.tsx +272 -332
  114. package/src/dev/showcase/resizable.tsx +119 -141
  115. package/src/dev/showcase/scroll-area.tsx +21 -36
  116. package/src/dev/showcase/select.tsx +262 -322
  117. package/src/dev/showcase/separator.tsx +75 -73
  118. package/src/dev/showcase/sheet.tsx +333 -361
  119. package/src/dev/showcase/sidebar.tsx +53 -59
  120. package/src/dev/showcase/skeleton.tsx +93 -112
  121. package/src/dev/showcase/slider.tsx +244 -296
  122. package/src/dev/showcase/sonner.tsx +251 -258
  123. package/src/dev/showcase/spinner.tsx +46 -67
  124. package/src/dev/showcase/switch.tsx +298 -362
  125. package/src/dev/showcase/table.tsx +76 -80
  126. package/src/dev/showcase/tabs.tsx +302 -355
  127. package/src/dev/showcase/textarea.tsx +240 -293
  128. package/src/dev/showcase/toast.tsx +48 -54
  129. package/src/dev/showcase/toggle-group.tsx +104 -129
  130. package/src/dev/showcase/toggle.tsx +82 -102
  131. package/src/dev/showcase/tooltip.tsx +173 -192
  132. package/src/dev/showcase/why.tsx +6 -12
  133. package/src/hooks/use-mobile.test.ts +3 -2
  134. package/src/lib/utils.test.ts +5 -4
@@ -22,22 +22,16 @@ import {
22
22
  import {
23
23
  DocsP,
24
24
  ExampleGrid,
25
- ExampleSection,
25
+ ShowcaseExample,
26
26
  Showcase,
27
27
  ShowcaseDocs
28
28
  } from "../../dev/components/showcase";
29
29
 
30
- // ──────────────────────────────────────────────────────────
31
- // SECTION 1: Macro Content
32
- // ──────────────────────────────────────────────────────────
33
30
  function EmptyMacroShowcase() {
34
31
  return (
35
- <div className="space-y-10 mt-6">
32
+ <div className="space-y-10">
36
33
  <ExampleGrid>
37
- <ExampleSection
38
- label="Tiêu chuẩn (Standard)"
39
- description="Đầy đủ icon, title, description, action button."
40
- codeString={`<EmptyPreset
34
+ <ShowcaseExample title="Tiêu chuẩn (Standard)" description="Đầy đủ icon, title, description, action button." code={`<EmptyPreset
41
35
  icon={
42
36
  <FolderOpenIcon className="size-4 text-muted-foreground" />
43
37
  }
@@ -45,78 +39,69 @@ function EmptyMacroShowcase() {
45
39
  description="Create your first project to get started."
46
40
  action={<Button>New Project</Button>}
47
41
  className="w-full min-h-[280px]"
48
- />`}
49
- >
50
- <EmptyPreset
51
- icon={<FolderOpenIcon className="size-4 text-muted-foreground" />}
52
- title="No projects yet"
53
- description="Create your first project to get started."
54
- action={<Button>New Project</Button>}
55
- className="w-full min-h-[280px]"
56
- />
57
- </ExampleSection>
42
+ />`} preview={
43
+ <>
44
+ <EmptyPreset
45
+ icon={<FolderOpenIcon className="size-4 text-muted-foreground" />}
46
+ title="No projects yet"
47
+ description="Create your first project to get started."
48
+ action={<Button>New Project</Button>}
49
+ className="w-full min-h-[280px]"
50
+ />
51
+ </>
52
+ } />
58
53
 
59
- <ExampleSection
60
- label="Không có Icon (Without Icon)"
61
- description="Bỏ prop icon — phù hợp khi không cần hình ảnh minh họa."
62
- codeString={`<EmptyPreset
54
+ <ShowcaseExample title="Không có Icon (Without Icon)" description="Bỏ prop icon — phù hợp khi không cần hình ảnh minh họa." code={`<EmptyPreset
63
55
  title="No notifications"
64
56
  description="You're all caught up. Check back later."
65
57
  action={<Button variant="outline">Refresh</Button>}
66
58
  className="w-full min-h-[280px]"
67
- />`}
68
- >
69
- <EmptyPreset
70
- title="No notifications"
71
- description="You're all caught up. Check back later."
72
- action={<Button variant="outline">Refresh</Button>}
73
- className="w-full min-h-[280px]"
74
- />
75
- </ExampleSection>
59
+ />`} preview={
60
+ <>
61
+ <EmptyPreset
62
+ title="No notifications"
63
+ description="You're all caught up. Check back later."
64
+ action={<Button variant="outline">Refresh</Button>}
65
+ className="w-full min-h-[280px]"
66
+ />
67
+ </>
68
+ } />
76
69
  </ExampleGrid>
77
70
 
78
71
  <ExampleGrid>
79
- <ExampleSection
80
- label="Không có Nút (Without Action)"
81
- description="Chỉ hiển thị trạng thái, không yêu cầu hành động."
82
- codeString={`<EmptyPreset
72
+ <ShowcaseExample title="Không có Nút (Without Action)" description="Chỉ hiển thị trạng thái, không yêu cầu hành động." code={`<EmptyPreset
83
73
  icon={
84
74
  <InboxIcon className="size-4 text-muted-foreground" />
85
75
  }
86
76
  title="No messages"
87
77
  description="Messages from your team will appear here."
88
78
  className="w-full min-h-[240px]"
89
- />`}
90
- >
91
- <EmptyPreset
92
- icon={<InboxIcon className="size-4 text-muted-foreground" />}
93
- title="No messages"
94
- description="Messages from your team will appear here."
95
- className="w-full min-h-[240px]"
96
- />
97
- </ExampleSection>
79
+ />`} preview={
80
+ <>
81
+ <EmptyPreset
82
+ icon={<InboxIcon className="size-4 text-muted-foreground" />}
83
+ title="No messages"
84
+ description="Messages from your team will appear here."
85
+ className="w-full min-h-[240px]"
86
+ />
87
+ </>
88
+ } />
98
89
 
99
- <ExampleSection
100
- label="Tối giản (Minimal)"
101
- description="Chỉ có tiêu đề."
102
- codeString={`<EmptyPreset
90
+ <ShowcaseExample title="Tối giản (Minimal)" description="Chỉ có tiêu đề." code={`<EmptyPreset
103
91
  title="Nothing here yet"
104
92
  className="w-full min-h-[240px]"
105
- />`}
106
- >
107
- <EmptyPreset
108
- title="Nothing here yet"
109
- className="w-full min-h-[240px]"
110
- />
111
- </ExampleSection>
93
+ />`} preview={
94
+ <>
95
+ <EmptyPreset
96
+ title="Nothing here yet"
97
+ className="w-full min-h-[240px]"
98
+ />
99
+ </>
100
+ } />
112
101
  </ExampleGrid>
113
102
 
114
103
  <ExampleGrid>
115
- <ExampleSection
116
- label="Kết quả tìm kiếm trống"
117
- description="Pattern phổ biến khi tìm kiếm không ra kết quả."
118
- fullWidth
119
- codeString={`<EmptyPreset
104
+ <ShowcaseExample title="Kết quả tìm kiếm trống" description="Pattern phổ biến khi tìm kiếm không ra kết quả." code={`<EmptyPreset
120
105
  icon={
121
106
  <SearchIcon className="size-4 text-muted-foreground" />
122
107
  }
@@ -129,29 +114,26 @@ function EmptyMacroShowcase() {
129
114
  </div>
130
115
  }
131
116
  className="w-full min-h-[240px]"
132
- />`}
133
- >
134
- <div className="w-full max-w-md">
135
- <EmptyPreset
136
- icon={<SearchIcon className="size-4 text-muted-foreground" />}
137
- title={`No results for "invoice"`}
138
- description="Try a different search term or clear all active filters."
139
- action={
140
- <div className="flex gap-2">
141
- <Button variant="outline">Clear filters</Button>
142
- <Button>Browse all</Button>
143
- </div>
144
- }
145
- className="w-full min-h-[240px]"
146
- />
147
- </div>
148
- </ExampleSection>
117
+ />`} preview={
118
+ <>
119
+ <div className="w-full max-w-md">
120
+ <EmptyPreset
121
+ icon={<SearchIcon className="size-4 text-muted-foreground" />}
122
+ title={`No results for "invoice"`}
123
+ description="Try a different search term or clear all active filters."
124
+ action={
125
+ <div className="flex gap-2">
126
+ <Button variant="outline">Clear filters</Button>
127
+ <Button>Browse all</Button>
128
+ </div>
129
+ }
130
+ className="w-full min-h-[240px]"
131
+ />
132
+ </div>
133
+ </>
134
+ } />
149
135
 
150
- <ExampleSection
151
- label="Danh sách tài liệu (Document State)"
152
- description="Description chứa liên kết HTML."
153
- fullWidth
154
- codeString={`<EmptyPreset
136
+ <ShowcaseExample title="Danh sách tài liệu (Document State)" description="Description chứa liên kết HTML." code={`<EmptyPreset
155
137
  icon={
156
138
  <FileTextIcon className="size-4 text-muted-foreground" />
157
139
  }
@@ -164,39 +146,34 @@ function EmptyMacroShowcase() {
164
146
  }
165
147
  action={<Button>Upload Document</Button>}
166
148
  className="w-full min-h-[240px]"
167
- />`}
168
- >
169
- <div className="w-full max-w-md">
170
- <EmptyPreset
171
- icon={<FileTextIcon className="size-4 text-muted-foreground" />}
172
- title="No documents"
173
- description={
174
- <>
175
- Upload or create your first document.{" "}
176
- <a href="#">Learn more</a>.
177
- </>
178
- }
179
- action={<Button>Upload Document</Button>}
180
- className="w-full min-h-[240px]"
181
- />
182
- </div>
183
- </ExampleSection>
149
+ />`} preview={
150
+ <>
151
+ <div className="w-full max-w-md">
152
+ <EmptyPreset
153
+ icon={<FileTextIcon className="size-4 text-muted-foreground" />}
154
+ title="No documents"
155
+ description={
156
+ <>
157
+ Upload or create your first document.{" "}
158
+ <a href="#">Learn more</a>.
159
+ </>
160
+ }
161
+ action={<Button>Upload Document</Button>}
162
+ className="w-full min-h-[240px]"
163
+ />
164
+ </div>
165
+ </>
166
+ } />
184
167
  </ExampleGrid>
185
168
  </div>
186
169
  );
187
170
  }
188
171
 
189
- // ──────────────────────────────────────────────────────────
190
- // SECTION 2: Micro Content
191
- // ──────────────────────────────────────────────────────────
192
172
  function EmptyMicroShowcase() {
193
173
  return (
194
- <div className="space-y-10 mt-6">
174
+ <div className="space-y-10">
195
175
  <ExampleGrid>
196
- <ExampleSection
197
- label="Cơ bản (Default)"
198
- description="Trạng thái trống cơ bản với cấu trúc thủ công."
199
- codeString={`<Empty className="w-full min-h-[280px]">
176
+ <ShowcaseExample title="Cơ bản (Default)" description="Trạng thái trống cơ bản với cấu trúc thủ công." code={`<Empty className="w-full min-h-[280px]">
200
177
  <EmptyHeader>
201
178
  <EmptyTitle>No customers found</EmptyTitle>
202
179
  <EmptyDescription>
@@ -211,30 +188,28 @@ function EmptyMicroShowcase() {
211
188
  </Button>
212
189
  </EmptyAction>
213
190
  </EmptyContent>
214
- </Empty>`}
215
- >
216
- <Empty className="w-full min-h-[280px]">
217
- <EmptyHeader>
218
- <EmptyTitle>No customers found</EmptyTitle>
219
- <EmptyDescription>
220
- Get started by adding your first customer.
221
- </EmptyDescription>
222
- </EmptyHeader>
223
- <EmptyContent>
224
- <EmptyAction>
225
- <Button>
226
- <PlusIcon className="mr-2" />
227
- Add Customer
228
- </Button>
229
- </EmptyAction>
230
- </EmptyContent>
231
- </Empty>
232
- </ExampleSection>
191
+ </Empty>`} preview={
192
+ <>
193
+ <Empty className="w-full min-h-[280px]">
194
+ <EmptyHeader>
195
+ <EmptyTitle>No customers found</EmptyTitle>
196
+ <EmptyDescription>
197
+ Get started by adding your first customer.
198
+ </EmptyDescription>
199
+ </EmptyHeader>
200
+ <EmptyContent>
201
+ <EmptyAction>
202
+ <Button>
203
+ <PlusIcon className="mr-2" />
204
+ Add Customer
205
+ </Button>
206
+ </EmptyAction>
207
+ </EmptyContent>
208
+ </Empty>
209
+ </>
210
+ } />
233
211
 
234
- <ExampleSection
235
- label="Kèm Icon nền màu (Icon Variant)"
236
- description="Dùng EmptyMedia variant='icon' để hiển thị background mờ cho Icon."
237
- codeString={`<Empty className="w-full min-h-[280px]">
212
+ <ShowcaseExample title="Kèm Icon nền màu (Icon Variant)" description="Dùng EmptyMedia variant='icon' để hiển thị background mờ cho Icon." code={`<Empty className="w-full min-h-[280px]">
238
213
  <EmptyHeader>
239
214
  <EmptyMedia variant="icon">
240
215
  <FolderOpenIcon className="size-4 text-muted-foreground" />
@@ -252,57 +227,53 @@ function EmptyMicroShowcase() {
252
227
  </Button>
253
228
  </EmptyAction>
254
229
  </EmptyContent>
255
- </Empty>`}
256
- >
257
- <Empty className="w-full min-h-[280px]">
258
- <EmptyHeader>
259
- <EmptyMedia variant="icon">
260
- <FolderOpenIcon className="size-4 text-muted-foreground" />
261
- </EmptyMedia>
262
- <EmptyTitle>No projects</EmptyTitle>
263
- <EmptyDescription>
264
- You don&apos;t have any active projects.
265
- </EmptyDescription>
266
- </EmptyHeader>
267
- <EmptyContent>
268
- <EmptyAction>
269
- <Button>
270
- <PlusIcon className="mr-2" />
271
- New Project
272
- </Button>
273
- </EmptyAction>
274
- </EmptyContent>
275
- </Empty>
276
- </ExampleSection>
230
+ </Empty>`} preview={
231
+ <>
232
+ <Empty className="w-full min-h-[280px]">
233
+ <EmptyHeader>
234
+ <EmptyMedia variant="icon">
235
+ <FolderOpenIcon className="size-4 text-muted-foreground" />
236
+ </EmptyMedia>
237
+ <EmptyTitle>No projects</EmptyTitle>
238
+ <EmptyDescription>
239
+ You don&apos;t have any active projects.
240
+ </EmptyDescription>
241
+ </EmptyHeader>
242
+ <EmptyContent>
243
+ <EmptyAction>
244
+ <Button>
245
+ <PlusIcon className="mr-2" />
246
+ New Project
247
+ </Button>
248
+ </EmptyAction>
249
+ </EmptyContent>
250
+ </Empty>
251
+ </>
252
+ } />
277
253
  </ExampleGrid>
278
254
 
279
255
  <ExampleGrid>
280
- <ExampleSection
281
- label="Chỉ văn bản (Text Only)"
282
- description="Không icon, không action."
283
- codeString={`<Empty className="w-full min-h-[200px]">
256
+ <ShowcaseExample title="Chỉ văn bản (Text Only)" description="Không icon, không action." code={`<Empty className="w-full min-h-[200px]">
284
257
  <EmptyHeader>
285
258
  <EmptyTitle>No results</EmptyTitle>
286
259
  <EmptyDescription>
287
260
  Try adjusting your filters or search terms.
288
261
  </EmptyDescription>
289
262
  </EmptyHeader>
290
- </Empty>`}
291
- >
292
- <Empty className="w-full min-h-[200px]">
293
- <EmptyHeader>
294
- <EmptyTitle>No results</EmptyTitle>
295
- <EmptyDescription>
296
- Try adjusting your filters or search terms.
297
- </EmptyDescription>
298
- </EmptyHeader>
299
- </Empty>
300
- </ExampleSection>
263
+ </Empty>`} preview={
264
+ <>
265
+ <Empty className="w-full min-h-[200px]">
266
+ <EmptyHeader>
267
+ <EmptyTitle>No results</EmptyTitle>
268
+ <EmptyDescription>
269
+ Try adjusting your filters or search terms.
270
+ </EmptyDescription>
271
+ </EmptyHeader>
272
+ </Empty>
273
+ </>
274
+ } />
301
275
 
302
- <ExampleSection
303
- label="Link bên trong mô tả (Link in Description)"
304
- description="EmptyDescription tự động style thẻ <a> bên trong."
305
- codeString={`<Empty className="w-full min-h-[200px]">
276
+ <ShowcaseExample title="Link bên trong mô tả (Link in Description)" description="EmptyDescription tự động style thẻ <a> bên trong." code={`<Empty className="w-full min-h-[200px]">
306
277
  <EmptyHeader>
307
278
  <EmptyMedia variant="icon">
308
279
  <InboxIcon className="size-4 text-muted-foreground" />
@@ -313,28 +284,25 @@ function EmptyMicroShowcase() {
313
284
  in our <a href="#">documentation</a>.
314
285
  </EmptyDescription>
315
286
  </EmptyHeader>
316
- </Empty>`}
317
- >
318
- <Empty className="w-full min-h-[200px]">
319
- <EmptyHeader>
320
- <EmptyMedia variant="icon">
321
- <InboxIcon className="size-4 text-muted-foreground" />
322
- </EmptyMedia>
323
- <EmptyTitle>No messages yet</EmptyTitle>
324
- <EmptyDescription>
325
- Messages from your team will appear here. Learn more in our{" "}
326
- <a href="#">documentation</a>.
327
- </EmptyDescription>
328
- </EmptyHeader>
329
- </Empty>
330
- </ExampleSection>
287
+ </Empty>`} preview={
288
+ <>
289
+ <Empty className="w-full min-h-[200px]">
290
+ <EmptyHeader>
291
+ <EmptyMedia variant="icon">
292
+ <InboxIcon className="size-4 text-muted-foreground" />
293
+ </EmptyMedia>
294
+ <EmptyTitle>No messages yet</EmptyTitle>
295
+ <EmptyDescription>
296
+ Messages from your team will appear here. Learn more in our{" "}
297
+ <a href="#">documentation</a>.
298
+ </EmptyDescription>
299
+ </EmptyHeader>
300
+ </Empty>
301
+ </>
302
+ } />
331
303
  </ExampleGrid>
332
304
 
333
- <ExampleSection
334
- label="Cấu trúc tùy chỉnh nâng cao"
335
- description="Nút xóa bộ lọc nằm tách biệt khỏi hành động chính."
336
- fullWidth
337
- codeString={`<div className="w-full max-w-md">
305
+ <ShowcaseExample title="Cấu trúc tùy chỉnh nâng cao" description="Nút xóa bộ lọc nằm tách biệt khỏi hành động chính." code={`<div className="w-full max-w-md">
338
306
  <Empty className="w-full min-h-[240px]">
339
307
  <EmptyHeader>
340
308
  <EmptyMedia variant="icon">
@@ -353,34 +321,30 @@ function EmptyMicroShowcase() {
353
321
  </EmptyAction>
354
322
  </EmptyContent>
355
323
  </Empty>
356
- </div>`}
357
- >
358
- <div className="w-full max-w-md">
359
- <Empty className="w-full min-h-[240px]">
360
- <EmptyHeader>
361
- <EmptyMedia variant="icon">
362
- <SearchIcon className="size-4 text-muted-foreground" />
363
- </EmptyMedia>
364
- <EmptyTitle>No results for &quot;invoice&quot;</EmptyTitle>
365
- <EmptyDescription>
366
- Try a different search term or clear all filters.
367
- </EmptyDescription>
368
- </EmptyHeader>
369
- <EmptyContent>
370
- <EmptyAction>
371
- <Button variant="outline">Clear filters</Button>
372
- </EmptyAction>
373
- </EmptyContent>
374
- </Empty>
375
- </div>
376
- </ExampleSection>
324
+ </div>`} preview={
325
+ <>
326
+ <div className="w-full max-w-md">
327
+ <Empty className="w-full min-h-[240px]">
328
+ <EmptyHeader>
329
+ <EmptyMedia variant="icon">
330
+ <SearchIcon className="size-4 text-muted-foreground" />
331
+ </EmptyMedia>
332
+ <EmptyTitle>No results for &quot;invoice&quot;</EmptyTitle>
333
+ <EmptyDescription>
334
+ Try a different search term or clear all filters.
335
+ </EmptyDescription>
336
+ </EmptyHeader>
337
+ <EmptyContent>
338
+ <EmptyAction>
339
+ <Button variant="outline">Clear filters</Button>
340
+ </EmptyAction>
341
+ </EmptyContent>
342
+ </Empty>
343
+ </div>
344
+ </>
345
+ } />
377
346
 
378
- {/* ── Use Case Comparison ─────────────────────── */}
379
- <ExampleSection
380
- label="🧭 Use Case Comparison"
381
- description="Các kịch bản thực tế giúp bạn quyết định nên dùng Micro hay Macro."
382
- fullWidth
383
- codeString={`<div className="grid grid-cols-1 gap-6 md:grid-cols-2">
347
+ <ShowcaseExample title="🧭 So sánh Use Case" description="Các kịch bản thực tế giúp bạn quyết định nên dùng Micro hay Macro." code={`<div className="grid grid-cols-1 gap-6 md:grid-cols-2">
384
348
  {/* ── Story 1: Macro wins ── */}
385
349
  <div className="rounded-xl border border-border bg-card p-5 flex flex-col gap-4">
386
350
  <div className="flex items-start gap-3">
@@ -430,67 +394,63 @@ function EmptyMicroShowcase() {
430
394
  thêm nội dung phụ như danh sách liên kết.
431
395
  </p>
432
396
  </div>
433
- </div>`}
434
- >
435
- <div className="grid grid-cols-1 gap-6 md:grid-cols-2">
436
- {/* ── Story 1: Macro wins ── */}
437
- <div className="rounded-xl border border-border bg-card p-5 flex flex-col gap-4">
438
- <div className="flex items-start gap-3">
439
- <span className="mt-0.5 shrink-0 rounded-full bg-green-500/10 p-1.5 text-green-600">
440
- <CheckCircle2Icon className="size-4" aria-hidden="true" />
441
- </span>
442
- <div>
443
- <p className="text-xs font-semibold uppercase tracking-wider text-muted-foreground">
444
- Story 1 · Dùng Macro
445
- </p>
446
- <h3 className="mt-0.5 text-sm font-semibold text-foreground">
447
- Giao diện trống tiêu chuẩn
448
- </h3>
449
- </div>
450
- </div>
451
- <p className="text-xs text-muted-foreground leading-relaxed">
452
- Dùng <code>EmptyPreset</code> khi bạn chỉ cần một cấu trúc trạng
453
- thái trống mặc định, bao gồm icon, tiêu đề, mô tả và nút hành
454
- động. Giúp rút ngắn code đáng kể.
455
- </p>
456
- </div>
397
+ </div>`} preview={
398
+ <>
399
+ <div className="grid grid-cols-1 gap-6 md:grid-cols-2">
400
+ <div className="rounded-xl border border-border bg-card p-5 flex flex-col gap-4">
401
+ <div className="flex items-start gap-3">
402
+ <span className="mt-0.5 shrink-0 rounded-full bg-green-500/10 p-1.5 text-green-600">
403
+ <CheckCircle2Icon className="size-4" aria-hidden="true" />
404
+ </span>
405
+ <div>
406
+ <p className="text-xs font-semibold uppercase tracking-wider text-muted-foreground">
407
+ Story 1 · Dùng Macro
408
+ </p>
409
+ <h3 className="mt-0.5 text-sm font-semibold text-foreground">
410
+ Giao diện trống tiêu chuẩn
411
+ </h3>
412
+ </div>
413
+ </div>
414
+ <p className="text-xs text-muted-foreground leading-relaxed">
415
+ Dùng <code>EmptyPreset</code> khi bạn chỉ cần một cấu trúc trạng
416
+ thái trống mặc định, bao gồm icon, tiêu đề, mô tả và nút hành
417
+ động. Giúp rút ngắn code đáng kể.
418
+ </p>
419
+ </div>
457
420
 
458
- {/* ── Story 2: Micro wins ── */}
459
- <div className="rounded-xl border border-border bg-card p-5 flex flex-col gap-4">
460
- <div className="flex items-start gap-3">
461
- <span className="mt-0.5 shrink-0 rounded-full bg-blue-500/10 p-1.5 text-blue-600">
462
- <LayersIcon className="size-4" aria-hidden="true" />
463
- </span>
464
- <div>
465
- <p className="text-xs font-semibold uppercase tracking-wider text-muted-foreground">
466
- Story 2 · Dùng Micro
467
- </p>
468
- <h3 className="mt-0.5 text-sm font-semibold text-foreground">
469
- Bố cục tuỳ biến phức tạp
470
- </h3>
471
- </div>
472
- </div>
473
- <p className="text-xs text-muted-foreground leading-relaxed">
474
- Dùng các thành phần con khi cần render SVG animation tuỳ chỉnh,
475
- hoán đổi vị trí của phần mô tả hoặc nút, thêm nội dung phụ như
476
- danh sách liên kết.
477
- </p>
478
- </div>
479
- </div>
480
- </ExampleSection>
421
+ <div className="rounded-xl border border-border bg-card p-5 flex flex-col gap-4">
422
+ <div className="flex items-start gap-3">
423
+ <span className="mt-0.5 shrink-0 rounded-full bg-blue-500/10 p-1.5 text-blue-600">
424
+ <LayersIcon className="size-4" aria-hidden="true" />
425
+ </span>
426
+ <div>
427
+ <p className="text-xs font-semibold uppercase tracking-wider text-muted-foreground">
428
+ Story 2 · Dùng Micro
429
+ </p>
430
+ <h3 className="mt-0.5 text-sm font-semibold text-foreground">
431
+ Bố cục tuỳ biến phức tạp
432
+ </h3>
433
+ </div>
434
+ </div>
435
+ <p className="text-xs text-muted-foreground leading-relaxed">
436
+ Dùng các thành phần con khi cần render SVG animation tuỳ chỉnh,
437
+ hoán đổi vị trí của phần tả hoặc nút, thêm nội dung phụ như
438
+ danh sách liên kết.
439
+ </p>
440
+ </div>
441
+ </div>
442
+ </>
443
+ } />
481
444
  </div>
482
445
  );
483
446
  }
484
447
 
485
- // ──────────────────────────────────────────────────────────
486
- // SECTION 3: Entry point
487
- // ──────────────────────────────────────────────────────────
488
448
  export default function EmptyShowcase() {
489
449
  return (
490
450
  <Showcase
491
451
  title="Empty"
492
452
  description="Trạng thái trống hiển thị khi không có dữ liệu, chưa có nội dung, hoặc tìm kiếm không ra kết quả."
493
- generalConcept={
453
+ guideline={
494
454
  <ShowcaseDocs>
495
455
  <DocsP>
496
456
  Dùng để thông báo cho người dùng rằng không có dữ liệu để hiển thị ở
@@ -499,10 +459,8 @@ export default function EmptyShowcase() {
499
459
  </DocsP>
500
460
  </ShowcaseDocs>
501
461
  }
502
- tabs={[
503
- { label: "Micro (Primitive)", content: <EmptyMicroShowcase /> },
504
- { label: "Macro (Preset)", content: <EmptyMacroShowcase /> },
505
- ]}
462
+ micro={{ content: <EmptyMicroShowcase /> }}
463
+ macro={{ content: <EmptyMacroShowcase /> }}
506
464
  />
507
465
  );
508
466
  }