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
@@ -6,7 +6,7 @@ import {
6
6
  DocsCode,
7
7
  DocsP,
8
8
  ExampleGrid,
9
- ExampleSection,
9
+ ShowcaseExample,
10
10
  Showcase,
11
11
  ShowcaseDocs
12
12
  } from "../../dev/components/showcase";
@@ -18,7 +18,7 @@ export default function BadgeShowcase() {
18
18
  <Showcase
19
19
  title="Badge"
20
20
  description="Hiển thị nhãn trạng thái, phân loại hoặc đếm số lượng."
21
- generalConcept={
21
+ guideline={
22
22
  <ShowcaseDocs>
23
23
  <DocsP>
24
24
  Dùng để làm nổi bật trạng thái, nhãn phân loại hoặc số lượng. Thường
@@ -27,57 +27,36 @@ export default function BadgeShowcase() {
27
27
  </DocsP>
28
28
  </ShowcaseDocs>
29
29
  }
30
- tabs={[
31
- {
32
- label: "Micro (Primitive)",
33
- content: <BadgeMicroShowcase globalSize={globalSize} /> },
34
- ]}
30
+ micro={{ content: <BadgeMicroShowcase globalSize={globalSize} /> }}
35
31
  />
36
32
  );
37
33
  }
38
34
 
39
35
  function BadgeMicroShowcase({ globalSize }: { globalSize: Size }) {
40
36
  return (
41
- <div className="space-y-10 mt-6">
42
- {/* ── Variants ── */}
43
- <ExampleSection
44
- label="Variants"
45
- description="Tất cả các kiểu hiển thị hiện có."
46
- codeString={`<Badge variant="solid">Solid</Badge>
37
+ <div className="space-y-10">
38
+ <ShowcaseExample title="Variants" description="Tất cả các kiểu hiển thị hiện có." code={`<Badge variant="solid">Solid</Badge>
47
39
  <Badge variant="soft">Soft</Badge>
48
- <Badge variant="outline">Outline</Badge>`}
49
- >
50
- <Badge variant="solid">Solid</Badge>
51
- <Badge variant="soft">Soft</Badge>
52
- <Badge variant="outline">Outline</Badge>
53
- </ExampleSection>
40
+ <Badge variant="outline">Outline</Badge>`} preview={
41
+ <>
42
+ <Badge variant="solid">Solid</Badge><Badge variant="soft">Soft</Badge><Badge variant="outline">Outline</Badge>
43
+ </>
44
+ } />
54
45
 
55
- {/* ── Colors ── */}
56
46
  <ExampleGrid>
57
- <ExampleSection
58
- label="Solid Colors"
59
- description="Các màu semantic áp dụng cho Badge dạng Solid."
60
- codeString={`<Badge color="primary">Primary</Badge>
47
+ <ShowcaseExample title="Solid Colors" description="Các màu semantic áp dụng cho Badge dạng Solid." code={`<Badge color="primary">Primary</Badge>
61
48
  <Badge color="secondary">Secondary</Badge>
62
49
  <Badge color="destructive">Destructive</Badge>
63
50
  <Badge color="warning">Warning</Badge>
64
51
  <Badge color="success">Success</Badge>
65
52
  <Badge color="info">Info</Badge>
66
- <Badge color="muted">Muted</Badge>`}
67
- >
68
- <Badge color="primary">Primary</Badge>
69
- <Badge color="secondary">Secondary</Badge>
70
- <Badge color="destructive">Destructive</Badge>
71
- <Badge color="warning">Warning</Badge>
72
- <Badge color="success">Success</Badge>
73
- <Badge color="info">Info</Badge>
74
- <Badge color="muted">Muted</Badge>
75
- </ExampleSection>
53
+ <Badge color="muted">Muted</Badge>`} preview={
54
+ <>
55
+ <Badge color="primary">Primary</Badge><Badge color="secondary">Secondary</Badge><Badge color="destructive">Destructive</Badge><Badge color="warning">Warning</Badge><Badge color="success">Success</Badge><Badge color="info">Info</Badge><Badge color="muted">Muted</Badge>
56
+ </>
57
+ } />
76
58
 
77
- <ExampleSection
78
- label="Soft Colors"
79
- description="Các màu semantic áp dụng cho Badge dạng Soft."
80
- codeString={`<Badge variant="soft" color="primary">
59
+ <ShowcaseExample title="Soft Colors" description="Các màu semantic áp dụng cho Badge dạng Soft." code={`<Badge variant="soft" color="primary">
81
60
  Primary
82
61
  </Badge>
83
62
  <Badge variant="soft" color="secondary">
@@ -97,37 +76,28 @@ function BadgeMicroShowcase({ globalSize }: { globalSize: Size }) {
97
76
  </Badge>
98
77
  <Badge variant="soft" color="muted">
99
78
  Muted
100
- </Badge>`}
101
- >
102
- <Badge variant="soft" color="primary">
103
- Primary
104
- </Badge>
105
- <Badge variant="soft" color="secondary">
106
- Secondary
107
- </Badge>
108
- <Badge variant="soft" color="destructive">
109
- Destructive
110
- </Badge>
111
- <Badge variant="soft" color="warning">
112
- Warning
113
- </Badge>
114
- <Badge variant="soft" color="success">
115
- Success
116
- </Badge>
117
- <Badge variant="soft" color="info">
118
- Info
119
- </Badge>
120
- <Badge variant="soft" color="muted">
121
- Muted
122
- </Badge>
123
- </ExampleSection>
79
+ </Badge>`} preview={
80
+ <>
81
+ <Badge variant="soft" color="primary">
82
+ Primary
83
+ </Badge><Badge variant="soft" color="secondary">
84
+ Secondary
85
+ </Badge><Badge variant="soft" color="destructive">
86
+ Destructive
87
+ </Badge><Badge variant="soft" color="warning">
88
+ Warning
89
+ </Badge><Badge variant="soft" color="success">
90
+ Success
91
+ </Badge><Badge variant="soft" color="info">
92
+ Info
93
+ </Badge><Badge variant="soft" color="muted">
94
+ Muted
95
+ </Badge>
96
+ </>
97
+ } />
124
98
  </ExampleGrid>
125
99
 
126
- {/* ── With Icons ── */}
127
- <ExampleSection
128
- label="With Icons"
129
- description="Badge kèm icon để bổ sung ngữ cảnh."
130
- codeString={`<Badge color="success">
100
+ <ShowcaseExample title="With Icons" description="Badge kèm icon để bổ sung ngữ cảnh." code={`<Badge color="success">
131
101
  <CheckIcon className="size-3.5" />
132
102
  Approved
133
103
  </Badge>
@@ -145,32 +115,26 @@ function BadgeMicroShowcase({ globalSize }: { globalSize: Size }) {
145
115
  <Badge color="info" variant="outline">
146
116
  <InfoIcon className="size-3.5" />
147
117
  Draft
148
- </Badge>`}
149
- >
150
- <Badge color="success">
151
- <CheckIcon className="size-3.5" />
152
- Approved
153
- </Badge>
154
- <Badge color="destructive">
155
- <XIcon className="size-3.5" />
156
- Rejected
157
- </Badge>
158
- <Badge color="warning" variant="soft">
159
- <AlertTriangleIcon className="size-3.5" />
160
- Pending
161
- </Badge>
162
- <Badge color="info" variant="outline">
163
- <InfoIcon className="size-3.5" />
164
- Draft
165
- </Badge>
166
- </ExampleSection>
118
+ </Badge>`} preview={
119
+ <>
120
+ <Badge color="success">
121
+ <CheckIcon className="size-3.5" />
122
+ Approved
123
+ </Badge><Badge color="destructive">
124
+ <XIcon className="size-3.5" />
125
+ Rejected
126
+ </Badge><Badge color="warning" variant="soft">
127
+ <AlertTriangleIcon className="size-3.5" />
128
+ Pending
129
+ </Badge><Badge color="info" variant="outline">
130
+ <InfoIcon className="size-3.5" />
131
+ Draft
132
+ </Badge>
133
+ </>
134
+ } />
167
135
 
168
- {/* ── Real-world Use Cases ── */}
169
136
  <ExampleGrid>
170
- <ExampleSection
171
- label="Status Indicators"
172
- description="Dùng để hiển thị trạng thái."
173
- codeString={`<Badge color="success" variant="soft">
137
+ <ShowcaseExample title="Status Indicators" description="Dùng để hiển thị trạng thái." code={`<Badge color="success" variant="soft">
174
138
  Active
175
139
  </Badge>
176
140
  <Badge color="secondary" variant="soft">
@@ -181,25 +145,20 @@ function BadgeMicroShowcase({ globalSize }: { globalSize: Size }) {
181
145
  </Badge>
182
146
  <Badge color="muted" variant="outline">
183
147
  Archived
184
- </Badge>`}
185
- >
186
- <Badge color="success" variant="soft">
187
- Active
188
- </Badge>
189
- <Badge color="secondary" variant="soft">
190
- Inactive
191
- </Badge>
192
- <Badge color="destructive" variant="soft">
193
- Expired
194
- </Badge>
195
- <Badge color="muted" variant="outline">
196
- Archived
197
- </Badge>
198
- </ExampleSection>
199
- <ExampleSection
200
- label="Tags & Categories"
201
- description="Dùng để hiển thị danh mục."
202
- codeString={`<Badge variant="outline" color="primary">
148
+ </Badge>`} preview={
149
+ <>
150
+ <Badge color="success" variant="soft">
151
+ Active
152
+ </Badge><Badge color="secondary" variant="soft">
153
+ Inactive
154
+ </Badge><Badge color="destructive" variant="soft">
155
+ Expired
156
+ </Badge><Badge color="muted" variant="outline">
157
+ Archived
158
+ </Badge>
159
+ </>
160
+ } />
161
+ <ShowcaseExample title="Tags & Categories" description="Dùng để hiển thị danh mục." code={`<Badge variant="outline" color="primary">
203
162
  React
204
163
  </Badge>
205
164
  <Badge variant="outline" color="secondary">
@@ -210,28 +169,22 @@ function BadgeMicroShowcase({ globalSize }: { globalSize: Size }) {
210
169
  </Badge>
211
170
  <Badge variant="outline" color="warning">
212
171
  Vite
213
- </Badge>`}
214
- >
215
- <Badge variant="outline" color="primary">
216
- React
217
- </Badge>
218
- <Badge variant="outline" color="secondary">
219
- TypeScript
220
- </Badge>
221
- <Badge variant="outline" color="info">
222
- Tailwind
223
- </Badge>
224
- <Badge variant="outline" color="warning">
225
- Vite
226
- </Badge>
227
- </ExampleSection>
172
+ </Badge>`} preview={
173
+ <>
174
+ <Badge variant="outline" color="primary">
175
+ React
176
+ </Badge><Badge variant="outline" color="secondary">
177
+ TypeScript
178
+ </Badge><Badge variant="outline" color="info">
179
+ Tailwind
180
+ </Badge><Badge variant="outline" color="warning">
181
+ Vite
182
+ </Badge>
183
+ </>
184
+ } />
228
185
  </ExampleGrid>
229
186
 
230
- {/* ── As Link ── */}
231
- <ExampleSection
232
- label="As Link"
233
- description="Badge render dưới dạng thẻ a nhờ prop render."
234
- codeString={`<Badge render={<a href="#" />}>Clickable Badge</Badge>
187
+ <ShowcaseExample title="As Link" description="Badge render dưới dạng thẻ a nhờ prop render." code={`<Badge render={<a href="#" />}>Clickable Badge</Badge>
235
188
 
236
189
  <Badge color="secondary" render={<a href="#" />}>
237
190
  Secondary Link
@@ -239,16 +192,15 @@ function BadgeMicroShowcase({ globalSize }: { globalSize: Size }) {
239
192
 
240
193
  <Badge variant="outline" render={<a href="#" />}>
241
194
  Outline Link
242
- </Badge>`}
243
- >
244
- <Badge render={<a href="#" />}>Clickable Badge</Badge>
245
- <Badge color="secondary" render={<a href="#" />}>
246
- Secondary Link
247
- </Badge>
248
- <Badge variant="outline" render={<a href="#" />}>
249
- Outline Link
250
- </Badge>
251
- </ExampleSection>
195
+ </Badge>`} preview={
196
+ <>
197
+ <Badge render={<a href="#" />}>Clickable Badge</Badge><Badge color="secondary" render={<a href="#" />}>
198
+ Secondary Link
199
+ </Badge><Badge variant="outline" render={<a href="#" />}>
200
+ Outline Link
201
+ </Badge>
202
+ </>
203
+ } />
252
204
  </div>
253
205
  );
254
206
  }
@@ -20,75 +20,61 @@ import {
20
20
  import {
21
21
  DocsP,
22
22
  ExampleGrid,
23
- ExampleSection,
23
+ ShowcaseExample,
24
24
  Showcase,
25
25
  ShowcaseDocs
26
26
  } from "../../dev/components/showcase";
27
27
 
28
- // ──────────────────────────────────────────────────────────
29
- // SECTION 1: Macro Content
30
- // ──────────────────────────────────────────────────────────
31
28
  function BreadcrumbMacroShowcase() {
32
29
  return (
33
- <div className="space-y-10 mt-6">
30
+ <div className="space-y-10">
34
31
  <ExampleGrid>
35
- <ExampleSection
36
- label="Tiêu chuẩn (Standard)"
37
- description="Mảng điều hướng cơ bản."
38
- codeString={`<BreadcrumbPreset
32
+ <ShowcaseExample title="Tiêu chuẩn (Standard)" description="Mảng điều hướng cơ bản." code={`<BreadcrumbPreset
39
33
  items={[
40
34
  { label: "Trang chủ", href: "/" },
41
35
  { label: "Thành phần", href: "/components" },
42
36
  { label: "Breadcrumb" },
43
37
  ]}
44
- />`}
45
- >
46
- <BreadcrumbPreset
47
- items={[
48
- { label: "Trang chủ", href: "/" },
49
- { label: "Thành phần", href: "/components" },
50
- { label: "Breadcrumb" },
51
- ]}
52
- />
53
- </ExampleSection>
38
+ />`} preview={
39
+ <>
40
+ <BreadcrumbPreset
41
+ items={[
42
+ { label: "Trang chủ", href: "/" },
43
+ { label: "Thành phần", href: "/components" },
44
+ { label: "Breadcrumb" },
45
+ ]}
46
+ />
47
+ </>
48
+ } />
54
49
 
55
- <ExampleSection
56
- label="Nhiều cấp (Deep Navigation)"
57
- description="Đường dẫn dài hơn điển hình cho các trang lồng nhau."
58
- codeString={`<BreadcrumbPreset
50
+ <ShowcaseExample title="Nhiều cấp (Deep Navigation)" description="Đường dẫn dài hơn điển hình cho các trang lồng nhau." code={`<BreadcrumbPreset
59
51
  items={[
60
52
  { label: "Dashboard", href: "/dashboard" },
61
53
  { label: "Cài đặt", href: "/settings" },
62
54
  { label: "Tài khoản", href: "/settings/account" },
63
55
  { label: "Hóa đơn" },
64
56
  ]}
65
- />`}
66
- >
67
- <BreadcrumbPreset
68
- items={[
69
- { label: "Dashboard", href: "/dashboard" },
70
- { label: "Cài đặt", href: "/settings" },
71
- { label: "Tài khoản", href: "/settings/account" },
72
- { label: "Hóa đơn" },
73
- ]}
74
- />
75
- </ExampleSection>
57
+ />`} preview={
58
+ <>
59
+ <BreadcrumbPreset
60
+ items={[
61
+ { label: "Dashboard", href: "/dashboard" },
62
+ { label: "Cài đặt", href: "/settings" },
63
+ { label: "Tài khoản", href: "/settings/account" },
64
+ { label: "Hóa đơn" },
65
+ ]}
66
+ />
67
+ </>
68
+ } />
76
69
  </ExampleGrid>
77
70
  </div>
78
71
  );
79
72
  }
80
73
 
81
- // ──────────────────────────────────────────────────────────
82
- // SECTION 2: Micro Content
83
- // ──────────────────────────────────────────────────────────
84
74
  function BreadcrumbMicroShowcase() {
85
75
  return (
86
- <div className="space-y-10 mt-6">
87
- <ExampleSection
88
- label="Cơ bản (Default)"
89
- description="Lắp ráp thủ công các item với dấu phân cách chevron mặc định."
90
- fullWidth
91
- codeString={`<Breadcrumb className="w-full max-w-lg">
76
+ <div className="space-y-10">
77
+ <ShowcaseExample title="Cơ bản (Default)" description="Lắp ráp thủ công các item với dấu phân cách chevron mặc định." code={`<Breadcrumb className="w-full max-w-lg">
92
78
  <BreadcrumbList>
93
79
  <BreadcrumbItem>
94
80
  <BreadcrumbLink href="/">Trang chủ</BreadcrumbLink>
@@ -104,30 +90,28 @@ function BreadcrumbMicroShowcase() {
104
90
  <BreadcrumbPage>Breadcrumb</BreadcrumbPage>
105
91
  </BreadcrumbItem>
106
92
  </BreadcrumbList>
107
- </Breadcrumb>`}
108
- >
109
- <Breadcrumb className="w-full max-w-lg">
110
- <BreadcrumbList>
111
- <BreadcrumbItem>
112
- <BreadcrumbLink href="/">Trang chủ</BreadcrumbLink>
113
- </BreadcrumbItem>
114
- <BreadcrumbSeparator />
115
- <BreadcrumbItem>
116
- <BreadcrumbLink href="/components">Thành phần</BreadcrumbLink>
117
- </BreadcrumbItem>
118
- <BreadcrumbSeparator />
119
- <BreadcrumbItem>
120
- <BreadcrumbPage>Breadcrumb</BreadcrumbPage>
121
- </BreadcrumbItem>
122
- </BreadcrumbList>
123
- </Breadcrumb>
124
- </ExampleSection>
93
+ </Breadcrumb>`} preview={
94
+ <>
95
+ <Breadcrumb className="w-full max-w-lg">
96
+ <BreadcrumbList>
97
+ <BreadcrumbItem>
98
+ <BreadcrumbLink href="/">Trang chủ</BreadcrumbLink>
99
+ </BreadcrumbItem>
100
+ <BreadcrumbSeparator />
101
+ <BreadcrumbItem>
102
+ <BreadcrumbLink href="/components">Thành phần</BreadcrumbLink>
103
+ </BreadcrumbItem>
104
+ <BreadcrumbSeparator />
105
+ <BreadcrumbItem>
106
+ <BreadcrumbPage>Breadcrumb</BreadcrumbPage>
107
+ </BreadcrumbItem>
108
+ </BreadcrumbList>
109
+ </Breadcrumb>
110
+ </>
111
+ } />
125
112
 
126
113
  <ExampleGrid>
127
- <ExampleSection
128
- label="Đổi dấu phân cách (Custom Separator)"
129
- description="Truyền icon bất kỳ (VD: SlashIcon) vào bên trong BreadcrumbSeparator."
130
- codeString={`<Breadcrumb className="w-full max-w-lg">
114
+ <ShowcaseExample title="Đổi dấu phân cách (Custom Separator)" description="Truyền icon bất kỳ (VD: SlashIcon) vào bên trong BreadcrumbSeparator." code={`<Breadcrumb className="w-full max-w-lg">
131
115
  <BreadcrumbList>
132
116
  <BreadcrumbItem>
133
117
  <BreadcrumbLink href="/">Trang chủ</BreadcrumbLink>
@@ -147,33 +131,31 @@ function BreadcrumbMicroShowcase() {
147
131
  <BreadcrumbPage>Breadcrumb</BreadcrumbPage>
148
132
  </BreadcrumbItem>
149
133
  </BreadcrumbList>
150
- </Breadcrumb>`}
151
- >
152
- <Breadcrumb className="w-full max-w-lg">
153
- <BreadcrumbList>
154
- <BreadcrumbItem>
155
- <BreadcrumbLink href="/">Trang chủ</BreadcrumbLink>
156
- </BreadcrumbItem>
157
- <BreadcrumbSeparator>
158
- <SlashIcon className="size-3.5" />
159
- </BreadcrumbSeparator>
160
- <BreadcrumbItem>
161
- <BreadcrumbLink href="/components">Thành phần</BreadcrumbLink>
162
- </BreadcrumbItem>
163
- <BreadcrumbSeparator>
164
- <SlashIcon className="size-3.5" />
165
- </BreadcrumbSeparator>
166
- <BreadcrumbItem>
167
- <BreadcrumbPage>Breadcrumb</BreadcrumbPage>
168
- </BreadcrumbItem>
169
- </BreadcrumbList>
170
- </Breadcrumb>
171
- </ExampleSection>
134
+ </Breadcrumb>`} preview={
135
+ <>
136
+ <Breadcrumb className="w-full max-w-lg">
137
+ <BreadcrumbList>
138
+ <BreadcrumbItem>
139
+ <BreadcrumbLink href="/">Trang chủ</BreadcrumbLink>
140
+ </BreadcrumbItem>
141
+ <BreadcrumbSeparator>
142
+ <SlashIcon className="size-3.5" />
143
+ </BreadcrumbSeparator>
144
+ <BreadcrumbItem>
145
+ <BreadcrumbLink href="/components">Thành phần</BreadcrumbLink>
146
+ </BreadcrumbItem>
147
+ <BreadcrumbSeparator>
148
+ <SlashIcon className="size-3.5" />
149
+ </BreadcrumbSeparator>
150
+ <BreadcrumbItem>
151
+ <BreadcrumbPage>Breadcrumb</BreadcrumbPage>
152
+ </BreadcrumbItem>
153
+ </BreadcrumbList>
154
+ </Breadcrumb>
155
+ </>
156
+ } />
172
157
 
173
- <ExampleSection
174
- label="Dấu ba chấm (With Ellipsis)"
175
- description="Sử dụng BreadcrumbEllipsis cùng DropdownMenu để giấu các đường dẫn trung gian."
176
- codeString={`<Breadcrumb className="w-full max-w-lg">
158
+ <ShowcaseExample title="Dấu ba chấm (With Ellipsis)" description="Sử dụng BreadcrumbEllipsis cùng DropdownMenu để giấu các đường dẫn trung gian." code={`<Breadcrumb className="w-full max-w-lg">
177
159
  <BreadcrumbList>
178
160
  <BreadcrumbItem>
179
161
  <BreadcrumbLink href="/">Trang chủ</BreadcrumbLink>
@@ -205,56 +187,54 @@ function BreadcrumbMicroShowcase() {
205
187
  <BreadcrumbPage>Breadcrumb</BreadcrumbPage>
206
188
  </BreadcrumbItem>
207
189
  </BreadcrumbList>
208
- </Breadcrumb>`}
209
- >
210
- <Breadcrumb className="w-full max-w-lg">
211
- <BreadcrumbList>
212
- <BreadcrumbItem>
213
- <BreadcrumbLink href="/">Trang chủ</BreadcrumbLink>
214
- </BreadcrumbItem>
215
- <BreadcrumbSeparator />
216
- <BreadcrumbItem>
217
- <DropdownMenu>
218
- <DropdownMenuTrigger className="flex items-center gap-1 hover:text-foreground">
219
- <BreadcrumbEllipsis className="h-4 w-4" />
220
- <span className="sr-only">Toggle menu</span>
221
- </DropdownMenuTrigger>
222
-
223
- <DropdownMenuContent align="start">
224
- <DropdownMenuItem>Tài liệu</DropdownMenuItem>
225
- <DropdownMenuItem>Giao diện</DropdownMenuItem>
226
- <DropdownMenuItem>GitHub</DropdownMenuItem>
227
- </DropdownMenuContent>
228
-
229
- </DropdownMenu>
230
- </BreadcrumbItem>
231
- <BreadcrumbSeparator />
232
- <BreadcrumbItem>
233
- <BreadcrumbLink href="/docs/components">
234
- Thành phần
235
- </BreadcrumbLink>
236
- </BreadcrumbItem>
237
- <BreadcrumbSeparator />
238
- <BreadcrumbItem>
239
- <BreadcrumbPage>Breadcrumb</BreadcrumbPage>
240
- </BreadcrumbItem>
241
- </BreadcrumbList>
242
- </Breadcrumb>
243
- </ExampleSection>
190
+ </Breadcrumb>`} preview={
191
+ <>
192
+ <Breadcrumb className="w-full max-w-lg">
193
+ <BreadcrumbList>
194
+ <BreadcrumbItem>
195
+ <BreadcrumbLink href="/">Trang chủ</BreadcrumbLink>
196
+ </BreadcrumbItem>
197
+ <BreadcrumbSeparator />
198
+ <BreadcrumbItem>
199
+ <DropdownMenu>
200
+ <DropdownMenuTrigger className="flex items-center gap-1 hover:text-foreground">
201
+ <BreadcrumbEllipsis className="h-4 w-4" />
202
+ <span className="sr-only">Toggle menu</span>
203
+ </DropdownMenuTrigger>
204
+
205
+ <DropdownMenuContent align="start">
206
+ <DropdownMenuItem>Tài liệu</DropdownMenuItem>
207
+ <DropdownMenuItem>Giao diện</DropdownMenuItem>
208
+ <DropdownMenuItem>GitHub</DropdownMenuItem>
209
+ </DropdownMenuContent>
210
+
211
+ </DropdownMenu>
212
+ </BreadcrumbItem>
213
+ <BreadcrumbSeparator />
214
+ <BreadcrumbItem>
215
+ <BreadcrumbLink href="/docs/components">
216
+ Thành phần
217
+ </BreadcrumbLink>
218
+ </BreadcrumbItem>
219
+ <BreadcrumbSeparator />
220
+ <BreadcrumbItem>
221
+ <BreadcrumbPage>Breadcrumb</BreadcrumbPage>
222
+ </BreadcrumbItem>
223
+ </BreadcrumbList>
224
+ </Breadcrumb>
225
+ </>
226
+ } />
244
227
  </ExampleGrid>
245
228
  </div>
246
229
  );
247
230
  }
248
231
 
249
- // ──────────────────────────────────────────────────────────
250
- // SECTION 3: Entry point
251
- // ──────────────────────────────────────────────────────────
252
232
  export default function BreadcrumbShowcase() {
253
233
  return (
254
234
  <Showcase
255
235
  title="Breadcrumb"
256
236
  description="Hiển thị đường dẫn điều hướng, giúp người dùng biết vị trí hiện tại trong hệ thống."
257
- generalConcept={
237
+ guideline={
258
238
  <ShowcaseDocs>
259
239
  <DocsP>
260
240
  Dùng để hiển thị đường dẫn điều hướng, giúp người dùng nhận biết vị
@@ -263,10 +243,8 @@ export default function BreadcrumbShowcase() {
263
243
  </DocsP>
264
244
  </ShowcaseDocs>
265
245
  }
266
- tabs={[
267
- { label: "Micro (Primitive)", content: <BreadcrumbMicroShowcase /> },
268
- { label: "Macro (Preset)", content: <BreadcrumbMacroShowcase /> },
269
- ]}
246
+ micro={{ content: <BreadcrumbMicroShowcase /> }}
247
+ macro={{ content: <BreadcrumbMacroShowcase /> }}
270
248
  />
271
249
  );
272
250
  }