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.
Files changed (134) hide show
  1. package/README.md +1 -1
  2. package/package.json +1 -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
@@ -3,98 +3,87 @@ import {
3
3
  DocsH3,
4
4
  DocsP,
5
5
  ExampleGrid,
6
- ExampleSection,
6
+ ShowcaseExample,
7
7
  Showcase,
8
8
  ShowcaseDocs
9
9
  } from "../../dev/components/showcase";
10
10
 
11
11
  const commonRatios = [
12
- { label: "16:9", ratio: 16 / 9, desc: "Widescreen — video, hero banners" },
13
- { label: "4:3", ratio: 4 / 3, desc: "Classicpresentations, old TV" },
14
- { label: "1:1", ratio: 1, desc: "Squareavatars, social media" },
15
- { label: "21:9", ratio: 21 / 9, desc: "Ultrawidecinematic, panoramas" },
16
- { label: "3:2", ratio: 3 / 2, desc: "Photography — DSLR standard" },
17
- { label: "9:16", ratio: 9 / 16, desc: "Portraitmobile, stories" },
12
+ { label: "16:9", ratio: 16 / 9, desc: "Màn hình rộng — video, hero banner" },
13
+ { label: "4:3", ratio: 4 / 3, desc: "Cổ điển bài thuyết trình, TV " },
14
+ { label: "1:1", ratio: 1, desc: "Vuôngavatar, mạng xã hội" },
15
+ { label: "21:9", ratio: 21 / 9, desc: "Siêu rộng điện ảnh, toàn cảnh" },
16
+ { label: "3:2", ratio: 3 / 2, desc: "Nhiếp ảnh chuẩn DSLR" },
17
+ { label: "9:16", ratio: 9 / 16, desc: "Chân dung di động, story" },
18
18
  ];
19
19
 
