@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.
- package/CHANGELOG.md +15 -0
- package/package.json +5 -2
- package/.agent/skills/dogfood-components/SKILL.md +0 -34
- package/.agent/skills/maintain-component/SKILL.md +0 -77
- package/.agent/workflows/native-playground.md +0 -93
- package/.github/CODEOWNERS +0 -2
- package/.github/CONTRIBUTING.md +0 -42
- package/.github/FUNDING.yml +0 -4
- package/.github/PULL_REQUEST_TEMPLATE/build.md +0 -5
- package/.github/PULL_REQUEST_TEMPLATE/standard.md +0 -3
- package/.github/RELEASING.md +0 -37
- package/.github/copilot-instructions.md +0 -61
- package/.github/workflows/ci.yml +0 -91
- package/.github/workflows/codeql-analysis.yml +0 -34
- package/.github/workflows/release-please.yml +0 -79
- package/.husky/pre-commit +0 -1
- package/.prettierignore +0 -3
- package/.release-please-manifest.json +0 -9
- package/.tool-versions +0 -1
- package/.vscode/launch.json +0 -22
- package/.vscode/mcp.json +0 -8
- package/.vscode/settings.json +0 -30
- package/.yarnrc.yml +0 -7
- package/SECURITY.md +0 -9
- package/apps/.gitkeep +0 -0
- package/apps/native-playground/CHANGELOG.md +0 -8
- package/apps/native-playground/app.json +0 -37
- package/apps/native-playground/assets/fonts/.gitkeep +0 -0
- package/apps/native-playground/assets/images/adaptive-icon.png +0 -0
- package/apps/native-playground/assets/images/favicon.png +0 -0
- package/apps/native-playground/assets/images/icon.png +0 -0
- package/apps/native-playground/assets/images/splash-icon.png +0 -0
- package/apps/native-playground/babel.config.js +0 -6
- package/apps/native-playground/eas.json +0 -25
- package/apps/native-playground/index.js +0 -8
- package/apps/native-playground/metro.config.js +0 -26
- package/apps/native-playground/nativewind-env.d.ts +0 -1
- package/apps/native-playground/package.json +0 -23
- package/apps/native-playground/project.json +0 -15
- package/apps/native-playground/src/app/App.tsx +0 -842
- package/apps/native-playground/src/global.css +0 -49
- package/apps/native-playground/tailwind.config.js +0 -49
- package/apps/native-playground/tsconfig.app.json +0 -24
- package/apps/native-playground/tsconfig.json +0 -23
- package/apps/native-playground/tsconfig.spec.json +0 -24
- package/apps/playground-web/CHANGELOG.md +0 -8
- package/apps/playground-web/index.html +0 -13
- package/apps/playground-web/package.json +0 -31
- package/apps/playground-web/public/favicon.png +0 -0
- package/apps/playground-web/public/index.demo.html +0 -40
- package/apps/playground-web/public/logo192.png +0 -0
- package/apps/playground-web/public/logo512.png +0 -0
- package/apps/playground-web/public/manifest.json +0 -25
- package/apps/playground-web/public/robots.txt +0 -2
- package/apps/playground-web/src/App.tsx +0 -179
- package/apps/playground-web/src/components/docs/CodeBlock.tsx +0 -34
- package/apps/playground-web/src/components/docs/CombinedDocsLayout.tsx +0 -103
- package/apps/playground-web/src/components/docs/ComponentShowcase.tsx +0 -96
- package/apps/playground-web/src/components/docs/ErrorBoundary.tsx +0 -55
- package/apps/playground-web/src/components/docs/Footer.tsx +0 -146
- package/apps/playground-web/src/components/docs/PropsTable.tsx +0 -43
- package/apps/playground-web/src/components/docs/Search.tsx +0 -75
- package/apps/playground-web/src/components/docs/Sidebar.tsx +0 -77
- package/apps/playground-web/src/components/docs/ThemeToggle.tsx +0 -19
- package/apps/playground-web/src/components/docs/index.ts +0 -9
- package/apps/playground-web/src/config/docs.ts +0 -293
- package/apps/playground-web/src/globals.css +0 -148
- package/apps/playground-web/src/hooks/useDocMetadata.ts +0 -34
- package/apps/playground-web/src/hooks/usePackageManager.tsx +0 -42
- package/apps/playground-web/src/lib/react-native-shim.js +0 -34
- package/apps/playground-web/src/main.tsx +0 -11
- package/apps/playground-web/src/pages/index.ts +0 -4
- package/apps/playground-web/src/pages/native/AccordionDocs.tsx +0 -85
- package/apps/playground-web/src/pages/native/AlertDialogDocs.tsx +0 -128
- package/apps/playground-web/src/pages/native/AlertDocs.tsx +0 -89
- package/apps/playground-web/src/pages/native/AspectRatioDocs.tsx +0 -52
- package/apps/playground-web/src/pages/native/AvatarDocs.tsx +0 -92
- package/apps/playground-web/src/pages/native/BadgeDocs.tsx +0 -63
- package/apps/playground-web/src/pages/native/BreadcrumbDocs.tsx +0 -71
- package/apps/playground-web/src/pages/native/ButtonDocs.tsx +0 -103
- package/apps/playground-web/src/pages/native/CalendarDocs.tsx +0 -74
- package/apps/playground-web/src/pages/native/CardDocs.tsx +0 -75
- package/apps/playground-web/src/pages/native/CarouselDocs.tsx +0 -113
- package/apps/playground-web/src/pages/native/ChartDocs.tsx +0 -115
- package/apps/playground-web/src/pages/native/CheckboxDocs.tsx +0 -38
- package/apps/playground-web/src/pages/native/CollapsibleDocs.tsx +0 -89
- package/apps/playground-web/src/pages/native/CommandDocs.tsx +0 -170
- package/apps/playground-web/src/pages/native/ContextMenuDocs.tsx +0 -121
- package/apps/playground-web/src/pages/native/DialogDocs.tsx +0 -132
- package/apps/playground-web/src/pages/native/DrawerDocs.tsx +0 -158
- package/apps/playground-web/src/pages/native/DropdownMenuDocs.tsx +0 -168
- package/apps/playground-web/src/pages/native/HoverCardDocs.tsx +0 -119
- package/apps/playground-web/src/pages/native/InputDocs.tsx +0 -86
- package/apps/playground-web/src/pages/native/LabelDocs.tsx +0 -55
- package/apps/playground-web/src/pages/native/MenubarDocs.tsx +0 -197
- package/apps/playground-web/src/pages/native/NavigationMenuDocs.tsx +0 -190
- package/apps/playground-web/src/pages/native/PaginationDocs.tsx +0 -70
- package/apps/playground-web/src/pages/native/PopoverDocs.tsx +0 -156
- package/apps/playground-web/src/pages/native/ProgressDocs.tsx +0 -61
- package/apps/playground-web/src/pages/native/RadioGroupDocs.tsx +0 -125
- package/apps/playground-web/src/pages/native/ResizableDocs.tsx +0 -118
- package/apps/playground-web/src/pages/native/ScrollAreaDocs.tsx +0 -92
- package/apps/playground-web/src/pages/native/SearchDocs.tsx +0 -150
- package/apps/playground-web/src/pages/native/SelectDocs.tsx +0 -141
- package/apps/playground-web/src/pages/native/SeparatorDocs.tsx +0 -72
- package/apps/playground-web/src/pages/native/SheetDocs.tsx +0 -140
- package/apps/playground-web/src/pages/native/SkeletonDocs.tsx +0 -44
- package/apps/playground-web/src/pages/native/SliderDocs.tsx +0 -118
- package/apps/playground-web/src/pages/native/SonnerDocs.tsx +0 -111
- package/apps/playground-web/src/pages/native/SwitchDocs.tsx +0 -87
- package/apps/playground-web/src/pages/native/TableDocs.tsx +0 -67
- package/apps/playground-web/src/pages/native/TabsDocs.tsx +0 -175
- package/apps/playground-web/src/pages/native/TextareaDocs.tsx +0 -61
- package/apps/playground-web/src/pages/native/ThemeToggleDocs.tsx +0 -288
- package/apps/playground-web/src/pages/native/ToastDocs.tsx +0 -124
- package/apps/playground-web/src/pages/native/ToggleDocs.tsx +0 -81
- package/apps/playground-web/src/pages/native/ToggleGroupDocs.tsx +0 -128
- package/apps/playground-web/src/pages/native/TooltipDocs.tsx +0 -140
- package/apps/playground-web/src/pages/native/index.ts +0 -47
- package/apps/playground-web/src/pages/shared/ColorTokensDocs.tsx +0 -234
- package/apps/playground-web/src/pages/shared/GettingStarted.tsx +0 -413
- package/apps/playground-web/src/pages/web/AccordionDocs.tsx +0 -194
- package/apps/playground-web/src/pages/web/AlertDialogDocs.tsx +0 -157
- package/apps/playground-web/src/pages/web/AlertDocs.tsx +0 -110
- package/apps/playground-web/src/pages/web/AspectRatioDocs.tsx +0 -94
- package/apps/playground-web/src/pages/web/AvatarDocs.tsx +0 -81
- package/apps/playground-web/src/pages/web/BadgeDocs.tsx +0 -66
- package/apps/playground-web/src/pages/web/BreadcrumbDocs.tsx +0 -93
- package/apps/playground-web/src/pages/web/ButtonDocs.tsx +0 -129
- package/apps/playground-web/src/pages/web/CalendarDocs.tsx +0 -78
- package/apps/playground-web/src/pages/web/CardDocs.tsx +0 -115
- package/apps/playground-web/src/pages/web/CarouselDocs.tsx +0 -176
- package/apps/playground-web/src/pages/web/ChartDocs.tsx +0 -151
- package/apps/playground-web/src/pages/web/CheckboxDocs.tsx +0 -95
- package/apps/playground-web/src/pages/web/CollapsibleDocs.tsx +0 -111
- package/apps/playground-web/src/pages/web/CommandDocs.tsx +0 -219
- package/apps/playground-web/src/pages/web/ContextMenuDocs.tsx +0 -164
- package/apps/playground-web/src/pages/web/DialogDocs.tsx +0 -175
- package/apps/playground-web/src/pages/web/DrawerDocs.tsx +0 -283
- package/apps/playground-web/src/pages/web/DropdownMenuDocs.tsx +0 -319
- package/apps/playground-web/src/pages/web/FormDocs.tsx +0 -175
- package/apps/playground-web/src/pages/web/HoverCardDocs.tsx +0 -151
- package/apps/playground-web/src/pages/web/InputDocs.tsx +0 -118
- package/apps/playground-web/src/pages/web/LabelDocs.tsx +0 -59
- package/apps/playground-web/src/pages/web/MenubarDocs.tsx +0 -296
- package/apps/playground-web/src/pages/web/NavigationMenuDocs.tsx +0 -263
- package/apps/playground-web/src/pages/web/PaginationDocs.tsx +0 -102
- package/apps/playground-web/src/pages/web/PopoverDocs.tsx +0 -189
- package/apps/playground-web/src/pages/web/ProgressDocs.tsx +0 -70
- package/apps/playground-web/src/pages/web/RadioGroupDocs.tsx +0 -137
- package/apps/playground-web/src/pages/web/ResizableDocs.tsx +0 -143
- package/apps/playground-web/src/pages/web/ScrollAreaDocs.tsx +0 -107
- package/apps/playground-web/src/pages/web/SearchDocs.tsx +0 -203
- package/apps/playground-web/src/pages/web/SelectDocs.tsx +0 -164
- package/apps/playground-web/src/pages/web/SeparatorDocs.tsx +0 -88
- package/apps/playground-web/src/pages/web/SheetDocs.tsx +0 -186
- package/apps/playground-web/src/pages/web/SkeletonDocs.tsx +0 -53
- package/apps/playground-web/src/pages/web/SliderDocs.tsx +0 -119
- package/apps/playground-web/src/pages/web/SonnerDocs.tsx +0 -126
- package/apps/playground-web/src/pages/web/SwitchDocs.tsx +0 -91
- package/apps/playground-web/src/pages/web/TableDocs.tsx +0 -148
- package/apps/playground-web/src/pages/web/TabsDocs.tsx +0 -241
- package/apps/playground-web/src/pages/web/TextareaDocs.tsx +0 -65
- package/apps/playground-web/src/pages/web/ThemeToggleDocs.tsx +0 -303
- package/apps/playground-web/src/pages/web/ToastDocs.tsx +0 -149
- package/apps/playground-web/src/pages/web/ToggleDocs.tsx +0 -85
- package/apps/playground-web/src/pages/web/ToggleGroupDocs.tsx +0 -140
- package/apps/playground-web/src/pages/web/TooltipDocs.tsx +0 -150
- package/apps/playground-web/src/pages/web/index.ts +0 -47
- package/apps/playground-web/src/routes/doc-routes.tsx +0 -363
- package/apps/playground-web/tailwind.config.js +0 -47
- package/apps/playground-web/tsconfig.app.json +0 -16
- package/apps/playground-web/tsconfig.json +0 -4
- package/apps/playground-web/tsconfig.node.json +0 -13
- package/apps/playground-web/vite.config.ts +0 -41
- package/components.json +0 -20
- package/docs/architecture-pivot.md +0 -165
- package/docs/native-setup-decision.md +0 -57
- package/docs/phase-1-tracker.md +0 -144
- package/docs/release-tooling-evaluation.md +0 -67
- package/docs/universal-implementation.md +0 -195
- package/docs/update-plan.md +0 -268
- package/eslint.config.mjs +0 -13
- package/nx.json +0 -50
- package/packages/.gitkeep +0 -0
- package/packages/design-tokens/CHANGELOG.md +0 -8
- package/packages/design-tokens/package.json +0 -20
- package/packages/design-tokens/src/index.ts +0 -35
- package/packages/design-tokens/src/palette.ts +0 -36
- package/packages/design-tokens/src/radii.ts +0 -26
- package/packages/design-tokens/src/shadows.ts +0 -16
- package/packages/design-tokens/src/spacing.ts +0 -33
- package/packages/design-tokens/src/theme.ts +0 -54
- package/packages/design-tokens/src/typography.ts +0 -36
- package/packages/design-tokens/tsconfig.json +0 -17
- package/packages/ui-core/CHANGELOG.md +0 -8
- package/packages/ui-core/package.json +0 -40
- package/packages/ui-core/src/contracts/accordion.ts +0 -23
- package/packages/ui-core/src/contracts/alert-dialog.ts +0 -48
- package/packages/ui-core/src/contracts/alert.ts +0 -17
- package/packages/ui-core/src/contracts/aspect-ratio.ts +0 -7
- package/packages/ui-core/src/contracts/avatar.ts +0 -17
- package/packages/ui-core/src/contracts/badge.ts +0 -7
- package/packages/ui-core/src/contracts/breadcrumb.ts +0 -37
- package/packages/ui-core/src/contracts/button.ts +0 -17
- package/packages/ui-core/src/contracts/calendar.ts +0 -4
- package/packages/ui-core/src/contracts/card.ts +0 -11
- package/packages/ui-core/src/contracts/carousel.ts +0 -29
- package/packages/ui-core/src/contracts/chart.ts +0 -31
- package/packages/ui-core/src/contracts/checkbox.ts +0 -11
- package/packages/ui-core/src/contracts/collapsible.ts +0 -21
- package/packages/ui-core/src/contracts/command.ts +0 -43
- package/packages/ui-core/src/contracts/context-menu.ts +0 -78
- package/packages/ui-core/src/contracts/dialog.ts +0 -29
- package/packages/ui-core/src/contracts/drawer.ts +0 -39
- package/packages/ui-core/src/contracts/dropdown-menu.ts +0 -87
- package/packages/ui-core/src/contracts/form.ts +0 -29
- package/packages/ui-core/src/contracts/hover-card.ts +0 -21
- package/packages/ui-core/src/contracts/input.ts +0 -11
- package/packages/ui-core/src/contracts/label.ts +0 -7
- package/packages/ui-core/src/contracts/menubar.ts +0 -86
- package/packages/ui-core/src/contracts/navigation-menu.ts +0 -55
- package/packages/ui-core/src/contracts/pagination.ts +0 -38
- package/packages/ui-core/src/contracts/popover.ts +0 -28
- package/packages/ui-core/src/contracts/progress.ts +0 -4
- package/packages/ui-core/src/contracts/radio.ts +0 -16
- package/packages/ui-core/src/contracts/resizable.ts +0 -36
- package/packages/ui-core/src/contracts/scroll-area.ts +0 -15
- package/packages/ui-core/src/contracts/search.ts +0 -13
- package/packages/ui-core/src/contracts/select.ts +0 -64
- package/packages/ui-core/src/contracts/separator.ts +0 -5
- package/packages/ui-core/src/contracts/sheet.ts +0 -58
- package/packages/ui-core/src/contracts/skeleton.ts +0 -6
- package/packages/ui-core/src/contracts/slider.ts +0 -15
- package/packages/ui-core/src/contracts/sonner.ts +0 -15
- package/packages/ui-core/src/contracts/switch.ts +0 -11
- package/packages/ui-core/src/contracts/table.ts +0 -41
- package/packages/ui-core/src/contracts/tabs.ts +0 -31
- package/packages/ui-core/src/contracts/text.ts +0 -12
- package/packages/ui-core/src/contracts/textarea.ts +0 -7
- package/packages/ui-core/src/contracts/theme-provider.ts +0 -14
- package/packages/ui-core/src/contracts/theme-toggle.ts +0 -15
- package/packages/ui-core/src/contracts/toast.ts +0 -15
- package/packages/ui-core/src/contracts/toaster.ts +0 -3
- package/packages/ui-core/src/contracts/toggle-group.ts +0 -23
- package/packages/ui-core/src/contracts/toggle.ts +0 -49
- package/packages/ui-core/src/contracts/tooltip.ts +0 -28
- package/packages/ui-core/src/index.ts +0 -327
- package/packages/ui-core/tsconfig.json +0 -18
- package/packages/ui-native/CHANGELOG.md +0 -8
- package/packages/ui-native/package.json +0 -76
- package/packages/ui-native/src/accordion.tsx +0 -93
- package/packages/ui-native/src/alert-dialog.tsx +0 -123
- package/packages/ui-native/src/alert.tsx +0 -50
- package/packages/ui-native/src/aspect-ratio.tsx +0 -9
- package/packages/ui-native/src/avatar.tsx +0 -38
- package/packages/ui-native/src/badge.tsx +0 -51
- package/packages/ui-native/src/breadcrumb.tsx +0 -9
- package/packages/ui-native/src/button.test.tsx +0 -27
- package/packages/ui-native/src/button.tsx +0 -75
- package/packages/ui-native/src/calendar.tsx +0 -9
- package/packages/ui-native/src/card.test.tsx +0 -33
- package/packages/ui-native/src/card.tsx +0 -56
- package/packages/ui-native/src/carousel.tsx +0 -9
- package/packages/ui-native/src/chart.tsx +0 -9
- package/packages/ui-native/src/checkbox.test.tsx +0 -58
- package/packages/ui-native/src/checkbox.tsx +0 -31
- package/packages/ui-native/src/collapsible.test.tsx +0 -50
- package/packages/ui-native/src/collapsible.tsx +0 -15
- package/packages/ui-native/src/command.tsx +0 -9
- package/packages/ui-native/src/context-menu.tsx +0 -9
- package/packages/ui-native/src/dialog.test.tsx +0 -91
- package/packages/ui-native/src/dialog.tsx +0 -121
- package/packages/ui-native/src/drawer.tsx +0 -9
- package/packages/ui-native/src/dropdown-menu.tsx +0 -9
- package/packages/ui-native/src/form.tsx +0 -9
- package/packages/ui-native/src/hover-card.tsx +0 -9
- package/packages/ui-native/src/index.ts +0 -209
- package/packages/ui-native/src/input.test.tsx +0 -27
- package/packages/ui-native/src/input.tsx +0 -27
- package/packages/ui-native/src/label.tsx +0 -29
- package/packages/ui-native/src/lib/render-native.tsx +0 -17
- package/packages/ui-native/src/lib/utils.ts +0 -6
- package/packages/ui-native/src/menubar.tsx +0 -9
- package/packages/ui-native/src/nativewind-env.d.ts +0 -1
- package/packages/ui-native/src/navigation-menu.tsx +0 -9
- package/packages/ui-native/src/pagination.tsx +0 -9
- package/packages/ui-native/src/popover.tsx +0 -9
- package/packages/ui-native/src/progress.tsx +0 -9
- package/packages/ui-native/src/radio-group.test.tsx +0 -77
- package/packages/ui-native/src/radio-group.tsx +0 -42
- package/packages/ui-native/src/resizable.tsx +0 -25
- package/packages/ui-native/src/scroll-area.tsx +0 -9
- package/packages/ui-native/src/search.tsx +0 -17
- package/packages/ui-native/src/select.tsx +0 -229
- package/packages/ui-native/src/separator.tsx +0 -20
- package/packages/ui-native/src/sheet.test.tsx +0 -93
- package/packages/ui-native/src/sheet.tsx +0 -127
- package/packages/ui-native/src/skeleton.test.tsx +0 -29
- package/packages/ui-native/src/skeleton.tsx +0 -31
- package/packages/ui-native/src/slider.tsx +0 -9
- package/packages/ui-native/src/sonner.tsx +0 -9
- package/packages/ui-native/src/switch.tsx +0 -34
- package/packages/ui-native/src/table.tsx +0 -73
- package/packages/ui-native/src/tabs.tsx +0 -74
- package/packages/ui-native/src/text.test.tsx +0 -24
- package/packages/ui-native/src/text.tsx +0 -43
- package/packages/ui-native/src/textarea.test.tsx +0 -27
- package/packages/ui-native/src/textarea.tsx +0 -29
- package/packages/ui-native/src/theme-provider.tsx +0 -6
- package/packages/ui-native/src/theme-toggle.tsx +0 -11
- package/packages/ui-native/src/toast.test.tsx +0 -61
- package/packages/ui-native/src/toast.tsx +0 -88
- package/packages/ui-native/src/toaster.tsx +0 -9
- package/packages/ui-native/src/toggle-group.tsx +0 -78
- package/packages/ui-native/src/toggle.tsx +0 -35
- package/packages/ui-native/src/tooltip.tsx +0 -44
- package/packages/ui-native/tsconfig.json +0 -23
- package/packages/ui-native/vite.config.ts +0 -17
- package/packages/ui-web/CHANGELOG.md +0 -8
- package/packages/ui-web/package.json +0 -84
- package/packages/ui-web/src/accordion.test.tsx +0 -86
- package/packages/ui-web/src/accordion.tsx +0 -58
- package/packages/ui-web/src/alert-dialog.test.tsx +0 -91
- package/packages/ui-web/src/alert-dialog.tsx +0 -121
- package/packages/ui-web/src/alert.test.tsx +0 -47
- package/packages/ui-web/src/alert.tsx +0 -49
- package/packages/ui-web/src/aspect-ratio.test.tsx +0 -34
- package/packages/ui-web/src/aspect-ratio.tsx +0 -7
- package/packages/ui-web/src/avatar.test.tsx +0 -33
- package/packages/ui-web/src/avatar.tsx +0 -40
- package/packages/ui-web/src/badge.test.tsx +0 -24
- package/packages/ui-web/src/badge.tsx +0 -34
- package/packages/ui-web/src/breadcrumb.tsx +0 -105
- package/packages/ui-web/src/button.test.tsx +0 -62
- package/packages/ui-web/src/button.tsx +0 -47
- package/packages/ui-web/src/calendar.test.tsx +0 -23
- package/packages/ui-web/src/calendar.tsx +0 -163
- package/packages/ui-web/src/card.test.tsx +0 -35
- package/packages/ui-web/src/card.tsx +0 -46
- package/packages/ui-web/src/carousel.test.tsx +0 -37
- package/packages/ui-web/src/carousel.tsx +0 -234
- package/packages/ui-web/src/chart.test.tsx +0 -62
- package/packages/ui-web/src/chart.tsx +0 -296
- package/packages/ui-web/src/checkbox.test.tsx +0 -30
- package/packages/ui-web/src/checkbox.tsx +0 -31
- package/packages/ui-web/src/collapsible.test.tsx +0 -51
- package/packages/ui-web/src/collapsible.tsx +0 -15
- package/packages/ui-web/src/command.test.tsx +0 -79
- package/packages/ui-web/src/command.tsx +0 -154
- package/packages/ui-web/src/context-menu.test.tsx +0 -37
- package/packages/ui-web/src/context-menu.tsx +0 -208
- package/packages/ui-web/src/dialog.test.tsx +0 -66
- package/packages/ui-web/src/dialog.tsx +0 -95
- package/packages/ui-web/src/drawer.test.tsx +0 -68
- package/packages/ui-web/src/drawer.tsx +0 -110
- package/packages/ui-web/src/dropdown-menu.test.tsx +0 -93
- package/packages/ui-web/src/dropdown-menu.tsx +0 -212
- package/packages/ui-web/src/form.test.tsx +0 -84
- package/packages/ui-web/src/form.tsx +0 -160
- package/packages/ui-web/src/hooks/use-theme.ts +0 -15
- package/packages/ui-web/src/hooks/use-toast.ts +0 -189
- package/packages/ui-web/src/hover-card.test.tsx +0 -48
- package/packages/ui-web/src/hover-card.tsx +0 -35
- package/packages/ui-web/src/index.ts +0 -474
- package/packages/ui-web/src/input.test.tsx +0 -33
- package/packages/ui-web/src/input.tsx +0 -23
- package/packages/ui-web/src/label.test.tsx +0 -27
- package/packages/ui-web/src/label.tsx +0 -21
- package/packages/ui-web/src/lib/utils.ts +0 -6
- package/packages/ui-web/src/menubar.test.tsx +0 -92
- package/packages/ui-web/src/menubar.tsx +0 -244
- package/packages/ui-web/src/navigation-menu.test.tsx +0 -53
- package/packages/ui-web/src/navigation-menu.tsx +0 -143
- package/packages/ui-web/src/pagination.test.tsx +0 -57
- package/packages/ui-web/src/pagination.tsx +0 -107
- package/packages/ui-web/src/popover.test.tsx +0 -31
- package/packages/ui-web/src/popover.tsx +0 -45
- package/packages/ui-web/src/progress.test.tsx +0 -18
- package/packages/ui-web/src/progress.tsx +0 -28
- package/packages/ui-web/src/radio-group.test.tsx +0 -39
- package/packages/ui-web/src/radio-group.tsx +0 -41
- package/packages/ui-web/src/resizable.test.tsx +0 -23
- package/packages/ui-web/src/resizable.tsx +0 -59
- package/packages/ui-web/src/scroll-area.test.tsx +0 -15
- package/packages/ui-web/src/scroll-area.tsx +0 -42
- package/packages/ui-web/src/search.test.tsx +0 -81
- package/packages/ui-web/src/search.tsx +0 -87
- package/packages/ui-web/src/select.test.tsx +0 -42
- package/packages/ui-web/src/select.tsx +0 -169
- package/packages/ui-web/src/separator.test.tsx +0 -16
- package/packages/ui-web/src/separator.tsx +0 -24
- package/packages/ui-web/src/setupTests.ts +0 -114
- package/packages/ui-web/src/sheet.test.tsx +0 -48
- package/packages/ui-web/src/sheet.tsx +0 -136
- package/packages/ui-web/src/skeleton.test.tsx +0 -13
- package/packages/ui-web/src/skeleton.tsx +0 -10
- package/packages/ui-web/src/slider.test.tsx +0 -18
- package/packages/ui-web/src/slider.tsx +0 -27
- package/packages/ui-web/src/sonner.test.tsx +0 -13
- package/packages/ui-web/src/sonner.tsx +0 -32
- package/packages/ui-web/src/switch.test.tsx +0 -22
- package/packages/ui-web/src/switch.tsx +0 -31
- package/packages/ui-web/src/table.test.tsx +0 -29
- package/packages/ui-web/src/table.tsx +0 -104
- package/packages/ui-web/src/tabs.test.tsx +0 -43
- package/packages/ui-web/src/tabs.tsx +0 -62
- package/packages/ui-web/src/text.test.tsx +0 -34
- package/packages/ui-web/src/text.tsx +0 -55
- package/packages/ui-web/src/textarea.test.tsx +0 -21
- package/packages/ui-web/src/textarea.tsx +0 -25
- package/packages/ui-web/src/theme-provider.tsx +0 -15
- package/packages/ui-web/src/theme-toggle.test.tsx +0 -49
- package/packages/ui-web/src/theme-toggle.tsx +0 -92
- package/packages/ui-web/src/toast.test.tsx +0 -42
- package/packages/ui-web/src/toast.tsx +0 -111
- package/packages/ui-web/src/toaster.tsx +0 -27
- package/packages/ui-web/src/toggle-group.test.tsx +0 -40
- package/packages/ui-web/src/toggle-group.tsx +0 -55
- package/packages/ui-web/src/toggle.test.tsx +0 -21
- package/packages/ui-web/src/toggle.tsx +0 -24
- package/packages/ui-web/src/tooltip.tsx +0 -51
- package/packages/ui-web/tsconfig.json +0 -24
- package/packages/ui-web/vite.config.ts +0 -21
- package/postcss.config.mjs +0 -5
- package/release-please-config.json +0 -60
- package/scripts/build-registry.ts +0 -80
- package/scripts/sync-tokens.ts +0 -86
- package/scripts/validate.ts +0 -74
- package/src/globals.css +0 -146
- package/src/index.ts +0 -4
- package/src/setupTests.ts +0 -47
- package/src/types/nativewind.d.ts +0 -19
- package/tailwind.config.js +0 -48
- package/tsconfig.build.json +0 -22
- package/tsconfig.json +0 -30
- package/tsconfig.node.json +0 -11
- package/vite.config.ts +0 -106
- package/vitest.config.ts +0 -23
- package/wrangler.toml +0 -22
|
@@ -1,107 +0,0 @@
|
|
|
1
|
-
import { ChevronLeft, ChevronRight, MoreHorizontal } from 'lucide-react';
|
|
2
|
-
import * as React from 'react';
|
|
3
|
-
|
|
4
|
-
import {
|
|
5
|
-
PaginationBaseProps,
|
|
6
|
-
PaginationContentBaseProps,
|
|
7
|
-
PaginationEllipsisBaseProps,
|
|
8
|
-
PaginationItemBaseProps,
|
|
9
|
-
PaginationLinkBaseProps,
|
|
10
|
-
PaginationNextBaseProps,
|
|
11
|
-
PaginationPreviousBaseProps,
|
|
12
|
-
} from '@gv-tech/ui-core';
|
|
13
|
-
import { ButtonProps, buttonVariants } from './button';
|
|
14
|
-
import { cn } from './lib/utils';
|
|
15
|
-
|
|
16
|
-
const Pagination = ({ className, ...props }: React.ComponentProps<'nav'> & PaginationBaseProps) => (
|
|
17
|
-
<nav
|
|
18
|
-
role="navigation"
|
|
19
|
-
aria-label="pagination"
|
|
20
|
-
className={cn('mx-auto flex w-full justify-center', className)}
|
|
21
|
-
{...props}
|
|
22
|
-
/>
|
|
23
|
-
);
|
|
24
|
-
Pagination.displayName = 'Pagination';
|
|
25
|
-
|
|
26
|
-
const PaginationContent = React.forwardRef<HTMLUListElement, React.ComponentProps<'ul'> & PaginationContentBaseProps>(
|
|
27
|
-
({ className, ...props }, ref) => (
|
|
28
|
-
<ul ref={ref} className={cn('flex flex-row items-center gap-1', className)} {...props} />
|
|
29
|
-
),
|
|
30
|
-
);
|
|
31
|
-
PaginationContent.displayName = 'PaginationContent';
|
|
32
|
-
|
|
33
|
-
const PaginationItem = React.forwardRef<HTMLLIElement, React.ComponentProps<'li'> & PaginationItemBaseProps>(
|
|
34
|
-
({ className, ...props }, ref) => <li ref={ref} className={cn('', className)} {...props} />,
|
|
35
|
-
);
|
|
36
|
-
PaginationItem.displayName = 'PaginationItem';
|
|
37
|
-
|
|
38
|
-
type PaginationLinkProps = {
|
|
39
|
-
isActive?: boolean;
|
|
40
|
-
} & Pick<ButtonProps, 'size'> &
|
|
41
|
-
React.ComponentProps<'a'> &
|
|
42
|
-
PaginationLinkBaseProps;
|
|
43
|
-
|
|
44
|
-
const PaginationLink = ({ className, isActive, size = 'icon', ...props }: PaginationLinkProps) => (
|
|
45
|
-
<a
|
|
46
|
-
aria-current={isActive ? 'page' : undefined}
|
|
47
|
-
className={cn(
|
|
48
|
-
buttonVariants({
|
|
49
|
-
variant: isActive ? 'outline' : 'ghost',
|
|
50
|
-
size,
|
|
51
|
-
}),
|
|
52
|
-
className,
|
|
53
|
-
)}
|
|
54
|
-
{...props}
|
|
55
|
-
/>
|
|
56
|
-
);
|
|
57
|
-
PaginationLink.displayName = 'PaginationLink';
|
|
58
|
-
|
|
59
|
-
const PaginationPrevious = ({
|
|
60
|
-
className,
|
|
61
|
-
...props
|
|
62
|
-
}: React.ComponentProps<typeof PaginationLink> & PaginationPreviousBaseProps) => (
|
|
63
|
-
<PaginationLink aria-label="Go to previous page" size="default" className={cn('gap-1 pl-2.5', className)} {...props}>
|
|
64
|
-
<ChevronLeft className="h-4 w-4" />
|
|
65
|
-
<span>Previous</span>
|
|
66
|
-
</PaginationLink>
|
|
67
|
-
);
|
|
68
|
-
PaginationPrevious.displayName = 'PaginationPrevious';
|
|
69
|
-
|
|
70
|
-
const PaginationNext = ({
|
|
71
|
-
className,
|
|
72
|
-
...props
|
|
73
|
-
}: React.ComponentProps<typeof PaginationLink> & PaginationNextBaseProps) => (
|
|
74
|
-
<PaginationLink aria-label="Go to next page" size="default" className={cn('gap-1 pr-2.5', className)} {...props}>
|
|
75
|
-
<span>Next</span>
|
|
76
|
-
<ChevronRight className="h-4 w-4" />
|
|
77
|
-
</PaginationLink>
|
|
78
|
-
);
|
|
79
|
-
PaginationNext.displayName = 'PaginationNext';
|
|
80
|
-
|
|
81
|
-
const PaginationEllipsis = ({ className, ...props }: React.ComponentProps<'span'> & PaginationEllipsisBaseProps) => (
|
|
82
|
-
<span aria-hidden className={cn('flex h-9 w-9 items-center justify-center', className)} {...props}>
|
|
83
|
-
<MoreHorizontal className="h-4 w-4" />
|
|
84
|
-
<span className="sr-only">More pages</span>
|
|
85
|
-
</span>
|
|
86
|
-
);
|
|
87
|
-
PaginationEllipsis.displayName = 'PaginationEllipsis';
|
|
88
|
-
|
|
89
|
-
export {
|
|
90
|
-
Pagination,
|
|
91
|
-
PaginationContent,
|
|
92
|
-
PaginationEllipsis,
|
|
93
|
-
PaginationItem,
|
|
94
|
-
PaginationLink,
|
|
95
|
-
PaginationNext,
|
|
96
|
-
PaginationPrevious,
|
|
97
|
-
};
|
|
98
|
-
|
|
99
|
-
export type {
|
|
100
|
-
PaginationContentBaseProps as PaginationContentProps,
|
|
101
|
-
PaginationEllipsisBaseProps as PaginationEllipsisProps,
|
|
102
|
-
PaginationItemBaseProps as PaginationItemProps,
|
|
103
|
-
PaginationLinkProps,
|
|
104
|
-
PaginationNextBaseProps as PaginationNextProps,
|
|
105
|
-
PaginationPreviousBaseProps as PaginationPreviousProps,
|
|
106
|
-
PaginationBaseProps as PaginationProps,
|
|
107
|
-
};
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import { render, screen } from '@testing-library/react';
|
|
2
|
-
import userEvent from '@testing-library/user-event';
|
|
3
|
-
import { describe, expect, it } from 'vitest';
|
|
4
|
-
import { Popover, PopoverContent, PopoverTrigger } from '.';
|
|
5
|
-
|
|
6
|
-
describe('Popover', () => {
|
|
7
|
-
it('renders trigger correctly', () => {
|
|
8
|
-
render(
|
|
9
|
-
<Popover>
|
|
10
|
-
<PopoverTrigger>Open</PopoverTrigger>
|
|
11
|
-
<PopoverContent>Content</PopoverContent>
|
|
12
|
-
</Popover>,
|
|
13
|
-
);
|
|
14
|
-
|
|
15
|
-
expect(screen.getByText('Open')).toBeInTheDocument();
|
|
16
|
-
});
|
|
17
|
-
|
|
18
|
-
it('opens content on click', async () => {
|
|
19
|
-
const user = userEvent.setup();
|
|
20
|
-
render(
|
|
21
|
-
<Popover>
|
|
22
|
-
<PopoverTrigger>Open</PopoverTrigger>
|
|
23
|
-
<PopoverContent>Content</PopoverContent>
|
|
24
|
-
</Popover>,
|
|
25
|
-
);
|
|
26
|
-
|
|
27
|
-
await user.click(screen.getByText('Open'));
|
|
28
|
-
|
|
29
|
-
expect(screen.getByText('Content')).toBeVisible();
|
|
30
|
-
});
|
|
31
|
-
});
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
|
|
3
|
-
import * as PopoverPrimitive from '@radix-ui/react-popover';
|
|
4
|
-
import * as React from 'react';
|
|
5
|
-
|
|
6
|
-
import {
|
|
7
|
-
PopoverAnchorBaseProps,
|
|
8
|
-
PopoverBaseProps,
|
|
9
|
-
PopoverContentBaseProps,
|
|
10
|
-
PopoverTriggerBaseProps,
|
|
11
|
-
} from '@gv-tech/ui-core';
|
|
12
|
-
import { cn } from './lib/utils';
|
|
13
|
-
|
|
14
|
-
const Popover = PopoverPrimitive.Root;
|
|
15
|
-
|
|
16
|
-
const PopoverTrigger = PopoverPrimitive.Trigger;
|
|
17
|
-
|
|
18
|
-
const PopoverAnchor = PopoverPrimitive.Anchor;
|
|
19
|
-
|
|
20
|
-
const PopoverContent = React.forwardRef<
|
|
21
|
-
React.ElementRef<typeof PopoverPrimitive.Content>,
|
|
22
|
-
React.ComponentPropsWithoutRef<typeof PopoverPrimitive.Content> & PopoverContentBaseProps
|
|
23
|
-
>(({ className, align = 'center', sideOffset = 4, ...props }, ref) => (
|
|
24
|
-
<PopoverPrimitive.Portal>
|
|
25
|
-
<PopoverPrimitive.Content
|
|
26
|
-
ref={ref}
|
|
27
|
-
align={align}
|
|
28
|
-
sideOffset={sideOffset}
|
|
29
|
-
className={cn(
|
|
30
|
-
'z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-popover-content-transform-origin]',
|
|
31
|
-
className,
|
|
32
|
-
)}
|
|
33
|
-
{...props}
|
|
34
|
-
/>
|
|
35
|
-
</PopoverPrimitive.Portal>
|
|
36
|
-
));
|
|
37
|
-
PopoverContent.displayName = PopoverPrimitive.Content.displayName;
|
|
38
|
-
|
|
39
|
-
export { Popover, PopoverAnchor, PopoverContent, PopoverTrigger };
|
|
40
|
-
export type {
|
|
41
|
-
PopoverAnchorBaseProps as PopoverAnchorProps,
|
|
42
|
-
PopoverContentBaseProps as PopoverContentProps,
|
|
43
|
-
PopoverBaseProps as PopoverProps,
|
|
44
|
-
PopoverTriggerBaseProps as PopoverTriggerProps,
|
|
45
|
-
};
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { render, screen } from '@testing-library/react';
|
|
2
|
-
import { describe, expect, it } from 'vitest';
|
|
3
|
-
import { Progress } from '.';
|
|
4
|
-
|
|
5
|
-
describe('Progress', () => {
|
|
6
|
-
it('renders correctly', () => {
|
|
7
|
-
render(<Progress value={50} aria-label="progress-bar" />);
|
|
8
|
-
expect(screen.getByRole('progressbar')).toBeInTheDocument();
|
|
9
|
-
expect(screen.getByRole('progressbar')).toHaveAttribute('aria-valuenow', '50');
|
|
10
|
-
});
|
|
11
|
-
|
|
12
|
-
it('renders correctly with no value', () => {
|
|
13
|
-
render(<Progress aria-label="progress-bar" />);
|
|
14
|
-
expect(screen.getByRole('progressbar')).toBeInTheDocument();
|
|
15
|
-
// When value is undefined, Radix UI might behave in specific ways, typically indeterminate or 0.
|
|
16
|
-
// Our wrapper: transform: `translateX(-${100 - (value || 0)}%)` -> -100%
|
|
17
|
-
});
|
|
18
|
-
});
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
|
|
3
|
-
import * as ProgressPrimitive from '@radix-ui/react-progress';
|
|
4
|
-
import * as React from 'react';
|
|
5
|
-
|
|
6
|
-
import { ProgressBaseProps } from '@gv-tech/ui-core';
|
|
7
|
-
import { cn } from './lib/utils';
|
|
8
|
-
|
|
9
|
-
const Progress = React.forwardRef<
|
|
10
|
-
React.ElementRef<typeof ProgressPrimitive.Root>,
|
|
11
|
-
React.ComponentPropsWithoutRef<typeof ProgressPrimitive.Root> & ProgressBaseProps
|
|
12
|
-
>(({ className, value, ...props }, ref) => (
|
|
13
|
-
<ProgressPrimitive.Root
|
|
14
|
-
ref={ref}
|
|
15
|
-
className={cn('relative h-2 w-full overflow-hidden rounded-full bg-primary/20', className)}
|
|
16
|
-
value={value}
|
|
17
|
-
{...props}
|
|
18
|
-
>
|
|
19
|
-
<ProgressPrimitive.Indicator
|
|
20
|
-
className="h-full w-full flex-1 bg-primary transition-all"
|
|
21
|
-
style={{ transform: `translateX(-${100 - (value || 0)}%)` }}
|
|
22
|
-
/>
|
|
23
|
-
</ProgressPrimitive.Root>
|
|
24
|
-
));
|
|
25
|
-
Progress.displayName = ProgressPrimitive.Root.displayName;
|
|
26
|
-
|
|
27
|
-
export { Progress };
|
|
28
|
-
export type { ProgressBaseProps as ProgressProps };
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import { RadioGroup, RadioGroupItem } from '@gv-tech/ui-web';
|
|
2
|
-
import { render, screen } from '@testing-library/react';
|
|
3
|
-
import userEvent from '@testing-library/user-event';
|
|
4
|
-
import { describe, expect, it } from 'vitest';
|
|
5
|
-
|
|
6
|
-
describe('RadioGroup', () => {
|
|
7
|
-
it('renders correctly', () => {
|
|
8
|
-
render(
|
|
9
|
-
<RadioGroup defaultValue="option-one">
|
|
10
|
-
<RadioGroupItem value="option-one" id="option-one" aria-label="Option One" />
|
|
11
|
-
<RadioGroupItem value="option-two" id="option-two" aria-label="Option Two" />
|
|
12
|
-
</RadioGroup>,
|
|
13
|
-
);
|
|
14
|
-
|
|
15
|
-
expect(screen.getByRole('radio', { name: /Option One/i })).toBeInTheDocument();
|
|
16
|
-
// Radix RadioGroup renders standard inputs visually hidden.
|
|
17
|
-
// Testing library query by role 'radio' should find them.
|
|
18
|
-
// However, since we didn't provide labels, we might need to rely on 'checked' state or IDs.
|
|
19
|
-
|
|
20
|
-
const radio1 = screen.getByRole('radio', { checked: true });
|
|
21
|
-
expect(radio1).toBeInTheDocument();
|
|
22
|
-
expect(radio1).toHaveValue('option-one');
|
|
23
|
-
});
|
|
24
|
-
|
|
25
|
-
it('changes value on click', async () => {
|
|
26
|
-
const user = userEvent.setup();
|
|
27
|
-
render(
|
|
28
|
-
<RadioGroup defaultValue="option-one">
|
|
29
|
-
<RadioGroupItem value="option-one" />
|
|
30
|
-
<RadioGroupItem value="option-two" data-testid="radio-two" />
|
|
31
|
-
</RadioGroup>,
|
|
32
|
-
);
|
|
33
|
-
|
|
34
|
-
const radio2 = screen.getByTestId('radio-two');
|
|
35
|
-
await user.click(radio2);
|
|
36
|
-
|
|
37
|
-
expect(radio2).toBeChecked();
|
|
38
|
-
});
|
|
39
|
-
});
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import * as RadioGroupPrimitive from '@radix-ui/react-radio-group';
|
|
2
|
-
import { Circle } from 'lucide-react';
|
|
3
|
-
import * as React from 'react';
|
|
4
|
-
|
|
5
|
-
import type { RadioGroupBaseProps, RadioGroupItemBaseProps } from '@gv-tech/ui-core';
|
|
6
|
-
import { cn } from './lib/utils';
|
|
7
|
-
|
|
8
|
-
export interface RadioGroupProps
|
|
9
|
-
extends React.ComponentPropsWithoutRef<typeof RadioGroupPrimitive.Root>, RadioGroupBaseProps {}
|
|
10
|
-
|
|
11
|
-
const RadioGroup = React.forwardRef<React.ElementRef<typeof RadioGroupPrimitive.Root>, RadioGroupProps>(
|
|
12
|
-
({ className, ...props }, ref) => {
|
|
13
|
-
return <RadioGroupPrimitive.Root className={cn('grid gap-2', className)} {...props} ref={ref} />;
|
|
14
|
-
},
|
|
15
|
-
);
|
|
16
|
-
RadioGroup.displayName = RadioGroupPrimitive.Root.displayName;
|
|
17
|
-
|
|
18
|
-
export interface RadioGroupItemProps
|
|
19
|
-
extends React.ComponentPropsWithoutRef<typeof RadioGroupPrimitive.Item>, RadioGroupItemBaseProps {}
|
|
20
|
-
|
|
21
|
-
const RadioGroupItem = React.forwardRef<React.ElementRef<typeof RadioGroupPrimitive.Item>, RadioGroupItemProps>(
|
|
22
|
-
({ className, ...props }, ref) => {
|
|
23
|
-
return (
|
|
24
|
-
<RadioGroupPrimitive.Item
|
|
25
|
-
ref={ref}
|
|
26
|
-
className={cn(
|
|
27
|
-
'aspect-square h-4 w-4 rounded-full border border-primary text-primary shadow focus:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50',
|
|
28
|
-
className,
|
|
29
|
-
)}
|
|
30
|
-
{...props}
|
|
31
|
-
>
|
|
32
|
-
<RadioGroupPrimitive.Indicator className="flex items-center justify-center">
|
|
33
|
-
<Circle className="h-3.5 w-3.5 fill-primary" />
|
|
34
|
-
</RadioGroupPrimitive.Indicator>
|
|
35
|
-
</RadioGroupPrimitive.Item>
|
|
36
|
-
);
|
|
37
|
-
},
|
|
38
|
-
);
|
|
39
|
-
RadioGroupItem.displayName = RadioGroupPrimitive.Item.displayName;
|
|
40
|
-
|
|
41
|
-
export { RadioGroup, RadioGroupItem };
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { render, screen } from '@testing-library/react';
|
|
2
|
-
import { describe, expect, it } from 'vitest';
|
|
3
|
-
import { ResizableHandle, ResizablePanel, ResizablePanelGroup } from '.';
|
|
4
|
-
|
|
5
|
-
describe('Resizable', () => {
|
|
6
|
-
it('renders correctly', () => {
|
|
7
|
-
// Basic render test
|
|
8
|
-
render(
|
|
9
|
-
<ResizablePanelGroup direction="horizontal">
|
|
10
|
-
<ResizablePanel defaultSize={50}>
|
|
11
|
-
<div>One</div>
|
|
12
|
-
</ResizablePanel>
|
|
13
|
-
<ResizableHandle />
|
|
14
|
-
<ResizablePanel defaultSize={50}>
|
|
15
|
-
<div>Two</div>
|
|
16
|
-
</ResizablePanel>
|
|
17
|
-
</ResizablePanelGroup>,
|
|
18
|
-
);
|
|
19
|
-
|
|
20
|
-
expect(screen.getByText('One')).toBeInTheDocument();
|
|
21
|
-
expect(screen.getByText('Two')).toBeInTheDocument();
|
|
22
|
-
});
|
|
23
|
-
});
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
|
|
3
|
-
import { GripVertical } from 'lucide-react';
|
|
4
|
-
import * as React from 'react';
|
|
5
|
-
import { Group, Panel, Separator } from 'react-resizable-panels';
|
|
6
|
-
|
|
7
|
-
import { ResizableHandleBaseProps, ResizablePanelBaseProps, ResizablePanelGroupBaseProps } from '@gv-tech/ui-core';
|
|
8
|
-
import { cn } from './lib/utils';
|
|
9
|
-
|
|
10
|
-
// Assuming newer version uses PanelGroup/PanelResizeHandle, but user code used Group/Separator.
|
|
11
|
-
// Let's check if PanelGroup exists, if not fallback to Group.
|
|
12
|
-
// Actually, I should inspect the user's code again.
|
|
13
|
-
// User code:
|
|
14
|
-
// const ResizablePanelGroup = ({ ... }: React.ComponentProps<typeof Group> ...
|
|
15
|
-
// const ResizableHandle = ({ ... }: React.ComponentProps<typeof Separator> ...
|
|
16
|
-
|
|
17
|
-
// It seems the user is using an older version or a specific version where Group and Separator are the exports.
|
|
18
|
-
// I will align with user's code.
|
|
19
|
-
|
|
20
|
-
const ResizablePanelGroup = ({
|
|
21
|
-
className,
|
|
22
|
-
direction,
|
|
23
|
-
...props
|
|
24
|
-
}: React.ComponentProps<typeof Group> & ResizablePanelGroupBaseProps) => (
|
|
25
|
-
<Group
|
|
26
|
-
orientation={direction}
|
|
27
|
-
className={cn('flex h-full w-full data-[panel-group-direction=vertical]:flex-col', className)}
|
|
28
|
-
{...props}
|
|
29
|
-
/>
|
|
30
|
-
);
|
|
31
|
-
|
|
32
|
-
const ResizablePanel = Panel;
|
|
33
|
-
|
|
34
|
-
const ResizableHandle = ({
|
|
35
|
-
withHandle,
|
|
36
|
-
className,
|
|
37
|
-
...props
|
|
38
|
-
}: React.ComponentProps<typeof Separator> & ResizableHandleBaseProps) => (
|
|
39
|
-
<Separator
|
|
40
|
-
className={cn(
|
|
41
|
-
'relative flex w-px items-center justify-center bg-border after:absolute after:inset-y-0 after:left-1/2 after:w-1 after:-translate-x-1/2 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1 data-[panel-group-direction=vertical]:h-px data-[panel-group-direction=vertical]:w-full data-[panel-group-direction=vertical]:after:left-0 data-[panel-group-direction=vertical]:after:h-1 data-[panel-group-direction=vertical]:after:w-full data-[panel-group-direction=vertical]:after:-translate-y-1/2 data-[panel-group-direction=vertical]:after:translate-x-0 [&[data-panel-group-direction=vertical]>div]:rotate-90',
|
|
42
|
-
className,
|
|
43
|
-
)}
|
|
44
|
-
{...props}
|
|
45
|
-
>
|
|
46
|
-
{withHandle && (
|
|
47
|
-
<div className="z-10 flex h-4 w-3 items-center justify-center rounded-sm border bg-border">
|
|
48
|
-
<GripVertical className="h-2.5 w-2.5" />
|
|
49
|
-
</div>
|
|
50
|
-
)}
|
|
51
|
-
</Separator>
|
|
52
|
-
);
|
|
53
|
-
|
|
54
|
-
export { ResizableHandle, ResizablePanel, ResizablePanelGroup };
|
|
55
|
-
export type {
|
|
56
|
-
ResizableHandleBaseProps as ResizableHandleProps,
|
|
57
|
-
ResizablePanelGroupBaseProps as ResizablePanelGroupProps,
|
|
58
|
-
ResizablePanelBaseProps as ResizablePanelProps,
|
|
59
|
-
};
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { render, screen } from '@testing-library/react';
|
|
2
|
-
import { describe, expect, it } from 'vitest';
|
|
3
|
-
import { ScrollArea, ScrollBar } from '.';
|
|
4
|
-
|
|
5
|
-
describe('ScrollArea', () => {
|
|
6
|
-
it('renders correctly', () => {
|
|
7
|
-
render(
|
|
8
|
-
<ScrollArea className="h-[200px] w-[350px]">
|
|
9
|
-
<div>Content</div>
|
|
10
|
-
<ScrollBar />
|
|
11
|
-
</ScrollArea>,
|
|
12
|
-
);
|
|
13
|
-
expect(screen.getByText('Content')).toBeInTheDocument();
|
|
14
|
-
});
|
|
15
|
-
});
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
|
|
3
|
-
import * as ScrollAreaPrimitive from '@radix-ui/react-scroll-area';
|
|
4
|
-
import * as React from 'react';
|
|
5
|
-
|
|
6
|
-
import { ScrollAreaBaseProps, ScrollBarBaseProps } from '@gv-tech/ui-core';
|
|
7
|
-
import { cn } from './lib/utils';
|
|
8
|
-
|
|
9
|
-
const ScrollArea = React.forwardRef<
|
|
10
|
-
React.ElementRef<typeof ScrollAreaPrimitive.Root>,
|
|
11
|
-
React.ComponentPropsWithoutRef<typeof ScrollAreaPrimitive.Root> & ScrollAreaBaseProps
|
|
12
|
-
>(({ className, children, ...props }, ref) => (
|
|
13
|
-
<ScrollAreaPrimitive.Root ref={ref} className={cn('relative overflow-hidden', className)} {...props}>
|
|
14
|
-
<ScrollAreaPrimitive.Viewport className="h-full w-full rounded-[inherit]">{children}</ScrollAreaPrimitive.Viewport>
|
|
15
|
-
<ScrollBar />
|
|
16
|
-
<ScrollAreaPrimitive.Corner />
|
|
17
|
-
</ScrollAreaPrimitive.Root>
|
|
18
|
-
));
|
|
19
|
-
ScrollArea.displayName = ScrollAreaPrimitive.Root.displayName;
|
|
20
|
-
|
|
21
|
-
const ScrollBar = React.forwardRef<
|
|
22
|
-
React.ElementRef<typeof ScrollAreaPrimitive.ScrollAreaScrollbar>,
|
|
23
|
-
React.ComponentPropsWithoutRef<typeof ScrollAreaPrimitive.ScrollAreaScrollbar> & ScrollBarBaseProps
|
|
24
|
-
>(({ className, orientation = 'vertical', ...props }, ref) => (
|
|
25
|
-
<ScrollAreaPrimitive.ScrollAreaScrollbar
|
|
26
|
-
ref={ref}
|
|
27
|
-
orientation={orientation}
|
|
28
|
-
className={cn(
|
|
29
|
-
'flex touch-none select-none transition-colors',
|
|
30
|
-
orientation === 'vertical' && 'h-full w-2.5 border-l border-l-transparent p-[1px]',
|
|
31
|
-
orientation === 'horizontal' && 'h-2.5 flex-col border-t border-t-transparent p-[1px]',
|
|
32
|
-
className,
|
|
33
|
-
)}
|
|
34
|
-
{...props}
|
|
35
|
-
>
|
|
36
|
-
<ScrollAreaPrimitive.ScrollAreaThumb className="relative flex-1 rounded-full bg-border" />
|
|
37
|
-
</ScrollAreaPrimitive.ScrollAreaScrollbar>
|
|
38
|
-
));
|
|
39
|
-
ScrollBar.displayName = ScrollAreaPrimitive.ScrollAreaScrollbar.displayName;
|
|
40
|
-
|
|
41
|
-
export { ScrollArea, ScrollBar };
|
|
42
|
-
export type { ScrollAreaBaseProps as ScrollAreaProps, ScrollBarBaseProps as ScrollBarProps };
|
|
@@ -1,81 +0,0 @@
|
|
|
1
|
-
import { fireEvent, render, screen } from '@testing-library/react';
|
|
2
|
-
import * as React from 'react';
|
|
3
|
-
import { describe, expect, it, vi } from 'vitest';
|
|
4
|
-
import { CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, Search, SearchTrigger } from '.';
|
|
5
|
-
|
|
6
|
-
// Mock CommandDialog since it uses Radix Dialog which might need a portal
|
|
7
|
-
vi.mock('@gv-tech/ui-web', async (importOriginal) => {
|
|
8
|
-
const actual = await importOriginal<typeof import('@gv-tech/ui-web')>();
|
|
9
|
-
return {
|
|
10
|
-
...actual,
|
|
11
|
-
Dialog: ({ children, open }: { children: React.ReactNode; open: boolean }) => (open ? <div>{children}</div> : null),
|
|
12
|
-
DialogContent: ({ children }: { children: React.ReactNode }) => <div>{children}</div>,
|
|
13
|
-
DialogPortal: ({ children }: { children: React.ReactNode }) => <div>{children}</div>,
|
|
14
|
-
DialogOverlay: () => null,
|
|
15
|
-
DialogTitle: ({ children }: { children: React.ReactNode }) => <h2>{children}</h2>,
|
|
16
|
-
DialogDescription: ({ children }: { children: React.ReactNode }) => <p>{children}</p>,
|
|
17
|
-
};
|
|
18
|
-
});
|
|
19
|
-
|
|
20
|
-
describe('Search', () => {
|
|
21
|
-
it('renders search trigger', () => {
|
|
22
|
-
render(<SearchTrigger />);
|
|
23
|
-
expect(screen.getByText('Search docs...')).toBeInTheDocument();
|
|
24
|
-
});
|
|
25
|
-
|
|
26
|
-
it('opens search dialog when trigger is clicked (controlled)', () => {
|
|
27
|
-
const onOpenChange = vi.fn();
|
|
28
|
-
render(
|
|
29
|
-
<Search open={false} onOpenChange={onOpenChange}>
|
|
30
|
-
<CommandInput placeholder="Search..." />
|
|
31
|
-
</Search>,
|
|
32
|
-
);
|
|
33
|
-
|
|
34
|
-
// The dialog should be closed initially
|
|
35
|
-
expect(screen.queryByPlaceholderText('Search...')).not.toBeInTheDocument();
|
|
36
|
-
});
|
|
37
|
-
|
|
38
|
-
it('responds to keyboard shortcuts', () => {
|
|
39
|
-
render(
|
|
40
|
-
<Search>
|
|
41
|
-
<CommandInput placeholder="Search..." />
|
|
42
|
-
<CommandList>
|
|
43
|
-
<CommandItem>Result 1</CommandItem>
|
|
44
|
-
</CommandList>
|
|
45
|
-
</Search>,
|
|
46
|
-
);
|
|
47
|
-
|
|
48
|
-
// Simulate Cmd+K
|
|
49
|
-
fireEvent.keyDown(document, { key: 'k', metaKey: true });
|
|
50
|
-
|
|
51
|
-
// Check if dialog content is visible
|
|
52
|
-
expect(screen.getByPlaceholderText('Search...')).toBeInTheDocument();
|
|
53
|
-
});
|
|
54
|
-
|
|
55
|
-
it('filters results correctly', () => {
|
|
56
|
-
render(
|
|
57
|
-
<Search open={true}>
|
|
58
|
-
<CommandInput placeholder="Search..." />
|
|
59
|
-
<CommandList>
|
|
60
|
-
<CommandEmpty>No results.</CommandEmpty>
|
|
61
|
-
<CommandGroup heading="Components">
|
|
62
|
-
<SearchItem>Button</SearchItem>
|
|
63
|
-
<SearchItem>Input</SearchItem>
|
|
64
|
-
</CommandGroup>
|
|
65
|
-
</CommandList>
|
|
66
|
-
</Search>,
|
|
67
|
-
);
|
|
68
|
-
|
|
69
|
-
const input = screen.getByPlaceholderText('Search...');
|
|
70
|
-
fireEvent.change(input, { target: { value: 'But' } });
|
|
71
|
-
|
|
72
|
-
expect(screen.getByText('Button')).toBeInTheDocument();
|
|
73
|
-
// cmdk removes non-matching items from the DOM
|
|
74
|
-
expect(screen.queryByText('Input')).not.toBeInTheDocument();
|
|
75
|
-
});
|
|
76
|
-
});
|
|
77
|
-
|
|
78
|
-
// Helper component for testing
|
|
79
|
-
function SearchItem({ children }: { children: React.ReactNode }) {
|
|
80
|
-
return <CommandItem>{children}</CommandItem>;
|
|
81
|
-
}
|
|
@@ -1,87 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
|
|
3
|
-
import { SearchBaseProps, SearchTriggerBaseProps } from '@gv-tech/ui-core';
|
|
4
|
-
import { Search as SearchIcon } from 'lucide-react';
|
|
5
|
-
import * as React from 'react';
|
|
6
|
-
import { Button } from './button';
|
|
7
|
-
import { CommandDialog } from './command';
|
|
8
|
-
import { cn } from './lib/utils';
|
|
9
|
-
|
|
10
|
-
export type SearchProps = SearchBaseProps;
|
|
11
|
-
|
|
12
|
-
export function Search({ children, open: customOpen, onOpenChange }: SearchProps) {
|
|
13
|
-
const [open, setOpen] = React.useState(false);
|
|
14
|
-
|
|
15
|
-
// If customOpen is provided (controlled), use it. Otherwise use internal state.
|
|
16
|
-
// Note: customOpen can be undefined, so we check explicit undefined check or just rely on contract.
|
|
17
|
-
const isControlled = customOpen !== undefined;
|
|
18
|
-
const isOpen = isControlled ? (customOpen as boolean) : open;
|
|
19
|
-
|
|
20
|
-
// We need a setter that matches Dispatch<SetStateAction<boolean>> roughly,
|
|
21
|
-
// but handles the controlled callback.
|
|
22
|
-
const setIsOpen = React.useCallback(
|
|
23
|
-
(value: boolean | ((prev: boolean) => boolean)) => {
|
|
24
|
-
let nextValue: boolean;
|
|
25
|
-
if (typeof value === 'function') {
|
|
26
|
-
nextValue = value(isOpen);
|
|
27
|
-
} else {
|
|
28
|
-
nextValue = value;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
if (isControlled) {
|
|
32
|
-
onOpenChange?.(nextValue);
|
|
33
|
-
} else {
|
|
34
|
-
setOpen(nextValue);
|
|
35
|
-
}
|
|
36
|
-
},
|
|
37
|
-
[isControlled, isOpen, onOpenChange],
|
|
38
|
-
);
|
|
39
|
-
|
|
40
|
-
React.useEffect(() => {
|
|
41
|
-
const down = (e: KeyboardEvent) => {
|
|
42
|
-
if (e.key === 'k' && (e.metaKey || e.ctrlKey)) {
|
|
43
|
-
e.preventDefault();
|
|
44
|
-
setIsOpen((prev) => !prev);
|
|
45
|
-
}
|
|
46
|
-
};
|
|
47
|
-
|
|
48
|
-
document.addEventListener('keydown', down);
|
|
49
|
-
return () => document.removeEventListener('keydown', down);
|
|
50
|
-
}, [setIsOpen]);
|
|
51
|
-
|
|
52
|
-
return (
|
|
53
|
-
<CommandDialog open={isOpen} onOpenChange={setIsOpen}>
|
|
54
|
-
{children}
|
|
55
|
-
</CommandDialog>
|
|
56
|
-
);
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
export interface SearchTriggerProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, SearchTriggerBaseProps {}
|
|
60
|
-
|
|
61
|
-
export const SearchTrigger = React.forwardRef<HTMLButtonElement, SearchTriggerProps>(
|
|
62
|
-
({ className, placeholder = 'Search docs...', variant = 'default', ...props }, ref) => {
|
|
63
|
-
return (
|
|
64
|
-
<Button
|
|
65
|
-
variant="outline"
|
|
66
|
-
className={cn(
|
|
67
|
-
'relative h-9 text-sm text-muted-foreground transition-all transition-colors',
|
|
68
|
-
variant === 'default'
|
|
69
|
-
? 'w-full justify-start pr-12'
|
|
70
|
-
: 'w-9 justify-center px-0 md:w-40 md:justify-start md:px-3 md:pr-12 lg:w-64',
|
|
71
|
-
className,
|
|
72
|
-
)}
|
|
73
|
-
ref={ref}
|
|
74
|
-
{...props}
|
|
75
|
-
>
|
|
76
|
-
<span className="inline-flex items-center gap-2">
|
|
77
|
-
<SearchIcon className="h-4 w-4 shrink-0" />
|
|
78
|
-
<span className={cn('truncate', variant === 'compact' && 'hidden md:inline')}>{placeholder}</span>
|
|
79
|
-
</span>
|
|
80
|
-
<kbd className="pointer-events-none absolute right-1.5 top-1.5 hidden h-6 select-none items-center gap-1 rounded border bg-muted px-1.5 font-mono text-[10px] font-medium opacity-100 sm:flex">
|
|
81
|
-
<span className="text-xs">⌘</span>K
|
|
82
|
-
</kbd>
|
|
83
|
-
</Button>
|
|
84
|
-
);
|
|
85
|
-
},
|
|
86
|
-
);
|
|
87
|
-
SearchTrigger.displayName = 'SearchTrigger';
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import { render, screen } from '@testing-library/react';
|
|
2
|
-
import userEvent from '@testing-library/user-event';
|
|
3
|
-
import { describe, expect, it } from 'vitest';
|
|
4
|
-
import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from '.';
|
|
5
|
-
|
|
6
|
-
describe('Select', () => {
|
|
7
|
-
it('renders correctly', () => {
|
|
8
|
-
render(
|
|
9
|
-
<Select>
|
|
10
|
-
<SelectTrigger>
|
|
11
|
-
<SelectValue placeholder="Select an option" />
|
|
12
|
-
</SelectTrigger>
|
|
13
|
-
<SelectContent>
|
|
14
|
-
<SelectItem value="option1">Option 1</SelectItem>
|
|
15
|
-
<SelectItem value="option2">Option 2</SelectItem>
|
|
16
|
-
</SelectContent>
|
|
17
|
-
</Select>,
|
|
18
|
-
);
|
|
19
|
-
expect(screen.getByText('Select an option')).toBeInTheDocument();
|
|
20
|
-
});
|
|
21
|
-
|
|
22
|
-
it('opens and selects an option', async () => {
|
|
23
|
-
const user = userEvent.setup();
|
|
24
|
-
render(
|
|
25
|
-
<Select>
|
|
26
|
-
<SelectTrigger>
|
|
27
|
-
<SelectValue placeholder="Select an option" />
|
|
28
|
-
</SelectTrigger>
|
|
29
|
-
<SelectContent>
|
|
30
|
-
<SelectItem value="option1">Option 1</SelectItem>
|
|
31
|
-
<SelectItem value="option2">Option 2</SelectItem>
|
|
32
|
-
</SelectContent>
|
|
33
|
-
</Select>,
|
|
34
|
-
);
|
|
35
|
-
|
|
36
|
-
await user.click(screen.getByRole('combobox'));
|
|
37
|
-
expect(screen.getByText('Option 1')).toBeVisible();
|
|
38
|
-
|
|
39
|
-
await user.click(screen.getByText('Option 1'));
|
|
40
|
-
expect(screen.getByText('Option 1')).toBeInTheDocument();
|
|
41
|
-
});
|
|
42
|
-
});
|