@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
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { useState } from "react";
|
|
2
2
|
|
|
3
|
-
/** Anything worth passing through a debounced callback. */
|
|
4
3
|
type CallbackArgs = ReadonlyArray<string | number | boolean | null | object>;
|
|
5
4
|
|
|
6
5
|
/**
|
|
@@ -31,10 +30,6 @@ export function useIdleCallback<Args extends CallbackArgs>(
|
|
|
31
30
|
ms: number,
|
|
32
31
|
fn: (...args: Args) => void,
|
|
33
32
|
): (...args: Args) => void {
|
|
34
|
-
// No refs and no direct writes to state: the React Compiler skips a file
|
|
35
|
-
// that does either during render. The holder keeps the latest `fn` in a
|
|
36
|
-
// closure; the caller stores it on each call (always an event handler
|
|
37
|
-
// holding the current render's closure), and the timer reads it on fire.
|
|
38
33
|
const [idle] = useState(() => {
|
|
39
34
|
let current = fn;
|
|
40
35
|
return {
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { useLayoutEffect, useState, type RefCallback } from "react";
|
|
2
2
|
|
|
3
|
-
/** Re-apply after a virtualised list measures; first paint often resets scrollTop. */
|
|
4
3
|
function applyScrollTop(el: HTMLElement, scrollTop: number): void {
|
|
5
4
|
el.scrollTop = scrollTop;
|
|
6
5
|
requestAnimationFrame(() => {
|
|
@@ -13,7 +12,6 @@ function applyScrollTop(el: HTMLElement, scrollTop: number): void {
|
|
|
13
12
|
|
|
14
13
|
function readScrollTop(key: string): number {
|
|
15
14
|
try {
|
|
16
|
-
// Stored as JSON; a JSON number is also a plain numeric string.
|
|
17
15
|
const value = Number(sessionStorage.getItem(key) ?? 0);
|
|
18
16
|
return Number.isFinite(value) ? value : 0;
|
|
19
17
|
} catch {
|
|
@@ -21,12 +19,10 @@ function readScrollTop(key: string): number {
|
|
|
21
19
|
}
|
|
22
20
|
}
|
|
23
21
|
|
|
24
|
-
/** JSON, so a value written by an older `useSessionStorage` reads back. */
|
|
25
22
|
function writeScrollTop(key: string, scrollTop: number): void {
|
|
26
23
|
try {
|
|
27
24
|
sessionStorage.setItem(key, JSON.stringify(Math.round(scrollTop)));
|
|
28
25
|
} catch {
|
|
29
|
-
// Ignore quota / private-mode failures.
|
|
30
26
|
}
|
|
31
27
|
}
|
|
32
28
|
|
|
@@ -25,8 +25,6 @@ export function useSingleFlight<TArgs, TRet>(
|
|
|
25
25
|
const next: Pending<TArgs> = pending.current;
|
|
26
26
|
pending.current = NO_PENDING;
|
|
27
27
|
if (next.has) {
|
|
28
|
-
// Recurse with the latest coalesced args — return value discarded
|
|
29
|
-
// intentionally since the original caller already received undefined.
|
|
30
28
|
void invoke(next.args);
|
|
31
29
|
}
|
|
32
30
|
};
|
|
@@ -39,9 +37,6 @@ export function useSingleFlight<TArgs, TRet>(
|
|
|
39
37
|
inFlight.current = true;
|
|
40
38
|
pending.current = NO_PENDING;
|
|
41
39
|
|
|
42
|
-
// Avoid `finally` here: TypeScript narrows discriminated unions to `never`
|
|
43
|
-
// inside `finally` blocks when the try body is async, making `next.args`
|
|
44
|
-
// inaccessible. Use explicit try/catch instead.
|
|
45
40
|
let result: TRet | undefined;
|
|
46
41
|
try {
|
|
47
42
|
result = await fn(args);
|
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
import { m } from "motion/react";
|
|
2
2
|
|
|
3
3
|
export interface AnimatedBellIconProps {
|
|
4
|
-
/** Width and height in px. Default `32`. */
|
|
5
4
|
size?: number;
|
|
6
5
|
className?: string;
|
|
7
|
-
/** Draw the mute slash. Default `true` (the empty-notifications state). */
|
|
8
6
|
muted?: boolean;
|
|
9
7
|
}
|
|
10
8
|
|
|
@@ -30,21 +28,18 @@ export function AnimatedBellIcon({ size = 32, className, muted = true }: Animate
|
|
|
30
28
|
transition={{ duration: 1.5, ease: "easeInOut", repeat: Infinity, repeatDelay: 3 }}
|
|
31
29
|
style={{ transformOrigin: "top center" }}
|
|
32
30
|
>
|
|
33
|
-
{/* Body */}
|
|
34
31
|
<m.path
|
|
35
32
|
d="M18 8A6 6 0 0 0 6 8c0 7-3 9-3 9h18s-3-2-3-9"
|
|
36
33
|
initial={{ pathLength: 0 }}
|
|
37
34
|
animate={{ pathLength: 1 }}
|
|
38
35
|
transition={{ duration: 0.6, ease: "easeOut" }}
|
|
39
36
|
/>
|
|
40
|
-
{/* Bottom curve */}
|
|
41
37
|
<m.path
|
|
42
38
|
d="M13.73 21a2 2 0 0 1-3.46 0"
|
|
43
39
|
initial={{ pathLength: 0 }}
|
|
44
40
|
animate={{ pathLength: 1 }}
|
|
45
41
|
transition={{ duration: 0.3, delay: 0.4 }}
|
|
46
42
|
/>
|
|
47
|
-
{/* Mute slash */}
|
|
48
43
|
{muted ? (
|
|
49
44
|
<m.path
|
|
50
45
|
d="M2 2l20 20"
|
|
@@ -54,7 +49,6 @@ export function AnimatedBellIcon({ size = 32, className, muted = true }: Animate
|
|
|
54
49
|
transition={{ duration: 0.3, delay: 0.6 }}
|
|
55
50
|
/>
|
|
56
51
|
) : null}
|
|
57
|
-
{/* Clapper */}
|
|
58
52
|
<m.circle
|
|
59
53
|
cx="12"
|
|
60
54
|
cy="17"
|
|
@@ -3,14 +3,10 @@ import { useEffect, useRef } from "react";
|
|
|
3
3
|
import { cn } from "../../utils/cn";
|
|
4
4
|
|
|
5
5
|
export interface AnimatedCounterProps {
|
|
6
|
-
/** Target value to count up to. */
|
|
7
6
|
value: number;
|
|
8
|
-
/** Rough animation length in seconds (scales the spring stiffness). Default `1`. */
|
|
9
7
|
duration?: number;
|
|
10
8
|
className?: string;
|
|
11
|
-
/** Formats the displayed number. Default: rounded, `toLocaleString()`. */
|
|
12
9
|
formatValue?: (value: number) => string;
|
|
13
|
-
/** Wait until the counter scrolls into view. Default `true`. */
|
|
14
10
|
animateOnView?: boolean;
|
|
15
11
|
}
|
|
16
12
|
|
|
@@ -30,7 +26,6 @@ export function AnimatedCounter({
|
|
|
30
26
|
}: AnimatedCounterProps) {
|
|
31
27
|
const ref = useRef<HTMLSpanElement>(null);
|
|
32
28
|
const isInView = useInView(ref, { once: true, margin: "-50px" });
|
|
33
|
-
// Start at `value` when not waiting for view, so remounts do not flash zeros.
|
|
34
29
|
const springValue = useSpring(animateOnView ? 0 : value, { stiffness: 100 / duration, damping: 30, restDelta: 0.01 });
|
|
35
30
|
const displayValue = useTransform(springValue, (v) => formatValue(v));
|
|
36
31
|
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { m } from "motion/react";
|
|
2
2
|
|
|
3
3
|
export interface AnimatedKeyIconProps {
|
|
4
|
-
/** Width and height in px. Default `48`. */
|
|
5
4
|
size?: number;
|
|
6
5
|
className?: string;
|
|
7
6
|
}
|
|
@@ -9,7 +8,6 @@ export interface AnimatedKeyIconProps {
|
|
|
9
8
|
function Sparkle({ x, y, delay, size = 3 }: { x: number; y: number; delay: number; size?: number }) {
|
|
10
9
|
return (
|
|
11
10
|
<g transform={`translate(${x}, ${y})`}>
|
|
12
|
-
{/* Four-pointed star */}
|
|
13
11
|
<m.path
|
|
14
12
|
d={`M0 -${size} L0 ${size} M-${size} 0 L${size} 0`}
|
|
15
13
|
stroke="currentColor"
|
|
@@ -46,7 +44,6 @@ export function AnimatedKeyIcon({ size = 48, className }: AnimatedKeyIconProps)
|
|
|
46
44
|
<Sparkle x={36} y={38} delay={0.8} size={2.5} />
|
|
47
45
|
<Sparkle x={10} y={36} delay={1.2} size={2} />
|
|
48
46
|
|
|
49
|
-
{/* Bolt with a gentle pulse */}
|
|
50
47
|
<m.g
|
|
51
48
|
initial={{ scale: 1 }}
|
|
52
49
|
animate={{ scale: [1, 1.02, 1] }}
|
|
@@ -62,7 +59,6 @@ export function AnimatedKeyIcon({ size = 48, className }: AnimatedKeyIconProps)
|
|
|
62
59
|
/>
|
|
63
60
|
</m.g>
|
|
64
61
|
|
|
65
|
-
{/* Glow pulse behind */}
|
|
66
62
|
<m.circle
|
|
67
63
|
cx="24"
|
|
68
64
|
cy="24"
|
|
@@ -4,11 +4,8 @@ export type NotificationIconType = "success" | "warning" | "error" | "info";
|
|
|
4
4
|
|
|
5
5
|
export interface AnimatedNotificationIconProps {
|
|
6
6
|
type: NotificationIconType;
|
|
7
|
-
/** Width and height in px. Default `20`. */
|
|
8
7
|
size?: number;
|
|
9
|
-
/** Stroke colour. Default: the type's token (`--color-success`, `--color-warning`, `--color-danger`, `--color-primary` for `info`). */
|
|
10
8
|
color?: string;
|
|
11
|
-
/** Class on the wrapping `span`. */
|
|
12
9
|
className?: string;
|
|
13
10
|
}
|
|
14
11
|
|
|
@@ -27,7 +24,6 @@ interface PartProps {
|
|
|
27
24
|
function SuccessIcon({ size, color }: PartProps) {
|
|
28
25
|
return (
|
|
29
26
|
<svg width={size} height={size} viewBox="0 0 24 24" fill="none" aria-hidden="true">
|
|
30
|
-
{/* Circle */}
|
|
31
27
|
<m.circle
|
|
32
28
|
cx="12"
|
|
33
29
|
cy="12"
|
|
@@ -39,7 +35,6 @@ function SuccessIcon({ size, color }: PartProps) {
|
|
|
39
35
|
animate={{ pathLength: 1, opacity: 1 }}
|
|
40
36
|
transition={{ duration: 0.4, ease: "easeOut" }}
|
|
41
37
|
/>
|
|
42
|
-
{/* Checkmark draws itself */}
|
|
43
38
|
<m.path
|
|
44
39
|
d="M8 12l2.5 2.5L16 9"
|
|
45
40
|
stroke={color}
|
|
@@ -67,7 +62,6 @@ function WarningIcon({ size, color }: PartProps) {
|
|
|
67
62
|
animate={{ rotate: [0, -5, 5, -3, 3, 0] }}
|
|
68
63
|
transition={{ duration: 0.5, delay: 0.2 }}
|
|
69
64
|
>
|
|
70
|
-
{/* Triangle */}
|
|
71
65
|
<m.path
|
|
72
66
|
d="M12 2L2 20h20L12 2z"
|
|
73
67
|
stroke={color}
|
|
@@ -79,7 +73,6 @@ function WarningIcon({ size, color }: PartProps) {
|
|
|
79
73
|
animate={{ pathLength: 1, opacity: 1 }}
|
|
80
74
|
transition={{ duration: 0.4, ease: "easeOut" }}
|
|
81
75
|
/>
|
|
82
|
-
{/* Exclamation line */}
|
|
83
76
|
<m.path
|
|
84
77
|
d="M12 9v4"
|
|
85
78
|
stroke={color}
|
|
@@ -89,7 +82,6 @@ function WarningIcon({ size, color }: PartProps) {
|
|
|
89
82
|
animate={{ pathLength: 1 }}
|
|
90
83
|
transition={{ duration: 0.2, delay: 0.3 }}
|
|
91
84
|
/>
|
|
92
|
-
{/* Exclamation dot */}
|
|
93
85
|
<m.circle
|
|
94
86
|
cx="12"
|
|
95
87
|
cy="17"
|
|
@@ -106,7 +98,6 @@ function WarningIcon({ size, color }: PartProps) {
|
|
|
106
98
|
function ErrorIcon({ size, color }: PartProps) {
|
|
107
99
|
return (
|
|
108
100
|
<svg width={size} height={size} viewBox="0 0 24 24" fill="none" aria-hidden="true">
|
|
109
|
-
{/* Circle */}
|
|
110
101
|
<m.circle
|
|
111
102
|
cx="12"
|
|
112
103
|
cy="12"
|
|
@@ -118,7 +109,6 @@ function ErrorIcon({ size, color }: PartProps) {
|
|
|
118
109
|
animate={{ scale: 1, opacity: 1 }}
|
|
119
110
|
transition={{ duration: 0.3, ease: "easeOut" }}
|
|
120
111
|
/>
|
|
121
|
-
{/* X, first stroke */}
|
|
122
112
|
<m.path
|
|
123
113
|
d="M15 9l-6 6"
|
|
124
114
|
stroke={color}
|
|
@@ -128,7 +118,6 @@ function ErrorIcon({ size, color }: PartProps) {
|
|
|
128
118
|
animate={{ pathLength: 1 }}
|
|
129
119
|
transition={{ duration: 0.2, delay: 0.2 }}
|
|
130
120
|
/>
|
|
131
|
-
{/* X, second stroke */}
|
|
132
121
|
<m.path
|
|
133
122
|
d="M9 9l6 6"
|
|
134
123
|
stroke={color}
|
|
@@ -154,9 +143,7 @@ function InfoIcon({ size, color }: PartProps) {
|
|
|
154
143
|
animate={{ y: 0, opacity: 1 }}
|
|
155
144
|
transition={{ duration: 0.3, ease: "easeOut" }}
|
|
156
145
|
>
|
|
157
|
-
{/* Circle */}
|
|
158
146
|
<circle cx="12" cy="12" r="10" stroke={color} strokeWidth="1.5" fill="none" />
|
|
159
|
-
{/* Dot */}
|
|
160
147
|
<m.circle
|
|
161
148
|
cx="12"
|
|
162
149
|
cy="8"
|
|
@@ -166,7 +153,6 @@ function InfoIcon({ size, color }: PartProps) {
|
|
|
166
153
|
animate={{ scale: 1 }}
|
|
167
154
|
transition={{ duration: 0.2, delay: 0.2, type: "spring" }}
|
|
168
155
|
/>
|
|
169
|
-
{/* Line */}
|
|
170
156
|
<m.path
|
|
171
157
|
d="M12 12v4"
|
|
172
158
|
stroke={color}
|
|
@@ -2,15 +2,10 @@ import { m, useSpring, useTransform } from "motion/react";
|
|
|
2
2
|
import { useEffect, useId } from "react";
|
|
3
3
|
|
|
4
4
|
export interface AnimatedProgressProps {
|
|
5
|
-
/** Progress from 0 to 100 (clamped). */
|
|
6
5
|
value: number;
|
|
7
|
-
/** Bar height in px. Default `4`. */
|
|
8
6
|
height?: number;
|
|
9
|
-
/** Class on the wrapping `div`. */
|
|
10
7
|
className?: string;
|
|
11
|
-
/** Run the moving gradient and shimmer. Default `true`. */
|
|
12
8
|
showGradient?: boolean;
|
|
13
|
-
/** Accessible name for the `progressbar`. */
|
|
14
9
|
label?: string;
|
|
15
10
|
}
|
|
16
11
|
|
|
@@ -43,7 +38,6 @@ export function AnimatedProgress({ value, height = 4, className, showGradient =
|
|
|
43
38
|
>
|
|
44
39
|
<svg width="100%" height={height} className="block" aria-hidden="true">
|
|
45
40
|
<defs>
|
|
46
|
-
{/* Moving gradient */}
|
|
47
41
|
<linearGradient id={gradientId} x1="0%" y1="0%" x2="100%" y2="0%">
|
|
48
42
|
<stop offset="0%" stopColor="var(--color-primary)" />
|
|
49
43
|
<stop offset="50%" stopColor="color-mix(in oklch, var(--color-primary) 80%, transparent)" />
|
|
@@ -51,7 +45,6 @@ export function AnimatedProgress({ value, height = 4, className, showGradient =
|
|
|
51
45
|
{showGradient ? <animate attributeName="x1" values="-100%;100%" dur="2s" repeatCount="indefinite" /> : null}
|
|
52
46
|
{showGradient ? <animate attributeName="x2" values="0%;200%" dur="2s" repeatCount="indefinite" /> : null}
|
|
53
47
|
</linearGradient>
|
|
54
|
-
{/* Shimmer overlay */}
|
|
55
48
|
<linearGradient id={shimmerId} x1="0%" y1="0%" x2="100%" y2="0%">
|
|
56
49
|
<stop offset="0%" stopColor="transparent" />
|
|
57
50
|
<stop offset="50%" stopColor="rgba(255,255,255,0.3)" />
|
|
@@ -60,11 +53,8 @@ export function AnimatedProgress({ value, height = 4, className, showGradient =
|
|
|
60
53
|
<animate attributeName="x2" values="0%;200%" dur="1.5s" repeatCount="indefinite" />
|
|
61
54
|
</linearGradient>
|
|
62
55
|
</defs>
|
|
63
|
-
{/* Track */}
|
|
64
56
|
<rect x="0" y="0" width="100%" height={height} rx={height / 2} fill="var(--color-surface-secondary)" />
|
|
65
|
-
{/* Fill */}
|
|
66
57
|
<m.rect x="0" y="0" height={height} rx={height / 2} fill={`url(#${gradientId})`} style={{ width }} />
|
|
67
|
-
{/* Shimmer */}
|
|
68
58
|
{showGradient && clamped > 0 ? (
|
|
69
59
|
<m.rect x="0" y="0" height={height} rx={height / 2} fill={`url(#${shimmerId})`} style={{ width }} />
|
|
70
60
|
) : null}
|
|
@@ -5,7 +5,6 @@ export type StatusDotPhase = "idle" | "listening" | "thinking" | "speaking" | "e
|
|
|
5
5
|
|
|
6
6
|
export interface AnimatedStatusDotProps {
|
|
7
7
|
phase: StatusDotPhase;
|
|
8
|
-
/** Dot diameter in px. The svg is `size * 3` square to leave room for the ripples. Default `10`. */
|
|
9
8
|
size?: number;
|
|
10
9
|
className?: string;
|
|
11
10
|
}
|
|
@@ -50,7 +49,6 @@ export function AnimatedStatusDot({ phase, size = 10, className }: AnimatedStatu
|
|
|
50
49
|
</filter>
|
|
51
50
|
</defs>
|
|
52
51
|
|
|
53
|
-
{/* Ripples while listening */}
|
|
54
52
|
{isListening
|
|
55
53
|
? RIPPLE_DELAYS.map((delay) => (
|
|
56
54
|
<m.circle
|
|
@@ -68,7 +66,6 @@ export function AnimatedStatusDot({ phase, size = 10, className }: AnimatedStatu
|
|
|
68
66
|
))
|
|
69
67
|
: null}
|
|
70
68
|
|
|
71
|
-
{/* Glow ring while active */}
|
|
72
69
|
{isActive ? (
|
|
73
70
|
<m.circle
|
|
74
71
|
cx="15"
|
|
@@ -82,7 +79,6 @@ export function AnimatedStatusDot({ phase, size = 10, className }: AnimatedStatu
|
|
|
82
79
|
/>
|
|
83
80
|
) : null}
|
|
84
81
|
|
|
85
|
-
{/* Dot */}
|
|
86
82
|
<m.circle
|
|
87
83
|
cx="15"
|
|
88
84
|
cy="15"
|
|
@@ -1,7 +1,3 @@
|
|
|
1
|
-
// Motion-driven animated SVG icons. Entry: `@vvedantb/ui/icons/animated` (not re-exported from
|
|
2
|
-
// the root or `/client`, so apps that do not use them do not load them). They need the optional
|
|
3
|
-
// `motion` peer and animate through `m.*`, so wrap the app in `MotionProvider` (or its own
|
|
4
|
-
// `LazyMotion`); without it they render their resting frame. No stylesheet is needed.
|
|
5
1
|
export { AnimatedBellIcon } from "./animated-bell-icon";
|
|
6
2
|
export type { AnimatedBellIconProps } from "./animated-bell-icon";
|
|
7
3
|
export { AnimatedCounter } from "./animated-counter";
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
import { m } from "motion/react";
|
|
2
2
|
|
|
3
3
|
export interface MorphingMenuIconProps {
|
|
4
|
-
/** `true` draws the X (close), `false` the three bars (menu). */
|
|
5
4
|
isOpen: boolean;
|
|
6
|
-
/** Width and height in px. Default `20`. */
|
|
7
5
|
size?: number;
|
|
8
6
|
className?: string;
|
|
9
7
|
}
|
|
@@ -32,7 +30,6 @@ export function MorphingMenuIcon({ isOpen, size = 20, className }: MorphingMenuI
|
|
|
32
30
|
aria-hidden="true"
|
|
33
31
|
data-state={isOpen ? "open" : "closed"}
|
|
34
32
|
>
|
|
35
|
-
{/* Top bar: becomes the "\" of the X */}
|
|
36
33
|
<m.line
|
|
37
34
|
x1="4"
|
|
38
35
|
y1="6"
|
|
@@ -43,7 +40,6 @@ export function MorphingMenuIcon({ isOpen, size = 20, className }: MorphingMenuI
|
|
|
43
40
|
animate={{ x1: isOpen ? 5 : 4, y1: isOpen ? 5 : 6, x2: isOpen ? 19 : 20, y2: isOpen ? 19 : 6 }}
|
|
44
41
|
transition={MORPH}
|
|
45
42
|
/>
|
|
46
|
-
{/* Middle bar: fades out */}
|
|
47
43
|
<m.line
|
|
48
44
|
x1="4"
|
|
49
45
|
y1="12"
|
|
@@ -55,7 +51,6 @@ export function MorphingMenuIcon({ isOpen, size = 20, className }: MorphingMenuI
|
|
|
55
51
|
transition={{ duration: 0.15, ease: "easeInOut" }}
|
|
56
52
|
style={{ transformOrigin: "center" }}
|
|
57
53
|
/>
|
|
58
|
-
{/* Bottom bar: becomes the "/" of the X */}
|
|
59
54
|
<m.line
|
|
60
55
|
x1="4"
|
|
61
56
|
y1="18"
|
|
@@ -2,9 +2,7 @@ import { m } from "motion/react";
|
|
|
2
2
|
import { cn } from "../../utils/cn";
|
|
3
3
|
|
|
4
4
|
export interface MorphingMicIconProps {
|
|
5
|
-
/** `true` shows the stop square, `false` the microphone. */
|
|
6
5
|
isListening: boolean;
|
|
7
|
-
/** Width and height in px. Default `32`. */
|
|
8
6
|
size?: number;
|
|
9
7
|
strokeWidth?: number;
|
|
10
8
|
className?: string;
|
|
@@ -2,13 +2,9 @@ import { m } from "motion/react";
|
|
|
2
2
|
import { cn } from "../../utils/cn";
|
|
3
3
|
|
|
4
4
|
export interface PulsingRingsProps {
|
|
5
|
-
/** Size of the element the rings surround (for example the record button), in px. The svg is `size * 1.6`. */
|
|
6
5
|
size: number;
|
|
7
|
-
/** Number of rings. Default `3`. */
|
|
8
6
|
ringCount?: number;
|
|
9
|
-
/** Ring colour. Default `var(--color-danger)`. */
|
|
10
7
|
color?: string;
|
|
11
|
-
/** Render the rings. Default `true`; `false` renders nothing. */
|
|
12
8
|
active?: boolean;
|
|
13
9
|
className?: string;
|
|
14
10
|
}
|
|
@@ -6,7 +6,6 @@ export function AutomationIcon({ strokeWidth = 1.75, cutoutColor, ...props }: Cu
|
|
|
6
6
|
return (
|
|
7
7
|
<NavIconBase {...props} strokeWidth={strokeWidth} hoverScale="1.12" loop={1800}>
|
|
8
8
|
<circle cx="12" cy="12" r="9" strokeDasharray="2.5 3.5" className="vv-icon-automation-orbit" />
|
|
9
|
-
{/* Filling the dashed orbit itself reads as a cog; a disc inside it keeps the orbit's silhouette. */}
|
|
10
9
|
{active ? <circle cx="12" cy="12" r="6.5" fill="currentColor" stroke="none" /> : null}
|
|
11
10
|
<g className="vv-icon-automation-sparks">
|
|
12
11
|
<line x1="3.7" y1="3.7" x2="2.2" y2="2.2" />
|
package/src/icons/board-icon.tsx
CHANGED
|
@@ -1,16 +1,19 @@
|
|
|
1
|
-
import { NavIconBase, type
|
|
1
|
+
import { NavIconBase, cutoutStyle, type CutoutIconProps } from "./nav-icon-base";
|
|
2
2
|
|
|
3
|
-
/** Three-column board; cards drop in and a card travels across on hover. */
|
|
4
|
-
export function BoardIcon({ strokeWidth = 1.75, ...props }:
|
|
3
|
+
/** Three-column board; cards drop in and a card travels across on hover. Solid while `active`. */
|
|
4
|
+
export function BoardIcon({ strokeWidth = 1.75, cutoutColor, ...props }: CutoutIconProps) {
|
|
5
|
+
const { active } = props;
|
|
6
|
+
const solid = active ? "currentColor" : undefined;
|
|
7
|
+
const card = cutoutStyle(active, "fill", cutoutColor);
|
|
5
8
|
return (
|
|
6
9
|
<NavIconBase {...props} strokeWidth={strokeWidth} hoverScale="1.12" loop={1800}>
|
|
7
|
-
<rect x="3" y="3.5" width="5.5" height="17" rx="1.4" />
|
|
8
|
-
<rect x="9.25" y="3.5" width="5.5" height="11" rx="1.4" />
|
|
9
|
-
<rect x="15.5" y="3.5" width="5.5" height="14" rx="1.4" />
|
|
10
|
-
<rect x="4.4" y="5" width="2.7" height="2.2" rx="0.4" fill="currentColor" stroke="none" className="vv-icon-board-card vv-icon-board-card-1" />
|
|
11
|
-
<rect x="10.65" y="5" width="2.7" height="2.2" rx="0.4" fill="currentColor" stroke="none" className="vv-icon-board-card vv-icon-board-card-2" />
|
|
12
|
-
<rect x="16.9" y="5" width="2.7" height="2.2" rx="0.4" fill="currentColor" stroke="none" className="vv-icon-board-card vv-icon-board-card-3" />
|
|
13
|
-
<rect x="4.4" y="9" width="2.7" height="1.5" rx="0.4" fill="currentColor" stroke="none" className="vv-icon-board-traveler" />
|
|
10
|
+
<rect x="3" y="3.5" width="5.5" height="17" rx="1.4" fill={solid} />
|
|
11
|
+
<rect x="9.25" y="3.5" width="5.5" height="11" rx="1.4" fill={solid} />
|
|
12
|
+
<rect x="15.5" y="3.5" width="5.5" height="14" rx="1.4" fill={solid} />
|
|
13
|
+
<rect x="4.4" y="5" width="2.7" height="2.2" rx="0.4" fill="currentColor" stroke="none" className="vv-icon-board-card vv-icon-board-card-1" style={card} />
|
|
14
|
+
<rect x="10.65" y="5" width="2.7" height="2.2" rx="0.4" fill="currentColor" stroke="none" className="vv-icon-board-card vv-icon-board-card-2" style={card} />
|
|
15
|
+
<rect x="16.9" y="5" width="2.7" height="2.2" rx="0.4" fill="currentColor" stroke="none" className="vv-icon-board-card vv-icon-board-card-3" style={card} />
|
|
16
|
+
<rect x="4.4" y="9" width="2.7" height="1.5" rx="0.4" fill="currentColor" stroke="none" className="vv-icon-board-traveler" style={card} />
|
|
14
17
|
</NavIconBase>
|
|
15
18
|
);
|
|
16
19
|
}
|
package/src/icons/bolt-icon.tsx
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import { NavIconBase, type
|
|
1
|
+
import { NavIconBase, type CutoutIconProps } from "./nav-icon-base";
|
|
2
2
|
|
|
3
|
-
/** Lightning bolt that flashes on hover. */
|
|
4
|
-
export function BoltIcon({ strokeWidth = 1.7, ...props }:
|
|
3
|
+
/** Lightning bolt that flashes on hover. Solid while `active`. */
|
|
4
|
+
export function BoltIcon({ strokeWidth = 1.7, cutoutColor: _cutoutColor, ...props }: CutoutIconProps) {
|
|
5
|
+
const { active } = props;
|
|
5
6
|
return (
|
|
6
7
|
<NavIconBase {...props} strokeWidth={strokeWidth} hoverScale="1.15" loop={900}>
|
|
7
|
-
<path className="vv-icon-bolt" d="M13 3L4 14h7l-1 7l9 -11h-7l1 -7z" />
|
|
8
|
+
<path className="vv-icon-bolt" d="M13 3L4 14h7l-1 7l9 -11h-7l1 -7z" fill={active ? "currentColor" : undefined} />
|
|
8
9
|
</NavIconBase>
|
|
9
10
|
);
|
|
10
11
|
}
|
|
@@ -1,16 +1,18 @@
|
|
|
1
|
-
import { NavIconBase, type
|
|
1
|
+
import { NavIconBase, cutoutStyle, type CutoutIconProps } from "./nav-icon-base";
|
|
2
2
|
|
|
3
|
-
/** Building whose windows blink in turn on hover. */
|
|
4
|
-
export function BuildingIcon({ strokeWidth = 1.7, ...props }:
|
|
3
|
+
/** Building whose windows blink in turn on hover. Solid while `active`. */
|
|
4
|
+
export function BuildingIcon({ strokeWidth = 1.7, cutoutColor, ...props }: CutoutIconProps) {
|
|
5
|
+
const { active } = props;
|
|
6
|
+
const fill = cutoutStyle(active, "fill", cutoutColor);
|
|
5
7
|
return (
|
|
6
8
|
<NavIconBase {...props} strokeWidth={strokeWidth} hoverScale="1.15" loop={1600}>
|
|
7
|
-
<path d="M4 20V6.5a1.5 1.5 0 0 1 1.5 -1.5h13a1.5 1.5 0 0 1 1.5 1.5V20" />
|
|
9
|
+
<path d="M4 20V6.5a1.5 1.5 0 0 1 1.5 -1.5h13a1.5 1.5 0 0 1 1.5 1.5V20" fill={active ? "currentColor" : undefined} />
|
|
8
10
|
<path d="M3 20h18" />
|
|
9
|
-
<path d="M10 20v-4a1 1 0 0 1 1 -1h2a1 1 0 0 1 1 1v4" />
|
|
10
|
-
<rect className="vv-icon-building-window vv-icon-building-window-1" x="7" y="8" width="3" height="3" rx="0.5" fill="currentColor" stroke="none" />
|
|
11
|
-
<rect className="vv-icon-building-window vv-icon-building-window-2" x="14" y="8" width="3" height="3" rx="0.5" fill="currentColor" stroke="none" />
|
|
12
|
-
<rect className="vv-icon-building-window vv-icon-building-window-3" x="7" y="12" width="3" height="2.5" rx="0.5" fill="currentColor" stroke="none" />
|
|
13
|
-
<rect className="vv-icon-building-window vv-icon-building-window-4" x="14" y="12" width="3" height="2.5" rx="0.5" fill="currentColor" stroke="none" />
|
|
11
|
+
<path d="M10 20v-4a1 1 0 0 1 1 -1h2a1 1 0 0 1 1 1v4" style={cutoutStyle(active, "stroke", cutoutColor)} />
|
|
12
|
+
<rect className="vv-icon-building-window vv-icon-building-window-1" x="7" y="8" width="3" height="3" rx="0.5" fill="currentColor" stroke="none" style={fill} />
|
|
13
|
+
<rect className="vv-icon-building-window vv-icon-building-window-2" x="14" y="8" width="3" height="3" rx="0.5" fill="currentColor" stroke="none" style={fill} />
|
|
14
|
+
<rect className="vv-icon-building-window vv-icon-building-window-3" x="7" y="12" width="3" height="2.5" rx="0.5" fill="currentColor" stroke="none" style={fill} />
|
|
15
|
+
<rect className="vv-icon-building-window vv-icon-building-window-4" x="14" y="12" width="3" height="2.5" rx="0.5" fill="currentColor" stroke="none" style={fill} />
|
|
14
16
|
</NavIconBase>
|
|
15
17
|
);
|
|
16
18
|
}
|
package/src/icons/draft-icon.tsx
CHANGED
|
@@ -8,7 +8,6 @@ export function DraftIcon({ strokeWidth = 1.75, ...props }: IconProps) {
|
|
|
8
8
|
<path d="M14 3v4.5a1 1 0 0 0 1 1h4.5" className="vv-icon-document-corner" />
|
|
9
9
|
<line x1="9" y1="12" x2="16" y2="12" className="vv-icon-document-line vv-icon-document-line-1" />
|
|
10
10
|
<line x1="9" y1="15" x2="13" y2="15" className="vv-icon-document-line vv-icon-document-line-2" strokeDasharray="1.5 1.5" />
|
|
11
|
-
{/* Pencil nib (not animated) */}
|
|
12
11
|
<g className="vv-icon-draft-pencil">
|
|
13
12
|
<path d="M16.5 16.5l1.5-1.5 1.2 1.2-1.5 1.5z" fill="currentColor" stroke="none" />
|
|
14
13
|
<path d="M16.5 16.5l-0.8 2.3 2.3-0.8z" fill="currentColor" stroke="none" />
|
package/src/icons/files-icon.tsx
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { NavIconBase, type
|
|
1
|
+
import { NavIconBase, cutoutStyle, type CutoutIconProps } from "./nav-icon-base";
|
|
2
2
|
|
|
3
|
-
/** Two stacked files; the back one slides out on hover. */
|
|
4
|
-
export function FilesIcon({ strokeWidth = 1.7, ...props }:
|
|
3
|
+
/** Two stacked files; the back one slides out on hover. Solid while `active`. */
|
|
4
|
+
export function FilesIcon({ strokeWidth = 1.7, cutoutColor, ...props }: CutoutIconProps) {
|
|
5
|
+
const { active } = props;
|
|
5
6
|
return (
|
|
6
7
|
<NavIconBase {...props} strokeWidth={strokeWidth} hoverScale="1.15" loop={1400}>
|
|
7
8
|
<g className="vv-icon-files-back">
|
|
@@ -9,8 +10,11 @@ export function FilesIcon({ strokeWidth = 1.7, ...props }: IconProps) {
|
|
|
9
10
|
<path d="M16 4v3h3" />
|
|
10
11
|
</g>
|
|
11
12
|
<g>
|
|
12
|
-
<path
|
|
13
|
-
|
|
13
|
+
<path
|
|
14
|
+
d="M6.5 8h6l3 3v9a1.5 1.5 0 0 1 -1.5 1.5h-7.5a1.5 1.5 0 0 1 -1.5 -1.5v-10.5a1.5 1.5 0 0 1 1.5 -1.5z"
|
|
15
|
+
fill={active ? "currentColor" : undefined}
|
|
16
|
+
/>
|
|
17
|
+
<path d="M12.5 8v3h3" style={cutoutStyle(active, "stroke", cutoutColor)} />
|
|
14
18
|
</g>
|
|
15
19
|
</NavIconBase>
|
|
16
20
|
);
|
|
@@ -9,7 +9,6 @@ export function InboxArrowIcon({ strokeWidth = 1.75, cutoutColor, ...props }: Cu
|
|
|
9
9
|
<path d="M3 13.5l3-7.5h12l3 7.5v5.5A2 2 0 0 1 19 21H5a2 2 0 0 1-2-2z" fill={active ? "currentColor" : "none"} />
|
|
10
10
|
<path d="M3 13.5h5.2l1 2h5.6l1-2H21" style={cutoutStroke} />
|
|
11
11
|
<g className="vv-icon-inbox-arrow">
|
|
12
|
-
{/* The arrow dips into the tray; a cut-out halo keeps it legible against the solid body. */}
|
|
13
12
|
{active ? (
|
|
14
13
|
<g strokeWidth={4} style={cutoutStroke}>
|
|
15
14
|
<line x1="12" y1="2.5" x2="12" y2="8" />
|
package/src/icons/inbox-icon.tsx
CHANGED
|
@@ -1,13 +1,17 @@
|
|
|
1
|
-
import { NavIconBase, type
|
|
1
|
+
import { NavIconBase, cutoutStyle, type CutoutIconProps } from "./nav-icon-base";
|
|
2
2
|
|
|
3
|
-
/** Tray with a letter dropping in on hover. */
|
|
4
|
-
export function InboxIcon({ strokeWidth = 1.7, ...props }:
|
|
3
|
+
/** Tray with a letter dropping in on hover. Solid while `active`. */
|
|
4
|
+
export function InboxIcon({ strokeWidth = 1.7, cutoutColor, ...props }: CutoutIconProps) {
|
|
5
|
+
const { active } = props;
|
|
5
6
|
return (
|
|
6
7
|
<NavIconBase {...props} strokeWidth={strokeWidth} hoverScale="1.15" loop={1300}>
|
|
7
|
-
|
|
8
|
+
{active ? (
|
|
9
|
+
<path d="M4 13l2 -8a1 1 0 0 1 1 -1h10a1 1 0 0 1 1 1l2 8v6a1 1 0 0 1 -1 1h-14a1 1 0 0 1 -1 -1z" fill="currentColor" />
|
|
10
|
+
) : null}
|
|
11
|
+
<rect className="vv-icon-inbox-letter" x="9" y="8" width="6" height="4" rx="0.5" fill="currentColor" stroke="none" style={cutoutStyle(active, "fill", cutoutColor)} />
|
|
8
12
|
<path d="M4 13l2 -8a1 1 0 0 1 1 -1h10a1 1 0 0 1 1 1l2 8" />
|
|
9
13
|
<path d="M4 13v6a1 1 0 0 0 1 1h14a1 1 0 0 0 1 -1v-6" />
|
|
10
|
-
<path d="M4 13h4l1 2h6l1 -2h4" />
|
|
14
|
+
<path d="M4 13h4l1 2h6l1 -2h4" style={cutoutStyle(active, "stroke", cutoutColor)} />
|
|
11
15
|
</NavIconBase>
|
|
12
16
|
);
|
|
13
17
|
}
|
package/src/icons/index.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
// Animated nav icons. Styles: `@vvedantb/ui/tokens/css/nav-icons.css` (also in `tokens/css/index.css`).
|
|
2
1
|
export { NavIconBase } from "./nav-icon-base";
|
|
3
2
|
export type { CutoutIconProps, IconAnimate, IconProps, NavIconBaseProps } from "./nav-icon-base";
|
|
4
3
|
export { MemoryIcon } from "./memory-icon";
|
|
@@ -21,3 +20,15 @@ export { BarChartIcon } from "./bar-chart-icon";
|
|
|
21
20
|
export { SearchIcon } from "./search-icon";
|
|
22
21
|
export { SidebarToggleIcon } from "./sidebar-toggle-icon";
|
|
23
22
|
export type { SidebarToggleIconProps } from "./sidebar-toggle-icon";
|
|
23
|
+
export {
|
|
24
|
+
ActivitySolidIcon,
|
|
25
|
+
BookSolidIcon,
|
|
26
|
+
BrainSolidIcon,
|
|
27
|
+
PaperclipSolidIcon,
|
|
28
|
+
PlugConnectedSolidIcon,
|
|
29
|
+
ReceiptSolidIcon,
|
|
30
|
+
ScanSolidIcon,
|
|
31
|
+
UserCircleSolidIcon,
|
|
32
|
+
UsersGroupSolidIcon,
|
|
33
|
+
} from "./solid-icons";
|
|
34
|
+
export { withActive } from "./with-active";
|
|
@@ -1,20 +1,18 @@
|
|
|
1
|
-
import { NavIconBase, type
|
|
1
|
+
import { NavIconBase, cutoutStyle, type CutoutIconProps } from "./nav-icon-base";
|
|
2
2
|
|
|
3
|
-
/** Brain with a synapse that fires on hover. */
|
|
4
|
-
export function MemoryIcon({ strokeWidth = 1.7, ...props }:
|
|
3
|
+
/** Brain with a synapse that fires on hover. Solid while `active`. */
|
|
4
|
+
export function MemoryIcon({ strokeWidth = 1.7, cutoutColor, ...props }: CutoutIconProps) {
|
|
5
|
+
const { active } = props;
|
|
6
|
+
const stroke = cutoutStyle(active, "stroke", cutoutColor);
|
|
5
7
|
return (
|
|
6
8
|
<NavIconBase {...props} strokeWidth={strokeWidth} hoverScale="1.15" loop={1000}>
|
|
7
|
-
{/* brain silhouette (symmetric about x=12) */}
|
|
8
9
|
<path
|
|
9
10
|
d="M12 3.5C8.5 2.2 5.5 3.3 5 6.5C2.8 7 2.5 8.5 3.5 10C2.2 11.5 2.5 13.5 4.5 14.5C4.5 17 6 18.5 8 18.5C9.5 20 11 19.6 12 19C13 19.6 14.5 20 16 18.5C18 18.5 19.5 17 19.5 14.5C21.5 13.5 21.8 11.5 20.5 10C21.5 8.5 21.2 7 19 6.5C18.5 3.3 15.5 2.2 12 3.5Z"
|
|
10
|
-
fill="none"
|
|
11
|
+
fill={active ? "currentColor" : "none"}
|
|
11
12
|
/>
|
|
12
|
-
|
|
13
|
-
<
|
|
14
|
-
|
|
15
|
-
<circle className="vv-icon-memory-ring" cx="12" cy="13.8" r="2.2" fill="none" />
|
|
16
|
-
{/* synapse core */}
|
|
17
|
-
<circle className="vv-icon-memory-core" cx="12" cy="13.8" r="1.7" fill="currentColor" stroke="none" />
|
|
13
|
+
<path d="M12 3.9C10.6 6.5 13.4 8.8 12 11.4" fill="none" style={stroke} />
|
|
14
|
+
<circle className="vv-icon-memory-ring" cx="12" cy="13.8" r="2.2" fill="none" style={stroke} />
|
|
15
|
+
<circle className="vv-icon-memory-core" cx="12" cy="13.8" r="1.7" fill="currentColor" stroke="none" style={cutoutStyle(active, "fill", cutoutColor)} />
|
|
18
16
|
</NavIconBase>
|
|
19
17
|
);
|
|
20
18
|
}
|
|
@@ -5,33 +5,23 @@ import { cn } from "../utils/cn";
|
|
|
5
5
|
export type IconAnimate = boolean | "hover";
|
|
6
6
|
|
|
7
7
|
export type IconProps = Omit<SVGProps<SVGSVGElement>, "children" | "color" | "height" | "width" | "strokeWidth"> & {
|
|
8
|
-
/** Width and height. Default 20. */
|
|
9
8
|
size?: number | string;
|
|
10
|
-
/** Sets the svg's CSS `color`, which every `currentColor` part follows. Default `currentColor` (no inline colour). */
|
|
11
9
|
color?: string;
|
|
12
|
-
/** Default: the icon's own stroke (1.7 or 1.75). Shapes with their own stroke width keep it. */
|
|
13
10
|
strokeWidth?: number | string;
|
|
14
|
-
/** Accessible name. Without it the icon is `aria-hidden`. */
|
|
15
11
|
title?: string;
|
|
16
|
-
/** Default `"hover"`. */
|
|
17
12
|
animate?: IconAnimate;
|
|
18
|
-
/** Solid variant on icons that have one; elsewhere only sets `data-active`. */
|
|
19
13
|
active?: boolean;
|
|
20
|
-
/** Length in ms of the icon's longest loop. Every other duration and delay in the icon scales with it. */
|
|
21
14
|
duration?: number;
|
|
22
15
|
};
|
|
23
16
|
|
|
24
17
|
/** Icons with a solid `active` variant. Inner details are painted in `cutoutColor`. */
|
|
25
18
|
export type CutoutIconProps = IconProps & {
|
|
26
|
-
/** Tone of the cut-out details while `active`. Default: the sidebar accent colour. */
|
|
27
19
|
cutoutColor?: string;
|
|
28
20
|
};
|
|
29
21
|
|
|
30
22
|
export type NavIconBaseProps = IconProps & {
|
|
31
23
|
children: ReactNode;
|
|
32
|
-
/** Root scale on group hover: `"1.15"` springs, `"1.12"` eases out. */
|
|
33
24
|
hoverScale: "1.15" | "1.12";
|
|
34
|
-
/** The icon's longest loop in ms, which `duration` replaces. */
|
|
35
25
|
loop: number;
|
|
36
26
|
};
|
|
37
27
|
|