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
@@ -12,112 +12,93 @@ import {
12
12
  DocsH3,
13
13
  DocsP,
14
14
  ExampleGrid,
15
- ExampleSection,
15
+ ShowcaseExample,
16
16
  Showcase,
17
17
  ShowcaseDocs
18
18
  } from "../../dev/components/showcase";
19
19
  import { type Size } from "../../lib/types";
20
20
 
21
- // ──────────────────────────────────────────────────────────
22
- // SECTION 1: Macro Content
23
- // ──────────────────────────────────────────────────────────
24
21
  function ProgressMacroShowcase({ globalSize }: { globalSize: Size }) {
25
22
  return (
26
- <div className="space-y-10 mt-6">
23
+ <div className="space-y-10">
27
24
  <ExampleGrid>
28
- <ExampleSection
29
- label="Tiêu chuẩn (Standard)"
30
- description="Thanh tiến trình cơ bản nhất."
31
- codeString={`<div className="w-full max-w-sm">
25
+ <ShowcaseExample title="Tiêu chuẩn (Standard)" description="Thanh tiến trình cơ bản nhất." code={`<div className="w-full max-w-sm">
32
26
  <ProgressPreset value={60} />
33
- </div>`}
34
- >
35
- <div className="w-full max-w-sm">
36
- <ProgressPreset size={globalSize} value={60} />
37
- </div>
38
- </ExampleSection>
27
+ </div>`} preview={
28
+ <>
29
+ <div className="w-full max-w-sm">
30
+ <ProgressPreset size={globalSize} value={60} />
31
+ </div>
32
+ </>
33
+ } />
39
34
 
40
- <ExampleSection
41
- label="Vô định (Indeterminate)"
42
- description="Khi không truyền giá trị, thanh sẽ chạy hoạt ảnh liên tục."
43
- codeString={`<div className="w-full max-w-sm">
35
+ <ShowcaseExample title="Vô định (Indeterminate)" description="Khi không truyền giá trị, thanh sẽ chạy hoạt ảnh liên tục." code={`<div className="w-full max-w-sm">
44
36
  <ProgressPreset />
45
- </div>`}
46
- >
47
- <div className="w-full max-w-sm">
48
- <ProgressPreset size={globalSize} />
49
- </div>
50
- </ExampleSection>
37
+ </div>`} preview={
38
+ <>
39
+ <div className="w-full max-w-sm">
40
+ <ProgressPreset size={globalSize} />
41
+ </div>
42
+ </>
43
+ } />
51
44
  </ExampleGrid>
52
45
 
53
- <ExampleSection
54
- label="Kèm Nhãn & Giá trị (With Label & Value)"
55
- description="Tự động căn lề nhãn và hiển thị phần trăm."
56
- codeString={`<div className="w-full max-w-sm">
46
+ <ShowcaseExample title="Kèm Nhãn & Giá trị (With Label & Value)" description="Tự động căn lề nhãn và hiển thị phần trăm." code={`<div className="w-full max-w-sm">
57
47
  <ProgressPreset
58
48
  value={85}
59
49
  label="Đang tải lên hệ thống..."
60
50
  showValue
61
51
  />
62
- </div>`}
63
- >
64
- <div className="w-full max-w-sm">
65
- <ProgressPreset
66
- size={globalSize}
67
- value={85}
68
- label="Đang tải lên hệ thống..."
69
- showValue
70
- />
71
- </div>
72
- </ExampleSection>
52
+ </div>`} preview={
53
+ <>
54
+ <div className="w-full max-w-sm">
55
+ <ProgressPreset
56
+ size={globalSize}
57
+ value={85}
58
+ label="Đang tải lên hệ thống..."
59
+ showValue
60
+ />
61
+ </div>
62
+ </>
63
+ } />
73
64
  </div>
74
65
  );
75
66
  }
76
67
 
