gladvn 0.2.19 → 0.2.20

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 (202) hide show
  1. package/bin/cli.js +15 -5
  2. package/dist/components/macro/accordion-preset.d.ts.map +1 -1
  3. package/dist/components/macro/alert-dialog-preset.d.ts.map +1 -1
  4. package/dist/components/macro/alert-preset.d.ts.map +1 -1
  5. package/dist/components/macro/avatar-preset.d.ts.map +1 -1
  6. package/dist/components/macro/breadcrumb-preset.d.ts.map +1 -1
  7. package/dist/components/macro/card-preset.d.ts.map +1 -1
  8. package/dist/components/macro/carousel-preset.d.ts.map +1 -1
  9. package/dist/components/macro/checkbox-preset.d.ts.map +1 -1
  10. package/dist/components/macro/combobox-preset.d.ts.map +1 -1
  11. package/dist/components/macro/command-preset.d.ts +1 -1
  12. package/dist/components/macro/command-preset.d.ts.map +1 -1
  13. package/dist/components/macro/date-picker.d.ts.map +1 -1
  14. package/dist/components/macro/dialog-preset.d.ts.map +1 -1
  15. package/dist/components/macro/empty-preset.d.ts +1 -1
  16. package/dist/components/macro/empty-preset.d.ts.map +1 -1
  17. package/dist/components/macro/field-preset.d.ts.map +1 -1
  18. package/dist/components/macro/input-otp-preset.d.ts.map +1 -1
  19. package/dist/components/macro/input-preset.d.ts.map +1 -1
  20. package/dist/components/macro/pagination-preset.d.ts.map +1 -1
  21. package/dist/components/macro/progress-preset.d.ts.map +1 -1
  22. package/dist/components/macro/radio-group-preset.d.ts.map +1 -1
  23. package/dist/components/macro/select-preset.d.ts.map +1 -1
  24. package/dist/components/macro/slider-preset.d.ts.map +1 -1
  25. package/dist/components/macro/switch-preset.d.ts.map +1 -1
  26. package/dist/components/macro/tabs-preset.d.ts.map +1 -1
  27. package/dist/components/micro/alert-dialog.d.ts +4 -4
  28. package/dist/components/micro/alert-dialog.d.ts.map +1 -1
  29. package/dist/components/micro/combobox.d.ts +4 -3
  30. package/dist/components/micro/combobox.d.ts.map +1 -1
  31. package/dist/components/micro/context-menu.d.ts +4 -6
  32. package/dist/components/micro/context-menu.d.ts.map +1 -1
  33. package/dist/components/micro/dialog.d.ts +4 -3
  34. package/dist/components/micro/dialog.d.ts.map +1 -1
  35. package/dist/components/micro/drawer.d.ts +4 -3
  36. package/dist/components/micro/drawer.d.ts.map +1 -1
  37. package/dist/components/micro/dropdown-menu.d.ts +7 -4
  38. package/dist/components/micro/dropdown-menu.d.ts.map +1 -1
  39. package/dist/components/micro/hover-card.d.ts +4 -3
  40. package/dist/components/micro/hover-card.d.ts.map +1 -1
  41. package/dist/components/micro/menubar.d.ts +2 -3
  42. package/dist/components/micro/menubar.d.ts.map +1 -1
  43. package/dist/components/micro/navigation-menu.d.ts +4 -3
  44. package/dist/components/micro/navigation-menu.d.ts.map +1 -1
  45. package/dist/components/micro/popover.d.ts +4 -3
  46. package/dist/components/micro/popover.d.ts.map +1 -1
  47. package/dist/components/micro/select.d.ts +4 -3
  48. package/dist/components/micro/select.d.ts.map +1 -1
  49. package/dist/components/micro/sheet.d.ts +3 -3
  50. package/dist/components/micro/sheet.d.ts.map +1 -1
  51. package/dist/components/micro/tooltip.d.ts +4 -3
  52. package/dist/components/micro/tooltip.d.ts.map +1 -1
  53. package/dist/dev/showcase/accordion.d.ts.map +1 -1
  54. package/dist/dev/showcase/alert-dialog.d.ts.map +1 -1
  55. package/dist/dev/showcase/alert.d.ts.map +1 -1
  56. package/dist/dev/showcase/aspect-ratio.d.ts.map +1 -1
  57. package/dist/dev/showcase/avatar.d.ts.map +1 -1
  58. package/dist/dev/showcase/badge.d.ts.map +1 -1
  59. package/dist/dev/showcase/breadcrumb.d.ts.map +1 -1
  60. package/dist/dev/showcase/button.d.ts.map +1 -1
  61. package/dist/dev/showcase/calendar.d.ts.map +1 -1
  62. package/dist/dev/showcase/card.d.ts.map +1 -1
  63. package/dist/dev/showcase/carousel.d.ts.map +1 -1
  64. package/dist/dev/showcase/chart.d.ts.map +1 -1
  65. package/dist/dev/showcase/checkbox.d.ts.map +1 -1
  66. package/dist/dev/showcase/collapsible.d.ts.map +1 -1
  67. package/dist/dev/showcase/combobox.d.ts.map +1 -1
  68. package/dist/dev/showcase/command.d.ts.map +1 -1
  69. package/dist/dev/showcase/context-menu.d.ts.map +1 -1
  70. package/dist/dev/showcase/dialog.d.ts.map +1 -1
  71. package/dist/dev/showcase/drawer.d.ts.map +1 -1
  72. package/dist/dev/showcase/dropdown-menu.d.ts.map +1 -1
  73. package/dist/dev/showcase/empty.d.ts.map +1 -1
  74. package/dist/dev/showcase/hover-card.d.ts.map +1 -1
  75. package/dist/dev/showcase/input-group.d.ts.map +1 -1
  76. package/dist/dev/showcase/input-otp.d.ts.map +1 -1
  77. package/dist/dev/showcase/input.d.ts.map +1 -1
  78. package/dist/dev/showcase/item.d.ts.map +1 -1
  79. package/dist/dev/showcase/kbd.d.ts.map +1 -1
  80. package/dist/dev/showcase/label.d.ts.map +1 -1
  81. package/dist/dev/showcase/menubar.d.ts.map +1 -1
  82. package/dist/dev/showcase/navigation-menu.d.ts.map +1 -1
  83. package/dist/dev/showcase/overview.d.ts.map +1 -1
  84. package/dist/dev/showcase/pagination.d.ts.map +1 -1
  85. package/dist/dev/showcase/popover.d.ts.map +1 -1
  86. package/dist/dev/showcase/progress.d.ts.map +1 -1
  87. package/dist/dev/showcase/radio-group.d.ts.map +1 -1
  88. package/dist/dev/showcase/resizable.d.ts.map +1 -1
  89. package/dist/dev/showcase/scroll-area.d.ts.map +1 -1
  90. package/dist/dev/showcase/select.d.ts.map +1 -1
  91. package/dist/dev/showcase/separator.d.ts.map +1 -1
  92. package/dist/dev/showcase/sheet.d.ts.map +1 -1
  93. package/dist/dev/showcase/sidebar.d.ts.map +1 -1
  94. package/dist/dev/showcase/skeleton.d.ts.map +1 -1
  95. package/dist/dev/showcase/slider.d.ts.map +1 -1
  96. package/dist/dev/showcase/sonner.d.ts.map +1 -1
  97. package/dist/dev/showcase/spinner.d.ts.map +1 -1
  98. package/dist/dev/showcase/switch.d.ts.map +1 -1
  99. package/dist/dev/showcase/table.d.ts.map +1 -1
  100. package/dist/dev/showcase/tabs.d.ts.map +1 -1
  101. package/dist/dev/showcase/textarea.d.ts.map +1 -1
  102. package/dist/dev/showcase/theme-provider.d.ts.map +1 -1
  103. package/dist/dev/showcase/toast.d.ts.map +1 -1
  104. package/dist/dev/showcase/toggle-group.d.ts.map +1 -1
  105. package/dist/dev/showcase/toggle.d.ts.map +1 -1
  106. package/dist/dev/showcase/tooltip.d.ts.map +1 -1
  107. package/dist/index.cjs +256 -256
  108. package/dist/index.cjs.map +1 -1
  109. package/dist/index.js +257 -244
  110. package/dist/index.js.map +1 -1
  111. package/package.json +1 -1
  112. package/src/components/macro/accordion-preset.test.tsx +1 -2
  113. package/src/components/macro/accordion-preset.tsx +1 -2
  114. package/src/components/macro/alert-dialog-preset.tsx +7 -12
  115. package/src/components/macro/alert-preset.tsx +1 -2
  116. package/src/components/macro/avatar-preset.tsx +2 -4
  117. package/src/components/macro/breadcrumb-preset.tsx +1 -2
  118. package/src/components/macro/card-preset.tsx +1 -2
  119. package/src/components/macro/carousel-preset.tsx +1 -2
  120. package/src/components/macro/checkbox-preset.tsx +1 -2
  121. package/src/components/macro/combobox-preset.tsx +8 -14
  122. package/src/components/macro/command-preset.tsx +18 -24
  123. package/src/components/macro/date-picker.tsx +14 -23
  124. package/src/components/macro/dialog-preset.tsx +45 -49
  125. package/src/components/macro/empty-preset.tsx +2 -4
  126. package/src/components/macro/field-preset.tsx +1 -2
  127. package/src/components/macro/input-otp-preset.tsx +1 -2
  128. package/src/components/macro/input-preset.tsx +1 -2
  129. package/src/components/macro/pagination-preset.tsx +3 -6
  130. package/src/components/macro/progress-preset.tsx +1 -2
  131. package/src/components/macro/radio-group-preset.tsx +2 -4
  132. package/src/components/macro/select-preset.tsx +7 -12
  133. package/src/components/macro/slider-preset.tsx +1 -2
  134. package/src/components/macro/switch-preset.tsx +1 -2
  135. package/src/components/macro/tabs-preset.tsx +1 -2
  136. package/src/components/micro/alert-dialog.tsx +16 -14
  137. package/src/components/micro/combobox.tsx +28 -22
  138. package/src/components/micro/context-menu.tsx +52 -36
  139. package/src/components/micro/dialog.tsx +23 -19
  140. package/src/components/micro/drawer.tsx +23 -19
  141. package/src/components/micro/dropdown-menu.tsx +23 -18
  142. package/src/components/micro/hover-card.tsx +31 -23
  143. package/src/components/micro/menubar.tsx +0 -8
  144. package/src/components/micro/navigation-menu.tsx +26 -19
  145. package/src/components/micro/popover.tsx +31 -25
  146. package/src/components/micro/select.tsx +36 -29
  147. package/src/components/micro/sheet.tsx +36 -31
  148. package/src/components/micro/tooltip.tsx +28 -23
  149. package/src/dev/showcase/accordion.tsx +47 -94
  150. package/src/dev/showcase/alert-dialog.tsx +27 -39
  151. package/src/dev/showcase/alert.tsx +5 -10
  152. package/src/dev/showcase/aspect-ratio.tsx +1 -2
  153. package/src/dev/showcase/avatar.tsx +5 -10
  154. package/src/dev/showcase/badge.tsx +2 -4
  155. package/src/dev/showcase/breadcrumb.tsx +8 -11
  156. package/src/dev/showcase/button.tsx +2 -4
  157. package/src/dev/showcase/calendar.tsx +5 -10
  158. package/src/dev/showcase/card.tsx +4 -8
  159. package/src/dev/showcase/carousel.tsx +40 -80
  160. package/src/dev/showcase/chart.tsx +7 -16
  161. package/src/dev/showcase/checkbox.tsx +7 -14
  162. package/src/dev/showcase/collapsible.tsx +3 -6
  163. package/src/dev/showcase/combobox.tsx +27 -43
  164. package/src/dev/showcase/command.tsx +4 -8
  165. package/src/dev/showcase/context-menu.tsx +13 -19
  166. package/src/dev/showcase/dialog.tsx +19 -33
  167. package/src/dev/showcase/drawer.tsx +19 -27
  168. package/src/dev/showcase/dropdown-menu.tsx +19 -29
  169. package/src/dev/showcase/empty.tsx +3 -6
  170. package/src/dev/showcase/hover-card.tsx +24 -36
  171. package/src/dev/showcase/input-group.tsx +4 -8
  172. package/src/dev/showcase/input-otp.tsx +5 -10
  173. package/src/dev/showcase/input.tsx +5 -10
  174. package/src/dev/showcase/item.tsx +3 -6
  175. package/src/dev/showcase/kbd.tsx +12 -16
  176. package/src/dev/showcase/label.tsx +2 -4
  177. package/src/dev/showcase/menubar.tsx +17 -19
  178. package/src/dev/showcase/navigation-menu.tsx +12 -15
  179. package/src/dev/showcase/overview.tsx +14 -27
  180. package/src/dev/showcase/pagination.tsx +4 -8
  181. package/src/dev/showcase/popover.tsx +21 -27
  182. package/src/dev/showcase/progress.tsx +4 -8
  183. package/src/dev/showcase/radio-group.tsx +8 -16
  184. package/src/dev/showcase/resizable.tsx +2 -4
  185. package/src/dev/showcase/scroll-area.tsx +1 -2
  186. package/src/dev/showcase/select.tsx +27 -39
  187. package/src/dev/showcase/separator.tsx +1 -2
  188. package/src/dev/showcase/sheet.tsx +22 -33
  189. package/src/dev/showcase/sidebar.tsx +2 -4
  190. package/src/dev/showcase/skeleton.tsx +1 -2
  191. package/src/dev/showcase/slider.tsx +5 -10
  192. package/src/dev/showcase/sonner.tsx +18 -38
  193. package/src/dev/showcase/spinner.tsx +2 -4
  194. package/src/dev/showcase/switch.tsx +6 -12
  195. package/src/dev/showcase/table.tsx +3 -6
  196. package/src/dev/showcase/tabs.tsx +20 -40
  197. package/src/dev/showcase/textarea.tsx +5 -10
  198. package/src/dev/showcase/theme-provider.tsx +384 -545
  199. package/src/dev/showcase/toast.tsx +4 -10
  200. package/src/dev/showcase/toggle-group.tsx +4 -8
  201. package/src/dev/showcase/toggle.tsx +2 -4
  202. package/src/dev/showcase/tooltip.tsx +34 -43
