@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/switch.js
CHANGED
|
@@ -6,70 +6,247 @@ import { useCn, useUiConfig } from "./ui-config.js";
|
|
|
6
6
|
|
|
7
7
|
/** `UiConfig.Switch`: `classes` replace the built-in part classes. */
|
|
8
8
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
9
|
+
const PRESSED_THUMB_PX = 34;
|
|
10
|
+
const DRAG_THRESHOLD_PX = 3;
|
|
9
11
|
const Switch = /*#__PURE__*/React.forwardRef((t0, ref) => {
|
|
10
|
-
const $ = _c(
|
|
12
|
+
const $ = _c(43);
|
|
11
13
|
let className;
|
|
14
|
+
let onClick;
|
|
15
|
+
let onPointerCancel;
|
|
16
|
+
let onPointerDown;
|
|
17
|
+
let onPointerMove;
|
|
18
|
+
let onPointerUp;
|
|
12
19
|
let props;
|
|
13
20
|
if ($[0] !== t0) {
|
|
14
21
|
({
|
|
15
22
|
className,
|
|
23
|
+
onPointerDown,
|
|
24
|
+
onPointerMove,
|
|
25
|
+
onPointerUp,
|
|
26
|
+
onPointerCancel,
|
|
27
|
+
onClick,
|
|
16
28
|
...props
|
|
17
29
|
} = t0);
|
|
18
30
|
$[0] = t0;
|
|
19
31
|
$[1] = className;
|
|
20
|
-
$[2] =
|
|
32
|
+
$[2] = onClick;
|
|
33
|
+
$[3] = onPointerCancel;
|
|
34
|
+
$[4] = onPointerDown;
|
|
35
|
+
$[5] = onPointerMove;
|
|
36
|
+
$[6] = onPointerUp;
|
|
37
|
+
$[7] = props;
|
|
21
38
|
} else {
|
|
22
39
|
className = $[1];
|
|
23
|
-
|
|
40
|
+
onClick = $[2];
|
|
41
|
+
onPointerCancel = $[3];
|
|
42
|
+
onPointerDown = $[4];
|
|
43
|
+
onPointerMove = $[5];
|
|
44
|
+
onPointerUp = $[6];
|
|
45
|
+
props = $[7];
|
|
24
46
|
}
|
|
25
47
|
const classes = useUiConfig("Switch")?.classes;
|
|
26
48
|
const merge = useCn();
|
|
27
|
-
const
|
|
28
|
-
let
|
|
29
|
-
if ($[
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
49
|
+
const [dragX, setDragX] = React.useState(null);
|
|
50
|
+
let t1;
|
|
51
|
+
if ($[8] === Symbol.for("react.memo_cache_sentinel")) {
|
|
52
|
+
t1 = {
|
|
53
|
+
startClientX: 0,
|
|
54
|
+
startX: 0,
|
|
55
|
+
active: false,
|
|
56
|
+
moved: false
|
|
57
|
+
};
|
|
58
|
+
$[8] = t1;
|
|
35
59
|
} else {
|
|
36
|
-
|
|
60
|
+
t1 = $[8];
|
|
37
61
|
}
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
62
|
+
const drag = React.useRef(t1);
|
|
63
|
+
const swallowClick = React.useRef(false);
|
|
64
|
+
const programmatic = React.useRef(false);
|
|
65
|
+
const range = _temp;
|
|
66
|
+
const wantsChecked = _temp2;
|
|
67
|
+
let t2;
|
|
68
|
+
if ($[9] === Symbol.for("react.memo_cache_sentinel")) {
|
|
69
|
+
t2 = event => {
|
|
70
|
+
const state = drag.current;
|
|
71
|
+
if (!state.active) {
|
|
72
|
+
return;
|
|
73
|
+
}
|
|
74
|
+
state.active = false;
|
|
75
|
+
const el_1 = event.currentTarget;
|
|
76
|
+
if (state.moved) {
|
|
77
|
+
swallowClick.current = true;
|
|
78
|
+
const x_0 = Math.min(Math.max(state.startX + event.clientX - state.startClientX, 0), range(el_1));
|
|
79
|
+
if (wantsChecked(el_1, x_0) !== (el_1.dataset.state === "checked")) {
|
|
80
|
+
programmatic.current = true;
|
|
81
|
+
el_1.click();
|
|
82
|
+
programmatic.current = false;
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
setDragX(null);
|
|
86
|
+
};
|
|
87
|
+
$[9] = t2;
|
|
43
88
|
} else {
|
|
44
|
-
|
|
89
|
+
t2 = $[9];
|
|
45
90
|
}
|
|
91
|
+
const finish = t2;
|
|
92
|
+
const t3 = classes?.root ?? "peer group relative inline-flex h-5 w-12 shrink-0 cursor-pointer touch-pan-y select-none items-center rounded-full border border-border bg-default transition-[background-color,border-color] duration-200 ease-smooth focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-focus-ring disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:border-primary data-[state=checked]:bg-primary data-[state=unchecked]:bg-default dark:data-[state=unchecked]:border-muted/60 dark:data-[state=unchecked]:bg-muted/40 before:absolute before:inset-[-8px] before:content-['']";
|
|
46
93
|
let t4;
|
|
47
|
-
if ($[
|
|
48
|
-
t4 =
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
$[
|
|
52
|
-
$[
|
|
94
|
+
if ($[10] !== className || $[11] !== merge || $[12] !== t3) {
|
|
95
|
+
t4 = merge(t3, className);
|
|
96
|
+
$[10] = className;
|
|
97
|
+
$[11] = merge;
|
|
98
|
+
$[12] = t3;
|
|
99
|
+
$[13] = t4;
|
|
53
100
|
} else {
|
|
54
|
-
t4 = $[
|
|
101
|
+
t4 = $[13];
|
|
55
102
|
}
|
|
56
103
|
let t5;
|
|
57
|
-
if ($[
|
|
58
|
-
t5 =
|
|
59
|
-
|
|
104
|
+
if ($[14] !== onClick) {
|
|
105
|
+
t5 = event_0 => {
|
|
106
|
+
onClick?.(event_0);
|
|
107
|
+
if (swallowClick.current && !programmatic.current) {
|
|
108
|
+
swallowClick.current = false;
|
|
109
|
+
event_0.preventDefault();
|
|
110
|
+
}
|
|
111
|
+
};
|
|
112
|
+
$[14] = onClick;
|
|
113
|
+
$[15] = t5;
|
|
114
|
+
} else {
|
|
115
|
+
t5 = $[15];
|
|
116
|
+
}
|
|
117
|
+
let t6;
|
|
118
|
+
if ($[16] !== onPointerDown || $[17] !== props.disabled) {
|
|
119
|
+
t6 = event_1 => {
|
|
120
|
+
onPointerDown?.(event_1);
|
|
121
|
+
if (props.disabled || event_1.button !== 0) {
|
|
122
|
+
return;
|
|
123
|
+
}
|
|
124
|
+
swallowClick.current = false;
|
|
125
|
+
const el_2 = event_1.currentTarget;
|
|
126
|
+
drag.current = {
|
|
127
|
+
startClientX: event_1.clientX,
|
|
128
|
+
startX: el_2.dataset.state === "checked" ? range(el_2) : 0,
|
|
129
|
+
active: true,
|
|
130
|
+
moved: false
|
|
131
|
+
};
|
|
132
|
+
el_2.setPointerCapture(event_1.pointerId);
|
|
133
|
+
};
|
|
134
|
+
$[16] = onPointerDown;
|
|
135
|
+
$[17] = props.disabled;
|
|
136
|
+
$[18] = t6;
|
|
137
|
+
} else {
|
|
138
|
+
t6 = $[18];
|
|
139
|
+
}
|
|
140
|
+
let t7;
|
|
141
|
+
if ($[19] !== onPointerMove) {
|
|
142
|
+
t7 = event_2 => {
|
|
143
|
+
onPointerMove?.(event_2);
|
|
144
|
+
const state_0 = drag.current;
|
|
145
|
+
if (!state_0.active) {
|
|
146
|
+
return;
|
|
147
|
+
}
|
|
148
|
+
const dx = event_2.clientX - state_0.startClientX;
|
|
149
|
+
if (!state_0.moved && Math.abs(dx) < DRAG_THRESHOLD_PX) {
|
|
150
|
+
return;
|
|
151
|
+
}
|
|
152
|
+
state_0.moved = true;
|
|
153
|
+
setDragX(Math.min(Math.max(state_0.startX + dx, 0), range(event_2.currentTarget)));
|
|
154
|
+
};
|
|
155
|
+
$[19] = onPointerMove;
|
|
156
|
+
$[20] = t7;
|
|
157
|
+
} else {
|
|
158
|
+
t7 = $[20];
|
|
159
|
+
}
|
|
160
|
+
let t8;
|
|
161
|
+
if ($[21] !== onPointerUp) {
|
|
162
|
+
t8 = event_3 => {
|
|
163
|
+
onPointerUp?.(event_3);
|
|
164
|
+
finish(event_3);
|
|
165
|
+
};
|
|
166
|
+
$[21] = onPointerUp;
|
|
167
|
+
$[22] = t8;
|
|
168
|
+
} else {
|
|
169
|
+
t8 = $[22];
|
|
170
|
+
}
|
|
171
|
+
let t9;
|
|
172
|
+
if ($[23] !== onPointerCancel) {
|
|
173
|
+
t9 = event_4 => {
|
|
174
|
+
onPointerCancel?.(event_4);
|
|
175
|
+
drag.current.active = false;
|
|
176
|
+
drag.current.moved = false;
|
|
177
|
+
setDragX(null);
|
|
178
|
+
};
|
|
179
|
+
$[23] = onPointerCancel;
|
|
180
|
+
$[24] = t9;
|
|
181
|
+
} else {
|
|
182
|
+
t9 = $[24];
|
|
183
|
+
}
|
|
184
|
+
const t10 = dragX === null ? undefined : "";
|
|
185
|
+
let t11;
|
|
186
|
+
if ($[25] !== dragX) {
|
|
187
|
+
t11 = dragX === null ? undefined : {
|
|
188
|
+
"--switch-x": `${dragX}px`
|
|
189
|
+
};
|
|
190
|
+
$[25] = dragX;
|
|
191
|
+
$[26] = t11;
|
|
192
|
+
} else {
|
|
193
|
+
t11 = $[26];
|
|
194
|
+
}
|
|
195
|
+
let t12;
|
|
196
|
+
if ($[27] !== classes?.thumb) {
|
|
197
|
+
t12 = classes?.thumb ?? cn("pointer-events-none block h-4 w-4 rounded-full bg-background shadow-sm ring-0 [transition-property:transform,translate,width,height,background-color,box-shadow,backdrop-filter] duration-200 ease-smooth motion-reduce:transition-none data-[state=checked]:translate-x-[30px] data-[state=checked]:bg-primary-foreground data-[state=unchecked]:translate-x-0 dark:data-[state=unchecked]:bg-foreground group-active:h-7 group-active:w-[34px] group-active:data-[state=checked]:translate-x-3 group-active:bg-background/10 group-active:backdrop-blur-[1px] group-active:backdrop-saturate-200 group-active:shadow-[inset_0_0_0_1px_rgb(255_255_255/0.55),inset_0_3px_4px_rgb(255_255_255/0.85),inset_0_-3px_4px_rgb(255_255_255/0.5),0_8px_20px_rgb(0_0_0/0.16)] group-disabled:group-active:h-4 group-disabled:group-active:w-4 group-disabled:group-active:data-[state=checked]:translate-x-[30px] data-[dragging]:translate-x-(--switch-x)! data-[dragging]:[transition-property:width,height,background-color,box-shadow,backdrop-filter]");
|
|
198
|
+
$[27] = classes?.thumb;
|
|
199
|
+
$[28] = t12;
|
|
200
|
+
} else {
|
|
201
|
+
t12 = $[28];
|
|
202
|
+
}
|
|
203
|
+
let t13;
|
|
204
|
+
if ($[29] !== t10 || $[30] !== t11 || $[31] !== t12) {
|
|
205
|
+
t13 = /*#__PURE__*/_jsx(SwitchPrimitive.Thumb, {
|
|
206
|
+
"data-dragging": t10,
|
|
207
|
+
style: t11,
|
|
208
|
+
className: t12
|
|
209
|
+
});
|
|
210
|
+
$[29] = t10;
|
|
211
|
+
$[30] = t11;
|
|
212
|
+
$[31] = t12;
|
|
213
|
+
$[32] = t13;
|
|
214
|
+
} else {
|
|
215
|
+
t13 = $[32];
|
|
216
|
+
}
|
|
217
|
+
let t14;
|
|
218
|
+
if ($[33] !== props || $[34] !== ref || $[35] !== t13 || $[36] !== t4 || $[37] !== t5 || $[38] !== t6 || $[39] !== t7 || $[40] !== t8 || $[41] !== t9) {
|
|
219
|
+
t14 = /*#__PURE__*/_jsx(SwitchPrimitive.Root, {
|
|
220
|
+
className: t4,
|
|
60
221
|
...props,
|
|
61
222
|
ref: ref,
|
|
62
|
-
|
|
223
|
+
onClick: t5,
|
|
224
|
+
onPointerDown: t6,
|
|
225
|
+
onPointerMove: t7,
|
|
226
|
+
onPointerUp: t8,
|
|
227
|
+
onPointerCancel: t9,
|
|
228
|
+
children: t13
|
|
63
229
|
});
|
|
64
|
-
$[
|
|
65
|
-
$[
|
|
66
|
-
$[
|
|
67
|
-
$[
|
|
68
|
-
$[
|
|
230
|
+
$[33] = props;
|
|
231
|
+
$[34] = ref;
|
|
232
|
+
$[35] = t13;
|
|
233
|
+
$[36] = t4;
|
|
234
|
+
$[37] = t5;
|
|
235
|
+
$[38] = t6;
|
|
236
|
+
$[39] = t7;
|
|
237
|
+
$[40] = t8;
|
|
238
|
+
$[41] = t9;
|
|
239
|
+
$[42] = t14;
|
|
69
240
|
} else {
|
|
70
|
-
|
|
241
|
+
t14 = $[42];
|
|
71
242
|
}
|
|
72
|
-
return
|
|
243
|
+
return t14;
|
|
73
244
|
});
|
|
74
245
|
Switch.displayName = SwitchPrimitive.Root.displayName;
|
|
75
246
|
export { Switch };
|
|
247
|
+
function _temp(el) {
|
|
248
|
+
return Math.max(0, el.clientWidth - PRESSED_THUMB_PX);
|
|
249
|
+
}
|
|
250
|
+
function _temp2(el_0, x) {
|
|
251
|
+
return x + PRESSED_THUMB_PX / 2 > el_0.clientWidth / 2;
|
|
252
|
+
}
|
package/dist/src/ui/table.js
CHANGED
|
@@ -2,7 +2,6 @@ import { c as _c } from "react/compiler-runtime";
|
|
|
2
2
|
import * as React from "react";
|
|
3
3
|
import { useCn, useUiConfig } from "./ui-config.js";
|
|
4
4
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
5
|
-
/** The app's class string for `part` (else `fallback`), merged with the caller `className`. */
|
|
6
5
|
function useTableClass(part, fallback, className) {
|
|
7
6
|
const $ = _c(4);
|
|
8
7
|
const merge = useCn();
|
package/dist/src/ui/tabs.js
CHANGED
|
@@ -8,11 +8,6 @@ import { useCn, useUiConfig } from "./ui-config.js";
|
|
|
8
8
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
9
9
|
const Tabs = TabsPrimitive.Root;
|
|
10
10
|
|
|
11
|
-
// `pills` (default): isolated rounded pills with a gap, no shared track.
|
|
12
|
-
// `segmented`: connected bar with a sliding pill, kept for marketing surfaces.
|
|
13
|
-
// `soft`: borderless wrapping pills, the active one filled. Uses no `t-tabs`
|
|
14
|
-
// CSS, so triggers can hold an absolutely placed child (e.g. a progress bar).
|
|
15
|
-
|
|
16
11
|
/**
|
|
17
12
|
* `UiConfig.Tabs`. `classes` replace built-in part classes (`list` replaces
|
|
18
13
|
* the list classes of every variant, `trigger` those of every trigger).
|
|
@@ -21,7 +16,6 @@ const Tabs = TabsPrimitive.Root;
|
|
|
21
16
|
* lists that wrap or run in a column.
|
|
22
17
|
*/
|
|
23
18
|
|
|
24
|
-
// `sm` shrinks the triggers from the list, so callers do not size each one.
|
|
25
19
|
const tabsListSizeClasses = {
|
|
26
20
|
default: "",
|
|
27
21
|
sm: "[&_.t-tab]:px-2.5 [&_.t-tab]:py-1 [&_.t-tab]:text-xs"
|
|
@@ -311,12 +305,6 @@ export const tabsBarVariants = cva("flex shrink-0 flex-wrap items-center gap-2 b
|
|
|
311
305
|
size: "default"
|
|
312
306
|
}
|
|
313
307
|
});
|
|
314
|
-
|
|
315
|
-
/**
|
|
316
|
-
* Page- or panel-level tab strip: a `TabsList` on the hairline that divides it
|
|
317
|
-
* from the content below, with an optional trailing `actions` slot for toolbar
|
|
318
|
-
* controls. `size="sm"` for nested panels; `className` overrides the padding.
|
|
319
|
-
*/
|
|
320
308
|
const TabsBar = /*#__PURE__*/React.forwardRef((t0, ref) => {
|
|
321
309
|
const $ = _c(18);
|
|
322
310
|
let actions;
|
|
@@ -389,10 +377,5 @@ const TabsBar = /*#__PURE__*/React.forwardRef((t0, ref) => {
|
|
|
389
377
|
return t3;
|
|
390
378
|
});
|
|
391
379
|
TabsBar.displayName = "TabsBar";
|
|
392
|
-
|
|
393
|
-
// raw radix primitives, use these when you need a tabs layout that the
|
|
394
|
-
// styled `tabs`/`tabslist`/`tabstrigger`/`tabscontent` defaults don't fit
|
|
395
|
-
// (e.g a vertical sidebar of tabs inside a popover) the styled exports
|
|
396
|
-
// above are tuned for horizontal pill, style tab bars
|
|
397
380
|
export { TabsPrimitive };
|
|
398
381
|
export { Tabs, TabsBar, TabsList, TabsTrigger, TabsContent };
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
// transitions.dev tabs sliding, see 16, tabs, sliding.md
|
|
2
|
-
|
|
3
1
|
function findActiveTab(list) {
|
|
4
2
|
const tabs = list.querySelectorAll(".t-tab");
|
|
5
3
|
for (const tab of tabs) {
|
|
@@ -12,10 +10,6 @@ function findActiveTab(list) {
|
|
|
12
10
|
}
|
|
13
11
|
return tabs[0] ?? null;
|
|
14
12
|
}
|
|
15
|
-
|
|
16
|
-
// `xy`: both axes on transform (top pinned to 0), so a column list slides the
|
|
17
|
-
// same way a row does; `top` is a layout property and does not tween.
|
|
18
|
-
// Exported for other sliding pills (`Sidebar.RailGroup`).
|
|
19
13
|
export function moveTabsPillXY(pill, tab, animate) {
|
|
20
14
|
const transform = `translate(${tab.offsetLeft}px, ${tab.offsetTop}px)`;
|
|
21
15
|
const width = `${tab.offsetWidth}px`;
|
|
@@ -4,13 +4,6 @@ import { IconClock } from "@tabler/icons-react";
|
|
|
4
4
|
import { Popover, PopoverContent, PopoverTrigger } from "./popover.js";
|
|
5
5
|
import { cn } from "../utils/cn.js";
|
|
6
6
|
import { pickerItemHoverClass, pickerSelectedClass, pickerTriggerClass } from "./_picker-classes.js";
|
|
7
|
-
|
|
8
|
-
// custom 24, hour "hh:mm" time picker replaces `<input type="time">` because the native picker varies wildly
|
|
9
|
-
// across browsers and platforms (chrome/firefox/safari each render a
|
|
10
|
-
// different control, and the spinner buttons feel laggy on windows) ux:, the trigger is styled like an input, same height/border/radius, so it slots into forms without bespoke alignment work, clicking the trigger (or its clock icon) opens a popover with two scrollable columns: hours 00, 23 on the left, minutes 00, 59 on the right click an item to select, the popover stays open so users can set both halves in one trip, selected items use the same `bg, surface, tertiary` treatment used elsewhere for active states, no rings or borders, matching the design system the component is fully controlled, `value` is always "hh:mm" 24h and
|
|
11
|
-
// the consumer is responsible for any local↔utc conversion that keeps
|
|
12
|
-
// the picker free of timezone logic and matches how the rest of the
|
|
13
|
-
// codebase (e.g dream mode) shapes scheduling values
|
|
14
7
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
15
8
|
const HOURS = Array.from({
|
|
16
9
|
length: 24
|
|
@@ -22,7 +15,6 @@ const HOURS_12 = Array.from({
|
|
|
22
15
|
length: 12
|
|
23
16
|
}, (_, i) => String(i + 1).padStart(2, "0"));
|
|
24
17
|
const PERIODS = ["AM", "PM"];
|
|
25
|
-
/** "14" → { hour: "02", period: "PM" }; "00" → { hour: "12", period: "AM" }. */
|
|
26
18
|
function toTwelveHour(hour) {
|
|
27
19
|
const h = Number(hour);
|
|
28
20
|
return {
|
|
@@ -30,8 +22,6 @@ function toTwelveHour(hour) {
|
|
|
30
22
|
period: h < 12 ? "AM" : "PM"
|
|
31
23
|
};
|
|
32
24
|
}
|
|
33
|
-
|
|
34
|
-
/** "02" + "PM" → "14"; "12" + "AM" → "00". */
|
|
35
25
|
function toTwentyFourHour(hour, period) {
|
|
36
26
|
return String(Number(hour) % 12 + (period === "PM" ? 12 : 0)).padStart(2, "0");
|
|
37
27
|
}
|
|
@@ -255,10 +245,6 @@ const TimePicker = /*#__PURE__*/React.forwardRef((t0, ref) => {
|
|
|
255
245
|
return t17;
|
|
256
246
|
});
|
|
257
247
|
TimePicker.displayName = "TimePicker";
|
|
258
|
-
// Centres the selected item when the column mounts. The column lives inside
|
|
259
|
-
// the popover content, which mounts after the trigger's open state changes,
|
|
260
|
-
// so the scroll has to run here rather than in the picker. It sets the
|
|
261
|
-
// column's own `scrollTop`, so the page never scrolls.
|
|
262
248
|
function TimeColumn({
|
|
263
249
|
label,
|
|
264
250
|
values,
|
|
@@ -271,7 +257,6 @@ function TimeColumn({
|
|
|
271
257
|
const item = list?.querySelector(`[data-time-value="${selected}"]`);
|
|
272
258
|
if (!list || !(item instanceof HTMLElement)) return;
|
|
273
259
|
list.scrollTop = item.offsetTop - list.clientHeight / 2 + item.offsetHeight / 2;
|
|
274
|
-
// Mount only: re-centring on every pick would jump the list under the pointer.
|
|
275
260
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
276
261
|
}, []);
|
|
277
262
|
return /*#__PURE__*/_jsxs("div", {
|
|
@@ -5,9 +5,6 @@ import { Button } from "./button.js";
|
|
|
5
5
|
import { Popover, PopoverContent, PopoverTrigger } from "./popover.js";
|
|
6
6
|
import { SearchInput } from "./search-input.js";
|
|
7
7
|
import { Tooltip, TooltipContent, TooltipTrigger } from "./tooltip.js";
|
|
8
|
-
|
|
9
|
-
// "compact" is the always-visible logs/toolbar field. "large" is the icon
|
|
10
|
-
// button + popover, which keeps a crowded toolbar short.
|
|
11
8
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
12
9
|
function SearchField(t0) {
|
|
13
10
|
const $ = _c(11);
|
package/dist/src/ui/ui-config.js
CHANGED
|
@@ -1,18 +1,6 @@
|
|
|
1
1
|
import { c as _c } from "react/compiler-runtime";
|
|
2
2
|
import * as React from "react";
|
|
3
3
|
import { cn } from "../utils/cn.js";
|
|
4
|
-
|
|
5
|
-
// App-level component defaults. An app wraps its tree in `UiConfigProvider`
|
|
6
|
-
// to give components its own classes and behaviour without passing props at
|
|
7
|
-
// every call site. Without a provider (or with an empty entry) every component
|
|
8
|
-
// renders its built-in default, so apps that do not opt in see no change.
|
|
9
|
-
//
|
|
10
|
-
// Conventions for an entry:
|
|
11
|
-
// - `classes` replaces built-in classes part by part. A part left out keeps
|
|
12
|
-
// its default. A caller `className` still merges after it with `cn`.
|
|
13
|
-
// - Other keys are default prop values. An explicit prop always wins.
|
|
14
|
-
//
|
|
15
|
-
// Each component declares its entry type next to its code and adds it here.
|
|
16
4
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
17
5
|
const UiConfigContext = /*#__PURE__*/React.createContext({});
|
|
18
6
|
function UiConfigProvider(t0) {
|
|
@@ -35,13 +23,9 @@ function UiConfigProvider(t0) {
|
|
|
35
23
|
}
|
|
36
24
|
return t1;
|
|
37
25
|
}
|
|
38
|
-
|
|
39
|
-
/** The app's entry for one component, or `undefined` when the app sets none. */
|
|
40
26
|
function useUiConfig(name) {
|
|
41
27
|
return React.useContext(UiConfigContext)[name];
|
|
42
28
|
}
|
|
43
|
-
|
|
44
|
-
/** The app's class merger (`UiConfig.cn`), or the built-in `cn`. */
|
|
45
29
|
function useCn() {
|
|
46
30
|
return React.useContext(UiConfigContext).cn ?? cn;
|
|
47
31
|
}
|
|
@@ -1,18 +1,5 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Muted categorical ramp for hash-assigned identity colour — session tab
|
|
3
|
-
* groups, repo tiles, avatars. Not for status; status uses `status-*`.
|
|
4
|
-
*
|
|
5
|
-
* The ramp is eight CSS vars (`--cat-1` … `--cat-8`, see globals.css),
|
|
6
|
-
* exposed as the Tailwind `cat` colour family. This module owns the
|
|
7
|
-
* id → slot hashing once, so every consumer picks the same slot for the
|
|
8
|
-
* same id and the class names stay literal (Tailwind's extractor cannot
|
|
9
|
-
* see `` `bg-cat-${n}` ``, only the strings written out below).
|
|
10
|
-
*/
|
|
11
|
-
|
|
12
1
|
/** Number of slots in the muted categorical ramp (--cat-1 … --cat-8). */
|
|
13
2
|
export const CAT_SLOT_COUNT = 8;
|
|
14
|
-
// One literal record per slot so Tailwind's class extractor sees every
|
|
15
|
-
// `cat-N` utility it needs to generate — a template string would hide them.
|
|
16
3
|
const CAT_COLOR_CLASSES = {
|
|
17
4
|
1: {
|
|
18
5
|
text: "text-cat-1",
|
|
@@ -63,10 +50,6 @@ const CAT_COLOR_CLASSES = {
|
|
|
63
50
|
border: "border-cat-8"
|
|
64
51
|
}
|
|
65
52
|
};
|
|
66
|
-
|
|
67
|
-
// Maps the hash's 0–7 bucket onto the 1–8 slot type without a cast — indexing
|
|
68
|
-
// a `Record<number, CatSlot>` by the modulo result stays inside the type
|
|
69
|
-
// system, unlike `(index + 1) as CatSlot`.
|
|
70
53
|
const SLOT_BY_INDEX = {
|
|
71
54
|
0: 1,
|
|
72
55
|
1: 2,
|
package/dist/src/utils/cn.js
CHANGED
|
@@ -1,10 +1,5 @@
|
|
|
1
1
|
import { clsx } from "clsx";
|
|
2
2
|
import { extendTailwindMerge } from "tailwind-merge";
|
|
3
|
-
|
|
4
|
-
// `rounded-field` and the tokens.css radii (`rounded-surface`,
|
|
5
|
-
// `rounded-menu`, `rounded-menu-item`, `rounded-control`) are custom radius tokens — teach
|
|
6
|
-
// twMerge they conflict with `rounded-none` / `rounded-md` / etc. so the last
|
|
7
|
-
// radius class wins.
|
|
8
3
|
const twMerge = extendTailwindMerge({
|
|
9
4
|
extend: {
|
|
10
5
|
theme: {
|
|
@@ -1,11 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Gesture physics from Apple's *Designing Fluid Interfaces* (WWDC 2018).
|
|
3
|
-
*
|
|
4
|
-
* These two functions are the whole of it, and both were previously copied
|
|
5
|
-
* verbatim into each surface that needed them. They are pure maths with no
|
|
6
|
-
* React or DOM dependency — import them, do not re-derive them.
|
|
7
|
-
*/
|
|
8
|
-
|
|
9
1
|
/**
|
|
10
2
|
* Progressive resistance past a boundary. A hard stop reads as frozen; damping
|
|
11
3
|
* that grows with the overshoot reads as "responsive, but there is nothing more
|
package/dist/src/utils/ref.js
CHANGED
|
@@ -1,24 +1,5 @@
|
|
|
1
1
|
import { c as _c } from "react/compiler-runtime";
|
|
2
2
|
import { useCallback, useEffect, useRef } from "react";
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* Page-visibility and on-screen budget for infinite animations.
|
|
6
|
-
*
|
|
7
|
-
* CSS animations pause via `html[data-page-hidden]` / `[data-anim-offscreen]`
|
|
8
|
-
* / parked `[aria-hidden="true"]` hosts in the host stylesheet. WAAPI
|
|
9
|
-
* (Spinner, LoadingState) has no CSS play-state hook, so
|
|
10
|
-
* {@link bindRuntimeAnimation} pauses those directly.
|
|
11
|
-
*
|
|
12
|
-
* Decorative animation chrome (`data-anim-chrome` on BorderBeam's overlay,
|
|
13
|
-
* Shimmer's copy, LoadingState's grid) is itself `aria-hidden` so AT skips
|
|
14
|
-
* it. That must not count as "the user cannot see this" — #764 paused every
|
|
15
|
-
* composer beam and session-row Drive grid by matching those hosts.
|
|
16
|
-
*
|
|
17
|
-
* Pausing is visually identical while the user is looking: playback resumes
|
|
18
|
-
* from the same offset when the tab or element is shown again.
|
|
19
|
-
*/
|
|
20
|
-
|
|
21
|
-
/** Parked subtree (cached session shell, minimized Ave). Skips decorative chrome. */
|
|
22
3
|
const ARIA_HIDDEN_SUBTREE = '[aria-hidden="true"]:not([data-anim-chrome])';
|
|
23
4
|
const intersectionListeners = new WeakMap();
|
|
24
5
|
let sharedObserver = null;
|
|
@@ -59,9 +40,7 @@ function getSharedObserver() {
|
|
|
59
40
|
if (!listeners) continue;
|
|
60
41
|
for (const listener of listeners) listener(entry.isIntersecting);
|
|
61
42
|
}
|
|
62
|
-
},
|
|
63
|
-
// Keep a small lead so a scroll into view does not show a frozen frame.
|
|
64
|
-
{
|
|
43
|
+
}, {
|
|
65
44
|
rootMargin: "64px",
|
|
66
45
|
threshold: 0
|
|
67
46
|
});
|
|
@@ -1,14 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Radius classes for theme-aware corners (`tokens.css` or the compat file).
|
|
3
|
-
*
|
|
4
|
-
* - Compact single-line rows that should stay pills on a "full" radius theme:
|
|
5
|
-
* `rounded-lg` (maps to `var(--radius)`).
|
|
6
|
-
* - Menu and nav rows: `rounded-menu-item` (capped).
|
|
7
|
-
* - Controls: `rounded-control` (capped).
|
|
8
|
-
* - Wide or multi-line surfaces (modals, dropdown panels, cards):
|
|
9
|
-
* `rounded-surface` (clamped) so they do not become ovals.
|
|
10
|
-
*/
|
|
11
|
-
|
|
12
1
|
/** Cards, dialogs, dropdown panels, kanban columns, alerts, calendars. */
|
|
13
2
|
export const SURFACE_RADIUS_CLASS = "rounded-surface";
|
|
14
3
|
|
|
@@ -2,11 +2,7 @@ import { c as _c } from "react/compiler-runtime";
|
|
|
2
2
|
import { KeyboardSensor, MouseSensor, TouchSensor, useSensor, useSensors } from "@dnd-kit/core";
|
|
3
3
|
import { sortableKeyboardCoordinates } from "@dnd-kit/sortable";
|
|
4
4
|
import { DRAG_ACTIVATION_DISTANCE_PX } from "./gesture.js";
|
|
5
|
-
|
|
6
|
-
/** How long a finger must rest before a drag arms, in ms. */
|
|
7
5
|
const TOUCH_HOLD_MS = 200;
|
|
8
|
-
|
|
9
|
-
/** How far a finger may stray during the hold without cancelling it, in px. */
|
|
10
6
|
const TOUCH_HOLD_TOLERANCE_PX = 10;
|
|
11
7
|
|
|
12
8
|
/**
|
|
@@ -75,7 +75,6 @@ export function tokensPreset({ color = cssVar } = {}) {
|
|
|
75
75
|
DEFAULT: v("warning"),
|
|
76
76
|
foreground: v("warning-foreground"),
|
|
77
77
|
},
|
|
78
|
-
// Legacy shadcn names mapped to the same tokens.
|
|
79
78
|
primary: {
|
|
80
79
|
DEFAULT: v("accent"),
|
|
81
80
|
foreground: v("accent-foreground"),
|
|
@@ -159,8 +158,6 @@ export function tokensPreset({ color = cssVar } = {}) {
|
|
|
159
158
|
"0%": { transform: "translateX(-100%)" },
|
|
160
159
|
"100%": { transform: "translateX(400%)" },
|
|
161
160
|
},
|
|
162
|
-
// Used by @vvedantb/ui accordion; each app sets its own
|
|
163
|
-
// `animation["accordion-down" | "accordion-up"]` timing.
|
|
164
161
|
"accordion-down": {
|
|
165
162
|
from: { height: "0" },
|
|
166
163
|
to: { height: "var(--radix-accordion-content-height)" },
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vvedantb/ui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.70.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "Shared React 19 UI for web apps: one main JavaScript entry (primitives, shell pieces, app helpers including the Convex and Clerk provider, VITE env parsing and ensure-user, artifact viewers over the @vvedantb/server artifacts core, native tokens), third-party brand logos (also @vvedantb/ui/logos), motion-driven animated SVG icons (@vvedantb/ui/icons/animated), a client entry without @vvedantb/server, convex or Clerk for Chrome extensions, design-token CSS, shared Tailwind v4 CSS, a Tailwind preset and packaged Instrument Sans fonts.",
|
|
6
6
|
"type": "module",
|
|
@@ -1,16 +1,8 @@
|
|
|
1
|
-
// Writes the favicon, PWA, extension and Android icon sets for the family apps.
|
|
2
|
-
//
|
|
3
|
-
// node scripts/build-brand-assets.mjs --out <dir> [--app <name>] [--no-png] [--dry-run]
|
|
4
|
-
//
|
|
5
|
-
// SVGs are always written. PNGs and favicon.ico need `rsvg-convert`; without it they are skipped
|
|
6
|
-
// with a message. Layout: <dir>/<app>/{mark,icon,favicon,icon-light}.svg, PNGs, extension/, android/.
|
|
7
1
|
import { spawnSync } from "node:child_process";
|
|
8
2
|
import { mkdirSync, readFileSync, writeFileSync } from "node:fs";
|
|
9
3
|
import { dirname, join, sep } from "node:path";
|
|
10
4
|
import { fileURLToPath } from "node:url";
|
|
11
5
|
|
|
12
|
-
// Node does not strip types from files under node_modules, so an installed copy
|
|
13
|
-
// of this script strips svg.ts itself (svg.ts has no imports).
|
|
14
6
|
async function loadSvg() {
|
|
15
7
|
const url = new URL("../src/brand/svg.ts", import.meta.url);
|
|
16
8
|
if (!fileURLToPath(url).split(sep).includes("node_modules")) return import(url.href);
|