77
- // ──────────────────────────────────────────────────────────
78
- // SECTION 2: Micro Content
79
- // ──────────────────────────────────────────────────────────
80
68
  function ProgressMicroShowcase({ globalSize }: { globalSize: Size }) {
81
69
  return (
82
- <div className="space-y-10 mt-6">
70
+ <div className="space-y-10">
83
71
  <ExampleGrid>
84
- <ExampleSection
85
- label="Chỉ Thanh tiến trình (Core)"
86
- description="Thanh tiến trình micro, lắp ráp thủ công (không có label)."
87
- codeString={`<Progress value={60} className="w-full max-w-sm">
72
+ <ShowcaseExample title="Chỉ Thanh tiến trình (Core)" description="Thanh tiến trình micro, lắp ráp thủ công (không có label)." code={`<Progress value={60} className="w-full max-w-sm">
88
73
  <ProgressTrack>
89
74
  <ProgressIndicator />
90
75
  </ProgressTrack>
91
- </Progress>`}
92
- >
93
- <Progress value={60} size={globalSize} className="w-full max-w-sm">
94
- <ProgressTrack>
95
- <ProgressIndicator />
96
- </ProgressTrack>
97
- </Progress>
98
- </ExampleSection>
76
+ </Progress>`} preview={
77
+ <>
78
+ <Progress value={60} size={globalSize} className="w-full max-w-sm">
79
+ <ProgressTrack>
80
+ <ProgressIndicator />
81
+ </ProgressTrack>
82
+ </Progress>
83
+ </>
84
+ } />
99
85
 
100
- <ExampleSection
101
- label="Tuỳ chỉnh màu sắc (Custom Color)"
102
- description="Can thiệp trực tiếp vào ProgressIndicator để đổi màu."
103
- codeString={`<Progress value={45} className="w-full max-w-sm">
86
+ <ShowcaseExample title="Tuỳ chỉnh màu sắc (Custom Color)" description="Can thiệp trực tiếp vào ProgressIndicator để đổi màu." code={`<Progress value={45} className="w-full max-w-sm">
104
87
  <ProgressTrack>
105
88
  <ProgressIndicator className="bg-red-500" />
106
89
  </ProgressTrack>
107
- </Progress>`}
108
- >
109
- <Progress value={45} size={globalSize} className="w-full max-w-sm">
110
- <ProgressTrack>
111
- <ProgressIndicator className="bg-red-500" />
112
- </ProgressTrack>
113
- </Progress>
114
- </ExampleSection>
90
+ </Progress>`} preview={
91
+ <>
92
+ <Progress value={45} size={globalSize} className="w-full max-w-sm">
93
+ <ProgressTrack>
94
+ <ProgressIndicator className="bg-red-500" />
95
+ </ProgressTrack>
96
+ </Progress>
97
+ </>
98
+ } />
115
99
  </ExampleGrid>
116
100
 
117
- <ExampleSection
118
- label="Tự lắp ráp Nhãn (Compositional with Label)"
119
- description="Sử dụng các bộ phận cấu thành để hiển thị nhãn và giá trị theo ý muốn."
120
- codeString={`<Progress value={45} className="w-full max-w-sm">
101
+ <ShowcaseExample title="Tự lắp ráp Nhãn (Compositional with Label)" description="Sử dụng các bộ phận cấu thành để hiển thị nhãn và giá trị theo ý muốn." code={`<Progress value={45} className="w-full max-w-sm">
121
102
  <div className="flex items-center justify-between mb-1.5">
122
103
  <ProgressLabel className="font-medium text-muted-foreground">
123
104
  Đang tải xuống...
@@ -127,26 +108,23 @@ function ProgressMicroShowcase({ globalSize }: { globalSize: Size }) {
127
108
  <ProgressTrack>
128
109
  <ProgressIndicator />
129
110
  </ProgressTrack>
130
- </Progress>`}
131
- >
132
- <Progress value={45} size={globalSize} className="w-full max-w-sm">
133
- <div className="flex items-center justify-between mb-1.5">
134
- <ProgressLabel className="font-medium text-muted-foreground">
135
- Đang tải xuống...
136
- </ProgressLabel>
137
- <ProgressValue className="font-mono" />
138
- </div>
139
- <ProgressTrack>
140
- <ProgressIndicator />
141
- </ProgressTrack>
142
- </Progress>
143
- </ExampleSection>
111
+ </Progress>`} preview={
112
+ <>
113
+ <Progress value={45} size={globalSize} className="w-full max-w-sm">
114
+ <div className="flex items-center justify-between mb-1.5">
115
+ <ProgressLabel className="font-medium text-muted-foreground">
116
+ Đang tải xuống...
117
+ </ProgressLabel>
118
+ <ProgressValue className="font-mono" />
119
+ </div>
120
+ <ProgressTrack>
121
+ <ProgressIndicator />
122
+ </ProgressTrack>
123
+ </Progress>
124
+ </>
125
+ } />
144
126
 
145
- <ExampleSection
146
- label="🧭 Use Case Comparison"
147
- description="So sánh nhanh khi nào dùng Micro và Macro."
148
- fullWidth
149
- codeString={`<div className="grid grid-cols-1 gap-6 md:grid-cols-2">
127
+ <ShowcaseExample title="🧭 So sánh Use Case" description="So sánh nhanh khi nào dùng Micro và Macro." code={`<div className="grid grid-cols-1 gap-6 md:grid-cols-2">
150
128
  {/* Story 1: Macro wins */}
151
129
  <div className="rounded-xl border border-border bg-card p-5 flex flex-col gap-4">
152
130
  <div className="flex items-start gap-3">
@@ -214,114 +192,88 @@ function ProgressMicroShowcase({ globalSize }: { globalSize: Size }) {
214
192
  màu của indicator.
215
193
  </p>
216
194
  </div>
217
- </div>`}
218
- >
219
- <div className="grid grid-cols-1 gap-6 md:grid-cols-2">
220
- {/* Story 1: Macro wins */}
221
- <div className="rounded-xl border border-border bg-card p-5 flex flex-col gap-4">
222
- <div className="flex items-start gap-3">
223
- <span className="mt-0.5 shrink-0 rounded-full bg-green-500/10 p-1.5 text-green-600">
224
- <svg
225
- xmlns="http://www.w3.org/2000/svg"
226
- className="size-4"
227
- viewBox="0 0 24 24"
228
- fill="none"
229
- stroke="currentColor"
230
- strokeWidth="2"
231
- strokeLinecap="round"
232
- strokeLinejoin="round"
233
- aria-hidden="true"
234
- >
235
- <path d="M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z" />
236
- </svg>
237
- </span>
238
- <div>
239
- <p className="text-xs font-semibold uppercase tracking-wider text-muted-foreground">
240
- Story 1 · Dùng Macro
241
- </p>
242
- <h3 className="mt-0.5 text-sm font-semibold text-foreground">
243
- Sử dụng đơn giản
244
- </h3>
245
- </div>
246
- </div>
247
- <p className="text-xs text-muted-foreground leading-relaxed">
248
- Dùng Preset khi bạn muốn hiển thị nhanh thanh tiến trình có kèm
249
- label và giá trị phần trăm theo layout mặc định.
250
- </p>
251
- </div>
195
+ </div>`} preview={
196
+ <>
197
+ <div className="grid grid-cols-1 gap-6 md:grid-cols-2">
198
+ <div className="rounded-xl border border-border bg-card p-5 flex flex-col gap-4">
199
+ <div className="flex items-start gap-3">
200
+ <span className="mt-0.5 shrink-0 rounded-full bg-green-500/10 p-1.5 text-green-600">
201
+ <svg
202
+ xmlns="http://www.w3.org/2000/svg"
203
+ className="size-4"
204
+ viewBox="0 0 24 24"
205
+ fill="none"
206
+ stroke="currentColor"
207
+ strokeWidth="2"
208
+ strokeLinecap="round"
209
+ strokeLinejoin="round"
210
+ aria-hidden="true"
211
+ >
212
+ <path d="M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z" />
213
+ </svg>
214
+ </span>
215
+ <div>
216
+ <p className="text-xs font-semibold uppercase tracking-wider text-muted-foreground">
217
+ Story 1 · Dùng Macro
218
+ </p>
219
+ <h3 className="mt-0.5 text-sm font-semibold text-foreground">
220
+ Sử dụng đơn giản
221
+ </h3>
222
+ </div>
223
+ </div>
224
+ <p className="text-xs text-muted-foreground leading-relaxed">
225
+ Dùng Preset khi bạn muốn hiển thị nhanh thanh tiến trình có kèm
226
+ label giá trị phần trăm theo layout mặc định.
227
+ </p>
228
+ </div>
252
229
 
253
- {/* Story 2: Micro wins */}
254
- <div className="rounded-xl border border-border bg-card p-5 flex flex-col gap-4">
255
- <div className="flex items-start gap-3">
256
- <span className="mt-0.5 shrink-0 rounded-full bg-blue-500/10 p-1.5 text-blue-600">
257
- <svg
258
- xmlns="http://www.w3.org/2000/svg"
259
- className="size-4"
260
- viewBox="0 0 24 24"
261
- fill="none"
262
- stroke="currentColor"
263
- strokeWidth="2"
264
- strokeLinecap="round"
265
- strokeLinejoin="round"
266
- aria-hidden="true"
267
- >
268
- <path d="M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z" />
269
- </svg>
270
- </span>
271
- <div>
272
- <p className="text-xs font-semibold uppercase tracking-wider text-muted-foreground">
273
- Story 2 · Dùng Micro
274
- </p>
275
- <h3 className="mt-0.5 text-sm font-semibold text-foreground">
276
- Layout tuỳ chỉnh
277
- </h3>
278
- </div>
279
- </div>
280
- <p className="text-xs text-muted-foreground leading-relaxed">
281
- Dùng Micro khi bạn muốn thay đổi cấu trúc hiển thị (ví dụ: đặt
282
- label dưới thanh tiến trình) hoặc đổi màu của indicator.
283
- </p>
284
- </div>
285
- </div>
286
- </ExampleSection>
230
+ <div className="rounded-xl border border-border bg-card p-5 flex flex-col gap-4">
231
+ <div className="flex items-start gap-3">
232
+ <span className="mt-0.5 shrink-0 rounded-full bg-blue-500/10 p-1.5 text-blue-600">
233
+ <svg
234
+ xmlns="http://www.w3.org/2000/svg"
235
+ className="size-4"
236
+ viewBox="0 0 24 24"
237
+ fill="none"
238
+ stroke="currentColor"
239
+ strokeWidth="2"
240
+ strokeLinecap="round"
241
+ strokeLinejoin="round"
242
+ aria-hidden="true"
243
+ >
244
+ <path d="M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z" />
245
+ </svg>
246
+ </span>
247
+ <div>
248
+ <p className="text-xs font-semibold uppercase tracking-wider text-muted-foreground">
249
+ Story 2 · Dùng Micro
250
+ </p>
251
+ <h3 className="mt-0.5 text-sm font-semibold text-foreground">
252
+ Layout tuỳ chỉnh
253
+ </h3>
254
+ </div>
255
+ </div>
256
+ <p className="text-xs text-muted-foreground leading-relaxed">
257
+ Dùng Micro khi bạn muốn thay đổi cấu trúc hiển thị (ví dụ: đặt
258
+ label dưới thanh tiến trình) hoặc đổi màu của indicator.
259
+ </p>
260
+ </div>
261
+ </div>
262
+ </>
263
+ } />
287
264
  </div>
288
265
  );
289
266
  }
290
267
 
291
- // ──────────────────────────────────────────────────────────
292
- // SECTION 3: Entry point
293
- // ──────────────────────────────────────────────────────────
294
268
  export default function ProgressShowcase() {
295
269
  const { size: globalSize } = useDevContext();
296
270
  return (
297
271
  <Showcase
298
- title="Progress"
272
+ title="Tiến trình"
299
273
  description="Thanh chỉ báo cho biết tiến độ hoàn thành của một công việc hoặc nhiệm vụ kéo dài."
300
- generalConcept={
301
- <ShowcaseDocs>
302
- <DocsH3>Khi nào nên dùng Macro</DocsH3>
303
- <DocsP>
304
- <DocsCode>ProgressPreset</DocsCode> là một component đóng gói sẵn.
305
- Nó tự động hiển thị nhãn (label) và phần trăm (value) lên trên thanh
306
- tiến trình chỉ với các prop đơn giản, tiết kiệm thời gian code.
307
- </DocsP>
308
- <DocsH3>Khi nào nên dùng Micro</DocsH3>
309
- <DocsP>
310
- Dùng <DocsCode>Progress</DocsCode> nguyên thủy khi bạn muốn tự tùy
311
- chỉnh hoàn toàn bố cục (ví dụ: đặt label ở bên dưới thanh thay vì
312
- bên trên, đổi màu thanh indicator dựa trên giá trị, hoặc bỏ nhãn
313
- hoàn toàn).
314
- </DocsP>
315
- </ShowcaseDocs>
316
- }
317
- tabs={[
318
- {
319
- label: "Micro (Primitive)",
320
- content: <ProgressMicroShowcase globalSize={globalSize} /> },
321
- {
322
- label: "Macro (Preset)",
323
- content: <ProgressMacroShowcase globalSize={globalSize} /> },
324
- ]}
274
+
275
+ micro={{ content: <ProgressMicroShowcase globalSize={globalSize} /> }}
276
+ macro={{ content: <ProgressMacroShowcase globalSize={globalSize} /> }}
325
277
  />
326
278
  );
327
279
  }