@gv-tech/design-system 2.5.0 → 2.5.2

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 (440) hide show
  1. package/CHANGELOG.md +15 -0
  2. package/package.json +5 -2
  3. package/.agent/skills/dogfood-components/SKILL.md +0 -34
  4. package/.agent/skills/maintain-component/SKILL.md +0 -77
  5. package/.agent/workflows/native-playground.md +0 -93
  6. package/.github/CODEOWNERS +0 -2
  7. package/.github/CONTRIBUTING.md +0 -42
  8. package/.github/FUNDING.yml +0 -4
  9. package/.github/PULL_REQUEST_TEMPLATE/build.md +0 -5
  10. package/.github/PULL_REQUEST_TEMPLATE/standard.md +0 -3
  11. package/.github/RELEASING.md +0 -37
  12. package/.github/copilot-instructions.md +0 -61
  13. package/.github/workflows/ci.yml +0 -91
  14. package/.github/workflows/codeql-analysis.yml +0 -34
  15. package/.github/workflows/release-please.yml +0 -79
  16. package/.husky/pre-commit +0 -1
  17. package/.prettierignore +0 -3
  18. package/.release-please-manifest.json +0 -9
  19. package/.tool-versions +0 -1
  20. package/.vscode/launch.json +0 -22
  21. package/.vscode/mcp.json +0 -8
  22. package/.vscode/settings.json +0 -30
  23. package/.yarnrc.yml +0 -7
  24. package/SECURITY.md +0 -9
  25. package/apps/.gitkeep +0 -0
  26. package/apps/native-playground/CHANGELOG.md +0 -8
  27. package/apps/native-playground/app.json +0 -37
  28. package/apps/native-playground/assets/fonts/.gitkeep +0 -0
  29. package/apps/native-playground/assets/images/adaptive-icon.png +0 -0
  30. package/apps/native-playground/assets/images/favicon.png +0 -0
  31. package/apps/native-playground/assets/images/icon.png +0 -0
  32. package/apps/native-playground/assets/images/splash-icon.png +0 -0
  33. package/apps/native-playground/babel.config.js +0 -6
  34. package/apps/native-playground/eas.json +0 -25
  35. package/apps/native-playground/index.js +0 -8
  36. package/apps/native-playground/metro.config.js +0 -26
  37. package/apps/native-playground/nativewind-env.d.ts +0 -1
  38. package/apps/native-playground/package.json +0 -23
  39. package/apps/native-playground/project.json +0 -15
  40. package/apps/native-playground/src/app/App.tsx +0 -842
  41. package/apps/native-playground/src/global.css +0 -49
  42. package/apps/native-playground/tailwind.config.js +0 -49
  43. package/apps/native-playground/tsconfig.app.json +0 -24
  44. package/apps/native-playground/tsconfig.json +0 -23
  45. package/apps/native-playground/tsconfig.spec.json +0 -24
  46. package/apps/playground-web/CHANGELOG.md +0 -8
  47. package/apps/playground-web/index.html +0 -13
  48. package/apps/playground-web/package.json +0 -31
  49. package/apps/playground-web/public/favicon.png +0 -0
  50. package/apps/playground-web/public/index.demo.html +0 -40
  51. package/apps/playground-web/public/logo192.png +0 -0
  52. package/apps/playground-web/public/logo512.png +0 -0
  53. package/apps/playground-web/public/manifest.json +0 -25
  54. package/apps/playground-web/public/robots.txt +0 -2
  55. package/apps/playground-web/src/App.tsx +0 -179
  56. package/apps/playground-web/src/components/docs/CodeBlock.tsx +0 -34
  57. package/apps/playground-web/src/components/docs/CombinedDocsLayout.tsx +0 -103
  58. package/apps/playground-web/src/components/docs/ComponentShowcase.tsx +0 -96
  59. package/apps/playground-web/src/components/docs/ErrorBoundary.tsx +0 -55
  60. package/apps/playground-web/src/components/docs/Footer.tsx +0 -146
  61. package/apps/playground-web/src/components/docs/PropsTable.tsx +0 -43
  62. package/apps/playground-web/src/components/docs/Search.tsx +0 -75
  63. package/apps/playground-web/src/components/docs/Sidebar.tsx +0 -77
  64. package/apps/playground-web/src/components/docs/ThemeToggle.tsx +0 -19
  65. package/apps/playground-web/src/components/docs/index.ts +0 -9
  66. package/apps/playground-web/src/config/docs.ts +0 -293
  67. package/apps/playground-web/src/globals.css +0 -148
  68. package/apps/playground-web/src/hooks/useDocMetadata.ts +0 -34
  69. package/apps/playground-web/src/hooks/usePackageManager.tsx +0 -42
  70. package/apps/playground-web/src/lib/react-native-shim.js +0 -34
  71. package/apps/playground-web/src/main.tsx +0 -11
  72. package/apps/playground-web/src/pages/index.ts +0 -4
  73. package/apps/playground-web/src/pages/native/AccordionDocs.tsx +0 -85
  74. package/apps/playground-web/src/pages/native/AlertDialogDocs.tsx +0 -128
  75. package/apps/playground-web/src/pages/native/AlertDocs.tsx +0 -89
  76. package/apps/playground-web/src/pages/native/AspectRatioDocs.tsx +0 -52
  77. package/apps/playground-web/src/pages/native/AvatarDocs.tsx +0 -92
  78. package/apps/playground-web/src/pages/native/BadgeDocs.tsx +0 -63
  79. package/apps/playground-web/src/pages/native/BreadcrumbDocs.tsx +0 -71
  80. package/apps/playground-web/src/pages/native/ButtonDocs.tsx +0 -103
  81. package/apps/playground-web/src/pages/native/CalendarDocs.tsx +0 -74
  82. package/apps/playground-web/src/pages/native/CardDocs.tsx +0 -75
  83. package/apps/playground-web/src/pages/native/CarouselDocs.tsx +0 -113
  84. package/apps/playground-web/src/pages/native/ChartDocs.tsx +0 -115
  85. package/apps/playground-web/src/pages/native/CheckboxDocs.tsx +0 -38
  86. package/apps/playground-web/src/pages/native/CollapsibleDocs.tsx +0 -89
  87. package/apps/playground-web/src/pages/native/CommandDocs.tsx +0 -170
  88. package/apps/playground-web/src/pages/native/ContextMenuDocs.tsx +0 -121
  89. package/apps/playground-web/src/pages/native/DialogDocs.tsx +0 -132
  90. package/apps/playground-web/src/pages/native/DrawerDocs.tsx +0 -158
  91. package/apps/playground-web/src/pages/native/DropdownMenuDocs.tsx +0 -168
  92. package/apps/playground-web/src/pages/native/HoverCardDocs.tsx +0 -119
  93. package/apps/playground-web/src/pages/native/InputDocs.tsx +0 -86
  94. package/apps/playground-web/src/pages/native/LabelDocs.tsx +0 -55
  95. package/apps/playground-web/src/pages/native/MenubarDocs.tsx +0 -197
  96. package/apps/playground-web/src/pages/native/NavigationMenuDocs.tsx +0 -190
  97. package/apps/playground-web/src/pages/native/PaginationDocs.tsx +0 -70
  98. package/apps/playground-web/src/pages/native/PopoverDocs.tsx +0 -156
  99. package/apps/playground-web/src/pages/native/ProgressDocs.tsx +0 -61
  100. package/apps/playground-web/src/pages/native/RadioGroupDocs.tsx +0 -125
  101. package/apps/playground-web/src/pages/native/ResizableDocs.tsx +0 -118
  102. package/apps/playground-web/src/pages/native/ScrollAreaDocs.tsx +0 -92
  103. package/apps/playground-web/src/pages/native/SearchDocs.tsx +0 -150
  104. package/apps/playground-web/src/pages/native/SelectDocs.tsx +0 -141
  105. package/apps/playground-web/src/pages/native/SeparatorDocs.tsx +0 -72
  106. package/apps/playground-web/src/pages/native/SheetDocs.tsx +0 -140
  107. package/apps/playground-web/src/pages/native/SkeletonDocs.tsx +0 -44
  108. package/apps/playground-web/src/pages/native/SliderDocs.tsx +0 -118
  109. package/apps/playground-web/src/pages/native/SonnerDocs.tsx +0 -111
  110. package/apps/playground-web/src/pages/native/SwitchDocs.tsx +0 -87
  111. package/apps/playground-web/src/pages/native/TableDocs.tsx +0 -67
  112. package/apps/playground-web/src/pages/native/TabsDocs.tsx +0 -175
  113. package/apps/playground-web/src/pages/native/TextareaDocs.tsx +0 -61
  114. package/apps/playground-web/src/pages/native/ThemeToggleDocs.tsx +0 -288
  115. package/apps/playground-web/src/pages/native/ToastDocs.tsx +0 -124
  116. package/apps/playground-web/src/pages/native/ToggleDocs.tsx +0 -81
  117. package/apps/playground-web/src/pages/native/ToggleGroupDocs.tsx +0 -128
  118. package/apps/playground-web/src/pages/native/TooltipDocs.tsx +0 -140
  119. package/apps/playground-web/src/pages/native/index.ts +0 -47
  120. package/apps/playground-web/src/pages/shared/ColorTokensDocs.tsx +0 -234
  121. package/apps/playground-web/src/pages/shared/GettingStarted.tsx +0 -413
  122. package/apps/playground-web/src/pages/web/AccordionDocs.tsx +0 -194
  123. package/apps/playground-web/src/pages/web/AlertDialogDocs.tsx +0 -157
  124. package/apps/playground-web/src/pages/web/AlertDocs.tsx +0 -110
  125. package/apps/playground-web/src/pages/web/AspectRatioDocs.tsx +0 -94
  126. package/apps/playground-web/src/pages/web/AvatarDocs.tsx +0 -81
  127. package/apps/playground-web/src/pages/web/BadgeDocs.tsx +0 -66
  128. package/apps/playground-web/src/pages/web/BreadcrumbDocs.tsx +0 -93
  129. package/apps/playground-web/src/pages/web/ButtonDocs.tsx +0 -129
  130. package/apps/playground-web/src/pages/web/CalendarDocs.tsx +0 -78
  131. package/apps/playground-web/src/pages/web/CardDocs.tsx +0 -115
  132. package/apps/playground-web/src/pages/web/CarouselDocs.tsx +0 -176
  133. package/apps/playground-web/src/pages/web/ChartDocs.tsx +0 -151
  134. package/apps/playground-web/src/pages/web/CheckboxDocs.tsx +0 -95
  135. package/apps/playground-web/src/pages/web/CollapsibleDocs.tsx +0 -111
  136. package/apps/playground-web/src/pages/web/CommandDocs.tsx +0 -219
  137. package/apps/playground-web/src/pages/web/ContextMenuDocs.tsx +0 -164
  138. package/apps/playground-web/src/pages/web/DialogDocs.tsx +0 -175
  139. package/apps/playground-web/src/pages/web/DrawerDocs.tsx +0 -283
  140. package/apps/playground-web/src/pages/web/DropdownMenuDocs.tsx +0 -319
  141. package/apps/playground-web/src/pages/web/FormDocs.tsx +0 -175
  142. package/apps/playground-web/src/pages/web/HoverCardDocs.tsx +0 -151
  143. package/apps/playground-web/src/pages/web/InputDocs.tsx +0 -118
  144. package/apps/playground-web/src/pages/web/LabelDocs.tsx +0 -59
  145. package/apps/playground-web/src/pages/web/MenubarDocs.tsx +0 -296
  146. package/apps/playground-web/src/pages/web/NavigationMenuDocs.tsx +0 -263
  147. package/apps/playground-web/src/pages/web/PaginationDocs.tsx +0 -102
  148. package/apps/playground-web/src/pages/web/PopoverDocs.tsx +0 -189
  149. package/apps/playground-web/src/pages/web/ProgressDocs.tsx +0 -70
  150. package/apps/playground-web/src/pages/web/RadioGroupDocs.tsx +0 -137
  151. package/apps/playground-web/src/pages/web/ResizableDocs.tsx +0 -143
  152. package/apps/playground-web/src/pages/web/ScrollAreaDocs.tsx +0 -107
  153. package/apps/playground-web/src/pages/web/SearchDocs.tsx +0 -203
  154. package/apps/playground-web/src/pages/web/SelectDocs.tsx +0 -164
  155. package/apps/playground-web/src/pages/web/SeparatorDocs.tsx +0 -88
  156. package/apps/playground-web/src/pages/web/SheetDocs.tsx +0 -186
  157. package/apps/playground-web/src/pages/web/SkeletonDocs.tsx +0 -53
  158. package/apps/playground-web/src/pages/web/SliderDocs.tsx +0 -119
  159. package/apps/playground-web/src/pages/web/SonnerDocs.tsx +0 -126
  160. package/apps/playground-web/src/pages/web/SwitchDocs.tsx +0 -91
  161. package/apps/playground-web/src/pages/web/TableDocs.tsx +0 -148
  162. package/apps/playground-web/src/pages/web/TabsDocs.tsx +0 -241
  163. package/apps/playground-web/src/pages/web/TextareaDocs.tsx +0 -65
  164. package/apps/playground-web/src/pages/web/ThemeToggleDocs.tsx +0 -303
  165. package/apps/playground-web/src/pages/web/ToastDocs.tsx +0 -149
  166. package/apps/playground-web/src/pages/web/ToggleDocs.tsx +0 -85
  167. package/apps/playground-web/src/pages/web/ToggleGroupDocs.tsx +0 -140
  168. package/apps/playground-web/src/pages/web/TooltipDocs.tsx +0 -150
  169. package/apps/playground-web/src/pages/web/index.ts +0 -47
  170. package/apps/playground-web/src/routes/doc-routes.tsx +0 -363
  171. package/apps/playground-web/tailwind.config.js +0 -47
  172. package/apps/playground-web/tsconfig.app.json +0 -16
  173. package/apps/playground-web/tsconfig.json +0 -4
  174. package/apps/playground-web/tsconfig.node.json +0 -13
  175. package/apps/playground-web/vite.config.ts +0 -41
  176. package/components.json +0 -20
  177. package/docs/architecture-pivot.md +0 -165
  178. package/docs/native-setup-decision.md +0 -57
  179. package/docs/phase-1-tracker.md +0 -144
  180. package/docs/release-tooling-evaluation.md +0 -67
  181. package/docs/universal-implementation.md +0 -195
  182. package/docs/update-plan.md +0 -268
  183. package/eslint.config.mjs +0 -13
  184. package/nx.json +0 -50
  185. package/packages/.gitkeep +0 -0
  186. package/packages/design-tokens/CHANGELOG.md +0 -8
  187. package/packages/design-tokens/package.json +0 -20
  188. package/packages/design-tokens/src/index.ts +0 -35
  189. package/packages/design-tokens/src/palette.ts +0 -36
  190. package/packages/design-tokens/src/radii.ts +0 -26
  191. package/packages/design-tokens/src/shadows.ts +0 -16
  192. package/packages/design-tokens/src/spacing.ts +0 -33
  193. package/packages/design-tokens/src/theme.ts +0 -54
  194. package/packages/design-tokens/src/typography.ts +0 -36
  195. package/packages/design-tokens/tsconfig.json +0 -17
  196. package/packages/ui-core/CHANGELOG.md +0 -8
  197. package/packages/ui-core/package.json +0 -40
  198. package/packages/ui-core/src/contracts/accordion.ts +0 -23
  199. package/packages/ui-core/src/contracts/alert-dialog.ts +0 -48
  200. package/packages/ui-core/src/contracts/alert.ts +0 -17
  201. package/packages/ui-core/src/contracts/aspect-ratio.ts +0 -7
  202. package/packages/ui-core/src/contracts/avatar.ts +0 -17
  203. package/packages/ui-core/src/contracts/badge.ts +0 -7
  204. package/packages/ui-core/src/contracts/breadcrumb.ts +0 -37
  205. package/packages/ui-core/src/contracts/button.ts +0 -17
  206. package/packages/ui-core/src/contracts/calendar.ts +0 -4
  207. package/packages/ui-core/src/contracts/card.ts +0 -11
  208. package/packages/ui-core/src/contracts/carousel.ts +0 -29
  209. package/packages/ui-core/src/contracts/chart.ts +0 -31
  210. package/packages/ui-core/src/contracts/checkbox.ts +0 -11
  211. package/packages/ui-core/src/contracts/collapsible.ts +0 -21
  212. package/packages/ui-core/src/contracts/command.ts +0 -43
  213. package/packages/ui-core/src/contracts/context-menu.ts +0 -78
  214. package/packages/ui-core/src/contracts/dialog.ts +0 -29
  215. package/packages/ui-core/src/contracts/drawer.ts +0 -39
  216. package/packages/ui-core/src/contracts/dropdown-menu.ts +0 -87
  217. package/packages/ui-core/src/contracts/form.ts +0 -29
  218. package/packages/ui-core/src/contracts/hover-card.ts +0 -21
  219. package/packages/ui-core/src/contracts/input.ts +0 -11
  220. package/packages/ui-core/src/contracts/label.ts +0 -7
  221. package/packages/ui-core/src/contracts/menubar.ts +0 -86
  222. package/packages/ui-core/src/contracts/navigation-menu.ts +0 -55
  223. package/packages/ui-core/src/contracts/pagination.ts +0 -38
  224. package/packages/ui-core/src/contracts/popover.ts +0 -28
  225. package/packages/ui-core/src/contracts/progress.ts +0 -4
  226. package/packages/ui-core/src/contracts/radio.ts +0 -16
  227. package/packages/ui-core/src/contracts/resizable.ts +0 -36
  228. package/packages/ui-core/src/contracts/scroll-area.ts +0 -15
  229. package/packages/ui-core/src/contracts/search.ts +0 -13
  230. package/packages/ui-core/src/contracts/select.ts +0 -64
  231. package/packages/ui-core/src/contracts/separator.ts +0 -5
  232. package/packages/ui-core/src/contracts/sheet.ts +0 -58
  233. package/packages/ui-core/src/contracts/skeleton.ts +0 -6
  234. package/packages/ui-core/src/contracts/slider.ts +0 -15
  235. package/packages/ui-core/src/contracts/sonner.ts +0 -15
  236. package/packages/ui-core/src/contracts/switch.ts +0 -11
  237. package/packages/ui-core/src/contracts/table.ts +0 -41
  238. package/packages/ui-core/src/contracts/tabs.ts +0 -31
  239. package/packages/ui-core/src/contracts/text.ts +0 -12
  240. package/packages/ui-core/src/contracts/textarea.ts +0 -7
  241. package/packages/ui-core/src/contracts/theme-provider.ts +0 -14
  242. package/packages/ui-core/src/contracts/theme-toggle.ts +0 -15
  243. package/packages/ui-core/src/contracts/toast.ts +0 -15
  244. package/packages/ui-core/src/contracts/toaster.ts +0 -3
  245. package/packages/ui-core/src/contracts/toggle-group.ts +0 -23
  246. package/packages/ui-core/src/contracts/toggle.ts +0 -49
  247. package/packages/ui-core/src/contracts/tooltip.ts +0 -28
  248. package/packages/ui-core/src/index.ts +0 -327
  249. package/packages/ui-core/tsconfig.json +0 -18
  250. package/packages/ui-native/CHANGELOG.md +0 -8
  251. package/packages/ui-native/package.json +0 -76
  252. package/packages/ui-native/src/accordion.tsx +0 -93
  253. package/packages/ui-native/src/alert-dialog.tsx +0 -123
  254. package/packages/ui-native/src/alert.tsx +0 -50
  255. package/packages/ui-native/src/aspect-ratio.tsx +0 -9
  256. package/packages/ui-native/src/avatar.tsx +0 -38
  257. package/packages/ui-native/src/badge.tsx +0 -51
  258. package/packages/ui-native/src/breadcrumb.tsx +0 -9
  259. package/packages/ui-native/src/button.test.tsx +0 -27
  260. package/packages/ui-native/src/button.tsx +0 -75
  261. package/packages/ui-native/src/calendar.tsx +0 -9
  262. package/packages/ui-native/src/card.test.tsx +0 -33
  263. package/packages/ui-native/src/card.tsx +0 -56
  264. package/packages/ui-native/src/carousel.tsx +0 -9
  265. package/packages/ui-native/src/chart.tsx +0 -9
  266. package/packages/ui-native/src/checkbox.test.tsx +0 -58
  267. package/packages/ui-native/src/checkbox.tsx +0 -31
  268. package/packages/ui-native/src/collapsible.test.tsx +0 -50
  269. package/packages/ui-native/src/collapsible.tsx +0 -15
  270. package/packages/ui-native/src/command.tsx +0 -9
  271. package/packages/ui-native/src/context-menu.tsx +0 -9
  272. package/packages/ui-native/src/dialog.test.tsx +0 -91
  273. package/packages/ui-native/src/dialog.tsx +0 -121
  274. package/packages/ui-native/src/drawer.tsx +0 -9
  275. package/packages/ui-native/src/dropdown-menu.tsx +0 -9
  276. package/packages/ui-native/src/form.tsx +0 -9
  277. package/packages/ui-native/src/hover-card.tsx +0 -9
  278. package/packages/ui-native/src/index.ts +0 -209
  279. package/packages/ui-native/src/input.test.tsx +0 -27
  280. package/packages/ui-native/src/input.tsx +0 -27
  281. package/packages/ui-native/src/label.tsx +0 -29
  282. package/packages/ui-native/src/lib/render-native.tsx +0 -17
  283. package/packages/ui-native/src/lib/utils.ts +0 -6
  284. package/packages/ui-native/src/menubar.tsx +0 -9
  285. package/packages/ui-native/src/nativewind-env.d.ts +0 -1
  286. package/packages/ui-native/src/navigation-menu.tsx +0 -9
  287. package/packages/ui-native/src/pagination.tsx +0 -9
  288. package/packages/ui-native/src/popover.tsx +0 -9
  289. package/packages/ui-native/src/progress.tsx +0 -9
  290. package/packages/ui-native/src/radio-group.test.tsx +0 -77
  291. package/packages/ui-native/src/radio-group.tsx +0 -42
  292. package/packages/ui-native/src/resizable.tsx +0 -25
  293. package/packages/ui-native/src/scroll-area.tsx +0 -9
  294. package/packages/ui-native/src/search.tsx +0 -17
  295. package/packages/ui-native/src/select.tsx +0 -229
  296. package/packages/ui-native/src/separator.tsx +0 -20
  297. package/packages/ui-native/src/sheet.test.tsx +0 -93
  298. package/packages/ui-native/src/sheet.tsx +0 -127
  299. package/packages/ui-native/src/skeleton.test.tsx +0 -29
  300. package/packages/ui-native/src/skeleton.tsx +0 -31
  301. package/packages/ui-native/src/slider.tsx +0 -9
  302. package/packages/ui-native/src/sonner.tsx +0 -9
  303. package/packages/ui-native/src/switch.tsx +0 -34
  304. package/packages/ui-native/src/table.tsx +0 -73
  305. package/packages/ui-native/src/tabs.tsx +0 -74
  306. package/packages/ui-native/src/text.test.tsx +0 -24
  307. package/packages/ui-native/src/text.tsx +0 -43
  308. package/packages/ui-native/src/textarea.test.tsx +0 -27
  309. package/packages/ui-native/src/textarea.tsx +0 -29
  310. package/packages/ui-native/src/theme-provider.tsx +0 -6
  311. package/packages/ui-native/src/theme-toggle.tsx +0 -11
  312. package/packages/ui-native/src/toast.test.tsx +0 -61
  313. package/packages/ui-native/src/toast.tsx +0 -88
  314. package/packages/ui-native/src/toaster.tsx +0 -9
  315. package/packages/ui-native/src/toggle-group.tsx +0 -78
  316. package/packages/ui-native/src/toggle.tsx +0 -35
  317. package/packages/ui-native/src/tooltip.tsx +0 -44
  318. package/packages/ui-native/tsconfig.json +0 -23
  319. package/packages/ui-native/vite.config.ts +0 -17
  320. package/packages/ui-web/CHANGELOG.md +0 -8
  321. package/packages/ui-web/package.json +0 -84
  322. package/packages/ui-web/src/accordion.test.tsx +0 -86
  323. package/packages/ui-web/src/accordion.tsx +0 -58
  324. package/packages/ui-web/src/alert-dialog.test.tsx +0 -91
  325. package/packages/ui-web/src/alert-dialog.tsx +0 -121
  326. package/packages/ui-web/src/alert.test.tsx +0 -47
  327. package/packages/ui-web/src/alert.tsx +0 -49
  328. package/packages/ui-web/src/aspect-ratio.test.tsx +0 -34
  329. package/packages/ui-web/src/aspect-ratio.tsx +0 -7
  330. package/packages/ui-web/src/avatar.test.tsx +0 -33
  331. package/packages/ui-web/src/avatar.tsx +0 -40
  332. package/packages/ui-web/src/badge.test.tsx +0 -24
  333. package/packages/ui-web/src/badge.tsx +0 -34
  334. package/packages/ui-web/src/breadcrumb.tsx +0 -105
  335. package/packages/ui-web/src/button.test.tsx +0 -62
  336. package/packages/ui-web/src/button.tsx +0 -47
  337. package/packages/ui-web/src/calendar.test.tsx +0 -23
  338. package/packages/ui-web/src/calendar.tsx +0 -163
  339. package/packages/ui-web/src/card.test.tsx +0 -35
  340. package/packages/ui-web/src/card.tsx +0 -46
  341. package/packages/ui-web/src/carousel.test.tsx +0 -37
  342. package/packages/ui-web/src/carousel.tsx +0 -234
  343. package/packages/ui-web/src/chart.test.tsx +0 -62
  344. package/packages/ui-web/src/chart.tsx +0 -296
  345. package/packages/ui-web/src/checkbox.test.tsx +0 -30
  346. package/packages/ui-web/src/checkbox.tsx +0 -31
  347. package/packages/ui-web/src/collapsible.test.tsx +0 -51
  348. package/packages/ui-web/src/collapsible.tsx +0 -15
  349. package/packages/ui-web/src/command.test.tsx +0 -79
  350. package/packages/ui-web/src/command.tsx +0 -154
  351. package/packages/ui-web/src/context-menu.test.tsx +0 -37
  352. package/packages/ui-web/src/context-menu.tsx +0 -208
  353. package/packages/ui-web/src/dialog.test.tsx +0 -66
  354. package/packages/ui-web/src/dialog.tsx +0 -95
  355. package/packages/ui-web/src/drawer.test.tsx +0 -68
  356. package/packages/ui-web/src/drawer.tsx +0 -110
  357. package/packages/ui-web/src/dropdown-menu.test.tsx +0 -93
  358. package/packages/ui-web/src/dropdown-menu.tsx +0 -212
  359. package/packages/ui-web/src/form.test.tsx +0 -84
  360. package/packages/ui-web/src/form.tsx +0 -160
  361. package/packages/ui-web/src/hooks/use-theme.ts +0 -15
  362. package/packages/ui-web/src/hooks/use-toast.ts +0 -189
  363. package/packages/ui-web/src/hover-card.test.tsx +0 -48
  364. package/packages/ui-web/src/hover-card.tsx +0 -35
  365. package/packages/ui-web/src/index.ts +0 -474
  366. package/packages/ui-web/src/input.test.tsx +0 -33
  367. package/packages/ui-web/src/input.tsx +0 -23
  368. package/packages/ui-web/src/label.test.tsx +0 -27
  369. package/packages/ui-web/src/label.tsx +0 -21
  370. package/packages/ui-web/src/lib/utils.ts +0 -6
  371. package/packages/ui-web/src/menubar.test.tsx +0 -92
  372. package/packages/ui-web/src/menubar.tsx +0 -244
  373. package/packages/ui-web/src/navigation-menu.test.tsx +0 -53
  374. package/packages/ui-web/src/navigation-menu.tsx +0 -143
  375. package/packages/ui-web/src/pagination.test.tsx +0 -57
  376. package/packages/ui-web/src/pagination.tsx +0 -107
  377. package/packages/ui-web/src/popover.test.tsx +0 -31
  378. package/packages/ui-web/src/popover.tsx +0 -45
  379. package/packages/ui-web/src/progress.test.tsx +0 -18
  380. package/packages/ui-web/src/progress.tsx +0 -28
  381. package/packages/ui-web/src/radio-group.test.tsx +0 -39
  382. package/packages/ui-web/src/radio-group.tsx +0 -41
  383. package/packages/ui-web/src/resizable.test.tsx +0 -23
  384. package/packages/ui-web/src/resizable.tsx +0 -59
  385. package/packages/ui-web/src/scroll-area.test.tsx +0 -15
  386. package/packages/ui-web/src/scroll-area.tsx +0 -42
  387. package/packages/ui-web/src/search.test.tsx +0 -81
  388. package/packages/ui-web/src/search.tsx +0 -87
  389. package/packages/ui-web/src/select.test.tsx +0 -42
  390. package/packages/ui-web/src/select.tsx +0 -169
  391. package/packages/ui-web/src/separator.test.tsx +0 -16
  392. package/packages/ui-web/src/separator.tsx +0 -24
  393. package/packages/ui-web/src/setupTests.ts +0 -114
  394. package/packages/ui-web/src/sheet.test.tsx +0 -48
  395. package/packages/ui-web/src/sheet.tsx +0 -136
  396. package/packages/ui-web/src/skeleton.test.tsx +0 -13
  397. package/packages/ui-web/src/skeleton.tsx +0 -10
  398. package/packages/ui-web/src/slider.test.tsx +0 -18
  399. package/packages/ui-web/src/slider.tsx +0 -27
  400. package/packages/ui-web/src/sonner.test.tsx +0 -13
  401. package/packages/ui-web/src/sonner.tsx +0 -32
  402. package/packages/ui-web/src/switch.test.tsx +0 -22
  403. package/packages/ui-web/src/switch.tsx +0 -31
  404. package/packages/ui-web/src/table.test.tsx +0 -29
  405. package/packages/ui-web/src/table.tsx +0 -104
  406. package/packages/ui-web/src/tabs.test.tsx +0 -43
  407. package/packages/ui-web/src/tabs.tsx +0 -62
  408. package/packages/ui-web/src/text.test.tsx +0 -34
  409. package/packages/ui-web/src/text.tsx +0 -55
  410. package/packages/ui-web/src/textarea.test.tsx +0 -21
  411. package/packages/ui-web/src/textarea.tsx +0 -25
  412. package/packages/ui-web/src/theme-provider.tsx +0 -15
  413. package/packages/ui-web/src/theme-toggle.test.tsx +0 -49
  414. package/packages/ui-web/src/theme-toggle.tsx +0 -92
  415. package/packages/ui-web/src/toast.test.tsx +0 -42
  416. package/packages/ui-web/src/toast.tsx +0 -111
  417. package/packages/ui-web/src/toaster.tsx +0 -27
  418. package/packages/ui-web/src/toggle-group.test.tsx +0 -40
  419. package/packages/ui-web/src/toggle-group.tsx +0 -55
  420. package/packages/ui-web/src/toggle.test.tsx +0 -21
  421. package/packages/ui-web/src/toggle.tsx +0 -24
  422. package/packages/ui-web/src/tooltip.tsx +0 -51
  423. package/packages/ui-web/tsconfig.json +0 -24
  424. package/packages/ui-web/vite.config.ts +0 -21
  425. package/postcss.config.mjs +0 -5
  426. package/release-please-config.json +0 -60
  427. package/scripts/build-registry.ts +0 -80
  428. package/scripts/sync-tokens.ts +0 -86
  429. package/scripts/validate.ts +0 -74
  430. package/src/globals.css +0 -146
  431. package/src/index.ts +0 -4
  432. package/src/setupTests.ts +0 -47
  433. package/src/types/nativewind.d.ts +0 -19
  434. package/tailwind.config.js +0 -48
  435. package/tsconfig.build.json +0 -22
  436. package/tsconfig.json +0 -30
  437. package/tsconfig.node.json +0 -11
  438. package/vite.config.ts +0 -106
  439. package/vitest.config.ts +0 -23
  440. package/wrangler.toml +0 -22
