@vvedantb/ui 0.67.0 → 0.70.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/app/src/auth/useStableAuth.ts +0 -2
- package/app/src/confirm/ConfirmSkipHint.tsx +0 -2
- package/app/src/confirm/useAltHeld.ts +0 -17
- package/app/src/convex/ConvexClerkProvider.tsx +0 -3
- package/app/src/convex/env.ts +0 -4
- package/app/src/convex/errorMessage.ts +0 -1
- package/app/src/convex/useHeldResult.ts +0 -3
- package/app/src/page-motion/PageMotionProvider.tsx +0 -6
- package/app/src/page-title/createPageTitleContext.tsx +0 -14
- package/app/src/settings/SettingsEmptyState.tsx +0 -4
- package/app/src/settings/SettingsField.tsx +0 -4
- package/app/src/settings/SettingsPage.tsx +0 -12
- package/app/src/settings/SettingsSection.tsx +0 -14
- package/app/src/settings/ThemeModePicker.tsx +0 -6
- package/app/src/theme/createThemeProvider.tsx +0 -33
- package/app/src/time/compactRelativeTime.ts +0 -16
- package/app/src/update/staleDeployReload.ts +0 -40
- package/app/src/update/updateWatcher.ts +0 -8
- package/dist/app/src/auth/useStableAuth.js +0 -1
- package/dist/app/src/confirm/ConfirmSkipHint.js +0 -3
- package/dist/app/src/confirm/useAltHeld.js +0 -17
- package/dist/app/src/convex/env.js +0 -3
- package/dist/app/src/convex/errorMessage.js +0 -2
- package/dist/app/src/settings/ThemeModePicker.js +0 -1
- package/dist/app/src/theme/createThemeProvider.js +1 -11
- package/dist/app/src/time/compactRelativeTime.js +0 -8
- package/dist/app/src/update/staleDeployReload.js +3 -38
- package/dist/app/src/update/updateWatcher.js +1 -3
- package/dist/shell/src/AppShell.js +0 -14
- package/dist/shell/src/PageHeaderBar.js +0 -3
- package/dist/shell/src/SessionsHoverCard.js +0 -9
- package/dist/shell/src/SidePanelTabs.js +0 -36
- package/dist/shell/src/Sidebar.js +0 -1
- package/dist/shell/src/SidebarChrome.js +0 -19
- package/dist/shell/src/SidebarIconTooltip.js +0 -1
- package/dist/shell/src/SidebarRail.js +0 -12
- package/dist/shell/src/SidebarResize.js +1 -4
- package/dist/shell/src/app-shell-classes.js +0 -10
- package/dist/shell/src/index.js +0 -1
- package/dist/shell/src/shell-panel-motion.js +0 -12
- package/dist/src/ai-elements/activity-shared.js +0 -6
- package/dist/src/ai-elements/activity-step-label.js +0 -6
- package/dist/src/ai-elements/activity-step-types.js +0 -4
- package/dist/src/ai-elements/activity-tasks-utils.js +0 -17
- package/dist/src/ai-elements/activity-tasks.js +0 -55
- package/dist/src/ai-elements/artifact.js +0 -4
- package/dist/src/ai-elements/attachments.js +0 -41
- package/dist/src/ai-elements/code-block.js +0 -18
- package/dist/src/ai-elements/collapsible-user-message-body.js +0 -2
- package/dist/src/ai-elements/context.js +0 -13
- package/dist/src/ai-elements/conversation.js +0 -4
- package/dist/src/ai-elements/jump-rail.js +0 -5
- package/dist/src/ai-elements/message.js +0 -7
- package/dist/src/ai-elements/model-picker-types.js +0 -1
- package/dist/src/ai-elements/model-picker.js +1 -6
- package/dist/src/ai-elements/model-selector.js +0 -4
- package/dist/src/ai-elements/prompt-input-speech.js +0 -13
- package/dist/src/ai-elements/prompt-input.js +0 -1
- package/dist/src/ai-elements/provider-icon.js +0 -4
- package/dist/src/ai-elements/queue.js +0 -15
- package/dist/src/ai-elements/shimmer.js +0 -14
- package/dist/src/ai-elements/speech-input.js +0 -7
- package/dist/src/artifacts/artifact-frame.js +0 -2
- package/dist/src/audio/playChime.js +0 -2
- package/dist/src/audio/playTone.js +1 -4
- package/dist/src/brand/AppWordmark.js +0 -5
- package/dist/src/brand/svg.js +0 -6
- package/dist/src/client.js +0 -43
- package/dist/src/composer/Composer.js +0 -27
- package/dist/src/composer/input-area/InputArea.js +0 -3
- package/dist/src/composer/input-area/InputAreaEditor.js +1 -50
- package/dist/src/composer/input-area/composerPrediction.js +0 -3
- package/dist/src/generative-ui/content.js +0 -2
- package/dist/src/generative-ui/index.js +0 -3
- package/dist/src/generative-ui/layout.js +0 -5
- package/dist/src/hooks/use-count-up-display.js +0 -2
- package/dist/src/hooks/use-idle-callback.js +0 -3
- package/dist/src/hooks/use-persisted-scroll-parent.js +1 -8
- package/dist/src/icons/animated/index.js +0 -4
- package/dist/src/icons/board-icon.js +74 -41
- package/dist/src/icons/bolt-icon.js +30 -20
- package/dist/src/icons/building-icon.js +125 -61
- package/dist/src/icons/files-icon.js +103 -43
- package/dist/src/icons/inbox-icon.js +101 -49
- package/dist/src/icons/index.js +2 -1
- package/dist/src/icons/memory-icon.js +135 -58
- package/dist/src/icons/search-icon.js +143 -46
- package/dist/src/icons/settings-icon.js +113 -53
- package/dist/src/icons/solid-icons.js +665 -0
- package/dist/src/icons/with-active.js +25 -0
- package/dist/src/index.js +0 -40
- package/dist/src/kibo/gantt-features.js +0 -10
- package/dist/src/kibo/gantt-provider.js +0 -34
- package/dist/src/kibo/kanban.js +0 -15
- package/dist/src/kibo/list.js +0 -3
- package/dist/src/kibo/video-player.js +0 -7
- package/dist/src/logos/index.js +0 -4
- package/dist/src/markdown/Markdown.js +0 -15
- package/dist/src/markdown/MarkdownCodeBlock.js +0 -16
- package/dist/src/markdown/MarkdownInlineCode.js +0 -6
- package/dist/src/markdown/MarkdownLink.js +0 -5
- package/dist/src/markdown/codeFence.js +0 -1
- package/dist/src/markdown/codeHighlight.js +0 -19
- package/dist/src/markdown/incrementalBlocks.js +0 -45
- package/dist/src/markdown/markdownClipboard.js +0 -13
- package/dist/src/markdown/mermaid.js +0 -25
- package/dist/src/markdown/rehypeGithubAlerts.js +0 -4
- package/dist/src/markdown/useSmoothText.js +0 -5
- package/dist/src/marketing/PricingModal.js +0 -2
- package/dist/src/marketing/ProductHero.js +0 -2
- package/dist/src/marketing/createLandingKit.js +0 -5
- package/dist/src/marketing/marketing-classes.js +0 -7
- package/dist/src/motion/dock-motion.js +0 -27
- package/dist/src/motion/panel-transition.js +0 -2
- package/dist/src/ui/_field-classes.js +0 -3
- package/dist/src/ui/_menu-classes.js +0 -6
- package/dist/src/ui/_picker-classes.js +0 -9
- package/dist/src/ui/accordion.alt.js +0 -12
- package/dist/src/ui/badge.js +0 -1
- package/dist/src/ui/border-beam.js +0 -2
- package/dist/src/ui/breadcrumb.js +0 -15
- package/dist/src/ui/bulk-action-bar.js +0 -11
- package/dist/src/ui/button.js +0 -20
- package/dist/src/ui/calendar.js +1 -20
- package/dist/src/ui/card.js +0 -3
- package/dist/src/ui/carousel.js +0 -1
- package/dist/src/ui/clear-input.alt.js +0 -9
- package/dist/src/ui/clearInputDissolve.js +0 -4
- package/dist/src/ui/command.js +0 -15
- package/dist/src/ui/confetti-burst.js +0 -3
- package/dist/src/ui/confirm-dialog-parts.js +0 -11
- package/dist/src/ui/confirm-dialog.js +0 -6
- package/dist/src/ui/crossfade-icon.js +0 -2
- package/dist/src/ui/date-picker.js +0 -22
- package/dist/src/ui/dialog.js +0 -5
- package/dist/src/ui/empty-state.js +0 -7
- package/dist/src/ui/field.js +0 -21
- package/dist/src/ui/image-lightbox.js +0 -5
- package/dist/src/ui/input-group.alt.js +0 -24
- package/dist/src/ui/input-group.js +0 -4
- package/dist/src/ui/kbd.js +0 -3
- package/dist/src/ui/loading-state.js +0 -17
- package/dist/src/ui/marquee-on-hover.js +0 -3
- package/dist/src/ui/media-preview.js +0 -2
- package/dist/src/ui/modalTransition.js +0 -33
- package/dist/src/ui/overlay-a11y.js +0 -1
- package/dist/src/ui/page-title.js +0 -3
- package/dist/src/ui/refresh-spin-icon.js +0 -12
- package/dist/src/ui/search-input.js +0 -1
- package/dist/src/ui/select-field.js +0 -1
- package/dist/src/ui/send-queue-icon.js +0 -3
- package/dist/src/ui/sheet.js +0 -33
- package/dist/src/ui/slider.js +103 -82
- package/dist/src/ui/sonner-icons.js +0 -5
- package/dist/src/ui/sonner.js +0 -60
- package/dist/src/ui/spinner.js +0 -35
- package/dist/src/ui/status-dot.js +0 -2
- package/dist/src/ui/surface.js +0 -14
- package/dist/src/ui/switch.js +213 -36
- package/dist/src/ui/table.js +0 -1
- package/dist/src/ui/tabs-transition.js +0 -1
- package/dist/src/ui/tabs.js +0 -17
- package/dist/src/ui/tabsSliding.js +0 -6
- package/dist/src/ui/time-picker.js +0 -15
- package/dist/src/ui/toggle-search.js +0 -3
- package/dist/src/ui/ui-config.js +0 -16
- package/dist/src/utils/cat-color.js +0 -17
- package/dist/src/utils/cn.js +0 -5
- package/dist/src/utils/gesture.js +0 -8
- package/dist/src/utils/ref.js +0 -1
- package/dist/src/utils/runtimeVisibility.js +1 -22
- package/dist/src/utils/surface-radius.js +0 -11
- package/dist/src/utils/useDragSensors.js +0 -4
- package/dist/tokens/src/tailwind-preset.mjs +0 -3
- package/package.json +1 -1
- package/scripts/build-brand-assets.mjs +0 -8
- package/shell/src/AppShell.tsx +0 -37
- package/shell/src/AppSidebar.tsx +0 -14
- package/shell/src/ButtonTrack.tsx +0 -1
- package/shell/src/PageHeaderBar.tsx +0 -61
- package/shell/src/PageWrapper.tsx +0 -26
- package/shell/src/PillTabs.tsx +0 -1
- package/shell/src/SessionsHoverCard.tsx +0 -40
- package/shell/src/SidePanelTabs.tsx +0 -61
- package/shell/src/Sidebar.tsx +0 -1
- package/shell/src/SidebarAccountMenu.tsx +0 -40
- package/shell/src/SidebarChrome.tsx +0 -32
- package/shell/src/SidebarIconTooltip.tsx +0 -3
- package/shell/src/SidebarPanel.tsx +0 -20
- package/shell/src/SidebarRail.tsx +0 -44
- package/shell/src/SidebarResize.tsx +0 -6
- package/shell/src/SidebarUpgradeCard.tsx +0 -2
- package/shell/src/SignOutDialog.tsx +0 -6
- package/shell/src/app-shell-classes.ts +0 -15
- package/shell/src/index.ts +0 -1
- package/shell/src/shell-panel-motion.ts +0 -11
- package/shell/src/shell-variant.ts +0 -6
- package/src/ai-elements/activity-question.tsx +0 -2
- package/src/ai-elements/activity-shared.tsx +0 -11
- package/src/ai-elements/activity-step-detail.tsx +0 -2
- package/src/ai-elements/activity-step-label.ts +0 -5
- package/src/ai-elements/activity-step-types.ts +0 -24
- package/src/ai-elements/activity-tasks-utils.ts +0 -13
- package/src/ai-elements/activity-tasks.tsx +0 -61
- package/src/ai-elements/artifact.tsx +0 -7
- package/src/ai-elements/attachments.tsx +0 -33
- package/src/ai-elements/chat-day-divider.tsx +0 -3
- package/src/ai-elements/chat-jump-rail.tsx +0 -9
- package/src/ai-elements/code-block.tsx +0 -28
- package/src/ai-elements/collapsible-user-message-body.tsx +0 -2
- package/src/ai-elements/context.tsx +0 -10
- package/src/ai-elements/conversation.tsx +0 -16
- package/src/ai-elements/jump-rail.tsx +0 -31
- package/src/ai-elements/message.tsx +0 -32
- package/src/ai-elements/model-picker-content.tsx +0 -17
- package/src/ai-elements/model-picker-types.ts +0 -5
- package/src/ai-elements/model-picker.tsx +0 -36
- package/src/ai-elements/model-selector.tsx +0 -5
- package/src/ai-elements/prompt-input-speech.tsx +0 -11
- package/src/ai-elements/prompt-input.tsx +0 -26
- package/src/ai-elements/provider-icon.tsx +0 -2
- package/src/ai-elements/queue.tsx +0 -19
- package/src/ai-elements/reasoning.tsx +0 -4
- package/src/ai-elements/shimmer.tsx +0 -16
- package/src/ai-elements/simple-model-ladder.tsx +0 -1
- package/src/ai-elements/speech-input.tsx +0 -6
- package/src/ai-elements/test-results.tsx +0 -5
- package/src/ai-elements/trace.tsx +0 -2
- package/src/ai-elements/web-preview.tsx +0 -7
- package/src/artifacts/artifact-card.tsx +0 -7
- package/src/artifacts/artifact-dialogs.tsx +0 -4
- package/src/artifacts/artifact-frame.tsx +0 -10
- package/src/artifacts/artifact-list-toolbar.tsx +0 -6
- package/src/artifacts/artifact-list.tsx +0 -4
- package/src/artifacts/artifact-type-icon.tsx +0 -1
- package/src/artifacts/artifact-versions-menu.tsx +0 -3
- package/src/artifacts/artifact-viewer.tsx +0 -5
- package/src/artifacts/types.ts +0 -1
- package/src/audio/playChime.ts +0 -1
- package/src/audio/playTone.ts +0 -7
- package/src/brand/AppIcons.tsx +0 -5
- package/src/brand/AppMark.tsx +0 -6
- package/src/brand/AppWordmark.tsx +0 -10
- package/src/brand/familyApps.ts +0 -2
- package/src/brand/svg.ts +0 -9
- package/src/client.ts +0 -34
- package/src/composer/Composer.tsx +0 -70
- package/src/composer/input-area/ComposerSlashMenu.tsx +0 -1
- package/src/composer/input-area/ConnectionStatusMenuItem.tsx +0 -2
- package/src/composer/input-area/FadePresence.tsx +0 -4
- package/src/composer/input-area/InputActions.tsx +0 -5
- package/src/composer/input-area/InputArea.tsx +1 -28
- package/src/composer/input-area/InputAreaEditor.tsx +0 -39
- package/src/composer/input-area/InputBanners.tsx +0 -1
- package/src/composer/input-area/PromoBanner.tsx +0 -1
- package/src/composer/input-area/composerPrediction.ts +0 -2
- package/src/composer/input-area/useComposerSlashMenu.ts +0 -1
- package/src/composer/input-area/useInputAreaPrediction.ts +0 -1
- package/src/composer/prediction.ts +0 -6
- package/src/composer/useComposerPrediction.ts +0 -2
- package/src/generative-ui/GenerativeUiPanel.tsx +0 -11
- package/src/generative-ui/content.tsx +0 -2
- package/src/generative-ui/index.ts +0 -3
- package/src/generative-ui/layout.tsx +0 -5
- package/src/hooks/use-count-up-display.ts +0 -1
- package/src/hooks/use-idle-callback.ts +0 -5
- package/src/hooks/use-persisted-scroll-parent.ts +0 -4
- package/src/hooks/use-single-flight.ts +0 -5
- package/src/icons/animated/animated-bell-icon.tsx +0 -6
- package/src/icons/animated/animated-counter.tsx +0 -5
- package/src/icons/animated/animated-key-icon.tsx +0 -4
- package/src/icons/animated/animated-notification-icon.tsx +0 -14
- package/src/icons/animated/animated-progress.tsx +0 -10
- package/src/icons/animated/animated-status-dot.tsx +0 -4
- package/src/icons/animated/index.ts +0 -4
- package/src/icons/animated/morphing-menu-icon.tsx +0 -5
- package/src/icons/animated/morphing-mic-icon.tsx +0 -2
- package/src/icons/animated/pulsing-rings.tsx +0 -4
- package/src/icons/automation-icon.tsx +0 -1
- package/src/icons/board-icon.tsx +13 -10
- package/src/icons/bolt-icon.tsx +5 -4
- package/src/icons/building-icon.tsx +11 -9
- package/src/icons/draft-icon.tsx +0 -1
- package/src/icons/files-icon.tsx +9 -5
- package/src/icons/inbox-arrow-icon.tsx +0 -1
- package/src/icons/inbox-icon.tsx +9 -5
- package/src/icons/index.ts +12 -1
- package/src/icons/memory-icon.tsx +9 -11
- package/src/icons/nav-icon-base.tsx +0 -10
- package/src/icons/search-icon.tsx +7 -6
- package/src/icons/settings-icon.tsx +11 -13
- package/src/icons/sidebar-toggle-icon.tsx +0 -1
- package/src/icons/solid-icons.tsx +138 -0
- package/src/icons/with-active.tsx +14 -0
- package/src/index.ts +0 -30
- package/src/kibo/gantt-features.tsx +0 -16
- package/src/kibo/gantt-header.tsx +0 -4
- package/src/kibo/gantt-provider.tsx +0 -36
- package/src/kibo/gantt-sidebar.tsx +0 -7
- package/src/kibo/gantt-timeline.tsx +0 -4
- package/src/kibo/kanban.tsx +0 -49
- package/src/kibo/list.tsx +0 -8
- package/src/kibo/theme-switcher.tsx +0 -5
- package/src/kibo/video-player.tsx +0 -9
- package/src/logos/index.ts +0 -3
- package/src/logos/logo-svg.tsx +0 -5
- package/src/markdown/Markdown.tsx +0 -20
- package/src/markdown/MarkdownCodeBlock.tsx +0 -14
- package/src/markdown/MarkdownInlineCode.tsx +0 -6
- package/src/markdown/MarkdownLink.tsx +0 -4
- package/src/markdown/codeFence.ts +0 -3
- package/src/markdown/codeHighlight.ts +0 -16
- package/src/markdown/incrementalBlocks.ts +0 -49
- package/src/markdown/markdownClipboard.ts +0 -12
- package/src/markdown/mermaid.ts +0 -22
- package/src/markdown/rehypeGithubAlerts.ts +0 -3
- package/src/markdown/useSmoothText.ts +0 -5
- package/src/marketing/FloatingBar.tsx +0 -3
- package/src/marketing/PricingModal.tsx +0 -45
- package/src/marketing/ProductHero.tsx +0 -23
- package/src/marketing/ProductHeroOrbit.tsx +0 -5
- package/src/marketing/SiteFooter.tsx +0 -23
- package/src/marketing/SiteHeader.tsx +0 -14
- package/src/marketing/VProPricingModal.tsx +0 -5
- package/src/marketing/createLandingKit.tsx +0 -12
- package/src/marketing/landing.tsx +0 -12
- package/src/marketing/marketing-classes.ts +0 -7
- package/src/motion/dock-motion.ts +0 -25
- package/src/motion/list-enter.tsx +0 -4
- package/src/motion/panel-transition.tsx +0 -5
- package/src/ui/_field-classes.ts +0 -2
- package/src/ui/_menu-classes.ts +0 -4
- package/src/ui/_menu-parts.tsx +0 -5
- package/src/ui/_picker-classes.ts +0 -6
- package/src/ui/accordion.alt.tsx +0 -8
- package/src/ui/accordion.tsx +0 -4
- package/src/ui/badge.tsx +0 -1
- package/src/ui/border-beam.tsx +0 -11
- package/src/ui/breadcrumb.tsx +0 -13
- package/src/ui/bulk-action-bar.tsx +0 -24
- package/src/ui/button.tsx +0 -27
- package/src/ui/calendar.tsx +0 -18
- package/src/ui/card.tsx +0 -3
- package/src/ui/carousel.tsx +0 -4
- package/src/ui/checkbox.tsx +0 -1
- package/src/ui/clear-input.alt.tsx +0 -8
- package/src/ui/clear-input.tsx +0 -16
- package/src/ui/clearInputDissolve.ts +0 -4
- package/src/ui/command.tsx +0 -22
- package/src/ui/confetti-burst.tsx +0 -4
- package/src/ui/confirm-dialog-parts.tsx +0 -45
- package/src/ui/confirm-dialog.tsx +0 -26
- package/src/ui/context-menu.tsx +0 -10
- package/src/ui/count-pop.tsx +0 -2
- package/src/ui/crossfade-icon.tsx +0 -3
- package/src/ui/date-picker.tsx +0 -40
- package/src/ui/dialog.tsx +0 -18
- package/src/ui/dropdown-menu.tsx +0 -11
- package/src/ui/empty-state.tsx +0 -15
- package/src/ui/error-boundary.tsx +0 -7
- package/src/ui/field.tsx +0 -18
- package/src/ui/hover-card.tsx +0 -6
- package/src/ui/image-lightbox.tsx +0 -7
- package/src/ui/input-group.alt.tsx +0 -16
- package/src/ui/input-group.tsx +0 -3
- package/src/ui/kbd.tsx +0 -3
- package/src/ui/label.tsx +0 -1
- package/src/ui/labeled-slider-row.tsx +0 -2
- package/src/ui/list-row.tsx +0 -46
- package/src/ui/loading-state.tsx +0 -23
- package/src/ui/marquee-on-hover.tsx +1 -6
- package/src/ui/media-preview.tsx +0 -5
- package/src/ui/modalTransition.ts +0 -25
- package/src/ui/overlay-a11y.ts +0 -1
- package/src/ui/page-title.tsx +0 -4
- package/src/ui/popover.tsx +0 -8
- package/src/ui/progress.tsx +0 -1
- package/src/ui/refresh-spin-icon.tsx +0 -11
- package/src/ui/relative-date-time.tsx +0 -3
- package/src/ui/rolling-number.tsx +0 -2
- package/src/ui/search-input.tsx +0 -9
- package/src/ui/select-field.tsx +0 -5
- package/src/ui/select.tsx +0 -8
- package/src/ui/send-queue-icon.tsx +0 -3
- package/src/ui/separator.tsx +0 -1
- package/src/ui/sheet.tsx +0 -42
- package/src/ui/slide-over-panel.tsx +0 -2
- package/src/ui/slider.tsx +21 -9
- package/src/ui/sonner-icons.tsx +0 -4
- package/src/ui/sonner.tsx +0 -78
- package/src/ui/spinner.tsx +0 -50
- package/src/ui/status-dot.tsx +0 -10
- package/src/ui/surface.tsx +0 -13
- package/src/ui/switch.tsx +72 -3
- package/src/ui/table.tsx +0 -3
- package/src/ui/tabs-transition.tsx +0 -12
- package/src/ui/tabs.tsx +0 -17
- package/src/ui/tabsSliding.ts +0 -5
- package/src/ui/time-picker.tsx +0 -17
- package/src/ui/toggle-search.tsx +0 -6
- package/src/ui/toolbar-search-input.tsx +0 -3
- package/src/ui/tooltip.tsx +0 -5
- package/src/ui/ui-config.tsx +0 -19
- package/src/utils/cat-color.ts +0 -20
- package/src/utils/cn.ts +0 -4
- package/src/utils/gesture.ts +0 -8
- package/src/utils/ref.ts +0 -1
- package/src/utils/runtimeVisibility.ts +0 -19
- package/src/utils/surface-radius.ts +0 -11
- package/src/utils/useDragSensors.ts +0 -2
- package/tokens/examples/compat-shadcn-rgb/vite.config.ts +0 -2
- package/tokens/examples/toaster/Fixture.tsx +0 -4
- package/tokens/examples/toaster/UpdateToastFixture.tsx +0 -4
- package/tokens/examples/toaster/vite.config.ts +0 -2
- package/tokens/examples/tokens-moved/Fixture.tsx +0 -4
- package/tokens/examples/tokens-moved/vite.config.ts +0 -2
- package/tokens/src/tailwind-preset.mjs +0 -3
|
@@ -19,55 +19,27 @@ import { SignOutDialog } from "./SignOutDialog";
|
|
|
19
19
|
type ContentProps = ComponentPropsWithoutRef<typeof DropdownMenuContent>;
|
|
20
20
|
|
|
21
21
|
export type SidebarAccountMenuProps = {
|
|
22
|
-
/** Trigger `title`, `aria-label` and the menu label. */
|
|
23
22
|
name: string;
|
|
24
|
-
/** When set, the label shows the name and email on two lines. */
|
|
25
23
|
email?: string;
|
|
26
|
-
/** Legacy (still supported): always use the two-line label layout, even without `email`. Default `false`. */
|
|
27
24
|
stackedLabel?: boolean;
|
|
28
|
-
/** Avatar image. Without it the avatar shows up to two initials of `name`. */
|
|
29
25
|
imageUrl?: string;
|
|
30
|
-
/** Default `"center"`. */
|
|
31
26
|
align?: ContentProps["align"];
|
|
32
|
-
/** Default `"right"`. */
|
|
33
27
|
side?: ContentProps["side"];
|
|
34
|
-
/** Default `8`. */
|
|
35
28
|
sideOffset?: number;
|
|
36
29
|
collisionPadding?: ContentProps["collisionPadding"];
|
|
37
|
-
/** Merged onto the menu content after `w-56`. */
|
|
38
30
|
contentClassName?: string;
|
|
39
|
-
/**
|
|
40
|
-
* Legacy (still supported): unread dot over the trigger's top-right corner, a sibling of the trigger in
|
|
41
|
-
* a `relative` wrapper. `true` shows it, `false` keeps it mounted at zero
|
|
42
|
-
* opacity so it fades out. Omitted: no wrapper and no dot.
|
|
43
|
-
*/
|
|
44
31
|
badge?: boolean;
|
|
45
|
-
/** Legacy (still supported): spread onto the trigger `Button` after the defaults (overrides `title`, `aria-label`, …). `className` merges last. */
|
|
46
32
|
triggerProps?: Omit<ComponentPropsWithoutRef<typeof Button>, "children" | "asChild">;
|
|
47
|
-
/** Legacy (still supported): spread onto `DropdownMenuContent`, for example `fitViewport` or `aria-label`. Use `contentClassName` for classes. */
|
|
48
33
|
contentProps?: Omit<
|
|
49
34
|
ContentProps,
|
|
50
35
|
"children" | "className" | "align" | "side" | "sideOffset" | "collisionPadding"
|
|
51
36
|
>;
|
|
52
|
-
/** Menu items after the label and separator. */
|
|
53
37
|
children?: ReactNode;
|
|
54
|
-
/**
|
|
55
|
-
* Adds a theme item after `children`. With `isDark` it names the other of
|
|
56
|
-
* light and dark. With `theme` it names the next theme in the cycle light,
|
|
57
|
-
* neutral, dark (system counts as light), and `onToggle` must move to it.
|
|
58
|
-
*/
|
|
59
38
|
themeToggle?: { isDark: boolean; onToggle: () => void } | { theme: string | undefined; onToggle: () => void };
|
|
60
|
-
/**
|
|
61
|
-
* Adds a separator and a danger "Sign out" item last. Selecting it opens
|
|
62
|
-
* `SignOutDialog` (Alt-click skips it, with `ConfirmSkipHint`). The menu owns
|
|
63
|
-
* the dialog state; `onSignOut` failing re-enables the dialog.
|
|
64
|
-
*/
|
|
65
39
|
signOut?: {
|
|
66
40
|
onSignOut: () => Promise<void>;
|
|
67
|
-
/** Second line of the dialog. */
|
|
68
41
|
description?: string;
|
|
69
42
|
};
|
|
70
|
-
/** `size` of the theme and sign-out item icons. Default: the icon's own size (24). */
|
|
71
43
|
itemIconSize?: number;
|
|
72
44
|
};
|
|
73
45
|
|
|
@@ -159,11 +131,6 @@ export function SidebarAccountMenu({
|
|
|
159
131
|
}
|
|
160
132
|
|
|
161
133
|
export type SidebarAccountMenuRootProps = ComponentPropsWithoutRef<typeof DropdownMenu> & {
|
|
162
|
-
/**
|
|
163
|
-
* Unread dot over the trigger's top-right corner (`AccountBadge`), a sibling
|
|
164
|
-
* of the trigger in a `relative` wrapper. `true` shows it, `false` keeps it
|
|
165
|
-
* mounted at zero opacity so it fades out. Omitted: no wrapper and no dot.
|
|
166
|
-
*/
|
|
167
134
|
badge?: boolean;
|
|
168
135
|
};
|
|
169
136
|
|
|
@@ -171,7 +138,6 @@ export type SidebarAccountMenuRootProps = ComponentPropsWithoutRef<typeof Dropdo
|
|
|
171
138
|
export function AccountMenu({ badge, ...props }: SidebarAccountMenuRootProps) {
|
|
172
139
|
const menu = <DropdownMenu {...props} />;
|
|
173
140
|
if (badge === undefined) return menu;
|
|
174
|
-
// Sibling of the trigger, so its opacity and press scale do not reach the dot.
|
|
175
141
|
return (
|
|
176
142
|
<div className="relative">
|
|
177
143
|
{menu}
|
|
@@ -181,7 +147,6 @@ export function AccountMenu({ badge, ...props }: SidebarAccountMenuRootProps) {
|
|
|
181
147
|
}
|
|
182
148
|
|
|
183
149
|
export type SidebarAccountBadgeProps = Omit<ComponentPropsWithoutRef<"span">, "children"> & {
|
|
184
|
-
/** `false` keeps the dot mounted at zero opacity so it fades out. Default `true`. */
|
|
185
150
|
visible?: boolean;
|
|
186
151
|
};
|
|
187
152
|
|
|
@@ -203,9 +168,7 @@ export function AccountBadge({ visible = true, className, ...props }: SidebarAcc
|
|
|
203
168
|
|
|
204
169
|
export type SidebarAccountAvatarProps = {
|
|
205
170
|
userName: string;
|
|
206
|
-
/** Without it the avatar shows up to two initials of `userName`. */
|
|
207
171
|
imageUrl?: string;
|
|
208
|
-
/** Size classes, for example `h-7 w-7`. */
|
|
209
172
|
className?: string;
|
|
210
173
|
};
|
|
211
174
|
|
|
@@ -239,7 +202,6 @@ export function AccountAvatar({ imageUrl, userName, className }: SidebarAccountA
|
|
|
239
202
|
}
|
|
240
203
|
|
|
241
204
|
export type SidebarAccountTriggerProps = Omit<ButtonProps, "asChild" | "shape"> & {
|
|
242
|
-
/** Default `title` and `aria-label`, and the avatar initials. Native `name` goes to the button. */
|
|
243
205
|
userName: string;
|
|
244
206
|
imageUrl?: string;
|
|
245
207
|
};
|
|
@@ -290,10 +252,8 @@ export function AccountContent({
|
|
|
290
252
|
|
|
291
253
|
export type SidebarAccountLabelProps = Omit<ComponentPropsWithoutRef<typeof DropdownMenuLabel>, "children"> & {
|
|
292
254
|
userName: string;
|
|
293
|
-
/** Shown under the name. */
|
|
294
255
|
email?: string;
|
|
295
256
|
imageUrl?: string;
|
|
296
|
-
/** Two-line layout even without `email`. Default `false`. */
|
|
297
257
|
stacked?: boolean;
|
|
298
258
|
};
|
|
299
259
|
|
|
@@ -38,21 +38,15 @@ function useSidebar(part: string): SidebarContextValue {
|
|
|
38
38
|
}
|
|
39
39
|
|
|
40
40
|
export type SidebarRootProps = {
|
|
41
|
-
/** From the app's desktop media query (for example `(min-width: 768px)`). */
|
|
42
41
|
isDesktop: boolean;
|
|
43
|
-
/** Mobile drawer state. Owned by the app (which also closes it on route change). */
|
|
44
42
|
mobileOpen: boolean;
|
|
45
43
|
onMobileOpenChange: (open: boolean) => void;
|
|
46
|
-
/** Desktop: show only the rail. `Sidebar.Panel` hides itself (`md:hidden`). Default `false`. */
|
|
47
44
|
collapsed?: boolean;
|
|
48
|
-
/** The current section has no panel: rail-wide on every viewport, `Sidebar.Panel` renders nothing. Default `false`. */
|
|
49
45
|
panelHidden?: boolean;
|
|
50
|
-
/** `id` of the drawer (`Sidebar.Aside`), used by the menu button `aria-controls`. Default from `useId`. */
|
|
51
46
|
id?: string;
|
|
52
47
|
children?: ReactNode;
|
|
53
48
|
};
|
|
54
49
|
|
|
55
|
-
/** Sidebar state for the other parts. Renders no DOM. Closes the drawer when the desktop breakpoint is reached. */
|
|
56
50
|
function Root({
|
|
57
51
|
isDesktop,
|
|
58
52
|
mobileOpen,
|
|
@@ -64,8 +58,6 @@ function Root({
|
|
|
64
58
|
}: SidebarRootProps) {
|
|
65
59
|
const autoId = useId();
|
|
66
60
|
|
|
67
|
-
// Reaching the desktop breakpoint closes the drawer, so it does not reopen
|
|
68
|
-
// on the way back down. Runs on breakpoint change only.
|
|
69
61
|
useEffect(() => {
|
|
70
62
|
if (isDesktop && mobileOpen) onMobileOpenChange(false);
|
|
71
63
|
}, [isDesktop]);
|
|
@@ -87,10 +79,6 @@ function closeOnEscape(sidebar: SidebarContextValue, event: KeyboardEvent) {
|
|
|
87
79
|
|
|
88
80
|
export type SidebarMobileHeaderProps = ComponentProps<"header">;
|
|
89
81
|
|
|
90
|
-
/**
|
|
91
|
-
* Fixed header below `md`. Escape inside it closes the drawer. Three columns
|
|
92
|
-
* keep the title centred and stop it overlapping the actions: it truncates instead.
|
|
93
|
-
*/
|
|
94
82
|
function MobileHeader({ className, onKeyDown, ...props }: SidebarMobileHeaderProps) {
|
|
95
83
|
const sidebar = useSidebar("MobileHeader");
|
|
96
84
|
return (
|
|
@@ -111,13 +99,10 @@ function MobileHeader({ className, onKeyDown, ...props }: SidebarMobileHeaderPro
|
|
|
111
99
|
const defaultMobileMenuIcon = () => <IconMenu2 size={20} />;
|
|
112
100
|
|
|
113
101
|
export type SidebarMobileMenuButtonProps = Omit<ButtonProps, "children" | "shape"> & {
|
|
114
|
-
/** `aria-label`. Default `"Open navigation menu"`. */
|
|
115
102
|
label?: string;
|
|
116
|
-
/** Icon for the drawer state. Default a 20px menu icon. */
|
|
117
103
|
icon?: (open: boolean) => ReactNode;
|
|
118
104
|
};
|
|
119
105
|
|
|
120
|
-
/** Opens the drawer. `shape="rounded"` (`rounded-lg`); change the radius with `className`. */
|
|
121
106
|
function MobileMenuButton({
|
|
122
107
|
label = "Open navigation menu",
|
|
123
108
|
icon = defaultMobileMenuIcon,
|
|
@@ -149,7 +134,6 @@ function MobileMenuButton({
|
|
|
149
134
|
|
|
150
135
|
export type SidebarMobileTitleProps = ComponentProps<"h1">;
|
|
151
136
|
|
|
152
|
-
/** Centred title in the mobile header. Without children, an empty `<span>` keeps the middle column. */
|
|
153
137
|
function MobileTitle({ className, children, ...props }: SidebarMobileTitleProps) {
|
|
154
138
|
if (!children) return <span aria-hidden="true" />;
|
|
155
139
|
return (
|
|
@@ -167,7 +151,6 @@ function MobileTitle({ className, children, ...props }: SidebarMobileTitleProps)
|
|
|
167
151
|
|
|
168
152
|
export type SidebarMobileActionsProps = ComponentProps<"div">;
|
|
169
153
|
|
|
170
|
-
/** Trailing actions in the mobile header. Without children, a menu-button-sized spacer keeps the title centred. */
|
|
171
154
|
function MobileActions({ className, children, ...props }: SidebarMobileActionsProps) {
|
|
172
155
|
if (!children) {
|
|
173
156
|
return <div {...props} className={cn("h-11 w-11 shrink-0 justify-self-end", className)} aria-hidden="true" />;
|
|
@@ -184,16 +167,12 @@ function MobileActions({ className, children, ...props }: SidebarMobileActionsPr
|
|
|
184
167
|
}
|
|
185
168
|
|
|
186
169
|
export type SidebarBackdropProps = Omit<HTMLMotionProps<"button">, "children"> & {
|
|
187
|
-
/** `aria-label`. Default `"Close navigation"`. */
|
|
188
170
|
label?: string;
|
|
189
171
|
};
|
|
190
172
|
|
|
191
|
-
/** Drawer backdrop below `md`; a click closes the drawer. Fades in and out. */
|
|
192
173
|
function Backdrop({ label = "Close navigation", className, onClick, ...props }: SidebarBackdropProps) {
|
|
193
174
|
const sidebar = useSidebar("Backdrop");
|
|
194
175
|
return (
|
|
195
|
-
// `m.*` in its own `LazyMotion`, as every shell part: an app's strict
|
|
196
|
-
// `LazyMotion` throws on a full `motion.*` component.
|
|
197
176
|
<LazyMotion features={domMax}>
|
|
198
177
|
<AnimatePresence initial={false}>
|
|
199
178
|
{sidebar.mobileOpen && !sidebar.isDesktop ? (
|
|
@@ -219,11 +198,6 @@ function Backdrop({ label = "Close navigation", className, onClick, ...props }:
|
|
|
219
198
|
|
|
220
199
|
export type SidebarAsideProps = HTMLMotionProps<"aside">;
|
|
221
200
|
|
|
222
|
-
/**
|
|
223
|
-
* The `<aside>`: fixed on desktop, a swipe-to-close drawer below it. Width
|
|
224
|
-
* reads the `--app-shell-*` variables. `id` overrides the Root drawer id
|
|
225
|
-
* (keep them equal so `aria-controls` points here).
|
|
226
|
-
*/
|
|
227
201
|
function Aside({ id, className, onKeyDown, children, ...props }: SidebarAsideProps) {
|
|
228
202
|
const sidebar = useSidebar("Aside");
|
|
229
203
|
const resize = useSidebarResizeContext();
|
|
@@ -237,7 +211,6 @@ function Aside({ id, className, onKeyDown, children, ...props }: SidebarAsidePro
|
|
|
237
211
|
};
|
|
238
212
|
|
|
239
213
|
return (
|
|
240
|
-
// `domMax`: the drawer drags to close.
|
|
241
214
|
<LazyMotion features={domMax}>
|
|
242
215
|
<m.aside
|
|
243
216
|
id={id ?? sidebar.drawerId}
|
|
@@ -277,11 +250,6 @@ function Aside({ id, className, onKeyDown, children, ...props }: SidebarAsidePro
|
|
|
277
250
|
|
|
278
251
|
export type SidebarResizeHandlePartProps = SidebarResizeHandleProps;
|
|
279
252
|
|
|
280
|
-
/**
|
|
281
|
-
* `SidebarResizeHandle` inside a resizable `AppShell`. Under a `Sidebar.Root`
|
|
282
|
-
* it shows only on desktop while the panel shows (not collapsed or hidden).
|
|
283
|
-
* Place it inside `Sidebar.Aside`.
|
|
284
|
-
*/
|
|
285
253
|
function ResizeHandle(props: SidebarResizeHandlePartProps) {
|
|
286
254
|
const sidebar = useOptionalSidebar();
|
|
287
255
|
const resize = useSidebarResizeContext();
|
|
@@ -5,13 +5,10 @@ export type SidebarIconTooltipProps = {
|
|
|
5
5
|
label: string;
|
|
6
6
|
enabled: boolean;
|
|
7
7
|
children: ReactElement;
|
|
8
|
-
/** Default `"right"`. */
|
|
9
8
|
side?: "top" | "right" | "bottom" | "left";
|
|
10
|
-
/** Default `8`. */
|
|
11
9
|
sideOffset?: number;
|
|
12
10
|
};
|
|
13
11
|
|
|
14
|
-
// radix tooltip for icon-only sidebar rail — skipped when labels are visible
|
|
15
12
|
export function SidebarIconTooltip({
|
|
16
13
|
label,
|
|
17
14
|
enabled,
|
|
@@ -19,18 +19,12 @@ import { useAppShellPanelDock } from "./shell-variant";
|
|
|
19
19
|
|
|
20
20
|
export type SidebarPanelProps = {
|
|
21
21
|
title: string;
|
|
22
|
-
/** Legacy (still supported): rendered in the header, before the close button. Compose `Sidebar.PanelActions`. */
|
|
23
22
|
headerTrailing?: ReactNode;
|
|
24
|
-
/** Legacy (still supported): when set, a close button follows `headerTrailing`. Pass it on the mobile drawer only. */
|
|
25
23
|
onClose?: () => void;
|
|
26
|
-
/** Legacy (still supported): close button label. Default `"Close navigation"`. */
|
|
27
24
|
closeLabel?: string;
|
|
28
|
-
/** Legacy (still supported): merged onto the close button. */
|
|
29
25
|
closeButtonClassName?: string;
|
|
30
|
-
/** Desktop: hides the panel (`md:hidden`) and leaves the rail. */
|
|
31
26
|
collapsed?: boolean;
|
|
32
27
|
className?: string;
|
|
33
|
-
/** Panel body: nav, footer and so on. */
|
|
34
28
|
children?: ReactNode;
|
|
35
29
|
};
|
|
36
30
|
|
|
@@ -64,9 +58,7 @@ export function SidebarPanel({
|
|
|
64
58
|
}
|
|
65
59
|
|
|
66
60
|
export type SidebarPanelRootProps = ComponentPropsWithoutRef<"div"> & {
|
|
67
|
-
/** Desktop: hides the panel (`md:hidden`). Default the `Sidebar.Root` `collapsed`, else `false`. */
|
|
68
61
|
collapsed?: boolean;
|
|
69
|
-
/** Renders nothing. Default the `Sidebar.Root` `panelHidden`, else `false`. */
|
|
70
62
|
panelHidden?: boolean;
|
|
71
63
|
};
|
|
72
64
|
|
|
@@ -80,8 +72,6 @@ export function Panel({ collapsed, panelHidden, className, ...props }: SidebarPa
|
|
|
80
72
|
data-shell-dock-panel={dock ? "" : undefined}
|
|
81
73
|
{...props}
|
|
82
74
|
className={cn(
|
|
83
|
-
// No border-r: the main content card floats beside this panel, so a
|
|
84
|
-
// right edge line reads as a hard divider.
|
|
85
75
|
"relative flex h-full min-w-0 flex-1 flex-col overflow-hidden bg-background",
|
|
86
76
|
(collapsed ?? sidebar?.collapsed ?? false) && "md:hidden",
|
|
87
77
|
className,
|
|
@@ -124,7 +114,6 @@ export function PanelActions({ className, ...props }: SidebarPanelActionsProps)
|
|
|
124
114
|
}
|
|
125
115
|
|
|
126
116
|
export type SidebarPanelCloseProps = Omit<ButtonProps, "shape"> & {
|
|
127
|
-
/** `aria-label`. Default `"Close navigation"`. */
|
|
128
117
|
label?: string;
|
|
129
118
|
};
|
|
130
119
|
|
|
@@ -151,21 +140,13 @@ export function PanelClose({ label = "Close navigation", onClick, className, chi
|
|
|
151
140
|
}
|
|
152
141
|
|
|
153
142
|
export type SidebarNavItemProps = ComponentPropsWithoutRef<"button"> & {
|
|
154
|
-
/** Current route: static fill, `font-medium`, `aria-current="page"`, `data-active="true"`. */
|
|
155
143
|
active?: boolean;
|
|
156
|
-
/** Collapsed panel: centred icon, no horizontal padding. */
|
|
157
144
|
iconOnly?: boolean;
|
|
158
|
-
/** Leading icon element; gets `sidebarNavIconClass(active)` merged onto it. For other leading content use `Sidebar.NavItemLeading`. */
|
|
159
145
|
icon?: ReactElement;
|
|
160
|
-
/** Render the single child element (for example a router link) as the row. */
|
|
161
146
|
asChild?: boolean;
|
|
162
|
-
/** Picked (for example in a multi-select list): the active fill without `font-medium`. Sets `data-selected="true"`. */
|
|
163
147
|
selected?: boolean;
|
|
164
|
-
/** Nesting level from 0. Each level adds 12px to the 16px left padding. Ignored with `iconOnly`. */
|
|
165
148
|
indent?: number;
|
|
166
|
-
/** Row being dragged. Sets `data-dragging="true"`. */
|
|
167
149
|
dragging?: boolean;
|
|
168
|
-
/** Row under a drag. Sets `data-drop-target="true"`. */
|
|
169
150
|
dropTarget?: boolean;
|
|
170
151
|
};
|
|
171
152
|
|
|
@@ -204,7 +185,6 @@ export function NavItem({
|
|
|
204
185
|
}
|
|
205
186
|
|
|
206
187
|
export type SidebarNavItemPartProps = ComponentPropsWithoutRef<"span"> & {
|
|
207
|
-
/** Merge the part classes onto the single child element instead of a `<span>`. */
|
|
208
188
|
asChild?: boolean;
|
|
209
189
|
};
|
|
210
190
|
|
|
@@ -12,21 +12,11 @@ import { toggleShellPanel } from "./shell-panel-motion";
|
|
|
12
12
|
import { useAppShellPanelDock, useAppShellVariant } from "./shell-variant";
|
|
13
13
|
|
|
14
14
|
export type SidebarRailProps = Omit<ComponentPropsWithoutRef<"div">, "children" | "className"> & {
|
|
15
|
-
/** Pinned at the top, above the scroll body. */
|
|
16
15
|
top?: ReactNode;
|
|
17
|
-
/** Scroll body. */
|
|
18
16
|
children?: ReactNode;
|
|
19
|
-
/** Pinned at the bottom. */
|
|
20
17
|
footer?: ReactNode;
|
|
21
|
-
/** Adds a right border between the rail and the panel. Default `false`. No effect in an `AppShell variant="rail"`. */
|
|
22
18
|
showDivider?: boolean;
|
|
23
|
-
/** Render the body as its single child element (for example a tabs list), with the body classes merged. */
|
|
24
19
|
bodyAsChild?: boolean;
|
|
25
|
-
/**
|
|
26
|
-
* Render the body as a Radix tabs list (arrow-key roving focus). Use it
|
|
27
|
-
* inside a Tabs root with `orientation="vertical"` and give each `RailTile`
|
|
28
|
-
* a `tabValue`. Default `false`.
|
|
29
|
-
*/
|
|
30
20
|
tabs?: boolean;
|
|
31
21
|
className?: string;
|
|
32
22
|
topClassName?: string;
|
|
@@ -72,11 +62,9 @@ export function SidebarRail({
|
|
|
72
62
|
);
|
|
73
63
|
}
|
|
74
64
|
|
|
75
|
-
/** A slot's trough hides while the slot renders nothing (the pill is then its only child). */
|
|
76
65
|
const railSlotGroupClass = "[&:not(:has(>:not([data-rail-pill])))]:hidden";
|
|
77
66
|
|
|
78
67
|
export type SidebarRailRootProps = ComponentPropsWithoutRef<"div"> & {
|
|
79
|
-
/** Adds a right border between the rail and the panel. Default `false`. */
|
|
80
68
|
showDivider?: boolean;
|
|
81
69
|
};
|
|
82
70
|
|
|
@@ -102,12 +90,7 @@ export function RailHeader({ className, ...props }: SidebarRailHeaderProps) {
|
|
|
102
90
|
}
|
|
103
91
|
|
|
104
92
|
export type SidebarRailBodyProps = ComponentPropsWithoutRef<"div"> & {
|
|
105
|
-
/** Render the body as its single child element (for example a `<nav>`), with the body classes merged. */
|
|
106
93
|
asChild?: boolean;
|
|
107
|
-
/**
|
|
108
|
-
* Render a Radix tabs list (arrow-key roving focus). Use it inside a Tabs
|
|
109
|
-
* root with `orientation="vertical"` and give each item a `tabValue`.
|
|
110
|
-
*/
|
|
111
94
|
tabs?: boolean;
|
|
112
95
|
};
|
|
113
96
|
|
|
@@ -119,7 +102,6 @@ export function RailBody({ asChild = false, tabs = false, className, ...props }:
|
|
|
119
102
|
return <Body {...props} className={bodyClass} />;
|
|
120
103
|
}
|
|
121
104
|
|
|
122
|
-
/** True inside a `RailGroup`: its tiles take the segmented fills. */
|
|
123
105
|
const RailGroupContext = createContext(false);
|
|
124
106
|
|
|
125
107
|
/** Whether the caller sits in a `Sidebar.RailGroup`. Custom rail tiles pass it to `railTileStateClass`. */
|
|
@@ -129,15 +111,8 @@ export function useInRailGroup(): boolean {
|
|
|
129
111
|
|
|
130
112
|
export type SidebarRailGroupProps = ComponentPropsWithoutRef<"div">;
|
|
131
113
|
|
|
132
|
-
/** Marks the active `RailItem`, so its group's pill can find it. */
|
|
133
114
|
const ACTIVE_TILE_SELECTOR = "[data-rail-tile][data-active]";
|
|
134
115
|
|
|
135
|
-
/**
|
|
136
|
-
* Keeps the group's pill under its active tile. The first placement and any
|
|
137
|
-
* resize snap; a change of active tile slides, as `TabsList` does. With no
|
|
138
|
-
* active tile the pill hides, and the next one snaps in rather than sliding
|
|
139
|
-
* from where the pill was last.
|
|
140
|
-
*/
|
|
141
116
|
function useRailGroupPill(groupRef: RefObject<HTMLDivElement | null>, pillRef: RefObject<HTMLSpanElement | null>) {
|
|
142
117
|
useLayoutEffect(() => {
|
|
143
118
|
const group = groupRef.current;
|
|
@@ -196,40 +171,23 @@ export function RailFooter({ className, ...props }: SidebarRailFooterProps) {
|
|
|
196
171
|
}
|
|
197
172
|
|
|
198
173
|
type SidebarRailItemBaseProps = Omit<ComponentPropsWithoutRef<"button">, "children"> & {
|
|
199
|
-
/** `aria-label`, and the tooltip unless `tooltip` is set. */
|
|
200
174
|
label: string;
|
|
201
|
-
/** Active state. With `asChild`, also sets `aria-current="page"`. */
|
|
202
175
|
active?: boolean;
|
|
203
|
-
/** Tooltip text. Default `label`. */
|
|
204
176
|
tooltip?: string;
|
|
205
|
-
/** Default `true`. */
|
|
206
177
|
showTooltip?: boolean;
|
|
207
|
-
/** Rendered after the children, inside the tile (for example a count with `railBadgeClass`). */
|
|
208
178
|
badge?: ReactNode;
|
|
209
|
-
/** Render the single child element (for example a router link) as the tile. */
|
|
210
179
|
asChild?: boolean;
|
|
211
|
-
/**
|
|
212
|
-
* Render a Radix tabs trigger for this value (inside a `SidebarRail tabs`).
|
|
213
|
-
* The label is sr-only text instead of `aria-label`; `asChild` is ignored.
|
|
214
|
-
*/
|
|
215
180
|
tabValue?: string;
|
|
216
181
|
};
|
|
217
182
|
|
|
218
183
|
export type SidebarRailItemProps = SidebarRailItemBaseProps &
|
|
219
184
|
(
|
|
220
185
|
| {
|
|
221
|
-
/**
|
|
222
|
-
* Product app id for the home tile. The tile renders `APP_ICONS[app]` at
|
|
223
|
-
* `SIDEBAR_RAIL_APP_ICON_SIZE` (24px), so apps cannot drift. With `asChild` the
|
|
224
|
-
* icon goes inside the child element (for example `<Link to="/" />`). Without
|
|
225
|
-
* `asChild`, `children` are ignored.
|
|
226
|
-
*/
|
|
227
186
|
app: ProductAppName;
|
|
228
187
|
children?: ReactNode;
|
|
229
188
|
}
|
|
230
189
|
| {
|
|
231
190
|
app?: undefined;
|
|
232
|
-
/** The tile icon. The caller controls its size. */
|
|
233
191
|
children: ReactNode;
|
|
234
192
|
}
|
|
235
193
|
);
|
|
@@ -250,7 +208,6 @@ export function RailItem({
|
|
|
250
208
|
}: SidebarRailItemProps) {
|
|
251
209
|
const grouped = use(RailGroupContext);
|
|
252
210
|
const stateClass = railTileStateClass(active, grouped);
|
|
253
|
-
// Markers for the group's pill; ungrouped tiles keep their old DOM.
|
|
254
211
|
const groupMarks = grouped ? { "data-rail-tile": "", "data-active": active ? "" : undefined } : undefined;
|
|
255
212
|
const AppIcon = app ? APP_ICONS[app] : null;
|
|
256
213
|
const appIcon = AppIcon ? <AppIcon size={SIDEBAR_RAIL_APP_ICON_SIZE} /> : null;
|
|
@@ -320,7 +277,6 @@ export function RailDivider({ className }: RailDividerProps) {
|
|
|
320
277
|
export const shellDockTileProps = { "data-shell-dock-tile": "" } as const;
|
|
321
278
|
|
|
322
279
|
export type RailCollapseTileProps = {
|
|
323
|
-
/** Panel is collapsed: shows the expand icon and "Show sidebar". */
|
|
324
280
|
collapsed: boolean;
|
|
325
281
|
onToggle: () => void;
|
|
326
282
|
};
|
|
@@ -14,12 +14,10 @@ import { rubberband } from "../../src/utils/gesture";
|
|
|
14
14
|
|
|
15
15
|
/** Opt-in resizable sidebar panel. Widths are panel px, rail excluded. */
|
|
16
16
|
export type SidebarResizeOptions = {
|
|
17
|
-
/** `localStorage` key for the panel width (a JSON number). */
|
|
18
17
|
storageKey: string;
|
|
19
18
|
defaultWidth: number;
|
|
20
19
|
minWidth: number;
|
|
21
20
|
maxWidth: number;
|
|
22
|
-
/** Handle `aria-label`. Default `"Resize sidebar"`. */
|
|
23
21
|
label?: string;
|
|
24
22
|
};
|
|
25
23
|
|
|
@@ -34,7 +32,6 @@ type SidebarResizeState = {
|
|
|
34
32
|
maxWidth: number;
|
|
35
33
|
defaultWidth: number;
|
|
36
34
|
label: string;
|
|
37
|
-
/** Latest width, readable between renders (pointer moves can outpace them). */
|
|
38
35
|
currentWidth: () => number;
|
|
39
36
|
stopAnimation: () => void;
|
|
40
37
|
startResizing: () => void;
|
|
@@ -63,7 +60,6 @@ function readStoredWidth(storageKey: string | undefined): number | null {
|
|
|
63
60
|
try {
|
|
64
61
|
const raw = window.localStorage.getItem(storageKey);
|
|
65
62
|
if (raw === null || raw.trim() === "") return null;
|
|
66
|
-
// A JSON number parses the same with Number(); anything else is NaN.
|
|
67
63
|
const value = Number(raw);
|
|
68
64
|
return Number.isFinite(value) ? value : null;
|
|
69
65
|
} catch {
|
|
@@ -75,7 +71,6 @@ function writeStoredWidth(storageKey: string, width: number) {
|
|
|
75
71
|
try {
|
|
76
72
|
window.localStorage.setItem(storageKey, JSON.stringify(width));
|
|
77
73
|
} catch {
|
|
78
|
-
// Storage full or blocked: keep the in-memory width.
|
|
79
74
|
}
|
|
80
75
|
}
|
|
81
76
|
|
|
@@ -150,7 +145,6 @@ export function useSidebarResizeContext(): SidebarResizeState | null {
|
|
|
150
145
|
}
|
|
151
146
|
|
|
152
147
|
export type AppShellResize = {
|
|
153
|
-
/** Panel width in px (rail excluded). Can sit past the bounds mid-drag. */
|
|
154
148
|
width: number;
|
|
155
149
|
setWidth: (update: WidthUpdate) => void;
|
|
156
150
|
isResizing: boolean;
|
|
@@ -2,9 +2,7 @@ import { Button } from "../../src/ui/button";
|
|
|
2
2
|
import { cn } from "../../src/utils/cn";
|
|
3
3
|
|
|
4
4
|
export type SidebarUpgradeCardProps = {
|
|
5
|
-
/** Opens the app's `PricingModal`. */
|
|
6
5
|
onUpgrade: () => void;
|
|
7
|
-
/** Narrow rail: a round "Pro" button (labelled "Upgrade to Pro") instead of the full card. Default `false`. */
|
|
8
6
|
collapsed?: boolean;
|
|
9
7
|
className?: string;
|
|
10
8
|
};
|
|
@@ -5,18 +5,12 @@ import { signOutCancelClass, signOutDescriptionClass } from "./app-shell-classes
|
|
|
5
5
|
|
|
6
6
|
export type SignOutDialogProps = {
|
|
7
7
|
open: boolean;
|
|
8
|
-
/** Not called with `false` while `pending`, so the dialog stays open during sign-out. */
|
|
9
8
|
onOpenChange: (open: boolean) => void;
|
|
10
|
-
/** Disables both buttons and shows "Signing out...". */
|
|
11
9
|
pending: boolean;
|
|
12
10
|
onConfirm: () => void | Promise<void>;
|
|
13
|
-
/** Second line under the question. */
|
|
14
11
|
description?: string;
|
|
15
|
-
/** Merged onto the dialog content after `sm:max-w-sm`. */
|
|
16
12
|
contentClassName?: string;
|
|
17
|
-
/** Legacy (still supported): dialog title and confirm button label. Default `"Sign out"`. */
|
|
18
13
|
title?: string;
|
|
19
|
-
/** Legacy (still supported): default `"Sign out of your account?"`. */
|
|
20
14
|
question?: string;
|
|
21
15
|
};
|
|
22
16
|
|
|
@@ -1,10 +1,5 @@
|
|
|
1
1
|
import { cn } from "../../src/utils/cn";
|
|
2
2
|
|
|
3
|
-
// Class strings for the app shell, copied from existing app markup so an app
|
|
4
|
-
// that moves to these components renders the same classes. The bare muted and
|
|
5
|
-
// accent colour names match that markup and are allow-listed for check:tokens
|
|
6
|
-
// on the marked lines only.
|
|
7
|
-
|
|
8
3
|
/** App icon size in px for the home `RailTile`. Fixed across the apps. `RailTile` applies it when you pass `app`. */
|
|
9
4
|
export const SIDEBAR_RAIL_APP_ICON_SIZE = 24;
|
|
10
5
|
|
|
@@ -15,10 +10,6 @@ export const railTileClass =
|
|
|
15
10
|
const railTileActiveClass = "border-transparent bg-surface-tertiary text-foreground";
|
|
16
11
|
const railTileIdleClass = "border-transparent text-muted opacity-75 hover:bg-surface-tertiary/50 hover:opacity-100 hover:text-foreground"; // check-tokens-allow: text-muted
|
|
17
12
|
|
|
18
|
-
// Inside a `RailGroup` the tiles read as segmented tabs: the trough is
|
|
19
|
-
// `--default` (the segmented bar) and the group's sliding `--segment` pill sits
|
|
20
|
-
// under the active tile, so the tile itself has no fill. Hover is the pill at
|
|
21
|
-
// half strength, as on `.t-tabs--pills`. `z-1` lifts tiles over the pill.
|
|
22
13
|
const railTileGroupActiveClass = "z-1 border-transparent bg-transparent text-segment-foreground";
|
|
23
14
|
const railTileGroupIdleClass = "z-1 border-transparent text-muted opacity-75 hover:bg-segment/50 hover:opacity-100 hover:text-foreground"; // check-tokens-allow: text-muted
|
|
24
15
|
|
|
@@ -74,19 +65,13 @@ export function sidebarNavRowClass(isIconOnly: boolean): string {
|
|
|
74
65
|
}
|
|
75
66
|
|
|
76
67
|
export type SidebarNavItemClassOptions = {
|
|
77
|
-
/** Current route. */
|
|
78
68
|
active?: boolean;
|
|
79
|
-
/** Collapsed panel: centred icon, no horizontal padding. */
|
|
80
69
|
iconOnly?: boolean;
|
|
81
|
-
/** Picked (for example in a multi-select list): the active fill, without `font-medium`. Same as `data-selected="true"`. */
|
|
82
70
|
selected?: boolean;
|
|
83
|
-
/** Row being dragged: `opacity-40 cursor-grabbing`. Same as `data-dragging="true"`. */
|
|
84
71
|
dragging?: boolean;
|
|
85
|
-
/** Row under a drag: fill plus an inset `ring-focus` ring. Same as `data-drop-target="true"`. */
|
|
86
72
|
dropTarget?: boolean;
|
|
87
73
|
};
|
|
88
74
|
|
|
89
|
-
// Row states an app can also set as data attributes on the row itself.
|
|
90
75
|
const sidebarNavItemDataStateClass =
|
|
91
76
|
"data-[selected=true]:bg-sidebar-accent data-[selected=true]:text-foreground data-[dragging=true]:cursor-grabbing data-[dragging=true]:opacity-40 data-[drop-target=true]:bg-sidebar-accent data-[drop-target=true]:text-foreground data-[drop-target=true]:ring-2 data-[drop-target=true]:ring-inset data-[drop-target=true]:ring-focus";
|
|
92
77
|
|
package/shell/src/index.ts
CHANGED
|
@@ -41,7 +41,6 @@ export type {
|
|
|
41
41
|
} from "./SidePanelTabs.js";
|
|
42
42
|
export { AppSidebar } from "./AppSidebar.js";
|
|
43
43
|
export type { AppSidebarProps } from "./AppSidebar.js";
|
|
44
|
-
// Composable sidebar parts (`Sidebar.Root`, `Sidebar.Rail`, ...) and their prop types.
|
|
45
44
|
export * from "./Sidebar.js";
|
|
46
45
|
export { SidebarRail, RailTile, RailDivider, RailCollapseTile, shellDockTileProps, useInRailGroup } from "./SidebarRail.js";
|
|
47
46
|
export type { SidebarRailProps, RailTileProps, RailDividerProps, RailCollapseTileProps } from "./SidebarRail.js";
|
|
@@ -1,13 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Dock motion of the sidebar panel in an `AppShell variant="rail"`, on hide
|
|
3
|
-
* and show only: the panel shrinks into the rail's collapse tile and grows
|
|
4
|
-
* back out of it. `Sidebar.Panel` marks the panel and `RailCollapseTile` the
|
|
5
|
-
* tile (`shellDockTileProps` for a tile of your own). The main content slides
|
|
6
|
-
* its margin with the aside's width, so it does not jump.
|
|
7
|
-
*
|
|
8
|
-
* Off with `MotionProvider reducedMotion` and `PageMotionProvider disabled`
|
|
9
|
-
* (`dockMotionOff`), and outside the rail variant: the toggle runs at once.
|
|
10
|
-
*/
|
|
11
1
|
import { dockPopIn, dockPopOut, slideWith } from "../../src/motion/dock-motion";
|
|
12
2
|
|
|
13
3
|
function dockPanel(): HTMLElement | null {
|
|
@@ -20,7 +10,6 @@ function dockTile(): HTMLElement | null {
|
|
|
20
10
|
return document.querySelector<HTMLElement>("[data-shell-dock-tile]");
|
|
21
11
|
}
|
|
22
12
|
|
|
23
|
-
/** The page beside the shell aside: its left margin follows the aside. */
|
|
24
13
|
function slideMainWithAside() {
|
|
25
14
|
const tile = dockTile();
|
|
26
15
|
if (!tile) return;
|
|
@@ -17,17 +17,11 @@ export type AppShellPanelMotion = "dock" | "none";
|
|
|
17
17
|
*/
|
|
18
18
|
export type AppShellVariantProps =
|
|
19
19
|
| {
|
|
20
|
-
/** Default `"floating"`. */
|
|
21
20
|
variant?: "floating";
|
|
22
21
|
panelMotion?: never;
|
|
23
22
|
}
|
|
24
23
|
| {
|
|
25
24
|
variant: "rail";
|
|
26
|
-
/**
|
|
27
|
-
* Rail only. `"dock"` (default): `RailCollapseTile` shrinks the panel
|
|
28
|
-
* into the tile on hide and grows it back out on show. `"none"`: the
|
|
29
|
-
* panel shows and hides at once.
|
|
30
|
-
*/
|
|
31
25
|
panelMotion?: AppShellPanelMotion;
|
|
32
26
|
};
|
|
33
27
|
|
|
@@ -100,8 +100,6 @@ export function ActivityQuestionCard({
|
|
|
100
100
|
<div
|
|
101
101
|
className={merge(
|
|
102
102
|
"flex items-center justify-between gap-2",
|
|
103
|
-
// The action row's 28px buttons set the height, so the header keeps
|
|
104
|
-
// clear of the question text below.
|
|
105
103
|
headerAction ? "min-h-7" : undefined,
|
|
106
104
|
)}
|
|
107
105
|
>
|
|
@@ -24,12 +24,8 @@ import { useEffect, useState, useSyncExternalStore } from "react";
|
|
|
24
24
|
|
|
25
25
|
import { quantizedSnapshot, subscribeQuantized } from "../utils/sharedClock";
|
|
26
26
|
|
|
27
|
-
/** Props the activity timeline passes to its Markdown renderer. */
|
|
28
|
-
// A type alias, not an interface: streamdown 2.7.1 gave its props a
|
|
29
|
-
// `data-*` index signature, and only an alias is assignable to that.
|
|
30
27
|
export type ActivityMarkdownProps = {
|
|
31
28
|
className?: string;
|
|
32
|
-
/** `streaming` while the text is still arriving. */
|
|
33
29
|
mode?: "static" | "streaming";
|
|
34
30
|
children: string;
|
|
35
31
|
};
|
|
@@ -39,14 +35,8 @@ export type ActivityMarkdownProps = {
|
|
|
39
35
|
* (`ActivityTasks`, `ActivityThinkingIcon`).
|
|
40
36
|
*/
|
|
41
37
|
export interface ActivityTasksConfig {
|
|
42
|
-
/** Agent name in the streaming header ("<name> is thinking..."). Default "Agent"; the `name` prop wins. */
|
|
43
38
|
name?: string;
|
|
44
|
-
/** Renders reasoning and mid-turn reply text. Default: the package `Markdown` (smooth streaming). */
|
|
45
39
|
markdown?: ComponentType<ActivityMarkdownProps>;
|
|
46
|
-
/**
|
|
47
|
-
* An image for `ActivityThinkingIcon` (for example the app's logo mark),
|
|
48
|
-
* shown 16px and round. Without it the icon is the brain glyph.
|
|
49
|
-
*/
|
|
50
40
|
thinkingIcon?: { src: string; alt: string };
|
|
51
41
|
}
|
|
52
42
|
|
|
@@ -68,7 +58,6 @@ export function ActivityThinkingIcon({ className }: { className?: string }) {
|
|
|
68
58
|
);
|
|
69
59
|
}
|
|
70
60
|
|
|
71
|
-
/** The `status` step glyph: the `circle` {@link Spinner}. */
|
|
72
61
|
function ActivityStatusSpinner() {
|
|
73
62
|
return <Spinner variant="circle" />;
|
|
74
63
|
}
|
|
@@ -30,8 +30,6 @@ export function ActivityStepDetail({
|
|
|
30
30
|
.join("\n\n")
|
|
31
31
|
: "";
|
|
32
32
|
|
|
33
|
-
// The transcript query strips output/edits/preview; until the full payload
|
|
34
|
-
// lands there is genuinely nothing to show but the command that produced it.
|
|
35
33
|
const awaitingDetail =
|
|
36
34
|
step.hasHiddenDetail === true &&
|
|
37
35
|
!step.output &&
|