@@ -6,17 +6,15 @@ import {
6
6
  NavigationMenuItem,
7
7
  NavigationMenuLink,
8
8
  NavigationMenuList,
9
- NavigationMenuPortal,
9
+
10
10
  NavigationMenuPositioner,
11
11
  NavigationMenuTrigger,
12
- navigationMenuTriggerStyle,
13
- } from "../../components/micro/navigation-menu";
12
+ navigationMenuTriggerStyle } from "../../components/micro/navigation-menu";
14
13
  import {
15
14
  DocsP,
16
15
  ExampleSection,
17
16
  Showcase,
18
- ShowcaseDocs,
19
- } from "../../dev/components/showcase";
17
+ ShowcaseDocs } from "../../dev/components/showcase";
20
18
  import { cn } from "../../lib/utils";
21
19
 
22
20
  const ListItem = React.forwardRef<
@@ -147,9 +145,9 @@ function NavigationMenuMicroShowcase() {
147
145
  </NavigationMenuLink>
148
146
  </NavigationMenuItem>
149
147
  </NavigationMenuList>
150
- <NavigationMenuPortal>
148
+
151
149
  <NavigationMenuPositioner />
152
- </NavigationMenuPortal>
150
+
153
151
  </NavigationMenu>`}
154
152
  >
155
153
  <NavigationMenu>
@@ -233,9 +231,9 @@ function NavigationMenuMicroShowcase() {
233
231
  </NavigationMenuLink>
234
232
  </NavigationMenuItem>
235
233
  </NavigationMenuList>
236
- <NavigationMenuPortal>
234
+
237
235
  <NavigationMenuPositioner />
238
- </NavigationMenuPortal>
236
+
239
237
  </NavigationMenu>
240
238
  </ExampleSection>
241
239
 
@@ -255,9 +253,9 @@ function NavigationMenuMicroShowcase() {
255
253
  </NavigationMenuContent>
256
254
  </NavigationMenuItem>
257
255
  </NavigationMenuList>
258
- <NavigationMenuPortal>
256
+
259
257
  <NavigationMenuPositioner />
260
- </NavigationMenuPortal>
258
+
261
259
  </NavigationMenu>`}
