@kortix/ui 0.0.0-stage → 0.14.3
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/README.md +155 -2
- package/dist/_vendor/kortix-shared.js +341 -0
- package/dist/chat/agent-picker.d.ts +8 -0
- package/dist/chat/agent-picker.js +18 -0
- package/dist/chat/composer.d.ts +31 -0
- package/dist/chat/composer.js +114 -0
- package/dist/chat/index.d.ts +22 -0
- package/dist/chat/index.js +22 -0
- package/dist/chat/markdown.d.ts +10 -0
- package/dist/chat/markdown.js +36 -0
- package/dist/chat/message-list.d.ts +25 -0
- package/dist/chat/message-list.js +73 -0
- package/dist/chat/message-view.d.ts +17 -0
- package/dist/chat/message-view.js +86 -0
- package/dist/chat/model-picker.d.ts +10 -0
- package/dist/chat/model-picker.js +68 -0
- package/dist/chat/permission-prompt.d.ts +10 -0
- package/dist/chat/permission-prompt.js +40 -0
- package/dist/chat/question-prompt.d.ts +8 -0
- package/dist/chat/question-prompt.js +60 -0
- package/dist/chat/send-failure.d.ts +9 -0
- package/dist/chat/send-failure.js +21 -0
- package/dist/chat/session-thread.d.ts +28 -0
- package/dist/chat/session-thread.js +47 -0
- package/dist/chat/streaming-markdown.d.ts +21 -0
- package/dist/chat/streaming-markdown.js +59 -0
- package/dist/chat/tool-call.d.ts +4 -0
- package/dist/chat/tool-call.js +150 -0
- package/dist/chat/user-message-parts.d.ts +6 -0
- package/dist/chat/user-message-parts.js +11 -0
- package/dist/components/ui/accordion.d.ts +7 -0
- package/dist/components/ui/accordion.js +18 -0
- package/dist/components/ui/alert-dialog.d.ts +19 -0
- package/dist/components/ui/alert-dialog.js +48 -0
- package/dist/components/ui/alert.d.ts +13 -0
- package/dist/components/ui/alert.js +67 -0
- package/dist/components/ui/avatar.d.ts +11 -0
- package/dist/components/ui/avatar.js +23 -0
- package/dist/components/ui/back-pill.d.ts +13 -0
- package/dist/components/ui/back-pill.js +18 -0
- package/dist/components/ui/badge.d.ts +10 -0
- package/dist/components/ui/badge.js +42 -0
- package/dist/components/ui/breadcrumb.d.ts +11 -0
- package/dist/components/ui/breadcrumb.js +28 -0
- package/dist/components/ui/bubble.d.ts +20 -0
- package/dist/components/ui/bubble.js +38 -0
- package/dist/components/ui/button-group.d.ts +9 -0
- package/dist/components/ui/button-group.js +32 -0
- package/dist/components/ui/button.d.ts +13 -0
- package/dist/components/ui/button.js +67 -0
- package/dist/components/ui/calendar.d.ts +4 -0
- package/dist/components/ui/calendar.js +39 -0
- package/dist/components/ui/card.d.ts +96 -0
- package/dist/components/ui/card.js +291 -0
- package/dist/components/ui/chain-of-thought.d.ts +75 -0
- package/dist/components/ui/chain-of-thought.js +66 -0
- package/dist/components/ui/chart.d.ts +65 -0
- package/dist/components/ui/chart.js +118 -0
- package/dist/components/ui/checkbox-group.d.ts +19 -0
- package/dist/components/ui/checkbox-group.js +41 -0
- package/dist/components/ui/checkbox.d.ts +14 -0
- package/dist/components/ui/checkbox.js +27 -0
- package/dist/components/ui/collapsible.d.ts +5 -0
- package/dist/components/ui/collapsible.js +14 -0
- package/dist/components/ui/command.d.ts +58 -0
- package/dist/components/ui/command.js +135 -0
- package/dist/components/ui/confirm-dialog.d.ts +19 -0
- package/dist/components/ui/confirm-dialog.js +30 -0
- package/dist/components/ui/context-menu.d.ts +45 -0
- package/dist/components/ui/context-menu.js +93 -0
- package/dist/components/ui/count-badge.d.ts +26 -0
- package/dist/components/ui/count-badge.js +26 -0
- package/dist/components/ui/data-grid.d.ts +24 -0
- package/dist/components/ui/data-grid.js +107 -0
- package/dist/components/ui/date-range-picker.d.ts +119 -0
- package/dist/components/ui/date-range-picker.js +190 -0
- package/dist/components/ui/definition-list.d.ts +15 -0
- package/dist/components/ui/definition-list.js +26 -0
- package/dist/components/ui/dialog.d.ts +29 -0
- package/dist/components/ui/dialog.js +52 -0
- package/dist/components/ui/disclosure.d.ts +121 -0
- package/dist/components/ui/disclosure.js +138 -0
- package/dist/components/ui/dot-matrix/dotm-3x3-10.d.ts +4 -0
- package/dist/components/ui/dot-matrix/dotm-3x3-10.js +29 -0
- package/dist/components/ui/dot-matrix/dotm-3x3-12.d.ts +4 -0
- package/dist/components/ui/dot-matrix/dotm-3x3-12.js +19 -0
- package/dist/components/ui/dot-matrix/dotm-3x3-13.d.ts +4 -0
- package/dist/components/ui/dot-matrix/dotm-3x3-13.js +19 -0
- package/dist/components/ui/dot-matrix/dotm-3x3-15.d.ts +4 -0
- package/dist/components/ui/dot-matrix/dotm-3x3-15.js +22 -0
- package/dist/components/ui/dot-matrix/dotm-3x3-16.d.ts +4 -0
- package/dist/components/ui/dot-matrix/dotm-3x3-16.js +5 -0
- package/dist/components/ui/dot-matrix/dotm-3x3-18.d.ts +4 -0
- package/dist/components/ui/dot-matrix/dotm-3x3-18.js +5 -0
- package/dist/components/ui/dot-matrix/dotm-3x3-19.d.ts +4 -0
- package/dist/components/ui/dot-matrix/dotm-3x3-19.js +5 -0
- package/dist/components/ui/dot-matrix/dotm-3x3-2.d.ts +4 -0
- package/dist/components/ui/dot-matrix/dotm-3x3-2.js +3 -0
- package/dist/components/ui/dot-matrix/dotm-3x3-20.d.ts +4 -0
- package/dist/components/ui/dot-matrix/dotm-3x3-20.js +5 -0
- package/dist/components/ui/dot-matrix/dotm-3x3-21.d.ts +4 -0
- package/dist/components/ui/dot-matrix/dotm-3x3-21.js +5 -0
- package/dist/components/ui/dot-matrix/dotm-3x3-3.d.ts +4 -0
- package/dist/components/ui/dot-matrix/dotm-3x3-3.js +3 -0
- package/dist/components/ui/dot-matrix/dotm-3x3-4.d.ts +4 -0
- package/dist/components/ui/dot-matrix/dotm-3x3-4.js +3 -0
- package/dist/components/ui/dot-matrix/dotm-3x3-5.d.ts +4 -0
- package/dist/components/ui/dot-matrix/dotm-3x3-5.js +3 -0
- package/dist/components/ui/dot-matrix/dotm-3x3-6.d.ts +4 -0
- package/dist/components/ui/dot-matrix/dotm-3x3-6.js +19 -0
- package/dist/components/ui/dot-matrix/dotm-3x3-7.d.ts +4 -0
- package/dist/components/ui/dot-matrix/dotm-3x3-7.js +19 -0
- package/dist/components/ui/dot-matrix/dotm-3x3-8.d.ts +4 -0
- package/dist/components/ui/dot-matrix/dotm-3x3-8.js +19 -0
- package/dist/components/ui/dot-matrix/dotm-3x3-9.d.ts +4 -0
- package/dist/components/ui/dot-matrix/dotm-3x3-9.js +23 -0
- package/dist/components/ui/dot-matrix/dotm-circular-1.d.ts +4 -0
- package/dist/components/ui/dot-matrix/dotm-circular-1.js +28 -0
- package/dist/components/ui/dot-matrix/dotm-circular-10.d.ts +4 -0
- package/dist/components/ui/dot-matrix/dotm-circular-10.js +40 -0
- package/dist/components/ui/dot-matrix/dotm-circular-11.d.ts +4 -0
- package/dist/components/ui/dot-matrix/dotm-circular-11.js +37 -0
- package/dist/components/ui/dot-matrix/dotm-circular-12.d.ts +4 -0
- package/dist/components/ui/dot-matrix/dotm-circular-12.js +42 -0
- package/dist/components/ui/dot-matrix/dotm-circular-14.d.ts +4 -0
- package/dist/components/ui/dot-matrix/dotm-circular-14.js +37 -0
- package/dist/components/ui/dot-matrix/dotm-circular-15.d.ts +4 -0
- package/dist/components/ui/dot-matrix/dotm-circular-15.js +49 -0
- package/dist/components/ui/dot-matrix/dotm-circular-17.d.ts +4 -0
- package/dist/components/ui/dot-matrix/dotm-circular-17.js +31 -0
- package/dist/components/ui/dot-matrix/dotm-circular-2.d.ts +4 -0
- package/dist/components/ui/dot-matrix/dotm-circular-2.js +37 -0
- package/dist/components/ui/dot-matrix/dotm-circular-3.d.ts +4 -0
- package/dist/components/ui/dot-matrix/dotm-circular-3.js +54 -0
- package/dist/components/ui/dot-matrix/dotm-circular-4.d.ts +4 -0
- package/dist/components/ui/dot-matrix/dotm-circular-4.js +35 -0
- package/dist/components/ui/dot-matrix/dotm-circular-5.d.ts +4 -0
- package/dist/components/ui/dot-matrix/dotm-circular-5.js +30 -0
- package/dist/components/ui/dot-matrix/dotm-circular-6.d.ts +4 -0
- package/dist/components/ui/dot-matrix/dotm-circular-6.js +37 -0
- package/dist/components/ui/dot-matrix/dotm-circular-7.d.ts +4 -0
- package/dist/components/ui/dot-matrix/dotm-circular-7.js +25 -0
- package/dist/components/ui/dot-matrix/dotm-circular-8.d.ts +4 -0
- package/dist/components/ui/dot-matrix/dotm-circular-8.js +26 -0
- package/dist/components/ui/dot-matrix/dotm-circular-9.d.ts +4 -0
- package/dist/components/ui/dot-matrix/dotm-circular-9.js +41 -0
- package/dist/components/ui/dot-matrix/dotm-square-1.d.ts +4 -0
- package/dist/components/ui/dot-matrix/dotm-square-1.js +27 -0
- package/dist/components/ui/dot-matrix/dotm-square-10.d.ts +4 -0
- package/dist/components/ui/dot-matrix/dotm-square-10.js +27 -0
- package/dist/components/ui/dot-matrix/dotm-square-11.d.ts +4 -0
- package/dist/components/ui/dot-matrix/dotm-square-11.js +25 -0
- package/dist/components/ui/dot-matrix/dotm-square-12.d.ts +4 -0
- package/dist/components/ui/dot-matrix/dotm-square-12.js +28 -0
- package/dist/components/ui/dot-matrix/dotm-square-13.d.ts +4 -0
- package/dist/components/ui/dot-matrix/dotm-square-13.js +45 -0
- package/dist/components/ui/dot-matrix/dotm-square-14.d.ts +4 -0
- package/dist/components/ui/dot-matrix/dotm-square-14.js +38 -0
- package/dist/components/ui/dot-matrix/dotm-square-15.d.ts +4 -0
- package/dist/components/ui/dot-matrix/dotm-square-15.js +31 -0
- package/dist/components/ui/dot-matrix/dotm-square-16.d.ts +4 -0
- package/dist/components/ui/dot-matrix/dotm-square-16.js +33 -0
- package/dist/components/ui/dot-matrix/dotm-square-17.d.ts +4 -0
- package/dist/components/ui/dot-matrix/dotm-square-17.js +27 -0
- package/dist/components/ui/dot-matrix/dotm-square-18.d.ts +4 -0
- package/dist/components/ui/dot-matrix/dotm-square-18.js +29 -0
- package/dist/components/ui/dot-matrix/dotm-square-19.d.ts +4 -0
- package/dist/components/ui/dot-matrix/dotm-square-19.js +74 -0
- package/dist/components/ui/dot-matrix/dotm-square-2.d.ts +4 -0
- package/dist/components/ui/dot-matrix/dotm-square-2.js +72 -0
- package/dist/components/ui/dot-matrix/dotm-square-20.d.ts +4 -0
- package/dist/components/ui/dot-matrix/dotm-square-20.js +79 -0
- package/dist/components/ui/dot-matrix/dotm-square-3.d.ts +4 -0
- package/dist/components/ui/dot-matrix/dotm-square-3.js +23 -0
- package/dist/components/ui/dot-matrix/dotm-square-4.d.ts +4 -0
- package/dist/components/ui/dot-matrix/dotm-square-4.js +41 -0
- package/dist/components/ui/dot-matrix/dotm-square-5.d.ts +4 -0
- package/dist/components/ui/dot-matrix/dotm-square-5.js +23 -0
- package/dist/components/ui/dot-matrix/dotm-square-6.d.ts +4 -0
- package/dist/components/ui/dot-matrix/dotm-square-6.js +20 -0
- package/dist/components/ui/dot-matrix/dotm-square-7.d.ts +4 -0
- package/dist/components/ui/dot-matrix/dotm-square-7.js +43 -0
- package/dist/components/ui/dot-matrix/dotm-square-8.d.ts +4 -0
- package/dist/components/ui/dot-matrix/dotm-square-8.js +57 -0
- package/dist/components/ui/dot-matrix/dotm-square-9.d.ts +4 -0
- package/dist/components/ui/dot-matrix/dotm-square-9.js +89 -0
- package/dist/components/ui/dot-matrix/session-dot-matrix.d.ts +46 -0
- package/dist/components/ui/dot-matrix/session-dot-matrix.js +153 -0
- package/dist/components/ui/drawer.d.ts +15 -0
- package/dist/components/ui/drawer.js +35 -0
- package/dist/components/ui/dropdown-menu.d.ts +49 -0
- package/dist/components/ui/dropdown-menu.js +113 -0
- package/dist/components/ui/emoji-picker.d.ts +15 -0
- package/dist/components/ui/emoji-picker.js +137 -0
- package/dist/components/ui/emoji-tint.d.ts +41 -0
- package/dist/components/ui/emoji-tint.js +131 -0
- package/dist/components/ui/empty.d.ts +11 -0
- package/dist/components/ui/empty.js +33 -0
- package/dist/components/ui/entity-avatar.d.ts +84 -0
- package/dist/components/ui/entity-avatar.js +106 -0
- package/dist/components/ui/faded-scroll-area.d.ts +8 -0
- package/dist/components/ui/faded-scroll-area.js +80 -0
- package/dist/components/ui/favicon-avatar.d.ts +32 -0
- package/dist/components/ui/favicon-avatar.js +18 -0
- package/dist/components/ui/field.d.ts +15 -0
- package/dist/components/ui/field.js +48 -0
- package/dist/components/ui/file-tree.d.ts +32 -0
- package/dist/components/ui/file-tree.js +30 -0
- package/dist/components/ui/glyph-face.d.ts +18 -0
- package/dist/components/ui/glyph-face.js +37 -0
- package/dist/components/ui/glyph-paths-source.d.ts +2 -0
- package/dist/components/ui/glyph-paths-source.js +40 -0
- package/dist/components/ui/glyph-paths.generated.d.ts +2 -0
- package/dist/components/ui/glyph-paths.generated.js +207 -0
- package/dist/components/ui/glyph-picker.d.ts +22 -0
- package/dist/components/ui/glyph-picker.js +118 -0
- package/dist/components/ui/glyph-registry.d.ts +36 -0
- package/dist/components/ui/glyph-registry.js +479 -0
- package/dist/components/ui/glyph-tint.d.ts +6 -0
- package/dist/components/ui/glyph-tint.js +93 -0
- package/dist/components/ui/hint.d.ts +14 -0
- package/dist/components/ui/hint.js +12 -0
- package/dist/components/ui/histogram-bars.d.ts +38 -0
- package/dist/components/ui/histogram-bars.js +93 -0
- package/dist/components/ui/hover-card.d.ts +28 -0
- package/dist/components/ui/hover-card.js +35 -0
- package/dist/components/ui/icon-provider.d.ts +23 -0
- package/dist/components/ui/icon-provider.js +30 -0
- package/dist/components/ui/info-banner.d.ts +14 -0
- package/dist/components/ui/info-banner.js +72 -0
- package/dist/components/ui/inline-meta.d.ts +6 -0
- package/dist/components/ui/inline-meta.js +8 -0
- package/dist/components/ui/input-group.d.ts +19 -0
- package/dist/components/ui/input-group.js +73 -0
- package/dist/components/ui/input.d.ts +26 -0
- package/dist/components/ui/input.js +23 -0
- package/dist/components/ui/item.d.ts +23 -0
- package/dist/components/ui/item.js +67 -0
- package/dist/components/ui/kbd.d.ts +3 -0
- package/dist/components/ui/kbd.js +20 -0
- package/dist/components/ui/kortix-asterisk.d.ts +6 -0
- package/dist/components/ui/kortix-asterisk.js +17 -0
- package/dist/components/ui/kortix-icons.d.ts +2 -0
- package/dist/components/ui/kortix-icons.js +17 -0
- package/dist/components/ui/kortix-loader.d.ts +76 -0
- package/dist/components/ui/kortix-loader.js +74 -0
- package/dist/components/ui/kortix-logo.d.ts +30 -0
- package/dist/components/ui/kortix-logo.js +47 -0
- package/dist/components/ui/label.d.ts +4 -0
- package/dist/components/ui/label.js +9 -0
- package/dist/components/ui/list.d.ts +15 -0
- package/dist/components/ui/list.js +25 -0
- package/dist/components/ui/loading.d.ts +19 -0
- package/dist/components/ui/loading.js +31 -0
- package/dist/components/ui/local-time.d.ts +34 -0
- package/dist/components/ui/local-time.js +60 -0
- package/dist/components/ui/map.d.ts +101 -0
- package/dist/components/ui/map.js +257 -0
- package/dist/components/ui/marker.d.ts +14 -0
- package/dist/components/ui/marker.js +28 -0
- package/dist/components/ui/menu-recipe.d.ts +102 -0
- package/dist/components/ui/menu-recipe.js +129 -0
- package/dist/components/ui/mermaid-render.d.ts +51 -0
- package/dist/components/ui/mermaid-render.js +65 -0
- package/dist/components/ui/mermaid-renderer.d.ts +13 -0
- package/dist/components/ui/mermaid-renderer.js +340 -0
- package/dist/components/ui/message.d.ts +15 -0
- package/dist/components/ui/message.js +26 -0
- package/dist/components/ui/modal.d.ts +104 -0
- package/dist/components/ui/modal.js +180 -0
- package/dist/components/ui/navigation-menu.d.ts +16 -0
- package/dist/components/ui/navigation-menu.js +35 -0
- package/dist/components/ui/page-search-bar.d.ts +11 -0
- package/dist/components/ui/page-search-bar.js +13 -0
- package/dist/components/ui/phone-input.d.ts +7 -0
- package/dist/components/ui/phone-input.js +59 -0
- package/dist/components/ui/pixel-kortix-mark.d.ts +13 -0
- package/dist/components/ui/pixel-kortix-mark.js +40 -0
- package/dist/components/ui/popover.d.ts +10 -0
- package/dist/components/ui/popover.js +38 -0
- package/dist/components/ui/portal.d.ts +5 -0
- package/dist/components/ui/portal.js +15 -0
- package/dist/components/ui/preview-image.d.ts +14 -0
- package/dist/components/ui/preview-image.js +58 -0
- package/dist/components/ui/progress-ring.d.ts +6 -0
- package/dist/components/ui/progress-ring.js +9 -0
- package/dist/components/ui/progress.d.ts +6 -0
- package/dist/components/ui/progress.js +8 -0
- package/dist/components/ui/radio-group.d.ts +12 -0
- package/dist/components/ui/radio-group.js +20 -0
- package/dist/components/ui/resizable.d.ts +24 -0
- package/dist/components/ui/resizable.js +16 -0
- package/dist/components/ui/scroll-area.d.ts +5 -0
- package/dist/components/ui/scroll-area.js +11 -0
- package/dist/components/ui/section-card.d.ts +37 -0
- package/dist/components/ui/section-card.js +14 -0
- package/dist/components/ui/section.d.ts +10 -0
- package/dist/components/ui/section.js +22 -0
- package/dist/components/ui/select.d.ts +25 -0
- package/dist/components/ui/select.js +59 -0
- package/dist/components/ui/separator.d.ts +4 -0
- package/dist/components/ui/separator.js +8 -0
- package/dist/components/ui/shader-safe.d.ts +48 -0
- package/dist/components/ui/shader-safe.js +74 -0
- package/dist/components/ui/sheet.d.ts +32 -0
- package/dist/components/ui/sheet.js +55 -0
- package/dist/components/ui/sidebar-context.d.ts +72 -0
- package/dist/components/ui/sidebar-context.js +36 -0
- package/dist/components/ui/sidebar-menu-primitives.d.ts +38 -0
- package/dist/components/ui/sidebar-menu-primitives.js +97 -0
- package/dist/components/ui/sidebar-panel.d.ts +36 -0
- package/dist/components/ui/sidebar-panel.js +265 -0
- package/dist/components/ui/sidebar-peek.d.ts +27 -0
- package/dist/components/ui/sidebar-peek.js +70 -0
- package/dist/components/ui/sidebar-width.d.ts +48 -0
- package/dist/components/ui/sidebar-width.js +62 -0
- package/dist/components/ui/sidebar.d.ts +18 -0
- package/dist/components/ui/sidebar.js +194 -0
- package/dist/components/ui/skeleton.d.ts +3 -0
- package/dist/components/ui/skeleton.js +6 -0
- package/dist/components/ui/slider-native.d.ts +7 -0
- package/dist/components/ui/slider-native.js +16 -0
- package/dist/components/ui/slider.d.ts +14 -0
- package/dist/components/ui/slider.js +48 -0
- package/dist/components/ui/sliding-tab-indicator.d.ts +61 -0
- package/dist/components/ui/sliding-tab-indicator.js +128 -0
- package/dist/components/ui/split-sheet.d.ts +61 -0
- package/dist/components/ui/split-sheet.js +239 -0
- package/dist/components/ui/spotlight-card.d.ts +8 -0
- package/dist/components/ui/spotlight-card.js +43 -0
- package/dist/components/ui/status-ring.d.ts +38 -0
- package/dist/components/ui/status-ring.js +38 -0
- package/dist/components/ui/status.d.ts +58 -0
- package/dist/components/ui/status.js +76 -0
- package/dist/components/ui/stepper.d.ts +28 -0
- package/dist/components/ui/stepper.js +73 -0
- package/dist/components/ui/switch.d.ts +8 -0
- package/dist/components/ui/switch.js +131 -0
- package/dist/components/ui/system-message.d.ts +23 -0
- package/dist/components/ui/system-message.js +51 -0
- package/dist/components/ui/table.d.ts +10 -0
- package/dist/components/ui/table.js +28 -0
- package/dist/components/ui/tabs.d.ts +73 -0
- package/dist/components/ui/tabs.js +207 -0
- package/dist/components/ui/tag.d.ts +7 -0
- package/dist/components/ui/tag.js +22 -0
- package/dist/components/ui/text-shimmer.d.ts +13 -0
- package/dist/components/ui/text-shimmer.js +91 -0
- package/dist/components/ui/textarea.d.ts +33 -0
- package/dist/components/ui/textarea.js +87 -0
- package/dist/components/ui/toast.d.ts +105 -0
- package/dist/components/ui/toast.js +233 -0
- package/dist/components/ui/toggle.d.ts +12 -0
- package/dist/components/ui/toggle.js +26 -0
- package/dist/components/ui/tooltip.d.ts +9 -0
- package/dist/components/ui/tooltip.js +16 -0
- package/dist/components/ui/trigger-variants.d.ts +14 -0
- package/dist/components/ui/trigger-variants.js +67 -0
- package/dist/components/ui/type-to-confirm-dialog.d.ts +88 -0
- package/dist/components/ui/type-to-confirm-dialog.js +101 -0
- package/dist/components/ui/typed-title-logic.d.ts +22 -0
- package/dist/components/ui/typed-title-logic.js +33 -0
- package/dist/components/ui/typed-title.d.ts +38 -0
- package/dist/components/ui/typed-title.js +66 -0
- package/dist/components/ui/typing-animation.d.ts +36 -0
- package/dist/components/ui/typing-animation.js +141 -0
- package/dist/components/ui/user-avatar.d.ts +47 -0
- package/dist/components/ui/user-avatar.js +46 -0
- package/dist/hooks/use-debounce.d.ts +4 -0
- package/dist/hooks/use-debounce.js +17 -0
- package/dist/hooks/use-is-dark.d.ts +2 -0
- package/dist/hooks/use-is-dark.js +27 -0
- package/dist/hooks/use-mobile.d.ts +2 -0
- package/dist/hooks/use-mobile.js +15 -0
- package/dist/hooks/use-proximity-hover.d.ts +52 -0
- package/dist/hooks/use-proximity-hover.js +232 -0
- package/dist/icons/close.d.ts +2 -0
- package/dist/icons/close.js +7 -0
- package/dist/icons/copy.d.ts +3 -0
- package/dist/icons/copy.js +6 -0
- package/dist/icons/sidebar-toggle.d.ts +13 -0
- package/dist/icons/sidebar-toggle.js +13 -0
- package/dist/index.d.ts +24 -0
- package/dist/index.js +33 -0
- package/dist/lib/dotmatrix-core.d.ts +113 -0
- package/dist/lib/dotmatrix-core.js +920 -0
- package/dist/lib/dotmatrix-hooks.d.ts +28 -0
- package/dist/lib/dotmatrix-hooks.js +151 -0
- package/dist/lib/favicon.d.ts +4 -0
- package/dist/lib/favicon.js +21 -0
- package/dist/lib/font-weight.d.ts +6 -0
- package/dist/lib/font-weight.js +6 -0
- package/dist/lib/icon-config.d.ts +33 -0
- package/dist/lib/icon-config.js +22 -0
- package/dist/lib/icon-context.d.ts +34 -0
- package/dist/lib/icon-context.js +81 -0
- package/dist/lib/portal-root.d.ts +8 -0
- package/dist/lib/portal-root.js +26 -0
- package/dist/lib/settle.d.ts +16 -0
- package/dist/lib/settle.js +29 -0
- package/dist/lib/springs.d.ts +31 -0
- package/dist/lib/springs.js +29 -0
- package/dist/lib/utils.d.ts +2 -0
- package/dist/lib/utils.js +5 -0
- package/dist/lib/z-stack.d.ts +55 -0
- package/dist/lib/z-stack.js +130 -0
- package/dist/providers/ui-provider.d.ts +141 -0
- package/dist/providers/ui-provider.js +93 -0
- package/dist/styles/dotmatrix-loader.css +1239 -0
- package/dist/styles/fonts.css +46 -0
- package/dist/styles/tailwind.css +10 -0
- package/dist/styles/theme.css +1019 -0
- package/dist/styles/tokens.css +146 -0
- package/dist/styles.css +2 -0
- package/package.json +881 -4
- package/skills/kortix-ui/SKILL.md +150 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Pure helpers that keep half-streamed markdown readable. Ported from
|
|
3
|
+
* apps/web `features/session/turn/throttled-markdown.tsx`. The chat renderer
|
|
4
|
+
* has no generative UI fences, so `closeUnterminatedCodeFence` always closes.
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* A fence opener still being written (`` ```openu ``) would render as an empty
|
|
8
|
+
* code card labelled with half a language. While streaming, hold back a last
|
|
9
|
+
* line that opens a fence until its newline arrives. A closing fence is never held.
|
|
10
|
+
*/
|
|
11
|
+
export declare function holdBackFenceOpener(text: string): string;
|
|
12
|
+
/** Closes an unterminated code fence so the rest of the stream renders as markdown. */
|
|
13
|
+
export declare function closeUnterminatedCodeFence(text: string): string;
|
|
14
|
+
/**
|
|
15
|
+
* A table is plain text until its separator row (`|---|`) arrives. While
|
|
16
|
+
* streaming, a trailing header row (and a half-written separator) is held back
|
|
17
|
+
* until the separator is complete, so the table appears as a table.
|
|
18
|
+
*/
|
|
19
|
+
export declare function holdBackTableHeader(text: string): string;
|
|
20
|
+
/** All three, in the order apps/web applies them to a streaming segment. */
|
|
21
|
+
export declare function streamingMarkdown(text: string): string;
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Pure helpers that keep half-streamed markdown readable. Ported from
|
|
3
|
+
* apps/web `features/session/turn/throttled-markdown.tsx`. The chat renderer
|
|
4
|
+
* has no generative UI fences, so `closeUnterminatedCodeFence` always closes.
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* A fence opener still being written (`` ```openu ``) would render as an empty
|
|
8
|
+
* code card labelled with half a language. While streaming, hold back a last
|
|
9
|
+
* line that opens a fence until its newline arrives. A closing fence is never held.
|
|
10
|
+
*/
|
|
11
|
+
export function holdBackFenceOpener(text) {
|
|
12
|
+
const start = text.lastIndexOf('\n') + 1;
|
|
13
|
+
if (!text.slice(start).trimStart().startsWith('```'))
|
|
14
|
+
return text;
|
|
15
|
+
const fencesBefore = text
|
|
16
|
+
.slice(0, start)
|
|
17
|
+
.split('\n')
|
|
18
|
+
.filter((line) => line.trimStart().startsWith('```')).length;
|
|
19
|
+
return fencesBefore % 2 === 0 ? text.slice(0, start) : text;
|
|
20
|
+
}
|
|
21
|
+
/** Closes an unterminated code fence so the rest of the stream renders as markdown. */
|
|
22
|
+
export function closeUnterminatedCodeFence(text) {
|
|
23
|
+
if (!text)
|
|
24
|
+
return text;
|
|
25
|
+
const fences = text.split('\n').filter((line) => line.trimStart().startsWith('```')).length;
|
|
26
|
+
return fences % 2 === 0 ? text : `${text}\n\n\`\`\``;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* A table is plain text until its separator row (`|---|`) arrives. While
|
|
30
|
+
* streaming, a trailing header row (and a half-written separator) is held back
|
|
31
|
+
* until the separator is complete, so the table appears as a table.
|
|
32
|
+
*/
|
|
33
|
+
export function holdBackTableHeader(text) {
|
|
34
|
+
if (!text.includes('|'))
|
|
35
|
+
return text;
|
|
36
|
+
const lines = text.split('\n');
|
|
37
|
+
let end = lines.length;
|
|
38
|
+
if (lines[end - 1]?.trim() === '')
|
|
39
|
+
end--;
|
|
40
|
+
const isRow = (line) => line?.trimStart().startsWith('|') ?? false;
|
|
41
|
+
const last = lines[end - 1];
|
|
42
|
+
if (!isRow(last))
|
|
43
|
+
return text;
|
|
44
|
+
// `| a | b |` with no table line above it: a header still waiting for its separator.
|
|
45
|
+
if (!isRow(lines[end - 2]))
|
|
46
|
+
return lines.slice(0, end - 1).join('\n');
|
|
47
|
+
// A separator still being written under a header that starts the table.
|
|
48
|
+
const cells = (line) => line.trim().replace(/^\||\|$/g, '').split('|').length;
|
|
49
|
+
const header = lines[end - 2];
|
|
50
|
+
const separatorDone = last.trim().endsWith('|') && cells(last) >= cells(header);
|
|
51
|
+
if (/^\s*\|[\s|:-]*$/.test(last) && !isRow(lines[end - 3]) && !separatorDone) {
|
|
52
|
+
return lines.slice(0, end - 2).join('\n');
|
|
53
|
+
}
|
|
54
|
+
return text;
|
|
55
|
+
}
|
|
56
|
+
/** All three, in the order apps/web applies them to a streaming segment. */
|
|
57
|
+
export function streamingMarkdown(text) {
|
|
58
|
+
return closeUnterminatedCodeFence(holdBackFenceOpener(holdBackTableHeader(text)));
|
|
59
|
+
}
|
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
/**
|
|
4
|
+
* One agent tool call as a collapsible card: a category icon, the tool title,
|
|
5
|
+
* a one-line summary, a live status glyph and, expanded, a body built from
|
|
6
|
+
* `toolViewModel` (web search, shell, file read/write/edit, grep/glob, task,
|
|
7
|
+
* todo, question, and a pretty-JSON `generic` fallback).
|
|
8
|
+
*
|
|
9
|
+
* Takes the normalized `ToolView` from `@kortix/sdk`: status is already
|
|
10
|
+
* 'pending' | 'running' | 'done' | 'error' (a router tool that reports
|
|
11
|
+
* `completed` around a failure body is `error`), and the icon comes from the
|
|
12
|
+
* `toolInfo` registry, not from sniffing the tool name.
|
|
13
|
+
*/
|
|
14
|
+
import { CaretRightIcon, CheckIcon, CheckSquareIcon, FileTextIcon, GlobeIcon, MagnifyingGlassIcon, PencilSimpleIcon, RobotIcon, TerminalWindowIcon, WarningCircleIcon, WrenchIcon, } from '@phosphor-icons/react';
|
|
15
|
+
import { toolInfo, toolViewModel } from '@kortix/sdk';
|
|
16
|
+
import { Badge } from '../components/ui/badge.js';
|
|
17
|
+
import { Collapsible, CollapsibleContent, CollapsibleTrigger } from '../components/ui/collapsible.js';
|
|
18
|
+
import Loading from '../components/ui/loading.js';
|
|
19
|
+
import { cn } from '../lib/utils.js';
|
|
20
|
+
import { useUiStrings } from '../providers/ui-provider.js';
|
|
21
|
+
const CATEGORY_ICON = {
|
|
22
|
+
shell: TerminalWindowIcon,
|
|
23
|
+
files: FileTextIcon,
|
|
24
|
+
edit: PencilSimpleIcon,
|
|
25
|
+
search: MagnifyingGlassIcon,
|
|
26
|
+
web: GlobeIcon,
|
|
27
|
+
task: RobotIcon,
|
|
28
|
+
other: WrenchIcon,
|
|
29
|
+
};
|
|
30
|
+
const PRE = 'bg-muted scrollbar-thin overflow-auto rounded-md p-2 font-mono text-xs leading-relaxed';
|
|
31
|
+
function StatusGlyph({ status }) {
|
|
32
|
+
if (status === 'running' || status === 'pending')
|
|
33
|
+
return _jsx(Loading, { variant: "ring", className: "text-muted-foreground size-3.5 shrink-0" });
|
|
34
|
+
if (status === 'error')
|
|
35
|
+
return _jsx(WarningCircleIcon, { weight: "fill", className: "text-destructive size-3.5 shrink-0" });
|
|
36
|
+
return _jsx(CheckIcon, { className: "text-kortix-green size-3.5 shrink-0" });
|
|
37
|
+
}
|
|
38
|
+
/** One-line summary next to the title while collapsed. */
|
|
39
|
+
function summaryFor(vm, t) {
|
|
40
|
+
switch (vm.kind) {
|
|
41
|
+
case 'web-search':
|
|
42
|
+
return vm.query;
|
|
43
|
+
case 'shell':
|
|
44
|
+
return vm.command;
|
|
45
|
+
case 'file-read':
|
|
46
|
+
case 'file-write':
|
|
47
|
+
case 'file-edit':
|
|
48
|
+
return vm.path;
|
|
49
|
+
case 'search':
|
|
50
|
+
return vm.pattern;
|
|
51
|
+
case 'task':
|
|
52
|
+
return vm.description;
|
|
53
|
+
case 'todo':
|
|
54
|
+
return vm.items.length > 0 ? t.todoItems(vm.items.length) : '';
|
|
55
|
+
case 'question':
|
|
56
|
+
return vm.questions[0]?.question ?? '';
|
|
57
|
+
case 'generic':
|
|
58
|
+
return '';
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
function OutputBlock({ text }) {
|
|
62
|
+
return _jsx("pre", { className: cn(PRE, 'text-foreground max-h-72'), children: text.slice(0, 6000) });
|
|
63
|
+
}
|
|
64
|
+
function PathLine({ path }) {
|
|
65
|
+
return path ? _jsx("div", { className: "text-muted-foreground truncate font-mono text-xs", children: path }) : null;
|
|
66
|
+
}
|
|
67
|
+
function WebSearchBody({ vm }) {
|
|
68
|
+
const t = useUiStrings().chat;
|
|
69
|
+
if (vm.error) {
|
|
70
|
+
return (_jsxs("div", { className: "bg-destructive/10 text-foreground flex items-start gap-2 rounded-md p-2 text-xs", children: [_jsx(WarningCircleIcon, { weight: "fill", className: "text-destructive mt-0.5 size-3.5 shrink-0" }), _jsx("span", { children: t.webSearchFailed(vm.error) })] }));
|
|
71
|
+
}
|
|
72
|
+
if (!vm.results || vm.results.length === 0) {
|
|
73
|
+
return _jsx("p", { className: "text-muted-foreground text-xs", children: t.noResults });
|
|
74
|
+
}
|
|
75
|
+
return (_jsxs("div", { className: "space-y-2", children: [vm.answer && _jsx("p", { className: "text-foreground text-xs", children: vm.answer }), _jsx("ul", { className: "space-y-1.5", children: vm.results.map((r, i) => (_jsxs("li", { className: "min-w-0", children: [_jsx("a", { href: r.url, target: "_blank", rel: "noreferrer noopener", className: "text-foreground block truncate text-xs font-medium hover:underline", children: r.title || r.url }), _jsx("div", { className: "text-muted-foreground truncate text-xs", children: r.url }), r.snippet && _jsx("p", { className: "text-muted-foreground mt-0.5 line-clamp-2 text-xs", children: r.snippet })] }, `${r.url}-${i}`))) })] }));
|
|
76
|
+
}
|
|
77
|
+
function ShellBody({ vm }) {
|
|
78
|
+
return (_jsxs("div", { className: "space-y-2", children: [vm.command && _jsxs("pre", { className: cn(PRE, 'text-foreground'), children: ["$ ", vm.command] }), typeof vm.exitCode === 'number' && vm.exitCode !== 0 && (_jsxs(Badge, { variant: "destructive", children: ["exit ", vm.exitCode] })), vm.stdout && _jsx(OutputBlock, { text: vm.stdout })] }));
|
|
79
|
+
}
|
|
80
|
+
function FilePreviewBody({ path, preview }) {
|
|
81
|
+
return (_jsxs("div", { className: "space-y-1.5", children: [_jsx(PathLine, { path: path }), preview && _jsx(OutputBlock, { text: preview })] }));
|
|
82
|
+
}
|
|
83
|
+
function FileEditBody({ vm }) {
|
|
84
|
+
return (_jsxs("div", { className: "space-y-1.5", children: [_jsx(PathLine, { path: vm.path }), vm.diff && vm.diff.length > 0 ? (_jsx("pre", { className: cn(PRE, 'max-h-72'), children: vm.diff.slice(0, 400).map((line, i) => (_jsxs("div", { className: cn('whitespace-pre-wrap', line.type === 'added' && 'bg-kortix-green/15 text-foreground', line.type === 'removed' && 'bg-destructive/10 text-foreground', line.type === 'unchanged' && 'text-muted-foreground'), children: [line.type === 'added' ? '+ ' : line.type === 'removed' ? '- ' : ' ', line.text] }, i))) })) : null] }));
|
|
85
|
+
}
|
|
86
|
+
function SearchBody({ vm }) {
|
|
87
|
+
const t = useUiStrings().chat;
|
|
88
|
+
if (!vm.matches || vm.matches.length === 0) {
|
|
89
|
+
return _jsx("p", { className: "text-muted-foreground text-xs", children: t.noMatches });
|
|
90
|
+
}
|
|
91
|
+
return (_jsx("ul", { className: "text-foreground scrollbar-thin max-h-72 space-y-1 overflow-auto font-mono text-xs", children: vm.matches.map((m, i) => (_jsxs("li", { className: "truncate", children: [_jsx("span", { className: "text-muted-foreground", children: m.path }), typeof m.line === 'number' && _jsxs("span", { className: "text-muted-foreground", children: [":", m.line] }), m.content && _jsx("span", { className: "ml-1.5", children: m.content })] }, i))) }));
|
|
92
|
+
}
|
|
93
|
+
function TaskBody({ vm }) {
|
|
94
|
+
return (_jsxs("div", { className: "text-foreground flex flex-wrap items-center gap-1.5 text-xs", children: [_jsx("span", { children: vm.description }), vm.agent && _jsx(Badge, { variant: "secondary", children: vm.agent })] }));
|
|
95
|
+
}
|
|
96
|
+
function TodoBody({ vm }) {
|
|
97
|
+
if (vm.items.length === 0)
|
|
98
|
+
return null;
|
|
99
|
+
return (_jsx("ul", { className: "space-y-1", children: vm.items.map((item, i) => {
|
|
100
|
+
const done = item.status === 'completed';
|
|
101
|
+
return (_jsxs("li", { className: "flex items-start gap-2 text-xs", children: [_jsx(CheckSquareIcon, { weight: done ? 'fill' : undefined, className: cn('mt-0.5 size-3.5 shrink-0', done ? 'text-kortix-green' : 'text-muted-foreground') }), _jsx("span", { className: done ? 'text-muted-foreground line-through' : 'text-foreground', children: item.content })] }, i));
|
|
102
|
+
}) }));
|
|
103
|
+
}
|
|
104
|
+
function QuestionBody({ vm }) {
|
|
105
|
+
if (vm.questions.length === 0)
|
|
106
|
+
return null;
|
|
107
|
+
return (_jsx("div", { className: "space-y-2", children: vm.questions.map((q, i) => (_jsxs("div", { className: "space-y-1", children: [_jsx("p", { className: "text-foreground text-xs font-medium", children: q.question }), q.options.length > 0 && (_jsx("ul", { className: "text-muted-foreground list-disc space-y-0.5 pl-4 text-xs", children: q.options.map((o, oi) => (_jsx("li", { children: o.label }, oi))) }))] }, i))) }));
|
|
108
|
+
}
|
|
109
|
+
function GenericBody({ vm }) {
|
|
110
|
+
return (_jsxs("div", { className: "space-y-2", children: [vm.inputPretty && _jsx("pre", { className: cn(PRE, 'text-muted-foreground max-h-48'), children: vm.inputPretty }), vm.outputPretty && _jsx(OutputBlock, { text: vm.outputPretty })] }));
|
|
111
|
+
}
|
|
112
|
+
/** The expanded body, one branch per kind: a new kind fails typecheck here. */
|
|
113
|
+
function ToolBody({ vm }) {
|
|
114
|
+
switch (vm.kind) {
|
|
115
|
+
case 'web-search':
|
|
116
|
+
return _jsx(WebSearchBody, { vm: vm });
|
|
117
|
+
case 'shell':
|
|
118
|
+
return _jsx(ShellBody, { vm: vm });
|
|
119
|
+
case 'file-read':
|
|
120
|
+
case 'file-write':
|
|
121
|
+
return _jsx(FilePreviewBody, { path: vm.path, preview: vm.preview });
|
|
122
|
+
case 'file-edit':
|
|
123
|
+
return _jsx(FileEditBody, { vm: vm });
|
|
124
|
+
case 'search':
|
|
125
|
+
return _jsx(SearchBody, { vm: vm });
|
|
126
|
+
case 'task':
|
|
127
|
+
return _jsx(TaskBody, { vm: vm });
|
|
128
|
+
case 'todo':
|
|
129
|
+
return _jsx(TodoBody, { vm: vm });
|
|
130
|
+
case 'question':
|
|
131
|
+
return _jsx(QuestionBody, { vm: vm });
|
|
132
|
+
case 'generic':
|
|
133
|
+
return _jsx(GenericBody, { vm: vm });
|
|
134
|
+
default: {
|
|
135
|
+
const exhaustive = vm;
|
|
136
|
+
return exhaustive;
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
export function ToolCall({ tool }) {
|
|
141
|
+
const Glyph = CATEGORY_ICON[toolInfo(tool.name).category] ?? WrenchIcon;
|
|
142
|
+
const t = useUiStrings().chat;
|
|
143
|
+
const vm = toolViewModel(tool);
|
|
144
|
+
const raw = summaryFor(vm, t);
|
|
145
|
+
// A title that already is the summary (a shell call titled by its command) prints once.
|
|
146
|
+
const summary = raw.trim() === tool.title.trim() ? '' : raw;
|
|
147
|
+
const isError = tool.status === 'error';
|
|
148
|
+
const hasDetail = vm.kind !== 'generic' || !!vm.inputPretty || !!vm.outputPretty || !!summary;
|
|
149
|
+
return (_jsxs(Collapsible, { "data-slot": "tool-call", "data-tool-status": tool.status, className: cn('rounded-md border', isError ? 'border-destructive/30 bg-destructive/5' : 'border-border bg-card'), children: [_jsxs(CollapsibleTrigger, { disabled: !hasDetail, className: "group flex w-full items-center gap-2 px-2.5 py-2 text-left disabled:cursor-default", children: [_jsx(Glyph, { className: cn('size-3.5 shrink-0', isError ? 'text-destructive' : 'text-muted-foreground') }), _jsx("span", { className: "text-foreground min-w-0 truncate text-xs font-medium", children: tool.title }), summary && _jsx("span", { className: "text-muted-foreground min-w-0 flex-1 truncate font-mono text-xs", children: summary }), _jsxs("span", { className: "ml-auto flex shrink-0 items-center gap-1.5", children: [_jsx(StatusGlyph, { status: tool.status }), hasDetail && (_jsx(CaretRightIcon, { className: "text-muted-foreground size-3.5 transition-transform group-data-[state=open]:rotate-90 motion-reduce:transition-none" }))] })] }), hasDetail && (_jsx(CollapsibleContent, { children: _jsx("div", { className: "border-border border-t px-2.5 py-2", children: _jsx(ToolBody, { vm: vm }) }) }))] }));
|
|
150
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { ClassifiedPart } from '@kortix/sdk';
|
|
2
|
+
/** Keep user text plain; render every other part with the transcript renderers. */
|
|
3
|
+
export declare function userMessageParts(parts: readonly ClassifiedPart[]): {
|
|
4
|
+
text: string;
|
|
5
|
+
parts: (import("@kortix/sdk").ClassifiedReasoningPart | import("@kortix/sdk").ClassifiedToolPart | import("@kortix/sdk").ClassifiedFilePart | import("@kortix/sdk").ClassifiedSubtaskPart | import("@kortix/sdk").ClassifiedPatchPart | import("@kortix/sdk").ClassifiedSnapshotPart | import("@kortix/sdk").ClassifiedAgentPart | import("@kortix/sdk").ClassifiedRetryPart | import("@kortix/sdk").ClassifiedCompactionPart | import("@kortix/sdk").ClassifiedStepPart | import("@kortix/sdk").ClassifiedUnknownPart)[];
|
|
6
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/** Keep user text plain; render every other part with the transcript renderers. */
|
|
2
|
+
export function userMessageParts(parts) {
|
|
3
|
+
return {
|
|
4
|
+
text: parts
|
|
5
|
+
.filter((part) => part.kind === 'text')
|
|
6
|
+
.map((part) => part.text)
|
|
7
|
+
.join('\n')
|
|
8
|
+
.trim(),
|
|
9
|
+
parts: parts.filter((part) => part.kind !== 'text'),
|
|
10
|
+
};
|
|
11
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import * as AccordionPrimitive from '@radix-ui/react-accordion';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
declare function Accordion({ ...props }: React.ComponentProps<typeof AccordionPrimitive.Root>): React.JSX.Element;
|
|
4
|
+
declare function AccordionItem({ className, ...props }: React.ComponentProps<typeof AccordionPrimitive.Item>): React.JSX.Element;
|
|
5
|
+
declare function AccordionTrigger({ className, children, ...props }: React.ComponentProps<typeof AccordionPrimitive.Trigger>): React.JSX.Element;
|
|
6
|
+
declare function AccordionContent({ className, children, ...props }: React.ComponentProps<typeof AccordionPrimitive.Content>): React.JSX.Element;
|
|
7
|
+
export { Accordion, AccordionContent, AccordionItem, AccordionTrigger };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { CaretDownIcon as ChevronDownIcon } from '@phosphor-icons/react';
|
|
4
|
+
import * as AccordionPrimitive from '@radix-ui/react-accordion';
|
|
5
|
+
import { cn } from '../../lib/utils.js';
|
|
6
|
+
function Accordion({ ...props }) {
|
|
7
|
+
return _jsx(AccordionPrimitive.Root, { "data-slot": "accordion", ...props });
|
|
8
|
+
}
|
|
9
|
+
function AccordionItem({ className, ...props }) {
|
|
10
|
+
return (_jsx(AccordionPrimitive.Item, { "data-slot": "accordion-item", className: cn('border-b last:border-b-0', className), ...props }));
|
|
11
|
+
}
|
|
12
|
+
function AccordionTrigger({ className, children, ...props }) {
|
|
13
|
+
return (_jsx(AccordionPrimitive.Header, { className: "flex", children: _jsxs(AccordionPrimitive.Trigger, { "data-slot": "accordion-trigger", className: cn('focus-visible:border-ring focus-visible:ring-ring/50 flex flex-1 cursor-pointer items-start justify-between gap-4 rounded-2xl py-4 text-left text-sm font-medium transition-colors outline-none hover:underline focus-visible:ring-[3px] disabled:pointer-events-none disabled:opacity-50 [&[data-state=open]>svg]:rotate-180', className), ...props, children: [children, _jsx(ChevronDownIcon, { className: "text-muted-foreground pointer-events-none size-4 shrink-0 translate-y-0.5 transition-transform duration-200" })] }) }));
|
|
14
|
+
}
|
|
15
|
+
function AccordionContent({ className, children, ...props }) {
|
|
16
|
+
return (_jsx(AccordionPrimitive.Content, { "data-slot": "accordion-content", className: "data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down overflow-hidden text-sm", ...props, children: _jsx("div", { className: cn('pt-0 pb-4', className), children: children }) }));
|
|
17
|
+
}
|
|
18
|
+
export { Accordion, AccordionContent, AccordionItem, AccordionTrigger };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import * as AlertDialogPrimitive from '@radix-ui/react-alert-dialog';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import { ButtonProps } from './button.js';
|
|
4
|
+
declare function AlertDialog({ children, open, defaultOpen, onOpenChange, ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Root>): React.JSX.Element;
|
|
5
|
+
declare function AlertDialogTrigger({ ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Trigger>): React.JSX.Element;
|
|
6
|
+
declare function AlertDialogPortal({ ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Portal>): React.JSX.Element;
|
|
7
|
+
declare function AlertDialogOverlay({ className, style, ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Overlay>): React.JSX.Element;
|
|
8
|
+
declare function AlertDialogContent({ className, style, overlayClassName, ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Content> & {
|
|
9
|
+
overlayClassName?: string;
|
|
10
|
+
}): React.JSX.Element;
|
|
11
|
+
declare function AlertDialogHeader({ className, ...props }: React.ComponentProps<'div'>): React.JSX.Element;
|
|
12
|
+
declare function AlertDialogFooter({ className, ...props }: React.ComponentProps<'div'>): React.JSX.Element;
|
|
13
|
+
declare function AlertDialogTitle({ className, ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Title>): React.JSX.Element;
|
|
14
|
+
declare function AlertDialogDescription({ className, ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Description>): React.JSX.Element;
|
|
15
|
+
declare function AlertDialogAction({ className, ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Action> & {
|
|
16
|
+
variant?: ButtonProps['variant'];
|
|
17
|
+
}): React.JSX.Element;
|
|
18
|
+
declare function AlertDialogCancel({ className, ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Cancel>): React.JSX.Element;
|
|
19
|
+
export { AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, };
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import * as AlertDialogPrimitive from '@radix-ui/react-alert-dialog';
|
|
4
|
+
import { buttonVariants } from './button.js';
|
|
5
|
+
import { cn } from '../../lib/utils.js';
|
|
6
|
+
import { DialogDepthProvider, dialogContentZ, dialogOverlayZ, useDialogDepth, useDialogRootLayer, } from '../../lib/z-stack.js';
|
|
7
|
+
// Depth follows the runtime layer stack, so an alert stacks above whatever is
|
|
8
|
+
// open even when it is rendered as a sibling. Still prefer rendering an alert
|
|
9
|
+
// that confirms for a dialog INSIDE that dialog's React tree: React events from
|
|
10
|
+
// the alert then bubble through the dialog, so the dialog's own outside-click
|
|
11
|
+
// and focus handlers never see the alert as "outside".
|
|
12
|
+
function AlertDialog({ children, open, defaultOpen, onOpenChange, ...props }) {
|
|
13
|
+
const layer = useDialogRootLayer({ open, defaultOpen, onOpenChange });
|
|
14
|
+
return (_jsx(DialogDepthProvider, { depth: layer.depth, children: _jsx(AlertDialogPrimitive.Root, { "data-slot": "alert-dialog", ...props, open: layer.open, onOpenChange: layer.onOpenChange, children: children }) }));
|
|
15
|
+
}
|
|
16
|
+
function AlertDialogTrigger({ ...props }) {
|
|
17
|
+
return _jsx(AlertDialogPrimitive.Trigger, { "data-slot": "alert-dialog-trigger", ...props });
|
|
18
|
+
}
|
|
19
|
+
function AlertDialogPortal({ ...props }) {
|
|
20
|
+
return _jsx(AlertDialogPrimitive.Portal, { "data-slot": "alert-dialog-portal", ...props });
|
|
21
|
+
}
|
|
22
|
+
function AlertDialogOverlay({ className, style, ...props }) {
|
|
23
|
+
const depth = useDialogDepth();
|
|
24
|
+
return (_jsx(AlertDialogPrimitive.Overlay, { "data-slot": "alert-dialog-overlay", className: cn('data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 bg-black/65 backdrop-blur-xs', className), style: { zIndex: dialogOverlayZ(depth), ...style }, ...props }));
|
|
25
|
+
}
|
|
26
|
+
function AlertDialogContent({ className, style, overlayClassName, ...props }) {
|
|
27
|
+
const depth = useDialogDepth();
|
|
28
|
+
return (_jsxs(AlertDialogPortal, { children: [_jsx(AlertDialogOverlay, { className: overlayClassName }), _jsx(AlertDialogPrimitive.Content, { "data-slot": "alert-dialog-content", className: cn('bg-sidebar border-muted/60 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 space-y-5 rounded-xl border p-5 shadow-lg duration-200 sm:max-w-md', className), style: { zIndex: dialogContentZ(depth), ...style }, ...props })] }));
|
|
29
|
+
}
|
|
30
|
+
function AlertDialogHeader({ className, ...props }) {
|
|
31
|
+
return (_jsx("div", { "data-slot": "alert-dialog-header", className: cn('flex flex-col gap-2 text-center sm:text-left', className), ...props }));
|
|
32
|
+
}
|
|
33
|
+
function AlertDialogFooter({ className, ...props }) {
|
|
34
|
+
return (_jsx("div", { "data-slot": "alert-dialog-footer", className: cn('flex flex-col-reverse gap-2 sm:flex-row sm:justify-end', className), ...props }));
|
|
35
|
+
}
|
|
36
|
+
function AlertDialogTitle({ className, ...props }) {
|
|
37
|
+
return (_jsx(AlertDialogPrimitive.Title, { "data-slot": "alert-dialog-title", className: cn('text-lg font-medium', className), ...props }));
|
|
38
|
+
}
|
|
39
|
+
function AlertDialogDescription({ className, ...props }) {
|
|
40
|
+
return (_jsx(AlertDialogPrimitive.Description, { "data-slot": "alert-dialog-description", className: cn('text-muted-foreground text-[0.9rem] leading-snug', className), ...props }));
|
|
41
|
+
}
|
|
42
|
+
function AlertDialogAction({ className, ...props }) {
|
|
43
|
+
return (_jsx(AlertDialogPrimitive.Action, { className: cn(buttonVariants({ size: 'sm', variant: props.variant }), className), ...props }));
|
|
44
|
+
}
|
|
45
|
+
function AlertDialogCancel({ className, ...props }) {
|
|
46
|
+
return (_jsx(AlertDialogPrimitive.Cancel, { className: cn(buttonVariants({ variant: 'outline-ghost', size: 'sm' }), className), ...props }));
|
|
47
|
+
}
|
|
48
|
+
export { AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { type VariantProps } from 'class-variance-authority';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
declare const alertVariants: (props?: ({
|
|
4
|
+
variant?: "default" | "destructive" | "success" | "warning" | null | undefined;
|
|
5
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
6
|
+
/** Replaces the variant's glyph. Only for a state the glyph cannot say (a spinner while loading). */
|
|
7
|
+
declare function AlertMedia({ className, ...props }: React.ComponentProps<'div'>): React.JSX.Element;
|
|
8
|
+
declare function AlertContent({ className, ...props }: React.ComponentProps<'div'>): React.JSX.Element;
|
|
9
|
+
declare function AlertTitle({ className, ...props }: React.ComponentProps<'span'>): React.JSX.Element;
|
|
10
|
+
declare function AlertDescription({ className, ...props }: React.ComponentProps<'div'>): React.JSX.Element;
|
|
11
|
+
declare function AlertActions({ className, ...props }: React.ComponentProps<'div'>): React.JSX.Element;
|
|
12
|
+
declare function Alert({ className, variant, children, ...props }: React.ComponentProps<'div'> & VariantProps<typeof alertVariants>): React.JSX.Element;
|
|
13
|
+
export { Alert, AlertActions, AlertContent, AlertDescription, AlertMedia, AlertTitle };
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { CheckCircleIcon, InfoIcon, WarningCircleIcon, WarningIcon } from '@phosphor-icons/react';
|
|
3
|
+
import { cva } from 'class-variance-authority';
|
|
4
|
+
import * as React from 'react';
|
|
5
|
+
import { cn } from '../../lib/utils.js';
|
|
6
|
+
// The genui Callout, exactly (features/genui/components/inline.tsx, Paper Callout 14): the tone is the
|
|
7
|
+
// /15 fill and the solid 16px glyph; title and body stay ink. Tone type on a tone fill read ~2:1
|
|
8
|
+
// (Marko, 2026-09-03), so text never takes the hue.
|
|
9
|
+
const alertVariants = cva('flex w-full gap-2.5 rounded-lg px-3.5 py-2.5', {
|
|
10
|
+
variants: {
|
|
11
|
+
variant: {
|
|
12
|
+
default: 'bg-kortix-blue/15',
|
|
13
|
+
success: 'bg-kortix-green/15',
|
|
14
|
+
warning: 'bg-kortix-orange/15',
|
|
15
|
+
destructive: 'bg-kortix-red/15',
|
|
16
|
+
},
|
|
17
|
+
},
|
|
18
|
+
defaultVariants: {
|
|
19
|
+
variant: 'default',
|
|
20
|
+
},
|
|
21
|
+
});
|
|
22
|
+
const ALERT_GLYPH = {
|
|
23
|
+
default: { icon: InfoIcon, className: 'text-kortix-blue' },
|
|
24
|
+
success: { icon: CheckCircleIcon, className: 'text-kortix-green' },
|
|
25
|
+
warning: { icon: WarningIcon, className: 'text-kortix-orange' },
|
|
26
|
+
destructive: { icon: WarningCircleIcon, className: 'text-kortix-red' },
|
|
27
|
+
};
|
|
28
|
+
/** Replaces the variant's glyph. Only for a state the glyph cannot say (a spinner while loading). */
|
|
29
|
+
function AlertMedia({ className, ...props }) {
|
|
30
|
+
return (_jsx("div", { "data-slot": "alert-media", className: cn(
|
|
31
|
+
// mt-0.5 centers a 16px glyph on the first 20px line, of the title or of the body.
|
|
32
|
+
'mt-0.5 flex shrink-0 self-start [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0', className), ...props }));
|
|
33
|
+
}
|
|
34
|
+
function AlertContent({ className, ...props }) {
|
|
35
|
+
return (_jsx("div", { "data-slot": "alert-content", className: cn('flex min-w-0 flex-1 flex-col text-sm', className), ...props }));
|
|
36
|
+
}
|
|
37
|
+
function AlertTitle({ className, ...props }) {
|
|
38
|
+
return (_jsx("span", { "data-slot": "alert-title", className: cn('text-foreground font-[550]', className), ...props }));
|
|
39
|
+
}
|
|
40
|
+
function AlertDescription({ className, ...props }) {
|
|
41
|
+
return (_jsx("div", { "data-slot": "item-description", className: cn('text-foreground text-pretty', '[&>a:hover]:text-primary [&>a]:underline [&>a]:underline-offset-4', className), ...props }));
|
|
42
|
+
}
|
|
43
|
+
function AlertActions({ className, ...props }) {
|
|
44
|
+
return (_jsx("div", { "data-slot": "alert-actions", className: cn('flex shrink-0 items-center gap-2 self-center', className), ...props }));
|
|
45
|
+
}
|
|
46
|
+
function partitionAlertChildren(children) {
|
|
47
|
+
const mediaChildren = [];
|
|
48
|
+
const contentChildren = [];
|
|
49
|
+
const actionChildren = [];
|
|
50
|
+
React.Children.forEach(children, (child) => {
|
|
51
|
+
if (React.isValidElement(child) && child.type === AlertMedia)
|
|
52
|
+
mediaChildren.push(child);
|
|
53
|
+
else if (React.isValidElement(child) && child.type === AlertActions)
|
|
54
|
+
actionChildren.push(child);
|
|
55
|
+
else if (child != null)
|
|
56
|
+
contentChildren.push(child);
|
|
57
|
+
});
|
|
58
|
+
const hasContentWrapper = contentChildren.some((child) => React.isValidElement(child) && child.type === AlertContent);
|
|
59
|
+
return { mediaChildren, contentChildren, actionChildren, hasContentWrapper };
|
|
60
|
+
}
|
|
61
|
+
function Alert({ className, variant, children, ...props }) {
|
|
62
|
+
const { mediaChildren, contentChildren, actionChildren, hasContentWrapper } = partitionAlertChildren(children);
|
|
63
|
+
const glyph = ALERT_GLYPH[variant ?? 'default'];
|
|
64
|
+
return (_jsxs("div", { role: "alert", "data-slot": "alert", className: cn(alertVariants({ variant }), className), ...props, children: [mediaChildren.length > 0 ? (mediaChildren) : (_jsx(glyph.icon, { "data-slot": "alert-glyph", className: cn('mt-0.5 size-4 shrink-0', glyph.className), weight: "fill", "aria-hidden": true })), contentChildren.length > 0 &&
|
|
65
|
+
(hasContentWrapper ? contentChildren : _jsx(AlertContent, { children: contentChildren })), actionChildren] }));
|
|
66
|
+
}
|
|
67
|
+
export { Alert, AlertActions, AlertContent, AlertDescription, AlertMedia, AlertTitle };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Avatar as AvatarPrimitive } from 'radix-ui';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
declare function Avatar({ className, size, ...props }: React.ComponentProps<typeof AvatarPrimitive.Root> & {
|
|
4
|
+
size?: 'default' | 'sm' | 'lg';
|
|
5
|
+
}): React.JSX.Element;
|
|
6
|
+
declare function AvatarImage({ className, ...props }: React.ComponentProps<typeof AvatarPrimitive.Image>): React.JSX.Element;
|
|
7
|
+
declare function AvatarFallback({ className, ...props }: React.ComponentProps<typeof AvatarPrimitive.Fallback>): React.JSX.Element;
|
|
8
|
+
declare function AvatarBadge({ className, ...props }: React.ComponentProps<'span'>): React.JSX.Element;
|
|
9
|
+
declare function AvatarGroup({ className, ...props }: React.ComponentProps<'div'>): React.JSX.Element;
|
|
10
|
+
declare function AvatarGroupCount({ className, ...props }: React.ComponentProps<'div'>): React.JSX.Element;
|
|
11
|
+
export { Avatar, AvatarBadge, AvatarFallback, AvatarGroup, AvatarGroupCount, AvatarImage };
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import { Avatar as AvatarPrimitive } from 'radix-ui';
|
|
4
|
+
import { cn } from '../../lib/utils.js';
|
|
5
|
+
function Avatar({ className, size = 'default', ...props }) {
|
|
6
|
+
return (_jsx(AvatarPrimitive.Root, { "data-slot": "avatar", "data-size": size, className: cn('group/avatar relative flex size-8 shrink-0 overflow-hidden rounded-sm select-none data-[size=lg]:size-10 data-[size=sm]:size-6', className), ...props }));
|
|
7
|
+
}
|
|
8
|
+
function AvatarImage({ className, ...props }) {
|
|
9
|
+
return (_jsx(AvatarPrimitive.Image, { "data-slot": "avatar-image", className: cn('aspect-square size-full', className), ...props }));
|
|
10
|
+
}
|
|
11
|
+
function AvatarFallback({ className, ...props }) {
|
|
12
|
+
return (_jsx(AvatarPrimitive.Fallback, { "data-slot": "avatar-fallback", className: cn('bg-muted text-muted-foreground flex size-full items-center justify-center rounded-sm text-sm group-data-[size=sm]/avatar:text-xs', className), ...props }));
|
|
13
|
+
}
|
|
14
|
+
function AvatarBadge({ className, ...props }) {
|
|
15
|
+
return (_jsx("span", { "data-slot": "avatar-badge", className: cn('bg-primary text-primary-foreground ring-background absolute right-0 bottom-0 z-10 inline-flex items-center justify-center rounded-full ring-2 select-none', 'group-data-[size=sm]/avatar:size-2 group-data-[size=sm]/avatar:[&>svg]:hidden', 'group-data-[size=default]/avatar:size-2.5 group-data-[size=default]/avatar:[&>svg]:size-2', 'group-data-[size=lg]/avatar:size-3 group-data-[size=lg]/avatar:[&>svg]:size-2', className), ...props }));
|
|
16
|
+
}
|
|
17
|
+
function AvatarGroup({ className, ...props }) {
|
|
18
|
+
return (_jsx("div", { "data-slot": "avatar-group", className: cn('group/avatar-group *:data-[slot=avatar]:ring-background flex -space-x-2 *:data-[slot=avatar]:ring-2', className), ...props }));
|
|
19
|
+
}
|
|
20
|
+
function AvatarGroupCount({ className, ...props }) {
|
|
21
|
+
return (_jsx("div", { "data-slot": "avatar-group-count", className: cn('bg-muted text-muted-foreground ring-background relative flex size-8 shrink-0 items-center justify-center rounded-sm text-sm font-medium ring-2 group-has-data-[size=lg]/avatar-group:size-10 group-has-data-[size=sm]/avatar-group:size-6 [&>svg]:size-4 group-has-data-[size=lg]/avatar-group:[&>svg]:size-5 group-has-data-[size=sm]/avatar-group:[&>svg]:size-3', className), ...props }));
|
|
22
|
+
}
|
|
23
|
+
export { Avatar, AvatarBadge, AvatarFallback, AvatarGroup, AvatarGroupCount, AvatarImage };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The top-left way out of a full-screen surface (settings, account hub, /new):
|
|
3
|
+
* a rounded-full ghost pill with a chevron and a label; it fills with
|
|
4
|
+
* `bg-secondary` on hover. Below `sm` it is the chevron
|
|
5
|
+
* alone in a round 28px button; the label stays as its accessible name.
|
|
6
|
+
*
|
|
7
|
+
* Use on `<Button variant="ghost" size="xs" className={backPillClass()}>`
|
|
8
|
+
* with `<BackPillBody label=… />` as its content (or inside its `asChild` link).
|
|
9
|
+
*/
|
|
10
|
+
export declare function backPillClass(className?: string): string;
|
|
11
|
+
export declare function BackPillBody({ label }: {
|
|
12
|
+
label: string;
|
|
13
|
+
}): import("react").JSX.Element;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { CaretLeftIcon } from '@phosphor-icons/react';
|
|
3
|
+
import { cn } from '../../lib/utils.js';
|
|
4
|
+
/**
|
|
5
|
+
* The top-left way out of a full-screen surface (settings, account hub, /new):
|
|
6
|
+
* a rounded-full ghost pill with a chevron and a label; it fills with
|
|
7
|
+
* `bg-secondary` on hover. Below `sm` it is the chevron
|
|
8
|
+
* alone in a round 28px button; the label stays as its accessible name.
|
|
9
|
+
*
|
|
10
|
+
* Use on `<Button variant="ghost" size="xs" className={backPillClass()}>`
|
|
11
|
+
* with `<BackPillBody label=… />` as its content (or inside its `asChild` link).
|
|
12
|
+
*/
|
|
13
|
+
export function backPillClass(className) {
|
|
14
|
+
return cn('hover:bg-secondary shrink-0 gap-1 rounded-full has-[>svg]:pr-3 has-[>svg]:pl-2', 'max-sm:size-7 max-sm:justify-center max-sm:has-[>svg]:px-0', className);
|
|
15
|
+
}
|
|
16
|
+
export function BackPillBody({ label }) {
|
|
17
|
+
return (_jsxs(_Fragment, { children: [_jsx(CaretLeftIcon, { "aria-hidden": true, className: "size-3.5 shrink-0" }), _jsx("span", { className: "max-sm:sr-only", children: label })] }));
|
|
18
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { type VariantProps } from 'class-variance-authority';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
declare const badgeVariants: (props?: ({
|
|
4
|
+
variant?: "default" | "destructive" | "outline" | "secondary" | "accent" | "muted" | "transparent" | "success" | "info" | "warning" | "solid" | "badgeSuccess" | "update" | "kortix" | "new" | "beta" | "highlight" | null | undefined;
|
|
5
|
+
size?: "default" | "xs" | "sm" | "tabular" | null | undefined;
|
|
6
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
7
|
+
declare function Badge({ className, variant, size, asChild, ...props }: React.ComponentProps<'span'> & VariantProps<typeof badgeVariants> & {
|
|
8
|
+
asChild?: boolean;
|
|
9
|
+
}): React.JSX.Element;
|
|
10
|
+
export { Badge, badgeVariants };
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { Slot } from '@radix-ui/react-slot';
|
|
3
|
+
import { cva } from 'class-variance-authority';
|
|
4
|
+
import { cn } from '../../lib/utils.js';
|
|
5
|
+
const badgeVariants = cva('inline-flex shrink-0 items-center justify-center gap-1 whitespace-nowrap rounded-[5px] px-1.5 py-[0.1rem] font-mono text-[0.8rem] font-medium tracking-tight [overflow-wrap:anywhere] has-[>svg]:gap-0.5 has-[>[data-slot=status-dot]]:gap-1 [&>svg]:block [&>svg]:!size-[0.75em] [&>svg]:shrink-0 [&>svg]:pointer-events-none [&>[data-slot=status-dot]]:shrink-0 [&>[data-slot=status-dot]]:!size-[0.45em] uppercase', {
|
|
6
|
+
variants: {
|
|
7
|
+
variant: {
|
|
8
|
+
solid: 'bg-foreground/15 text-foreground ring-1 ring-inset ring-foreground/15',
|
|
9
|
+
default: 'bg-foreground/10 text-foreground ring-1 ring-inset ring-foreground/10',
|
|
10
|
+
secondary: 'bg-secondary/80 text-secondary-foreground ring-1 ring-inset ring-border/60 normal-case',
|
|
11
|
+
accent: 'bg-foreground/5 text-foreground ring-1 ring-inset ring-foreground/5',
|
|
12
|
+
destructive: 'bg-destructive/10 text-destructive ring-1 ring-inset ring-destructive/10',
|
|
13
|
+
success: 'bg-kortix-green/15 text-foreground ring-1 ring-inset ring-kortix-green/15 [&>svg]:text-kortix-green',
|
|
14
|
+
badgeSuccess: 'bg-kortix-green/15 text-foreground ring-1 ring-inset ring-kortix-green/15 [&>svg]:text-kortix-green',
|
|
15
|
+
update: 'bg-kortix-orange/15 text-foreground ring-1 ring-inset ring-kortix-orange/15 [&>svg]:text-kortix-orange',
|
|
16
|
+
kortix: 'bg-foreground/10 text-foreground ring-1 ring-inset ring-foreground/10',
|
|
17
|
+
warning: 'bg-kortix-orange/15 text-foreground ring-1 ring-inset ring-kortix-orange/15 [&>svg]:text-kortix-orange',
|
|
18
|
+
outline: 'bg-transparent text-foreground ring-1 ring-inset ring-border normal-case',
|
|
19
|
+
new: 'bg-primary/10 text-primary ring-1 ring-inset ring-primary/10',
|
|
20
|
+
beta: 'bg-primary/10 text-primary ring-1 ring-inset ring-primary/10',
|
|
21
|
+
highlight: 'bg-primary/10 text-primary ring-1 ring-inset ring-primary/10',
|
|
22
|
+
info: 'bg-kortix-blue/15 text-foreground ring-1 ring-inset ring-kortix-blue/15 normal-case [&>svg]:text-kortix-blue',
|
|
23
|
+
muted: 'bg-muted/50 text-muted-foreground ring-1 ring-inset ring-muted/50 normal-case',
|
|
24
|
+
transparent: 'bg-transparent text-foreground ring-0 normal-case',
|
|
25
|
+
},
|
|
26
|
+
size: {
|
|
27
|
+
default: 'px-1.5',
|
|
28
|
+
sm: '',
|
|
29
|
+
xs: '',
|
|
30
|
+
tabular: 'min-w-5 gap-0 px-1 tabular-nums tracking-normal',
|
|
31
|
+
},
|
|
32
|
+
},
|
|
33
|
+
defaultVariants: {
|
|
34
|
+
variant: 'default',
|
|
35
|
+
size: 'xs',
|
|
36
|
+
},
|
|
37
|
+
});
|
|
38
|
+
function Badge({ className, variant = 'solid', size, asChild = false, ...props }) {
|
|
39
|
+
const Comp = asChild ? Slot : 'span';
|
|
40
|
+
return (_jsx(Comp, { "data-slot": "badge", className: cn(badgeVariants({ variant, size }), className), ...props }));
|
|
41
|
+
}
|
|
42
|
+
export { Badge, badgeVariants };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
declare function Breadcrumb({ ...props }: React.ComponentProps<'nav'>): React.JSX.Element;
|
|
3
|
+
declare function BreadcrumbList({ className, ...props }: React.ComponentProps<'ol'>): React.JSX.Element;
|
|
4
|
+
declare function BreadcrumbItem({ className, ...props }: React.ComponentProps<'li'>): React.JSX.Element;
|
|
5
|
+
declare function BreadcrumbLink({ asChild, className, ...props }: React.ComponentProps<'a'> & {
|
|
6
|
+
asChild?: boolean;
|
|
7
|
+
}): React.JSX.Element;
|
|
8
|
+
declare function BreadcrumbPage({ className, ...props }: React.ComponentProps<'span'>): React.JSX.Element;
|
|
9
|
+
declare function BreadcrumbSeparator({ children, className, ...props }: React.ComponentProps<'li'>): React.JSX.Element;
|
|
10
|
+
declare function BreadcrumbEllipsis({ className, ...props }: React.ComponentProps<'span'>): React.JSX.Element;
|
|
11
|
+
export { Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, };
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { DotsThreeIcon as MoreHorizontal } from '@phosphor-icons/react';
|
|
3
|
+
import { Slot } from '@radix-ui/react-slot';
|
|
4
|
+
import { cn } from '../../lib/utils.js';
|
|
5
|
+
import { LineVerticalIcon as HiOutlineSlash } from '@phosphor-icons/react';
|
|
6
|
+
function Breadcrumb({ ...props }) {
|
|
7
|
+
return _jsx("nav", { "aria-label": "breadcrumb", "data-slot": "breadcrumb", ...props });
|
|
8
|
+
}
|
|
9
|
+
function BreadcrumbList({ className, ...props }) {
|
|
10
|
+
return (_jsx("ol", { "data-slot": "breadcrumb-list", className: cn('text-muted-foreground flex flex-wrap items-center gap-1.5 text-sm wrap-break-word sm:gap-2.5', className), ...props }));
|
|
11
|
+
}
|
|
12
|
+
function BreadcrumbItem({ className, ...props }) {
|
|
13
|
+
return (_jsx("li", { "data-slot": "breadcrumb-item", className: cn('inline-flex items-center gap-1.5', className), ...props }));
|
|
14
|
+
}
|
|
15
|
+
function BreadcrumbLink({ asChild, className, ...props }) {
|
|
16
|
+
const Comp = asChild ? Slot : 'a';
|
|
17
|
+
return (_jsx(Comp, { "data-slot": "breadcrumb-link", className: cn('hover:text-foreground cursor-pointer transition-colors', className), ...props }));
|
|
18
|
+
}
|
|
19
|
+
function BreadcrumbPage({ className, ...props }) {
|
|
20
|
+
return (_jsx("span", { "data-slot": "breadcrumb-page", role: "link", "aria-disabled": "true", "aria-current": "page", className: cn('text-foreground font-normal', className), ...props }));
|
|
21
|
+
}
|
|
22
|
+
function BreadcrumbSeparator({ children, className, ...props }) {
|
|
23
|
+
return (_jsx("li", { "data-slot": "breadcrumb-separator", role: "presentation", "aria-hidden": "true", className: cn('[&>svg]:size-3.5', className), ...props, children: children ?? _jsx(HiOutlineSlash, {}) }));
|
|
24
|
+
}
|
|
25
|
+
function BreadcrumbEllipsis({ className, ...props }) {
|
|
26
|
+
return (_jsxs("span", { "data-slot": "breadcrumb-ellipsis", role: "presentation", "aria-hidden": "true", className: cn('flex size-9 items-center justify-center', className), ...props, children: [_jsx(MoreHorizontal, { className: "size-4" }), _jsx("span", { className: "sr-only", children: "More" })] }));
|
|
27
|
+
}
|
|
28
|
+
export { Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, };
|