@marismoon/ui 0.0.0-stage → 0.1.0-next.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/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,29 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { DropdownMenu as DropdownMenuPrimitive } from "radix-ui";
|
|
3
|
+
declare function DropdownMenu({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Root>): React.JSX.Element;
|
|
4
|
+
declare function DropdownMenuPortal({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Portal>): React.JSX.Element;
|
|
5
|
+
declare function DropdownMenuTrigger({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Trigger>): React.JSX.Element;
|
|
6
|
+
declare function DropdownMenuContent({ className, align, sideOffset, ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Content>): React.JSX.Element;
|
|
7
|
+
declare function DropdownMenuGroup({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Group>): React.JSX.Element;
|
|
8
|
+
declare function DropdownMenuItem({ className, inset, variant, ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Item> & {
|
|
9
|
+
inset?: boolean;
|
|
10
|
+
variant?: "default" | "destructive";
|
|
11
|
+
}): React.JSX.Element;
|
|
12
|
+
declare function DropdownMenuCheckboxItem({ className, children, checked, inset, ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.CheckboxItem> & {
|
|
13
|
+
inset?: boolean;
|
|
14
|
+
}): React.JSX.Element;
|
|
15
|
+
declare function DropdownMenuRadioGroup({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.RadioGroup>): React.JSX.Element;
|
|
16
|
+
declare function DropdownMenuRadioItem({ className, children, inset, ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.RadioItem> & {
|
|
17
|
+
inset?: boolean;
|
|
18
|
+
}): React.JSX.Element;
|
|
19
|
+
declare function DropdownMenuLabel({ className, inset, ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Label> & {
|
|
20
|
+
inset?: boolean;
|
|
21
|
+
}): React.JSX.Element;
|
|
22
|
+
declare function DropdownMenuSeparator({ className, ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Separator>): React.JSX.Element;
|
|
23
|
+
declare function DropdownMenuShortcut({ className, ...props }: React.ComponentProps<"span">): React.JSX.Element;
|
|
24
|
+
declare function DropdownMenuSub({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Sub>): React.JSX.Element;
|
|
25
|
+
declare function DropdownMenuSubTrigger({ className, inset, children, ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.SubTrigger> & {
|
|
26
|
+
inset?: boolean;
|
|
27
|
+
}): React.JSX.Element;
|
|
28
|
+
declare function DropdownMenuSubContent({ className, ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.SubContent>): React.JSX.Element;
|
|
29
|
+
export { DropdownMenu, DropdownMenuPortal, DropdownMenuTrigger, DropdownMenuContent, DropdownMenuGroup, DropdownMenuLabel, DropdownMenuItem, DropdownMenuCheckboxItem, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubTrigger, DropdownMenuSubContent, };
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
import { AppIcon } from "../icons/app-icon.js";
|
|
2
|
+
import { CheckCircleLinearIcon } from "../icons/solar/check-circle-linear.js";
|
|
3
|
+
import { AltArrowRightLinearIcon } from "../icons/solar/alt-arrow-right-linear.js";
|
|
4
|
+
import "react";
|
|
5
|
+
import { cn } from "cn";
|
|
6
|
+
import { DropdownMenu as DropdownMenu$1 } from "radix-ui";
|
|
7
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
8
|
+
// src/components/ui/dropdown-menu.tsx
|
|
9
|
+
function DropdownMenu({ ...props }) {
|
|
10
|
+
return /* @__PURE__ */ jsx(DropdownMenu$1.Root, {
|
|
11
|
+
"data-slot": "dropdown-menu",
|
|
12
|
+
...props
|
|
13
|
+
});
|
|
14
|
+
}
|
|
15
|
+
function DropdownMenuPortal({ ...props }) {
|
|
16
|
+
return /* @__PURE__ */ jsx(DropdownMenu$1.Portal, {
|
|
17
|
+
"data-slot": "dropdown-menu-portal",
|
|
18
|
+
...props
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
function DropdownMenuTrigger({ ...props }) {
|
|
22
|
+
return /* @__PURE__ */ jsx(DropdownMenu$1.Trigger, {
|
|
23
|
+
"data-slot": "dropdown-menu-trigger",
|
|
24
|
+
...props
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
function DropdownMenuContent({ className, align = "start", sideOffset = 4, ...props }) {
|
|
28
|
+
return /* @__PURE__ */ jsx(DropdownMenu$1.Portal, { children: /* @__PURE__ */ jsx(DropdownMenu$1.Content, {
|
|
29
|
+
"data-slot": "dropdown-menu-content",
|
|
30
|
+
sideOffset,
|
|
31
|
+
align,
|
|
32
|
+
className: cn("z-50 max-h-(--radix-dropdown-menu-content-available-height) w-(--radix-dropdown-menu-trigger-width) min-w-32 origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-2xl bg-popover p-1 text-popover-foreground shadow-lg ring-1 ring-foreground/5 duration-150 ease-(--ease-feedback) data-[side=bottom]:slide-in-from-top-1 data-[side=left]:slide-in-from-right-1 data-[side=right]:slide-in-from-left-1 data-[side=top]:slide-in-from-bottom-1 data-[state=closed]:overflow-hidden dark:ring-foreground/10 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-98 data-closed:animate-out data-closed:duration-100 data-closed:fade-out-0 data-closed:zoom-out-98", className),
|
|
33
|
+
...props
|
|
34
|
+
}) });
|
|
35
|
+
}
|
|
36
|
+
function DropdownMenuGroup({ ...props }) {
|
|
37
|
+
return /* @__PURE__ */ jsx(DropdownMenu$1.Group, {
|
|
38
|
+
"data-slot": "dropdown-menu-group",
|
|
39
|
+
...props
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
function DropdownMenuItem({ className, inset, variant = "default", ...props }) {
|
|
43
|
+
return /* @__PURE__ */ jsx(DropdownMenu$1.Item, {
|
|
44
|
+
"data-slot": "dropdown-menu-item",
|
|
45
|
+
"data-inset": inset,
|
|
46
|
+
"data-variant": variant,
|
|
47
|
+
className: cn("group/dropdown-menu-item relative flex min-h-7 cursor-default items-center gap-2 rounded-xl px-2 py-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-inset:pl-7 data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive dark:data-[variant=destructive]:focus:bg-destructive/20 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 data-[variant=destructive]:*:[svg]:text-destructive", className),
|
|
48
|
+
...props
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
function DropdownMenuCheckboxItem({ className, children, checked, inset, ...props }) {
|
|
52
|
+
return /* @__PURE__ */ jsxs(DropdownMenu$1.CheckboxItem, {
|
|
53
|
+
"data-slot": "dropdown-menu-checkbox-item",
|
|
54
|
+
"data-inset": inset,
|
|
55
|
+
className: cn("relative flex min-h-7 cursor-default items-center gap-2 rounded-xl py-1.5 pr-8 pl-2 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground focus:**:text-accent-foreground data-inset:pl-7 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0", className),
|
|
56
|
+
checked,
|
|
57
|
+
...props,
|
|
58
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
59
|
+
className: "pointer-events-none absolute right-2 flex items-center justify-center",
|
|
60
|
+
"data-slot": "dropdown-menu-checkbox-item-indicator",
|
|
61
|
+
children: /* @__PURE__ */ jsx(DropdownMenu$1.ItemIndicator, { children: /* @__PURE__ */ jsx(AppIcon, {
|
|
62
|
+
icon: CheckCircleLinearIcon,
|
|
63
|
+
size: 16,
|
|
64
|
+
"aria-hidden": "true"
|
|
65
|
+
}) })
|
|
66
|
+
}), children]
|
|
67
|
+
});
|
|
68
|
+
}
|
|
69
|
+
function DropdownMenuRadioGroup({ ...props }) {
|
|
70
|
+
return /* @__PURE__ */ jsx(DropdownMenu$1.RadioGroup, {
|
|
71
|
+
"data-slot": "dropdown-menu-radio-group",
|
|
72
|
+
...props
|
|
73
|
+
});
|
|
74
|
+
}
|
|
75
|
+
function DropdownMenuRadioItem({ className, children, inset, ...props }) {
|
|
76
|
+
return /* @__PURE__ */ jsxs(DropdownMenu$1.RadioItem, {
|
|
77
|
+
"data-slot": "dropdown-menu-radio-item",
|
|
78
|
+
"data-inset": inset,
|
|
79
|
+
className: cn("relative flex min-h-7 cursor-default items-center gap-2 rounded-xl py-1.5 pr-8 pl-2 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground focus:**:text-accent-foreground data-inset:pl-7 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0", className),
|
|
80
|
+
...props,
|
|
81
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
82
|
+
className: "pointer-events-none absolute right-2 flex items-center justify-center",
|
|
83
|
+
"data-slot": "dropdown-menu-radio-item-indicator",
|
|
84
|
+
children: /* @__PURE__ */ jsx(DropdownMenu$1.ItemIndicator, { children: /* @__PURE__ */ jsx(AppIcon, {
|
|
85
|
+
icon: CheckCircleLinearIcon,
|
|
86
|
+
size: 16,
|
|
87
|
+
"aria-hidden": "true"
|
|
88
|
+
}) })
|
|
89
|
+
}), children]
|
|
90
|
+
});
|
|
91
|
+
}
|
|
92
|
+
function DropdownMenuLabel({ className, inset, ...props }) {
|
|
93
|
+
return /* @__PURE__ */ jsx(DropdownMenu$1.Label, {
|
|
94
|
+
"data-slot": "dropdown-menu-label",
|
|
95
|
+
"data-inset": inset,
|
|
96
|
+
className: cn("px-2 py-1 text-xs text-muted-foreground data-inset:pl-7", className),
|
|
97
|
+
...props
|
|
98
|
+
});
|
|
99
|
+
}
|
|
100
|
+
function DropdownMenuSeparator({ className, ...props }) {
|
|
101
|
+
return /* @__PURE__ */ jsx(DropdownMenu$1.Separator, {
|
|
102
|
+
"data-slot": "dropdown-menu-separator",
|
|
103
|
+
className: cn("-mx-1 my-1 h-px bg-border/50", className),
|
|
104
|
+
...props
|
|
105
|
+
});
|
|
106
|
+
}
|
|
107
|
+
function DropdownMenuShortcut({ className, ...props }) {
|
|
108
|
+
return /* @__PURE__ */ jsx("span", {
|
|
109
|
+
"data-slot": "dropdown-menu-shortcut",
|
|
110
|
+
className: cn("ml-auto text-xs tracking-widest text-muted-foreground group-focus/dropdown-menu-item:text-accent-foreground", className),
|
|
111
|
+
...props
|
|
112
|
+
});
|
|
113
|
+
}
|
|
114
|
+
function DropdownMenuSub({ ...props }) {
|
|
115
|
+
return /* @__PURE__ */ jsx(DropdownMenu$1.Sub, {
|
|
116
|
+
"data-slot": "dropdown-menu-sub",
|
|
117
|
+
...props
|
|
118
|
+
});
|
|
119
|
+
}
|
|
120
|
+
function DropdownMenuSubTrigger({ className, inset, children, ...props }) {
|
|
121
|
+
return /* @__PURE__ */ jsxs(DropdownMenu$1.SubTrigger, {
|
|
122
|
+
"data-slot": "dropdown-menu-sub-trigger",
|
|
123
|
+
"data-inset": inset,
|
|
124
|
+
className: cn("flex min-h-7 cursor-default items-center gap-2 rounded-xl px-2 py-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-inset:pl-7 data-open:bg-accent data-open:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0", className),
|
|
125
|
+
...props,
|
|
126
|
+
children: [children, /* @__PURE__ */ jsx(AppIcon, {
|
|
127
|
+
icon: AltArrowRightLinearIcon,
|
|
128
|
+
size: 16,
|
|
129
|
+
"aria-hidden": "true",
|
|
130
|
+
className: "ml-auto"
|
|
131
|
+
})]
|
|
132
|
+
});
|
|
133
|
+
}
|
|
134
|
+
function DropdownMenuSubContent({ className, ...props }) {
|
|
135
|
+
return /* @__PURE__ */ jsx(DropdownMenu$1.SubContent, {
|
|
136
|
+
"data-slot": "dropdown-menu-sub-content",
|
|
137
|
+
className: cn("z-50 min-w-[96px] origin-(--radix-dropdown-menu-content-transform-origin) overflow-hidden rounded-2xl bg-popover p-1 text-popover-foreground shadow-lg ring-1 ring-foreground/5 duration-150 ease-(--ease-feedback) data-[side=bottom]:slide-in-from-top-1 data-[side=left]:slide-in-from-right-1 data-[side=right]:slide-in-from-left-1 data-[side=top]:slide-in-from-bottom-1 dark:ring-foreground/10 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-98 data-closed:animate-out data-closed:duration-100 data-closed:fade-out-0 data-closed:zoom-out-98", className),
|
|
138
|
+
...props
|
|
139
|
+
});
|
|
140
|
+
}
|
|
141
|
+
export { DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { type VariantProps } from "class-variance-authority";
|
|
2
|
+
declare function Empty({ className, ...props }: React.ComponentProps<"div">): import("react").JSX.Element;
|
|
3
|
+
declare function EmptyHeader({ className, ...props }: React.ComponentProps<"div">): import("react").JSX.Element;
|
|
4
|
+
declare const emptyMediaVariants: (props?: ({
|
|
5
|
+
variant?: "icon" | "default" | null | undefined;
|
|
6
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
7
|
+
declare function EmptyMedia({ className, variant, ...props }: React.ComponentProps<"div"> & VariantProps<typeof emptyMediaVariants>): import("react").JSX.Element;
|
|
8
|
+
declare function EmptyTitle({ className, ...props }: React.ComponentProps<"div">): import("react").JSX.Element;
|
|
9
|
+
declare function EmptyDescription({ className, ...props }: React.ComponentProps<"p">): import("react").JSX.Element;
|
|
10
|
+
declare function EmptyContent({ className, ...props }: React.ComponentProps<"div">): import("react").JSX.Element;
|
|
11
|
+
export { Empty, EmptyHeader, EmptyTitle, EmptyDescription, EmptyContent, EmptyMedia, };
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { cn } from "cn";
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
import { cva } from "class-variance-authority";
|
|
4
|
+
// src/components/ui/empty.tsx
|
|
5
|
+
function Empty({ className, ...props }) {
|
|
6
|
+
return /* @__PURE__ */ jsx("div", {
|
|
7
|
+
"data-slot": "empty",
|
|
8
|
+
className: cn("flex w-full min-w-0 flex-1 flex-col items-center justify-center gap-4 rounded-3xl border-dashed p-12 text-center text-balance", className),
|
|
9
|
+
...props
|
|
10
|
+
});
|
|
11
|
+
}
|
|
12
|
+
function EmptyHeader({ className, ...props }) {
|
|
13
|
+
return /* @__PURE__ */ jsx("div", {
|
|
14
|
+
"data-slot": "empty-header",
|
|
15
|
+
className: cn("flex max-w-sm flex-col items-center gap-2", className),
|
|
16
|
+
...props
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
var emptyMediaVariants = cva("mb-2 flex shrink-0 items-center justify-center [&_svg]:pointer-events-none [&_svg]:shrink-0", {
|
|
20
|
+
variants: { variant: {
|
|
21
|
+
default: "bg-transparent",
|
|
22
|
+
icon: "flex size-10 shrink-0 items-center justify-center rounded-xl bg-muted text-foreground [&_svg:not([class*='size-'])]:size-5"
|
|
23
|
+
} },
|
|
24
|
+
defaultVariants: { variant: "default" }
|
|
25
|
+
});
|
|
26
|
+
function EmptyMedia({ className, variant = "default", ...props }) {
|
|
27
|
+
return /* @__PURE__ */ jsx("div", {
|
|
28
|
+
"data-slot": "empty-icon",
|
|
29
|
+
"data-variant": variant,
|
|
30
|
+
className: cn(emptyMediaVariants({
|
|
31
|
+
variant,
|
|
32
|
+
className
|
|
33
|
+
})),
|
|
34
|
+
...props
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
function EmptyTitle({ className, ...props }) {
|
|
38
|
+
return /* @__PURE__ */ jsx("div", {
|
|
39
|
+
"data-slot": "empty-title",
|
|
40
|
+
className: cn("font-heading text-lg font-medium tracking-tight", className),
|
|
41
|
+
...props
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
function EmptyDescription({ className, ...props }) {
|
|
45
|
+
return /* @__PURE__ */ jsx("div", {
|
|
46
|
+
"data-slot": "empty-description",
|
|
47
|
+
className: cn("text-sm/relaxed text-muted-foreground [&>a]:underline [&>a]:underline-offset-4 [&>a:hover]:text-primary", className),
|
|
48
|
+
...props
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
function EmptyContent({ className, ...props }) {
|
|
52
|
+
return /* @__PURE__ */ jsx("div", {
|
|
53
|
+
"data-slot": "empty-content",
|
|
54
|
+
className: cn("flex w-full max-w-sm min-w-0 flex-col items-center gap-4 text-sm text-balance", className),
|
|
55
|
+
...props
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
export { Empty, EmptyContent, EmptyDescription, EmptyHeader, EmptyMedia, EmptyTitle };
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { type VariantProps } from "class-variance-authority";
|
|
2
|
+
import { Label } from "./label.js";
|
|
3
|
+
declare function FieldSet({ className, ...props }: React.ComponentProps<"fieldset">): import("react").JSX.Element;
|
|
4
|
+
declare function FieldLegend({ className, variant, ...props }: React.ComponentProps<"legend"> & {
|
|
5
|
+
variant?: "legend" | "label";
|
|
6
|
+
}): import("react").JSX.Element;
|
|
7
|
+
declare function FieldGroup({ className, ...props }: React.ComponentProps<"div">): import("react").JSX.Element;
|
|
8
|
+
declare const fieldVariants: (props?: ({
|
|
9
|
+
orientation?: "horizontal" | "vertical" | "responsive" | null | undefined;
|
|
10
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
11
|
+
declare function Field({ className, orientation, ...props }: React.ComponentProps<"div"> & VariantProps<typeof fieldVariants>): import("react").JSX.Element;
|
|
12
|
+
declare function FieldContent({ className, ...props }: React.ComponentProps<"div">): import("react").JSX.Element;
|
|
13
|
+
declare function FieldLabel({ className, ...props }: React.ComponentProps<typeof Label>): import("react").JSX.Element;
|
|
14
|
+
declare function FieldTitle({ className, ...props }: React.ComponentProps<"div">): import("react").JSX.Element;
|
|
15
|
+
declare function FieldDescription({ className, ...props }: React.ComponentProps<"p">): import("react").JSX.Element;
|
|
16
|
+
declare function FieldSeparator({ children, className, ...props }: React.ComponentProps<"div"> & {
|
|
17
|
+
children?: React.ReactNode;
|
|
18
|
+
}): import("react").JSX.Element;
|
|
19
|
+
declare function FieldError({ className, children, errors, ...props }: React.ComponentProps<"div"> & {
|
|
20
|
+
errors?: Array<{
|
|
21
|
+
message?: string;
|
|
22
|
+
} | undefined>;
|
|
23
|
+
}): import("react").JSX.Element | null;
|
|
24
|
+
export { Field, FieldLabel, FieldDescription, FieldError, FieldGroup, FieldLegend, FieldSeparator, FieldSet, FieldContent, FieldTitle, };
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { Label } from "./label.js";
|
|
3
|
+
import { Separator } from "./separator.js";
|
|
4
|
+
import { useMemo } from "react";
|
|
5
|
+
import { cn } from "cn";
|
|
6
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
7
|
+
import { cva } from "class-variance-authority";
|
|
8
|
+
// src/components/ui/field.tsx
|
|
9
|
+
function FieldSet({ className, ...props }) {
|
|
10
|
+
return /* @__PURE__ */ jsx("fieldset", {
|
|
11
|
+
"data-slot": "field-set",
|
|
12
|
+
className: cn("flex flex-col gap-6 has-[>[data-slot=checkbox-group]]:gap-3 has-[>[data-slot=radio-group]]:gap-3", className),
|
|
13
|
+
...props
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
function FieldLegend({ className, variant = "legend", ...props }) {
|
|
17
|
+
return /* @__PURE__ */ jsx("legend", {
|
|
18
|
+
"data-slot": "field-legend",
|
|
19
|
+
"data-variant": variant,
|
|
20
|
+
className: cn("mb-3 font-medium data-[variant=label]:text-sm data-[variant=legend]:text-base", className),
|
|
21
|
+
...props
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
function FieldGroup({ className, ...props }) {
|
|
25
|
+
return /* @__PURE__ */ jsx("div", {
|
|
26
|
+
"data-slot": "field-group",
|
|
27
|
+
className: cn("group/field-group @container/field-group flex w-full flex-col gap-6 data-[slot=checkbox-group]:gap-3 *:data-[slot=field-group]:gap-4", className),
|
|
28
|
+
...props
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
var fieldVariants = cva("group/field flex w-full gap-3 data-[invalid=true]:text-destructive", {
|
|
32
|
+
variants: { orientation: {
|
|
33
|
+
vertical: "flex-col *:w-full [&>.sr-only]:w-auto",
|
|
34
|
+
horizontal: "flex-row items-center has-[>[data-slot=field-content]]:items-start *:data-[slot=field-label]:flex-auto has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px",
|
|
35
|
+
responsive: "flex-col *:w-full @md/field-group:flex-row @md/field-group:items-center @md/field-group:*:w-auto @md/field-group:has-[>[data-slot=field-content]]:items-start @md/field-group:*:data-[slot=field-label]:flex-auto [&>.sr-only]:w-auto @md/field-group:has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px"
|
|
36
|
+
} },
|
|
37
|
+
defaultVariants: { orientation: "vertical" }
|
|
38
|
+
});
|
|
39
|
+
function Field({ className, orientation = "vertical", ...props }) {
|
|
40
|
+
return /* @__PURE__ */ jsx("div", {
|
|
41
|
+
role: "group",
|
|
42
|
+
"data-slot": "field",
|
|
43
|
+
"data-orientation": orientation,
|
|
44
|
+
className: cn(fieldVariants({ orientation }), className),
|
|
45
|
+
...props
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
function FieldContent({ className, ...props }) {
|
|
49
|
+
return /* @__PURE__ */ jsx("div", {
|
|
50
|
+
"data-slot": "field-content",
|
|
51
|
+
className: cn("group/field-content flex flex-1 flex-col gap-1 leading-snug", className),
|
|
52
|
+
...props
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
function FieldLabel({ className, ...props }) {
|
|
56
|
+
return /* @__PURE__ */ jsx(Label, {
|
|
57
|
+
"data-slot": "field-label",
|
|
58
|
+
className: cn("group/field-label peer/field-label flex w-fit gap-2 leading-snug group-data-[disabled=true]/field:opacity-50 has-data-checked:bg-input/30 has-[>[data-slot=field]]:rounded-2xl has-[>[data-slot=field]]:border has-[>[data-slot=field]]:not-has-[:disabled,[data-disabled]]:hover:bg-input/40 has-[>[data-slot=field]]:has-[:focus-visible]:border-ring has-[>[data-slot=field]]:has-[:focus-visible]:ring-3 has-[>[data-slot=field]]:has-[:focus-visible]:ring-ring/50 *:data-[slot=field]:p-4", "has-[>[data-slot=field]]:w-full has-[>[data-slot=field]]:flex-col", className),
|
|
59
|
+
...props
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
function FieldTitle({ className, ...props }) {
|
|
63
|
+
return /* @__PURE__ */ jsx("div", {
|
|
64
|
+
"data-slot": "field-label",
|
|
65
|
+
className: cn("flex w-fit items-center gap-2 text-sm font-medium group-data-[disabled=true]/field:opacity-50", className),
|
|
66
|
+
...props
|
|
67
|
+
});
|
|
68
|
+
}
|
|
69
|
+
function FieldDescription({ className, ...props }) {
|
|
70
|
+
return /* @__PURE__ */ jsx("p", {
|
|
71
|
+
"data-slot": "field-description",
|
|
72
|
+
className: cn("text-left text-sm leading-normal font-normal text-muted-foreground group-has-data-horizontal/field:text-balance [[data-variant=legend]+&]:-mt-1.5", "last:mt-0 nth-last-2:-mt-1", "[&>a]:underline [&>a]:underline-offset-4 [&>a:hover]:text-primary", className),
|
|
73
|
+
...props
|
|
74
|
+
});
|
|
75
|
+
}
|
|
76
|
+
function FieldSeparator({ children, className, ...props }) {
|
|
77
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
78
|
+
"data-slot": "field-separator",
|
|
79
|
+
"data-content": !!children,
|
|
80
|
+
className: cn("relative -my-2 h-5 text-sm group-data-[variant=outline]/field-group:-mb-2", className),
|
|
81
|
+
...props,
|
|
82
|
+
children: [/* @__PURE__ */ jsx(Separator, { className: "absolute inset-0 top-1/2" }), children && /* @__PURE__ */ jsx("span", {
|
|
83
|
+
className: "relative mx-auto block w-fit bg-background px-2 text-muted-foreground",
|
|
84
|
+
"data-slot": "field-separator-content",
|
|
85
|
+
children
|
|
86
|
+
})]
|
|
87
|
+
});
|
|
88
|
+
}
|
|
89
|
+
function FieldError({ className, children, errors, ...props }) {
|
|
90
|
+
const content = useMemo(() => {
|
|
91
|
+
if (children) return children;
|
|
92
|
+
if (!errors?.length) return null;
|
|
93
|
+
const uniqueErrors = [...new Map(errors.map((error) => [error?.message, error])).values()];
|
|
94
|
+
if (uniqueErrors?.length == 1) return uniqueErrors[0]?.message;
|
|
95
|
+
return /* @__PURE__ */ jsx("ul", {
|
|
96
|
+
className: "ml-4 flex list-disc flex-col gap-1",
|
|
97
|
+
children: uniqueErrors.map((error, index) => error?.message && /* @__PURE__ */ jsx("li", { children: error.message }, index))
|
|
98
|
+
});
|
|
99
|
+
}, [children, errors]);
|
|
100
|
+
if (!content) return null;
|
|
101
|
+
return /* @__PURE__ */ jsx("div", {
|
|
102
|
+
role: "alert",
|
|
103
|
+
"data-slot": "field-error",
|
|
104
|
+
className: cn("text-sm font-normal text-destructive", className),
|
|
105
|
+
...props,
|
|
106
|
+
children: content
|
|
107
|
+
});
|
|
108
|
+
}
|
|
109
|
+
export { Field, FieldContent, FieldDescription, FieldError, FieldGroup, FieldLabel, FieldLegend, FieldSeparator, FieldSet, FieldTitle };
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { HoverCard as HoverCardPrimitive } from "radix-ui";
|
|
3
|
+
declare function HoverCard({ ...props }: React.ComponentProps<typeof HoverCardPrimitive.Root>): React.JSX.Element;
|
|
4
|
+
declare function HoverCardTrigger({ ...props }: React.ComponentProps<typeof HoverCardPrimitive.Trigger>): React.JSX.Element;
|
|
5
|
+
declare function HoverCardContent({ className, align, sideOffset, ...props }: React.ComponentProps<typeof HoverCardPrimitive.Content>): React.JSX.Element;
|
|
6
|
+
export { HoverCard, HoverCardTrigger, HoverCardContent };
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import "react";
|
|
2
|
+
import { cn } from "cn";
|
|
3
|
+
import { HoverCard as HoverCard$1 } from "radix-ui";
|
|
4
|
+
import { jsx } from "react/jsx-runtime";
|
|
5
|
+
// src/components/ui/hover-card.tsx
|
|
6
|
+
function HoverCard({ ...props }) {
|
|
7
|
+
return /* @__PURE__ */ jsx(HoverCard$1.Root, {
|
|
8
|
+
"data-slot": "hover-card",
|
|
9
|
+
...props
|
|
10
|
+
});
|
|
11
|
+
}
|
|
12
|
+
function HoverCardTrigger({ ...props }) {
|
|
13
|
+
return /* @__PURE__ */ jsx(HoverCard$1.Trigger, {
|
|
14
|
+
"data-slot": "hover-card-trigger",
|
|
15
|
+
...props
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
function HoverCardContent({ className, align = "center", sideOffset = 4, ...props }) {
|
|
19
|
+
return /* @__PURE__ */ jsx(HoverCard$1.Portal, {
|
|
20
|
+
"data-slot": "hover-card-portal",
|
|
21
|
+
children: /* @__PURE__ */ jsx(HoverCard$1.Content, {
|
|
22
|
+
"data-slot": "hover-card-content",
|
|
23
|
+
align,
|
|
24
|
+
sideOffset,
|
|
25
|
+
className: cn("z-50 w-72 origin-(--radix-hover-card-content-transform-origin) rounded-3xl bg-popover p-4 text-sm text-popover-foreground shadow-lg ring-1 ring-foreground/5 outline-hidden duration-100 data-[side=bottom]:slide-in-from-top-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 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),
|
|
26
|
+
...props
|
|
27
|
+
})
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
export { HoverCard, HoverCardContent, HoverCardTrigger };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { type VariantProps } from "class-variance-authority";
|
|
3
|
+
import { Button } from "./button.js";
|
|
4
|
+
declare function InputGroup({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
5
|
+
declare const inputGroupAddonVariants: (props?: ({
|
|
6
|
+
align?: "inline-start" | "inline-end" | "block-end" | "block-start" | null | undefined;
|
|
7
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
8
|
+
declare function InputGroupAddon({ className, align, ...props }: React.ComponentProps<"div"> & VariantProps<typeof inputGroupAddonVariants>): React.JSX.Element;
|
|
9
|
+
declare const inputGroupButtonVariants: (props?: ({
|
|
10
|
+
size?: "xs" | "sm" | "icon-xs" | "icon-sm" | null | undefined;
|
|
11
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
12
|
+
declare function InputGroupButton({ className, type, variant, size, ...props }: Omit<React.ComponentProps<typeof Button>, "size"> & VariantProps<typeof inputGroupButtonVariants>): React.JSX.Element;
|
|
13
|
+
declare function InputGroupText({ className, ...props }: React.ComponentProps<"span">): React.JSX.Element;
|
|
14
|
+
declare function InputGroupInput({ className, ...props }: React.ComponentProps<"input">): React.JSX.Element;
|
|
15
|
+
declare function InputGroupTextarea({ className, ...props }: React.ComponentProps<"textarea">): React.JSX.Element;
|
|
16
|
+
export { InputGroup, InputGroupAddon, InputGroupButton, InputGroupText, InputGroupInput, InputGroupTextarea, };
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import { Button } from "./button.js";
|
|
2
|
+
import { Input } from "./input.js";
|
|
3
|
+
import { Textarea } from "./textarea.js";
|
|
4
|
+
import "react";
|
|
5
|
+
import { cn } from "cn";
|
|
6
|
+
import { jsx } from "react/jsx-runtime";
|
|
7
|
+
import { cva } from "class-variance-authority";
|
|
8
|
+
// src/components/ui/input-group.tsx
|
|
9
|
+
function InputGroup({ className, ...props }) {
|
|
10
|
+
return /* @__PURE__ */ jsx("div", {
|
|
11
|
+
"data-slot": "input-group",
|
|
12
|
+
role: "group",
|
|
13
|
+
className: cn("group/input-group relative flex h-8 w-full min-w-0 items-center rounded-2xl border border-transparent bg-(--field-surface) shadow-(--field-shadow) transition-[color,box-shadow] duration-200 outline-none in-data-[slot=combobox-content]:focus-within:border-inherit in-data-[slot=combobox-content]:focus-within:ring-0 has-[[data-slot=input-group-control]:focus-visible]:border-ring has-[[data-slot=input-group-control]:focus-visible]:ring-3 has-[[data-slot=input-group-control]:focus-visible]:ring-ring/30 has-[[data-slot][aria-invalid=true]]:border-destructive has-[[data-slot][aria-invalid=true]]:ring-3 has-[[data-slot][aria-invalid=true]]:ring-destructive/20 has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>textarea]:h-auto dark:has-[[data-slot][aria-invalid=true]]:ring-destructive/40 has-[>[data-align=block-end]]:[&>input]:pt-3 has-[>[data-align=block-start]]:[&>input]:pb-3 has-[>[data-align=inline-end]]:[&>input]:pr-1.5 has-[>[data-align=inline-start]]:[&>input]:pl-1.5", className),
|
|
14
|
+
...props
|
|
15
|
+
});
|
|
16
|
+
}
|
|
17
|
+
var inputGroupAddonVariants = cva("flex h-auto cursor-text items-center justify-center gap-2 py-1.5 text-sm font-medium text-muted-foreground select-none group-data-[disabled=true]/input-group:opacity-50 **:data-[slot=kbd]:rounded-2xl **:data-[slot=kbd]:bg-muted-foreground/10 **:data-[slot=kbd]:px-1.5 [&>svg:not([class*='size-'])]:size-4", {
|
|
18
|
+
variants: { align: {
|
|
19
|
+
"inline-start": "order-first pl-2 has-[>button]:ml-[-0.3rem] has-[>kbd]:ml-[-0.15rem]",
|
|
20
|
+
"inline-end": "order-last pr-2 has-[>button]:mr-[-0.3rem] has-[>kbd]:mr-[-0.15rem]",
|
|
21
|
+
"block-start": "order-first w-full justify-start px-2.5 pt-2 group-has-[>input]/input-group:pt-2 [.border-b]:pb-2",
|
|
22
|
+
"block-end": "order-last w-full justify-start px-2.5 pb-2 group-has-[>input]/input-group:pb-2 [.border-t]:pt-2"
|
|
23
|
+
} },
|
|
24
|
+
defaultVariants: { align: "inline-start" }
|
|
25
|
+
});
|
|
26
|
+
function InputGroupAddon({ className, align = "inline-start", ...props }) {
|
|
27
|
+
return /* @__PURE__ */ jsx("div", {
|
|
28
|
+
role: "group",
|
|
29
|
+
"data-slot": "input-group-addon",
|
|
30
|
+
"data-align": align,
|
|
31
|
+
className: cn(inputGroupAddonVariants({ align }), className),
|
|
32
|
+
onClick: (e) => {
|
|
33
|
+
if (e.target.closest("button")) return;
|
|
34
|
+
e.currentTarget.parentElement?.querySelector("input")?.focus();
|
|
35
|
+
},
|
|
36
|
+
...props
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
var inputGroupButtonVariants = cva("flex items-center gap-2 rounded-2xl text-sm shadow-none", {
|
|
40
|
+
variants: { size: {
|
|
41
|
+
xs: "h-6 gap-1 rounded-xl px-1.5 [&>svg:not([class*='size-'])]:size-3.5",
|
|
42
|
+
sm: "",
|
|
43
|
+
"icon-xs": "size-6 rounded-xl p-0 has-[>svg]:p-0",
|
|
44
|
+
"icon-sm": "size-8 p-0 has-[>svg]:p-0"
|
|
45
|
+
} },
|
|
46
|
+
defaultVariants: { size: "xs" }
|
|
47
|
+
});
|
|
48
|
+
function InputGroupButton({ className, type = "button", variant = "ghost", size = "xs", ...props }) {
|
|
49
|
+
return /* @__PURE__ */ jsx(Button, {
|
|
50
|
+
type,
|
|
51
|
+
"data-size": size,
|
|
52
|
+
variant,
|
|
53
|
+
className: cn(inputGroupButtonVariants({ size }), className),
|
|
54
|
+
...props
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
function InputGroupText({ className, ...props }) {
|
|
58
|
+
return /* @__PURE__ */ jsx("span", {
|
|
59
|
+
className: cn("flex items-center gap-2 text-sm text-muted-foreground [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4", className),
|
|
60
|
+
...props
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
function InputGroupInput({ className, ...props }) {
|
|
64
|
+
return /* @__PURE__ */ jsx(Input, {
|
|
65
|
+
embedded: true,
|
|
66
|
+
controlSize: "dense",
|
|
67
|
+
"data-slot": "input-group-control",
|
|
68
|
+
className: cn("flex-1 rounded-none border-0 bg-transparent shadow-none ring-0 outline-none focus-visible:ring-0 focus-visible:outline-none aria-invalid:ring-0 dark:bg-transparent", className),
|
|
69
|
+
...props
|
|
70
|
+
});
|
|
71
|
+
}
|
|
72
|
+
function InputGroupTextarea({ className, ...props }) {
|
|
73
|
+
return /* @__PURE__ */ jsx(Textarea, {
|
|
74
|
+
"data-slot": "input-group-control",
|
|
75
|
+
className: cn("flex-1 resize-none rounded-none border-0 bg-transparent py-2 shadow-none ring-0 outline-none focus-visible:ring-0 focus-visible:outline-none aria-invalid:ring-0 dark:bg-transparent", className),
|
|
76
|
+
...props
|
|
77
|
+
});
|
|
78
|
+
}
|
|
79
|
+
export { InputGroup, InputGroupAddon, InputGroupButton, InputGroupInput, InputGroupText, InputGroupTextarea };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { OTPInput } from "input-otp";
|
|
3
|
+
declare function InputOTP({ className, containerClassName, ...props }: React.ComponentProps<typeof OTPInput> & {
|
|
4
|
+
containerClassName?: string;
|
|
5
|
+
}): React.JSX.Element;
|
|
6
|
+
declare function InputOTPGroup({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
7
|
+
declare function InputOTPSlot({ index, className, ...props }: React.ComponentProps<"div"> & {
|
|
8
|
+
index: number;
|
|
9
|
+
}): React.JSX.Element;
|
|
10
|
+
declare function InputOTPSeparator({ ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
11
|
+
export { InputOTP, InputOTPGroup, InputOTPSlot, InputOTPSeparator };
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { IconPlaceholder } from "../icons/icon-placeholder.js";
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
import { cn } from "cn";
|
|
5
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
|
+
import { OTPInput, OTPInputContext } from "input-otp";
|
|
7
|
+
// src/components/ui/input-otp.tsx
|
|
8
|
+
function InputOTP({ className, containerClassName, ...props }) {
|
|
9
|
+
return /* @__PURE__ */ jsx(OTPInput, {
|
|
10
|
+
"data-slot": "input-otp",
|
|
11
|
+
containerClassName: cn("cn-input-otp flex items-center has-disabled:opacity-50", containerClassName),
|
|
12
|
+
spellCheck: false,
|
|
13
|
+
className: cn("disabled:cursor-not-allowed", className),
|
|
14
|
+
...props
|
|
15
|
+
});
|
|
16
|
+
}
|
|
17
|
+
function InputOTPGroup({ className, ...props }) {
|
|
18
|
+
return /* @__PURE__ */ jsx("div", {
|
|
19
|
+
"data-slot": "input-otp-group",
|
|
20
|
+
className: cn("flex items-center gap-1.5 rounded-2xl has-aria-invalid:border-destructive has-aria-invalid:ring-3 has-aria-invalid:ring-destructive/20 dark:has-aria-invalid:ring-destructive/40", className),
|
|
21
|
+
...props
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
function InputOTPSlot({ index, className, ...props }) {
|
|
25
|
+
const { char, hasFakeCaret, isActive } = React.useContext(OTPInputContext)?.slots[index] ?? {};
|
|
26
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
27
|
+
"data-slot": "input-otp-slot",
|
|
28
|
+
"data-active": isActive,
|
|
29
|
+
className: cn("relative flex size-8 items-center justify-center rounded-2xl border border-input bg-(--field-surface) text-sm shadow-(--field-shadow) transition-[color,box-shadow] duration-200 outline-none aria-invalid:border-destructive data-[active=true]:z-10 data-[active=true]:border-ring data-[active=true]:ring-3 data-[active=true]:ring-ring/30 data-[active=true]:aria-invalid:ring-destructive/20 dark:data-[active=true]:aria-invalid:ring-destructive/40", className),
|
|
30
|
+
...props,
|
|
31
|
+
children: [char, hasFakeCaret && /* @__PURE__ */ jsx("div", {
|
|
32
|
+
className: "pointer-events-none absolute inset-0 flex items-center justify-center",
|
|
33
|
+
children: /* @__PURE__ */ jsx("div", { className: "h-4 w-px animate-caret-blink bg-foreground duration-1000" })
|
|
34
|
+
})]
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
function InputOTPSeparator({ ...props }) {
|
|
38
|
+
return /* @__PURE__ */ jsx("div", {
|
|
39
|
+
"data-slot": "input-otp-separator",
|
|
40
|
+
className: "flex items-center [&_svg:not([class*='size-'])]:size-4",
|
|
41
|
+
role: "separator",
|
|
42
|
+
...props,
|
|
43
|
+
children: /* @__PURE__ */ jsx(IconPlaceholder, {
|
|
44
|
+
lucide: "MinusIcon",
|
|
45
|
+
tabler: "IconMinus",
|
|
46
|
+
hugeicons: "MinusSignIcon",
|
|
47
|
+
phosphor: "MinusIcon",
|
|
48
|
+
remixicon: "RiSubtractLine"
|
|
49
|
+
})
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
export { InputOTP, InputOTPGroup, InputOTPSeparator, InputOTPSlot };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
declare const controlSizes: {
|
|
3
|
+
readonly default: "h-(--control-size)";
|
|
4
|
+
readonly dense: "h-(--control-size-dense)";
|
|
5
|
+
readonly compact: "h-(--control-size-compact)";
|
|
6
|
+
};
|
|
7
|
+
declare function Input({ className, type, controlSize, embedded, ...props }: React.ComponentProps<"input"> & {
|
|
8
|
+
controlSize?: keyof typeof controlSizes;
|
|
9
|
+
embedded?: boolean;
|
|
10
|
+
}): React.JSX.Element;
|
|
11
|
+
export { Input };
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import "react";
|
|
2
|
+
import { cn } from "cn";
|
|
3
|
+
import { jsx } from "react/jsx-runtime";
|
|
4
|
+
import "./text-field.css";
|
|
5
|
+
// src/components/ui/input.tsx
|
|
6
|
+
var controlSizes = {
|
|
7
|
+
default: "h-(--control-size)",
|
|
8
|
+
dense: "h-(--control-size-dense)",
|
|
9
|
+
compact: "h-(--control-size-compact)"
|
|
10
|
+
};
|
|
11
|
+
function Input({ className, type, controlSize = "dense", embedded = false, ...props }) {
|
|
12
|
+
return /* @__PURE__ */ jsx("input", {
|
|
13
|
+
type,
|
|
14
|
+
"data-slot": "input",
|
|
15
|
+
"data-embedded": embedded || void 0,
|
|
16
|
+
className: cn("field-control w-full min-w-0 border border-transparent px-3 py-1 text-base file:inline-flex file:h-6 file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground md:text-sm", !embedded && "field-surface", controlSizes[controlSize], className),
|
|
17
|
+
...props
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
export { Input };
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { type VariantProps } from "class-variance-authority";
|
|
3
|
+
import { Separator } from "./separator.js";
|
|
4
|
+
declare function ItemGroup({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
5
|
+
declare function ItemSeparator({ className, ...props }: React.ComponentProps<typeof Separator>): React.JSX.Element;
|
|
6
|
+
declare const itemVariants: (props?: ({
|
|
7
|
+
variant?: "outline" | "default" | "muted" | null | undefined;
|
|
8
|
+
size?: "default" | "xs" | "sm" | null | undefined;
|
|
9
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
10
|
+
declare function Item({ className, variant, size, asChild, ...props }: React.ComponentProps<"div"> & VariantProps<typeof itemVariants> & {
|
|
11
|
+
asChild?: boolean;
|
|
12
|
+
}): React.JSX.Element;
|
|
13
|
+
declare const itemMediaVariants: (props?: ({
|
|
14
|
+
variant?: "icon" | "image" | "default" | null | undefined;
|
|
15
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
16
|
+
declare function ItemMedia({ className, variant, ...props }: React.ComponentProps<"div"> & VariantProps<typeof itemMediaVariants>): React.JSX.Element;
|
|
17
|
+
declare function ItemContent({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
18
|
+
declare function ItemTitle({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
19
|
+
declare function ItemDescription({ className, ...props }: React.ComponentProps<"p">): React.JSX.Element;
|
|
20
|
+
declare function ItemActions({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
21
|
+
declare function ItemHeader({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
22
|
+
declare function ItemFooter({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
23
|
+
export { Item, ItemMedia, ItemContent, ItemActions, ItemGroup, ItemSeparator, ItemTitle, ItemDescription, ItemHeader, ItemFooter, };
|