262
260
  >
263
261
  <NavigationMenu>
@@ -272,9 +270,9 @@ function NavigationMenuMicroShowcase() {
272
270
  </NavigationMenuContent>
273
271
  </NavigationMenuItem>
274
272
  </NavigationMenuList>
275
- <NavigationMenuPortal>
273
+
276
274
  <NavigationMenuPositioner />
277
- </NavigationMenuPortal>
275
+
278
276
  </NavigationMenu>
279
277
  </ExampleSection>
280
278
  </div>
@@ -301,8 +299,7 @@ export default function NavigationMenuShowcase() {
301
299
  tabs={[
302
300
  {
303
301
  label: "Micro (Primitive)",
304
- content: <NavigationMenuMicroShowcase />,
305
- },
302
+ content: <NavigationMenuMicroShowcase /> },
306
303
  ]}
307
304
  />
308
305
  );
@@ -15,32 +15,28 @@ import {
15
15
  PaletteIcon,
16
16
  ShieldCheckIcon,
17
17
  SlidersHorizontalIcon,
18
- SparklesIcon,
19
- } from "lucide-react";
18
+ SparklesIcon } from "lucide-react";
20
19
  import { toast } from "sonner";
21
20
 
22
21
  import { ProgressPreset as Progress } from "../../components/macro/progress-preset";
