@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,137 +0,0 @@
|
|
|
1
|
-
import { ComponentShowcase } from '@/components/docs/ComponentShowcase';
|
|
2
|
-
import { PropsTable } from '@/components/docs/PropsTable';
|
|
3
|
-
import { Label, RadioGroup, RadioGroupItem } from '@gv-tech/ui-web';
|
|
4
|
-
/* eslint-disable @typescript-eslint/ban-ts-comment, @typescript-eslint/no-unused-vars */
|
|
5
|
-
|
|
6
|
-
// @ts-ignore
|
|
7
|
-
|
|
8
|
-
const isNative = false as boolean;
|
|
9
|
-
|
|
10
|
-
// @ts-ignore
|
|
11
|
-
|
|
12
|
-
const platform = 'web' as string;
|
|
13
|
-
|
|
14
|
-
export function RadioGroupDocs() {
|
|
15
|
-
return (
|
|
16
|
-
<>
|
|
17
|
-
<ComponentShowcase
|
|
18
|
-
title="Default"
|
|
19
|
-
description="A default radio group."
|
|
20
|
-
code={`<RadioGroup defaultValue="option-one">
|
|
21
|
-
<div className="flex items-center space-x-2">
|
|
22
|
-
<RadioGroupItem value="option-one" id="option-one" />
|
|
23
|
-
<Label htmlFor="option-one">Option One</Label>
|
|
24
|
-
</div>
|
|
25
|
-
<div className="flex items-center space-x-2">
|
|
26
|
-
<RadioGroupItem value="option-two" id="option-two" />
|
|
27
|
-
<Label htmlFor="option-two">Option Two</Label>
|
|
28
|
-
</div>
|
|
29
|
-
</RadioGroup>`}
|
|
30
|
-
>
|
|
31
|
-
<RadioGroup defaultValue="option-one" value="option-one" onValueChange={() => {}}>
|
|
32
|
-
<div className="flex items-center space-x-2">
|
|
33
|
-
<RadioGroupItem value="option-one" id="option-one" />
|
|
34
|
-
<Label htmlFor="option-one">Option One</Label>
|
|
35
|
-
</div>
|
|
36
|
-
<div className="flex items-center space-x-2">
|
|
37
|
-
<RadioGroupItem value="option-two" id="option-two" />
|
|
38
|
-
<Label htmlFor="option-two">Option Two</Label>
|
|
39
|
-
</div>
|
|
40
|
-
</RadioGroup>
|
|
41
|
-
</ComponentShowcase>
|
|
42
|
-
|
|
43
|
-
<div className="space-y-4">
|
|
44
|
-
<h3 className="text-xl font-semibold">Props</h3>
|
|
45
|
-
<p className="text-sm text-muted-foreground">
|
|
46
|
-
The Radio Group component is built on top of{' '}
|
|
47
|
-
<a
|
|
48
|
-
href="https://www.radix-ui.com/primitives/docs/components/radio-group"
|
|
49
|
-
className="underline"
|
|
50
|
-
target="_blank"
|
|
51
|
-
rel="noreferrer"
|
|
52
|
-
>
|
|
53
|
-
Radix UI Radio Group
|
|
54
|
-
</a>
|
|
55
|
-
.
|
|
56
|
-
</p>
|
|
57
|
-
|
|
58
|
-
<h4 className="text-lg font-medium mt-6">RadioGroup (Root)</h4>
|
|
59
|
-
<PropsTable
|
|
60
|
-
props={[
|
|
61
|
-
{
|
|
62
|
-
name: 'defaultValue',
|
|
63
|
-
type: 'string',
|
|
64
|
-
description: 'The value of the radio item that should be checked when initially rendered.',
|
|
65
|
-
},
|
|
66
|
-
{
|
|
67
|
-
name: 'value',
|
|
68
|
-
type: 'string',
|
|
69
|
-
description: 'The controlled value of the radio item to check.',
|
|
70
|
-
},
|
|
71
|
-
{
|
|
72
|
-
name: 'onValueChange',
|
|
73
|
-
type: '(value: string) => void',
|
|
74
|
-
description: 'Event handler called when the value changes.',
|
|
75
|
-
},
|
|
76
|
-
{
|
|
77
|
-
name: 'disabled',
|
|
78
|
-
type: 'boolean',
|
|
79
|
-
description: 'When true, prevents the user from interacting with radio items.',
|
|
80
|
-
},
|
|
81
|
-
{
|
|
82
|
-
name: 'required',
|
|
83
|
-
type: 'boolean',
|
|
84
|
-
description:
|
|
85
|
-
'When true, indicates that the user must check a radio item before the owning form can be submitted.',
|
|
86
|
-
},
|
|
87
|
-
{
|
|
88
|
-
name: 'name',
|
|
89
|
-
type: 'string',
|
|
90
|
-
description: 'The name of the group. Submitted with its owning form as part of a name/value pair.',
|
|
91
|
-
},
|
|
92
|
-
{
|
|
93
|
-
name: 'dir',
|
|
94
|
-
type: '"ltr" | "rtl"',
|
|
95
|
-
description: 'The reading direction of the radio group.',
|
|
96
|
-
},
|
|
97
|
-
{
|
|
98
|
-
name: 'orientation',
|
|
99
|
-
type: '"horizontal" | "vertical"',
|
|
100
|
-
defaultValue: '"vertical"',
|
|
101
|
-
description: 'The orientation of the component.',
|
|
102
|
-
},
|
|
103
|
-
{
|
|
104
|
-
name: 'loop',
|
|
105
|
-
type: 'boolean',
|
|
106
|
-
defaultValue: 'true',
|
|
107
|
-
description: 'When true, keyboard navigation will loop from last item to first, and vice versa.',
|
|
108
|
-
},
|
|
109
|
-
]}
|
|
110
|
-
/>
|
|
111
|
-
|
|
112
|
-
<h4 className="text-lg font-medium mt-6">RadioGroupItem</h4>
|
|
113
|
-
<PropsTable
|
|
114
|
-
props={[
|
|
115
|
-
{
|
|
116
|
-
name: 'value',
|
|
117
|
-
type: 'string',
|
|
118
|
-
required: true,
|
|
119
|
-
description: 'The value given as data when submitted with a name.',
|
|
120
|
-
},
|
|
121
|
-
{
|
|
122
|
-
name: 'disabled',
|
|
123
|
-
type: 'boolean',
|
|
124
|
-
description: 'When true, prevents the user from interacting with the radio item.',
|
|
125
|
-
},
|
|
126
|
-
{
|
|
127
|
-
name: 'required',
|
|
128
|
-
type: 'boolean',
|
|
129
|
-
description:
|
|
130
|
-
'When true, indicates that the user must check the radio item before the owning form can be submitted.',
|
|
131
|
-
},
|
|
132
|
-
]}
|
|
133
|
-
/>
|
|
134
|
-
</div>
|
|
135
|
-
</>
|
|
136
|
-
);
|
|
137
|
-
}
|
|
@@ -1,143 +0,0 @@
|
|
|
1
|
-
import { ComponentShowcase } from '@/components/docs/ComponentShowcase';
|
|
2
|
-
import { PropsTable } from '@/components/docs/PropsTable';
|
|
3
|
-
import { ResizableHandle, ResizablePanel, ResizablePanelGroup } from '@gv-tech/ui-web';
|
|
4
|
-
/* eslint-disable @typescript-eslint/ban-ts-comment, @typescript-eslint/no-unused-vars */
|
|
5
|
-
|
|
6
|
-
// @ts-ignore
|
|
7
|
-
|
|
8
|
-
const isNative = false as boolean;
|
|
9
|
-
|
|
10
|
-
// @ts-ignore
|
|
11
|
-
|
|
12
|
-
const platform = 'web' as string;
|
|
13
|
-
|
|
14
|
-
export function ResizableDocs() {
|
|
15
|
-
return (
|
|
16
|
-
<>
|
|
17
|
-
<ComponentShowcase
|
|
18
|
-
title="Default"
|
|
19
|
-
description="A resizable panel group with three panels."
|
|
20
|
-
code={`<ResizablePanelGroup
|
|
21
|
-
direction="horizontal"
|
|
22
|
-
className="max-w-md rounded-lg border"
|
|
23
|
-
>
|
|
24
|
-
<ResizablePanel defaultSize={50}>
|
|
25
|
-
<div className="flex h-[200px] items-center justify-center p-6">
|
|
26
|
-
<span className="font-semibold">One</span>
|
|
27
|
-
</div>
|
|
28
|
-
</ResizablePanel>
|
|
29
|
-
<ResizableHandle />
|
|
30
|
-
<ResizablePanel defaultSize={50}>
|
|
31
|
-
<ResizablePanelGroup direction="vertical">
|
|
32
|
-
<ResizablePanel defaultSize={25}>
|
|
33
|
-
<div className="flex h-full items-center justify-center p-6">
|
|
34
|
-
<span className="font-semibold">Two</span>
|
|
35
|
-
</div>
|
|
36
|
-
</ResizablePanel>
|
|
37
|
-
<ResizableHandle />
|
|
38
|
-
<ResizablePanel defaultSize={75}>
|
|
39
|
-
<div className="flex h-full items-center justify-center p-6">
|
|
40
|
-
<span className="font-semibold">Three</span>
|
|
41
|
-
</div>
|
|
42
|
-
</ResizablePanel>
|
|
43
|
-
</ResizablePanelGroup>
|
|
44
|
-
</ResizablePanel>
|
|
45
|
-
</ResizablePanelGroup>`}
|
|
46
|
-
>
|
|
47
|
-
<ResizablePanelGroup direction="horizontal" className="max-w-md rounded-lg border">
|
|
48
|
-
<ResizablePanel defaultSize={50}>
|
|
49
|
-
<div className="flex h-[200px] items-center justify-center p-6">
|
|
50
|
-
<span className="font-semibold">One</span>
|
|
51
|
-
</div>
|
|
52
|
-
</ResizablePanel>
|
|
53
|
-
<ResizableHandle />
|
|
54
|
-
<ResizablePanel defaultSize={50}>
|
|
55
|
-
<ResizablePanelGroup direction="vertical">
|
|
56
|
-
<ResizablePanel defaultSize={25}>
|
|
57
|
-
<div className="flex h-full items-center justify-center p-6">
|
|
58
|
-
<span className="font-semibold">Two</span>
|
|
59
|
-
</div>
|
|
60
|
-
</ResizablePanel>
|
|
61
|
-
<ResizableHandle />
|
|
62
|
-
<ResizablePanel defaultSize={75}>
|
|
63
|
-
<div className="flex h-full items-center justify-center p-6">
|
|
64
|
-
<span className="font-semibold">Three</span>
|
|
65
|
-
</div>
|
|
66
|
-
</ResizablePanel>
|
|
67
|
-
</ResizablePanelGroup>
|
|
68
|
-
</ResizablePanel>
|
|
69
|
-
</ResizablePanelGroup>
|
|
70
|
-
</ComponentShowcase>
|
|
71
|
-
|
|
72
|
-
<div className="space-y-4">
|
|
73
|
-
<h3 className="text-xl font-semibold">Props</h3>
|
|
74
|
-
<p className="text-sm text-muted-foreground">
|
|
75
|
-
The Resizable component is built on top of{' '}
|
|
76
|
-
<a
|
|
77
|
-
href="https://github.com/bvaughn/react-resizable-panels"
|
|
78
|
-
className="underline"
|
|
79
|
-
target="_blank"
|
|
80
|
-
rel="noreferrer"
|
|
81
|
-
>
|
|
82
|
-
react-resizable-panels
|
|
83
|
-
</a>
|
|
84
|
-
.
|
|
85
|
-
</p>
|
|
86
|
-
|
|
87
|
-
<h4 className="text-lg font-medium mt-6">ResizablePanelGroup</h4>
|
|
88
|
-
<PropsTable
|
|
89
|
-
props={[
|
|
90
|
-
{
|
|
91
|
-
name: 'direction',
|
|
92
|
-
type: '"horizontal" | "vertical"',
|
|
93
|
-
required: true,
|
|
94
|
-
description: 'The direction of the panels.',
|
|
95
|
-
},
|
|
96
|
-
{
|
|
97
|
-
name: 'onLayout',
|
|
98
|
-
type: '(sizes: number[]) => void',
|
|
99
|
-
description: 'Event handler called when the layout changes.',
|
|
100
|
-
},
|
|
101
|
-
]}
|
|
102
|
-
/>
|
|
103
|
-
|
|
104
|
-
<h4 className="text-lg font-medium mt-6">ResizablePanel</h4>
|
|
105
|
-
<PropsTable
|
|
106
|
-
props={[
|
|
107
|
-
{
|
|
108
|
-
name: 'defaultSize',
|
|
109
|
-
type: 'number',
|
|
110
|
-
description: 'The initial size of the panel in percent.',
|
|
111
|
-
},
|
|
112
|
-
{
|
|
113
|
-
name: 'minSize',
|
|
114
|
-
type: 'number',
|
|
115
|
-
description: 'The minimum size of the panel in percent.',
|
|
116
|
-
},
|
|
117
|
-
{
|
|
118
|
-
name: 'maxSize',
|
|
119
|
-
type: 'number',
|
|
120
|
-
description: 'The maximum size of the panel in percent.',
|
|
121
|
-
},
|
|
122
|
-
{
|
|
123
|
-
name: 'onResize',
|
|
124
|
-
type: '(size: number) => void',
|
|
125
|
-
description: 'Event handler called when the panel is resized.',
|
|
126
|
-
},
|
|
127
|
-
]}
|
|
128
|
-
/>
|
|
129
|
-
|
|
130
|
-
<h4 className="text-lg font-medium mt-6">ResizableHandle</h4>
|
|
131
|
-
<PropsTable
|
|
132
|
-
props={[
|
|
133
|
-
{
|
|
134
|
-
name: 'withHandle',
|
|
135
|
-
type: 'boolean',
|
|
136
|
-
description: 'Whether to render a grip handle.',
|
|
137
|
-
},
|
|
138
|
-
]}
|
|
139
|
-
/>
|
|
140
|
-
</div>
|
|
141
|
-
</>
|
|
142
|
-
);
|
|
143
|
-
}
|
|
@@ -1,107 +0,0 @@
|
|
|
1
|
-
import { ComponentShowcase } from '@/components/docs/ComponentShowcase';
|
|
2
|
-
import { PropsTable } from '@/components/docs/PropsTable';
|
|
3
|
-
import { ScrollArea, Separator } from '@gv-tech/ui-web';
|
|
4
|
-
/* eslint-disable @typescript-eslint/ban-ts-comment, @typescript-eslint/no-unused-vars */
|
|
5
|
-
|
|
6
|
-
// @ts-ignore
|
|
7
|
-
|
|
8
|
-
const isNative = false as boolean;
|
|
9
|
-
|
|
10
|
-
// @ts-ignore
|
|
11
|
-
|
|
12
|
-
const platform = 'web' as string;
|
|
13
|
-
|
|
14
|
-
const tags = Array.from({ length: 50 }).map((_, i, a) => `v1.2.0-beta.${a.length - i}`);
|
|
15
|
-
|
|
16
|
-
export function ScrollAreaDocs() {
|
|
17
|
-
return (
|
|
18
|
-
<>
|
|
19
|
-
<ComponentShowcase
|
|
20
|
-
title="Default"
|
|
21
|
-
description="A default scroll area."
|
|
22
|
-
code={`<ScrollArea className="h-72 w-48 rounded-md border">
|
|
23
|
-
<div className="p-4">
|
|
24
|
-
<h4 className="mb-4 text-sm font-medium leading-none">Tags</h4>
|
|
25
|
-
{tags.map((tag) => (
|
|
26
|
-
<>
|
|
27
|
-
<div key={tag} className="text-sm">
|
|
28
|
-
{tag}
|
|
29
|
-
</div>
|
|
30
|
-
<Separator className="my-2" />
|
|
31
|
-
</>
|
|
32
|
-
))}
|
|
33
|
-
</div>
|
|
34
|
-
</ScrollArea>`}
|
|
35
|
-
>
|
|
36
|
-
<ScrollArea className="h-72 w-48 rounded-md border">
|
|
37
|
-
<div className="p-4">
|
|
38
|
-
<h4 className="mb-4 text-sm font-medium leading-none">Tags</h4>
|
|
39
|
-
{tags.map((tag) => (
|
|
40
|
-
<div key={tag}>
|
|
41
|
-
<div className="text-sm">{tag}</div>
|
|
42
|
-
<Separator className="my-2" />
|
|
43
|
-
</div>
|
|
44
|
-
))}
|
|
45
|
-
</div>
|
|
46
|
-
</ScrollArea>
|
|
47
|
-
</ComponentShowcase>
|
|
48
|
-
|
|
49
|
-
<div className="space-y-4">
|
|
50
|
-
<h3 className="text-xl font-semibold">Props</h3>
|
|
51
|
-
<p className="text-sm text-muted-foreground">
|
|
52
|
-
The Scroll Area component is built on top of{' '}
|
|
53
|
-
<a
|
|
54
|
-
href="https://www.radix-ui.com/primitives/docs/components/scroll-area"
|
|
55
|
-
className="underline"
|
|
56
|
-
target="_blank"
|
|
57
|
-
rel="noreferrer"
|
|
58
|
-
>
|
|
59
|
-
Radix UI Scroll Area
|
|
60
|
-
</a>
|
|
61
|
-
.
|
|
62
|
-
</p>
|
|
63
|
-
|
|
64
|
-
<h4 className="text-lg font-medium mt-6">ScrollArea (Root)</h4>
|
|
65
|
-
<PropsTable
|
|
66
|
-
props={[
|
|
67
|
-
{
|
|
68
|
-
name: 'type',
|
|
69
|
-
type: '"auto" | "always" | "scroll" | "hover"',
|
|
70
|
-
defaultValue: '"hover"',
|
|
71
|
-
description: 'Describes the nature of scrollbar visibility.',
|
|
72
|
-
},
|
|
73
|
-
{
|
|
74
|
-
name: 'scrollHideDelay',
|
|
75
|
-
type: 'number',
|
|
76
|
-
defaultValue: '600',
|
|
77
|
-
description:
|
|
78
|
-
'If type is "scroll" or "hover", this property determines how long the scrollbar remains visible before hiding.',
|
|
79
|
-
},
|
|
80
|
-
{
|
|
81
|
-
name: 'dir',
|
|
82
|
-
type: '"ltr" | "rtl"',
|
|
83
|
-
description: 'The reading direction of the scroll area.',
|
|
84
|
-
},
|
|
85
|
-
]}
|
|
86
|
-
/>
|
|
87
|
-
|
|
88
|
-
<h4 className="text-lg font-medium mt-6">ScrollBar</h4>
|
|
89
|
-
<PropsTable
|
|
90
|
-
props={[
|
|
91
|
-
{
|
|
92
|
-
name: 'orientation',
|
|
93
|
-
type: '"horizontal" | "vertical"',
|
|
94
|
-
defaultValue: '"vertical"',
|
|
95
|
-
description: 'The orientation of the scrollbar.',
|
|
96
|
-
},
|
|
97
|
-
{
|
|
98
|
-
name: 'forceMount',
|
|
99
|
-
type: 'boolean',
|
|
100
|
-
description: 'Used to force mounting when more control is needed.',
|
|
101
|
-
},
|
|
102
|
-
]}
|
|
103
|
-
/>
|
|
104
|
-
</div>
|
|
105
|
-
</>
|
|
106
|
-
);
|
|
107
|
-
}
|
|
@@ -1,203 +0,0 @@
|
|
|
1
|
-
import { ComponentShowcase } from '@/components/docs/ComponentShowcase';
|
|
2
|
-
import { PropsTable } from '@/components/docs/PropsTable';
|
|
3
|
-
import { toast } from 'sonner';
|
|
4
|
-
/* eslint-disable @typescript-eslint/ban-ts-comment, @typescript-eslint/no-unused-vars */
|
|
5
|
-
import {
|
|
6
|
-
CommandEmpty,
|
|
7
|
-
CommandGroup,
|
|
8
|
-
CommandInput,
|
|
9
|
-
CommandItem,
|
|
10
|
-
CommandList,
|
|
11
|
-
Search,
|
|
12
|
-
SearchTrigger,
|
|
13
|
-
} from '@gv-tech/ui-web';
|
|
14
|
-
import * as React from 'react';
|
|
15
|
-
|
|
16
|
-
// @ts-ignore
|
|
17
|
-
|
|
18
|
-
const isNative = false as boolean;
|
|
19
|
-
|
|
20
|
-
// @ts-ignore
|
|
21
|
-
|
|
22
|
-
const platform = 'web' as string;
|
|
23
|
-
|
|
24
|
-
export function SearchDocs() {
|
|
25
|
-
const [open, setOpen] = React.useState(false);
|
|
26
|
-
|
|
27
|
-
return (
|
|
28
|
-
<>
|
|
29
|
-
<ComponentShowcase
|
|
30
|
-
title="Quick Search"
|
|
31
|
-
description="A shortcut-ready search trigger for headers. Press Cmd+K or Ctrl+K to open."
|
|
32
|
-
code={`<Search>
|
|
33
|
-
<CommandInput placeholder="Type a command or search..." />
|
|
34
|
-
<CommandList>
|
|
35
|
-
<CommandEmpty>No results found.</CommandEmpty>
|
|
36
|
-
<CommandGroup heading="Suggestions">
|
|
37
|
-
<CommandItem>Calendar</CommandItem>
|
|
38
|
-
<CommandItem>Search Emoji</CommandItem>
|
|
39
|
-
<CommandItem>Calculator</CommandItem>
|
|
40
|
-
</CommandGroup>
|
|
41
|
-
</CommandList>
|
|
42
|
-
</Search>
|
|
43
|
-
<SearchTrigger onClick={() => setOpen(true)} placeholder="Search documentation..." />`}
|
|
44
|
-
>
|
|
45
|
-
<div className="flex items-center gap-4">
|
|
46
|
-
<Search open={open} onOpenChange={setOpen}>
|
|
47
|
-
<CommandInput placeholder="Type a command or search..." />
|
|
48
|
-
<CommandList>
|
|
49
|
-
<CommandEmpty>No results found.</CommandEmpty>
|
|
50
|
-
<CommandGroup heading="Suggestions">
|
|
51
|
-
<CommandItem
|
|
52
|
-
onSelect={() => {
|
|
53
|
-
toast.success('Selected Calendar');
|
|
54
|
-
setOpen(false);
|
|
55
|
-
}}
|
|
56
|
-
>
|
|
57
|
-
Calendar
|
|
58
|
-
</CommandItem>
|
|
59
|
-
<CommandItem
|
|
60
|
-
onSelect={() => {
|
|
61
|
-
toast.success('Selected Search Emoji');
|
|
62
|
-
setOpen(false);
|
|
63
|
-
}}
|
|
64
|
-
>
|
|
65
|
-
Search Emoji
|
|
66
|
-
</CommandItem>
|
|
67
|
-
<CommandItem
|
|
68
|
-
onSelect={() => {
|
|
69
|
-
toast.success('Selected Calculator');
|
|
70
|
-
setOpen(false);
|
|
71
|
-
}}
|
|
72
|
-
>
|
|
73
|
-
Calculator
|
|
74
|
-
</CommandItem>
|
|
75
|
-
</CommandGroup>
|
|
76
|
-
</CommandList>
|
|
77
|
-
</Search>
|
|
78
|
-
<SearchTrigger onClick={() => setOpen(true)} placeholder="Search documentation..." />
|
|
79
|
-
<p className="text-sm text-muted-foreground">Try clicking the trigger or pressing ⌘K</p>
|
|
80
|
-
</div>
|
|
81
|
-
</ComponentShowcase>
|
|
82
|
-
|
|
83
|
-
<ComponentShowcase
|
|
84
|
-
title="Compact Variant"
|
|
85
|
-
description="A smaller version of the trigger, ideal for dense headers or mobile-first layouts."
|
|
86
|
-
code={`<SearchTrigger variant="compact" />`}
|
|
87
|
-
>
|
|
88
|
-
<div className="flex items-center gap-4">
|
|
89
|
-
<SearchTrigger variant="compact" onClick={() => setOpen(true)} />
|
|
90
|
-
<p className="text-sm text-muted-foreground">Compact trigger showing only icon and shortcut</p>
|
|
91
|
-
</div>
|
|
92
|
-
</ComponentShowcase>
|
|
93
|
-
|
|
94
|
-
<div className="space-y-4">
|
|
95
|
-
<h3 className="text-xl font-semibold">Search Props</h3>
|
|
96
|
-
<PropsTable
|
|
97
|
-
props={[
|
|
98
|
-
{
|
|
99
|
-
name: 'open',
|
|
100
|
-
type: 'boolean',
|
|
101
|
-
required: false,
|
|
102
|
-
description: 'Whether the search dialog is open.',
|
|
103
|
-
},
|
|
104
|
-
{
|
|
105
|
-
name: 'onOpenChange',
|
|
106
|
-
type: '(open: boolean) => void',
|
|
107
|
-
required: false,
|
|
108
|
-
description: 'Event handler called when the open state changes.',
|
|
109
|
-
},
|
|
110
|
-
{
|
|
111
|
-
name: 'children',
|
|
112
|
-
type: 'ReactNode',
|
|
113
|
-
required: false,
|
|
114
|
-
description: 'The search content (CommandInput, CommandList, etc.).',
|
|
115
|
-
},
|
|
116
|
-
]}
|
|
117
|
-
/>
|
|
118
|
-
</div>
|
|
119
|
-
|
|
120
|
-
<div className="mt-8 space-y-4">
|
|
121
|
-
<h3 className="text-xl font-semibold">SearchTrigger Props</h3>
|
|
122
|
-
<PropsTable
|
|
123
|
-
props={[
|
|
124
|
-
{
|
|
125
|
-
name: 'className',
|
|
126
|
-
type: 'string',
|
|
127
|
-
required: false,
|
|
128
|
-
description: 'Additional CSS classes to apply.',
|
|
129
|
-
},
|
|
130
|
-
{
|
|
131
|
-
name: 'onClick',
|
|
132
|
-
type: 'MouseEventHandler',
|
|
133
|
-
required: false,
|
|
134
|
-
description: 'Click event handler to trigger the search.',
|
|
135
|
-
},
|
|
136
|
-
{
|
|
137
|
-
name: 'placeholder',
|
|
138
|
-
type: 'string',
|
|
139
|
-
defaultValue: '"Search docs..."',
|
|
140
|
-
required: false,
|
|
141
|
-
description: 'The placeholder text to display in the trigger.',
|
|
142
|
-
},
|
|
143
|
-
{
|
|
144
|
-
name: 'variant',
|
|
145
|
-
type: '"default" | "compact"',
|
|
146
|
-
defaultValue: '"default"',
|
|
147
|
-
required: false,
|
|
148
|
-
description: 'The visual style of the trigger.',
|
|
149
|
-
},
|
|
150
|
-
]}
|
|
151
|
-
/>
|
|
152
|
-
</div>
|
|
153
|
-
|
|
154
|
-
<div className="mt-12 space-y-6">
|
|
155
|
-
<div>
|
|
156
|
-
<h3 className="text-xl font-semibold">Integrations</h3>
|
|
157
|
-
<p className="mt-2 text-muted-foreground">
|
|
158
|
-
The Search component is designed to be highly composable, making it easy to integrate with external search
|
|
159
|
-
providers like Algolia, ElasticSearch, or custom APIs.
|
|
160
|
-
</p>
|
|
161
|
-
</div>
|
|
162
|
-
|
|
163
|
-
<div className="rounded-lg border bg-muted/50 p-6">
|
|
164
|
-
<h4 className="font-medium">External Provider Pattern</h4>
|
|
165
|
-
<p className="mt-1 text-sm text-muted-foreground">
|
|
166
|
-
You can use the `onValueChange` prop of `CommandInput` to trigger external searches and dynamically render
|
|
167
|
-
`CommandGroup` and `CommandItem` components with the results.
|
|
168
|
-
</p>
|
|
169
|
-
<pre className="mt-4 overflow-x-auto rounded-md bg-background p-4 text-xs">
|
|
170
|
-
<code>{`const [results, setResults] = React.useState([]);
|
|
171
|
-
|
|
172
|
-
const handleSearch = async (query) => {
|
|
173
|
-
const data = await algoliaIndex.search(query);
|
|
174
|
-
setResults(data.hits);
|
|
175
|
-
};
|
|
176
|
-
|
|
177
|
-
return (
|
|
178
|
-
<Search>
|
|
179
|
-
<CommandInput
|
|
180
|
-
placeholder="Search docs..."
|
|
181
|
-
onValueChange={handleSearch}
|
|
182
|
-
/>
|
|
183
|
-
<CommandList>
|
|
184
|
-
{results.length > 0 ? (
|
|
185
|
-
<CommandGroup heading="Results">
|
|
186
|
-
{results.map((hit) => (
|
|
187
|
-
<CommandItem key={hit.objectID}>
|
|
188
|
-
{hit.title}
|
|
189
|
-
</CommandItem>
|
|
190
|
-
))}
|
|
191
|
-
</CommandGroup>
|
|
192
|
-
) : (
|
|
193
|
-
<CommandEmpty>No results found.</CommandEmpty>
|
|
194
|
-
)}
|
|
195
|
-
</CommandList>
|
|
196
|
-
</Search>
|
|
197
|
-
);`}</code>
|
|
198
|
-
</pre>
|
|
199
|
-
</div>
|
|
200
|
-
</div>
|
|
201
|
-
</>
|
|
202
|
-
);
|
|
203
|
-
}
|