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
@@ -7,22 +7,15 @@ import {
7
7
  DocsCode,
8
8
  DocsP,
9
9
  ExampleGrid,
10
- ExampleSection,
10
+ ShowcaseExample,
11
11
  Showcase,
12
12
  ShowcaseDocs
13
13
  } from "../../dev/components/showcase";
14
14
 
15
- // ──────────────────────────────────────────────────────────
16
- // SECTION 1: Micro Content
17
- // ──────────────────────────────────────────────────────────
18
15
  function ResizableMicroShowcase() {
19
16
  return (
20
- <div className="space-y-10 mt-6">
21
- {/* Horizontal split */}
22
- <ExampleSection
23
- label="Horizontal Split"
24
- description="Kéo tay cầm để thay đổi kích thước bảng theo chiều ngang."
25
- codeString={`<ResizablePanelGroup
17
+ <div className="space-y-10">
18
+ <ShowcaseExample title="Horizontal Split" description="Kéo tay cầm để thay đổi kích thước bảng theo chiều ngang." code={`<ResizablePanelGroup
26
19
  orientation="horizontal"
27
20
  className="max-w-md rounded-xl border border-border bg-card"
28
21
  >
@@ -41,37 +34,34 @@ function ResizableMicroShowcase() {
41
34
  </span>
42
35
  </div>
43
36
  </ResizablePanel>
44
- </ResizablePanelGroup>`}
45
- >
46
- <ResizablePanelGroup
47
- orientation="horizontal"
48
- className="max-w-md rounded-xl border border-border bg-card"
49
- >
50
- <ResizablePanel defaultSize={50}>
51
- <div className="flex h-[200px] items-center justify-center p-6">
52
- <span className="font-semibold text-sm">Sidebar</span>
53
- </div>
54
- </ResizablePanel>
55
- <ResizableHandle withHandle />
56
- <ResizablePanel defaultSize={50}>
57
- <div className="flex h-full items-center justify-center p-6">
58
- <span className="font-semibold text-sm">Content</span>
59
- </div>
60
- </ResizablePanel>
61
- </ResizablePanelGroup>
62
- </ExampleSection>
37
+ </ResizablePanelGroup>`} preview={
38
+ <>
39
+ <ResizablePanelGroup
40
+ orientation="horizontal"
41
+ className="max-w-md rounded-xl border border-border bg-card"
42
+ >
43
+ <ResizablePanel defaultSize={50}>
44
+ <div className="flex h-[200px] items-center justify-center p-6">
45
+ <span className="font-semibold text-sm">Thanh bên (Sidebar)</span>
46
+ </div>
47
+ </ResizablePanel>
48
+ <ResizableHandle withHandle />
49
+ <ResizablePanel defaultSize={50}>
50
+ <div className="flex h-full items-center justify-center p-6">
51
+ <span className="font-semibold text-sm">Nội dung</span>
52
+ </div>
53
+ </ResizablePanel>
54
+ </ResizablePanelGroup>
55
+ </>
56
+ } />
63
57
 
64
- {/* Vertical split */}
65
- <ExampleSection
66
- label="Vertical Split"
67
- description='orientation="vertical" chia bảng theo chiều dọc.'
68
- codeString={`<ResizablePanelGroup
58
+ <ShowcaseExample title="Vertical Split" description='orientation="vertical" chia bảng theo chiều dọc.' code={`<ResizablePanelGroup
69
59
  orientation="vertical"
70
60
  className="max-w-md rounded-xl border border-border bg-card"
71
61
  >
72
62
  <ResizablePanel defaultSize={50}>
73
63
  <div className="flex h-[120px] items-center justify-center p-6">
74
- <span className="font-semibold text-sm">Top</span>
64
+ <span className="font-semibold text-sm">Trên</span>
75
65
  </div>
76
66
  </ResizablePanel>
77
67
  <ResizableHandle withHandle />
@@ -82,86 +72,78 @@ function ResizableMicroShowcase() {
82
72
  </span>
83
73
  </div>
84
74
  </ResizablePanel>
85
- </ResizablePanelGroup>`}
86
- >
87
- <ResizablePanelGroup
88
- orientation="vertical"
89
- className="max-w-md rounded-xl border border-border bg-card"
90
- >
91
- <ResizablePanel defaultSize={50}>
92
- <div className="flex h-[120px] items-center justify-center p-6">
93
- <span className="font-semibold text-sm">Top</span>
94
- </div>
95
- </ResizablePanel>
96
- <ResizableHandle withHandle />
97
- <ResizablePanel defaultSize={50}>
98
- <div className="flex h-[120px] items-center justify-center p-6">
99
- <span className="font-semibold text-sm">Bottom</span>
100
- </div>
101
- </ResizablePanel>
102
- </ResizablePanelGroup>
103
- </ExampleSection>
75
+ </ResizablePanelGroup>`} preview={
76
+ <>
77
+ <ResizablePanelGroup
78
+ orientation="vertical"
79
+ className="max-w-md rounded-xl border border-border bg-card"
80
+ >
81
+ <ResizablePanel defaultSize={50}>
82
+ <div className="flex h-[120px] items-center justify-center p-6">
83
+ <span className="font-semibold text-sm">Trên</span>
84
+ </div>
85
+ </ResizablePanel>
86
+ <ResizableHandle withHandle />
87
+ <ResizablePanel defaultSize={50}>
88
+ <div className="flex h-[120px] items-center justify-center p-6">
89
+ <span className="font-semibold text-sm">Dưới</span>
90
+ </div>
91
+ </ResizablePanel>
92
+ </ResizablePanelGroup>
93
+ </>
94
+ } />
104
95
 
105
- {/* Handle variants */}
106
96
  <ExampleGrid>
107
- <ExampleSection
108
- label="With Handle Grip"
109
- description="withHandle hiển thị thanh tay cầm trực quan ở giữa divider."
110
- codeString={`<ResizableHandle withHandle />`}
111
- >
112
- <ResizablePanelGroup
113
- orientation="horizontal"
114
- className="rounded-xl border border-border bg-card"
115
- >
116
- <ResizablePanel defaultSize={50}>
117
- <div className="flex h-[120px] items-center justify-center p-4">
118
- <span className="text-sm font-medium">Panel A</span>
119
- </div>
120
- </ResizablePanel>
121
- <ResizableHandle withHandle />
122
- <ResizablePanel defaultSize={50}>
123
- <div className="flex h-full items-center justify-center p-4">
124
- <span className="text-sm font-medium">Panel B</span>
125
- </div>
126
- </ResizablePanel>
127
- </ResizablePanelGroup>
128
- </ExampleSection>
97
+ <ShowcaseExample title="With Handle Grip" description="withHandle hiển thị thanh tay cầm trực quan ở giữa divider." code={`<ResizableHandle withHandle />`} preview={
98
+ <>
99
+ <ResizablePanelGroup
100
+ orientation="horizontal"
101
+ className="rounded-xl border border-border bg-card"
102
+ >
103
+ <ResizablePanel defaultSize={50}>
104
+ <div className="flex h-[120px] items-center justify-center p-4">
105
+ <span className="text-sm font-medium">Bảng A</span>
106
+ </div>
107
+ </ResizablePanel>
108
+ <ResizableHandle withHandle />
109
+ <ResizablePanel defaultSize={50}>
110
+ <div className="flex h-full items-center justify-center p-4">
111
+ <span className="text-sm font-medium">Bảng B</span>
112
+ </div>
113
+ </ResizablePanel>
114
+ </ResizablePanelGroup>
115
+ </>
116
+ } />
129
117
 
130
- <ExampleSection
131
- label="Plain Divider"
132
- description="Bỏ withHandle để chỉ hiển thị đường phân cách mỏng, không có visual grip."
133
- codeString={`<ResizableHandle />`}
134
- >
135
- <ResizablePanelGroup
136
- orientation="horizontal"
137
- className="rounded-xl border border-border bg-card"
138
- >
139
- <ResizablePanel defaultSize={50}>
140
- <div className="flex h-[120px] items-center justify-center p-4">
141
- <span className="text-sm font-medium">Panel A</span>
142
- </div>
143
- </ResizablePanel>
144
- <ResizableHandle />
145
- <ResizablePanel defaultSize={50}>
146
- <div className="flex h-full items-center justify-center p-4">
147
- <span className="text-sm font-medium">Panel B</span>
148
- </div>
149
- </ResizablePanel>
150
- </ResizablePanelGroup>
151
- </ExampleSection>
118
+ <ShowcaseExample title="Plain Divider" description="Bỏ withHandle để chỉ hiển thị đường phân cách mỏng, không có visual grip." code={`<ResizableHandle />`} preview={
119
+ <>
120
+ <ResizablePanelGroup
121
+ orientation="horizontal"
122
+ className="rounded-xl border border-border bg-card"
123
+ >
124
+ <ResizablePanel defaultSize={50}>
125
+ <div className="flex h-[120px] items-center justify-center p-4">
126
+ <span className="text-sm font-medium">Bảng A</span>
127
+ </div>
128
+ </ResizablePanel>
129
+ <ResizableHandle />
130
+ <ResizablePanel defaultSize={50}>
131
+ <div className="flex h-full items-center justify-center p-4">
132
+ <span className="text-sm font-medium">Bảng B</span>
133
+ </div>
134
+ </ResizablePanel>
135
+ </ResizablePanelGroup>
136
+ </>
137
+ } />
152
138
  </ExampleGrid>
153
139
 
154
- {/* Nested layout */}
155
- <ExampleSection
156
- label="Nested Layout"
157
- description="Bố cục phức tạp với các nhóm có thể thay đổi kích thước lồng nhau."
158
- codeString={`<ResizablePanelGroup
140
+ <ShowcaseExample title="Nested Layout" description="Bố cục phức tạp với các nhóm có thể thay đổi kích thước lồng nhau." code={`<ResizablePanelGroup
159
141
  orientation="horizontal"
160
142
  className="max-w-md rounded-xl border border-border bg-card"
161
143
  >
162
144
  <ResizablePanel defaultSize={25} minSize={15}>
163
145
  <div className="flex h-[250px] items-center justify-center p-6">
164
- <span className="font-semibold text-sm">Nav</span>
146
+ <span className="font-semibold text-sm">Điều hướng</span>
165
147
  </div>
166
148
  </ResizablePanel>
167
149
  <ResizableHandle />
@@ -184,48 +166,46 @@ function ResizableMicroShowcase() {
184
166
  </ResizablePanel>
185
167
  </ResizablePanelGroup>
186
168
  </ResizablePanel>
187
- </ResizablePanelGroup>`}
188
- >
189
- <ResizablePanelGroup
190
- orientation="horizontal"
191
- className="max-w-md rounded-xl border border-border bg-card"
192
- >
193
- <ResizablePanel defaultSize={25} minSize={15}>
194
- <div className="flex h-[250px] items-center justify-center p-6">
195
- <span className="font-semibold text-sm">Nav</span>
196
- </div>
197
- </ResizablePanel>
198
- <ResizableHandle />
199
- <ResizablePanel defaultSize={75}>
200
- <ResizablePanelGroup orientation="vertical">
201
- <ResizablePanel defaultSize={25} minSize={20}>
202
- <div className="flex h-full items-center justify-center p-6">
203
- <span className="font-semibold text-sm">Top Bar</span>
204
- </div>
205
- </ResizablePanel>
206
- <ResizableHandle />
207
- <ResizablePanel defaultSize={75}>
208
- <div className="flex h-full items-center justify-center p-6">
209
- <span className="font-semibold text-sm">Main Content</span>
210
- </div>
211
- </ResizablePanel>
212
- </ResizablePanelGroup>
213
- </ResizablePanel>
214
- </ResizablePanelGroup>
215
- </ExampleSection>
169
+ </ResizablePanelGroup>`} preview={
170
+ <>
171
+ <ResizablePanelGroup
172
+ orientation="horizontal"
173
+ className="max-w-md rounded-xl border border-border bg-card"
174
+ >
175
+ <ResizablePanel defaultSize={25} minSize={15}>
176
+ <div className="flex h-[250px] items-center justify-center p-6">
177
+ <span className="font-semibold text-sm">Điều hướng</span>
178
+ </div>
179
+ </ResizablePanel>
180
+ <ResizableHandle />
181
+ <ResizablePanel defaultSize={75}>
182
+ <ResizablePanelGroup orientation="vertical">
183
+ <ResizablePanel defaultSize={25} minSize={20}>
184
+ <div className="flex h-full items-center justify-center p-6">
185
+ <span className="font-semibold text-sm">Thanh trên</span>
186
+ </div>
187
+ </ResizablePanel>
188
+ <ResizableHandle />
189
+ <ResizablePanel defaultSize={75}>
190
+ <div className="flex h-full items-center justify-center p-6">
191
+ <span className="font-semibold text-sm">Nội dung chính</span>
192
+ </div>
193
+ </ResizablePanel>
194
+ </ResizablePanelGroup>
195
+ </ResizablePanel>
196
+ </ResizablePanelGroup>
197
+ </>
198
+ } />
216
199
  </div>
217
200
  );
218
201
  }
219
202
 
220
- // ──────────────────────────────────────────────────────────
221
- // SECTION 2: Entry point
222
- // ──────────────────────────────────────────────────────────
223
203
  export default function ResizableShowcase() {
224
204
  return (
225
205
  <Showcase
226
206
  title="Resizable"
227
207
  description="Panel có thể thay đổi kích thước với hỗ trợ bàn phím, lồng nhau linh hoạt."
228
- generalConcept={
208
+ guideline={
229
209
  <ShowcaseDocs>
230
210
  <DocsP>
231
211
  Resizable sử dụng thư viện{" "}
@@ -239,9 +219,7 @@ export default function ResizableShowcase() {
239
219
  </DocsP>
240
220
  </ShowcaseDocs>
241
221
  }
242
- tabs={[
243
- { label: "Micro (Primitive)", content: <ResizableMicroShowcase /> },
244
- ]}
222
+ micro={{ content: <ResizableMicroShowcase /> }}
245
223
  />
246
224
  );
247
225
  }
@@ -4,14 +4,11 @@ import {
4
4
  DocsH3,
5
5
  DocsP,
6
6
  ExampleGrid,
7
- ExampleSection,
7
+ ShowcaseExample,
8
8
  Showcase,
9
9
  ShowcaseDocs
10
10
  } from "../../dev/components/showcase";
11
11
 
12
- // ──────────────────────────────────────────────────────────
13
- // SECTION 1: Explicit Sub-components for Demo
14
- // ──────────────────────────────────────────────────────────
15
12
  function VerticalList() {
16
13
  const items = [
17
14
  "Tùy chọn 1",
@@ -75,17 +72,11 @@ function HorizontalList() {
75
72
  );
76
73
  }
77
74
 
78
- // ──────────────────────────────────────────────────────────
79
- // SECTION 2: Micro Content (Only Micro exists)
80
- // ──────────────────────────────────────────────────────────
81
75
  function ScrollAreaMicroShowcase() {
82
76
  return (
83
- <div className="space-y-10 mt-6">
77
+ <div className="space-y-10">
84
78
  <ExampleGrid>
85
- <ExampleSection
86
- label="Cuộn dọc (Vertical)"
87
- description="Danh sách các mục có thể cuộn từ trên xuống dưới."
88
- codeString={`<ScrollArea className="h-72 w-full max-w-sm rounded-xl border border-border bg-card">
79
+ <ShowcaseExample title="Cuộn dọc (Vertical)" description="Danh sách các mục có thể cuộn từ trên xuống dưới." code={`<ScrollArea className="h-72 w-full max-w-sm rounded-xl border border-border bg-card">
89
80
  <div className="p-4">
90
81
  <h4 className="mb-4 text-sm font-medium leading-none">
91
82
  Cài đặt hệ thống
@@ -101,17 +92,15 @@ function ScrollAreaMicroShowcase() {
101
92
  </div>
102
93
  {/* ... */}
103
94
  </div>
104
- </ScrollArea>`}
105
- >
106
- <ScrollArea className="h-72 w-full max-w-sm rounded-xl border border-border bg-card">
107
- <VerticalList />
108
- </ScrollArea>
109
- </ExampleSection>
95
+ </ScrollArea>`} preview={
96
+ <>
97
+ <ScrollArea className="h-72 w-full max-w-sm rounded-xl border border-border bg-card">
98
+ <VerticalList />
99
+ </ScrollArea>
100
+ </>
101
+ } />
110
102
 
111
- <ExampleSection
112
- label="Cuộn ngang (Horizontal)"
113
- description="Trình bày danh sách phần tử nằm ngang (thường dùng cho ảnh, card)."
114
- codeString={`<ScrollArea className="w-full max-w-sm whitespace-nowrap rounded-xl border border-border bg-card p-4">
103
+ <ShowcaseExample title="Cuộn ngang (Horizontal)" description="Trình bày danh sách phần tử nằm ngang (thường dùng cho ảnh, card)." code={`<ScrollArea className="w-full max-w-sm whitespace-nowrap rounded-xl border border-border bg-card p-4">
115
104
  <div className="flex w-max space-x-4">
116
105
  <div className="w-[150px] shrink-0">
117
106
  <div className="aspect-[3/4] rounded-md bg-muted" />
@@ -128,27 +117,25 @@ function ScrollAreaMicroShowcase() {
128
117
  {/* ... */}
129
118
  </div>
130
119
  <ScrollBar orientation="horizontal" />
131
- </ScrollArea>`}
132
- >
133
- <ScrollArea className="w-full max-w-sm whitespace-nowrap rounded-xl border border-border bg-card">
134
- <HorizontalList />
135
- <ScrollBar orientation="horizontal" />
136
- </ScrollArea>
137
- </ExampleSection>
120
+ </ScrollArea>`} preview={
121
+ <>
122
+ <ScrollArea className="w-full max-w-sm whitespace-nowrap rounded-xl border border-border bg-card">
123
+ <HorizontalList />
124
+ <ScrollBar orientation="horizontal" />
125
+ </ScrollArea>
126
+ </>
127
+ } />
138
128
  </ExampleGrid>
139
129
  </div>
140
130
  );
141
131
  }
142
132
 
143
- // ──────────────────────────────────────────────────────────
144
- // SECTION 3: Entry point
145
- // ──────────────────────────────────────────────────────────
146
133
  export default function ScrollAreaShowcase() {
147
134
  return (
148
135
  <Showcase
149
136
  title="Scroll Area"
150
137
  description="Khu vực nội dung có thanh cuộn tuỳ biến giao diện, đồng bộ trên mọi trình duyệt thay cho thanh cuộn mặc định."
151
- generalConcept={
138
+ guideline={
152
139
  <ShowcaseDocs>
153
140
  <DocsH3>Scroll Area (Khu vực cuộn)</DocsH3>
154
141
  <DocsP>
@@ -159,9 +146,7 @@ export default function ScrollAreaShowcase() {
159
146
  </DocsP>
160
147
  </ShowcaseDocs>
161
148
  }
162
- tabs={[
163
- { label: "Micro (Primitive)", content: <ScrollAreaMicroShowcase /> },
164
- ]}
149
+ micro={{ content: <ScrollAreaMicroShowcase /> }}
165
150
  />
166
151
  );
167
152
  }