23
22
  import {
24
23
  Avatar,
25
24
  AvatarFallback,
26
- AvatarImage,
27
- } from "../../components/micro/avatar";
25
+ AvatarImage } from "../../components/micro/avatar";
28
26
  import { Button } from "../../components/micro/button";
29
27
  import {
30
28
  Card,
31
29
  CardContent,
32
30
  CardHeader,
33
- CardTitle,
34
- } from "../../components/micro/card";
31
+ CardTitle } from "../../components/micro/card";
35
32
  import { Label } from "../../components/micro/label";
36
33
  import {
37
34
  Select,
38
35
  SelectContent,
39
36
  SelectItem,
40
- SelectPortal,
37
+
41
38
  SelectTrigger,
42
- SelectValue,
43
- } from "../../components/micro/select";
39
+ SelectValue } from "../../components/micro/select";
44
40
  import { Switch } from "../../components/micro/switch";
45
41
  import { ColorSwatch } from "../../dev/components/showcase";
46
42
  import { COLORS, STATS } from "../../dev/data";
@@ -49,8 +45,7 @@ import { cn } from "../../lib/utils";
49
45
  function CodeBlock({
50
46
  type,
51
47
  title,
52
- children,
53
- }: {
48
+ children }: {
54
49
  type: "success" | "destructive";
55
50
  title: string;
56
51
  children: React.ReactNode;
@@ -218,7 +213,7 @@ export default function OverviewSection() {
218
213
  <SelectTrigger className="w-full bg-background/50">
219
214
  <SelectValue placeholder="Chọn vùng" />
220
215
  </SelectTrigger>
221
- <SelectPortal>
216
+
222
217
  <SelectContent>
223
218
  <SelectItem value="edge">
224
219
  Edge Network (Toàn cầu)
@@ -230,7 +225,7 @@ export default function OverviewSection() {
230
225
  AP South East (Sing)
231
226
  </SelectItem>
232
227
  </SelectContent>
233
- </SelectPortal>
228
+
234
229
  </Select>
235
230
  </div>
236
231
  </div>
@@ -956,20 +951,14 @@ export default function OverviewSection() {
956
951
  </h3>
957
952
  <p className="text-muted-foreground text-xl leading-relaxed">
958
953
  Dark section bên trong Light app? Dễ. Nhưng khi Tooltip hay Dialog
959
- render qua Portal — chúng thoát khỏi DOM tree và{" "}
954
+ render nổi qua chế Portaling — chúng thoát khỏi DOM tree hiện tại và{" "}
960
955
  <strong className="text-foreground">mất theme</strong>. Hầu hết
961
956
  thư viện bỏ cuộc ở đây.
962
957
  </p>
963
958
  <p className="text-muted-foreground text-xl leading-relaxed">
964
- gladvn dùng{" "}
965
- <code className="text-sm bg-warning/20 text-warning px-1.5 py-0.5 rounded">
966
- {"<ThemeWrapper>"}
967
- </code>{" "}
968
- để tunnel theme xuyên qua Portal boundary.{" "}
969
- <strong className="text-foreground">
970
- Dialog, Tooltip, Select... luôn đúng màu, dù render ở đâu trong
971
- DOM.
972
- </strong>
959
+ Nhưng hiện tại thư viện đã áp dụng <strong>Zero-Portal API</strong> (kể từ v0.2.20).
960
+ Bạn không cần phải import <code className="text-sm bg-warning/20 text-warning px-1.5 py-0.5 rounded">ThemeWrapper</code> hay <code className="text-sm bg-warning/20 text-warning px-1.5 py-0.5 rounded">*Portal</code> nữa.
961
+ Toàn bộ logic portaling và ThemeWrapper đã được nhúng sẵn vào trong các <code className="text-sm bg-warning/20 text-warning px-1.5 py-0.5 rounded">*Content</code> components (VD: <code className="text-sm bg-warning/20 text-warning px-1.5 py-0.5 rounded">DialogContent</code>, <code className="text-sm bg-warning/20 text-warning px-1.5 py-0.5 rounded">TooltipContent</code>).
973
962
  </p>
974
963
  </div>
975
964
 
@@ -1033,8 +1022,7 @@ export default function OverviewSection() {
1033
1022
  className="animate-fade-up"
1034
1023
  style={{
1035
1024
  animationDelay: `${i * 50}ms`,
1036
- animationFillMode: "both",
1037
- }}
1025
+ animationFillMode: "both" }}
1038
1026
  >
1039
1027
  <ColorSwatch color={c} />
1040
1028
  </div>
@@ -1058,8 +1046,7 @@ export default function OverviewSection() {
1058
1046
  name: "Ý Le",
1059
1047
  role: "Creator & Maintainer",
1060
1048
  avatar: "https://github.com/duongacy.png",
1061
- url: "https://github.com/duongacy",
1062
- },
1049
+ url: "https://github.com/duongacy" },
1063
1050
  ].map((user) => (
1064
1051
  <a
1065
1052
  key={user.name}
@@ -8,8 +8,7 @@ import {
8
8
  PaginationItem,
9
9
  PaginationLink,
10
10
  PaginationNext,
11
- PaginationPrevious,
12
- } from "../../components/micro/pagination";
11
+ PaginationPrevious } from "../../components/micro/pagination";
13
12
  import { useDevContext } from "../../dev/components/dev-context";
14
13
  import {
15
14
  DocsCode,
@@ -18,8 +17,7 @@ import {
18
17
  ExampleGrid,
19
18
  ExampleSection,
20
19
  Showcase,
21
- ShowcaseDocs,
22
- } from "../../dev/components/showcase";
20
+ ShowcaseDocs } from "../../dev/components/showcase";
23
21
  import { type Size } from "../../lib/types";
24
22
 
25
23
  // ──────────────────────────────────────────────────────────
@@ -332,12 +330,10 @@ export default function PaginationShowcase() {
332
330
  tabs={[
333
331
  {
334
332
  label: "Micro (Primitive)",
335
- content: <PaginationMicroShowcase globalSize={globalSize} />,
336
- },
333
+ content: <PaginationMicroShowcase globalSize={globalSize} /> },
337
334
  {
338
335
  label: "Macro (Preset)",
339
- content: <PaginationMacroShowcase globalSize={globalSize} />,
340
- },
336
+ content: <PaginationMacroShowcase globalSize={globalSize} /> },
341
337
  ]}
342
338
  />
343
339
  );
@@ -10,18 +10,16 @@ import {
10
10
  PopoverContent,
11
11
  PopoverDescription,
12
12
  PopoverHeader,
13
- PopoverPortal,
13
+
14
14
  PopoverTitle,
15
- PopoverTrigger,
16
- } from "../../components/micro/popover";
15
+ PopoverTrigger } from "../../components/micro/popover";
17
16
  import { useDevContext } from "../../dev/components/dev-context";
