@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,383 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { useIsMobile } from "../../hooks/use-mobile.js";
|
|
3
|
+
import { Button } from "./button.js";
|
|
4
|
+
import { Input } from "./input.js";
|
|
5
|
+
import { Separator as Separator$1 } from "./separator.js";
|
|
6
|
+
import { Sheet, SheetContent, SheetDescription, SheetHeader, SheetTitle } from "./sheet.js";
|
|
7
|
+
import { Skeleton } from "./skeleton.js";
|
|
8
|
+
import { Tooltip as Tooltip$1, TooltipContent, TooltipTrigger } from "./tooltip.js";
|
|
9
|
+
import { IconPlaceholder } from "../icons/icon-placeholder.js";
|
|
10
|
+
import * as React from "react";
|
|
11
|
+
import { cn } from "cn";
|
|
12
|
+
import { Slot } from "radix-ui";
|
|
13
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
14
|
+
import { cva } from "class-variance-authority";
|
|
15
|
+
// src/components/ui/sidebar.tsx
|
|
16
|
+
var SIDEBAR_COOKIE_NAME = "sidebar_state";
|
|
17
|
+
var SIDEBAR_COOKIE_MAX_AGE = 604800;
|
|
18
|
+
var SIDEBAR_WIDTH = "16rem";
|
|
19
|
+
var SIDEBAR_WIDTH_MOBILE = "18rem";
|
|
20
|
+
var SIDEBAR_WIDTH_ICON = "3rem";
|
|
21
|
+
var SIDEBAR_KEYBOARD_SHORTCUT = "b";
|
|
22
|
+
var SidebarContext = React.createContext(null);
|
|
23
|
+
function useSidebar() {
|
|
24
|
+
const context = React.useContext(SidebarContext);
|
|
25
|
+
if (!context) throw new Error("useSidebar must be used within a SidebarProvider.");
|
|
26
|
+
return context;
|
|
27
|
+
}
|
|
28
|
+
function SidebarProvider({ defaultOpen = true, open: openProp, onOpenChange: setOpenProp, className, style, children, ...props }) {
|
|
29
|
+
const isMobile = useIsMobile();
|
|
30
|
+
const [openMobile, setOpenMobile] = React.useState(false);
|
|
31
|
+
const [_open, _setOpen] = React.useState(defaultOpen);
|
|
32
|
+
const open = openProp ?? _open;
|
|
33
|
+
const setOpen = React.useCallback((value) => {
|
|
34
|
+
const openState = typeof value === "function" ? value(open) : value;
|
|
35
|
+
if (setOpenProp) setOpenProp(openState);
|
|
36
|
+
else _setOpen(openState);
|
|
37
|
+
document.cookie = `${SIDEBAR_COOKIE_NAME}=${openState}; path=/; max-age=${SIDEBAR_COOKIE_MAX_AGE}`;
|
|
38
|
+
}, [setOpenProp, open]);
|
|
39
|
+
const toggleSidebar = React.useCallback(() => {
|
|
40
|
+
return isMobile ? setOpenMobile((open) => !open) : setOpen((open) => !open);
|
|
41
|
+
}, [
|
|
42
|
+
isMobile,
|
|
43
|
+
setOpen,
|
|
44
|
+
setOpenMobile
|
|
45
|
+
]);
|
|
46
|
+
React.useEffect(() => {
|
|
47
|
+
const handleKeyDown = (event) => {
|
|
48
|
+
if (event.key === SIDEBAR_KEYBOARD_SHORTCUT && (event.metaKey || event.ctrlKey)) {
|
|
49
|
+
event.preventDefault();
|
|
50
|
+
toggleSidebar();
|
|
51
|
+
}
|
|
52
|
+
};
|
|
53
|
+
window.addEventListener("keydown", handleKeyDown);
|
|
54
|
+
return () => window.removeEventListener("keydown", handleKeyDown);
|
|
55
|
+
}, [toggleSidebar]);
|
|
56
|
+
const state = open ? "expanded" : "collapsed";
|
|
57
|
+
const contextValue = React.useMemo(() => ({
|
|
58
|
+
state,
|
|
59
|
+
open,
|
|
60
|
+
setOpen,
|
|
61
|
+
isMobile,
|
|
62
|
+
openMobile,
|
|
63
|
+
setOpenMobile,
|
|
64
|
+
toggleSidebar
|
|
65
|
+
}), [
|
|
66
|
+
state,
|
|
67
|
+
open,
|
|
68
|
+
setOpen,
|
|
69
|
+
isMobile,
|
|
70
|
+
openMobile,
|
|
71
|
+
setOpenMobile,
|
|
72
|
+
toggleSidebar
|
|
73
|
+
]);
|
|
74
|
+
return /* @__PURE__ */ jsx(SidebarContext.Provider, {
|
|
75
|
+
value: contextValue,
|
|
76
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
77
|
+
"data-slot": "sidebar-wrapper",
|
|
78
|
+
style: {
|
|
79
|
+
"--sidebar-width": SIDEBAR_WIDTH,
|
|
80
|
+
"--sidebar-width-icon": SIDEBAR_WIDTH_ICON,
|
|
81
|
+
...style
|
|
82
|
+
},
|
|
83
|
+
className: cn("group/sidebar-wrapper has-data-[variant=inset]:bg-sidebar flex min-h-svh w-full", className),
|
|
84
|
+
...props,
|
|
85
|
+
children
|
|
86
|
+
})
|
|
87
|
+
});
|
|
88
|
+
}
|
|
89
|
+
function Sidebar({ side = "left", variant = "sidebar", collapsible = "offcanvas", className, children, dir, ...props }) {
|
|
90
|
+
const { isMobile, state, openMobile, setOpenMobile } = useSidebar();
|
|
91
|
+
if (collapsible === "none") return /* @__PURE__ */ jsx("div", {
|
|
92
|
+
"data-slot": "sidebar",
|
|
93
|
+
className: cn("bg-sidebar text-sidebar-foreground flex h-full w-(--sidebar-width) flex-col", className),
|
|
94
|
+
...props,
|
|
95
|
+
children
|
|
96
|
+
});
|
|
97
|
+
if (isMobile) return /* @__PURE__ */ jsx(Sheet, {
|
|
98
|
+
open: openMobile,
|
|
99
|
+
onOpenChange: setOpenMobile,
|
|
100
|
+
...props,
|
|
101
|
+
children: /* @__PURE__ */ jsxs(SheetContent, {
|
|
102
|
+
dir,
|
|
103
|
+
"data-sidebar": "sidebar",
|
|
104
|
+
"data-slot": "sidebar",
|
|
105
|
+
"data-mobile": "true",
|
|
106
|
+
className: "bg-sidebar text-sidebar-foreground w-(--sidebar-width) p-0 [&>button]:hidden",
|
|
107
|
+
style: { "--sidebar-width": SIDEBAR_WIDTH_MOBILE },
|
|
108
|
+
side,
|
|
109
|
+
children: [/* @__PURE__ */ jsxs(SheetHeader, {
|
|
110
|
+
className: "sr-only",
|
|
111
|
+
children: [/* @__PURE__ */ jsx(SheetTitle, { children: "Sidebar" }), /* @__PURE__ */ jsx(SheetDescription, { children: "Displays the mobile sidebar." })]
|
|
112
|
+
}), /* @__PURE__ */ jsx("div", {
|
|
113
|
+
className: "flex h-full w-full flex-col",
|
|
114
|
+
children
|
|
115
|
+
})]
|
|
116
|
+
})
|
|
117
|
+
});
|
|
118
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
119
|
+
className: "group peer text-sidebar-foreground hidden md:block",
|
|
120
|
+
"data-state": state,
|
|
121
|
+
"data-collapsible": state === "collapsed" ? collapsible : "",
|
|
122
|
+
"data-variant": variant,
|
|
123
|
+
"data-side": side,
|
|
124
|
+
"data-slot": "sidebar",
|
|
125
|
+
children: [/* @__PURE__ */ jsx("div", {
|
|
126
|
+
"data-slot": "sidebar-gap",
|
|
127
|
+
className: cn("relative w-(--sidebar-width) bg-transparent transition-[width] duration-200 ease-linear", "group-data-[collapsible=offcanvas]:w-0", "group-data-[side=right]:rotate-180", variant === "floating" || variant === "inset" ? "group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]" : "group-data-[collapsible=icon]:w-(--sidebar-width-icon)")
|
|
128
|
+
}), /* @__PURE__ */ jsx("div", {
|
|
129
|
+
"data-slot": "sidebar-container",
|
|
130
|
+
"data-side": side,
|
|
131
|
+
className: cn("fixed inset-y-0 z-10 hidden h-svh w-(--sidebar-width) transition-[left,right,width] duration-200 ease-linear data-[side=left]:left-0 data-[side=left]:group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)] data-[side=right]:right-0 data-[side=right]:group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)] md:flex", variant === "floating" || variant === "inset" ? "p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4))+2px)]" : "group-data-[collapsible=icon]:w-(--sidebar-width-icon) group-data-[side=left]:border-r group-data-[side=right]:border-l", className),
|
|
132
|
+
...props,
|
|
133
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
134
|
+
"data-sidebar": "sidebar",
|
|
135
|
+
"data-slot": "sidebar-inner",
|
|
136
|
+
className: "bg-sidebar group-data-[variant=floating]:ring-sidebar-border flex size-full flex-col group-data-[variant=floating]:rounded-2xl group-data-[variant=floating]:shadow-sm group-data-[variant=floating]:ring-1",
|
|
137
|
+
children
|
|
138
|
+
})
|
|
139
|
+
})]
|
|
140
|
+
});
|
|
141
|
+
}
|
|
142
|
+
function SidebarTrigger({ className, onClick, ...props }) {
|
|
143
|
+
const { toggleSidebar } = useSidebar();
|
|
144
|
+
return /* @__PURE__ */ jsxs(Button, {
|
|
145
|
+
"data-sidebar": "trigger",
|
|
146
|
+
"data-slot": "sidebar-trigger",
|
|
147
|
+
variant: "ghost",
|
|
148
|
+
size: "icon-sm",
|
|
149
|
+
className: cn(className),
|
|
150
|
+
onClick: (event) => {
|
|
151
|
+
onClick?.(event);
|
|
152
|
+
toggleSidebar();
|
|
153
|
+
},
|
|
154
|
+
...props,
|
|
155
|
+
children: [/* @__PURE__ */ jsx(IconPlaceholder, {
|
|
156
|
+
lucide: "PanelLeftIcon",
|
|
157
|
+
tabler: "IconLayoutSidebar",
|
|
158
|
+
hugeicons: "SidebarLeftIcon",
|
|
159
|
+
phosphor: "SidebarIcon",
|
|
160
|
+
remixicon: "RiSideBarLine"
|
|
161
|
+
}), /* @__PURE__ */ jsx("span", {
|
|
162
|
+
className: "sr-only",
|
|
163
|
+
children: "Toggle Sidebar"
|
|
164
|
+
})]
|
|
165
|
+
});
|
|
166
|
+
}
|
|
167
|
+
function SidebarRail({ className, ...props }) {
|
|
168
|
+
const { toggleSidebar } = useSidebar();
|
|
169
|
+
return /* @__PURE__ */ jsx("button", {
|
|
170
|
+
"data-sidebar": "rail",
|
|
171
|
+
"data-slot": "sidebar-rail",
|
|
172
|
+
"aria-label": "Toggle Sidebar",
|
|
173
|
+
tabIndex: -1,
|
|
174
|
+
onClick: toggleSidebar,
|
|
175
|
+
title: "Toggle Sidebar",
|
|
176
|
+
className: cn("hover:after:bg-sidebar-border absolute inset-y-0 z-20 hidden w-4 transition-all ease-linear group-data-[side=left]:-right-4 group-data-[side=right]:left-0 after:absolute after:inset-y-0 after:start-1/2 after:w-[2px] sm:flex ltr:-translate-x-1/2 rtl:-translate-x-1/2", "in-data-[side=left]:cursor-w-resize in-data-[side=right]:cursor-e-resize", "[[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-state=collapsed]_&]:cursor-w-resize", "hover:group-data-[collapsible=offcanvas]:bg-sidebar group-data-[collapsible=offcanvas]:translate-x-0 group-data-[collapsible=offcanvas]:after:left-full", "[[data-side=left][data-collapsible=offcanvas]_&]:-right-2", "[[data-side=right][data-collapsible=offcanvas]_&]:-left-2", className),
|
|
177
|
+
...props
|
|
178
|
+
});
|
|
179
|
+
}
|
|
180
|
+
function SidebarInset({ className, ...props }) {
|
|
181
|
+
return /* @__PURE__ */ jsx("main", {
|
|
182
|
+
"data-slot": "sidebar-inset",
|
|
183
|
+
className: cn("relative flex w-full flex-1 flex-col bg-background md:peer-data-[variant=inset]:m-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-2xl md:peer-data-[variant=inset]:shadow-sm md:peer-data-[variant=inset]:peer-data-[state=collapsed]:ml-2", className),
|
|
184
|
+
...props
|
|
185
|
+
});
|
|
186
|
+
}
|
|
187
|
+
function SidebarInput({ className, ...props }) {
|
|
188
|
+
return /* @__PURE__ */ jsx(Input, {
|
|
189
|
+
"data-slot": "sidebar-input",
|
|
190
|
+
"data-sidebar": "input",
|
|
191
|
+
className: cn("h-8 w-full bg-(--field-surface) shadow-(--field-shadow) shadow-none", className),
|
|
192
|
+
...props
|
|
193
|
+
});
|
|
194
|
+
}
|
|
195
|
+
function SidebarHeader({ className, ...props }) {
|
|
196
|
+
return /* @__PURE__ */ jsx("div", {
|
|
197
|
+
"data-slot": "sidebar-header",
|
|
198
|
+
"data-sidebar": "header",
|
|
199
|
+
className: cn("flex flex-col gap-2 p-2 [--radius:var(--radius-xl)]", className),
|
|
200
|
+
...props
|
|
201
|
+
});
|
|
202
|
+
}
|
|
203
|
+
function SidebarFooter({ className, ...props }) {
|
|
204
|
+
return /* @__PURE__ */ jsx("div", {
|
|
205
|
+
"data-slot": "sidebar-footer",
|
|
206
|
+
"data-sidebar": "footer",
|
|
207
|
+
className: cn("flex flex-col gap-2 p-2", className),
|
|
208
|
+
...props
|
|
209
|
+
});
|
|
210
|
+
}
|
|
211
|
+
function SidebarSeparator({ className, ...props }) {
|
|
212
|
+
return /* @__PURE__ */ jsx(Separator$1, {
|
|
213
|
+
"data-slot": "sidebar-separator",
|
|
214
|
+
"data-sidebar": "separator",
|
|
215
|
+
className: cn("bg-sidebar-border mx-2 w-auto", className),
|
|
216
|
+
...props
|
|
217
|
+
});
|
|
218
|
+
}
|
|
219
|
+
function SidebarContent({ className, ...props }) {
|
|
220
|
+
return /* @__PURE__ */ jsx("div", {
|
|
221
|
+
"data-slot": "sidebar-content",
|
|
222
|
+
"data-sidebar": "content",
|
|
223
|
+
className: cn("no-scrollbar flex min-h-0 flex-1 flex-col gap-2 overflow-auto [--radius:var(--radius-xl)] group-data-[collapsible=icon]:overflow-hidden", className),
|
|
224
|
+
...props
|
|
225
|
+
});
|
|
226
|
+
}
|
|
227
|
+
function SidebarGroup({ className, ...props }) {
|
|
228
|
+
return /* @__PURE__ */ jsx("div", {
|
|
229
|
+
"data-slot": "sidebar-group",
|
|
230
|
+
"data-sidebar": "group",
|
|
231
|
+
className: cn("relative flex w-full min-w-0 flex-col p-2", className),
|
|
232
|
+
...props
|
|
233
|
+
});
|
|
234
|
+
}
|
|
235
|
+
function SidebarGroupLabel({ className, asChild = false, ...props }) {
|
|
236
|
+
const Comp = asChild ? Slot.Root : "div";
|
|
237
|
+
return /* @__PURE__ */ jsx(Comp, {
|
|
238
|
+
"data-slot": "sidebar-group-label",
|
|
239
|
+
"data-sidebar": "group-label",
|
|
240
|
+
className: cn("text-sidebar-foreground/70 ring-sidebar-ring flex h-8 shrink-0 items-center rounded-xl px-3 text-xs font-medium outline-hidden transition-[margin,opacity] duration-200 ease-linear group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0 focus-visible:ring-3 [&>svg]:size-4 [&>svg]:shrink-0", className),
|
|
241
|
+
...props
|
|
242
|
+
});
|
|
243
|
+
}
|
|
244
|
+
function SidebarGroupAction({ className, asChild = false, ...props }) {
|
|
245
|
+
const Comp = asChild ? Slot.Root : "button";
|
|
246
|
+
return /* @__PURE__ */ jsx(Comp, {
|
|
247
|
+
"data-slot": "sidebar-group-action",
|
|
248
|
+
"data-sidebar": "group-action",
|
|
249
|
+
className: cn("text-sidebar-foreground ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground absolute top-3.5 right-3 flex aspect-square w-5 items-center justify-center rounded-xl p-0 outline-hidden transition-transform group-data-[collapsible=icon]:hidden after:absolute after:-inset-2 focus-visible:ring-3 md:after:hidden [&>svg]:size-4 [&>svg]:shrink-0", className),
|
|
250
|
+
...props
|
|
251
|
+
});
|
|
252
|
+
}
|
|
253
|
+
function SidebarGroupContent({ className, ...props }) {
|
|
254
|
+
return /* @__PURE__ */ jsx("div", {
|
|
255
|
+
"data-slot": "sidebar-group-content",
|
|
256
|
+
"data-sidebar": "group-content",
|
|
257
|
+
className: cn("w-full text-sm", className),
|
|
258
|
+
...props
|
|
259
|
+
});
|
|
260
|
+
}
|
|
261
|
+
function SidebarMenu({ className, ...props }) {
|
|
262
|
+
return /* @__PURE__ */ jsx("ul", {
|
|
263
|
+
"data-slot": "sidebar-menu",
|
|
264
|
+
"data-sidebar": "menu",
|
|
265
|
+
className: cn("flex w-full min-w-0 flex-col gap-0.5", className),
|
|
266
|
+
...props
|
|
267
|
+
});
|
|
268
|
+
}
|
|
269
|
+
function SidebarMenuItem({ className, ...props }) {
|
|
270
|
+
return /* @__PURE__ */ jsx("li", {
|
|
271
|
+
"data-slot": "sidebar-menu-item",
|
|
272
|
+
"data-sidebar": "menu-item",
|
|
273
|
+
className: cn("group/menu-item relative", className),
|
|
274
|
+
...props
|
|
275
|
+
});
|
|
276
|
+
}
|
|
277
|
+
var sidebarMenuButtonVariants = cva("peer/menu-button group/menu-button ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground active:bg-sidebar-accent active:text-sidebar-accent-foreground data-open:hover:bg-sidebar-accent data-open:hover:text-sidebar-accent-foreground data-active:bg-sidebar-accent data-active:text-sidebar-accent-foreground flex w-full items-center gap-2 overflow-hidden rounded-xl px-3 py-2 text-left text-sm whitespace-nowrap outline-hidden transition-[width,height,padding] duration-200 group-has-data-[sidebar=menu-action]/menu-item:pr-8 group-data-[collapsible=icon]:size-8! group-data-[collapsible=icon]:p-2! focus-visible:ring-3 disabled:pointer-events-none disabled:opacity-50 has-[>svg:first-child]:pl-2.5 has-[>svg:last-child]:pr-2.5 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-active:font-medium [&_svg]:size-4 [&_svg]:shrink-0 [&>span:last-child]:truncate", {
|
|
278
|
+
variants: {
|
|
279
|
+
variant: {
|
|
280
|
+
default: "hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",
|
|
281
|
+
outline: "hover:bg-sidebar-accent hover:text-sidebar-accent-foreground bg-background shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]"
|
|
282
|
+
},
|
|
283
|
+
size: {
|
|
284
|
+
default: "h-8 text-sm",
|
|
285
|
+
sm: "h-7 text-xs",
|
|
286
|
+
lg: "h-12 px-3 text-sm group-data-[collapsible=icon]:p-0!"
|
|
287
|
+
}
|
|
288
|
+
},
|
|
289
|
+
defaultVariants: {
|
|
290
|
+
variant: "default",
|
|
291
|
+
size: "default"
|
|
292
|
+
}
|
|
293
|
+
});
|
|
294
|
+
function SidebarMenuButton({ asChild = false, isActive = false, variant = "default", size = "default", tooltip, className, ...props }) {
|
|
295
|
+
const Comp = asChild ? Slot.Root : "button";
|
|
296
|
+
const { isMobile, state } = useSidebar();
|
|
297
|
+
const button = /* @__PURE__ */ jsx(Comp, {
|
|
298
|
+
"data-slot": "sidebar-menu-button",
|
|
299
|
+
"data-sidebar": "menu-button",
|
|
300
|
+
"data-size": size,
|
|
301
|
+
"data-active": isActive,
|
|
302
|
+
className: cn(sidebarMenuButtonVariants({
|
|
303
|
+
variant,
|
|
304
|
+
size
|
|
305
|
+
}), className),
|
|
306
|
+
...props
|
|
307
|
+
});
|
|
308
|
+
if (!tooltip) return button;
|
|
309
|
+
if (typeof tooltip === "string") tooltip = { children: tooltip };
|
|
310
|
+
return /* @__PURE__ */ jsxs(Tooltip$1, { children: [/* @__PURE__ */ jsx(TooltipTrigger, {
|
|
311
|
+
asChild: true,
|
|
312
|
+
children: button
|
|
313
|
+
}), /* @__PURE__ */ jsx(TooltipContent, {
|
|
314
|
+
side: "right",
|
|
315
|
+
align: "center",
|
|
316
|
+
hidden: state !== "collapsed" || isMobile,
|
|
317
|
+
...tooltip
|
|
318
|
+
})] });
|
|
319
|
+
}
|
|
320
|
+
function SidebarMenuAction({ className, asChild = false, showOnHover = false, ...props }) {
|
|
321
|
+
const Comp = asChild ? Slot.Root : "button";
|
|
322
|
+
return /* @__PURE__ */ jsx(Comp, {
|
|
323
|
+
"data-slot": "sidebar-menu-action",
|
|
324
|
+
"data-sidebar": "menu-action",
|
|
325
|
+
className: cn("text-sidebar-foreground ring-sidebar-ring peer-hover/menu-button:text-sidebar-accent-foreground hover:bg-sidebar-accent hover:text-sidebar-accent-foreground absolute top-1.5 right-1 flex aspect-square w-5 items-center justify-center rounded-xl p-0 outline-hidden transition-transform group-data-[collapsible=icon]:hidden peer-data-[size=default]/menu-button:top-1.5 peer-data-[size=lg]/menu-button:top-2.5 peer-data-[size=sm]/menu-button:top-1 after:absolute after:-inset-2 focus-visible:ring-3 md:after:hidden [&>svg]:size-4 [&>svg]:shrink-0", showOnHover && "peer-data-active/menu-button:text-sidebar-accent-foreground group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 aria-expanded:opacity-100 md:opacity-0", className),
|
|
326
|
+
...props
|
|
327
|
+
});
|
|
328
|
+
}
|
|
329
|
+
function SidebarMenuBadge({ className, ...props }) {
|
|
330
|
+
return /* @__PURE__ */ jsx("div", {
|
|
331
|
+
"data-slot": "sidebar-menu-badge",
|
|
332
|
+
"data-sidebar": "menu-badge",
|
|
333
|
+
className: cn("text-sidebar-foreground peer-hover/menu-button:text-sidebar-accent-foreground peer-data-active/menu-button:text-sidebar-accent-foreground pointer-events-none absolute right-1 flex h-5 min-w-5 items-center justify-center rounded-xl px-1 text-xs font-medium tabular-nums select-none group-data-[collapsible=icon]:hidden peer-data-[size=default]/menu-button:top-1.5 peer-data-[size=lg]/menu-button:top-2.5 peer-data-[size=sm]/menu-button:top-1", className),
|
|
334
|
+
...props
|
|
335
|
+
});
|
|
336
|
+
}
|
|
337
|
+
function SidebarMenuSkeleton({ className, showIcon = false, ...props }) {
|
|
338
|
+
const [width] = React.useState(() => {
|
|
339
|
+
return `${Math.floor(Math.random() * 40) + 50}%`;
|
|
340
|
+
});
|
|
341
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
342
|
+
"data-slot": "sidebar-menu-skeleton",
|
|
343
|
+
"data-sidebar": "menu-skeleton",
|
|
344
|
+
className: cn("flex h-8 items-center gap-2 rounded-xl px-2", className),
|
|
345
|
+
...props,
|
|
346
|
+
children: [showIcon && /* @__PURE__ */ jsx(Skeleton, {
|
|
347
|
+
className: "size-4 rounded-xl",
|
|
348
|
+
"data-sidebar": "menu-skeleton-icon"
|
|
349
|
+
}), /* @__PURE__ */ jsx(Skeleton, {
|
|
350
|
+
className: "h-4 max-w-(--skeleton-width) flex-1",
|
|
351
|
+
"data-sidebar": "menu-skeleton-text",
|
|
352
|
+
style: { "--skeleton-width": width }
|
|
353
|
+
})]
|
|
354
|
+
});
|
|
355
|
+
}
|
|
356
|
+
function SidebarMenuSub({ className, ...props }) {
|
|
357
|
+
return /* @__PURE__ */ jsx("ul", {
|
|
358
|
+
"data-slot": "sidebar-menu-sub",
|
|
359
|
+
"data-sidebar": "menu-sub",
|
|
360
|
+
className: cn("border-sidebar-border mx-3.5 flex min-w-0 translate-x-px flex-col gap-1 border-l px-2.5 py-0.5 group-data-[collapsible=icon]:hidden", className),
|
|
361
|
+
...props
|
|
362
|
+
});
|
|
363
|
+
}
|
|
364
|
+
function SidebarMenuSubItem({ className, ...props }) {
|
|
365
|
+
return /* @__PURE__ */ jsx("li", {
|
|
366
|
+
"data-slot": "sidebar-menu-sub-item",
|
|
367
|
+
"data-sidebar": "menu-sub-item",
|
|
368
|
+
className: cn("group/menu-sub-item relative", className),
|
|
369
|
+
...props
|
|
370
|
+
});
|
|
371
|
+
}
|
|
372
|
+
function SidebarMenuSubButton({ asChild = false, size = "md", isActive = false, className, ...props }) {
|
|
373
|
+
const Comp = asChild ? Slot.Root : "a";
|
|
374
|
+
return /* @__PURE__ */ jsx(Comp, {
|
|
375
|
+
"data-slot": "sidebar-menu-sub-button",
|
|
376
|
+
"data-sidebar": "menu-sub-button",
|
|
377
|
+
"data-size": size,
|
|
378
|
+
"data-active": isActive,
|
|
379
|
+
className: cn("text-sidebar-foreground ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground active:bg-sidebar-accent active:text-sidebar-accent-foreground data-active:bg-sidebar-accent data-active:text-sidebar-accent-foreground [&>svg]:text-sidebar-accent-foreground flex h-7 min-w-0 -translate-x-px items-center gap-2 overflow-hidden rounded-xl px-3 outline-hidden group-data-[collapsible=icon]:hidden focus-visible:ring-3 disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[size=md]:text-sm data-[size=sm]:text-xs [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0", className),
|
|
380
|
+
...props
|
|
381
|
+
});
|
|
382
|
+
}
|
|
383
|
+
export { Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInput, SidebarInset, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger, useSidebar };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { cn } from "cn";
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
// src/components/ui/skeleton.tsx
|
|
4
|
+
function Skeleton({ className, ...props }) {
|
|
5
|
+
return /* @__PURE__ */ jsx("div", {
|
|
6
|
+
"data-slot": "skeleton",
|
|
7
|
+
className: cn("rounded-2xl bg-muted", className),
|
|
8
|
+
...props
|
|
9
|
+
});
|
|
10
|
+
}
|
|
11
|
+
export { Skeleton };
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { useUiLabels } from "../../lib/ui-labels.js";
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
import { cn } from "cn";
|
|
5
|
+
import { Slider as Slider$1 } from "radix-ui";
|
|
6
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
7
|
+
// src/components/ui/slider.tsx
|
|
8
|
+
function Slider({ className, defaultValue, value, min = 0, max = 100, ...props }) {
|
|
9
|
+
const labels = useUiLabels();
|
|
10
|
+
const _values = React.useMemo(() => Array.isArray(value) ? value : Array.isArray(defaultValue) ? defaultValue : [min, max], [
|
|
11
|
+
value,
|
|
12
|
+
defaultValue,
|
|
13
|
+
min,
|
|
14
|
+
max
|
|
15
|
+
]);
|
|
16
|
+
const thumbLabel = props["aria-label"] ?? labels.sliderValue;
|
|
17
|
+
return /* @__PURE__ */ jsxs(Slider$1.Root, {
|
|
18
|
+
"data-slot": "slider",
|
|
19
|
+
defaultValue,
|
|
20
|
+
value,
|
|
21
|
+
min,
|
|
22
|
+
max,
|
|
23
|
+
className: cn("relative flex w-full touch-none items-center select-none data-disabled:opacity-50 data-vertical:h-full data-vertical:min-h-40 data-vertical:w-auto data-vertical:flex-col", className),
|
|
24
|
+
...props,
|
|
25
|
+
children: [/* @__PURE__ */ jsx(Slider$1.Track, {
|
|
26
|
+
"data-slot": "slider-track",
|
|
27
|
+
className: "relative grow overflow-hidden rounded-2xl bg-muted data-horizontal:h-1 data-horizontal:w-full data-vertical:h-full data-vertical:w-1",
|
|
28
|
+
children: /* @__PURE__ */ jsx(Slider$1.Range, {
|
|
29
|
+
"data-slot": "slider-range",
|
|
30
|
+
className: "absolute bg-primary select-none data-horizontal:h-full data-vertical:w-full"
|
|
31
|
+
})
|
|
32
|
+
}), Array.from({ length: _values.length }, (_, index) => /* @__PURE__ */ jsx(Slider$1.Thumb, {
|
|
33
|
+
"data-slot": "slider-thumb",
|
|
34
|
+
"aria-label": _values.length > 1 ? `${thumbLabel} ${index + 1}` : thumbLabel,
|
|
35
|
+
className: "block size-4 shrink-0 rounded-2xl bg-white shadow-md ring-1 ring-black/10 transition-[color,box-shadow] duration-200 select-none not-dark:bg-clip-padding hover:ring-4 hover:ring-ring/30 focus-visible:ring-4 focus-visible:ring-ring/30 focus-visible:outline-hidden disabled:pointer-events-none disabled:opacity-50 dark:bg-foreground"
|
|
36
|
+
}, index))]
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
export { Slider };
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { IconPlaceholder } from "../icons/icon-placeholder.js";
|
|
2
|
+
import { useSyncExternalStore } from "react";
|
|
3
|
+
import { jsx } from "react/jsx-runtime";
|
|
4
|
+
import { Toaster as Toaster$1 } from "sonner";
|
|
5
|
+
// src/components/ui/sonner.tsx
|
|
6
|
+
function subscribeToTheme(onChange) {
|
|
7
|
+
const observer = new MutationObserver(onChange);
|
|
8
|
+
observer.observe(document.documentElement, {
|
|
9
|
+
attributes: true,
|
|
10
|
+
attributeFilter: ["class"]
|
|
11
|
+
});
|
|
12
|
+
return () => observer.disconnect();
|
|
13
|
+
}
|
|
14
|
+
function documentTheme() {
|
|
15
|
+
return document.documentElement.classList.contains("dark") ? "dark" : "light";
|
|
16
|
+
}
|
|
17
|
+
var Toaster = ({ ...props }) => {
|
|
18
|
+
const theme = useSyncExternalStore(subscribeToTheme, documentTheme);
|
|
19
|
+
return /* @__PURE__ */ jsx(Toaster$1, {
|
|
20
|
+
theme,
|
|
21
|
+
className: "toaster group",
|
|
22
|
+
icons: {
|
|
23
|
+
success: /* @__PURE__ */ jsx(IconPlaceholder, {
|
|
24
|
+
lucide: "CircleCheckIcon",
|
|
25
|
+
tabler: "IconCircleCheck",
|
|
26
|
+
hugeicons: "CheckmarkCircle02Icon",
|
|
27
|
+
phosphor: "CheckCircleIcon",
|
|
28
|
+
remixicon: "RiCheckboxCircleLine",
|
|
29
|
+
className: "size-4"
|
|
30
|
+
}),
|
|
31
|
+
info: /* @__PURE__ */ jsx(IconPlaceholder, {
|
|
32
|
+
lucide: "InfoIcon",
|
|
33
|
+
tabler: "IconInfoCircle",
|
|
34
|
+
hugeicons: "InformationCircleIcon",
|
|
35
|
+
phosphor: "InfoIcon",
|
|
36
|
+
remixicon: "RiInformationLine",
|
|
37
|
+
className: "size-4"
|
|
38
|
+
}),
|
|
39
|
+
warning: /* @__PURE__ */ jsx(IconPlaceholder, {
|
|
40
|
+
lucide: "TriangleAlertIcon",
|
|
41
|
+
tabler: "IconAlertTriangle",
|
|
42
|
+
hugeicons: "Alert02Icon",
|
|
43
|
+
phosphor: "WarningIcon",
|
|
44
|
+
remixicon: "RiErrorWarningLine",
|
|
45
|
+
className: "size-4"
|
|
46
|
+
}),
|
|
47
|
+
error: /* @__PURE__ */ jsx(IconPlaceholder, {
|
|
48
|
+
lucide: "OctagonXIcon",
|
|
49
|
+
tabler: "IconAlertOctagon",
|
|
50
|
+
hugeicons: "MultiplicationSignCircleIcon",
|
|
51
|
+
phosphor: "XCircleIcon",
|
|
52
|
+
remixicon: "RiCloseCircleLine",
|
|
53
|
+
className: "size-4"
|
|
54
|
+
}),
|
|
55
|
+
loading: /* @__PURE__ */ jsx(IconPlaceholder, {
|
|
56
|
+
lucide: "Loader2Icon",
|
|
57
|
+
tabler: "IconLoader",
|
|
58
|
+
hugeicons: "Loading03Icon",
|
|
59
|
+
phosphor: "SpinnerIcon",
|
|
60
|
+
remixicon: "RiLoaderLine",
|
|
61
|
+
className: "size-4 animate-spin"
|
|
62
|
+
})
|
|
63
|
+
},
|
|
64
|
+
style: {
|
|
65
|
+
"--normal-bg": "var(--popover)",
|
|
66
|
+
"--normal-text": "var(--popover-foreground)",
|
|
67
|
+
"--normal-border": "var(--border)",
|
|
68
|
+
"--border-radius": "var(--radius)"
|
|
69
|
+
},
|
|
70
|
+
toastOptions: { classNames: { toast: "cn-toast" } },
|
|
71
|
+
...props
|
|
72
|
+
});
|
|
73
|
+
};
|
|
74
|
+
export { Toaster };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { IconPlaceholder } from "../icons/icon-placeholder.js";
|
|
2
|
+
import { cn } from "cn";
|
|
3
|
+
import { jsx } from "react/jsx-runtime";
|
|
4
|
+
// src/components/ui/spinner.tsx
|
|
5
|
+
function Spinner({ className, ...props }) {
|
|
6
|
+
return /* @__PURE__ */ jsx(IconPlaceholder, {
|
|
7
|
+
lucide: "Loader2Icon",
|
|
8
|
+
tabler: "IconLoader",
|
|
9
|
+
hugeicons: "Loading03Icon",
|
|
10
|
+
phosphor: "SpinnerIcon",
|
|
11
|
+
remixicon: "RiLoaderLine",
|
|
12
|
+
"data-slot": "spinner",
|
|
13
|
+
role: "status",
|
|
14
|
+
"aria-label": "Loading",
|
|
15
|
+
className: cn("size-4 animate-spin", className),
|
|
16
|
+
...props
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
export { Spinner };
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { Switch as SwitchPrimitive } from "radix-ui";
|
|
3
|
+
declare function Switch({ className, size, ...props }: React.ComponentProps<typeof SwitchPrimitive.Root> & {
|
|
4
|
+
size?: "sm" | "default";
|
|
5
|
+
}): React.JSX.Element;
|
|
6
|
+
export { Switch };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import "react";
|
|
3
|
+
import { cn } from "cn";
|
|
4
|
+
import { Switch as Switch$1 } from "radix-ui";
|
|
5
|
+
import { jsx } from "react/jsx-runtime";
|
|
6
|
+
// src/components/ui/switch.tsx
|
|
7
|
+
function Switch({ className, size = "default", ...props }) {
|
|
8
|
+
return /* @__PURE__ */ jsx(Switch$1.Root, {
|
|
9
|
+
"data-slot": "switch",
|
|
10
|
+
"data-size": size,
|
|
11
|
+
className: cn("peer group/switch relative inline-flex shrink-0 items-center rounded-2xl border-2 transition-all outline-none group-has-[:focus-visible]/field-label:ring-0 after:absolute after:-inset-x-3 after:-inset-y-2 focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/30 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 data-[size=default]:h-5 data-[size=default]:w-8 data-[size=sm]:h-4 data-[size=sm]:w-6 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 data-checked:border-primary data-checked:bg-primary group-has-[:focus-visible]/field-label:data-checked:border-primary data-unchecked:border-transparent data-unchecked:bg-input/90 group-has-[:focus-visible]/field-label:data-unchecked:border-transparent data-disabled:cursor-not-allowed data-disabled:opacity-50", className),
|
|
12
|
+
...props,
|
|
13
|
+
children: /* @__PURE__ */ jsx(Switch$1.Thumb, {
|
|
14
|
+
"data-slot": "switch-thumb",
|
|
15
|
+
className: "pointer-events-none block rounded-2xl bg-background shadow-sm ring-0 transition-transform not-dark:bg-clip-padding group-data-[size=default]/switch:size-4 group-data-[size=sm]/switch:size-3 data-checked:translate-x-[calc(100%-4px)] dark:data-checked:bg-primary-foreground data-unchecked:translate-x-0 dark:data-unchecked:bg-foreground"
|
|
16
|
+
})
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
export { Switch };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { ComponentProps } from "react";
|
|
2
|
+
declare function Table({ className, containerProps, ...props }: ComponentProps<"table"> & {
|
|
3
|
+
containerProps?: ComponentProps<"div">;
|
|
4
|
+
}): import("react").JSX.Element;
|
|
5
|
+
declare function TableHeader({ className, ...props }: ComponentProps<"thead">): import("react").JSX.Element;
|
|
6
|
+
declare function TableBody({ className, ...props }: ComponentProps<"tbody">): import("react").JSX.Element;
|
|
7
|
+
declare function TableFooter({ className, ...props }: ComponentProps<"tfoot">): import("react").JSX.Element;
|
|
8
|
+
declare function TableRow({ className, ...props }: ComponentProps<"tr">): import("react").JSX.Element;
|
|
9
|
+
declare function TableHead({ className, ...props }: ComponentProps<"th">): import("react").JSX.Element;
|
|
10
|
+
declare function TableCell({ className, ...props }: ComponentProps<"td">): import("react").JSX.Element;
|
|
11
|
+
declare function TableCaption({ className, ...props }: ComponentProps<"caption">): import("react").JSX.Element;
|
|
12
|
+
export { Table, TableHeader, TableFooter, TableBody, TableRow, TableHead, TableCell, TableCaption, };
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { cn } from "cn";
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
// src/components/ui/table.tsx
|
|
4
|
+
function Table({ className, containerProps, ...props }) {
|
|
5
|
+
const { className: containerClassName, ...containerAttributes } = containerProps ?? {};
|
|
6
|
+
return /* @__PURE__ */ jsx("div", {
|
|
7
|
+
"data-slot": "table-container",
|
|
8
|
+
className: cn("relative w-full overflow-x-auto", containerClassName),
|
|
9
|
+
...containerAttributes,
|
|
10
|
+
children: /* @__PURE__ */ jsx("table", {
|
|
11
|
+
"data-slot": "table",
|
|
12
|
+
className: cn("w-full caption-bottom text-sm", className),
|
|
13
|
+
...props
|
|
14
|
+
})
|
|
15
|
+
});
|
|
16
|
+
}
|
|
17
|
+
function TableHeader({ className, ...props }) {
|
|
18
|
+
return /* @__PURE__ */ jsx("thead", {
|
|
19
|
+
"data-slot": "table-header",
|
|
20
|
+
className: cn("[&_tr]:border-b", className),
|
|
21
|
+
...props
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
function TableBody({ className, ...props }) {
|
|
25
|
+
return /* @__PURE__ */ jsx("tbody", {
|
|
26
|
+
"data-slot": "table-body",
|
|
27
|
+
className: cn("[&_tr:last-child]:border-0", className),
|
|
28
|
+
...props
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
function TableFooter({ className, ...props }) {
|
|
32
|
+
return /* @__PURE__ */ jsx("tfoot", {
|
|
33
|
+
"data-slot": "table-footer",
|
|
34
|
+
className: cn("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0", className),
|
|
35
|
+
...props
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
function TableRow({ className, ...props }) {
|
|
39
|
+
return /* @__PURE__ */ jsx("tr", {
|
|
40
|
+
"data-slot": "table-row",
|
|
41
|
+
className: cn("border-b transition-colors hover:bg-muted/50 has-aria-expanded:bg-muted/50 data-[state=selected]:bg-muted", className),
|
|
42
|
+
...props
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
function TableHead({ className, ...props }) {
|
|
46
|
+
return /* @__PURE__ */ jsx("th", {
|
|
47
|
+
"data-slot": "table-head",
|
|
48
|
+
className: cn("h-10 px-2 text-left align-middle font-medium whitespace-nowrap text-foreground [&:has([role=checkbox])]:pr-0", className),
|
|
49
|
+
...props
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
function TableCell({ className, ...props }) {
|
|
53
|
+
return /* @__PURE__ */ jsx("td", {
|
|
54
|
+
"data-slot": "table-cell",
|
|
55
|
+
className: cn("p-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0", className),
|
|
56
|
+
...props
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
function TableCaption({ className, ...props }) {
|
|
60
|
+
return /* @__PURE__ */ jsx("caption", {
|
|
61
|
+
"data-slot": "table-caption",
|
|
62
|
+
className: cn("mt-4 text-sm text-muted-foreground", className),
|
|
63
|
+
...props
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
export { Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow };
|