@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,75 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ChainOfThought — a vertical list of steps, each opening independently.
|
|
3
|
+
*
|
|
4
|
+
* Adapted from prompt-kit (https://prompt-kit.com/c/chain-of-thought.json),
|
|
5
|
+
* then reduced to the two parts that are actually used: the list and the step.
|
|
6
|
+
* Upstream's `ChainOfThoughtItem`, `ChainOfThoughtTrigger` and
|
|
7
|
+
* `ChainOfThoughtContent` are gone — nothing imported them, and
|
|
8
|
+
* `ChainOfThoughtContent` carried a SECOND rail implementation that contradicted
|
|
9
|
+
* the one below.
|
|
10
|
+
*/
|
|
11
|
+
import * as React from 'react';
|
|
12
|
+
import { Disclosure } from './disclosure.js';
|
|
13
|
+
export type ChainOfThoughtStepProps = React.ComponentProps<typeof Disclosure>;
|
|
14
|
+
/**
|
|
15
|
+
* One step. It owns no spacing — the list does.
|
|
16
|
+
*
|
|
17
|
+
* A step used to carry `pb-3` (and `pb-2` when last), which made the gap a
|
|
18
|
+
* property of the ROW rather than of the list. Two costs, both visible: the
|
|
19
|
+
* final step left trailing padding that no following gap balanced, so a chain
|
|
20
|
+
* sitting between two paragraphs was 12px from the one above and 20px from the
|
|
21
|
+
* one below; and a chain of exactly one step — a single tool call — was a row
|
|
22
|
+
* with 8px hanging off the bottom for no reason at all. `space-y` on the list
|
|
23
|
+
* puts the gap BETWEEN rows, which is where a gap belongs: even everywhere,
|
|
24
|
+
* absent at both ends.
|
|
25
|
+
*
|
|
26
|
+
* The rail draws only while the step is OPEN.
|
|
27
|
+
*
|
|
28
|
+
* It used to connect every step to the next, running the whole height of the
|
|
29
|
+
* chain — a spine down a list of independent rows. That is not what the line
|
|
30
|
+
* means. The line means "this content belongs to the row above it", which is
|
|
31
|
+
* only true when there IS content, i.e. when the step is open. Drawn always, it
|
|
32
|
+
* asserts a sequence the rows do not have, and it turns a quiet list into a
|
|
33
|
+
* diagram.
|
|
34
|
+
*
|
|
35
|
+
* "Open" has to be asked TWO ways, because a step's content is not always
|
|
36
|
+
* behind the step's own disclosure. A thought, a group and a file-chip row all
|
|
37
|
+
* bind to this `Disclosure`, so `data-state` on the step answers for them. A
|
|
38
|
+
* plain tool row does not: `ToolPartRenderer` brings its own nested
|
|
39
|
+
* `Disclosure`, so expanding a `bash` row leaves the step reading `closed` and
|
|
40
|
+
* the first rule silently never fires — which is exactly how a expanded command
|
|
41
|
+
* ended up as the one row in the chain with no rail beside it. The `has-`
|
|
42
|
+
* clause asks the descendants instead: if anything inside this step is open,
|
|
43
|
+
* there is content, and content is what the line is for.
|
|
44
|
+
*
|
|
45
|
+
* Positioning: the rail is absolute so `bottom-0` stretches it to whatever the
|
|
46
|
+
* step currently is — a search card, a command block, a paragraph of reasoning.
|
|
47
|
+
* A fixed-height spacer cannot know how tall its sibling is, which is how the
|
|
48
|
+
* old version visibly broke the moment a step expanded. `left-2` puts the
|
|
49
|
+
* hairline on the 8px centre of the 16px leading icon, the column every step's
|
|
50
|
+
* icon occupies; `top-[1.6rem]` clears that icon so the rail reads as hanging
|
|
51
|
+
* from it rather than striking through it.
|
|
52
|
+
*
|
|
53
|
+
* A row that leads with no icon — the bare single-step burst — still draws it.
|
|
54
|
+
* The rail's job is to tie content to the row above it, and that is true whether
|
|
55
|
+
* or not the row happens to show a glyph. What such a row must NOT do is let its
|
|
56
|
+
* content start at the margin: the hairline then lands 8px INSIDE the content
|
|
57
|
+
* and strikes through the left edge of the file chip. The indent is what gives
|
|
58
|
+
* the rail its lane, so bare rows keep it (`pl-7` / `--tool-indent`) even though
|
|
59
|
+
* they drop the icon that indent was originally measured from.
|
|
60
|
+
*/
|
|
61
|
+
export declare function ChainOfThoughtStep({ children, className, ...props }: ChainOfThoughtStepProps): React.JSX.Element;
|
|
62
|
+
export type ChainOfThoughtProps = {
|
|
63
|
+
children: React.ReactNode;
|
|
64
|
+
className?: string;
|
|
65
|
+
};
|
|
66
|
+
/**
|
|
67
|
+
* The list. One `space-y` and nothing else.
|
|
68
|
+
*
|
|
69
|
+
* This used to `React.cloneElement` every child to inject `isLast`, which the
|
|
70
|
+
* step needed to decide its own padding and whether to draw a rail. Both
|
|
71
|
+
* questions are gone — spacing lives here, and the rail follows open state — so
|
|
72
|
+
* the clone went with them. A `map` + `cloneElement` on every render, for a list
|
|
73
|
+
* that re-renders on every SSE frame, bought nothing.
|
|
74
|
+
*/
|
|
75
|
+
export declare function ChainOfThought({ children, className }: ChainOfThoughtProps): React.JSX.Element;
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { Disclosure } from './disclosure.js';
|
|
4
|
+
import { cn } from '../../lib/utils.js';
|
|
5
|
+
/**
|
|
6
|
+
* One step. It owns no spacing — the list does.
|
|
7
|
+
*
|
|
8
|
+
* A step used to carry `pb-3` (and `pb-2` when last), which made the gap a
|
|
9
|
+
* property of the ROW rather than of the list. Two costs, both visible: the
|
|
10
|
+
* final step left trailing padding that no following gap balanced, so a chain
|
|
11
|
+
* sitting between two paragraphs was 12px from the one above and 20px from the
|
|
12
|
+
* one below; and a chain of exactly one step — a single tool call — was a row
|
|
13
|
+
* with 8px hanging off the bottom for no reason at all. `space-y` on the list
|
|
14
|
+
* puts the gap BETWEEN rows, which is where a gap belongs: even everywhere,
|
|
15
|
+
* absent at both ends.
|
|
16
|
+
*
|
|
17
|
+
* The rail draws only while the step is OPEN.
|
|
18
|
+
*
|
|
19
|
+
* It used to connect every step to the next, running the whole height of the
|
|
20
|
+
* chain — a spine down a list of independent rows. That is not what the line
|
|
21
|
+
* means. The line means "this content belongs to the row above it", which is
|
|
22
|
+
* only true when there IS content, i.e. when the step is open. Drawn always, it
|
|
23
|
+
* asserts a sequence the rows do not have, and it turns a quiet list into a
|
|
24
|
+
* diagram.
|
|
25
|
+
*
|
|
26
|
+
* "Open" has to be asked TWO ways, because a step's content is not always
|
|
27
|
+
* behind the step's own disclosure. A thought, a group and a file-chip row all
|
|
28
|
+
* bind to this `Disclosure`, so `data-state` on the step answers for them. A
|
|
29
|
+
* plain tool row does not: `ToolPartRenderer` brings its own nested
|
|
30
|
+
* `Disclosure`, so expanding a `bash` row leaves the step reading `closed` and
|
|
31
|
+
* the first rule silently never fires — which is exactly how a expanded command
|
|
32
|
+
* ended up as the one row in the chain with no rail beside it. The `has-`
|
|
33
|
+
* clause asks the descendants instead: if anything inside this step is open,
|
|
34
|
+
* there is content, and content is what the line is for.
|
|
35
|
+
*
|
|
36
|
+
* Positioning: the rail is absolute so `bottom-0` stretches it to whatever the
|
|
37
|
+
* step currently is — a search card, a command block, a paragraph of reasoning.
|
|
38
|
+
* A fixed-height spacer cannot know how tall its sibling is, which is how the
|
|
39
|
+
* old version visibly broke the moment a step expanded. `left-2` puts the
|
|
40
|
+
* hairline on the 8px centre of the 16px leading icon, the column every step's
|
|
41
|
+
* icon occupies; `top-[1.6rem]` clears that icon so the rail reads as hanging
|
|
42
|
+
* from it rather than striking through it.
|
|
43
|
+
*
|
|
44
|
+
* A row that leads with no icon — the bare single-step burst — still draws it.
|
|
45
|
+
* The rail's job is to tie content to the row above it, and that is true whether
|
|
46
|
+
* or not the row happens to show a glyph. What such a row must NOT do is let its
|
|
47
|
+
* content start at the margin: the hairline then lands 8px INSIDE the content
|
|
48
|
+
* and strikes through the left edge of the file chip. The indent is what gives
|
|
49
|
+
* the rail its lane, so bare rows keep it (`pl-7` / `--tool-indent`) even though
|
|
50
|
+
* they drop the icon that indent was originally measured from.
|
|
51
|
+
*/
|
|
52
|
+
export function ChainOfThoughtStep({ children, className, ...props }) {
|
|
53
|
+
return (_jsxs(Disclosure, { className: cn('group/step relative', className), ...props, children: [_jsx("div", { "aria-hidden": true, className: cn('bg-muted-foreground/15 absolute top-[1.6rem] bottom-0 left-2 w-[1px]', 'hidden group-data-[state=open]/step:block', 'group-has-[[data-state=open]]/step:block') }), children] }));
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* The list. One `space-y` and nothing else.
|
|
57
|
+
*
|
|
58
|
+
* This used to `React.cloneElement` every child to inject `isLast`, which the
|
|
59
|
+
* step needed to decide its own padding and whether to draw a rail. Both
|
|
60
|
+
* questions are gone — spacing lives here, and the rail follows open state — so
|
|
61
|
+
* the clone went with them. A `map` + `cloneElement` on every render, for a list
|
|
62
|
+
* that re-renders on every SSE frame, bought nothing.
|
|
63
|
+
*/
|
|
64
|
+
export function ChainOfThought({ children, className }) {
|
|
65
|
+
return _jsx("div", { className: cn('space-y-3', className), children: children });
|
|
66
|
+
}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import * as RechartsPrimitive from 'recharts';
|
|
3
|
+
declare const THEMES: {
|
|
4
|
+
readonly light: "";
|
|
5
|
+
readonly dark: ".dark";
|
|
6
|
+
};
|
|
7
|
+
export type ChartConfig = {
|
|
8
|
+
[k in string]: {
|
|
9
|
+
label?: React.ReactNode;
|
|
10
|
+
icon?: React.ComponentType;
|
|
11
|
+
} & ({
|
|
12
|
+
color?: string;
|
|
13
|
+
theme?: never;
|
|
14
|
+
} | {
|
|
15
|
+
color?: never;
|
|
16
|
+
theme: Record<keyof typeof THEMES, string>;
|
|
17
|
+
});
|
|
18
|
+
};
|
|
19
|
+
declare function ChartContainer({ id, className, children, config, ...props }: React.ComponentProps<'div'> & {
|
|
20
|
+
config: ChartConfig;
|
|
21
|
+
children: React.ComponentProps<typeof RechartsPrimitive.ResponsiveContainer>['children'];
|
|
22
|
+
}): React.JSX.Element;
|
|
23
|
+
declare const ChartStyle: ({ id, config }: {
|
|
24
|
+
id: string;
|
|
25
|
+
config: ChartConfig;
|
|
26
|
+
}) => React.JSX.Element | null;
|
|
27
|
+
declare const ChartTooltip: typeof RechartsPrimitive.Tooltip;
|
|
28
|
+
interface ChartTooltipContentProps extends React.ComponentProps<'div'> {
|
|
29
|
+
active?: boolean;
|
|
30
|
+
payload?: Array<{
|
|
31
|
+
name?: string;
|
|
32
|
+
value?: number | string;
|
|
33
|
+
payload?: Record<string, unknown>;
|
|
34
|
+
color?: string;
|
|
35
|
+
dataKey?: string | number;
|
|
36
|
+
fill?: string;
|
|
37
|
+
type?: string;
|
|
38
|
+
}>;
|
|
39
|
+
label?: string;
|
|
40
|
+
labelFormatter?: (value: unknown, payload: unknown[]) => React.ReactNode;
|
|
41
|
+
labelClassName?: string;
|
|
42
|
+
formatter?: (value: unknown, name: string, item: unknown, index: number, payload: unknown) => React.ReactNode;
|
|
43
|
+
color?: string;
|
|
44
|
+
hideLabel?: boolean;
|
|
45
|
+
hideIndicator?: boolean;
|
|
46
|
+
indicator?: 'line' | 'dot' | 'dashed';
|
|
47
|
+
nameKey?: string;
|
|
48
|
+
labelKey?: string;
|
|
49
|
+
}
|
|
50
|
+
declare function ChartTooltipContent({ active, payload, className, indicator, hideLabel, hideIndicator, label, labelFormatter, labelClassName, formatter, color, nameKey, labelKey, }: ChartTooltipContentProps): React.JSX.Element | null;
|
|
51
|
+
declare const ChartLegend: React.MemoExoticComponent<(outsideProps: RechartsPrimitive.LegendProps) => React.ReactPortal | null>;
|
|
52
|
+
interface ChartLegendContentProps extends React.ComponentProps<'div'> {
|
|
53
|
+
payload?: Array<{
|
|
54
|
+
value?: string;
|
|
55
|
+
type?: string;
|
|
56
|
+
id?: string;
|
|
57
|
+
color?: string;
|
|
58
|
+
dataKey?: string | number;
|
|
59
|
+
}>;
|
|
60
|
+
verticalAlign?: 'top' | 'bottom';
|
|
61
|
+
hideIcon?: boolean;
|
|
62
|
+
nameKey?: string;
|
|
63
|
+
}
|
|
64
|
+
declare function ChartLegendContent({ className, hideIcon, payload, verticalAlign, nameKey, }: ChartLegendContentProps): React.JSX.Element | null;
|
|
65
|
+
export { ChartContainer, ChartLegend, ChartLegendContent, ChartStyle, ChartTooltip, ChartTooltipContent, };
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
import * as RechartsPrimitive from 'recharts';
|
|
5
|
+
import { cn } from '../../lib/utils.js';
|
|
6
|
+
// Format: { THEME_NAME: CSS_SELECTOR }
|
|
7
|
+
const THEMES = { light: '', dark: '.dark' };
|
|
8
|
+
const ChartContext = React.createContext(null);
|
|
9
|
+
function useChart() {
|
|
10
|
+
const context = React.useContext(ChartContext);
|
|
11
|
+
if (!context) {
|
|
12
|
+
throw new Error('useChart must be used within a <ChartContainer />');
|
|
13
|
+
}
|
|
14
|
+
return context;
|
|
15
|
+
}
|
|
16
|
+
function ChartContainer({ id, className, children, config, ...props }) {
|
|
17
|
+
const uniqueId = React.useId();
|
|
18
|
+
const chartId = `chart-${id || uniqueId.replace(/:/g, '')}`;
|
|
19
|
+
const contextValue = React.useMemo(() => ({ config }), [config]);
|
|
20
|
+
return (_jsx(ChartContext.Provider, { value: contextValue, children: _jsxs("div", { "data-slot": "chart", "data-chart": chartId, className: cn("[&_.recharts-cartesian-axis-tick_text]:fill-muted-foreground [&_.recharts-cartesian-grid_line[stroke='#ccc']]:stroke-border/50 [&_.recharts-curve.recharts-tooltip-cursor]:stroke-border [&_.recharts-polar-grid_[stroke='#ccc']]:stroke-border [&_.recharts-radial-bar-background-sector]:fill-muted [&_.recharts-rectangle.recharts-tooltip-cursor]:fill-muted [&_.recharts-reference-line_[stroke='#ccc']]:stroke-border flex aspect-video justify-center text-xs [&_.recharts-dot[stroke='#fff']]:stroke-transparent [&_.recharts-layer]:outline-hidden [&_.recharts-sector]:outline-hidden [&_.recharts-sector[stroke='#fff']]:stroke-transparent [&_.recharts-surface]:outline-hidden", className), ...props, children: [_jsx(ChartStyle, { id: chartId, config: config }), _jsx(RechartsPrimitive.ResponsiveContainer, { children: children })] }) }));
|
|
21
|
+
}
|
|
22
|
+
const ChartStyle = ({ id, config }) => {
|
|
23
|
+
const colorConfig = Object.entries(config).filter(([, config]) => config.theme || config.color);
|
|
24
|
+
if (!colorConfig.length) {
|
|
25
|
+
return null;
|
|
26
|
+
}
|
|
27
|
+
return (_jsx("style", { dangerouslySetInnerHTML: {
|
|
28
|
+
__html: Object.entries(THEMES)
|
|
29
|
+
.map(([theme, prefix]) => `
|
|
30
|
+
${prefix} [data-chart=${id}] {
|
|
31
|
+
${colorConfig
|
|
32
|
+
.map(([key, itemConfig]) => {
|
|
33
|
+
const color = itemConfig.theme?.[theme] || itemConfig.color;
|
|
34
|
+
return color ? ` --color-${key}: ${color};` : null;
|
|
35
|
+
})
|
|
36
|
+
.join('\n')}
|
|
37
|
+
}
|
|
38
|
+
`)
|
|
39
|
+
.join('\n'),
|
|
40
|
+
} }));
|
|
41
|
+
};
|
|
42
|
+
const ChartTooltip = RechartsPrimitive.Tooltip;
|
|
43
|
+
function ChartTooltipContent({ active, payload, className, indicator = 'dot', hideLabel = false, hideIndicator = false, label, labelFormatter, labelClassName, formatter, color, nameKey, labelKey, }) {
|
|
44
|
+
const { config } = useChart();
|
|
45
|
+
if (!active || !payload?.length) {
|
|
46
|
+
return null;
|
|
47
|
+
}
|
|
48
|
+
const tooltipLabel = (() => {
|
|
49
|
+
if (hideLabel || !payload?.length) {
|
|
50
|
+
return null;
|
|
51
|
+
}
|
|
52
|
+
const [item] = payload;
|
|
53
|
+
const key = `${labelKey || item?.dataKey || item?.name || 'value'}`;
|
|
54
|
+
const itemConfig = getPayloadConfigFromPayload(config, item, key);
|
|
55
|
+
const value = !labelKey && typeof label === 'string'
|
|
56
|
+
? config[label]?.label || label
|
|
57
|
+
: itemConfig?.label;
|
|
58
|
+
if (labelFormatter) {
|
|
59
|
+
return (_jsx("div", { className: cn('font-medium', labelClassName), children: labelFormatter(value, payload) }));
|
|
60
|
+
}
|
|
61
|
+
if (!value) {
|
|
62
|
+
return null;
|
|
63
|
+
}
|
|
64
|
+
return _jsx("div", { className: cn('font-medium', labelClassName), children: value });
|
|
65
|
+
})();
|
|
66
|
+
const nestLabel = payload.length === 1 && indicator !== 'dot';
|
|
67
|
+
const visibleItems = payload.filter((item) => item.type !== 'none');
|
|
68
|
+
return (_jsxs("div", { className: cn('border-border/50 bg-background grid min-w-[8rem] items-start gap-1.5 rounded-lg border px-2.5 py-1.5 text-xs shadow-xl', className), children: [!nestLabel ? tooltipLabel : null, _jsx("div", { className: "grid gap-1.5", children: visibleItems.map((item, index) => {
|
|
69
|
+
const key = `${nameKey || item.name || item.dataKey || 'value'}`;
|
|
70
|
+
const itemConfig = getPayloadConfigFromPayload(config, item, key);
|
|
71
|
+
const itemPayload = item.payload;
|
|
72
|
+
const indicatorColor = color || itemPayload?.fill || item.color;
|
|
73
|
+
return (_jsx("div", { className: cn('[&>svg]:text-muted-foreground flex w-full flex-wrap items-stretch gap-2 [&>svg]:h-2.5 [&>svg]:w-2.5', indicator === 'dot' && 'items-center'), children: formatter && item?.value !== undefined && item.name ? (formatter(item.value, item.name, item, index, item.payload)) : (_jsxs(_Fragment, { children: [itemConfig?.icon ? (_jsx(itemConfig.icon, {})) : (!hideIndicator && (_jsx("div", { className: cn('shrink-0 rounded-[2px]', {
|
|
74
|
+
'h-2.5 w-2.5': indicator === 'dot',
|
|
75
|
+
'w-1': indicator === 'line',
|
|
76
|
+
'w-0 border-[1.5px] border-dashed bg-transparent': indicator === 'dashed',
|
|
77
|
+
'my-0.5': nestLabel && indicator === 'dashed',
|
|
78
|
+
}), style: {
|
|
79
|
+
backgroundColor: indicator !== 'dashed' ? indicatorColor : undefined,
|
|
80
|
+
borderColor: indicator === 'dashed' ? indicatorColor : undefined,
|
|
81
|
+
} }))), _jsxs("div", { className: cn('flex flex-1 justify-between leading-none', nestLabel ? 'items-end' : 'items-center'), children: [_jsxs("div", { className: "grid gap-1.5", children: [nestLabel ? tooltipLabel : null, _jsx("span", { className: "text-muted-foreground", children: itemConfig?.label || item.name })] }), item.value !== undefined && (_jsx("span", { className: "text-foreground font-mono font-medium tabular-nums", children: typeof item.value === 'number' ? item.value.toLocaleString() : item.value }))] })] })) }, String(item.dataKey ?? item.name ?? 'value')));
|
|
82
|
+
}) })] }));
|
|
83
|
+
}
|
|
84
|
+
const ChartLegend = RechartsPrimitive.Legend;
|
|
85
|
+
function ChartLegendContent({ className, hideIcon = false, payload, verticalAlign = 'bottom', nameKey, }) {
|
|
86
|
+
const { config } = useChart();
|
|
87
|
+
if (!payload?.length) {
|
|
88
|
+
return null;
|
|
89
|
+
}
|
|
90
|
+
const visibleItems = payload.filter((item) => item.type !== 'none');
|
|
91
|
+
return (_jsx("div", { className: cn('flex items-center justify-center gap-4', verticalAlign === 'top' ? 'pb-3' : 'pt-3', className), children: visibleItems.map((item) => {
|
|
92
|
+
const key = `${nameKey || item.dataKey || 'value'}`;
|
|
93
|
+
const itemConfig = getPayloadConfigFromPayload(config, item, key);
|
|
94
|
+
return (_jsxs("div", { className: cn('[&>svg]:text-muted-foreground flex items-center gap-1.5 [&>svg]:h-3 [&>svg]:w-3'), children: [itemConfig?.icon && !hideIcon ? (_jsx(itemConfig.icon, {})) : (_jsx("div", { className: "h-2 w-2 shrink-0 rounded-[2px]", style: {
|
|
95
|
+
backgroundColor: item.color,
|
|
96
|
+
} })), itemConfig?.label] }, item.value));
|
|
97
|
+
}) }));
|
|
98
|
+
}
|
|
99
|
+
// Helper to extract item config from a payload.
|
|
100
|
+
function getPayloadConfigFromPayload(config, payload, key) {
|
|
101
|
+
if (typeof payload !== 'object' || payload === null) {
|
|
102
|
+
return undefined;
|
|
103
|
+
}
|
|
104
|
+
const payloadPayload = 'payload' in payload && typeof payload.payload === 'object' && payload.payload !== null
|
|
105
|
+
? payload.payload
|
|
106
|
+
: undefined;
|
|
107
|
+
let configLabelKey = key;
|
|
108
|
+
if (key in payload && typeof payload[key] === 'string') {
|
|
109
|
+
configLabelKey = payload[key];
|
|
110
|
+
}
|
|
111
|
+
else if (payloadPayload &&
|
|
112
|
+
key in payloadPayload &&
|
|
113
|
+
typeof payloadPayload[key] === 'string') {
|
|
114
|
+
configLabelKey = payloadPayload[key];
|
|
115
|
+
}
|
|
116
|
+
return configLabelKey in config ? config[configLabelKey] : config[key];
|
|
117
|
+
}
|
|
118
|
+
export { ChartContainer, ChartLegend, ChartLegendContent, ChartStyle, ChartTooltip, ChartTooltipContent, };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
type CheckboxGroupProps = Omit<React.ComponentProps<'div'>, 'defaultValue' | 'onChange'> & {
|
|
3
|
+
value?: string[];
|
|
4
|
+
defaultValue?: string[];
|
|
5
|
+
onValueChange?: (value: string[]) => void;
|
|
6
|
+
disabled?: boolean;
|
|
7
|
+
name?: string;
|
|
8
|
+
};
|
|
9
|
+
declare function CheckboxGroup({ className, value, defaultValue, onValueChange, disabled, name, ...props }: CheckboxGroupProps): React.JSX.Element;
|
|
10
|
+
type CheckboxGroupItemProps = {
|
|
11
|
+
value: string;
|
|
12
|
+
label: React.ReactNode;
|
|
13
|
+
disabled?: boolean;
|
|
14
|
+
id?: string;
|
|
15
|
+
className?: string;
|
|
16
|
+
};
|
|
17
|
+
declare function CheckboxGroupItem({ value: itemValue, label, disabled: itemDisabled, id, className, }: CheckboxGroupItemProps): React.JSX.Element;
|
|
18
|
+
export { CheckboxGroup, CheckboxGroupItem };
|
|
19
|
+
export type { CheckboxGroupItemProps, CheckboxGroupProps };
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
import { Checkbox } from './checkbox.js';
|
|
5
|
+
import { cn } from '../../lib/utils.js';
|
|
6
|
+
const CheckboxGroupContext = React.createContext(null);
|
|
7
|
+
function useCheckboxGroupContext() {
|
|
8
|
+
const ctx = React.useContext(CheckboxGroupContext);
|
|
9
|
+
if (!ctx) {
|
|
10
|
+
throw new Error('CheckboxGroupItem must be used within CheckboxGroup');
|
|
11
|
+
}
|
|
12
|
+
return ctx;
|
|
13
|
+
}
|
|
14
|
+
function CheckboxGroup({ className, value, defaultValue, onValueChange, disabled, name, ...props }) {
|
|
15
|
+
const [internalValue, setInternalValue] = React.useState(defaultValue ?? []);
|
|
16
|
+
const isControlled = value !== undefined;
|
|
17
|
+
const selected = React.useMemo(() => new Set(isControlled ? value : internalValue), [isControlled, value, internalValue]);
|
|
18
|
+
const toggle = React.useCallback((itemValue, checked) => {
|
|
19
|
+
const current = isControlled ? value : internalValue;
|
|
20
|
+
const next = checked
|
|
21
|
+
? current.includes(itemValue)
|
|
22
|
+
? current
|
|
23
|
+
: [...current, itemValue]
|
|
24
|
+
: current.filter((entry) => entry !== itemValue);
|
|
25
|
+
if (!isControlled) {
|
|
26
|
+
setInternalValue(next);
|
|
27
|
+
}
|
|
28
|
+
onValueChange?.(next);
|
|
29
|
+
}, [isControlled, value, internalValue, onValueChange]);
|
|
30
|
+
const contextValue = React.useMemo(() => ({ value: selected, toggle, disabled, name }), [selected, toggle, disabled, name]);
|
|
31
|
+
return (_jsx(CheckboxGroupContext.Provider, { value: contextValue, children: _jsx("div", { "data-slot": "checkbox-group", role: "group", className: cn('grid gap-1', className), ...props }) }));
|
|
32
|
+
}
|
|
33
|
+
function CheckboxGroupItem({ value: itemValue, label, disabled: itemDisabled, id, className, }) {
|
|
34
|
+
const { value, toggle, disabled: groupDisabled, name } = useCheckboxGroupContext();
|
|
35
|
+
const generatedId = React.useId();
|
|
36
|
+
const itemId = id ?? generatedId;
|
|
37
|
+
const checked = value.has(itemValue);
|
|
38
|
+
const disabled = groupDisabled || itemDisabled;
|
|
39
|
+
return (_jsx(Checkbox, { id: itemId, name: name, label: label, checked: checked, disabled: disabled, onCheckedChange: (next) => toggle(itemValue, next === true), className: className }));
|
|
40
|
+
}
|
|
41
|
+
export { CheckboxGroup, CheckboxGroupItem };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import * as CheckboxPrimitive from '@radix-ui/react-checkbox';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
type CheckboxVariant = 'blue' | 'black';
|
|
4
|
+
type CheckboxProps = React.ComponentProps<typeof CheckboxPrimitive.Root> & {
|
|
5
|
+
label?: React.ReactNode;
|
|
6
|
+
/** Fill of the checked box. `black` is the foreground ink, so it inverts in dark mode. */
|
|
7
|
+
variant?: CheckboxVariant;
|
|
8
|
+
};
|
|
9
|
+
declare function Checkbox({ className, label, id, variant, ...props }: CheckboxProps): React.JSX.Element;
|
|
10
|
+
declare namespace Checkbox {
|
|
11
|
+
var displayName: string | undefined;
|
|
12
|
+
}
|
|
13
|
+
export { Checkbox };
|
|
14
|
+
export type { CheckboxProps, CheckboxVariant };
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import * as CheckboxPrimitive from '@radix-ui/react-checkbox';
|
|
4
|
+
import * as React from 'react';
|
|
5
|
+
import { cn } from '../../lib/utils.js';
|
|
6
|
+
// One size everywhere: an 18px box, 6px corners, a round-capped check.
|
|
7
|
+
const checkboxControlClassName = cn('peer flex size-[18px] shrink-0 items-center justify-center rounded-sm border-[1.5px] border-muted-foreground/60 bg-transparent text-background', 'transition-[border-color,background-color]', 'outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background', 'disabled:cursor-default disabled:opacity-50', // cursor-default: disabled keeps the default cursor (AGENTS.md → States)
|
|
8
|
+
'aria-invalid:border-destructive');
|
|
9
|
+
const checkboxVariantClassName = {
|
|
10
|
+
blue: 'data-[state=checked]:border-kortix-blue data-[state=checked]:bg-kortix-blue data-[state=indeterminate]:border-kortix-blue data-[state=indeterminate]:bg-kortix-blue',
|
|
11
|
+
black: 'data-[state=checked]:border-foreground data-[state=checked]:bg-foreground data-[state=indeterminate]:border-foreground data-[state=indeterminate]:bg-foreground',
|
|
12
|
+
};
|
|
13
|
+
function CheckMark({ indeterminate }) {
|
|
14
|
+
return (_jsx("svg", { viewBox: "0 0 16 16", fill: "none", "aria-hidden": true, className: "size-3", children: _jsx("path", { d: indeterminate ? 'M4 8h8' : 'M3.5 8.5l3 3 6-7', stroke: "currentColor", strokeWidth: 2.25, strokeLinecap: "round", strokeLinejoin: "round" }) }));
|
|
15
|
+
}
|
|
16
|
+
function Checkbox({ className, label, id, variant = 'blue', ...props }) {
|
|
17
|
+
const generatedId = React.useId();
|
|
18
|
+
const itemId = id ?? generatedId;
|
|
19
|
+
const control = (_jsx(CheckboxPrimitive.Root, { "data-slot": "checkbox", "data-variant": variant, id: itemId, className: cn(checkboxControlClassName, checkboxVariantClassName[variant], !label && className), ...props, children: _jsx(CheckboxPrimitive.Indicator, { "data-slot": "checkbox-indicator", className: "flex items-center justify-center", children: _jsx(CheckMark, { indeterminate: props.checked === 'indeterminate' }) }) }));
|
|
20
|
+
if (!label) {
|
|
21
|
+
return control;
|
|
22
|
+
}
|
|
23
|
+
return (_jsxs("label", { htmlFor: itemId, className: cn('flex w-full cursor-pointer items-center gap-3 rounded-md px-3 py-1.5 transition-colors', 'hover:bg-foreground/3', 'has-data-[state=checked]:bg-foreground/6 has-data-[state=checked]:hover:bg-foreground/6', 'has-focus-visible:ring-ring has-focus-visible:ring-offset-background has-focus-visible:ring-2 has-focus-visible:ring-offset-2', props.disabled && 'cursor-default opacity-50', // cursor-default: disabled keeps the default cursor (AGENTS.md → States)
|
|
24
|
+
className), children: [control, _jsx("span", { className: cn('text-sm transition-[color,font-weight]', 'text-muted-foreground', 'peer-data-[state=checked]:text-foreground peer-data-[state=checked]:font-medium', props.disabled && 'text-muted-foreground'), children: label })] }));
|
|
25
|
+
}
|
|
26
|
+
Checkbox.displayName = CheckboxPrimitive.Root.displayName;
|
|
27
|
+
export { Checkbox };
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import * as CollapsiblePrimitive from '@radix-ui/react-collapsible';
|
|
2
|
+
declare function Collapsible({ ...props }: React.ComponentProps<typeof CollapsiblePrimitive.Root>): import("react").JSX.Element;
|
|
3
|
+
declare function CollapsibleTrigger({ className, ...props }: React.ComponentProps<typeof CollapsiblePrimitive.CollapsibleTrigger>): import("react").JSX.Element;
|
|
4
|
+
declare function CollapsibleContent({ className, ...props }: React.ComponentProps<typeof CollapsiblePrimitive.CollapsibleContent>): import("react").JSX.Element;
|
|
5
|
+
export { Collapsible, CollapsibleContent, CollapsibleTrigger };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import { cn } from '../../lib/utils.js';
|
|
4
|
+
import * as CollapsiblePrimitive from '@radix-ui/react-collapsible';
|
|
5
|
+
function Collapsible({ ...props }) {
|
|
6
|
+
return _jsx(CollapsiblePrimitive.Root, { "data-slot": "collapsible", ...props });
|
|
7
|
+
}
|
|
8
|
+
function CollapsibleTrigger({ className, ...props }) {
|
|
9
|
+
return (_jsx(CollapsiblePrimitive.CollapsibleTrigger, { "data-slot": "collapsible-trigger", className: cn('cursor-pointer', className), ...props }));
|
|
10
|
+
}
|
|
11
|
+
function CollapsibleContent({ className, ...props }) {
|
|
12
|
+
return (_jsx(CollapsiblePrimitive.CollapsibleContent, { "data-slot": "collapsible-content", className: cn('data-[state=open]:animate-collapsible-down data-[state=closed]:animate-collapsible-up overflow-hidden', className), ...props }));
|
|
13
|
+
}
|
|
14
|
+
export { Collapsible, CollapsibleContent, CollapsibleTrigger };
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { Command as CommandPrimitive } from 'cmdk';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import { Dialog } from './dialog.js';
|
|
4
|
+
/**
|
|
5
|
+
* `data-nav` records which input moved the highlight last: `pointer` or
|
|
6
|
+
* `keyboard`. `CommandItem` reads it to pick ONE highlight source.
|
|
7
|
+
*
|
|
8
|
+
* cmdk 0.2.1 selects a row on every `pointermove` through its store, so
|
|
9
|
+
* `data-selected` moves only after React re-renders the whole list. In the ⌘K
|
|
10
|
+
* palette that re-render trails the cursor: the row you left stays lit until
|
|
11
|
+
* it lands, which reads as a hover transition. In pointer mode the row paints
|
|
12
|
+
* from CSS `:hover` alone — the same instant highlight the sidebar session
|
|
13
|
+
* rows use. Keyboard mode keeps `data-selected`, because arrow keys have no
|
|
14
|
+
* `:hover` to follow.
|
|
15
|
+
*
|
|
16
|
+
* Written straight to the DOM node, not React state: a state update here would
|
|
17
|
+
* re-render the list on every pointer move, which is the lag this removes.
|
|
18
|
+
* cmdk calls a caller's `onKeyDown` before its own handler and spreads
|
|
19
|
+
* `onPointerMove` onto the root, so both reach the same element.
|
|
20
|
+
*/
|
|
21
|
+
declare function Command({ className, onKeyDown, onPointerMove, ...props }: React.ComponentProps<typeof CommandPrimitive>): React.JSX.Element;
|
|
22
|
+
declare function CommandDialog({ title, description, children, className, showCloseButton, ...props }: React.ComponentProps<typeof Dialog> & {
|
|
23
|
+
title?: string;
|
|
24
|
+
description?: string;
|
|
25
|
+
className?: string;
|
|
26
|
+
showCloseButton?: boolean;
|
|
27
|
+
}): React.JSX.Element;
|
|
28
|
+
declare function CommandInput({ className, compact, leftElement, rightElement, ...props }: React.ComponentProps<typeof CommandPrimitive.Input> & {
|
|
29
|
+
compact?: boolean;
|
|
30
|
+
/** Sits before the text field: a search glyph, or a sub-page's back chip. */
|
|
31
|
+
leftElement?: React.ReactNode;
|
|
32
|
+
rightElement?: React.ReactNode;
|
|
33
|
+
}): React.JSX.Element;
|
|
34
|
+
declare function CommandList({ className, ...props }: React.ComponentProps<typeof CommandPrimitive.List>): React.JSX.Element;
|
|
35
|
+
declare function CommandEmpty({ ...props }: React.ComponentProps<typeof CommandPrimitive.Empty>): React.JSX.Element;
|
|
36
|
+
declare function CommandGroup({ className, ...props }: React.ComponentProps<typeof CommandPrimitive.Group>): React.JSX.Element;
|
|
37
|
+
declare function CommandSeparator({ className, ...props }: React.ComponentProps<typeof CommandPrimitive.Separator>): React.JSX.Element;
|
|
38
|
+
declare function CommandItem({ className, ...props }: React.ComponentProps<typeof CommandPrimitive.Item>): React.JSX.Element;
|
|
39
|
+
declare function CommandShortcut({ className, ...props }: React.ComponentProps<'span'>): React.JSX.Element;
|
|
40
|
+
declare function CommandFooter({ className, children, ...props }: React.ComponentProps<'div'>): React.JSX.Element;
|
|
41
|
+
declare function CommandPopover({ open, onOpenChange, children, modal, }: {
|
|
42
|
+
open: boolean;
|
|
43
|
+
onOpenChange: (open: boolean) => void;
|
|
44
|
+
children: React.ReactNode;
|
|
45
|
+
modal?: boolean;
|
|
46
|
+
}): React.JSX.Element;
|
|
47
|
+
declare const CommandPopoverTrigger: React.ForwardRefExoticComponent<Omit<Omit<Omit<import("@radix-ui/react-popover").PopoverTriggerProps & React.RefAttributes<HTMLButtonElement>, "size"> & import("./trigger-variants.js").TriggerVariantProps, "ref">, "asChild"> & React.RefAttributes<HTMLButtonElement>>;
|
|
48
|
+
declare function CommandPopoverContent({ children, side, align, sideOffset, className, shouldFilter, defaultValue, }: {
|
|
49
|
+
children: React.ReactNode;
|
|
50
|
+
side?: 'top' | 'bottom' | 'left' | 'right';
|
|
51
|
+
align?: 'start' | 'center' | 'end';
|
|
52
|
+
sideOffset?: number;
|
|
53
|
+
className?: string;
|
|
54
|
+
shouldFilter?: boolean;
|
|
55
|
+
/** The item value highlighted when the list opens (cmdk `defaultValue`). */
|
|
56
|
+
defaultValue?: string;
|
|
57
|
+
}): React.JSX.Element;
|
|
58
|
+
export { Command, CommandDialog, CommandEmpty, CommandFooter, CommandGroup, CommandInput, CommandItem, CommandList, CommandPopover, CommandPopoverContent, CommandPopoverTrigger, CommandSeparator, CommandShortcut, };
|