@devxcrew/react-ui 0.0.0-stage → 0.1.7
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/README.md +85 -2
- package/package.json +105 -4
- package/src/blocks/agent-chat-workspace/agent-chat-workspace.tsx +162 -0
- package/src/blocks/agent-chat-workspace/index.ts +2 -0
- package/src/blocks/agent-provider-settings/agent-provider-settings.tsx +183 -0
- package/src/blocks/agent-provider-settings/index.ts +2 -0
- package/src/blocks/agent-task-workspace/agent-task-workspace.tsx +48 -0
- package/src/blocks/agent-task-workspace/index.ts +2 -0
- package/src/blocks/analysis-context/analysis-context.tsx +6 -0
- package/src/blocks/analysis-context/index.ts +1 -0
- package/src/blocks/app-header/app-header.tsx +159 -0
- package/src/blocks/app-header/index.ts +2 -0
- package/src/blocks/archived-chat-workspace/archived-chat-workspace.tsx +29 -0
- package/src/blocks/archived-chat-workspace/index.ts +2 -0
- package/src/blocks/auth/README.md +32 -0
- package/src/blocks/auth/admin-login-page.tsx +15 -0
- package/src/blocks/auth/admin-password-forgot-page.tsx +5 -0
- package/src/blocks/auth/auth-page-layout.tsx +90 -0
- package/src/blocks/auth/client-login-page.tsx +20 -0
- package/src/blocks/auth/client-password-forgot-page.tsx +5 -0
- package/src/blocks/auth/identity-management-desk.tsx +530 -0
- package/src/blocks/auth/index.ts +12 -0
- package/src/blocks/auth/login-page.tsx +206 -0
- package/src/blocks/auth/password-forgot-page.tsx +60 -0
- package/src/blocks/auth/portal-pages.tsx +32 -0
- package/src/blocks/auth/privileged-desk.tsx +55 -0
- package/src/blocks/auth/register-page.tsx +117 -0
- package/src/blocks/auth/session-boundary.tsx +296 -0
- package/src/blocks/auth/super-admin-login-page.tsx +15 -0
- package/src/blocks/auth/super-admin-password-forgot-page.tsx +5 -0
- package/src/blocks/blog/blog-card.tsx +156 -0
- package/src/blocks/blog/blog-reader.tsx +175 -0
- package/src/blocks/blog/blog-types.ts +47 -0
- package/src/blocks/blog/index.ts +3 -0
- package/src/blocks/chat-composer/chat-composer.tsx +140 -0
- package/src/blocks/chat-composer/index.ts +1 -0
- package/src/blocks/chat-history/chat-history.tsx +59 -0
- package/src/blocks/chat-history/index.ts +1 -0
- package/src/blocks/chat-response-progress/chat-response-progress.tsx +34 -0
- package/src/blocks/chat-response-progress/index.ts +2 -0
- package/src/blocks/chat-runtime-controls/chat-runtime-controls.tsx +56 -0
- package/src/blocks/chat-runtime-controls/index.ts +2 -0
- package/src/blocks/chat-runtime-trace/chat-runtime-trace.tsx +71 -0
- package/src/blocks/chat-runtime-trace/index.ts +2 -0
- package/src/blocks/codex-connection-settings/codex-connection-settings.tsx +42 -0
- package/src/blocks/codex-connection-settings/index.ts +1 -0
- package/src/blocks/dropzone/dropzone-file-item.tsx +113 -0
- package/src/blocks/dropzone/dropzone-types.ts +32 -0
- package/src/blocks/dropzone/dropzone.tsx +216 -0
- package/src/blocks/dropzone/index.ts +3 -0
- package/src/blocks/ecommerce/cart/cart-drawer.tsx +228 -0
- package/src/blocks/ecommerce/cart/cart-types.ts +27 -0
- package/src/blocks/ecommerce/cart/index.ts +2 -0
- package/src/blocks/ecommerce/categories/categories-types.ts +23 -0
- package/src/blocks/ecommerce/categories/category-showcase.tsx +125 -0
- package/src/blocks/ecommerce/categories/index.ts +2 -0
- package/src/blocks/ecommerce/checkout/checkout-types.ts +48 -0
- package/src/blocks/ecommerce/checkout/checkout-wizard.tsx +468 -0
- package/src/blocks/ecommerce/checkout/index.ts +2 -0
- package/src/blocks/ecommerce/comparison/comparison-types.ts +28 -0
- package/src/blocks/ecommerce/comparison/index.ts +2 -0
- package/src/blocks/ecommerce/comparison/product-comparison.tsx +174 -0
- package/src/blocks/ecommerce/coupon-wallet/coupon-wallet-types.ts +21 -0
- package/src/blocks/ecommerce/coupon-wallet/coupon-wallet.tsx +154 -0
- package/src/blocks/ecommerce/coupon-wallet/index.ts +2 -0
- package/src/blocks/ecommerce/delivery-tracker/delivery-tracker-types.ts +20 -0
- package/src/blocks/ecommerce/delivery-tracker/delivery-tracker.tsx +169 -0
- package/src/blocks/ecommerce/delivery-tracker/index.ts +2 -0
- package/src/blocks/ecommerce/index.ts +12 -0
- package/src/blocks/ecommerce/payment-methods/index.ts +2 -0
- package/src/blocks/ecommerce/payment-methods/payment-method-selector.tsx +224 -0
- package/src/blocks/ecommerce/payment-methods/payment-methods-types.ts +21 -0
- package/src/blocks/ecommerce/price-history/index.ts +2 -0
- package/src/blocks/ecommerce/price-history/price-history-chart.tsx +217 -0
- package/src/blocks/ecommerce/price-history/price-history-types.ts +16 -0
- package/src/blocks/ecommerce/reviews/index.ts +2 -0
- package/src/blocks/ecommerce/reviews/reviews-section.tsx +309 -0
- package/src/blocks/ecommerce/reviews/reviews-types.ts +26 -0
- package/src/blocks/ecommerce/wishlist/index.ts +2 -0
- package/src/blocks/ecommerce/wishlist/wishlist-grid.tsx +149 -0
- package/src/blocks/ecommerce/wishlist/wishlist-types.ts +19 -0
- package/src/blocks/execution-status/README.md +25 -0
- package/src/blocks/execution-status/execution-status.tsx +135 -0
- package/src/blocks/execution-status/index.ts +2 -0
- package/src/blocks/file-tree/file-icons.tsx +84 -0
- package/src/blocks/file-tree/file-tree-node.tsx +158 -0
- package/src/blocks/file-tree/file-tree-types.ts +33 -0
- package/src/blocks/file-tree/file-tree.tsx +163 -0
- package/src/blocks/file-tree/index.ts +5 -0
- package/src/blocks/filter-builder/filter-builder.tsx +169 -0
- package/src/blocks/filter-builder/filter-row.tsx +164 -0
- package/src/blocks/filter-builder/filter-types.ts +61 -0
- package/src/blocks/filter-builder/index.ts +12 -0
- package/src/blocks/footer/footer-types.ts +35 -0
- package/src/blocks/footer/index.ts +2 -0
- package/src/blocks/footer/site-footer.tsx +212 -0
- package/src/blocks/form/form-block.tsx +113 -0
- package/src/blocks/form/form-lookup-field.tsx +60 -0
- package/src/blocks/form/index.ts +4 -0
- package/src/blocks/handover-stack/handover-stack.tsx +41 -0
- package/src/blocks/handover-stack/index.ts +1 -0
- package/src/blocks/idea-handover/idea-handover-readiness.ts +41 -0
- package/src/blocks/idea-handover/idea-handover-workspace.tsx +150 -0
- package/src/blocks/idea-handover/index.ts +4 -0
- package/src/blocks/kanban/index.ts +11 -0
- package/src/blocks/kanban/kanban-board.tsx +146 -0
- package/src/blocks/kanban/kanban-card.tsx +149 -0
- package/src/blocks/kanban/kanban-column.tsx +102 -0
- package/src/blocks/kanban/kanban-types.ts +38 -0
- package/src/blocks/loader/global-loader.tsx +90 -0
- package/src/blocks/loader/index.ts +1 -0
- package/src/blocks/mascot/README.md +21 -0
- package/src/blocks/mascot/index.ts +2 -0
- package/src/blocks/mascot/mascot.tsx +202 -0
- package/src/blocks/master-list/README.md +21 -0
- package/src/blocks/master-list/index.ts +12 -0
- package/src/blocks/master-list/master-form.tsx +157 -0
- package/src/blocks/master-list/master-list-desk.tsx +370 -0
- package/src/blocks/master-list/master-list.tsx +189 -0
- package/src/blocks/master-list/types.ts +18 -0
- package/src/blocks/mermaid-preview/index.ts +1 -0
- package/src/blocks/mermaid-preview/mermaid-preview.tsx +164 -0
- package/src/blocks/notifications/README.md +7 -0
- package/src/blocks/notifications/index.ts +1 -0
- package/src/blocks/notifications/notification-center-page.tsx +73 -0
- package/src/blocks/pricing/index.ts +7 -0
- package/src/blocks/pricing/pricing-table.tsx +173 -0
- package/src/blocks/pricing/pricing-types.ts +34 -0
- package/src/blocks/product-card/index.ts +2 -0
- package/src/blocks/product-card/product-card-types.ts +35 -0
- package/src/blocks/product-card/product-card.tsx +183 -0
- package/src/blocks/table/data-table-block.tsx +313 -0
- package/src/blocks/table/data-table-filter-menu.tsx +48 -0
- package/src/blocks/table/data-table-icon-menu-trigger.tsx +44 -0
- package/src/blocks/table/data-table-menu-content.tsx +32 -0
- package/src/blocks/table/data-table-pagination.tsx +149 -0
- package/src/blocks/table/data-table-row-actions.tsx +53 -0
- package/src/blocks/table/data-table-status.tsx +42 -0
- package/src/blocks/table/data-table-toolbar.tsx +124 -0
- package/src/blocks/table/data-table-totals.tsx +31 -0
- package/src/blocks/table/index.ts +13 -0
- package/src/blocks/workspace/index.ts +19 -0
- package/src/blocks/workspace/workspace-action-card.tsx +73 -0
- package/src/blocks/workspace/workspace-application-header.tsx +67 -0
- package/src/blocks/workspace/workspace-entity-card.tsx +48 -0
- package/src/blocks/workspace/workspace-health-summary.tsx +15 -0
- package/src/blocks/workspace/workspace-metric-card.tsx +97 -0
- package/src/blocks/workspace/workspace-page-header.tsx +43 -0
- package/src/blocks/workspace/workspace-publish-status.tsx +15 -0
- package/src/blocks/workspace/workspace-route-checklist.tsx +28 -0
- package/src/blocks/workspace/workspace-runtime-status.tsx +48 -0
- package/src/blocks/workspace/workspace-section-card.tsx +42 -0
- package/src/components/accordion.tsx +65 -0
- package/src/components/alert-dialog.tsx +160 -0
- package/src/components/alert.tsx +68 -0
- package/src/components/aspect-ratio.tsx +22 -0
- package/src/components/attachment.tsx +195 -0
- package/src/components/avatar.tsx +90 -0
- package/src/components/badge.tsx +55 -0
- package/src/components/breadcrumb.tsx +100 -0
- package/src/components/bubble.tsx +123 -0
- package/src/components/button-group.tsx +79 -0
- package/src/components/button.tsx +71 -0
- package/src/components/calendar.tsx +185 -0
- package/src/components/card.tsx +100 -0
- package/src/components/carousel.tsx +229 -0
- package/src/components/chart.tsx +338 -0
- package/src/components/checkbox.tsx +27 -0
- package/src/components/collapsible.tsx +15 -0
- package/src/components/combobox.tsx +269 -0
- package/src/components/command.tsx +181 -0
- package/src/components/compact-model-switcher.tsx +128 -0
- package/src/components/context-menu.tsx +244 -0
- package/src/components/dialog.tsx +138 -0
- package/src/components/direction.tsx +1 -0
- package/src/components/drawer.tsx +208 -0
- package/src/components/dropdown-menu.tsx +257 -0
- package/src/components/empty.tsx +93 -0
- package/src/components/field.tsx +232 -0
- package/src/components/hover-card.tsx +45 -0
- package/src/components/input-group.tsx +146 -0
- package/src/components/input-otp.tsx +83 -0
- package/src/components/input.tsx +19 -0
- package/src/components/item.tsx +188 -0
- package/src/components/kbd.tsx +26 -0
- package/src/components/label.tsx +17 -0
- package/src/components/markdown-content.tsx +113 -0
- package/src/components/marker.tsx +67 -0
- package/src/components/menubar.tsx +267 -0
- package/src/components/message-scroller.tsx +91 -0
- package/src/components/message.tsx +84 -0
- package/src/components/native-select.tsx +54 -0
- package/src/components/navigation-menu.tsx +160 -0
- package/src/components/pagination.tsx +118 -0
- package/src/components/popover.tsx +74 -0
- package/src/components/progress.tsx +82 -0
- package/src/components/questionnaire.tsx +150 -0
- package/src/components/radio-group.tsx +35 -0
- package/src/components/resizable.tsx +41 -0
- package/src/components/rich-text-editor.tsx +604 -0
- package/src/components/scroll-area.tsx +47 -0
- package/src/components/select.tsx +189 -0
- package/src/components/separator.tsx +18 -0
- package/src/components/sheet.tsx +125 -0
- package/src/components/sidebar.tsx +693 -0
- package/src/components/skeleton.tsx +13 -0
- package/src/components/slider.tsx +51 -0
- package/src/components/sonner.tsx +45 -0
- package/src/components/sparkline.tsx +231 -0
- package/src/components/spinner.tsx +20 -0
- package/src/components/status-badge.tsx +114 -0
- package/src/components/switch.tsx +31 -0
- package/src/components/table.tsx +91 -0
- package/src/components/tabs.tsx +72 -0
- package/src/components/textarea.tsx +17 -0
- package/src/components/toast.tsx +222 -0
- package/src/components/toggle-group.tsx +85 -0
- package/src/components/toggle.tsx +42 -0
- package/src/components/tooltip.tsx +53 -0
- package/src/design-system/README.md +55 -0
- package/src/design-system/action-intents.ts +21 -0
- package/src/design-system/agent-manifest.ts +83 -0
- package/src/design-system/block-registry.ts +272 -0
- package/src/design-system/component-registry.ts +142 -0
- package/src/design-system/contracts.ts +69 -0
- package/src/design-system/defaults.ts +3 -0
- package/src/design-system/index.ts +29 -0
- package/src/design-system/mcp-server.ts +156 -0
- package/src/design-system/page-registry.ts +74 -0
- package/src/design-system/selection.ts +67 -0
- package/src/design-system/template-registry.ts +33 -0
- package/src/features/interface-topology/index.ts +14 -0
- package/src/features/interface-topology/interface-topology.types.ts +40 -0
- package/src/features/interface-topology/topology-control.tsx +18 -0
- package/src/features/interface-topology/topology-inspector.tsx +228 -0
- package/src/features/interface-topology/topology-marker.tsx +47 -0
- package/src/features/interface-topology/topology-region.tsx +44 -0
- package/src/features/interface-topology/use-interface-topology.ts +178 -0
- package/src/hooks/use-mobile.ts +19 -0
- package/src/hooks/use-scroll-follow.ts +22 -0
- package/src/index.ts +11 -0
- package/src/layouts/README.md +65 -0
- package/src/layouts/agent-workspace/agent-activity-rail.tsx +101 -0
- package/src/layouts/agent-workspace/agent-workspace.tsx +27 -0
- package/src/layouts/agent-workspace/agent-workspace.types.ts +28 -0
- package/src/layouts/agent-workspace/index.ts +7 -0
- package/src/layouts/blog-header/blog-header-types.ts +25 -0
- package/src/layouts/blog-header/blog-header.tsx +172 -0
- package/src/layouts/blog-header/index.ts +2 -0
- package/src/layouts/documentation-workspace/README.md +8 -0
- package/src/layouts/documentation-workspace/documentation-workspace.tsx +34 -0
- package/src/layouts/documentation-workspace/index.ts +1 -0
- package/src/layouts/ecommerce-header/ecommerce-actions.tsx +89 -0
- package/src/layouts/ecommerce-header/ecommerce-announcement.tsx +43 -0
- package/src/layouts/ecommerce-header/ecommerce-drawer.tsx +97 -0
- package/src/layouts/ecommerce-header/ecommerce-header-types.ts +59 -0
- package/src/layouts/ecommerce-header/ecommerce-header.tsx +47 -0
- package/src/layouts/ecommerce-header/ecommerce-navigation.tsx +98 -0
- package/src/layouts/ecommerce-header/ecommerce-search.tsx +86 -0
- package/src/layouts/ecommerce-header/index.ts +2 -0
- package/src/layouts/main-workspace/index.ts +28 -0
- package/src/layouts/mdi/index.ts +1 -0
- package/src/layouts/mdi/mdi.tsx +20 -0
- package/src/layouts/mdi-main/index.ts +27 -0
- package/src/layouts/mdi-main/mdi-app-catalog.generated.ts +159 -0
- package/src/layouts/mdi-main/mdi-app-catalog.ts +76 -0
- package/src/layouts/mdi-main/mdi-app-switcher.tsx +107 -0
- package/src/layouts/mdi-main/mdi-feature-settings.tsx +135 -0
- package/src/layouts/mdi-main/mdi-global-search.tsx +192 -0
- package/src/layouts/mdi-main/mdi-main.tsx +241 -0
- package/src/layouts/mdi-main/mdi-notifications-menu.tsx +197 -0
- package/src/layouts/mdi-main/mdi-profile-menu.tsx +79 -0
- package/src/layouts/mdi-main/mdi-sidebar-navigation.tsx +226 -0
- package/src/layouts/mdi-main/mdi-sidebar.tsx +110 -0
- package/src/layouts/mdi-main/mdi-status-bar.tsx +26 -0
- package/src/layouts/mdi-main/mdi-top-menu-control.ts +4 -0
- package/src/layouts/mdi-main/mdi-top-menu.tsx +117 -0
- package/src/layouts/mdi-main/mdi-topology.tsx +297 -0
- package/src/layouts/mdi-main/mdi-tweak-panel.tsx +104 -0
- package/src/layouts/mdi-main/mdi-types.ts +131 -0
- package/src/layouts/mdi-main/use-mdi-features.ts +36 -0
- package/src/layouts/mdi-main/use-mdi-sidebar-state.ts +59 -0
- package/src/layouts/site-header/announcement-bar.tsx +55 -0
- package/src/layouts/site-header/category-strip.tsx +41 -0
- package/src/layouts/site-header/index.ts +16 -0
- package/src/layouts/site-header/main-navbar.tsx +179 -0
- package/src/layouts/site-header/mobile-drawer.tsx +140 -0
- package/src/layouts/site-header/site-header-types.ts +63 -0
- package/src/layouts/site-header/site-header.tsx +58 -0
- package/src/lib/random-id.ts +19 -0
- package/src/lib/utils.ts +6 -0
- package/src/providers/pdf-provider.ts +137 -0
- package/src/styles/globals.css +374 -0
- package/src/templates/README.md +12 -0
- package/src/templates/dashboard-01/components/app-sidebar.tsx +177 -0
- package/src/templates/dashboard-01/components/chart-area-interactive.tsx +276 -0
- package/src/templates/dashboard-01/components/data-table-cell-viewer.tsx +213 -0
- package/src/templates/dashboard-01/components/data-table.tsx +577 -0
- package/src/templates/dashboard-01/components/nav-documents.tsx +79 -0
- package/src/templates/dashboard-01/components/nav-main.tsx +55 -0
- package/src/templates/dashboard-01/components/nav-secondary.tsx +39 -0
- package/src/templates/dashboard-01/components/nav-user.tsx +97 -0
- package/src/templates/dashboard-01/components/section-cards.tsx +99 -0
- package/src/templates/dashboard-01/components/site-header.tsx +14 -0
- package/src/templates/dashboard-01/data.json +614 -0
- package/src/templates/dashboard-01/index.ts +7 -0
- package/src/templates/documentation-sidebar/app-sidebar.tsx +95 -0
- package/src/templates/documentation-sidebar/index.ts +2 -0
- package/src/templates/sidebar-07/components/app-sidebar.tsx +175 -0
- package/src/templates/sidebar-07/components/nav-main.tsx +64 -0
- package/src/templates/sidebar-07/components/nav-projects.tsx +79 -0
- package/src/templates/sidebar-07/components/nav-user.tsx +105 -0
- package/src/templates/sidebar-07/components/team-switcher.tsx +94 -0
- package/src/templates/sidebar-07/index.ts +1 -0
- package/src/templates/ui-page/index.ts +7 -0
- package/src/templates/ui-page/ui-browser-frame.tsx +27 -0
- package/src/templates/ui-page/ui-template-code.tsx +48 -0
- package/src/templates/ui-page/ui-template-header.tsx +87 -0
- package/src/templates/ui-page/ui-template-navigation.tsx +60 -0
- package/src/templates/ui-page/ui-template-page.tsx +97 -0
- package/src/theme/index.ts +12 -0
- package/src/theme/theme-config.ts +30 -0
- package/src/theme/theme-provider.tsx +142 -0
- package/src/theme/theme-selector.tsx +75 -0
- package/src/tokens/index.ts +15 -0
- package/src/vite-env.d.ts +3 -0
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
import * as React from 'react'
|
|
2
|
+
import { cn } from '../lib/utils'
|
|
3
|
+
|
|
4
|
+
import { Button } from '@devxcrew/react-ui/components/button'
|
|
5
|
+
import { ChevronLeftIcon, ChevronRightIcon, MoreHorizontalIcon } from 'lucide-react'
|
|
6
|
+
|
|
7
|
+
function Pagination({ className, ...props }: React.ComponentProps<'nav'>) {
|
|
8
|
+
return (
|
|
9
|
+
<nav
|
|
10
|
+
role="navigation"
|
|
11
|
+
aria-label="pagination"
|
|
12
|
+
data-slot="pagination"
|
|
13
|
+
className={cn('mx-auto flex w-full justify-center', className)}
|
|
14
|
+
{...props}
|
|
15
|
+
/>
|
|
16
|
+
)
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
function PaginationContent({ className, ...props }: React.ComponentProps<'ul'>) {
|
|
20
|
+
return (
|
|
21
|
+
<ul
|
|
22
|
+
data-slot="pagination-content"
|
|
23
|
+
className={cn('flex items-center gap-0.5', className)}
|
|
24
|
+
{...props}
|
|
25
|
+
/>
|
|
26
|
+
)
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
function PaginationItem({ ...props }: React.ComponentProps<'li'>) {
|
|
30
|
+
return <li data-slot="pagination-item" {...props} />
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
type PaginationLinkProps = {
|
|
34
|
+
isActive?: boolean
|
|
35
|
+
} & Pick<React.ComponentProps<typeof Button>, 'size'> &
|
|
36
|
+
React.ComponentProps<'a'>
|
|
37
|
+
|
|
38
|
+
function PaginationLink({ className, isActive, size = 'icon', ...props }: PaginationLinkProps) {
|
|
39
|
+
return (
|
|
40
|
+
<Button
|
|
41
|
+
variant={isActive ? 'outline' : 'ghost'}
|
|
42
|
+
size={size}
|
|
43
|
+
className={cn(className)}
|
|
44
|
+
nativeButton={false}
|
|
45
|
+
render={
|
|
46
|
+
<a
|
|
47
|
+
aria-current={isActive ? 'page' : undefined}
|
|
48
|
+
data-slot="pagination-link"
|
|
49
|
+
data-active={isActive}
|
|
50
|
+
{...props}
|
|
51
|
+
/>
|
|
52
|
+
}
|
|
53
|
+
/>
|
|
54
|
+
)
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
function PaginationPrevious({
|
|
58
|
+
className,
|
|
59
|
+
text = 'Previous',
|
|
60
|
+
...props
|
|
61
|
+
}: React.ComponentProps<typeof PaginationLink> & { text?: string }) {
|
|
62
|
+
return (
|
|
63
|
+
<PaginationLink
|
|
64
|
+
aria-label="Go to previous page"
|
|
65
|
+
size="default"
|
|
66
|
+
className={cn('pl-1.5!', className)}
|
|
67
|
+
{...props}
|
|
68
|
+
>
|
|
69
|
+
<ChevronLeftIcon data-icon="inline-start" />
|
|
70
|
+
<span className="hidden sm:block">{text}</span>
|
|
71
|
+
</PaginationLink>
|
|
72
|
+
)
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
function PaginationNext({
|
|
76
|
+
className,
|
|
77
|
+
text = 'Next',
|
|
78
|
+
...props
|
|
79
|
+
}: React.ComponentProps<typeof PaginationLink> & { text?: string }) {
|
|
80
|
+
return (
|
|
81
|
+
<PaginationLink
|
|
82
|
+
aria-label="Go to next page"
|
|
83
|
+
size="default"
|
|
84
|
+
className={cn('pr-1.5!', className)}
|
|
85
|
+
{...props}
|
|
86
|
+
>
|
|
87
|
+
<span className="hidden sm:block">{text}</span>
|
|
88
|
+
<ChevronRightIcon data-icon="inline-end" />
|
|
89
|
+
</PaginationLink>
|
|
90
|
+
)
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
function PaginationEllipsis({ className, ...props }: React.ComponentProps<'span'>) {
|
|
94
|
+
return (
|
|
95
|
+
<span
|
|
96
|
+
aria-hidden
|
|
97
|
+
data-slot="pagination-ellipsis"
|
|
98
|
+
className={cn(
|
|
99
|
+
"flex size-8 items-center justify-center [&_svg:not([class*='size-'])]:size-4",
|
|
100
|
+
className,
|
|
101
|
+
)}
|
|
102
|
+
{...props}
|
|
103
|
+
>
|
|
104
|
+
<MoreHorizontalIcon />
|
|
105
|
+
<span className="sr-only">More pages</span>
|
|
106
|
+
</span>
|
|
107
|
+
)
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
export {
|
|
111
|
+
Pagination,
|
|
112
|
+
PaginationContent,
|
|
113
|
+
PaginationEllipsis,
|
|
114
|
+
PaginationItem,
|
|
115
|
+
PaginationLink,
|
|
116
|
+
PaginationNext,
|
|
117
|
+
PaginationPrevious,
|
|
118
|
+
}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import * as React from 'react'
|
|
2
|
+
import { Popover as PopoverPrimitive } from '@base-ui/react/popover'
|
|
3
|
+
import { cn } from '../lib/utils'
|
|
4
|
+
|
|
5
|
+
function Popover({ ...props }: PopoverPrimitive.Root.Props) {
|
|
6
|
+
return <PopoverPrimitive.Root data-slot="popover" {...props} />
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
function PopoverTrigger({ ...props }: PopoverPrimitive.Trigger.Props) {
|
|
10
|
+
return <PopoverPrimitive.Trigger data-slot="popover-trigger" {...props} />
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
function PopoverContent({
|
|
14
|
+
className,
|
|
15
|
+
align = 'center',
|
|
16
|
+
alignOffset = 0,
|
|
17
|
+
side = 'bottom',
|
|
18
|
+
sideOffset = 4,
|
|
19
|
+
...props
|
|
20
|
+
}: PopoverPrimitive.Popup.Props &
|
|
21
|
+
Pick<PopoverPrimitive.Positioner.Props, 'align' | 'alignOffset' | 'side' | 'sideOffset'>) {
|
|
22
|
+
return (
|
|
23
|
+
<PopoverPrimitive.Portal>
|
|
24
|
+
<PopoverPrimitive.Positioner
|
|
25
|
+
align={align}
|
|
26
|
+
alignOffset={alignOffset}
|
|
27
|
+
side={side}
|
|
28
|
+
sideOffset={sideOffset}
|
|
29
|
+
className="isolate z-50"
|
|
30
|
+
>
|
|
31
|
+
<PopoverPrimitive.Popup
|
|
32
|
+
data-slot="popover-content"
|
|
33
|
+
className={cn(
|
|
34
|
+
'z-50 flex w-72 origin-(--transform-origin) flex-col gap-2.5 rounded-lg bg-popover p-2.5 text-sm text-popover-foreground shadow-md ring-1 ring-foreground/10 outline-hidden duration-100 data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-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 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95',
|
|
35
|
+
className,
|
|
36
|
+
)}
|
|
37
|
+
{...props}
|
|
38
|
+
/>
|
|
39
|
+
</PopoverPrimitive.Positioner>
|
|
40
|
+
</PopoverPrimitive.Portal>
|
|
41
|
+
)
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
function PopoverHeader({ className, ...props }: React.ComponentProps<'div'>) {
|
|
45
|
+
return (
|
|
46
|
+
<div
|
|
47
|
+
data-slot="popover-header"
|
|
48
|
+
className={cn('flex flex-col gap-0.5 text-sm', className)}
|
|
49
|
+
{...props}
|
|
50
|
+
/>
|
|
51
|
+
)
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
function PopoverTitle({ className, ...props }: PopoverPrimitive.Title.Props) {
|
|
55
|
+
return (
|
|
56
|
+
<PopoverPrimitive.Title
|
|
57
|
+
data-slot="popover-title"
|
|
58
|
+
className={cn('font-medium', className)}
|
|
59
|
+
{...props}
|
|
60
|
+
/>
|
|
61
|
+
)
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
function PopoverDescription({ className, ...props }: PopoverPrimitive.Description.Props) {
|
|
65
|
+
return (
|
|
66
|
+
<PopoverPrimitive.Description
|
|
67
|
+
data-slot="popover-description"
|
|
68
|
+
className={cn('text-muted-foreground', className)}
|
|
69
|
+
{...props}
|
|
70
|
+
/>
|
|
71
|
+
)
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
export { Popover, PopoverContent, PopoverDescription, PopoverHeader, PopoverTitle, PopoverTrigger }
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
'use client'
|
|
2
|
+
|
|
3
|
+
import { Progress as ProgressPrimitive } from '@base-ui/react/progress'
|
|
4
|
+
import { cn } from '../lib/utils'
|
|
5
|
+
|
|
6
|
+
function Progress({
|
|
7
|
+
className,
|
|
8
|
+
children,
|
|
9
|
+
value,
|
|
10
|
+
animated = true,
|
|
11
|
+
...props
|
|
12
|
+
}: ProgressPrimitive.Root.Props & { animated?: boolean }) {
|
|
13
|
+
return (
|
|
14
|
+
<ProgressPrimitive.Root
|
|
15
|
+
value={value}
|
|
16
|
+
data-slot="progress"
|
|
17
|
+
className={cn('flex flex-wrap gap-3', className)}
|
|
18
|
+
{...props}
|
|
19
|
+
>
|
|
20
|
+
{children}
|
|
21
|
+
<ProgressTrack>
|
|
22
|
+
{value === null ? (
|
|
23
|
+
<div
|
|
24
|
+
data-slot="progress-indeterminate"
|
|
25
|
+
aria-hidden="true"
|
|
26
|
+
className={cn(
|
|
27
|
+
'h-full w-1/3 rounded-full bg-primary',
|
|
28
|
+
animated && 'motion-safe:animate-pulse',
|
|
29
|
+
)}
|
|
30
|
+
/>
|
|
31
|
+
) : (
|
|
32
|
+
<ProgressIndicator />
|
|
33
|
+
)}
|
|
34
|
+
</ProgressTrack>
|
|
35
|
+
</ProgressPrimitive.Root>
|
|
36
|
+
)
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
function ProgressTrack({ className, ...props }: ProgressPrimitive.Track.Props) {
|
|
40
|
+
return (
|
|
41
|
+
<ProgressPrimitive.Track
|
|
42
|
+
className={cn(
|
|
43
|
+
'relative flex h-1 w-full items-center overflow-x-hidden rounded-full bg-muted',
|
|
44
|
+
className,
|
|
45
|
+
)}
|
|
46
|
+
data-slot="progress-track"
|
|
47
|
+
{...props}
|
|
48
|
+
/>
|
|
49
|
+
)
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
function ProgressIndicator({ className, ...props }: ProgressPrimitive.Indicator.Props) {
|
|
53
|
+
return (
|
|
54
|
+
<ProgressPrimitive.Indicator
|
|
55
|
+
data-slot="progress-indicator"
|
|
56
|
+
className={cn('h-full bg-primary motion-safe:transition-all', className)}
|
|
57
|
+
{...props}
|
|
58
|
+
/>
|
|
59
|
+
)
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
function ProgressLabel({ className, ...props }: ProgressPrimitive.Label.Props) {
|
|
63
|
+
return (
|
|
64
|
+
<ProgressPrimitive.Label
|
|
65
|
+
className={cn('text-sm font-medium', className)}
|
|
66
|
+
data-slot="progress-label"
|
|
67
|
+
{...props}
|
|
68
|
+
/>
|
|
69
|
+
)
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
function ProgressValue({ className, ...props }: ProgressPrimitive.Value.Props) {
|
|
73
|
+
return (
|
|
74
|
+
<ProgressPrimitive.Value
|
|
75
|
+
className={cn('ml-auto text-sm text-muted-foreground tabular-nums', className)}
|
|
76
|
+
data-slot="progress-value"
|
|
77
|
+
{...props}
|
|
78
|
+
/>
|
|
79
|
+
)
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
export { Progress, ProgressTrack, ProgressIndicator, ProgressLabel, ProgressValue }
|
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { CheckIcon } from "lucide-react";
|
|
3
|
+
import { cn } from "../lib/utils";
|
|
4
|
+
|
|
5
|
+
import { Button } from "@devxcrew/react-ui/components/button";
|
|
6
|
+
|
|
7
|
+
type QuestionnaireButtonProps = React.ComponentProps<typeof Button>;
|
|
8
|
+
|
|
9
|
+
function Questionnaire({ className, ...props }: React.ComponentProps<"div">) {
|
|
10
|
+
return <div data-slot="questionnaire" className={cn("flex w-full min-w-0 flex-col gap-4", className)} {...props} />;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
function QuestionnaireProgress({ className, ...props }: React.ComponentProps<"p">) {
|
|
14
|
+
return (
|
|
15
|
+
<p
|
|
16
|
+
data-slot="questionnaire-progress"
|
|
17
|
+
className={cn("min-h-[1lh] w-fit min-w-[14ch] text-xs font-medium text-muted-foreground tabular-nums", className)}
|
|
18
|
+
{...props}
|
|
19
|
+
/>
|
|
20
|
+
);
|
|
21
|
+
}
|
|
22
|
+
function QuestionnaireItem({ className, ...props }: React.ComponentProps<"section">) {
|
|
23
|
+
return (
|
|
24
|
+
<section
|
|
25
|
+
data-slot="questionnaire-item"
|
|
26
|
+
className={cn("flex min-w-0 flex-col gap-4 border-0 p-0 outline-none", className)}
|
|
27
|
+
{...props}
|
|
28
|
+
/>
|
|
29
|
+
);
|
|
30
|
+
}
|
|
31
|
+
function QuestionnaireTitle({ className, ...props }: React.ComponentProps<"h3">) {
|
|
32
|
+
return (
|
|
33
|
+
<h3
|
|
34
|
+
data-slot="questionnaire-title"
|
|
35
|
+
className={cn("text-base leading-snug font-medium text-pretty", className)}
|
|
36
|
+
{...props}
|
|
37
|
+
/>
|
|
38
|
+
);
|
|
39
|
+
}
|
|
40
|
+
function QuestionnaireDescription({ className, ...props }: React.ComponentProps<"p">) {
|
|
41
|
+
return (
|
|
42
|
+
<p
|
|
43
|
+
data-slot="questionnaire-description"
|
|
44
|
+
className={cn("text-sm text-pretty text-muted-foreground", className)}
|
|
45
|
+
{...props}
|
|
46
|
+
/>
|
|
47
|
+
);
|
|
48
|
+
}
|
|
49
|
+
function QuestionnaireChoices({ className, ...props }: React.ComponentProps<"div">) {
|
|
50
|
+
return (
|
|
51
|
+
<div
|
|
52
|
+
data-slot="questionnaire-choices"
|
|
53
|
+
className={cn("group/questionnaire-choices grid min-w-0 gap-2", className)}
|
|
54
|
+
{...props}
|
|
55
|
+
/>
|
|
56
|
+
);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
function QuestionnaireChoice({ children, className, ...props }: React.ComponentProps<"label">) {
|
|
60
|
+
return (
|
|
61
|
+
<label
|
|
62
|
+
data-slot="questionnaire-choice"
|
|
63
|
+
className={cn(
|
|
64
|
+
"group/questionnaire-choice relative flex min-h-11 cursor-pointer items-start gap-2.5 rounded-lg border border-input bg-transparent px-3 py-2.5 text-start text-sm transition-colors",
|
|
65
|
+
className,
|
|
66
|
+
)}
|
|
67
|
+
{...props}
|
|
68
|
+
>
|
|
69
|
+
<input className="absolute inset-0 z-10 size-full cursor-pointer opacity-0" type="radio" />
|
|
70
|
+
<span
|
|
71
|
+
aria-hidden="true"
|
|
72
|
+
className="pointer-events-none relative flex size-4 shrink-0 items-center justify-center rounded-[4px] border border-input"
|
|
73
|
+
>
|
|
74
|
+
<CheckIcon className="size-3.5" />
|
|
75
|
+
</span>
|
|
76
|
+
<span className="flex min-w-0 flex-1 flex-col gap-0.5 leading-snug">{children}</span>
|
|
77
|
+
</label>
|
|
78
|
+
);
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
function QuestionnaireChoiceDescription({ className, ...props }: React.ComponentProps<"span">) {
|
|
82
|
+
return (
|
|
83
|
+
<span data-slot="questionnaire-choice-description" className={cn("text-muted-foreground", className)} {...props} />
|
|
84
|
+
);
|
|
85
|
+
}
|
|
86
|
+
function QuestionnaireInput({ className, ...props }: React.ComponentProps<"input">) {
|
|
87
|
+
return (
|
|
88
|
+
<input
|
|
89
|
+
data-slot="questionnaire-input"
|
|
90
|
+
className={cn(
|
|
91
|
+
"h-8 min-h-11 w-full min-w-0 rounded-lg border border-input bg-transparent px-2.5 py-1 text-base outline-none md:text-sm",
|
|
92
|
+
className,
|
|
93
|
+
)}
|
|
94
|
+
{...props}
|
|
95
|
+
/>
|
|
96
|
+
);
|
|
97
|
+
}
|
|
98
|
+
function QuestionnaireError({ className, ...props }: React.ComponentProps<"p">) {
|
|
99
|
+
return <p data-slot="questionnaire-error" className={cn("mt-2 text-sm text-destructive", className)} {...props} />;
|
|
100
|
+
}
|
|
101
|
+
function QuestionnaireActions({ className, ...props }: React.ComponentProps<"div">) {
|
|
102
|
+
return (
|
|
103
|
+
<div
|
|
104
|
+
data-slot="questionnaire-actions"
|
|
105
|
+
className={cn(
|
|
106
|
+
"grid min-h-11 w-full grid-cols-[minmax(0,1fr)_auto_auto] items-center gap-2 sm:min-h-8",
|
|
107
|
+
className,
|
|
108
|
+
)}
|
|
109
|
+
{...props}
|
|
110
|
+
/>
|
|
111
|
+
);
|
|
112
|
+
}
|
|
113
|
+
function QuestionnairePrevious(props: QuestionnaireButtonProps) {
|
|
114
|
+
return (
|
|
115
|
+
<Button variant="outline" {...props}>
|
|
116
|
+
{props.children ?? "Previous"}
|
|
117
|
+
</Button>
|
|
118
|
+
);
|
|
119
|
+
}
|
|
120
|
+
function QuestionnaireSkip(props: QuestionnaireButtonProps) {
|
|
121
|
+
return (
|
|
122
|
+
<Button variant="outline" {...props}>
|
|
123
|
+
{props.children ?? "Skip"}
|
|
124
|
+
</Button>
|
|
125
|
+
);
|
|
126
|
+
}
|
|
127
|
+
function QuestionnaireNext(props: QuestionnaireButtonProps) {
|
|
128
|
+
return <Button {...props}>{props.children ?? "Next"}</Button>;
|
|
129
|
+
}
|
|
130
|
+
function QuestionnaireSubmit(props: QuestionnaireButtonProps) {
|
|
131
|
+
return <Button {...props}>{props.children ?? "Submit"}</Button>;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
export {
|
|
135
|
+
Questionnaire,
|
|
136
|
+
QuestionnaireActions,
|
|
137
|
+
QuestionnaireChoice,
|
|
138
|
+
QuestionnaireChoiceDescription,
|
|
139
|
+
QuestionnaireChoices,
|
|
140
|
+
QuestionnaireDescription,
|
|
141
|
+
QuestionnaireError,
|
|
142
|
+
QuestionnaireInput,
|
|
143
|
+
QuestionnaireItem,
|
|
144
|
+
QuestionnaireNext,
|
|
145
|
+
QuestionnairePrevious,
|
|
146
|
+
QuestionnaireProgress,
|
|
147
|
+
QuestionnaireSkip,
|
|
148
|
+
QuestionnaireSubmit,
|
|
149
|
+
QuestionnaireTitle,
|
|
150
|
+
};
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { Radio as RadioPrimitive } from '@base-ui/react/radio'
|
|
2
|
+
import { RadioGroup as RadioGroupPrimitive } from '@base-ui/react/radio-group'
|
|
3
|
+
import { cn } from '../lib/utils'
|
|
4
|
+
|
|
5
|
+
function RadioGroup({ className, ...props }: RadioGroupPrimitive.Props) {
|
|
6
|
+
return (
|
|
7
|
+
<RadioGroupPrimitive
|
|
8
|
+
data-slot="radio-group"
|
|
9
|
+
className={cn('grid w-full gap-2', className)}
|
|
10
|
+
{...props}
|
|
11
|
+
/>
|
|
12
|
+
)
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
function RadioGroupItem({ className, ...props }: RadioPrimitive.Root.Props) {
|
|
16
|
+
return (
|
|
17
|
+
<RadioPrimitive.Root
|
|
18
|
+
data-slot="radio-group-item"
|
|
19
|
+
className={cn(
|
|
20
|
+
'group/radio-group-item peer relative flex aspect-square size-4 shrink-0 rounded-full border border-input outline-none group-has-[:focus-visible]/field-label:ring-0 group-has-[:focus-visible]/field-label:not-data-checked:border-input after:absolute after:-inset-x-3 after:-inset-y-2 focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 aria-invalid:aria-checked:border-primary dark:bg-input/30 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 data-checked:border-primary data-checked:bg-primary data-checked:text-primary-foreground group-has-[:focus-visible]/field-label:data-checked:border-primary dark:data-checked:bg-primary',
|
|
21
|
+
className,
|
|
22
|
+
)}
|
|
23
|
+
{...props}
|
|
24
|
+
>
|
|
25
|
+
<RadioPrimitive.Indicator
|
|
26
|
+
data-slot="radio-group-indicator"
|
|
27
|
+
className="flex size-4 items-center justify-center"
|
|
28
|
+
>
|
|
29
|
+
<span className="absolute top-1/2 left-1/2 size-2 -translate-x-1/2 -translate-y-1/2 rounded-full bg-primary-foreground" />
|
|
30
|
+
</RadioPrimitive.Indicator>
|
|
31
|
+
</RadioPrimitive.Root>
|
|
32
|
+
)
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export { RadioGroup, RadioGroupItem }
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
'use client'
|
|
2
|
+
|
|
3
|
+
import { cn } from '../lib/utils'
|
|
4
|
+
import * as ResizablePrimitive from 'react-resizable-panels'
|
|
5
|
+
|
|
6
|
+
function ResizablePanelGroup({ className, ...props }: ResizablePrimitive.GroupProps) {
|
|
7
|
+
return (
|
|
8
|
+
<ResizablePrimitive.Group
|
|
9
|
+
data-slot="resizable-panel-group"
|
|
10
|
+
className={cn('flex h-full w-full aria-[orientation=vertical]:flex-col', className)}
|
|
11
|
+
{...props}
|
|
12
|
+
/>
|
|
13
|
+
)
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
function ResizablePanel({ ...props }: ResizablePrimitive.PanelProps) {
|
|
17
|
+
return <ResizablePrimitive.Panel data-slot="resizable-panel" {...props} />
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
function ResizableHandle({
|
|
21
|
+
withHandle,
|
|
22
|
+
className,
|
|
23
|
+
...props
|
|
24
|
+
}: ResizablePrimitive.SeparatorProps & {
|
|
25
|
+
withHandle?: boolean
|
|
26
|
+
}) {
|
|
27
|
+
return (
|
|
28
|
+
<ResizablePrimitive.Separator
|
|
29
|
+
data-slot="resizable-handle"
|
|
30
|
+
className={cn(
|
|
31
|
+
'relative flex w-px items-center justify-center bg-border ring-offset-background after:absolute after:inset-y-0 after:left-1/2 after:w-1 after:-translate-x-1/2 focus-visible:ring-1 focus-visible:ring-ring focus-visible:outline-hidden aria-[orientation=horizontal]:h-px aria-[orientation=horizontal]:w-full aria-[orientation=horizontal]:after:left-0 aria-[orientation=horizontal]:after:h-1 aria-[orientation=horizontal]:after:w-full aria-[orientation=horizontal]:after:translate-x-0 aria-[orientation=horizontal]:after:-translate-y-1/2 [&[aria-orientation=horizontal]>div]:rotate-90',
|
|
32
|
+
className,
|
|
33
|
+
)}
|
|
34
|
+
{...props}
|
|
35
|
+
>
|
|
36
|
+
{withHandle && <div className="z-10 flex h-6 w-1 shrink-0 rounded-lg bg-border" />}
|
|
37
|
+
</ResizablePrimitive.Separator>
|
|
38
|
+
)
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export { ResizableHandle, ResizablePanel, ResizablePanelGroup }
|