@@ -1,303 +0,0 @@
1
- import { ComponentShowcase } from '@/components/docs/ComponentShowcase';
2
- import { PropsTable } from '@/components/docs/PropsTable';
3
- import { ThemeToggle } from '@gv-tech/ui-web';
4
- import { useState } from 'react';
5
-
6
- export function ThemeToggleDocs() {
7
- const [binaryTheme, setBinaryTheme] = useState('light');
8
- const [ternaryTheme, setTernaryTheme] = useState('system');
9
- const [customTheme, setCustomTheme] = useState('light');
10
-
11
- return (
12
- <>
13
- <ComponentShowcase
14
- title="Binary Mode"
15
- description="The default mode allows toggling between light and dark themes. (Controlled example shown to prevent site theme changes)"
16
- code={`<ThemeToggle variant="binary" />`}
17
- >
18
- <ThemeToggle variant="binary" customTheme={binaryTheme} onThemeChange={setBinaryTheme} />
19
- </ComponentShowcase>
20
-
21
- <ComponentShowcase
22
- title="Ternary Mode"
23
- description="Ternary mode allows choosing between light, dark, and system themes using a dropdown menu. (Controlled example shown to prevent site theme changes)"
24
- code={`<ThemeToggle variant="ternary" />`}
25
- >
26
- <ThemeToggle variant="ternary" customTheme={ternaryTheme} onThemeChange={setTernaryTheme} />
27
- </ComponentShowcase>
28
-
29
- <ComponentShowcase
30
- title="Controlled Mode"
31
- description="You can control the theme externally by passing customTheme and onThemeChange props. This is useful for testing or when using a different theme provider."
32
- code={`const [theme, setTheme] = useState('light');
33
-
34
- <ThemeToggle
35
- customTheme={theme}
36
- onThemeChange={setTheme}
37
- />
38
-
39
- <p>Current Theme: {theme}</p>`}
40
- >
41
- <div className="flex flex-col items-center gap-4">
42
- <ThemeToggle customTheme={customTheme} onThemeChange={setCustomTheme} />
43
- <p className="text-sm font-medium">Current Selection: {customTheme}</p>
44
- </div>
45
- </ComponentShowcase>
46
-
47
- {/* ThemeProvider Section */}
48
- <div className="mt-12 space-y-6">
49
- <div>
50
- <h3 className="text-xl font-semibold">ThemeProvider</h3>
51
- <p className="mt-2 text-muted-foreground">
52
- The design system exports a pre-configured{' '}
53
- <code className="text-sm bg-muted px-1.5 py-0.5 rounded">ThemeProvider</code> that wraps{' '}
54
- <code className="text-sm bg-muted px-1.5 py-0.5 rounded">next-themes</code> with sensible defaults. Wrap
55
- your application with it to enable theme switching for all design system components.
56
- </p>
57
- </div>
58
-
59
- <div className="rounded-md border bg-muted p-4">
60
- <pre className="text-xs">
61
- <code>
62
- {`import { ThemeProvider, ThemeToggle } from '@gv-tech/design-system';
63
- import '@gv-tech/design-system/style.css';
64
-
65
- function App() {
66
- return (
67
- <ThemeProvider>
68
- <ThemeToggle variant="ternary" />
69
- {/* Your app content */}
70
- </ThemeProvider>
71
- );
72
- }`}
73
- </code>
74
- </pre>
75
- </div>
76
-
77
- <div className="space-y-4">
78
- <h4 className="font-medium text-foreground">Defaults</h4>
79
- <p className="text-sm text-muted-foreground">
80
- Out of the box, <code className="text-sm bg-muted px-1.5 py-0.5 rounded">ThemeProvider</code> applies these
81
- defaults. You can override any of them by passing the corresponding prop.
82
- </p>
83
- <div className="rounded-md border">
84
- <table className="w-full text-sm">
85
- <thead>
86
- <tr className="border-b bg-muted/50">
87
- <th className="p-3 text-left font-medium">Prop</th>
88
- <th className="p-3 text-left font-medium">Default</th>
89
- <th className="p-3 text-left font-medium">Description</th>
90
- </tr>
91
- </thead>
92
- <tbody>
93
- <tr className="border-b">
94
- <td className="p-3">
95
- <code className="text-xs bg-muted px-1 py-0.5 rounded">attribute</code>
96
- </td>
97
- <td className="p-3">
98
- <code className="text-xs bg-muted px-1 py-0.5 rounded">"class"</code>
99
- </td>
100
- <td className="p-3 text-muted-foreground">Applies the theme as a CSS class on the HTML element</td>
101
- </tr>
102
- <tr className="border-b">
103
- <td className="p-3">
104
- <code className="text-xs bg-muted px-1 py-0.5 rounded">defaultTheme</code>
105
- </td>
106
- <td className="p-3">
107
- <code className="text-xs bg-muted px-1 py-0.5 rounded">"system"</code>
108
- </td>
109
- <td className="p-3 text-muted-foreground">Respects the user's operating system preference</td>
110
- </tr>
111
- <tr>
112
- <td className="p-3">
113
- <code className="text-xs bg-muted px-1 py-0.5 rounded">enableSystem</code>
114
- </td>
115
- <td className="p-3">
116
- <code className="text-xs bg-muted px-1 py-0.5 rounded">true</code>
117
- </td>
118
- <td className="p-3 text-muted-foreground">Enables automatic detection of the OS color scheme</td>
119
- </tr>
120
- </tbody>
121
- </table>
122
- </div>
123
- </div>
124
-
125
- <div className="rounded-md border bg-muted p-4">
126
- <p className="text-xs font-medium text-muted-foreground mb-2">Overriding defaults:</p>
127
- <pre className="text-xs">
128
- <code>
129
- {`<ThemeProvider
130
- defaultTheme="dark"
131
- storageKey="my-app-theme"
132
- themes={['light', 'dark', 'ocean']}
133
- >
134
- <App />
135
- </ThemeProvider>`}
136
- </code>
137
- </pre>
138
- </div>
139
- </div>
140
-
141
- {/* useTheme Section */}
142
- <div className="mt-12 space-y-4">
143
- <h3 className="text-xl font-semibold">useTheme Hook</h3>
144
- <p className="text-sm text-muted-foreground">
145
- The <code className="text-sm bg-muted px-1.5 py-0.5 rounded">useTheme</code> hook provides access to the
146
- current theme, theme controls, and the active design tokens. It must be used within a{' '}
147
- <code className="text-sm bg-muted px-1.5 py-0.5 rounded">ThemeProvider</code>.
148
- </p>
149
- <div className="rounded-md border bg-muted p-4">
150
- <pre className="text-xs">
151
- <code>
152
- {`import { useTheme } from '@gv-tech/design-system';
153
-
154
- export function MyComponent() {
155
- const { theme, setTheme, resolvedTheme, tokens } = useTheme();
156
-
157
- return (
158
- <div style={{ backgroundColor: tokens.background }}>
159
- <p>Current theme: {theme}</p>
160
- <p>Resolved theme: {resolvedTheme}</p>
161
- <button onClick={() => setTheme('dark')}>Dark Mode</button>
162
- </div>
163
- );
164
- }`}
165
- </code>
166
- </pre>
167
- </div>
168
-
169
- <PropsTable
170
- props={[
171
- {
172
- name: 'theme',
173
- type: 'string',
174
- required: false,
175
- description: 'The current theme name ("light", "dark", or "system").',
176
- },
177
- {
178
- name: 'setTheme',
179
- type: '(theme: string) => void',
180
- required: false,
181
- description: 'Function to programmatically change the theme.',
182
- },
183
- {
184
- name: 'resolvedTheme',
185
- type: 'string',
186
- required: false,
187
- description:
188
- 'The resolved theme ("light" or "dark"). Useful when theme is "system" and you need the actual value.',
189
- },
190
- {
191
- name: 'tokens',
192
- type: 'ThemeTokens',
193
- required: false,
194
- description:
195
- 'The active color tokens for the current resolved theme (light or dark). Contains background, foreground, primary, and other design token values.',
196
- },
197
- ]}
198
- />
199
- </div>
200
-
201
- {/* ThemeToggle Props Section */}
202
- <div className="space-y-4">
203
- <h3 className="text-xl font-semibold">ThemeToggle Props</h3>
204
- <PropsTable
205
- props={[
206
- {
207
- name: 'variant',
208
- type: '"binary" | "ternary"',
209
- defaultValue: '"binary"',
210
- required: false,
211
- description:
212
- "The toggle behavior. 'binary' switches between light/dark, while 'ternary' includes system.",
213
- },
214
- {
215
- name: 'onThemeChange',
216
- type: '(theme: string) => void',
217
- required: false,
218
- description: 'Optional callback for custom theme management logic.',
219
- },
220
- {
221
- name: 'customTheme',
222
- type: 'string',
223
- required: false,
224
- description: 'Overrides the internal theme detection (useful for previews or external control).',
225
- },
226
- {
227
- name: 'className',
228
- type: 'string',
229
- required: false,
230
- description: 'Additional CSS classes for the toggle button.',
231
- },
232
- ]}
233
- />
234
- </div>
235
-
236
- {/* Integration Section */}
237
- <div className="mt-12 space-y-6">
238
- <div>
239
- <h3 className="text-xl font-semibold">Integration</h3>
240
- <p className="mt-2 text-muted-foreground">
241
- The <code className="text-sm bg-muted px-1.5 py-0.5 rounded">ThemeToggle</code> component works seamlessly
242
- with the design system's <code className="text-sm bg-muted px-1.5 py-0.5 rounded">ThemeProvider</code>. It
243
- can also be used in a fully controlled manner with any theme provider or custom state.
244
- </p>
245
- </div>
246
-
247
- <div className="grid gap-6 md:grid-cols-2">
248
- <div className="rounded-lg border bg-muted/50 p-6">
249
- <h4 className="font-medium text-foreground">With ThemeProvider (Recommended)</h4>
250
- <p className="mt-1 text-sm text-muted-foreground">
251
- Wrap your app with the design system's{' '}
252
- <code className="text-xs bg-muted px-1 py-0.5 rounded">ThemeProvider</code> and drop in the toggle.
253
- Everything connects automatically.
254
- </p>
255
- <pre className="mt-4 overflow-x-auto rounded-md bg-background p-4 text-xs">
256
- <code>{`import { ThemeProvider, ThemeToggle } from '@gv-tech/design-system';
257
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
258
- // @ts-ignore
259
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
260
- const isNative = false as boolean;
261
-
262
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
263
- // @ts-ignore
264
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
265
- const platform = 'web' as string;
266
-
267
-
268
- <ThemeProvider>
269
- <ThemeToggle />
270
- </ThemeProvider>`}</code>
271
- </pre>
272
- </div>
273
-
274
- <div className="rounded-lg border bg-muted/50 p-6">
275
- <h4 className="font-medium text-foreground">Controlled / Custom State</h4>
276
- <p className="mt-1 text-sm text-muted-foreground">
277
- Pass your own theme state and change handler to integrate with custom logic or external storage.
278
- </p>
279
- <pre className="mt-4 overflow-x-auto rounded-md bg-background p-4 text-xs">
280
- <code>{`const [theme, setTheme] = useState("light")
281
-
282
- <ThemeToggle
283
- customTheme={theme}
284
- onThemeChange={setTheme}
285
- />`}</code>
286
- </pre>
287
- </div>
288
- </div>
289
-
290
- <div className="rounded-lg border border-amber-500/30 bg-amber-500/5 p-6">
291
- <h4 className="font-medium text-amber-600 dark:text-amber-400">⚠️ Important: Shared Context</h4>
292
- <p className="mt-1 text-sm text-muted-foreground">
293
- The design system marks <code className="text-xs bg-muted px-1 py-0.5 rounded">next-themes</code> as a{' '}
294
- <strong>peer dependency</strong>, meaning it uses the same instance as your project. This ensures that{' '}
295
- <code className="text-xs bg-muted px-1 py-0.5 rounded">useTheme</code>,{' '}
296
- <code className="text-xs bg-muted px-1 py-0.5 rounded">ThemeToggle</code>, and your own components all share
297
- the same theme context — no duplicate providers needed.
298
- </p>
299
- </div>
300
- </div>
301
- </>
302
- );
303
- }
@@ -1,149 +0,0 @@
1
- import { ComponentShowcase } from '@/components/docs/ComponentShowcase';
2
- import { PropsTable } from '@/components/docs/PropsTable';
3
- import { Button, useToast } from '@gv-tech/ui-web';
4
- /* eslint-disable @typescript-eslint/ban-ts-comment, @typescript-eslint/no-unused-vars */
5
-
6
- // @ts-ignore
7
-
8
- const isNative = false as boolean;
9
-
10
- // @ts-ignore
11
-
12
- const platform = 'web' as string;
13
-
14
- export function ToastDocs() {
15
- const { toast } = useToast();
16
-
17
- return (
18
- <>
19
- <div className="bg-muted/50 border rounded-lg p-6 space-y-4 mb-8">
20
- <h3 className="text-lg font-semibold">Which to use?</h3>
21
- <div className="grid grid-cols-1 md:grid-cols-2 gap-8">
22
- <div className="space-y-2">
23
- <h4 className="font-medium text-primary">Toast (Radix UI)</h4>
24
- <p className="text-sm text-muted-foreground leading-relaxed">
25
- Based on Radix UI. Provides more granular control over individual toast elements. Uses the{' '}
26
- <code>useToast</code> hook and is best for situations requiring manual state management or complex, custom
27
- toast behavior.
28
- </p>
29
- </div>
30
- <div className="space-y-2">
31
- <h4 className="font-medium text-primary">Sonner</h4>
32
- <p className="text-sm text-muted-foreground leading-relaxed">
33
- An opinionated, modern alternative. Features automatic stacking, swipe-to-dismiss, and a simpler API (
34
- <code>toast("message")</code>). Best for general feedback and high-quality UX with minimal effort.
35
- </p>
36
- </div>
37
- </div>
38
- </div>
39
-
40
- <ComponentShowcase
41
- title="Default"
42
- description="A default toast."
43
- code={`const { toast } = useToast()
44
-
45
- <Button
46
- variant="outline"
47
- onClick={() => {
48
- toast({
49
- description: "Your message has been sent.",
50
- })
51
- }}
52
- >
53
- Show Toast
54
- </Button>`}
55
- >
56
- <Button
57
- variant="outline"
58
- onClick={() => {
59
- toast({
60
- description: 'Your message has been sent.',
61
- });
62
- }}
63
- >
64
- Show Toast
65
- </Button>
66
- </ComponentShowcase>
67
-
68
- <ComponentShowcase
69
- title="Destructive"
70
- description="A destructive toast."
71
- code={`const { toast } = useToast()
72
-
73
- <Button
74
- variant="outline"
75
- onClick={() => {
76
- toast({
77
- variant: "destructive",
78
- title: "Uh oh! Something went wrong.",
79
- description: "There was a problem with your request.",
80
- })
81
- }}
82
- >
83
- Show Toast
84
- </Button>`}
85
- >
86
- <Button
87
- variant="outline"
88
- onClick={() => {
89
- toast({
90
- variant: 'destructive',
91
- title: 'Uh oh! Something went wrong.',
92
- description: 'There was a problem with your request.',
93
- });
94
- }}
95
- >
96
- Show Toast
97
- </Button>
98
- </ComponentShowcase>
99
- <div className="space-y-4">
100
- <h3 className="text-xl font-semibold">Props</h3>
101
- <p className="text-sm text-muted-foreground">
102
- The Toast component is built on top of{' '}
103
- <a
104
- href="https://www.radix-ui.com/primitives/docs/components/toast"
105
- className="underline"
106
- target="_blank"
107
- rel="noreferrer"
108
- >
109
- Radix UI Toast
110
- </a>
111
- .
112
- </p>
113
-
114
- <h4 className="text-lg font-medium mt-6">Toast (Root)</h4>
115
- <PropsTable
116
- props={[
117
- {
118
- name: 'variant',
119
- type: '"default" | "destructive"',
120
- defaultValue: '"default"',
121
- description: 'The visual variant of the toast.',
122
- },
123
- {
124
- name: 'duration',
125
- type: 'number',
126
- defaultValue: '5000',
127
- description: 'The time in milliseconds that the toast should remain visible for.',
128
- },
129
- ]}
130
- />
131
-
132
- <h4 className="text-lg font-medium mt-6">Toaster</h4>
133
- <p className="text-sm text-muted-foreground">The Toaster component renders all active toasts.</p>
134
-
135
- <h4 className="text-lg font-medium mt-6">useToast</h4>
136
- <p className="text-sm text-muted-foreground">The `useToast` hook is used to trigger toasts.</p>
137
- <PropsTable
138
- props={[
139
- {
140
- name: 'toast',
141
- type: 'function',
142
- description: 'Function to trigger a new toast. Returns an object with `id`, `dismiss`, and `update`.',
143
- },
144
- ]}
145
- />
146
- </div>
147
- </>
148
- );
149
- }
@@ -1,85 +0,0 @@
1
- import { ComponentShowcase } from '@/components/docs/ComponentShowcase';
2
- import { PropsTable } from '@/components/docs/PropsTable';
3
- import { Toggle } from '@gv-tech/ui-web';
4
- import { Bold } from 'lucide-react';
5
- /* eslint-disable @typescript-eslint/ban-ts-comment, @typescript-eslint/no-unused-vars */
6
-
7
- // @ts-ignore
8
-
9
- const isNative = false as boolean;
10
-
11
- // @ts-ignore
12
-
13
- const platform = 'web' as string;
14
-
15
- export function ToggleDocs() {
16
- return (
17
- <>
18
- <ComponentShowcase
19
- title="Default"
20
- description="A default toggle."
21
- code={`<Toggle aria-label="Toggle bold">
22
- <Bold className="h-4 w-4" />
23
- </Toggle>`}
24
- >
25
- <Toggle aria-label="Toggle bold" pressed={false} onPressedChange={() => {}}>
26
- <Bold className="h-4 w-4" />
27
- </Toggle>
28
- </ComponentShowcase>
29
-
30
- <div className="space-y-4">
31
- <h3 className="text-xl font-semibold">Props</h3>
32
- <p className="text-sm text-muted-foreground">
33
- The Toggle component is built on top of{' '}
34
- <a
35
- href="https://www.radix-ui.com/primitives/docs/components/toggle"
36
- className="underline"
37
- target="_blank"
38
- rel="noreferrer"
39
- >
40
- Radix UI Toggle
41
- </a>
42
- .
43
- </p>
44
-
45
- <h4 className="text-lg font-medium mt-6">Toggle</h4>
46
- <PropsTable
47
- props={[
48
- {
49
- name: 'defaultPressed',
50
- type: 'boolean',
51
- description: 'The pressed state of the toggle when it is initially rendered.',
52
- },
53
- {
54
- name: 'pressed',
55
- type: 'boolean',
56
- description: 'The controlled pressed state of the toggle.',
57
- },
58
- {
59
- name: 'onPressedChange',
60
- type: '(pressed: boolean) => void',
61
- description: 'Event handler called when the pressed state of the toggle changes.',
62
- },
63
- {
64
- name: 'disabled',
65
- type: 'boolean',
66
- description: 'When true, prevents the user from interacting with the toggle.',
67
- },
68
- {
69
- name: 'variant',
70
- type: '"default" | "outline"',
71
- defaultValue: '"default"',
72
- description: 'The visual variant of the toggle.',
73
- },
74
- {
75
- name: 'size',
76
- type: '"default" | "sm" | "lg"',
77
- defaultValue: '"default"',
78
- description: 'The size of the toggle.',
79
- },
80
- ]}
81
- />
82
- </div>
83
- </>
84
- );
85
- }
@@ -1,140 +0,0 @@
1
- import { ComponentShowcase } from '@/components/docs/ComponentShowcase';
2
- import { PropsTable } from '@/components/docs/PropsTable';
3
- import { ToggleGroup, ToggleGroupItem } from '@gv-tech/ui-web';
4
- import { Bold, Italic, Underline } from 'lucide-react';
5
- /* eslint-disable @typescript-eslint/ban-ts-comment, @typescript-eslint/no-unused-vars */
6
-
7
- // @ts-ignore
8
-
9
- const isNative = false as boolean;
10
-
11
- // @ts-ignore
12
-
13
- const platform = 'web' as string;
14
-
15
- export function ToggleGroupDocs() {
16
- return (
17
- <>
18
- <ComponentShowcase
19
- title="Default"
20
- description="A default toggle group."
21
- code={`<ToggleGroup type="multiple">
22
- <ToggleGroupItem value="bold" aria-label="Toggle bold">
23
- <Bold className="h-4 w-4" />
24
- </ToggleGroupItem>
25
- <ToggleGroupItem value="italic" aria-label="Toggle italic">
26
- <Italic className="h-4 w-4" />
27
- </ToggleGroupItem>
28
- <ToggleGroupItem value="underline" aria-label="Toggle underline">
29
- <Underline className="h-4 w-4" />
30
- </ToggleGroupItem>
31
- </ToggleGroup>`}
32
- >
33
- <ToggleGroup type="multiple">
34
- <ToggleGroupItem value="bold" aria-label="Toggle bold">
35
- <Bold className="h-4 w-4" />
36
- </ToggleGroupItem>
37
- <ToggleGroupItem value="italic" aria-label="Toggle italic">
38
- <Italic className="h-4 w-4" />
39
- </ToggleGroupItem>
40
- <ToggleGroupItem value="underline" aria-label="Toggle underline">
41
- <Underline className="h-4 w-4" />
42
- </ToggleGroupItem>
43
- </ToggleGroup>
44
- </ComponentShowcase>
45
-
46
- <div className="space-y-4">
47
- <h3 className="text-xl font-semibold">Props</h3>
48
- <p className="text-sm text-muted-foreground">
49
- The ToggleGroup component is built on top of{' '}
50
- <a
51
- href="https://www.radix-ui.com/primitives/docs/components/toggle-group"
52
- className="underline"
53
- target="_blank"
54
- rel="noreferrer"
55
- >
56
- Radix UI Toggle Group
57
- </a>
58
- .
59
- </p>
60
-
61
- <h4 className="text-lg font-medium mt-6">ToggleGroup (Root)</h4>
62
- <PropsTable
63
- props={[
64
- {
65
- name: 'type',
66
- type: '"single" | "multiple"',
67
- required: true,
68
- description: 'Determines whether a single or multiple items can be pressed at a time.',
69
- },
70
- {
71
- name: 'defaultValue',
72
- type: 'string | string[]',
73
- description: 'The value of the item to show as pressed when initially rendered.',
74
- },
75
- {
76
- name: 'value',
77
- type: 'string | string[]',
78
- description: 'The controlled value of the pressed item.',
79
- },
80
- {
81
- name: 'onValueChange',
82
- type: '(value: string | string[]) => void',
83
- description: 'Event handler called when the value changes.',
84
- },
85
- {
86
- name: 'disabled',
87
- type: 'boolean',
88
- description: 'When true, prevents the user from interacting with the toggle group.',
89
- },
90
- {
91
- name: 'rovingFocus',
92
- type: 'boolean',
93
- defaultValue: 'true',
94
- description: 'When false, roving focus is disabled.',
95
- },
96
- {
97
- name: 'orientation',
98
- type: '"horizontal" | "vertical"',
99
- description: 'The orientation of the component.',
100
- },
101
- {
102
- name: 'dir',
103
- type: '"ltr" | "rtl"',
104
- description: 'The reading direction of the toggle group.',
105
- },
106
- {
107
- name: 'variant',
108
- type: '"default" | "outline"',
109
- defaultValue: '"default"',
110
- description: 'The visual variant of the toggle group.',
111
- },
112
- {
113
- name: 'size',
114
- type: '"default" | "sm" | "lg"',
115
- defaultValue: '"default"',
116
- description: 'The size of the toggle group.',
117
- },
118
- ]}
119
- />
120
-
121
- <h4 className="text-lg font-medium mt-6">ToggleGroupItem</h4>
122
- <PropsTable
123
- props={[
124
- {
125
- name: 'value',
126
- type: 'string',
127
- required: true,
128
- description: 'A unique value for the item.',
129
- },
130
- {
131
- name: 'disabled',
132
- type: 'boolean',
133
- description: 'When true, prevents the user from interacting with the item.',
134
- },
135
- ]}
136
- />
137
- </div>
138
- </>
139
- );
140
- }