@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,127 +0,0 @@
|
|
|
1
|
-
import * as DialogPrimitive from '@rn-primitives/dialog';
|
|
2
|
-
import { X } from 'lucide-react-native';
|
|
3
|
-
import * as React from 'react';
|
|
4
|
-
import { Platform, StyleSheet, View, type ViewStyle } from 'react-native';
|
|
5
|
-
import Animated, { FadeIn, FadeOut, SlideInRight, SlideOutRight } from 'react-native-reanimated';
|
|
6
|
-
|
|
7
|
-
import { type DialogContentProps } from './dialog';
|
|
8
|
-
import { cn } from './lib/utils';
|
|
9
|
-
import { Text } from './text';
|
|
10
|
-
|
|
11
|
-
const Sheet = DialogPrimitive.Root;
|
|
12
|
-
|
|
13
|
-
const SheetTrigger = DialogPrimitive.Trigger;
|
|
14
|
-
|
|
15
|
-
const SheetClose = DialogPrimitive.Close;
|
|
16
|
-
|
|
17
|
-
const SheetPortal = DialogPrimitive.Portal;
|
|
18
|
-
|
|
19
|
-
const SheetOverlay = React.forwardRef<
|
|
20
|
-
React.ElementRef<typeof DialogPrimitive.Overlay>,
|
|
21
|
-
React.ComponentPropsWithoutRef<typeof DialogPrimitive.Overlay>
|
|
22
|
-
>(({ className, ...props }, ref) => {
|
|
23
|
-
return (
|
|
24
|
-
<DialogPrimitive.Overlay
|
|
25
|
-
style={Platform.OS !== 'web' ? StyleSheet.absoluteFill : undefined}
|
|
26
|
-
asChild
|
|
27
|
-
ref={ref}
|
|
28
|
-
{...props}
|
|
29
|
-
>
|
|
30
|
-
<Animated.View
|
|
31
|
-
entering={FadeIn.duration(150)}
|
|
32
|
-
exiting={FadeOut.duration(150)}
|
|
33
|
-
className={cn('absolute inset-0 z-50 bg-black/80 web:cursor-default', className)}
|
|
34
|
-
/>
|
|
35
|
-
</DialogPrimitive.Overlay>
|
|
36
|
-
);
|
|
37
|
-
});
|
|
38
|
-
SheetOverlay.displayName = DialogPrimitive.Overlay?.displayName || 'SheetOverlay';
|
|
39
|
-
|
|
40
|
-
const SheetContent = React.forwardRef<
|
|
41
|
-
React.ElementRef<typeof DialogPrimitive.Content>,
|
|
42
|
-
DialogContentProps & {
|
|
43
|
-
side?: 'top' | 'right' | 'bottom' | 'left';
|
|
44
|
-
overlayClassName?: string;
|
|
45
|
-
overlayStyle?: ViewStyle;
|
|
46
|
-
}
|
|
47
|
-
>(({ className, children, side = 'right', overlayClassName, overlayStyle, ...props }, ref) => {
|
|
48
|
-
const isWeb = Platform.OS === 'web';
|
|
49
|
-
// TODO: Add support for other sides
|
|
50
|
-
const entering = isWeb ? undefined : SlideInRight;
|
|
51
|
-
const exiting = isWeb ? undefined : SlideOutRight;
|
|
52
|
-
|
|
53
|
-
return (
|
|
54
|
-
<SheetPortal>
|
|
55
|
-
<SheetOverlay className={overlayClassName} style={overlayStyle} />
|
|
56
|
-
<DialogPrimitive.Content ref={ref} asChild {...props}>
|
|
57
|
-
<Animated.View
|
|
58
|
-
entering={entering}
|
|
59
|
-
exiting={exiting}
|
|
60
|
-
className={cn(
|
|
61
|
-
'absolute z-50 h-full w-3/4 gap-4 bg-background p-6 shadow-lg web:cursor-default web:duration-200 web:ease-in-out',
|
|
62
|
-
side === 'right' &&
|
|
63
|
-
'right-0 top-0 border-l border-border data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right',
|
|
64
|
-
side === 'left' &&
|
|
65
|
-
'left-0 top-0 border-r border-border data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left',
|
|
66
|
-
side === 'top' &&
|
|
67
|
-
'top-0 w-full border-b border-border data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top',
|
|
68
|
-
side === 'bottom' &&
|
|
69
|
-
'bottom-0 w-full border-t border-border data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom',
|
|
70
|
-
className,
|
|
71
|
-
)}
|
|
72
|
-
>
|
|
73
|
-
{children}
|
|
74
|
-
<DialogPrimitive.Close
|
|
75
|
-
className={cn(
|
|
76
|
-
'absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary',
|
|
77
|
-
'web:absolute web:right-4 web:top-4',
|
|
78
|
-
)}
|
|
79
|
-
>
|
|
80
|
-
<X size={24} className="text-muted-foreground" />
|
|
81
|
-
<Text className="sr-only">Close</Text>
|
|
82
|
-
</DialogPrimitive.Close>
|
|
83
|
-
</Animated.View>
|
|
84
|
-
</DialogPrimitive.Content>
|
|
85
|
-
</SheetPortal>
|
|
86
|
-
);
|
|
87
|
-
});
|
|
88
|
-
SheetContent.displayName = DialogPrimitive.Content?.displayName || 'SheetContent';
|
|
89
|
-
|
|
90
|
-
const SheetHeader = ({ className, ...props }: React.ComponentPropsWithoutRef<typeof View>) => (
|
|
91
|
-
<View className={cn('flex flex-col space-y-2 text-center sm:text-left', className)} {...props} />
|
|
92
|
-
);
|
|
93
|
-
SheetHeader.displayName = 'SheetHeader';
|
|
94
|
-
|
|
95
|
-
const SheetFooter = ({ className, ...props }: React.ComponentPropsWithoutRef<typeof View>) => (
|
|
96
|
-
<View className={cn('flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2', className)} {...props} />
|
|
97
|
-
);
|
|
98
|
-
SheetFooter.displayName = 'SheetFooter';
|
|
99
|
-
|
|
100
|
-
const SheetTitle = React.forwardRef<
|
|
101
|
-
React.ElementRef<typeof DialogPrimitive.Title>,
|
|
102
|
-
React.ComponentPropsWithoutRef<typeof DialogPrimitive.Title>
|
|
103
|
-
>(({ className, ...props }, ref) => (
|
|
104
|
-
<DialogPrimitive.Title ref={ref} className={cn('text-lg font-semibold text-foreground', className)} {...props} />
|
|
105
|
-
));
|
|
106
|
-
SheetTitle.displayName = DialogPrimitive.Title?.displayName || 'SheetTitle';
|
|
107
|
-
|
|
108
|
-
const SheetDescription = React.forwardRef<
|
|
109
|
-
React.ElementRef<typeof DialogPrimitive.Description>,
|
|
110
|
-
React.ComponentPropsWithoutRef<typeof DialogPrimitive.Description>
|
|
111
|
-
>(({ className, ...props }, ref) => (
|
|
112
|
-
<DialogPrimitive.Description ref={ref} className={cn('text-sm text-muted-foreground', className)} {...props} />
|
|
113
|
-
));
|
|
114
|
-
SheetDescription.displayName = DialogPrimitive.Description?.displayName || 'SheetDescription';
|
|
115
|
-
|
|
116
|
-
export {
|
|
117
|
-
Sheet,
|
|
118
|
-
SheetClose,
|
|
119
|
-
SheetContent,
|
|
120
|
-
SheetDescription,
|
|
121
|
-
SheetFooter,
|
|
122
|
-
SheetHeader,
|
|
123
|
-
SheetOverlay,
|
|
124
|
-
SheetPortal,
|
|
125
|
-
SheetTitle,
|
|
126
|
-
SheetTrigger,
|
|
127
|
-
};
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { render } from '@testing-library/react';
|
|
2
|
-
import { describe, expect, it, vi } from 'vitest';
|
|
3
|
-
import { Skeleton } from './skeleton';
|
|
4
|
-
|
|
5
|
-
// Mock reanimated
|
|
6
|
-
/* eslint-disable @typescript-eslint/no-require-imports, @typescript-eslint/no-explicit-any */
|
|
7
|
-
vi.mock('react-native-reanimated', () => {
|
|
8
|
-
const React = require('react');
|
|
9
|
-
return {
|
|
10
|
-
default: {
|
|
11
|
-
View: ({ children, style, ...props }: any) => React.createElement('div', { style, ...props }, children),
|
|
12
|
-
},
|
|
13
|
-
useAnimatedStyle: () => ({}),
|
|
14
|
-
useSharedValue: (val: any) => ({ value: val }),
|
|
15
|
-
withRepeat: (val: any) => val,
|
|
16
|
-
withSequence: (...args: any[]) => args[0],
|
|
17
|
-
withTiming: (val: any) => val,
|
|
18
|
-
FadeIn: { duration: () => ({}) },
|
|
19
|
-
FadeOut: { duration: () => ({}) },
|
|
20
|
-
};
|
|
21
|
-
});
|
|
22
|
-
/* eslint-enable @typescript-eslint/no-require-imports, @typescript-eslint/no-explicit-any */
|
|
23
|
-
|
|
24
|
-
describe('Skeleton (Native Implementation)', () => {
|
|
25
|
-
it('renders correctly', () => {
|
|
26
|
-
const { container } = render(<Skeleton className="w-10 h-10" />);
|
|
27
|
-
expect(container.firstChild).toBeDefined();
|
|
28
|
-
});
|
|
29
|
-
});
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { View } from 'react-native';
|
|
3
|
-
import Animated, {
|
|
4
|
-
useAnimatedStyle,
|
|
5
|
-
useSharedValue,
|
|
6
|
-
withRepeat,
|
|
7
|
-
withSequence,
|
|
8
|
-
withTiming,
|
|
9
|
-
} from 'react-native-reanimated';
|
|
10
|
-
|
|
11
|
-
import { cn } from './lib/utils';
|
|
12
|
-
|
|
13
|
-
function Skeleton({ className, ...props }: React.ComponentPropsWithoutRef<typeof View>) {
|
|
14
|
-
const opacity = useSharedValue(0.5);
|
|
15
|
-
|
|
16
|
-
React.useEffect(() => {
|
|
17
|
-
opacity.value = withRepeat(
|
|
18
|
-
withSequence(withTiming(0.2, { duration: 500 }), withTiming(0.5, { duration: 500 })),
|
|
19
|
-
-1,
|
|
20
|
-
true,
|
|
21
|
-
);
|
|
22
|
-
}, []);
|
|
23
|
-
|
|
24
|
-
const animatedStyle = useAnimatedStyle(() => ({
|
|
25
|
-
opacity: opacity.value,
|
|
26
|
-
}));
|
|
27
|
-
|
|
28
|
-
return <Animated.View className={cn('rounded-md bg-muted', className)} style={animatedStyle} {...props} />;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
export { Skeleton };
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import { SwitchBaseProps } from '@gv-tech/ui-core';
|
|
2
|
-
import * as SwitchPrimitive from '@rn-primitives/switch';
|
|
3
|
-
import * as React from 'react';
|
|
4
|
-
|
|
5
|
-
import { cn } from './lib/utils';
|
|
6
|
-
|
|
7
|
-
export interface SwitchProps
|
|
8
|
-
extends
|
|
9
|
-
Omit<React.ComponentPropsWithoutRef<typeof SwitchPrimitive.Root>, 'checked' | 'onCheckedChange'>,
|
|
10
|
-
SwitchBaseProps {}
|
|
11
|
-
|
|
12
|
-
const Switch = React.forwardRef<React.ElementRef<typeof SwitchPrimitive.Root>, SwitchProps>(
|
|
13
|
-
({ className, checked, onCheckedChange, ...props }, ref) => (
|
|
14
|
-
<SwitchPrimitive.Root
|
|
15
|
-
className={cn(
|
|
16
|
-
'peer inline-flex h-6 w-11 shrink-0 cursor-pointer flex-row items-center rounded-full border-2 border-transparent transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input',
|
|
17
|
-
className,
|
|
18
|
-
)}
|
|
19
|
-
{...props}
|
|
20
|
-
checked={checked ?? false}
|
|
21
|
-
onCheckedChange={onCheckedChange || (() => {})}
|
|
22
|
-
ref={ref}
|
|
23
|
-
>
|
|
24
|
-
<SwitchPrimitive.Thumb
|
|
25
|
-
className={cn(
|
|
26
|
-
'pointer-events-none block h-5 w-5 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0',
|
|
27
|
-
)}
|
|
28
|
-
/>
|
|
29
|
-
</SwitchPrimitive.Root>
|
|
30
|
-
),
|
|
31
|
-
);
|
|
32
|
-
Switch.displayName = SwitchPrimitive.Root?.displayName || 'Switch';
|
|
33
|
-
|
|
34
|
-
export { Switch };
|
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { View } from 'react-native';
|
|
3
|
-
|
|
4
|
-
import { cn } from './lib/utils';
|
|
5
|
-
import { Text } from './text';
|
|
6
|
-
|
|
7
|
-
const Table = React.forwardRef<React.ElementRef<typeof View>, React.ComponentPropsWithoutRef<typeof View>>(
|
|
8
|
-
({ className, ...props }, ref) => (
|
|
9
|
-
<View ref={ref} className={cn('w-full caption-bottom text-sm', className)} {...props} />
|
|
10
|
-
),
|
|
11
|
-
);
|
|
12
|
-
Table.displayName = 'Table';
|
|
13
|
-
|
|
14
|
-
const TableHeader = React.forwardRef<React.ElementRef<typeof View>, React.ComponentPropsWithoutRef<typeof View>>(
|
|
15
|
-
({ className, ...props }, ref) => <View ref={ref} className={cn('border-b border-border', className)} {...props} />,
|
|
16
|
-
);
|
|
17
|
-
TableHeader.displayName = 'TableHeader';
|
|
18
|
-
|
|
19
|
-
const TableBody = React.forwardRef<React.ElementRef<typeof View>, React.ComponentPropsWithoutRef<typeof View>>(
|
|
20
|
-
({ className, ...props }, ref) => <View ref={ref} className={cn('flex-1', className)} {...props} />,
|
|
21
|
-
);
|
|
22
|
-
TableBody.displayName = 'TableBody';
|
|
23
|
-
|
|
24
|
-
const TableFooter = React.forwardRef<React.ElementRef<typeof View>, React.ComponentPropsWithoutRef<typeof View>>(
|
|
25
|
-
({ className, ...props }, ref) => (
|
|
26
|
-
<View ref={ref} className={cn('bg-muted/50 font-medium [&>tr]:last:border-b-0', className)} {...props} />
|
|
27
|
-
),
|
|
28
|
-
);
|
|
29
|
-
TableFooter.displayName = 'TableFooter';
|
|
30
|
-
|
|
31
|
-
const TableRow = React.forwardRef<React.ElementRef<typeof View>, React.ComponentPropsWithoutRef<typeof View>>(
|
|
32
|
-
({ className, ...props }, ref) => (
|
|
33
|
-
<View
|
|
34
|
-
ref={ref}
|
|
35
|
-
className={cn(
|
|
36
|
-
'flex-row border-b border-border transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted',
|
|
37
|
-
className,
|
|
38
|
-
)}
|
|
39
|
-
{...props}
|
|
40
|
-
/>
|
|
41
|
-
),
|
|
42
|
-
);
|
|
43
|
-
TableRow.displayName = 'TableRow';
|
|
44
|
-
|
|
45
|
-
const TableHead = React.forwardRef<React.ElementRef<typeof Text>, React.ComponentPropsWithoutRef<typeof Text>>(
|
|
46
|
-
({ className, ...props }, ref) => (
|
|
47
|
-
<Text
|
|
48
|
-
ref={ref}
|
|
49
|
-
className={cn(
|
|
50
|
-
'h-12 px-4 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0',
|
|
51
|
-
className,
|
|
52
|
-
)}
|
|
53
|
-
{...props}
|
|
54
|
-
/>
|
|
55
|
-
),
|
|
56
|
-
);
|
|
57
|
-
TableHead.displayName = 'TableHead';
|
|
58
|
-
|
|
59
|
-
const TableCell = React.forwardRef<React.ElementRef<typeof Text>, React.ComponentPropsWithoutRef<typeof Text>>(
|
|
60
|
-
({ className, ...props }, ref) => (
|
|
61
|
-
<Text ref={ref} className={cn('p-4 align-middle [&:has([role=checkbox])]:pr-0', className)} {...props} />
|
|
62
|
-
),
|
|
63
|
-
);
|
|
64
|
-
TableCell.displayName = 'TableCell';
|
|
65
|
-
|
|
66
|
-
const TableCaption = React.forwardRef<React.ElementRef<typeof Text>, React.ComponentPropsWithoutRef<typeof Text>>(
|
|
67
|
-
({ className, ...props }, ref) => (
|
|
68
|
-
<Text ref={ref} className={cn('mt-4 text-sm text-muted-foreground', className)} {...props} />
|
|
69
|
-
),
|
|
70
|
-
);
|
|
71
|
-
TableCaption.displayName = 'TableCaption';
|
|
72
|
-
|
|
73
|
-
export { Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow };
|
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
import { TabsBaseProps, TabsContentBaseProps, TabsListBaseProps, TabsTriggerBaseProps } from '@gv-tech/ui-core';
|
|
2
|
-
import * as TabsPrimitive from '@rn-primitives/tabs';
|
|
3
|
-
import * as React from 'react';
|
|
4
|
-
|
|
5
|
-
import { cn } from './lib/utils';
|
|
6
|
-
import { TextClassContext } from './text';
|
|
7
|
-
|
|
8
|
-
const Tabs = TabsPrimitive.Root;
|
|
9
|
-
|
|
10
|
-
export interface TabsProps
|
|
11
|
-
extends Omit<React.ComponentPropsWithoutRef<typeof TabsPrimitive.Root>, 'onValueChange' | 'value'>, TabsBaseProps {}
|
|
12
|
-
export interface TabsListProps extends React.ComponentPropsWithoutRef<typeof TabsPrimitive.List>, TabsListBaseProps {}
|
|
13
|
-
export interface TabsTriggerProps
|
|
14
|
-
extends
|
|
15
|
-
Omit<React.ComponentPropsWithoutRef<typeof TabsPrimitive.Trigger>, 'children' | 'disabled'>,
|
|
16
|
-
TabsTriggerBaseProps {}
|
|
17
|
-
export interface TabsContentProps
|
|
18
|
-
extends React.ComponentPropsWithoutRef<typeof TabsPrimitive.Content>, TabsContentBaseProps {}
|
|
19
|
-
|
|
20
|
-
const TabsList = React.forwardRef<React.ElementRef<typeof TabsPrimitive.List>, TabsListProps>(
|
|
21
|
-
({ className, ...props }, ref) => (
|
|
22
|
-
<TabsPrimitive.List
|
|
23
|
-
ref={ref}
|
|
24
|
-
className={cn(
|
|
25
|
-
'h-10 inline-flex flex-row items-center justify-center rounded-md bg-muted p-1 text-muted-foreground',
|
|
26
|
-
className,
|
|
27
|
-
)}
|
|
28
|
-
{...props}
|
|
29
|
-
/>
|
|
30
|
-
),
|
|
31
|
-
);
|
|
32
|
-
TabsList.displayName = TabsPrimitive.List?.displayName || 'TabsList';
|
|
33
|
-
|
|
34
|
-
const TabsTrigger = React.forwardRef<React.ElementRef<typeof TabsPrimitive.Trigger>, TabsTriggerProps>(
|
|
35
|
-
({ className, ...props }, ref) => {
|
|
36
|
-
const { value } = TabsPrimitive.useRootContext();
|
|
37
|
-
return (
|
|
38
|
-
<TextClassContext.Provider
|
|
39
|
-
value={cn(
|
|
40
|
-
'text-sm native:text-base font-medium text-muted-foreground web:transition-all',
|
|
41
|
-
value === props.value && 'text-foreground',
|
|
42
|
-
)}
|
|
43
|
-
>
|
|
44
|
-
<TabsPrimitive.Trigger
|
|
45
|
-
ref={ref}
|
|
46
|
-
className={cn(
|
|
47
|
-
'inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50',
|
|
48
|
-
props.disabled && 'opacity-50',
|
|
49
|
-
value === props.value && 'bg-background shadow-sm shadow-foreground/10',
|
|
50
|
-
className,
|
|
51
|
-
)}
|
|
52
|
-
{...props}
|
|
53
|
-
/>
|
|
54
|
-
</TextClassContext.Provider>
|
|
55
|
-
);
|
|
56
|
-
},
|
|
57
|
-
);
|
|
58
|
-
TabsTrigger.displayName = TabsPrimitive.Trigger?.displayName || 'TabsTrigger';
|
|
59
|
-
|
|
60
|
-
const TabsContent = React.forwardRef<React.ElementRef<typeof TabsPrimitive.Content>, TabsContentProps>(
|
|
61
|
-
({ className, ...props }, ref) => (
|
|
62
|
-
<TabsPrimitive.Content
|
|
63
|
-
ref={ref}
|
|
64
|
-
className={cn(
|
|
65
|
-
'mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2',
|
|
66
|
-
className,
|
|
67
|
-
)}
|
|
68
|
-
{...props}
|
|
69
|
-
/>
|
|
70
|
-
),
|
|
71
|
-
);
|
|
72
|
-
TabsContent.displayName = TabsPrimitive.Content?.displayName || 'TabsContent';
|
|
73
|
-
|
|
74
|
-
export { Tabs, TabsContent, TabsList, TabsTrigger };
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { render, screen } from '@testing-library/react';
|
|
2
|
-
import { describe, expect, it } from 'vitest';
|
|
3
|
-
import { Text } from './text';
|
|
4
|
-
|
|
5
|
-
describe('Text (Native Implementation)', () => {
|
|
6
|
-
it('renders correctly', () => {
|
|
7
|
-
render(<Text>Hello World</Text>);
|
|
8
|
-
expect(screen.getByText('Hello World')).toBeDefined();
|
|
9
|
-
});
|
|
10
|
-
|
|
11
|
-
it('applies variant classes', () => {
|
|
12
|
-
render(<Text variant="h1">Heading</Text>);
|
|
13
|
-
expect(screen.getByText('Heading')).toBeDefined();
|
|
14
|
-
});
|
|
15
|
-
|
|
16
|
-
it('renders children correctly', () => {
|
|
17
|
-
render(
|
|
18
|
-
<Text>
|
|
19
|
-
<Text>Nested</Text>
|
|
20
|
-
</Text>,
|
|
21
|
-
);
|
|
22
|
-
expect(screen.getByText('Nested')).toBeDefined();
|
|
23
|
-
});
|
|
24
|
-
});
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import { cva, type VariantProps } from 'class-variance-authority';
|
|
2
|
-
import * as React from 'react';
|
|
3
|
-
import { Text as RNText } from 'react-native';
|
|
4
|
-
|
|
5
|
-
import type { TextBaseProps } from '@gv-tech/ui-core';
|
|
6
|
-
import { cn } from './lib/utils';
|
|
7
|
-
|
|
8
|
-
const TextClassContext = React.createContext<string | undefined>(undefined);
|
|
9
|
-
|
|
10
|
-
const textVariants = cva('text-foreground', {
|
|
11
|
-
variants: {
|
|
12
|
-
variant: {
|
|
13
|
-
h1: 'text-4xl font-extrabold tracking-tight',
|
|
14
|
-
h2: 'text-3xl font-semibold tracking-tight',
|
|
15
|
-
h3: 'text-2xl font-semibold tracking-tight',
|
|
16
|
-
h4: 'text-xl font-semibold tracking-tight',
|
|
17
|
-
body: 'text-base leading-7',
|
|
18
|
-
bodySmall: 'text-sm leading-6',
|
|
19
|
-
caption: 'text-xs text-muted-foreground',
|
|
20
|
-
label: 'text-sm font-medium',
|
|
21
|
-
overline: 'text-xs font-semibold uppercase tracking-widest text-muted-foreground',
|
|
22
|
-
},
|
|
23
|
-
},
|
|
24
|
-
defaultVariants: {
|
|
25
|
-
variant: 'body',
|
|
26
|
-
},
|
|
27
|
-
});
|
|
28
|
-
|
|
29
|
-
export interface TextProps
|
|
30
|
-
extends React.ComponentPropsWithoutRef<typeof RNText>, VariantProps<typeof textVariants>, TextBaseProps {}
|
|
31
|
-
|
|
32
|
-
const Text = React.forwardRef<React.ElementRef<typeof RNText>, TextProps>(
|
|
33
|
-
({ className, variant = 'body', children, ...props }, ref) => {
|
|
34
|
-
return (
|
|
35
|
-
<RNText ref={ref} className={cn(textVariants({ variant, className }))} {...props}>
|
|
36
|
-
{children}
|
|
37
|
-
</RNText>
|
|
38
|
-
);
|
|
39
|
-
},
|
|
40
|
-
);
|
|
41
|
-
Text.displayName = 'Text';
|
|
42
|
-
|
|
43
|
-
export { Text, TextClassContext, textVariants };
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { fireEvent, render, screen } from '@testing-library/react';
|
|
2
|
-
import { describe, expect, it, vi } from 'vitest';
|
|
3
|
-
import { Textarea } from './textarea';
|
|
4
|
-
|
|
5
|
-
describe('Textarea (Native Implementation)', () => {
|
|
6
|
-
it('renders correctly', () => {
|
|
7
|
-
render(<Textarea placeholder="Enter text" />);
|
|
8
|
-
expect(screen.getByPlaceholderText('Enter text')).toBeDefined();
|
|
9
|
-
});
|
|
10
|
-
|
|
11
|
-
it('handles onChangeText', () => {
|
|
12
|
-
const onChangeText = vi.fn();
|
|
13
|
-
render(<Textarea placeholder="Enter text" onChangeText={onChangeText} />);
|
|
14
|
-
|
|
15
|
-
const textarea = screen.getByPlaceholderText('Enter text');
|
|
16
|
-
fireEvent.change(textarea, { target: { value: 'Hello World' } });
|
|
17
|
-
|
|
18
|
-
expect(onChangeText).toHaveBeenCalledWith('Hello World');
|
|
19
|
-
});
|
|
20
|
-
|
|
21
|
-
it('has multiline enabled', () => {
|
|
22
|
-
const { container } = render(<Textarea placeholder="Enter text" />);
|
|
23
|
-
const textarea = container.querySelector('textarea');
|
|
24
|
-
// In react-native-web, TextInput with multiline renders as a textarea
|
|
25
|
-
expect(textarea).toBeDefined();
|
|
26
|
-
});
|
|
27
|
-
});
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { TextInput } from 'react-native';
|
|
3
|
-
|
|
4
|
-
import { cn } from './lib/utils';
|
|
5
|
-
|
|
6
|
-
export type TextareaProps = React.ComponentPropsWithoutRef<typeof TextInput>;
|
|
7
|
-
|
|
8
|
-
const Textarea = React.forwardRef<React.ElementRef<typeof TextInput>, TextareaProps>(
|
|
9
|
-
({ className, placeholderClassName, ...props }, ref) => {
|
|
10
|
-
return (
|
|
11
|
-
<TextInput
|
|
12
|
-
ref={ref}
|
|
13
|
-
multiline
|
|
14
|
-
numberOfLines={props.numberOfLines || 3}
|
|
15
|
-
className={cn(
|
|
16
|
-
'flex min-h-[80px] w-full rounded-md border border-input bg-background px-3 py-2 text-base text-foreground shadow-sm transition-colors placeholder:text-muted-foreground focus:border-ring disabled:opacity-50',
|
|
17
|
-
className,
|
|
18
|
-
)}
|
|
19
|
-
placeholderClassName={cn('text-muted-foreground', placeholderClassName)}
|
|
20
|
-
textAlignVertical="top"
|
|
21
|
-
{...props}
|
|
22
|
-
/>
|
|
23
|
-
);
|
|
24
|
-
},
|
|
25
|
-
);
|
|
26
|
-
|
|
27
|
-
Textarea.displayName = 'Textarea';
|
|
28
|
-
|
|
29
|
-
export { Textarea };
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { Text, TouchableOpacity, View } from 'react-native';
|
|
2
|
-
|
|
3
|
-
export function ThemeToggle() {
|
|
4
|
-
return (
|
|
5
|
-
<TouchableOpacity onPress={() => {}}>
|
|
6
|
-
<View style={{ padding: 10, backgroundColor: '#eee', borderRadius: 5 }}>
|
|
7
|
-
<Text>Toggle Theme</Text>
|
|
8
|
-
</View>
|
|
9
|
-
</TouchableOpacity>
|
|
10
|
-
);
|
|
11
|
-
}
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
import { render, screen } from '@testing-library/react';
|
|
2
|
-
import { describe, expect, it, vi } from 'vitest';
|
|
3
|
-
import { Toast, ToastDescription, ToastTitle } from './toast';
|
|
4
|
-
|
|
5
|
-
// Mock primitives
|
|
6
|
-
/* eslint-disable @typescript-eslint/no-require-imports, @typescript-eslint/no-explicit-any */
|
|
7
|
-
vi.mock('@rn-primitives/toast', () => {
|
|
8
|
-
const React = require('react');
|
|
9
|
-
return {
|
|
10
|
-
Root: ({ children, className }: any) => React.createElement('div', { className }, children),
|
|
11
|
-
Title: ({ children, className }: any) => React.createElement('div', { className }, children),
|
|
12
|
-
Description: ({ children, className }: any) => React.createElement('div', { className }, children),
|
|
13
|
-
Close: ({ children, className }: any) => React.createElement('button', { className }, children),
|
|
14
|
-
Action: ({ children, className }: any) => React.createElement('button', { className }, children),
|
|
15
|
-
};
|
|
16
|
-
});
|
|
17
|
-
/* eslint-enable @typescript-eslint/no-require-imports, @typescript-eslint/no-explicit-any */
|
|
18
|
-
|
|
19
|
-
// Mock reanimated
|
|
20
|
-
/* eslint-disable @typescript-eslint/no-require-imports, @typescript-eslint/no-explicit-any */
|
|
21
|
-
vi.mock('react-native-reanimated', () => {
|
|
22
|
-
const React = require('react');
|
|
23
|
-
return {
|
|
24
|
-
default: {
|
|
25
|
-
View: ({ children, ...props }: any) => React.createElement('div', props, children),
|
|
26
|
-
},
|
|
27
|
-
FadeInUp: {},
|
|
28
|
-
FadeOutDown: {},
|
|
29
|
-
Layout: {},
|
|
30
|
-
};
|
|
31
|
-
});
|
|
32
|
-
/* eslint-enable @typescript-eslint/no-require-imports, @typescript-eslint/no-explicit-any */
|
|
33
|
-
|
|
34
|
-
// Mock lucide
|
|
35
|
-
vi.mock('lucide-react-native', () => ({
|
|
36
|
-
X: () => null,
|
|
37
|
-
}));
|
|
38
|
-
|
|
39
|
-
describe('Toast (Native Implementation)', () => {
|
|
40
|
-
it('renders correctly', () => {
|
|
41
|
-
render(
|
|
42
|
-
<Toast open={true} onOpenChange={() => {}}>
|
|
43
|
-
<ToastTitle>Toast Title</ToastTitle>
|
|
44
|
-
<ToastDescription>Toast Description</ToastDescription>
|
|
45
|
-
</Toast>,
|
|
46
|
-
);
|
|
47
|
-
expect(screen.getByText('Toast Title')).toBeDefined();
|
|
48
|
-
expect(screen.getByText('Toast Description')).toBeDefined();
|
|
49
|
-
});
|
|
50
|
-
|
|
51
|
-
it('applies variant classes', () => {
|
|
52
|
-
const { container } = render(
|
|
53
|
-
<Toast open={true} onOpenChange={() => {}} variant="destructive">
|
|
54
|
-
<ToastTitle>Error</ToastTitle>
|
|
55
|
-
</Toast>,
|
|
56
|
-
);
|
|
57
|
-
// In our mock, variant translates to classNames via cn()
|
|
58
|
-
// We expect bg-destructive for destructive variant
|
|
59
|
-
expect(container.firstChild).toBeDefined();
|
|
60
|
-
});
|
|
61
|
-
});
|