@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,93 +0,0 @@
|
|
|
1
|
-
import * as AccordionPrimitive from '@rn-primitives/accordion';
|
|
2
|
-
import { ChevronDown } from 'lucide-react-native';
|
|
3
|
-
import * as React from 'react';
|
|
4
|
-
import { View } from 'react-native';
|
|
5
|
-
import Animated, {
|
|
6
|
-
Extrapolation,
|
|
7
|
-
interpolate,
|
|
8
|
-
useAnimatedStyle,
|
|
9
|
-
useDerivedValue,
|
|
10
|
-
withTiming,
|
|
11
|
-
} from 'react-native-reanimated';
|
|
12
|
-
|
|
13
|
-
import { cn } from './lib/utils';
|
|
14
|
-
|
|
15
|
-
const Accordion = React.forwardRef<
|
|
16
|
-
React.ElementRef<typeof AccordionPrimitive.Root>,
|
|
17
|
-
React.ComponentPropsWithoutRef<typeof AccordionPrimitive.Root>
|
|
18
|
-
>(({ className, ...props }, ref) => {
|
|
19
|
-
return <AccordionPrimitive.Root ref={ref} className={cn('web:gap-0', className)} {...props} />;
|
|
20
|
-
});
|
|
21
|
-
Accordion.displayName = AccordionPrimitive.Root?.displayName || 'Accordion';
|
|
22
|
-
|
|
23
|
-
const AccordionItem = React.forwardRef<
|
|
24
|
-
React.ElementRef<typeof AccordionPrimitive.Item>,
|
|
25
|
-
React.ComponentPropsWithoutRef<typeof AccordionPrimitive.Item>
|
|
26
|
-
>(({ className, ...props }, ref) => {
|
|
27
|
-
return (
|
|
28
|
-
<AccordionPrimitive.Item ref={ref} className={cn('border-b border-border overflow-hidden', className)} {...props} />
|
|
29
|
-
);
|
|
30
|
-
});
|
|
31
|
-
AccordionItem.displayName = AccordionPrimitive.Item?.displayName || 'AccordionItem';
|
|
32
|
-
|
|
33
|
-
const AccordionHeader = React.forwardRef<
|
|
34
|
-
React.ElementRef<typeof AccordionPrimitive.Header>,
|
|
35
|
-
React.ComponentPropsWithoutRef<typeof AccordionPrimitive.Header>
|
|
36
|
-
>(({ className, ...props }, ref) => {
|
|
37
|
-
return <AccordionPrimitive.Header ref={ref} className={cn('flex flex-row', className)} {...props} />;
|
|
38
|
-
});
|
|
39
|
-
AccordionHeader.displayName = AccordionPrimitive.Header?.displayName || 'AccordionHeader';
|
|
40
|
-
|
|
41
|
-
const AccordionTrigger = React.forwardRef<
|
|
42
|
-
React.ElementRef<typeof AccordionPrimitive.Trigger>,
|
|
43
|
-
React.ComponentPropsWithoutRef<typeof AccordionPrimitive.Trigger>
|
|
44
|
-
>(({ className, children, ...props }, ref) => {
|
|
45
|
-
const { isExpanded } = AccordionPrimitive.useItemContext();
|
|
46
|
-
const progress = useDerivedValue(() =>
|
|
47
|
-
isExpanded ? withTiming(1, { duration: 250 }) : withTiming(0, { duration: 200 }),
|
|
48
|
-
);
|
|
49
|
-
const chevronStyle = useAnimatedStyle(() => ({
|
|
50
|
-
transform: [{ rotate: `${progress.value * 180}deg` }],
|
|
51
|
-
opacity: interpolate(progress.value, [0, 1], [1, 0.8], Extrapolation.CLAMP),
|
|
52
|
-
}));
|
|
53
|
-
|
|
54
|
-
return (
|
|
55
|
-
<AccordionPrimitive.Header className="flex">
|
|
56
|
-
<AccordionPrimitive.Trigger
|
|
57
|
-
ref={ref}
|
|
58
|
-
className={cn(
|
|
59
|
-
'flex flex-row items-center justify-between py-4 font-medium transition-all hover:underline [&[data-state=open]>svg]:rotate-180',
|
|
60
|
-
className,
|
|
61
|
-
)}
|
|
62
|
-
{...props}
|
|
63
|
-
>
|
|
64
|
-
<>{children}</>
|
|
65
|
-
<Animated.View style={chevronStyle}>
|
|
66
|
-
<ChevronDown className="h-4 w-4 shrink-0 text-muted-foreground transition-transform duration-200" />
|
|
67
|
-
</Animated.View>
|
|
68
|
-
</AccordionPrimitive.Trigger>
|
|
69
|
-
</AccordionPrimitive.Header>
|
|
70
|
-
);
|
|
71
|
-
});
|
|
72
|
-
AccordionTrigger.displayName = AccordionPrimitive.Trigger?.displayName || 'AccordionTrigger';
|
|
73
|
-
|
|
74
|
-
const AccordionContent = React.forwardRef<
|
|
75
|
-
React.ElementRef<typeof AccordionPrimitive.Content>,
|
|
76
|
-
React.ComponentPropsWithoutRef<typeof AccordionPrimitive.Content>
|
|
77
|
-
>(({ className, children, ...props }, ref) => {
|
|
78
|
-
return (
|
|
79
|
-
<AccordionPrimitive.Content
|
|
80
|
-
ref={ref}
|
|
81
|
-
className={cn(
|
|
82
|
-
'overflow-hidden text-sm transition-all data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down',
|
|
83
|
-
className,
|
|
84
|
-
)}
|
|
85
|
-
{...props}
|
|
86
|
-
>
|
|
87
|
-
<View className={cn('pb-4 pt-0', className)}>{children}</View>
|
|
88
|
-
</AccordionPrimitive.Content>
|
|
89
|
-
);
|
|
90
|
-
});
|
|
91
|
-
AccordionContent.displayName = AccordionPrimitive.Content?.displayName || 'AccordionContent';
|
|
92
|
-
|
|
93
|
-
export { Accordion, AccordionContent, AccordionItem, AccordionTrigger };
|
|
@@ -1,123 +0,0 @@
|
|
|
1
|
-
import * as AlertDialogPrimitive from '@rn-primitives/alert-dialog';
|
|
2
|
-
import * as React from 'react';
|
|
3
|
-
import { StyleSheet, View, type ViewStyle } from 'react-native';
|
|
4
|
-
import Animated, { FadeIn, FadeOut } from 'react-native-reanimated';
|
|
5
|
-
|
|
6
|
-
import { buttonVariants } from './button';
|
|
7
|
-
import { cn } from './lib/utils';
|
|
8
|
-
|
|
9
|
-
const AlertDialog = AlertDialogPrimitive.Root;
|
|
10
|
-
|
|
11
|
-
const AlertDialogTrigger = AlertDialogPrimitive.Trigger;
|
|
12
|
-
|
|
13
|
-
const AlertDialogPortal = AlertDialogPrimitive.Portal;
|
|
14
|
-
|
|
15
|
-
const AlertDialogOverlay = React.forwardRef<
|
|
16
|
-
React.ElementRef<typeof AlertDialogPrimitive.Overlay>,
|
|
17
|
-
React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Overlay>
|
|
18
|
-
>(({ className, ...props }, ref) => {
|
|
19
|
-
return (
|
|
20
|
-
<AlertDialogPrimitive.Overlay style={StyleSheet.absoluteFill} asChild ref={ref} {...props}>
|
|
21
|
-
<Animated.View
|
|
22
|
-
entering={FadeIn.duration(150)}
|
|
23
|
-
exiting={FadeOut.duration(150)}
|
|
24
|
-
className={cn('z-50 bg-black/80 flex justify-center items-center p-2', className)}
|
|
25
|
-
/>
|
|
26
|
-
</AlertDialogPrimitive.Overlay>
|
|
27
|
-
);
|
|
28
|
-
});
|
|
29
|
-
AlertDialogOverlay.displayName = AlertDialogPrimitive.Overlay?.displayName || 'AlertDialogOverlay';
|
|
30
|
-
|
|
31
|
-
const AlertDialogContent = React.forwardRef<
|
|
32
|
-
React.ElementRef<typeof AlertDialogPrimitive.Content>,
|
|
33
|
-
React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Content> & {
|
|
34
|
-
portalHost?: string;
|
|
35
|
-
overlayClassName?: string;
|
|
36
|
-
overlayStyle?: ViewStyle;
|
|
37
|
-
}
|
|
38
|
-
>(({ className, portalHost, overlayClassName, overlayStyle, ...props }, ref) => {
|
|
39
|
-
return (
|
|
40
|
-
<AlertDialogPortal hostName={portalHost}>
|
|
41
|
-
<AlertDialogOverlay className={overlayClassName} style={overlayStyle} />
|
|
42
|
-
<AlertDialogPrimitive.Content ref={ref} asChild {...props}>
|
|
43
|
-
<Animated.View
|
|
44
|
-
entering={FadeIn.duration(150)}
|
|
45
|
-
exiting={FadeOut.duration(150)}
|
|
46
|
-
className={cn(
|
|
47
|
-
'z-50 max-w-lg gap-4 border border-border bg-background p-6 shadow-lg sm:rounded-lg w-full rounded-xl',
|
|
48
|
-
className,
|
|
49
|
-
)}
|
|
50
|
-
/>
|
|
51
|
-
</AlertDialogPrimitive.Content>
|
|
52
|
-
</AlertDialogPortal>
|
|
53
|
-
);
|
|
54
|
-
});
|
|
55
|
-
AlertDialogContent.displayName = AlertDialogPrimitive.Content?.displayName || 'AlertDialogContent';
|
|
56
|
-
|
|
57
|
-
const AlertDialogHeader = ({ className, ...props }: React.ComponentPropsWithoutRef<typeof View>) => (
|
|
58
|
-
<View className={cn('flex flex-col gap-2 text-center sm:text-left', className)} {...props} />
|
|
59
|
-
);
|
|
60
|
-
AlertDialogHeader.displayName = 'AlertDialogHeader';
|
|
61
|
-
|
|
62
|
-
const AlertDialogFooter = ({ className, ...props }: React.ComponentPropsWithoutRef<typeof View>) => (
|
|
63
|
-
<View className={cn('flex flex-col-reverse sm:flex-row sm:justify-end gap-2', className)} {...props} />
|
|
64
|
-
);
|
|
65
|
-
AlertDialogFooter.displayName = 'AlertDialogFooter';
|
|
66
|
-
|
|
67
|
-
const AlertDialogTitle = React.forwardRef<
|
|
68
|
-
React.ElementRef<typeof AlertDialogPrimitive.Title>,
|
|
69
|
-
React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Title>
|
|
70
|
-
>(({ className, ...props }, ref) => (
|
|
71
|
-
<AlertDialogPrimitive.Title
|
|
72
|
-
ref={ref}
|
|
73
|
-
className={cn('text-lg native:text-xl font-semibold text-foreground', className)}
|
|
74
|
-
{...props}
|
|
75
|
-
/>
|
|
76
|
-
));
|
|
77
|
-
AlertDialogTitle.displayName = AlertDialogPrimitive.Title?.displayName || 'AlertDialogTitle';
|
|
78
|
-
|
|
79
|
-
const AlertDialogDescription = React.forwardRef<
|
|
80
|
-
React.ElementRef<typeof AlertDialogPrimitive.Description>,
|
|
81
|
-
React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Description>
|
|
82
|
-
>(({ className, ...props }, ref) => (
|
|
83
|
-
<AlertDialogPrimitive.Description
|
|
84
|
-
ref={ref}
|
|
85
|
-
className={cn('text-sm native:text-base text-muted-foreground', className)}
|
|
86
|
-
{...props}
|
|
87
|
-
/>
|
|
88
|
-
));
|
|
89
|
-
AlertDialogDescription.displayName = AlertDialogPrimitive.Description?.displayName || 'AlertDialogDescription';
|
|
90
|
-
|
|
91
|
-
const AlertDialogAction = React.forwardRef<
|
|
92
|
-
React.ElementRef<typeof AlertDialogPrimitive.Action>,
|
|
93
|
-
React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Action>
|
|
94
|
-
>(({ className, ...props }, ref) => (
|
|
95
|
-
<AlertDialogPrimitive.Action ref={ref} className={cn(buttonVariants(), className)} {...props} />
|
|
96
|
-
));
|
|
97
|
-
AlertDialogAction.displayName = AlertDialogPrimitive.Action?.displayName || 'AlertDialogAction';
|
|
98
|
-
|
|
99
|
-
const AlertDialogCancel = React.forwardRef<
|
|
100
|
-
React.ElementRef<typeof AlertDialogPrimitive.Cancel>,
|
|
101
|
-
React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Cancel>
|
|
102
|
-
>(({ className, ...props }, ref) => (
|
|
103
|
-
<AlertDialogPrimitive.Cancel
|
|
104
|
-
ref={ref}
|
|
105
|
-
className={cn(buttonVariants({ variant: 'outline' }), 'mt-2 sm:mt-0', className)}
|
|
106
|
-
{...props}
|
|
107
|
-
/>
|
|
108
|
-
));
|
|
109
|
-
AlertDialogCancel.displayName = AlertDialogPrimitive.Cancel?.displayName || 'AlertDialogCancel';
|
|
110
|
-
|
|
111
|
-
export {
|
|
112
|
-
AlertDialog,
|
|
113
|
-
AlertDialogAction,
|
|
114
|
-
AlertDialogCancel,
|
|
115
|
-
AlertDialogContent,
|
|
116
|
-
AlertDialogDescription,
|
|
117
|
-
AlertDialogFooter,
|
|
118
|
-
AlertDialogHeader,
|
|
119
|
-
AlertDialogOverlay,
|
|
120
|
-
AlertDialogPortal,
|
|
121
|
-
AlertDialogTitle,
|
|
122
|
-
AlertDialogTrigger,
|
|
123
|
-
};
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
import { cva, type VariantProps } from 'class-variance-authority';
|
|
2
|
-
import * as React from 'react';
|
|
3
|
-
import { Text, View } from 'react-native';
|
|
4
|
-
|
|
5
|
-
import { wrapTextChildren } from './lib/render-native';
|
|
6
|
-
import { cn } from './lib/utils';
|
|
7
|
-
|
|
8
|
-
const alertVariants = cva('relative w-full rounded-lg border p-4', {
|
|
9
|
-
variants: {
|
|
10
|
-
variant: {
|
|
11
|
-
default: 'bg-background border-border',
|
|
12
|
-
destructive: 'border-destructive/50 bg-destructive/10',
|
|
13
|
-
warning: 'border-amber-500/50 bg-amber-500/10',
|
|
14
|
-
info: 'border-blue-500/50 bg-blue-500/10',
|
|
15
|
-
},
|
|
16
|
-
},
|
|
17
|
-
defaultVariants: {
|
|
18
|
-
variant: 'default',
|
|
19
|
-
},
|
|
20
|
-
});
|
|
21
|
-
|
|
22
|
-
const Alert = React.forwardRef<
|
|
23
|
-
React.ElementRef<typeof View>,
|
|
24
|
-
React.ComponentPropsWithoutRef<typeof View> & VariantProps<typeof alertVariants>
|
|
25
|
-
>(({ className, variant, children, ...props }, ref) => (
|
|
26
|
-
<View ref={ref} className={cn(alertVariants({ variant }), className)} {...props}>
|
|
27
|
-
{wrapTextChildren(children)}
|
|
28
|
-
</View>
|
|
29
|
-
));
|
|
30
|
-
Alert.displayName = 'Alert';
|
|
31
|
-
|
|
32
|
-
const AlertTitle = React.forwardRef<React.ElementRef<typeof Text>, React.ComponentPropsWithoutRef<typeof Text>>(
|
|
33
|
-
({ className, ...props }, ref) => (
|
|
34
|
-
<Text
|
|
35
|
-
ref={ref}
|
|
36
|
-
className={cn('mb-1 font-medium leading-none tracking-tight text-foreground', className)}
|
|
37
|
-
{...props}
|
|
38
|
-
/>
|
|
39
|
-
),
|
|
40
|
-
);
|
|
41
|
-
AlertTitle.displayName = 'AlertTitle';
|
|
42
|
-
|
|
43
|
-
const AlertDescription = React.forwardRef<React.ElementRef<typeof Text>, React.ComponentPropsWithoutRef<typeof Text>>(
|
|
44
|
-
({ className, ...props }, ref) => (
|
|
45
|
-
<Text ref={ref} className={cn('text-sm text-muted-foreground leading-relaxed', className)} {...props} />
|
|
46
|
-
),
|
|
47
|
-
);
|
|
48
|
-
AlertDescription.displayName = 'AlertDescription';
|
|
49
|
-
|
|
50
|
-
export { Alert, AlertDescription, AlertTitle };
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import * as AvatarPrimitive from '@rn-primitives/avatar';
|
|
2
|
-
import * as React from 'react';
|
|
3
|
-
|
|
4
|
-
import { cn } from './lib/utils';
|
|
5
|
-
|
|
6
|
-
const Avatar = React.forwardRef<
|
|
7
|
-
React.ElementRef<typeof AvatarPrimitive.Root>,
|
|
8
|
-
React.ComponentPropsWithoutRef<typeof AvatarPrimitive.Root>
|
|
9
|
-
>(({ className, ...props }, ref) => (
|
|
10
|
-
<AvatarPrimitive.Root
|
|
11
|
-
ref={ref}
|
|
12
|
-
className={cn('relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full', className)}
|
|
13
|
-
{...props}
|
|
14
|
-
/>
|
|
15
|
-
));
|
|
16
|
-
Avatar.displayName = AvatarPrimitive.Root?.displayName || 'Avatar';
|
|
17
|
-
|
|
18
|
-
const AvatarImage = React.forwardRef<
|
|
19
|
-
React.ElementRef<typeof AvatarPrimitive.Image>,
|
|
20
|
-
React.ComponentPropsWithoutRef<typeof AvatarPrimitive.Image>
|
|
21
|
-
>(({ className, ...props }, ref) => (
|
|
22
|
-
<AvatarPrimitive.Image ref={ref} className={cn('aspect-square h-full w-full', className)} {...props} />
|
|
23
|
-
));
|
|
24
|
-
AvatarImage.displayName = AvatarPrimitive.Image?.displayName || 'AvatarImage';
|
|
25
|
-
|
|
26
|
-
const AvatarFallback = React.forwardRef<
|
|
27
|
-
React.ElementRef<typeof AvatarPrimitive.Fallback>,
|
|
28
|
-
React.ComponentPropsWithoutRef<typeof AvatarPrimitive.Fallback>
|
|
29
|
-
>(({ className, ...props }, ref) => (
|
|
30
|
-
<AvatarPrimitive.Fallback
|
|
31
|
-
ref={ref}
|
|
32
|
-
className={cn('flex h-full w-full items-center justify-center rounded-full bg-muted', className)}
|
|
33
|
-
{...props}
|
|
34
|
-
/>
|
|
35
|
-
));
|
|
36
|
-
AvatarFallback.displayName = AvatarPrimitive.Fallback?.displayName || 'AvatarFallback';
|
|
37
|
-
|
|
38
|
-
export { Avatar, AvatarFallback, AvatarImage };
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
import { cva, type VariantProps } from 'class-variance-authority';
|
|
2
|
-
import * as React from 'react';
|
|
3
|
-
import { Text, View } from 'react-native';
|
|
4
|
-
|
|
5
|
-
import { cn } from './lib/utils';
|
|
6
|
-
|
|
7
|
-
const badgeVariants = cva('flex-row items-center rounded-md border px-2 py-0.5', {
|
|
8
|
-
variants: {
|
|
9
|
-
variant: {
|
|
10
|
-
default: 'border-transparent bg-primary',
|
|
11
|
-
secondary: 'border-transparent bg-secondary',
|
|
12
|
-
destructive: 'border-transparent bg-destructive',
|
|
13
|
-
outline: 'border-border bg-transparent',
|
|
14
|
-
},
|
|
15
|
-
},
|
|
16
|
-
defaultVariants: {
|
|
17
|
-
variant: 'default',
|
|
18
|
-
},
|
|
19
|
-
});
|
|
20
|
-
|
|
21
|
-
const badgeTextVariants = cva('text-xs font-semibold', {
|
|
22
|
-
variants: {
|
|
23
|
-
variant: {
|
|
24
|
-
default: 'text-primary-foreground',
|
|
25
|
-
secondary: 'text-secondary-foreground',
|
|
26
|
-
destructive: 'text-destructive-foreground',
|
|
27
|
-
outline: 'text-foreground',
|
|
28
|
-
},
|
|
29
|
-
},
|
|
30
|
-
defaultVariants: {
|
|
31
|
-
variant: 'default',
|
|
32
|
-
},
|
|
33
|
-
});
|
|
34
|
-
|
|
35
|
-
export interface BadgeProps extends React.ComponentPropsWithoutRef<typeof View>, VariantProps<typeof badgeVariants> {
|
|
36
|
-
textClassName?: string;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
import { wrapTextChildren } from './lib/render-native';
|
|
40
|
-
|
|
41
|
-
function Badge({ className, textClassName, variant, children, ...props }: BadgeProps) {
|
|
42
|
-
return (
|
|
43
|
-
<View className={cn(badgeVariants({ variant }), className)} {...props}>
|
|
44
|
-
{wrapTextChildren(children, Text, {
|
|
45
|
-
className: cn(badgeTextVariants({ variant }), textClassName),
|
|
46
|
-
})}
|
|
47
|
-
</View>
|
|
48
|
-
);
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
export { Badge, badgeVariants };
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { fireEvent, render, screen } from '@testing-library/react';
|
|
2
|
-
import { describe, expect, it, vi } from 'vitest';
|
|
3
|
-
import { Button } from './button';
|
|
4
|
-
import { Text } from './text';
|
|
5
|
-
|
|
6
|
-
describe('Button (Native Implementation)', () => {
|
|
7
|
-
it('renders correctly', () => {
|
|
8
|
-
render(
|
|
9
|
-
<Button>
|
|
10
|
-
<Text>Click me</Text>
|
|
11
|
-
</Button>,
|
|
12
|
-
);
|
|
13
|
-
expect(screen.getByText('Click me')).toBeDefined();
|
|
14
|
-
});
|
|
15
|
-
|
|
16
|
-
it('handles onPress', () => {
|
|
17
|
-
const onPress = vi.fn();
|
|
18
|
-
render(
|
|
19
|
-
<Button onPress={onPress}>
|
|
20
|
-
<Text>Click me</Text>
|
|
21
|
-
</Button>,
|
|
22
|
-
);
|
|
23
|
-
|
|
24
|
-
fireEvent.click(screen.getByText('Click me'));
|
|
25
|
-
expect(onPress).toHaveBeenCalledTimes(1);
|
|
26
|
-
});
|
|
27
|
-
});
|
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
import { cva, type VariantProps } from 'class-variance-authority';
|
|
2
|
-
import * as React from 'react';
|
|
3
|
-
import { Pressable, Text, View } from 'react-native';
|
|
4
|
-
|
|
5
|
-
import type { ButtonBaseProps } from '@gv-tech/ui-core';
|
|
6
|
-
import { wrapTextChildren } from './lib/render-native';
|
|
7
|
-
import { cn } from './lib/utils';
|
|
8
|
-
|
|
9
|
-
const buttonVariants = cva(
|
|
10
|
-
'flex-row items-center justify-center gap-2 rounded-md transition-colors active:opacity-80',
|
|
11
|
-
{
|
|
12
|
-
variants: {
|
|
13
|
-
variant: {
|
|
14
|
-
default: 'bg-primary shadow-sm',
|
|
15
|
-
destructive: 'bg-destructive shadow-sm',
|
|
16
|
-
outline: 'border border-input bg-transparent shadow-sm',
|
|
17
|
-
secondary: 'bg-secondary shadow-sm',
|
|
18
|
-
ghost: 'bg-transparent',
|
|
19
|
-
link: 'bg-transparent',
|
|
20
|
-
},
|
|
21
|
-
size: {
|
|
22
|
-
default: 'h-10 px-4 py-2',
|
|
23
|
-
sm: 'h-9 px-3',
|
|
24
|
-
lg: 'h-12 px-8',
|
|
25
|
-
icon: 'h-10 w-10',
|
|
26
|
-
},
|
|
27
|
-
},
|
|
28
|
-
defaultVariants: {
|
|
29
|
-
variant: 'default',
|
|
30
|
-
size: 'default',
|
|
31
|
-
},
|
|
32
|
-
},
|
|
33
|
-
);
|
|
34
|
-
|
|
35
|
-
const buttonTextVariants = cva('text-sm font-medium', {
|
|
36
|
-
variants: {
|
|
37
|
-
variant: {
|
|
38
|
-
default: 'text-primary-foreground',
|
|
39
|
-
destructive: 'text-destructive-foreground',
|
|
40
|
-
outline: 'text-foreground',
|
|
41
|
-
secondary: 'text-secondary-foreground',
|
|
42
|
-
ghost: 'text-foreground',
|
|
43
|
-
link: 'text-primary underline',
|
|
44
|
-
},
|
|
45
|
-
},
|
|
46
|
-
defaultVariants: {
|
|
47
|
-
variant: 'default',
|
|
48
|
-
},
|
|
49
|
-
});
|
|
50
|
-
|
|
51
|
-
export interface ButtonProps extends VariantProps<typeof buttonVariants>, ButtonBaseProps {
|
|
52
|
-
onPress?: () => void;
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
const Button = React.forwardRef<View, ButtonProps>(
|
|
56
|
-
({ className, variant, size, onPress, children, disabled, ...props }, ref) => {
|
|
57
|
-
return (
|
|
58
|
-
<Pressable
|
|
59
|
-
ref={ref}
|
|
60
|
-
onPress={onPress}
|
|
61
|
-
disabled={disabled}
|
|
62
|
-
className={cn(buttonVariants({ variant, size, className }), disabled && 'opacity-50')}
|
|
63
|
-
{...props}
|
|
64
|
-
>
|
|
65
|
-
{wrapTextChildren(children, Text, {
|
|
66
|
-
className: cn(buttonTextVariants({ variant })),
|
|
67
|
-
})}
|
|
68
|
-
</Pressable>
|
|
69
|
-
);
|
|
70
|
-
},
|
|
71
|
-
);
|
|
72
|
-
|
|
73
|
-
Button.displayName = 'Button';
|
|
74
|
-
|
|
75
|
-
export { Button, buttonVariants };
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import { render, screen } from '@testing-library/react';
|
|
2
|
-
import { describe, expect, it } from 'vitest';
|
|
3
|
-
import { Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle } from './card';
|
|
4
|
-
import { Text } from './text';
|
|
5
|
-
|
|
6
|
-
describe('Card (Native Implementation)', () => {
|
|
7
|
-
it('renders all parts correctly', () => {
|
|
8
|
-
render(
|
|
9
|
-
<Card>
|
|
10
|
-
<CardHeader>
|
|
11
|
-
<CardTitle>Card Title</CardTitle>
|
|
12
|
-
<CardDescription>Card Description</CardDescription>
|
|
13
|
-
</CardHeader>
|
|
14
|
-
<CardContent>
|
|
15
|
-
<Text>Card Content</Text>
|
|
16
|
-
</CardContent>
|
|
17
|
-
<CardFooter>
|
|
18
|
-
<Text>Card Footer</Text>
|
|
19
|
-
</CardFooter>
|
|
20
|
-
</Card>,
|
|
21
|
-
);
|
|
22
|
-
|
|
23
|
-
expect(screen.getByText('Card Title')).toBeDefined();
|
|
24
|
-
expect(screen.getByText('Card Description')).toBeDefined();
|
|
25
|
-
expect(screen.getByText('Card Content')).toBeDefined();
|
|
26
|
-
expect(screen.getByText('Card Footer')).toBeDefined();
|
|
27
|
-
});
|
|
28
|
-
|
|
29
|
-
it('renders with custom className without crashing', () => {
|
|
30
|
-
const { container } = render(<Card className="custom-card" />);
|
|
31
|
-
expect(container.firstChild).toBeDefined();
|
|
32
|
-
});
|
|
33
|
-
});
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { Text, View } from 'react-native';
|
|
3
|
-
|
|
4
|
-
import type { CardBaseProps } from '@gv-tech/ui-core';
|
|
5
|
-
import { wrapTextChildren } from './lib/render-native';
|
|
6
|
-
import { cn } from './lib/utils';
|
|
7
|
-
|
|
8
|
-
export interface CardProps extends React.ComponentPropsWithoutRef<typeof View>, CardBaseProps {}
|
|
9
|
-
|
|
10
|
-
const Card = React.forwardRef<React.ElementRef<typeof View>, CardProps>(({ className, ...props }, ref) => (
|
|
11
|
-
<View ref={ref} className={cn('rounded-xl border border-border bg-card shadow-sm', className)} {...props} />
|
|
12
|
-
));
|
|
13
|
-
Card.displayName = 'Card';
|
|
14
|
-
|
|
15
|
-
const CardHeader = React.forwardRef<React.ElementRef<typeof View>, React.ComponentPropsWithoutRef<typeof View>>(
|
|
16
|
-
({ className, ...props }, ref) => (
|
|
17
|
-
<View ref={ref} className={cn('flex flex-col space-y-1.5 p-6', className)} {...props} />
|
|
18
|
-
),
|
|
19
|
-
);
|
|
20
|
-
CardHeader.displayName = 'CardHeader';
|
|
21
|
-
|
|
22
|
-
const CardTitle = React.forwardRef<React.ElementRef<typeof Text>, React.ComponentPropsWithoutRef<typeof Text>>(
|
|
23
|
-
({ className, ...props }, ref) => (
|
|
24
|
-
<Text
|
|
25
|
-
ref={ref}
|
|
26
|
-
className={cn('font-semibold leading-none tracking-tight text-card-foreground text-lg', className)}
|
|
27
|
-
{...props}
|
|
28
|
-
/>
|
|
29
|
-
),
|
|
30
|
-
);
|
|
31
|
-
CardTitle.displayName = 'CardTitle';
|
|
32
|
-
|
|
33
|
-
const CardDescription = React.forwardRef<React.ElementRef<typeof Text>, React.ComponentPropsWithoutRef<typeof Text>>(
|
|
34
|
-
({ className, ...props }, ref) => (
|
|
35
|
-
<Text ref={ref} className={cn('text-sm text-muted-foreground', className)} {...props} />
|
|
36
|
-
),
|
|
37
|
-
);
|
|
38
|
-
CardDescription.displayName = 'CardDescription';
|
|
39
|
-
|
|
40
|
-
const CardContent = React.forwardRef<React.ElementRef<typeof View>, React.ComponentPropsWithoutRef<typeof View>>(
|
|
41
|
-
({ className, ...props }, ref) => (
|
|
42
|
-
<View ref={ref} className={cn('p-6 pt-0', className)} {...props}>
|
|
43
|
-
{wrapTextChildren(props.children, Text, { className: 'text-sm text-card-foreground' })}
|
|
44
|
-
</View>
|
|
45
|
-
),
|
|
46
|
-
);
|
|
47
|
-
CardContent.displayName = 'CardContent';
|
|
48
|
-
|
|
49
|
-
const CardFooter = React.forwardRef<React.ElementRef<typeof View>, React.ComponentPropsWithoutRef<typeof View>>(
|
|
50
|
-
({ className, ...props }, ref) => (
|
|
51
|
-
<View ref={ref} className={cn('flex flex-row items-center p-6 pt-0', className)} {...props} />
|
|
52
|
-
),
|
|
53
|
-
);
|
|
54
|
-
CardFooter.displayName = 'CardFooter';
|
|
55
|
-
|
|
56
|
-
export { Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle };
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
import { fireEvent, render, screen } from '@testing-library/react';
|
|
2
|
-
import { describe, expect, it, vi } from 'vitest';
|
|
3
|
-
import { Checkbox } from './checkbox';
|
|
4
|
-
|
|
5
|
-
// Mock the primitive to avoid JSX parsing issues in node_modules
|
|
6
|
-
/* eslint-disable @typescript-eslint/no-require-imports, @typescript-eslint/no-explicit-any */
|
|
7
|
-
vi.mock('@rn-primitives/checkbox', () => {
|
|
8
|
-
const React = require('react');
|
|
9
|
-
return {
|
|
10
|
-
Root: React.forwardRef(({ children, className, checked, onCheckedChange, ...props }: any, ref: any) =>
|
|
11
|
-
React.createElement(
|
|
12
|
-
'div',
|
|
13
|
-
{
|
|
14
|
-
ref,
|
|
15
|
-
role: 'checkbox',
|
|
16
|
-
'aria-checked': checked,
|
|
17
|
-
className,
|
|
18
|
-
onClick: () => onCheckedChange?.(!checked),
|
|
19
|
-
...props,
|
|
20
|
-
},
|
|
21
|
-
children,
|
|
22
|
-
),
|
|
23
|
-
),
|
|
24
|
-
Indicator: ({ children, className }: any) => React.createElement('div', { className }, children),
|
|
25
|
-
};
|
|
26
|
-
});
|
|
27
|
-
/* eslint-enable @typescript-eslint/no-require-imports, @typescript-eslint/no-explicit-any */
|
|
28
|
-
|
|
29
|
-
vi.mock('lucide-react-native', () => ({
|
|
30
|
-
Check: () => null,
|
|
31
|
-
Circle: () => null,
|
|
32
|
-
ChevronDown: () => null,
|
|
33
|
-
ChevronUp: () => null,
|
|
34
|
-
X: () => null,
|
|
35
|
-
}));
|
|
36
|
-
|
|
37
|
-
describe('Checkbox (Native Implementation)', () => {
|
|
38
|
-
it('renders correctly', () => {
|
|
39
|
-
const { container } = render(<Checkbox checked={false} onCheckedChange={() => {}} />);
|
|
40
|
-
expect(container.firstChild).toBeDefined();
|
|
41
|
-
});
|
|
42
|
-
|
|
43
|
-
it('handles onCheckedChange', () => {
|
|
44
|
-
const onCheckedChange = vi.fn();
|
|
45
|
-
render(<Checkbox checked={false} onCheckedChange={onCheckedChange} />);
|
|
46
|
-
|
|
47
|
-
const checkbox = screen.getByRole('checkbox');
|
|
48
|
-
fireEvent.click(checkbox);
|
|
49
|
-
|
|
50
|
-
expect(onCheckedChange).toHaveBeenCalledWith(true);
|
|
51
|
-
});
|
|
52
|
-
|
|
53
|
-
it('reflects checked state', () => {
|
|
54
|
-
render(<Checkbox checked={true} onCheckedChange={() => {}} />);
|
|
55
|
-
const checkbox = screen.getByRole('checkbox');
|
|
56
|
-
expect(checkbox).toHaveAttribute('aria-checked', 'true');
|
|
57
|
-
});
|
|
58
|
-
});
|