20
20
  function AspectRatioMicroShowcase() {
21
21
  return (
22
- <div className="space-y-10 mt-6">
23
- {/* ── Common Ratios ── */}
22
+ <div className="space-y-10">
24
23
  <ExampleGrid>
25
- <ExampleSection
26
- label="16:9"
27
- description="Widescreen — dùng cho video, hero banner"
28
- codeString={`<AspectRatio
24
+ <ShowcaseExample title="16:9" description="Widescreen — dùng cho video, hero banner" code={`<AspectRatio
29
25
  ratio={16 / 9}
30
26
  className="bg-muted rounded-xl overflow-hidden flex items-center justify-center border border-border w-full"
31
27
  >
32
28
  <span className="text-foreground font-mono text-lg font-semibold">
33
29
  16:9
34
30
  </span>
35
- </AspectRatio>`}
36
- >
37
- <AspectRatio
38
- ratio={16 / 9}
39
- className="bg-muted rounded-xl overflow-hidden flex items-center justify-center border border-border w-full"
40
- >
41
- <span className="text-foreground font-mono text-lg font-semibold">
42
- 16:9
43
- </span>
44
- </AspectRatio>
45
- </ExampleSection>
31
+ </AspectRatio>`} preview={
32
+ <>
33
+ <AspectRatio
34
+ ratio={16 / 9}
35
+ className="bg-muted rounded-xl overflow-hidden flex items-center justify-center border border-border w-full"
36
+ >
37
+ <span className="text-foreground font-mono text-lg font-semibold">
38
+ 16:9
39
+ </span>
40
+ </AspectRatio>
41
+ </>
42
+ } />
46
43
 
47
- <ExampleSection
48
- label="4:3"
49
- description="Classic — bài thuyết trình, TV cũ"
50
- codeString={`<AspectRatio
44
+ <ShowcaseExample title="4:3" description="Classic — bài thuyết trình, TV cũ" code={`<AspectRatio
51
45
  ratio={4 / 3}
52
46
  className="bg-muted rounded-xl overflow-hidden flex items-center justify-center border border-border w-full"
53
47
  >
54
48
  <span className="text-foreground font-mono text-lg font-semibold">
55
49
  4:3
56
50
  </span>
57
- </AspectRatio>`}
58
- >
59
- <AspectRatio
60
- ratio={4 / 3}
61
- className="bg-muted rounded-xl overflow-hidden flex items-center justify-center border border-border w-full"
62
- >
63
- <span className="text-foreground font-mono text-lg font-semibold">
64
- 4:3
65
- </span>
66
- </AspectRatio>
67
- </ExampleSection>
51
+ </AspectRatio>`} preview={
52
+ <>
53
+ <AspectRatio
54
+ ratio={4 / 3}
55
+ className="bg-muted rounded-xl overflow-hidden flex items-center justify-center border border-border w-full"
56
+ >
57
+ <span className="text-foreground font-mono text-lg font-semibold">
58
+ 4:3
59
+ </span>
60
+ </AspectRatio>
61
+ </>
62
+ } />
68
63
 
69
- <ExampleSection
70
- label="1:1"
71
- description="Vuông — avatar, social media"
72
- codeString={`<AspectRatio
64
+ <ShowcaseExample title="1:1" description="Vuông — avatar, social media" code={`<AspectRatio
73
65
  ratio={1}
74
66
  className="bg-muted rounded-xl overflow-hidden flex items-center justify-center border border-border w-full"
75
67
  >
76
68
  <span className="text-foreground font-mono text-lg font-semibold">
77
69
  1:1
78
70
  </span>
79
- </AspectRatio>`}
80
- >
81
- <AspectRatio
82
- ratio={1}
83
- className="bg-muted rounded-xl overflow-hidden flex items-center justify-center border border-border w-full"
84
- >
85
- <span className="text-foreground font-mono text-lg font-semibold">
86
- 1:1
87
- </span>
88
- </AspectRatio>
89
- </ExampleSection>
71
+ </AspectRatio>`} preview={
72
+ <>
73
+ <AspectRatio
74
+ ratio={1}
75
+ className="bg-muted rounded-xl overflow-hidden flex items-center justify-center border border-border w-full"
76
+ >
77
+ <span className="text-foreground font-mono text-lg font-semibold">
78
+ 1:1
79
+ </span>
80
+ </AspectRatio>
81
+ </>
82
+ } />
90
83
  </ExampleGrid>
91
84
 
92
- {/* ── With Image ── */}
93
85
  <ExampleGrid>
94
- <ExampleSection
95
- label="16:9 Image"
96
- description="Tỷ lệ khung hình hạn chế hình ảnh 16:9."
97
- codeString={`<AspectRatio
86
+ <ShowcaseExample title="16:9 Image" description="Tỷ lệ khung hình hạn chế hình ảnh 16:9." code={`<AspectRatio
98
87
  ratio={16 / 9}
99
88
  className="rounded-xl overflow-hidden w-full"
100
89
  >
@@ -103,24 +92,22 @@ function AspectRatioMicroShowcase() {
103
92
  alt="Landscape photo"
104
93
  className="w-full h-full object-cover"
105
94
  />
106
- </AspectRatio>`}
107
- >
108
- <AspectRatio
109
- ratio={16 / 9}
110
- className="rounded-xl overflow-hidden w-full"
111
- >
112
- <img
113
- src="https://images.unsplash.com/photo-1588345921523-c2dcdb7f1dcd?w=800&dpr=2&q=80"
114
- alt="Landscape photo"
115
- className="w-full h-full object-cover"
116
- />
117
- </AspectRatio>
118
- </ExampleSection>
95
+ </AspectRatio>`} preview={
96
+ <>
97
+ <AspectRatio
98
+ ratio={16 / 9}
99
+ className="rounded-xl overflow-hidden w-full"
100
+ >
101
+ <img
102
+ src="https://images.unsplash.com/photo-1588345921523-c2dcdb7f1dcd?w=800&dpr=2&q=80"
103
+ alt="Landscape photo"
104
+ className="w-full h-full object-cover"
105
+ />
106
+ </AspectRatio>
107
+ </>
108
+ } />
119
109
 
120
- <ExampleSection
121
- label="1:1 Image"
122
- description="Tỷ lệ khung hình vuông cho avatar hoặc social post."
123
- codeString={`<AspectRatio
110
+ <ShowcaseExample title="1:1 Image" description="Tỷ lệ khung hình vuông cho avatar hoặc social post." code={`<AspectRatio
124
111
  ratio={1}
125
112
  className="rounded-xl overflow-hidden w-full"
126
113
  >
@@ -129,24 +116,21 @@ function AspectRatioMicroShowcase() {
129
116
  alt="Square cropped photo"
130
117
  className="w-full h-full object-cover"
131
118
  />
132
- </AspectRatio>`}
133
- >
134
- <AspectRatio ratio={1} className="rounded-xl overflow-hidden w-full">
135
- <img
136
- src="https://images.unsplash.com/photo-1588345921523-c2dcdb7f1dcd?w=800&dpr=2&q=80"
137
- alt="Square cropped photo"
138
- className="w-full h-full object-cover"
139
- />
140
- </AspectRatio>
141
- </ExampleSection>
119
+ </AspectRatio>`} preview={
120
+ <>
121
+ <AspectRatio ratio={1} className="rounded-xl overflow-hidden w-full">
122
+ <img
123
+ src="https://images.unsplash.com/photo-1588345921523-c2dcdb7f1dcd?w=800&dpr=2&q=80"
124
+ alt="Square cropped photo"
125
+ className="w-full h-full object-cover"
126
+ />
127
+ </AspectRatio>
128
+ </>
129
+ } />
142
130
  </ExampleGrid>
143
131
 
144
- {/* ── Map / Embed placeholder ── */}
145
132
  <ExampleGrid>
146
- <ExampleSection
147
- label="Video Embed"
148
- description="Duy trì tỷ lệ 16:9 cho video nhúng."
149
- codeString={`<AspectRatio
133
+ <ShowcaseExample title="Video Embed" description="Duy trì tỷ lệ 16:9 cho video nhúng." code={`<AspectRatio
150
134
  ratio={16 / 9}
151
135
  className="rounded-xl overflow-hidden bg-muted border border-border w-full"
152
136
  >
@@ -167,34 +151,32 @@ function AspectRatioMicroShowcase() {
167
151
  iframe / video
168
152
  </span>
169
153
  </div>
170
- </AspectRatio>`}
171
- >
172
- <AspectRatio
173
- ratio={16 / 9}
174
- className="rounded-xl overflow-hidden bg-muted border border-border w-full"
175
- >
176
- <div className="w-full h-full flex flex-col items-center justify-center gap-2 text-muted-foreground">
177
- <svg
178
- width="48"
179
- height="48"
180
- viewBox="0 0 24 24"
181
- fill="none"
182
- stroke="currentColor"
183
- strokeWidth="1.5"
184
- strokeLinecap="round"
185
- strokeLinejoin="round"
186
- >
187
- <polygon points="5 3 19 12 5 21 5 3" />
188
- </svg>
189
- <span className="text-xs font-mono">iframe / video</span>
190
- </div>
191
- </AspectRatio>
192
- </ExampleSection>
154
+ </AspectRatio>`} preview={
155
+ <>
156
+ <AspectRatio
157
+ ratio={16 / 9}
158
+ className="rounded-xl overflow-hidden bg-muted border border-border w-full"
159
+ >
160
+ <div className="w-full h-full flex flex-col items-center justify-center gap-2 text-muted-foreground">
161
+ <svg
162
+ width="48"
163
+ height="48"
164
+ viewBox="0 0 24 24"
165
+ fill="none"
166
+ stroke="currentColor"
167
+ strokeWidth="1.5"
168
+ strokeLinecap="round"
169
+ strokeLinejoin="round"
170
+ >
171
+ <polygon points="5 3 19 12 5 21 5 3" />
172
+ </svg>
173
+ <span className="text-xs font-mono">iframe / video</span>
174
+ </div>
175
+ </AspectRatio>
176
+ </>
177
+ } />
193
178
 
194
- <ExampleSection
195
- label="Map Embed"
196
- description="Duy trì tỷ lệ 4:3 cho bản đồ nhúng."
197
- codeString={`<AspectRatio
179
+ <ShowcaseExample title="Map Embed" description="Duy trì tỷ lệ 4:3 cho bản đồ nhúng." code={`<AspectRatio
198
180
  ratio={4 / 3}
199
181
  className="rounded-xl overflow-hidden bg-muted border border-border w-full"
200
182
  >
@@ -217,98 +199,92 @@ function AspectRatioMicroShowcase() {
217
199
  map / iframe
218
200
  </span>
219
201
  </div>
220
- </AspectRatio>`}
221
- >
222
- <AspectRatio
223
- ratio={4 / 3}
224
- className="rounded-xl overflow-hidden bg-muted border border-border w-full"
225
- >
226
- <div className="w-full h-full flex flex-col items-center justify-center gap-2 text-muted-foreground">
227
- <svg
228
- width="48"
229
- height="48"
230
- viewBox="0 0 24 24"
231
- fill="none"
232
- stroke="currentColor"
233
- strokeWidth="1.5"
234
- strokeLinecap="round"
235
- strokeLinejoin="round"
236
- >
237
- <polygon points="1 6 1 22 8 18 16 22 23 18 23 2 16 6 8 2 1 6" />
238
- <line x1="8" y1="2" x2="8" y2="18" />
239
- <line x1="16" y1="6" x2="16" y2="22" />
240
- </svg>
241
- <span className="text-xs font-mono">map / iframe</span>
242
- </div>
243
- </AspectRatio>
244
- </ExampleSection>
202
+ </AspectRatio>`} preview={
203
+ <>
204
+ <AspectRatio
205
+ ratio={4 / 3}
206
+ className="rounded-xl overflow-hidden bg-muted border border-border w-full"
207
+ >
208
+ <div className="w-full h-full flex flex-col items-center justify-center gap-2 text-muted-foreground">
209
+ <svg
210
+ width="48"
211
+ height="48"
212
+ viewBox="0 0 24 24"
213
+ fill="none"
214
+ stroke="currentColor"
215
+ strokeWidth="1.5"
216
+ strokeLinecap="round"
217
+ strokeLinejoin="round"
218
+ >
219
+ <polygon points="1 6 1 22 8 18 16 22 23 18 23 2 16 6 8 2 1 6" />
220
+ <line x1="8" y1="2" x2="8" y2="18" />
221
+ <line x1="16" y1="6" x2="16" y2="22" />
222
+ </svg>
223
+ <span className="text-xs font-mono">map / iframe</span>
224
+ </div>
225
+ </AspectRatio>
226
+ </>
227
+ } />
245
228
  </ExampleGrid>
246
229
 
247
- {/* ── Custom Ratio ── */}
248
230
  <ExampleGrid>
249
- <ExampleSection
250
- label="Ratio 2.35"
251
- description="Custom ratio 2.35"
252
- codeString={`<AspectRatio
231
+ <ShowcaseExample title="Ratio 2.35" description="Custom ratio 2.35" code={`<AspectRatio
253
232
  ratio={2.35}
254
233
  className="bg-muted rounded-xl overflow-hidden flex items-center justify-center border border-dashed border-border w-full"
255
234
  >
256
235
  <span className="text-muted-foreground font-mono text-sm">
257
236
  ratio={2.35}
258
237
  </span>
259
- </AspectRatio>`}
260
- >
261
- <AspectRatio
262
- ratio={2.35}
263
- className="bg-muted rounded-xl overflow-hidden flex items-center justify-center border border-dashed border-border w-full"
264
- >
265
- <span className="text-muted-foreground font-mono text-sm">
266
- ratio={2.35}
267
- </span>
268
- </AspectRatio>
269
- </ExampleSection>
270
- <ExampleSection
271
- label="Ratio 1.85"
272
- description="Custom ratio 1.85"
273
- codeString={`<AspectRatio
238
+ </AspectRatio>`} preview={
239
+ <>
240
+ <AspectRatio
241
+ ratio={2.35}
242
+ className="bg-muted rounded-xl overflow-hidden flex items-center justify-center border border-dashed border-border w-full"
243
+ >
244
+ <span className="text-muted-foreground font-mono text-sm">
245
+ ratio={2.35}
246
+ </span>
247
+ </AspectRatio>
248
+ </>
249
+ } />
250
+ <ShowcaseExample title="Ratio 1.85" description="Custom ratio 1.85" code={`<AspectRatio
274
251
  ratio={1.85}
275
252
  className="bg-muted rounded-xl overflow-hidden flex items-center justify-center border border-dashed border-border w-full"
276
253
  >
277
254
  <span className="text-muted-foreground font-mono text-sm">
278
255
  ratio={1.85}
279
256
  </span>
280
- </AspectRatio>`}
281
- >
282
- <AspectRatio
283
- ratio={1.85}
284
- className="bg-muted rounded-xl overflow-hidden flex items-center justify-center border border-dashed border-border w-full"
285
- >
286
- <span className="text-muted-foreground font-mono text-sm">
287
- ratio={1.85}
288
- </span>
289
- </AspectRatio>
290
- </ExampleSection>
291
- <ExampleSection
292
- label="Ratio 0.8"
293
- description="Custom ratio 0.8"
294
- codeString={`<AspectRatio
257
+ </AspectRatio>`} preview={
258
+ <>
259
+ <AspectRatio
260
+ ratio={1.85}
261
+ className="bg-muted rounded-xl overflow-hidden flex items-center justify-center border border-dashed border-border w-full"
262
+ >
263
+ <span className="text-muted-foreground font-mono text-sm">
264
+ ratio={1.85}
265
+ </span>
266
+ </AspectRatio>
267
+ </>
268
+ } />
269
+ <ShowcaseExample title="Ratio 0.8" description="Custom ratio 0.8" code={`<AspectRatio
295
270
  ratio={0.8}
296
271
  className="bg-muted rounded-xl overflow-hidden flex items-center justify-center border border-dashed border-border w-full"
297
272
  >
298
273
  <span className="text-muted-foreground font-mono text-sm">
299
274
  ratio={0.8}
300
275
  </span>
301
- </AspectRatio>`}
302
- >
303
- <AspectRatio
304
- ratio={0.8}
305
- className="bg-muted rounded-xl overflow-hidden flex items-center justify-center border border-dashed border-border w-full"
306
- >
307
- <span className="text-muted-foreground font-mono text-sm">
308
- ratio={0.8}
309
- </span>
310
- </AspectRatio>
311
- </ExampleSection>
276
+ </AspectRatio>`} preview={
277
+ <>
278
+ <AspectRatio
279
+ ratio={0.8}
280
+ className="bg-muted rounded-xl overflow-hidden flex items-center justify-center border border-dashed border-border w-full"
281
+ >
282
+ <span className="text-muted-foreground font-mono text-sm">
283
+ ratio={0.8}
284
+ </span>
285
+ </AspectRatio>
286
+ </>
287
+ } />
312
288
  </ExampleGrid>
313
289
  </div>
314
290
  );
@@ -319,7 +295,7 @@ export default function AspectRatioShowcase() {
319
295
  <Showcase
320
296
  title="Aspect Ratio"
321
297
  description="Hiển thị nội dung theo tỷ lệ mong muốn. Hữu ích cho hình ảnh, video, bản đồ và phương tiện nhúng."
322
- generalConcept={
298
+ guideline={
323
299
  <ShowcaseDocs>
324
300
  <DocsH3>Aspect Ratio</DocsH3>
325
301
  <DocsP>
@@ -328,9 +304,7 @@ export default function AspectRatioShowcase() {
328
304
  </DocsP>
329
305
  </ShowcaseDocs>
330
306
  }
331
- tabs={[
332
- { label: "Micro (Primitive)", content: <AspectRatioMicroShowcase /> },
333
- ]}
307
+ micro={{ content: <AspectRatioMicroShowcase /> }}
334
308
  />
335
309
  );
336
310
  }