@vvedantb/ui 0.66.0 → 0.69.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/SidebarAccountMenu.js +1 -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 +3 -9
- 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 +2 -16
- package/dist/src/ai-elements/shimmer.js +0 -14
- package/dist/src/ai-elements/speech-input.js +0 -7
- package/dist/src/artifacts/artifact-card.js +1 -1
- package/dist/src/artifacts/artifact-frame.js +0 -2
- package/dist/src/artifacts/artifact-viewer.js +2 -1
- 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 +6 -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/context-menu.js +40 -34
- 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/dropdown-menu.js +40 -34
- 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 +3 -3
- 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 +1 -41
- 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/__snapshots__/queue.test.tsx.snap +2 -2
- 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 +3 -34
- 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 +2 -20
- 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 +1 -8
- 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 +2 -6
- 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 +7 -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 +4 -11
- 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 +4 -12
- 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
package/src/ui/context-menu.tsx
CHANGED
|
@@ -9,6 +9,7 @@ import {
|
|
|
9
9
|
menuCheckboxRadioItemClass,
|
|
10
10
|
menuContentClass,
|
|
11
11
|
menuItemClass,
|
|
12
|
+
menuItemDestructiveClass,
|
|
12
13
|
menuLabelClass,
|
|
13
14
|
menuSeparatorClass,
|
|
14
15
|
menuShortcutClass,
|
|
@@ -24,7 +25,6 @@ import { useCn, useUiConfig } from "./ui-config";
|
|
|
24
25
|
|
|
25
26
|
/** App defaults for `ContextMenu*` (see `UiConfigProvider`). */
|
|
26
27
|
export interface ContextMenuConfig extends MenuConfig {
|
|
27
|
-
/** Default for `ContextMenuSubContent` `portal` (built-in: `true`). */
|
|
28
28
|
subContentPortal?: boolean;
|
|
29
29
|
}
|
|
30
30
|
|
|
@@ -35,8 +35,6 @@ const ContextMenuTrigger = React.forwardRef<
|
|
|
35
35
|
>((props, ref) => {
|
|
36
36
|
const trigger = useUiConfig("ContextMenu")?.classes?.trigger;
|
|
37
37
|
const merge = useCn();
|
|
38
|
-
// Without config, pass props untouched: Radix's Slot turns an explicit
|
|
39
|
-
// `className={undefined}` into `class=""`.
|
|
40
38
|
if (trigger === undefined) return <ContextMenuPrimitive.Trigger ref={ref} {...props} />;
|
|
41
39
|
const { className, ...rest } = props;
|
|
42
40
|
return <ContextMenuPrimitive.Trigger ref={ref} className={merge(trigger, className)} {...rest} />;
|
|
@@ -51,7 +49,6 @@ const ContextMenuSubTrigger = React.forwardRef<
|
|
|
51
49
|
React.ComponentRef<typeof ContextMenuPrimitive.SubTrigger>,
|
|
52
50
|
React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.SubTrigger> & {
|
|
53
51
|
inset?: boolean;
|
|
54
|
-
/** Leading icon or mark. The label then fills the row. */
|
|
55
52
|
startContent?: React.ReactNode;
|
|
56
53
|
}
|
|
57
54
|
>(({ className, inset, startContent, children, ...props }, ref) => {
|
|
@@ -75,7 +72,6 @@ ContextMenuSubTrigger.displayName = ContextMenuPrimitive.SubTrigger.displayName;
|
|
|
75
72
|
const ContextMenuSubContent = React.forwardRef<
|
|
76
73
|
React.ComponentRef<typeof ContextMenuPrimitive.SubContent>,
|
|
77
74
|
React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.SubContent> & {
|
|
78
|
-
/** Render into `document.body` so a clipping parent cannot cut it off. */
|
|
79
75
|
portal?: boolean;
|
|
80
76
|
}
|
|
81
77
|
>(({ className, portal, ...props }, ref) => {
|
|
@@ -99,7 +95,6 @@ ContextMenuSubContent.displayName = ContextMenuPrimitive.SubContent.displayName;
|
|
|
99
95
|
const ContextMenuContent = React.forwardRef<
|
|
100
96
|
React.ComponentRef<typeof ContextMenuPrimitive.Content>,
|
|
101
97
|
React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.Content> & {
|
|
102
|
-
/** Stop a bare Alt press from moving focus (e.g. into the browser menu bar). */
|
|
103
98
|
suppressAltKey?: boolean;
|
|
104
99
|
}
|
|
105
100
|
>(({ className, suppressAltKey, collisionPadding, onKeyDown, ...props }, ref) => {
|
|
@@ -123,16 +118,14 @@ const ContextMenuItem = React.forwardRef<
|
|
|
123
118
|
React.ComponentRef<typeof ContextMenuPrimitive.Item>,
|
|
124
119
|
React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.Item> & {
|
|
125
120
|
inset?: boolean;
|
|
126
|
-
|
|
121
|
+
variant?: "default" | "destructive";
|
|
127
122
|
startContent?: React.ReactNode;
|
|
128
|
-
/** Second line under the label. Ignored with `asChild`. */
|
|
129
123
|
description?: React.ReactNode;
|
|
130
|
-
/** Trailing content. Ignored with `asChild`. */
|
|
131
124
|
endContent?: React.ReactNode;
|
|
132
125
|
}
|
|
133
126
|
>(
|
|
134
127
|
(
|
|
135
|
-
{ className, inset, startContent, description, endContent, children, asChild, ...props },
|
|
128
|
+
{ className, inset, variant, startContent, description, endContent, children, asChild, ...props },
|
|
136
129
|
ref,
|
|
137
130
|
) => {
|
|
138
131
|
const item = useUiConfig("ContextMenu")?.classes?.item;
|
|
@@ -141,7 +134,7 @@ const ContextMenuItem = React.forwardRef<
|
|
|
141
134
|
<ContextMenuPrimitive.Item
|
|
142
135
|
ref={ref}
|
|
143
136
|
asChild={asChild}
|
|
144
|
-
className={merge(item ?? menuItemClass, inset && "pl-8", className)}
|
|
137
|
+
className={merge(item ?? menuItemClass, inset && "pl-8", variant === "destructive" && menuItemDestructiveClass, className)}
|
|
145
138
|
{...props}
|
|
146
139
|
>
|
|
147
140
|
{asChild || (startContent === undefined && description === undefined && endContent === undefined) ? (
|
package/src/ui/count-pop.tsx
CHANGED
|
@@ -20,10 +20,8 @@ export function CountPop({
|
|
|
20
20
|
className,
|
|
21
21
|
children,
|
|
22
22
|
}: {
|
|
23
|
-
/** Rendered content, and the remount key. `null` renders nothing. */
|
|
24
23
|
label: string | null;
|
|
25
24
|
className?: string;
|
|
26
|
-
/** Defaults to `label`; pass children for a badge with more than a number. */
|
|
27
25
|
children?: ReactNode;
|
|
28
26
|
}) {
|
|
29
27
|
return (
|
|
@@ -20,7 +20,6 @@ const DEFAULT_ICON_MOTION = {
|
|
|
20
20
|
transition: DEFAULT_TRANSITION,
|
|
21
21
|
};
|
|
22
22
|
|
|
23
|
-
/** Near-imperceptible swap for high-frequency toggles (150ms, no blur). */
|
|
24
23
|
const SOFT_ICON_MOTION = {
|
|
25
24
|
initial: { scale: 0.96, opacity: 0 },
|
|
26
25
|
animate: { scale: 1, opacity: 1 },
|
|
@@ -35,7 +34,6 @@ interface CrossfadeIconProps {
|
|
|
35
34
|
trueKey?: string;
|
|
36
35
|
falseKey?: string;
|
|
37
36
|
className?: string;
|
|
38
|
-
/** `soft` = opacity + scale(0.96→1), no blur — for tens/day toggles. */
|
|
39
37
|
variant?: "default" | "soft";
|
|
40
38
|
}
|
|
41
39
|
|
|
@@ -96,7 +94,6 @@ export function CrossfadeIconSlot({
|
|
|
96
94
|
className = "relative flex size-4 items-center justify-center",
|
|
97
95
|
variant = "soft",
|
|
98
96
|
}: {
|
|
99
|
-
/** Identity of the icon currently shown; a change triggers the swap. */
|
|
100
97
|
iconKey: string;
|
|
101
98
|
children: ReactNode;
|
|
102
99
|
className?: string;
|
package/src/ui/date-picker.tsx
CHANGED
|
@@ -20,28 +20,18 @@ import { Calendar } from "./calendar";
|
|
|
20
20
|
import { Popover, PopoverContent, PopoverTrigger } from "./popover";
|
|
21
21
|
import { TimePicker } from "./time-picker";
|
|
22
22
|
|
|
23
|
-
// controlled replacements for `<input type="date">`, `"datetime-local"` and
|
|
24
|
-
// `"month">`: the values are the native strings ("YYYY-MM-DD",
|
|
25
|
-
// "YYYY-MM-DDTHH:mm", "YYYY-MM", "" when empty), read and written as local
|
|
26
|
-
// calendar dates. there is no timezone logic; like TimePicker, the consumer
|
|
27
|
-
// owns any local↔utc conversion
|
|
28
|
-
|
|
29
23
|
const DATE_RE = /^(\d{4})-(\d{2})-(\d{2})$/;
|
|
30
24
|
const MONTH_RE = /^(\d{4})-(\d{2})$/;
|
|
31
25
|
const DATE_TIME_RE = /^(\d{4}-\d{2}-\d{2})T(\d{2}:\d{2})$/;
|
|
32
26
|
|
|
33
27
|
const pad = (n: number, width = 2) => String(n).padStart(width, "0");
|
|
34
28
|
|
|
35
|
-
// "YYYY-MM-DD" -> local midnight, or undefined for "" and invalid dates
|
|
36
|
-
// (2025-02-30). never `new Date("YYYY-MM-DD")`, which parses as utc midnight
|
|
37
|
-
// and lands on the previous day west of greenwich
|
|
38
29
|
function parseDateValue(value: string): Date | undefined {
|
|
39
30
|
const match = DATE_RE.exec(value);
|
|
40
31
|
if (!match) return undefined;
|
|
41
32
|
const year = Number(match[1]);
|
|
42
33
|
const month = Number(match[2]) - 1;
|
|
43
34
|
const day = Number(match[3]);
|
|
44
|
-
// setFullYear keeps years 0-99 literal (the Date constructor maps them to 19xx)
|
|
45
35
|
const date = new Date(2000, 0, 1);
|
|
46
36
|
date.setFullYear(year, month, day);
|
|
47
37
|
if (
|
|
@@ -54,7 +44,6 @@ function parseDateValue(value: string): Date | undefined {
|
|
|
54
44
|
return date;
|
|
55
45
|
}
|
|
56
46
|
|
|
57
|
-
// local calendar date -> "YYYY-MM-DD" ("" for an invalid date)
|
|
58
47
|
function formatDateValue(date: Date): string {
|
|
59
48
|
if (Number.isNaN(date.getTime())) return "";
|
|
60
49
|
return `${pad(date.getFullYear(), 4)}-${pad(date.getMonth() + 1)}-${pad(date.getDate())}`;
|
|
@@ -80,11 +69,6 @@ function localDate(year: number, month: number): Date {
|
|
|
80
69
|
return date;
|
|
81
70
|
}
|
|
82
71
|
|
|
83
|
-
// wrapper, input-styled trigger, optional clear control and hidden input
|
|
84
|
-
// shared by DatePicker and MonthPicker. the clear control is a sibling of the
|
|
85
|
-
// trigger (buttons cannot nest), overlaid inside the field on the right, and
|
|
86
|
-
// hands focus back to the trigger. the trigger grows with the wrapper, so a
|
|
87
|
-
// width on either `className` or `triggerClassName` sizes the field
|
|
88
72
|
interface PickerFieldProps {
|
|
89
73
|
triggerRef: React.Ref<HTMLButtonElement>;
|
|
90
74
|
open: boolean;
|
|
@@ -182,27 +166,18 @@ function PickerField({
|
|
|
182
166
|
}
|
|
183
167
|
|
|
184
168
|
interface DatePickerProps {
|
|
185
|
-
// "YYYY-MM-DD" or "" (what `<input type="date">` uses)
|
|
186
169
|
value: string;
|
|
187
170
|
onChange: (value: string) => void;
|
|
188
|
-
// "YYYY-MM-DD"; days outside the range are disabled
|
|
189
171
|
min?: string;
|
|
190
172
|
max?: string;
|
|
191
173
|
placeholder?: string;
|
|
192
174
|
disabled?: boolean;
|
|
193
|
-
// names the trigger; the shown date or placeholder is appended
|
|
194
175
|
ariaLabel?: string;
|
|
195
|
-
// the wrapper (trigger plus clear control)
|
|
196
176
|
className?: string;
|
|
197
|
-
// merged onto the trigger (default width `w-40`); `w-full`, height, radius,
|
|
198
|
-
// padding and text size override cleanly
|
|
199
177
|
triggerClassName?: string;
|
|
200
|
-
// shows a clear control that calls `onChange("")`
|
|
201
178
|
clearable?: boolean;
|
|
202
|
-
// BCP 47 locale for the trigger text (default: the runtime's)
|
|
203
179
|
locale?: string;
|
|
204
180
|
id?: string;
|
|
205
|
-
// renders a hidden input with `value` so forms still submit it
|
|
206
181
|
name?: string;
|
|
207
182
|
}
|
|
208
183
|
|
|
@@ -280,25 +255,16 @@ const DatePicker = React.forwardRef<HTMLButtonElement, DatePickerProps>(
|
|
|
280
255
|
DatePicker.displayName = "DatePicker";
|
|
281
256
|
|
|
282
257
|
interface DateTimePickerProps {
|
|
283
|
-
// "YYYY-MM-DDTHH:mm" or "" (what `<input type="datetime-local">` uses)
|
|
284
258
|
value: string;
|
|
285
259
|
onChange: (value: string) => void;
|
|
286
|
-
// "YYYY-MM-DDTHH:mm"; only the date part limits the calendar
|
|
287
260
|
min?: string;
|
|
288
261
|
max?: string;
|
|
289
|
-
// time used when a date is picked before any time (default "00:00")
|
|
290
262
|
defaultTime?: string;
|
|
291
263
|
disabled?: boolean;
|
|
292
|
-
// names both triggers ("<label>, date" and "<label>, time")
|
|
293
264
|
ariaLabel?: string;
|
|
294
|
-
// the row; a width here (`w-full`) grows the date field, the time keeps 110px
|
|
295
265
|
className?: string;
|
|
296
|
-
// merged onto both triggers (height, radius, padding, text size); a width
|
|
297
|
-
// applies to the date trigger only, the time keeps 110px
|
|
298
266
|
triggerClassName?: string;
|
|
299
|
-
// on the date trigger
|
|
300
267
|
id?: string;
|
|
301
|
-
// renders a hidden input with the combined value
|
|
302
268
|
name?: string;
|
|
303
269
|
locale?: string;
|
|
304
270
|
}
|
|
@@ -362,17 +328,14 @@ const DateTimePicker = React.forwardRef<HTMLButtonElement, DateTimePickerProps>(
|
|
|
362
328
|
DateTimePicker.displayName = "DateTimePicker";
|
|
363
329
|
|
|
364
330
|
interface MonthPickerProps {
|
|
365
|
-
// "YYYY-MM" or "" (what `<input type="month">` uses)
|
|
366
331
|
value: string;
|
|
367
332
|
onChange: (value: string) => void;
|
|
368
|
-
// "YYYY-MM"; months outside the range are disabled
|
|
369
333
|
min?: string;
|
|
370
334
|
max?: string;
|
|
371
335
|
placeholder?: string;
|
|
372
336
|
disabled?: boolean;
|
|
373
337
|
ariaLabel?: string;
|
|
374
338
|
className?: string;
|
|
375
|
-
// merged onto the trigger, as on DatePicker
|
|
376
339
|
triggerClassName?: string;
|
|
377
340
|
clearable?: boolean;
|
|
378
341
|
locale?: string;
|
|
@@ -454,8 +417,6 @@ interface MonthGridProps {
|
|
|
454
417
|
onSelect: (value: string) => void;
|
|
455
418
|
}
|
|
456
419
|
|
|
457
|
-
// mounted only while the popover is open, so the shown year starts at the
|
|
458
|
-
// selected one (else the current year, kept inside min/max) on every open
|
|
459
420
|
function MonthGrid({ value, min, max, locale, onSelect }: MonthGridProps) {
|
|
460
421
|
const minYear = parseMonthValue(min ?? "")?.year;
|
|
461
422
|
const maxYear = parseMonthValue(max ?? "")?.year;
|
|
@@ -506,7 +467,6 @@ function MonthGrid({ value, min, max, locale, onSelect }: MonthGridProps) {
|
|
|
506
467
|
const monthValue = formatMonthValue(year, month);
|
|
507
468
|
const date = localDate(year, month);
|
|
508
469
|
const isSelected = monthValue === value;
|
|
509
|
-
// "YYYY-MM" strings compare in calendar order
|
|
510
470
|
const outOfRange =
|
|
511
471
|
(!!min && monthValue < min) || (!!max && monthValue > max);
|
|
512
472
|
return (
|
package/src/ui/dialog.tsx
CHANGED
|
@@ -15,15 +15,11 @@ import { useCn, useUiConfig } from "./ui-config";
|
|
|
15
15
|
|
|
16
16
|
/** App defaults for `Dialog*` (see `UiConfigProvider`). */
|
|
17
17
|
export interface DialogConfig {
|
|
18
|
-
/** Replaces the built-in classes of a part. */
|
|
19
18
|
classes?: {
|
|
20
19
|
trigger?: string;
|
|
21
20
|
overlay?: string;
|
|
22
|
-
/** Content classes shared by both layouts. */
|
|
23
21
|
content?: string;
|
|
24
|
-
/** Content layout classes for the centred dialog. */
|
|
25
22
|
centered?: string;
|
|
26
|
-
/** Content layout classes for the compact bottom sheet. */
|
|
27
23
|
compact?: string;
|
|
28
24
|
close?: string;
|
|
29
25
|
header?: string;
|
|
@@ -32,7 +28,6 @@ export interface DialogConfig {
|
|
|
32
28
|
title?: string;
|
|
33
29
|
description?: string;
|
|
34
30
|
};
|
|
35
|
-
/** Default for `DialogContent` `viewportAware`. */
|
|
36
31
|
viewportAware?: boolean;
|
|
37
32
|
}
|
|
38
33
|
|
|
@@ -46,8 +41,6 @@ const DialogTrigger = React.forwardRef<
|
|
|
46
41
|
>((props, ref) => {
|
|
47
42
|
const trigger = useUiConfig("Dialog")?.classes?.trigger;
|
|
48
43
|
const merge = useCn();
|
|
49
|
-
// Without config, pass props untouched: Radix's Slot turns an explicit
|
|
50
|
-
// `className={undefined}` into `class=""`.
|
|
51
44
|
if (trigger === undefined) return <DialogPrimitive.Trigger ref={ref} {...props} />;
|
|
52
45
|
const { className, ...rest } = props;
|
|
53
46
|
return <DialogPrimitive.Trigger ref={ref} className={merge(trigger, className)} {...rest} />;
|
|
@@ -82,13 +75,7 @@ const DialogContent = React.forwardRef<
|
|
|
82
75
|
React.ComponentRef<typeof DialogPrimitive.Content>,
|
|
83
76
|
React.ComponentPropsWithoutRef<typeof DialogPrimitive.Content> & {
|
|
84
77
|
hideCloseButton?: boolean;
|
|
85
|
-
/**
|
|
86
|
-
* Bottom sheet on compact viewports, visual-viewport sizing, keyboard-aware
|
|
87
|
-
* scrolling and the body pointer-events fix. Default `true`. `false` keeps a
|
|
88
|
-
* centred dialog at every size and leaves the viewport and body alone.
|
|
89
|
-
*/
|
|
90
78
|
viewportAware?: boolean;
|
|
91
|
-
/** Merged onto the `DialogOverlay`, for example to drop its fade. */
|
|
92
79
|
overlayClassName?: string;
|
|
93
80
|
}
|
|
94
81
|
>(
|
|
@@ -283,10 +270,6 @@ const DialogBody = ({
|
|
|
283
270
|
};
|
|
284
271
|
DialogBody.displayName = "DialogBody";
|
|
285
272
|
|
|
286
|
-
// no fill of its own: the footer is not sticky, so it shows the content's
|
|
287
|
-
// surface. a token here (it was `bg-overlay`) showed as an inset block when
|
|
288
|
-
// that surface differs (an app's own `glass-panel-strong`, or `bg-*` on the
|
|
289
|
-
// content)
|
|
290
273
|
const DialogFooter = ({
|
|
291
274
|
className,
|
|
292
275
|
...props
|
|
@@ -340,7 +323,6 @@ const DialogDescription = React.forwardRef<
|
|
|
340
323
|
ref={ref}
|
|
341
324
|
className={merge(
|
|
342
325
|
description ??
|
|
343
|
-
// `--muted` is ~3.5:1 on overlay; mix toward overlay-foreground for 4.5:1.
|
|
344
326
|
"text-sm leading-relaxed text-[color-mix(in_oklch,var(--color-popover-foreground,var(--overlay-foreground))_72%,var(--color-popover,var(--overlay)))]",
|
|
345
327
|
className,
|
|
346
328
|
)}
|
package/src/ui/dropdown-menu.tsx
CHANGED
|
@@ -9,6 +9,7 @@ import {
|
|
|
9
9
|
menuCheckboxRadioItemClass,
|
|
10
10
|
menuContentClass,
|
|
11
11
|
menuItemClass,
|
|
12
|
+
menuItemDestructiveClass,
|
|
12
13
|
menuLabelClass,
|
|
13
14
|
menuSeparatorClass,
|
|
14
15
|
menuShortcutClass,
|
|
@@ -26,7 +27,6 @@ import { useCn, useUiConfig } from "./ui-config";
|
|
|
26
27
|
|
|
27
28
|
/** App defaults for `DropdownMenu*` (see `UiConfigProvider`). */
|
|
28
29
|
export interface DropdownMenuConfig extends MenuConfig {
|
|
29
|
-
/** Default for `DropdownMenuContent` `sideOffset`. */
|
|
30
30
|
sideOffset?: number;
|
|
31
31
|
}
|
|
32
32
|
|
|
@@ -38,8 +38,6 @@ const DropdownMenuTrigger = React.forwardRef<
|
|
|
38
38
|
>((props, ref) => {
|
|
39
39
|
const trigger = useUiConfig("DropdownMenu")?.classes?.trigger;
|
|
40
40
|
const merge = useCn();
|
|
41
|
-
// Without config, pass props untouched: Radix's Slot turns an explicit
|
|
42
|
-
// `className={undefined}` into `class=""`.
|
|
43
41
|
if (trigger === undefined) return <DropdownMenuPrimitive.Trigger ref={ref} {...props} />;
|
|
44
42
|
const { className, ...rest } = props;
|
|
45
43
|
return <DropdownMenuPrimitive.Trigger ref={ref} className={merge(trigger, className)} {...rest} />;
|
|
@@ -54,7 +52,6 @@ const DropdownMenuSubTrigger = React.forwardRef<
|
|
|
54
52
|
React.ComponentRef<typeof DropdownMenuPrimitive.SubTrigger>,
|
|
55
53
|
React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.SubTrigger> & {
|
|
56
54
|
inset?: boolean;
|
|
57
|
-
/** Leading icon or mark. The label then fills the row. */
|
|
58
55
|
startContent?: React.ReactNode;
|
|
59
56
|
}
|
|
60
57
|
>(({ className, inset, startContent, children, ...props }, ref) => {
|
|
@@ -98,11 +95,8 @@ DropdownMenuSubContent.displayName =
|
|
|
98
95
|
const DropdownMenuContent = React.forwardRef<
|
|
99
96
|
React.ComponentRef<typeof DropdownMenuPrimitive.Content>,
|
|
100
97
|
React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Content> & {
|
|
101
|
-
/** On small screens, cap the height to the viewport and scroll. */
|
|
102
98
|
fitViewport?: boolean;
|
|
103
|
-
/** Stop a bare Alt press from moving focus (e.g. into the browser menu bar). */
|
|
104
99
|
suppressAltKey?: boolean;
|
|
105
|
-
/** On close, clear any body scroll lock left behind when no dialog is open. */
|
|
106
100
|
restoreScrollLockOnClose?: boolean;
|
|
107
101
|
}
|
|
108
102
|
>(
|
|
@@ -155,16 +149,14 @@ const DropdownMenuItem = React.forwardRef<
|
|
|
155
149
|
React.ComponentRef<typeof DropdownMenuPrimitive.Item>,
|
|
156
150
|
React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Item> & {
|
|
157
151
|
inset?: boolean;
|
|
158
|
-
|
|
152
|
+
variant?: "default" | "destructive";
|
|
159
153
|
startContent?: React.ReactNode;
|
|
160
|
-
/** Second line under the label. Ignored with `asChild`. */
|
|
161
154
|
description?: React.ReactNode;
|
|
162
|
-
/** Trailing content. The label then fills the row. Ignored with `asChild`. */
|
|
163
155
|
endContent?: React.ReactNode;
|
|
164
156
|
}
|
|
165
157
|
>(
|
|
166
158
|
(
|
|
167
|
-
{ className, inset, startContent, description, endContent, children, asChild, ...props },
|
|
159
|
+
{ className, inset, variant, startContent, description, endContent, children, asChild, ...props },
|
|
168
160
|
ref,
|
|
169
161
|
) => {
|
|
170
162
|
const item = useUiConfig("DropdownMenu")?.classes?.item;
|
|
@@ -173,7 +165,7 @@ const DropdownMenuItem = React.forwardRef<
|
|
|
173
165
|
<DropdownMenuPrimitive.Item
|
|
174
166
|
ref={ref}
|
|
175
167
|
asChild={asChild}
|
|
176
|
-
className={merge(item ?? menuItemClass, inset && "pl-8", className)}
|
|
168
|
+
className={merge(item ?? menuItemClass, inset && "pl-8", variant === "destructive" && menuItemDestructiveClass, className)}
|
|
177
169
|
{...props}
|
|
178
170
|
>
|
|
179
171
|
{asChild || (startContent === undefined && description === undefined && endContent === undefined) ? (
|
package/src/ui/empty-state.tsx
CHANGED
|
@@ -5,8 +5,6 @@ import { motionEase } from "../motion/presets";
|
|
|
5
5
|
import { useUiConfig } from "./ui-config";
|
|
6
6
|
import { cn } from "../utils/cn";
|
|
7
7
|
|
|
8
|
-
// `default`: open centred block, large bare icon, one muted line (a page or list body).
|
|
9
|
-
// `panel`: filled rounded block with the icon in a tile (a detail panel or modal section).
|
|
10
8
|
export type EmptyStateVariant = "default" | "panel";
|
|
11
9
|
|
|
12
10
|
/**
|
|
@@ -43,13 +41,7 @@ const ITEM_VARIANTS: Variants = {
|
|
|
43
41
|
};
|
|
44
42
|
|
|
45
43
|
export type EmptyStateRootProps = React.ComponentProps<"div"> & {
|
|
46
|
-
/** Layout for the other parts. Default `"default"`. */
|
|
47
44
|
variant?: EmptyStateVariant;
|
|
48
|
-
/**
|
|
49
|
-
* Parts rise and fade in one after another. Default `UiConfig.EmptyState.enter`,
|
|
50
|
-
* else `false`. Pass `false` for an empty state that flashes often (a filter
|
|
51
|
-
* with no results). Uses `m`, so it needs `LazyMotion`.
|
|
52
|
-
*/
|
|
53
45
|
enter?: boolean;
|
|
54
46
|
};
|
|
55
47
|
|
|
@@ -80,7 +72,6 @@ function Root({ variant = "default", enter: enterProp, className, ...props }: Em
|
|
|
80
72
|
}
|
|
81
73
|
Root.displayName = "EmptyState.Root";
|
|
82
74
|
|
|
83
|
-
// The DOM drag and animation handlers clash with Motion's own prop types.
|
|
84
75
|
function stripMotionConflicts(props: React.ComponentProps<"div">) {
|
|
85
76
|
const {
|
|
86
77
|
onDrag: _onDrag,
|
|
@@ -92,19 +83,14 @@ function stripMotionConflicts(props: React.ComponentProps<"div">) {
|
|
|
92
83
|
return rest;
|
|
93
84
|
}
|
|
94
85
|
|
|
95
|
-
/** A part's own element: `m.*` with the item variants while the Root enters. */
|
|
96
86
|
function useItemMotion() {
|
|
97
87
|
return React.use(EmptyStateContext).enter ? { variants: ITEM_VARIANTS } : null;
|
|
98
88
|
}
|
|
99
89
|
|
|
100
90
|
export type EmptyStateIconProps = {
|
|
101
|
-
/** Icon component, e.g. a Tabler icon. */
|
|
102
91
|
icon: React.ComponentType<{ size?: number | string; stroke?: number | string; className?: string }>;
|
|
103
|
-
/** Pixel size. Default 40 (`default`) or 22 (`panel`). */
|
|
104
92
|
size?: number;
|
|
105
|
-
/** Stroke width. Default the icon's own (`default`) or 1.5 (`panel`). */
|
|
106
93
|
stroke?: number;
|
|
107
|
-
/** Classes for the outer element: the icon (`default`) or its tile (`panel`). */
|
|
108
94
|
className?: string;
|
|
109
95
|
};
|
|
110
96
|
|
|
@@ -150,7 +136,6 @@ function Icon({ icon: IconComponent, size, stroke, className }: EmptyStateIconPr
|
|
|
150
136
|
Icon.displayName = "EmptyState.Icon";
|
|
151
137
|
|
|
152
138
|
export type EmptyStateTitleProps = React.ComponentProps<"p"> & {
|
|
153
|
-
/** Render the child element (e.g. an `h3`) with the title classes. */
|
|
154
139
|
asChild?: boolean;
|
|
155
140
|
};
|
|
156
141
|
|
|
@@ -2,14 +2,7 @@ import { Component, type ErrorInfo, type ReactNode } from "react";
|
|
|
2
2
|
|
|
3
3
|
export interface ErrorBoundaryProps {
|
|
4
4
|
children: ReactNode;
|
|
5
|
-
/**
|
|
6
|
-
* Rendered when a child throws (a failed query, a render bug). Pass a
|
|
7
|
-
* function to get a `retry` that clears the error and re-renders the
|
|
8
|
-
* children: a boundary with no way out stays broken until its parent
|
|
9
|
-
* remounts, which for a persistent pane means a full page reload.
|
|
10
|
-
*/
|
|
11
5
|
fallback?: ReactNode | ((retry: () => void) => ReactNode);
|
|
12
|
-
/** Called with the error. Default: `console.error` with the component stack. */
|
|
13
6
|
onError?: (error: Error, info: ErrorInfo) => void;
|
|
14
7
|
}
|
|
15
8
|
|
package/src/ui/field.tsx
CHANGED
|
@@ -22,18 +22,9 @@ function useField(part: string): FieldContextValue {
|
|
|
22
22
|
}
|
|
23
23
|
|
|
24
24
|
export interface FieldProps extends React.ComponentPropsWithoutRef<"div"> {
|
|
25
|
-
/** The `id` of the control, which `FieldLabel` points at with `htmlFor`. Default: a generated id. */
|
|
26
25
|
controlId?: string;
|
|
27
26
|
}
|
|
28
27
|
|
|
29
|
-
/**
|
|
30
|
-
* Stack for one labelled control. It generates the control `id` and the ids of
|
|
31
|
-
* the description and error, so `FieldLabel` (`htmlFor`) and `FieldControl`
|
|
32
|
-
* (`id`, `aria-describedby`) link up without any manual wiring.
|
|
33
|
-
*
|
|
34
|
-
* A plain `<Input />` does not need it. Use it when a field has a label, a
|
|
35
|
-
* hint or an error message.
|
|
36
|
-
*/
|
|
37
28
|
const Field = React.forwardRef<HTMLDivElement, FieldProps>(
|
|
38
29
|
({ className, controlId, ...props }, ref) => {
|
|
39
30
|
const merge = useCn();
|
|
@@ -62,7 +53,6 @@ const Field = React.forwardRef<HTMLDivElement, FieldProps>(
|
|
|
62
53
|
);
|
|
63
54
|
Field.displayName = "Field";
|
|
64
55
|
|
|
65
|
-
/** `Label` with `htmlFor` set to the control id of the nearest `Field`. */
|
|
66
56
|
const FieldLabel = React.forwardRef<
|
|
67
57
|
React.ComponentRef<typeof Label>,
|
|
68
58
|
React.ComponentPropsWithoutRef<typeof Label>
|
|
@@ -72,12 +62,6 @@ const FieldLabel = React.forwardRef<
|
|
|
72
62
|
});
|
|
73
63
|
FieldLabel.displayName = "FieldLabel";
|
|
74
64
|
|
|
75
|
-
/**
|
|
76
|
-
* `Input` with the `id` of the nearest `Field`. `aria-describedby` lists the
|
|
77
|
-
* description and error ids that are rendered, and nothing when there are none.
|
|
78
|
-
* `aria-invalid` is set while a `FieldError` is rendered. Both merge with props
|
|
79
|
-
* you pass.
|
|
80
|
-
*/
|
|
81
65
|
const FieldControl = React.forwardRef<HTMLInputElement, React.ComponentProps<"input">>(
|
|
82
66
|
({ "aria-describedby": describedBy, "aria-invalid": invalid, ...props }, ref) => {
|
|
83
67
|
const field = useField("FieldControl");
|
|
@@ -108,7 +92,6 @@ function useRegister(set: (present: boolean) => void) {
|
|
|
108
92
|
}, [set]);
|
|
109
93
|
}
|
|
110
94
|
|
|
111
|
-
/** Muted hint under the control. Its id joins the control's `aria-describedby`. */
|
|
112
95
|
const FieldDescription = React.forwardRef<HTMLParagraphElement, React.ComponentPropsWithoutRef<"p">>(
|
|
113
96
|
({ className, ...props }, ref) => {
|
|
114
97
|
const field = useField("FieldDescription");
|
|
@@ -126,7 +109,6 @@ const FieldDescription = React.forwardRef<HTMLParagraphElement, React.ComponentP
|
|
|
126
109
|
);
|
|
127
110
|
FieldDescription.displayName = "FieldDescription";
|
|
128
111
|
|
|
129
|
-
/** Error message under the control. Its id joins the control's `aria-describedby`, and the control becomes `aria-invalid`. */
|
|
130
112
|
const FieldError = React.forwardRef<HTMLParagraphElement, React.ComponentPropsWithoutRef<"p">>(
|
|
131
113
|
({ className, ...props }, ref) => {
|
|
132
114
|
const field = useField("FieldError");
|
package/src/ui/hover-card.tsx
CHANGED
|
@@ -8,15 +8,10 @@ import { useCn, useUiConfig } from "./ui-config";
|
|
|
8
8
|
|
|
9
9
|
/** App defaults for `HoverCard*` (see `UiConfigProvider`). */
|
|
10
10
|
export interface HoverCardConfig {
|
|
11
|
-
/** Replaces the built-in classes of a part. */
|
|
12
11
|
classes?: { content?: string };
|
|
13
|
-
/** Default for `HoverCard` `openDelay` (Radix: 700ms). */
|
|
14
12
|
openDelay?: number;
|
|
15
|
-
/** Default for `HoverCard` `closeDelay` (Radix: 300ms). */
|
|
16
13
|
closeDelay?: number;
|
|
17
|
-
/** Default for `HoverCardContent` `sideOffset`. */
|
|
18
14
|
sideOffset?: number;
|
|
19
|
-
/** Default for `HoverCardContent` `portal` (built-in: `true`). */
|
|
20
15
|
portal?: boolean;
|
|
21
16
|
}
|
|
22
17
|
|
|
@@ -40,7 +35,6 @@ const HoverCardTrigger = HoverCardPrimitive.Trigger;
|
|
|
40
35
|
const HoverCardContent = React.forwardRef<
|
|
41
36
|
React.ComponentRef<typeof HoverCardPrimitive.Content>,
|
|
42
37
|
React.ComponentPropsWithoutRef<typeof HoverCardPrimitive.Content> & {
|
|
43
|
-
/** Render into `document.body` so a clipping parent cannot cut it off (default `true`). */
|
|
44
38
|
portal?: boolean;
|
|
45
39
|
}
|
|
46
40
|
>(({ className, align = "center", sideOffset, portal, ...props }, ref) => {
|
|
@@ -10,11 +10,6 @@ import { Dialog, DialogContent, DialogTitle } from "./dialog";
|
|
|
10
10
|
|
|
11
11
|
export type GalleryImage = { url: string; alt?: string };
|
|
12
12
|
|
|
13
|
-
/**
|
|
14
|
-
* Controls (arrows, "open in new tab") opt out of the swipe surface: taking
|
|
15
|
-
* pointer capture on the container retargets the resulting `click` to the
|
|
16
|
-
* container, so a captured drag would swallow every button press.
|
|
17
|
-
*/
|
|
18
13
|
const CONTROL_SELECTOR = "[data-lightbox-control]";
|
|
19
14
|
|
|
20
15
|
/**
|
|
@@ -30,7 +25,6 @@ export function ImageLightbox({
|
|
|
30
25
|
onClose,
|
|
31
26
|
}: {
|
|
32
27
|
images: GalleryImage[];
|
|
33
|
-
/** `null` while closed. */
|
|
34
28
|
index: number | null;
|
|
35
29
|
onIndexChange: (next: number) => void;
|
|
36
30
|
onClose: () => void;
|
|
@@ -43,7 +37,6 @@ export function ImageLightbox({
|
|
|
43
37
|
const count = images.length;
|
|
44
38
|
const current = index === null ? null : images[index];
|
|
45
39
|
|
|
46
|
-
// Wrap-around so the user can circle through the set in either direction.
|
|
47
40
|
const step = (delta: number) => {
|
|
48
41
|
if (index === null || count === 0) return;
|
|
49
42
|
onIndexChange((index + delta + count) % count);
|
|
@@ -10,15 +10,6 @@ import {
|
|
|
10
10
|
InputGroupTextarea,
|
|
11
11
|
} from "./input-group";
|
|
12
12
|
|
|
13
|
-
// The `Alt` look on the main parts: per-instance `classes` replace the main
|
|
14
|
-
// classes (and any `UiConfig.InputGroup` entry), and `role` / `data-slot`
|
|
15
|
-
// set to `undefined` drop the main attributes, so the markup is the
|
|
16
|
-
// pre-wrapper one. Two parts cannot go through the main ones without changing
|
|
17
|
-
// their markup: the root puts `data-input-group` (the addon's focus hook)
|
|
18
|
-
// before `class`, and the button has no default `type`; they stay a plain
|
|
19
|
-
// `<div>` and a `Button`.
|
|
20
|
-
|
|
21
|
-
/** @deprecated Use `InputGroup`. Kept for existing consumers; removed in a later minor after they move. */
|
|
22
13
|
const InputGroupAlt = React.forwardRef<
|
|
23
14
|
HTMLDivElement,
|
|
24
15
|
React.HTMLAttributes<HTMLDivElement> & { error?: boolean }
|
|
@@ -53,17 +44,14 @@ const addonClasses = {
|
|
|
53
44
|
},
|
|
54
45
|
};
|
|
55
46
|
|
|
56
|
-
/** `align={null}` (allowed by the old variant props) adds no align classes. */
|
|
57
47
|
const addonClassesNoAlign = { addon: { base: "flex items-center", align: { "inline-start": "" } } };
|
|
58
48
|
|
|
59
|
-
/** Focuses the group's first textarea or input (the click target of an addon). */
|
|
60
49
|
function focusGroupField(event: React.MouseEvent<HTMLDivElement>) {
|
|
61
50
|
const group = event.currentTarget.closest("[data-input-group]");
|
|
62
51
|
const field = group?.querySelector("textarea, input");
|
|
63
52
|
if (field instanceof HTMLElement) field.focus();
|
|
64
53
|
}
|
|
65
54
|
|
|
66
|
-
/** @deprecated Use `InputGroupAddon`. Kept for existing consumers; removed in a later minor after they move. */
|
|
67
55
|
function InputGroupAddonAlt({
|
|
68
56
|
align,
|
|
69
57
|
onClick,
|
|
@@ -98,7 +86,6 @@ const inputGroupButtonVariants = cva("shrink-0 shadow-none", {
|
|
|
98
86
|
},
|
|
99
87
|
});
|
|
100
88
|
|
|
101
|
-
/** @deprecated Use `InputGroupButton`. Kept for existing consumers; removed in a later minor after they move. */
|
|
102
89
|
const InputGroupButtonAlt = React.forwardRef<
|
|
103
90
|
HTMLButtonElement,
|
|
104
91
|
Omit<ButtonProps, "shape"> & VariantProps<typeof inputGroupButtonVariants>
|
|
@@ -115,7 +102,6 @@ InputGroupButtonAlt.displayName = "InputGroupButtonAlt";
|
|
|
115
102
|
|
|
116
103
|
const textClasses = { text: "flex items-center text-sm text-muted-foreground/95" };
|
|
117
104
|
|
|
118
|
-
/** @deprecated Use `InputGroupText`. Kept for existing consumers; removed in a later minor after they move. */
|
|
119
105
|
function InputGroupTextAlt(props: React.HTMLAttributes<HTMLSpanElement>) {
|
|
120
106
|
return <InputGroupText classes={textClasses} {...props} />;
|
|
121
107
|
}
|
|
@@ -125,7 +111,6 @@ const inputClasses = {
|
|
|
125
111
|
"h-full flex-1 rounded-none border-0 bg-transparent px-3 py-2 shadow-none focus-visible:border-0 focus-visible:ring-0",
|
|
126
112
|
};
|
|
127
113
|
|
|
128
|
-
/** @deprecated Use `InputGroupInput`. Kept for existing consumers; removed in a later minor after they move. */
|
|
129
114
|
function InputGroupInputAlt(props: React.ComponentProps<"input">) {
|
|
130
115
|
return <InputGroupInput data-slot={undefined} classes={inputClasses} {...props} />;
|
|
131
116
|
}
|
|
@@ -135,7 +120,6 @@ const textareaClasses = {
|
|
|
135
120
|
"flex-1 resize-none rounded-none border-0 bg-transparent px-3 py-2.5 shadow-none focus-visible:border-0 focus-visible:ring-0 field-sizing-content",
|
|
136
121
|
};
|
|
137
122
|
|
|
138
|
-
/** @deprecated Use `InputGroupTextarea`. Kept for existing consumers; removed in a later minor after they move. */
|
|
139
123
|
function InputGroupTextareaAlt(props: React.ComponentProps<"textarea">) {
|
|
140
124
|
return <InputGroupTextarea data-slot={undefined} classes={textareaClasses} {...props} />;
|
|
141
125
|
}
|
package/src/ui/input-group.tsx
CHANGED
|
@@ -129,9 +129,6 @@ const inputGroupButtonVariants = cva(inputGroupButtonBaseClasses, {
|
|
|
129
129
|
},
|
|
130
130
|
});
|
|
131
131
|
|
|
132
|
-
// `shape="rounded"` keeps the field-addon radius under Button's pill default.
|
|
133
|
-
// `shape` is not a prop: the size classes set `rounded-lg`, so radius changes
|
|
134
|
-
// go through `className` (or `UiConfig.InputGroup.classes.button`).
|
|
135
132
|
function InputGroupButton({
|
|
136
133
|
className,
|
|
137
134
|
type = "button",
|
package/src/ui/kbd.tsx
CHANGED
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import { cn } from "../utils/cn";
|
|
3
3
|
|
|
4
|
-
// `subtle`: plain filled key for inline hints; size and font come from the
|
|
5
|
-
// surrounding text.
|
|
6
4
|
const kbdVariantClasses = {
|
|
7
5
|
default:
|
|
8
6
|
"pointer-events-none inline-flex h-5 select-none items-center gap-1 rounded-md bg-surface-secondary px-1.5 font-mono text-[10px] font-medium text-muted-foreground",
|
|
@@ -10,7 +8,6 @@ const kbdVariantClasses = {
|
|
|
10
8
|
};
|
|
11
9
|
|
|
12
10
|
export type KbdProps = React.HTMLAttributes<HTMLElement> & {
|
|
13
|
-
/** Default `"default"`. */
|
|
14
11
|
variant?: keyof typeof kbdVariantClasses;
|
|
15
12
|
};
|
|
16
13
|
|