@marismoon/ui 0.0.0-stage → 0.1.0-next.1
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/LICENSE +21 -0
- package/README.md +26 -2
- package/THIRD_PARTY_NOTICES.md +50 -0
- package/dist/components/icons/app-icon.d.ts +14 -0
- package/dist/components/icons/app-icon.js +30 -0
- package/dist/components/icons/icon-placeholder.d.ts +134 -0
- package/dist/components/icons/icon-placeholder.js +240 -0
- package/dist/components/icons/icon-variants.d.ts +2 -0
- package/dist/components/icons/icon-variants.js +68 -0
- package/dist/components/icons/index.d.ts +117 -0
- package/dist/components/icons/index.js +118 -0
- package/dist/components/icons/solar/add-circle-linear.d.ts +2 -0
- package/dist/components/icons/solar/add-circle-linear.js +27 -0
- package/dist/components/icons/solar/add-folder-linear.d.ts +2 -0
- package/dist/components/icons/solar/add-folder-linear.js +21 -0
- package/dist/components/icons/solar/alt-arrow-down-linear.d.ts +2 -0
- package/dist/components/icons/solar/alt-arrow-down-linear.js +22 -0
- package/dist/components/icons/solar/alt-arrow-left-linear.d.ts +2 -0
- package/dist/components/icons/solar/alt-arrow-left-linear.js +22 -0
- package/dist/components/icons/solar/alt-arrow-right-linear.d.ts +2 -0
- package/dist/components/icons/solar/alt-arrow-right-linear.js +22 -0
- package/dist/components/icons/solar/alt-arrow-up-linear.d.ts +2 -0
- package/dist/components/icons/solar/alt-arrow-up-linear.js +22 -0
- package/dist/components/icons/solar/archive-linear.d.ts +2 -0
- package/dist/components/icons/solar/archive-linear.js +25 -0
- package/dist/components/icons/solar/arrow-down-linear.d.ts +2 -0
- package/dist/components/icons/solar/arrow-down-linear.js +22 -0
- package/dist/components/icons/solar/arrow-left-linear.d.ts +2 -0
- package/dist/components/icons/solar/arrow-left-linear.js +22 -0
- package/dist/components/icons/solar/arrow-right-linear.d.ts +2 -0
- package/dist/components/icons/solar/arrow-right-linear.js +22 -0
- package/dist/components/icons/solar/arrow-right-up-linear.d.ts +2 -0
- package/dist/components/icons/solar/arrow-right-up-linear.js +22 -0
- package/dist/components/icons/solar/arrow-up-linear.d.ts +2 -0
- package/dist/components/icons/solar/arrow-up-linear.js +22 -0
- package/dist/components/icons/solar/bell-bold.d.ts +2 -0
- package/dist/components/icons/solar/bell-bold.js +20 -0
- package/dist/components/icons/solar/bell-linear.d.ts +2 -0
- package/dist/components/icons/solar/bell-linear.js +23 -0
- package/dist/components/icons/solar/bill-list-bold.d.ts +2 -0
- package/dist/components/icons/solar/bill-list-bold.js +19 -0
- package/dist/components/icons/solar/bill-list-linear.d.ts +2 -0
- package/dist/components/icons/solar/bill-list-linear.js +23 -0
- package/dist/components/icons/solar/bluetooth-linear.d.ts +2 -0
- package/dist/components/icons/solar/bluetooth-linear.js +26 -0
- package/dist/components/icons/solar/book-linear.d.ts +2 -0
- package/dist/components/icons/solar/book-linear.js +26 -0
- package/dist/components/icons/solar/bookmark-linear.d.ts +2 -0
- package/dist/components/icons/solar/bookmark-linear.js +21 -0
- package/dist/components/icons/solar/brain-linear.d.ts +2 -0
- package/dist/components/icons/solar/brain-linear.js +25 -0
- package/dist/components/icons/solar/branching-paths-up-linear.d.ts +2 -0
- package/dist/components/icons/solar/branching-paths-up-linear.js +33 -0
- package/dist/components/icons/solar/buildings-2-linear.d.ts +2 -0
- package/dist/components/icons/solar/buildings-2-linear.js +31 -0
- package/dist/components/icons/solar/calculator-linear.d.ts +2 -0
- package/dist/components/icons/solar/calculator-linear.js +32 -0
- package/dist/components/icons/solar/calendar-linear.d.ts +2 -0
- package/dist/components/icons/solar/calendar-linear.js +50 -0
- package/dist/components/icons/solar/card-bold.d.ts +2 -0
- package/dist/components/icons/solar/card-bold.js +22 -0
- package/dist/components/icons/solar/card-linear.d.ts +2 -0
- package/dist/components/icons/solar/card-linear.js +23 -0
- package/dist/components/icons/solar/chart-2-bold.d.ts +2 -0
- package/dist/components/icons/solar/chart-2-bold.js +31 -0
- package/dist/components/icons/solar/chart-2-linear.d.ts +2 -0
- package/dist/components/icons/solar/chart-2-linear.js +24 -0
- package/dist/components/icons/solar/chart-square-bold.d.ts +2 -0
- package/dist/components/icons/solar/chart-square-bold.js +19 -0
- package/dist/components/icons/solar/chart-square-linear.d.ts +2 -0
- package/dist/components/icons/solar/chart-square-linear.js +23 -0
- package/dist/components/icons/solar/chat-square-linear.d.ts +2 -0
- package/dist/components/icons/solar/chat-square-linear.js +21 -0
- package/dist/components/icons/solar/check-circle-linear.d.ts +2 -0
- package/dist/components/icons/solar/check-circle-linear.js +28 -0
- package/dist/components/icons/solar/check-mark-linear.d.ts +2 -0
- package/dist/components/icons/solar/check-mark-linear.js +22 -0
- package/dist/components/icons/solar/clipboard-linear.d.ts +2 -0
- package/dist/components/icons/solar/clipboard-linear.js +27 -0
- package/dist/components/icons/solar/clock-circle-bold.d.ts +2 -0
- package/dist/components/icons/solar/clock-circle-bold.js +19 -0
- package/dist/components/icons/solar/clock-circle-linear.d.ts +2 -0
- package/dist/components/icons/solar/clock-circle-linear.js +28 -0
- package/dist/components/icons/solar/close-circle-linear.d.ts +2 -0
- package/dist/components/icons/solar/close-circle-linear.js +27 -0
- package/dist/components/icons/solar/close-linear.d.ts +2 -0
- package/dist/components/icons/solar/close-linear.js +21 -0
- package/dist/components/icons/solar/cloud-bold.d.ts +2 -0
- package/dist/components/icons/solar/cloud-bold.js +17 -0
- package/dist/components/icons/solar/cloud-linear.d.ts +2 -0
- package/dist/components/icons/solar/cloud-linear.js +21 -0
- package/dist/components/icons/solar/code-linear.d.ts +2 -0
- package/dist/components/icons/solar/code-linear.js +25 -0
- package/dist/components/icons/solar/code-square-linear.d.ts +2 -0
- package/dist/components/icons/solar/code-square-linear.js +26 -0
- package/dist/components/icons/solar/copy-linear.d.ts +2 -0
- package/dist/components/icons/solar/copy-linear.js +20 -0
- package/dist/components/icons/solar/danger-circle-linear.d.ts +2 -0
- package/dist/components/icons/solar/danger-circle-linear.js +30 -0
- package/dist/components/icons/solar/danger-triangle-linear.d.ts +2 -0
- package/dist/components/icons/solar/danger-triangle-linear.js +36 -0
- package/dist/components/icons/solar/diskette-linear.d.ts +2 -0
- package/dist/components/icons/solar/diskette-linear.js +25 -0
- package/dist/components/icons/solar/dislike-linear.d.ts +2 -0
- package/dist/components/icons/solar/dislike-linear.js +28 -0
- package/dist/components/icons/solar/document-text-bold.d.ts +2 -0
- package/dist/components/icons/solar/document-text-bold.js +19 -0
- package/dist/components/icons/solar/document-text-linear.d.ts +2 -0
- package/dist/components/icons/solar/document-text-linear.js +23 -0
- package/dist/components/icons/solar/download-linear.d.ts +2 -0
- package/dist/components/icons/solar/download-linear.js +24 -0
- package/dist/components/icons/solar/eye-bold.d.ts +2 -0
- package/dist/components/icons/solar/eye-bold.js +19 -0
- package/dist/components/icons/solar/eye-closed-linear.d.ts +2 -0
- package/dist/components/icons/solar/eye-closed-linear.js +21 -0
- package/dist/components/icons/solar/eye-linear.d.ts +2 -0
- package/dist/components/icons/solar/eye-linear.js +20 -0
- package/dist/components/icons/solar/file-code-linear.d.ts +2 -0
- package/dist/components/icons/solar/file-code-linear.js +31 -0
- package/dist/components/icons/solar/file-linear.d.ts +2 -0
- package/dist/components/icons/solar/file-linear.js +24 -0
- package/dist/components/icons/solar/file-text-linear.d.ts +2 -0
- package/dist/components/icons/solar/file-text-linear.js +34 -0
- package/dist/components/icons/solar/folder-bold.d.ts +2 -0
- package/dist/components/icons/solar/folder-bold.js +19 -0
- package/dist/components/icons/solar/folder-linear.d.ts +2 -0
- package/dist/components/icons/solar/folder-linear.js +23 -0
- package/dist/components/icons/solar/gallery-linear.d.ts +2 -0
- package/dist/components/icons/solar/gallery-linear.js +29 -0
- package/dist/components/icons/solar/global-linear.d.ts +2 -0
- package/dist/components/icons/solar/global-linear.js +25 -0
- package/dist/components/icons/solar/graph-linear.d.ts +2 -0
- package/dist/components/icons/solar/graph-linear.js +21 -0
- package/dist/components/icons/solar/graph-up-linear.d.ts +2 -0
- package/dist/components/icons/solar/graph-up-linear.js +24 -0
- package/dist/components/icons/solar/heart-linear.d.ts +2 -0
- package/dist/components/icons/solar/heart-linear.js +22 -0
- package/dist/components/icons/solar/home-2-linear.d.ts +2 -0
- package/dist/components/icons/solar/home-2-linear.js +21 -0
- package/dist/components/icons/solar/home-smile-angle-bold.d.ts +2 -0
- package/dist/components/icons/solar/home-smile-angle-bold.js +19 -0
- package/dist/components/icons/solar/home-smile-angle-linear.d.ts +2 -0
- package/dist/components/icons/solar/home-smile-angle-linear.js +21 -0
- package/dist/components/icons/solar/inbox-linear.d.ts +2 -0
- package/dist/components/icons/solar/inbox-linear.js +23 -0
- package/dist/components/icons/solar/info-circle-linear.d.ts +2 -0
- package/dist/components/icons/solar/info-circle-linear.js +30 -0
- package/dist/components/icons/solar/letter-bold.d.ts +2 -0
- package/dist/components/icons/solar/letter-bold.js +19 -0
- package/dist/components/icons/solar/letter-linear.d.ts +2 -0
- package/dist/components/icons/solar/letter-linear.js +23 -0
- package/dist/components/icons/solar/like-linear.d.ts +2 -0
- package/dist/components/icons/solar/like-linear.js +28 -0
- package/dist/components/icons/solar/link-linear.d.ts +2 -0
- package/dist/components/icons/solar/link-linear.js +21 -0
- package/dist/components/icons/solar/list-linear.d.ts +2 -0
- package/dist/components/icons/solar/list-linear.js +25 -0
- package/dist/components/icons/solar/logout-2-linear.d.ts +2 -0
- package/dist/components/icons/solar/logout-2-linear.js +24 -0
- package/dist/components/icons/solar/magnifer-linear.d.ts +2 -0
- package/dist/components/icons/solar/magnifer-linear.js +27 -0
- package/dist/components/icons/solar/magnifier-zoom-in-linear.d.ts +2 -0
- package/dist/components/icons/solar/magnifier-zoom-in-linear.js +29 -0
- package/dist/components/icons/solar/magnifier-zoom-out-linear.d.ts +2 -0
- package/dist/components/icons/solar/magnifier-zoom-out-linear.js +29 -0
- package/dist/components/icons/solar/maximize-square-minimalistic-linear.d.ts +2 -0
- package/dist/components/icons/solar/maximize-square-minimalistic-linear.js +24 -0
- package/dist/components/icons/solar/menu-dots-linear.d.ts +2 -0
- package/dist/components/icons/solar/menu-dots-linear.js +34 -0
- package/dist/components/icons/solar/microphone-linear.d.ts +2 -0
- package/dist/components/icons/solar/microphone-linear.js +27 -0
- package/dist/components/icons/solar/minimize-square-minimalistic-linear.d.ts +2 -0
- package/dist/components/icons/solar/minimize-square-minimalistic-linear.js +24 -0
- package/dist/components/icons/solar/minus-circle-linear.d.ts +2 -0
- package/dist/components/icons/solar/minus-circle-linear.js +26 -0
- package/dist/components/icons/solar/monitor-linear.d.ts +2 -0
- package/dist/components/icons/solar/monitor-linear.js +23 -0
- package/dist/components/icons/solar/moon-linear.d.ts +2 -0
- package/dist/components/icons/solar/moon-linear.js +16 -0
- package/dist/components/icons/solar/notebook-bold.d.ts +2 -0
- package/dist/components/icons/solar/notebook-bold.js +19 -0
- package/dist/components/icons/solar/notebook-linear.d.ts +2 -0
- package/dist/components/icons/solar/notebook-linear.js +23 -0
- package/dist/components/icons/solar/pallete-2-bold.d.ts +2 -0
- package/dist/components/icons/solar/pallete-2-bold.js +19 -0
- package/dist/components/icons/solar/pallete-2-linear.d.ts +2 -0
- package/dist/components/icons/solar/pallete-2-linear.js +62 -0
- package/dist/components/icons/solar/panel-left-close-linear.d.ts +2 -0
- package/dist/components/icons/solar/panel-left-close-linear.js +26 -0
- package/dist/components/icons/solar/panel-left-open-linear.d.ts +2 -0
- package/dist/components/icons/solar/panel-left-open-linear.js +26 -0
- package/dist/components/icons/solar/pen-linear.d.ts +2 -0
- package/dist/components/icons/solar/pen-linear.js +21 -0
- package/dist/components/icons/solar/pie-chart-2-linear.d.ts +2 -0
- package/dist/components/icons/solar/pie-chart-2-linear.js +21 -0
- package/dist/components/icons/solar/presentation-graph-linear.d.ts +2 -0
- package/dist/components/icons/solar/presentation-graph-linear.js +28 -0
- package/dist/components/icons/solar/pulse-linear.d.ts +2 -0
- package/dist/components/icons/solar/pulse-linear.js +21 -0
- package/dist/components/icons/solar/question-circle-linear.d.ts +2 -0
- package/dist/components/icons/solar/question-circle-linear.js +32 -0
- package/dist/components/icons/solar/radio-minimalistic-linear.d.ts +2 -0
- package/dist/components/icons/solar/radio-minimalistic-linear.js +32 -0
- package/dist/components/icons/solar/refresh-bold.d.ts +2 -0
- package/dist/components/icons/solar/refresh-bold.js +20 -0
- package/dist/components/icons/solar/refresh-circle-linear.d.ts +2 -0
- package/dist/components/icons/solar/refresh-circle-linear.js +35 -0
- package/dist/components/icons/solar/refresh-linear.d.ts +2 -0
- package/dist/components/icons/solar/refresh-linear.js +16 -0
- package/dist/components/icons/solar/restart-linear.d.ts +2 -0
- package/dist/components/icons/solar/restart-linear.js +22 -0
- package/dist/components/icons/solar/sale-linear.d.ts +2 -0
- package/dist/components/icons/solar/sale-linear.js +34 -0
- package/dist/components/icons/solar/scissors-linear.d.ts +2 -0
- package/dist/components/icons/solar/scissors-linear.js +21 -0
- package/dist/components/icons/solar/settings-bold.d.ts +2 -0
- package/dist/components/icons/solar/settings-bold.js +19 -0
- package/dist/components/icons/solar/settings-linear.d.ts +2 -0
- package/dist/components/icons/solar/settings-linear.js +24 -0
- package/dist/components/icons/solar/share-linear.d.ts +2 -0
- package/dist/components/icons/solar/share-linear.js +27 -0
- package/dist/components/icons/solar/shield-warning-bold.d.ts +2 -0
- package/dist/components/icons/solar/shield-warning-bold.js +19 -0
- package/dist/components/icons/solar/shield-warning-linear.d.ts +2 -0
- package/dist/components/icons/solar/shield-warning-linear.js +36 -0
- package/dist/components/icons/solar/smile-circle-linear.d.ts +2 -0
- package/dist/components/icons/solar/smile-circle-linear.js +38 -0
- package/dist/components/icons/solar/sort-horizontal-linear.d.ts +2 -0
- package/dist/components/icons/solar/sort-horizontal-linear.js +22 -0
- package/dist/components/icons/solar/sort-vertical-linear.d.ts +2 -0
- package/dist/components/icons/solar/sort-vertical-linear.js +22 -0
- package/dist/components/icons/solar/soundwave-linear.d.ts +2 -0
- package/dist/components/icons/solar/soundwave-linear.js +27 -0
- package/dist/components/icons/solar/star-linear.d.ts +2 -0
- package/dist/components/icons/solar/star-linear.js +21 -0
- package/dist/components/icons/solar/stars-linear.d.ts +2 -0
- package/dist/components/icons/solar/stars-linear.js +20 -0
- package/dist/components/icons/solar/subtitles-linear.d.ts +2 -0
- package/dist/components/icons/solar/subtitles-linear.js +29 -0
- package/dist/components/icons/solar/sun-linear.d.ts +2 -0
- package/dist/components/icons/solar/sun-linear.js +27 -0
- package/dist/components/icons/solar/text-bold-linear.d.ts +2 -0
- package/dist/components/icons/solar/text-bold-linear.js +21 -0
- package/dist/components/icons/solar/text-format-linear.d.ts +2 -0
- package/dist/components/icons/solar/text-format-linear.js +22 -0
- package/dist/components/icons/solar/text-italic-linear.d.ts +2 -0
- package/dist/components/icons/solar/text-italic-linear.js +22 -0
- package/dist/components/icons/solar/text-underline-linear.d.ts +2 -0
- package/dist/components/icons/solar/text-underline-linear.js +22 -0
- package/dist/components/icons/solar/transfer-horizontal-linear.d.ts +2 -0
- package/dist/components/icons/solar/transfer-horizontal-linear.js +22 -0
- package/dist/components/icons/solar/transfer-vertical-linear.d.ts +2 -0
- package/dist/components/icons/solar/transfer-vertical-linear.js +22 -0
- package/dist/components/icons/solar/trash-bin-trash-linear.d.ts +2 -0
- package/dist/components/icons/solar/trash-bin-trash-linear.js +27 -0
- package/dist/components/icons/solar/user-circle-linear.d.ts +2 -0
- package/dist/components/icons/solar/user-circle-linear.js +33 -0
- package/dist/components/icons/solar/user-cross-linear.d.ts +2 -0
- package/dist/components/icons/solar/user-cross-linear.js +33 -0
- package/dist/components/icons/solar/user-linear.d.ts +2 -0
- package/dist/components/icons/solar/user-linear.js +25 -0
- package/dist/components/icons/solar/users-group-rounded-linear.d.ts +2 -0
- package/dist/components/icons/solar/users-group-rounded-linear.js +35 -0
- package/dist/components/icons/solar/verified-check-linear.d.ts +2 -0
- package/dist/components/icons/solar/verified-check-linear.js +24 -0
- package/dist/components/icons/solar/volume-cross-linear.d.ts +2 -0
- package/dist/components/icons/solar/volume-cross-linear.js +30 -0
- package/dist/components/icons/solar/wallet-linear.d.ts +2 -0
- package/dist/components/icons/solar/wallet-linear.js +32 -0
- package/dist/components/icons/solar/widget-2-bold.d.ts +2 -0
- package/dist/components/icons/solar/widget-2-bold.js +35 -0
- package/dist/components/icons/solar/widget-2-linear.d.ts +2 -0
- package/dist/components/icons/solar/widget-2-linear.js +20 -0
- package/dist/components/icons/solar/widget-4-linear.d.ts +2 -0
- package/dist/components/icons/solar/widget-4-linear.js +25 -0
- package/dist/components/icons/solar/window-frame-linear.d.ts +2 -0
- package/dist/components/icons/solar/window-frame-linear.js +37 -0
- package/dist/components/motion/MotionSurface.d.ts +4 -0
- package/dist/components/motion/MotionSurface.js +15 -0
- package/dist/components/motion/motion-tokens.d.ts +38 -0
- package/dist/components/motion/motion-tokens.js +38 -0
- package/dist/components/shared/BrandPaletteControl.d.ts +1 -0
- package/dist/components/shared/BrandPaletteControl.js +48 -0
- package/dist/components/shared/DarkStyleControl.d.ts +3 -0
- package/dist/components/shared/DarkStyleControl.js +48 -0
- package/dist/components/shared/DataTable.d.ts +29 -0
- package/dist/components/shared/DataTable.js +180 -0
- package/dist/components/shared/EmptyState.d.ts +11 -0
- package/dist/components/shared/EmptyState.js +32 -0
- package/dist/components/shared/FrostCard.d.ts +2 -0
- package/dist/components/shared/FrostCard.js +11 -0
- package/dist/components/shared/MetricCard.d.ts +14 -0
- package/dist/components/shared/MetricCard.js +36 -0
- package/dist/components/shared/StatusBadge.d.ts +32 -0
- package/dist/components/shared/StatusBadge.js +41 -0
- package/dist/components/shared/ThemeSwitcher.d.ts +3 -0
- package/dist/components/shared/ThemeSwitcher.js +93 -0
- package/dist/components/shared/data-table.css +375 -0
- package/dist/components/shared/use-data-table.d.ts +22 -0
- package/dist/components/shared/use-data-table.js +21 -0
- package/dist/components/ui/accordion.d.ts +7 -0
- package/dist/components/ui/accordion.js +63 -0
- package/dist/components/ui/alert-dialog.d.ts +18 -0
- package/dist/components/ui/alert-dialog.js +99 -0
- package/dist/components/ui/alert.d.ts +10 -0
- package/dist/components/ui/alert.js +42 -0
- package/dist/components/ui/aspect-ratio.d.ts +3 -0
- package/dist/components/ui/aspect-ratio.js +11 -0
- package/dist/components/ui/attachment.d.ts +24 -0
- package/dist/components/ui/attachment.js +100 -0
- package/dist/components/ui/avatar.d.ts +11 -0
- package/dist/components/ui/avatar.js +50 -0
- package/dist/components/ui/badge.d.ts +25 -0
- package/dist/components/ui/badge.js +52 -0
- package/dist/components/ui/breadcrumb.d.ts +11 -0
- package/dist/components/ui/breadcrumb.js +82 -0
- package/dist/components/ui/bubble.d.ts +17 -0
- package/dist/components/ui/bubble.js +71 -0
- package/dist/components/ui/button-group.d.ts +11 -0
- package/dist/components/ui/button-group.js +39 -0
- package/dist/components/ui/button.d.ts +11 -0
- package/dist/components/ui/button.js +55 -0
- package/dist/components/ui/calendar.d.ts +10 -0
- package/dist/components/ui/calendar.js +123 -0
- package/dist/components/ui/card.d.ts +11 -0
- package/dist/components/ui/card.js +55 -0
- package/dist/components/ui/carousel.d.ts +28 -0
- package/dist/components/ui/carousel.js +142 -0
- package/dist/components/ui/chart.d.ts +44 -0
- package/dist/components/ui/chart.js +148 -0
- package/dist/components/ui/checkbox.d.ts +4 -0
- package/dist/components/ui/checkbox.js +24 -0
- package/dist/components/ui/code-block.d.ts +26 -0
- package/dist/components/ui/code-block.js +133 -0
- package/dist/components/ui/collapsible.d.ts +5 -0
- package/dist/components/ui/collapsible.js +23 -0
- package/dist/components/ui/combobox.d.ts +24 -0
- package/dist/components/ui/combobox.js +188 -0
- package/dist/components/ui/command.d.ts +18 -0
- package/dist/components/ui/command.js +101 -0
- package/dist/components/ui/context-menu.d.ts +31 -0
- package/dist/components/ui/context-menu.js +142 -0
- package/dist/components/ui/date-picker.d.ts +19 -0
- package/dist/components/ui/date-picker.js +107 -0
- package/dist/components/ui/dialog.d.ts +20 -0
- package/dist/components/ui/dialog.js +121 -0
- package/dist/components/ui/direction.d.ts +7 -0
- package/dist/components/ui/direction.js +13 -0
- package/dist/components/ui/drawer.d.ts +13 -0
- package/dist/components/ui/drawer.js +76 -0
- package/dist/components/ui/dropdown-menu.d.ts +29 -0
- package/dist/components/ui/dropdown-menu.js +141 -0
- package/dist/components/ui/empty.d.ts +11 -0
- package/dist/components/ui/empty.js +58 -0
- package/dist/components/ui/field.d.ts +24 -0
- package/dist/components/ui/field.js +109 -0
- package/dist/components/ui/hover-card.d.ts +6 -0
- package/dist/components/ui/hover-card.js +30 -0
- package/dist/components/ui/input-group.d.ts +16 -0
- package/dist/components/ui/input-group.js +79 -0
- package/dist/components/ui/input-otp.d.ts +11 -0
- package/dist/components/ui/input-otp.js +52 -0
- package/dist/components/ui/input.d.ts +11 -0
- package/dist/components/ui/input.js +20 -0
- package/dist/components/ui/item.d.ts +23 -0
- package/dist/components/ui/item.js +117 -0
- package/dist/components/ui/kbd.d.ts +3 -0
- package/dist/components/ui/kbd.js +18 -0
- package/dist/components/ui/label.d.ts +4 -0
- package/dist/components/ui/label.js +13 -0
- package/dist/components/ui/marker.d.ts +11 -0
- package/dist/components/ui/marker.js +39 -0
- package/dist/components/ui/menubar.d.ts +30 -0
- package/dist/components/ui/menubar.js +153 -0
- package/dist/components/ui/message-scroller.d.ts +10 -0
- package/dist/components/ui/message-scroller.js +65 -0
- package/dist/components/ui/message.d.ts +10 -0
- package/dist/components/ui/message.js +48 -0
- package/dist/components/ui/native-select.d.ts +8 -0
- package/dist/components/ui/native-select.js +45 -0
- package/dist/components/ui/navigation-menu.d.ts +14 -0
- package/dist/components/ui/navigation-menu.js +84 -0
- package/dist/components/ui/pagination.d.ts +20 -0
- package/dist/components/ui/pagination.js +135 -0
- package/dist/components/ui/popover.d.ts +10 -0
- package/dist/components/ui/popover.js +54 -0
- package/dist/components/ui/popup.css +109 -0
- package/dist/components/ui/progress.d.ts +4 -0
- package/dist/components/ui/progress.js +20 -0
- package/dist/components/ui/questionnaire.d.ts +19 -0
- package/dist/components/ui/questionnaire.js +174 -0
- package/dist/components/ui/radio-group.d.ts +5 -0
- package/dist/components/ui/radio-group.js +25 -0
- package/dist/components/ui/resizable.d.ts +7 -0
- package/dist/components/ui/resizable.js +27 -0
- package/dist/components/ui/scroll-area.d.ts +5 -0
- package/dist/components/ui/scroll-area.js +35 -0
- package/dist/components/ui/select.css +56 -0
- package/dist/components/ui/select.d.ts +22 -0
- package/dist/components/ui/select.js +226 -0
- package/dist/components/ui/separator.d.ts +4 -0
- package/dist/components/ui/separator.js +15 -0
- package/dist/components/ui/sheet.d.ts +14 -0
- package/dist/components/ui/sheet.js +94 -0
- package/dist/components/ui/sidebar.d.ts +69 -0
- package/dist/components/ui/sidebar.js +383 -0
- package/dist/components/ui/skeleton.d.ts +2 -0
- package/dist/components/ui/skeleton.js +11 -0
- package/dist/components/ui/slider.d.ts +4 -0
- package/dist/components/ui/slider.js +39 -0
- package/dist/components/ui/sonner.d.ts +3 -0
- package/dist/components/ui/sonner.js +74 -0
- package/dist/components/ui/spinner.d.ts +2 -0
- package/dist/components/ui/spinner.js +19 -0
- package/dist/components/ui/switch.d.ts +6 -0
- package/dist/components/ui/switch.js +19 -0
- package/dist/components/ui/table.d.ts +12 -0
- package/dist/components/ui/table.js +66 -0
- package/dist/components/ui/tabs.d.ts +11 -0
- package/dist/components/ui/tabs.js +45 -0
- package/dist/components/ui/text-field.css +96 -0
- package/dist/components/ui/textarea.d.ts +5 -0
- package/dist/components/ui/textarea.js +13 -0
- package/dist/components/ui/toggle-group.d.ts +10 -0
- package/dist/components/ui/toggle-group.js +51 -0
- package/dist/components/ui/toggle.d.ts +9 -0
- package/dist/components/ui/toggle.js +35 -0
- package/dist/components/ui/tooltip.d.ts +7 -0
- package/dist/components/ui/tooltip.js +34 -0
- package/dist/components/ui/trace.d.ts +18 -0
- package/dist/components/ui/trace.js +80 -0
- package/dist/hooks/use-mobile.d.ts +1 -0
- package/dist/hooks/use-mobile.js +17 -0
- package/dist/lib/format.d.ts +3 -0
- package/dist/lib/format.js +24 -0
- package/dist/lib/storage.d.ts +22 -0
- package/dist/lib/storage.js +54 -0
- package/dist/lib/ui-labels.d.ts +37 -0
- package/dist/lib/ui-labels.js +37 -0
- package/dist/lib/utils.d.ts +1 -0
- package/dist/lib/utils.js +1 -0
- package/dist/styles/dark-base.css +145 -0
- package/dist/styles/dark-clean.css +62 -0
- package/dist/styles/fonts.css +6 -0
- package/dist/styles/globals.css +134 -0
- package/dist/styles/icon-states.css +48 -0
- package/dist/styles/materials.css +188 -0
- package/dist/styles/motion.css +132 -0
- package/dist/styles/shadcn.css +642 -0
- package/dist/styles/soft-edge.css +60 -0
- package/dist/styles/spectrum.css +212 -0
- package/dist/styles/tokens.css +1048 -0
- package/package.json +116 -3
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import { cn } from "cn";
|
|
4
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
5
|
+
import * as RechartsPrimitive from "recharts";
|
|
6
|
+
// src/components/ui/chart.tsx
|
|
7
|
+
var THEMES = {
|
|
8
|
+
light: "",
|
|
9
|
+
dark: ".dark"
|
|
10
|
+
};
|
|
11
|
+
var INITIAL_DIMENSION = {
|
|
12
|
+
width: 320,
|
|
13
|
+
height: 200
|
|
14
|
+
};
|
|
15
|
+
var ChartContext = React.createContext(null);
|
|
16
|
+
function useChart() {
|
|
17
|
+
const context = React.useContext(ChartContext);
|
|
18
|
+
if (!context) throw new Error("useChart must be used within a <ChartContainer />");
|
|
19
|
+
return context;
|
|
20
|
+
}
|
|
21
|
+
function ChartContainer({ id, className, children, config, initialDimension = INITIAL_DIMENSION, ...props }) {
|
|
22
|
+
const uniqueId = React.useId();
|
|
23
|
+
const chartId = `chart-${id ?? uniqueId.replace(/:/g, "")}`;
|
|
24
|
+
return /* @__PURE__ */ jsx(ChartContext.Provider, {
|
|
25
|
+
value: { config },
|
|
26
|
+
children: /* @__PURE__ */ jsxs("div", {
|
|
27
|
+
"data-slot": "chart",
|
|
28
|
+
"data-chart": chartId,
|
|
29
|
+
className: cn("flex aspect-video justify-center text-xs [&_.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-dot[stroke='#fff']]:stroke-transparent [&_.recharts-layer]:outline-hidden [&_.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 [&_.recharts-sector]:outline-hidden [&_.recharts-sector[stroke='#fff']]:stroke-transparent [&_.recharts-surface]:outline-hidden", className),
|
|
30
|
+
...props,
|
|
31
|
+
children: [/* @__PURE__ */ jsx(ChartStyle, {
|
|
32
|
+
id: chartId,
|
|
33
|
+
config
|
|
34
|
+
}), /* @__PURE__ */ jsx(RechartsPrimitive.ResponsiveContainer, {
|
|
35
|
+
initialDimension,
|
|
36
|
+
children
|
|
37
|
+
})]
|
|
38
|
+
})
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
var ChartStyle = ({ id, config }) => {
|
|
42
|
+
const colorConfig = Object.entries(config).filter(([, config]) => config.theme ?? config.color);
|
|
43
|
+
if (!colorConfig.length) return null;
|
|
44
|
+
return /* @__PURE__ */ jsx("style", { dangerouslySetInnerHTML: { __html: Object.entries(THEMES).map(([theme, prefix]) => `
|
|
45
|
+
${prefix} [data-chart=${id}] {
|
|
46
|
+
${colorConfig.map(([key, itemConfig]) => {
|
|
47
|
+
const color = itemConfig.theme?.[theme] ?? itemConfig.color;
|
|
48
|
+
return color ? ` --color-${key}: ${color};` : null;
|
|
49
|
+
}).join("\n")}
|
|
50
|
+
}
|
|
51
|
+
`).join("\n") } });
|
|
52
|
+
};
|
|
53
|
+
var ChartTooltip = RechartsPrimitive.Tooltip;
|
|
54
|
+
function ChartTooltipContent({ active, payload, className, indicator = "dot", hideLabel = false, hideIndicator = false, label, labelFormatter, labelClassName, formatter, color, nameKey, labelKey }) {
|
|
55
|
+
const { config } = useChart();
|
|
56
|
+
const tooltipLabel = React.useMemo(() => {
|
|
57
|
+
if (hideLabel || !payload?.length) return null;
|
|
58
|
+
const [item] = payload;
|
|
59
|
+
const key = `${labelKey ?? item?.dataKey ?? item?.name ?? "value"}`;
|
|
60
|
+
const itemConfig = getPayloadConfigFromPayload(config, item, key);
|
|
61
|
+
const value = !labelKey && typeof label === "string" ? config[label]?.label ?? label : itemConfig?.label;
|
|
62
|
+
if (labelFormatter) return /* @__PURE__ */ jsx("div", {
|
|
63
|
+
className: cn("font-medium", labelClassName),
|
|
64
|
+
children: labelFormatter(value, payload)
|
|
65
|
+
});
|
|
66
|
+
if (!value) return null;
|
|
67
|
+
return /* @__PURE__ */ jsx("div", {
|
|
68
|
+
className: cn("font-medium", labelClassName),
|
|
69
|
+
children: value
|
|
70
|
+
});
|
|
71
|
+
}, [
|
|
72
|
+
label,
|
|
73
|
+
labelFormatter,
|
|
74
|
+
payload,
|
|
75
|
+
hideLabel,
|
|
76
|
+
labelClassName,
|
|
77
|
+
config,
|
|
78
|
+
labelKey
|
|
79
|
+
]);
|
|
80
|
+
if (!active || !payload?.length) return null;
|
|
81
|
+
const nestLabel = payload.length === 1 && indicator !== "dot";
|
|
82
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
83
|
+
className: cn("grid min-w-32 items-start gap-1.5 rounded-xl bg-popover px-2.5 py-1.5 text-xs text-popover-foreground shadow-lg ring-1 ring-foreground/5 dark:ring-foreground/10", className),
|
|
84
|
+
children: [!nestLabel ? tooltipLabel : null, /* @__PURE__ */ jsx("div", {
|
|
85
|
+
className: "grid gap-1.5",
|
|
86
|
+
children: payload.filter((item) => item.type !== "none").map((item, index) => {
|
|
87
|
+
const key = `${nameKey ?? item.name ?? item.dataKey ?? "value"}`;
|
|
88
|
+
const itemConfig = getPayloadConfigFromPayload(config, item, key);
|
|
89
|
+
const indicatorColor = color ?? item.payload?.fill ?? item.color;
|
|
90
|
+
return /* @__PURE__ */ jsx("div", {
|
|
91
|
+
className: cn("flex w-full flex-wrap items-stretch gap-2 [&>svg]:h-2.5 [&>svg]:w-2.5 [&>svg]:text-muted-foreground", indicator === "dot" && "items-center"),
|
|
92
|
+
children: formatter && item?.value !== void 0 && item.name ? formatter(item.value, item.name, item, index, item.payload) : /* @__PURE__ */ jsxs(Fragment, { children: [itemConfig?.icon ? /* @__PURE__ */ jsx(itemConfig.icon, {}) : !hideIndicator && /* @__PURE__ */ jsx("div", {
|
|
93
|
+
className: cn("shrink-0 rounded-[2px] border-(--color-border) bg-(--color-bg)", {
|
|
94
|
+
"h-2.5 w-2.5": indicator === "dot",
|
|
95
|
+
"w-1": indicator === "line",
|
|
96
|
+
"w-0 border-[1.5px] border-dashed bg-transparent": indicator === "dashed",
|
|
97
|
+
"my-0.5": nestLabel && indicator === "dashed"
|
|
98
|
+
}),
|
|
99
|
+
style: {
|
|
100
|
+
"--color-bg": indicatorColor,
|
|
101
|
+
"--color-border": indicatorColor
|
|
102
|
+
}
|
|
103
|
+
}), /* @__PURE__ */ jsxs("div", {
|
|
104
|
+
className: cn("flex flex-1 justify-between leading-none", nestLabel ? "items-end" : "items-center"),
|
|
105
|
+
children: [/* @__PURE__ */ jsxs("div", {
|
|
106
|
+
className: "grid gap-1.5",
|
|
107
|
+
children: [nestLabel ? tooltipLabel : null, /* @__PURE__ */ jsx("span", {
|
|
108
|
+
className: "text-muted-foreground",
|
|
109
|
+
children: itemConfig?.label ?? item.name
|
|
110
|
+
})]
|
|
111
|
+
}), item.value != null && /* @__PURE__ */ jsx("span", {
|
|
112
|
+
className: "font-mono font-medium text-foreground tabular-nums",
|
|
113
|
+
children: typeof item.value === "number" ? item.value.toLocaleString() : String(item.value)
|
|
114
|
+
})]
|
|
115
|
+
})] })
|
|
116
|
+
}, index);
|
|
117
|
+
})
|
|
118
|
+
})]
|
|
119
|
+
});
|
|
120
|
+
}
|
|
121
|
+
var ChartLegend = RechartsPrimitive.Legend;
|
|
122
|
+
function ChartLegendContent({ className, hideIcon = false, payload, verticalAlign = "bottom", nameKey }) {
|
|
123
|
+
const { config } = useChart();
|
|
124
|
+
if (!payload?.length) return null;
|
|
125
|
+
return /* @__PURE__ */ jsx("div", {
|
|
126
|
+
className: cn("flex items-center justify-center gap-4", verticalAlign === "top" ? "pb-3" : "pt-3", className),
|
|
127
|
+
children: payload.filter((item) => item.type !== "none").map((item, index) => {
|
|
128
|
+
const key = `${nameKey ?? item.dataKey ?? "value"}`;
|
|
129
|
+
const itemConfig = getPayloadConfigFromPayload(config, item, key);
|
|
130
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
131
|
+
className: cn("flex items-center gap-1.5 [&>svg]:h-3 [&>svg]:w-3 [&>svg]:text-muted-foreground"),
|
|
132
|
+
children: [itemConfig?.icon && !hideIcon ? /* @__PURE__ */ jsx(itemConfig.icon, {}) : /* @__PURE__ */ jsx("div", {
|
|
133
|
+
className: "h-2 w-2 shrink-0 rounded-[2px]",
|
|
134
|
+
style: { backgroundColor: item.color }
|
|
135
|
+
}), itemConfig?.label]
|
|
136
|
+
}, index);
|
|
137
|
+
})
|
|
138
|
+
});
|
|
139
|
+
}
|
|
140
|
+
function getPayloadConfigFromPayload(config, payload, key) {
|
|
141
|
+
if (typeof payload !== "object" || payload === null) return;
|
|
142
|
+
const payloadPayload = "payload" in payload && typeof payload.payload === "object" && payload.payload !== null ? payload.payload : void 0;
|
|
143
|
+
let configLabelKey = key;
|
|
144
|
+
if (key in payload && typeof payload[key] === "string") configLabelKey = payload[key];
|
|
145
|
+
else if (payloadPayload && key in payloadPayload && typeof payloadPayload[key] === "string") configLabelKey = payloadPayload[key];
|
|
146
|
+
return configLabelKey in config ? config[configLabelKey] : config[key];
|
|
147
|
+
}
|
|
148
|
+
export { ChartContainer, ChartLegend, ChartLegendContent, ChartStyle, ChartTooltip, ChartTooltipContent };
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { AppIcon } from "../icons/app-icon.js";
|
|
2
|
+
import { CheckCircleLinearIcon } from "../icons/solar/check-circle-linear.js";
|
|
3
|
+
import { cn } from "cn";
|
|
4
|
+
import { Checkbox as Checkbox$1 } from "radix-ui";
|
|
5
|
+
import { jsx } from "react/jsx-runtime";
|
|
6
|
+
// src/components/ui/checkbox.tsx
|
|
7
|
+
function Checkbox({ className, ...props }) {
|
|
8
|
+
return /* @__PURE__ */ jsx(Checkbox$1.Root, {
|
|
9
|
+
"data-slot": "checkbox",
|
|
10
|
+
className: cn("peer relative inline-flex size-4 shrink-0 items-center justify-center rounded-[5px] border border-input bg-(--field-surface) align-middle transition-colors after:absolute after:-inset-x-3 after:-inset-y-2 focus-visible:outline-offset-1 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:border-primary data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground data-[state=indeterminate]:border-primary data-[state=indeterminate]:bg-primary data-[state=indeterminate]:text-primary-foreground enabled:data-[state=unchecked]:hover:bg-(--field-surface-hover) pointer-coarse:after:-inset-y-3", className),
|
|
11
|
+
...props,
|
|
12
|
+
children: /* @__PURE__ */ jsx(Checkbox$1.Indicator, {
|
|
13
|
+
"data-slot": "checkbox-indicator",
|
|
14
|
+
className: "grid place-content-center text-current data-[state=indeterminate]:before:block data-[state=indeterminate]:before:h-0.5 data-[state=indeterminate]:before:w-2 data-[state=indeterminate]:before:rounded-full data-[state=indeterminate]:before:bg-current data-[state=indeterminate]:[&>svg]:hidden",
|
|
15
|
+
children: /* @__PURE__ */ jsx(AppIcon, {
|
|
16
|
+
icon: CheckCircleLinearIcon,
|
|
17
|
+
size: 14,
|
|
18
|
+
viewBox: "7 7 10 10",
|
|
19
|
+
className: "[&_circle]:hidden"
|
|
20
|
+
})
|
|
21
|
+
})
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
export { Checkbox };
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { type VariantProps } from "class-variance-authority";
|
|
3
|
+
import { Button } from "./button.js";
|
|
4
|
+
declare const codeBlockVariants: (props?: ({
|
|
5
|
+
variant?: "default" | "destructive" | null | undefined;
|
|
6
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
7
|
+
declare function CodeBlock({ className, variant, size, ...props }: React.ComponentProps<"div"> & VariantProps<typeof codeBlockVariants> & {
|
|
8
|
+
size?: "default" | "sm";
|
|
9
|
+
}): React.JSX.Element;
|
|
10
|
+
declare function CodeBlockHeader({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
11
|
+
declare function CodeBlockTitle({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
12
|
+
declare function CodeBlockActions({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
13
|
+
declare function CodeBlockCopyButton({ value, variant, size, className, onClick, ...props }: React.ComponentProps<typeof Button> & {
|
|
14
|
+
value: string;
|
|
15
|
+
}): React.JSX.Element;
|
|
16
|
+
declare function CodeBlockContent({ className, children, style, wrap, lineNumbers, startLine, ...props }: React.ComponentProps<"pre"> & {
|
|
17
|
+
wrap?: boolean;
|
|
18
|
+
lineNumbers?: boolean;
|
|
19
|
+
startLine?: number;
|
|
20
|
+
}): React.JSX.Element;
|
|
21
|
+
declare const codeBlockLineVariants: (props?: ({
|
|
22
|
+
variant?: "default" | "added" | "removed" | "highlighted" | null | undefined;
|
|
23
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
24
|
+
declare function CodeBlockLine({ className, variant, children, ...props }: React.ComponentProps<"span"> & VariantProps<typeof codeBlockLineVariants>): React.JSX.Element;
|
|
25
|
+
declare function CodeBlockFooter({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
26
|
+
export { CodeBlock, CodeBlockHeader, CodeBlockTitle, CodeBlockActions, CodeBlockCopyButton, CodeBlockContent, CodeBlockLine, CodeBlockFooter, };
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
import { Button } from "./button.js";
|
|
2
|
+
import { IconPlaceholder } from "../icons/icon-placeholder.js";
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
import { cn } from "cn";
|
|
5
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
6
|
+
import { cva } from "class-variance-authority";
|
|
7
|
+
// src/components/ui/code-block.tsx
|
|
8
|
+
var codeBlockVariants = cva("group/code-block relative flex w-full min-w-0 flex-col overflow-hidden rounded-2xl text-sm has-[>[data-slot=code-block-content]:focus-visible]:ring-3 has-[>[data-slot=code-block-content]:focus-visible]:ring-ring/30 data-[size=sm]:rounded-xl data-[size=sm]:text-xs", {
|
|
9
|
+
variants: { variant: {
|
|
10
|
+
default: "bg-muted text-foreground ring-1 ring-foreground/5 dark:ring-foreground/10",
|
|
11
|
+
destructive: "bg-destructive/5 text-destructive ring-1 ring-destructive/15 dark:bg-destructive/10 dark:ring-destructive/20"
|
|
12
|
+
} },
|
|
13
|
+
defaultVariants: { variant: "default" }
|
|
14
|
+
});
|
|
15
|
+
function CodeBlock({ className, variant = "default", size = "default", ...props }) {
|
|
16
|
+
return /* @__PURE__ */ jsx("div", {
|
|
17
|
+
"data-slot": "code-block",
|
|
18
|
+
"data-variant": variant,
|
|
19
|
+
"data-size": size,
|
|
20
|
+
className: cn(codeBlockVariants({ variant }), className),
|
|
21
|
+
...props
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
function CodeBlockHeader({ className, ...props }) {
|
|
25
|
+
return /* @__PURE__ */ jsx("div", {
|
|
26
|
+
"data-slot": "code-block-header",
|
|
27
|
+
className: cn("flex min-w-0 shrink-0 items-center gap-2 px-4 pt-4 text-muted-foreground group-data-[size=sm]/code-block:px-3 group-data-[size=sm]/code-block:pt-3 group-data-[variant=destructive]/code-block:text-destructive *:has-[>[data-slot=code-block-title]]:min-w-0", className),
|
|
28
|
+
...props
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
function CodeBlockTitle({ className, ...props }) {
|
|
32
|
+
return /* @__PURE__ */ jsx("div", {
|
|
33
|
+
"data-slot": "code-block-title",
|
|
34
|
+
className: cn("min-w-0 truncate font-sans text-sm font-medium text-foreground group-data-[size=sm]/code-block:text-xs group-data-[variant=destructive]/code-block:text-destructive [&_svg]:pointer-events-none [&_svg]:inline-block [&_svg]:align-middle [&_svg:not([class*='size-'])]:size-4 group-data-[size=sm]/code-block:[&_svg:not([class*='size-'])]:size-3.5 *:[svg]:me-1.5", className),
|
|
35
|
+
...props
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
function CodeBlockActions({ className, ...props }) {
|
|
39
|
+
return /* @__PURE__ */ jsx("div", {
|
|
40
|
+
"data-slot": "code-block-actions",
|
|
41
|
+
className: cn("-my-1 ms-auto -me-1.5 flex shrink-0 items-center gap-1 *:data-[slot=button]:hover:bg-foreground/5 dark:*:data-[slot=button]:hover:bg-foreground/10 [[data-slot=code-block]>&]:absolute [[data-slot=code-block]>&]:end-3 [[data-slot=code-block]>&]:top-3 [[data-slot=code-block]>&]:z-10 [[data-slot=code-block]>&]:m-0 [[data-slot=code-block]>&]:opacity-0 [[data-slot=code-block]>&]:transition-opacity [[data-slot=code-block]>&]:group-focus-within/code-block:opacity-100 [[data-slot=code-block]>&]:group-hover/code-block:opacity-100 group-data-[size=sm]/code-block:[[data-slot=code-block]>&]:end-2 group-data-[size=sm]/code-block:[[data-slot=code-block]>&]:top-2 [[data-slot=code-block]>&]:pointer-coarse:opacity-100 [[data-slot=code-block]>&]:*:[button]:bg-background [[data-slot=code-block]>&]:*:[button]:ring-1 [[data-slot=code-block]>&]:*:[button]:ring-foreground/10", className),
|
|
42
|
+
...props
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
function CodeBlockCopyButton({ value, variant = "ghost", size = "icon-xs", className, onClick, ...props }) {
|
|
46
|
+
const [copied, setCopied] = React.useState(false);
|
|
47
|
+
React.useEffect(() => {
|
|
48
|
+
if (!copied) return;
|
|
49
|
+
const timeout = setTimeout(() => setCopied(false), 2e3);
|
|
50
|
+
return () => clearTimeout(timeout);
|
|
51
|
+
}, [copied]);
|
|
52
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(Button, {
|
|
53
|
+
"data-slot": "code-block-copy-button",
|
|
54
|
+
"data-copied": copied || void 0,
|
|
55
|
+
variant,
|
|
56
|
+
size,
|
|
57
|
+
"aria-label": copied ? "Copied" : "Copy",
|
|
58
|
+
className: cn("hover:bg-foreground/5 dark:hover:bg-foreground/10", className),
|
|
59
|
+
onClick: (event) => {
|
|
60
|
+
onClick?.(event);
|
|
61
|
+
navigator.clipboard.writeText(value).then(() => setCopied(true)).catch(() => {});
|
|
62
|
+
},
|
|
63
|
+
...props,
|
|
64
|
+
children: copied ? /* @__PURE__ */ jsx(IconPlaceholder, {
|
|
65
|
+
lucide: "CheckIcon",
|
|
66
|
+
tabler: "IconCheck",
|
|
67
|
+
hugeicons: "Tick02Icon",
|
|
68
|
+
phosphor: "CheckIcon",
|
|
69
|
+
remixicon: "RiCheckLine"
|
|
70
|
+
}) : /* @__PURE__ */ jsx(IconPlaceholder, {
|
|
71
|
+
lucide: "CopyIcon",
|
|
72
|
+
tabler: "IconCopy",
|
|
73
|
+
hugeicons: "Copy01Icon",
|
|
74
|
+
phosphor: "CopyIcon",
|
|
75
|
+
remixicon: "RiFileCopyLine"
|
|
76
|
+
})
|
|
77
|
+
}), /* @__PURE__ */ jsx("span", {
|
|
78
|
+
"aria-live": "polite",
|
|
79
|
+
className: "sr-only",
|
|
80
|
+
children: copied ? "Copied" : ""
|
|
81
|
+
})] });
|
|
82
|
+
}
|
|
83
|
+
function CodeBlockContent({ className, children, style, wrap = false, lineNumbers = false, startLine = 1, ...props }) {
|
|
84
|
+
return /* @__PURE__ */ jsx("pre", {
|
|
85
|
+
"data-slot": "code-block-content",
|
|
86
|
+
"data-wrap": wrap || void 0,
|
|
87
|
+
"data-numbered": lineNumbers || void 0,
|
|
88
|
+
dir: "ltr",
|
|
89
|
+
tabIndex: 0,
|
|
90
|
+
style: {
|
|
91
|
+
counterReset: `line ${startLine - 1}`,
|
|
92
|
+
...style
|
|
93
|
+
},
|
|
94
|
+
className: cn("min-h-0 min-w-0 scroll-fade-x scrollbar-thin overflow-auto px-4 py-4 text-start font-mono leading-relaxed outline-none group-has-data-[slot=code-block-footer]/code-block:pb-2 group-has-data-[slot=code-block-header]/code-block:pt-2 group-data-[size=sm]/code-block:px-3 group-data-[size=sm]/code-block:py-3 group-data-[size=sm]/code-block:group-has-data-[slot=code-block-header]/code-block:pt-1.5 data-wrap:scroll-fade-y data-wrap:wrap-break-word data-wrap:whitespace-pre-wrap", className),
|
|
95
|
+
...props,
|
|
96
|
+
children: /* @__PURE__ */ jsx("code", {
|
|
97
|
+
"data-slot": "code-block-code",
|
|
98
|
+
className: "grid min-h-lh min-w-max content-start in-data-numbered:grid-cols-[auto_1fr] in-data-wrap:min-w-0",
|
|
99
|
+
children: lineNumbers && typeof children === "string" ? children.replace(/\n$/, "").split("\n").map((line, index) => /* @__PURE__ */ jsx(CodeBlockLine, { children: line }, index)) : children
|
|
100
|
+
})
|
|
101
|
+
});
|
|
102
|
+
}
|
|
103
|
+
var codeBlockLineVariants = cva("relative -mx-4 block min-h-lh px-4 group-data-[size=sm]/code-block:-mx-3 group-data-[size=sm]/code-block:px-3 before:min-w-6 before:text-end before:text-muted-foreground after:absolute after:start-1 after:top-0 after:text-muted-foreground after:select-none in-data-numbered:col-span-2 in-data-numbered:grid in-data-numbered:grid-cols-subgrid in-data-numbered:gap-x-3 in-data-numbered:[counter-increment:line] in-data-numbered:before:content-[counter(line)] in-data-numbered:before:select-none in-data-numbered:supports-[content:counter(line)_/_'']:before:content-[counter(line)_/_'']", {
|
|
104
|
+
variants: { variant: {
|
|
105
|
+
default: "",
|
|
106
|
+
added: "bg-foreground/5 after:content-['+']",
|
|
107
|
+
removed: "bg-destructive/10 after:text-destructive after:content-['−']",
|
|
108
|
+
highlighted: "bg-foreground/5"
|
|
109
|
+
} },
|
|
110
|
+
defaultVariants: { variant: "default" }
|
|
111
|
+
});
|
|
112
|
+
function CodeBlockLine({ className, variant = "default", children, ...props }) {
|
|
113
|
+
const empty = children === void 0 || children === null || children === "" || Array.isArray(children) && children.length === 0;
|
|
114
|
+
return /* @__PURE__ */ jsx("span", {
|
|
115
|
+
"data-slot": "code-block-line",
|
|
116
|
+
"data-variant": variant,
|
|
117
|
+
className: cn(codeBlockLineVariants({ variant }), className),
|
|
118
|
+
...props,
|
|
119
|
+
children: /* @__PURE__ */ jsx("span", {
|
|
120
|
+
"data-slot": "code-block-line-content",
|
|
121
|
+
className: "min-w-0",
|
|
122
|
+
children: empty ? "\n" : children
|
|
123
|
+
})
|
|
124
|
+
});
|
|
125
|
+
}
|
|
126
|
+
function CodeBlockFooter({ className, ...props }) {
|
|
127
|
+
return /* @__PURE__ */ jsx("div", {
|
|
128
|
+
"data-slot": "code-block-footer",
|
|
129
|
+
className: cn("flex min-w-0 shrink-0 items-center gap-2 px-4 pb-4 text-muted-foreground group-data-[size=sm]/code-block:px-3 group-data-[size=sm]/code-block:pb-3", className),
|
|
130
|
+
...props
|
|
131
|
+
});
|
|
132
|
+
}
|
|
133
|
+
export { CodeBlock, CodeBlockActions, CodeBlockContent, CodeBlockCopyButton, CodeBlockFooter, CodeBlockHeader, CodeBlockLine, CodeBlockTitle };
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { Collapsible as CollapsiblePrimitive } from "radix-ui";
|
|
2
|
+
declare function Collapsible({ ...props }: React.ComponentProps<typeof CollapsiblePrimitive.Root>): import("react").JSX.Element;
|
|
3
|
+
declare function CollapsibleTrigger({ ...props }: React.ComponentProps<typeof CollapsiblePrimitive.CollapsibleTrigger>): import("react").JSX.Element;
|
|
4
|
+
declare function CollapsibleContent({ ...props }: React.ComponentProps<typeof CollapsiblePrimitive.CollapsibleContent>): import("react").JSX.Element;
|
|
5
|
+
export { Collapsible, CollapsibleTrigger, CollapsibleContent };
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { Collapsible as Collapsible$1 } from "radix-ui";
|
|
3
|
+
import { jsx } from "react/jsx-runtime";
|
|
4
|
+
// src/components/ui/collapsible.tsx
|
|
5
|
+
function Collapsible({ ...props }) {
|
|
6
|
+
return /* @__PURE__ */ jsx(Collapsible$1.Root, {
|
|
7
|
+
"data-slot": "collapsible",
|
|
8
|
+
...props
|
|
9
|
+
});
|
|
10
|
+
}
|
|
11
|
+
function CollapsibleTrigger({ ...props }) {
|
|
12
|
+
return /* @__PURE__ */ jsx(Collapsible$1.CollapsibleTrigger, {
|
|
13
|
+
"data-slot": "collapsible-trigger",
|
|
14
|
+
...props
|
|
15
|
+
});
|
|
16
|
+
}
|
|
17
|
+
function CollapsibleContent({ ...props }) {
|
|
18
|
+
return /* @__PURE__ */ jsx(Collapsible$1.CollapsibleContent, {
|
|
19
|
+
"data-slot": "collapsible-content",
|
|
20
|
+
...props
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
export { Collapsible, CollapsibleContent, CollapsibleTrigger };
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { Combobox as ComboboxPrimitive } from "@base-ui/react";
|
|
3
|
+
declare const Combobox: typeof ComboboxPrimitive.Root;
|
|
4
|
+
declare function ComboboxValue({ ...props }: ComboboxPrimitive.Value.Props): React.JSX.Element;
|
|
5
|
+
declare function ComboboxTrigger({ className, children, ...props }: ComboboxPrimitive.Trigger.Props): React.JSX.Element;
|
|
6
|
+
declare function ComboboxInput({ className, children, disabled, showTrigger, showClear, ...props }: ComboboxPrimitive.Input.Props & {
|
|
7
|
+
showTrigger?: boolean;
|
|
8
|
+
showClear?: boolean;
|
|
9
|
+
}): React.JSX.Element;
|
|
10
|
+
declare function ComboboxContent({ className, side, sideOffset, align, alignOffset, anchor, ...props }: ComboboxPrimitive.Popup.Props & Pick<ComboboxPrimitive.Positioner.Props, "side" | "align" | "sideOffset" | "alignOffset" | "anchor">): React.JSX.Element;
|
|
11
|
+
declare function ComboboxList({ className, ...props }: ComboboxPrimitive.List.Props): React.JSX.Element;
|
|
12
|
+
declare function ComboboxItem({ className, children, ...props }: ComboboxPrimitive.Item.Props): React.JSX.Element;
|
|
13
|
+
declare function ComboboxGroup({ className, ...props }: ComboboxPrimitive.Group.Props): React.JSX.Element;
|
|
14
|
+
declare function ComboboxLabel({ className, ...props }: ComboboxPrimitive.GroupLabel.Props): React.JSX.Element;
|
|
15
|
+
declare function ComboboxCollection({ ...props }: ComboboxPrimitive.Collection.Props): React.JSX.Element;
|
|
16
|
+
declare function ComboboxEmpty({ className, ...props }: ComboboxPrimitive.Empty.Props): React.JSX.Element;
|
|
17
|
+
declare function ComboboxSeparator({ className, ...props }: ComboboxPrimitive.Separator.Props): React.JSX.Element;
|
|
18
|
+
declare function ComboboxChips({ className, ...props }: React.ComponentPropsWithRef<typeof ComboboxPrimitive.Chips> & ComboboxPrimitive.Chips.Props): React.JSX.Element;
|
|
19
|
+
declare function ComboboxChip({ className, children, showRemove, ...props }: ComboboxPrimitive.Chip.Props & {
|
|
20
|
+
showRemove?: boolean;
|
|
21
|
+
}): React.JSX.Element;
|
|
22
|
+
declare function ComboboxChipsInput({ className, ...props }: ComboboxPrimitive.Input.Props): React.JSX.Element;
|
|
23
|
+
declare function useComboboxAnchor(): React.RefObject<HTMLDivElement | null>;
|
|
24
|
+
export { Combobox, ComboboxInput, ComboboxContent, ComboboxList, ComboboxItem, ComboboxGroup, ComboboxLabel, ComboboxCollection, ComboboxEmpty, ComboboxSeparator, ComboboxChips, ComboboxChip, ComboboxChipsInput, ComboboxTrigger, ComboboxValue, useComboboxAnchor, };
|
|
@@ -0,0 +1,188 @@
|
|
|
1
|
+
import { Button } from "./button.js";
|
|
2
|
+
import { InputGroup, InputGroupAddon, InputGroupButton, InputGroupInput } from "./input-group.js";
|
|
3
|
+
import { AppIcon } from "../icons/app-icon.js";
|
|
4
|
+
import { CloseLinearIcon } from "../icons/solar/close-linear.js";
|
|
5
|
+
import { IconPlaceholder } from "../icons/icon-placeholder.js";
|
|
6
|
+
import * as React from "react";
|
|
7
|
+
import { cn } from "cn";
|
|
8
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
9
|
+
import { Combobox as Combobox$1 } from "@base-ui/react";
|
|
10
|
+
// src/components/ui/combobox.tsx
|
|
11
|
+
var Combobox = Combobox$1.Root;
|
|
12
|
+
function ComboboxValue({ ...props }) {
|
|
13
|
+
return /* @__PURE__ */ jsx(Combobox$1.Value, {
|
|
14
|
+
"data-slot": "combobox-value",
|
|
15
|
+
...props
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
function ComboboxTrigger({ className, children, ...props }) {
|
|
19
|
+
return /* @__PURE__ */ jsxs(Combobox$1.Trigger, {
|
|
20
|
+
"data-slot": "combobox-trigger",
|
|
21
|
+
className: cn("[&_svg:not([class*='size-'])]:size-4", className),
|
|
22
|
+
...props,
|
|
23
|
+
children: [children, /* @__PURE__ */ jsx(IconPlaceholder, {
|
|
24
|
+
lucide: "ChevronDownIcon",
|
|
25
|
+
tabler: "IconChevronDown",
|
|
26
|
+
hugeicons: "ArrowDown01Icon",
|
|
27
|
+
phosphor: "CaretDownIcon",
|
|
28
|
+
remixicon: "RiArrowDownSLine",
|
|
29
|
+
className: "pointer-events-none size-4 text-muted-foreground"
|
|
30
|
+
})]
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
function ComboboxClear({ className, ...props }) {
|
|
34
|
+
return /* @__PURE__ */ jsx(Combobox$1.Clear, {
|
|
35
|
+
"data-slot": "combobox-clear",
|
|
36
|
+
render: /* @__PURE__ */ jsx(InputGroupButton, {
|
|
37
|
+
variant: "ghost",
|
|
38
|
+
size: "icon-xs"
|
|
39
|
+
}),
|
|
40
|
+
className: cn(className),
|
|
41
|
+
...props,
|
|
42
|
+
children: /* @__PURE__ */ jsx(IconPlaceholder, {
|
|
43
|
+
lucide: "XIcon",
|
|
44
|
+
tabler: "IconX",
|
|
45
|
+
hugeicons: "Cancel01Icon",
|
|
46
|
+
phosphor: "XIcon",
|
|
47
|
+
remixicon: "RiCloseLine",
|
|
48
|
+
className: "pointer-events-none"
|
|
49
|
+
})
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
function ComboboxInput({ className, children, disabled = false, showTrigger = true, showClear = false, ...props }) {
|
|
53
|
+
return /* @__PURE__ */ jsxs(InputGroup, {
|
|
54
|
+
className: cn("w-auto", className),
|
|
55
|
+
children: [
|
|
56
|
+
/* @__PURE__ */ jsx(Combobox$1.Input, {
|
|
57
|
+
render: /* @__PURE__ */ jsx(InputGroupInput, { disabled }),
|
|
58
|
+
...props
|
|
59
|
+
}),
|
|
60
|
+
/* @__PURE__ */ jsxs(InputGroupAddon, {
|
|
61
|
+
align: "inline-end",
|
|
62
|
+
children: [showTrigger && /* @__PURE__ */ jsx(InputGroupButton, {
|
|
63
|
+
size: "icon-xs",
|
|
64
|
+
variant: "ghost",
|
|
65
|
+
asChild: true,
|
|
66
|
+
"data-slot": "input-group-button",
|
|
67
|
+
className: "group-has-data-[slot=combobox-clear]/input-group:hidden data-pressed:bg-transparent",
|
|
68
|
+
disabled,
|
|
69
|
+
children: /* @__PURE__ */ jsx(ComboboxTrigger, {})
|
|
70
|
+
}), showClear && /* @__PURE__ */ jsx(ComboboxClear, { disabled })]
|
|
71
|
+
}),
|
|
72
|
+
children
|
|
73
|
+
]
|
|
74
|
+
});
|
|
75
|
+
}
|
|
76
|
+
function ComboboxContent({ className, side = "bottom", sideOffset = 6, align = "start", alignOffset = 0, anchor, ...props }) {
|
|
77
|
+
return /* @__PURE__ */ jsx(Combobox$1.Portal, { children: /* @__PURE__ */ jsx(Combobox$1.Positioner, {
|
|
78
|
+
side,
|
|
79
|
+
sideOffset,
|
|
80
|
+
align,
|
|
81
|
+
alignOffset,
|
|
82
|
+
anchor,
|
|
83
|
+
className: "isolate z-50",
|
|
84
|
+
children: /* @__PURE__ */ jsx(Combobox$1.Popup, {
|
|
85
|
+
"data-slot": "combobox-content",
|
|
86
|
+
"data-chips": !!anchor,
|
|
87
|
+
className: cn("group/combobox-content relative max-h-(--available-height) w-(--anchor-width) max-w-(--available-width) min-w-[calc(var(--anchor-width)+--spacing(7))] origin-(--transform-origin) overflow-hidden rounded-2xl bg-popover text-popover-foreground shadow-(--field-shadow) shadow-lg ring-1 ring-foreground/5 duration-100 data-[chips=true]:min-w-(--anchor-width) data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 *:data-[slot=input-group]:m-1 *:data-[slot=input-group]:mb-0 *:data-[slot=input-group]:h-8 *:data-[slot=input-group]:border-input/30 *:data-[slot=input-group]:bg-(--field-surface) *:data-[slot=input-group]:shadow-none dark:ring-foreground/10 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95", className),
|
|
88
|
+
...props
|
|
89
|
+
})
|
|
90
|
+
}) });
|
|
91
|
+
}
|
|
92
|
+
function ComboboxList({ className, ...props }) {
|
|
93
|
+
return /* @__PURE__ */ jsx(Combobox$1.List, {
|
|
94
|
+
"data-slot": "combobox-list",
|
|
95
|
+
className: cn("no-scrollbar max-h-[min(calc(--spacing(72)---spacing(9)),calc(var(--available-height)---spacing(9)))] scroll-py-1 overflow-y-auto overscroll-contain p-1 data-empty:p-0", className),
|
|
96
|
+
...props
|
|
97
|
+
});
|
|
98
|
+
}
|
|
99
|
+
function ComboboxItem({ className, children, ...props }) {
|
|
100
|
+
return /* @__PURE__ */ jsxs(Combobox$1.Item, {
|
|
101
|
+
"data-slot": "combobox-item",
|
|
102
|
+
className: cn("relative flex min-h-7 w-full cursor-default items-center gap-2 rounded-xl py-1.5 pr-8 pl-2 text-sm outline-hidden select-none data-highlighted:bg-accent data-highlighted:text-accent-foreground not-data-[variant=destructive]:data-highlighted:**:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", className),
|
|
103
|
+
...props,
|
|
104
|
+
children: [children, /* @__PURE__ */ jsx(Combobox$1.ItemIndicator, {
|
|
105
|
+
render: /* @__PURE__ */ jsx("span", { className: "pointer-events-none absolute right-2 flex size-4 items-center justify-center" }),
|
|
106
|
+
children: /* @__PURE__ */ jsx(IconPlaceholder, {
|
|
107
|
+
lucide: "CheckIcon",
|
|
108
|
+
tabler: "IconCheck",
|
|
109
|
+
hugeicons: "Tick02Icon",
|
|
110
|
+
phosphor: "CheckIcon",
|
|
111
|
+
remixicon: "RiCheckLine",
|
|
112
|
+
className: "pointer-events-none"
|
|
113
|
+
})
|
|
114
|
+
})]
|
|
115
|
+
});
|
|
116
|
+
}
|
|
117
|
+
function ComboboxGroup({ className, ...props }) {
|
|
118
|
+
return /* @__PURE__ */ jsx(Combobox$1.Group, {
|
|
119
|
+
"data-slot": "combobox-group",
|
|
120
|
+
className: cn(className),
|
|
121
|
+
...props
|
|
122
|
+
});
|
|
123
|
+
}
|
|
124
|
+
function ComboboxLabel({ className, ...props }) {
|
|
125
|
+
return /* @__PURE__ */ jsx(Combobox$1.GroupLabel, {
|
|
126
|
+
"data-slot": "combobox-label",
|
|
127
|
+
className: cn("px-2 py-1.5 text-xs text-muted-foreground", className),
|
|
128
|
+
...props
|
|
129
|
+
});
|
|
130
|
+
}
|
|
131
|
+
function ComboboxCollection({ ...props }) {
|
|
132
|
+
return /* @__PURE__ */ jsx(Combobox$1.Collection, {
|
|
133
|
+
"data-slot": "combobox-collection",
|
|
134
|
+
...props
|
|
135
|
+
});
|
|
136
|
+
}
|
|
137
|
+
function ComboboxEmpty({ className, ...props }) {
|
|
138
|
+
return /* @__PURE__ */ jsx(Combobox$1.Empty, {
|
|
139
|
+
"data-slot": "combobox-empty",
|
|
140
|
+
className: cn("hidden w-full justify-center py-2 text-center text-sm text-muted-foreground group-data-empty/combobox-content:flex", className),
|
|
141
|
+
...props
|
|
142
|
+
});
|
|
143
|
+
}
|
|
144
|
+
function ComboboxSeparator({ className, ...props }) {
|
|
145
|
+
return /* @__PURE__ */ jsx(Combobox$1.Separator, {
|
|
146
|
+
"data-slot": "combobox-separator",
|
|
147
|
+
className: cn("-mx-1 my-1 h-px bg-border", className),
|
|
148
|
+
...props
|
|
149
|
+
});
|
|
150
|
+
}
|
|
151
|
+
function ComboboxChips({ className, ...props }) {
|
|
152
|
+
return /* @__PURE__ */ jsx(Combobox$1.Chips, {
|
|
153
|
+
"data-slot": "combobox-chips",
|
|
154
|
+
className: cn("flex min-h-8 flex-wrap items-center gap-1 rounded-2xl border border-transparent bg-(--field-surface) bg-clip-padding px-2.5 py-1 text-sm shadow-(--field-shadow) transition-[color,box-shadow] duration-200 focus-within:border-ring focus-within:ring-3 focus-within:ring-ring/30 has-aria-invalid:border-destructive has-aria-invalid:ring-3 has-aria-invalid:ring-destructive/20 has-data-[slot=combobox-chip]:px-1 dark:has-aria-invalid:border-destructive/50 dark:has-aria-invalid:ring-destructive/40", className),
|
|
155
|
+
...props
|
|
156
|
+
});
|
|
157
|
+
}
|
|
158
|
+
function ComboboxChip({ className, children, showRemove = true, ...props }) {
|
|
159
|
+
return /* @__PURE__ */ jsxs(Combobox$1.Chip, {
|
|
160
|
+
"data-slot": "combobox-chip",
|
|
161
|
+
className: cn("flex h-6 w-fit items-center justify-center gap-0.5 rounded-full bg-(--layout-control) px-2.5 text-xs font-[620] whitespace-nowrap text-foreground shadow-(--field-shadow) has-disabled:pointer-events-none has-disabled:cursor-not-allowed has-disabled:opacity-50 has-data-[slot=combobox-chip-remove]:pr-1", className),
|
|
162
|
+
...props,
|
|
163
|
+
children: [children, showRemove && /* @__PURE__ */ jsx(Combobox$1.ChipRemove, {
|
|
164
|
+
render: /* @__PURE__ */ jsx(Button, {
|
|
165
|
+
variant: "ghost",
|
|
166
|
+
size: "icon-xs"
|
|
167
|
+
}),
|
|
168
|
+
className: "-mr-0.5 size-4 rounded-full p-0 opacity-60 shadow-none hover:bg-accent hover:opacity-100 aria-disabled:pointer-events-none",
|
|
169
|
+
"data-slot": "combobox-chip-remove",
|
|
170
|
+
children: /* @__PURE__ */ jsx(AppIcon, {
|
|
171
|
+
icon: CloseLinearIcon,
|
|
172
|
+
size: 12,
|
|
173
|
+
className: "pointer-events-none"
|
|
174
|
+
})
|
|
175
|
+
})]
|
|
176
|
+
});
|
|
177
|
+
}
|
|
178
|
+
function ComboboxChipsInput({ className, ...props }) {
|
|
179
|
+
return /* @__PURE__ */ jsx(Combobox$1.Input, {
|
|
180
|
+
"data-slot": "combobox-chip-input",
|
|
181
|
+
className: cn("min-w-16 flex-1 outline-none", className),
|
|
182
|
+
...props
|
|
183
|
+
});
|
|
184
|
+
}
|
|
185
|
+
function useComboboxAnchor() {
|
|
186
|
+
return React.useRef(null);
|
|
187
|
+
}
|
|
188
|
+
export { Combobox, ComboboxChip, ComboboxChips, ComboboxChipsInput, ComboboxCollection, ComboboxContent, ComboboxEmpty, ComboboxGroup, ComboboxInput, ComboboxItem, ComboboxLabel, ComboboxList, ComboboxSeparator, ComboboxTrigger, ComboboxValue, useComboboxAnchor };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { Command as CommandPrimitive } from "cmdk";
|
|
3
|
+
import { Dialog } from "./dialog.js";
|
|
4
|
+
declare function Command({ className, ...props }: React.ComponentProps<typeof CommandPrimitive>): React.JSX.Element;
|
|
5
|
+
declare function CommandDialog({ title, description, children, className, showCloseButton, ...props }: React.ComponentProps<typeof Dialog> & {
|
|
6
|
+
title?: string;
|
|
7
|
+
description?: string;
|
|
8
|
+
className?: string;
|
|
9
|
+
showCloseButton?: boolean;
|
|
10
|
+
}): React.JSX.Element;
|
|
11
|
+
declare function CommandInput({ className, ...props }: React.ComponentProps<typeof CommandPrimitive.Input>): React.JSX.Element;
|
|
12
|
+
declare function CommandList({ className, ...props }: React.ComponentProps<typeof CommandPrimitive.List>): React.JSX.Element;
|
|
13
|
+
declare function CommandEmpty({ className, ...props }: React.ComponentProps<typeof CommandPrimitive.Empty>): React.JSX.Element;
|
|
14
|
+
declare function CommandGroup({ className, ...props }: React.ComponentProps<typeof CommandPrimitive.Group>): React.JSX.Element;
|
|
15
|
+
declare function CommandSeparator({ className, ...props }: React.ComponentProps<typeof CommandPrimitive.Separator>): React.JSX.Element;
|
|
16
|
+
declare function CommandItem({ className, children, ...props }: React.ComponentProps<typeof CommandPrimitive.Item>): React.JSX.Element;
|
|
17
|
+
declare function CommandShortcut({ className, ...props }: React.ComponentProps<"span">): React.JSX.Element;
|
|
18
|
+
export { Command, CommandDialog, CommandInput, CommandList, CommandEmpty, CommandGroup, CommandItem, CommandShortcut, CommandSeparator, };
|