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
@@ -10,7 +10,7 @@ import {
10
10
  } from "../../components/micro/sidebar";
11
11
  import {
12
12
  DocsP,
13
- ExampleSection,
13
+ ShowcaseExample,
14
14
  Showcase,
15
15
  ShowcaseDocs
16
16
  } from "../../dev/components/showcase";
@@ -20,12 +20,8 @@ function SidebarMicroShowcase() {
20
20
  useSidebarToggle("expanded");
21
21
 
22
22
  return (
23
- <div className="space-y-10 mt-6">
24
- <ExampleSection
25
- label="Dumb Component Architecture"
26
- description="Sidebar không có transition width, sử dụng display: none để ẩn ngay lập tức, không gây hiệu ứng giật khung."
27
- fullWidth
28
- codeString={`const { sidebarRef, toggleSidebar, defaultState } = useSidebarToggle("expanded");
23
+ <div className="space-y-10">
24
+ <ShowcaseExample title="Dumb Component Architecture" description="Sidebar không có transition width, sử dụng display: none để ẩn ngay lập tức, không gây hiệu ứng giật khung." code={`const { sidebarRef, toggleSidebar, defaultState } = useSidebarToggle("expanded");
29
25
 
30
26
  return (
31
27
  <div className="flex h-[500px] w-full">
@@ -46,60 +42,58 @@ return (
46
42
  <button onClick={toggleSidebar}>Toggle Sidebar</button>
47
43
  </main>
48
44
  </div>
49
- );`}
50
- >
51
- <div className="rounded-xl border border-border overflow-hidden flex h-[500px] w-full bg-background">
52
- <Sidebar
53
- ref={sidebarRef}
54
- defaultState={defaultState}
55
- expandedWidth={300}
56
- >
57
- {/* Logo */}
58
- <SidebarLogo icon={<Package2Icon />} text="Acme Corp" />
45
+ );`} preview={
46
+ <>
47
+ <div className="rounded-xl border border-border overflow-hidden flex h-[500px] w-full bg-background">
48
+ <Sidebar
49
+ ref={sidebarRef}
50
+ defaultState={defaultState}
51
+ expandedWidth={300}
52
+ >
53
+ <SidebarLogo icon={<Package2Icon />} text="Acme Corp" />
59
54
 
60
- {/* Menu chính */}
61
- <div className="flex-1 py-2 flex flex-col gap-4">
62
- <div className="flex flex-col gap-1">
63
- <SidebarLabel icon={<FolderIcon />} text="Projects" />
64
- <SidebarMenuItemList>
65
- <SidebarMenuItem text="Active Projects" />
66
- <SidebarMenuItem text="Archived Projects" />
67
- <SidebarMenuItem text="Templates" />
68
- </SidebarMenuItemList>
69
- </div>
55
+ <div className="flex-1 py-2 flex flex-col gap-4">
56
+ <div className="flex flex-col gap-1">
57
+ <SidebarLabel icon={<FolderIcon />} text="Projects" />
58
+ <SidebarMenuItemList>
59
+ <SidebarMenuItem text="Active Projects" />
60
+ <SidebarMenuItem text="Archived Projects" />
61
+ <SidebarMenuItem text="Templates" />
62
+ </SidebarMenuItemList>
63
+ </div>
70
64
 
71
- <div className="flex flex-col gap-1">
72
- <SidebarLabel icon={<UserIcon />} text="Team" />
73
- <SidebarMenuItemList>
74
- <SidebarMenuItem text="Members" />
75
- <SidebarMenuItem text="Permissions" />
76
- </SidebarMenuItemList>
77
- </div>
78
- </div>
65
+ <div className="flex flex-col gap-1">
66
+ <SidebarLabel icon={<UserIcon />} text="Team" />
67
+ <SidebarMenuItemList>
68
+ <SidebarMenuItem text="Members" />
69
+ <SidebarMenuItem text="Permissions" />
70
+ </SidebarMenuItemList>
71
+ </div>
72
+ </div>
79
73
 
80
- {/* Footer */}
81
- <div className="p-2 border-t border-sidebar-border mt-auto">
82
- <SidebarLabel icon={<SettingsIcon />} text="Settings" />
83
- </div>
84
- </Sidebar>
74
+ <div className="p-2 border-t border-sidebar-border mt-auto">
75
+ <SidebarLabel icon={<SettingsIcon />} text="Cài đặt" />
76
+ </div>
77
+ </Sidebar>
85
78
 
86
- <main className="flex-1 flex flex-col bg-muted/10 p-6">
87
- <h1 className="text-xl font-bold">Main Application</h1>
88
- <p className="text-muted-foreground mt-4">
89
- Hãy bấm menu State ở phía trên cùng, hoặc bấm nút Toggle bên dưới
90
- để chuyển qua lại giữa Expanded và Collapsed.
91
- </p>
92
- <div className="mt-6">
93
- <button
94
- className="px-4 py-2 bg-primary text-primary-foreground rounded-md shadow hover:bg-primary/90 transition-colors"
95
- onClick={toggleSidebar}
96
- >
97
- Toggle Sidebar (Direct DOM Mutation)
98
- </button>
99
- </div>
100
- </main>
101
- </div>
102
- </ExampleSection>
79
+ <main className="flex-1 flex flex-col bg-muted/10 p-6">
80
+ <h1 className="text-xl font-bold">Main Application</h1>
81
+ <p className="text-muted-foreground mt-4">
82
+ Hãy bấm menu State ở phía trên cùng, hoặc bấm nút Toggle bên dưới
83
+ để chuyển qua lại giữa Expanded và Collapsed.
84
+ </p>
85
+ <div className="mt-6">
86
+ <button
87
+ className="px-4 py-2 bg-primary text-primary-foreground rounded-md shadow hover:bg-primary/90 transition-colors"
88
+ onClick={toggleSidebar}
89
+ >
90
+ Toggle Sidebar (Direct DOM Mutation)
91
+ </button>
92
+ </div>
93
+ </main>
94
+ </div>
95
+ </>
96
+ } />
103
97
  </div>
104
98
  );
105
99
  }
@@ -109,7 +103,7 @@ export default function SidebarShowcase() {
109
103
  <Showcase
110
104
  title="Sidebar (Ultra Primitive)"
111
105
  description="Sidebar nguyên thuỷ nhất, chỉ nhận context state, CSS thuần tuý đóng mở tức thì."
112
- generalConcept={
106
+ guideline={
113
107
  <ShowcaseDocs>
114
108
  <DocsP>
115
109
  Sidebar tối giản chỉ dùng CSS và DOM attribute để chuyển trạng thái
@@ -118,7 +112,7 @@ export default function SidebarShowcase() {
118
112
  </DocsP>
119
113
  </ShowcaseDocs>
120
114
  }
121
- tabs={[{ label: "Micro (Primitive)", content: <SidebarMicroShowcase /> }]}
115
+ micro={{ content: <SidebarMicroShowcase /> }}
122
116
  />
123
117
  );
124
118
  }
@@ -4,45 +4,36 @@ 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: Micro Content (Only Micro exists)
14
- // ──────────────────────────────────────────────────────────
15
12
  function SkeletonMicroShowcase() {
16
13
  return (
17
- <div className="space-y-10 mt-6">
18
- <ExampleSection
19
- label="Hình dáng cơ bản (Basic Shapes)"
20
- description="Thay đổi hình dạng thông qua các class Tailwind: w-..., h-..., rounded-full, v.v."
21
- fullWidth
22
- codeString={`<div className="flex flex-wrap items-center gap-6 w-full p-4 border border-border rounded-lg bg-card">
14
+ <div className="space-y-10">
15
+ <ShowcaseExample title="Hình dáng cơ bản (Basic Shapes)" description="Thay đổi hình dạng thông qua các class Tailwind: w-..., h-..., rounded-full, v.v." code={`<div className="flex flex-wrap items-center gap-6 w-full p-4 border border-border rounded-lg bg-card">
23
16
  <Skeleton className="h-4 w-48" />
24
17
  <Skeleton className="h-4 w-32" />
25
18
  <Skeleton className="h-4 w-64" />
26
19
  <Skeleton className="size-12 rounded-full" />
27
20
  <Skeleton className="h-24 w-40 rounded-xl" />
28
21
  <Skeleton className="h-10 w-24 rounded-md" />
29
- </div>`}
30
- >
31
- <div className="flex flex-wrap items-center gap-6 w-full p-4 border border-border rounded-lg bg-card">
32
- <Skeleton className="h-4 w-48" />
33
- <Skeleton className="h-4 w-32" />
34
- <Skeleton className="h-4 w-64" />
35
- <Skeleton className="size-12 rounded-full" />
36
- <Skeleton className="h-24 w-40 rounded-xl" />
37
- <Skeleton className="h-10 w-24 rounded-md" />
38
- </div>
39
- </ExampleSection>
22
+ </div>`} preview={
23
+ <>
24
+ <div className="flex flex-wrap items-center gap-6 w-full p-4 border border-border rounded-lg bg-card">
25
+ <Skeleton className="h-4 w-48" />
26
+ <Skeleton className="h-4 w-32" />
27
+ <Skeleton className="h-4 w-64" />
28
+ <Skeleton className="size-12 rounded-full" />
29
+ <Skeleton className="h-24 w-40 rounded-xl" />
30
+ <Skeleton className="h-10 w-24 rounded-md" />
31
+ </div>
32
+ </>
33
+ } />
40
34
 
41
35
  <ExampleGrid>
42
- <ExampleSection
43
- label="Card Profile"
44
- description="Khung xương mô phỏng ảnh đại diện, tên người dùng và số liệu."
45
- codeString={`<div className="space-y-6 w-full max-w-sm rounded-lg border border-border bg-card p-4">
36
+ <ShowcaseExample title="Card Profile" description="Khung xương mô phỏng ảnh đại diện, tên người dùng và số liệu." code={`<div className="space-y-6 w-full max-w-sm rounded-lg border border-border bg-card p-4">
46
37
  <div className="flex items-center space-x-4">
47
38
  <Skeleton className="h-12 w-12 rounded-full" />
48
39
  <div className="space-y-2">
@@ -54,27 +45,25 @@ function SkeletonMicroShowcase() {
54
45
  <Skeleton className="h-24 rounded-xl" />
55
46
  <Skeleton className="h-24 rounded-xl" />
56
47
  </div>
57
- </div>`}
58
- >
59
- <div className="space-y-6 w-full max-w-sm rounded-lg border border-border bg-card p-4">
60
- <div className="flex items-center space-x-4">
61
- <Skeleton className="h-12 w-12 rounded-full" />
62
- <div className="space-y-2">
63
- <Skeleton className="h-4 w-[200px]" />
64
- <Skeleton className="h-4 w-[150px]" />
65
- </div>
66
- </div>
67
- <div className="grid grid-cols-2 gap-4">
68
- <Skeleton className="h-24 rounded-xl" />
69
- <Skeleton className="h-24 rounded-xl" />
70
- </div>
71
- </div>
72
- </ExampleSection>
48
+ </div>`} preview={
49
+ <>
50
+ <div className="space-y-6 w-full max-w-sm rounded-lg border border-border bg-card p-4">
51
+ <div className="flex items-center space-x-4">
52
+ <Skeleton className="h-12 w-12 rounded-full" />
53
+ <div className="space-y-2">
54
+ <Skeleton className="h-4 w-[200px]" />
55
+ <Skeleton className="h-4 w-[150px]" />
56
+ </div>
57
+ </div>
58
+ <div className="grid grid-cols-2 gap-4">
59
+ <Skeleton className="h-24 rounded-xl" />
60
+ <Skeleton className="h-24 rounded-xl" />
61
+ </div>
62
+ </div>
63
+ </>
64
+ } />
73
65
 
74
- <ExampleSection
75
- label="Article / Blog Post"
76
- description="Khung xương mô phỏng các đoạn văn bản (text blocks)."
77
- codeString={`<div className="space-y-4 w-full max-w-sm rounded-lg border border-border bg-card p-4">
66
+ <ShowcaseExample title="Article / Blog Post" description="Khung xương mô phỏng các đoạn văn bản (text blocks)." code={`<div className="space-y-4 w-full max-w-sm rounded-lg border border-border bg-card p-4">
78
67
  <Skeleton className="h-6 w-3/4" />
79
68
  <Skeleton className="h-4 w-full" />
80
69
  <Skeleton className="h-4 w-full" />
@@ -83,26 +72,24 @@ function SkeletonMicroShowcase() {
83
72
  <Skeleton className="h-4 w-full" />
84
73
  <Skeleton className="h-4 w-4/5" />
85
74
  <Skeleton className="h-4 w-2/3" />
86
- </div>`}
87
- >
88
- <div className="space-y-4 w-full max-w-sm rounded-lg border border-border bg-card p-4">
89
- <Skeleton className="h-6 w-3/4" />
90
- <Skeleton className="h-4 w-full" />
91
- <Skeleton className="h-4 w-full" />
92
- <Skeleton className="h-4 w-5/6" />
93
- <div className="pt-2" />
94
- <Skeleton className="h-4 w-full" />
95
- <Skeleton className="h-4 w-4/5" />
96
- <Skeleton className="h-4 w-2/3" />
97
- </div>
98
- </ExampleSection>
75
+ </div>`} preview={
76
+ <>
77
+ <div className="space-y-4 w-full max-w-sm rounded-lg border border-border bg-card p-4">
78
+ <Skeleton className="h-6 w-3/4" />
79
+ <Skeleton className="h-4 w-full" />
80
+ <Skeleton className="h-4 w-full" />
81
+ <Skeleton className="h-4 w-5/6" />
82
+ <div className="pt-2" />
83
+ <Skeleton className="h-4 w-full" />
84
+ <Skeleton className="h-4 w-4/5" />
85
+ <Skeleton className="h-4 w-2/3" />
86
+ </div>
87
+ </>
88
+ } />
99
89
  </ExampleGrid>
100
90
 
101
91
  <ExampleGrid>
102
- <ExampleSection
103
- label="List Items / Table Rows"
104
- description="Sử dụng vòng lặp hoặc nhiều thẻ lặp lại để mô phỏng danh sách."
105
- codeString={`<div className="space-y-4 w-full max-w-sm rounded-lg border border-border bg-card p-4">
92
+ <ShowcaseExample title="List Items / Table Rows" description="Sử dụng vòng lặp hoặc nhiều thẻ lặp lại để mô phỏng danh sách." code={`<div className="space-y-4 w-full max-w-sm rounded-lg border border-border bg-card p-4">
106
93
  <div className="flex items-center space-x-4">
107
94
  <Skeleton className="h-8 w-8 rounded-full" />
108
95
  <div className="space-y-2">
@@ -124,37 +111,35 @@ function SkeletonMicroShowcase() {
124
111
  <Skeleton className="h-3 w-[90px]" />
125
112
  </div>
126
113
  </div>
127
- </div>`}
128
- >
129
- <div className="space-y-4 w-full max-w-sm rounded-lg border border-border bg-card p-4">
130
- <div className="flex items-center space-x-4">
131
- <Skeleton className="h-8 w-8 rounded-full" />
132
- <div className="space-y-2">
133
- <Skeleton className="h-3 w-[180px]" />
134
- <Skeleton className="h-3 w-[100px]" />
135
- </div>
136
- </div>
137
- <div className="flex items-center space-x-4">
138
- <Skeleton className="h-8 w-8 rounded-full" />
139
- <div className="space-y-2">
140
- <Skeleton className="h-3 w-[150px]" />
141
- <Skeleton className="h-3 w-[120px]" />
142
- </div>
143
- </div>
144
- <div className="flex items-center space-x-4">
145
- <Skeleton className="h-8 w-8 rounded-full" />
146
- <div className="space-y-2">
147
- <Skeleton className="h-3 w-[170px]" />
148
- <Skeleton className="h-3 w-[90px]" />
149
- </div>
150
- </div>
151
- </div>
152
- </ExampleSection>
114
+ </div>`} preview={
115
+ <>
116
+ <div className="space-y-4 w-full max-w-sm rounded-lg border border-border bg-card p-4">
117
+ <div className="flex items-center space-x-4">
118
+ <Skeleton className="h-8 w-8 rounded-full" />
119
+ <div className="space-y-2">
120
+ <Skeleton className="h-3 w-[180px]" />
121
+ <Skeleton className="h-3 w-[100px]" />
122
+ </div>
123
+ </div>
124
+ <div className="flex items-center space-x-4">
125
+ <Skeleton className="h-8 w-8 rounded-full" />
126
+ <div className="space-y-2">
127
+ <Skeleton className="h-3 w-[150px]" />
128
+ <Skeleton className="h-3 w-[120px]" />
129
+ </div>
130
+ </div>
131
+ <div className="flex items-center space-x-4">
132
+ <Skeleton className="h-8 w-8 rounded-full" />
133
+ <div className="space-y-2">
134
+ <Skeleton className="h-3 w-[170px]" />
135
+ <Skeleton className="h-3 w-[90px]" />
136
+ </div>
137
+ </div>
138
+ </div>
139
+ </>
140
+ } />
153
141
 
154
- <ExampleSection
155
- label="Media / Image Placeholder"
156
- description="Khung xương lớn mô phỏng hình ảnh hoặc video player."
157
- codeString={`<div className="space-y-4 w-full max-w-sm rounded-lg border border-border bg-card p-4">
142
+ <ShowcaseExample title="Media / Image Placeholder" description="Khung xương lớn mô phỏng hình ảnh hoặc video player." code={`<div className="space-y-4 w-full max-w-sm rounded-lg border border-border bg-card p-4">
158
143
  <Skeleton className="h-48 w-full rounded-md" />
159
144
  <div className="flex justify-between items-center pt-2">
160
145
  <div className="space-y-2">
@@ -163,33 +148,31 @@ function SkeletonMicroShowcase() {
163
148
  </div>
164
149
  <Skeleton className="h-8 w-16 rounded-md" />
165
150
  </div>
166
- </div>`}
167
- >
168
- <div className="space-y-4 w-full max-w-sm rounded-lg border border-border bg-card p-4">
169
- <Skeleton className="h-48 w-full rounded-md" />
170
- <div className="flex justify-between items-center pt-2">
171
- <div className="space-y-2">
172
- <Skeleton className="h-4 w-[150px]" />
173
- <Skeleton className="h-3 w-[100px]" />
174
- </div>
175
- <Skeleton className="h-8 w-16 rounded-md" />
176
- </div>
177
- </div>
178
- </ExampleSection>
151
+ </div>`} preview={
152
+ <>
153
+ <div className="space-y-4 w-full max-w-sm rounded-lg border border-border bg-card p-4">
154
+ <Skeleton className="h-48 w-full rounded-md" />
155
+ <div className="flex justify-between items-center pt-2">
156
+ <div className="space-y-2">
157
+ <Skeleton className="h-4 w-[150px]" />
158
+ <Skeleton className="h-3 w-[100px]" />
159
+ </div>
160
+ <Skeleton className="h-8 w-16 rounded-md" />
161
+ </div>
162
+ </div>
163
+ </>
164
+ } />
179
165
  </ExampleGrid>
180
166
  </div>
181
167
  );
182
168
  }
183
169
 
184
- // ──────────────────────────────────────────────────────────
185
- // SECTION 3: Entry point
186
- // ──────────────────────────────────────────────────────────
187
170
  export default function SkeletonShowcase() {
188
171
  return (
189
172
  <Showcase
190
173
  title="Skeleton"
191
174
  description="Thành phần tạo ra hiệu ứng nhấp nháy, mô phỏng bố cục hiển thị để giữ chỗ (placeholder) trong khi chờ dữ liệu đang tải."
192
- generalConcept={
175
+ guideline={
193
176
  <ShowcaseDocs>
194
177
  <DocsH3>Skeleton (Khung xương)</DocsH3>
195
178
  <DocsP>
@@ -200,9 +183,7 @@ export default function SkeletonShowcase() {
200
183
  </DocsP>
201
184
  </ShowcaseDocs>
202
185
  }
203
- tabs={[
204
- { label: "Micro (Primitive)", content: <SkeletonMicroShowcase /> },
205
- ]}
186
+ micro={{ content: <SkeletonMicroShowcase /> }}
206
187
  />
207
188
  );
208
189
  }