18
17
  import {
19
18
  DocsP,
20
19
  ExampleGrid,
21
20
  ExampleSection,
22
21
  Showcase,
23
- ShowcaseDocs,
24
- } from "../../dev/components/showcase";
22
+ ShowcaseDocs } from "../../dev/components/showcase";
25
23
  import { type Size } from "../../lib/types";
26
24
 
27
25
  // ──────────────────────────────────────────────────────────
@@ -44,7 +42,7 @@ function PopoverMicroShowcase({ globalSize }: { globalSize: Size }) {
44
42
  </Button>
45
43
  }
46
44
  />
47
- <PopoverPortal><PopoverContent className="w-80" sideOffset={8}>
45
+ <PopoverContent className="w-80" sideOffset={8}>
48
46
  <PopoverHeader>
49
47
  <PopoverTitle>Dimensions</PopoverTitle>
50
48
  <PopoverDescription>
@@ -69,7 +67,7 @@ function PopoverMicroShowcase({ globalSize }: { globalSize: Size }) {
69
67
  />
70
68
  </div>
71
69
  </div>
72
- </PopoverContent></PopoverPortal>
70
+ </PopoverContent>
73
71
  </Popover>
74
72
  `}
75
73
  >
@@ -82,7 +80,6 @@ function PopoverMicroShowcase({ globalSize }: { globalSize: Size }) {
82
80
  }
83
81
  />
84
82
 
85
- <PopoverPortal>
86
83
  <PopoverContent className="w-80" sideOffset={8}>
87
84
  <PopoverHeader>
88
85
  <PopoverTitle>Dimensions</PopoverTitle>
@@ -109,7 +106,7 @@ function PopoverMicroShowcase({ globalSize }: { globalSize: Size }) {
109
106
  </div>
110
107
  </div>
111
108
  </PopoverContent>
112
- </PopoverPortal>
109
+
113
110
  </Popover>
114
111
  </ExampleSection>
115
112
 
@@ -130,7 +127,7 @@ function PopoverMicroShowcase({ globalSize }: { globalSize: Size }) {
130
127
  </Button>
131
128
  }
132
129
  />
133
- <PopoverPortal>
130
+
134
131
  <PopoverContent
135
132
  className="w-64"
136
133
  sideOffset={8}
@@ -143,7 +140,7 @@ function PopoverMicroShowcase({ globalSize }: { globalSize: Size }) {
143
140
  </PopoverDescription>
144
141
  </PopoverHeader>
145
142
  </PopoverContent>
146
- </PopoverPortal>
143
+
147
144
  </Popover>
148
145
 
149
146
  <Popover>
@@ -154,7 +151,7 @@ function PopoverMicroShowcase({ globalSize }: { globalSize: Size }) {
154
151
  </Button>
155
152
  }
156
153
  />
157
- <PopoverPortal>
154
+
158
155
  <PopoverContent className="w-56" sideOffset={8}>
159
156
  <PopoverHeader>
160
157
  <PopoverTitle>Cài đặt nhanh</PopoverTitle>
@@ -180,7 +177,7 @@ function PopoverMicroShowcase({ globalSize }: { globalSize: Size }) {
180
177
  </Button>
181
178
  </div>
182
179
  </PopoverContent>
183
- </PopoverPortal>
180
+
184
181
  </Popover>
185
182
  </div>`}
