@vvedantb/ui 0.67.0 → 0.70.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/app/src/auth/useStableAuth.ts +0 -2
- package/app/src/confirm/ConfirmSkipHint.tsx +0 -2
- package/app/src/confirm/useAltHeld.ts +0 -17
- package/app/src/convex/ConvexClerkProvider.tsx +0 -3
- package/app/src/convex/env.ts +0 -4
- package/app/src/convex/errorMessage.ts +0 -1
- package/app/src/convex/useHeldResult.ts +0 -3
- package/app/src/page-motion/PageMotionProvider.tsx +0 -6
- package/app/src/page-title/createPageTitleContext.tsx +0 -14
- package/app/src/settings/SettingsEmptyState.tsx +0 -4
- package/app/src/settings/SettingsField.tsx +0 -4
- package/app/src/settings/SettingsPage.tsx +0 -12
- package/app/src/settings/SettingsSection.tsx +0 -14
- package/app/src/settings/ThemeModePicker.tsx +0 -6
- package/app/src/theme/createThemeProvider.tsx +0 -33
- package/app/src/time/compactRelativeTime.ts +0 -16
- package/app/src/update/staleDeployReload.ts +0 -40
- package/app/src/update/updateWatcher.ts +0 -8
- package/dist/app/src/auth/useStableAuth.js +0 -1
- package/dist/app/src/confirm/ConfirmSkipHint.js +0 -3
- package/dist/app/src/confirm/useAltHeld.js +0 -17
- package/dist/app/src/convex/env.js +0 -3
- package/dist/app/src/convex/errorMessage.js +0 -2
- package/dist/app/src/settings/ThemeModePicker.js +0 -1
- package/dist/app/src/theme/createThemeProvider.js +1 -11
- package/dist/app/src/time/compactRelativeTime.js +0 -8
- package/dist/app/src/update/staleDeployReload.js +3 -38
- package/dist/app/src/update/updateWatcher.js +1 -3
- package/dist/shell/src/AppShell.js +0 -14
- package/dist/shell/src/PageHeaderBar.js +0 -3
- package/dist/shell/src/SessionsHoverCard.js +0 -9
- package/dist/shell/src/SidePanelTabs.js +0 -36
- package/dist/shell/src/Sidebar.js +0 -1
- package/dist/shell/src/SidebarChrome.js +0 -19
- package/dist/shell/src/SidebarIconTooltip.js +0 -1
- package/dist/shell/src/SidebarRail.js +0 -12
- package/dist/shell/src/SidebarResize.js +1 -4
- package/dist/shell/src/app-shell-classes.js +0 -10
- package/dist/shell/src/index.js +0 -1
- package/dist/shell/src/shell-panel-motion.js +0 -12
- package/dist/src/ai-elements/activity-shared.js +0 -6
- package/dist/src/ai-elements/activity-step-label.js +0 -6
- package/dist/src/ai-elements/activity-step-types.js +0 -4
- package/dist/src/ai-elements/activity-tasks-utils.js +0 -17
- package/dist/src/ai-elements/activity-tasks.js +0 -55
- package/dist/src/ai-elements/artifact.js +0 -4
- package/dist/src/ai-elements/attachments.js +0 -41
- package/dist/src/ai-elements/code-block.js +0 -18
- package/dist/src/ai-elements/collapsible-user-message-body.js +0 -2
- package/dist/src/ai-elements/context.js +0 -13
- package/dist/src/ai-elements/conversation.js +0 -4
- package/dist/src/ai-elements/jump-rail.js +0 -5
- package/dist/src/ai-elements/message.js +0 -7
- package/dist/src/ai-elements/model-picker-types.js +0 -1
- package/dist/src/ai-elements/model-picker.js +1 -6
- package/dist/src/ai-elements/model-selector.js +0 -4
- package/dist/src/ai-elements/prompt-input-speech.js +0 -13
- package/dist/src/ai-elements/prompt-input.js +0 -1
- package/dist/src/ai-elements/provider-icon.js +0 -4
- package/dist/src/ai-elements/queue.js +0 -15
- package/dist/src/ai-elements/shimmer.js +0 -14
- package/dist/src/ai-elements/speech-input.js +0 -7
- package/dist/src/artifacts/artifact-frame.js +0 -2
- package/dist/src/audio/playChime.js +0 -2
- package/dist/src/audio/playTone.js +1 -4
- package/dist/src/brand/AppWordmark.js +0 -5
- package/dist/src/brand/svg.js +0 -6
- package/dist/src/client.js +0 -43
- package/dist/src/composer/Composer.js +0 -27
- package/dist/src/composer/input-area/InputArea.js +0 -3
- package/dist/src/composer/input-area/InputAreaEditor.js +1 -50
- package/dist/src/composer/input-area/composerPrediction.js +0 -3
- package/dist/src/generative-ui/content.js +0 -2
- package/dist/src/generative-ui/index.js +0 -3
- package/dist/src/generative-ui/layout.js +0 -5
- package/dist/src/hooks/use-count-up-display.js +0 -2
- package/dist/src/hooks/use-idle-callback.js +0 -3
- package/dist/src/hooks/use-persisted-scroll-parent.js +1 -8
- package/dist/src/icons/animated/index.js +0 -4
- package/dist/src/icons/board-icon.js +74 -41
- package/dist/src/icons/bolt-icon.js +30 -20
- package/dist/src/icons/building-icon.js +125 -61
- package/dist/src/icons/files-icon.js +103 -43
- package/dist/src/icons/inbox-icon.js +101 -49
- package/dist/src/icons/index.js +2 -1
- package/dist/src/icons/memory-icon.js +135 -58
- package/dist/src/icons/search-icon.js +143 -46
- package/dist/src/icons/settings-icon.js +113 -53
- package/dist/src/icons/solid-icons.js +665 -0
- package/dist/src/icons/with-active.js +25 -0
- package/dist/src/index.js +0 -40
- package/dist/src/kibo/gantt-features.js +0 -10
- package/dist/src/kibo/gantt-provider.js +0 -34
- package/dist/src/kibo/kanban.js +0 -15
- package/dist/src/kibo/list.js +0 -3
- package/dist/src/kibo/video-player.js +0 -7
- package/dist/src/logos/index.js +0 -4
- package/dist/src/markdown/Markdown.js +0 -15
- package/dist/src/markdown/MarkdownCodeBlock.js +0 -16
- package/dist/src/markdown/MarkdownInlineCode.js +0 -6
- package/dist/src/markdown/MarkdownLink.js +0 -5
- package/dist/src/markdown/codeFence.js +0 -1
- package/dist/src/markdown/codeHighlight.js +0 -19
- package/dist/src/markdown/incrementalBlocks.js +0 -45
- package/dist/src/markdown/markdownClipboard.js +0 -13
- package/dist/src/markdown/mermaid.js +0 -25
- package/dist/src/markdown/rehypeGithubAlerts.js +0 -4
- package/dist/src/markdown/useSmoothText.js +0 -5
- package/dist/src/marketing/PricingModal.js +0 -2
- package/dist/src/marketing/ProductHero.js +0 -2
- package/dist/src/marketing/createLandingKit.js +0 -5
- package/dist/src/marketing/marketing-classes.js +0 -7
- package/dist/src/motion/dock-motion.js +0 -27
- package/dist/src/motion/panel-transition.js +0 -2
- package/dist/src/ui/_field-classes.js +0 -3
- package/dist/src/ui/_menu-classes.js +0 -6
- package/dist/src/ui/_picker-classes.js +0 -9
- package/dist/src/ui/accordion.alt.js +0 -12
- package/dist/src/ui/badge.js +0 -1
- package/dist/src/ui/border-beam.js +0 -2
- package/dist/src/ui/breadcrumb.js +0 -15
- package/dist/src/ui/bulk-action-bar.js +0 -11
- package/dist/src/ui/button.js +0 -20
- package/dist/src/ui/calendar.js +1 -20
- package/dist/src/ui/card.js +0 -3
- package/dist/src/ui/carousel.js +0 -1
- package/dist/src/ui/clear-input.alt.js +0 -9
- package/dist/src/ui/clearInputDissolve.js +0 -4
- package/dist/src/ui/command.js +0 -15
- package/dist/src/ui/confetti-burst.js +0 -3
- package/dist/src/ui/confirm-dialog-parts.js +0 -11
- package/dist/src/ui/confirm-dialog.js +0 -6
- package/dist/src/ui/crossfade-icon.js +0 -2
- package/dist/src/ui/date-picker.js +0 -22
- package/dist/src/ui/dialog.js +0 -5
- package/dist/src/ui/empty-state.js +0 -7
- package/dist/src/ui/field.js +0 -21
- package/dist/src/ui/image-lightbox.js +0 -5
- package/dist/src/ui/input-group.alt.js +0 -24
- package/dist/src/ui/input-group.js +0 -4
- package/dist/src/ui/kbd.js +0 -3
- package/dist/src/ui/loading-state.js +0 -17
- package/dist/src/ui/marquee-on-hover.js +0 -3
- package/dist/src/ui/media-preview.js +0 -2
- package/dist/src/ui/modalTransition.js +0 -33
- package/dist/src/ui/overlay-a11y.js +0 -1
- package/dist/src/ui/page-title.js +0 -3
- package/dist/src/ui/refresh-spin-icon.js +0 -12
- package/dist/src/ui/search-input.js +0 -1
- package/dist/src/ui/select-field.js +0 -1
- package/dist/src/ui/send-queue-icon.js +0 -3
- package/dist/src/ui/sheet.js +0 -33
- package/dist/src/ui/slider.js +103 -82
- package/dist/src/ui/sonner-icons.js +0 -5
- package/dist/src/ui/sonner.js +0 -60
- package/dist/src/ui/spinner.js +0 -35
- package/dist/src/ui/status-dot.js +0 -2
- package/dist/src/ui/surface.js +0 -14
- package/dist/src/ui/switch.js +213 -36
- package/dist/src/ui/table.js +0 -1
- package/dist/src/ui/tabs-transition.js +0 -1
- package/dist/src/ui/tabs.js +0 -17
- package/dist/src/ui/tabsSliding.js +0 -6
- package/dist/src/ui/time-picker.js +0 -15
- package/dist/src/ui/toggle-search.js +0 -3
- package/dist/src/ui/ui-config.js +0 -16
- package/dist/src/utils/cat-color.js +0 -17
- package/dist/src/utils/cn.js +0 -5
- package/dist/src/utils/gesture.js +0 -8
- package/dist/src/utils/ref.js +0 -1
- package/dist/src/utils/runtimeVisibility.js +1 -22
- package/dist/src/utils/surface-radius.js +0 -11
- package/dist/src/utils/useDragSensors.js +0 -4
- package/dist/tokens/src/tailwind-preset.mjs +0 -3
- package/package.json +1 -1
- package/scripts/build-brand-assets.mjs +0 -8
- package/shell/src/AppShell.tsx +0 -37
- package/shell/src/AppSidebar.tsx +0 -14
- package/shell/src/ButtonTrack.tsx +0 -1
- package/shell/src/PageHeaderBar.tsx +0 -61
- package/shell/src/PageWrapper.tsx +0 -26
- package/shell/src/PillTabs.tsx +0 -1
- package/shell/src/SessionsHoverCard.tsx +0 -40
- package/shell/src/SidePanelTabs.tsx +0 -61
- package/shell/src/Sidebar.tsx +0 -1
- package/shell/src/SidebarAccountMenu.tsx +0 -40
- package/shell/src/SidebarChrome.tsx +0 -32
- package/shell/src/SidebarIconTooltip.tsx +0 -3
- package/shell/src/SidebarPanel.tsx +0 -20
- package/shell/src/SidebarRail.tsx +0 -44
- package/shell/src/SidebarResize.tsx +0 -6
- package/shell/src/SidebarUpgradeCard.tsx +0 -2
- package/shell/src/SignOutDialog.tsx +0 -6
- package/shell/src/app-shell-classes.ts +0 -15
- package/shell/src/index.ts +0 -1
- package/shell/src/shell-panel-motion.ts +0 -11
- package/shell/src/shell-variant.ts +0 -6
- package/src/ai-elements/activity-question.tsx +0 -2
- package/src/ai-elements/activity-shared.tsx +0 -11
- package/src/ai-elements/activity-step-detail.tsx +0 -2
- package/src/ai-elements/activity-step-label.ts +0 -5
- package/src/ai-elements/activity-step-types.ts +0 -24
- package/src/ai-elements/activity-tasks-utils.ts +0 -13
- package/src/ai-elements/activity-tasks.tsx +0 -61
- package/src/ai-elements/artifact.tsx +0 -7
- package/src/ai-elements/attachments.tsx +0 -33
- package/src/ai-elements/chat-day-divider.tsx +0 -3
- package/src/ai-elements/chat-jump-rail.tsx +0 -9
- package/src/ai-elements/code-block.tsx +0 -28
- package/src/ai-elements/collapsible-user-message-body.tsx +0 -2
- package/src/ai-elements/context.tsx +0 -10
- package/src/ai-elements/conversation.tsx +0 -16
- package/src/ai-elements/jump-rail.tsx +0 -31
- package/src/ai-elements/message.tsx +0 -32
- package/src/ai-elements/model-picker-content.tsx +0 -17
- package/src/ai-elements/model-picker-types.ts +0 -5
- package/src/ai-elements/model-picker.tsx +0 -36
- package/src/ai-elements/model-selector.tsx +0 -5
- package/src/ai-elements/prompt-input-speech.tsx +0 -11
- package/src/ai-elements/prompt-input.tsx +0 -26
- package/src/ai-elements/provider-icon.tsx +0 -2
- package/src/ai-elements/queue.tsx +0 -19
- package/src/ai-elements/reasoning.tsx +0 -4
- package/src/ai-elements/shimmer.tsx +0 -16
- package/src/ai-elements/simple-model-ladder.tsx +0 -1
- package/src/ai-elements/speech-input.tsx +0 -6
- package/src/ai-elements/test-results.tsx +0 -5
- package/src/ai-elements/trace.tsx +0 -2
- package/src/ai-elements/web-preview.tsx +0 -7
- package/src/artifacts/artifact-card.tsx +0 -7
- package/src/artifacts/artifact-dialogs.tsx +0 -4
- package/src/artifacts/artifact-frame.tsx +0 -10
- package/src/artifacts/artifact-list-toolbar.tsx +0 -6
- package/src/artifacts/artifact-list.tsx +0 -4
- package/src/artifacts/artifact-type-icon.tsx +0 -1
- package/src/artifacts/artifact-versions-menu.tsx +0 -3
- package/src/artifacts/artifact-viewer.tsx +0 -5
- package/src/artifacts/types.ts +0 -1
- package/src/audio/playChime.ts +0 -1
- package/src/audio/playTone.ts +0 -7
- package/src/brand/AppIcons.tsx +0 -5
- package/src/brand/AppMark.tsx +0 -6
- package/src/brand/AppWordmark.tsx +0 -10
- package/src/brand/familyApps.ts +0 -2
- package/src/brand/svg.ts +0 -9
- package/src/client.ts +0 -34
- package/src/composer/Composer.tsx +0 -70
- package/src/composer/input-area/ComposerSlashMenu.tsx +0 -1
- package/src/composer/input-area/ConnectionStatusMenuItem.tsx +0 -2
- package/src/composer/input-area/FadePresence.tsx +0 -4
- package/src/composer/input-area/InputActions.tsx +0 -5
- package/src/composer/input-area/InputArea.tsx +1 -28
- package/src/composer/input-area/InputAreaEditor.tsx +0 -39
- package/src/composer/input-area/InputBanners.tsx +0 -1
- package/src/composer/input-area/PromoBanner.tsx +0 -1
- package/src/composer/input-area/composerPrediction.ts +0 -2
- package/src/composer/input-area/useComposerSlashMenu.ts +0 -1
- package/src/composer/input-area/useInputAreaPrediction.ts +0 -1
- package/src/composer/prediction.ts +0 -6
- package/src/composer/useComposerPrediction.ts +0 -2
- package/src/generative-ui/GenerativeUiPanel.tsx +0 -11
- package/src/generative-ui/content.tsx +0 -2
- package/src/generative-ui/index.ts +0 -3
- package/src/generative-ui/layout.tsx +0 -5
- package/src/hooks/use-count-up-display.ts +0 -1
- package/src/hooks/use-idle-callback.ts +0 -5
- package/src/hooks/use-persisted-scroll-parent.ts +0 -4
- package/src/hooks/use-single-flight.ts +0 -5
- package/src/icons/animated/animated-bell-icon.tsx +0 -6
- package/src/icons/animated/animated-counter.tsx +0 -5
- package/src/icons/animated/animated-key-icon.tsx +0 -4
- package/src/icons/animated/animated-notification-icon.tsx +0 -14
- package/src/icons/animated/animated-progress.tsx +0 -10
- package/src/icons/animated/animated-status-dot.tsx +0 -4
- package/src/icons/animated/index.ts +0 -4
- package/src/icons/animated/morphing-menu-icon.tsx +0 -5
- package/src/icons/animated/morphing-mic-icon.tsx +0 -2
- package/src/icons/animated/pulsing-rings.tsx +0 -4
- package/src/icons/automation-icon.tsx +0 -1
- package/src/icons/board-icon.tsx +13 -10
- package/src/icons/bolt-icon.tsx +5 -4
- package/src/icons/building-icon.tsx +11 -9
- package/src/icons/draft-icon.tsx +0 -1
- package/src/icons/files-icon.tsx +9 -5
- package/src/icons/inbox-arrow-icon.tsx +0 -1
- package/src/icons/inbox-icon.tsx +9 -5
- package/src/icons/index.ts +12 -1
- package/src/icons/memory-icon.tsx +9 -11
- package/src/icons/nav-icon-base.tsx +0 -10
- package/src/icons/search-icon.tsx +7 -6
- package/src/icons/settings-icon.tsx +11 -13
- package/src/icons/sidebar-toggle-icon.tsx +0 -1
- package/src/icons/solid-icons.tsx +138 -0
- package/src/icons/with-active.tsx +14 -0
- package/src/index.ts +0 -30
- package/src/kibo/gantt-features.tsx +0 -16
- package/src/kibo/gantt-header.tsx +0 -4
- package/src/kibo/gantt-provider.tsx +0 -36
- package/src/kibo/gantt-sidebar.tsx +0 -7
- package/src/kibo/gantt-timeline.tsx +0 -4
- package/src/kibo/kanban.tsx +0 -49
- package/src/kibo/list.tsx +0 -8
- package/src/kibo/theme-switcher.tsx +0 -5
- package/src/kibo/video-player.tsx +0 -9
- package/src/logos/index.ts +0 -3
- package/src/logos/logo-svg.tsx +0 -5
- package/src/markdown/Markdown.tsx +0 -20
- package/src/markdown/MarkdownCodeBlock.tsx +0 -14
- package/src/markdown/MarkdownInlineCode.tsx +0 -6
- package/src/markdown/MarkdownLink.tsx +0 -4
- package/src/markdown/codeFence.ts +0 -3
- package/src/markdown/codeHighlight.ts +0 -16
- package/src/markdown/incrementalBlocks.ts +0 -49
- package/src/markdown/markdownClipboard.ts +0 -12
- package/src/markdown/mermaid.ts +0 -22
- package/src/markdown/rehypeGithubAlerts.ts +0 -3
- package/src/markdown/useSmoothText.ts +0 -5
- package/src/marketing/FloatingBar.tsx +0 -3
- package/src/marketing/PricingModal.tsx +0 -45
- package/src/marketing/ProductHero.tsx +0 -23
- package/src/marketing/ProductHeroOrbit.tsx +0 -5
- package/src/marketing/SiteFooter.tsx +0 -23
- package/src/marketing/SiteHeader.tsx +0 -14
- package/src/marketing/VProPricingModal.tsx +0 -5
- package/src/marketing/createLandingKit.tsx +0 -12
- package/src/marketing/landing.tsx +0 -12
- package/src/marketing/marketing-classes.ts +0 -7
- package/src/motion/dock-motion.ts +0 -25
- package/src/motion/list-enter.tsx +0 -4
- package/src/motion/panel-transition.tsx +0 -5
- package/src/ui/_field-classes.ts +0 -2
- package/src/ui/_menu-classes.ts +0 -4
- package/src/ui/_menu-parts.tsx +0 -5
- package/src/ui/_picker-classes.ts +0 -6
- package/src/ui/accordion.alt.tsx +0 -8
- package/src/ui/accordion.tsx +0 -4
- package/src/ui/badge.tsx +0 -1
- package/src/ui/border-beam.tsx +0 -11
- package/src/ui/breadcrumb.tsx +0 -13
- package/src/ui/bulk-action-bar.tsx +0 -24
- package/src/ui/button.tsx +0 -27
- package/src/ui/calendar.tsx +0 -18
- package/src/ui/card.tsx +0 -3
- package/src/ui/carousel.tsx +0 -4
- package/src/ui/checkbox.tsx +0 -1
- package/src/ui/clear-input.alt.tsx +0 -8
- package/src/ui/clear-input.tsx +0 -16
- package/src/ui/clearInputDissolve.ts +0 -4
- package/src/ui/command.tsx +0 -22
- package/src/ui/confetti-burst.tsx +0 -4
- package/src/ui/confirm-dialog-parts.tsx +0 -45
- package/src/ui/confirm-dialog.tsx +0 -26
- package/src/ui/context-menu.tsx +0 -10
- package/src/ui/count-pop.tsx +0 -2
- package/src/ui/crossfade-icon.tsx +0 -3
- package/src/ui/date-picker.tsx +0 -40
- package/src/ui/dialog.tsx +0 -18
- package/src/ui/dropdown-menu.tsx +0 -11
- package/src/ui/empty-state.tsx +0 -15
- package/src/ui/error-boundary.tsx +0 -7
- package/src/ui/field.tsx +0 -18
- package/src/ui/hover-card.tsx +0 -6
- package/src/ui/image-lightbox.tsx +0 -7
- package/src/ui/input-group.alt.tsx +0 -16
- package/src/ui/input-group.tsx +0 -3
- package/src/ui/kbd.tsx +0 -3
- package/src/ui/label.tsx +0 -1
- package/src/ui/labeled-slider-row.tsx +0 -2
- package/src/ui/list-row.tsx +0 -46
- package/src/ui/loading-state.tsx +0 -23
- package/src/ui/marquee-on-hover.tsx +1 -6
- package/src/ui/media-preview.tsx +0 -5
- package/src/ui/modalTransition.ts +0 -25
- package/src/ui/overlay-a11y.ts +0 -1
- package/src/ui/page-title.tsx +0 -4
- package/src/ui/popover.tsx +0 -8
- package/src/ui/progress.tsx +0 -1
- package/src/ui/refresh-spin-icon.tsx +0 -11
- package/src/ui/relative-date-time.tsx +0 -3
- package/src/ui/rolling-number.tsx +0 -2
- package/src/ui/search-input.tsx +0 -9
- package/src/ui/select-field.tsx +0 -5
- package/src/ui/select.tsx +0 -8
- package/src/ui/send-queue-icon.tsx +0 -3
- package/src/ui/separator.tsx +0 -1
- package/src/ui/sheet.tsx +0 -42
- package/src/ui/slide-over-panel.tsx +0 -2
- package/src/ui/slider.tsx +21 -9
- package/src/ui/sonner-icons.tsx +0 -4
- package/src/ui/sonner.tsx +0 -78
- package/src/ui/spinner.tsx +0 -50
- package/src/ui/status-dot.tsx +0 -10
- package/src/ui/surface.tsx +0 -13
- package/src/ui/switch.tsx +72 -3
- package/src/ui/table.tsx +0 -3
- package/src/ui/tabs-transition.tsx +0 -12
- package/src/ui/tabs.tsx +0 -17
- package/src/ui/tabsSliding.ts +0 -5
- package/src/ui/time-picker.tsx +0 -17
- package/src/ui/toggle-search.tsx +0 -6
- package/src/ui/toolbar-search-input.tsx +0 -3
- package/src/ui/tooltip.tsx +0 -5
- package/src/ui/ui-config.tsx +0 -19
- package/src/utils/cat-color.ts +0 -20
- package/src/utils/cn.ts +0 -4
- package/src/utils/gesture.ts +0 -8
- package/src/utils/ref.ts +0 -1
- package/src/utils/runtimeVisibility.ts +0 -19
- package/src/utils/surface-radius.ts +0 -11
- package/src/utils/useDragSensors.ts +0 -2
- package/tokens/examples/compat-shadcn-rgb/vite.config.ts +0 -2
- package/tokens/examples/toaster/Fixture.tsx +0 -4
- package/tokens/examples/toaster/UpdateToastFixture.tsx +0 -4
- package/tokens/examples/toaster/vite.config.ts +0 -2
- package/tokens/examples/tokens-moved/Fixture.tsx +0 -4
- package/tokens/examples/tokens-moved/vite.config.ts +0 -2
- package/tokens/src/tailwind-preset.mjs +0 -3
package/dist/src/ui/slider.js
CHANGED
|
@@ -5,12 +5,8 @@ import { useCn, useUiConfig } from "./ui-config.js";
|
|
|
5
5
|
|
|
6
6
|
/** `UiConfig.Slider`: `classes` replace the built-in part classes; the `*ClassName` props still merge after. */
|
|
7
7
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
8
|
-
// `id`, `aria-label`, `aria-labelledby` and `aria-valuetext` go to the first
|
|
9
|
-
// Thumb, not Root: the thumb is the focusable role="slider" element, so
|
|
10
|
-
// `<Label htmlFor={id}>` and the accessible name land on it. The ref stays on Root.
|
|
11
|
-
// `children` render inside the track, after the range (for example tick marks).
|
|
12
8
|
const Slider = /*#__PURE__*/React.forwardRef((t0, ref) => {
|
|
13
|
-
const $ = _c(
|
|
9
|
+
const $ = _c(29);
|
|
14
10
|
const {
|
|
15
11
|
className,
|
|
16
12
|
id,
|
|
@@ -27,106 +23,131 @@ const Slider = /*#__PURE__*/React.forwardRef((t0, ref) => {
|
|
|
27
23
|
const classes = useUiConfig("Slider")?.classes;
|
|
28
24
|
const cn = useCn();
|
|
29
25
|
const count = (props.value ?? props.defaultValue ?? [props.min ?? 0]).length;
|
|
30
|
-
const
|
|
31
|
-
const
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
26
|
+
const [dragging, setDragging] = React.useState(false);
|
|
27
|
+
const [activeIndex, setActiveIndex] = React.useState(0);
|
|
28
|
+
const {
|
|
29
|
+
onPointerDown,
|
|
30
|
+
disabled
|
|
31
|
+
} = props;
|
|
32
|
+
let t1;
|
|
33
|
+
let t2;
|
|
34
|
+
if ($[0] !== dragging) {
|
|
35
|
+
t1 = () => {
|
|
36
|
+
if (!dragging) {
|
|
37
|
+
return;
|
|
38
|
+
}
|
|
39
|
+
const stop = () => setDragging(false);
|
|
40
|
+
window.addEventListener("pointerup", stop);
|
|
41
|
+
window.addEventListener("pointercancel", stop);
|
|
42
|
+
return () => {
|
|
43
|
+
window.removeEventListener("pointerup", stop);
|
|
44
|
+
window.removeEventListener("pointercancel", stop);
|
|
45
|
+
};
|
|
46
|
+
};
|
|
47
|
+
t2 = [dragging];
|
|
48
|
+
$[0] = dragging;
|
|
49
|
+
$[1] = t1;
|
|
37
50
|
$[2] = t2;
|
|
38
|
-
$[3] = t3;
|
|
39
51
|
} else {
|
|
40
|
-
|
|
52
|
+
t1 = $[1];
|
|
53
|
+
t2 = $[2];
|
|
41
54
|
}
|
|
42
|
-
|
|
55
|
+
React.useEffect(t1, t2);
|
|
56
|
+
const t3 = SliderPrimitive;
|
|
57
|
+
const t4 = classes?.root ?? "relative flex w-full touch-none select-none items-center data-[disabled]:cursor-not-allowed data-[disabled]:opacity-50 data-[orientation=vertical]:h-full data-[orientation=vertical]:min-h-40 data-[orientation=vertical]:w-auto data-[orientation=vertical]:flex-col";
|
|
43
58
|
let t5;
|
|
44
|
-
if ($[
|
|
45
|
-
t5 = cn(t4,
|
|
59
|
+
if ($[3] !== className || $[4] !== cn || $[5] !== t4) {
|
|
60
|
+
t5 = cn(t4, className);
|
|
61
|
+
$[3] = className;
|
|
46
62
|
$[4] = cn;
|
|
47
63
|
$[5] = t4;
|
|
48
|
-
$[6] =
|
|
49
|
-
$[7] = t5;
|
|
64
|
+
$[6] = t5;
|
|
50
65
|
} else {
|
|
51
|
-
t5 = $[
|
|
66
|
+
t5 = $[6];
|
|
52
67
|
}
|
|
53
|
-
const t6 =
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
68
|
+
const t6 = event => {
|
|
69
|
+
onPointerDown?.(event);
|
|
70
|
+
if (!disabled) {
|
|
71
|
+
setDragging(true);
|
|
72
|
+
}
|
|
73
|
+
};
|
|
74
|
+
const t7 = classes?.track ?? "relative grow overflow-hidden rounded-full bg-default dark:bg-muted/40 data-[orientation=horizontal]:h-1.5 data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-1.5";
|
|
75
|
+
let t8;
|
|
76
|
+
if ($[7] !== cn || $[8] !== t7 || $[9] !== trackClassName) {
|
|
77
|
+
t8 = cn(t7, trackClassName);
|
|
78
|
+
$[7] = cn;
|
|
79
|
+
$[8] = t7;
|
|
80
|
+
$[9] = trackClassName;
|
|
81
|
+
$[10] = t8;
|
|
61
82
|
} else {
|
|
62
|
-
|
|
83
|
+
t8 = $[10];
|
|
63
84
|
}
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
$[12] =
|
|
70
|
-
$[13] =
|
|
85
|
+
const t9 = classes?.range ?? "absolute bg-primary data-[orientation=horizontal]:h-full data-[orientation=vertical]:w-full";
|
|
86
|
+
let t10;
|
|
87
|
+
if ($[11] !== cn || $[12] !== rangeClassName || $[13] !== t9) {
|
|
88
|
+
t10 = cn(t9, rangeClassName);
|
|
89
|
+
$[11] = cn;
|
|
90
|
+
$[12] = rangeClassName;
|
|
91
|
+
$[13] = t9;
|
|
92
|
+
$[14] = t10;
|
|
71
93
|
} else {
|
|
72
|
-
|
|
94
|
+
t10 = $[14];
|
|
73
95
|
}
|
|
74
|
-
let
|
|
75
|
-
if ($[
|
|
76
|
-
|
|
77
|
-
className:
|
|
78
|
-
children: [t8, children]
|
|
96
|
+
let t11;
|
|
97
|
+
if ($[15] !== t10) {
|
|
98
|
+
t11 = /*#__PURE__*/_jsx(SliderPrimitive.Range, {
|
|
99
|
+
className: t10
|
|
79
100
|
});
|
|
80
|
-
$[
|
|
81
|
-
$[
|
|
82
|
-
$[16] = t8;
|
|
83
|
-
$[17] = t9;
|
|
101
|
+
$[15] = t10;
|
|
102
|
+
$[16] = t11;
|
|
84
103
|
} else {
|
|
85
|
-
|
|
104
|
+
t11 = $[16];
|
|
86
105
|
}
|
|
87
|
-
let
|
|
88
|
-
if ($[
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
$[
|
|
97
|
-
$[19] = ariaLabelledBy;
|
|
98
|
-
$[20] = ariaValueText;
|
|
99
|
-
$[21] = classes?.thumb;
|
|
100
|
-
$[22] = cn;
|
|
101
|
-
$[23] = id;
|
|
102
|
-
$[24] = thumbClassName;
|
|
103
|
-
$[25] = thumbLabels;
|
|
104
|
-
$[26] = t10;
|
|
106
|
+
let t12;
|
|
107
|
+
if ($[17] !== children || $[18] !== t11 || $[19] !== t8) {
|
|
108
|
+
t12 = /*#__PURE__*/_jsxs(SliderPrimitive.Track, {
|
|
109
|
+
className: t8,
|
|
110
|
+
children: [t11, children]
|
|
111
|
+
});
|
|
112
|
+
$[17] = children;
|
|
113
|
+
$[18] = t11;
|
|
114
|
+
$[19] = t8;
|
|
115
|
+
$[20] = t12;
|
|
105
116
|
} else {
|
|
106
|
-
|
|
117
|
+
t12 = $[20];
|
|
107
118
|
}
|
|
108
|
-
const
|
|
119
|
+
const t13 = Array.from({
|
|
109
120
|
length: count
|
|
110
|
-
},
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
121
|
+
}, (_, i) => /*#__PURE__*/_jsx(SliderPrimitive.Thumb, {
|
|
122
|
+
id: i === 0 ? id : undefined,
|
|
123
|
+
"aria-label": thumbLabels?.[i] ?? (i === 0 ? ariaLabel : undefined),
|
|
124
|
+
"aria-labelledby": i === 0 ? ariaLabelledBy : undefined,
|
|
125
|
+
"aria-valuetext": i === 0 ? ariaValueText : undefined,
|
|
126
|
+
"data-dragging": dragging && (count === 1 || activeIndex === i) ? "" : undefined,
|
|
127
|
+
onFocus: () => setActiveIndex(i),
|
|
128
|
+
className: cn(classes?.thumb ?? "block h-5 w-8 shrink-0 rounded-full border border-border bg-background shadow-sm [transition-property:scale,background-color,border-color,box-shadow,backdrop-filter] duration-200 ease-smooth motion-reduce:transition-none focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-focus-ring data-[disabled]:cursor-not-allowed data-[orientation=vertical]:h-8 data-[orientation=vertical]:w-5 data-[dragging]:[scale:1.45] data-[dragging]:border-background/70 data-[dragging]:bg-background/25 data-[dragging]:backdrop-blur-[2px] data-[dragging]:backdrop-saturate-150 data-[dragging]:shadow-[inset_0_1px_1px_rgb(255_255_255/0.9),inset_0_-1px_2px_rgb(255_255_255/0.45),0_10px_28px_rgb(0_0_0/0.2)] dark:border-muted dark:bg-foreground dark:data-[dragging]:border-foreground/40 dark:data-[dragging]:bg-foreground/25", thumbClassName)
|
|
129
|
+
}, i));
|
|
130
|
+
let t14;
|
|
131
|
+
if ($[21] !== props || $[22] !== ref || $[23] !== t12 || $[24] !== t13 || $[25] !== t3.Root || $[26] !== t5 || $[27] !== t6) {
|
|
132
|
+
t14 = /*#__PURE__*/_jsxs(t3.Root, {
|
|
133
|
+
className: t5,
|
|
115
134
|
...props,
|
|
135
|
+
onPointerDown: t6,
|
|
116
136
|
ref: ref,
|
|
117
|
-
children: [
|
|
137
|
+
children: [t12, t13]
|
|
118
138
|
});
|
|
119
|
-
$[
|
|
120
|
-
$[
|
|
121
|
-
$[
|
|
122
|
-
$[
|
|
123
|
-
$[
|
|
124
|
-
$[
|
|
125
|
-
$[
|
|
139
|
+
$[21] = props;
|
|
140
|
+
$[22] = ref;
|
|
141
|
+
$[23] = t12;
|
|
142
|
+
$[24] = t13;
|
|
143
|
+
$[25] = t3.Root;
|
|
144
|
+
$[26] = t5;
|
|
145
|
+
$[27] = t6;
|
|
146
|
+
$[28] = t14;
|
|
126
147
|
} else {
|
|
127
|
-
|
|
148
|
+
t14 = $[28];
|
|
128
149
|
}
|
|
129
|
-
return
|
|
150
|
+
return t14;
|
|
130
151
|
});
|
|
131
152
|
Slider.displayName = SliderPrimitive.Root.displayName;
|
|
132
153
|
export { Slider };
|
|
@@ -1,8 +1,5 @@
|
|
|
1
1
|
import { c as _c } from "react/compiler-runtime";
|
|
2
2
|
import { Spinner } from "./spinner.js";
|
|
3
|
-
|
|
4
|
-
// 24px filled icons for `SonnerToaster` (`toastIcons="filled24"`). Self-contained
|
|
5
|
-
// SVGs, tinted with package colour tokens. Sonner wraps each in its `data-icon` slot.
|
|
6
3
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
7
4
|
function InfoIcon() {
|
|
8
5
|
const $ = _c(1);
|
|
@@ -110,8 +107,6 @@ function CloseIcon() {
|
|
|
110
107
|
}
|
|
111
108
|
return t0;
|
|
112
109
|
}
|
|
113
|
-
|
|
114
|
-
/** 24px success / info / warning / error icons, a matching loader and a 14px close cross. */
|
|
115
110
|
const filledToastIcons = {
|
|
116
111
|
success: /*#__PURE__*/_jsx(SuccessIcon, {}),
|
|
117
112
|
info: /*#__PURE__*/_jsx(InfoIcon, {}),
|
package/dist/src/ui/sonner.js
CHANGED
|
@@ -3,52 +3,14 @@ import { Toaster as SonnerPrimitive } from "sonner";
|
|
|
3
3
|
import { filledToastIcons } from "./sonner-icons.js";
|
|
4
4
|
import { useUiConfig } from "./ui-config.js";
|
|
5
5
|
import "./sonner.css";
|
|
6
|
-
|
|
7
|
-
// Sonner toaster aligned with flat tonal surfaces. `unstyled: true` strips
|
|
8
|
-
// sonner's default visual styling so our classes are the single source of
|
|
9
|
-
// truth. Toast surfaces use `glass-panel-strong` (flat popover fill) plus
|
|
10
|
-
// `smooth-shadow-ring-md`. `!font-sans` is forced on the toaster section because
|
|
11
|
-
// sonner sets its own `font-family` on `[data-sonner-toaster]` from a stylesheet
|
|
12
|
-
// that loads after app globals. Variant icons (success / error / warning / info)
|
|
13
|
-
// are tinted via a `data-icon` descendant selector, leaving the rest of the toast
|
|
14
|
-
// neutral. Callers should pass `theme` so sonner's internal `data-theme`
|
|
15
|
-
// attribute matches the active app theme.
|
|
16
|
-
//
|
|
17
|
-
// Position: `top-right` by default (sonner's own default is `bottom-right`), as
|
|
18
|
-
// apps mount it. A `position` prop or `UiConfig.SonnerToaster.position` wins.
|
|
19
|
-
// `mobileOffset` adds the safe-area insets to sonner's 16px; a prop or config replaces it.
|
|
20
|
-
//
|
|
21
|
-
// Stacking: `expand={false}` keeps toasts collapsed (offset + scale). Hovering
|
|
22
|
-
// the stack expands them. `sonner.css` hides back-toast content while collapsed
|
|
23
|
-
// because `unstyled` disables sonner's built-in `data-styled` stack rules.
|
|
24
|
-
//
|
|
25
|
-
// Caller props merge with these defaults instead of replacing them: see
|
|
26
|
-
// `mergeToastClassNames`, `mergeToasterStyle` and the `SonnerToaster` props.
|
|
27
|
-
|
|
28
|
-
/**
|
|
29
|
-
* App defaults for `SonnerToaster` (`UiConfig.SonnerToaster`): every key is a
|
|
30
|
-
* default for the prop of the same name. An explicit prop wins; a prop passed
|
|
31
|
-
* as `undefined` keeps the config value.
|
|
32
|
-
*/
|
|
33
6
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
34
7
|
const defaultToasterClassName = "toaster group !font-sans";
|
|
35
8
|
const hideStackedContentClassName = "[&[data-expanded=false][data-front=false]>*]:opacity-0";
|
|
36
9
|
const hoverChipCloseButtonClassName = "pointer-events-none absolute -right-2 -top-2 z-10 flex h-6 w-6 items-center justify-center rounded-full border border-border bg-card/95 text-muted-foreground opacity-0 transition-opacity hover:border-border! hover:text-foreground focus-visible:pointer-events-auto focus-visible:opacity-100 focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring group-hover:pointer-events-auto group-hover:opacity-100 max-sm:pointer-events-auto max-sm:opacity-100 max-sm:hit-target";
|
|
37
10
|
const defaultCloseButtonClassName = "rounded-lg bg-default px-2.5 py-1 text-xs font-medium text-foreground transition-colors hover:bg-default/78";
|
|
38
|
-
|
|
39
|
-
// Action and cancel buttons: 28px tall (`h-7`), 10px side padding, 12px text,
|
|
40
|
-
// `rounded-control` (10px), the classes apps already set through `classes`.
|
|
41
|
-
// Measured on the toaster fixture's Refresh button: 28px tall, up from 24px with the 0.31.0
|
|
42
|
-
// `px-2.5 py-1 rounded-lg` (16px radius) string. `shrink-0` keeps the button
|
|
43
|
-
// from squeezing when the text column grows. `motion-press` is an app utility
|
|
44
|
-
// (not in `tokens.css`), as in `BulkActionBar`.
|
|
45
11
|
const defaultActionButtonClassName = "h-7 shrink-0 rounded-control bg-primary px-2.5 text-xs font-medium text-primary-foreground motion-press active:scale-[0.96] hover:bg-primary/90";
|
|
46
12
|
const defaultCancelButtonClassName = "h-7 shrink-0 rounded-control bg-surface-secondary px-2.5 text-xs font-medium text-muted-foreground transition-colors hover:bg-surface-tertiary";
|
|
47
13
|
const defaultToasterPosition = "top-right";
|
|
48
|
-
|
|
49
|
-
// Sonner's 16px phone offset (viewport up to 600px) plus the safe-area inset, so
|
|
50
|
-
// toasts clear the notch and home indicator under a translucent status bar
|
|
51
|
-
// (`viewport-fit=cover`). `env()` is 0 without it. Left and right keep 16px.
|
|
52
14
|
const defaultMobileOffset = {
|
|
53
15
|
top: "calc(16px + env(safe-area-inset-top, 0px))",
|
|
54
16
|
bottom: "calc(16px + env(safe-area-inset-bottom, 0px))"
|
|
@@ -58,12 +20,6 @@ const toastRadiusClasses = {
|
|
|
58
20
|
surface: "rounded-surface",
|
|
59
21
|
control: "rounded-field"
|
|
60
22
|
};
|
|
61
|
-
|
|
62
|
-
/**
|
|
63
|
-
* Default `classNames`, with the opt-in variants applied. No options gives the
|
|
64
|
-
* 0.2.1 defaults, plus `content` and the 28px `actionButton` and `cancelButton`
|
|
65
|
-
* (from 0.31.1).
|
|
66
|
-
*/
|
|
67
23
|
function createToasterClassNames({
|
|
68
24
|
toastRadius = "lg",
|
|
69
25
|
density = "default",
|
|
@@ -77,11 +33,7 @@ function createToasterClassNames({
|
|
|
77
33
|
const descriptionSize = compact ? "text-xs" : "text-[13px]";
|
|
78
34
|
return {
|
|
79
35
|
toast: `group toast glass-panel-strong flex w-full items-center ${compact ? "gap-2" : "gap-3"} ${radius} ${compact ? "px-3 py-2 text-xs" : "px-4 py-3 text-sm"} text-foreground smooth-shadow-ring-md${hideStackedContent ? ` ${hideStackedContentClassName}` : ""}`,
|
|
80
|
-
// `unstyled` drops sonner's `[data-content]` grow, so the text column grows
|
|
81
|
-
// here and the action and cancel buttons sit at the right edge.
|
|
82
36
|
content: "flex min-w-0 grow flex-col",
|
|
83
|
-
// `unstyled` also drops sonner's `position: relative` on `[data-icon]`, so
|
|
84
|
-
// the absolutely positioned `.sonner-loader` anchors here, not to the toast.
|
|
85
37
|
icon: "relative",
|
|
86
38
|
title: titleLeading === "5" ? "font-medium leading-5" : "font-medium leading-snug",
|
|
87
39
|
description: descriptionMuted ? `${descriptionSize} leading-snug text-muted-foreground!` : `${descriptionSize} leading-snug text-muted-foreground`,
|
|
@@ -95,8 +47,6 @@ function createToasterClassNames({
|
|
|
95
47
|
info: "[&_[data-icon]]:text-primary"
|
|
96
48
|
};
|
|
97
49
|
}
|
|
98
|
-
|
|
99
|
-
/** Per key, joins the default class string and the caller string (defaults first, so callers win). */
|
|
100
50
|
function mergeToastClassNames(defaults, overrides) {
|
|
101
51
|
if (!overrides) return defaults;
|
|
102
52
|
const merged = {
|
|
@@ -109,8 +59,6 @@ function mergeToastClassNames(defaults, overrides) {
|
|
|
109
59
|
}
|
|
110
60
|
return merged;
|
|
111
61
|
}
|
|
112
|
-
|
|
113
|
-
/** Sonner variables read from `--color-*` tokens. Work with `tokens.css` and the compat file. */
|
|
114
62
|
const sonnerVarsStyle = {
|
|
115
63
|
fontFamily: "inherit",
|
|
116
64
|
"--normal-bg": "var(--color-card)",
|
|
@@ -119,8 +67,6 @@ const sonnerVarsStyle = {
|
|
|
119
67
|
"--normal-bg-hover": "var(--color-muted)",
|
|
120
68
|
"--normal-border-hover": "var(--color-border)"
|
|
121
69
|
};
|
|
122
|
-
|
|
123
|
-
/** `{ ...defaults, ...overrides }`. The package adds no style keys unless `sonnerVars` is on. */
|
|
124
70
|
function mergeToasterStyle(defaults, overrides) {
|
|
125
71
|
if (!defaults) return overrides;
|
|
126
72
|
return overrides ? {
|
|
@@ -128,8 +74,6 @@ function mergeToasterStyle(defaults, overrides) {
|
|
|
128
74
|
...overrides
|
|
129
75
|
} : defaults;
|
|
130
76
|
}
|
|
131
|
-
|
|
132
|
-
/** Package defaults first. Caller wins per field, except `classNames`, which merge. */
|
|
133
77
|
function mergeToastOptions(defaults, overrides) {
|
|
134
78
|
const {
|
|
135
79
|
classNames,
|
|
@@ -141,8 +85,6 @@ function mergeToastOptions(defaults, overrides) {
|
|
|
141
85
|
classNames: mergeToastClassNames(defaults.classNames ?? {}, classNames)
|
|
142
86
|
};
|
|
143
87
|
}
|
|
144
|
-
|
|
145
|
-
/** `{ ...defaults, ...props }`, except that a prop set to `undefined` keeps its default. */
|
|
146
88
|
function withConfigDefaults(defaults, props) {
|
|
147
89
|
const merged = {
|
|
148
90
|
...defaults,
|
|
@@ -154,8 +96,6 @@ function withConfigDefaults(defaults, props) {
|
|
|
154
96
|
}
|
|
155
97
|
return merged;
|
|
156
98
|
}
|
|
157
|
-
|
|
158
|
-
/** Defaults come from `UiConfig.SonnerToaster` when the app sets it; explicit props win. */
|
|
159
99
|
function SonnerToaster(props) {
|
|
160
100
|
const $ = _c(10);
|
|
161
101
|
const {
|
package/dist/src/ui/spinner.js
CHANGED
|
@@ -20,8 +20,6 @@ const sizeClasses = {
|
|
|
20
20
|
|
|
21
21
|
/** Stroke colours of the `circle` variant. Each defaults to `currentColor`. */
|
|
22
22
|
|
|
23
|
-
/** Props every variant renderer takes: the svg props plus the shared ones. */
|
|
24
|
-
|
|
25
23
|
function a11yProps(decorative) {
|
|
26
24
|
return decorative ? {
|
|
27
25
|
"aria-hidden": true
|
|
@@ -30,16 +28,6 @@ function a11yProps(decorative) {
|
|
|
30
28
|
"aria-label": "Loading"
|
|
31
29
|
};
|
|
32
30
|
}
|
|
33
|
-
|
|
34
|
-
/**
|
|
35
|
-
* Runs the dash around one shape: `stroke-dashoffset` 0 → -1 over 2s, forever,
|
|
36
|
-
* against `pathLength=1`. Web Animations rather than SMIL `<animate>`: SMIL
|
|
37
|
-
* ticks each shape's animated attribute on its own (a style recalc per shape
|
|
38
|
-
* per frame); WAAPI folds into the frame's single recalc and needs no app
|
|
39
|
-
* keyframes. {@link bindRuntimeAnimation} pauses it while the tab is hidden or
|
|
40
|
-
* the shape is off screen. Module-level so the ref identity is stable across
|
|
41
|
-
* renders; React 19 runs the returned cleanup on detach.
|
|
42
|
-
*/
|
|
43
31
|
function traceDash(shape) {
|
|
44
32
|
if (!shape) return undefined;
|
|
45
33
|
const trace = shape.animate([{
|
|
@@ -166,13 +154,6 @@ function MarkSpinner(t0) {
|
|
|
166
154
|
}
|
|
167
155
|
return t8;
|
|
168
156
|
}
|
|
169
|
-
|
|
170
|
-
/**
|
|
171
|
-
* Rotates the arc around the viewBox centre, forever. Web Animations rather
|
|
172
|
-
* than a CSS class: WAAPI gives {@link bindRuntimeAnimation} a handle to pause
|
|
173
|
-
* the loop while the tab is hidden or the spinner is off screen, which a CSS
|
|
174
|
-
* `animate-spin` cannot offer. Module-level so the ref identity is stable.
|
|
175
|
-
*/
|
|
176
157
|
function spinArc(arc) {
|
|
177
158
|
const spin = arc.animate([{
|
|
178
159
|
transform: "rotate(0deg)"
|
|
@@ -185,15 +166,6 @@ function spinArc(arc) {
|
|
|
185
166
|
});
|
|
186
167
|
return bindRuntimeAnimation(arc, spin);
|
|
187
168
|
}
|
|
188
|
-
|
|
189
|
-
/**
|
|
190
|
-
* The `circle` variant: a faint full ring with a two-tone arc sweeping around it.
|
|
191
|
-
*
|
|
192
|
-
* The arc is two circles rather than one gradient stroke: a gradient only
|
|
193
|
-
* samples the slice of its box the arc crosses, so at 12–16px one end washes
|
|
194
|
-
* out. Drawing `lead` over the leading half of a longer `arc` dash keeps both
|
|
195
|
-
* colours legible at every size, and needs no per-instance gradient id.
|
|
196
|
-
*/
|
|
197
169
|
function CircleSpinner(t0) {
|
|
198
170
|
const $ = _c(29);
|
|
199
171
|
let className;
|
|
@@ -351,8 +323,6 @@ function CircleSpinner(t0) {
|
|
|
351
323
|
}
|
|
352
324
|
return t14;
|
|
353
325
|
}
|
|
354
|
-
|
|
355
|
-
/** The `ring` variant: the `Button` loading ring, a fixed markup with a CSS `animate-spin`. */
|
|
356
326
|
function RingSpinner(t0) {
|
|
357
327
|
const $ = _c(11);
|
|
358
328
|
let className;
|
|
@@ -423,11 +393,6 @@ function RingSpinner(t0) {
|
|
|
423
393
|
}
|
|
424
394
|
return t4;
|
|
425
395
|
}
|
|
426
|
-
|
|
427
|
-
/**
|
|
428
|
-
* The one loading spinner: the loader icon, an app mark with a running dash,
|
|
429
|
-
* the two-tone `circle`, or the `Button` `ring`. See {@link SpinnerProps.variant}.
|
|
430
|
-
*/
|
|
431
396
|
function Spinner(t0) {
|
|
432
397
|
const $ = _c(10);
|
|
433
398
|
const {
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import { c as _c } from "react/compiler-runtime";
|
|
2
2
|
import { useCn, useUiConfig } from "./ui-config.js";
|
|
3
3
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
4
|
-
// Plain Record so Tailwind's static-class scanner can see every literal
|
|
5
|
-
// class here — a computed `bg-${tone}` string would not survive the purge.
|
|
6
4
|
const TONE_CLASS = {
|
|
7
5
|
progress: "bg-warning",
|
|
8
6
|
"business-review": "bg-primary",
|
package/dist/src/ui/surface.js
CHANGED
|
@@ -3,27 +3,13 @@ import * as React from "react";
|
|
|
3
3
|
import { cva } from "class-variance-authority";
|
|
4
4
|
import { useCn } from "./ui-config.js";
|
|
5
5
|
import { SURFACE_RADIUS_CLASS } from "../utils/surface-radius.js";
|
|
6
|
-
|
|
7
|
-
/**
|
|
8
|
-
* A panel with the card fill and one of four paddings.
|
|
9
|
-
*
|
|
10
|
-
* `Card` splits padding across Header / Content / Footer, which is right for a
|
|
11
|
-
* titled card and wrong for a box that just needs one padding. Density is a
|
|
12
|
-
* prop rather than a `className` so the paddings stay a closed set;
|
|
13
|
-
* `className` still overrides when a layout needs it.
|
|
14
|
-
*/
|
|
15
6
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
16
7
|
const surfaceVariants = cva(`${SURFACE_RADIUS_CLASS} bg-card text-card-foreground`, {
|
|
17
8
|
variants: {
|
|
18
9
|
density: {
|
|
19
|
-
// Dense list items and inline panels.
|
|
20
10
|
tight: "p-3",
|
|
21
|
-
// The default box: settings sections, stat cards, banners.
|
|
22
11
|
default: "p-4",
|
|
23
|
-
// Standalone cards that carry a heading of their own.
|
|
24
12
|
comfortable: "p-6",
|
|
25
|
-
// The caller owns padding entirely — for surfaces with their own
|
|
26
|
-
// internal regions, such as a table that must reach the edge.
|
|
27
13
|
none: ""
|
|
28
14
|
}
|
|
29
15
|
},
|