@heyramzi/ui 0.0.0-stage → 6.1.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/COMPONENTS.md +141 -0
- package/README.md +130 -2
- package/package.json +215 -3
- package/scripts/lib/sync-core.mjs +113 -0
- package/scripts/relative-imports.mjs +39 -0
- package/scripts/sf-symbol.mjs +93 -0
- package/scripts/sync-shadcn.mjs +341 -0
- package/scripts/sync-transitions.mjs +146 -0
- package/scripts/validate-apple-symbol-exports.mjs +45 -0
- package/src/agents/agent-avatar.svelte +639 -0
- package/src/agents/agent-cast.svelte +173 -0
- package/src/agents/demo.svelte +78 -0
- package/src/agents/index.ts +11 -0
- package/src/agents/types.ts +72 -0
- package/src/agents/vendor/LICENSE +21 -0
- package/src/agents/vendor/color.ts +155 -0
- package/src/agents/vendor/draw.ts +840 -0
- package/src/agents/vendor/engine.ts +845 -0
- package/src/agents/vendor/mesh.ts +838 -0
- package/src/agents/vendor/plastic.ts +4958 -0
- package/src/agents/vendor/presets.ts +103 -0
- package/src/agents/vendor/shapes.ts +41 -0
- package/src/agents/vendor/ticker.ts +67 -0
- package/src/agents/vendor/types.ts +261 -0
- package/src/agents/vendor/wear.ts +1699 -0
- package/src/ai/composer/Composer.css +108 -0
- package/src/ai/composer/Composer.svelte +111 -0
- package/src/ai/composer/index.ts +10 -0
- package/src/ai/confirmation/Confirmation.svelte +54 -0
- package/src/ai/confirmation/ConfirmationAccepted.svelte +23 -0
- package/src/ai/confirmation/ConfirmationAction.svelte +53 -0
- package/src/ai/confirmation/ConfirmationActions.svelte +24 -0
- package/src/ai/confirmation/ConfirmationFailed.svelte +23 -0
- package/src/ai/confirmation/ConfirmationRejected.svelte +23 -0
- package/src/ai/confirmation/ConfirmationRequest.svelte +25 -0
- package/src/ai/confirmation/ConfirmationTitle.svelte +25 -0
- package/src/ai/confirmation/confirmation-context.svelte.ts +22 -0
- package/src/ai/confirmation/index.ts +50 -0
- package/src/ai/conversation/Conversation.svelte +28 -0
- package/src/ai/conversation/ConversationContent.svelte +35 -0
- package/src/ai/conversation/ConversationEmptyState.svelte +46 -0
- package/src/ai/conversation/ConversationScrollButton.svelte +51 -0
- package/src/ai/conversation/index.ts +33 -0
- package/src/ai/conversation/stick-to-bottom-context.svelte.ts +131 -0
- package/src/ai/index.ts +119 -0
- package/src/ai/loading-state/PixelLoader.svelte +138 -0
- package/src/ai/loading-state/index.ts +5 -0
- package/src/ai/prompt-input/PromptInput.svelte +38 -0
- package/src/ai/prompt-input/PromptInputBody.svelte +19 -0
- package/src/ai/prompt-input/PromptInputSubmit.svelte +73 -0
- package/src/ai/prompt-input/PromptInputTextarea.svelte +74 -0
- package/src/ai/prompt-input/PromptInputToolbar.svelte +19 -0
- package/src/ai/prompt-input/index.ts +34 -0
- package/src/ai/reasoning/Reasoning.svelte +47 -0
- package/src/ai/reasoning/ReasoningContent.svelte +27 -0
- package/src/ai/reasoning/ReasoningTrigger.svelte +48 -0
- package/src/ai/reasoning/index.ts +22 -0
- package/src/ai/reasoning/reasoning-context.svelte.ts +20 -0
- package/src/ai/response/Response.css +32 -0
- package/src/ai/response/Response.svelte +130 -0
- package/src/ai/response/index.ts +5 -0
- package/src/ai/suggestion/Suggestion.svelte +43 -0
- package/src/ai/suggestion/Suggestions.svelte +25 -0
- package/src/ai/suggestion/index.ts +14 -0
- package/src/ai/thinking-dots/ThinkingDots.svelte +42 -0
- package/src/ai/thinking-dots/index.ts +5 -0
- package/src/ai/typing-dots/TypingDots.css +39 -0
- package/src/ai/typing-dots/TypingDots.svelte +27 -0
- package/src/ai/typing-dots/index.ts +10 -0
- package/src/ai/voice-waveform/VoiceWaveform.css +40 -0
- package/src/ai/voice-waveform/VoiceWaveform.svelte +46 -0
- package/src/ai/voice-waveform/index.ts +5 -0
- package/src/animations/README.md +84 -0
- package/src/animations/accordion.css +58 -0
- package/src/animations/avatar-group-hover.css +47 -0
- package/src/animations/card-tilt.css +74 -0
- package/src/animations/digit-pop-in.css +78 -0
- package/src/animations/dropdown.css +121 -0
- package/src/animations/icon-swap.css +43 -0
- package/src/animations/index.css +34 -0
- package/src/animations/input-clear-dissolve.css +86 -0
- package/src/animations/input-shake.css +114 -0
- package/src/animations/learn-more-hover.css +48 -0
- package/src/animations/like-button.css +93 -0
- package/src/animations/modal.css +75 -0
- package/src/animations/notification-badge.css +81 -0
- package/src/animations/page-side-by-side.css +63 -0
- package/src/animations/panel.css +86 -0
- package/src/animations/plus-menu-morph.css +97 -0
- package/src/animations/reasoning-stream.css +49 -0
- package/src/animations/resize.css +20 -0
- package/src/animations/shimmer-text.css +72 -0
- package/src/animations/skeleton-reveal.css +97 -0
- package/src/animations/spinning-counter.css +52 -0
- package/src/animations/streaming-text.css +31 -0
- package/src/animations/success-check.css +120 -0
- package/src/animations/tabs-sliding.css +83 -0
- package/src/animations/text-swap.css +40 -0
- package/src/animations/text-swap.ts +40 -0
- package/src/animations/texts-reveal.css +70 -0
- package/src/animations/thinking-states.css +65 -0
- package/src/animations/tooltip.css +72 -0
- package/src/animations/upstream-coverage.test.ts +65 -0
- package/src/animations/view-transition-reveal.ts +74 -0
- package/src/charts/animated-value.css +7 -0
- package/src/charts/animated-value.svelte +110 -0
- package/src/charts/area-chart.css +29 -0
- package/src/charts/area-chart.svelte +195 -0
- package/src/charts/bar-chart.css +119 -0
- package/src/charts/bar-chart.svelte +269 -0
- package/src/charts/charts.css +201 -0
- package/src/charts/crosshair.svelte +35 -0
- package/src/charts/donut-chart.css +56 -0
- package/src/charts/donut-chart.svelte +158 -0
- package/src/charts/edge-fade.svelte +43 -0
- package/src/charts/edge-fade.ts +16 -0
- package/src/charts/figure.css +100 -0
- package/src/charts/figure.svelte +122 -0
- package/src/charts/gauge-chart.css +94 -0
- package/src/charts/gauge-chart.svelte +303 -0
- package/src/charts/hover-band.test.ts +30 -0
- package/src/charts/hover-band.ts +21 -0
- package/src/charts/hover-focus.svelte +85 -0
- package/src/charts/index.ts +30 -0
- package/src/charts/legend.css +131 -0
- package/src/charts/legend.svelte +112 -0
- package/src/charts/line-chart.css +26 -0
- package/src/charts/line-chart.svelte +256 -0
- package/src/charts/motion.ts +19 -0
- package/src/charts/number-chart.css +168 -0
- package/src/charts/number-chart.svelte +177 -0
- package/src/charts/primitives/chart-container.svelte +57 -0
- package/src/charts/primitives/chart-style.svelte +36 -0
- package/src/charts/primitives/chart-tooltip.svelte +161 -0
- package/src/charts/primitives/chart-utils.ts +54 -0
- package/src/charts/primitives/index.ts +11 -0
- package/src/charts/reveal.svelte +61 -0
- package/src/charts/ring-chart.css +96 -0
- package/src/charts/ring-chart.svelte +158 -0
- package/src/charts/sparkline.css +45 -0
- package/src/charts/sparkline.svelte +140 -0
- package/src/charts/stat-card.css +103 -0
- package/src/charts/stat-card.svelte +267 -0
- package/src/charts/time-series-chart.css +28 -0
- package/src/charts/time-series-chart.svelte +179 -0
- package/src/charts/trend-pill.css +38 -0
- package/src/charts/trend-pill.svelte +48 -0
- package/src/design/index.css +270 -0
- package/src/design/polish.css +159 -0
- package/src/effects/animated-beam/AnimatedBeam.svelte +132 -0
- package/src/effects/animated-beam/diagrams/BeamSvg.svelte +91 -0
- package/src/effects/animated-beam/index.ts +2 -0
- package/src/effects/animated-beam/path-calculator.svelte.ts +70 -0
- package/src/effects/animated-beam/types.ts +23 -0
- package/src/effects/border-beam/BorderBeam.svelte +223 -0
- package/src/effects/border-beam/css.test.ts +46 -0
- package/src/effects/border-beam/css.ts +574 -0
- package/src/effects/border-beam/presets.ts +699 -0
- package/src/effects/border-beam/register-properties.test.ts +74 -0
- package/src/effects/border-beam/register-properties.ts +73 -0
- package/src/effects/border-beam/types.ts +38 -0
- package/src/effects/image-comparison/ImageComparison.css +66 -0
- package/src/effects/image-comparison/ImageComparison.svelte +92 -0
- package/src/effects/image-reveal/ImageReveal.css +10 -0
- package/src/effects/image-reveal/ImageReveal.svelte +357 -0
- package/src/effects/image-reveal/index.ts +2 -0
- package/src/effects/image-reveal/types.ts +35 -0
- package/src/effects/magnetic/magnetic.ts +81 -0
- package/src/effects/marquee/Marquee.css +52 -0
- package/src/effects/marquee/Marquee.svelte +96 -0
- package/src/effects/progressive-blur/ProgressiveBlur.css +9 -0
- package/src/effects/progressive-blur/ProgressiveBlur.svelte +63 -0
- package/src/effects/reveal/AnimatedGroup.svelte +101 -0
- package/src/effects/reveal/InView.svelte +77 -0
- package/src/effects/reveal/TextEffect.svelte +142 -0
- package/src/effects/reveal/index.ts +10 -0
- package/src/effects/reveal/observe.ts +33 -0
- package/src/effects/reveal/reveal.css +141 -0
- package/src/effects/reveal/types.ts +25 -0
- package/src/effects/shader-gradient/ShaderGradient.svelte +227 -0
- package/src/effects/shader-gradient/color.ts +44 -0
- package/src/effects/shader-gradient/index.ts +5 -0
- package/src/effects/shader-gradient/renderer.ts +456 -0
- package/src/effects/shader-gradient/shaders.ts +324 -0
- package/src/effects/shader-gradient/types.ts +68 -0
- package/src/effects/spotlight/Spotlight.css +14 -0
- package/src/effects/spotlight/Spotlight.svelte +61 -0
- package/src/effects/theme-toggle/ThemeToggle.css +21 -0
- package/src/effects/theme-toggle/ThemeToggle.svelte +101 -0
- package/src/icons/TradeIcon.svelte +16 -0
- package/src/icons/apple-symbol-exports.ts +135 -0
- package/src/icons/sf-symbols.ts +527 -0
- package/src/icons/trades.ts +89 -0
- package/src/index.ts +49 -0
- package/src/lib/arrive.ts +26 -0
- package/src/lib/hooks/is-mobile.svelte.ts +11 -0
- package/src/lib/icon-types.ts +17 -0
- package/src/lib/layout.ts +8 -0
- package/src/lib/panel.ts +15 -0
- package/src/lib/theme-transition.ts +51 -0
- package/src/lib/utils.ts +45 -0
- package/src/shadcn/accordion/accordion-content.svelte +22 -0
- package/src/shadcn/accordion/accordion-item.svelte +17 -0
- package/src/shadcn/accordion/accordion-trigger.svelte +35 -0
- package/src/shadcn/accordion/accordion.svelte +19 -0
- package/src/shadcn/accordion/index.ts +16 -0
- package/src/shadcn/alert/alert-description.svelte +23 -0
- package/src/shadcn/alert/alert-title.svelte +20 -0
- package/src/shadcn/alert/alert.svelte +44 -0
- package/src/shadcn/alert/index.ts +14 -0
- package/src/shadcn/alert-dialog/alert-dialog-action.svelte +18 -0
- package/src/shadcn/alert-dialog/alert-dialog-cancel.svelte +18 -0
- package/src/shadcn/alert-dialog/alert-dialog-content.svelte +29 -0
- package/src/shadcn/alert-dialog/alert-dialog-description.svelte +17 -0
- package/src/shadcn/alert-dialog/alert-dialog-footer.svelte +20 -0
- package/src/shadcn/alert-dialog/alert-dialog-header.svelte +20 -0
- package/src/shadcn/alert-dialog/alert-dialog-overlay.svelte +17 -0
- package/src/shadcn/alert-dialog/alert-dialog-portal.svelte +7 -0
- package/src/shadcn/alert-dialog/alert-dialog-title.svelte +17 -0
- package/src/shadcn/alert-dialog/alert-dialog-trigger.svelte +7 -0
- package/src/shadcn/alert-dialog/alert-dialog.svelte +7 -0
- package/src/shadcn/alert-dialog/index.ts +37 -0
- package/src/shadcn/attachment/attachment-action.svelte +23 -0
- package/src/shadcn/attachment/attachment-actions.svelte +23 -0
- package/src/shadcn/attachment/attachment-content.svelte +23 -0
- package/src/shadcn/attachment/attachment-description.svelte +23 -0
- package/src/shadcn/attachment/attachment-group.svelte +23 -0
- package/src/shadcn/attachment/attachment-media.svelte +44 -0
- package/src/shadcn/attachment/attachment-title.svelte +23 -0
- package/src/shadcn/attachment/attachment-trigger.svelte +29 -0
- package/src/shadcn/attachment/attachment.svelte +55 -0
- package/src/shadcn/attachment/index.ts +40 -0
- package/src/shadcn/avatar/avatar-badge.svelte +26 -0
- package/src/shadcn/avatar/avatar-fallback.svelte +20 -0
- package/src/shadcn/avatar/avatar-group-count.svelte +23 -0
- package/src/shadcn/avatar/avatar-group.svelte +23 -0
- package/src/shadcn/avatar/avatar-image.svelte +17 -0
- package/src/shadcn/avatar/avatar.svelte +26 -0
- package/src/shadcn/avatar/index.ts +22 -0
- package/src/shadcn/badge/badge.svelte +53 -0
- package/src/shadcn/badge/index.ts +2 -0
- package/src/shadcn/breadcrumb/breadcrumb-ellipsis.svelte +23 -0
- package/src/shadcn/breadcrumb/breadcrumb-item.svelte +20 -0
- package/src/shadcn/breadcrumb/breadcrumb-link.svelte +31 -0
- package/src/shadcn/breadcrumb/breadcrumb-list.svelte +23 -0
- package/src/shadcn/breadcrumb/breadcrumb-page.svelte +23 -0
- package/src/shadcn/breadcrumb/breadcrumb-separator.svelte +27 -0
- package/src/shadcn/breadcrumb/breadcrumb.svelte +21 -0
- package/src/shadcn/breadcrumb/index.ts +25 -0
- package/src/shadcn/bubble/bubble-content.svelte +31 -0
- package/src/shadcn/bubble/bubble-group.svelte +20 -0
- package/src/shadcn/bubble/bubble-reactions.svelte +52 -0
- package/src/shadcn/bubble/bubble.svelte +58 -0
- package/src/shadcn/bubble/index.ts +25 -0
- package/src/shadcn/button/button.svelte +121 -0
- package/src/shadcn/button/index.ts +17 -0
- package/src/shadcn/calendar/calendar-caption.svelte +76 -0
- package/src/shadcn/calendar/calendar-cell.svelte +19 -0
- package/src/shadcn/calendar/calendar-day.svelte +35 -0
- package/src/shadcn/calendar/calendar-grid-body.svelte +12 -0
- package/src/shadcn/calendar/calendar-grid-head.svelte +12 -0
- package/src/shadcn/calendar/calendar-grid-row.svelte +12 -0
- package/src/shadcn/calendar/calendar-grid.svelte +16 -0
- package/src/shadcn/calendar/calendar-head-cell.svelte +19 -0
- package/src/shadcn/calendar/calendar-header.svelte +19 -0
- package/src/shadcn/calendar/calendar-heading.svelte +16 -0
- package/src/shadcn/calendar/calendar-month-select.svelte +44 -0
- package/src/shadcn/calendar/calendar-month.svelte +15 -0
- package/src/shadcn/calendar/calendar-months.svelte +19 -0
- package/src/shadcn/calendar/calendar-nav.svelte +19 -0
- package/src/shadcn/calendar/calendar-next-button.svelte +31 -0
- package/src/shadcn/calendar/calendar-prev-button.svelte +31 -0
- package/src/shadcn/calendar/calendar-year-select.svelte +43 -0
- package/src/shadcn/calendar/calendar.svelte +118 -0
- package/src/shadcn/calendar/index.ts +40 -0
- package/src/shadcn/card/card-action.svelte +23 -0
- package/src/shadcn/card/card-content.svelte +20 -0
- package/src/shadcn/card/card-description.svelte +20 -0
- package/src/shadcn/card/card-footer.svelte +23 -0
- package/src/shadcn/card/card-header.svelte +23 -0
- package/src/shadcn/card/card-title.svelte +29 -0
- package/src/shadcn/card/card.svelte +25 -0
- package/src/shadcn/card/index.ts +25 -0
- package/src/shadcn/checkbox/checkbox.svelte +38 -0
- package/src/shadcn/checkbox/index.ts +6 -0
- package/src/shadcn/collapsible/collapsible-content.svelte +7 -0
- package/src/shadcn/collapsible/collapsible-trigger.svelte +7 -0
- package/src/shadcn/collapsible/collapsible.svelte +11 -0
- package/src/shadcn/collapsible/index.ts +13 -0
- package/src/shadcn/command/command-dialog.svelte +66 -0
- package/src/shadcn/command/command-empty.svelte +17 -0
- package/src/shadcn/command/command-group.svelte +40 -0
- package/src/shadcn/command/command-input.svelte +64 -0
- package/src/shadcn/command/command-item.svelte +37 -0
- package/src/shadcn/command/command-link-item.svelte +20 -0
- package/src/shadcn/command/command-list.svelte +20 -0
- package/src/shadcn/command/command-loading.svelte +7 -0
- package/src/shadcn/command/command-separator.svelte +17 -0
- package/src/shadcn/command/command-shortcut.svelte +23 -0
- package/src/shadcn/command/command.svelte +28 -0
- package/src/shadcn/command/index.ts +37 -0
- package/src/shadcn/context-menu/context-menu-checkbox-item.svelte +41 -0
- package/src/shadcn/context-menu/context-menu-content.svelte +28 -0
- package/src/shadcn/context-menu/context-menu-group-heading.svelte +21 -0
- package/src/shadcn/context-menu/context-menu-group.svelte +7 -0
- package/src/shadcn/context-menu/context-menu-item.svelte +27 -0
- package/src/shadcn/context-menu/context-menu-label.svelte +27 -0
- package/src/shadcn/context-menu/context-menu-portal.svelte +7 -0
- package/src/shadcn/context-menu/context-menu-radio-group.svelte +16 -0
- package/src/shadcn/context-menu/context-menu-radio-item.svelte +35 -0
- package/src/shadcn/context-menu/context-menu-separator.svelte +17 -0
- package/src/shadcn/context-menu/context-menu-shortcut.svelte +23 -0
- package/src/shadcn/context-menu/context-menu-sub-content.svelte +25 -0
- package/src/shadcn/context-menu/context-menu-sub-trigger.svelte +29 -0
- package/src/shadcn/context-menu/context-menu-sub.svelte +7 -0
- package/src/shadcn/context-menu/context-menu-trigger.svelte +17 -0
- package/src/shadcn/context-menu/context-menu.svelte +7 -0
- package/src/shadcn/context-menu/index.ts +52 -0
- package/src/shadcn/dialog/dialog-close.svelte +11 -0
- package/src/shadcn/dialog/dialog-content.svelte +57 -0
- package/src/shadcn/dialog/dialog-description.svelte +20 -0
- package/src/shadcn/dialog/dialog-footer.svelte +32 -0
- package/src/shadcn/dialog/dialog-header.svelte +20 -0
- package/src/shadcn/dialog/dialog-overlay.svelte +20 -0
- package/src/shadcn/dialog/dialog-portal.svelte +7 -0
- package/src/shadcn/dialog/dialog-title.svelte +17 -0
- package/src/shadcn/dialog/dialog-trigger.svelte +11 -0
- package/src/shadcn/dialog/dialog.svelte +7 -0
- package/src/shadcn/dialog/index.ts +34 -0
- package/src/shadcn/dropdown-menu/dropdown-menu-checkbox-group.svelte +16 -0
- package/src/shadcn/dropdown-menu/dropdown-menu-checkbox-item.svelte +43 -0
- package/src/shadcn/dropdown-menu/dropdown-menu-content.svelte +31 -0
- package/src/shadcn/dropdown-menu/dropdown-menu-group-heading.svelte +22 -0
- package/src/shadcn/dropdown-menu/dropdown-menu-group.svelte +7 -0
- package/src/shadcn/dropdown-menu/dropdown-menu-item.svelte +29 -0
- package/src/shadcn/dropdown-menu/dropdown-menu-label.svelte +27 -0
- package/src/shadcn/dropdown-menu/dropdown-menu-portal.svelte +7 -0
- package/src/shadcn/dropdown-menu/dropdown-menu-radio-group.svelte +16 -0
- package/src/shadcn/dropdown-menu/dropdown-menu-radio-item.svelte +34 -0
- package/src/shadcn/dropdown-menu/dropdown-menu-separator.svelte +17 -0
- package/src/shadcn/dropdown-menu/dropdown-menu-shortcut.svelte +23 -0
- package/src/shadcn/dropdown-menu/dropdown-menu-sub-content.svelte +20 -0
- package/src/shadcn/dropdown-menu/dropdown-menu-sub-trigger.svelte +29 -0
- package/src/shadcn/dropdown-menu/dropdown-menu-sub.svelte +7 -0
- package/src/shadcn/dropdown-menu/dropdown-menu-trigger.svelte +7 -0
- package/src/shadcn/dropdown-menu/dropdown-menu.svelte +7 -0
- package/src/shadcn/dropdown-menu/index.ts +56 -0
- package/src/shadcn/dropdown-menu/menu-item.ts +43 -0
- package/src/shadcn/empty/empty-content.svelte +23 -0
- package/src/shadcn/empty/empty-description.svelte +23 -0
- package/src/shadcn/empty/empty-header.svelte +20 -0
- package/src/shadcn/empty/empty-media.svelte +41 -0
- package/src/shadcn/empty/empty-title.svelte +20 -0
- package/src/shadcn/empty/empty.svelte +23 -0
- package/src/shadcn/empty/index.ts +22 -0
- package/src/shadcn/field/field-content.svelte +20 -0
- package/src/shadcn/field/field-description.svelte +25 -0
- package/src/shadcn/field/field-error.svelte +58 -0
- package/src/shadcn/field/field-group.svelte +23 -0
- package/src/shadcn/field/field-label.svelte +26 -0
- package/src/shadcn/field/field-legend.svelte +29 -0
- package/src/shadcn/field/field-separator.svelte +35 -0
- package/src/shadcn/field/field-set.svelte +24 -0
- package/src/shadcn/field/field-title.svelte +23 -0
- package/src/shadcn/field/field.svelte +53 -0
- package/src/shadcn/field/index.ts +33 -0
- package/src/shadcn/hooks/is-mobile.svelte.ts +9 -0
- package/src/shadcn/hover-card/hover-card-content.svelte +31 -0
- package/src/shadcn/hover-card/hover-card-portal.svelte +7 -0
- package/src/shadcn/hover-card/hover-card-trigger.svelte +7 -0
- package/src/shadcn/hover-card/hover-card.svelte +7 -0
- package/src/shadcn/hover-card/index.ts +15 -0
- package/src/shadcn/input/index.ts +9 -0
- package/src/shadcn/input/input.svelte +48 -0
- package/src/shadcn/input/secret-input.svelte +75 -0
- package/src/shadcn/input-otp/index.ts +15 -0
- package/src/shadcn/input-otp/input-otp-group.svelte +20 -0
- package/src/shadcn/input-otp/input-otp-separator.svelte +25 -0
- package/src/shadcn/input-otp/input-otp-slot.svelte +26 -0
- package/src/shadcn/input-otp/input-otp.svelte +22 -0
- package/src/shadcn/label/index.ts +7 -0
- package/src/shadcn/label/label.svelte +20 -0
- package/src/shadcn/marker/index.ts +15 -0
- package/src/shadcn/marker/marker-content.svelte +23 -0
- package/src/shadcn/marker/marker-icon.svelte +21 -0
- package/src/shadcn/marker/marker.svelte +52 -0
- package/src/shadcn/message/index.ts +22 -0
- package/src/shadcn/message/message-avatar.svelte +23 -0
- package/src/shadcn/message/message-content.svelte +23 -0
- package/src/shadcn/message/message-footer.svelte +23 -0
- package/src/shadcn/message/message-group.svelte +20 -0
- package/src/shadcn/message/message-header.svelte +23 -0
- package/src/shadcn/message/message.svelte +27 -0
- package/src/shadcn/popover/index.ts +28 -0
- package/src/shadcn/popover/popover-close.svelte +7 -0
- package/src/shadcn/popover/popover-content.svelte +38 -0
- package/src/shadcn/popover/popover-description.svelte +20 -0
- package/src/shadcn/popover/popover-header.svelte +20 -0
- package/src/shadcn/popover/popover-portal.svelte +7 -0
- package/src/shadcn/popover/popover-title.svelte +15 -0
- package/src/shadcn/popover/popover-trigger.svelte +17 -0
- package/src/shadcn/popover/popover.svelte +7 -0
- package/src/shadcn/progress/index.ts +7 -0
- package/src/shadcn/progress/progress.svelte +30 -0
- package/src/shadcn/radio-group/index.ts +10 -0
- package/src/shadcn/radio-group/radio-group-item.svelte +31 -0
- package/src/shadcn/radio-group/radio-group.svelte +19 -0
- package/src/shadcn/scroll-area/index.ts +10 -0
- package/src/shadcn/scroll-area/scroll-area-scrollbar.svelte +30 -0
- package/src/shadcn/scroll-area/scroll-area.svelte +43 -0
- package/src/shadcn/select/index.ts +37 -0
- package/src/shadcn/select/select-content.svelte +45 -0
- package/src/shadcn/select/select-group-heading.svelte +21 -0
- package/src/shadcn/select/select-group.svelte +17 -0
- package/src/shadcn/select/select-item.svelte +38 -0
- package/src/shadcn/select/select-label.svelte +20 -0
- package/src/shadcn/select/select-portal.svelte +7 -0
- package/src/shadcn/select/select-scroll-down-button.svelte +23 -0
- package/src/shadcn/select/select-scroll-up-button.svelte +23 -0
- package/src/shadcn/select/select-separator.svelte +18 -0
- package/src/shadcn/select/select-trigger.svelte +33 -0
- package/src/shadcn/select/select.svelte +11 -0
- package/src/shadcn/separator/index.ts +7 -0
- package/src/shadcn/separator/separator.svelte +23 -0
- package/src/shadcn/sheet/index.ts +34 -0
- package/src/shadcn/sheet/sheet-close.svelte +7 -0
- package/src/shadcn/sheet/sheet-content.svelte +72 -0
- package/src/shadcn/sheet/sheet-description.svelte +17 -0
- package/src/shadcn/sheet/sheet-footer.svelte +20 -0
- package/src/shadcn/sheet/sheet-header.svelte +20 -0
- package/src/shadcn/sheet/sheet-overlay.svelte +20 -0
- package/src/shadcn/sheet/sheet-portal.svelte +7 -0
- package/src/shadcn/sheet/sheet-title.svelte +17 -0
- package/src/shadcn/sheet/sheet-trigger.svelte +7 -0
- package/src/shadcn/sheet/sheet.svelte +7 -0
- package/src/shadcn/sidebar/constants.ts +6 -0
- package/src/shadcn/sidebar/context.svelte.ts +81 -0
- package/src/shadcn/sidebar/index.ts +75 -0
- package/src/shadcn/sidebar/sidebar-content.svelte +24 -0
- package/src/shadcn/sidebar/sidebar-footer.svelte +21 -0
- package/src/shadcn/sidebar/sidebar-group-action.svelte +33 -0
- package/src/shadcn/sidebar/sidebar-group-content.svelte +21 -0
- package/src/shadcn/sidebar/sidebar-group-label.svelte +33 -0
- package/src/shadcn/sidebar/sidebar-group.svelte +21 -0
- package/src/shadcn/sidebar/sidebar-header.svelte +21 -0
- package/src/shadcn/sidebar/sidebar-input.svelte +21 -0
- package/src/shadcn/sidebar/sidebar-inset.svelte +23 -0
- package/src/shadcn/sidebar/sidebar-menu-action.svelte +37 -0
- package/src/shadcn/sidebar/sidebar-menu-badge.svelte +24 -0
- package/src/shadcn/sidebar/sidebar-menu-button.svelte +103 -0
- package/src/shadcn/sidebar/sidebar-menu-item.svelte +21 -0
- package/src/shadcn/sidebar/sidebar-menu-skeleton.svelte +36 -0
- package/src/shadcn/sidebar/sidebar-menu-sub-button.svelte +39 -0
- package/src/shadcn/sidebar/sidebar-menu-sub-item.svelte +21 -0
- package/src/shadcn/sidebar/sidebar-menu-sub.svelte +24 -0
- package/src/shadcn/sidebar/sidebar-menu.svelte +21 -0
- package/src/shadcn/sidebar/sidebar-provider.svelte +62 -0
- package/src/shadcn/sidebar/sidebar-rail.svelte +36 -0
- package/src/shadcn/sidebar/sidebar-separator.svelte +19 -0
- package/src/shadcn/sidebar/sidebar-trigger.svelte +37 -0
- package/src/shadcn/sidebar/sidebar.svelte +109 -0
- package/src/shadcn/skeleton/index.ts +7 -0
- package/src/shadcn/skeleton/skeleton.svelte +17 -0
- package/src/shadcn/slider/index.ts +7 -0
- package/src/shadcn/slider/slider.svelte +52 -0
- package/src/shadcn/sonner/index.ts +1 -0
- package/src/shadcn/sonner/sonner.svelte +34 -0
- package/src/shadcn/spinner/index.ts +1 -0
- package/src/shadcn/spinner/spinner.svelte +26 -0
- package/src/shadcn/switch/index.ts +7 -0
- package/src/shadcn/switch/switch.svelte +31 -0
- package/src/shadcn/table/index.ts +28 -0
- package/src/shadcn/table/table-body.svelte +20 -0
- package/src/shadcn/table/table-caption.svelte +20 -0
- package/src/shadcn/table/table-cell.svelte +20 -0
- package/src/shadcn/table/table-footer.svelte +20 -0
- package/src/shadcn/table/table-head.svelte +23 -0
- package/src/shadcn/table/table-header.svelte +20 -0
- package/src/shadcn/table/table-row.svelte +23 -0
- package/src/shadcn/table/table.svelte +25 -0
- package/src/shadcn/tabs/index.ts +16 -0
- package/src/shadcn/tabs/tabs-content.svelte +17 -0
- package/src/shadcn/tabs/tabs-list.svelte +25 -0
- package/src/shadcn/tabs/tabs-trigger.svelte +20 -0
- package/src/shadcn/tabs/tabs.svelte +19 -0
- package/src/shadcn/textarea/index.ts +7 -0
- package/src/shadcn/textarea/textarea.svelte +23 -0
- package/src/shadcn/toggle/index.ts +13 -0
- package/src/shadcn/toggle/toggle.svelte +53 -0
- package/src/shadcn/toggle-group/index.ts +10 -0
- package/src/shadcn/toggle-group/toggle-group-item.svelte +35 -0
- package/src/shadcn/toggle-group/toggle-group.svelte +59 -0
- package/src/shadcn/tooltip/context.ts +16 -0
- package/src/shadcn/tooltip/index.ts +19 -0
- package/src/shadcn/tooltip/tooltip-content.svelte +38 -0
- package/src/shadcn/tooltip/tooltip-portal.svelte +7 -0
- package/src/shadcn/tooltip/tooltip-provider.svelte +16 -0
- package/src/shadcn/tooltip/tooltip-trigger.svelte +7 -0
- package/src/shadcn/tooltip/tooltip.svelte +19 -0
- package/src/shadcn/utilities.css +549 -0
- package/src/showcase/AiSection.svelte +157 -0
- package/src/showcase/AnimationsSection.svelte +1658 -0
- package/src/showcase/ChartsSection.svelte +458 -0
- package/src/showcase/EffectsSection.svelte +152 -0
- package/src/showcase/ShadcnSection.svelte +27 -0
- package/src/showcase/ShowcaseImport.svelte +126 -0
- package/src/showcase/ShowcaseList.svelte +132 -0
- package/src/showcase/ShowcaseNav.svelte +247 -0
- package/src/showcase/ShowcaseSection.svelte +112 -0
- package/src/showcase/ShowcaseShell.svelte +55 -0
- package/src/showcase/ShowcaseStage.svelte +342 -0
- package/src/showcase/ShowcaseVariant.svelte +109 -0
- package/src/showcase/assets/image-reveal/art-1.jpg +0 -0
- package/src/showcase/assets/image-reveal/art-2.jpg +0 -0
- package/src/showcase/assets/image-reveal/art-3.jpg +0 -0
- package/src/showcase/check.svg +1 -0
- package/src/showcase/chevron-arms.svg +2 -0
- package/src/showcase/chevron-down.svg +1 -0
- package/src/showcase/copy.svg +2 -0
- package/src/showcase/demos/ai/confirmation.svelte +59 -0
- package/src/showcase/demos/ai/conversation.svelte +59 -0
- package/src/showcase/demos/ai/loading-state.svelte +19 -0
- package/src/showcase/demos/ai/prompt-input.svelte +57 -0
- package/src/showcase/demos/ai/reasoning.svelte +19 -0
- package/src/showcase/demos/ai/thinking-dots.svelte +15 -0
- package/src/showcase/demos/ai/voice-waveform.svelte +24 -0
- package/src/showcase/demos/effects/animated-beam.svelte +50 -0
- package/src/showcase/demos/effects/animated-group.svelte +47 -0
- package/src/showcase/demos/effects/border-beam-default.svelte +20 -0
- package/src/showcase/demos/effects/border-beam-line.svelte +20 -0
- package/src/showcase/demos/effects/border-beam-mono.svelte +20 -0
- package/src/showcase/demos/effects/border-beam-sunset.svelte +20 -0
- package/src/showcase/demos/effects/image-comparison.svelte +25 -0
- package/src/showcase/demos/effects/image-reveal.svelte +49 -0
- package/src/showcase/demos/effects/in-view.svelte +41 -0
- package/src/showcase/demos/effects/integrations-hub.svelte +82 -0
- package/src/showcase/demos/effects/magnetic.svelte +31 -0
- package/src/showcase/demos/effects/marquee.svelte +33 -0
- package/src/showcase/demos/effects/progressive-blur.svelte +47 -0
- package/src/showcase/demos/effects/spotlight.svelte +40 -0
- package/src/showcase/demos/effects/text-effect.svelte +55 -0
- package/src/showcase/demos/shadcn/accordion.svelte +45 -0
- package/src/showcase/demos/shadcn/alert-dialog.svelte +23 -0
- package/src/showcase/demos/shadcn/alert.svelte +30 -0
- package/src/showcase/demos/shadcn/attachment.svelte +71 -0
- package/src/showcase/demos/shadcn/avatar.svelte +30 -0
- package/src/showcase/demos/shadcn/badge.svelte +26 -0
- package/src/showcase/demos/shadcn/breadcrumb.svelte +34 -0
- package/src/showcase/demos/shadcn/bubble.svelte +36 -0
- package/src/showcase/demos/shadcn/button.svelte +11 -0
- package/src/showcase/demos/shadcn/calendar.svelte +8 -0
- package/src/showcase/demos/shadcn/card.svelte +39 -0
- package/src/showcase/demos/shadcn/checkbox.svelte +39 -0
- package/src/showcase/demos/shadcn/collapsible.svelte +20 -0
- package/src/showcase/demos/shadcn/command.svelte +48 -0
- package/src/showcase/demos/shadcn/context-menu.svelte +54 -0
- package/src/showcase/demos/shadcn/demo-harness.svelte +12 -0
- package/src/showcase/demos/shadcn/demos.test.ts +20 -0
- package/src/showcase/demos/shadcn/dialog.svelte +38 -0
- package/src/showcase/demos/shadcn/dropdown-menu.svelte +59 -0
- package/src/showcase/demos/shadcn/empty.svelte +29 -0
- package/src/showcase/demos/shadcn/field.svelte +115 -0
- package/src/showcase/demos/shadcn/hover-card.svelte +32 -0
- package/src/showcase/demos/shadcn/index.ts +358 -0
- package/src/showcase/demos/shadcn/input-otp.svelte +19 -0
- package/src/showcase/demos/shadcn/input.svelte +5 -0
- package/src/showcase/demos/shadcn/label.svelte +11 -0
- package/src/showcase/demos/shadcn/marker.svelte +30 -0
- package/src/showcase/demos/shadcn/message.svelte +75 -0
- package/src/showcase/demos/shadcn/popover.svelte +36 -0
- package/src/showcase/demos/shadcn/progress.svelte +13 -0
- package/src/showcase/demos/shadcn/radio-group.svelte +19 -0
- package/src/showcase/demos/shadcn/scroll-area.svelte +18 -0
- package/src/showcase/demos/shadcn/select.svelte +29 -0
- package/src/showcase/demos/shadcn/separator.svelte +12 -0
- package/src/showcase/demos/shadcn/sheet.svelte +48 -0
- package/src/showcase/demos/shadcn/skeleton.svelte +11 -0
- package/src/showcase/demos/shadcn/slider.svelte +7 -0
- package/src/showcase/demos/shadcn/sonner.svelte +18 -0
- package/src/showcase/demos/shadcn/spinner.svelte +11 -0
- package/src/showcase/demos/shadcn/switch.svelte +9 -0
- package/src/showcase/demos/shadcn/table.svelte +76 -0
- package/src/showcase/demos/shadcn/tabs.svelte +62 -0
- package/src/showcase/demos/shadcn/textarea.svelte +5 -0
- package/src/showcase/demos/shadcn/toggle-group.svelte +18 -0
- package/src/showcase/demos/shadcn/toggle.svelte +14 -0
- package/src/showcase/demos/shadcn/tooltip.svelte +13 -0
- package/src/showcase/heart.svg +1 -0
- package/src/showcase/index.ts +38 -0
- package/src/showcase/kit.test.ts +72 -0
- package/src/showcase/kit.ts +17 -0
- package/src/showcase/plus.svg +1 -0
- package/src/showcase/showcase-shell.css +91 -0
- package/src/showcase/stacked-section.css +15 -0
- package/src/showcase/success-check.svg +1 -0
- package/src/showcase/types.ts +29 -0
- package/src/svg-raw.d.ts +7 -0
- package/src/test-setup.ts +34 -0
- package/src/tokens.css +993 -0
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { Checkbox as CheckboxPrimitive } from "bits-ui";
|
|
3
|
+
import { cn, type WithoutChildrenOrChild } from "@heyramzi/utils";
|
|
4
|
+
import { Check, Minus } from "phosphor-svelte";
|
|
5
|
+
|
|
6
|
+
let {
|
|
7
|
+
ref = $bindable(null),
|
|
8
|
+
checked = $bindable(false),
|
|
9
|
+
indeterminate = $bindable(false),
|
|
10
|
+
class: className,
|
|
11
|
+
...restProps
|
|
12
|
+
}: WithoutChildrenOrChild<CheckboxPrimitive.RootProps> = $props();
|
|
13
|
+
</script>
|
|
14
|
+
|
|
15
|
+
<CheckboxPrimitive.Root
|
|
16
|
+
bind:ref
|
|
17
|
+
data-slot="checkbox"
|
|
18
|
+
class={cn(
|
|
19
|
+
"border-input dark:bg-input/30 data-checked:bg-primary data-checked:text-primary-foreground dark:data-checked:bg-primary data-checked:border-primary aria-invalid:aria-checked:border-primary aria-invalid:border-destructive dark:aria-invalid:border-destructive/50 focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 flex size-4 items-center justify-center rounded-sm border shadow-btn transition-[background-color,border-color,box-shadow] duration-[var(--duration-quick)] ease-[var(--ease-smooth-out)] group-has-disabled/field:opacity-50 focus-visible:ring-3 aria-invalid:ring-3 peer relative shrink-0 outline-none after:absolute after:-inset-x-3 after:-inset-y-2 any-pointer-coarse:after:-inset-y-3.5 any-pointer-coarse:after:-inset-3 disabled:cursor-not-allowed disabled:opacity-50",
|
|
20
|
+
className,
|
|
21
|
+
)}
|
|
22
|
+
bind:checked
|
|
23
|
+
bind:indeterminate
|
|
24
|
+
{...restProps}
|
|
25
|
+
>
|
|
26
|
+
{#snippet children({ checked, indeterminate })}
|
|
27
|
+
<div
|
|
28
|
+
data-slot="checkbox-indicator"
|
|
29
|
+
class="[&>svg]:size-3.5 grid place-content-center text-current"
|
|
30
|
+
>
|
|
31
|
+
{#if checked}
|
|
32
|
+
<Check size={14} />
|
|
33
|
+
{:else if indeterminate}
|
|
34
|
+
<Minus size={14} />
|
|
35
|
+
{/if}
|
|
36
|
+
</div>
|
|
37
|
+
{/snippet}
|
|
38
|
+
</CheckboxPrimitive.Root>
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { Collapsible as CollapsiblePrimitive } from "bits-ui";
|
|
3
|
+
|
|
4
|
+
let { ref = $bindable(null), ...restProps }: CollapsiblePrimitive.ContentProps = $props();
|
|
5
|
+
</script>
|
|
6
|
+
|
|
7
|
+
<CollapsiblePrimitive.Content bind:ref data-slot="collapsible-content" {...restProps} />
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { Collapsible as CollapsiblePrimitive } from "bits-ui";
|
|
3
|
+
|
|
4
|
+
let { ref = $bindable(null), ...restProps }: CollapsiblePrimitive.TriggerProps = $props();
|
|
5
|
+
</script>
|
|
6
|
+
|
|
7
|
+
<CollapsiblePrimitive.Trigger bind:ref data-slot="collapsible-trigger" {...restProps} />
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { Collapsible as CollapsiblePrimitive } from "bits-ui";
|
|
3
|
+
|
|
4
|
+
let {
|
|
5
|
+
ref = $bindable(null),
|
|
6
|
+
open = $bindable(false),
|
|
7
|
+
...restProps
|
|
8
|
+
}: CollapsiblePrimitive.RootProps = $props();
|
|
9
|
+
</script>
|
|
10
|
+
|
|
11
|
+
<CollapsiblePrimitive.Root bind:ref bind:open data-slot="collapsible" {...restProps} />
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import Root from "./collapsible.svelte";
|
|
2
|
+
import Trigger from "./collapsible-trigger.svelte";
|
|
3
|
+
import Content from "./collapsible-content.svelte";
|
|
4
|
+
|
|
5
|
+
export {
|
|
6
|
+
Root,
|
|
7
|
+
Content,
|
|
8
|
+
Trigger,
|
|
9
|
+
//
|
|
10
|
+
Root as Collapsible,
|
|
11
|
+
Content as CollapsibleContent,
|
|
12
|
+
Trigger as CollapsibleTrigger,
|
|
13
|
+
};
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import type { Command as CommandPrimitive, Dialog as DialogPrimitive } from "bits-ui";
|
|
3
|
+
import type { Snippet } from "svelte";
|
|
4
|
+
import Command from "./command.svelte";
|
|
5
|
+
import * as Dialog from "../dialog/index.js";
|
|
6
|
+
import { cn, type WithoutChildrenOrChild } from "@heyramzi/utils";
|
|
7
|
+
|
|
8
|
+
let {
|
|
9
|
+
open = $bindable(false),
|
|
10
|
+
ref = $bindable(null),
|
|
11
|
+
value = $bindable(""),
|
|
12
|
+
title = "Command Palette",
|
|
13
|
+
description = "Search for a command to run...",
|
|
14
|
+
showCloseButton = false,
|
|
15
|
+
portalProps,
|
|
16
|
+
children,
|
|
17
|
+
class: className,
|
|
18
|
+
...restProps
|
|
19
|
+
}: WithoutChildrenOrChild<DialogPrimitive.RootProps> &
|
|
20
|
+
WithoutChildrenOrChild<CommandPrimitive.RootProps> & {
|
|
21
|
+
portalProps?: DialogPrimitive.PortalProps;
|
|
22
|
+
children: Snippet;
|
|
23
|
+
title?: string;
|
|
24
|
+
description?: string;
|
|
25
|
+
showCloseButton?: boolean;
|
|
26
|
+
class?: string;
|
|
27
|
+
} = $props();
|
|
28
|
+
</script>
|
|
29
|
+
|
|
30
|
+
<Dialog.Root bind:open {...restProps}>
|
|
31
|
+
<Dialog.Header class="sr-only">
|
|
32
|
+
<Dialog.Title>{title}</Dialog.Title>
|
|
33
|
+
<Dialog.Description>{description}</Dialog.Description>
|
|
34
|
+
</Dialog.Header>
|
|
35
|
+
<Dialog.Content
|
|
36
|
+
class={cn(
|
|
37
|
+
// WHY: search is the one dialog that must sit above the keyboard rather
|
|
38
|
+
|
|
39
|
+
// than under it, so it stays top-anchored on phones instead of taking the shared bottom-sheet position, and hugs the safe area at the top.
|
|
40
|
+
"rounded-xl! top-[max(0.5rem,env(safe-area-inset-top))] right-2 bottom-auto left-2 w-auto max-h-[70svh] translate-y-0 gap-0 overflow-hidden p-0 sm:p-0",
|
|
41
|
+
// WHY no border and no card background here: the palette is a floating
|
|
42
|
+
|
|
43
|
+
// object, so its edge is a lit rim and a cast shadow rather than a drawn line, and the surface itself belongs to the Command root beneath so its translucency
|
|
44
|
+
|
|
45
|
+
// can read the dimmed page through it.
|
|
46
|
+
"border-0 bg-transparent ring-1 ring-foreground/15 shadow-overlay",
|
|
47
|
+
// WHY a third of the way down rather than centred: the eye is already at
|
|
48
|
+
|
|
49
|
+
// the top of the screen when the shortcut is pressed, and a list that grows downward should not push its first row past the fold.
|
|
50
|
+
"sm:top-[14vh] sm:right-auto sm:left-1/2 sm:w-full sm:max-h-[min(32rem,72svh)] sm:max-w-[640px] sm:translate-y-0",
|
|
51
|
+
className,
|
|
52
|
+
)}
|
|
53
|
+
data-command-dialog="true"
|
|
54
|
+
overlayClass="t-instant"
|
|
55
|
+
{showCloseButton}
|
|
56
|
+
{portalProps}
|
|
57
|
+
>
|
|
58
|
+
<Command
|
|
59
|
+
{...restProps}
|
|
60
|
+
bind:value
|
|
61
|
+
bind:ref
|
|
62
|
+
class="bg-popover supports-backdrop-filter:bg-popover/94 supports-backdrop-filter:backdrop-blur-2xl"
|
|
63
|
+
{children}
|
|
64
|
+
/>
|
|
65
|
+
</Dialog.Content>
|
|
66
|
+
</Dialog.Root>
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { Command as CommandPrimitive } from "bits-ui";
|
|
3
|
+
import { cn } from "@heyramzi/utils";
|
|
4
|
+
|
|
5
|
+
let {
|
|
6
|
+
ref = $bindable(null),
|
|
7
|
+
class: className,
|
|
8
|
+
...restProps
|
|
9
|
+
}: CommandPrimitive.EmptyProps = $props();
|
|
10
|
+
</script>
|
|
11
|
+
|
|
12
|
+
<CommandPrimitive.Empty
|
|
13
|
+
bind:ref
|
|
14
|
+
data-slot="command-empty"
|
|
15
|
+
class={cn("py-6 text-center text-sm", className)}
|
|
16
|
+
{...restProps}
|
|
17
|
+
/>
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { Command as CommandPrimitive, useId } from "bits-ui";
|
|
3
|
+
import { cn } from "@heyramzi/utils";
|
|
4
|
+
|
|
5
|
+
let {
|
|
6
|
+
ref = $bindable(null),
|
|
7
|
+
class: className,
|
|
8
|
+
children,
|
|
9
|
+
heading,
|
|
10
|
+
value,
|
|
11
|
+
...restProps
|
|
12
|
+
}: CommandPrimitive.GroupProps & {
|
|
13
|
+
heading?: string;
|
|
14
|
+
} = $props();
|
|
15
|
+
</script>
|
|
16
|
+
|
|
17
|
+
<CommandPrimitive.Group
|
|
18
|
+
bind:ref
|
|
19
|
+
data-slot="command-group"
|
|
20
|
+
class={cn(
|
|
21
|
+
"text-foreground overflow-hidden px-1 py-1",
|
|
22
|
+
// WHY only titled groups: a heading is what makes a group a section, and a section needs a rule above it.
|
|
23
|
+
|
|
24
|
+
// Untitled groups inside a combobox stay seamless, and the ones that want a divider still ask for a Separator.
|
|
25
|
+
heading &&
|
|
26
|
+
"[&:not(:first-child)]:border-border/50 [&:not(:first-child)]:mt-1 [&:not(:first-child)]:border-t [&:not(:first-child)]:pt-1",
|
|
27
|
+
className,
|
|
28
|
+
)}
|
|
29
|
+
value={value ?? heading ?? `----${useId()}`}
|
|
30
|
+
{...restProps}
|
|
31
|
+
>
|
|
32
|
+
{#if heading}
|
|
33
|
+
<CommandPrimitive.GroupHeading
|
|
34
|
+
class="text-muted-foreground px-2.5 pt-2.5 pb-1.5 text-xs font-medium tracking-[0.09em] uppercase"
|
|
35
|
+
>
|
|
36
|
+
{heading}
|
|
37
|
+
</CommandPrimitive.GroupHeading>
|
|
38
|
+
{/if}
|
|
39
|
+
<CommandPrimitive.GroupItems {children} />
|
|
40
|
+
</CommandPrimitive.Group>
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { Command as CommandPrimitive } from "bits-ui";
|
|
3
|
+
import { cn } from "@heyramzi/utils";
|
|
4
|
+
import { MagnifyingGlass } from "phosphor-svelte";
|
|
5
|
+
import type { Snippet } from "svelte";
|
|
6
|
+
|
|
7
|
+
let {
|
|
8
|
+
ref = $bindable(null),
|
|
9
|
+
class: className,
|
|
10
|
+
wrapperClass,
|
|
11
|
+
size = "default",
|
|
12
|
+
trailing,
|
|
13
|
+
value = $bindable(""),
|
|
14
|
+
...restProps
|
|
15
|
+
// WHY Omit: the HTML input `size` attribute is a character count, and the
|
|
16
|
+
// intersection with it collapses this union to never.
|
|
17
|
+
}: Omit<CommandPrimitive.InputProps, "size"> & {
|
|
18
|
+
/** Classes for the row that holds the glyph, the field and `trailing`. */
|
|
19
|
+
wrapperClass?: string;
|
|
20
|
+
/** `lg` is the standalone search header; `default` is a combobox popover. */
|
|
21
|
+
size?: "default" | "lg";
|
|
22
|
+
/** Right-aligned affordances: a dismiss hint, a close button, a scope chip. */
|
|
23
|
+
trailing?: Snippet;
|
|
24
|
+
} = $props();
|
|
25
|
+
</script>
|
|
26
|
+
|
|
27
|
+
<div
|
|
28
|
+
data-slot="command-input-wrapper"
|
|
29
|
+
class={cn(
|
|
30
|
+
"border-border/70 flex items-center gap-2.5 border-b",
|
|
31
|
+
size === "lg" ? "px-4" : "px-3",
|
|
32
|
+
wrapperClass,
|
|
33
|
+
)}
|
|
34
|
+
>
|
|
35
|
+
<MagnifyingGlass size={size === "lg" ? 18 : 16} class="text-muted-foreground shrink-0" />
|
|
36
|
+
<CommandPrimitive.Input
|
|
37
|
+
data-slot="command-input"
|
|
38
|
+
class={cn(
|
|
39
|
+
// WHY the caret: it is the one part of a search field the browser draws, and its default belongs to no theme.
|
|
40
|
+
|
|
41
|
+
// Brand indigo on the blinking cursor is the cheapest signal that the field was designed. WHY the ring is refused here and nowhere else: the craft layer draws
|
|
42
|
+
|
|
43
|
+
// one focus ring on every `input` at specificity zero, and this field has no edge of its own to redraw.
|
|
44
|
+
|
|
45
|
+
// It got a rounded accent box floating inside a popover that was already the focused surface, on every combobox and on the palette itself.
|
|
46
|
+
|
|
47
|
+
// The caret carries focus instead, which is why it is brand indigo two lines down.
|
|
48
|
+
"focus-visible:shadow-none",
|
|
49
|
+
"caret-brand-indigo placeholder:text-muted-foreground/70 w-full bg-transparent outline-hidden disabled:cursor-not-allowed disabled:opacity-50",
|
|
50
|
+
// A combobox popover's search line is 36px, measured; `lg` is the
|
|
51
|
+
// standalone palette header and keeps its own larger rhythm.
|
|
52
|
+
size === "lg" ? "py-3.5 text-[15px]" : "py-2 text-[13px]",
|
|
53
|
+
className,
|
|
54
|
+
)}
|
|
55
|
+
bind:ref
|
|
56
|
+
{...restProps}
|
|
57
|
+
bind:value
|
|
58
|
+
/>
|
|
59
|
+
{#if trailing}
|
|
60
|
+
<div class="flex shrink-0 items-center gap-1.5">
|
|
61
|
+
{@render trailing()}
|
|
62
|
+
</div>
|
|
63
|
+
{/if}
|
|
64
|
+
</div>
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { Command as CommandPrimitive } from "bits-ui";
|
|
3
|
+
import { cn } from "@heyramzi/utils";
|
|
4
|
+
import { Check } from "phosphor-svelte";
|
|
5
|
+
|
|
6
|
+
let {
|
|
7
|
+
ref = $bindable(null),
|
|
8
|
+
class: className,
|
|
9
|
+
children,
|
|
10
|
+
...restProps
|
|
11
|
+
}: CommandPrimitive.ItemProps = $props();
|
|
12
|
+
</script>
|
|
13
|
+
|
|
14
|
+
<CommandPrimitive.Item
|
|
15
|
+
bind:ref
|
|
16
|
+
data-slot="command-item"
|
|
17
|
+
class={cn(
|
|
18
|
+
// 32px at 13px inside a 6px inset is the measured density of the product this kit names as its reference (31 Aug 2026).
|
|
19
|
+
|
|
20
|
+
// 36px at 14px read as one notch looser on every menu and palette in the app. WHY the keyboard cursor reads as a lit plate rather than a tint: accent
|
|
21
|
+
|
|
22
|
+
// at half strength is a two-percent lightness step on the dark surface, so the one row the arrow keys are on was the hardest row to find.
|
|
23
|
+
|
|
24
|
+
// A foreground wash plus an inset hairline works in both modes from one rule.
|
|
25
|
+
"group/command-item data-selected:bg-foreground/6 data-selected:ring-foreground/10 data-selected:text-foreground data-selected:*:[svg]:text-foreground relative flex min-h-8 cursor-default items-center gap-2.5 rounded-lg px-2.5 py-1.5 text-[13px] outline-hidden transition-colors duration-[var(--duration-fast)] select-none active:translate-y-px data-selected:ring-1 data-selected:ring-inset data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
26
|
+
className,
|
|
27
|
+
)}
|
|
28
|
+
{...restProps}
|
|
29
|
+
>
|
|
30
|
+
{@render children?.()}
|
|
31
|
+
<!-- WHY hidden rather than transparent: rendered at zero opacity it still took 16px and the row's `ml-auto` on every list that never sets `data-checked`, -->
|
|
32
|
+
<!-- which is what pulled the palette's right-hand column out of alignment. -->
|
|
33
|
+
<Check
|
|
34
|
+
size={16}
|
|
35
|
+
class="cn-command-item-indicator group-data-[checked=true]/command-item:block ml-auto hidden"
|
|
36
|
+
/>
|
|
37
|
+
</CommandPrimitive.Item>
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { Command as CommandPrimitive } from "bits-ui";
|
|
3
|
+
import { cn } from "@heyramzi/utils";
|
|
4
|
+
|
|
5
|
+
let {
|
|
6
|
+
ref = $bindable(null),
|
|
7
|
+
class: className,
|
|
8
|
+
...restProps
|
|
9
|
+
}: CommandPrimitive.LinkItemProps = $props();
|
|
10
|
+
</script>
|
|
11
|
+
|
|
12
|
+
<CommandPrimitive.LinkItem
|
|
13
|
+
bind:ref
|
|
14
|
+
data-slot="command-item"
|
|
15
|
+
class={cn(
|
|
16
|
+
"aria-selected:bg-accent aria-selected:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
17
|
+
className,
|
|
18
|
+
)}
|
|
19
|
+
{...restProps}
|
|
20
|
+
/>
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { Command as CommandPrimitive } from "bits-ui";
|
|
3
|
+
import { cn } from "@heyramzi/utils";
|
|
4
|
+
|
|
5
|
+
let {
|
|
6
|
+
ref = $bindable(null),
|
|
7
|
+
class: className,
|
|
8
|
+
...restProps
|
|
9
|
+
}: CommandPrimitive.ListProps = $props();
|
|
10
|
+
</script>
|
|
11
|
+
|
|
12
|
+
<CommandPrimitive.List
|
|
13
|
+
bind:ref
|
|
14
|
+
data-slot="command-list"
|
|
15
|
+
class={cn(
|
|
16
|
+
"scrollbar-thin max-h-[420px] scroll-py-1 outline-none overflow-x-hidden overflow-y-auto px-1.5 py-1",
|
|
17
|
+
className,
|
|
18
|
+
)}
|
|
19
|
+
{...restProps}
|
|
20
|
+
/>
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { Command as CommandPrimitive } from "bits-ui";
|
|
3
|
+
import { cn } from "@heyramzi/utils";
|
|
4
|
+
|
|
5
|
+
let {
|
|
6
|
+
ref = $bindable(null),
|
|
7
|
+
class: className,
|
|
8
|
+
...restProps
|
|
9
|
+
}: CommandPrimitive.SeparatorProps = $props();
|
|
10
|
+
</script>
|
|
11
|
+
|
|
12
|
+
<CommandPrimitive.Separator
|
|
13
|
+
bind:ref
|
|
14
|
+
data-slot="command-separator"
|
|
15
|
+
class={cn("bg-border -mx-1 h-px w-auto", className)}
|
|
16
|
+
{...restProps}
|
|
17
|
+
/>
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { cn, type WithElementRef } from "@heyramzi/utils";
|
|
3
|
+
import type { HTMLAttributes } from "svelte/elements";
|
|
4
|
+
|
|
5
|
+
let {
|
|
6
|
+
ref = $bindable(null),
|
|
7
|
+
class: className,
|
|
8
|
+
children,
|
|
9
|
+
...restProps
|
|
10
|
+
}: WithElementRef<HTMLAttributes<HTMLElement>> = $props();
|
|
11
|
+
</script>
|
|
12
|
+
|
|
13
|
+
<kbd
|
|
14
|
+
bind:this={ref}
|
|
15
|
+
data-slot="command-shortcut"
|
|
16
|
+
class={cn(
|
|
17
|
+
"text-muted-foreground group-data-selected/command-item:text-foreground ml-auto text-xs tracking-widest",
|
|
18
|
+
className,
|
|
19
|
+
)}
|
|
20
|
+
{...restProps}
|
|
21
|
+
>
|
|
22
|
+
{@render children?.()}
|
|
23
|
+
</kbd>
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { cn } from "@heyramzi/utils";
|
|
3
|
+
import { Command as CommandPrimitive } from "bits-ui";
|
|
4
|
+
|
|
5
|
+
export type CommandRootApi = CommandPrimitive.Root;
|
|
6
|
+
|
|
7
|
+
let {
|
|
8
|
+
api = $bindable(null),
|
|
9
|
+
ref = $bindable(null),
|
|
10
|
+
value = $bindable(""),
|
|
11
|
+
class: className,
|
|
12
|
+
...restProps
|
|
13
|
+
}: CommandPrimitive.RootProps & {
|
|
14
|
+
api?: CommandRootApi | null;
|
|
15
|
+
} = $props();
|
|
16
|
+
</script>
|
|
17
|
+
|
|
18
|
+
<CommandPrimitive.Root
|
|
19
|
+
bind:this={api}
|
|
20
|
+
bind:value
|
|
21
|
+
bind:ref
|
|
22
|
+
data-slot="command"
|
|
23
|
+
class={cn(
|
|
24
|
+
"bg-popover text-popover-foreground rounded-xl! flex size-full flex-col overflow-hidden",
|
|
25
|
+
className,
|
|
26
|
+
)}
|
|
27
|
+
{...restProps}
|
|
28
|
+
/>
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import Root from "./command.svelte";
|
|
2
|
+
import Loading from "./command-loading.svelte";
|
|
3
|
+
import Dialog from "./command-dialog.svelte";
|
|
4
|
+
import Empty from "./command-empty.svelte";
|
|
5
|
+
import Group from "./command-group.svelte";
|
|
6
|
+
import Item from "./command-item.svelte";
|
|
7
|
+
import Input from "./command-input.svelte";
|
|
8
|
+
import List from "./command-list.svelte";
|
|
9
|
+
import Separator from "./command-separator.svelte";
|
|
10
|
+
import Shortcut from "./command-shortcut.svelte";
|
|
11
|
+
import LinkItem from "./command-link-item.svelte";
|
|
12
|
+
|
|
13
|
+
export {
|
|
14
|
+
Root,
|
|
15
|
+
Dialog,
|
|
16
|
+
Empty,
|
|
17
|
+
Group,
|
|
18
|
+
Item,
|
|
19
|
+
LinkItem,
|
|
20
|
+
Input,
|
|
21
|
+
List,
|
|
22
|
+
Separator,
|
|
23
|
+
Shortcut,
|
|
24
|
+
Loading,
|
|
25
|
+
//
|
|
26
|
+
Root as Command,
|
|
27
|
+
Dialog as CommandDialog,
|
|
28
|
+
Empty as CommandEmpty,
|
|
29
|
+
Group as CommandGroup,
|
|
30
|
+
Item as CommandItem,
|
|
31
|
+
LinkItem as CommandLinkItem,
|
|
32
|
+
Input as CommandInput,
|
|
33
|
+
List as CommandList,
|
|
34
|
+
Separator as CommandSeparator,
|
|
35
|
+
Shortcut as CommandShortcut,
|
|
36
|
+
Loading as CommandLoading,
|
|
37
|
+
};
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { ContextMenu as ContextMenuPrimitive } from "bits-ui";
|
|
3
|
+
import { cn, type WithoutChildrenOrChild } from "@heyramzi/utils";
|
|
4
|
+
import type { Snippet } from "svelte";
|
|
5
|
+
import { Check as CheckIcon } from "phosphor-svelte";
|
|
6
|
+
|
|
7
|
+
let {
|
|
8
|
+
ref = $bindable(null),
|
|
9
|
+
checked = $bindable(false),
|
|
10
|
+
indeterminate = $bindable(false),
|
|
11
|
+
class: className,
|
|
12
|
+
inset,
|
|
13
|
+
children: childrenProp,
|
|
14
|
+
...restProps
|
|
15
|
+
}: WithoutChildrenOrChild<ContextMenuPrimitive.CheckboxItemProps> & {
|
|
16
|
+
inset?: boolean;
|
|
17
|
+
children?: Snippet;
|
|
18
|
+
} = $props();
|
|
19
|
+
</script>
|
|
20
|
+
|
|
21
|
+
<ContextMenuPrimitive.CheckboxItem
|
|
22
|
+
bind:ref
|
|
23
|
+
bind:checked
|
|
24
|
+
bind:indeterminate
|
|
25
|
+
data-slot="context-menu-checkbox-item"
|
|
26
|
+
data-inset={inset}
|
|
27
|
+
class={cn(
|
|
28
|
+
"focus:bg-accent focus:text-accent-foreground gap-1.5 rounded-md py-1 pr-8 pl-1.5 text-sm data-inset:pl-7 [&_svg:not([class*='size-'])]:size-4 relative flex cursor-default items-center outline-hidden select-none data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0",
|
|
29
|
+
className,
|
|
30
|
+
)}
|
|
31
|
+
{...restProps}
|
|
32
|
+
>
|
|
33
|
+
{#snippet children({ checked })}
|
|
34
|
+
<span class="absolute right-2 pointer-events-none">
|
|
35
|
+
{#if checked}
|
|
36
|
+
<CheckIcon />
|
|
37
|
+
{/if}
|
|
38
|
+
</span>
|
|
39
|
+
{@render childrenProp?.()}
|
|
40
|
+
{/snippet}
|
|
41
|
+
</ContextMenuPrimitive.CheckboxItem>
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { ContextMenu as ContextMenuPrimitive } from "bits-ui";
|
|
3
|
+
import { cn } from "@heyramzi/utils";
|
|
4
|
+
import ContextMenuPortal from "./context-menu-portal.svelte";
|
|
5
|
+
import type { ComponentProps } from "svelte";
|
|
6
|
+
import type { WithoutChildrenOrChild } from "@heyramzi/utils";
|
|
7
|
+
|
|
8
|
+
let {
|
|
9
|
+
ref = $bindable(null),
|
|
10
|
+
portalProps,
|
|
11
|
+
class: className,
|
|
12
|
+
...restProps
|
|
13
|
+
}: ContextMenuPrimitive.ContentProps & {
|
|
14
|
+
portalProps?: WithoutChildrenOrChild<ComponentProps<typeof ContextMenuPortal>>;
|
|
15
|
+
} = $props();
|
|
16
|
+
</script>
|
|
17
|
+
|
|
18
|
+
<ContextMenuPortal {...portalProps}>
|
|
19
|
+
<ContextMenuPrimitive.Content
|
|
20
|
+
bind:ref
|
|
21
|
+
data-slot="context-menu-content"
|
|
22
|
+
class={cn(
|
|
23
|
+
"t-dropdown ring-foreground/10 bg-popover text-popover-foreground min-w-36 rounded-xl p-1 shadow-raised ring-1 z-50 overflow-x-hidden overflow-y-auto outline-none",
|
|
24
|
+
className,
|
|
25
|
+
)}
|
|
26
|
+
{...restProps}
|
|
27
|
+
/>
|
|
28
|
+
</ContextMenuPortal>
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { ContextMenu as ContextMenuPrimitive } from "bits-ui";
|
|
3
|
+
import { cn } from "@heyramzi/utils";
|
|
4
|
+
|
|
5
|
+
let {
|
|
6
|
+
ref = $bindable(null),
|
|
7
|
+
class: className,
|
|
8
|
+
inset,
|
|
9
|
+
...restProps
|
|
10
|
+
}: ContextMenuPrimitive.GroupHeadingProps & {
|
|
11
|
+
inset?: boolean;
|
|
12
|
+
} = $props();
|
|
13
|
+
</script>
|
|
14
|
+
|
|
15
|
+
<ContextMenuPrimitive.GroupHeading
|
|
16
|
+
bind:ref
|
|
17
|
+
data-slot="context-menu-group-heading"
|
|
18
|
+
data-inset={inset}
|
|
19
|
+
class={cn("text-foreground px-2 py-1.5 text-sm font-medium data-inset:ps-8", className)}
|
|
20
|
+
{...restProps}
|
|
21
|
+
/>
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { ContextMenu as ContextMenuPrimitive } from "bits-ui";
|
|
3
|
+
|
|
4
|
+
let { ref = $bindable(null), ...restProps }: ContextMenuPrimitive.GroupProps = $props();
|
|
5
|
+
</script>
|
|
6
|
+
|
|
7
|
+
<ContextMenuPrimitive.Group bind:ref data-slot="context-menu-group" {...restProps} />
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { ContextMenu as ContextMenuPrimitive } from "bits-ui";
|
|
3
|
+
import { cn } from "@heyramzi/utils";
|
|
4
|
+
|
|
5
|
+
let {
|
|
6
|
+
ref = $bindable(null),
|
|
7
|
+
class: className,
|
|
8
|
+
inset,
|
|
9
|
+
variant = "default",
|
|
10
|
+
...restProps
|
|
11
|
+
}: ContextMenuPrimitive.ItemProps & {
|
|
12
|
+
inset?: boolean;
|
|
13
|
+
variant?: "default" | "destructive";
|
|
14
|
+
} = $props();
|
|
15
|
+
</script>
|
|
16
|
+
|
|
17
|
+
<ContextMenuPrimitive.Item
|
|
18
|
+
bind:ref
|
|
19
|
+
data-slot="context-menu-item"
|
|
20
|
+
data-inset={inset}
|
|
21
|
+
data-variant={variant}
|
|
22
|
+
class={cn(
|
|
23
|
+
"focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:text-destructive focus:*:[svg]:text-accent-foreground gap-1.5 rounded-md px-1.5 py-1 text-sm data-inset:pl-7 [&_svg:not([class*='size-'])]:size-4 group/context-menu-item relative flex cursor-default items-center outline-hidden select-none data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0",
|
|
24
|
+
className,
|
|
25
|
+
)}
|
|
26
|
+
{...restProps}
|
|
27
|
+
/>
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { cn, type WithElementRef } from "@heyramzi/utils";
|
|
3
|
+
import type { HTMLAttributes } from "svelte/elements";
|
|
4
|
+
|
|
5
|
+
let {
|
|
6
|
+
ref = $bindable(null),
|
|
7
|
+
class: className,
|
|
8
|
+
inset,
|
|
9
|
+
children,
|
|
10
|
+
...restProps
|
|
11
|
+
}: WithElementRef<HTMLAttributes<HTMLDivElement>> & {
|
|
12
|
+
inset?: boolean;
|
|
13
|
+
} = $props();
|
|
14
|
+
</script>
|
|
15
|
+
|
|
16
|
+
<div
|
|
17
|
+
bind:this={ref}
|
|
18
|
+
data-slot="context-menu-label"
|
|
19
|
+
data-inset={inset}
|
|
20
|
+
class={cn(
|
|
21
|
+
"text-muted-foreground px-1.5 py-1 text-xs font-medium data-inset:pl-7 data-inset:pl-8",
|
|
22
|
+
className,
|
|
23
|
+
)}
|
|
24
|
+
{...restProps}
|
|
25
|
+
>
|
|
26
|
+
{@render children?.()}
|
|
27
|
+
</div>
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { ContextMenu as ContextMenuPrimitive } from "bits-ui";
|
|
3
|
+
|
|
4
|
+
let {
|
|
5
|
+
ref = $bindable(null),
|
|
6
|
+
value = $bindable(""),
|
|
7
|
+
...restProps
|
|
8
|
+
}: ContextMenuPrimitive.RadioGroupProps = $props();
|
|
9
|
+
</script>
|
|
10
|
+
|
|
11
|
+
<ContextMenuPrimitive.RadioGroup
|
|
12
|
+
bind:ref
|
|
13
|
+
bind:value
|
|
14
|
+
data-slot="context-menu-radio-group"
|
|
15
|
+
{...restProps}
|
|
16
|
+
/>
|