186
183
  >
@@ -199,7 +196,6 @@ function PopoverMicroShowcase({ globalSize }: { globalSize: Size }) {
199
196
  }
200
197
  />
201
198
 
202
- <PopoverPortal>
203
199
  <PopoverContent className="w-64" sideOffset={8} align="start">
204
200
  <PopoverHeader>
205
201
  <PopoverTitle>Thông báo</PopoverTitle>
@@ -208,7 +204,7 @@ function PopoverMicroShowcase({ globalSize }: { globalSize: Size }) {
208
204
  </PopoverDescription>
209
205
  </PopoverHeader>
210
206
  </PopoverContent>
211
- </PopoverPortal>
207
+
212
208
  </Popover>
213
209
 
214
210
  <Popover>
@@ -220,7 +216,6 @@ function PopoverMicroShowcase({ globalSize }: { globalSize: Size }) {
220
216
  }
221
217
  />
222
218
 
223
- <PopoverPortal>
224
219
  <PopoverContent className="w-56" sideOffset={8}>
225
220
  <PopoverHeader>
226
221
  <PopoverTitle>Cài đặt nhanh</PopoverTitle>
@@ -240,7 +235,7 @@ function PopoverMicroShowcase({ globalSize }: { globalSize: Size }) {
240
235
  </Button>
241
236
  </div>
242
237
  </PopoverContent>
243
- </PopoverPortal>
238
+
244
239
  </Popover>
245
240
  </div>
246
241
  </ExampleSection>
@@ -253,7 +248,7 @@ function PopoverMicroShowcase({ globalSize }: { globalSize: Size }) {
253
248
  <PopoverTrigger asChild>
254
249
  <Button variant="outline">top</Button>
255
250
  </PopoverTrigger>
256
- <PopoverPortal>
251
+
257
252
  <PopoverContent
258
253
  side="top"
259
254
  sideOffset={8}
@@ -261,7 +256,7 @@ function PopoverMicroShowcase({ globalSize }: { globalSize: Size }) {
261
256
  >
262
257
  Hiển thị ở phía <strong>top</strong>
263
258
  </PopoverContent>
264
- </PopoverPortal>
259
+
265
260
  </Popover>`}
266
261
  >
267
262
  <div className="flex flex-wrap items-center justify-center gap-4 py-8">
@@ -278,7 +273,7 @@ function PopoverMicroShowcase({ globalSize }: { globalSize: Size }) {
278
273
  </Button>
279
274
  }
280
275
  />
281
- <PopoverPortal>
276
+
282
277
  <PopoverContent
283
278
  side={side}
284
279
  sideOffset={8}
@@ -286,7 +281,7 @@ function PopoverMicroShowcase({ globalSize }: { globalSize: Size }) {
286
281
  >
287
282
  Hiển thị ở phía <strong className="capitalize">{side}</strong>
288
283
  </PopoverContent>
289
- </PopoverPortal>
284
+
290
285
  </Popover>
291
286
  ))}
292
287
  </div>
@@ -302,7 +297,7 @@ function PopoverMicroShowcase({ globalSize }: { globalSize: Size }) {
302
297
  Toggle Controlled Popover
303
298
  </Button>
304
299
  </PopoverTrigger>
305
- <PopoverPortal>
300
+
306
301
  <PopoverContent className="w-80" sideOffset={8}>
307
302
  <PopoverHeader>
308
303
  <PopoverTitle>Controlled Mode</PopoverTitle>
@@ -321,7 +316,7 @@ function PopoverMicroShowcase({ globalSize }: { globalSize: Size }) {
321
316
  </Button>
322
317
  </div>
323
318
  </PopoverContent>
324
- </PopoverPortal>
319
+
325
320
  </Popover>
326
321
  )`}
327
322
  >
@@ -334,7 +329,7 @@ function PopoverMicroShowcase({ globalSize }: { globalSize: Size }) {
334
329
  </Button>
335
330
  }
336
331
  />
337
- <PopoverPortal>
332
+
338
333
  <PopoverContent className="w-80" sideOffset={8}>
339
334
  <PopoverHeader>
340
335
  <PopoverTitle>Controlled Mode</PopoverTitle>
@@ -353,7 +348,7 @@ function PopoverMicroShowcase({ globalSize }: { globalSize: Size }) {
353
348
  </Button>
354
349
  </div>
355
350
  </PopoverContent>
356
- </PopoverPortal>
351
+
357
352
  </Popover>
358
353
 
359
354
  <div className="text-sm text-muted-foreground">
@@ -393,8 +388,7 @@ export default function PopoverShowcase() {
393
388
  tabs={[
394
389
  {
395
390
  label: "Micro (Primitive)",
396
- content: <PopoverMicroShowcase globalSize={globalSize} />,
397
- },
391
+ content: <PopoverMicroShowcase globalSize={globalSize} /> },
398
392
  ]}
399
393
  />
400
394
  );
@@ -4,8 +4,7 @@ import {
4
4
  ProgressIndicator,
5
5
  ProgressLabel,
6
6
  ProgressTrack,
7
- ProgressValue,
8
- } from "../../components/micro/progress";
7
+ ProgressValue } from "../../components/micro/progress";
9
8
  import { useDevContext } from "../../dev/components/dev-context";
10
9
  import {
11
10
  DocsCode,
@@ -14,8 +13,7 @@ import {
14
13
  ExampleGrid,
15
14
  ExampleSection,
16
15
  Showcase,
17
- ShowcaseDocs,
18
- } from "../../dev/components/showcase";
16
+ ShowcaseDocs } from "../../dev/components/showcase";
19
17
  import { type Size } from "../../lib/types";
20
18
 
21
19
  // ──────────────────────────────────────────────────────────
@@ -317,12 +315,10 @@ export default function ProgressShowcase() {
317
315
  tabs={[
318
316
  {
319
317
  label: "Micro (Primitive)",
320
- content: <ProgressMicroShowcase globalSize={globalSize} />,
321
- },
318
+ content: <ProgressMicroShowcase globalSize={globalSize} /> },
322
319
  {
323
320
  label: "Macro (Preset)",
324
- content: <ProgressMacroShowcase globalSize={globalSize} />,
325
- },
321
+ content: <ProgressMacroShowcase globalSize={globalSize} /> },
326
322
  ]}
327
323
  />
328
324
  );
