@mivabyte/ui 26.9.21-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 +380 -0
- package/dist/components/ui/accordion.cjs +76 -0
- package/dist/components/ui/accordion.cjs.map +1 -0
- package/dist/components/ui/accordion.d.cts +7 -0
- package/dist/components/ui/accordion.d.ts +8 -0
- package/dist/components/ui/accordion.d.ts.map +1 -0
- package/dist/components/ui/accordion.js +50 -0
- package/dist/components/ui/accordion.js.map +1 -0
- package/dist/components/ui/alert-dialog.cjs +232 -0
- package/dist/components/ui/alert-dialog.cjs.map +1 -0
- package/dist/components/ui/alert-dialog.d.cts +20 -0
- package/dist/components/ui/alert-dialog.d.ts +21 -0
- package/dist/components/ui/alert-dialog.d.ts.map +1 -0
- package/dist/components/ui/alert-dialog.js +199 -0
- package/dist/components/ui/alert-dialog.js.map +1 -0
- package/dist/components/ui/alert.cjs +81 -0
- package/dist/components/ui/alert.cjs.map +1 -0
- package/dist/components/ui/alert.d.cts +8 -0
- package/dist/components/ui/alert.d.ts +9 -0
- package/dist/components/ui/alert.d.ts.map +1 -0
- package/dist/components/ui/alert.js +57 -0
- package/dist/components/ui/alert.js.map +1 -0
- package/dist/components/ui/aspect-ratio.cjs +29 -0
- package/dist/components/ui/aspect-ratio.cjs.map +1 -0
- package/dist/components/ui/aspect-ratio.d.cts +5 -0
- package/dist/components/ui/aspect-ratio.d.ts +6 -0
- package/dist/components/ui/aspect-ratio.d.ts.map +1 -0
- package/dist/components/ui/aspect-ratio.js +27 -0
- package/dist/components/ui/aspect-ratio.js.map +1 -0
- package/dist/components/ui/attachment.cjs +26 -0
- package/dist/components/ui/attachment.cjs.map +1 -0
- package/dist/components/ui/attachment.d.cts +4 -0
- package/dist/components/ui/attachment.d.ts +5 -0
- package/dist/components/ui/attachment.d.ts.map +1 -0
- package/dist/components/ui/attachment.js +24 -0
- package/dist/components/ui/attachment.js.map +1 -0
- package/dist/components/ui/avatar.cjs +72 -0
- package/dist/components/ui/avatar.cjs.map +1 -0
- package/dist/components/ui/avatar.d.cts +6 -0
- package/dist/components/ui/avatar.d.ts +7 -0
- package/dist/components/ui/avatar.d.ts.map +1 -0
- package/dist/components/ui/avatar.js +47 -0
- package/dist/components/ui/avatar.js.map +1 -0
- package/dist/components/ui/badge.cjs +71 -0
- package/dist/components/ui/badge.cjs.map +1 -0
- package/dist/components/ui/badge.d.cts +11 -0
- package/dist/components/ui/badge.d.ts +12 -0
- package/dist/components/ui/badge.d.ts.map +1 -0
- package/dist/components/ui/badge.js +48 -0
- package/dist/components/ui/badge.js.map +1 -0
- package/dist/components/ui/breadcrumb.cjs +122 -0
- package/dist/components/ui/breadcrumb.cjs.map +1 -0
- package/dist/components/ui/breadcrumb.d.cts +19 -0
- package/dist/components/ui/breadcrumb.d.ts +20 -0
- package/dist/components/ui/breadcrumb.d.ts.map +1 -0
- package/dist/components/ui/breadcrumb.js +94 -0
- package/dist/components/ui/breadcrumb.js.map +1 -0
- package/dist/components/ui/bubble.cjs +31 -0
- package/dist/components/ui/bubble.cjs.map +1 -0
- package/dist/components/ui/bubble.d.cts +6 -0
- package/dist/components/ui/bubble.d.ts +7 -0
- package/dist/components/ui/bubble.d.ts.map +1 -0
- package/dist/components/ui/bubble.js +29 -0
- package/dist/components/ui/bubble.js.map +1 -0
- package/dist/components/ui/button-group.cjs +18 -0
- package/dist/components/ui/button-group.cjs.map +1 -0
- package/dist/components/ui/button-group.d.cts +5 -0
- package/dist/components/ui/button-group.d.ts +6 -0
- package/dist/components/ui/button-group.d.ts.map +1 -0
- package/dist/components/ui/button-group.js +16 -0
- package/dist/components/ui/button-group.js.map +1 -0
- package/dist/components/ui/button.cjs +124 -0
- package/dist/components/ui/button.cjs.map +1 -0
- package/dist/components/ui/button.d.cts +16 -0
- package/dist/components/ui/button.d.ts +17 -0
- package/dist/components/ui/button.d.ts.map +1 -0
- package/dist/components/ui/button.js +101 -0
- package/dist/components/ui/button.js.map +1 -0
- package/dist/components/ui/calendar.cjs +302 -0
- package/dist/components/ui/calendar.cjs.map +1 -0
- package/dist/components/ui/calendar.d.cts +8 -0
- package/dist/components/ui/calendar.d.ts +9 -0
- package/dist/components/ui/calendar.d.ts.map +1 -0
- package/dist/components/ui/calendar.js +279 -0
- package/dist/components/ui/calendar.js.map +1 -0
- package/dist/components/ui/card.cjs +106 -0
- package/dist/components/ui/card.cjs.map +1 -0
- package/dist/components/ui/card.d.cts +11 -0
- package/dist/components/ui/card.d.ts +12 -0
- package/dist/components/ui/card.d.ts.map +1 -0
- package/dist/components/ui/card.js +79 -0
- package/dist/components/ui/card.js.map +1 -0
- package/dist/components/ui/carousel.cjs +312 -0
- package/dist/components/ui/carousel.cjs.map +1 -0
- package/dist/components/ui/carousel.d.cts +18 -0
- package/dist/components/ui/carousel.d.ts +19 -0
- package/dist/components/ui/carousel.d.ts.map +1 -0
- package/dist/components/ui/carousel.js +283 -0
- package/dist/components/ui/carousel.js.map +1 -0
- package/dist/components/ui/chart.cjs +270 -0
- package/dist/components/ui/chart.cjs.map +1 -0
- package/dist/components/ui/chart.d.cts +41 -0
- package/dist/components/ui/chart.d.ts +42 -0
- package/dist/components/ui/chart.d.ts.map +1 -0
- package/dist/components/ui/chart.js +241 -0
- package/dist/components/ui/chart.js.map +1 -0
- package/dist/components/ui/checkbox.cjs +57 -0
- package/dist/components/ui/checkbox.cjs.map +1 -0
- package/dist/components/ui/checkbox.d.cts +4 -0
- package/dist/components/ui/checkbox.d.ts +5 -0
- package/dist/components/ui/checkbox.d.ts.map +1 -0
- package/dist/components/ui/checkbox.js +34 -0
- package/dist/components/ui/checkbox.js.map +1 -0
- package/dist/components/ui/collapsible.cjs +34 -0
- package/dist/components/ui/collapsible.cjs.map +1 -0
- package/dist/components/ui/collapsible.d.cts +5 -0
- package/dist/components/ui/collapsible.d.ts +6 -0
- package/dist/components/ui/collapsible.d.ts.map +1 -0
- package/dist/components/ui/collapsible.js +10 -0
- package/dist/components/ui/collapsible.js.map +1 -0
- package/dist/components/ui/combobox.cjs +277 -0
- package/dist/components/ui/combobox.cjs.map +1 -0
- package/dist/components/ui/combobox.d.cts +15 -0
- package/dist/components/ui/combobox.d.ts +16 -0
- package/dist/components/ui/combobox.d.ts.map +1 -0
- package/dist/components/ui/combobox.js +254 -0
- package/dist/components/ui/combobox.js.map +1 -0
- package/dist/components/ui/command.cjs +244 -0
- package/dist/components/ui/command.cjs.map +1 -0
- package/dist/components/ui/command.d.cts +80 -0
- package/dist/components/ui/command.d.ts +81 -0
- package/dist/components/ui/command.d.ts.map +1 -0
- package/dist/components/ui/command.js +213 -0
- package/dist/components/ui/command.js.map +1 -0
- package/dist/components/ui/container.cjs +69 -0
- package/dist/components/ui/container.cjs.map +1 -0
- package/dist/components/ui/container.d.cts +11 -0
- package/dist/components/ui/container.d.ts +12 -0
- package/dist/components/ui/container.d.ts.map +1 -0
- package/dist/components/ui/container.js +46 -0
- package/dist/components/ui/container.js.map +1 -0
- package/dist/components/ui/context-menu.cjs +182 -0
- package/dist/components/ui/context-menu.cjs.map +1 -0
- package/dist/components/ui/context-menu.d.cts +27 -0
- package/dist/components/ui/context-menu.d.ts +28 -0
- package/dist/components/ui/context-menu.d.ts.map +1 -0
- package/dist/components/ui/context-menu.js +145 -0
- package/dist/components/ui/context-menu.js.map +1 -0
- package/dist/components/ui/data-table.cjs +139 -0
- package/dist/components/ui/data-table.cjs.map +1 -0
- package/dist/components/ui/data-table.d.cts +13 -0
- package/dist/components/ui/data-table.d.ts +14 -0
- package/dist/components/ui/data-table.d.ts.map +1 -0
- package/dist/components/ui/data-table.js +117 -0
- package/dist/components/ui/data-table.js.map +1 -0
- package/dist/components/ui/date-picker.cjs +304 -0
- package/dist/components/ui/date-picker.cjs.map +1 -0
- package/dist/components/ui/date-picker.d.cts +4 -0
- package/dist/components/ui/date-picker.d.ts +5 -0
- package/dist/components/ui/date-picker.d.ts.map +1 -0
- package/dist/components/ui/date-picker.js +282 -0
- package/dist/components/ui/date-picker.js.map +1 -0
- package/dist/components/ui/dialog.cjs +175 -0
- package/dist/components/ui/dialog.cjs.map +1 -0
- package/dist/components/ui/dialog.d.cts +34 -0
- package/dist/components/ui/dialog.d.ts +35 -0
- package/dist/components/ui/dialog.d.ts.map +1 -0
- package/dist/components/ui/dialog.js +143 -0
- package/dist/components/ui/dialog.js.map +1 -0
- package/dist/components/ui/direction.cjs +16 -0
- package/dist/components/ui/direction.cjs.map +1 -0
- package/dist/components/ui/direction.d.cts +2 -0
- package/dist/components/ui/direction.d.ts +3 -0
- package/dist/components/ui/direction.d.ts.map +1 -0
- package/dist/components/ui/direction.js +3 -0
- package/dist/components/ui/direction.js.map +1 -0
- package/dist/components/ui/drawer.cjs +130 -0
- package/dist/components/ui/drawer.cjs.map +1 -0
- package/dist/components/ui/drawer.d.cts +22 -0
- package/dist/components/ui/drawer.d.ts +23 -0
- package/dist/components/ui/drawer.d.ts.map +1 -0
- package/dist/components/ui/drawer.js +99 -0
- package/dist/components/ui/drawer.js.map +1 -0
- package/dist/components/ui/dropdown-menu.cjs +182 -0
- package/dist/components/ui/dropdown-menu.cjs.map +1 -0
- package/dist/components/ui/dropdown-menu.d.cts +27 -0
- package/dist/components/ui/dropdown-menu.d.ts +28 -0
- package/dist/components/ui/dropdown-menu.d.ts.map +1 -0
- package/dist/components/ui/dropdown-menu.js +145 -0
- package/dist/components/ui/dropdown-menu.js.map +1 -0
- package/dist/components/ui/empty.cjs +111 -0
- package/dist/components/ui/empty.cjs.map +1 -0
- package/dist/components/ui/empty.d.cts +11 -0
- package/dist/components/ui/empty.d.ts +12 -0
- package/dist/components/ui/empty.d.ts.map +1 -0
- package/dist/components/ui/empty.js +104 -0
- package/dist/components/ui/empty.js.map +1 -0
- package/dist/components/ui/field.cjs +285 -0
- package/dist/components/ui/field.cjs.map +1 -0
- package/dist/components/ui/field.d.cts +24 -0
- package/dist/components/ui/field.d.ts +25 -0
- package/dist/components/ui/field.d.ts.map +1 -0
- package/dist/components/ui/field.js +253 -0
- package/dist/components/ui/field.js.map +1 -0
- package/dist/components/ui/hover-card.cjs +55 -0
- package/dist/components/ui/hover-card.cjs.map +1 -0
- package/dist/components/ui/hover-card.d.cts +6 -0
- package/dist/components/ui/hover-card.d.ts +7 -0
- package/dist/components/ui/hover-card.d.ts.map +1 -0
- package/dist/components/ui/hover-card.js +30 -0
- package/dist/components/ui/hover-card.js.map +1 -0
- package/dist/components/ui/input-group.cjs +26 -0
- package/dist/components/ui/input-group.cjs.map +1 -0
- package/dist/components/ui/input-group.d.cts +4 -0
- package/dist/components/ui/input-group.d.ts +5 -0
- package/dist/components/ui/input-group.d.ts.map +1 -0
- package/dist/components/ui/input-group.js +24 -0
- package/dist/components/ui/input-group.js.map +1 -0
- package/dist/components/ui/input-otp.cjs +77 -0
- package/dist/components/ui/input-otp.cjs.map +1 -0
- package/dist/components/ui/input-otp.d.cts +36 -0
- package/dist/components/ui/input-otp.d.ts +37 -0
- package/dist/components/ui/input-otp.d.ts.map +1 -0
- package/dist/components/ui/input-otp.js +52 -0
- package/dist/components/ui/input-otp.js.map +1 -0
- package/dist/components/ui/input.cjs +52 -0
- package/dist/components/ui/input.cjs.map +1 -0
- package/dist/components/ui/input.d.cts +3 -0
- package/dist/components/ui/input.d.ts +4 -0
- package/dist/components/ui/input.d.ts.map +1 -0
- package/dist/components/ui/input.js +30 -0
- package/dist/components/ui/input.js.map +1 -0
- package/dist/components/ui/item.cjs +26 -0
- package/dist/components/ui/item.cjs.map +1 -0
- package/dist/components/ui/item.d.cts +5 -0
- package/dist/components/ui/item.d.ts +6 -0
- package/dist/components/ui/item.d.ts.map +1 -0
- package/dist/components/ui/item.js +24 -0
- package/dist/components/ui/item.js.map +1 -0
- package/dist/components/ui/kbd-group.cjs +74 -0
- package/dist/components/ui/kbd-group.cjs.map +1 -0
- package/dist/components/ui/kbd-group.d.cts +9 -0
- package/dist/components/ui/kbd-group.d.ts +10 -0
- package/dist/components/ui/kbd-group.d.ts.map +1 -0
- package/dist/components/ui/kbd-group.js +51 -0
- package/dist/components/ui/kbd-group.js.map +1 -0
- package/dist/components/ui/kbd.cjs +26 -0
- package/dist/components/ui/kbd.cjs.map +1 -0
- package/dist/components/ui/kbd.d.cts +5 -0
- package/dist/components/ui/kbd.d.ts +6 -0
- package/dist/components/ui/kbd.d.ts.map +1 -0
- package/dist/components/ui/kbd.js +24 -0
- package/dist/components/ui/kbd.js.map +1 -0
- package/dist/components/ui/label.cjs +49 -0
- package/dist/components/ui/label.cjs.map +1 -0
- package/dist/components/ui/label.d.cts +5 -0
- package/dist/components/ui/label.d.ts +6 -0
- package/dist/components/ui/label.d.ts.map +1 -0
- package/dist/components/ui/label.js +26 -0
- package/dist/components/ui/label.js.map +1 -0
- package/dist/components/ui/marker.cjs +17 -0
- package/dist/components/ui/marker.cjs.map +1 -0
- package/dist/components/ui/marker.d.cts +5 -0
- package/dist/components/ui/marker.d.ts +6 -0
- package/dist/components/ui/marker.d.ts.map +1 -0
- package/dist/components/ui/marker.js +15 -0
- package/dist/components/ui/marker.js.map +1 -0
- package/dist/components/ui/menubar.cjs +232 -0
- package/dist/components/ui/menubar.cjs.map +1 -0
- package/dist/components/ui/menubar.d.cts +28 -0
- package/dist/components/ui/menubar.d.ts +29 -0
- package/dist/components/ui/menubar.d.ts.map +1 -0
- package/dist/components/ui/menubar.js +194 -0
- package/dist/components/ui/menubar.js.map +1 -0
- package/dist/components/ui/message-scroller.cjs +79 -0
- package/dist/components/ui/message-scroller.cjs.map +1 -0
- package/dist/components/ui/message-scroller.d.cts +5 -0
- package/dist/components/ui/message-scroller.d.ts +6 -0
- package/dist/components/ui/message-scroller.d.ts.map +1 -0
- package/dist/components/ui/message-scroller.js +56 -0
- package/dist/components/ui/message-scroller.js.map +1 -0
- package/dist/components/ui/message.cjs +20 -0
- package/dist/components/ui/message.cjs.map +1 -0
- package/dist/components/ui/message.d.cts +6 -0
- package/dist/components/ui/message.d.ts +7 -0
- package/dist/components/ui/message.d.ts.map +1 -0
- package/dist/components/ui/message.js +18 -0
- package/dist/components/ui/message.js.map +1 -0
- package/dist/components/ui/native-select.cjs +49 -0
- package/dist/components/ui/native-select.cjs.map +1 -0
- package/dist/components/ui/native-select.d.cts +4 -0
- package/dist/components/ui/native-select.d.ts +5 -0
- package/dist/components/ui/native-select.d.ts.map +1 -0
- package/dist/components/ui/native-select.js +27 -0
- package/dist/components/ui/native-select.js.map +1 -0
- package/dist/components/ui/navigation-menu.cjs +137 -0
- package/dist/components/ui/navigation-menu.cjs.map +1 -0
- package/dist/components/ui/navigation-menu.d.cts +12 -0
- package/dist/components/ui/navigation-menu.d.ts +13 -0
- package/dist/components/ui/navigation-menu.d.ts.map +1 -0
- package/dist/components/ui/navigation-menu.js +106 -0
- package/dist/components/ui/navigation-menu.js.map +1 -0
- package/dist/components/ui/pagination.cjs +218 -0
- package/dist/components/ui/pagination.cjs.map +1 -0
- package/dist/components/ui/pagination.d.cts +28 -0
- package/dist/components/ui/pagination.d.ts +29 -0
- package/dist/components/ui/pagination.d.ts.map +1 -0
- package/dist/components/ui/pagination.js +190 -0
- package/dist/components/ui/pagination.js.map +1 -0
- package/dist/components/ui/popover.cjs +57 -0
- package/dist/components/ui/popover.cjs.map +1 -0
- package/dist/components/ui/popover.d.cts +7 -0
- package/dist/components/ui/popover.d.ts +8 -0
- package/dist/components/ui/popover.d.ts.map +1 -0
- package/dist/components/ui/popover.js +31 -0
- package/dist/components/ui/popover.js.map +1 -0
- package/dist/components/ui/progress.cjs +56 -0
- package/dist/components/ui/progress.cjs.map +1 -0
- package/dist/components/ui/progress.d.cts +4 -0
- package/dist/components/ui/progress.d.ts +5 -0
- package/dist/components/ui/progress.d.ts.map +1 -0
- package/dist/components/ui/progress.js +33 -0
- package/dist/components/ui/progress.js.map +1 -0
- package/dist/components/ui/questionnaire.cjs +17 -0
- package/dist/components/ui/questionnaire.cjs.map +1 -0
- package/dist/components/ui/questionnaire.d.cts +5 -0
- package/dist/components/ui/questionnaire.d.ts +6 -0
- package/dist/components/ui/questionnaire.d.ts.map +1 -0
- package/dist/components/ui/questionnaire.js +15 -0
- package/dist/components/ui/questionnaire.js.map +1 -0
- package/dist/components/ui/radio-group.cjs +65 -0
- package/dist/components/ui/radio-group.cjs.map +1 -0
- package/dist/components/ui/radio-group.d.cts +5 -0
- package/dist/components/ui/radio-group.d.ts +6 -0
- package/dist/components/ui/radio-group.d.ts.map +1 -0
- package/dist/components/ui/radio-group.js +41 -0
- package/dist/components/ui/radio-group.js.map +1 -0
- package/dist/components/ui/resizable.cjs +67 -0
- package/dist/components/ui/resizable.cjs.map +1 -0
- package/dist/components/ui/resizable.d.cts +7 -0
- package/dist/components/ui/resizable.d.ts +8 -0
- package/dist/components/ui/resizable.d.ts.map +1 -0
- package/dist/components/ui/resizable.js +43 -0
- package/dist/components/ui/resizable.js.map +1 -0
- package/dist/components/ui/scroll-area.cjs +67 -0
- package/dist/components/ui/scroll-area.cjs.map +1 -0
- package/dist/components/ui/scroll-area.d.cts +5 -0
- package/dist/components/ui/scroll-area.d.ts +6 -0
- package/dist/components/ui/scroll-area.d.ts.map +1 -0
- package/dist/components/ui/scroll-area.js +43 -0
- package/dist/components/ui/scroll-area.js.map +1 -0
- package/dist/components/ui/select.cjs +154 -0
- package/dist/components/ui/select.cjs.map +1 -0
- package/dist/components/ui/select.d.cts +13 -0
- package/dist/components/ui/select.d.ts +14 -0
- package/dist/components/ui/select.d.ts.map +1 -0
- package/dist/components/ui/select.js +122 -0
- package/dist/components/ui/select.js.map +1 -0
- package/dist/components/ui/separator.cjs +54 -0
- package/dist/components/ui/separator.cjs.map +1 -0
- package/dist/components/ui/separator.d.cts +4 -0
- package/dist/components/ui/separator.d.ts +5 -0
- package/dist/components/ui/separator.d.ts.map +1 -0
- package/dist/components/ui/separator.js +31 -0
- package/dist/components/ui/separator.js.map +1 -0
- package/dist/components/ui/sheet.cjs +186 -0
- package/dist/components/ui/sheet.cjs.map +1 -0
- package/dist/components/ui/sheet.d.cts +32 -0
- package/dist/components/ui/sheet.d.ts +33 -0
- package/dist/components/ui/sheet.d.ts.map +1 -0
- package/dist/components/ui/sheet.js +154 -0
- package/dist/components/ui/sheet.js.map +1 -0
- package/dist/components/ui/sidebar.cjs +962 -0
- package/dist/components/ui/sidebar.cjs.map +1 -0
- package/dist/components/ui/sidebar.d.cts +75 -0
- package/dist/components/ui/sidebar.d.ts +76 -0
- package/dist/components/ui/sidebar.d.ts.map +1 -0
- package/dist/components/ui/sidebar.js +914 -0
- package/dist/components/ui/sidebar.js.map +1 -0
- package/dist/components/ui/skeleton.cjs +26 -0
- package/dist/components/ui/skeleton.cjs.map +1 -0
- package/dist/components/ui/skeleton.d.cts +2 -0
- package/dist/components/ui/skeleton.d.ts +3 -0
- package/dist/components/ui/skeleton.d.ts.map +1 -0
- package/dist/components/ui/skeleton.js +24 -0
- package/dist/components/ui/skeleton.js.map +1 -0
- package/dist/components/ui/slider.cjs +52 -0
- package/dist/components/ui/slider.cjs.map +1 -0
- package/dist/components/ui/slider.d.cts +4 -0
- package/dist/components/ui/slider.d.ts +5 -0
- package/dist/components/ui/slider.d.ts.map +1 -0
- package/dist/components/ui/slider.js +29 -0
- package/dist/components/ui/slider.js.map +1 -0
- package/dist/components/ui/spinner.cjs +26 -0
- package/dist/components/ui/spinner.cjs.map +1 -0
- package/dist/components/ui/spinner.d.cts +2 -0
- package/dist/components/ui/spinner.d.ts +3 -0
- package/dist/components/ui/spinner.d.ts.map +1 -0
- package/dist/components/ui/spinner.js +24 -0
- package/dist/components/ui/spinner.js.map +1 -0
- package/dist/components/ui/switch.cjs +57 -0
- package/dist/components/ui/switch.cjs.map +1 -0
- package/dist/components/ui/switch.d.cts +4 -0
- package/dist/components/ui/switch.d.ts +5 -0
- package/dist/components/ui/switch.d.ts.map +1 -0
- package/dist/components/ui/switch.js +34 -0
- package/dist/components/ui/switch.js.map +1 -0
- package/dist/components/ui/table.cjs +135 -0
- package/dist/components/ui/table.cjs.map +1 -0
- package/dist/components/ui/table.d.cts +10 -0
- package/dist/components/ui/table.d.ts +11 -0
- package/dist/components/ui/table.d.ts.map +1 -0
- package/dist/components/ui/table.js +106 -0
- package/dist/components/ui/table.js.map +1 -0
- package/dist/components/ui/tabs.cjs +78 -0
- package/dist/components/ui/tabs.cjs.map +1 -0
- package/dist/components/ui/tabs.d.cts +10 -0
- package/dist/components/ui/tabs.d.ts +11 -0
- package/dist/components/ui/tabs.d.ts.map +1 -0
- package/dist/components/ui/tabs.js +52 -0
- package/dist/components/ui/tabs.js.map +1 -0
- package/dist/components/ui/textarea.cjs +49 -0
- package/dist/components/ui/textarea.cjs.map +1 -0
- package/dist/components/ui/textarea.d.cts +3 -0
- package/dist/components/ui/textarea.d.ts +4 -0
- package/dist/components/ui/textarea.d.ts.map +1 -0
- package/dist/components/ui/textarea.js +27 -0
- package/dist/components/ui/textarea.js.map +1 -0
- package/dist/components/ui/toast.cjs +16 -0
- package/dist/components/ui/toast.cjs.map +1 -0
- package/dist/components/ui/toast.d.cts +2 -0
- package/dist/components/ui/toast.d.ts +3 -0
- package/dist/components/ui/toast.d.ts.map +1 -0
- package/dist/components/ui/toast.js +3 -0
- package/dist/components/ui/toast.js.map +1 -0
- package/dist/components/ui/toggle-group.cjs +102 -0
- package/dist/components/ui/toggle-group.cjs.map +1 -0
- package/dist/components/ui/toggle-group.d.cts +12 -0
- package/dist/components/ui/toggle-group.d.ts +13 -0
- package/dist/components/ui/toggle-group.d.ts.map +1 -0
- package/dist/components/ui/toggle-group.js +77 -0
- package/dist/components/ui/toggle-group.js.map +1 -0
- package/dist/components/ui/toggle.cjs +68 -0
- package/dist/components/ui/toggle.cjs.map +1 -0
- package/dist/components/ui/toggle.d.cts +12 -0
- package/dist/components/ui/toggle.d.ts +13 -0
- package/dist/components/ui/toggle.d.ts.map +1 -0
- package/dist/components/ui/toggle.js +44 -0
- package/dist/components/ui/toggle.js.map +1 -0
- package/dist/components/ui/tooltip.cjs +55 -0
- package/dist/components/ui/tooltip.cjs.map +1 -0
- package/dist/components/ui/tooltip.d.cts +7 -0
- package/dist/components/ui/tooltip.d.ts +8 -0
- package/dist/components/ui/tooltip.d.ts.map +1 -0
- package/dist/components/ui/tooltip.js +29 -0
- package/dist/components/ui/tooltip.js.map +1 -0
- package/dist/components/ui/typography.cjs +159 -0
- package/dist/components/ui/typography.cjs.map +1 -0
- package/dist/components/ui/typography.d.cts +35 -0
- package/dist/components/ui/typography.d.ts +36 -0
- package/dist/components/ui/typography.d.ts.map +1 -0
- package/dist/components/ui/typography.js +132 -0
- package/dist/components/ui/typography.js.map +1 -0
- package/dist/fonts/ONEST-LICENSE.txt +93 -0
- package/dist/fonts/onest-latin-ext-wght-normal.woff2 +0 -0
- package/dist/fonts/onest-latin-wght-normal.woff2 +0 -0
- package/dist/hooks/use-direction.cjs +12 -0
- package/dist/hooks/use-direction.cjs.map +1 -0
- package/dist/hooks/use-direction.d.cts +2 -0
- package/dist/hooks/use-direction.d.ts +3 -0
- package/dist/hooks/use-direction.d.ts.map +1 -0
- package/dist/hooks/use-direction.js +3 -0
- package/dist/hooks/use-direction.js.map +1 -0
- package/dist/hooks/use-mobile.cjs +45 -0
- package/dist/hooks/use-mobile.cjs.map +1 -0
- package/dist/hooks/use-mobile.d.cts +1 -0
- package/dist/hooks/use-mobile.d.ts +2 -0
- package/dist/hooks/use-mobile.d.ts.map +1 -0
- package/dist/hooks/use-mobile.js +23 -0
- package/dist/hooks/use-mobile.js.map +1 -0
- package/dist/index.cjs +67 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +86 -0
- package/dist/index.d.ts +87 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +67 -0
- package/dist/index.js.map +1 -0
- package/dist/lib/utils.cjs +13 -0
- package/dist/lib/utils.cjs.map +1 -0
- package/dist/lib/utils.d.cts +2 -0
- package/dist/lib/utils.d.ts +3 -0
- package/dist/lib/utils.d.ts.map +1 -0
- package/dist/lib/utils.js +11 -0
- package/dist/lib/utils.js.map +1 -0
- package/dist/styles.css +2 -0
- package/package.json +931 -0
|
@@ -0,0 +1,962 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var React7 = require('react');
|
|
4
|
+
var reactSlot = require('@radix-ui/react-slot');
|
|
5
|
+
var classVarianceAuthority = require('class-variance-authority');
|
|
6
|
+
var lucideReact = require('lucide-react');
|
|
7
|
+
var clsx = require('clsx');
|
|
8
|
+
var tailwindMerge = require('tailwind-merge');
|
|
9
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
10
|
+
var SeparatorPrimitive = require('@radix-ui/react-separator');
|
|
11
|
+
var SheetPrimitive = require('@radix-ui/react-dialog');
|
|
12
|
+
var TooltipPrimitive = require('@radix-ui/react-tooltip');
|
|
13
|
+
|
|
14
|
+
function _interopNamespace(e) {
|
|
15
|
+
if (e && e.__esModule) return e;
|
|
16
|
+
var n = Object.create(null);
|
|
17
|
+
if (e) {
|
|
18
|
+
Object.keys(e).forEach(function (k) {
|
|
19
|
+
if (k !== 'default') {
|
|
20
|
+
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
21
|
+
Object.defineProperty(n, k, d.get ? d : {
|
|
22
|
+
enumerable: true,
|
|
23
|
+
get: function () { return e[k]; }
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
n.default = e;
|
|
29
|
+
return Object.freeze(n);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
var React7__namespace = /*#__PURE__*/_interopNamespace(React7);
|
|
33
|
+
var SeparatorPrimitive__namespace = /*#__PURE__*/_interopNamespace(SeparatorPrimitive);
|
|
34
|
+
var SheetPrimitive__namespace = /*#__PURE__*/_interopNamespace(SheetPrimitive);
|
|
35
|
+
var TooltipPrimitive__namespace = /*#__PURE__*/_interopNamespace(TooltipPrimitive);
|
|
36
|
+
|
|
37
|
+
var MOBILE_BREAKPOINT = 768;
|
|
38
|
+
var MOBILE_QUERY = `(max-width: ${MOBILE_BREAKPOINT - 1}px)`;
|
|
39
|
+
function subscribe(callback) {
|
|
40
|
+
const mediaQuery = window.matchMedia(MOBILE_QUERY);
|
|
41
|
+
mediaQuery.addEventListener("change", callback);
|
|
42
|
+
return () => mediaQuery.removeEventListener("change", callback);
|
|
43
|
+
}
|
|
44
|
+
function getSnapshot() {
|
|
45
|
+
return window.matchMedia(MOBILE_QUERY).matches;
|
|
46
|
+
}
|
|
47
|
+
function getServerSnapshot() {
|
|
48
|
+
return false;
|
|
49
|
+
}
|
|
50
|
+
function useIsMobile() {
|
|
51
|
+
return React7__namespace.useSyncExternalStore(subscribe, getSnapshot, getServerSnapshot);
|
|
52
|
+
}
|
|
53
|
+
function cn(...inputs) {
|
|
54
|
+
return tailwindMerge.twMerge(clsx.clsx(inputs));
|
|
55
|
+
}
|
|
56
|
+
var buttonVariants = classVarianceAuthority.cva(
|
|
57
|
+
"ui-button ui-focus inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium select-none [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",
|
|
58
|
+
{
|
|
59
|
+
variants: {
|
|
60
|
+
variant: {
|
|
61
|
+
default: "bg-primary text-primary-foreground shadow-surface hover:bg-primary-hover",
|
|
62
|
+
primary: "bg-primary text-primary-foreground shadow-surface hover:bg-primary-hover",
|
|
63
|
+
destructive: "bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",
|
|
64
|
+
outline: "border border-input bg-surface shadow-surface hover:bg-accent hover:text-accent-foreground",
|
|
65
|
+
secondary: "bg-secondary text-secondary-foreground shadow-surface hover:bg-surface-interactive",
|
|
66
|
+
accent: "bg-accent-muted text-accent-foreground hover:bg-accent shadow-surface",
|
|
67
|
+
subtle: "bg-accent text-accent-foreground hover:bg-accent-muted",
|
|
68
|
+
inverse: "bg-foreground text-background shadow-sm hover:bg-foreground/90",
|
|
69
|
+
ghost: "hover:bg-accent hover:text-accent-foreground",
|
|
70
|
+
navigation: "hover:bg-accent hover:text-accent-foreground",
|
|
71
|
+
link: "text-primary underline-offset-4 hover:underline"
|
|
72
|
+
},
|
|
73
|
+
size: {
|
|
74
|
+
default: "h-[var(--control-height)] px-4 py-2",
|
|
75
|
+
compact: "h-8 px-3 text-xs",
|
|
76
|
+
sm: "h-8 rounded-md px-3 text-xs",
|
|
77
|
+
lg: "h-12 rounded-md px-6",
|
|
78
|
+
xs: "h-7 rounded px-2 text-xs",
|
|
79
|
+
icon: "size-[var(--control-height)]",
|
|
80
|
+
"icon-xs": "h-7 w-7",
|
|
81
|
+
"icon-lg": "size-12"
|
|
82
|
+
},
|
|
83
|
+
wrap: {
|
|
84
|
+
true: "whitespace-normal text-wrap",
|
|
85
|
+
false: "whitespace-nowrap"
|
|
86
|
+
}
|
|
87
|
+
},
|
|
88
|
+
defaultVariants: {
|
|
89
|
+
variant: "default",
|
|
90
|
+
size: "default"
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
);
|
|
94
|
+
var Button = React7__namespace.forwardRef(
|
|
95
|
+
({
|
|
96
|
+
className,
|
|
97
|
+
variant,
|
|
98
|
+
size,
|
|
99
|
+
wrap,
|
|
100
|
+
asChild = false,
|
|
101
|
+
loading = false,
|
|
102
|
+
render,
|
|
103
|
+
disabled,
|
|
104
|
+
children,
|
|
105
|
+
onClickCapture,
|
|
106
|
+
tabIndex,
|
|
107
|
+
type,
|
|
108
|
+
...props
|
|
109
|
+
}, ref) => {
|
|
110
|
+
const isDisabled = Boolean(disabled || loading);
|
|
111
|
+
const slotted = asChild || Boolean(render);
|
|
112
|
+
const Comp = slotted ? reactSlot.Slot : "button";
|
|
113
|
+
const content = render ? React7__namespace.cloneElement(
|
|
114
|
+
render,
|
|
115
|
+
void 0,
|
|
116
|
+
children ?? render.props.children
|
|
117
|
+
) : children;
|
|
118
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
119
|
+
Comp,
|
|
120
|
+
{
|
|
121
|
+
...props,
|
|
122
|
+
ref,
|
|
123
|
+
"data-slot": props["data-slot"] ?? "button",
|
|
124
|
+
className: cn(buttonVariants({ variant, size, wrap, className })),
|
|
125
|
+
type,
|
|
126
|
+
disabled: isDisabled,
|
|
127
|
+
"aria-disabled": isDisabled || void 0,
|
|
128
|
+
"aria-busy": loading || props["aria-busy"],
|
|
129
|
+
tabIndex: isDisabled && slotted ? -1 : tabIndex,
|
|
130
|
+
...isDisabled ? {
|
|
131
|
+
onClickCapture: (event) => {
|
|
132
|
+
event.preventDefault();
|
|
133
|
+
event.stopPropagation();
|
|
134
|
+
}
|
|
135
|
+
} : onClickCapture ? { onClickCapture } : {},
|
|
136
|
+
children: content
|
|
137
|
+
}
|
|
138
|
+
);
|
|
139
|
+
}
|
|
140
|
+
);
|
|
141
|
+
Button.displayName = "Button";
|
|
142
|
+
var Input = React7__namespace.forwardRef(
|
|
143
|
+
({ className, type, ...props }, ref) => {
|
|
144
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
145
|
+
"input",
|
|
146
|
+
{
|
|
147
|
+
type,
|
|
148
|
+
className: cn(
|
|
149
|
+
"ui-control ui-focus flex h-[var(--control-height)] w-full rounded-md border border-input bg-surface px-3 py-1 text-base shadow-sm transition-colors file:border-0 file:bg-surface file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",
|
|
150
|
+
className
|
|
151
|
+
),
|
|
152
|
+
ref,
|
|
153
|
+
...props
|
|
154
|
+
}
|
|
155
|
+
);
|
|
156
|
+
}
|
|
157
|
+
);
|
|
158
|
+
Input.displayName = "Input";
|
|
159
|
+
var Separator = React7__namespace.forwardRef(
|
|
160
|
+
({ className, orientation = "horizontal", decorative = true, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
161
|
+
SeparatorPrimitive__namespace.Root,
|
|
162
|
+
{
|
|
163
|
+
ref,
|
|
164
|
+
decorative,
|
|
165
|
+
orientation,
|
|
166
|
+
className: cn(
|
|
167
|
+
"shrink-0 bg-border",
|
|
168
|
+
orientation === "horizontal" ? "h-[1px] w-full" : "h-full w-[1px]",
|
|
169
|
+
className
|
|
170
|
+
),
|
|
171
|
+
...props
|
|
172
|
+
}
|
|
173
|
+
)
|
|
174
|
+
);
|
|
175
|
+
Separator.displayName = SeparatorPrimitive__namespace.Root.displayName;
|
|
176
|
+
var Sheet = SheetPrimitive__namespace.Root;
|
|
177
|
+
var SheetTrigger = React7__namespace.forwardRef(({ render, children, ...props }, ref) => {
|
|
178
|
+
if (render) {
|
|
179
|
+
const renderedChild = React7__namespace.isValidElement(render) ? React7__namespace.cloneElement(
|
|
180
|
+
render,
|
|
181
|
+
void 0,
|
|
182
|
+
render.props.children ?? children
|
|
183
|
+
) : render;
|
|
184
|
+
return /* @__PURE__ */ jsxRuntime.jsx(SheetPrimitive__namespace.Trigger, { ref, asChild: true, ...props, children: renderedChild });
|
|
185
|
+
}
|
|
186
|
+
return /* @__PURE__ */ jsxRuntime.jsx(SheetPrimitive__namespace.Trigger, { ref, ...props, children });
|
|
187
|
+
});
|
|
188
|
+
SheetTrigger.displayName = SheetPrimitive__namespace.Trigger.displayName;
|
|
189
|
+
var SheetClose = React7__namespace.forwardRef(({ render, children, ...props }, ref) => {
|
|
190
|
+
if (render) {
|
|
191
|
+
const renderedChild = React7__namespace.isValidElement(render) ? React7__namespace.cloneElement(
|
|
192
|
+
render,
|
|
193
|
+
void 0,
|
|
194
|
+
render.props.children ?? children
|
|
195
|
+
) : render;
|
|
196
|
+
return /* @__PURE__ */ jsxRuntime.jsx(SheetPrimitive__namespace.Close, { ref, asChild: true, ...props, children: renderedChild });
|
|
197
|
+
}
|
|
198
|
+
return /* @__PURE__ */ jsxRuntime.jsx(SheetPrimitive__namespace.Close, { ref, ...props, children });
|
|
199
|
+
});
|
|
200
|
+
SheetClose.displayName = SheetPrimitive__namespace.Close.displayName;
|
|
201
|
+
var SheetPortal = SheetPrimitive__namespace.Portal;
|
|
202
|
+
var SheetOverlay = React7__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
203
|
+
SheetPrimitive__namespace.Overlay,
|
|
204
|
+
{
|
|
205
|
+
className: cn(
|
|
206
|
+
"fixed inset-0 z-50 bg-overlay data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
|
|
207
|
+
className
|
|
208
|
+
),
|
|
209
|
+
...props,
|
|
210
|
+
ref
|
|
211
|
+
}
|
|
212
|
+
));
|
|
213
|
+
SheetOverlay.displayName = SheetPrimitive__namespace.Overlay.displayName;
|
|
214
|
+
var sheetVariants = classVarianceAuthority.cva(
|
|
215
|
+
"fixed z-50 gap-4 bg-popover text-popover-foreground p-6 shadow-overlay transition ease-[var(--motion-easing-out)] data-[state=closed]:duration-[var(--motion-duration-slow)] data-[state=open]:duration-[var(--motion-duration-slow)] data-[state=open]:animate-in data-[state=closed]:animate-out",
|
|
216
|
+
{
|
|
217
|
+
variants: {
|
|
218
|
+
side: {
|
|
219
|
+
top: "inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",
|
|
220
|
+
bottom: "inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",
|
|
221
|
+
left: "inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm",
|
|
222
|
+
right: "inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm"
|
|
223
|
+
}
|
|
224
|
+
},
|
|
225
|
+
defaultVariants: {
|
|
226
|
+
side: "right"
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
);
|
|
230
|
+
var SheetContent = React7__namespace.forwardRef(
|
|
231
|
+
({
|
|
232
|
+
side = "right",
|
|
233
|
+
className,
|
|
234
|
+
children,
|
|
235
|
+
overlayClassName,
|
|
236
|
+
showCloseButton = true,
|
|
237
|
+
size,
|
|
238
|
+
...props
|
|
239
|
+
}, ref) => /* @__PURE__ */ jsxRuntime.jsxs(SheetPortal, { children: [
|
|
240
|
+
/* @__PURE__ */ jsxRuntime.jsx(SheetOverlay, { className: overlayClassName }),
|
|
241
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
242
|
+
SheetPrimitive__namespace.Content,
|
|
243
|
+
{
|
|
244
|
+
"data-slot": "sheet-content",
|
|
245
|
+
"data-side": side,
|
|
246
|
+
"data-size": size,
|
|
247
|
+
ref,
|
|
248
|
+
className: cn(
|
|
249
|
+
sheetVariants({ side }),
|
|
250
|
+
size === "full" && "max-w-full sm:max-w-full",
|
|
251
|
+
size === "lg" && "sm:max-w-lg",
|
|
252
|
+
size === "xl" && "sm:max-w-xl",
|
|
253
|
+
className
|
|
254
|
+
),
|
|
255
|
+
...props,
|
|
256
|
+
children: [
|
|
257
|
+
showCloseButton && /* @__PURE__ */ jsxRuntime.jsxs(SheetPrimitive__namespace.Close, { className: "absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary", children: [
|
|
258
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.X, { className: "h-4 w-4" }),
|
|
259
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "sr-only", children: "Close" })
|
|
260
|
+
] }),
|
|
261
|
+
children
|
|
262
|
+
]
|
|
263
|
+
}
|
|
264
|
+
)
|
|
265
|
+
] })
|
|
266
|
+
);
|
|
267
|
+
SheetContent.displayName = SheetPrimitive__namespace.Content.displayName;
|
|
268
|
+
var SheetHeader = ({
|
|
269
|
+
className,
|
|
270
|
+
...props
|
|
271
|
+
}) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
272
|
+
"div",
|
|
273
|
+
{
|
|
274
|
+
className: cn(
|
|
275
|
+
"flex flex-col space-y-2 text-center sm:text-left",
|
|
276
|
+
className
|
|
277
|
+
),
|
|
278
|
+
...props
|
|
279
|
+
}
|
|
280
|
+
);
|
|
281
|
+
SheetHeader.displayName = "SheetHeader";
|
|
282
|
+
var SheetTitle = React7__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
283
|
+
SheetPrimitive__namespace.Title,
|
|
284
|
+
{
|
|
285
|
+
ref,
|
|
286
|
+
className: cn("text-lg font-semibold text-foreground", className),
|
|
287
|
+
...props
|
|
288
|
+
}
|
|
289
|
+
));
|
|
290
|
+
SheetTitle.displayName = SheetPrimitive__namespace.Title.displayName;
|
|
291
|
+
var SheetDescription = React7__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
292
|
+
SheetPrimitive__namespace.Description,
|
|
293
|
+
{
|
|
294
|
+
ref,
|
|
295
|
+
className: cn("text-sm text-muted-foreground", className),
|
|
296
|
+
...props
|
|
297
|
+
}
|
|
298
|
+
));
|
|
299
|
+
SheetDescription.displayName = SheetPrimitive__namespace.Description.displayName;
|
|
300
|
+
function Skeleton({
|
|
301
|
+
className,
|
|
302
|
+
...props
|
|
303
|
+
}) {
|
|
304
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
305
|
+
"div",
|
|
306
|
+
{
|
|
307
|
+
className: cn("animate-pulse rounded-md bg-primary/10", className),
|
|
308
|
+
...props
|
|
309
|
+
}
|
|
310
|
+
);
|
|
311
|
+
}
|
|
312
|
+
var TooltipProvider = TooltipPrimitive__namespace.Provider;
|
|
313
|
+
var Tooltip = TooltipPrimitive__namespace.Root;
|
|
314
|
+
var TooltipTrigger = TooltipPrimitive__namespace.Trigger;
|
|
315
|
+
var TooltipContent = React7__namespace.forwardRef(({ className, sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(TooltipPrimitive__namespace.Portal, { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
316
|
+
TooltipPrimitive__namespace.Content,
|
|
317
|
+
{
|
|
318
|
+
ref,
|
|
319
|
+
sideOffset,
|
|
320
|
+
className: cn(
|
|
321
|
+
"z-50 overflow-hidden rounded-md bg-primary px-3 py-1.5 text-xs text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 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 origin-[var(--radix-tooltip-content-transform-origin)]",
|
|
322
|
+
className
|
|
323
|
+
),
|
|
324
|
+
...props
|
|
325
|
+
}
|
|
326
|
+
) }));
|
|
327
|
+
TooltipContent.displayName = TooltipPrimitive__namespace.Content.displayName;
|
|
328
|
+
var SIDEBAR_COOKIE_NAME = "sidebar_state";
|
|
329
|
+
var SIDEBAR_COOKIE_MAX_AGE = 60 * 60 * 24 * 7;
|
|
330
|
+
var SIDEBAR_WIDTH = "16rem";
|
|
331
|
+
var SIDEBAR_WIDTH_MOBILE = "18rem";
|
|
332
|
+
var SIDEBAR_WIDTH_ICON = "3rem";
|
|
333
|
+
var SIDEBAR_KEYBOARD_SHORTCUT = "b";
|
|
334
|
+
var SidebarContext = React7__namespace.createContext(null);
|
|
335
|
+
function useSidebar() {
|
|
336
|
+
const context = React7__namespace.useContext(SidebarContext);
|
|
337
|
+
if (!context) {
|
|
338
|
+
throw new Error("useSidebar must be used within a SidebarProvider.");
|
|
339
|
+
}
|
|
340
|
+
return context;
|
|
341
|
+
}
|
|
342
|
+
var SidebarProvider = React7__namespace.forwardRef(
|
|
343
|
+
({
|
|
344
|
+
defaultOpen = true,
|
|
345
|
+
open: openProp,
|
|
346
|
+
onOpenChange: setOpenProp,
|
|
347
|
+
persistence,
|
|
348
|
+
storageKey,
|
|
349
|
+
className,
|
|
350
|
+
style,
|
|
351
|
+
children,
|
|
352
|
+
...props
|
|
353
|
+
}, ref) => {
|
|
354
|
+
const isMobile = useIsMobile();
|
|
355
|
+
const [openMobile, setOpenMobile] = React7__namespace.useState(false);
|
|
356
|
+
const triggerRef = React7__namespace.useRef(null);
|
|
357
|
+
const [_open, _setOpen] = React7__namespace.useState(() => {
|
|
358
|
+
if (storageKey && typeof localStorage !== "undefined") {
|
|
359
|
+
const saved = localStorage.getItem(storageKey);
|
|
360
|
+
if (saved !== null) {
|
|
361
|
+
return saved === "true";
|
|
362
|
+
}
|
|
363
|
+
}
|
|
364
|
+
return defaultOpen;
|
|
365
|
+
});
|
|
366
|
+
const open = openProp ?? _open;
|
|
367
|
+
const setOpen = React7__namespace.useCallback(
|
|
368
|
+
(value) => {
|
|
369
|
+
const openState = typeof value === "function" ? value(open) : value;
|
|
370
|
+
if (setOpenProp) {
|
|
371
|
+
setOpenProp(openState);
|
|
372
|
+
} else {
|
|
373
|
+
_setOpen(openState);
|
|
374
|
+
}
|
|
375
|
+
if (storageKey && typeof localStorage !== "undefined") {
|
|
376
|
+
localStorage.setItem(storageKey, String(openState));
|
|
377
|
+
}
|
|
378
|
+
document.cookie = `${SIDEBAR_COOKIE_NAME}=${openState}; path=/; max-age=${SIDEBAR_COOKIE_MAX_AGE}`;
|
|
379
|
+
},
|
|
380
|
+
[setOpenProp, open, storageKey]
|
|
381
|
+
);
|
|
382
|
+
const toggleSidebar = React7__namespace.useCallback(() => {
|
|
383
|
+
return isMobile ? setOpenMobile((open2) => !open2) : setOpen((open2) => !open2);
|
|
384
|
+
}, [isMobile, setOpen, setOpenMobile]);
|
|
385
|
+
React7__namespace.useEffect(() => {
|
|
386
|
+
const handleKeyDown = (event) => {
|
|
387
|
+
if (event.key === SIDEBAR_KEYBOARD_SHORTCUT && (event.metaKey || event.ctrlKey)) {
|
|
388
|
+
const target = event.target;
|
|
389
|
+
if (target && (target.tagName === "INPUT" || target.tagName === "TEXTAREA" || target.isContentEditable)) {
|
|
390
|
+
return;
|
|
391
|
+
}
|
|
392
|
+
event.preventDefault();
|
|
393
|
+
toggleSidebar();
|
|
394
|
+
}
|
|
395
|
+
};
|
|
396
|
+
window.addEventListener("keydown", handleKeyDown);
|
|
397
|
+
return () => window.removeEventListener("keydown", handleKeyDown);
|
|
398
|
+
}, [toggleSidebar]);
|
|
399
|
+
const state = open ? "expanded" : "collapsed";
|
|
400
|
+
const contextValue = React7__namespace.useMemo(
|
|
401
|
+
() => ({
|
|
402
|
+
state,
|
|
403
|
+
open,
|
|
404
|
+
setOpen,
|
|
405
|
+
isMobile,
|
|
406
|
+
openMobile,
|
|
407
|
+
setOpenMobile,
|
|
408
|
+
toggleSidebar,
|
|
409
|
+
triggerRef
|
|
410
|
+
}),
|
|
411
|
+
[state, open, setOpen, isMobile, openMobile, setOpenMobile, toggleSidebar]
|
|
412
|
+
);
|
|
413
|
+
return /* @__PURE__ */ jsxRuntime.jsx(SidebarContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsxRuntime.jsx(TooltipProvider, { delayDuration: 0, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
414
|
+
"div",
|
|
415
|
+
{
|
|
416
|
+
style: {
|
|
417
|
+
"--sidebar-width": SIDEBAR_WIDTH,
|
|
418
|
+
"--sidebar-width-icon": SIDEBAR_WIDTH_ICON,
|
|
419
|
+
...style
|
|
420
|
+
},
|
|
421
|
+
className: cn(
|
|
422
|
+
"group/sidebar-wrapper flex min-h-svh w-full has-[[data-variant=inset]]:bg-sidebar",
|
|
423
|
+
className
|
|
424
|
+
),
|
|
425
|
+
ref,
|
|
426
|
+
...props,
|
|
427
|
+
children
|
|
428
|
+
}
|
|
429
|
+
) }) });
|
|
430
|
+
}
|
|
431
|
+
);
|
|
432
|
+
SidebarProvider.displayName = "SidebarProvider";
|
|
433
|
+
var Sidebar = React7__namespace.forwardRef(
|
|
434
|
+
({
|
|
435
|
+
side = "left",
|
|
436
|
+
variant = "sidebar",
|
|
437
|
+
collapsible = "offcanvas",
|
|
438
|
+
className,
|
|
439
|
+
children,
|
|
440
|
+
mobileTitle,
|
|
441
|
+
mobileDescription,
|
|
442
|
+
id = "consumer-sidebar",
|
|
443
|
+
...props
|
|
444
|
+
}, ref) => {
|
|
445
|
+
const { isMobile, state, openMobile, setOpenMobile, triggerRef } = useSidebar();
|
|
446
|
+
if (collapsible === "none") {
|
|
447
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
448
|
+
"div",
|
|
449
|
+
{
|
|
450
|
+
id,
|
|
451
|
+
"data-slot": "sidebar",
|
|
452
|
+
className: cn(
|
|
453
|
+
"flex h-full w-[var(--sidebar-width)] flex-col bg-sidebar text-sidebar-foreground",
|
|
454
|
+
className
|
|
455
|
+
),
|
|
456
|
+
ref,
|
|
457
|
+
...props,
|
|
458
|
+
children
|
|
459
|
+
}
|
|
460
|
+
);
|
|
461
|
+
}
|
|
462
|
+
if (isMobile) {
|
|
463
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Sheet, { open: openMobile, onOpenChange: setOpenMobile, ...props, children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
464
|
+
SheetContent,
|
|
465
|
+
{
|
|
466
|
+
id,
|
|
467
|
+
onCloseAutoFocus: (event) => {
|
|
468
|
+
event.preventDefault();
|
|
469
|
+
triggerRef.current?.focus();
|
|
470
|
+
},
|
|
471
|
+
"data-sidebar": "sidebar",
|
|
472
|
+
"data-slot": "sidebar",
|
|
473
|
+
"data-mobile": "true",
|
|
474
|
+
className: "w-[var(--sidebar-width)] bg-sidebar p-0 text-sidebar-foreground [&>button]:hidden",
|
|
475
|
+
style: {
|
|
476
|
+
"--sidebar-width": SIDEBAR_WIDTH_MOBILE
|
|
477
|
+
},
|
|
478
|
+
side,
|
|
479
|
+
children: [
|
|
480
|
+
/* @__PURE__ */ jsxRuntime.jsxs(SheetHeader, { className: "sr-only", children: [
|
|
481
|
+
/* @__PURE__ */ jsxRuntime.jsx(SheetTitle, { children: mobileTitle ?? "Consumer navigation" }),
|
|
482
|
+
/* @__PURE__ */ jsxRuntime.jsx(SheetDescription, { children: mobileDescription ?? "Displays the mobile sidebar." })
|
|
483
|
+
] }),
|
|
484
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex h-full w-full flex-col", children })
|
|
485
|
+
]
|
|
486
|
+
}
|
|
487
|
+
) });
|
|
488
|
+
}
|
|
489
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
490
|
+
"div",
|
|
491
|
+
{
|
|
492
|
+
ref,
|
|
493
|
+
id,
|
|
494
|
+
"data-slot": "sidebar",
|
|
495
|
+
className: "group peer hidden text-sidebar-foreground md:block",
|
|
496
|
+
"data-state": state,
|
|
497
|
+
"data-collapsible": state === "collapsed" ? collapsible : "",
|
|
498
|
+
"data-variant": variant,
|
|
499
|
+
"data-side": side,
|
|
500
|
+
children: [
|
|
501
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
502
|
+
"div",
|
|
503
|
+
{
|
|
504
|
+
className: cn(
|
|
505
|
+
"relative w-[var(--sidebar-width)] bg-transparent transition-[width] duration-[var(--motion-duration-base)] ease-[var(--motion-easing-out)]",
|
|
506
|
+
"group-data-[collapsible=offcanvas]:w-0",
|
|
507
|
+
"group-data-[side=right]:rotate-180",
|
|
508
|
+
variant === "floating" || variant === "inset" ? "group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)_+_theme(spacing.4))]" : "group-data-[collapsible=icon]:w-[var(--sidebar-width-icon)]"
|
|
509
|
+
)
|
|
510
|
+
}
|
|
511
|
+
),
|
|
512
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
513
|
+
"div",
|
|
514
|
+
{
|
|
515
|
+
className: cn(
|
|
516
|
+
"fixed top-0 bottom-0 z-10 hidden h-svh w-[var(--sidebar-width)] transition-[left,right,width] duration-[var(--motion-duration-base)] ease-[var(--motion-easing-out)] md:flex",
|
|
517
|
+
side === "left" ? "left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]" : "right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]",
|
|
518
|
+
// Adjust the padding for floating and inset variants.
|
|
519
|
+
variant === "floating" || variant === "inset" ? "p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)_+_theme(spacing.4)_+2px)]" : "group-data-[collapsible=icon]:w-[var(--sidebar-width-icon)] group-data-[side=left]:border-r group-data-[side=right]:border-l",
|
|
520
|
+
className
|
|
521
|
+
),
|
|
522
|
+
...props,
|
|
523
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
524
|
+
"div",
|
|
525
|
+
{
|
|
526
|
+
"data-sidebar": "sidebar",
|
|
527
|
+
className: "flex h-full w-full flex-col bg-sidebar group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:border group-data-[variant=floating]:border-sidebar-border group-data-[variant=floating]:shadow",
|
|
528
|
+
children
|
|
529
|
+
}
|
|
530
|
+
)
|
|
531
|
+
}
|
|
532
|
+
)
|
|
533
|
+
]
|
|
534
|
+
}
|
|
535
|
+
);
|
|
536
|
+
}
|
|
537
|
+
);
|
|
538
|
+
Sidebar.displayName = "Sidebar";
|
|
539
|
+
var SidebarTrigger = React7__namespace.forwardRef(({ className, onClick, label, ...props }, ref) => {
|
|
540
|
+
const { toggleSidebar, triggerRef, open, openMobile, isMobile } = useSidebar();
|
|
541
|
+
const isExpanded = isMobile ? openMobile : open;
|
|
542
|
+
const triggerLabel = label ?? props["aria-label"] ?? "Toggle consumer navigation";
|
|
543
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
544
|
+
Button,
|
|
545
|
+
{
|
|
546
|
+
ref: (node) => {
|
|
547
|
+
triggerRef.current = node;
|
|
548
|
+
if (typeof ref === "function") ref(node);
|
|
549
|
+
else if (ref) ref.current = node;
|
|
550
|
+
},
|
|
551
|
+
"data-sidebar": "trigger",
|
|
552
|
+
"data-slot": "sidebar-trigger",
|
|
553
|
+
variant: "ghost",
|
|
554
|
+
size: "icon",
|
|
555
|
+
className,
|
|
556
|
+
"aria-label": triggerLabel,
|
|
557
|
+
"aria-expanded": isExpanded,
|
|
558
|
+
"aria-controls": props["aria-controls"] ?? "consumer-sidebar",
|
|
559
|
+
onClick: (event) => {
|
|
560
|
+
onClick?.(event);
|
|
561
|
+
toggleSidebar();
|
|
562
|
+
},
|
|
563
|
+
...props,
|
|
564
|
+
children: [
|
|
565
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.PanelLeft, {}),
|
|
566
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "sr-only", children: triggerLabel })
|
|
567
|
+
]
|
|
568
|
+
}
|
|
569
|
+
);
|
|
570
|
+
});
|
|
571
|
+
SidebarTrigger.displayName = "SidebarTrigger";
|
|
572
|
+
var SidebarRail = React7__namespace.forwardRef(({ className, label, ...props }, ref) => {
|
|
573
|
+
const { toggleSidebar } = useSidebar();
|
|
574
|
+
const railLabel = label ?? props["aria-label"] ?? "Toggle Sidebar";
|
|
575
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
576
|
+
"button",
|
|
577
|
+
{
|
|
578
|
+
ref,
|
|
579
|
+
"data-sidebar": "rail",
|
|
580
|
+
"aria-label": railLabel,
|
|
581
|
+
tabIndex: -1,
|
|
582
|
+
onClick: toggleSidebar,
|
|
583
|
+
title: railLabel,
|
|
584
|
+
className: cn(
|
|
585
|
+
"absolute inset-y-0 z-20 hidden w-4 -translate-x-1/2 transition-all ease-linear after:absolute after:inset-y-0 after:left-1/2 after:w-[2px] hover:after:bg-sidebar-border group-data-[side=left]:-right-4 group-data-[side=right]:left-0 sm:flex",
|
|
586
|
+
"[[data-side=left]_&]:cursor-w-resize [[data-side=right]_&]:cursor-e-resize",
|
|
587
|
+
"[[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-state=collapsed]_&]:cursor-w-resize",
|
|
588
|
+
"group-data-[collapsible=offcanvas]:translate-x-0 group-data-[collapsible=offcanvas]:after:left-full group-data-[collapsible=offcanvas]:hover:bg-sidebar",
|
|
589
|
+
"[[data-side=left][data-collapsible=offcanvas]_&]:-right-2",
|
|
590
|
+
"[[data-side=right][data-collapsible=offcanvas]_&]:-left-2",
|
|
591
|
+
className
|
|
592
|
+
),
|
|
593
|
+
...props
|
|
594
|
+
}
|
|
595
|
+
);
|
|
596
|
+
});
|
|
597
|
+
SidebarRail.displayName = "SidebarRail";
|
|
598
|
+
var SidebarInset = React7__namespace.forwardRef(({ className, ...props }, ref) => {
|
|
599
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
600
|
+
"main",
|
|
601
|
+
{
|
|
602
|
+
ref,
|
|
603
|
+
className: cn(
|
|
604
|
+
"relative flex w-full flex-1 flex-col bg-background",
|
|
605
|
+
"md:peer-data-[variant=inset]:m-2 md:peer-data-[state=collapsed]:peer-data-[variant=inset]:ml-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow",
|
|
606
|
+
className
|
|
607
|
+
),
|
|
608
|
+
...props
|
|
609
|
+
}
|
|
610
|
+
);
|
|
611
|
+
});
|
|
612
|
+
SidebarInset.displayName = "SidebarInset";
|
|
613
|
+
var SidebarInput = React7__namespace.forwardRef(({ className, ...props }, ref) => {
|
|
614
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
615
|
+
Input,
|
|
616
|
+
{
|
|
617
|
+
ref,
|
|
618
|
+
"data-sidebar": "input",
|
|
619
|
+
className: cn(
|
|
620
|
+
"h-8 w-full bg-background shadow-none focus-visible:ring-2 focus-visible:ring-sidebar-ring",
|
|
621
|
+
className
|
|
622
|
+
),
|
|
623
|
+
...props
|
|
624
|
+
}
|
|
625
|
+
);
|
|
626
|
+
});
|
|
627
|
+
SidebarInput.displayName = "SidebarInput";
|
|
628
|
+
var SidebarHeader = React7__namespace.forwardRef(({ className, ...props }, ref) => {
|
|
629
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
630
|
+
"div",
|
|
631
|
+
{
|
|
632
|
+
ref,
|
|
633
|
+
"data-sidebar": "header",
|
|
634
|
+
className: cn("flex flex-col gap-2 p-2", className),
|
|
635
|
+
...props
|
|
636
|
+
}
|
|
637
|
+
);
|
|
638
|
+
});
|
|
639
|
+
SidebarHeader.displayName = "SidebarHeader";
|
|
640
|
+
var SidebarFooter = React7__namespace.forwardRef(({ className, ...props }, ref) => {
|
|
641
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
642
|
+
"div",
|
|
643
|
+
{
|
|
644
|
+
ref,
|
|
645
|
+
"data-sidebar": "footer",
|
|
646
|
+
className: cn("flex flex-col gap-2 p-2", className),
|
|
647
|
+
...props
|
|
648
|
+
}
|
|
649
|
+
);
|
|
650
|
+
});
|
|
651
|
+
SidebarFooter.displayName = "SidebarFooter";
|
|
652
|
+
var SidebarSeparator = React7__namespace.forwardRef(({ className, ...props }, ref) => {
|
|
653
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
654
|
+
Separator,
|
|
655
|
+
{
|
|
656
|
+
ref,
|
|
657
|
+
"data-sidebar": "separator",
|
|
658
|
+
className: cn("mx-2 w-auto bg-sidebar-border", className),
|
|
659
|
+
...props
|
|
660
|
+
}
|
|
661
|
+
);
|
|
662
|
+
});
|
|
663
|
+
SidebarSeparator.displayName = "SidebarSeparator";
|
|
664
|
+
var SidebarContent = React7__namespace.forwardRef(({ className, ...props }, ref) => {
|
|
665
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
666
|
+
"div",
|
|
667
|
+
{
|
|
668
|
+
ref,
|
|
669
|
+
"data-sidebar": "content",
|
|
670
|
+
className: cn(
|
|
671
|
+
"flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden",
|
|
672
|
+
className
|
|
673
|
+
),
|
|
674
|
+
...props
|
|
675
|
+
}
|
|
676
|
+
);
|
|
677
|
+
});
|
|
678
|
+
SidebarContent.displayName = "SidebarContent";
|
|
679
|
+
var SidebarGroup = React7__namespace.forwardRef(({ className, ...props }, ref) => {
|
|
680
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
681
|
+
"div",
|
|
682
|
+
{
|
|
683
|
+
ref,
|
|
684
|
+
"data-sidebar": "group",
|
|
685
|
+
className: cn("relative flex w-full min-w-0 flex-col p-2", className),
|
|
686
|
+
...props
|
|
687
|
+
}
|
|
688
|
+
);
|
|
689
|
+
});
|
|
690
|
+
SidebarGroup.displayName = "SidebarGroup";
|
|
691
|
+
var SidebarGroupLabel = React7__namespace.forwardRef(({ className, asChild = false, ...props }, ref) => {
|
|
692
|
+
const Comp = asChild ? reactSlot.Slot : "div";
|
|
693
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
694
|
+
Comp,
|
|
695
|
+
{
|
|
696
|
+
ref,
|
|
697
|
+
"data-sidebar": "group-label",
|
|
698
|
+
className: cn(
|
|
699
|
+
"flex h-8 shrink-0 items-center rounded-md px-2 text-xs font-medium text-sidebar-foreground/70 outline-none ring-sidebar-ring transition-[margin,opacity] duration-[var(--motion-duration-base)] ease-[var(--motion-easing-out)] focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0",
|
|
700
|
+
"group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0",
|
|
701
|
+
className
|
|
702
|
+
),
|
|
703
|
+
...props
|
|
704
|
+
}
|
|
705
|
+
);
|
|
706
|
+
});
|
|
707
|
+
SidebarGroupLabel.displayName = "SidebarGroupLabel";
|
|
708
|
+
var SidebarGroupAction = React7__namespace.forwardRef(({ className, asChild = false, ...props }, ref) => {
|
|
709
|
+
const Comp = asChild ? reactSlot.Slot : "button";
|
|
710
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
711
|
+
Comp,
|
|
712
|
+
{
|
|
713
|
+
ref,
|
|
714
|
+
"data-sidebar": "group-action",
|
|
715
|
+
className: cn(
|
|
716
|
+
"absolute right-3 top-3.5 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-none ring-sidebar-ring transition-transform hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0",
|
|
717
|
+
// Increases the hit area of the button on mobile.
|
|
718
|
+
"after:absolute after:-inset-2 after:md:hidden",
|
|
719
|
+
"group-data-[collapsible=icon]:hidden",
|
|
720
|
+
className
|
|
721
|
+
),
|
|
722
|
+
...props
|
|
723
|
+
}
|
|
724
|
+
);
|
|
725
|
+
});
|
|
726
|
+
SidebarGroupAction.displayName = "SidebarGroupAction";
|
|
727
|
+
var SidebarGroupContent = React7__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
728
|
+
"div",
|
|
729
|
+
{
|
|
730
|
+
ref,
|
|
731
|
+
"data-sidebar": "group-content",
|
|
732
|
+
className: cn("w-full text-sm", className),
|
|
733
|
+
...props
|
|
734
|
+
}
|
|
735
|
+
));
|
|
736
|
+
SidebarGroupContent.displayName = "SidebarGroupContent";
|
|
737
|
+
var SidebarMenu = React7__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
738
|
+
"ul",
|
|
739
|
+
{
|
|
740
|
+
ref,
|
|
741
|
+
"data-sidebar": "menu",
|
|
742
|
+
className: cn("flex w-full min-w-0 flex-col gap-1", className),
|
|
743
|
+
...props
|
|
744
|
+
}
|
|
745
|
+
));
|
|
746
|
+
SidebarMenu.displayName = "SidebarMenu";
|
|
747
|
+
var SidebarMenuItem = React7__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
748
|
+
"li",
|
|
749
|
+
{
|
|
750
|
+
ref,
|
|
751
|
+
"data-sidebar": "menu-item",
|
|
752
|
+
className: cn("group/menu-item relative", className),
|
|
753
|
+
...props
|
|
754
|
+
}
|
|
755
|
+
));
|
|
756
|
+
SidebarMenuItem.displayName = "SidebarMenuItem";
|
|
757
|
+
var sidebarMenuButtonVariants = classVarianceAuthority.cva(
|
|
758
|
+
"peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm outline-none ring-sidebar-ring transition-colors hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 group-has-[[data-sidebar=menu-action]]/menu-item:pr-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-accent data-[active=true]:font-medium data-[active=true]:text-sidebar-accent-foreground data-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-accent-foreground group-data-[collapsible=icon]:!size-8 group-data-[collapsible=icon]:!p-2 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0",
|
|
759
|
+
{
|
|
760
|
+
variants: {
|
|
761
|
+
variant: {
|
|
762
|
+
default: "hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",
|
|
763
|
+
outline: "bg-background shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]"
|
|
764
|
+
},
|
|
765
|
+
size: {
|
|
766
|
+
default: "h-[var(--control-height)] text-sm",
|
|
767
|
+
sm: "h-7 text-xs",
|
|
768
|
+
lg: "h-12 text-sm group-data-[collapsible=icon]:!p-0"
|
|
769
|
+
}
|
|
770
|
+
},
|
|
771
|
+
defaultVariants: {
|
|
772
|
+
variant: "default",
|
|
773
|
+
size: "default"
|
|
774
|
+
}
|
|
775
|
+
}
|
|
776
|
+
);
|
|
777
|
+
var SidebarMenuButton = React7__namespace.forwardRef(
|
|
778
|
+
({
|
|
779
|
+
asChild = false,
|
|
780
|
+
isActive = false,
|
|
781
|
+
variant = "default",
|
|
782
|
+
size = "default",
|
|
783
|
+
tooltip,
|
|
784
|
+
className,
|
|
785
|
+
...props
|
|
786
|
+
}, ref) => {
|
|
787
|
+
const Comp = asChild ? reactSlot.Slot : "button";
|
|
788
|
+
const { isMobile, state } = useSidebar();
|
|
789
|
+
const button = /* @__PURE__ */ jsxRuntime.jsx(
|
|
790
|
+
Comp,
|
|
791
|
+
{
|
|
792
|
+
ref,
|
|
793
|
+
"data-sidebar": "menu-button",
|
|
794
|
+
"data-size": size,
|
|
795
|
+
"data-active": isActive,
|
|
796
|
+
className: cn(sidebarMenuButtonVariants({ variant, size }), className),
|
|
797
|
+
...props
|
|
798
|
+
}
|
|
799
|
+
);
|
|
800
|
+
if (!tooltip) {
|
|
801
|
+
return button;
|
|
802
|
+
}
|
|
803
|
+
if (typeof tooltip === "string") {
|
|
804
|
+
tooltip = {
|
|
805
|
+
children: tooltip
|
|
806
|
+
};
|
|
807
|
+
}
|
|
808
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(Tooltip, { children: [
|
|
809
|
+
/* @__PURE__ */ jsxRuntime.jsx(TooltipTrigger, { asChild: true, children: button }),
|
|
810
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
811
|
+
TooltipContent,
|
|
812
|
+
{
|
|
813
|
+
side: "right",
|
|
814
|
+
align: "center",
|
|
815
|
+
hidden: state !== "collapsed" || isMobile,
|
|
816
|
+
...tooltip
|
|
817
|
+
}
|
|
818
|
+
)
|
|
819
|
+
] });
|
|
820
|
+
}
|
|
821
|
+
);
|
|
822
|
+
SidebarMenuButton.displayName = "SidebarMenuButton";
|
|
823
|
+
var SidebarMenuAction = React7__namespace.forwardRef(({ className, asChild = false, showOnHover = false, ...props }, ref) => {
|
|
824
|
+
const Comp = asChild ? reactSlot.Slot : "button";
|
|
825
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
826
|
+
Comp,
|
|
827
|
+
{
|
|
828
|
+
ref,
|
|
829
|
+
"data-sidebar": "menu-action",
|
|
830
|
+
className: cn(
|
|
831
|
+
"absolute right-1 top-1.5 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-none ring-sidebar-ring transition-transform hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 peer-hover/menu-button:text-sidebar-accent-foreground [&>svg]:size-4 [&>svg]:shrink-0",
|
|
832
|
+
// Increases the hit area of the button on mobile.
|
|
833
|
+
"after:absolute after:-inset-2 after:md:hidden",
|
|
834
|
+
"peer-data-[size=sm]/menu-button:top-1",
|
|
835
|
+
"peer-data-[size=default]/menu-button:top-1.5",
|
|
836
|
+
"peer-data-[size=lg]/menu-button:top-2.5",
|
|
837
|
+
"group-data-[collapsible=icon]:hidden",
|
|
838
|
+
showOnHover && "group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 data-[state=open]:opacity-100 peer-data-[active=true]/menu-button:text-sidebar-accent-foreground md:opacity-0",
|
|
839
|
+
className
|
|
840
|
+
),
|
|
841
|
+
...props
|
|
842
|
+
}
|
|
843
|
+
);
|
|
844
|
+
});
|
|
845
|
+
SidebarMenuAction.displayName = "SidebarMenuAction";
|
|
846
|
+
var SidebarMenuBadge = React7__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
847
|
+
"div",
|
|
848
|
+
{
|
|
849
|
+
ref,
|
|
850
|
+
"data-sidebar": "menu-badge",
|
|
851
|
+
className: cn(
|
|
852
|
+
"pointer-events-none absolute right-1 flex h-5 min-w-5 select-none items-center justify-center rounded-md px-1 text-xs font-medium tabular-nums text-sidebar-foreground",
|
|
853
|
+
"peer-hover/menu-button:text-sidebar-accent-foreground peer-data-[active=true]/menu-button:text-sidebar-accent-foreground",
|
|
854
|
+
"peer-data-[size=sm]/menu-button:top-1",
|
|
855
|
+
"peer-data-[size=default]/menu-button:top-1.5",
|
|
856
|
+
"peer-data-[size=lg]/menu-button:top-2.5",
|
|
857
|
+
"group-data-[collapsible=icon]:hidden",
|
|
858
|
+
className
|
|
859
|
+
),
|
|
860
|
+
...props
|
|
861
|
+
}
|
|
862
|
+
));
|
|
863
|
+
SidebarMenuBadge.displayName = "SidebarMenuBadge";
|
|
864
|
+
var SidebarMenuSkeleton = React7__namespace.forwardRef(({ className, showIcon = false, ...props }, ref) => {
|
|
865
|
+
const width = React7__namespace.useMemo(() => {
|
|
866
|
+
return `${Math.floor(Math.random() * 40) + 50}%`;
|
|
867
|
+
}, []);
|
|
868
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
869
|
+
"div",
|
|
870
|
+
{
|
|
871
|
+
ref,
|
|
872
|
+
"data-sidebar": "menu-skeleton",
|
|
873
|
+
className: cn("flex h-8 items-center gap-2 rounded-md px-2", className),
|
|
874
|
+
...props,
|
|
875
|
+
children: [
|
|
876
|
+
showIcon && /* @__PURE__ */ jsxRuntime.jsx(
|
|
877
|
+
Skeleton,
|
|
878
|
+
{
|
|
879
|
+
className: "size-4 rounded-md",
|
|
880
|
+
"data-sidebar": "menu-skeleton-icon"
|
|
881
|
+
}
|
|
882
|
+
),
|
|
883
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
884
|
+
Skeleton,
|
|
885
|
+
{
|
|
886
|
+
className: "h-4 max-w-[var(--skeleton-width)] flex-1",
|
|
887
|
+
"data-sidebar": "menu-skeleton-text",
|
|
888
|
+
style: {
|
|
889
|
+
"--skeleton-width": width
|
|
890
|
+
}
|
|
891
|
+
}
|
|
892
|
+
)
|
|
893
|
+
]
|
|
894
|
+
}
|
|
895
|
+
);
|
|
896
|
+
});
|
|
897
|
+
SidebarMenuSkeleton.displayName = "SidebarMenuSkeleton";
|
|
898
|
+
var SidebarMenuSub = React7__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
899
|
+
"ul",
|
|
900
|
+
{
|
|
901
|
+
ref,
|
|
902
|
+
"data-sidebar": "menu-sub",
|
|
903
|
+
className: cn(
|
|
904
|
+
"mx-3.5 flex min-w-0 translate-x-px flex-col gap-1 border-l border-sidebar-border px-2.5 py-0.5",
|
|
905
|
+
"group-data-[collapsible=icon]:hidden",
|
|
906
|
+
className
|
|
907
|
+
),
|
|
908
|
+
...props
|
|
909
|
+
}
|
|
910
|
+
));
|
|
911
|
+
SidebarMenuSub.displayName = "SidebarMenuSub";
|
|
912
|
+
var SidebarMenuSubItem = React7__namespace.forwardRef(({ ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("li", { ref, ...props }));
|
|
913
|
+
SidebarMenuSubItem.displayName = "SidebarMenuSubItem";
|
|
914
|
+
var SidebarMenuSubButton = React7__namespace.forwardRef(({ asChild = false, size = "md", isActive, className, ...props }, ref) => {
|
|
915
|
+
const Comp = asChild ? reactSlot.Slot : "a";
|
|
916
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
917
|
+
Comp,
|
|
918
|
+
{
|
|
919
|
+
ref,
|
|
920
|
+
"data-sidebar": "menu-sub-button",
|
|
921
|
+
"data-size": size,
|
|
922
|
+
"data-active": isActive,
|
|
923
|
+
className: cn(
|
|
924
|
+
"flex h-7 min-w-0 -translate-x-px items-center gap-2 overflow-hidden rounded-md px-2 text-sidebar-foreground outline-none ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0 [&>svg]:text-sidebar-accent-foreground",
|
|
925
|
+
"data-[active=true]:bg-sidebar-accent data-[active=true]:text-sidebar-accent-foreground",
|
|
926
|
+
size === "sm" && "text-xs",
|
|
927
|
+
size === "md" && "text-sm",
|
|
928
|
+
"group-data-[collapsible=icon]:hidden",
|
|
929
|
+
className
|
|
930
|
+
),
|
|
931
|
+
...props
|
|
932
|
+
}
|
|
933
|
+
);
|
|
934
|
+
});
|
|
935
|
+
SidebarMenuSubButton.displayName = "SidebarMenuSubButton";
|
|
936
|
+
|
|
937
|
+
exports.Sidebar = Sidebar;
|
|
938
|
+
exports.SidebarContent = SidebarContent;
|
|
939
|
+
exports.SidebarFooter = SidebarFooter;
|
|
940
|
+
exports.SidebarGroup = SidebarGroup;
|
|
941
|
+
exports.SidebarGroupAction = SidebarGroupAction;
|
|
942
|
+
exports.SidebarGroupContent = SidebarGroupContent;
|
|
943
|
+
exports.SidebarGroupLabel = SidebarGroupLabel;
|
|
944
|
+
exports.SidebarHeader = SidebarHeader;
|
|
945
|
+
exports.SidebarInput = SidebarInput;
|
|
946
|
+
exports.SidebarInset = SidebarInset;
|
|
947
|
+
exports.SidebarMenu = SidebarMenu;
|
|
948
|
+
exports.SidebarMenuAction = SidebarMenuAction;
|
|
949
|
+
exports.SidebarMenuBadge = SidebarMenuBadge;
|
|
950
|
+
exports.SidebarMenuButton = SidebarMenuButton;
|
|
951
|
+
exports.SidebarMenuItem = SidebarMenuItem;
|
|
952
|
+
exports.SidebarMenuSkeleton = SidebarMenuSkeleton;
|
|
953
|
+
exports.SidebarMenuSub = SidebarMenuSub;
|
|
954
|
+
exports.SidebarMenuSubButton = SidebarMenuSubButton;
|
|
955
|
+
exports.SidebarMenuSubItem = SidebarMenuSubItem;
|
|
956
|
+
exports.SidebarProvider = SidebarProvider;
|
|
957
|
+
exports.SidebarRail = SidebarRail;
|
|
958
|
+
exports.SidebarSeparator = SidebarSeparator;
|
|
959
|
+
exports.SidebarTrigger = SidebarTrigger;
|
|
960
|
+
exports.useSidebar = useSidebar;
|
|
961
|
+
//# sourceMappingURL=sidebar.cjs.map
|
|
962
|
+
//# sourceMappingURL=sidebar.cjs.map
|