@otfdashkit/ui 0.1.0
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/LICENSE +21 -0
- package/dist/index.js +14886 -0
- package/dist/index.mjs +14389 -0
- package/package.json +124 -0
- package/src/advanced/BulkActions/BulkActions.stories.tsx +14 -0
- package/src/advanced/BulkActions/BulkActions.test.tsx +9 -0
- package/src/advanced/BulkActions/BulkActions.tsx +46 -0
- package/src/advanced/BulkActions/index.ts +2 -0
- package/src/advanced/CommandBar/CommandBar.stories.tsx +14 -0
- package/src/advanced/CommandBar/CommandBar.test.tsx +9 -0
- package/src/advanced/CommandBar/CommandBar.tsx +115 -0
- package/src/advanced/CommandBar/index.ts +2 -0
- package/src/advanced/Filters/Filters.stories.tsx +14 -0
- package/src/advanced/Filters/Filters.test.tsx +9 -0
- package/src/advanced/Filters/Filters.tsx +103 -0
- package/src/advanced/Filters/index.ts +2 -0
- package/src/advanced/Kanban/Kanban.stories.tsx +14 -0
- package/src/advanced/Kanban/Kanban.test.tsx +9 -0
- package/src/advanced/Kanban/Kanban.tsx +95 -0
- package/src/advanced/Kanban/index.ts +2 -0
- package/src/advanced/ToggleButton/ToggleButton.stories.tsx +14 -0
- package/src/advanced/ToggleButton/ToggleButton.test.tsx +9 -0
- package/src/advanced/ToggleButton/ToggleButton.tsx +78 -0
- package/src/advanced/ToggleButton/index.ts +2 -0
- package/src/advanced/bulk-actions.tsx +46 -0
- package/src/advanced/command-bar.tsx +115 -0
- package/src/advanced/filters.tsx +103 -0
- package/src/advanced/gantt.tsx +824 -0
- package/src/advanced/kanban.tsx +95 -0
- package/src/advanced/rich-editor.tsx +700 -0
- package/src/advanced/toggle-button.tsx +78 -0
- package/src/advanced/utils/cn.ts +1 -0
- package/src/app-shell/AppShell.tsx +24 -0
- package/src/app-shell/BillingStatus.tsx +63 -0
- package/src/app-shell/Sidebar.tsx +172 -0
- package/src/app-shell/SidebarResizer.tsx +109 -0
- package/src/app-shell/SortableNav.tsx +122 -0
- package/src/app-shell/UserMenu.tsx +135 -0
- package/src/app-shell/WorkspacesMenu.tsx +114 -0
- package/src/app-shell/index.ts +18 -0
- package/src/backgrounds/AnimatedGradient.tsx +151 -0
- package/src/backgrounds/DottedBackground.tsx +64 -0
- package/src/backgrounds/GradientBackground.tsx +113 -0
- package/src/backgrounds/HeroShaderA.tsx +255 -0
- package/src/backgrounds/NoiseBackground.tsx +51 -0
- package/src/backgrounds/index.ts +5 -0
- package/src/blocks/ChatDetail/ChatDetail.stories.tsx +14 -0
- package/src/blocks/ChatDetail/ChatDetail.test.tsx +9 -0
- package/src/blocks/ChatDetail/ChatDetail.tsx +73 -0
- package/src/blocks/ChatDetail/index.ts +2 -0
- package/src/blocks/FeedbackModal/FeedbackModal.stories.tsx +14 -0
- package/src/blocks/FeedbackModal/FeedbackModal.test.tsx +9 -0
- package/src/blocks/FeedbackModal/FeedbackModal.tsx +68 -0
- package/src/blocks/FeedbackModal/index.ts +2 -0
- package/src/blocks/FileCards/FileCards.stories.tsx +14 -0
- package/src/blocks/FileCards/FileCards.test.tsx +9 -0
- package/src/blocks/FileCards/FileCards.tsx +56 -0
- package/src/blocks/FileCards/index.ts +2 -0
- package/src/blocks/FilesList/FilesList.stories.tsx +14 -0
- package/src/blocks/FilesList/FilesList.test.tsx +9 -0
- package/src/blocks/FilesList/FilesList.tsx +72 -0
- package/src/blocks/FilesList/index.ts +2 -0
- package/src/blocks/FloatingActionButton/FloatingActionButton.stories.tsx +223 -0
- package/src/blocks/FloatingActionButton/FloatingActionButton.test.tsx +47 -0
- package/src/blocks/FloatingActionButton/FloatingActionButton.tsx +253 -0
- package/src/blocks/FloatingActionButton/index.ts +1 -0
- package/src/blocks/IntegrationCard/IntegrationCard.stories.tsx +14 -0
- package/src/blocks/IntegrationCard/IntegrationCard.test.tsx +9 -0
- package/src/blocks/IntegrationCard/IntegrationCard.tsx +50 -0
- package/src/blocks/IntegrationCard/index.ts +2 -0
- package/src/blocks/InviteModal/InviteModal.stories.tsx +14 -0
- package/src/blocks/InviteModal/InviteModal.test.tsx +9 -0
- package/src/blocks/InviteModal/InviteModal.tsx +69 -0
- package/src/blocks/InviteModal/index.ts +2 -0
- package/src/blocks/ManageTagsModal/ManageTagsModal.stories.tsx +14 -0
- package/src/blocks/ManageTagsModal/ManageTagsModal.test.tsx +9 -0
- package/src/blocks/ManageTagsModal/ManageTagsModal.tsx +63 -0
- package/src/blocks/ManageTagsModal/index.ts +2 -0
- package/src/blocks/MessagesCard/MessagesCard.stories.tsx +14 -0
- package/src/blocks/MessagesCard/MessagesCard.test.tsx +9 -0
- package/src/blocks/MessagesCard/MessagesCard.tsx +59 -0
- package/src/blocks/MessagesCard/index.ts +2 -0
- package/src/blocks/MetricCard/MetricCard.stories.tsx +14 -0
- package/src/blocks/MetricCard/MetricCard.test.tsx +9 -0
- package/src/blocks/MetricCard/MetricCard.tsx +79 -0
- package/src/blocks/MetricCard/index.ts +2 -0
- package/src/blocks/NotificationSettings/NotificationSettings.stories.tsx +14 -0
- package/src/blocks/NotificationSettings/NotificationSettings.test.tsx +9 -0
- package/src/blocks/NotificationSettings/NotificationSettings.tsx +61 -0
- package/src/blocks/NotificationSettings/index.ts +2 -0
- package/src/blocks/OrganizationMenu/OrganizationMenu.stories.tsx +14 -0
- package/src/blocks/OrganizationMenu/OrganizationMenu.test.tsx +9 -0
- package/src/blocks/OrganizationMenu/OrganizationMenu.tsx +66 -0
- package/src/blocks/OrganizationMenu/index.ts +2 -0
- package/src/blocks/RolesMenu/RolesMenu.stories.tsx +14 -0
- package/src/blocks/RolesMenu/RolesMenu.test.tsx +9 -0
- package/src/blocks/RolesMenu/RolesMenu.tsx +61 -0
- package/src/blocks/RolesMenu/index.ts +2 -0
- package/src/blocks/SelectUsersModal/SelectUsersModal.stories.tsx +14 -0
- package/src/blocks/SelectUsersModal/SelectUsersModal.test.tsx +9 -0
- package/src/blocks/SelectUsersModal/SelectUsersModal.tsx +64 -0
- package/src/blocks/SelectUsersModal/index.ts +2 -0
- package/src/blocks/SidebarLayoutDashboard/SidebarLayoutDashboard.stories.tsx +14 -0
- package/src/blocks/SidebarLayoutDashboard/SidebarLayoutDashboard.test.tsx +9 -0
- package/src/blocks/SidebarLayoutDashboard/SidebarLayoutDashboard.tsx +97 -0
- package/src/blocks/SidebarLayoutDashboard/index.ts +2 -0
- package/src/blocks/SidebarLayoutGroups/SidebarLayoutGroups.stories.tsx +14 -0
- package/src/blocks/SidebarLayoutGroups/SidebarLayoutGroups.test.tsx +9 -0
- package/src/blocks/SidebarLayoutGroups/SidebarLayoutGroups.tsx +79 -0
- package/src/blocks/SidebarLayoutGroups/index.ts +2 -0
- package/src/blocks/SidebarLayoutMinimal/SidebarLayoutMinimal.stories.tsx +14 -0
- package/src/blocks/SidebarLayoutMinimal/SidebarLayoutMinimal.test.tsx +9 -0
- package/src/blocks/SidebarLayoutMinimal/SidebarLayoutMinimal.tsx +73 -0
- package/src/blocks/SidebarLayoutMinimal/index.ts +2 -0
- package/src/blocks/SidebarLayoutSearch/SidebarLayoutSearch.stories.tsx +14 -0
- package/src/blocks/SidebarLayoutSearch/SidebarLayoutSearch.test.tsx +9 -0
- package/src/blocks/SidebarLayoutSearch/SidebarLayoutSearch.tsx +79 -0
- package/src/blocks/SidebarLayoutSearch/index.ts +2 -0
- package/src/blocks/SidebarLayoutUser/SidebarLayoutUser.stories.tsx +14 -0
- package/src/blocks/SidebarLayoutUser/SidebarLayoutUser.test.tsx +9 -0
- package/src/blocks/SidebarLayoutUser/SidebarLayoutUser.tsx +82 -0
- package/src/blocks/SidebarLayoutUser/index.ts +2 -0
- package/src/blocks/SortableTaskList/SortableTaskList.stories.tsx +14 -0
- package/src/blocks/SortableTaskList/SortableTaskList.test.tsx +9 -0
- package/src/blocks/SortableTaskList/SortableTaskList.tsx +70 -0
- package/src/blocks/SortableTaskList/index.ts +2 -0
- package/src/blocks/StackedLayoutBranded/StackedLayoutBranded.stories.tsx +14 -0
- package/src/blocks/StackedLayoutBranded/StackedLayoutBranded.test.tsx +9 -0
- package/src/blocks/StackedLayoutBranded/StackedLayoutBranded.tsx +64 -0
- package/src/blocks/StackedLayoutBranded/index.ts +2 -0
- package/src/blocks/StackedLayoutTabs/StackedLayoutTabs.stories.tsx +14 -0
- package/src/blocks/StackedLayoutTabs/StackedLayoutTabs.test.tsx +9 -0
- package/src/blocks/StackedLayoutTabs/StackedLayoutTabs.tsx +80 -0
- package/src/blocks/StackedLayoutTabs/index.ts +2 -0
- package/src/blocks/TaskCard/TaskCard.stories.tsx +14 -0
- package/src/blocks/TaskCard/TaskCard.test.tsx +9 -0
- package/src/blocks/TaskCard/TaskCard.tsx +88 -0
- package/src/blocks/TaskCard/index.ts +2 -0
- package/src/blocks/UserMenu/UserMenu.stories.tsx +14 -0
- package/src/blocks/UserMenu/UserMenu.test.tsx +9 -0
- package/src/blocks/UserMenu/UserMenu.tsx +62 -0
- package/src/blocks/UserMenu/index.ts +2 -0
- package/src/blocks/WorkspaceMembers/WorkspaceMembers.stories.tsx +14 -0
- package/src/blocks/WorkspaceMembers/WorkspaceMembers.test.tsx +9 -0
- package/src/blocks/WorkspaceMembers/WorkspaceMembers.tsx +61 -0
- package/src/blocks/WorkspaceMembers/index.ts +2 -0
- package/src/blocks/activity-heatmap.tsx +122 -0
- package/src/blocks/bar-list.tsx +75 -0
- package/src/blocks/chat-detail.tsx +73 -0
- package/src/blocks/feedback-modal.tsx +68 -0
- package/src/blocks/file-cards.tsx +56 -0
- package/src/blocks/files-list.tsx +72 -0
- package/src/blocks/integration-card.tsx +50 -0
- package/src/blocks/invite-modal.tsx +69 -0
- package/src/blocks/manage-tags-modal.tsx +63 -0
- package/src/blocks/messages-card.tsx +59 -0
- package/src/blocks/metric-card.tsx +79 -0
- package/src/blocks/notification-settings.tsx +61 -0
- package/src/blocks/organization-menu.tsx +85 -0
- package/src/blocks/roles-menu.tsx +61 -0
- package/src/blocks/select-users-modal.tsx +64 -0
- package/src/blocks/sidebar-layout-dashboard.tsx +97 -0
- package/src/blocks/sidebar-layout-groups.tsx +79 -0
- package/src/blocks/sidebar-layout-minimal.tsx +73 -0
- package/src/blocks/sidebar-layout-search.tsx +79 -0
- package/src/blocks/sidebar-layout-user.tsx +82 -0
- package/src/blocks/sortable-task-list.tsx +70 -0
- package/src/blocks/stacked-layout-branded.tsx +64 -0
- package/src/blocks/stacked-layout-tabs.tsx +80 -0
- package/src/blocks/task-card.tsx +88 -0
- package/src/blocks/user-menu.tsx +62 -0
- package/src/blocks/utils/cn.ts +1 -0
- package/src/blocks/workspace-members.tsx +61 -0
- package/src/charts/area-chart.tsx +83 -0
- package/src/charts/bar-chart.tsx +146 -0
- package/src/charts/heatmap.tsx +185 -0
- package/src/charts/line-chart.tsx +89 -0
- package/src/charts/sparkline.tsx +62 -0
- package/src/charts/utils/cn.ts +1 -0
- package/src/components/Banner/Banner.stories.tsx +14 -0
- package/src/components/Banner/Banner.test.tsx +9 -0
- package/src/components/Banner/Banner.tsx +203 -0
- package/src/components/Banner/index.ts +2 -0
- package/src/components/Breadcrumb/Breadcrumb.stories.tsx +14 -0
- package/src/components/Breadcrumb/Breadcrumb.test.tsx +9 -0
- package/src/components/Breadcrumb/Breadcrumb.tsx +58 -0
- package/src/components/Breadcrumb/index.ts +2 -0
- package/src/components/CommandItem/CommandItem.stories.tsx +14 -0
- package/src/components/CommandItem/CommandItem.test.tsx +9 -0
- package/src/components/CommandItem/CommandItem.tsx +36 -0
- package/src/components/CommandItem/index.ts +2 -0
- package/src/components/DataGrid/DataGrid.stories.tsx +14 -0
- package/src/components/DataGrid/DataGrid.test.tsx +9 -0
- package/src/components/DataGrid/DataGrid.tsx +125 -0
- package/src/components/DataGrid/index.ts +2 -0
- package/src/components/DataTable/DataTable.stories.tsx +14 -0
- package/src/components/DataTable/DataTable.test.tsx +9 -0
- package/src/components/DataTable/DataTable.tsx +139 -0
- package/src/components/DataTable/index.ts +2 -0
- package/src/components/EmptyState/EmptyState.stories.tsx +14 -0
- package/src/components/EmptyState/EmptyState.test.tsx +9 -0
- package/src/components/EmptyState/EmptyState.tsx +106 -0
- package/src/components/EmptyState/index.ts +2 -0
- package/src/components/Hotkeys/Hotkeys.stories.tsx +14 -0
- package/src/components/Hotkeys/Hotkeys.test.tsx +9 -0
- package/src/components/Hotkeys/Hotkeys.tsx +31 -0
- package/src/components/Hotkeys/index.ts +2 -0
- package/src/components/IconBadge/IconBadge.stories.tsx +14 -0
- package/src/components/IconBadge/IconBadge.test.tsx +9 -0
- package/src/components/IconBadge/IconBadge.tsx +35 -0
- package/src/components/IconBadge/index.ts +2 -0
- package/src/components/LoadingOverlay/LoadingOverlay.stories.tsx +14 -0
- package/src/components/LoadingOverlay/LoadingOverlay.test.tsx +9 -0
- package/src/components/LoadingOverlay/LoadingOverlay.tsx +38 -0
- package/src/components/LoadingOverlay/index.ts +2 -0
- package/src/components/Persona/Persona.stories.tsx +14 -0
- package/src/components/Persona/Persona.test.tsx +9 -0
- package/src/components/Persona/Persona.tsx +38 -0
- package/src/components/Persona/index.ts +2 -0
- package/src/components/PropertyList/PropertyList.stories.tsx +14 -0
- package/src/components/PropertyList/PropertyList.test.tsx +9 -0
- package/src/components/PropertyList/PropertyList.tsx +29 -0
- package/src/components/PropertyList/index.ts +2 -0
- package/src/components/Stat/Stat.stories.tsx +14 -0
- package/src/components/Stat/Stat.test.tsx +9 -0
- package/src/components/Stat/Stat.tsx +51 -0
- package/src/components/Stat/index.ts +2 -0
- package/src/components/Stepper/Stepper.stories.tsx +14 -0
- package/src/components/Stepper/Stepper.test.tsx +9 -0
- package/src/components/Stepper/Stepper.tsx +58 -0
- package/src/components/Stepper/index.ts +2 -0
- package/src/components/StructuredList/StructuredList.stories.tsx +14 -0
- package/src/components/StructuredList/StructuredList.test.tsx +9 -0
- package/src/components/StructuredList/StructuredList.tsx +51 -0
- package/src/components/StructuredList/index.ts +2 -0
- package/src/components/Timeline/Timeline.stories.tsx +14 -0
- package/src/components/Timeline/Timeline.test.tsx +9 -0
- package/src/components/Timeline/Timeline.tsx +69 -0
- package/src/components/Timeline/index.ts +2 -0
- package/src/components/Toaster/Toaster.stories.tsx +14 -0
- package/src/components/Toaster/Toaster.test.tsx +9 -0
- package/src/components/Toaster/Toaster.tsx +42 -0
- package/src/components/Toaster/index.ts +2 -0
- package/src/components/banner.tsx +203 -0
- package/src/components/breadcrumb.tsx +58 -0
- package/src/components/command-item.tsx +36 -0
- package/src/components/data-grid.tsx +125 -0
- package/src/components/data-table.tsx +139 -0
- package/src/components/empty-state.tsx +31 -0
- package/src/components/hotkeys.tsx +31 -0
- package/src/components/icon-badge.tsx +35 -0
- package/src/components/loading-overlay.tsx +38 -0
- package/src/components/persona.tsx +38 -0
- package/src/components/property-list.tsx +29 -0
- package/src/components/stat.tsx +51 -0
- package/src/components/stepper.tsx +69 -0
- package/src/components/structured-list.tsx +51 -0
- package/src/components/timeline.tsx +69 -0
- package/src/components/toaster.tsx +42 -0
- package/src/components/utils/cn.ts +1 -0
- package/src/data/ActionBar.tsx +115 -0
- package/src/data/DataGrid.tsx +453 -0
- package/src/data/DataList.tsx +79 -0
- package/src/data/EventCalendar.tsx +794 -0
- package/src/data/Filters.tsx +271 -0
- package/src/data/GridList.tsx +67 -0
- package/src/data/ImageCrop.tsx +198 -0
- package/src/data/SortableList.tsx +258 -0
- package/src/data/Tree.tsx +510 -0
- package/src/data/VideoPlayer.tsx +564 -0
- package/src/data/index.ts +6 -0
- package/src/engagement/Beacon/Beacon.stories.tsx +14 -0
- package/src/engagement/Beacon/Beacon.test.tsx +9 -0
- package/src/engagement/Beacon/Beacon.tsx +50 -0
- package/src/engagement/Beacon/index.ts +2 -0
- package/src/engagement/Tour/Tour.stories.tsx +14 -0
- package/src/engagement/Tour/Tour.test.tsx +9 -0
- package/src/engagement/Tour/Tour.tsx +106 -0
- package/src/engagement/Tour/index.ts +2 -0
- package/src/engagement/beacon.tsx +50 -0
- package/src/engagement/checklist.tsx +259 -0
- package/src/engagement/intro-disclosure.tsx +210 -0
- package/src/engagement/tour.tsx +106 -0
- package/src/engagement/utils/cn.ts +1 -0
- package/src/feedback/Toaster.tsx +141 -0
- package/src/feedback/index.ts +2 -0
- package/src/feedback/toast-emitter.ts +74 -0
- package/src/forms/ArrayField/ArrayField.stories.tsx +14 -0
- package/src/forms/ArrayField/ArrayField.test.tsx +9 -0
- package/src/forms/ArrayField/ArrayField.tsx +61 -0
- package/src/forms/ArrayField/index.ts +2 -0
- package/src/forms/AutoForm/AutoForm.stories.tsx +14 -0
- package/src/forms/AutoForm/AutoForm.test.tsx +9 -0
- package/src/forms/AutoForm/AutoForm.tsx +133 -0
- package/src/forms/AutoForm/index.ts +2 -0
- package/src/forms/DatePicker/DatePicker.stories.tsx +14 -0
- package/src/forms/DatePicker/DatePicker.test.tsx +9 -0
- package/src/forms/DatePicker/DatePicker.tsx +109 -0
- package/src/forms/DatePicker/index.ts +2 -0
- package/src/forms/Field/Field.stories.tsx +14 -0
- package/src/forms/Field/Field.test.tsx +9 -0
- package/src/forms/Field/Field.tsx +62 -0
- package/src/forms/Field/index.ts +2 -0
- package/src/forms/FileUpload/FileUpload.stories.tsx +14 -0
- package/src/forms/FileUpload/FileUpload.test.tsx +9 -0
- package/src/forms/FileUpload/FileUpload.tsx +101 -0
- package/src/forms/FileUpload/index.ts +2 -0
- package/src/forms/Form/Form.stories.tsx +14 -0
- package/src/forms/Form/Form.test.tsx +9 -0
- package/src/forms/Form/Form.tsx +57 -0
- package/src/forms/Form/index.ts +2 -0
- package/src/forms/ObjectField/ObjectField.stories.tsx +14 -0
- package/src/forms/ObjectField/ObjectField.test.tsx +9 -0
- package/src/forms/ObjectField/ObjectField.tsx +53 -0
- package/src/forms/ObjectField/index.ts +2 -0
- package/src/forms/PasswordInput/PasswordInput.stories.tsx +14 -0
- package/src/forms/PasswordInput/PasswordInput.test.tsx +9 -0
- package/src/forms/PasswordInput/PasswordInput.tsx +54 -0
- package/src/forms/PasswordInput/index.ts +2 -0
- package/src/forms/SearchInput/SearchInput.stories.tsx +14 -0
- package/src/forms/SearchInput/SearchInput.test.tsx +9 -0
- package/src/forms/SearchInput/SearchInput.tsx +64 -0
- package/src/forms/SearchInput/index.ts +2 -0
- package/src/forms/StepForm/StepForm.stories.tsx +14 -0
- package/src/forms/StepForm/StepForm.test.tsx +9 -0
- package/src/forms/StepForm/StepForm.tsx +113 -0
- package/src/forms/StepForm/index.ts +2 -0
- package/src/forms/array-field.tsx +61 -0
- package/src/forms/auto-form.tsx +133 -0
- package/src/forms/color-picker.tsx +258 -0
- package/src/forms/combobox.tsx +106 -0
- package/src/forms/date-picker.tsx +109 -0
- package/src/forms/field.tsx +62 -0
- package/src/forms/file-upload.tsx +101 -0
- package/src/forms/form.tsx +57 -0
- package/src/forms/object-field.tsx +53 -0
- package/src/forms/password-input.tsx +54 -0
- package/src/forms/search-input.tsx +64 -0
- package/src/forms/step-form.tsx +113 -0
- package/src/forms/tags.tsx +270 -0
- package/src/forms/utils/cn.ts +1 -0
- package/src/headers/ScrollHeader.tsx +110 -0
- package/src/headers/index.ts +1 -0
- package/src/index.ts +171 -0
- package/src/layout/PageContainer.tsx +40 -0
- package/src/layout/PageLayout.tsx +55 -0
- package/src/layout/index.ts +2 -0
- package/src/layouts/AppShell/AppShell.stories.tsx +14 -0
- package/src/layouts/AppShell/AppShell.test.tsx +9 -0
- package/src/layouts/AppShell/AppShell.tsx +129 -0
- package/src/layouts/AppShell/index.ts +2 -0
- package/src/layouts/Container/Container.stories.tsx +14 -0
- package/src/layouts/Container/Container.test.tsx +9 -0
- package/src/layouts/Container/Container.tsx +33 -0
- package/src/layouts/Container/index.ts +2 -0
- package/src/layouts/Navbar/Navbar.stories.tsx +14 -0
- package/src/layouts/Navbar/Navbar.test.tsx +9 -0
- package/src/layouts/Navbar/Navbar.tsx +60 -0
- package/src/layouts/Navbar/index.ts +2 -0
- package/src/layouts/Page/Page.stories.tsx +14 -0
- package/src/layouts/Page/Page.test.tsx +9 -0
- package/src/layouts/Page/Page.tsx +61 -0
- package/src/layouts/Page/index.ts +2 -0
- package/src/layouts/ResizeBox/ResizeBox.stories.tsx +14 -0
- package/src/layouts/ResizeBox/ResizeBox.test.tsx +9 -0
- package/src/layouts/ResizeBox/ResizeBox.tsx +45 -0
- package/src/layouts/ResizeBox/index.ts +2 -0
- package/src/layouts/Sidebar/Sidebar.stories.tsx +14 -0
- package/src/layouts/Sidebar/Sidebar.test.tsx +9 -0
- package/src/layouts/Sidebar/Sidebar.tsx +99 -0
- package/src/layouts/Sidebar/index.ts +2 -0
- package/src/layouts/SplitPage/SplitPage.stories.tsx +14 -0
- package/src/layouts/SplitPage/SplitPage.test.tsx +9 -0
- package/src/layouts/SplitPage/SplitPage.tsx +32 -0
- package/src/layouts/SplitPage/index.ts +2 -0
- package/src/layouts/Stack/Stack.stories.tsx +14 -0
- package/src/layouts/Stack/Stack.test.tsx +9 -0
- package/src/layouts/Stack/Stack.tsx +56 -0
- package/src/layouts/Stack/index.ts +2 -0
- package/src/layouts/app-shell.tsx +129 -0
- package/src/layouts/container.tsx +33 -0
- package/src/layouts/navbar.tsx +60 -0
- package/src/layouts/page.tsx +61 -0
- package/src/layouts/resize-box.tsx +45 -0
- package/src/layouts/sidebar.tsx +99 -0
- package/src/layouts/split-page.tsx +32 -0
- package/src/layouts/stack.tsx +56 -0
- package/src/layouts/utils/cn.ts +1 -0
- package/src/motion/FadeIn.tsx +33 -0
- package/src/motion/Morph.tsx +17 -0
- package/src/motion/Parallax.tsx +37 -0
- package/src/motion/Reveal.tsx +32 -0
- package/src/motion/Ripple.tsx +78 -0
- package/src/motion/ScaleIn.tsx +33 -0
- package/src/motion/SlideIn.tsx +42 -0
- package/src/motion/Stagger.tsx +48 -0
- package/src/motion/Transition.tsx +13 -0
- package/src/motion/index.ts +13 -0
- package/src/motion/presets.ts +33 -0
- package/src/motion/useLayoutId.ts +6 -0
- package/src/nav/CommandPalette.tsx +197 -0
- package/src/nav/HotkeysProvider.tsx +223 -0
- package/src/nav/index.ts +2 -0
- package/src/primitives/Accordion/Accordion.stories.tsx +14 -0
- package/src/primitives/Accordion/Accordion.test.tsx +9 -0
- package/src/primitives/Accordion/Accordion.tsx +56 -0
- package/src/primitives/Accordion/index.ts +2 -0
- package/src/primitives/Alert/Alert.stories.tsx +14 -0
- package/src/primitives/Alert/Alert.test.tsx +9 -0
- package/src/primitives/Alert/Alert.tsx +60 -0
- package/src/primitives/Alert/index.ts +2 -0
- package/src/primitives/AlertDialog/AlertDialog.stories.tsx +14 -0
- package/src/primitives/AlertDialog/AlertDialog.test.tsx +9 -0
- package/src/primitives/AlertDialog/AlertDialog.tsx +140 -0
- package/src/primitives/AlertDialog/index.ts +2 -0
- package/src/primitives/AspectRatio/AspectRatio.stories.tsx +14 -0
- package/src/primitives/AspectRatio/AspectRatio.test.tsx +9 -0
- package/src/primitives/AspectRatio/AspectRatio.tsx +6 -0
- package/src/primitives/AspectRatio/index.ts +2 -0
- package/src/primitives/Avatar/Avatar.stories.tsx +14 -0
- package/src/primitives/Avatar/Avatar.test.tsx +9 -0
- package/src/primitives/Avatar/Avatar.tsx +35 -0
- package/src/primitives/Avatar/index.ts +2 -0
- package/src/primitives/Badge/Badge.stories.tsx +14 -0
- package/src/primitives/Badge/Badge.test.tsx +9 -0
- package/src/primitives/Badge/Badge.tsx +28 -0
- package/src/primitives/Badge/index.ts +2 -0
- package/src/primitives/Button/Button.stories.tsx +14 -0
- package/src/primitives/Button/Button.test.tsx +9 -0
- package/src/primitives/Button/Button.tsx +113 -0
- package/src/primitives/Button/index.ts +2 -0
- package/src/primitives/Calendar/Calendar.stories.tsx +14 -0
- package/src/primitives/Calendar/Calendar.test.tsx +9 -0
- package/src/primitives/Calendar/Calendar.tsx +214 -0
- package/src/primitives/Calendar/index.ts +2 -0
- package/src/primitives/Card/Card.stories.tsx +14 -0
- package/src/primitives/Card/Card.test.tsx +9 -0
- package/src/primitives/Card/Card.tsx +48 -0
- package/src/primitives/Card/TextureCard.tsx +93 -0
- package/src/primitives/Card/index.ts +3 -0
- package/src/primitives/Carousel/Carousel.stories.tsx +14 -0
- package/src/primitives/Carousel/Carousel.test.tsx +9 -0
- package/src/primitives/Carousel/Carousel.tsx +261 -0
- package/src/primitives/Carousel/index.ts +2 -0
- package/src/primitives/Chart/Chart.stories.tsx +14 -0
- package/src/primitives/Chart/Chart.test.tsx +9 -0
- package/src/primitives/Chart/Chart.tsx +368 -0
- package/src/primitives/Chart/index.ts +2 -0
- package/src/primitives/Checkbox/Checkbox.stories.tsx +14 -0
- package/src/primitives/Checkbox/Checkbox.test.tsx +9 -0
- package/src/primitives/Checkbox/Checkbox.tsx +27 -0
- package/src/primitives/Checkbox/index.ts +2 -0
- package/src/primitives/Collapsible/Collapsible.stories.tsx +14 -0
- package/src/primitives/Collapsible/Collapsible.test.tsx +9 -0
- package/src/primitives/Collapsible/Collapsible.tsx +12 -0
- package/src/primitives/Collapsible/index.ts +2 -0
- package/src/primitives/Command/Command.stories.tsx +14 -0
- package/src/primitives/Command/Command.test.tsx +9 -0
- package/src/primitives/Command/Command.tsx +154 -0
- package/src/primitives/Command/index.ts +2 -0
- package/src/primitives/ContextMenu/ContextMenu.stories.tsx +14 -0
- package/src/primitives/ContextMenu/ContextMenu.test.tsx +9 -0
- package/src/primitives/ContextMenu/ContextMenu.tsx +101 -0
- package/src/primitives/ContextMenu/index.ts +2 -0
- package/src/primitives/Dialog/Dialog.stories.tsx +14 -0
- package/src/primitives/Dialog/Dialog.test.tsx +9 -0
- package/src/primitives/Dialog/Dialog.tsx +88 -0
- package/src/primitives/Dialog/DialogProvider.tsx +130 -0
- package/src/primitives/Dialog/index.ts +3 -0
- package/src/primitives/Drawer/Drawer.stories.tsx +14 -0
- package/src/primitives/Drawer/Drawer.test.tsx +9 -0
- package/src/primitives/Drawer/Drawer.tsx +123 -0
- package/src/primitives/Drawer/index.ts +2 -0
- package/src/primitives/DropdownMenu/DropdownMenu.stories.tsx +14 -0
- package/src/primitives/DropdownMenu/DropdownMenu.test.tsx +9 -0
- package/src/primitives/DropdownMenu/DropdownMenu.tsx +111 -0
- package/src/primitives/DropdownMenu/index.ts +2 -0
- package/src/primitives/Form/Form.stories.tsx +14 -0
- package/src/primitives/Form/Form.test.tsx +9 -0
- package/src/primitives/Form/Form.tsx +179 -0
- package/src/primitives/Form/index.ts +2 -0
- package/src/primitives/HoverCard/HoverCard.stories.tsx +14 -0
- package/src/primitives/HoverCard/HoverCard.test.tsx +9 -0
- package/src/primitives/HoverCard/HoverCard.tsx +31 -0
- package/src/primitives/HoverCard/index.ts +2 -0
- package/src/primitives/Input/Input.stories.tsx +14 -0
- package/src/primitives/Input/Input.test.tsx +9 -0
- package/src/primitives/Input/Input.tsx +110 -0
- package/src/primitives/Input/index.ts +2 -0
- package/src/primitives/InputOtp/InputOtp.stories.tsx +14 -0
- package/src/primitives/InputOtp/InputOtp.test.tsx +9 -0
- package/src/primitives/InputOtp/InputOtp.tsx +70 -0
- package/src/primitives/InputOtp/index.ts +2 -0
- package/src/primitives/Label/Label.stories.tsx +14 -0
- package/src/primitives/Label/Label.test.tsx +9 -0
- package/src/primitives/Label/Label.tsx +27 -0
- package/src/primitives/Label/index.ts +2 -0
- package/src/primitives/Menubar/Menubar.stories.tsx +14 -0
- package/src/primitives/Menubar/Menubar.test.tsx +9 -0
- package/src/primitives/Menubar/Menubar.tsx +255 -0
- package/src/primitives/Menubar/index.ts +2 -0
- package/src/primitives/NavigationMenu/NavigationMenu.stories.tsx +14 -0
- package/src/primitives/NavigationMenu/NavigationMenu.test.tsx +9 -0
- package/src/primitives/NavigationMenu/NavigationMenu.tsx +129 -0
- package/src/primitives/NavigationMenu/index.ts +2 -0
- package/src/primitives/Pagination/Pagination.stories.tsx +14 -0
- package/src/primitives/Pagination/Pagination.test.tsx +9 -0
- package/src/primitives/Pagination/Pagination.tsx +118 -0
- package/src/primitives/Pagination/index.ts +2 -0
- package/src/primitives/Popover/Popover.stories.tsx +14 -0
- package/src/primitives/Popover/Popover.test.tsx +9 -0
- package/src/primitives/Popover/Popover.tsx +30 -0
- package/src/primitives/Popover/index.ts +2 -0
- package/src/primitives/Progress/Progress.stories.tsx +14 -0
- package/src/primitives/Progress/Progress.test.tsx +9 -0
- package/src/primitives/Progress/Progress.tsx +20 -0
- package/src/primitives/Progress/index.ts +2 -0
- package/src/primitives/Radio/Radio.stories.tsx +14 -0
- package/src/primitives/Radio/Radio.test.tsx +9 -0
- package/src/primitives/Radio/Radio.tsx +33 -0
- package/src/primitives/Radio/index.ts +2 -0
- package/src/primitives/Resizable/Resizable.stories.tsx +14 -0
- package/src/primitives/Resizable/Resizable.test.tsx +9 -0
- package/src/primitives/Resizable/Resizable.tsx +44 -0
- package/src/primitives/Resizable/index.ts +2 -0
- package/src/primitives/ScrollArea/ScrollArea.stories.tsx +14 -0
- package/src/primitives/ScrollArea/ScrollArea.test.tsx +9 -0
- package/src/primitives/ScrollArea/ScrollArea.tsx +49 -0
- package/src/primitives/ScrollArea/index.ts +2 -0
- package/src/primitives/Select/Select.stories.tsx +14 -0
- package/src/primitives/Select/Select.test.tsx +9 -0
- package/src/primitives/Select/Select.tsx +140 -0
- package/src/primitives/Select/index.ts +2 -0
- package/src/primitives/Separator/Separator.stories.tsx +14 -0
- package/src/primitives/Separator/Separator.test.tsx +9 -0
- package/src/primitives/Separator/Separator.tsx +21 -0
- package/src/primitives/Separator/index.ts +2 -0
- package/src/primitives/Sheet/Sheet.stories.tsx +14 -0
- package/src/primitives/Sheet/Sheet.test.tsx +9 -0
- package/src/primitives/Sheet/Sheet.tsx +88 -0
- package/src/primitives/Sheet/index.ts +2 -0
- package/src/primitives/Skeleton/Skeleton.stories.tsx +14 -0
- package/src/primitives/Skeleton/Skeleton.test.tsx +9 -0
- package/src/primitives/Skeleton/Skeleton.tsx +71 -0
- package/src/primitives/Skeleton/index.ts +2 -0
- package/src/primitives/Slider/Slider.stories.tsx +14 -0
- package/src/primitives/Slider/Slider.test.tsx +9 -0
- package/src/primitives/Slider/Slider.tsx +20 -0
- package/src/primitives/Slider/index.ts +2 -0
- package/src/primitives/Sonner/Sonner.stories.tsx +14 -0
- package/src/primitives/Sonner/Sonner.test.tsx +9 -0
- package/src/primitives/Sonner/Sonner.tsx +30 -0
- package/src/primitives/Sonner/index.ts +2 -0
- package/src/primitives/Spinner/Spinner.stories.tsx +14 -0
- package/src/primitives/Spinner/Spinner.test.tsx +9 -0
- package/src/primitives/Spinner/Spinner.tsx +17 -0
- package/src/primitives/Spinner/index.ts +2 -0
- package/src/primitives/Switch/Switch.stories.tsx +14 -0
- package/src/primitives/Switch/Switch.test.tsx +9 -0
- package/src/primitives/Switch/Switch.tsx +31 -0
- package/src/primitives/Switch/index.ts +2 -0
- package/src/primitives/Table/Table.stories.tsx +14 -0
- package/src/primitives/Table/Table.test.tsx +9 -0
- package/src/primitives/Table/Table.tsx +121 -0
- package/src/primitives/Table/index.ts +2 -0
- package/src/primitives/Tabs/Tabs.stories.tsx +14 -0
- package/src/primitives/Tabs/Tabs.test.tsx +9 -0
- package/src/primitives/Tabs/Tabs.tsx +53 -0
- package/src/primitives/Tabs/index.ts +2 -0
- package/src/primitives/Textarea/Textarea.stories.tsx +14 -0
- package/src/primitives/Textarea/Textarea.test.tsx +9 -0
- package/src/primitives/Textarea/Textarea.tsx +22 -0
- package/src/primitives/Textarea/index.ts +2 -0
- package/src/primitives/Toggle/Toggle.stories.tsx +14 -0
- package/src/primitives/Toggle/Toggle.test.tsx +9 -0
- package/src/primitives/Toggle/Toggle.tsx +44 -0
- package/src/primitives/Toggle/index.ts +2 -0
- package/src/primitives/ToggleGroup/ToggleGroup.stories.tsx +14 -0
- package/src/primitives/ToggleGroup/ToggleGroup.test.tsx +9 -0
- package/src/primitives/ToggleGroup/ToggleGroup.tsx +62 -0
- package/src/primitives/ToggleGroup/index.ts +2 -0
- package/src/primitives/Tooltip/Tooltip.stories.tsx +14 -0
- package/src/primitives/Tooltip/Tooltip.test.tsx +9 -0
- package/src/primitives/Tooltip/Tooltip.tsx +29 -0
- package/src/primitives/Tooltip/index.ts +2 -0
- package/src/primitives/accordion.tsx +56 -0
- package/src/primitives/alert-dialog.tsx +140 -0
- package/src/primitives/alert.tsx +60 -0
- package/src/primitives/aspect-ratio.tsx +6 -0
- package/src/primitives/avatar.tsx +100 -0
- package/src/primitives/badge.tsx +28 -0
- package/src/primitives/button.tsx +43 -0
- package/src/primitives/calendar.tsx +214 -0
- package/src/primitives/card.tsx +48 -0
- package/src/primitives/carousel.tsx +261 -0
- package/src/primitives/chart.tsx +368 -0
- package/src/primitives/checkbox.tsx +26 -0
- package/src/primitives/code-block.tsx +173 -0
- package/src/primitives/collapsible.tsx +12 -0
- package/src/primitives/command.tsx +154 -0
- package/src/primitives/comparison.tsx +184 -0
- package/src/primitives/context-menu.tsx +101 -0
- package/src/primitives/dialog.tsx +88 -0
- package/src/primitives/drawer.tsx +117 -0
- package/src/primitives/dropdown-menu.tsx +111 -0
- package/src/primitives/form.tsx +179 -0
- package/src/primitives/hover-card.tsx +30 -0
- package/src/primitives/input-otp.tsx +70 -0
- package/src/primitives/input.tsx +23 -0
- package/src/primitives/label.tsx +27 -0
- package/src/primitives/logo-carousel.tsx +110 -0
- package/src/primitives/marquee.tsx +84 -0
- package/src/primitives/menubar.tsx +255 -0
- package/src/primitives/navigation-menu.tsx +129 -0
- package/src/primitives/pagination.tsx +118 -0
- package/src/primitives/popover.tsx +29 -0
- package/src/primitives/progress.tsx +20 -0
- package/src/primitives/qr-code.tsx +89 -0
- package/src/primitives/radio.tsx +33 -0
- package/src/primitives/rating.tsx +157 -0
- package/src/primitives/resizable.tsx +43 -0
- package/src/primitives/scroll-area.tsx +49 -0
- package/src/primitives/select.tsx +137 -0
- package/src/primitives/separator.tsx +21 -0
- package/src/primitives/sheet.tsx +87 -0
- package/src/primitives/skeleton.tsx +11 -0
- package/src/primitives/slider.tsx +20 -0
- package/src/primitives/sonner.tsx +27 -0
- package/src/primitives/spinner.tsx +17 -0
- package/src/primitives/switch.tsx +30 -0
- package/src/primitives/table.tsx +121 -0
- package/src/primitives/tabs.tsx +53 -0
- package/src/primitives/textarea.tsx +22 -0
- package/src/primitives/texture-card.tsx +52 -0
- package/src/primitives/toggle-group.tsx +62 -0
- package/src/primitives/toggle.tsx +44 -0
- package/src/primitives/tooltip.tsx +28 -0
- package/src/primitives/utils/cn.ts +1 -0
- package/src/provider/otf-ui-provider.tsx +66 -0
- package/src/styles.css +6 -0
- package/src/text/AnimatedNumber.tsx +157 -0
- package/src/text/Body.tsx +47 -0
- package/src/text/Caption.tsx +32 -0
- package/src/text/Code.tsx +43 -0
- package/src/text/GradientHeading.tsx +90 -0
- package/src/text/Heading.tsx +44 -0
- package/src/text/TextReveal.tsx +96 -0
- package/src/text/Typewriter.tsx +107 -0
- package/src/text/index.ts +8 -0
- package/src/theme/ColorSchemeSelect.tsx +74 -0
- package/src/theme/ThemeSwitch.tsx +116 -0
- package/src/theme/index.ts +2 -0
- package/src/themes/base.css +25 -0
- package/src/themes/glass.css +142 -0
- package/src/themes/linear.css +123 -0
- package/src/themes/midnight.css +131 -0
- package/src/themes/minimal.css +121 -0
- package/src/utils/cn.ts +6 -0
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react'
|
|
2
|
+
import { Slider } from './Slider'
|
|
3
|
+
|
|
4
|
+
// TODO: add all variants
|
|
5
|
+
const meta: Meta<typeof Slider> = {
|
|
6
|
+
title: 'Primitives/Slider',
|
|
7
|
+
component: Slider,
|
|
8
|
+
tags: ['autodocs'],
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export default meta
|
|
12
|
+
type Story = StoryObj<typeof Slider>
|
|
13
|
+
|
|
14
|
+
export const Default: Story = {}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import React from 'react'
|
|
2
|
+
import * as SliderPrimitive from '@radix-ui/react-slider'
|
|
3
|
+
import { cn } from '../utils/cn'
|
|
4
|
+
|
|
5
|
+
export const Slider = React.forwardRef<
|
|
6
|
+
React.ElementRef<typeof SliderPrimitive.Root>,
|
|
7
|
+
React.ComponentPropsWithoutRef<typeof SliderPrimitive.Root>
|
|
8
|
+
>(({ className, ...props }, ref) => (
|
|
9
|
+
<SliderPrimitive.Root
|
|
10
|
+
ref={ref}
|
|
11
|
+
className={cn('relative flex w-full touch-none select-none items-center', className)}
|
|
12
|
+
{...props}
|
|
13
|
+
>
|
|
14
|
+
<SliderPrimitive.Track className="relative h-1.5 w-full grow overflow-hidden rounded-full bg-[hsl(var(--secondary))]">
|
|
15
|
+
<SliderPrimitive.Range className="absolute h-full bg-[hsl(var(--primary))]" />
|
|
16
|
+
</SliderPrimitive.Track>
|
|
17
|
+
<SliderPrimitive.Thumb className="block h-4 w-4 rounded-full border border-[hsl(var(--primary)/0.5)] bg-[hsl(var(--background))] shadow transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[hsl(var(--ring))] disabled:pointer-events-none disabled:opacity-50" />
|
|
18
|
+
</SliderPrimitive.Root>
|
|
19
|
+
))
|
|
20
|
+
Slider.displayName = SliderPrimitive.Root.displayName
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react'
|
|
2
|
+
import { Sonner } from './Sonner'
|
|
3
|
+
|
|
4
|
+
// TODO: add all variants
|
|
5
|
+
const meta: Meta<typeof Sonner> = {
|
|
6
|
+
title: 'Primitives/Sonner',
|
|
7
|
+
component: Sonner,
|
|
8
|
+
tags: ['autodocs'],
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export default meta
|
|
12
|
+
type Story = StoryObj<typeof Sonner>
|
|
13
|
+
|
|
14
|
+
export const Default: Story = {}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
// @ts-nocheck
|
|
2
|
+
import { useTheme } from "next-themes"
|
|
3
|
+
import { Toaster as Sonner } from "sonner"
|
|
4
|
+
|
|
5
|
+
type ToasterProps = React.ComponentProps<typeof Sonner>
|
|
6
|
+
|
|
7
|
+
const Toaster = ({ ...props }: ToasterProps) => {
|
|
8
|
+
const { theme = "system" } = useTheme()
|
|
9
|
+
|
|
10
|
+
return (
|
|
11
|
+
<Sonner
|
|
12
|
+
theme={theme as ToasterProps["theme"]}
|
|
13
|
+
className="toaster group"
|
|
14
|
+
toastOptions={{
|
|
15
|
+
classNames: {
|
|
16
|
+
toast:
|
|
17
|
+
"group toast group-[.toaster]:bg-background group-[.toaster]:text-foreground group-[.toaster]:border-border group-[.toaster]:shadow-lg",
|
|
18
|
+
description: "group-[.toast]:text-muted-foreground",
|
|
19
|
+
actionButton:
|
|
20
|
+
"group-[.toast]:bg-primary group-[.toast]:text-primary-foreground",
|
|
21
|
+
cancelButton:
|
|
22
|
+
"group-[.toast]:bg-muted group-[.toast]:text-muted-foreground",
|
|
23
|
+
},
|
|
24
|
+
}}
|
|
25
|
+
{...props}
|
|
26
|
+
/>
|
|
27
|
+
)
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export { Toaster }
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react'
|
|
2
|
+
import { Spinner } from './Spinner'
|
|
3
|
+
|
|
4
|
+
// TODO: add all variants
|
|
5
|
+
const meta: Meta<typeof Spinner> = {
|
|
6
|
+
title: 'Primitives/Spinner',
|
|
7
|
+
component: Spinner,
|
|
8
|
+
tags: ['autodocs'],
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export default meta
|
|
12
|
+
type Story = StoryObj<typeof Spinner>
|
|
13
|
+
|
|
14
|
+
export const Default: Story = {}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
// @ts-nocheck
|
|
2
|
+
import { Loader2Icon } from "lucide-react"
|
|
3
|
+
|
|
4
|
+
import { cn } from "../utils/cn"
|
|
5
|
+
|
|
6
|
+
function Spinner({ className, ...props }: React.ComponentProps<"svg">) {
|
|
7
|
+
return (
|
|
8
|
+
<Loader2Icon
|
|
9
|
+
role="status"
|
|
10
|
+
aria-label="Loading"
|
|
11
|
+
className={cn("size-4 animate-spin", className)}
|
|
12
|
+
{...props}
|
|
13
|
+
/>
|
|
14
|
+
)
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export { Spinner }
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react'
|
|
2
|
+
import { Switch } from './Switch'
|
|
3
|
+
|
|
4
|
+
// TODO: add all variants
|
|
5
|
+
const meta: Meta<typeof Switch> = {
|
|
6
|
+
title: 'Primitives/Switch',
|
|
7
|
+
component: Switch,
|
|
8
|
+
tags: ['autodocs'],
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export default meta
|
|
12
|
+
type Story = StoryObj<typeof Switch>
|
|
13
|
+
|
|
14
|
+
export const Default: Story = {}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import React from 'react'
|
|
2
|
+
import * as SwitchPrimitive from '@radix-ui/react-switch'
|
|
3
|
+
import { cn } from '../utils/cn'
|
|
4
|
+
|
|
5
|
+
export const Switch = React.forwardRef<
|
|
6
|
+
React.ElementRef<typeof SwitchPrimitive.Root>,
|
|
7
|
+
React.ComponentPropsWithoutRef<typeof SwitchPrimitive.Root>
|
|
8
|
+
>(({ className, ...props }, ref) => (
|
|
9
|
+
<SwitchPrimitive.Root
|
|
10
|
+
ref={ref}
|
|
11
|
+
data-slot="switch"
|
|
12
|
+
className={cn(
|
|
13
|
+
'peer inline-flex h-5 w-9 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent shadow-sm transition-colors',
|
|
14
|
+
'focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[hsl(var(--ring))] focus-visible:ring-offset-2 focus-visible:ring-offset-[hsl(var(--background))]',
|
|
15
|
+
'disabled:cursor-not-allowed disabled:opacity-50',
|
|
16
|
+
'data-[state=unchecked]:bg-input',
|
|
17
|
+
'data-[state=checked]:bg-primary',
|
|
18
|
+
className
|
|
19
|
+
)}
|
|
20
|
+
{...props}
|
|
21
|
+
>
|
|
22
|
+
<SwitchPrimitive.Thumb
|
|
23
|
+
className={cn(
|
|
24
|
+
'pointer-events-none block h-4 w-4 rounded-full bg-white shadow-lg ring-0 transition-transform',
|
|
25
|
+
'data-[state=unchecked]:translate-x-0',
|
|
26
|
+
'data-[state=checked]:translate-x-4'
|
|
27
|
+
)}
|
|
28
|
+
/>
|
|
29
|
+
</SwitchPrimitive.Root>
|
|
30
|
+
))
|
|
31
|
+
Switch.displayName = SwitchPrimitive.Root.displayName
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react'
|
|
2
|
+
import { Table } from './Table'
|
|
3
|
+
|
|
4
|
+
// TODO: add all variants
|
|
5
|
+
const meta: Meta<typeof Table> = {
|
|
6
|
+
title: 'Primitives/Table',
|
|
7
|
+
component: Table,
|
|
8
|
+
tags: ['autodocs'],
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export default meta
|
|
12
|
+
type Story = StoryObj<typeof Table>
|
|
13
|
+
|
|
14
|
+
export const Default: Story = {}
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
// @ts-nocheck
|
|
2
|
+
import * as React from "react"
|
|
3
|
+
|
|
4
|
+
import { cn } from "../utils/cn"
|
|
5
|
+
|
|
6
|
+
const Table = React.forwardRef<
|
|
7
|
+
HTMLTableElement,
|
|
8
|
+
React.HTMLAttributes<HTMLTableElement>
|
|
9
|
+
>(({ className, ...props }, ref) => (
|
|
10
|
+
<div className="relative w-full overflow-auto">
|
|
11
|
+
<table
|
|
12
|
+
ref={ref}
|
|
13
|
+
className={cn("w-full caption-bottom text-sm", className)}
|
|
14
|
+
{...props}
|
|
15
|
+
/>
|
|
16
|
+
</div>
|
|
17
|
+
))
|
|
18
|
+
Table.displayName = "Table"
|
|
19
|
+
|
|
20
|
+
const TableHeader = React.forwardRef<
|
|
21
|
+
HTMLTableSectionElement,
|
|
22
|
+
React.HTMLAttributes<HTMLTableSectionElement>
|
|
23
|
+
>(({ className, ...props }, ref) => (
|
|
24
|
+
<thead ref={ref} className={cn("[&_tr]:border-b", className)} {...props} />
|
|
25
|
+
))
|
|
26
|
+
TableHeader.displayName = "TableHeader"
|
|
27
|
+
|
|
28
|
+
const TableBody = React.forwardRef<
|
|
29
|
+
HTMLTableSectionElement,
|
|
30
|
+
React.HTMLAttributes<HTMLTableSectionElement>
|
|
31
|
+
>(({ className, ...props }, ref) => (
|
|
32
|
+
<tbody
|
|
33
|
+
ref={ref}
|
|
34
|
+
className={cn("[&_tr:last-child]:border-0", className)}
|
|
35
|
+
{...props}
|
|
36
|
+
/>
|
|
37
|
+
))
|
|
38
|
+
TableBody.displayName = "TableBody"
|
|
39
|
+
|
|
40
|
+
const TableFooter = React.forwardRef<
|
|
41
|
+
HTMLTableSectionElement,
|
|
42
|
+
React.HTMLAttributes<HTMLTableSectionElement>
|
|
43
|
+
>(({ className, ...props }, ref) => (
|
|
44
|
+
<tfoot
|
|
45
|
+
ref={ref}
|
|
46
|
+
className={cn(
|
|
47
|
+
"border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",
|
|
48
|
+
className
|
|
49
|
+
)}
|
|
50
|
+
{...props}
|
|
51
|
+
/>
|
|
52
|
+
))
|
|
53
|
+
TableFooter.displayName = "TableFooter"
|
|
54
|
+
|
|
55
|
+
const TableRow = React.forwardRef<
|
|
56
|
+
HTMLTableRowElement,
|
|
57
|
+
React.HTMLAttributes<HTMLTableRowElement>
|
|
58
|
+
>(({ className, ...props }, ref) => (
|
|
59
|
+
<tr
|
|
60
|
+
ref={ref}
|
|
61
|
+
className={cn(
|
|
62
|
+
"border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",
|
|
63
|
+
className
|
|
64
|
+
)}
|
|
65
|
+
{...props}
|
|
66
|
+
/>
|
|
67
|
+
))
|
|
68
|
+
TableRow.displayName = "TableRow"
|
|
69
|
+
|
|
70
|
+
const TableHead = React.forwardRef<
|
|
71
|
+
HTMLTableCellElement,
|
|
72
|
+
React.ThHTMLAttributes<HTMLTableCellElement>
|
|
73
|
+
>(({ className, ...props }, ref) => (
|
|
74
|
+
<th
|
|
75
|
+
ref={ref}
|
|
76
|
+
className={cn(
|
|
77
|
+
"h-10 px-2 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",
|
|
78
|
+
className
|
|
79
|
+
)}
|
|
80
|
+
{...props}
|
|
81
|
+
/>
|
|
82
|
+
))
|
|
83
|
+
TableHead.displayName = "TableHead"
|
|
84
|
+
|
|
85
|
+
const TableCell = React.forwardRef<
|
|
86
|
+
HTMLTableCellElement,
|
|
87
|
+
React.TdHTMLAttributes<HTMLTableCellElement>
|
|
88
|
+
>(({ className, ...props }, ref) => (
|
|
89
|
+
<td
|
|
90
|
+
ref={ref}
|
|
91
|
+
className={cn(
|
|
92
|
+
"p-2 align-middle [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",
|
|
93
|
+
className
|
|
94
|
+
)}
|
|
95
|
+
{...props}
|
|
96
|
+
/>
|
|
97
|
+
))
|
|
98
|
+
TableCell.displayName = "TableCell"
|
|
99
|
+
|
|
100
|
+
const TableCaption = React.forwardRef<
|
|
101
|
+
HTMLTableCaptionElement,
|
|
102
|
+
React.HTMLAttributes<HTMLTableCaptionElement>
|
|
103
|
+
>(({ className, ...props }, ref) => (
|
|
104
|
+
<caption
|
|
105
|
+
ref={ref}
|
|
106
|
+
className={cn("mt-4 text-sm text-muted-foreground", className)}
|
|
107
|
+
{...props}
|
|
108
|
+
/>
|
|
109
|
+
))
|
|
110
|
+
TableCaption.displayName = "TableCaption"
|
|
111
|
+
|
|
112
|
+
export {
|
|
113
|
+
Table,
|
|
114
|
+
TableHeader,
|
|
115
|
+
TableBody,
|
|
116
|
+
TableFooter,
|
|
117
|
+
TableHead,
|
|
118
|
+
TableRow,
|
|
119
|
+
TableCell,
|
|
120
|
+
TableCaption,
|
|
121
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react'
|
|
2
|
+
import { Tabs } from './Tabs'
|
|
3
|
+
|
|
4
|
+
// TODO: add all variants
|
|
5
|
+
const meta: Meta<typeof Tabs> = {
|
|
6
|
+
title: 'Primitives/Tabs',
|
|
7
|
+
component: Tabs,
|
|
8
|
+
tags: ['autodocs'],
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export default meta
|
|
12
|
+
type Story = StoryObj<typeof Tabs>
|
|
13
|
+
|
|
14
|
+
export const Default: Story = {}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import React from 'react'
|
|
2
|
+
import * as TabsPrimitive from '@radix-ui/react-tabs'
|
|
3
|
+
import { cn } from '../utils/cn'
|
|
4
|
+
|
|
5
|
+
export const Tabs = TabsPrimitive.Root
|
|
6
|
+
|
|
7
|
+
export const TabsList = React.forwardRef<
|
|
8
|
+
React.ElementRef<typeof TabsPrimitive.List>,
|
|
9
|
+
React.ComponentPropsWithoutRef<typeof TabsPrimitive.List>
|
|
10
|
+
>(({ className, ...props }, ref) => (
|
|
11
|
+
<TabsPrimitive.List
|
|
12
|
+
ref={ref}
|
|
13
|
+
className={cn(
|
|
14
|
+
'inline-flex h-9 items-center justify-center rounded-lg bg-[hsl(var(--muted))] p-1 text-[hsl(var(--muted-foreground))]',
|
|
15
|
+
className
|
|
16
|
+
)}
|
|
17
|
+
{...props}
|
|
18
|
+
/>
|
|
19
|
+
))
|
|
20
|
+
TabsList.displayName = TabsPrimitive.List.displayName
|
|
21
|
+
|
|
22
|
+
export const TabsTrigger = React.forwardRef<
|
|
23
|
+
React.ElementRef<typeof TabsPrimitive.Trigger>,
|
|
24
|
+
React.ComponentPropsWithoutRef<typeof TabsPrimitive.Trigger>
|
|
25
|
+
>(({ className, ...props }, ref) => (
|
|
26
|
+
<TabsPrimitive.Trigger
|
|
27
|
+
ref={ref}
|
|
28
|
+
className={cn(
|
|
29
|
+
'inline-flex items-center justify-center whitespace-nowrap rounded-md px-3 py-1 text-sm font-medium ring-offset-[hsl(var(--background))] transition-all',
|
|
30
|
+
'focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[hsl(var(--ring))] focus-visible:ring-offset-2',
|
|
31
|
+
'disabled:pointer-events-none disabled:opacity-50',
|
|
32
|
+
'data-[state=active]:bg-[hsl(var(--background))] data-[state=active]:text-[hsl(var(--foreground))] data-[state=active]:shadow',
|
|
33
|
+
className
|
|
34
|
+
)}
|
|
35
|
+
{...props}
|
|
36
|
+
/>
|
|
37
|
+
))
|
|
38
|
+
TabsTrigger.displayName = TabsPrimitive.Trigger.displayName
|
|
39
|
+
|
|
40
|
+
export const TabsContent = React.forwardRef<
|
|
41
|
+
React.ElementRef<typeof TabsPrimitive.Content>,
|
|
42
|
+
React.ComponentPropsWithoutRef<typeof TabsPrimitive.Content>
|
|
43
|
+
>(({ className, ...props }, ref) => (
|
|
44
|
+
<TabsPrimitive.Content
|
|
45
|
+
ref={ref}
|
|
46
|
+
className={cn(
|
|
47
|
+
'mt-2 ring-offset-[hsl(var(--background))] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[hsl(var(--ring))] focus-visible:ring-offset-2',
|
|
48
|
+
className
|
|
49
|
+
)}
|
|
50
|
+
{...props}
|
|
51
|
+
/>
|
|
52
|
+
))
|
|
53
|
+
TabsContent.displayName = TabsPrimitive.Content.displayName
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react'
|
|
2
|
+
import { Textarea } from './Textarea'
|
|
3
|
+
|
|
4
|
+
// TODO: add all variants
|
|
5
|
+
const meta: Meta<typeof Textarea> = {
|
|
6
|
+
title: 'Primitives/Textarea',
|
|
7
|
+
component: Textarea,
|
|
8
|
+
tags: ['autodocs'],
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export default meta
|
|
12
|
+
type Story = StoryObj<typeof Textarea>
|
|
13
|
+
|
|
14
|
+
export const Default: Story = {}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import React from 'react'
|
|
2
|
+
import { cn } from '../utils/cn'
|
|
3
|
+
|
|
4
|
+
export type TextareaProps = React.TextareaHTMLAttributes<HTMLTextAreaElement>
|
|
5
|
+
|
|
6
|
+
export const Textarea = React.forwardRef<HTMLTextAreaElement, TextareaProps>(
|
|
7
|
+
({ className, ...props }, ref) => (
|
|
8
|
+
<textarea
|
|
9
|
+
className={cn(
|
|
10
|
+
'flex min-h-[80px] w-full rounded-md border border-[hsl(var(--input))] bg-transparent px-3 py-2 text-sm shadow-sm',
|
|
11
|
+
'placeholder:text-[hsl(var(--muted-foreground))]',
|
|
12
|
+
'focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[hsl(var(--ring))]',
|
|
13
|
+
'disabled:cursor-not-allowed disabled:opacity-50',
|
|
14
|
+
'resize-none',
|
|
15
|
+
className
|
|
16
|
+
)}
|
|
17
|
+
ref={ref}
|
|
18
|
+
{...props}
|
|
19
|
+
/>
|
|
20
|
+
)
|
|
21
|
+
)
|
|
22
|
+
Textarea.displayName = 'Textarea'
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react'
|
|
2
|
+
import { Toggle } from './Toggle'
|
|
3
|
+
|
|
4
|
+
// TODO: add all variants
|
|
5
|
+
const meta: Meta<typeof Toggle> = {
|
|
6
|
+
title: 'Primitives/Toggle',
|
|
7
|
+
component: Toggle,
|
|
8
|
+
tags: ['autodocs'],
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export default meta
|
|
12
|
+
type Story = StoryObj<typeof Toggle>
|
|
13
|
+
|
|
14
|
+
export const Default: Story = {}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
// @ts-nocheck
|
|
2
|
+
import * as React from "react"
|
|
3
|
+
import * as TogglePrimitive from "@radix-ui/react-toggle"
|
|
4
|
+
import { cva, type VariantProps } from "class-variance-authority"
|
|
5
|
+
|
|
6
|
+
import { cn } from "../utils/cn"
|
|
7
|
+
|
|
8
|
+
const toggleVariants = cva(
|
|
9
|
+
"inline-flex items-center justify-center gap-2 rounded-md text-sm font-medium transition-colors hover:bg-muted hover:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",
|
|
10
|
+
{
|
|
11
|
+
variants: {
|
|
12
|
+
variant: {
|
|
13
|
+
default: "bg-transparent",
|
|
14
|
+
outline:
|
|
15
|
+
"border border-input bg-transparent shadow-sm hover:bg-accent hover:text-accent-foreground",
|
|
16
|
+
},
|
|
17
|
+
size: {
|
|
18
|
+
default: "h-9 px-2 min-w-9",
|
|
19
|
+
sm: "h-8 px-1.5 min-w-8",
|
|
20
|
+
lg: "h-10 px-2.5 min-w-10",
|
|
21
|
+
},
|
|
22
|
+
},
|
|
23
|
+
defaultVariants: {
|
|
24
|
+
variant: "default",
|
|
25
|
+
size: "default",
|
|
26
|
+
},
|
|
27
|
+
}
|
|
28
|
+
)
|
|
29
|
+
|
|
30
|
+
const Toggle = React.forwardRef<
|
|
31
|
+
React.ElementRef<typeof TogglePrimitive.Root>,
|
|
32
|
+
React.ComponentPropsWithoutRef<typeof TogglePrimitive.Root> &
|
|
33
|
+
VariantProps<typeof toggleVariants>
|
|
34
|
+
>(({ className, variant, size, ...props }, ref) => (
|
|
35
|
+
<TogglePrimitive.Root
|
|
36
|
+
ref={ref}
|
|
37
|
+
className={cn(toggleVariants({ variant, size, className }))}
|
|
38
|
+
{...props}
|
|
39
|
+
/>
|
|
40
|
+
))
|
|
41
|
+
|
|
42
|
+
Toggle.displayName = TogglePrimitive.Root.displayName
|
|
43
|
+
|
|
44
|
+
export { Toggle, toggleVariants }
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react'
|
|
2
|
+
import { ToggleGroup } from './ToggleGroup'
|
|
3
|
+
|
|
4
|
+
// TODO: add all variants
|
|
5
|
+
const meta: Meta<typeof ToggleGroup> = {
|
|
6
|
+
title: 'Primitives/ToggleGroup',
|
|
7
|
+
component: ToggleGroup,
|
|
8
|
+
tags: ['autodocs'],
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export default meta
|
|
12
|
+
type Story = StoryObj<typeof ToggleGroup>
|
|
13
|
+
|
|
14
|
+
export const Default: Story = {}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { render } from '@testing-library/react'
|
|
2
|
+
import { ToggleGroup } from './ToggleGroup'
|
|
3
|
+
|
|
4
|
+
// TODO: add full a11y + variant tests
|
|
5
|
+
describe('ToggleGroup', () => {
|
|
6
|
+
it('renders without throwing', () => {
|
|
7
|
+
expect(() => render(<ToggleGroup />)).not.toThrow()
|
|
8
|
+
})
|
|
9
|
+
})
|