@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,111 +0,0 @@
|
|
|
1
|
-
import * as ToastPrimitives from '@radix-ui/react-toast';
|
|
2
|
-
import { cva, type VariantProps } from 'class-variance-authority';
|
|
3
|
-
import { X } from 'lucide-react';
|
|
4
|
-
import * as React from 'react';
|
|
5
|
-
|
|
6
|
-
import { cn } from './lib/utils';
|
|
7
|
-
|
|
8
|
-
const ToastProvider = ToastPrimitives.Provider;
|
|
9
|
-
|
|
10
|
-
const ToastViewport = React.forwardRef<
|
|
11
|
-
React.ElementRef<typeof ToastPrimitives.Viewport>,
|
|
12
|
-
React.ComponentPropsWithoutRef<typeof ToastPrimitives.Viewport>
|
|
13
|
-
>(({ className, ...props }, ref) => (
|
|
14
|
-
<ToastPrimitives.Viewport
|
|
15
|
-
ref={ref}
|
|
16
|
-
className={cn(
|
|
17
|
-
'fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]',
|
|
18
|
-
className,
|
|
19
|
-
)}
|
|
20
|
-
{...props}
|
|
21
|
-
/>
|
|
22
|
-
));
|
|
23
|
-
ToastViewport.displayName = ToastPrimitives.Viewport.displayName;
|
|
24
|
-
|
|
25
|
-
const toastVariants = cva(
|
|
26
|
-
'group pointer-events-auto relative flex w-full items-center justify-between space-x-2 overflow-hidden rounded-md border p-4 pr-6 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full',
|
|
27
|
-
{
|
|
28
|
-
variants: {
|
|
29
|
-
variant: {
|
|
30
|
-
default: 'border bg-background text-foreground',
|
|
31
|
-
destructive: 'destructive group border-destructive bg-destructive text-destructive-foreground',
|
|
32
|
-
},
|
|
33
|
-
},
|
|
34
|
-
defaultVariants: {
|
|
35
|
-
variant: 'default',
|
|
36
|
-
},
|
|
37
|
-
},
|
|
38
|
-
);
|
|
39
|
-
|
|
40
|
-
const Toast = React.forwardRef<
|
|
41
|
-
React.ElementRef<typeof ToastPrimitives.Root>,
|
|
42
|
-
React.ComponentPropsWithoutRef<typeof ToastPrimitives.Root> & VariantProps<typeof toastVariants>
|
|
43
|
-
>(({ className, variant, ...props }, ref) => {
|
|
44
|
-
return <ToastPrimitives.Root ref={ref} className={cn(toastVariants({ variant }), className)} {...props} />;
|
|
45
|
-
});
|
|
46
|
-
Toast.displayName = ToastPrimitives.Root.displayName;
|
|
47
|
-
|
|
48
|
-
const ToastAction = React.forwardRef<
|
|
49
|
-
React.ElementRef<typeof ToastPrimitives.Action>,
|
|
50
|
-
React.ComponentPropsWithoutRef<typeof ToastPrimitives.Action>
|
|
51
|
-
>(({ className, ...props }, ref) => (
|
|
52
|
-
<ToastPrimitives.Action
|
|
53
|
-
ref={ref}
|
|
54
|
-
className={cn(
|
|
55
|
-
'inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium transition-colors hover:bg-secondary focus:outline-none focus:ring-1 focus:ring-ring disabled:pointer-events-none disabled:opacity-50 group-[.destructive]:border-muted/40 group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground group-[.destructive]:focus:ring-destructive',
|
|
56
|
-
className,
|
|
57
|
-
)}
|
|
58
|
-
{...props}
|
|
59
|
-
/>
|
|
60
|
-
));
|
|
61
|
-
ToastAction.displayName = ToastPrimitives.Action.displayName;
|
|
62
|
-
|
|
63
|
-
const ToastClose = React.forwardRef<
|
|
64
|
-
React.ElementRef<typeof ToastPrimitives.Close>,
|
|
65
|
-
React.ComponentPropsWithoutRef<typeof ToastPrimitives.Close>
|
|
66
|
-
>(({ className, ...props }, ref) => (
|
|
67
|
-
<ToastPrimitives.Close
|
|
68
|
-
ref={ref}
|
|
69
|
-
className={cn(
|
|
70
|
-
'absolute right-1 top-1 rounded-md p-1 text-foreground/50 opacity-0 transition-opacity hover:text-foreground focus:opacity-100 focus:outline-none focus:ring-1 group-hover:opacity-100 group-[.destructive]:text-red-300 group-[.destructive]:hover:text-red-50 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600',
|
|
71
|
-
className,
|
|
72
|
-
)}
|
|
73
|
-
toast-close=""
|
|
74
|
-
{...props}
|
|
75
|
-
>
|
|
76
|
-
<X className="h-4 w-4" />
|
|
77
|
-
</ToastPrimitives.Close>
|
|
78
|
-
));
|
|
79
|
-
ToastClose.displayName = ToastPrimitives.Close.displayName;
|
|
80
|
-
|
|
81
|
-
const ToastTitle = React.forwardRef<
|
|
82
|
-
React.ElementRef<typeof ToastPrimitives.Title>,
|
|
83
|
-
React.ComponentPropsWithoutRef<typeof ToastPrimitives.Title>
|
|
84
|
-
>(({ className, ...props }, ref) => (
|
|
85
|
-
<ToastPrimitives.Title ref={ref} className={cn('text-sm font-semibold [&+div]:text-xs', className)} {...props} />
|
|
86
|
-
));
|
|
87
|
-
ToastTitle.displayName = ToastPrimitives.Title.displayName;
|
|
88
|
-
|
|
89
|
-
const ToastDescription = React.forwardRef<
|
|
90
|
-
React.ElementRef<typeof ToastPrimitives.Description>,
|
|
91
|
-
React.ComponentPropsWithoutRef<typeof ToastPrimitives.Description>
|
|
92
|
-
>(({ className, ...props }, ref) => (
|
|
93
|
-
<ToastPrimitives.Description ref={ref} className={cn('text-sm opacity-90', className)} {...props} />
|
|
94
|
-
));
|
|
95
|
-
ToastDescription.displayName = ToastPrimitives.Description.displayName;
|
|
96
|
-
|
|
97
|
-
type ToastProps = React.ComponentPropsWithoutRef<typeof Toast>;
|
|
98
|
-
|
|
99
|
-
type ToastActionElement = React.ReactElement<typeof ToastAction>;
|
|
100
|
-
|
|
101
|
-
export {
|
|
102
|
-
Toast,
|
|
103
|
-
ToastAction,
|
|
104
|
-
ToastClose,
|
|
105
|
-
ToastDescription,
|
|
106
|
-
ToastProvider,
|
|
107
|
-
ToastTitle,
|
|
108
|
-
ToastViewport,
|
|
109
|
-
type ToastActionElement,
|
|
110
|
-
type ToastProps,
|
|
111
|
-
};
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
|
|
3
|
-
import { ToasterBaseProps } from '@gv-tech/ui-core';
|
|
4
|
-
import { useToast } from './hooks/use-toast';
|
|
5
|
-
import { Toast, ToastClose, ToastDescription, ToastProvider, ToastTitle, ToastViewport } from './toast';
|
|
6
|
-
|
|
7
|
-
export function Toaster({ ...props }: ToasterBaseProps) {
|
|
8
|
-
const { toasts } = useToast();
|
|
9
|
-
|
|
10
|
-
return (
|
|
11
|
-
<ToastProvider {...props}>
|
|
12
|
-
{toasts.map(function ({ id, title, description, action, ...props }) {
|
|
13
|
-
return (
|
|
14
|
-
<Toast key={id} {...props}>
|
|
15
|
-
<div className="grid gap-1">
|
|
16
|
-
{title && <ToastTitle>{title}</ToastTitle>}
|
|
17
|
-
{description && <ToastDescription>{description}</ToastDescription>}
|
|
18
|
-
</div>
|
|
19
|
-
{action}
|
|
20
|
-
<ToastClose />
|
|
21
|
-
</Toast>
|
|
22
|
-
);
|
|
23
|
-
})}
|
|
24
|
-
<ToastViewport />
|
|
25
|
-
</ToastProvider>
|
|
26
|
-
);
|
|
27
|
-
}
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import { render, screen } from '@testing-library/react';
|
|
2
|
-
import userEvent from '@testing-library/user-event';
|
|
3
|
-
import { describe, expect, it } from 'vitest';
|
|
4
|
-
import { ToggleGroup, ToggleGroupItem } from '.';
|
|
5
|
-
|
|
6
|
-
describe('ToggleGroup', () => {
|
|
7
|
-
it('renders correctly', () => {
|
|
8
|
-
render(
|
|
9
|
-
<ToggleGroup type="single">
|
|
10
|
-
<ToggleGroupItem value="a" aria-label="Toggle A">
|
|
11
|
-
A
|
|
12
|
-
</ToggleGroupItem>
|
|
13
|
-
<ToggleGroupItem value="b" aria-label="Toggle B">
|
|
14
|
-
B
|
|
15
|
-
</ToggleGroupItem>
|
|
16
|
-
</ToggleGroup>,
|
|
17
|
-
);
|
|
18
|
-
|
|
19
|
-
expect(screen.getByLabelText('Toggle A')).toBeInTheDocument();
|
|
20
|
-
expect(screen.getByLabelText('Toggle B')).toBeInTheDocument();
|
|
21
|
-
});
|
|
22
|
-
|
|
23
|
-
it('toggles selection', async () => {
|
|
24
|
-
const user = userEvent.setup();
|
|
25
|
-
render(
|
|
26
|
-
<ToggleGroup type="single">
|
|
27
|
-
<ToggleGroupItem value="a" aria-label="Toggle A">
|
|
28
|
-
A
|
|
29
|
-
</ToggleGroupItem>
|
|
30
|
-
<ToggleGroupItem value="b" aria-label="Toggle B">
|
|
31
|
-
B
|
|
32
|
-
</ToggleGroupItem>
|
|
33
|
-
</ToggleGroup>,
|
|
34
|
-
);
|
|
35
|
-
|
|
36
|
-
const toggleA = screen.getByLabelText('Toggle A');
|
|
37
|
-
await user.click(toggleA);
|
|
38
|
-
expect(toggleA).toHaveAttribute('aria-checked', 'true');
|
|
39
|
-
});
|
|
40
|
-
});
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
|
|
3
|
-
import * as ToggleGroupPrimitive from '@radix-ui/react-toggle-group';
|
|
4
|
-
import { type VariantProps } from 'class-variance-authority';
|
|
5
|
-
import * as React from 'react';
|
|
6
|
-
|
|
7
|
-
import { toggleVariants } from '@gv-tech/ui-core';
|
|
8
|
-
import { cn } from './lib/utils';
|
|
9
|
-
|
|
10
|
-
const ToggleGroupContext = React.createContext<VariantProps<typeof toggleVariants>>({
|
|
11
|
-
size: 'default',
|
|
12
|
-
variant: 'default',
|
|
13
|
-
});
|
|
14
|
-
|
|
15
|
-
export type ToggleGroupProps = React.ComponentPropsWithoutRef<typeof ToggleGroupPrimitive.Root> &
|
|
16
|
-
VariantProps<typeof toggleVariants>;
|
|
17
|
-
|
|
18
|
-
const ToggleGroup = React.forwardRef<React.ElementRef<typeof ToggleGroupPrimitive.Root>, ToggleGroupProps>(
|
|
19
|
-
({ className, variant, size, children, ...props }, ref) => (
|
|
20
|
-
<ToggleGroupPrimitive.Root ref={ref} className={cn('flex items-center justify-center gap-1', className)} {...props}>
|
|
21
|
-
<ToggleGroupContext.Provider value={{ variant, size }}>{children}</ToggleGroupContext.Provider>
|
|
22
|
-
</ToggleGroupPrimitive.Root>
|
|
23
|
-
),
|
|
24
|
-
);
|
|
25
|
-
|
|
26
|
-
ToggleGroup.displayName = ToggleGroupPrimitive.Root.displayName;
|
|
27
|
-
|
|
28
|
-
export type ToggleGroupItemProps = React.ComponentPropsWithoutRef<typeof ToggleGroupPrimitive.Item> &
|
|
29
|
-
VariantProps<typeof toggleVariants>;
|
|
30
|
-
|
|
31
|
-
const ToggleGroupItem = React.forwardRef<React.ElementRef<typeof ToggleGroupPrimitive.Item>, ToggleGroupItemProps>(
|
|
32
|
-
({ className, children, variant, size, ...props }, ref) => {
|
|
33
|
-
const context = React.useContext(ToggleGroupContext);
|
|
34
|
-
|
|
35
|
-
return (
|
|
36
|
-
<ToggleGroupPrimitive.Item
|
|
37
|
-
ref={ref}
|
|
38
|
-
className={cn(
|
|
39
|
-
toggleVariants({
|
|
40
|
-
variant: context.variant || variant,
|
|
41
|
-
size: context.size || size,
|
|
42
|
-
}),
|
|
43
|
-
className,
|
|
44
|
-
)}
|
|
45
|
-
{...props}
|
|
46
|
-
>
|
|
47
|
-
{children}
|
|
48
|
-
</ToggleGroupPrimitive.Item>
|
|
49
|
-
);
|
|
50
|
-
},
|
|
51
|
-
);
|
|
52
|
-
|
|
53
|
-
ToggleGroupItem.displayName = ToggleGroupPrimitive.Item.displayName;
|
|
54
|
-
|
|
55
|
-
export { ToggleGroup, ToggleGroupItem };
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { render, screen } from '@testing-library/react';
|
|
2
|
-
import userEvent from '@testing-library/user-event';
|
|
3
|
-
import { describe, expect, it } from 'vitest';
|
|
4
|
-
import { Toggle } from '.';
|
|
5
|
-
|
|
6
|
-
describe('Toggle', () => {
|
|
7
|
-
it('renders correctly', () => {
|
|
8
|
-
render(<Toggle aria-label="Toggle bold">B</Toggle>);
|
|
9
|
-
expect(screen.getByLabelText('Toggle bold')).toBeInTheDocument();
|
|
10
|
-
});
|
|
11
|
-
|
|
12
|
-
it('toggles state', async () => {
|
|
13
|
-
const user = userEvent.setup();
|
|
14
|
-
render(<Toggle aria-label="Toggle italic" />);
|
|
15
|
-
const toggle = screen.getByLabelText('Toggle italic');
|
|
16
|
-
|
|
17
|
-
expect(toggle).toHaveAttribute('aria-pressed', 'false');
|
|
18
|
-
await user.click(toggle);
|
|
19
|
-
expect(toggle).toHaveAttribute('aria-pressed', 'true');
|
|
20
|
-
});
|
|
21
|
-
});
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
|
|
3
|
-
import * as TogglePrimitive from '@radix-ui/react-toggle';
|
|
4
|
-
import { VariantProps } from 'class-variance-authority';
|
|
5
|
-
import * as React from 'react';
|
|
6
|
-
|
|
7
|
-
import { ToggleBaseProps, toggleVariants } from '@gv-tech/ui-core';
|
|
8
|
-
import { cn } from './lib/utils';
|
|
9
|
-
|
|
10
|
-
export interface ToggleProps
|
|
11
|
-
extends
|
|
12
|
-
React.ComponentPropsWithoutRef<typeof TogglePrimitive.Root>,
|
|
13
|
-
Omit<VariantProps<typeof toggleVariants>, 'size' | 'variant'>,
|
|
14
|
-
ToggleBaseProps {}
|
|
15
|
-
|
|
16
|
-
const Toggle = React.forwardRef<React.ElementRef<typeof TogglePrimitive.Root>, ToggleProps>(
|
|
17
|
-
({ className, variant, size, ...props }, ref) => (
|
|
18
|
-
<TogglePrimitive.Root ref={ref} className={cn(toggleVariants({ variant, size, className }))} {...props} />
|
|
19
|
-
),
|
|
20
|
-
);
|
|
21
|
-
|
|
22
|
-
Toggle.displayName = TogglePrimitive.Root.displayName;
|
|
23
|
-
|
|
24
|
-
export { Toggle, toggleVariants };
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
|
|
3
|
-
import * as TooltipPrimitive from '@radix-ui/react-tooltip';
|
|
4
|
-
import * as React from 'react';
|
|
5
|
-
|
|
6
|
-
import {
|
|
7
|
-
TooltipBaseProps,
|
|
8
|
-
TooltipContentBaseProps,
|
|
9
|
-
TooltipProviderBaseProps,
|
|
10
|
-
TooltipTriggerBaseProps,
|
|
11
|
-
} from '@gv-tech/ui-core';
|
|
12
|
-
import { cn } from './lib/utils';
|
|
13
|
-
|
|
14
|
-
export type TooltipProviderProps = React.ComponentPropsWithoutRef<typeof TooltipPrimitive.Provider> &
|
|
15
|
-
TooltipProviderBaseProps;
|
|
16
|
-
|
|
17
|
-
const TooltipProvider = ({ delayDuration = 0, ...props }: TooltipProviderProps) => (
|
|
18
|
-
<TooltipPrimitive.Provider delayDuration={delayDuration} {...props} />
|
|
19
|
-
);
|
|
20
|
-
|
|
21
|
-
export type TooltipProps = React.ComponentPropsWithoutRef<typeof TooltipPrimitive.Root> & TooltipBaseProps;
|
|
22
|
-
|
|
23
|
-
const Tooltip = ({ ...props }: TooltipProps) => <TooltipPrimitive.Root {...props} />;
|
|
24
|
-
|
|
25
|
-
export type TooltipTriggerProps = React.ComponentPropsWithoutRef<typeof TooltipPrimitive.Trigger> &
|
|
26
|
-
TooltipTriggerBaseProps;
|
|
27
|
-
|
|
28
|
-
const TooltipTrigger = React.forwardRef<React.ElementRef<typeof TooltipPrimitive.Trigger>, TooltipTriggerProps>(
|
|
29
|
-
({ className, ...props }, ref) => <TooltipPrimitive.Trigger ref={ref} className={className} {...props} />,
|
|
30
|
-
);
|
|
31
|
-
TooltipTrigger.displayName = TooltipPrimitive.Trigger.displayName;
|
|
32
|
-
|
|
33
|
-
export type TooltipContentProps = React.ComponentPropsWithoutRef<typeof TooltipPrimitive.Content> &
|
|
34
|
-
TooltipContentBaseProps;
|
|
35
|
-
|
|
36
|
-
const TooltipContent = React.forwardRef<React.ElementRef<typeof TooltipPrimitive.Content>, TooltipContentProps>(
|
|
37
|
-
({ className, sideOffset = 4, ...props }, ref) => (
|
|
38
|
-
<TooltipPrimitive.Content
|
|
39
|
-
ref={ref}
|
|
40
|
-
sideOffset={sideOffset}
|
|
41
|
-
className={cn(
|
|
42
|
-
'z-50 overflow-hidden rounded-md border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2',
|
|
43
|
-
className,
|
|
44
|
-
)}
|
|
45
|
-
{...props}
|
|
46
|
-
/>
|
|
47
|
-
),
|
|
48
|
-
);
|
|
49
|
-
TooltipContent.displayName = TooltipPrimitive.Content.displayName;
|
|
50
|
-
|
|
51
|
-
export { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger };
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"compilerOptions": {
|
|
3
|
-
"target": "ES2020",
|
|
4
|
-
"module": "ESNext",
|
|
5
|
-
"moduleResolution": "bundler",
|
|
6
|
-
"declaration": true,
|
|
7
|
-
"declarationMap": true,
|
|
8
|
-
"sourceMap": true,
|
|
9
|
-
"strict": true,
|
|
10
|
-
"esModuleInterop": true,
|
|
11
|
-
"skipLibCheck": true,
|
|
12
|
-
"forceConsistentCasingInFileNames": true,
|
|
13
|
-
"jsx": "react-jsx",
|
|
14
|
-
"outDir": "dist",
|
|
15
|
-
"rootDir": "../..",
|
|
16
|
-
"types": ["node", "vitest/globals", "@testing-library/jest-dom"],
|
|
17
|
-
"paths": {
|
|
18
|
-
"@gv-tech/design-tokens": ["../design-tokens/src"],
|
|
19
|
-
"@gv-tech/ui-core": ["../ui-core/src"],
|
|
20
|
-
"@/*": ["./src/*"]
|
|
21
|
-
}
|
|
22
|
-
},
|
|
23
|
-
"include": ["src"]
|
|
24
|
-
}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
/// <reference types="vitest" />
|
|
2
|
-
import react from '@vitejs/plugin-react-swc';
|
|
3
|
-
import path from 'path';
|
|
4
|
-
import { defineConfig } from 'vite';
|
|
5
|
-
|
|
6
|
-
export default defineConfig({
|
|
7
|
-
plugins: [react()],
|
|
8
|
-
test: {
|
|
9
|
-
globals: true,
|
|
10
|
-
environment: 'jsdom',
|
|
11
|
-
setupFiles: ['./src/setupTests.ts'],
|
|
12
|
-
alias: {
|
|
13
|
-
'@': path.resolve(__dirname, './src'),
|
|
14
|
-
},
|
|
15
|
-
},
|
|
16
|
-
resolve: {
|
|
17
|
-
alias: {
|
|
18
|
-
'@': path.resolve(__dirname, './src'),
|
|
19
|
-
},
|
|
20
|
-
},
|
|
21
|
-
});
|
package/postcss.config.mjs
DELETED
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"packages": {
|
|
3
|
-
".": {
|
|
4
|
-
"release-type": "node",
|
|
5
|
-
"changelog-sections": [
|
|
6
|
-
{
|
|
7
|
-
"type": "feat",
|
|
8
|
-
"section": "Features"
|
|
9
|
-
},
|
|
10
|
-
{
|
|
11
|
-
"type": "fix",
|
|
12
|
-
"section": "Bug Fixes"
|
|
13
|
-
},
|
|
14
|
-
{
|
|
15
|
-
"type": "docs",
|
|
16
|
-
"section": "Documentation",
|
|
17
|
-
"hidden": false
|
|
18
|
-
},
|
|
19
|
-
{
|
|
20
|
-
"type": "perf",
|
|
21
|
-
"section": "Performance Improvements"
|
|
22
|
-
},
|
|
23
|
-
{
|
|
24
|
-
"type": "refactor",
|
|
25
|
-
"section": "Code Refactoring",
|
|
26
|
-
"hidden": false
|
|
27
|
-
},
|
|
28
|
-
{
|
|
29
|
-
"type": "chore",
|
|
30
|
-
"section": "Miscellaneous Chores",
|
|
31
|
-
"hidden": true
|
|
32
|
-
}
|
|
33
|
-
]
|
|
34
|
-
},
|
|
35
|
-
"packages/ui-web": {
|
|
36
|
-
"release-type": "node",
|
|
37
|
-
"package-name": "@gv-tech/ui-web"
|
|
38
|
-
},
|
|
39
|
-
"packages/ui-native": {
|
|
40
|
-
"release-type": "node",
|
|
41
|
-
"package-name": "@gv-tech/ui-native"
|
|
42
|
-
},
|
|
43
|
-
"packages/ui-core": {
|
|
44
|
-
"release-type": "node",
|
|
45
|
-
"package-name": "@gv-tech/ui-core"
|
|
46
|
-
},
|
|
47
|
-
"packages/design-tokens": {
|
|
48
|
-
"release-type": "node",
|
|
49
|
-
"package-name": "@gv-tech/design-tokens"
|
|
50
|
-
},
|
|
51
|
-
"apps/playground-web": {
|
|
52
|
-
"release-type": "node",
|
|
53
|
-
"package-name": "playground-web"
|
|
54
|
-
},
|
|
55
|
-
"apps/native-playground": {
|
|
56
|
-
"release-type": "node",
|
|
57
|
-
"package-name": "native-playground"
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
}
|
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
import fs from 'fs';
|
|
2
|
-
import path from 'path';
|
|
3
|
-
|
|
4
|
-
const REGISTRY_PATH = path.join(process.cwd(), 'apps/playground-web/public/registry');
|
|
5
|
-
const COMPONENTS_UI_PATH = path.join(process.cwd(), 'packages/ui-web/src');
|
|
6
|
-
|
|
7
|
-
if (!fs.existsSync(REGISTRY_PATH)) {
|
|
8
|
-
fs.mkdirSync(REGISTRY_PATH, { recursive: true });
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
function buildRegistry() {
|
|
12
|
-
const entries = fs.readdirSync(COMPONENTS_UI_PATH, { withFileTypes: true });
|
|
13
|
-
|
|
14
|
-
const registryIndex: { name: string; files: string[]; type: string }[] = [];
|
|
15
|
-
|
|
16
|
-
entries.forEach((entry) => {
|
|
17
|
-
let name = '';
|
|
18
|
-
const componentFiles: { path: string; content: string; type: string }[] = [];
|
|
19
|
-
const filePaths: string[] = [];
|
|
20
|
-
|
|
21
|
-
// Ignore index.ts, hooks, lib, and tests
|
|
22
|
-
if (
|
|
23
|
-
entry.name === 'index.ts' ||
|
|
24
|
-
entry.name === 'hooks' ||
|
|
25
|
-
entry.name === 'lib' ||
|
|
26
|
-
entry.name.includes('.test.') ||
|
|
27
|
-
entry.name === 'sonner.tsx' // sonner is often handled uniquely or as a wrapper
|
|
28
|
-
) {
|
|
29
|
-
return;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
if (entry.isDirectory()) {
|
|
33
|
-
name = entry.name;
|
|
34
|
-
const dirPath = path.join(COMPONENTS_UI_PATH, name);
|
|
35
|
-
const dirFiles = fs.readdirSync(dirPath).filter((f) => f.endsWith('.ts') || f.endsWith('.tsx'));
|
|
36
|
-
|
|
37
|
-
dirFiles.forEach((file) => {
|
|
38
|
-
const content = fs.readFileSync(path.join(dirPath, file), 'utf8');
|
|
39
|
-
componentFiles.push({
|
|
40
|
-
path: `ui/${name}/${file}`,
|
|
41
|
-
content,
|
|
42
|
-
type: 'registry:ui',
|
|
43
|
-
});
|
|
44
|
-
filePaths.push(`ui/${name}/${file}`);
|
|
45
|
-
});
|
|
46
|
-
} else if (entry.isFile() && entry.name.endsWith('.tsx')) {
|
|
47
|
-
name = path.basename(entry.name, '.tsx');
|
|
48
|
-
const content = fs.readFileSync(path.join(COMPONENTS_UI_PATH, entry.name), 'utf8');
|
|
49
|
-
componentFiles.push({
|
|
50
|
-
path: `ui/${entry.name}`,
|
|
51
|
-
content,
|
|
52
|
-
type: 'registry:ui',
|
|
53
|
-
});
|
|
54
|
-
filePaths.push(`ui/${entry.name}`);
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
if (name) {
|
|
58
|
-
const componentJson = {
|
|
59
|
-
name,
|
|
60
|
-
type: 'registry:ui',
|
|
61
|
-
dependencies: [],
|
|
62
|
-
registryDependencies: [],
|
|
63
|
-
files: componentFiles,
|
|
64
|
-
};
|
|
65
|
-
|
|
66
|
-
fs.writeFileSync(path.join(REGISTRY_PATH, `${name}.json`), JSON.stringify(componentJson, null, 2));
|
|
67
|
-
|
|
68
|
-
registryIndex.push({
|
|
69
|
-
name,
|
|
70
|
-
files: filePaths,
|
|
71
|
-
type: 'registry:ui',
|
|
72
|
-
});
|
|
73
|
-
}
|
|
74
|
-
});
|
|
75
|
-
|
|
76
|
-
fs.writeFileSync(path.join(REGISTRY_PATH, 'index.json'), JSON.stringify(registryIndex, null, 2));
|
|
77
|
-
console.log('✅ Registry built successfully in public/registry');
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
buildRegistry();
|
package/scripts/sync-tokens.ts
DELETED
|
@@ -1,86 +0,0 @@
|
|
|
1
|
-
import fs from 'fs';
|
|
2
|
-
import path from 'path';
|
|
3
|
-
// We use a dynamic import or relative require because we are running with tsx
|
|
4
|
-
// and want to avoid complex tsconfig path issues for a simple script.
|
|
5
|
-
import { palette, theme } from '@gv-tech/design-tokens';
|
|
6
|
-
|
|
7
|
-
const GLOBALS_CSS_PATHS = [
|
|
8
|
-
path.join(process.cwd(), 'src/globals.css'),
|
|
9
|
-
path.join(process.cwd(), 'apps/playground-web/src/globals.css'),
|
|
10
|
-
];
|
|
11
|
-
|
|
12
|
-
/** Strips hsl() wrapper and commas to match Tailwind/shadcn expectation of "H S L" */
|
|
13
|
-
function formatTokenValue(value: string) {
|
|
14
|
-
if (value.includes('hsl')) {
|
|
15
|
-
return value.replace(/hsl\((.*)\)/, '$1').replace(/,/g, '');
|
|
16
|
-
}
|
|
17
|
-
return value;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
/** Converts camelCase to kebab-case */
|
|
21
|
-
function toKebabCase(str: string) {
|
|
22
|
-
return str.replace(/([A-Z])/g, '-$1').toLowerCase();
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
function generateCssVariables() {
|
|
26
|
-
let css = ' :root {\n';
|
|
27
|
-
|
|
28
|
-
// Light theme
|
|
29
|
-
for (const [key, value] of Object.entries(theme.light)) {
|
|
30
|
-
const cssVarName = `--${toKebabCase(key)}`;
|
|
31
|
-
css += ` ${cssVarName}: ${formatTokenValue(value as string)};\n`;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
css += '\n /* Brand Tokens */\n';
|
|
35
|
-
for (const [category, tokens] of Object.entries(palette)) {
|
|
36
|
-
for (const [key, value] of Object.entries(tokens)) {
|
|
37
|
-
const cssVarName = `--${toKebabCase(category)}-${toKebabCase(key)}`;
|
|
38
|
-
css += ` ${cssVarName}: ${formatTokenValue(value as string)};\n`;
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
css += ' }\n\n .dark {\n';
|
|
43
|
-
|
|
44
|
-
// Dark theme
|
|
45
|
-
for (const [key, value] of Object.entries(theme.dark)) {
|
|
46
|
-
const cssVarName = `--${toKebabCase(key)}`;
|
|
47
|
-
css += ` ${cssVarName}: ${formatTokenValue(value as string)};\n`;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
css += ' }';
|
|
51
|
-
return css;
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
function syncTokens() {
|
|
55
|
-
const variables = generateCssVariables();
|
|
56
|
-
const tokenRegex = /\/\* @tokens-start \*\/[\s\S]*\/\* @tokens-end \*\//;
|
|
57
|
-
|
|
58
|
-
for (const cssPath of GLOBALS_CSS_PATHS) {
|
|
59
|
-
try {
|
|
60
|
-
if (!fs.existsSync(cssPath)) {
|
|
61
|
-
console.log(`⚠️ Skipping ${cssPath} (not found)`);
|
|
62
|
-
continue;
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
const globalsContent = fs.readFileSync(cssPath, 'utf8');
|
|
66
|
-
|
|
67
|
-
if (!tokenRegex.test(globalsContent)) {
|
|
68
|
-
console.warn(`⚠️ Warning: Could not find @tokens markers in ${cssPath}`);
|
|
69
|
-
continue;
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
const updatedContent = globalsContent.replace(
|
|
73
|
-
tokenRegex,
|
|
74
|
-
`/* @tokens-start */\n${variables}\n /* @tokens-end */`,
|
|
75
|
-
);
|
|
76
|
-
|
|
77
|
-
fs.writeFileSync(cssPath, updatedContent);
|
|
78
|
-
console.log(`✅ Tokens synchronized successfully for ${path.relative(process.cwd(), cssPath)}`);
|
|
79
|
-
} catch (error) {
|
|
80
|
-
console.error(`❌ Error synchronizing tokens for ${cssPath}:`, error);
|
|
81
|
-
// We don't exit here to allow other files to be synced, but we might want to flag failure.
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
syncTokens();
|