@@ -15,23 +15,20 @@ import {
15
15
  ExampleGrid,
16
16
  ExampleSection,
17
17
  Showcase,
18
- ShowcaseDocs,
19
- } from "../../dev/components/showcase";
18
+ ShowcaseDocs } from "../../dev/components/showcase";
20
19
  import { type Size } from "../../lib/types";
21
20
 
22
21
  // ──────────────────────────────────────────────────────────
23
22
  // RHF Form Demo (Macro)
24
23
  // ──────────────────────────────────────────────────────────
25
24
  const formSchema = z.object({
26
- notify: z.string().min(1, "Vui lòng chọn phương thức thông báo."),
27
- });
25
+ notify: z.string().min(1, "Vui lòng chọn phương thức thông báo.") });
28
26
  type FormValues = z.infer<typeof formSchema>;
29
27
 
30
28
  function RadioGroupForm({ size }: { size: Size }) {
31
29
  const form = useForm<FormValues>({
32
30
  resolver: zodResolver(formSchema),
33
- defaultValues: { notify: "" },
34
- });
31
+ defaultValues: { notify: "" } });
35
32
 
36
33
  return (
37
34
  <form
@@ -69,8 +66,7 @@ const rhfCode = `const formSchema = z.object({ notify: z.string().min(1, "Bắt
69
66
  function RadioGroupForm({ size }: { size: Size }) {
70
67
  const form = useForm({
71
68
  resolver: zodResolver(formSchema),
72
- defaultValues: { notify: "" },
73
- });
69
+ defaultValues: { notify: "" } });
74
70
 
75
71
  return (
76
72
  <form onSubmit={form.handleSubmit(console.log)} className="space-y-6">
@@ -174,8 +170,7 @@ function RadioGroupMacroShowcase({ globalSize }: { globalSize: Size }) {
174
170
  {
175
171
  value: "system",
176
172
  label: "Theo hệ thống",
177
- description: "Khuyên dùng để tiết kiệm pin",
178
- },
173
+ description: "Khuyên dùng để tiết kiệm pin" },
179
174
  ]}
180
175
  defaultValue="system"
181
176
  />`}
