@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,121 +0,0 @@
|
|
|
1
|
-
import * as AlertDialogPrimitive from '@radix-ui/react-alert-dialog';
|
|
2
|
-
import * as React from 'react';
|
|
3
|
-
|
|
4
|
-
import {
|
|
5
|
-
AlertDialogActionBaseProps,
|
|
6
|
-
AlertDialogBaseProps,
|
|
7
|
-
AlertDialogCancelBaseProps,
|
|
8
|
-
AlertDialogContentBaseProps,
|
|
9
|
-
AlertDialogDescriptionBaseProps,
|
|
10
|
-
AlertDialogFooterBaseProps,
|
|
11
|
-
AlertDialogHeaderBaseProps,
|
|
12
|
-
AlertDialogTitleBaseProps,
|
|
13
|
-
} from '@gv-tech/ui-core';
|
|
14
|
-
import { buttonVariants } from './button';
|
|
15
|
-
import { cn } from './lib/utils';
|
|
16
|
-
|
|
17
|
-
const AlertDialog = AlertDialogPrimitive.Root;
|
|
18
|
-
|
|
19
|
-
const AlertDialogTrigger = AlertDialogPrimitive.Trigger;
|
|
20
|
-
|
|
21
|
-
const AlertDialogPortal = AlertDialogPrimitive.Portal;
|
|
22
|
-
|
|
23
|
-
const AlertDialogOverlay = React.forwardRef<
|
|
24
|
-
React.ElementRef<typeof AlertDialogPrimitive.Overlay>,
|
|
25
|
-
React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Overlay>
|
|
26
|
-
>(({ className, ...props }, ref) => (
|
|
27
|
-
<AlertDialogPrimitive.Overlay
|
|
28
|
-
className={cn(
|
|
29
|
-
'fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0',
|
|
30
|
-
className,
|
|
31
|
-
)}
|
|
32
|
-
{...props}
|
|
33
|
-
ref={ref}
|
|
34
|
-
/>
|
|
35
|
-
));
|
|
36
|
-
AlertDialogOverlay.displayName = AlertDialogPrimitive.Overlay.displayName;
|
|
37
|
-
|
|
38
|
-
const AlertDialogContent = React.forwardRef<
|
|
39
|
-
React.ElementRef<typeof AlertDialogPrimitive.Content>,
|
|
40
|
-
React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Content> & AlertDialogContentBaseProps
|
|
41
|
-
>(({ className, ...props }, ref) => (
|
|
42
|
-
<AlertDialogPortal>
|
|
43
|
-
<AlertDialogOverlay />
|
|
44
|
-
<AlertDialogPrimitive.Content
|
|
45
|
-
ref={ref}
|
|
46
|
-
className={cn(
|
|
47
|
-
'fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 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-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg',
|
|
48
|
-
className,
|
|
49
|
-
)}
|
|
50
|
-
{...props}
|
|
51
|
-
/>
|
|
52
|
-
</AlertDialogPortal>
|
|
53
|
-
));
|
|
54
|
-
AlertDialogContent.displayName = AlertDialogPrimitive.Content.displayName;
|
|
55
|
-
|
|
56
|
-
const AlertDialogHeader = ({
|
|
57
|
-
className,
|
|
58
|
-
...props
|
|
59
|
-
}: React.HTMLAttributes<HTMLDivElement> & AlertDialogHeaderBaseProps) => (
|
|
60
|
-
<div className={cn('flex flex-col space-y-2 text-center sm:text-left', className)} {...props} />
|
|
61
|
-
);
|
|
62
|
-
AlertDialogHeader.displayName = 'AlertDialogHeader';
|
|
63
|
-
|
|
64
|
-
const AlertDialogFooter = ({
|
|
65
|
-
className,
|
|
66
|
-
...props
|
|
67
|
-
}: React.HTMLAttributes<HTMLDivElement> & AlertDialogFooterBaseProps) => (
|
|
68
|
-
<div className={cn('flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2', className)} {...props} />
|
|
69
|
-
);
|
|
70
|
-
AlertDialogFooter.displayName = 'AlertDialogFooter';
|
|
71
|
-
|
|
72
|
-
const AlertDialogTitle = React.forwardRef<
|
|
73
|
-
React.ElementRef<typeof AlertDialogPrimitive.Title>,
|
|
74
|
-
React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Title> & AlertDialogTitleBaseProps
|
|
75
|
-
>(({ className, ...props }, ref) => (
|
|
76
|
-
<AlertDialogPrimitive.Title ref={ref} className={cn('text-lg font-semibold', className)} {...props} />
|
|
77
|
-
));
|
|
78
|
-
AlertDialogTitle.displayName = AlertDialogPrimitive.Title.displayName;
|
|
79
|
-
|
|
80
|
-
const AlertDialogDescription = React.forwardRef<
|
|
81
|
-
React.ElementRef<typeof AlertDialogPrimitive.Description>,
|
|
82
|
-
React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Description> & AlertDialogDescriptionBaseProps
|
|
83
|
-
>(({ className, ...props }, ref) => (
|
|
84
|
-
<AlertDialogPrimitive.Description ref={ref} className={cn('text-sm text-muted-foreground', className)} {...props} />
|
|
85
|
-
));
|
|
86
|
-
AlertDialogDescription.displayName = AlertDialogPrimitive.Description.displayName;
|
|
87
|
-
|
|
88
|
-
const AlertDialogAction = React.forwardRef<
|
|
89
|
-
React.ElementRef<typeof AlertDialogPrimitive.Action>,
|
|
90
|
-
React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Action> & AlertDialogActionBaseProps
|
|
91
|
-
>(({ className, ...props }, ref) => (
|
|
92
|
-
<AlertDialogPrimitive.Action ref={ref} className={cn(buttonVariants(), className)} {...props} />
|
|
93
|
-
));
|
|
94
|
-
AlertDialogAction.displayName = AlertDialogPrimitive.Action.displayName;
|
|
95
|
-
|
|
96
|
-
const AlertDialogCancel = React.forwardRef<
|
|
97
|
-
React.ElementRef<typeof AlertDialogPrimitive.Cancel>,
|
|
98
|
-
React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Cancel> & AlertDialogCancelBaseProps
|
|
99
|
-
>(({ className, ...props }, ref) => (
|
|
100
|
-
<AlertDialogPrimitive.Cancel
|
|
101
|
-
ref={ref}
|
|
102
|
-
className={cn(buttonVariants({ variant: 'outline' }), 'mt-2 sm:mt-0', className)}
|
|
103
|
-
{...props}
|
|
104
|
-
/>
|
|
105
|
-
));
|
|
106
|
-
AlertDialogCancel.displayName = AlertDialogPrimitive.Cancel.displayName;
|
|
107
|
-
|
|
108
|
-
export {
|
|
109
|
-
AlertDialog,
|
|
110
|
-
AlertDialogAction,
|
|
111
|
-
AlertDialogCancel,
|
|
112
|
-
AlertDialogContent,
|
|
113
|
-
AlertDialogDescription,
|
|
114
|
-
AlertDialogFooter,
|
|
115
|
-
AlertDialogHeader,
|
|
116
|
-
AlertDialogOverlay,
|
|
117
|
-
AlertDialogPortal,
|
|
118
|
-
AlertDialogTitle,
|
|
119
|
-
AlertDialogTrigger,
|
|
120
|
-
};
|
|
121
|
-
export type { AlertDialogBaseProps as AlertDialogProps };
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
import { render, screen } from '@testing-library/react';
|
|
2
|
-
import { describe, expect, it } from 'vitest';
|
|
3
|
-
import { Alert, AlertDescription, AlertTitle } from './alert';
|
|
4
|
-
|
|
5
|
-
describe('Alert', () => {
|
|
6
|
-
it('renders correctly', () => {
|
|
7
|
-
render(
|
|
8
|
-
<Alert>
|
|
9
|
-
<AlertTitle>Heads up!</AlertTitle>
|
|
10
|
-
<AlertDescription>You can add components to your app using the cli.</AlertDescription>
|
|
11
|
-
</Alert>,
|
|
12
|
-
);
|
|
13
|
-
|
|
14
|
-
const alert = screen.getByRole('alert');
|
|
15
|
-
expect(alert).toBeInTheDocument();
|
|
16
|
-
expect(screen.getByText('Heads up!')).toBeInTheDocument();
|
|
17
|
-
expect(screen.getByText('You can add components to your app using the cli.')).toBeInTheDocument();
|
|
18
|
-
});
|
|
19
|
-
|
|
20
|
-
it('renders destructive variant', () => {
|
|
21
|
-
render(
|
|
22
|
-
<Alert variant="destructive">
|
|
23
|
-
<AlertTitle>Error</AlertTitle>
|
|
24
|
-
<AlertDescription>Your session has expired.</AlertDescription>
|
|
25
|
-
</Alert>,
|
|
26
|
-
);
|
|
27
|
-
|
|
28
|
-
const alert = screen.getByRole('alert');
|
|
29
|
-
expect(alert).toBeInTheDocument();
|
|
30
|
-
expect(alert).toHaveClass('border-destructive/50');
|
|
31
|
-
expect(alert).toHaveClass('text-destructive');
|
|
32
|
-
});
|
|
33
|
-
|
|
34
|
-
it('renders info variant', () => {
|
|
35
|
-
render(
|
|
36
|
-
<Alert variant="info">
|
|
37
|
-
<AlertTitle>Info</AlertTitle>
|
|
38
|
-
<AlertDescription>This is an informational message.</AlertDescription>
|
|
39
|
-
</Alert>,
|
|
40
|
-
);
|
|
41
|
-
|
|
42
|
-
const alert = screen.getByRole('alert');
|
|
43
|
-
expect(alert).toBeInTheDocument();
|
|
44
|
-
expect(alert).toHaveClass('border-blue-500/50');
|
|
45
|
-
expect(alert).toHaveClass('text-blue-600');
|
|
46
|
-
});
|
|
47
|
-
});
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
import { cva, type VariantProps } from 'class-variance-authority';
|
|
2
|
-
import * as React from 'react';
|
|
3
|
-
|
|
4
|
-
import { AlertBaseProps, AlertDescriptionBaseProps, AlertTitleBaseProps } from '@gv-tech/ui-core';
|
|
5
|
-
import { cn } from './lib/utils';
|
|
6
|
-
|
|
7
|
-
const alertVariants = cva(
|
|
8
|
-
'relative w-full rounded-lg border px-4 py-3 text-sm [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground [&>svg~*]:pl-7',
|
|
9
|
-
{
|
|
10
|
-
variants: {
|
|
11
|
-
variant: {
|
|
12
|
-
default: 'bg-background text-foreground',
|
|
13
|
-
destructive: 'border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive',
|
|
14
|
-
warning:
|
|
15
|
-
'border-amber-500/50 bg-amber-500/10 text-amber-600 dark:text-amber-400 [&>svg]:text-amber-600 dark:[&>svg]:text-amber-400',
|
|
16
|
-
info: 'border-blue-500/50 bg-blue-500/10 text-blue-600 dark:text-blue-400 [&>svg]:text-blue-600 dark:[&>svg]:text-blue-400',
|
|
17
|
-
},
|
|
18
|
-
},
|
|
19
|
-
defaultVariants: {
|
|
20
|
-
variant: 'default',
|
|
21
|
-
},
|
|
22
|
-
},
|
|
23
|
-
);
|
|
24
|
-
|
|
25
|
-
const Alert = React.forwardRef<
|
|
26
|
-
HTMLDivElement,
|
|
27
|
-
React.HTMLAttributes<HTMLDivElement> & AlertBaseProps & VariantProps<typeof alertVariants>
|
|
28
|
-
>(({ className, variant, ...props }, ref) => (
|
|
29
|
-
<div ref={ref} role="alert" className={cn(alertVariants({ variant }), className)} {...props} />
|
|
30
|
-
));
|
|
31
|
-
Alert.displayName = 'Alert';
|
|
32
|
-
|
|
33
|
-
const AlertTitle = React.forwardRef<HTMLHeadingElement, React.HTMLAttributes<HTMLHeadingElement> & AlertTitleBaseProps>(
|
|
34
|
-
({ className, ...props }, ref) => (
|
|
35
|
-
<h5 ref={ref} className={cn('mb-1 font-medium leading-none tracking-tight', className)} {...props} />
|
|
36
|
-
),
|
|
37
|
-
);
|
|
38
|
-
AlertTitle.displayName = 'AlertTitle';
|
|
39
|
-
|
|
40
|
-
const AlertDescription = React.forwardRef<
|
|
41
|
-
HTMLDivElement,
|
|
42
|
-
React.HTMLAttributes<HTMLDivElement> & AlertDescriptionBaseProps
|
|
43
|
-
>(({ className, ...props }, ref) => (
|
|
44
|
-
<div ref={ref} className={cn('text-sm [&_p]:leading-relaxed', className)} {...props} />
|
|
45
|
-
));
|
|
46
|
-
AlertDescription.displayName = 'AlertDescription';
|
|
47
|
-
|
|
48
|
-
export { Alert, AlertDescription, AlertTitle };
|
|
49
|
-
export type { AlertBaseProps as AlertProps };
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import { render, screen } from '@testing-library/react';
|
|
2
|
-
import { describe, expect, it } from 'vitest';
|
|
3
|
-
import { AspectRatio } from '.';
|
|
4
|
-
|
|
5
|
-
describe('AspectRatio', () => {
|
|
6
|
-
it('renders correctly', () => {
|
|
7
|
-
const { container } = render(
|
|
8
|
-
<AspectRatio ratio={16 / 9}>
|
|
9
|
-
<img src="test.jpg" alt="test" />
|
|
10
|
-
</AspectRatio>,
|
|
11
|
-
);
|
|
12
|
-
|
|
13
|
-
const img = screen.getByRole('img');
|
|
14
|
-
expect(img).toBeInTheDocument();
|
|
15
|
-
|
|
16
|
-
// Radix AspectRatio renders a wrapper with padding-bottom based on ratio
|
|
17
|
-
// We can check if the wrapper style is applied
|
|
18
|
-
const wrapper = container.firstChild;
|
|
19
|
-
expect(wrapper).toHaveStyle({ paddingBottom: expect.stringMatching(/%$/) });
|
|
20
|
-
});
|
|
21
|
-
|
|
22
|
-
it('renders with custom ratio', () => {
|
|
23
|
-
const { container } = render(
|
|
24
|
-
<AspectRatio ratio={1 / 1}>
|
|
25
|
-
<div>Square</div>
|
|
26
|
-
</AspectRatio>,
|
|
27
|
-
);
|
|
28
|
-
|
|
29
|
-
expect(screen.getByText('Square')).toBeInTheDocument();
|
|
30
|
-
const wrapper = container.firstChild;
|
|
31
|
-
// 1/1 ratio should be 100% padding-bottom
|
|
32
|
-
expect(wrapper).toHaveStyle({ paddingBottom: '100%' });
|
|
33
|
-
});
|
|
34
|
-
});
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import { render, screen } from '@testing-library/react';
|
|
2
|
-
import { describe, expect, it } from 'vitest';
|
|
3
|
-
import { Avatar, AvatarFallback, AvatarImage } from './avatar';
|
|
4
|
-
|
|
5
|
-
describe('Avatar', () => {
|
|
6
|
-
it('renders correctly', () => {
|
|
7
|
-
render(
|
|
8
|
-
<Avatar>
|
|
9
|
-
<AvatarImage src="https://github.com/shadcn.png" alt="@shadcn" />
|
|
10
|
-
<AvatarFallback>CN</AvatarFallback>
|
|
11
|
-
</Avatar>,
|
|
12
|
-
);
|
|
13
|
-
|
|
14
|
-
// In JSDOM, image loading might not happen immediately or at all without mocking.
|
|
15
|
-
// However, the elements should be in the DOM.
|
|
16
|
-
// Radix conditionally renders Image or Fallback.
|
|
17
|
-
// By default, it might render Image and hide Fallback, or vice versa depending on loading.
|
|
18
|
-
|
|
19
|
-
// Let's check that the root is present
|
|
20
|
-
const avatar = screen.getByText('CN')?.parentElement || screen.getByRole('img').parentElement;
|
|
21
|
-
expect(avatar).toBeInTheDocument();
|
|
22
|
-
});
|
|
23
|
-
|
|
24
|
-
it('renders fallback when image is missing', () => {
|
|
25
|
-
render(
|
|
26
|
-
<Avatar>
|
|
27
|
-
<AvatarFallback>CN</AvatarFallback>
|
|
28
|
-
</Avatar>,
|
|
29
|
-
);
|
|
30
|
-
|
|
31
|
-
expect(screen.getByText('CN')).toBeInTheDocument();
|
|
32
|
-
});
|
|
33
|
-
});
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import * as AvatarPrimitive from '@radix-ui/react-avatar';
|
|
2
|
-
import * as React from 'react';
|
|
3
|
-
|
|
4
|
-
import { AvatarBaseProps, AvatarFallbackBaseProps, AvatarImageBaseProps } from '@gv-tech/ui-core';
|
|
5
|
-
import { cn } from './lib/utils';
|
|
6
|
-
|
|
7
|
-
const Avatar = React.forwardRef<
|
|
8
|
-
React.ElementRef<typeof AvatarPrimitive.Root>,
|
|
9
|
-
React.ComponentPropsWithoutRef<typeof AvatarPrimitive.Root> & AvatarBaseProps
|
|
10
|
-
>(({ className, ...props }, ref) => (
|
|
11
|
-
<AvatarPrimitive.Root
|
|
12
|
-
ref={ref}
|
|
13
|
-
className={cn('relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full', className)}
|
|
14
|
-
{...props}
|
|
15
|
-
/>
|
|
16
|
-
));
|
|
17
|
-
Avatar.displayName = AvatarPrimitive.Root.displayName;
|
|
18
|
-
|
|
19
|
-
const AvatarImage = React.forwardRef<
|
|
20
|
-
React.ElementRef<typeof AvatarPrimitive.Image>,
|
|
21
|
-
React.ComponentPropsWithoutRef<typeof AvatarPrimitive.Image> & AvatarImageBaseProps
|
|
22
|
-
>(({ className, ...props }, ref) => (
|
|
23
|
-
<AvatarPrimitive.Image ref={ref} className={cn('aspect-square h-full w-full', className)} {...props} />
|
|
24
|
-
));
|
|
25
|
-
AvatarImage.displayName = AvatarPrimitive.Image.displayName;
|
|
26
|
-
|
|
27
|
-
const AvatarFallback = React.forwardRef<
|
|
28
|
-
React.ElementRef<typeof AvatarPrimitive.Fallback>,
|
|
29
|
-
React.ComponentPropsWithoutRef<typeof AvatarPrimitive.Fallback> & AvatarFallbackBaseProps
|
|
30
|
-
>(({ className, ...props }, ref) => (
|
|
31
|
-
<AvatarPrimitive.Fallback
|
|
32
|
-
ref={ref}
|
|
33
|
-
className={cn('flex h-full w-full items-center justify-center rounded-full bg-muted', className)}
|
|
34
|
-
{...props}
|
|
35
|
-
/>
|
|
36
|
-
));
|
|
37
|
-
AvatarFallback.displayName = AvatarPrimitive.Fallback.displayName;
|
|
38
|
-
|
|
39
|
-
export { Avatar, AvatarFallback, AvatarImage };
|
|
40
|
-
export type { AvatarBaseProps as AvatarProps };
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { render, screen } from '@testing-library/react';
|
|
2
|
-
import { describe, expect, it } from 'vitest';
|
|
3
|
-
import { Badge } from './badge';
|
|
4
|
-
|
|
5
|
-
describe('Badge', () => {
|
|
6
|
-
it('renders correctly', () => {
|
|
7
|
-
render(<Badge>Test Badge</Badge>);
|
|
8
|
-
expect(screen.getByText('Test Badge')).toBeInTheDocument();
|
|
9
|
-
});
|
|
10
|
-
|
|
11
|
-
it('renders variants', () => {
|
|
12
|
-
const { rerender, getByText } = render(<Badge variant="default">Default</Badge>);
|
|
13
|
-
expect(getByText('Default')).toHaveClass('bg-primary');
|
|
14
|
-
|
|
15
|
-
rerender(<Badge variant="secondary">Secondary</Badge>);
|
|
16
|
-
expect(getByText('Secondary')).toHaveClass('bg-secondary');
|
|
17
|
-
|
|
18
|
-
rerender(<Badge variant="destructive">Destructive</Badge>);
|
|
19
|
-
expect(getByText('Destructive')).toHaveClass('bg-destructive');
|
|
20
|
-
|
|
21
|
-
rerender(<Badge variant="outline">Outline</Badge>);
|
|
22
|
-
expect(getByText('Outline')).toHaveClass('text-foreground');
|
|
23
|
-
});
|
|
24
|
-
});
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import { cva, type VariantProps } from 'class-variance-authority';
|
|
2
|
-
import * as React from 'react';
|
|
3
|
-
|
|
4
|
-
import { BadgeBaseProps } from '@gv-tech/ui-core';
|
|
5
|
-
import { cn } from './lib/utils';
|
|
6
|
-
|
|
7
|
-
const badgeVariants = cva(
|
|
8
|
-
'inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2',
|
|
9
|
-
{
|
|
10
|
-
variants: {
|
|
11
|
-
variant: {
|
|
12
|
-
default: 'border-transparent bg-primary text-primary-foreground shadow hover:bg-primary/80',
|
|
13
|
-
secondary: 'border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80',
|
|
14
|
-
destructive: 'border-transparent bg-destructive text-destructive-foreground shadow hover:bg-destructive/80',
|
|
15
|
-
outline: 'text-foreground',
|
|
16
|
-
},
|
|
17
|
-
},
|
|
18
|
-
defaultVariants: {
|
|
19
|
-
variant: 'default',
|
|
20
|
-
},
|
|
21
|
-
},
|
|
22
|
-
);
|
|
23
|
-
|
|
24
|
-
export interface BadgeProps
|
|
25
|
-
extends
|
|
26
|
-
Omit<React.HTMLAttributes<HTMLDivElement>, 'variant'>,
|
|
27
|
-
Omit<BadgeBaseProps, 'variant'>,
|
|
28
|
-
VariantProps<typeof badgeVariants> {}
|
|
29
|
-
|
|
30
|
-
function Badge({ className, variant, ...props }: BadgeProps) {
|
|
31
|
-
return <div className={cn(badgeVariants({ variant }), className)} {...props} />;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
export { Badge, badgeVariants };
|
|
@@ -1,105 +0,0 @@
|
|
|
1
|
-
import { Slot } from '@radix-ui/react-slot';
|
|
2
|
-
import { ChevronRight, MoreHorizontal } from 'lucide-react';
|
|
3
|
-
import * as React from 'react';
|
|
4
|
-
|
|
5
|
-
import {
|
|
6
|
-
BreadcrumbBaseProps,
|
|
7
|
-
BreadcrumbEllipsisBaseProps,
|
|
8
|
-
BreadcrumbItemBaseProps,
|
|
9
|
-
BreadcrumbLinkBaseProps,
|
|
10
|
-
BreadcrumbListBaseProps,
|
|
11
|
-
BreadcrumbPageBaseProps,
|
|
12
|
-
BreadcrumbSeparatorBaseProps,
|
|
13
|
-
} from '@gv-tech/ui-core';
|
|
14
|
-
import { cn } from './lib/utils';
|
|
15
|
-
|
|
16
|
-
const Breadcrumb = React.forwardRef<
|
|
17
|
-
HTMLElement,
|
|
18
|
-
React.ComponentPropsWithoutRef<'nav'> &
|
|
19
|
-
BreadcrumbBaseProps & {
|
|
20
|
-
separator?: React.ReactNode;
|
|
21
|
-
}
|
|
22
|
-
>(({ ...props }, ref) => <nav ref={ref} aria-label="breadcrumb" {...props} />);
|
|
23
|
-
Breadcrumb.displayName = 'Breadcrumb';
|
|
24
|
-
|
|
25
|
-
const BreadcrumbList = React.forwardRef<
|
|
26
|
-
HTMLOListElement,
|
|
27
|
-
React.ComponentPropsWithoutRef<'ol'> & BreadcrumbListBaseProps
|
|
28
|
-
>(({ className, ...props }, ref) => (
|
|
29
|
-
<ol
|
|
30
|
-
ref={ref}
|
|
31
|
-
className={cn(
|
|
32
|
-
'flex flex-wrap items-center gap-1.5 break-words text-sm text-muted-foreground sm:gap-2.5',
|
|
33
|
-
className,
|
|
34
|
-
)}
|
|
35
|
-
{...props}
|
|
36
|
-
/>
|
|
37
|
-
));
|
|
38
|
-
BreadcrumbList.displayName = 'BreadcrumbList';
|
|
39
|
-
|
|
40
|
-
const BreadcrumbItem = React.forwardRef<HTMLLIElement, React.ComponentPropsWithoutRef<'li'> & BreadcrumbItemBaseProps>(
|
|
41
|
-
({ className, ...props }, ref) => (
|
|
42
|
-
<li ref={ref} className={cn('inline-flex items-center gap-1.5', className)} {...props} />
|
|
43
|
-
),
|
|
44
|
-
);
|
|
45
|
-
BreadcrumbItem.displayName = 'BreadcrumbItem';
|
|
46
|
-
|
|
47
|
-
const BreadcrumbLink = React.forwardRef<
|
|
48
|
-
HTMLAnchorElement,
|
|
49
|
-
React.ComponentPropsWithoutRef<'a'> & BreadcrumbLinkBaseProps
|
|
50
|
-
>(({ asChild, className, ...props }, ref) => {
|
|
51
|
-
const Comp = asChild ? Slot : 'a';
|
|
52
|
-
|
|
53
|
-
return <Comp ref={ref} className={cn('transition-colors hover:text-foreground', className)} {...props} />;
|
|
54
|
-
});
|
|
55
|
-
BreadcrumbLink.displayName = 'BreadcrumbLink';
|
|
56
|
-
|
|
57
|
-
const BreadcrumbPage = React.forwardRef<
|
|
58
|
-
HTMLSpanElement,
|
|
59
|
-
React.ComponentPropsWithoutRef<'span'> & BreadcrumbPageBaseProps
|
|
60
|
-
>(({ className, ...props }, ref) => (
|
|
61
|
-
<span
|
|
62
|
-
ref={ref}
|
|
63
|
-
role="link"
|
|
64
|
-
aria-disabled="true"
|
|
65
|
-
aria-current="page"
|
|
66
|
-
className={cn('font-normal text-foreground', className)}
|
|
67
|
-
{...props}
|
|
68
|
-
/>
|
|
69
|
-
));
|
|
70
|
-
BreadcrumbPage.displayName = 'BreadcrumbPage';
|
|
71
|
-
|
|
72
|
-
const BreadcrumbSeparator = ({
|
|
73
|
-
children,
|
|
74
|
-
className,
|
|
75
|
-
...props
|
|
76
|
-
}: React.ComponentProps<'li'> & BreadcrumbSeparatorBaseProps) => (
|
|
77
|
-
<li role="presentation" aria-hidden="true" className={cn('[&>svg]:w-3.5 [&>svg]:h-3.5', className)} {...props}>
|
|
78
|
-
{children ?? <ChevronRight />}
|
|
79
|
-
</li>
|
|
80
|
-
);
|
|
81
|
-
BreadcrumbSeparator.displayName = 'BreadcrumbSeparator';
|
|
82
|
-
|
|
83
|
-
const BreadcrumbEllipsis = ({ className, ...props }: React.ComponentProps<'span'> & BreadcrumbEllipsisBaseProps) => (
|
|
84
|
-
<span
|
|
85
|
-
role="presentation"
|
|
86
|
-
aria-hidden="true"
|
|
87
|
-
className={cn('flex h-9 w-9 items-center justify-center', className)}
|
|
88
|
-
{...props}
|
|
89
|
-
>
|
|
90
|
-
<MoreHorizontal className="h-4 w-4" />
|
|
91
|
-
<span className="sr-only">More</span>
|
|
92
|
-
</span>
|
|
93
|
-
);
|
|
94
|
-
BreadcrumbEllipsis.displayName = 'BreadcrumbElipssis';
|
|
95
|
-
|
|
96
|
-
export {
|
|
97
|
-
Breadcrumb,
|
|
98
|
-
BreadcrumbEllipsis,
|
|
99
|
-
BreadcrumbItem,
|
|
100
|
-
BreadcrumbLink,
|
|
101
|
-
BreadcrumbList,
|
|
102
|
-
BreadcrumbPage,
|
|
103
|
-
BreadcrumbSeparator,
|
|
104
|
-
};
|
|
105
|
-
export type { BreadcrumbBaseProps as BreadcrumbProps };
|
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
import { Button } 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, vi } from 'vitest';
|
|
5
|
-
|
|
6
|
-
describe('Button', () => {
|
|
7
|
-
it('renders correctly', () => {
|
|
8
|
-
render(<Button>Click me</Button>);
|
|
9
|
-
expect(screen.getByRole('button', { name: /click me/i })).toBeInTheDocument();
|
|
10
|
-
});
|
|
11
|
-
|
|
12
|
-
it('handles click events', async () => {
|
|
13
|
-
const handleClick = vi.fn();
|
|
14
|
-
render(<Button onClick={handleClick}>Click me</Button>);
|
|
15
|
-
|
|
16
|
-
await userEvent.click(screen.getByRole('button', { name: /click me/i }));
|
|
17
|
-
expect(handleClick).toHaveBeenCalledTimes(1);
|
|
18
|
-
});
|
|
19
|
-
|
|
20
|
-
it('can be disabled', () => {
|
|
21
|
-
render(<Button disabled>Click me</Button>);
|
|
22
|
-
expect(screen.getByRole('button', { name: /click me/i })).toBeDisabled();
|
|
23
|
-
});
|
|
24
|
-
|
|
25
|
-
it('supports asChild prop', () => {
|
|
26
|
-
render(
|
|
27
|
-
<Button asChild>
|
|
28
|
-
<a href="/test">Link Button</a>
|
|
29
|
-
</Button>,
|
|
30
|
-
);
|
|
31
|
-
|
|
32
|
-
const link = screen.getByRole('link', { name: /link button/i });
|
|
33
|
-
expect(link).toBeInTheDocument();
|
|
34
|
-
expect(link).toHaveAttribute('href', '/test');
|
|
35
|
-
});
|
|
36
|
-
|
|
37
|
-
describe('Variants', () => {
|
|
38
|
-
const variants = ['default', 'destructive', 'outline', 'secondary', 'ghost', 'link'] as const;
|
|
39
|
-
|
|
40
|
-
variants.forEach((variant) => {
|
|
41
|
-
it(`renders ${variant} variant`, () => {
|
|
42
|
-
render(<Button variant={variant}>{variant}</Button>);
|
|
43
|
-
const button = screen.getByRole('button', { name: variant });
|
|
44
|
-
expect(button).toBeInTheDocument();
|
|
45
|
-
// We could check for specific classes here, but that might make tests too brittle
|
|
46
|
-
// checking the role and content presence is a good baseline
|
|
47
|
-
});
|
|
48
|
-
});
|
|
49
|
-
});
|
|
50
|
-
|
|
51
|
-
describe('Sizes', () => {
|
|
52
|
-
const sizes = ['default', 'sm', 'lg', 'icon'] as const;
|
|
53
|
-
|
|
54
|
-
sizes.forEach((size) => {
|
|
55
|
-
it(`renders ${size} size`, () => {
|
|
56
|
-
render(<Button size={size}>{size}</Button>);
|
|
57
|
-
const button = screen.getByRole('button', { name: size });
|
|
58
|
-
expect(button).toBeInTheDocument();
|
|
59
|
-
});
|
|
60
|
-
});
|
|
61
|
-
});
|
|
62
|
-
});
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
import { Slot } from '@radix-ui/react-slot';
|
|
2
|
-
import { cva, type VariantProps } from 'class-variance-authority';
|
|
3
|
-
import * as React from 'react';
|
|
4
|
-
|
|
5
|
-
import type { ButtonBaseProps } from '@gv-tech/ui-core';
|
|
6
|
-
import { cn } from './lib/utils';
|
|
7
|
-
|
|
8
|
-
const buttonVariants = cva(
|
|
9
|
-
'inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0',
|
|
10
|
-
{
|
|
11
|
-
variants: {
|
|
12
|
-
variant: {
|
|
13
|
-
default: 'bg-primary text-primary-foreground shadow hover:bg-primary/90',
|
|
14
|
-
destructive: 'bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90',
|
|
15
|
-
outline: 'border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground',
|
|
16
|
-
secondary: 'bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80',
|
|
17
|
-
ghost: 'hover:bg-accent hover:text-accent-foreground',
|
|
18
|
-
link: 'text-primary underline-offset-4 hover:underline',
|
|
19
|
-
},
|
|
20
|
-
size: {
|
|
21
|
-
default: 'h-9 px-4 py-2',
|
|
22
|
-
sm: 'h-8 rounded-md px-3 text-xs',
|
|
23
|
-
lg: 'h-10 rounded-md px-8',
|
|
24
|
-
icon: 'h-9 w-9',
|
|
25
|
-
},
|
|
26
|
-
},
|
|
27
|
-
defaultVariants: {
|
|
28
|
-
variant: 'default',
|
|
29
|
-
size: 'default',
|
|
30
|
-
},
|
|
31
|
-
},
|
|
32
|
-
);
|
|
33
|
-
|
|
34
|
-
export interface ButtonProps
|
|
35
|
-
extends React.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants>, ButtonBaseProps {
|
|
36
|
-
asChild?: boolean;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
const Button = React.forwardRef<HTMLButtonElement, ButtonProps>(
|
|
40
|
-
({ className, variant, size, asChild = false, ...props }, ref) => {
|
|
41
|
-
const Comp = asChild ? Slot : 'button';
|
|
42
|
-
return <Comp className={cn(buttonVariants({ variant, size, className }))} ref={ref} {...props} />;
|
|
43
|
-
},
|
|
44
|
-
);
|
|
45
|
-
Button.displayName = 'Button';
|
|
46
|
-
|
|
47
|
-
export { Button, buttonVariants };
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { render, screen } from '@testing-library/react';
|
|
2
|
-
import { describe, expect, it } from 'vitest';
|
|
3
|
-
import { Calendar } from '.';
|
|
4
|
-
|
|
5
|
-
describe('Calendar', () => {
|
|
6
|
-
it('renders correctly', () => {
|
|
7
|
-
// Mock date to consistent rendering
|
|
8
|
-
const date = new Date(2023, 0, 1); // Jan 1, 2023
|
|
9
|
-
|
|
10
|
-
render(<Calendar mode="single" selected={date} month={date} />);
|
|
11
|
-
|
|
12
|
-
expect(screen.getByText('January 2023')).toBeInTheDocument();
|
|
13
|
-
const days = screen.getAllByText('1');
|
|
14
|
-
expect(days.length).toBeGreaterThan(0);
|
|
15
|
-
expect(screen.getByText('Su')).toBeInTheDocument(); // Sunday header
|
|
16
|
-
});
|
|
17
|
-
|
|
18
|
-
it('renders with class name', () => {
|
|
19
|
-
const { container } = render(<Calendar className="test-class" />);
|
|
20
|
-
// DayPicker renders a div with the class
|
|
21
|
-
expect(container.firstChild).toHaveClass('test-class');
|
|
22
|
-
});
|
|
23
|
-
});
|