@arolariu/components 0.0.37 → 0.0.39
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/CHANGELOG.md +94 -0
- package/CONTRIBUTING.md +371 -0
- package/DEBUGGING.md +401 -0
- package/EXAMPLES.md +1035 -0
- package/LICENSE +21 -21
- package/README.md +627 -0
- package/dist/cjs/components/ui/accordion.cjs +2 -2
- package/dist/cjs/components/ui/accordion.cjs.map +1 -1
- package/dist/cjs/components/ui/alert-dialog.cjs +7 -7
- package/dist/cjs/components/ui/alert-dialog.cjs.map +1 -1
- package/dist/cjs/components/ui/alert.cjs +2 -2
- package/dist/cjs/components/ui/alert.cjs.map +1 -1
- package/dist/cjs/components/ui/aspect-ratio.cjs.map +1 -1
- package/dist/cjs/components/ui/avatar.cjs +2 -2
- package/dist/cjs/components/ui/avatar.cjs.map +1 -1
- package/dist/cjs/components/ui/background-beams.cjs +1 -11
- package/dist/cjs/components/ui/background-beams.cjs.map +1 -1
- package/dist/cjs/components/ui/badge.cjs +2 -2
- package/dist/cjs/components/ui/badge.cjs.map +1 -1
- package/dist/cjs/components/ui/breadcrumb.cjs +5 -5
- package/dist/cjs/components/ui/breadcrumb.cjs.map +1 -1
- package/dist/cjs/components/ui/bubble-background.cjs.map +1 -1
- package/dist/cjs/components/ui/button.cjs.map +1 -1
- package/dist/cjs/components/ui/calendar.cjs +89 -35
- package/dist/cjs/components/ui/calendar.cjs.map +1 -1
- package/dist/cjs/components/ui/card.cjs +5 -5
- package/dist/cjs/components/ui/card.cjs.map +1 -1
- package/dist/cjs/components/ui/carousel.cjs +3 -3
- package/dist/cjs/components/ui/carousel.cjs.map +1 -1
- package/dist/cjs/components/ui/chart.cjs +14 -14
- package/dist/cjs/components/ui/chart.cjs.map +1 -1
- package/dist/cjs/components/ui/checkbox.cjs.map +1 -1
- package/dist/cjs/components/ui/collapsible.cjs +2 -2
- package/dist/cjs/components/ui/collapsible.cjs.map +1 -1
- package/dist/cjs/components/ui/command.cjs +8 -7
- package/dist/cjs/components/ui/command.cjs.map +1 -1
- package/dist/cjs/components/ui/context-menu.cjs +9 -9
- package/dist/cjs/components/ui/context-menu.cjs.map +1 -1
- package/dist/cjs/components/ui/counting-number.cjs.map +1 -1
- package/dist/cjs/components/ui/dialog.cjs +8 -7
- package/dist/cjs/components/ui/dialog.cjs.map +1 -1
- package/dist/cjs/components/ui/dot-background.cjs.map +1 -1
- package/dist/cjs/components/ui/drawer.cjs +6 -6
- package/dist/cjs/components/ui/drawer.cjs.map +1 -1
- package/dist/cjs/components/ui/dropdown-menu.cjs +10 -10
- package/dist/cjs/components/ui/dropdown-menu.cjs.map +1 -1
- package/dist/cjs/components/ui/dropdrawer.cjs +627 -0
- package/dist/cjs/components/ui/dropdrawer.cjs.map +1 -0
- package/dist/cjs/components/ui/fireworks-background.cjs.map +1 -1
- package/dist/cjs/components/ui/flip-button.cjs.map +1 -1
- package/dist/cjs/components/ui/form.cjs +5 -5
- package/dist/cjs/components/ui/form.cjs.map +1 -1
- package/dist/cjs/components/ui/gradient-background.cjs.map +1 -1
- package/dist/cjs/components/ui/gradient-text.cjs.map +1 -1
- package/dist/cjs/components/ui/highlight-text.cjs.map +1 -1
- package/dist/cjs/components/ui/hole-background.cjs.map +1 -1
- package/dist/cjs/components/ui/hover-card.cjs +2 -2
- package/dist/cjs/components/ui/hover-card.cjs.map +1 -1
- package/dist/cjs/components/ui/input-otp.cjs +3 -3
- package/dist/cjs/components/ui/input-otp.cjs.map +1 -1
- package/dist/cjs/components/ui/input.cjs.map +1 -1
- package/dist/cjs/components/ui/label.cjs.map +1 -1
- package/dist/cjs/components/ui/menubar.cjs +9 -9
- package/dist/cjs/components/ui/menubar.cjs.map +1 -1
- package/dist/cjs/components/ui/navigation-menu.cjs +4 -4
- package/dist/cjs/components/ui/navigation-menu.cjs.map +1 -1
- package/dist/cjs/components/ui/pagination.cjs +3 -3
- package/dist/cjs/components/ui/pagination.cjs.map +1 -1
- package/dist/cjs/components/ui/popover.cjs.map +1 -1
- package/dist/cjs/components/ui/progress.cjs.map +1 -1
- package/dist/cjs/components/ui/radio-group.cjs.map +1 -1
- package/dist/cjs/components/ui/resizable.cjs +1 -1
- package/dist/cjs/components/ui/resizable.cjs.map +1 -1
- package/dist/cjs/components/ui/ripple-button.cjs.map +1 -1
- package/dist/cjs/components/ui/scratcher.cjs.map +1 -1
- package/dist/cjs/components/ui/scroll-area.cjs.map +1 -1
- package/dist/cjs/components/ui/select.cjs +5 -5
- package/dist/cjs/components/ui/select.cjs.map +1 -1
- package/dist/cjs/components/ui/separator.cjs +1 -1
- package/dist/cjs/components/ui/separator.cjs.map +1 -1
- package/dist/cjs/components/ui/sheet.cjs +5 -5
- package/dist/cjs/components/ui/sheet.cjs.map +1 -1
- package/dist/cjs/components/ui/sidebar.cjs +19 -19
- package/dist/cjs/components/ui/sidebar.cjs.map +1 -1
- package/dist/cjs/components/ui/skeleton.cjs.map +1 -1
- package/dist/cjs/components/ui/slider.cjs.map +1 -1
- package/dist/cjs/components/ui/sonner.cjs.map +1 -1
- package/dist/cjs/components/ui/switch.cjs.map +1 -1
- package/dist/cjs/components/ui/table.cjs +6 -6
- package/dist/cjs/components/ui/table.cjs.map +1 -1
- package/dist/cjs/components/ui/tabs.cjs +2 -2
- package/dist/cjs/components/ui/tabs.cjs.map +1 -1
- package/dist/cjs/components/ui/textarea.cjs.map +1 -1
- package/dist/cjs/components/ui/toggle-group.cjs +2 -2
- package/dist/cjs/components/ui/toggle-group.cjs.map +1 -1
- package/dist/cjs/components/ui/toggle.cjs +2 -2
- package/dist/cjs/components/ui/toggle.cjs.map +1 -1
- package/dist/cjs/components/ui/tooltip.cjs +2 -2
- package/dist/cjs/components/ui/tooltip.cjs.map +1 -1
- package/dist/cjs/hooks/use-mobile.cjs.map +1 -1
- package/dist/cjs/index.cjs +268 -232
- package/dist/cjs/index.cjs.map +1 -0
- package/dist/cjs/index.css +2558 -193
- package/dist/cjs/index.css.map +1 -0
- package/dist/cjs/lib/utils.cjs.map +1 -1
- package/dist/esm/components/ui/accordion.js +14 -14
- package/dist/esm/components/ui/accordion.js.map +1 -1
- package/dist/esm/components/ui/alert-dialog.js +25 -25
- package/dist/esm/components/ui/alert-dialog.js.map +1 -1
- package/dist/esm/components/ui/alert.js +10 -10
- package/dist/esm/components/ui/alert.js.map +1 -1
- package/dist/esm/components/ui/aspect-ratio.js +3 -3
- package/dist/esm/components/ui/aspect-ratio.js.map +1 -1
- package/dist/esm/components/ui/avatar.js +9 -9
- package/dist/esm/components/ui/avatar.js.map +1 -1
- package/dist/esm/components/ui/background-beams.js +20 -20
- package/dist/esm/components/ui/background-beams.js.map +1 -1
- package/dist/esm/components/ui/badge.js +8 -8
- package/dist/esm/components/ui/badge.js.map +1 -1
- package/dist/esm/components/ui/breadcrumb.js +21 -21
- package/dist/esm/components/ui/breadcrumb.js.map +1 -1
- package/dist/esm/components/ui/bubble-background.js +31 -31
- package/dist/esm/components/ui/bubble-background.js.map +1 -1
- package/dist/esm/components/ui/button.js +8 -8
- package/dist/esm/components/ui/button.js.map +1 -1
- package/dist/esm/components/ui/calendar.js +93 -42
- package/dist/esm/components/ui/calendar.js.map +1 -1
- package/dist/esm/components/ui/card.js +16 -16
- package/dist/esm/components/ui/card.js.map +1 -1
- package/dist/esm/components/ui/carousel.js +33 -33
- package/dist/esm/components/ui/carousel.js.map +1 -1
- package/dist/esm/components/ui/chart.js +45 -45
- package/dist/esm/components/ui/chart.js.map +1 -1
- package/dist/esm/components/ui/checkbox.js +8 -8
- package/dist/esm/components/ui/checkbox.js.map +1 -1
- package/dist/esm/components/ui/collapsible.js +8 -8
- package/dist/esm/components/ui/collapsible.js.map +1 -1
- package/dist/esm/components/ui/command.js +33 -32
- package/dist/esm/components/ui/command.js.map +1 -1
- package/dist/esm/components/ui/context-menu.js +36 -36
- package/dist/esm/components/ui/context-menu.js.map +1 -1
- package/dist/esm/components/ui/counting-number.js +12 -12
- package/dist/esm/components/ui/counting-number.js.map +1 -1
- package/dist/esm/components/ui/dialog.js +27 -26
- package/dist/esm/components/ui/dialog.js.map +1 -1
- package/dist/esm/components/ui/dot-background.js +15 -15
- package/dist/esm/components/ui/dot-background.js.map +1 -1
- package/dist/esm/components/ui/drawer.js +24 -24
- package/dist/esm/components/ui/drawer.js.map +1 -1
- package/dist/esm/components/ui/dropdown-menu.js +36 -36
- package/dist/esm/components/ui/dropdown-menu.js.map +1 -1
- package/dist/esm/components/ui/dropdrawer.js +563 -0
- package/dist/esm/components/ui/dropdrawer.js.map +1 -0
- package/dist/esm/components/ui/fireworks-background.js +12 -12
- package/dist/esm/components/ui/fireworks-background.js.map +1 -1
- package/dist/esm/components/ui/flip-button.js +12 -12
- package/dist/esm/components/ui/flip-button.js.map +1 -1
- package/dist/esm/components/ui/form.js +26 -26
- package/dist/esm/components/ui/form.js.map +1 -1
- package/dist/esm/components/ui/gradient-background.js +7 -7
- package/dist/esm/components/ui/gradient-background.js.map +1 -1
- package/dist/esm/components/ui/gradient-text.js +9 -9
- package/dist/esm/components/ui/gradient-text.js.map +1 -1
- package/dist/esm/components/ui/highlight-text.js +10 -10
- package/dist/esm/components/ui/highlight-text.js.map +1 -1
- package/dist/esm/components/ui/hole-background.js +30 -30
- package/dist/esm/components/ui/hole-background.js.map +1 -1
- package/dist/esm/components/ui/hover-card.js +8 -8
- package/dist/esm/components/ui/hover-card.js.map +1 -1
- package/dist/esm/components/ui/input-otp.js +17 -17
- package/dist/esm/components/ui/input-otp.js.map +1 -1
- package/dist/esm/components/ui/input.js +4 -4
- package/dist/esm/components/ui/input.js.map +1 -1
- package/dist/esm/components/ui/label.js +5 -5
- package/dist/esm/components/ui/label.js.map +1 -1
- package/dist/esm/components/ui/menubar.js +39 -39
- package/dist/esm/components/ui/menubar.js.map +1 -1
- package/dist/esm/components/ui/navigation-menu.js +27 -27
- package/dist/esm/components/ui/navigation-menu.js.map +1 -1
- package/dist/esm/components/ui/pagination.js +23 -23
- package/dist/esm/components/ui/pagination.js.map +1 -1
- package/dist/esm/components/ui/popover.js +9 -9
- package/dist/esm/components/ui/popover.js.map +1 -1
- package/dist/esm/components/ui/progress.js +6 -6
- package/dist/esm/components/ui/progress.js.map +1 -1
- package/dist/esm/components/ui/radio-group.js +10 -10
- package/dist/esm/components/ui/radio-group.js.map +1 -1
- package/dist/esm/components/ui/resizable.js +11 -11
- package/dist/esm/components/ui/resizable.js.map +1 -1
- package/dist/esm/components/ui/ripple-button.js +14 -14
- package/dist/esm/components/ui/ripple-button.js.map +1 -1
- package/dist/esm/components/ui/scratcher.js +13 -13
- package/dist/esm/components/ui/scratcher.js.map +1 -1
- package/dist/esm/components/ui/scroll-area.js +11 -11
- package/dist/esm/components/ui/scroll-area.js.map +1 -1
- package/dist/esm/components/ui/select.js +34 -34
- package/dist/esm/components/ui/select.js.map +1 -1
- package/dist/esm/components/ui/separator.js +6 -6
- package/dist/esm/components/ui/separator.js.map +1 -1
- package/dist/esm/components/ui/sheet.js +25 -25
- package/dist/esm/components/ui/sheet.js.map +1 -1
- package/dist/esm/components/ui/sidebar.js +96 -96
- package/dist/esm/components/ui/sidebar.js.map +1 -1
- package/dist/esm/components/ui/skeleton.js +4 -4
- package/dist/esm/components/ui/skeleton.js.map +1 -1
- package/dist/esm/components/ui/slider.js +12 -12
- package/dist/esm/components/ui/slider.js.map +1 -1
- package/dist/esm/components/ui/sonner.js +7 -8
- package/dist/esm/components/ui/sonner.js.map +1 -1
- package/dist/esm/components/ui/switch.js +7 -7
- package/dist/esm/components/ui/switch.js.map +1 -1
- package/dist/esm/components/ui/table.js +19 -19
- package/dist/esm/components/ui/table.js.map +1 -1
- package/dist/esm/components/ui/tabs.js +11 -11
- package/dist/esm/components/ui/tabs.js.map +1 -1
- package/dist/esm/components/ui/textarea.js +4 -4
- package/dist/esm/components/ui/textarea.js.map +1 -1
- package/dist/esm/components/ui/toggle-group.js +12 -12
- package/dist/esm/components/ui/toggle-group.js.map +1 -1
- package/dist/esm/components/ui/toggle.js +7 -7
- package/dist/esm/components/ui/toggle.js.map +1 -1
- package/dist/esm/components/ui/tooltip.js +11 -11
- package/dist/esm/components/ui/tooltip.js.map +1 -1
- package/dist/esm/hooks/use-mobile.js +3 -3
- package/dist/esm/hooks/use-mobile.js.map +1 -1
- package/dist/esm/index.css +2558 -193
- package/dist/esm/index.css.map +1 -0
- package/dist/esm/index.js +62 -320
- package/dist/esm/lib/utils.js +3 -3
- package/dist/esm/lib/utils.js.map +1 -1
- package/dist/index.css +2558 -193
- package/dist/index.js +62 -320
- package/dist/types/components/ui/accordion.d.ts +1 -0
- package/dist/types/components/ui/accordion.d.ts.map +1 -0
- package/dist/types/components/ui/alert-dialog.d.ts +1 -0
- package/dist/types/components/ui/alert-dialog.d.ts.map +1 -0
- package/dist/types/components/ui/alert.d.ts +1 -0
- package/dist/types/components/ui/alert.d.ts.map +1 -0
- package/dist/types/components/ui/aspect-ratio.d.ts +1 -0
- package/dist/types/components/ui/aspect-ratio.d.ts.map +1 -0
- package/dist/types/components/ui/avatar.d.ts +1 -0
- package/dist/types/components/ui/avatar.d.ts.map +1 -0
- package/dist/types/components/ui/background-beams.d.ts +2 -1
- package/dist/types/components/ui/background-beams.d.ts.map +1 -0
- package/dist/types/components/ui/badge.d.ts +1 -0
- package/dist/types/components/ui/badge.d.ts.map +1 -0
- package/dist/types/components/ui/breadcrumb.d.ts +1 -0
- package/dist/types/components/ui/breadcrumb.d.ts.map +1 -0
- package/dist/types/components/ui/bubble-background.d.ts +1 -0
- package/dist/types/components/ui/bubble-background.d.ts.map +1 -0
- package/dist/types/components/ui/button.d.ts +1 -0
- package/dist/types/components/ui/button.d.ts.map +1 -0
- package/dist/types/components/ui/calendar.d.ts +8 -3
- package/dist/types/components/ui/calendar.d.ts.map +1 -0
- package/dist/types/components/ui/card.d.ts +1 -0
- package/dist/types/components/ui/card.d.ts.map +1 -0
- package/dist/types/components/ui/carousel.d.ts +1 -0
- package/dist/types/components/ui/carousel.d.ts.map +1 -0
- package/dist/types/components/ui/chart.d.ts +19 -4
- package/dist/types/components/ui/chart.d.ts.map +1 -0
- package/dist/types/components/ui/checkbox.d.ts +1 -0
- package/dist/types/components/ui/checkbox.d.ts.map +1 -0
- package/dist/types/components/ui/collapsible.d.ts +1 -0
- package/dist/types/components/ui/collapsible.d.ts.map +1 -0
- package/dist/types/components/ui/command.d.ts +4 -1
- package/dist/types/components/ui/command.d.ts.map +1 -0
- package/dist/types/components/ui/context-menu.d.ts +1 -0
- package/dist/types/components/ui/context-menu.d.ts.map +1 -0
- package/dist/types/components/ui/counting-number.d.ts +1 -0
- package/dist/types/components/ui/counting-number.d.ts.map +1 -0
- package/dist/types/components/ui/dialog.d.ts +4 -1
- package/dist/types/components/ui/dialog.d.ts.map +1 -0
- package/dist/types/components/ui/dot-background.d.ts +1 -0
- package/dist/types/components/ui/dot-background.d.ts.map +1 -0
- package/dist/types/components/ui/drawer.d.ts +1 -0
- package/dist/types/components/ui/drawer.d.ts.map +1 -0
- package/dist/types/components/ui/dropdown-menu.d.ts +1 -0
- package/dist/types/components/ui/dropdown-menu.d.ts.map +1 -0
- package/dist/types/components/ui/dropdrawer.d.ts +24 -0
- package/dist/types/components/ui/dropdrawer.d.ts.map +1 -0
- package/dist/types/components/ui/fireworks-background.d.ts +1 -0
- package/dist/types/components/ui/fireworks-background.d.ts.map +1 -0
- package/dist/types/components/ui/flip-button.d.ts +1 -0
- package/dist/types/components/ui/flip-button.d.ts.map +1 -0
- package/dist/types/components/ui/form.d.ts +1 -0
- package/dist/types/components/ui/form.d.ts.map +1 -0
- package/dist/types/components/ui/gradient-background.d.ts +1 -0
- package/dist/types/components/ui/gradient-background.d.ts.map +1 -0
- package/dist/types/components/ui/gradient-text.d.ts +1 -0
- package/dist/types/components/ui/gradient-text.d.ts.map +1 -0
- package/dist/types/components/ui/highlight-text.d.ts +1 -0
- package/dist/types/components/ui/highlight-text.d.ts.map +1 -0
- package/dist/types/components/ui/hole-background.d.ts +1 -0
- package/dist/types/components/ui/hole-background.d.ts.map +1 -0
- package/dist/types/components/ui/hover-card.d.ts +1 -0
- package/dist/types/components/ui/hover-card.d.ts.map +1 -0
- package/dist/types/components/ui/input-otp.d.ts +1 -0
- package/dist/types/components/ui/input-otp.d.ts.map +1 -0
- package/dist/types/components/ui/input.d.ts +1 -0
- package/dist/types/components/ui/input.d.ts.map +1 -0
- package/dist/types/components/ui/label.d.ts +1 -0
- package/dist/types/components/ui/label.d.ts.map +1 -0
- package/dist/types/components/ui/menubar.d.ts +1 -0
- package/dist/types/components/ui/menubar.d.ts.map +1 -0
- package/dist/types/components/ui/navigation-menu.d.ts +1 -0
- package/dist/types/components/ui/navigation-menu.d.ts.map +1 -0
- package/dist/types/components/ui/pagination.d.ts +1 -0
- package/dist/types/components/ui/pagination.d.ts.map +1 -0
- package/dist/types/components/ui/popover.d.ts +1 -0
- package/dist/types/components/ui/popover.d.ts.map +1 -0
- package/dist/types/components/ui/progress.d.ts +1 -0
- package/dist/types/components/ui/progress.d.ts.map +1 -0
- package/dist/types/components/ui/radio-group.d.ts +1 -0
- package/dist/types/components/ui/radio-group.d.ts.map +1 -0
- package/dist/types/components/ui/resizable.d.ts +1 -0
- package/dist/types/components/ui/resizable.d.ts.map +1 -0
- package/dist/types/components/ui/ripple-button.d.ts +1 -0
- package/dist/types/components/ui/ripple-button.d.ts.map +1 -0
- package/dist/types/components/ui/scratcher.d.ts +1 -0
- package/dist/types/components/ui/scratcher.d.ts.map +1 -0
- package/dist/types/components/ui/scroll-area.d.ts +1 -0
- package/dist/types/components/ui/scroll-area.d.ts.map +1 -0
- package/dist/types/components/ui/select.d.ts +1 -0
- package/dist/types/components/ui/select.d.ts.map +1 -0
- package/dist/types/components/ui/separator.d.ts +1 -0
- package/dist/types/components/ui/separator.d.ts.map +1 -0
- package/dist/types/components/ui/sheet.d.ts +1 -0
- package/dist/types/components/ui/sheet.d.ts.map +1 -0
- package/dist/types/components/ui/sidebar.d.ts +1 -0
- package/dist/types/components/ui/sidebar.d.ts.map +1 -0
- package/dist/types/components/ui/skeleton.d.ts +1 -0
- package/dist/types/components/ui/skeleton.d.ts.map +1 -0
- package/dist/types/components/ui/slider.d.ts +1 -0
- package/dist/types/components/ui/slider.d.ts.map +1 -0
- package/dist/types/components/ui/sonner.d.ts +1 -0
- package/dist/types/components/ui/sonner.d.ts.map +1 -0
- package/dist/types/components/ui/switch.d.ts +1 -0
- package/dist/types/components/ui/switch.d.ts.map +1 -0
- package/dist/types/components/ui/table.d.ts +1 -0
- package/dist/types/components/ui/table.d.ts.map +1 -0
- package/dist/types/components/ui/tabs.d.ts +1 -0
- package/dist/types/components/ui/tabs.d.ts.map +1 -0
- package/dist/types/components/ui/textarea.d.ts +1 -0
- package/dist/types/components/ui/textarea.d.ts.map +1 -0
- package/dist/types/components/ui/toggle-group.d.ts +1 -0
- package/dist/types/components/ui/toggle-group.d.ts.map +1 -0
- package/dist/types/components/ui/toggle.d.ts +1 -0
- package/dist/types/components/ui/toggle.d.ts.map +1 -0
- package/dist/types/components/ui/tooltip.d.ts +1 -0
- package/dist/types/components/ui/tooltip.d.ts.map +1 -0
- package/dist/types/hooks/use-mobile.d.ts +24 -0
- package/dist/types/hooks/use-mobile.d.ts.map +1 -0
- package/dist/types/index.d.ts +2 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/lib/utils.d.ts +1 -0
- package/dist/types/lib/utils.d.ts.map +1 -0
- package/package.json +103 -71
- package/src/components/ui/accordion.tsx +1 -1
- package/src/components/ui/alert-dialog.tsx +4 -4
- package/src/components/ui/alert.tsx +3 -3
- package/src/components/ui/avatar.tsx +2 -2
- package/src/components/ui/background-beams.tsx +3 -3
- package/src/components/ui/badge.tsx +1 -1
- package/src/components/ui/breadcrumb.tsx +3 -3
- package/src/components/ui/bubble-background.tsx +4 -4
- package/src/components/ui/button.tsx +1 -1
- package/src/components/ui/calendar.tsx +213 -75
- package/src/components/ui/card.tsx +4 -4
- package/src/components/ui/carousel.tsx +6 -6
- package/src/components/ui/chart.tsx +66 -39
- package/src/components/ui/checkbox.tsx +1 -1
- package/src/components/ui/command.tsx +14 -7
- package/src/components/ui/context-menu.tsx +9 -9
- package/src/components/ui/counting-number.tsx +4 -4
- package/src/components/ui/dialog.tsx +17 -9
- package/src/components/ui/dot-background.tsx +2 -2
- package/src/components/ui/drawer.tsx +8 -5
- package/src/components/ui/dropdown-menu.tsx +9 -9
- package/src/components/ui/dropdrawer.tsx +973 -0
- package/src/components/ui/fireworks-background.tsx +12 -12
- package/src/components/ui/flip-button.tsx +6 -6
- package/src/components/ui/form.tsx +6 -6
- package/src/components/ui/gradient-background.tsx +3 -3
- package/src/components/ui/gradient-text.tsx +2 -2
- package/src/components/ui/highlight-text.tsx +3 -3
- package/src/components/ui/hole-background.tsx +9 -9
- package/src/components/ui/hover-card.tsx +1 -1
- package/src/components/ui/input-otp.tsx +2 -2
- package/src/components/ui/input.tsx +5 -6
- package/src/components/ui/label.tsx +1 -1
- package/src/components/ui/menubar.tsx +11 -11
- package/src/components/ui/navigation-menu.tsx +8 -8
- package/src/components/ui/pagination.tsx +1 -1
- package/src/components/ui/popover.tsx +1 -1
- package/src/components/ui/progress.tsx +1 -1
- package/src/components/ui/radio-group.tsx +1 -1
- package/src/components/ui/resizable.tsx +3 -3
- package/src/components/ui/ripple-button.tsx +7 -7
- package/src/components/ui/scratcher.tsx +1 -1
- package/src/components/ui/scroll-area.tsx +1 -1
- package/src/components/ui/select.tsx +8 -8
- package/src/components/ui/separator.tsx +2 -2
- package/src/components/ui/sheet.tsx +4 -4
- package/src/components/ui/sidebar.tsx +18 -18
- package/src/components/ui/skeleton.tsx +1 -1
- package/src/components/ui/slider.tsx +6 -6
- package/src/components/ui/switch.tsx +2 -2
- package/src/components/ui/table.tsx +5 -5
- package/src/components/ui/tabs.tsx +2 -2
- package/src/components/ui/textarea.tsx +1 -1
- package/src/components/ui/toggle-group.tsx +2 -2
- package/src/components/ui/toggle.tsx +1 -1
- package/src/components/ui/tooltip.tsx +1 -1
- package/src/hooks/use-mobile.tsx +44 -19
- package/src/index.css +68 -68
- package/src/index.ts +400 -385
- package/src/lib/utils.ts +10 -10
- package/tailwind.config.mjs +65 -65
- package/tsconfig.json +58 -50
- package/changelog.md +0 -38
- package/readme.md +0 -214
|
@@ -25,65 +25,119 @@ var __webpack_require__ = {};
|
|
|
25
25
|
var __webpack_exports__ = {};
|
|
26
26
|
__webpack_require__.r(__webpack_exports__);
|
|
27
27
|
__webpack_require__.d(__webpack_exports__, {
|
|
28
|
-
Calendar: ()=>Calendar
|
|
28
|
+
Calendar: ()=>Calendar,
|
|
29
|
+
CalendarDayButton: ()=>CalendarDayButton
|
|
29
30
|
});
|
|
30
31
|
const jsx_runtime_namespaceObject = require("react/jsx-runtime");
|
|
31
|
-
require("react");
|
|
32
|
+
const external_react_namespaceObject = require("react");
|
|
32
33
|
const external_lucide_react_namespaceObject = require("lucide-react");
|
|
33
34
|
const external_react_day_picker_namespaceObject = require("react-day-picker");
|
|
34
35
|
const utils_cjs_namespaceObject = require("../../lib/utils.cjs");
|
|
35
36
|
const external_button_cjs_namespaceObject = require("./button.cjs");
|
|
36
|
-
function Calendar({ className, classNames, showOutsideDays = true, ...props }) {
|
|
37
|
+
function Calendar({ className, classNames, showOutsideDays = true, captionLayout = "label", buttonVariant = "ghost", formatters, components, ...props }) {
|
|
38
|
+
const defaultClassNames = (0, external_react_day_picker_namespaceObject.getDefaultClassNames)();
|
|
37
39
|
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_react_day_picker_namespaceObject.DayPicker, {
|
|
38
40
|
showOutsideDays: showOutsideDays,
|
|
39
|
-
className: (0, utils_cjs_namespaceObject.cn)("p-3", className),
|
|
41
|
+
className: (0, utils_cjs_namespaceObject.cn)("bg-white group/calendar p-3 [--cell-size:--spacing(8)] [[data-slot=card-content]_&]:bg-transparent [[data-slot=popover-content]_&]:bg-transparent dark:bg-neutral-950", String.raw`rtl:**:[.rdp-button\_next>svg]:rotate-180`, String.raw`rtl:**:[.rdp-button\_previous>svg]:rotate-180`, className),
|
|
42
|
+
captionLayout: captionLayout,
|
|
43
|
+
formatters: {
|
|
44
|
+
formatMonthDropdown: (date)=>date.toLocaleString("default", {
|
|
45
|
+
month: "short"
|
|
46
|
+
}),
|
|
47
|
+
...formatters
|
|
48
|
+
},
|
|
40
49
|
classNames: {
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
50
|
+
root: (0, utils_cjs_namespaceObject.cn)("w-fit", defaultClassNames.root),
|
|
51
|
+
months: (0, utils_cjs_namespaceObject.cn)("flex gap-4 flex-col md:flex-row relative", defaultClassNames.months),
|
|
52
|
+
month: (0, utils_cjs_namespaceObject.cn)("flex flex-col w-full gap-4", defaultClassNames.month),
|
|
53
|
+
nav: (0, utils_cjs_namespaceObject.cn)("flex items-center gap-1 w-full absolute top-0 inset-x-0 justify-between", defaultClassNames.nav),
|
|
54
|
+
button_previous: (0, utils_cjs_namespaceObject.cn)((0, external_button_cjs_namespaceObject.buttonVariants)({
|
|
55
|
+
variant: buttonVariant
|
|
56
|
+
}), "size-(--cell-size) aria-disabled:opacity-50 p-0 select-none", defaultClassNames.button_previous),
|
|
57
|
+
button_next: (0, utils_cjs_namespaceObject.cn)((0, external_button_cjs_namespaceObject.buttonVariants)({
|
|
58
|
+
variant: buttonVariant
|
|
59
|
+
}), "size-(--cell-size) aria-disabled:opacity-50 p-0 select-none", defaultClassNames.button_next),
|
|
60
|
+
month_caption: (0, utils_cjs_namespaceObject.cn)("flex items-center justify-center h-(--cell-size) w-full px-(--cell-size)", defaultClassNames.month_caption),
|
|
61
|
+
dropdowns: (0, utils_cjs_namespaceObject.cn)("w-full flex items-center text-sm font-medium justify-center h-(--cell-size) gap-1.5", defaultClassNames.dropdowns),
|
|
62
|
+
dropdown_root: (0, utils_cjs_namespaceObject.cn)("relative has-focus:border-neutral-950 border border-neutral-200 shadow-xs has-focus:ring-neutral-950/50 has-focus:ring-[3px] rounded-md dark:has-focus:border-neutral-300 dark:border-neutral-800 dark:has-focus:ring-neutral-300/50", defaultClassNames.dropdown_root),
|
|
63
|
+
dropdown: (0, utils_cjs_namespaceObject.cn)("absolute inset-0 opacity-0", defaultClassNames.dropdown),
|
|
64
|
+
caption_label: (0, utils_cjs_namespaceObject.cn)("select-none font-medium", "label" === captionLayout ? "text-sm" : "rounded-md pl-2 pr-1 flex items-center gap-1 text-sm h-8 [&>svg]:text-neutral-500 [&>svg]:size-3.5 dark:[&>svg]:text-neutral-400", defaultClassNames.caption_label),
|
|
65
|
+
table: "w-full border-collapse",
|
|
66
|
+
weekdays: (0, utils_cjs_namespaceObject.cn)("flex", defaultClassNames.weekdays),
|
|
67
|
+
weekday: (0, utils_cjs_namespaceObject.cn)("text-neutral-500 rounded-md flex-1 font-normal text-[0.8rem] select-none dark:text-neutral-400", defaultClassNames.weekday),
|
|
68
|
+
week: (0, utils_cjs_namespaceObject.cn)("flex w-full mt-2", defaultClassNames.week),
|
|
69
|
+
week_number_header: (0, utils_cjs_namespaceObject.cn)("select-none w-(--cell-size)", defaultClassNames.week_number_header),
|
|
70
|
+
week_number: (0, utils_cjs_namespaceObject.cn)("text-[0.8rem] select-none text-neutral-500 dark:text-neutral-400", defaultClassNames.week_number),
|
|
71
|
+
day: (0, utils_cjs_namespaceObject.cn)("relative w-full h-full p-0 text-center [&:first-child[data-selected=true]_button]:rounded-l-md [&:last-child[data-selected=true]_button]:rounded-r-md group/day aspect-square select-none", defaultClassNames.day),
|
|
72
|
+
range_start: (0, utils_cjs_namespaceObject.cn)("rounded-l-md bg-neutral-100 dark:bg-neutral-800", defaultClassNames.range_start),
|
|
73
|
+
range_middle: (0, utils_cjs_namespaceObject.cn)("rounded-none", defaultClassNames.range_middle),
|
|
74
|
+
range_end: (0, utils_cjs_namespaceObject.cn)("rounded-r-md bg-neutral-100 dark:bg-neutral-800", defaultClassNames.range_end),
|
|
75
|
+
today: (0, utils_cjs_namespaceObject.cn)("bg-neutral-100 text-neutral-900 rounded-md data-[selected=true]:rounded-none dark:bg-neutral-800 dark:text-neutral-50", defaultClassNames.today),
|
|
76
|
+
outside: (0, utils_cjs_namespaceObject.cn)("text-neutral-500 aria-selected:text-neutral-500 dark:text-neutral-400 dark:aria-selected:text-neutral-400", defaultClassNames.outside),
|
|
77
|
+
disabled: (0, utils_cjs_namespaceObject.cn)("text-neutral-500 opacity-50 dark:text-neutral-400", defaultClassNames.disabled),
|
|
78
|
+
hidden: (0, utils_cjs_namespaceObject.cn)("invisible", defaultClassNames.hidden),
|
|
67
79
|
...classNames
|
|
68
80
|
},
|
|
69
81
|
components: {
|
|
70
|
-
|
|
71
|
-
|
|
82
|
+
Root: ({ className, rootRef, ...props })=>/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
83
|
+
"data-slot": "calendar",
|
|
84
|
+
ref: rootRef,
|
|
85
|
+
className: (0, utils_cjs_namespaceObject.cn)(className),
|
|
86
|
+
...props
|
|
87
|
+
}),
|
|
88
|
+
Chevron: ({ className, orientation, ...props })=>{
|
|
89
|
+
if ("left" === orientation) return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_lucide_react_namespaceObject.ChevronLeftIcon, {
|
|
90
|
+
className: (0, utils_cjs_namespaceObject.cn)("size-4", className),
|
|
91
|
+
...props
|
|
92
|
+
});
|
|
93
|
+
if ("right" === orientation) return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_lucide_react_namespaceObject.ChevronRightIcon, {
|
|
72
94
|
className: (0, utils_cjs_namespaceObject.cn)("size-4", className),
|
|
73
95
|
...props
|
|
74
96
|
});
|
|
75
|
-
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_lucide_react_namespaceObject.
|
|
97
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_lucide_react_namespaceObject.ChevronDownIcon, {
|
|
76
98
|
className: (0, utils_cjs_namespaceObject.cn)("size-4", className),
|
|
77
99
|
...props
|
|
78
100
|
});
|
|
79
|
-
}
|
|
101
|
+
},
|
|
102
|
+
DayButton: CalendarDayButton,
|
|
103
|
+
WeekNumber: ({ children, ...props })=>/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("td", {
|
|
104
|
+
...props,
|
|
105
|
+
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
106
|
+
className: "flex size-(--cell-size) items-center justify-center text-center",
|
|
107
|
+
children: children
|
|
108
|
+
})
|
|
109
|
+
}),
|
|
110
|
+
...components
|
|
80
111
|
},
|
|
81
112
|
...props
|
|
82
113
|
});
|
|
83
114
|
}
|
|
115
|
+
function CalendarDayButton({ className, day, modifiers, ...props }) {
|
|
116
|
+
const defaultClassNames = (0, external_react_day_picker_namespaceObject.getDefaultClassNames)();
|
|
117
|
+
const ref = external_react_namespaceObject.useRef(null);
|
|
118
|
+
external_react_namespaceObject.useEffect(()=>{
|
|
119
|
+
if (modifiers["focused"]) ref.current?.focus();
|
|
120
|
+
}, [
|
|
121
|
+
modifiers["focused"]
|
|
122
|
+
]);
|
|
123
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_button_cjs_namespaceObject.Button, {
|
|
124
|
+
ref: ref,
|
|
125
|
+
variant: "ghost",
|
|
126
|
+
size: "icon",
|
|
127
|
+
"data-day": day.date.toLocaleDateString(),
|
|
128
|
+
"data-selected-single": modifiers["selected"] && !modifiers["range_start"] && !modifiers["range_end"] && !modifiers["range_middle"],
|
|
129
|
+
"data-range-start": modifiers["range_start"],
|
|
130
|
+
"data-range-end": modifiers["range_end"],
|
|
131
|
+
"data-range-middle": modifiers["range_middle"],
|
|
132
|
+
className: (0, utils_cjs_namespaceObject.cn)("data-[selected-single=true]:bg-neutral-900 data-[selected-single=true]:text-neutral-50 data-[range-middle=true]:bg-neutral-100 data-[range-middle=true]:text-neutral-900 data-[range-start=true]:bg-neutral-900 data-[range-start=true]:text-neutral-50 data-[range-end=true]:bg-neutral-900 data-[range-end=true]:text-neutral-50 group-data-[focused=true]/day:border-ring group-data-[focused=true]/day:ring-ring/50 dark:hover:text-neutral-900 flex aspect-square size-auto w-full min-w-(--cell-size) flex-col gap-1 leading-none font-normal group-data-[focused=true]/day:relative group-data-[focused=true]/day:z-10 group-data-[focused=true]/day:ring-[3px] data-[range-end=true]:rounded-md data-[range-end=true]:rounded-r-md data-[range-middle=true]:rounded-none data-[range-start=true]:rounded-md data-[range-start=true]:rounded-l-md [&>span]:text-xs [&>span]:opacity-70 dark:data-[selected-single=true]:bg-neutral-50 dark:data-[selected-single=true]:text-neutral-900 dark:data-[range-middle=true]:bg-neutral-800 dark:data-[range-middle=true]:text-neutral-50 dark:data-[range-start=true]:bg-neutral-50 dark:data-[range-start=true]:text-neutral-900 dark:data-[range-end=true]:bg-neutral-50 dark:data-[range-end=true]:text-neutral-900 dark:dark:hover:text-neutral-50", defaultClassNames.day, className),
|
|
133
|
+
...props
|
|
134
|
+
});
|
|
135
|
+
}
|
|
84
136
|
exports.Calendar = __webpack_exports__.Calendar;
|
|
137
|
+
exports.CalendarDayButton = __webpack_exports__.CalendarDayButton;
|
|
85
138
|
for(var __webpack_i__ in __webpack_exports__)if (-1 === [
|
|
86
|
-
"Calendar"
|
|
139
|
+
"Calendar",
|
|
140
|
+
"CalendarDayButton"
|
|
87
141
|
].indexOf(__webpack_i__)) exports[__webpack_i__] = __webpack_exports__[__webpack_i__];
|
|
88
142
|
Object.defineProperty(exports, '__esModule', {
|
|
89
143
|
value: true
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"components\\ui\\calendar.cjs","sources":["webpack://@arolariu/components/./src/components/ui/calendar.tsx"],"sourcesContent":["\r\n\r\nimport * as React from \"react\";\r\nimport { ChevronLeft, ChevronRight } from \"lucide-react\";\r\nimport { DayPicker } from \"react-day-picker\";\r\nimport { cn } from \"./../../lib/utils\";\r\nimport { buttonVariants } from \"./button\";\r\n\r\nfunction Calendar({\r\n className,\r\n classNames,\r\n showOutsideDays = true,\r\n ...props\r\n}: React.ComponentProps<typeof DayPicker>) {\r\n return (\r\n <DayPicker\r\n showOutsideDays={showOutsideDays}\r\n className={cn(\"p-3\", className)}\r\n classNames={{\r\n months: \"flex flex-col sm:flex-row gap-2\",\r\n month: \"flex flex-col gap-4\",\r\n month_caption: \"flex justify-center pt-1 relative items-center w-full\",\r\n caption_label: \"text-sm font-medium\",\r\n nav: \"flex items-center gap-1\",\r\n nav_button: cn(\r\n buttonVariants({ variant: \"outline\" }),\r\n \"size-7 bg-transparent p-0 opacity-50 hover:opacity-100\"\r\n ),\r\n button_previous: \"absolute left-1\",\r\n button_next: \"absolute right-1\",\r\n month_grid: \"w-full border-collapse space-x-1\",\r\n weekdays: \"flex\",\r\n weekday:\r\n \"text-neutral-500 rounded-md w-8 font-normal text-[0.8rem] dark:text-neutral-400\",\r\n row: \"flex w-full mt-2\",\r\n day: cn(\r\n \"relative p-0 text-center text-sm focus-within:relative focus-within:z-20 [&:has([aria-selected])]:bg-neutral-100 [&:has([aria-selected].day-range-end)]:rounded-r-md dark:[&:has([aria-selected])]:bg-neutral-800\",\r\n props.mode === \"range\"\r\n ? \"[&:has(>.day-range-end)]:rounded-r-md [&:has(>.day-range-start)]:rounded-l-md first:[&:has([aria-selected])]:rounded-l-md last:[&:has([aria-selected])]:rounded-r-md\"\r\n : \"[&:has([aria-selected])]:rounded-md\"\r\n ),\r\n day_button: cn(\r\n buttonVariants({ variant: \"ghost\" }),\r\n \"size-8 p-0 font-normal aria-selected:opacity-100\"\r\n ),\r\n range_start:\r\n \"day-range-start aria-selected:bg-neutral-900 aria-selected:text-neutral-50 dark:aria-selected:bg-neutral-50 dark:aria-selected:text-neutral-900\",\r\n range_end:\r\n \"day-range-end aria-selected:bg-neutral-900 aria-selected:text-neutral-50 dark:aria-selected:bg-neutral-50 dark:aria-selected:text-neutral-900\",\r\n selected:\r\n \"bg-neutral-900 text-neutral-50 hover:bg-neutral-900 hover:text-neutral-50 focus:bg-neutral-900 focus:text-neutral-50 dark:bg-neutral-50 dark:text-neutral-900 dark:hover:bg-neutral-50 dark:hover:text-neutral-900 dark:focus:bg-neutral-50 dark:focus:text-neutral-900\",\r\n today:\r\n \"bg-neutral-100 text-neutral-900 dark:bg-neutral-800 dark:text-neutral-50\",\r\n outside:\r\n \"day-outside text-neutral-500 aria-selected:text-neutral-500 dark:text-neutral-400 dark:aria-selected:text-neutral-400\",\r\n disabled: \"text-neutral-500 opacity-50 dark:text-neutral-400\",\r\n range_middle:\r\n \"aria-selected:bg-neutral-100 aria-selected:text-neutral-900 dark:aria-selected:bg-neutral-800 dark:aria-selected:text-neutral-50\",\r\n hidden: \"invisible\",\r\n ...classNames,\r\n }}\r\n components={{\r\n Chevron: ({ className, ...props }) => {\r\n if (props.orientation === \"left\") {\r\n return <ChevronLeft className={cn(\"size-4\", className)} {...props} />\r\n }\r\n return <ChevronRight className={cn(\"size-4\", className)} {...props} />\r\n }\r\n }}\r\n {...props}\r\n />\r\n );\r\n}\r\n\r\nexport { Calendar };\r\n"],"names":["Calendar","className","classNames","showOutsideDays","props","DayPicker","cn","buttonVariants","ChevronLeft","ChevronRight"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAQA,SAASA,SAAS,EAChBC,SAAS,EACTC,UAAU,EACVC,kBAAkB,IAAI,EACtB,GAAGC,OACoC;IACvC,OACE,WADF,GACE,qCAACC,0CAAAA,SAASA,EAAAA;QACR,iBAAiBF;QACjB,WAAWG,IAAAA,0BAAAA,EAAAA,EAAG,OAAOL;QACrB,YAAY;YACV,QAAQ;YACR,OAAO;YACP,eAAe;YACf,eAAe;YACf,KAAK;YACL,YAAYK,IAAAA,0BAAAA,EAAAA,EACVC,IAAAA,oCAAAA,cAAAA,EAAe;gBAAE,SAAS;YAAU,IACpC;YAEF,iBAAiB;YACjB,aAAa;YACb,YAAY;YACZ,UAAU;YACV,SACE;YACF,KAAK;YACL,KAAKD,IAAAA,0BAAAA,EAAAA,EACH,qNACAF,YAAAA,MAAM,IAAI,GACN,yKACA;YAEN,YAAYE,IAAAA,0BAAAA,EAAAA,EACVC,IAAAA,oCAAAA,cAAAA,EAAe;gBAAE,SAAS;YAAQ,IAClC;YAEF,aACE;YACF,WACE;YACF,UACE;YACF,OACE;YACF,SACE;YACF,UAAU;YACV,cACE;YACF,QAAQ;YACR,GAAGL,UAAU;QACf;QACA,YAAY;YACV,SAAS,CAAC,EAAED,SAAS,EAAE,GAAGG,OAAO;gBAC/B,IAAIA,WAAAA,MAAM,WAAW,EACrB,OAAO,WAAP,GAAO,qCAACI,sCAAAA,WAAWA,EAAAA;oBAAC,WAAWF,IAAAA,0BAAAA,EAAAA,EAAG,UAAUL;oBAAa,GAAGG,KAAK;;gBAEjE,OAAO,WAAP,GAAO,qCAACK,sCAAAA,YAAYA,EAAAA;oBAAC,WAAWH,IAAAA,0BAAAA,EAAAA,EAAG,UAAUL;oBAAa,GAAGG,KAAK;;YACpE;QACF;QACC,GAAGA,KAAK;;AAGf"}
|
|
1
|
+
{"version":3,"file":"components\\ui\\calendar.cjs","sources":["webpack://@arolariu/components/webpack/runtime/define_property_getters","webpack://@arolariu/components/webpack/runtime/has_own_property","webpack://@arolariu/components/webpack/runtime/make_namespace_object","webpack://@arolariu/components/./src/components/ui/calendar.tsx"],"sourcesContent":["__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n }\n }\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","\n\nimport * as React from \"react\";\nimport {\n ChevronDownIcon,\n ChevronLeftIcon,\n ChevronRightIcon,\n} from \"lucide-react\";\nimport { DayButton, DayPicker, getDefaultClassNames } from \"react-day-picker\";\n\nimport { cn } from \"@/lib/utils\";\nimport { Button, buttonVariants } from \"@/components/ui/button\";\n\nfunction Calendar({\n className,\n classNames,\n showOutsideDays = true,\n captionLayout = \"label\",\n buttonVariant = \"ghost\",\n formatters,\n components,\n ...props\n}: React.ComponentProps<typeof DayPicker> & {\n buttonVariant?: React.ComponentProps<typeof Button>[\"variant\"];\n}) {\n const defaultClassNames = getDefaultClassNames();\n\n return (\n <DayPicker\n showOutsideDays={showOutsideDays}\n className={cn(\n \"bg-white group/calendar p-3 [--cell-size:--spacing(8)] [[data-slot=card-content]_&]:bg-transparent [[data-slot=popover-content]_&]:bg-transparent dark:bg-neutral-950\",\n String.raw`rtl:**:[.rdp-button\\_next>svg]:rotate-180`,\n String.raw`rtl:**:[.rdp-button\\_previous>svg]:rotate-180`,\n className,\n )}\n captionLayout={captionLayout}\n formatters={{\n formatMonthDropdown: (date) =>\n date.toLocaleString(\"default\", { month: \"short\" }),\n ...formatters,\n }}\n classNames={{\n root: cn(\"w-fit\", defaultClassNames.root),\n months: cn(\n \"flex gap-4 flex-col md:flex-row relative\",\n defaultClassNames.months,\n ),\n month: cn(\"flex flex-col w-full gap-4\", defaultClassNames.month),\n nav: cn(\n \"flex items-center gap-1 w-full absolute top-0 inset-x-0 justify-between\",\n defaultClassNames.nav,\n ),\n button_previous: cn(\n buttonVariants({ variant: buttonVariant }),\n \"size-(--cell-size) aria-disabled:opacity-50 p-0 select-none\",\n defaultClassNames.button_previous,\n ),\n button_next: cn(\n buttonVariants({ variant: buttonVariant }),\n \"size-(--cell-size) aria-disabled:opacity-50 p-0 select-none\",\n defaultClassNames.button_next,\n ),\n month_caption: cn(\n \"flex items-center justify-center h-(--cell-size) w-full px-(--cell-size)\",\n defaultClassNames.month_caption,\n ),\n dropdowns: cn(\n \"w-full flex items-center text-sm font-medium justify-center h-(--cell-size) gap-1.5\",\n defaultClassNames.dropdowns,\n ),\n dropdown_root: cn(\n \"relative has-focus:border-neutral-950 border border-neutral-200 shadow-xs has-focus:ring-neutral-950/50 has-focus:ring-[3px] rounded-md dark:has-focus:border-neutral-300 dark:border-neutral-800 dark:has-focus:ring-neutral-300/50\",\n defaultClassNames.dropdown_root,\n ),\n dropdown: cn(\"absolute inset-0 opacity-0\", defaultClassNames.dropdown),\n caption_label: cn(\n \"select-none font-medium\",\n captionLayout === \"label\"\n ? \"text-sm\"\n : \"rounded-md pl-2 pr-1 flex items-center gap-1 text-sm h-8 [&>svg]:text-neutral-500 [&>svg]:size-3.5 dark:[&>svg]:text-neutral-400\",\n defaultClassNames.caption_label,\n ),\n table: \"w-full border-collapse\",\n weekdays: cn(\"flex\", defaultClassNames.weekdays),\n weekday: cn(\n \"text-neutral-500 rounded-md flex-1 font-normal text-[0.8rem] select-none dark:text-neutral-400\",\n defaultClassNames.weekday,\n ),\n week: cn(\"flex w-full mt-2\", defaultClassNames.week),\n week_number_header: cn(\n \"select-none w-(--cell-size)\",\n defaultClassNames.week_number_header,\n ),\n week_number: cn(\n \"text-[0.8rem] select-none text-neutral-500 dark:text-neutral-400\",\n defaultClassNames.week_number,\n ),\n day: cn(\n \"relative w-full h-full p-0 text-center [&:first-child[data-selected=true]_button]:rounded-l-md [&:last-child[data-selected=true]_button]:rounded-r-md group/day aspect-square select-none\",\n defaultClassNames.day,\n ),\n range_start: cn(\n \"rounded-l-md bg-neutral-100 dark:bg-neutral-800\",\n defaultClassNames.range_start,\n ),\n range_middle: cn(\"rounded-none\", defaultClassNames.range_middle),\n range_end: cn(\n \"rounded-r-md bg-neutral-100 dark:bg-neutral-800\",\n defaultClassNames.range_end,\n ),\n today: cn(\n \"bg-neutral-100 text-neutral-900 rounded-md data-[selected=true]:rounded-none dark:bg-neutral-800 dark:text-neutral-50\",\n defaultClassNames.today,\n ),\n outside: cn(\n \"text-neutral-500 aria-selected:text-neutral-500 dark:text-neutral-400 dark:aria-selected:text-neutral-400\",\n defaultClassNames.outside,\n ),\n disabled: cn(\n \"text-neutral-500 opacity-50 dark:text-neutral-400\",\n defaultClassNames.disabled,\n ),\n hidden: cn(\"invisible\", defaultClassNames.hidden),\n ...classNames,\n }}\n components={{\n Root: ({ className, rootRef, ...props }) => {\n return (\n <div\n data-slot=\"calendar\"\n ref={rootRef}\n className={cn(className)}\n {...props}\n />\n );\n },\n Chevron: ({ className, orientation, ...props }) => {\n if (orientation === \"left\") {\n return (\n <ChevronLeftIcon className={cn(\"size-4\", className)} {...props} />\n );\n }\n\n if (orientation === \"right\") {\n return (\n <ChevronRightIcon\n className={cn(\"size-4\", className)}\n {...props}\n />\n );\n }\n\n return (\n <ChevronDownIcon className={cn(\"size-4\", className)} {...props} />\n );\n },\n DayButton: CalendarDayButton,\n WeekNumber: ({ children, ...props }) => {\n return (\n <td {...props}>\n <div className=\"flex size-(--cell-size) items-center justify-center text-center\">\n {children}\n </div>\n </td>\n );\n },\n ...components,\n }}\n {...props}\n />\n );\n}\n\nfunction CalendarDayButton({\n className,\n day,\n modifiers,\n ...props\n}: React.ComponentProps<typeof DayButton>) {\n const defaultClassNames = getDefaultClassNames();\n\n const ref = React.useRef<HTMLButtonElement>(null);\n React.useEffect(() => {\n if (modifiers[\"focused\"]) ref.current?.focus();\n }, [modifiers[\"focused\"]]);\n\n return (\n <Button\n ref={ref}\n variant=\"ghost\"\n size=\"icon\"\n data-day={day.date.toLocaleDateString()}\n data-selected-single={\n modifiers[\"selected\"] &&\n !modifiers[\"range_start\"] &&\n !modifiers[\"range_end\"] &&\n !modifiers[\"range_middle\"]\n }\n data-range-start={modifiers[\"range_start\"]}\n data-range-end={modifiers[\"range_end\"]}\n data-range-middle={modifiers[\"range_middle\"]}\n className={cn(\n \"data-[selected-single=true]:bg-neutral-900 data-[selected-single=true]:text-neutral-50 data-[range-middle=true]:bg-neutral-100 data-[range-middle=true]:text-neutral-900 data-[range-start=true]:bg-neutral-900 data-[range-start=true]:text-neutral-50 data-[range-end=true]:bg-neutral-900 data-[range-end=true]:text-neutral-50 group-data-[focused=true]/day:border-ring group-data-[focused=true]/day:ring-ring/50 dark:hover:text-neutral-900 flex aspect-square size-auto w-full min-w-(--cell-size) flex-col gap-1 leading-none font-normal group-data-[focused=true]/day:relative group-data-[focused=true]/day:z-10 group-data-[focused=true]/day:ring-[3px] data-[range-end=true]:rounded-md data-[range-end=true]:rounded-r-md data-[range-middle=true]:rounded-none data-[range-start=true]:rounded-md data-[range-start=true]:rounded-l-md [&>span]:text-xs [&>span]:opacity-70 dark:data-[selected-single=true]:bg-neutral-50 dark:data-[selected-single=true]:text-neutral-900 dark:data-[range-middle=true]:bg-neutral-800 dark:data-[range-middle=true]:text-neutral-50 dark:data-[range-start=true]:bg-neutral-50 dark:data-[range-start=true]:text-neutral-900 dark:data-[range-end=true]:bg-neutral-50 dark:data-[range-end=true]:text-neutral-900 dark:dark:hover:text-neutral-50\",\n defaultClassNames.day,\n className,\n )}\n {...props}\n />\n );\n}\n\nexport { Calendar, CalendarDayButton };\n"],"names":["__webpack_require__","definition","key","Object","obj","prop","Symbol","Calendar","className","classNames","showOutsideDays","captionLayout","buttonVariant","formatters","components","props","defaultClassNames","getDefaultClassNames","DayPicker","cn","String","date","buttonVariants","rootRef","orientation","ChevronLeftIcon","ChevronRightIcon","ChevronDownIcon","CalendarDayButton","children","day","modifiers","ref","React","Button"],"mappings":";;;;IAAAA,oBAAoB,CAAC,GAAG,CAAC,UAASC;QACjC,IAAI,IAAIC,OAAOD,WACR,IAAGD,oBAAoB,CAAC,CAACC,YAAYC,QAAQ,CAACF,oBAAoB,CAAC,CAAC,UAASE,MACzEC,OAAO,cAAc,CAA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CAAC;QACd,IAAIF,SAAS,CAAC,UAAU,EAAEC,IAAI,OAAO,EAAE;IACzC,GAAG;QAACD,SAAS,CAAC,UAAU;KAAC;IAEzB,OACE,WADF,GACE,qCAACG,oCAAAA,MAAMA,EAAAA;QACL,KAAKF;QACL,SAAQ;QACR,MAAK;QACL,YAAUF,IAAI,IAAI,CAAC,kBAAkB;QACrC,wBACEC,SAAS,CAAC,WAAW,IACrB,CAACA,SAAS,CAAC,cAAc,IACzB,CAACA,SAAS,CAAC,YAAY,IACvB,CAACA,SAAS,CAAC,eAAe;QAE5B,oBAAkBA,SAAS,CAAC,cAAc;QAC1C,kBAAgBA,SAAS,CAAC,YAAY;QACtC,qBAAmBA,SAAS,CAAC,eAAe;QAC5C,WAAWZ,IAAAA,0BAAAA,EAAAA,EACT,2uCACAH,kBAAkB,GAAG,EACrBR;QAED,GAAGO,KAAK;;AAGf"}
|
|
@@ -25,13 +25,13 @@ var __webpack_require__ = {};
|
|
|
25
25
|
var __webpack_exports__ = {};
|
|
26
26
|
__webpack_require__.r(__webpack_exports__);
|
|
27
27
|
__webpack_require__.d(__webpack_exports__, {
|
|
28
|
-
|
|
29
|
-
CardContent: ()=>CardContent,
|
|
30
|
-
CardHeader: ()=>CardHeader,
|
|
28
|
+
CardFooter: ()=>CardFooter,
|
|
31
29
|
CardAction: ()=>CardAction,
|
|
32
|
-
|
|
30
|
+
CardHeader: ()=>CardHeader,
|
|
31
|
+
CardContent: ()=>CardContent,
|
|
32
|
+
CardDescription: ()=>CardDescription,
|
|
33
33
|
CardTitle: ()=>CardTitle,
|
|
34
|
-
|
|
34
|
+
Card: ()=>Card
|
|
35
35
|
});
|
|
36
36
|
const jsx_runtime_namespaceObject = require("react/jsx-runtime");
|
|
37
37
|
require("react");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"components\\ui\\card.cjs","sources":["webpack://@arolariu/components/./src/components/ui/card.tsx"],"sourcesContent":["\n\nimport * as React from \"react\";\n\nimport { cn } from \"@/lib/utils\";\n\nfunction Card({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"card\"\n className={cn(\n \"bg-white text-neutral-950 flex flex-col gap-6 rounded-xl border border-neutral-200 py-6 shadow-sm dark:bg-neutral-950 dark:text-neutral-50 dark:border-neutral-800\",\n className
|
|
1
|
+
{"version":3,"file":"components\\ui\\card.cjs","sources":["webpack://@arolariu/components/webpack/runtime/define_property_getters","webpack://@arolariu/components/webpack/runtime/has_own_property","webpack://@arolariu/components/webpack/runtime/make_namespace_object","webpack://@arolariu/components/./src/components/ui/card.tsx"],"sourcesContent":["__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n }\n }\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","\n\nimport * as React from \"react\";\n\nimport { cn } from \"@/lib/utils\";\n\nfunction Card({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"card\"\n className={cn(\n \"bg-white text-neutral-950 flex flex-col gap-6 rounded-xl border border-neutral-200 py-6 shadow-sm dark:bg-neutral-950 dark:text-neutral-50 dark:border-neutral-800\",\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction CardHeader({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"card-header\"\n className={cn(\n \"@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-1.5 px-6 has-data-[slot=card-action]:grid-cols-[1fr_auto] [.border-b]:pb-6\",\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction CardTitle({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"card-title\"\n className={cn(\"leading-none font-semibold\", className)}\n {...props}\n />\n );\n}\n\nfunction CardDescription({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"card-description\"\n className={cn(\n \"text-neutral-500 text-sm dark:text-neutral-400\",\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction CardAction({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"card-action\"\n className={cn(\n \"col-start-2 row-span-2 row-start-1 self-start justify-self-end\",\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction CardContent({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"card-content\"\n className={cn(\"px-6\", className)}\n {...props}\n />\n );\n}\n\nfunction CardFooter({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"card-footer\"\n className={cn(\"flex items-center px-6 [.border-t]:pt-6\", className)}\n {...props}\n />\n );\n}\n\nexport {\n Card,\n CardHeader,\n CardFooter,\n CardTitle,\n CardAction,\n CardDescription,\n CardContent,\n};\n"],"names":["__webpack_require__","definition","key","Object","obj","prop","Symbol","Card","className","props","cn","CardHeader","CardTitle","CardDescription","CardAction","CardContent","CardFooter"],"mappings":";;;;IAAAA,oBAAoB,CAAC,GAAG,CAAC,UAASC;QACjC,IAAI,IAAIC,OAAOD,WACR,IAAGD,oBAAoB,CAAC,CAACC,YAAYC,QAAQ,CAACF,oBAAoB,CAAC,CAAC,UAASE,MACzEC,OAAO,cAAc,CAAC,UAASD,KAAK;YAAE,YAAY;YAAM,KAAKD,UAAU,CAACC,IAAI;QAAC;IAGzF;;;ICNAF,oBAAoB,CAAC,GAAG,CAACI,KAAKC,OAAUF,OAAO,SAAS,CAAC,cAAc,CAAC,IAAI,CAACC,KAAKC;;;ICClFL,oBAAoB,CAAC,GAAG,CAAC;QACxB,IAAG,sBAAOM,UAA0BA,OAAO,WAAW,EACrDH,OAAO,cAAc,CAAC,UAASG,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AG,2CAA2CF;QACxD,GAAGC,KAAK;;AAGf"}
|
|
@@ -35,10 +35,10 @@ var __webpack_exports__ = {};
|
|
|
35
35
|
__webpack_require__.r(__webpack_exports__);
|
|
36
36
|
__webpack_require__.d(__webpack_exports__, {
|
|
37
37
|
CarouselNext: ()=>CarouselNext,
|
|
38
|
-
|
|
39
|
-
Carousel: ()=>Carousel,
|
|
38
|
+
CarouselPrevious: ()=>CarouselPrevious,
|
|
40
39
|
CarouselContent: ()=>CarouselContent,
|
|
41
|
-
|
|
40
|
+
CarouselItem: ()=>CarouselItem,
|
|
41
|
+
Carousel: ()=>Carousel
|
|
42
42
|
});
|
|
43
43
|
const jsx_runtime_namespaceObject = require("react/jsx-runtime");
|
|
44
44
|
const external_react_namespaceObject = require("react");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"components\\ui\\carousel.cjs","sources":["webpack://@arolariu/components/./src/components/ui/carousel.tsx"],"sourcesContent":["\n\nimport * as React from \"react\";\nimport useEmblaCarousel, {\n type UseEmblaCarouselType,\n} from \"embla-carousel-react\";\nimport { ArrowLeft, ArrowRight } from \"lucide-react\";\n\nimport { cn } from \"@/lib/utils\";\nimport { Button } from \"@/components/ui/button\";\n\ntype CarouselApi = UseEmblaCarouselType[1];\ntype UseCarouselParameters = Parameters<typeof useEmblaCarousel>;\ntype CarouselOptions = UseCarouselParameters[0];\ntype CarouselPlugin = UseCarouselParameters[1];\n\ntype CarouselProps = {\n opts?: CarouselOptions;\n plugins?: CarouselPlugin;\n orientation?: \"horizontal\" | \"vertical\";\n setApi?: (api: CarouselApi) => void;\n};\n\ntype CarouselContextProps = {\n carouselRef: ReturnType<typeof useEmblaCarousel>[0];\n api: ReturnType<typeof useEmblaCarousel>[1];\n scrollPrev: () => void;\n scrollNext: () => void;\n canScrollPrev: boolean;\n canScrollNext: boolean;\n} & CarouselProps;\n\nconst CarouselContext = React.createContext<CarouselContextProps | null>(null);\n\nfunction useCarousel() {\n const context = React.useContext(CarouselContext);\n\n if (!context) {\n throw new Error(\"useCarousel must be used within a <Carousel />\");\n }\n\n return context;\n}\n\nfunction Carousel({\n orientation = \"horizontal\",\n opts,\n setApi,\n plugins,\n className,\n children,\n ...props\n}: React.ComponentProps<\"div\"> & CarouselProps) {\n const [carouselRef, api] = useEmblaCarousel(\n {\n ...opts,\n axis: orientation === \"horizontal\" ? \"x\" : \"y\",\n },\n plugins\n );\n const [canScrollPrev, setCanScrollPrev] = React.useState(false);\n const [canScrollNext, setCanScrollNext] = React.useState(false);\n\n const onSelect = React.useCallback((api: CarouselApi) => {\n if (!api) return;\n setCanScrollPrev(api.canScrollPrev());\n setCanScrollNext(api.canScrollNext());\n }, []);\n\n const scrollPrev = React.useCallback(() => {\n api?.scrollPrev();\n }, [api]);\n\n const scrollNext = React.useCallback(() => {\n api?.scrollNext();\n }, [api]);\n\n const handleKeyDown = React.useCallback(\n (event: React.KeyboardEvent<HTMLDivElement>) => {\n if (event.key === \"ArrowLeft\") {\n event.preventDefault();\n scrollPrev();\n } else if (event.key === \"ArrowRight\") {\n event.preventDefault();\n scrollNext();\n }\n },\n [scrollPrev, scrollNext]\n );\n\n React.useEffect(() => {\n if (!api || !setApi) return;\n setApi(api);\n }, [api, setApi]);\n\n React.useEffect(() => {\n if (!api) return;\n onSelect(api);\n api.on(\"reInit\", onSelect);\n api.on(\"select\", onSelect);\n\n return () => {\n api?.off(\"select\", onSelect);\n };\n }, [api, onSelect]);\n\n return (\n <CarouselContext.Provider\n value={{\n carouselRef,\n api: api,\n opts,\n orientation:\n orientation || (opts?.axis === \"y\" ? \"vertical\" : \"horizontal\"),\n scrollPrev,\n scrollNext,\n canScrollPrev,\n canScrollNext,\n }}\n >\n <div\n onKeyDownCapture={handleKeyDown}\n className={cn(\"relative\", className)}\n role=\"region\"\n aria-roledescription=\"carousel\"\n data-slot=\"carousel\"\n {...props}\n >\n {children}\n </div>\n </CarouselContext.Provider>\n );\n}\n\nfunction CarouselContent({ className, ...props }: React.ComponentProps<\"div\">) {\n const { carouselRef, orientation } = useCarousel();\n\n return (\n <div\n ref={carouselRef}\n className=\"overflow-hidden\"\n data-slot=\"carousel-content\"\n >\n <div\n className={cn(\n \"flex\",\n orientation === \"horizontal\" ? \"-ml-4\" : \"-mt-4 flex-col\",\n className\n )}\n {...props}\n />\n </div>\n );\n}\n\nfunction CarouselItem({ className, ...props }: React.ComponentProps<\"div\">) {\n const { orientation } = useCarousel();\n\n return (\n <div\n role=\"group\"\n aria-roledescription=\"slide\"\n data-slot=\"carousel-item\"\n className={cn(\n \"min-w-0 shrink-0 grow-0 basis-full\",\n orientation === \"horizontal\" ? \"pl-4\" : \"pt-4\",\n className\n )}\n {...props}\n />\n );\n}\n\nfunction CarouselPrevious({\n className,\n variant = \"outline\",\n size = \"icon\",\n ...props\n}: React.ComponentProps<typeof Button>) {\n const { orientation, scrollPrev, canScrollPrev } = useCarousel();\n\n return (\n <Button\n data-slot=\"carousel-previous\"\n variant={variant}\n size={size}\n className={cn(\n \"absolute size-8 rounded-full\",\n orientation === \"horizontal\"\n ? \"top-1/2 -left-12 -translate-y-1/2\"\n : \"-top-12 left-1/2 -translate-x-1/2 rotate-90\",\n className\n )}\n disabled={!canScrollPrev}\n onClick={scrollPrev}\n {...props}\n >\n <ArrowLeft />\n <span className=\"sr-only\">Previous slide</span>\n </Button>\n );\n}\n\nfunction CarouselNext({\n className,\n variant = \"outline\",\n size = \"icon\",\n ...props\n}: React.ComponentProps<typeof Button>) {\n const { orientation, scrollNext, canScrollNext } = useCarousel();\n\n return (\n <Button\n data-slot=\"carousel-next\"\n variant={variant}\n size={size}\n className={cn(\n \"absolute size-8 rounded-full\",\n orientation === \"horizontal\"\n ? \"top-1/2 -right-12 -translate-y-1/2\"\n : \"-bottom-12 left-1/2 -translate-x-1/2 rotate-90\",\n className\n )}\n disabled={!canScrollNext}\n onClick={scrollNext}\n {...props}\n >\n <ArrowRight />\n <span className=\"sr-only\">Next slide</span>\n </Button>\n );\n}\n\nexport {\n type CarouselApi,\n Carousel,\n CarouselContent,\n CarouselItem,\n CarouselPrevious,\n CarouselNext,\n};\n"],"names":["CarouselContext","React","useCarousel","context","Error","Carousel","orientation","opts","setApi","plugins","className","children","props","carouselRef","api","useEmblaCarousel","canScrollPrev","setCanScrollPrev","canScrollNext","setCanScrollNext","onSelect","scrollPrev","scrollNext","handleKeyDown","event","cn","CarouselContent","CarouselItem","CarouselPrevious","variant","size","Button","ArrowLeft","CarouselNext","ArrowRight"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgCA,MAAMA,kBAAkB,WAAlBA,GAAkBC,+BAAAA,aAAmB,CAA8B;AAEzE,SAASC;IACP,MAAMC,UAAUF,+BAAAA,UAAgB,CAACD;IAEjC,IAAI,CAACG,SACH,MAAM,IAAIC,MAAM;IAGlB,OAAOD;AACT;AAEA,SAASE,SAAS,EAChBC,cAAc,YAAY,EAC1BC,IAAI,EACJC,MAAM,EACNC,OAAO,EACPC,SAAS,EACTC,QAAQ,EACR,GAAGC,OACyC;IAC5C,MAAM,CAACC,aAAaC,IAAI,GAAGC,wCACzB;QACE,GAAGR,IAAI;QACP,MAAMD,iBAAAA,cAA+B,MAAM;IAC7C,GACAG;IAEF,MAAM,CAACO,eAAeC,iBAAiB,GAAGhB,+BAAAA,QAAc,CAAC;IACzD,MAAM,CAACiB,eAAeC,iBAAiB,GAAGlB,+BAAAA,QAAc,CAAC;IAEzD,MAAMmB,WAAWnB,+BAAAA,WAAiB,CAAC,CAACa;QAClC,IAAI,CAACA,KAAK;QACVG,iBAAiBH,IAAI,aAAa;QAClCK,iBAAiBL,IAAI,aAAa;IACpC,GAAG,EAAE;IAEL,MAAMO,aAAapB,+BAAAA,WAAiB,CAAC;QACnCa,KAAK;IACP,GAAG;QAACA;KAAI;IAER,MAAMQ,aAAarB,+BAAAA,WAAiB,CAAC;QACnCa,KAAK;IACP,GAAG;QAACA;KAAI;IAER,MAAMS,gBAAgBtB,+BAAAA,W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C;QACC,MAAK;QACL,wBAAqB;QACrB,aAAU;QACV,WAAWuB,IAAAA,0BAAAA,EAAAA,EACT,sCACAnB,iBAAAA,cAA+B,SAAS,QACxCI;QAED,GAAGE,KAAK;;AAGf;AAEA,SAASgB,iBAAiB,EACxBlB,SAAS,EACTmB,UAAU,SAAS,EACnBC,OAAO,MAAM,EACb,GAAGlB,OACiC;IACpC,MAAM,EAAEN,WAAW,EAAEe,UAAU,EAAEL,aAAa,EAAE,GAAGd;IAEnD,OACE,WADF,GACE,sCAAC6B,oCAAAA,MAAMA,EAAAA;QACL,aAAU;QACV,SAASF;QACT,MAAMC;QACN,WAAWL,IAAAA,0BAAAA,EAAAA,EACT,gCACAnB,iBAAAA,cACI,sCACA,+CACJI;QAEF,UAAU,CAACM;QACX,SAASK;QACR,GAAGT,KAAK;;0BAET,qCAACoB,sCAAAA,SAASA,EAAAA,CAAAA;0BACV,qCAAC;gBAAK,WAAU;0BAAU;;;;AAGhC;AAEA,SAASC,aAAa,EACpBvB,SAAS,EACTmB,UAAU,SAAS,EACnBC,OAAO,MAAM,EACb,GAAGlB,OACiC;IACpC,MAAM,EAAEN,WAAW,EAAEgB,UAAU,EAAEJ,aAAa,EAAE,GAAGhB;IAEnD,OACE,WADF,GACE,sCAAC6B,oCAAAA,MAAMA,EAAAA;QACL,aAAU;QACV,SAASF;QACT,MAAMC;QACN,WAAWL,IAAAA,0BAAAA,EAAAA,EACT,gCACAnB,iBAAAA,cACI,uCACA,kDACJI;QAEF,UAAU,CAACQ;QACX,SAASI;QACR,GAAGV,KAAK;;0BAET,qCAACsB,sCAAAA,UAAUA,EAAAA,CAAAA;0BACX,qCAAC;gBAAK,WAAU;0BAAU;;;;AAGhC"}
|
|
1
|
+
{"version":3,"file":"components\\ui\\carousel.cjs","sources":["webpack://@arolariu/components/webpack/runtime/compat_get_default_export","webpack://@arolariu/components/webpack/runtime/define_property_getters","webpack://@arolariu/components/webpack/runtime/has_own_property","webpack://@arolariu/components/webpack/runtime/make_namespace_object","webpack://@arolariu/components/./src/components/ui/carousel.tsx"],"sourcesContent":["// getDefaultExport function for compatibility with non-ESM modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};\n","__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n }\n }\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","\n\nimport * as React from \"react\";\nimport useEmblaCarousel, {\n type UseEmblaCarouselType,\n} from \"embla-carousel-react\";\nimport { ArrowLeft, ArrowRight } from \"lucide-react\";\n\nimport { cn } from \"@/lib/utils\";\nimport { Button } from \"@/components/ui/button\";\n\ntype CarouselApi = UseEmblaCarouselType[1];\ntype UseCarouselParameters = Parameters<typeof useEmblaCarousel>;\ntype CarouselOptions = UseCarouselParameters[0];\ntype CarouselPlugin = UseCarouselParameters[1];\n\ntype CarouselProps = {\n opts?: CarouselOptions;\n plugins?: CarouselPlugin;\n orientation?: \"horizontal\" | \"vertical\";\n setApi?: (api: CarouselApi) => void;\n};\n\ntype CarouselContextProps = {\n carouselRef: ReturnType<typeof useEmblaCarousel>[0];\n api: ReturnType<typeof useEmblaCarousel>[1];\n scrollPrev: () => void;\n scrollNext: () => void;\n canScrollPrev: boolean;\n canScrollNext: boolean;\n} & CarouselProps;\n\nconst CarouselContext = React.createContext<CarouselContextProps | null>(null);\n\nfunction useCarousel() {\n const context = React.useContext(CarouselContext);\n\n if (!context) {\n throw new Error(\"useCarousel must be used within a <Carousel />\");\n }\n\n return context;\n}\n\nfunction Carousel({\n orientation = \"horizontal\",\n opts,\n setApi,\n plugins,\n className,\n children,\n ...props\n}: React.ComponentProps<\"div\"> & CarouselProps) {\n const [carouselRef, api] = useEmblaCarousel(\n {\n ...opts,\n axis: orientation === \"horizontal\" ? \"x\" : \"y\",\n },\n plugins,\n );\n const [canScrollPrev, setCanScrollPrev] = React.useState(false);\n const [canScrollNext, setCanScrollNext] = React.useState(false);\n\n const onSelect = React.useCallback((api: CarouselApi) => {\n if (!api) return;\n setCanScrollPrev(api.canScrollPrev());\n setCanScrollNext(api.canScrollNext());\n }, []);\n\n const scrollPrev = React.useCallback(() => {\n api?.scrollPrev();\n }, [api]);\n\n const scrollNext = React.useCallback(() => {\n api?.scrollNext();\n }, [api]);\n\n const handleKeyDown = React.useCallback(\n (event: React.KeyboardEvent<HTMLDivElement>) => {\n if (event.key === \"ArrowLeft\") {\n event.preventDefault();\n scrollPrev();\n } else if (event.key === \"ArrowRight\") {\n event.preventDefault();\n scrollNext();\n }\n },\n [scrollPrev, scrollNext],\n );\n\n React.useEffect(() => {\n if (!api || !setApi) return;\n setApi(api);\n }, [api, setApi]);\n\n React.useEffect(() => {\n if (!api) return;\n onSelect(api);\n api.on(\"reInit\", onSelect);\n api.on(\"select\", onSelect);\n\n return () => {\n api?.off(\"select\", onSelect);\n };\n }, [api, onSelect]);\n\n return (\n <CarouselContext.Provider\n value={{\n carouselRef,\n api: api,\n opts,\n orientation:\n orientation || (opts?.axis === \"y\" ? \"vertical\" : \"horizontal\"),\n scrollPrev,\n scrollNext,\n canScrollPrev,\n canScrollNext,\n }}\n >\n <div\n onKeyDownCapture={handleKeyDown}\n className={cn(\"relative\", className)}\n role=\"region\"\n aria-roledescription=\"carousel\"\n data-slot=\"carousel\"\n {...props}\n >\n {children}\n </div>\n </CarouselContext.Provider>\n );\n}\n\nfunction CarouselContent({ className, ...props }: React.ComponentProps<\"div\">) {\n const { carouselRef, orientation } = useCarousel();\n\n return (\n <div\n ref={carouselRef}\n className=\"overflow-hidden\"\n data-slot=\"carousel-content\"\n >\n <div\n className={cn(\n \"flex\",\n orientation === \"horizontal\" ? \"-ml-4\" : \"-mt-4 flex-col\",\n className,\n )}\n {...props}\n />\n </div>\n );\n}\n\nfunction CarouselItem({ className, ...props }: React.ComponentProps<\"div\">) {\n const { orientation } = useCarousel();\n\n return (\n <div\n role=\"group\"\n aria-roledescription=\"slide\"\n data-slot=\"carousel-item\"\n className={cn(\n \"min-w-0 shrink-0 grow-0 basis-full\",\n orientation === \"horizontal\" ? \"pl-4\" : \"pt-4\",\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction CarouselPrevious({\n className,\n variant = \"outline\",\n size = \"icon\",\n ...props\n}: React.ComponentProps<typeof Button>) {\n const { orientation, scrollPrev, canScrollPrev } = useCarousel();\n\n return (\n <Button\n data-slot=\"carousel-previous\"\n variant={variant}\n size={size}\n className={cn(\n \"absolute size-8 rounded-full\",\n orientation === \"horizontal\"\n ? \"top-1/2 -left-12 -translate-y-1/2\"\n : \"-top-12 left-1/2 -translate-x-1/2 rotate-90\",\n className,\n )}\n disabled={!canScrollPrev}\n onClick={scrollPrev}\n {...props}\n >\n <ArrowLeft />\n <span className=\"sr-only\">Previous slide</span>\n </Button>\n );\n}\n\nfunction CarouselNext({\n className,\n variant = \"outline\",\n size = \"icon\",\n ...props\n}: React.ComponentProps<typeof Button>) {\n const { orientation, scrollNext, canScrollNext } = useCarousel();\n\n return (\n <Button\n data-slot=\"carousel-next\"\n variant={variant}\n size={size}\n className={cn(\n \"absolute size-8 rounded-full\",\n orientation === \"horizontal\"\n ? \"top-1/2 -right-12 -translate-y-1/2\"\n : \"-bottom-12 left-1/2 -translate-x-1/2 rotate-90\",\n className,\n )}\n disabled={!canScrollNext}\n onClick={scrollNext}\n {...props}\n >\n <ArrowRight />\n <span className=\"sr-only\">Next slide</span>\n </Button>\n );\n}\n\nexport {\n type CarouselApi,\n Carousel,\n CarouselContent,\n CarouselItem,\n CarouselPrevious,\n CarouselNext,\n};\n"],"names":["__webpack_require__","module","getter","definition","key","Object","obj","prop","Symbol","CarouselContext","React","useCarousel","context","Error","Carousel","orientation","opts","setApi","plugins","className","children","props","carouselRef","api","useEmblaCarousel","canScrollPrev","setCanScrollPrev","canScrollNext","setCanScrollNext","onSelect","scrollPrev","scrollNext","handleKeyDown","event","cn","CarouselContent","CarouselItem","CarouselPrevious","variant","size","Button","ArrowLeft","CarouselNext","ArrowRight"],"mappings":";;;;IACAA,oBAAoB,CAAC,GAAG,CAACC;QACxB,IAAIC,SAASD,UAAUA,OAAO,UAAU,GACvC,IAAOA,MAAM,CAAC,UAAU,GACxB,IAAOA;QACRD,oBAAoB,CAAC,CAACE,QAAQ;YAAE,GAAGA;QAAO;QAC1C,OAAOA;IACR;;;ICPAF,oBAAoB,CAAC,GAAG,CAAC,UAASG;QACjC,IAAI,IAAIC,OAAOD,WACR,IAAGH,oBAAoB,CAAC,CAACG,YAAYC,QAAQ,CAACJ,oBAAoB,CAAC,CAAC,UAASI,MACzEC,OAAO,cAAc,CAAC,UAASD,KAAK;YAAE,YAAY;YAAM,KAAKD,UAAU,CAACC,IAAI;QAAC;IAGzF;;;ICNAJ,oBAAoB,CAAC,GAAG,CAACM,KAAKC,OAAUF,OAAO,SAAS,CAAC,cAAc,CAAC,IAAI,CAACC,KAAKC;;;ICClFP,oBAAoB,CAAC,GAAG,CAAC;QACxB,IAAG,sBAAOQ,UAA0BA,OAAO,WAAW,EACrDH,OAAO,cAAc,CAAC,UAASG,OAAO,WAAW,EAAE;YAAE,OAAO;QAAS;QAEtEH,OAAO,cAAc,CAAC,UAAS,cAAc;YAAE,OAAO;QAAK;IAC5D;;;;;;;;;;;;;;;;;;AC0BA,MAAMI,kBAAkB,WAAlBA,GAAkBC,+BAAAA,aAAmB,CAA8B;AAEzE,SAASC;IACP,MAAMC,UAAUF,+BAAAA,UAAgB,CAACD;IAEjC,IAAI,CAACG,SACH,MAAM,IAAIC,MAAM;IAGlB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oB,sCAAAA,SAASA,EAAAA,CAAAA;0BACV,qCAAC;gBAAK,WAAU;0BAAU;;;;AAGhC;AAEA,SAASC,aAAa,EACpBvB,SAAS,EACTmB,UAAU,SAAS,EACnBC,OAAO,MAAM,EACb,GAAGlB,OACiC;IACpC,MAAM,EAAEN,WAAW,EAAEgB,UAAU,EAAEJ,aAAa,EAAE,GAAGhB;IAEnD,OACE,WADF,GACE,sCAAC6B,oCAAAA,MAAMA,EAAAA;QACL,aAAU;QACV,SAASF;QACT,MAAMC;QACN,WAAWL,IAAAA,0BAAAA,EAAAA,EACT,gCACAnB,iBAAAA,cACI,uCACA,kDACJI;QAEF,UAAU,CAACQ;QACX,SAASI;QACR,GAAGV,KAAK;;0BAET,qCAACsB,sCAAAA,UAAUA,EAAAA,CAAAA;0BACX,qCAAC;gBAAK,WAAU;0BAAU;;;;AAGhC"}
|
|
@@ -25,12 +25,12 @@ var __webpack_require__ = {};
|
|
|
25
25
|
var __webpack_exports__ = {};
|
|
26
26
|
__webpack_require__.r(__webpack_exports__);
|
|
27
27
|
__webpack_require__.d(__webpack_exports__, {
|
|
28
|
-
ChartContainer: ()=>ChartContainer,
|
|
29
28
|
ChartTooltip: ()=>ChartTooltip,
|
|
30
|
-
|
|
29
|
+
ChartContainer: ()=>ChartContainer,
|
|
30
|
+
ChartLegendContent: ()=>ChartLegendContent,
|
|
31
31
|
ChartTooltipContent: ()=>ChartTooltipContent,
|
|
32
|
-
|
|
33
|
-
|
|
32
|
+
ChartLegend: ()=>ChartLegend,
|
|
33
|
+
ChartStyle: ()=>ChartStyle
|
|
34
34
|
});
|
|
35
35
|
const jsx_runtime_namespaceObject = require("react/jsx-runtime");
|
|
36
36
|
const external_react_namespaceObject = require("react");
|
|
@@ -76,18 +76,18 @@ const ChartStyle = ({ id, config })=>{
|
|
|
76
76
|
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("style", {
|
|
77
77
|
dangerouslySetInnerHTML: {
|
|
78
78
|
__html: Object.entries(THEMES).map(([theme, prefix])=>`
|
|
79
|
-
${prefix} [data-chart=${id}] {
|
|
80
|
-
${colorConfig.map(([key, itemConfig])=>{
|
|
79
|
+
${prefix} [data-chart=${id}] {
|
|
80
|
+
${colorConfig.map(([key, itemConfig])=>{
|
|
81
81
|
const color = itemConfig.theme?.[theme] || itemConfig.color;
|
|
82
82
|
return color ? ` --color-${key}: ${color};` : null;
|
|
83
83
|
}).join("\n")}
|
|
84
|
-
}
|
|
85
|
-
`).join("\n")
|
|
84
|
+
}
|
|
85
|
+
`).join("\n")
|
|
86
86
|
}
|
|
87
87
|
});
|
|
88
88
|
};
|
|
89
89
|
const ChartTooltip = external_recharts_namespaceObject.Tooltip;
|
|
90
|
-
function ChartTooltipContent({ active, payload, className, indicator = "dot", hideLabel = false, hideIndicator = false,
|
|
90
|
+
function ChartTooltipContent({ active, payload, label, className, indicator = "dot", hideLabel = false, hideIndicator = false, labelFormatter, formatter, labelClassName, color, nameKey, labelKey }) {
|
|
91
91
|
const { config } = useChart();
|
|
92
92
|
const tooltipLabel = external_react_namespaceObject.useMemo(()=>{
|
|
93
93
|
if (hideLabel || !payload?.length) return null;
|
|
@@ -116,7 +116,7 @@ function ChartTooltipContent({ active, payload, className, indicator = "dot", hi
|
|
|
116
116
|
if (!active || !payload?.length) return null;
|
|
117
117
|
const nestLabel = 1 === payload.length && "dot" !== indicator;
|
|
118
118
|
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("div", {
|
|
119
|
-
className: (0, utils_cjs_namespaceObject.cn)("border-
|
|
119
|
+
className: (0, utils_cjs_namespaceObject.cn)("border-border/50 bg-background grid min-w-[8rem] items-start gap-1.5 rounded-lg border px-2.5 py-1.5 text-xs shadow-xl", className),
|
|
120
120
|
children: [
|
|
121
121
|
nestLabel ? null : tooltipLabel,
|
|
122
122
|
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
@@ -126,7 +126,7 @@ function ChartTooltipContent({ active, payload, className, indicator = "dot", hi
|
|
|
126
126
|
const itemConfig = getPayloadConfigFromPayload(config, item, key);
|
|
127
127
|
const indicatorColor = color || item.payload.fill || item.color;
|
|
128
128
|
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
129
|
-
className: (0, utils_cjs_namespaceObject.cn)("[&>svg]:text-
|
|
129
|
+
className: (0, utils_cjs_namespaceObject.cn)("[&>svg]:text-muted-foreground flex w-full flex-wrap items-stretch gap-2 [&>svg]:h-2.5 [&>svg]:w-2.5", "dot" === indicator && "items-center"),
|
|
130
130
|
children: formatter && item?.value !== void 0 && item.name ? formatter(item.value, item.name, item, index, item.payload) : /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(jsx_runtime_namespaceObject.Fragment, {
|
|
131
131
|
children: [
|
|
132
132
|
itemConfig?.icon ? /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(itemConfig.icon, {}) : !hideIndicator && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
@@ -149,13 +149,13 @@ function ChartTooltipContent({ active, payload, className, indicator = "dot", hi
|
|
|
149
149
|
children: [
|
|
150
150
|
nestLabel ? tooltipLabel : null,
|
|
151
151
|
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("span", {
|
|
152
|
-
className: "text-
|
|
152
|
+
className: "text-muted-foreground",
|
|
153
153
|
children: itemConfig?.label || item.name
|
|
154
154
|
})
|
|
155
155
|
]
|
|
156
156
|
}),
|
|
157
157
|
item.value && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("span", {
|
|
158
|
-
className: "text-
|
|
158
|
+
className: "text-foreground font-mono font-medium tabular-nums",
|
|
159
159
|
children: item.value.toLocaleString()
|
|
160
160
|
})
|
|
161
161
|
]
|
|
@@ -178,7 +178,7 @@ function ChartLegendContent({ className, hideIcon = false, payload, verticalAlig
|
|
|
178
178
|
const key = `${nameKey || item.dataKey || "value"}`;
|
|
179
179
|
const itemConfig = getPayloadConfigFromPayload(config, item, key);
|
|
180
180
|
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("div", {
|
|
181
|
-
className: (0, utils_cjs_namespaceObject.cn)("[&>svg]:text-
|
|
181
|
+
className: (0, utils_cjs_namespaceObject.cn)("[&>svg]:text-muted-foreground flex items-center gap-1.5 [&>svg]:h-3 [&>svg]:w-3"),
|
|
182
182
|
children: [
|
|
183
183
|
itemConfig?.icon && !hideIcon ? /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(itemConfig.icon, {}) : /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
184
184
|
className: "h-2 w-2 shrink-0 rounded-[2px]",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"components\\ui\\chart.cjs","sources":["webpack://@arolariu/components/./src/components/ui/chart.tsx"],"sourcesContent":["\n\nimport * as React from \"react\";\nimport * as RechartsPrimitive from \"recharts\";\n\nimport { cn } from \"@/lib/utils\";\n\n// Format: { THEME_NAME: CSS_SELECTOR }\nconst THEMES = { light: \"\", dark: \".dark\" } as const;\n\nexport type ChartConfig = {\n [k in string]: {\n label?: React.ReactNode;\n icon?: React.ComponentType;\n } & (\n | { color?: string; theme?: never }\n | { color?: never; theme: Record<keyof typeof THEMES, string> }\n );\n};\n\ntype ChartContextProps = {\n config: ChartConfig;\n};\n\nconst ChartContext = React.createContext<ChartContextProps | null>(null);\n\nfunction useChart() {\n const context = React.useContext(ChartContext);\n\n if (!context) {\n throw new Error(\"useChart must be used within a <ChartContainer />\");\n }\n\n return context;\n}\n\nfunction ChartContainer({\n id,\n className,\n children,\n config,\n ...props\n}: React.ComponentProps<\"div\"> & {\n config: ChartConfig;\n children: React.ComponentProps<\n typeof RechartsPrimitive.ResponsiveContainer\n >[\"children\"];\n}) {\n const uniqueId = React.useId();\n const chartId = `chart-${id || uniqueId.replace(/:/g, \"\")}`;\n\n return (\n <ChartContext.Provider value={{ config }}>\n <div\n data-slot=\"chart\"\n data-chart={chartId}\n className={cn(\n \"[&_.recharts-cartesian-axis-tick_text]:fill-muted-foreground [&_.recharts-cartesian-grid_line[stroke='#ccc']]:stroke-border/50 [&_.recharts-curve.recharts-tooltip-cursor]:stroke-border [&_.recharts-polar-grid_[stroke='#ccc']]:stroke-border [&_.recharts-radial-bar-background-sector]:fill-muted [&_.recharts-rectangle.recharts-tooltip-cursor]:fill-muted [&_.recharts-reference-line_[stroke='#ccc']]:stroke-border flex aspect-video justify-center text-xs [&_.recharts-dot[stroke='#fff']]:stroke-transparent [&_.recharts-layer]:outline-hidden [&_.recharts-sector]:outline-hidden [&_.recharts-sector[stroke='#fff']]:stroke-transparent [&_.recharts-surface]:outline-hidden\",\n className\n )}\n {...props}\n >\n <ChartStyle id={chartId} config={config} />\n <RechartsPrimitive.ResponsiveContainer>\n {children}\n </RechartsPrimitive.ResponsiveContainer>\n </div>\n </ChartContext.Provider>\n );\n}\n\nconst ChartStyle = ({ id, config }: { id: string; config: ChartConfig }) => {\n const colorConfig = Object.entries(config).filter(\n ([, config]) => config.theme || config.color\n );\n\n if (!colorConfig.length) {\n return null;\n }\n\n return (\n <style\n dangerouslySetInnerHTML={{\n __html: Object.entries(THEMES)\n .map(\n ([theme, prefix]) => `\n${prefix} [data-chart=${id}] {\n${colorConfig\n .map(([key, itemConfig]) => {\n const color =\n itemConfig.theme?.[theme as keyof typeof itemConfig.theme] ||\n itemConfig.color;\n return color ? ` --color-${key}: ${color};` : null;\n })\n .join(\"\\n\")}\n}\n`\n )\n .join(\"\\n\"),\n }}\n />\n );\n};\n\nconst ChartTooltip = RechartsPrimitive.Tooltip;\n\nfunction ChartTooltipContent({\n active,\n payload,\n className,\n indicator = \"dot\",\n hideLabel = false,\n hideIndicator = false,\n label,\n labelFormatter,\n labelClassName,\n formatter,\n color,\n nameKey,\n labelKey,\n}: React.ComponentProps<typeof RechartsPrimitive.Tooltip> &\n React.ComponentProps<\"div\"> & {\n hideLabel?: boolean;\n hideIndicator?: boolean;\n indicator?: \"line\" | \"dot\" | \"dashed\";\n nameKey?: string;\n labelKey?: string;\n }) {\n const { config } = useChart();\n\n const tooltipLabel = React.useMemo(() => {\n if (hideLabel || !payload?.length) {\n return null;\n }\n\n const [item] = payload;\n const key = `${labelKey || item?.dataKey || item?.name || \"value\"}`;\n const itemConfig = getPayloadConfigFromPayload(config, item, key);\n const value =\n !labelKey && typeof label === \"string\"\n ? config[label as keyof typeof config]?.label || label\n : itemConfig?.label;\n\n if (labelFormatter) {\n return (\n <div className={cn(\"font-medium\", labelClassName)}>\n {labelFormatter(value, payload)}\n </div>\n );\n }\n\n if (!value) {\n return null;\n }\n\n return <div className={cn(\"font-medium\", labelClassName)}>{value}</div>;\n }, [\n label,\n labelFormatter,\n payload,\n hideLabel,\n labelClassName,\n config,\n labelKey,\n ]);\n\n if (!active || !payload?.length) {\n return null;\n }\n\n const nestLabel = payload.length === 1 && indicator !== \"dot\";\n\n return (\n <div\n className={cn(\n \"border-neutral-200/50 bg-white grid min-w-[8rem] items-start gap-1.5 rounded-lg border border-neutral-200 px-2.5 py-1.5 text-xs shadow-xl dark:border-neutral-800/50 dark:bg-neutral-950 dark:border-neutral-800\",\n className\n )}\n >\n {!nestLabel ? tooltipLabel : null}\n <div className=\"grid gap-1.5\">\n {payload.map((item, index) => {\n const key = `${nameKey || item.name || item.dataKey || \"value\"}`;\n const itemConfig = getPayloadConfigFromPayload(config, item, key);\n const indicatorColor = color || item.payload.fill || item.color;\n\n return (\n <div\n key={item.dataKey}\n className={cn(\n \"[&>svg]:text-neutral-500 flex w-full flex-wrap items-stretch gap-2 [&>svg]:h-2.5 [&>svg]:w-2.5 dark:[&>svg]:text-neutral-400\",\n indicator === \"dot\" && \"items-center\"\n )}\n >\n {formatter && item?.value !== undefined && item.name ? (\n formatter(item.value, item.name, item, index, item.payload)\n ) : (\n <>\n {itemConfig?.icon ? (\n <itemConfig.icon />\n ) : (\n !hideIndicator && (\n <div\n className={cn(\n \"shrink-0 rounded-[2px] border-(--color-border) bg-(--color-bg)\",\n {\n \"h-2.5 w-2.5\": indicator === \"dot\",\n \"w-1\": indicator === \"line\",\n \"w-0 border-[1.5px] border-dashed bg-transparent\":\n indicator === \"dashed\",\n \"my-0.5\": nestLabel && indicator === \"dashed\",\n }\n )}\n style={\n {\n \"--color-bg\": indicatorColor,\n \"--color-border\": indicatorColor,\n } as React.CSSProperties\n }\n />\n )\n )}\n <div\n className={cn(\n \"flex flex-1 justify-between leading-none\",\n nestLabel ? \"items-end\" : \"items-center\"\n )}\n >\n <div className=\"grid gap-1.5\">\n {nestLabel ? tooltipLabel : null}\n <span className=\"text-neutral-500 dark:text-neutral-400\">\n {itemConfig?.label || item.name}\n </span>\n </div>\n {item.value && (\n <span className=\"text-neutral-950 font-mono font-medium tabular-nums dark:text-neutral-50\">\n {item.value.toLocaleString()}\n </span>\n )}\n </div>\n </>\n )}\n </div>\n );\n })}\n </div>\n </div>\n );\n}\n\nconst ChartLegend = RechartsPrimitive.Legend;\n\nfunction ChartLegendContent({\n className,\n hideIcon = false,\n payload,\n verticalAlign = \"bottom\",\n nameKey,\n}: React.ComponentProps<\"div\"> &\n Pick<RechartsPrimitive.LegendProps, \"payload\" | \"verticalAlign\"> & {\n hideIcon?: boolean;\n nameKey?: string;\n }) {\n const { config } = useChart();\n\n if (!payload?.length) {\n return null;\n }\n\n return (\n <div\n className={cn(\n \"flex items-center justify-center gap-4\",\n verticalAlign === \"top\" ? \"pb-3\" : \"pt-3\",\n className\n )}\n >\n {payload.map((item) => {\n const key = `${nameKey || item.dataKey || \"value\"}`;\n const itemConfig = getPayloadConfigFromPayload(config, item, key);\n\n return (\n <div\n key={item.value}\n className={cn(\n \"[&>svg]:text-neutral-500 flex items-center gap-1.5 [&>svg]:h-3 [&>svg]:w-3 dark:[&>svg]:text-neutral-400\"\n )}\n >\n {itemConfig?.icon && !hideIcon ? (\n <itemConfig.icon />\n ) : (\n <div\n className=\"h-2 w-2 shrink-0 rounded-[2px]\"\n style={{\n backgroundColor: item.color,\n }}\n />\n )}\n {itemConfig?.label}\n </div>\n );\n })}\n </div>\n );\n}\n\n// Helper to extract item config from a payload.\nfunction getPayloadConfigFromPayload(\n config: ChartConfig,\n payload: unknown,\n key: string\n) {\n if (typeof payload !== \"object\" || payload === null) {\n return undefined;\n }\n\n const payloadPayload =\n \"payload\" in payload &&\n typeof payload.payload === \"object\" &&\n payload.payload !== null\n ? payload.payload\n : undefined;\n\n let configLabelKey: string = key;\n\n if (\n key in payload &&\n typeof payload[key as keyof typeof payload] === \"string\"\n ) {\n configLabelKey = payload[key as keyof typeof payload] as string;\n } else if (\n payloadPayload &&\n key in payloadPayload &&\n typeof payloadPayload[key as keyof typeof payloadPayload] === \"string\"\n ) {\n configLabelKey = payloadPayload[\n key as keyof typeof payloadPayload\n ] as string;\n }\n\n return configLabelKey in config\n ? config[configLabelKey]\n : config[key as keyof typeof config];\n}\n\nexport {\n ChartContainer,\n ChartTooltip,\n ChartTooltipContent,\n ChartLegend,\n ChartLegendContent,\n ChartStyle,\n};\n"],"names":["THEMES","ChartContext","React","useChart","context","Error","ChartContainer","id","className","children","config","props","uniqueId","chartId","cn","ChartStyle","RechartsPrimitive","colorConfig","Object","theme","prefix","key","itemConfig","color","ChartTooltip","ChartTooltipContent","active","payload","indicator","hideLabel","hideIndicator","label","labelFormatter","labelClassName","formatter","nameKey","labelKey","tooltipLabel","item","getPayloadConfigFromPayload","value","nestLabel","index","indicatorColor","undefined","ChartLegend","ChartLegendContent","hideIcon","verticalAlign","payloadPayload","configLabelKey"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAQA,MAAMA,SAAS;IAAE,OAAO;IAAI,MAAM;AAAQ;AAgB1C,MAAMC,eAAe,WAAfA,GAAeC,+BAAAA,aAAmB,CAA2B;AAEnE,SAASC;IACP,MAAMC,UAAUF,+BAAAA,UAAgB,CAACD;IAEjC,IAAI,CAACG,SACH,MAAM,IAAIC,MAAM;IAGlB,OAAOD;AACT;AAEA,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gBAA0B,SAAS,QACnCxC;kBAGDmB,QAAQ,GAAG,CAAC,CAACW;YACZ,MAAMjB,MAAM,GAAGc,WAAWG,KAAK,OAAO,IAAI,SAAS;YACnD,MAAMhB,aAAaiB,4BAA4B7B,QAAQ4B,MAAMjB;YAE7D,OACE,WADF,GACE,sCAAC;gBAEC,WAAWP,IAAAA,0BAAAA,EAAAA,EACT;;oBAGDQ,YAAY,QAAQ,CAACyB,WACpB,WADoBA,GACpB,qCAACzB,WAAW,IAAI,QAEhB,mDAAC;wBACC,WAAU;wBACV,OAAO;4BACL,iBAAiBgB,KAAK,KAAK;wBAC7B;;oBAGHhB,YAAY;;eAfRgB,KAAK,KAAK;QAkBrB;;AAGN;AAGA,SAASC,4BACP7B,MAAmB,EACnBiB,OAAgB,EAChBN,GAAW;IAEX,IAAI,mBAAOM,WAAwBA,SAAAA,SACjC;IAGF,MAAMsB,iBACJ,aAAatB,WACb,mBAAOA,QAAQ,OAAO,IACtBA,SAAAA,QAAQ,OAAO,GACXA,QAAQ,OAAO,GACfiB,KAAAA;IAEN,IAAIM,iBAAyB7B;IAE7B,IACEA,OAAOM,WACP,mBAAOA,OAAO,CAACN,IAA4B,EAE3C6B,iBAAiBvB,OAAO,CAACN,IAA4B;SAChD,IACL4B,kBACA5B,OAAO4B,kBACP,mBAAOA,cAAc,CAAC5B,IAAmC,EAEzD6B,iBAAiBD,cAAc,CAC7B5B,IACD;IAGH,OAAO6B,kBAAkBxC,SACrBA,MAAM,CAACwC,eAAe,GACtBxC,MAAM,CAACW,IAA2B;AACxC"}
|
|
1
|
+
{"version":3,"file":"components\\ui\\chart.cjs","sources":["webpack://@arolariu/components/webpack/runtime/define_property_getters","webpack://@arolariu/components/webpack/runtime/has_own_property","webpack://@arolariu/components/webpack/runtime/make_namespace_object","webpack://@arolariu/components/./src/components/ui/chart.tsx"],"sourcesContent":["__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n }\n }\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","\n\nimport * as React from \"react\";\nimport * as RechartsPrimitive from \"recharts\";\nimport type { LegendPayload } from \"recharts/types/component/DefaultLegendContent\";\nimport {\n NameType,\n Payload,\n ValueType,\n} from \"recharts/types/component/DefaultTooltipContent\";\nimport type { Props as LegendProps } from \"recharts/types/component/Legend\";\nimport { TooltipContentProps } from \"recharts/types/component/Tooltip\";\n\nimport { cn } from \"@/lib/utils\";\n\n// Format: { THEME_NAME: CSS_SELECTOR }\nconst THEMES = { light: \"\", dark: \".dark\" } as const;\n\nexport type ChartConfig = {\n [k in string]: {\n label?: React.ReactNode;\n icon?: React.ComponentType;\n } & (\n | { color?: string; theme?: never }\n | { color?: never; theme: Record<keyof typeof THEMES, string> }\n );\n};\n\ntype ChartContextProps = {\n config: ChartConfig;\n};\n\nconst ChartContext = React.createContext<ChartContextProps | null>(null);\n\nfunction useChart() {\n const context = React.useContext(ChartContext);\n\n if (!context) {\n throw new Error(\"useChart must be used within a <ChartContainer />\");\n }\n\n return context;\n}\n\nfunction ChartContainer({\n id,\n className,\n children,\n config,\n ...props\n}: React.ComponentProps<\"div\"> & {\n config: ChartConfig;\n children: React.ComponentProps<\n typeof RechartsPrimitive.ResponsiveContainer\n >[\"children\"];\n}) {\n const uniqueId = React.useId();\n const chartId = `chart-${id || uniqueId.replace(/:/g, \"\")}`;\n\n return (\n <ChartContext.Provider value={{ config }}>\n <div\n data-slot=\"chart\"\n data-chart={chartId}\n className={cn(\n \"[&_.recharts-cartesian-axis-tick_text]:fill-muted-foreground [&_.recharts-cartesian-grid_line[stroke='#ccc']]:stroke-border/50 [&_.recharts-curve.recharts-tooltip-cursor]:stroke-border [&_.recharts-polar-grid_[stroke='#ccc']]:stroke-border [&_.recharts-radial-bar-background-sector]:fill-muted [&_.recharts-rectangle.recharts-tooltip-cursor]:fill-muted [&_.recharts-reference-line_[stroke='#ccc']]:stroke-border flex aspect-video justify-center text-xs [&_.recharts-dot[stroke='#fff']]:stroke-transparent [&_.recharts-layer]:outline-hidden [&_.recharts-sector]:outline-hidden [&_.recharts-sector[stroke='#fff']]:stroke-transparent [&_.recharts-surface]:outline-hidden\",\n className,\n )}\n {...props}\n >\n <ChartStyle id={chartId} config={config} />\n <RechartsPrimitive.ResponsiveContainer>\n {children}\n </RechartsPrimitive.ResponsiveContainer>\n </div>\n </ChartContext.Provider>\n );\n}\n\nconst ChartStyle = ({ id, config }: { id: string; config: ChartConfig }) => {\n const colorConfig = Object.entries(config).filter(\n ([, config]) => config.theme || config.color,\n );\n\n if (!colorConfig.length) {\n return null;\n }\n\n return (\n <style\n dangerouslySetInnerHTML={{\n __html: Object.entries(THEMES)\n .map(\n ([theme, prefix]) => `\n ${prefix} [data-chart=${id}] {\n ${colorConfig\n .map(([key, itemConfig]) => {\n const color =\n itemConfig.theme?.[theme as keyof typeof itemConfig.theme] ||\n itemConfig.color;\n return color ? ` --color-${key}: ${color};` : null;\n })\n .join(\"\\n\")}\n }\n `,\n )\n .join(\"\\n\"),\n }}\n />\n );\n};\n\nconst ChartTooltip = RechartsPrimitive.Tooltip;\n\ntype CustomTooltipProps = TooltipContentProps<ValueType, NameType> & {\n className?: string;\n hideLabel?: boolean;\n hideIndicator?: boolean;\n indicator?: \"line\" | \"dot\" | \"dashed\";\n nameKey?: string;\n labelKey?: string;\n labelFormatter?: (\n label: TooltipContentProps<number, string>[\"label\"],\n payload: TooltipContentProps<number, string>[\"payload\"],\n ) => React.ReactNode;\n formatter?: (\n value: number | string,\n name: string,\n item: Payload<number | string, string>,\n index: number,\n payload: ReadonlyArray<Payload<number | string, string>>,\n ) => React.ReactNode;\n labelClassName?: string;\n color?: string;\n};\n\nfunction ChartTooltipContent({\n active,\n payload,\n label,\n className,\n indicator = \"dot\",\n hideLabel = false,\n hideIndicator = false,\n labelFormatter,\n formatter,\n labelClassName,\n color,\n nameKey,\n labelKey,\n}: CustomTooltipProps) {\n const { config } = useChart();\n\n const tooltipLabel = React.useMemo(() => {\n if (hideLabel || !payload?.length) {\n return null;\n }\n\n const [item] = payload;\n const key = `${labelKey || item?.dataKey || item?.name || \"value\"}`;\n const itemConfig = getPayloadConfigFromPayload(config, item, key);\n const value =\n !labelKey && typeof label === \"string\"\n ? config[label as keyof typeof config]?.label || label\n : itemConfig?.label;\n\n if (labelFormatter) {\n return (\n <div className={cn(\"font-medium\", labelClassName)}>\n {labelFormatter(value, payload)}\n </div>\n );\n }\n\n if (!value) {\n return null;\n }\n\n return <div className={cn(\"font-medium\", labelClassName)}>{value}</div>;\n }, [\n label,\n labelFormatter,\n payload,\n hideLabel,\n labelClassName,\n config,\n labelKey,\n ]);\n\n if (!active || !payload?.length) {\n return null;\n }\n\n const nestLabel = payload.length === 1 && indicator !== \"dot\";\n\n return (\n <div\n className={cn(\n \"border-border/50 bg-background grid min-w-[8rem] items-start gap-1.5 rounded-lg border px-2.5 py-1.5 text-xs shadow-xl\",\n className,\n )}\n >\n {!nestLabel ? tooltipLabel : null}\n <div className=\"grid gap-1.5\">\n {payload.map((item, index) => {\n const key = `${nameKey || item.name || item.dataKey || \"value\"}`;\n const itemConfig = getPayloadConfigFromPayload(config, item, key);\n const indicatorColor = color || item.payload.fill || item.color;\n\n return (\n <div\n key={item.dataKey}\n className={cn(\n \"[&>svg]:text-muted-foreground flex w-full flex-wrap items-stretch gap-2 [&>svg]:h-2.5 [&>svg]:w-2.5\",\n indicator === \"dot\" && \"items-center\",\n )}\n >\n {formatter && item?.value !== undefined && item.name ? (\n formatter(item.value, item.name, item, index, item.payload)\n ) : (\n <>\n {itemConfig?.icon ? (\n <itemConfig.icon />\n ) : (\n !hideIndicator && (\n <div\n className={cn(\n \"shrink-0 rounded-[2px] border-(--color-border) bg-(--color-bg)\",\n {\n \"h-2.5 w-2.5\": indicator === \"dot\",\n \"w-1\": indicator === \"line\",\n \"w-0 border-[1.5px] border-dashed bg-transparent\":\n indicator === \"dashed\",\n \"my-0.5\": nestLabel && indicator === \"dashed\",\n },\n )}\n style={\n {\n \"--color-bg\": indicatorColor,\n \"--color-border\": indicatorColor,\n } as React.CSSProperties\n }\n />\n )\n )}\n <div\n className={cn(\n \"flex flex-1 justify-between leading-none\",\n nestLabel ? \"items-end\" : \"items-center\",\n )}\n >\n <div className=\"grid gap-1.5\">\n {nestLabel ? tooltipLabel : null}\n <span className=\"text-muted-foreground\">\n {itemConfig?.label || item.name}\n </span>\n </div>\n {item.value && (\n <span className=\"text-foreground font-mono font-medium tabular-nums\">\n {item.value.toLocaleString()}\n </span>\n )}\n </div>\n </>\n )}\n </div>\n );\n })}\n </div>\n </div>\n );\n}\n\nconst ChartLegend = RechartsPrimitive.Legend;\n\ntype ChartLegendContentProps = {\n className?: string;\n hideIcon?: boolean;\n verticalAlign?: LegendProps[\"verticalAlign\"];\n payload?: LegendPayload[];\n nameKey?: string;\n};\n\nfunction ChartLegendContent({\n className,\n hideIcon = false,\n payload,\n verticalAlign = \"bottom\",\n nameKey,\n}: ChartLegendContentProps) {\n const { config } = useChart();\n\n if (!payload?.length) {\n return null;\n }\n\n return (\n <div\n className={cn(\n \"flex items-center justify-center gap-4\",\n verticalAlign === \"top\" ? \"pb-3\" : \"pt-3\",\n className,\n )}\n >\n {payload.map((item) => {\n const key = `${nameKey || item.dataKey || \"value\"}`;\n const itemConfig = getPayloadConfigFromPayload(config, item, key);\n\n return (\n <div\n key={item.value}\n className={cn(\n \"[&>svg]:text-muted-foreground flex items-center gap-1.5 [&>svg]:h-3 [&>svg]:w-3\",\n )}\n >\n {itemConfig?.icon && !hideIcon ? (\n <itemConfig.icon />\n ) : (\n <div\n className=\"h-2 w-2 shrink-0 rounded-[2px]\"\n style={{\n backgroundColor: item.color,\n }}\n />\n )}\n {itemConfig?.label}\n </div>\n );\n })}\n </div>\n );\n}\n\n// Helper to extract item config from a payload.\nfunction getPayloadConfigFromPayload(\n config: ChartConfig,\n payload: unknown,\n key: string,\n) {\n if (typeof payload !== \"object\" || payload === null) {\n return undefined;\n }\n\n const payloadPayload =\n \"payload\" in payload &&\n typeof payload.payload === \"object\" &&\n payload.payload !== null\n ? payload.payload\n : undefined;\n\n let configLabelKey: string = key;\n\n if (\n key in payload &&\n typeof payload[key as keyof typeof payload] === \"string\"\n ) {\n configLabelKey = payload[key as keyof typeof payload] as string;\n } else if (\n payloadPayload &&\n key in payloadPayload &&\n typeof payloadPayload[key as keyof typeof payloadPayload] === \"string\"\n ) {\n configLabelKey = payloadPayload[\n key as keyof typeof payloadPayload\n ] as string;\n }\n\n return configLabelKey in config\n ? config[configLabelKey]\n : config[key as keyof typeof config];\n}\n\nexport {\n ChartContainer,\n ChartTooltip,\n ChartTooltipContent,\n ChartLegend,\n ChartLegendContent,\n ChartStyle,\n};\n"],"names":["__webpack_require__","definition","key","Object","obj","prop","Symbol","THEMES","ChartContext","React","useChart","context","Error","ChartContainer","id","className","children","config","props","uniqueId","chartId","cn","ChartStyle","RechartsPrimitive","colorConfig","theme","prefix","itemConfig","color","ChartTooltip","ChartTooltipContent","active","payload","label","indicator","hideLabel","hideIndicator","labelFormatter","formatter","labelClassName","nameKey","labelKey","tooltipLabel","item","getPayloadConfigFromPayload","value","nestLabel","index","indicatorColor","undefined","ChartLegend","ChartLegendContent","hideIcon","verticalAlign","payloadPayload","configLabelKey"],"mappings":";;;;IAAAA,oBAAoB,CAAC,GAAG,CAAC,UAASC;QACjC,IAAI,IAAIC,OAAOD,WACR,IAAGD,oBAAoB,CAAC,CAACC,YAAYC,QAAQ,CAACF,oBAAoB,CAAC,CAAC,UAASE,MACzEC,OAAO,cAAc,CAAC,UAASD,KAAK;YAAE,YAAY;YAAM,KAAKD,UAAU,CAACC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iB;IAEN,IAAIM,iBAAyBrD;IAE7B,IACEA,OAAO8B,WACP,mBAAOA,OAAO,CAAC9B,IAA4B,EAE3CqD,iBAAiBvB,OAAO,CAAC9B,IAA4B;SAChD,IACLoD,kBACApD,OAAOoD,kBACP,mBAAOA,cAAc,CAACpD,IAAmC,EAEzDqD,iBAAiBD,cAAc,CAC7BpD,IACD;IAGH,OAAOqD,kBAAkBtC,SACrBA,MAAM,CAACsC,eAAe,GACtBtC,MAAM,CAACf,IAA2B;AACxC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"components\\ui\\checkbox.cjs","sources":["webpack://@arolariu/components/./src/components/ui/checkbox.tsx"],"sourcesContent":["\n\nimport * as React from \"react\";\nimport * as CheckboxPrimitive from \"@radix-ui/react-checkbox\";\nimport { CheckIcon } from \"lucide-react\";\n\nimport { cn } from \"@/lib/utils\";\n\nfunction Checkbox({\n className,\n ...props\n}: React.ComponentProps<typeof CheckboxPrimitive.Root>) {\n return (\n <CheckboxPrimitive.Root\n data-slot=\"checkbox\"\n className={cn(\n \"peer border-neutral-200 dark:bg-neutral-200/30 data-[state=checked]:bg-neutral-900 data-[state=checked]:text-neutral-50 dark:data-[state=checked]:bg-neutral-900 data-[state=checked]:border-neutral-900 focus-visible:border-neutral-950 focus-visible:ring-neutral-950/50 aria-invalid:ring-red-500/20 dark:aria-invalid:ring-red-500/40 aria-invalid:border-red-500 size-4 shrink-0 rounded-[4px] border shadow-xs transition-shadow outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 dark:border-neutral-800 dark:dark:bg-neutral-800/30 dark:data-[state=checked]:bg-neutral-50 dark:data-[state=checked]:text-neutral-900 dark:dark:data-[state=checked]:bg-neutral-50 dark:data-[state=checked]:border-neutral-50 dark:focus-visible:border-neutral-300 dark:focus-visible:ring-neutral-300/50 dark:aria-invalid:ring-red-900/20 dark:dark:aria-invalid:ring-red-900/40 dark:aria-invalid:border-red-900\",\n className
|
|
1
|
+
{"version":3,"file":"components\\ui\\checkbox.cjs","sources":["webpack://@arolariu/components/webpack/runtime/define_property_getters","webpack://@arolariu/components/webpack/runtime/has_own_property","webpack://@arolariu/components/webpack/runtime/make_namespace_object","webpack://@arolariu/components/./src/components/ui/checkbox.tsx"],"sourcesContent":["__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n }\n }\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","\n\nimport * as React from \"react\";\nimport * as CheckboxPrimitive from \"@radix-ui/react-checkbox\";\nimport { CheckIcon } from \"lucide-react\";\n\nimport { cn } from \"@/lib/utils\";\n\nfunction Checkbox({\n className,\n ...props\n}: React.ComponentProps<typeof CheckboxPrimitive.Root>) {\n return (\n <CheckboxPrimitive.Root\n data-slot=\"checkbox\"\n className={cn(\n \"peer border-neutral-200 dark:bg-neutral-200/30 data-[state=checked]:bg-neutral-900 data-[state=checked]:text-neutral-50 dark:data-[state=checked]:bg-neutral-900 data-[state=checked]:border-neutral-900 focus-visible:border-neutral-950 focus-visible:ring-neutral-950/50 aria-invalid:ring-red-500/20 dark:aria-invalid:ring-red-500/40 aria-invalid:border-red-500 size-4 shrink-0 rounded-[4px] border shadow-xs transition-shadow outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 dark:border-neutral-800 dark:dark:bg-neutral-800/30 dark:data-[state=checked]:bg-neutral-50 dark:data-[state=checked]:text-neutral-900 dark:dark:data-[state=checked]:bg-neutral-50 dark:data-[state=checked]:border-neutral-50 dark:focus-visible:border-neutral-300 dark:focus-visible:ring-neutral-300/50 dark:aria-invalid:ring-red-900/20 dark:dark:aria-invalid:ring-red-900/40 dark:aria-invalid:border-red-900\",\n className,\n )}\n {...props}\n >\n <CheckboxPrimitive.Indicator\n data-slot=\"checkbox-indicator\"\n className=\"flex items-center justify-center text-current transition-none\"\n >\n <CheckIcon className=\"size-3.5\" />\n </CheckboxPrimitive.Indicator>\n </CheckboxPrimitive.Root>\n );\n}\n\nexport { Checkbox };\n"],"names":["__webpack_require__","definition","key","Object","obj","prop","Symbol","Checkbox","className","props","CheckboxPrimitive","cn","CheckIcon"],"mappings":";;;;IAAAA,oBAAoB,CAAC,GAAG,CAAC,UAASC;QACjC,IAAI,IAAIC,OAAOD,WACR,IAAGD,oBAAoB,CAAC,CAACC,YAAYC,QAAQ,CAACF,oBAAoB,CAAC,CAAC,UAASE,MACzEC,OAAO,cAAc,CAAC,UAASD,KAAK;YAAE,YAAY;YAAM,KAAKD,UAAU,CAACC,IAAI;QAAC;IAGzF;;;ICNAF,oBAAoB,CAAC,GAAG,CAACI,KAAKC,OAAUF,OAAO,SAAS,CAAC,cAAc,CAAC,IAAI,CAACC,KAAKC;;;ICClFL,oBAAoB,CAAC,GAAG,CAAC;QACxB,IAAG,sBAAOM,UAA0BA,OAAO,WAAW,EACrDH,OAAO,cAAc,CAAC,UAASG,OAAO,WAAW,EAAE;YAAE,OAAO;QAAS;QAEtEH,OAAO,cAAc,CAAC,UAAS,cAAc;YAAE,OAAO;QAAK;IAC5D;;;;;;;;;;;;ACEA,SAASI,SAAS,EAChBC,SAAS,EACT,GAAGC,OACiD;IACpD,OACE,WADF,GACE,qCAACC,+BAAAA,IAAsB;QACrB,aAAU;QACV,WAAWC,IAAAA,0BAAAA,EAAAA,EACT,w5BACAH;QAED,GAAGC,KAAK;kBAET,mDAACC,+BAAAA,SAA2B;YAC1B,aAAU;YACV,WAAU;sBAEV,mDAACE,sCAAAA,SAASA,EAAAA;gBAAC,WAAU;;;;AAI7B"}
|
|
@@ -25,9 +25,9 @@ var __webpack_require__ = {};
|
|
|
25
25
|
var __webpack_exports__ = {};
|
|
26
26
|
__webpack_require__.r(__webpack_exports__);
|
|
27
27
|
__webpack_require__.d(__webpack_exports__, {
|
|
28
|
-
|
|
28
|
+
CollapsibleContent: ()=>CollapsibleContent,
|
|
29
29
|
Collapsible: ()=>Collapsible,
|
|
30
|
-
|
|
30
|
+
CollapsibleTrigger: ()=>CollapsibleTrigger
|
|
31
31
|
});
|
|
32
32
|
const jsx_runtime_namespaceObject = require("react/jsx-runtime");
|
|
33
33
|
require("react");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"components\\ui\\collapsible.cjs","sources":["webpack://@arolariu/components/./src/components/ui/collapsible.tsx"],"sourcesContent":["\n\nimport * as React from \"react\";\nimport * as CollapsiblePrimitive from \"@radix-ui/react-collapsible\";\n\nfunction Collapsible({\n ...props\n}: React.ComponentProps<typeof CollapsiblePrimitive.Root>) {\n return <CollapsiblePrimitive.Root data-slot=\"collapsible\" {...props} />;\n}\n\nfunction CollapsibleTrigger({\n ...props\n}: React.ComponentProps<typeof CollapsiblePrimitive.CollapsibleTrigger>) {\n return (\n <CollapsiblePrimitive.CollapsibleTrigger\n data-slot=\"collapsible-trigger\"\n {...props}\n />\n );\n}\n\nfunction CollapsibleContent({\n ...props\n}: React.ComponentProps<typeof CollapsiblePrimitive.CollapsibleContent>) {\n return (\n <CollapsiblePrimitive.CollapsibleContent\n data-slot=\"collapsible-content\"\n {...props}\n />\n );\n}\n\nexport { Collapsible, CollapsibleTrigger, CollapsibleContent };\n"],"names":["Collapsible","props","CollapsiblePrimitive","CollapsibleTrigger","CollapsibleContent"],"mappings":"
|
|
1
|
+
{"version":3,"file":"components\\ui\\collapsible.cjs","sources":["webpack://@arolariu/components/webpack/runtime/define_property_getters","webpack://@arolariu/components/webpack/runtime/has_own_property","webpack://@arolariu/components/webpack/runtime/make_namespace_object","webpack://@arolariu/components/./src/components/ui/collapsible.tsx"],"sourcesContent":["__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n }\n }\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","\n\nimport * as React from \"react\";\nimport * as CollapsiblePrimitive from \"@radix-ui/react-collapsible\";\n\nfunction Collapsible({\n ...props\n}: React.ComponentProps<typeof CollapsiblePrimitive.Root>) {\n return <CollapsiblePrimitive.Root data-slot=\"collapsible\" {...props} />;\n}\n\nfunction CollapsibleTrigger({\n ...props\n}: React.ComponentProps<typeof CollapsiblePrimitive.CollapsibleTrigger>) {\n return (\n <CollapsiblePrimitive.CollapsibleTrigger\n data-slot=\"collapsible-trigger\"\n {...props}\n />\n );\n}\n\nfunction CollapsibleContent({\n ...props\n}: React.ComponentProps<typeof CollapsiblePrimitive.CollapsibleContent>) {\n return (\n <CollapsiblePrimitive.CollapsibleContent\n data-slot=\"collapsible-content\"\n {...props}\n />\n );\n}\n\nexport { Collapsible, CollapsibleTrigger, CollapsibleContent };\n"],"names":["__webpack_require__","definition","key","Object","obj","prop","Symbol","Collapsible","props","CollapsiblePrimitive","CollapsibleTrigger","CollapsibleContent"],"mappings":";;;;IAAAA,oBAAoB,CAAC,GAAG,CAAC,UAASC;QACjC,IAAI,IAAIC,OAAOD,WACR,IAAGD,oBAAoB,CAAC,CAACC,YAAYC,QAAQ,CAACF,oBAAoB,CAAC,CAAC,UAASE,MACzEC,OAAO,cAAc,CAAC,UAASD,KAAK;YAAE,YAAY;YAAM,KAAKD,UAAU,CAACC,IAAI;QAAC;IAGzF;;;ICNAF,oBAAoB,CAAC,GAAG,CAACI,KAAKC,OAAUF,OAAO,SAAS,CAAC,cAAc,CAAC,IAAI,CAACC,KAAKC;;;ICClFL,oBAAoB,CAAC,GAAG,CAAC;QACxB,IAAG,sBAAOM,UAA0BA,OAAO,WAAW,EACrDH,OAAO,cAAc,CAAC,UAASG,OAAO,WAAW,EAAE;YAAE,OAAO;QAAS;QAEtEH,OAAO,cAAc,CAAC,UAAS,cAAc;YAAE,OAAO;QAAK;IAC5D;;;;;;;;;;;;ACDA,SAASI,YAAY,EACnB,GAAGC,OACoD;IACvD,OAAO,WAAP,GAAO,qCAACC,kCAAAA,IAAyB;QAAC,aAAU;QAAe,GAAGD,KAAK;;AACrE;AAEA,SAASE,mBAAmB,EAC1B,GAAGF,OACkE;IACrE,OACE,WADF,GACE,qCAACC,kCAAAA,kBAAuC;QACtC,aAAU;QACT,GAAGD,KAAK;;AAGf;AAEA,SAASG,mBAAmB,EAC1B,GAAGH,OACkE;IACrE,OACE,WADF,GACE,qCAACC,kCAAAA,kBAAuC;QACtC,aAAU;QACT,GAAGD,KAAK;;AAGf"}
|
|
@@ -25,15 +25,15 @@ var __webpack_require__ = {};
|
|
|
25
25
|
var __webpack_exports__ = {};
|
|
26
26
|
__webpack_require__.r(__webpack_exports__);
|
|
27
27
|
__webpack_require__.d(__webpack_exports__, {
|
|
28
|
-
|
|
28
|
+
CommandEmpty: ()=>CommandEmpty,
|
|
29
|
+
CommandShortcut: ()=>CommandShortcut,
|
|
29
30
|
Command: ()=>Command,
|
|
30
31
|
CommandInput: ()=>CommandInput,
|
|
31
|
-
CommandItem: ()=>CommandItem,
|
|
32
32
|
CommandList: ()=>CommandList,
|
|
33
|
-
|
|
33
|
+
CommandGroup: ()=>CommandGroup,
|
|
34
|
+
CommandItem: ()=>CommandItem,
|
|
34
35
|
CommandSeparator: ()=>CommandSeparator,
|
|
35
|
-
|
|
36
|
-
CommandGroup: ()=>CommandGroup
|
|
36
|
+
CommandDialog: ()=>CommandDialog
|
|
37
37
|
});
|
|
38
38
|
const jsx_runtime_namespaceObject = require("react/jsx-runtime");
|
|
39
39
|
require("react");
|
|
@@ -48,7 +48,7 @@ function Command({ className, ...props }) {
|
|
|
48
48
|
...props
|
|
49
49
|
});
|
|
50
50
|
}
|
|
51
|
-
function CommandDialog({ title = "Command Palette", description = "Search for a command to run...", children, ...props }) {
|
|
51
|
+
function CommandDialog({ title = "Command Palette", description = "Search for a command to run...", children, className, showCloseButton = true, ...props }) {
|
|
52
52
|
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(external_dialog_cjs_namespaceObject.Dialog, {
|
|
53
53
|
...props,
|
|
54
54
|
children: [
|
|
@@ -64,7 +64,8 @@ function CommandDialog({ title = "Command Palette", description = "Search for a
|
|
|
64
64
|
]
|
|
65
65
|
}),
|
|
66
66
|
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_dialog_cjs_namespaceObject.DialogContent, {
|
|
67
|
-
className: "overflow-hidden p-0",
|
|
67
|
+
className: (0, utils_cjs_namespaceObject.cn)("overflow-hidden p-0", className),
|
|
68
|
+
showCloseButton: showCloseButton,
|
|
68
69
|
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(Command, {
|
|
69
70
|
className: "[&_[cmdk-group-heading]]:text-neutral-500 **:data-[slot=command-input-wrapper]:h-12 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group]]:px-2 [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5 dark:[&_[cmdk-group-heading]]:text-neutral-400",
|
|
70
71
|
children: children
|