@@ -191,8 +186,7 @@ function RadioGroupMacroShowcase({ globalSize }: { globalSize: Size }) {
191
186
  {
192
187
  value: "system",
193
188
  label: "Theo hệ thống",
194
- description: "Khuyên dùng để tiết kiệm pin",
195
- },
189
+ description: "Khuyên dùng để tiết kiệm pin" },
196
190
  ]}
197
191
  defaultValue="system"
198
192
  />
@@ -683,12 +677,10 @@ export default function RadioGroupShowcase() {
683
677
  tabs={[
684
678
  {
685
679
  label: "Micro (Primitive)",
686
- content: <RadioGroupMicroShowcase globalSize={globalSize} />,
687
- },
680
+ content: <RadioGroupMicroShowcase globalSize={globalSize} /> },
688
681
  {
689
682
  label: "Macro (Preset)",
690
- content: <RadioGroupMacroShowcase globalSize={globalSize} />,
691
- },
683
+ content: <RadioGroupMacroShowcase globalSize={globalSize} /> },
692
684
  ]}
693
685
  />
694
686
  );
@@ -1,16 +1,14 @@
1
1
  import {
2
2
  ResizableHandle,
3
3
  ResizablePanel,
4
- ResizablePanelGroup,
5
- } from "../../components/micro/resizable";
4
+ ResizablePanelGroup } from "../../components/micro/resizable";
6
5
  import {
7
6
  DocsCode,
8
7
  DocsP,
9
8
  ExampleGrid,
10
9
  ExampleSection,
11
10
  Showcase,
12
- ShowcaseDocs,
13
- } from "../../dev/components/showcase";
11
+ ShowcaseDocs } from "../../dev/components/showcase";
14
12
 
15
13
  // ──────────────────────────────────────────────────────────
16
14
  // SECTION 1: Micro Content
@@ -6,8 +6,7 @@ import {
6
6
  ExampleGrid,
7
7
  ExampleSection,
8
8
  Showcase,
9
- ShowcaseDocs,
10
- } from "../../dev/components/showcase";
9
+ ShowcaseDocs } from "../../dev/components/showcase";
11
10
 
12
11
  // ──────────────────────────────────────────────────────────
13
12
  // SECTION 1: Explicit Sub-components for Demo