@codefast/ui 0.3.1 → 0.3.2
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 +42 -0
- package/dist/cjs/components/accordion.cjs +1 -0
- package/dist/cjs/components/accordion.cjs.map +1 -1
- package/dist/cjs/components/alert/alert-variants.cjs +2 -0
- package/dist/cjs/components/alert/alert-variants.cjs.map +1 -0
- package/dist/cjs/components/alert/alert.cjs +2 -0
- package/dist/cjs/components/alert/alert.cjs.map +1 -0
- package/dist/cjs/components/alert/index.cjs +1 -0
- package/dist/cjs/components/alert-dialog.cjs +2 -1
- package/dist/cjs/components/alert-dialog.cjs.map +1 -1
- package/dist/cjs/components/aspect-ratio.cjs +1 -0
- package/dist/cjs/components/aspect-ratio.cjs.map +1 -1
- package/dist/cjs/components/avatar.cjs +1 -0
- package/dist/cjs/components/avatar.cjs.map +1 -1
- package/dist/cjs/components/badge/badge-variants.cjs +2 -0
- package/dist/cjs/components/badge/badge-variants.cjs.map +1 -0
- package/dist/cjs/components/badge/badge.cjs +3 -0
- package/dist/cjs/components/badge/badge.cjs.map +1 -0
- package/dist/cjs/components/badge/index.cjs +1 -0
- package/dist/cjs/components/blockquote.cjs +1 -0
- package/dist/cjs/components/blockquote.cjs.map +1 -1
- package/dist/cjs/components/box.cjs +1 -0
- package/dist/cjs/components/box.cjs.map +1 -1
- package/dist/cjs/components/breadcrumb.cjs +1 -0
- package/dist/cjs/components/breadcrumb.cjs.map +1 -1
- package/dist/cjs/components/button/button-variants.cjs +2 -0
- package/dist/cjs/components/button/button-variants.cjs.map +1 -0
- package/dist/cjs/components/button/button.cjs +2 -0
- package/dist/cjs/components/button/button.cjs.map +1 -0
- package/dist/cjs/components/button/index.cjs +1 -0
- package/dist/cjs/components/calendar.cjs +1 -1
- package/dist/cjs/components/calendar.cjs.map +1 -1
- package/dist/cjs/components/carousel.cjs +1 -1
- package/dist/cjs/components/carousel.cjs.map +1 -1
- package/dist/cjs/components/checkbox.cjs +1 -0
- package/dist/cjs/components/checkbox.cjs.map +1 -1
- package/dist/cjs/components/code.cjs +1 -0
- package/dist/cjs/components/code.cjs.map +1 -1
- package/dist/cjs/components/collapsible.cjs +1 -0
- package/dist/cjs/components/collapsible.cjs.map +1 -1
- package/dist/cjs/components/container.cjs +1 -0
- package/dist/cjs/components/container.cjs.map +1 -1
- package/dist/cjs/components/context-menu.cjs +1 -0
- package/dist/cjs/components/context-menu.cjs.map +1 -1
- package/dist/cjs/components/dialog.cjs +2 -1
- package/dist/cjs/components/dialog.cjs.map +1 -1
- package/dist/cjs/components/drawer.cjs +1 -1
- package/dist/cjs/components/drawer.cjs.map +1 -1
- package/dist/cjs/components/dropdown-menu.cjs +1 -0
- package/dist/cjs/components/dropdown-menu.cjs.map +1 -1
- package/dist/cjs/components/em.cjs +1 -0
- package/dist/cjs/components/em.cjs.map +1 -1
- package/dist/cjs/components/heading.cjs +1 -0
- package/dist/cjs/components/heading.cjs.map +1 -1
- package/dist/cjs/components/hover-card.cjs +1 -0
- package/dist/cjs/components/hover-card.cjs.map +1 -1
- package/dist/cjs/components/inline.cjs +1 -0
- package/dist/cjs/components/inline.cjs.map +1 -1
- package/dist/cjs/components/input/index.cjs +1 -0
- package/dist/cjs/components/input/input-variants.cjs +2 -0
- package/dist/cjs/components/input/input-variants.cjs.map +1 -0
- package/dist/cjs/components/input/input.cjs +2 -0
- package/dist/cjs/components/input/input.cjs.map +1 -0
- package/dist/cjs/components/input-number.cjs +1 -1
- package/dist/cjs/components/input-number.cjs.map +1 -1
- package/dist/cjs/components/input-password.cjs +1 -1
- package/dist/cjs/components/input-password.cjs.map +1 -1
- package/dist/cjs/components/input-search.cjs +1 -1
- package/dist/cjs/components/input-search.cjs.map +1 -1
- package/dist/cjs/components/kbd.cjs +1 -0
- package/dist/cjs/components/kbd.cjs.map +1 -1
- package/dist/cjs/components/label.cjs +1 -0
- package/dist/cjs/components/label.cjs.map +1 -1
- package/dist/cjs/components/menubar.cjs +1 -0
- package/dist/cjs/components/menubar.cjs.map +1 -1
- package/dist/cjs/components/navigation-menu/index.cjs +1 -0
- package/dist/cjs/components/navigation-menu/navigation-menu-trigger-style.cjs +2 -0
- package/dist/cjs/components/navigation-menu/navigation-menu-trigger-style.cjs.map +1 -0
- package/dist/cjs/components/navigation-menu/navigation-menu.cjs +3 -0
- package/dist/cjs/components/navigation-menu/navigation-menu.cjs.map +1 -0
- package/dist/cjs/components/pagination.cjs +1 -1
- package/dist/cjs/components/pagination.cjs.map +1 -1
- package/dist/cjs/components/popover.cjs +1 -0
- package/dist/cjs/components/popover.cjs.map +1 -1
- package/dist/cjs/components/pre.cjs +1 -0
- package/dist/cjs/components/pre.cjs.map +1 -1
- package/dist/cjs/components/progress-circle/index.cjs +1 -0
- package/dist/cjs/components/progress-circle/progress-circle-variants.cjs +2 -0
- package/dist/cjs/components/progress-circle/progress-circle-variants.cjs.map +1 -0
- package/dist/cjs/components/progress-circle/progress-circle.cjs +3 -0
- package/dist/cjs/components/progress-circle/progress-circle.cjs.map +1 -0
- package/dist/cjs/components/progress.cjs +1 -0
- package/dist/cjs/components/progress.cjs.map +1 -1
- package/dist/cjs/components/quote.cjs +1 -0
- package/dist/cjs/components/quote.cjs.map +1 -1
- package/dist/cjs/components/radio-cards.cjs +1 -0
- package/dist/cjs/components/radio-cards.cjs.map +1 -1
- package/dist/cjs/components/radio-group.cjs +1 -0
- package/dist/cjs/components/radio-group.cjs.map +1 -1
- package/dist/cjs/components/scroll-area/index.cjs +1 -0
- package/dist/cjs/components/scroll-area/scroll-area-scrollbar-variants.cjs +2 -0
- package/dist/cjs/components/scroll-area/scroll-area-scrollbar-variants.cjs.map +1 -0
- package/dist/cjs/components/scroll-area/scroll-area.cjs +3 -0
- package/dist/cjs/components/scroll-area/scroll-area.cjs.map +1 -0
- package/dist/cjs/components/section.cjs +1 -0
- package/dist/cjs/components/section.cjs.map +1 -1
- package/dist/cjs/components/select.cjs +2 -1
- package/dist/cjs/components/select.cjs.map +1 -1
- package/dist/cjs/components/separator/index.cjs +1 -0
- package/dist/cjs/components/separator/separator-variants.cjs +2 -0
- package/dist/cjs/components/separator/separator-variants.cjs.map +1 -0
- package/dist/cjs/components/separator/separator.cjs +3 -0
- package/dist/cjs/components/separator/separator.cjs.map +1 -0
- package/dist/cjs/components/sheet/index.cjs +1 -0
- package/dist/cjs/components/sheet/sheet-content-variants.cjs +2 -0
- package/dist/cjs/components/sheet/sheet-content-variants.cjs.map +1 -0
- package/dist/cjs/components/sheet/sheet.cjs +3 -0
- package/dist/cjs/components/sheet/sheet.cjs.map +1 -0
- package/dist/cjs/components/sidebar/index.cjs +1 -0
- package/dist/cjs/components/sidebar/sidebar-menu-button-variants.cjs +2 -0
- package/dist/cjs/components/sidebar/sidebar-menu-button-variants.cjs.map +1 -0
- package/dist/cjs/components/sidebar/sidebar.cjs +3 -0
- package/dist/cjs/components/sidebar/sidebar.cjs.map +1 -0
- package/dist/cjs/components/slider.cjs +1 -0
- package/dist/cjs/components/slider.cjs.map +1 -1
- package/dist/cjs/components/spinner.cjs +1 -0
- package/dist/cjs/components/spinner.cjs.map +1 -1
- package/dist/cjs/components/strong.cjs +1 -0
- package/dist/cjs/components/strong.cjs.map +1 -1
- package/dist/cjs/components/switch.cjs +1 -0
- package/dist/cjs/components/switch.cjs.map +1 -1
- package/dist/cjs/components/tabs.cjs +1 -0
- package/dist/cjs/components/tabs.cjs.map +1 -1
- package/dist/cjs/components/text.cjs +1 -0
- package/dist/cjs/components/text.cjs.map +1 -1
- package/dist/cjs/components/toggle/index.cjs +1 -0
- package/dist/cjs/components/toggle/toggle-variants.cjs +2 -0
- package/dist/cjs/components/toggle/toggle-variants.cjs.map +1 -0
- package/dist/cjs/components/toggle/toggle.cjs +3 -0
- package/dist/cjs/components/toggle/toggle.cjs.map +1 -0
- package/dist/cjs/components/toggle-group.cjs +1 -1
- package/dist/cjs/components/toggle-group.cjs.map +1 -1
- package/dist/cjs/components/tooltip.cjs +1 -0
- package/dist/cjs/components/tooltip.cjs.map +1 -1
- package/dist/cjs/index.cjs +1 -1
- package/dist/esm/components/accordion.js +1 -0
- package/dist/esm/components/accordion.js.map +1 -1
- package/dist/esm/components/alert/alert-variants.js +2 -0
- package/dist/esm/components/alert/alert-variants.js.map +1 -0
- package/dist/esm/components/alert/alert.js +2 -0
- package/dist/esm/components/alert/alert.js.map +1 -0
- package/dist/esm/components/alert/index.js +1 -0
- package/dist/esm/components/alert-dialog.js +2 -1
- package/dist/esm/components/alert-dialog.js.map +1 -1
- package/dist/esm/components/aspect-ratio.js +1 -0
- package/dist/esm/components/aspect-ratio.js.map +1 -1
- package/dist/esm/components/avatar.js +1 -0
- package/dist/esm/components/avatar.js.map +1 -1
- package/dist/esm/components/badge/badge-variants.js +2 -0
- package/dist/esm/components/badge/badge-variants.js.map +1 -0
- package/dist/esm/components/badge/badge.js +3 -0
- package/dist/esm/components/badge/badge.js.map +1 -0
- package/dist/esm/components/badge/index.js +1 -0
- package/dist/esm/components/blockquote.js +1 -0
- package/dist/esm/components/blockquote.js.map +1 -1
- package/dist/esm/components/box.js +1 -0
- package/dist/esm/components/box.js.map +1 -1
- package/dist/esm/components/breadcrumb.js +1 -0
- package/dist/esm/components/breadcrumb.js.map +1 -1
- package/dist/esm/components/{button.js → button/button-variants.js} +2 -2
- package/dist/esm/components/button/button-variants.js.map +1 -0
- package/dist/esm/components/button/button.js +2 -0
- package/dist/esm/components/button/button.js.map +1 -0
- package/dist/esm/components/button/index.js +1 -0
- package/dist/esm/components/calendar.js +1 -1
- package/dist/esm/components/calendar.js.map +1 -1
- package/dist/esm/components/carousel.js +1 -1
- package/dist/esm/components/carousel.js.map +1 -1
- package/dist/esm/components/checkbox.js +1 -0
- package/dist/esm/components/checkbox.js.map +1 -1
- package/dist/esm/components/code.js +1 -0
- package/dist/esm/components/code.js.map +1 -1
- package/dist/esm/components/collapsible.js +1 -0
- package/dist/esm/components/collapsible.js.map +1 -1
- package/dist/esm/components/container.js +1 -0
- package/dist/esm/components/container.js.map +1 -1
- package/dist/esm/components/context-menu.js +1 -0
- package/dist/esm/components/context-menu.js.map +1 -1
- package/dist/esm/components/dialog.js +2 -1
- package/dist/esm/components/dialog.js.map +1 -1
- package/dist/esm/components/drawer.js +1 -1
- package/dist/esm/components/drawer.js.map +1 -1
- package/dist/esm/components/dropdown-menu.js +1 -0
- package/dist/esm/components/dropdown-menu.js.map +1 -1
- package/dist/esm/components/em.js +1 -0
- package/dist/esm/components/em.js.map +1 -1
- package/dist/esm/components/heading.js +1 -0
- package/dist/esm/components/heading.js.map +1 -1
- package/dist/esm/components/hover-card.js +1 -0
- package/dist/esm/components/hover-card.js.map +1 -1
- package/dist/esm/components/inline.js +1 -0
- package/dist/esm/components/inline.js.map +1 -1
- package/dist/esm/components/input/index.js +1 -0
- package/dist/esm/components/input/input-variants.js +2 -0
- package/dist/esm/components/input/input-variants.js.map +1 -0
- package/dist/esm/components/input/input.js +2 -0
- package/dist/esm/components/input/input.js.map +1 -0
- package/dist/esm/components/input-number.js +1 -1
- package/dist/esm/components/input-number.js.map +1 -1
- package/dist/esm/components/input-password.js +1 -1
- package/dist/esm/components/input-password.js.map +1 -1
- package/dist/esm/components/input-search.js +1 -1
- package/dist/esm/components/input-search.js.map +1 -1
- package/dist/esm/components/kbd.js +1 -0
- package/dist/esm/components/kbd.js.map +1 -1
- package/dist/esm/components/label.js +1 -0
- package/dist/esm/components/label.js.map +1 -1
- package/dist/esm/components/menubar.js +1 -0
- package/dist/esm/components/menubar.js.map +1 -1
- package/dist/esm/components/navigation-menu/index.js +1 -0
- package/dist/esm/components/navigation-menu/navigation-menu-trigger-style.js +2 -0
- package/dist/esm/components/navigation-menu/navigation-menu-trigger-style.js.map +1 -0
- package/dist/esm/components/navigation-menu/navigation-menu.js +3 -0
- package/dist/esm/components/navigation-menu/navigation-menu.js.map +1 -0
- package/dist/esm/components/pagination.js +1 -1
- package/dist/esm/components/pagination.js.map +1 -1
- package/dist/esm/components/popover.js +1 -0
- package/dist/esm/components/popover.js.map +1 -1
- package/dist/esm/components/pre.js +1 -0
- package/dist/esm/components/pre.js.map +1 -1
- package/dist/esm/components/progress-circle/index.js +1 -0
- package/dist/esm/components/progress-circle/progress-circle-variants.js +2 -0
- package/dist/esm/components/progress-circle/progress-circle-variants.js.map +1 -0
- package/dist/esm/components/progress-circle/progress-circle.js +3 -0
- package/dist/esm/components/progress-circle/progress-circle.js.map +1 -0
- package/dist/esm/components/progress.js +1 -0
- package/dist/esm/components/progress.js.map +1 -1
- package/dist/esm/components/quote.js +1 -0
- package/dist/esm/components/quote.js.map +1 -1
- package/dist/esm/components/radio-cards.js +1 -0
- package/dist/esm/components/radio-cards.js.map +1 -1
- package/dist/esm/components/radio-group.js +1 -0
- package/dist/esm/components/radio-group.js.map +1 -1
- package/dist/esm/components/scroll-area/index.js +1 -0
- package/dist/esm/components/scroll-area/scroll-area-scrollbar-variants.js +2 -0
- package/dist/esm/components/scroll-area/scroll-area-scrollbar-variants.js.map +1 -0
- package/dist/esm/components/scroll-area/scroll-area.js +3 -0
- package/dist/esm/components/scroll-area/scroll-area.js.map +1 -0
- package/dist/esm/components/section.js +1 -0
- package/dist/esm/components/section.js.map +1 -1
- package/dist/esm/components/select.js +2 -1
- package/dist/esm/components/select.js.map +1 -1
- package/dist/esm/components/separator/index.js +1 -0
- package/dist/esm/components/separator/separator-variants.js +2 -0
- package/dist/esm/components/separator/separator-variants.js.map +1 -0
- package/dist/esm/components/separator/separator.js +3 -0
- package/dist/esm/components/separator/separator.js.map +1 -0
- package/dist/esm/components/sheet/index.js +1 -0
- package/dist/esm/components/sheet/sheet-content-variants.js +2 -0
- package/dist/esm/components/sheet/sheet-content-variants.js.map +1 -0
- package/dist/esm/components/sheet/sheet.js +3 -0
- package/dist/esm/components/sheet/sheet.js.map +1 -0
- package/dist/esm/components/sidebar/index.js +1 -0
- package/dist/esm/components/sidebar/sidebar-menu-button-variants.js +2 -0
- package/dist/esm/components/sidebar/sidebar-menu-button-variants.js.map +1 -0
- package/dist/esm/components/sidebar/sidebar.js +3 -0
- package/dist/esm/components/sidebar/sidebar.js.map +1 -0
- package/dist/esm/components/slider.js +1 -0
- package/dist/esm/components/slider.js.map +1 -1
- package/dist/esm/components/spinner.js +1 -0
- package/dist/esm/components/spinner.js.map +1 -1
- package/dist/esm/components/strong.js +1 -0
- package/dist/esm/components/strong.js.map +1 -1
- package/dist/esm/components/switch.js +1 -0
- package/dist/esm/components/switch.js.map +1 -1
- package/dist/esm/components/tabs.js +1 -0
- package/dist/esm/components/tabs.js.map +1 -1
- package/dist/esm/components/text.js +1 -0
- package/dist/esm/components/text.js.map +1 -1
- package/dist/esm/components/toggle/index.js +1 -0
- package/dist/esm/components/toggle/toggle-variants.js +2 -0
- package/dist/esm/components/toggle/toggle-variants.js.map +1 -0
- package/dist/esm/components/toggle/toggle.js +3 -0
- package/dist/esm/components/toggle/toggle.js.map +1 -0
- package/dist/esm/components/toggle-group.js +1 -1
- package/dist/esm/components/toggle-group.js.map +1 -1
- package/dist/esm/components/tooltip.js +1 -0
- package/dist/esm/components/tooltip.js.map +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/types/components/accordion.d.ts.map +1 -1
- package/dist/types/components/{alert.d.ts → alert/alert-variants.d.ts} +2 -7
- package/dist/types/components/alert/alert-variants.d.ts.map +1 -0
- package/dist/types/components/alert/alert.d.ts +8 -0
- package/dist/types/components/alert/alert.d.ts.map +1 -0
- package/dist/types/components/alert/index.d.ts +3 -0
- package/dist/types/components/alert/index.d.ts.map +1 -0
- package/dist/types/components/alert-dialog.d.ts.map +1 -1
- package/dist/types/components/aspect-ratio.d.ts.map +1 -1
- package/dist/types/components/avatar.d.ts.map +1 -1
- package/dist/types/components/{badge.d.ts → badge/badge-variants.d.ts} +2 -7
- package/dist/types/components/badge/badge-variants.d.ts.map +1 -0
- package/dist/types/components/badge/badge.d.ts +8 -0
- package/dist/types/components/badge/badge.d.ts.map +1 -0
- package/dist/types/components/badge/index.d.ts +3 -0
- package/dist/types/components/badge/index.d.ts.map +1 -0
- package/dist/types/components/blockquote.d.ts.map +1 -1
- package/dist/types/components/box.d.ts.map +1 -1
- package/dist/types/components/breadcrumb.d.ts.map +1 -1
- package/dist/types/components/{button.d.ts → button/button-variants.d.ts} +2 -11
- package/dist/types/components/button/button-variants.d.ts.map +1 -0
- package/dist/types/components/button/button.d.ts +12 -0
- package/dist/types/components/button/button.d.ts.map +1 -0
- package/dist/types/components/button/index.d.ts +3 -0
- package/dist/types/components/button/index.d.ts.map +1 -0
- package/dist/types/components/checkbox.d.ts.map +1 -1
- package/dist/types/components/code.d.ts.map +1 -1
- package/dist/types/components/collapsible.d.ts.map +1 -1
- package/dist/types/components/container.d.ts.map +1 -1
- package/dist/types/components/context-menu.d.ts.map +1 -1
- package/dist/types/components/dialog.d.ts.map +1 -1
- package/dist/types/components/dropdown-menu.d.ts.map +1 -1
- package/dist/types/components/em.d.ts.map +1 -1
- package/dist/types/components/heading.d.ts.map +1 -1
- package/dist/types/components/hover-card.d.ts.map +1 -1
- package/dist/types/components/inline.d.ts.map +1 -1
- package/dist/types/components/input/index.d.ts +3 -0
- package/dist/types/components/input/index.d.ts.map +1 -0
- package/dist/types/components/{input.d.ts → input/input-variants.d.ts} +2 -14
- package/dist/types/components/input/input-variants.d.ts.map +1 -0
- package/dist/types/components/input/input.d.ts +15 -0
- package/dist/types/components/input/input.d.ts.map +1 -0
- package/dist/types/components/kbd.d.ts.map +1 -1
- package/dist/types/components/label.d.ts.map +1 -1
- package/dist/types/components/menubar.d.ts.map +1 -1
- package/dist/types/components/navigation-menu/index.d.ts +3 -0
- package/dist/types/components/navigation-menu/index.d.ts.map +1 -0
- package/dist/types/components/navigation-menu/navigation-menu-trigger-style.d.ts +3 -0
- package/dist/types/components/navigation-menu/navigation-menu-trigger-style.d.ts.map +1 -0
- package/dist/types/components/{navigation-menu.d.ts → navigation-menu/navigation-menu.d.ts} +1 -2
- package/dist/types/components/navigation-menu/navigation-menu.d.ts.map +1 -0
- package/dist/types/components/popover.d.ts.map +1 -1
- package/dist/types/components/pre.d.ts.map +1 -1
- package/dist/types/components/progress-circle/index.d.ts +3 -0
- package/dist/types/components/progress-circle/index.d.ts.map +1 -0
- package/dist/types/components/{progress-circle.d.ts → progress-circle/progress-circle-variants.d.ts} +2 -64
- package/dist/types/components/progress-circle/progress-circle-variants.d.ts.map +1 -0
- package/dist/types/components/progress-circle/progress-circle.d.ts +65 -0
- package/dist/types/components/progress-circle/progress-circle.d.ts.map +1 -0
- package/dist/types/components/progress.d.ts.map +1 -1
- package/dist/types/components/quote.d.ts.map +1 -1
- package/dist/types/components/radio-cards.d.ts.map +1 -1
- package/dist/types/components/radio-group.d.ts.map +1 -1
- package/dist/types/components/scroll-area/index.d.ts +3 -0
- package/dist/types/components/scroll-area/index.d.ts.map +1 -0
- package/dist/types/components/{scroll-area.d.ts → scroll-area/scroll-area-scrollbar-variants.d.ts} +2 -12
- package/dist/types/components/scroll-area/scroll-area-scrollbar-variants.d.ts.map +1 -0
- package/dist/types/components/scroll-area/scroll-area.d.ts +13 -0
- package/dist/types/components/scroll-area/scroll-area.d.ts.map +1 -0
- package/dist/types/components/section.d.ts.map +1 -1
- package/dist/types/components/select.d.ts.map +1 -1
- package/dist/types/components/separator/index.d.ts +3 -0
- package/dist/types/components/separator/index.d.ts.map +1 -0
- package/dist/types/components/{separator.d.ts → separator/separator-variants.d.ts} +2 -7
- package/dist/types/components/separator/separator-variants.d.ts.map +1 -0
- package/dist/types/components/separator/separator.d.ts +8 -0
- package/dist/types/components/separator/separator.d.ts.map +1 -0
- package/dist/types/components/sheet/index.d.ts +3 -0
- package/dist/types/components/sheet/index.d.ts.map +1 -0
- package/dist/types/components/sheet/sheet-content-variants.d.ts +24 -0
- package/dist/types/components/sheet/sheet-content-variants.d.ts.map +1 -0
- package/dist/types/components/{sheet.d.ts → sheet/sheet.d.ts} +3 -24
- package/dist/types/components/{sheet.d.ts.map → sheet/sheet.d.ts.map} +1 -1
- package/dist/types/components/sidebar/index.d.ts +3 -0
- package/dist/types/components/sidebar/index.d.ts.map +1 -0
- package/dist/types/components/sidebar/sidebar-menu-button-variants.d.ts +33 -0
- package/dist/types/components/sidebar/sidebar-menu-button-variants.d.ts.map +1 -0
- package/dist/types/components/{sidebar.d.ts → sidebar/sidebar.d.ts} +6 -36
- package/dist/types/components/sidebar/sidebar.d.ts.map +1 -0
- package/dist/types/components/slider.d.ts.map +1 -1
- package/dist/types/components/spinner.d.ts.map +1 -1
- package/dist/types/components/strong.d.ts.map +1 -1
- package/dist/types/components/switch.d.ts.map +1 -1
- package/dist/types/components/tabs.d.ts.map +1 -1
- package/dist/types/components/text.d.ts.map +1 -1
- package/dist/types/components/toggle/index.d.ts +3 -0
- package/dist/types/components/toggle/index.d.ts.map +1 -0
- package/dist/types/components/{toggle.d.ts → toggle/toggle-variants.d.ts} +2 -9
- package/dist/types/components/toggle/toggle-variants.d.ts.map +1 -0
- package/dist/types/components/toggle/toggle.d.ts +10 -0
- package/dist/types/components/toggle/toggle.d.ts.map +1 -0
- package/dist/types/components/tooltip.d.ts.map +1 -1
- package/dist/types/index.d.ts +0 -1
- package/dist/types/index.d.ts.map +1 -1
- package/package.json +36 -46
- package/dist/cjs/components/alert.cjs +0 -2
- package/dist/cjs/components/alert.cjs.map +0 -1
- package/dist/cjs/components/badge.cjs +0 -2
- package/dist/cjs/components/badge.cjs.map +0 -1
- package/dist/cjs/components/button.cjs +0 -2
- package/dist/cjs/components/button.cjs.map +0 -1
- package/dist/cjs/components/input.cjs +0 -2
- package/dist/cjs/components/input.cjs.map +0 -1
- package/dist/cjs/components/navigation-menu.cjs +0 -2
- package/dist/cjs/components/navigation-menu.cjs.map +0 -1
- package/dist/cjs/components/progress-circle.cjs +0 -3
- package/dist/cjs/components/progress-circle.cjs.map +0 -1
- package/dist/cjs/components/scroll-area.cjs +0 -3
- package/dist/cjs/components/scroll-area.cjs.map +0 -1
- package/dist/cjs/components/separator.cjs +0 -2
- package/dist/cjs/components/separator.cjs.map +0 -1
- package/dist/cjs/components/sheet.cjs +0 -2
- package/dist/cjs/components/sheet.cjs.map +0 -1
- package/dist/cjs/components/sidebar.cjs +0 -3
- package/dist/cjs/components/sidebar.cjs.map +0 -1
- package/dist/cjs/components/toggle.cjs +0 -2
- package/dist/cjs/components/toggle.cjs.map +0 -1
- package/dist/cjs/lib/logger.cjs +0 -2
- package/dist/cjs/lib/logger.cjs.map +0 -1
- package/dist/esm/components/alert.js +0 -2
- package/dist/esm/components/alert.js.map +0 -1
- package/dist/esm/components/badge.js +0 -2
- package/dist/esm/components/badge.js.map +0 -1
- package/dist/esm/components/button.js.map +0 -1
- package/dist/esm/components/input.js +0 -2
- package/dist/esm/components/input.js.map +0 -1
- package/dist/esm/components/navigation-menu.js +0 -2
- package/dist/esm/components/navigation-menu.js.map +0 -1
- package/dist/esm/components/progress-circle.js +0 -3
- package/dist/esm/components/progress-circle.js.map +0 -1
- package/dist/esm/components/scroll-area.js +0 -3
- package/dist/esm/components/scroll-area.js.map +0 -1
- package/dist/esm/components/separator.js +0 -2
- package/dist/esm/components/separator.js.map +0 -1
- package/dist/esm/components/sheet.js +0 -2
- package/dist/esm/components/sheet.js.map +0 -1
- package/dist/esm/components/sidebar.js +0 -3
- package/dist/esm/components/sidebar.js.map +0 -1
- package/dist/esm/components/toggle.js +0 -2
- package/dist/esm/components/toggle.js.map +0 -1
- package/dist/esm/lib/logger.js +0 -2
- package/dist/esm/lib/logger.js.map +0 -1
- package/dist/types/components/alert.d.ts.map +0 -1
- package/dist/types/components/badge.d.ts.map +0 -1
- package/dist/types/components/button.d.ts.map +0 -1
- package/dist/types/components/input.d.ts.map +0 -1
- package/dist/types/components/navigation-menu.d.ts.map +0 -1
- package/dist/types/components/progress-circle.d.ts.map +0 -1
- package/dist/types/components/scroll-area.d.ts.map +0 -1
- package/dist/types/components/separator.d.ts.map +0 -1
- package/dist/types/components/sidebar.d.ts.map +0 -1
- package/dist/types/components/toggle.d.ts.map +0 -1
- package/dist/types/lib/logger.d.ts +0 -64
- package/dist/types/lib/logger.d.ts.map +0 -1
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
"use strict";let __rslib_import_meta_url__="undefined"==typeof document?new(require("url".replace("",""))).URL("file:"+__filename).href:document.currentScript&&document.currentScript.src||new URL("main.js",document.baseURI).href;var __webpack_require__={};__webpack_require__.n=e=>{var
|
|
2
|
+
"use strict";let __rslib_import_meta_url__="undefined"==typeof document?new(require("url".replace("",""))).URL("file:"+__filename).href:document.currentScript&&document.currentScript.src||new URL("main.js",document.baseURI).href;var __webpack_require__={};__webpack_require__.n=e=>{var a=e&&e.__esModule?()=>e.default:()=>e;return __webpack_require__.d(a,{a:a}),a},__webpack_require__.d=(e,a)=>{for(var t in a)__webpack_require__.o(a,t)&&!__webpack_require__.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:a[t]})},__webpack_require__.o=(e,a)=>Object.prototype.hasOwnProperty.call(e,a),__webpack_require__.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var __webpack_exports__={};__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{CarouselNext:()=>CarouselNext,CarouselItem:()=>CarouselItem,createCarouselScope:()=>createCarouselScope,Carousel:()=>Carousel,CarouselContent:()=>CarouselContent,CarouselPrevious:()=>CarouselPrevious});let jsx_runtime_namespaceObject=require("react/jsx-runtime"),react_context_namespaceObject=require("@radix-ui/react-context"),external_embla_carousel_react_namespaceObject=require("embla-carousel-react");var external_embla_carousel_react_default=__webpack_require__.n(external_embla_carousel_react_namespaceObject);let external_lucide_react_namespaceObject=require("lucide-react"),external_react_namespaceObject=require("react"),index_cjs_namespaceObject=require("./button/index.cjs"),utils_cjs_namespaceObject=require("../lib/utils.cjs"),CAROUSEL_NAME="Carousel",[createCarouselContext,createCarouselScope]=(0,react_context_namespaceObject.createContextScope)(CAROUSEL_NAME),[CarouselContextProvider,useCarouselContext]=createCarouselContext(CAROUSEL_NAME);function Carousel({__scopeCarousel:e,children:a,className:t,opts:r,orientation:s,plugins:c,setApi:_,...o}){let[l,n]=external_embla_carousel_react_default()({...r,axis:"vertical"===s?"y":"x"},c),[u,i]=(0,external_react_namespaceObject.useState)(!1),[p,x]=(0,external_react_namespaceObject.useState)(!1),b=(0,external_react_namespaceObject.useCallback)(e=>{e&&(i(e.canScrollPrev()),x(e.canScrollNext()))},[]),m=(0,external_react_namespaceObject.useCallback)(()=>{n?.scrollPrev()},[n]),C=(0,external_react_namespaceObject.useCallback)(()=>{n?.scrollNext()},[n]),j=(0,external_react_namespaceObject.useCallback)(e=>{"ArrowLeft"===e.key?(e.preventDefault(),m()):"ArrowRight"===e.key&&(e.preventDefault(),C())},[m,C]);return(0,external_react_namespaceObject.useEffect)(()=>{n&&_&&_(n)},[n,_]),(0,external_react_namespaceObject.useEffect)(()=>{if(n)return b(n),n.on("reInit",b),n.on("select",b),()=>{n.off("select",b)}},[n,b]),(0,jsx_runtime_namespaceObject.jsx)(CarouselContextProvider,{api:n,canScrollNext:p,canScrollPrev:u,carouselRef:l,opts:r,orientation:s??(r?.axis==="y"?"vertical":"horizontal"),scope:e,scrollNext:C,scrollPrev:m,children:(0,jsx_runtime_namespaceObject.jsx)("div",{"aria-roledescription":"carousel",className:(0,utils_cjs_namespaceObject.cn)("relative",t),"data-slot":"carousel",role:"region",onKeyDownCapture:j,...o,children:a})})}let CAROUSEL_CONTENT_NAME="CarouselContent";function CarouselContent({__scopeCarousel:e,className:a,classNames:t,...r}){let{carouselRef:s,orientation:c}=useCarouselContext("CarouselContent",e);return(0,jsx_runtime_namespaceObject.jsx)("div",{ref:s,className:(0,utils_cjs_namespaceObject.cn)("overflow-hidden",t?.wrapper),"data-slot":"carousel-content",children:(0,jsx_runtime_namespaceObject.jsx)("div",{className:(0,utils_cjs_namespaceObject.cn)("flex","horizontal"===c?"-ml-4":"-mt-4 flex-col",t?.content,a),...r})})}let CAROUSEL_ITEM_NAME="CarouselItem";function CarouselItem({__scopeCarousel:e,className:a,...t}){let{orientation:r}=useCarouselContext("CarouselItem",e);return(0,jsx_runtime_namespaceObject.jsx)("div",{"aria-roledescription":"slide",className:(0,utils_cjs_namespaceObject.cn)("min-w-0 shrink-0 grow-0 basis-full","horizontal"===r?"pl-4":"pt-4",a),"data-slot":"carousel-item",role:"group",...t})}let CAROUSEL_PREVIOUS_NAME="CarouselPrevious";function CarouselPrevious({__scopeCarousel:e,className:a,size:t="icon",variant:r="outline",...s}){let{canScrollPrev:c,orientation:_,scrollPrev:o}=useCarouselContext("CarouselPrevious",e);return(0,jsx_runtime_namespaceObject.jsx)(index_cjs_namespaceObject.Button,{"aria-label":"Previous slide",className:(0,utils_cjs_namespaceObject.cn)("absolute size-8 shadow-none","horizontal"===_?"-left-12 top-1/2 -translate-y-1/2":"-top-12 left-1/2 -translate-x-1/2 rotate-90",a),"data-slot":"carousel-previous",disabled:!c,prefix:(0,jsx_runtime_namespaceObject.jsx)(external_lucide_react_namespaceObject.ArrowLeftIcon,{}),size:t,variant:r,onClick:o,...s,children:(0,jsx_runtime_namespaceObject.jsx)("span",{className:"sr-only",children:"Previous slide"})})}let CAROUSEL_NEXT_NAME="CarouselNext";function CarouselNext({__scopeCarousel:e,className:a,size:t="icon",variant:r="outline",...s}){let{canScrollNext:c,orientation:_,scrollNext:o}=useCarouselContext("CarouselNext",e);return(0,jsx_runtime_namespaceObject.jsx)(index_cjs_namespaceObject.Button,{"aria-label":"Next slide",className:(0,utils_cjs_namespaceObject.cn)("absolute size-8 shadow-none","horizontal"===_?"-right-12 top-1/2 -translate-y-1/2":"-bottom-12 left-1/2 -translate-x-1/2 rotate-90",a),"data-slot":"carousel-next",disabled:!c,prefix:(0,jsx_runtime_namespaceObject.jsx)(external_lucide_react_namespaceObject.ArrowRightIcon,{}),size:t,variant:r,onClick:o,...s,children:(0,jsx_runtime_namespaceObject.jsx)("span",{className:"sr-only",children:"Next slide"})})}for(var __webpack_i__ in exports.Carousel=__webpack_exports__.Carousel,exports.CarouselContent=__webpack_exports__.CarouselContent,exports.CarouselItem=__webpack_exports__.CarouselItem,exports.CarouselNext=__webpack_exports__.CarouselNext,exports.CarouselPrevious=__webpack_exports__.CarouselPrevious,exports.createCarouselScope=__webpack_exports__.createCarouselScope,__webpack_exports__)-1===["Carousel","CarouselContent","CarouselItem","CarouselNext","CarouselPrevious","createCarouselScope"].indexOf(__webpack_i__)&&(exports[__webpack_i__]=__webpack_exports__[__webpack_i__]);Object.defineProperty(exports,"__esModule",{value:!0});
|
|
3
3
|
//# sourceMappingURL=carousel.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"components/carousel.cjs","sources":["webpack://@codefast/ui/./src/components/carousel.tsx"],"sourcesContent":["\n\nimport type { Scope } from \"@radix-ui/react-context\";\nimport type { ComponentProps, JSX, KeyboardEvent } from \"react\";\n\nimport { createContextScope } from \"@radix-ui/react-context\";\nimport useEmblaCarousel, { type UseEmblaCarouselType } from \"embla-carousel-react\";\nimport { ArrowLeftIcon, ArrowRightIcon } from \"lucide-react\";\nimport { useCallback, useEffect, useState } from \"react\";\n\nimport { Button } from \"@/components/button\";\nimport { cn } from \"@/lib/utils\";\n\n/* -----------------------------------------------------------------------------\n * Context: Carousel\n * -------------------------------------------------------------------------- */\n\nconst CAROUSEL_NAME = \"Carousel\";\n\ntype ScopedProps<P> = P & { __scopeCarousel?: Scope };\n\nconst [createCarouselContext, createCarouselScope] = createContextScope(CAROUSEL_NAME);\n\ntype CarouselApi = UseEmblaCarouselType[1];\ntype UseCarouselParameters = Parameters<typeof useEmblaCarousel>;\ntype CarouselOptions = UseCarouselParameters[0];\ntype CarouselPlugin = UseCarouselParameters[1];\n\ninterface BaseCarouselProps {\n opts?: CarouselOptions;\n orientation?: \"horizontal\" | \"vertical\";\n plugins?: CarouselPlugin;\n setApi?: (api: CarouselApi) => void;\n}\n\ntype CarouselContextValue = BaseCarouselProps & {\n api: ReturnType<typeof useEmblaCarousel>[1];\n canScrollNext: boolean;\n canScrollPrev: boolean;\n carouselRef: ReturnType<typeof useEmblaCarousel>[0];\n scrollNext: () => void;\n scrollPrev: () => void;\n};\n\nconst [CarouselContextProvider, useCarouselContext] = createCarouselContext<CarouselContextValue>(CAROUSEL_NAME);\n\n/* -----------------------------------------------------------------------------\n * Component: Carousel\n * -------------------------------------------------------------------------- */\n\nfunction Carousel({\n __scopeCarousel,\n children,\n className,\n opts,\n orientation,\n plugins,\n setApi,\n ...props\n}: ScopedProps<BaseCarouselProps & ComponentProps<\"div\">>): JSX.Element {\n const [carouselRef, api] = useEmblaCarousel(\n {\n ...opts,\n axis: orientation === \"vertical\" ? \"y\" : \"x\",\n },\n plugins,\n );\n\n const [canScrollPrev, setCanScrollPrev] = useState(false);\n const [canScrollNext, setCanScrollNext] = useState(false);\n\n const onSelect = useCallback((carouselApi: CarouselApi) => {\n if (!carouselApi) {\n return;\n }\n\n setCanScrollPrev(carouselApi.canScrollPrev());\n setCanScrollNext(carouselApi.canScrollNext());\n }, []);\n\n const scrollPrev = useCallback(() => {\n api?.scrollPrev();\n }, [api]);\n\n const scrollNext = useCallback(() => {\n api?.scrollNext();\n }, [api]);\n\n const handleKeyDown = useCallback(\n (event: 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 useEffect(() => {\n if (!api || !setApi) {\n return;\n }\n\n setApi(api);\n }, [api, setApi]);\n\n useEffect(() => {\n if (!api) {\n return;\n }\n\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 <CarouselContextProvider\n api={api}\n canScrollNext={canScrollNext}\n canScrollPrev={canScrollPrev}\n carouselRef={carouselRef}\n opts={opts}\n orientation={orientation ?? (opts?.axis === \"y\" ? \"vertical\" : \"horizontal\")}\n scope={__scopeCarousel}\n scrollNext={scrollNext}\n scrollPrev={scrollPrev}\n >\n <div\n aria-roledescription=\"carousel\"\n className={cn(\"relative\", className)}\n data-slot=\"carousel\"\n role=\"region\"\n onKeyDownCapture={handleKeyDown}\n {...props}\n >\n {children}\n </div>\n </CarouselContextProvider>\n );\n}\n\n/* -----------------------------------------------------------------------------\n * Component: CarouselContent\n * -------------------------------------------------------------------------- */\n\nconst CAROUSEL_CONTENT_NAME = \"CarouselContent\";\n\nfunction CarouselContent({\n __scopeCarousel,\n className,\n classNames,\n ...props\n}: ScopedProps<\n ComponentProps<\"div\"> & {\n classNames?: {\n content?: string;\n wrapper?: string;\n };\n }\n>): JSX.Element {\n const { carouselRef, orientation } = useCarouselContext(CAROUSEL_CONTENT_NAME, __scopeCarousel);\n\n return (\n <div ref={carouselRef} className={cn(\"overflow-hidden\", classNames?.wrapper)} data-slot=\"carousel-content\">\n <div\n className={cn(\n \"flex\",\n orientation === \"horizontal\" ? \"-ml-4\" : \"-mt-4 flex-col\",\n classNames?.content,\n className,\n )}\n {...props}\n />\n </div>\n );\n}\n\n/* -----------------------------------------------------------------------------\n * Component: CarouselItem\n * -------------------------------------------------------------------------- */\n\nconst CAROUSEL_ITEM_NAME = \"CarouselItem\";\n\nfunction CarouselItem({ __scopeCarousel, className, ...props }: ScopedProps<ComponentProps<\"div\">>): JSX.Element {\n const { orientation } = useCarouselContext(CAROUSEL_ITEM_NAME, __scopeCarousel);\n\n return (\n <div\n aria-roledescription=\"slide\"\n className={cn(\"min-w-0 shrink-0 grow-0 basis-full\", orientation === \"horizontal\" ? \"pl-4\" : \"pt-4\", className)}\n data-slot=\"carousel-item\"\n role=\"group\"\n {...props}\n />\n );\n}\n\n/* -----------------------------------------------------------------------------\n * Component: CarouselPrevious\n * -------------------------------------------------------------------------- */\n\nconst CAROUSEL_PREVIOUS_NAME = \"CarouselPrevious\";\n\nfunction CarouselPrevious({\n __scopeCarousel,\n className,\n size = \"icon\",\n variant = \"outline\",\n ...props\n}: ScopedProps<ComponentProps<typeof Button>>): JSX.Element {\n const { canScrollPrev, orientation, scrollPrev } = useCarouselContext(CAROUSEL_PREVIOUS_NAME, __scopeCarousel);\n\n return (\n <Button\n aria-label=\"Previous slide\"\n className={cn(\n \"absolute size-8 shadow-none\",\n orientation === \"horizontal\"\n ? \"-left-12 top-1/2 -translate-y-1/2\"\n : \"-top-12 left-1/2 -translate-x-1/2 rotate-90\",\n className,\n )}\n data-slot=\"carousel-previous\"\n disabled={!canScrollPrev}\n prefix={<ArrowLeftIcon />}\n size={size}\n variant={variant}\n onClick={scrollPrev}\n {...props}\n >\n <span className=\"sr-only\">Previous slide</span>\n </Button>\n );\n}\n\n/* -----------------------------------------------------------------------------\n * Component: CarouselNext\n * -------------------------------------------------------------------------- */\n\nconst CAROUSEL_NEXT_NAME = \"CarouselNext\";\n\nfunction CarouselNext({\n __scopeCarousel,\n className,\n size = \"icon\",\n variant = \"outline\",\n ...props\n}: ScopedProps<ComponentProps<typeof Button>>): JSX.Element {\n const { canScrollNext, orientation, scrollNext } = useCarouselContext(CAROUSEL_NEXT_NAME, __scopeCarousel);\n\n return (\n <Button\n aria-label=\"Next slide\"\n className={cn(\n \"absolute size-8 shadow-none\",\n orientation === \"horizontal\"\n ? \"-right-12 top-1/2 -translate-y-1/2\"\n : \"-bottom-12 left-1/2 -translate-x-1/2 rotate-90\",\n className,\n )}\n data-slot=\"carousel-next\"\n disabled={!canScrollNext}\n prefix={<ArrowRightIcon />}\n size={size}\n variant={variant}\n onClick={scrollNext}\n {...props}\n >\n <span className=\"sr-only\">Next slide</span>\n </Button>\n );\n}\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport type { CarouselApi };\nexport { Carousel, CarouselContent, CarouselItem, CarouselNext, CarouselPrevious, createCarouselScope };\n"],"names":["CAROUSEL_NAME","createCarouselContext","createCarouselScope","createContextScope","CarouselContextProvider","useCarouselContext","Carousel","__scopeCarousel","children","className","opts","orientation","plugins","setApi","props","carouselRef","api","useEmblaCarousel","canScrollPrev","setCanScrollPrev","useState","canScrollNext","setCanScrollNext","onSelect","useCallback","carouselApi","scrollPrev","scrollNext","handleKeyDown","event","useEffect","cn","CAROUSEL_CONTENT_NAME","CarouselContent","classNames","CAROUSEL_ITEM_NAME","CarouselItem","CAROUSEL_PREVIOUS_NAME","CarouselPrevious","size","variant","Button","ArrowLeftIcon","CAROUSEL_NEXT_NAME","CarouselNext","ArrowRightIcon"],"mappings":";kmDAiBMA,cAAgB,WAIhB,CAACC,sBAAuBC,oBAAoB,CAAGC,GAAAA,8BAAAA,kBAAAA,EAAmBH,eAuBlE,CAACI,wBAAyBC,mBAAmB,CAAGJ,sBAA4CD,eAMlG,SAASM,SAAS,CAChBC,gBAAAA,CAAe,CACfC,SAAAA,CAAQ,CACRC,UAAAA,CAAS,CACTC,KAAAA,CAAI,CACJC,YAAAA,CAAW,CACXC,QAAAA,CAAO,CACPC,OAAAA,CAAM,CACN,GAAGC,EACoD,EACvD,GAAM,CAACC,EAAaC,EAAI,CAAGC,wCACzB,CACE,GAAGP,CAAI,CACP,KAAMC,aAAAA,EAA6B,IAAM,GAC3C,EACAC,GAGI,CAACM,EAAeC,EAAiB,CAAGC,GAAAA,+BAAAA,QAAAA,EAAS,IAC7C,CAACC,EAAeC,EAAiB,CAAGF,GAAAA,+BAAAA,QAAAA,EAAS,IAE7CG,EAAWC,GAAAA,+BAAAA,WAAAA,EAAY,IACtBC,IAILN,EAAiBM,EAAY,aAAa,IAC1CH,EAAiBG,EAAY,aAAa,IAC5C,EAAG,EAAE,EAECC,EAAaF,GAAAA,+BAAAA,WAAAA,EAAY,KAC7BR,GAAK,YACP,EAAG,CAACA,EAAI,EAEFW,EAAaH,GAAAA,+BAAAA,WAAAA,EAAY,KAC7BR,GAAK,YACP,EAAG,CAACA,EAAI,EAEFY,EAAgBJ,GAAAA,+BAAAA,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X,UAAWV,GAAAA,0BAAAA,EAAAA,EACT,8BACApB,eAAAA,EACI,qCACA,iDACJF,GAEF,YAAU,gBACV,SAAU,CAACY,EACX,OAAQ,oCAACwB,sCAAAA,cAAcA,CAAAA,CAAAA,GACvB,KAAMN,EACN,QAASC,EACT,QAASb,EACR,GAAGb,CAAK,C,SAET,oCAAC,QAAK,UAAU,U,SAAU,Y,IAGhC,C"}
|
|
1
|
+
{"version":3,"file":"components/carousel.cjs","sources":["webpack://@codefast/ui/./src/components/carousel.tsx"],"sourcesContent":["\n\nimport type { Scope } from \"@radix-ui/react-context\";\nimport type { ComponentProps, JSX, KeyboardEvent } from \"react\";\n\nimport { createContextScope } from \"@radix-ui/react-context\";\nimport useEmblaCarousel, { type UseEmblaCarouselType } from \"embla-carousel-react\";\nimport { ArrowLeftIcon, ArrowRightIcon } from \"lucide-react\";\nimport { useCallback, useEffect, useState } from \"react\";\n\nimport { Button } from \"@/components/button\";\nimport { cn } from \"@/lib/utils\";\n\n/* -----------------------------------------------------------------------------\n * Context: Carousel\n * -------------------------------------------------------------------------- */\n\nconst CAROUSEL_NAME = \"Carousel\";\n\ntype ScopedProps<P> = P & { __scopeCarousel?: Scope };\n\nconst [createCarouselContext, createCarouselScope] = createContextScope(CAROUSEL_NAME);\n\ntype CarouselApi = UseEmblaCarouselType[1];\ntype UseCarouselParameters = Parameters<typeof useEmblaCarousel>;\ntype CarouselOptions = UseCarouselParameters[0];\ntype CarouselPlugin = UseCarouselParameters[1];\n\ninterface BaseCarouselProps {\n opts?: CarouselOptions;\n orientation?: \"horizontal\" | \"vertical\";\n plugins?: CarouselPlugin;\n setApi?: (api: CarouselApi) => void;\n}\n\ntype CarouselContextValue = BaseCarouselProps & {\n api: ReturnType<typeof useEmblaCarousel>[1];\n canScrollNext: boolean;\n canScrollPrev: boolean;\n carouselRef: ReturnType<typeof useEmblaCarousel>[0];\n scrollNext: () => void;\n scrollPrev: () => void;\n};\n\nconst [CarouselContextProvider, useCarouselContext] = createCarouselContext<CarouselContextValue>(CAROUSEL_NAME);\n\n/* -----------------------------------------------------------------------------\n * Component: Carousel\n * -------------------------------------------------------------------------- */\n\nfunction Carousel({\n __scopeCarousel,\n children,\n className,\n opts,\n orientation,\n plugins,\n setApi,\n ...props\n}: ScopedProps<BaseCarouselProps & ComponentProps<\"div\">>): JSX.Element {\n const [carouselRef, api] = useEmblaCarousel(\n {\n ...opts,\n axis: orientation === \"vertical\" ? \"y\" : \"x\",\n },\n plugins,\n );\n\n const [canScrollPrev, setCanScrollPrev] = useState(false);\n const [canScrollNext, setCanScrollNext] = useState(false);\n\n const onSelect = useCallback((carouselApi: CarouselApi) => {\n if (!carouselApi) {\n return;\n }\n\n setCanScrollPrev(carouselApi.canScrollPrev());\n setCanScrollNext(carouselApi.canScrollNext());\n }, []);\n\n const scrollPrev = useCallback(() => {\n api?.scrollPrev();\n }, [api]);\n\n const scrollNext = useCallback(() => {\n api?.scrollNext();\n }, [api]);\n\n const handleKeyDown = useCallback(\n (event: 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 useEffect(() => {\n if (!api || !setApi) {\n return;\n }\n\n setApi(api);\n }, [api, setApi]);\n\n useEffect(() => {\n if (!api) {\n return;\n }\n\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 <CarouselContextProvider\n api={api}\n canScrollNext={canScrollNext}\n canScrollPrev={canScrollPrev}\n carouselRef={carouselRef}\n opts={opts}\n orientation={orientation ?? (opts?.axis === \"y\" ? \"vertical\" : \"horizontal\")}\n scope={__scopeCarousel}\n scrollNext={scrollNext}\n scrollPrev={scrollPrev}\n >\n <div\n aria-roledescription=\"carousel\"\n className={cn(\"relative\", className)}\n data-slot=\"carousel\"\n role=\"region\"\n onKeyDownCapture={handleKeyDown}\n {...props}\n >\n {children}\n </div>\n </CarouselContextProvider>\n );\n}\n\n/* -----------------------------------------------------------------------------\n * Component: CarouselContent\n * -------------------------------------------------------------------------- */\n\nconst CAROUSEL_CONTENT_NAME = \"CarouselContent\";\n\nfunction CarouselContent({\n __scopeCarousel,\n className,\n classNames,\n ...props\n}: ScopedProps<\n ComponentProps<\"div\"> & {\n classNames?: {\n content?: string;\n wrapper?: string;\n };\n }\n>): JSX.Element {\n const { carouselRef, orientation } = useCarouselContext(CAROUSEL_CONTENT_NAME, __scopeCarousel);\n\n return (\n <div ref={carouselRef} className={cn(\"overflow-hidden\", classNames?.wrapper)} data-slot=\"carousel-content\">\n <div\n className={cn(\n \"flex\",\n orientation === \"horizontal\" ? \"-ml-4\" : \"-mt-4 flex-col\",\n classNames?.content,\n className,\n )}\n {...props}\n />\n </div>\n );\n}\n\n/* -----------------------------------------------------------------------------\n * Component: CarouselItem\n * -------------------------------------------------------------------------- */\n\nconst CAROUSEL_ITEM_NAME = \"CarouselItem\";\n\nfunction CarouselItem({ __scopeCarousel, className, ...props }: ScopedProps<ComponentProps<\"div\">>): JSX.Element {\n const { orientation } = useCarouselContext(CAROUSEL_ITEM_NAME, __scopeCarousel);\n\n return (\n <div\n aria-roledescription=\"slide\"\n className={cn(\"min-w-0 shrink-0 grow-0 basis-full\", orientation === \"horizontal\" ? \"pl-4\" : \"pt-4\", className)}\n data-slot=\"carousel-item\"\n role=\"group\"\n {...props}\n />\n );\n}\n\n/* -----------------------------------------------------------------------------\n * Component: CarouselPrevious\n * -------------------------------------------------------------------------- */\n\nconst CAROUSEL_PREVIOUS_NAME = \"CarouselPrevious\";\n\nfunction CarouselPrevious({\n __scopeCarousel,\n className,\n size = \"icon\",\n variant = \"outline\",\n ...props\n}: ScopedProps<ComponentProps<typeof Button>>): JSX.Element {\n const { canScrollPrev, orientation, scrollPrev } = useCarouselContext(CAROUSEL_PREVIOUS_NAME, __scopeCarousel);\n\n return (\n <Button\n aria-label=\"Previous slide\"\n className={cn(\n \"absolute size-8 shadow-none\",\n orientation === \"horizontal\"\n ? \"-left-12 top-1/2 -translate-y-1/2\"\n : \"-top-12 left-1/2 -translate-x-1/2 rotate-90\",\n className,\n )}\n data-slot=\"carousel-previous\"\n disabled={!canScrollPrev}\n prefix={<ArrowLeftIcon />}\n size={size}\n variant={variant}\n onClick={scrollPrev}\n {...props}\n >\n <span className=\"sr-only\">Previous slide</span>\n </Button>\n );\n}\n\n/* -----------------------------------------------------------------------------\n * Component: CarouselNext\n * -------------------------------------------------------------------------- */\n\nconst CAROUSEL_NEXT_NAME = \"CarouselNext\";\n\nfunction CarouselNext({\n __scopeCarousel,\n className,\n size = \"icon\",\n variant = \"outline\",\n ...props\n}: ScopedProps<ComponentProps<typeof Button>>): JSX.Element {\n const { canScrollNext, orientation, scrollNext } = useCarouselContext(CAROUSEL_NEXT_NAME, __scopeCarousel);\n\n return (\n <Button\n aria-label=\"Next slide\"\n className={cn(\n \"absolute size-8 shadow-none\",\n orientation === \"horizontal\"\n ? \"-right-12 top-1/2 -translate-y-1/2\"\n : \"-bottom-12 left-1/2 -translate-x-1/2 rotate-90\",\n className,\n )}\n data-slot=\"carousel-next\"\n disabled={!canScrollNext}\n prefix={<ArrowRightIcon />}\n size={size}\n variant={variant}\n onClick={scrollNext}\n {...props}\n >\n <span className=\"sr-only\">Next slide</span>\n </Button>\n );\n}\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport type { CarouselApi };\nexport { Carousel, CarouselContent, CarouselItem, CarouselNext, CarouselPrevious, createCarouselScope };\n"],"names":["CAROUSEL_NAME","createCarouselContext","createCarouselScope","createContextScope","CarouselContextProvider","useCarouselContext","Carousel","__scopeCarousel","children","className","opts","orientation","plugins","setApi","props","carouselRef","api","useEmblaCarousel","canScrollPrev","setCanScrollPrev","useState","canScrollNext","setCanScrollNext","onSelect","useCallback","carouselApi","scrollPrev","scrollNext","handleKeyDown","event","useEffect","cn","CAROUSEL_CONTENT_NAME","CarouselContent","classNames","CAROUSEL_ITEM_NAME","CarouselItem","CAROUSEL_PREVIOUS_NAME","CarouselPrevious","size","variant","Button","ArrowLeftIcon","CAROUSEL_NEXT_NAME","CarouselNext","ArrowRightIcon"],"mappings":";8lDAiBMA,cAAgB,WAIhB,CAACC,sBAAuBC,oBAAoB,CAAGC,GAAAA,8BAAAA,kBAAAA,EAAmBH,eAuBlE,CAACI,wBAAyBC,mBAAmB,CAAGJ,sBAA4CD,eAMlG,SAASM,SAAS,CAChBC,gBAAAA,CAAe,CACfC,SAAAA,CAAQ,CACRC,UAAAA,CAAS,CACTC,KAAAA,CAAI,CACJC,YAAAA,CAAW,CACXC,QAAAA,CAAO,CACPC,OAAAA,CAAM,CACN,GAAGC,EACoD,EACvD,GAAM,CAACC,EAAaC,EAAI,CAAGC,wCACzB,CACE,GAAGP,CAAI,CACP,KAAMC,aAAAA,EAA6B,IAAM,GAC3C,EACAC,GAGI,CAACM,EAAeC,EAAiB,CAAGC,GAAAA,+BAAAA,QAAAA,EAAS,IAC7C,CAACC,EAAeC,EAAiB,CAAGF,GAAAA,+BAAAA,QAAAA,EAAS,IAE7CG,EAAWC,GAAAA,+BAAAA,WAAAA,EAAY,IACtBC,IAILN,EAAiBM,EAAY,aAAa,IAC1CH,EAAiBG,EAAY,aAAa,IAC5C,EAAG,EAAE,EAECC,EAAaF,GAAAA,+BAAAA,WAAAA,EAAY,KAC7BR,GAAK,YACP,EAAG,CAACA,EAAI,EAEFW,EAAaH,GAAAA,+BAAAA,WAAAA,EAAY,KAC7BR,GAAK,YACP,EAAG,CAACA,EAAI,EAEFY,EAAgBJ,GAAAA,+BAAAA,WAAAA,EACpB,IACMK,cAAAA,EAAM,GAAG,EACXA,EAAM,cAAc,GACpBH,KACuB,eAAdG,EAAM,GAAG,GAClBA,EAAM,cAAc,GACpBF,IAEJ,EACA,CAACD,EAAYC,EAAW,EAyB1B,MAtBAG,GAAA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QAASC,EACT,QAASb,EACR,GAAGb,CAAK,C,SAET,oCAAC,QAAK,UAAU,U,SAAU,Y,IAGhC,C"}
|
|
@@ -1,2 +1,3 @@
|
|
|
1
|
+
"use client";
|
|
1
2
|
"use strict";let __rslib_import_meta_url__="undefined"==typeof document?new(require("url".replace("",""))).URL("file:"+__filename).href:document.currentScript&&document.currentScript.src||new URL("main.js",document.baseURI).href;var __webpack_require__={};__webpack_require__.d=(e,r)=>{for(var c in r)__webpack_require__.o(r,c)&&!__webpack_require__.o(e,c)&&Object.defineProperty(e,c,{enumerable:!0,get:r[c]})},__webpack_require__.o=(e,r)=>Object.prototype.hasOwnProperty.call(e,r),__webpack_require__.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var __webpack_exports__={};__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{Checkbox:()=>Checkbox});let jsx_runtime_namespaceObject=require("react/jsx-runtime"),react_checkbox_namespaceObject=require("@radix-ui/react-checkbox"),external_lucide_react_namespaceObject=require("lucide-react"),utils_cjs_namespaceObject=require("../lib/utils.cjs");function Checkbox({className:e,...r}){return(0,jsx_runtime_namespaceObject.jsx)(react_checkbox_namespaceObject.Root,{className:(0,utils_cjs_namespaceObject.cn)("border-input text-primary-foreground shadow-xs outline-hidden hover:not-disabled:not-aria-checked:border-ring/60 focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-3 aria-checked:focus-visible:ring-primary/20 dark:aria-checked:focus-visible:ring-primary/40 aria-checked:border-primary aria-checked:aria-invalid:bg-destructive aria-checked:bg-primary aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 hover:not-disabled:not-aria-checked:aria-invalid:border-destructive/60 dark:bg-input/30 peer flex size-4 shrink-0 items-center justify-center rounded-sm border transition disabled:opacity-50",e),"data-slot":"checkbox",...r,children:(0,jsx_runtime_namespaceObject.jsx)(react_checkbox_namespaceObject.Indicator,{className:"flex items-center justify-center text-current transition-none","data-slot":"checkbox-indicator",children:(0,jsx_runtime_namespaceObject.jsx)(external_lucide_react_namespaceObject.CheckIcon,{className:"size-3.5"})})})}for(var __webpack_i__ in exports.Checkbox=__webpack_exports__.Checkbox,__webpack_exports__)-1===["Checkbox"].indexOf(__webpack_i__)&&(exports[__webpack_i__]=__webpack_exports__[__webpack_i__]);Object.defineProperty(exports,"__esModule",{value:!0});
|
|
2
3
|
//# sourceMappingURL=checkbox.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"components/checkbox.cjs","sources":["webpack://@codefast/ui/./src/components/checkbox.tsx"],"sourcesContent":["
|
|
1
|
+
{"version":3,"file":"components/checkbox.cjs","sources":["webpack://@codefast/ui/./src/components/checkbox.tsx"],"sourcesContent":["\n\nimport type { ComponentProps, JSX } from \"react\";\n\nimport * as CheckboxPrimitive from \"@radix-ui/react-checkbox\";\nimport { CheckIcon } from \"lucide-react\";\n\nimport { cn } from \"@/lib/utils\";\n\n/* -----------------------------------------------------------------------------\n * Component: Checkbox\n * -------------------------------------------------------------------------- */\n\nfunction Checkbox({ className, ...props }: ComponentProps<typeof CheckboxPrimitive.Root>): JSX.Element {\n return (\n <CheckboxPrimitive.Root\n className={cn(\n \"border-input text-primary-foreground shadow-xs outline-hidden hover:not-disabled:not-aria-checked:border-ring/60 focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-3 aria-checked:focus-visible:ring-primary/20 dark:aria-checked:focus-visible:ring-primary/40 aria-checked:border-primary aria-checked:aria-invalid:bg-destructive aria-checked:bg-primary aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 hover:not-disabled:not-aria-checked:aria-invalid:border-destructive/60 dark:bg-input/30 peer flex size-4 shrink-0 items-center justify-center rounded-sm border transition disabled:opacity-50\",\n className,\n )}\n data-slot=\"checkbox\"\n {...props}\n >\n <CheckboxPrimitive.Indicator\n className=\"flex items-center justify-center text-current transition-none\"\n data-slot=\"checkbox-indicator\"\n >\n <CheckIcon className=\"size-3.5\" />\n </CheckboxPrimitive.Indicator>\n </CheckboxPrimitive.Root>\n );\n}\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport { Checkbox };\n"],"names":["Checkbox","className","props","CheckboxPrimitive","cn","CheckIcon"],"mappings":";whCAaA,SAASA,SAAS,CAAEC,UAAAA,CAAS,CAAE,GAAGC,EAAsD,EACtF,MACE,oCAACC,+BAAAA,IAAsB,EACrB,UAAWC,GAAAA,0BAAAA,EAAAA,EACT,2pBACAH,GAEF,YAAU,WACT,GAAGC,CAAK,C,SAET,oCAACC,+BAAAA,SAA2B,EAC1B,UAAU,gEACV,YAAU,qB,SAEV,oCAACE,sCAAAA,SAASA,CAAAA,CAAC,UAAU,U,MAI7B,C"}
|
|
@@ -1,2 +1,3 @@
|
|
|
1
|
+
"use client";
|
|
1
2
|
"use strict";let __rslib_import_meta_url__="undefined"==typeof document?new(require("url".replace("",""))).URL("file:"+__filename).href:document.currentScript&&document.currentScript.src||new URL("main.js",document.baseURI).href;var __webpack_require__={};__webpack_require__.d=(e,_)=>{for(var r in _)__webpack_require__.o(_,r)&&!__webpack_require__.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:_[r]})},__webpack_require__.o=(e,_)=>Object.prototype.hasOwnProperty.call(e,_),__webpack_require__.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var __webpack_exports__={};__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{Code:()=>Code});let jsx_runtime_namespaceObject=require("react/jsx-runtime"),react_slot_namespaceObject=require("@radix-ui/react-slot");function Code({asChild:e,..._}){let r=e?react_slot_namespaceObject.Slot:"code";return(0,jsx_runtime_namespaceObject.jsx)(r,{"data-slot":"code",..._})}for(var __webpack_i__ in exports.Code=__webpack_exports__.Code,__webpack_exports__)-1===["Code"].indexOf(__webpack_i__)&&(exports[__webpack_i__]=__webpack_exports__[__webpack_i__]);Object.defineProperty(exports,"__esModule",{value:!0});
|
|
2
3
|
//# sourceMappingURL=code.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"components/code.cjs","sources":["webpack://@codefast/ui/./src/components/code.tsx"],"sourcesContent":["
|
|
1
|
+
{"version":3,"file":"components/code.cjs","sources":["webpack://@codefast/ui/./src/components/code.tsx"],"sourcesContent":["\n\nimport type { ComponentProps, JSX } from \"react\";\n\nimport { Slot } from \"@radix-ui/react-slot\";\n\n/* -----------------------------------------------------------------------------\n * Component: Code\n * -------------------------------------------------------------------------- */\n\nfunction Code({\n asChild,\n ...props\n}: ComponentProps<\"code\"> & {\n asChild?: boolean;\n}): JSX.Element {\n const Component = asChild ? Slot : \"code\";\n\n return <Component data-slot=\"code\" {...props} />;\n}\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport { Code };\n"],"names":["Code","asChild","props","Component","Slot"],"mappings":";o5BAUA,SAASA,KAAK,CACZC,QAAAA,CAAO,CACP,GAAGC,EAGJ,EACC,IAAMC,EAAYF,EAAUG,2BAAAA,IAAIA,CAAG,OAEnC,MAAO,oCAACD,EAAAA,CAAU,YAAU,OAAQ,GAAGD,CAAK,EAC9C,C"}
|
|
@@ -1,2 +1,3 @@
|
|
|
1
|
+
"use client";
|
|
1
2
|
"use strict";let __rslib_import_meta_url__="undefined"==typeof document?new(require("url".replace("",""))).URL("file:"+__filename).href:document.currentScript&&document.currentScript.src||new URL("main.js",document.baseURI).href;var __webpack_require__={};__webpack_require__.d=(e,_)=>{for(var l in _)__webpack_require__.o(_,l)&&!__webpack_require__.o(e,l)&&Object.defineProperty(e,l,{enumerable:!0,get:_[l]})},__webpack_require__.o=(e,_)=>Object.prototype.hasOwnProperty.call(e,_),__webpack_require__.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var __webpack_exports__={};__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{CollapsibleTrigger:()=>CollapsibleTrigger,Collapsible:()=>Collapsible,CollapsibleContent:()=>CollapsibleContent});let jsx_runtime_namespaceObject=require("react/jsx-runtime"),react_collapsible_namespaceObject=require("@radix-ui/react-collapsible");function Collapsible({...e}){return(0,jsx_runtime_namespaceObject.jsx)(react_collapsible_namespaceObject.Root,{"data-slot":"collapsible",...e})}function CollapsibleTrigger({...e}){return(0,jsx_runtime_namespaceObject.jsx)(react_collapsible_namespaceObject.CollapsibleTrigger,{"data-slot":"collapsible-trigger",...e})}function CollapsibleContent({...e}){return(0,jsx_runtime_namespaceObject.jsx)(react_collapsible_namespaceObject.CollapsibleContent,{"data-slot":"collapsible-content",...e})}for(var __webpack_i__ in exports.Collapsible=__webpack_exports__.Collapsible,exports.CollapsibleContent=__webpack_exports__.CollapsibleContent,exports.CollapsibleTrigger=__webpack_exports__.CollapsibleTrigger,__webpack_exports__)-1===["Collapsible","CollapsibleContent","CollapsibleTrigger"].indexOf(__webpack_i__)&&(exports[__webpack_i__]=__webpack_exports__[__webpack_i__]);Object.defineProperty(exports,"__esModule",{value:!0});
|
|
2
3
|
//# sourceMappingURL=collapsible.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"components/collapsible.cjs","sources":["webpack://@codefast/ui/./src/components/collapsible.tsx"],"sourcesContent":["
|
|
1
|
+
{"version":3,"file":"components/collapsible.cjs","sources":["webpack://@codefast/ui/./src/components/collapsible.tsx"],"sourcesContent":["\n\nimport type { ComponentProps, JSX } from \"react\";\n\nimport * as CollapsiblePrimitive from \"@radix-ui/react-collapsible\";\n\n/* -----------------------------------------------------------------------------\n * Component: Collapsible\n * -------------------------------------------------------------------------- */\n\nfunction Collapsible({ ...props }: ComponentProps<typeof CollapsiblePrimitive.Root>): JSX.Element {\n return <CollapsiblePrimitive.Root data-slot=\"collapsible\" {...props} />;\n}\n\n/* -----------------------------------------------------------------------------\n * Component: CollapsibleTrigger\n * -------------------------------------------------------------------------- */\n\nfunction CollapsibleTrigger({ ...props }: ComponentProps<typeof CollapsiblePrimitive.CollapsibleTrigger>): JSX.Element {\n return <CollapsiblePrimitive.CollapsibleTrigger data-slot=\"collapsible-trigger\" {...props} />;\n}\n\n/* -----------------------------------------------------------------------------\n * Component: CollapsibleContent\n * -------------------------------------------------------------------------- */\n\nfunction CollapsibleContent({ ...props }: ComponentProps<typeof CollapsiblePrimitive.CollapsibleContent>): JSX.Element {\n return <CollapsiblePrimitive.CollapsibleContent data-slot=\"collapsible-content\" {...props} />;\n}\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport { Collapsible, CollapsibleContent, CollapsibleTrigger };\n"],"names":["Collapsible","props","CollapsiblePrimitive","CollapsibleTrigger","CollapsibleContent"],"mappings":";ogCAUA,SAASA,YAAY,CAAE,GAAGC,EAAyD,EACjF,MAAO,oCAACC,kCAAAA,IAAyB,EAAC,YAAU,cAAe,GAAGD,CAAK,EACrE,CAMA,SAASE,mBAAmB,CAAE,GAAGF,EAAuE,EACtG,MAAO,oCAACC,kCAAAA,kBAAuC,EAAC,YAAU,sBAAuB,GAAGD,CAAK,EAC3F,CAMA,SAASG,mBAAmB,CAAE,GAAGH,EAAuE,EACtG,MAAO,oCAACC,kCAAAA,kBAAuC,EAAC,YAAU,sBAAuB,GAAGD,CAAK,EAC3F,C"}
|
|
@@ -1,2 +1,3 @@
|
|
|
1
|
+
"use client";
|
|
1
2
|
"use strict";let __rslib_import_meta_url__="undefined"==typeof document?new(require("url".replace("",""))).URL("file:"+__filename).href:document.currentScript&&document.currentScript.src||new URL("main.js",document.baseURI).href;var __webpack_require__={};__webpack_require__.d=(e,_)=>{for(var r in _)__webpack_require__.o(_,r)&&!__webpack_require__.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:_[r]})},__webpack_require__.o=(e,_)=>Object.prototype.hasOwnProperty.call(e,_),__webpack_require__.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var __webpack_exports__={};__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{Container:()=>Container});let jsx_runtime_namespaceObject=require("react/jsx-runtime"),react_slot_namespaceObject=require("@radix-ui/react-slot"),utils_cjs_namespaceObject=require("../lib/utils.cjs");function Container({asChild:e,className:_,...r}){let t=e?react_slot_namespaceObject.Slot:"div";return(0,jsx_runtime_namespaceObject.jsx)(t,{className:(0,utils_cjs_namespaceObject.cn)("container",_),"data-slot":"container",...r})}for(var __webpack_i__ in exports.Container=__webpack_exports__.Container,__webpack_exports__)-1===["Container"].indexOf(__webpack_i__)&&(exports[__webpack_i__]=__webpack_exports__[__webpack_i__]);Object.defineProperty(exports,"__esModule",{value:!0});
|
|
2
3
|
//# sourceMappingURL=container.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"components/container.cjs","sources":["webpack://@codefast/ui/./src/components/container.tsx"],"sourcesContent":["
|
|
1
|
+
{"version":3,"file":"components/container.cjs","sources":["webpack://@codefast/ui/./src/components/container.tsx"],"sourcesContent":["\n\nimport type { ComponentProps, JSX } from \"react\";\n\nimport { Slot } from \"@radix-ui/react-slot\";\n\nimport { cn } from \"@/lib/utils\";\n\n/* -----------------------------------------------------------------------------\n * Component: Container\n * -------------------------------------------------------------------------- */\n\nfunction Container({\n asChild,\n className,\n ...props\n}: ComponentProps<\"div\"> & {\n asChild?: boolean;\n}): JSX.Element {\n const Component = asChild ? Slot : \"div\";\n\n return <Component className={cn(\"container\", className)} data-slot=\"container\" {...props} />;\n}\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport { Container };\n"],"names":["Container","asChild","className","props","Component","Slot","cn"],"mappings":";o9BAYA,SAASA,UAAU,CACjBC,QAAAA,CAAO,CACPC,UAAAA,CAAS,CACT,GAAGC,EAGJ,EACC,IAAMC,EAAYH,EAAUI,2BAAAA,IAAIA,CAAG,MAEnC,MAAO,oCAACD,EAAAA,CAAU,UAAWE,GAAAA,0BAAAA,EAAAA,EAAG,YAAaJ,GAAY,YAAU,YAAa,GAAGC,CAAK,EAC1F,C"}
|
|
@@ -1,2 +1,3 @@
|
|
|
1
|
+
"use client";
|
|
1
2
|
"use strict";let __rslib_import_meta_url__="undefined"==typeof document?new(require("url".replace("",""))).URL("file:"+__filename).href:document.currentScript&&document.currentScript.src||new URL("main.js",document.baseURI).href;var __webpack_require__={};__webpack_require__.d=(e,t)=>{for(var n in t)__webpack_require__.o(t,n)&&!__webpack_require__.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},__webpack_require__.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),__webpack_require__.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var __webpack_exports__={};__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{ContextMenuCheckboxItem:()=>ContextMenuCheckboxItem,ContextMenuItem:()=>ContextMenuItem,ContextMenu:()=>ContextMenu,ContextMenuShortcut:()=>ContextMenuShortcut,ContextMenuArrow:()=>ContextMenuArrow,ContextMenuContent:()=>ContextMenuContent,ContextMenuRadioItem:()=>ContextMenuRadioItem,ContextMenuGroup:()=>ContextMenuGroup,ContextMenuTrigger:()=>ContextMenuTrigger,ContextMenuSubContent:()=>ContextMenuSubContent,ContextMenuSubTrigger:()=>ContextMenuSubTrigger,ContextMenuSub:()=>ContextMenuSub,ContextMenuRadioGroup:()=>ContextMenuRadioGroup,ContextMenuLabel:()=>ContextMenuLabel,ContextMenuSeparator:()=>ContextMenuSeparator});let jsx_runtime_namespaceObject=require("react/jsx-runtime"),react_context_menu_namespaceObject=require("@radix-ui/react-context-menu"),external_lucide_react_namespaceObject=require("lucide-react"),utils_cjs_namespaceObject=require("../lib/utils.cjs");function ContextMenu({...e}){return(0,jsx_runtime_namespaceObject.jsx)(react_context_menu_namespaceObject.Root,{"data-slot":"context-menu",...e})}function ContextMenuTrigger({...e}){return(0,jsx_runtime_namespaceObject.jsx)(react_context_menu_namespaceObject.Trigger,{"data-slot":"context-menu-trigger",...e})}function ContextMenuGroup({...e}){return(0,jsx_runtime_namespaceObject.jsx)(react_context_menu_namespaceObject.Group,{"data-slot":"context-menu-group",...e})}function ContextMenuSub({...e}){return(0,jsx_runtime_namespaceObject.jsx)(react_context_menu_namespaceObject.Sub,{"data-slot":"context-menu-sub",...e})}function ContextMenuRadioGroup({...e}){return(0,jsx_runtime_namespaceObject.jsx)(react_context_menu_namespaceObject.RadioGroup,{"data-slot":"context-menu-radio-group",...e})}function ContextMenuSubTrigger({children:e,className:t,inset:n,...a}){return(0,jsx_runtime_namespaceObject.jsxs)(react_context_menu_namespaceObject.SubTrigger,{className:(0,utils_cjs_namespaceObject.cn)("focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground data-inset:pl-8 outline-hidden flex cursor-default select-none items-center gap-x-2 rounded-sm px-2 py-1.5 text-sm [&_svg:not([class*='size-'])]:size-4 [&_svg]:shrink-0",t),"data-inset":n,"data-slot":"context-menu-sub-trigger",...a,children:[e,(0,jsx_runtime_namespaceObject.jsx)(external_lucide_react_namespaceObject.ChevronRightIcon,{className:"ml-auto size-4"})]})}function ContextMenuSubContent({className:e,...t}){return(0,jsx_runtime_namespaceObject.jsx)(react_context_menu_namespaceObject.Portal,{children:(0,jsx_runtime_namespaceObject.jsx)(react_context_menu_namespaceObject.SubContent,{className:(0,utils_cjs_namespaceObject.cn)("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 data-[state=open]:data-[side=top]:slide-in-from-bottom-2 data-[state=open]:data-[side=right]:slide-in-from-left-2 data-[state=open]:data-[side=bottom]:slide-in-from-top-2 data-[state=open]:data-[side=left]:slide-in-from-right-2 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=closed]:data-[side=top]:slide-out-to-bottom-2 data-[state=closed]:data-[side=right]:slide-out-to-left-2 data-[state=closed]:data-[side=bottom]:slide-out-to-top-2 data-[state=closed]:data-[side=left]:slide-out-to-right-2 z-50 min-w-32 rounded-lg border p-1 shadow-lg",e),"data-slot":"context-menu-sub-content",...t})})}function ContextMenuContent({className:e,...t}){return(0,jsx_runtime_namespaceObject.jsx)(react_context_menu_namespaceObject.Portal,{children:(0,jsx_runtime_namespaceObject.jsx)(react_context_menu_namespaceObject.Content,{className:(0,utils_cjs_namespaceObject.cn)("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 data-[state=open]:data-[side=top]:slide-in-from-bottom-2 data-[state=open]:data-[side=right]:slide-in-from-left-2 data-[state=open]:data-[side=bottom]:slide-in-from-top-2 data-[state=open]:data-[side=left]:slide-in-from-right-2 z-50 min-w-32 rounded-lg border p-1 shadow-lg",e),"data-slot":"context-menu-content",...t})})}function ContextMenuItem({className:e,inset:t,variant:n,...a}){return(0,jsx_runtime_namespaceObject.jsx)(react_context_menu_namespaceObject.Item,{className:(0,utils_cjs_namespaceObject.cn)("focus:bg-accent focus:text-accent-foreground data-inset:pl-8 outline-hidden group/context-menu-item data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:[&_svg:not([class*='text-'])]:text-destructive/80 [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default select-none items-center gap-x-2 rounded-sm px-2 py-1.5 text-sm aria-disabled:opacity-50 [&_svg:not([class*='size-'])]:size-4 [&_svg]:shrink-0",e),"data-inset":t,"data-slot":"context-menu-item","data-variant":n,...a})}function ContextMenuCheckboxItem({checked:e,children:t,className:n,...a}){return(0,jsx_runtime_namespaceObject.jsxs)(react_context_menu_namespaceObject.CheckboxItem,{checked:e,className:(0,utils_cjs_namespaceObject.cn)("focus:bg-accent focus:text-accent-foreground outline-hidden group/context-menu-item relative flex cursor-default select-none items-center gap-x-2 rounded-sm py-1.5 pl-8 pr-2 text-sm aria-disabled:opacity-50 [&_svg:not([class*='size-'])]:size-4 [&_svg]:shrink-0",n),"data-slot":"context-menu-checkbox-item",...a,children:[(0,jsx_runtime_namespaceObject.jsx)("span",{className:"absolute left-2 flex items-center justify-center",children:(0,jsx_runtime_namespaceObject.jsx)(react_context_menu_namespaceObject.ItemIndicator,{children:(0,jsx_runtime_namespaceObject.jsx)(external_lucide_react_namespaceObject.CheckIcon,{className:"size-4"})})}),t]})}function ContextMenuRadioItem({children:e,className:t,...n}){return(0,jsx_runtime_namespaceObject.jsxs)(react_context_menu_namespaceObject.RadioItem,{className:(0,utils_cjs_namespaceObject.cn)("focus:bg-accent focus:text-accent-foreground outline-hidden group/context-menu-item relative flex cursor-default select-none items-center gap-x-2 rounded-sm py-1.5 pl-8 pr-2 text-sm aria-disabled:opacity-50 [&_svg:not([class*='size-'])]:size-4 [&_svg]:shrink-0",t),"data-slot":"context-menu-radio-item",...n,children:[(0,jsx_runtime_namespaceObject.jsx)("span",{className:"absolute left-2 flex items-center justify-center",children:(0,jsx_runtime_namespaceObject.jsx)(react_context_menu_namespaceObject.ItemIndicator,{children:(0,jsx_runtime_namespaceObject.jsx)(external_lucide_react_namespaceObject.DotIcon,{className:"size-4 fill-current"})})}),e]})}function ContextMenuLabel({className:e,inset:t,...n}){return(0,jsx_runtime_namespaceObject.jsx)(react_context_menu_namespaceObject.Label,{className:(0,utils_cjs_namespaceObject.cn)("data-inset:pl-8 flex items-center gap-x-2 px-2 py-1.5 text-sm font-semibold",e),"data-inset":t,"data-slot":"context-menu-label",...n})}function ContextMenuSeparator({className:e,...t}){return(0,jsx_runtime_namespaceObject.jsx)(react_context_menu_namespaceObject.Separator,{className:(0,utils_cjs_namespaceObject.cn)("bg-border mx-2 my-1 h-px",e),"data-slot":"context-menu-separator",...t})}function ContextMenuShortcut({className:e,...t}){return(0,jsx_runtime_namespaceObject.jsx)("span",{className:(0,utils_cjs_namespaceObject.cn)("text-muted-foreground group-data-[variant=destructive]/context-menu-item:text-destructive/80 ml-auto text-xs tracking-widest",e),"data-slot":"context-menu-shortcut",...t})}function ContextMenuArrow({className:e,...t}){return(0,jsx_runtime_namespaceObject.jsx)(react_context_menu_namespaceObject.Arrow,{className:(0,utils_cjs_namespaceObject.cn)("fill-popover",e),"data-slot":"context-menu-arrow",...t})}for(var __webpack_i__ in exports.ContextMenu=__webpack_exports__.ContextMenu,exports.ContextMenuArrow=__webpack_exports__.ContextMenuArrow,exports.ContextMenuCheckboxItem=__webpack_exports__.ContextMenuCheckboxItem,exports.ContextMenuContent=__webpack_exports__.ContextMenuContent,exports.ContextMenuGroup=__webpack_exports__.ContextMenuGroup,exports.ContextMenuItem=__webpack_exports__.ContextMenuItem,exports.ContextMenuLabel=__webpack_exports__.ContextMenuLabel,exports.ContextMenuRadioGroup=__webpack_exports__.ContextMenuRadioGroup,exports.ContextMenuRadioItem=__webpack_exports__.ContextMenuRadioItem,exports.ContextMenuSeparator=__webpack_exports__.ContextMenuSeparator,exports.ContextMenuShortcut=__webpack_exports__.ContextMenuShortcut,exports.ContextMenuSub=__webpack_exports__.ContextMenuSub,exports.ContextMenuSubContent=__webpack_exports__.ContextMenuSubContent,exports.ContextMenuSubTrigger=__webpack_exports__.ContextMenuSubTrigger,exports.ContextMenuTrigger=__webpack_exports__.ContextMenuTrigger,__webpack_exports__)-1===["ContextMenu","ContextMenuArrow","ContextMenuCheckboxItem","ContextMenuContent","ContextMenuGroup","ContextMenuItem","ContextMenuLabel","ContextMenuRadioGroup","ContextMenuRadioItem","ContextMenuSeparator","ContextMenuShortcut","ContextMenuSub","ContextMenuSubContent","ContextMenuSubTrigger","ContextMenuTrigger"].indexOf(__webpack_i__)&&(exports[__webpack_i__]=__webpack_exports__[__webpack_i__]);Object.defineProperty(exports,"__esModule",{value:!0});
|
|
2
3
|
//# sourceMappingURL=context-menu.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"components/context-menu.cjs","sources":["webpack://@codefast/ui/./src/components/context-menu.tsx"],"sourcesContent":["import type { ComponentProps, JSX } from \"react\";\n\nimport * as ContextMenuPrimitive from \"@radix-ui/react-context-menu\";\nimport { CheckIcon, ChevronRightIcon, DotIcon } from \"lucide-react\";\n\nimport { cn } from \"@/lib/utils\";\n\n/* -----------------------------------------------------------------------------\n * Component: ContextMenu\n * -------------------------------------------------------------------------- */\n\nfunction ContextMenu({ ...props }: ComponentProps<typeof ContextMenuPrimitive.Root>): JSX.Element {\n return <ContextMenuPrimitive.Root data-slot=\"context-menu\" {...props} />;\n}\n\n/* -----------------------------------------------------------------------------\n * Component: ContextMenuTrigger\n * -------------------------------------------------------------------------- */\n\nfunction ContextMenuTrigger({ ...props }: ComponentProps<typeof ContextMenuPrimitive.Trigger>): JSX.Element {\n return <ContextMenuPrimitive.Trigger data-slot=\"context-menu-trigger\" {...props} />;\n}\n\n/* -----------------------------------------------------------------------------\n * Component: ContextMenuGroup\n * -------------------------------------------------------------------------- */\n\nfunction ContextMenuGroup({ ...props }: ComponentProps<typeof ContextMenuPrimitive.Group>): JSX.Element {\n return <ContextMenuPrimitive.Group data-slot=\"context-menu-group\" {...props} />;\n}\n\n/* -----------------------------------------------------------------------------\n * Component: ContextMenuSub\n * -------------------------------------------------------------------------- */\n\nfunction ContextMenuSub({ ...props }: ComponentProps<typeof ContextMenuPrimitive.Sub>): JSX.Element {\n return <ContextMenuPrimitive.Sub data-slot=\"context-menu-sub\" {...props} />;\n}\n\n/* -----------------------------------------------------------------------------\n * Component: ContextMenuRadioGroup\n * -------------------------------------------------------------------------- */\n\nfunction ContextMenuRadioGroup({ ...props }: ComponentProps<typeof ContextMenuPrimitive.RadioGroup>): JSX.Element {\n return <ContextMenuPrimitive.RadioGroup data-slot=\"context-menu-radio-group\" {...props} />;\n}\n\n/* -----------------------------------------------------------------------------\n * Component: ContextMenuSubTrigger\n * -------------------------------------------------------------------------- */\n\nfunction ContextMenuSubTrigger({\n children,\n className,\n inset,\n ...props\n}: ComponentProps<typeof ContextMenuPrimitive.SubTrigger> & {\n inset?: boolean;\n}): JSX.Element {\n return (\n <ContextMenuPrimitive.SubTrigger\n className={cn(\n \"focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground data-inset:pl-8 outline-hidden flex cursor-default select-none items-center gap-x-2 rounded-sm px-2 py-1.5 text-sm [&_svg:not([class*='size-'])]:size-4 [&_svg]:shrink-0\",\n className,\n )}\n data-inset={inset}\n data-slot=\"context-menu-sub-trigger\"\n {...props}\n >\n {children}\n <ChevronRightIcon className=\"ml-auto size-4\" />\n </ContextMenuPrimitive.SubTrigger>\n );\n}\n\n/* -----------------------------------------------------------------------------\n * Component: ContextMenuSubContent\n * -------------------------------------------------------------------------- */\n\nfunction ContextMenuSubContent({\n className,\n ...props\n}: ComponentProps<typeof ContextMenuPrimitive.SubContent>): JSX.Element {\n return (\n <ContextMenuPrimitive.Portal>\n <ContextMenuPrimitive.SubContent\n className={cn(\n \"bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 data-[state=open]:data-[side=top]:slide-in-from-bottom-2 data-[state=open]:data-[side=right]:slide-in-from-left-2 data-[state=open]:data-[side=bottom]:slide-in-from-top-2 data-[state=open]:data-[side=left]:slide-in-from-right-2 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=closed]:data-[side=top]:slide-out-to-bottom-2 data-[state=closed]:data-[side=right]:slide-out-to-left-2 data-[state=closed]:data-[side=bottom]:slide-out-to-top-2 data-[state=closed]:data-[side=left]:slide-out-to-right-2 z-50 min-w-32 rounded-lg border p-1 shadow-lg\",\n className,\n )}\n data-slot=\"context-menu-sub-content\"\n {...props}\n />\n </ContextMenuPrimitive.Portal>\n );\n}\n\n/* -----------------------------------------------------------------------------\n * Component: ContextMenuContent\n * -------------------------------------------------------------------------- */\n\nfunction ContextMenuContent({ className, ...props }: ComponentProps<typeof ContextMenuPrimitive.Content>): JSX.Element {\n return (\n <ContextMenuPrimitive.Portal>\n <ContextMenuPrimitive.Content\n className={cn(\n \"bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 data-[state=open]:data-[side=top]:slide-in-from-bottom-2 data-[state=open]:data-[side=right]:slide-in-from-left-2 data-[state=open]:data-[side=bottom]:slide-in-from-top-2 data-[state=open]:data-[side=left]:slide-in-from-right-2 z-50 min-w-32 rounded-lg border p-1 shadow-lg\",\n className,\n )}\n data-slot=\"context-menu-content\"\n {...props}\n />\n </ContextMenuPrimitive.Portal>\n );\n}\n\n/* -----------------------------------------------------------------------------\n * Component: ContextMenuItem\n * -------------------------------------------------------------------------- */\n\nfunction ContextMenuItem({\n className,\n inset,\n variant,\n ...props\n}: ComponentProps<typeof ContextMenuPrimitive.Item> & {\n inset?: boolean;\n variant?: \"default\" | \"destructive\";\n}): JSX.Element {\n return (\n <ContextMenuPrimitive.Item\n className={cn(\n \"focus:bg-accent focus:text-accent-foreground data-inset:pl-8 outline-hidden group/context-menu-item data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:[&_svg:not([class*='text-'])]:text-destructive/80 [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default select-none items-center gap-x-2 rounded-sm px-2 py-1.5 text-sm aria-disabled:opacity-50 [&_svg:not([class*='size-'])]:size-4 [&_svg]:shrink-0\",\n className,\n )}\n data-inset={inset}\n data-slot=\"context-menu-item\"\n data-variant={variant}\n {...props}\n />\n );\n}\n\n/* -----------------------------------------------------------------------------\n * Component: ContextMenuCheckboxItem\n * -------------------------------------------------------------------------- */\n\nfunction ContextMenuCheckboxItem({\n checked,\n children,\n className,\n ...props\n}: ComponentProps<typeof ContextMenuPrimitive.CheckboxItem>): JSX.Element {\n return (\n <ContextMenuPrimitive.CheckboxItem\n checked={checked}\n className={cn(\n \"focus:bg-accent focus:text-accent-foreground outline-hidden group/context-menu-item relative flex cursor-default select-none items-center gap-x-2 rounded-sm py-1.5 pl-8 pr-2 text-sm aria-disabled:opacity-50 [&_svg:not([class*='size-'])]:size-4 [&_svg]:shrink-0\",\n className,\n )}\n data-slot=\"context-menu-checkbox-item\"\n {...props}\n >\n <span className=\"absolute left-2 flex items-center justify-center\">\n <ContextMenuPrimitive.ItemIndicator>\n <CheckIcon className=\"size-4\" />\n </ContextMenuPrimitive.ItemIndicator>\n </span>\n {children}\n </ContextMenuPrimitive.CheckboxItem>\n );\n}\n\n/* -----------------------------------------------------------------------------\n * Component: ContextMenuRadioItem\n * -------------------------------------------------------------------------- */\n\nfunction ContextMenuRadioItem({\n children,\n className,\n ...props\n}: ComponentProps<typeof ContextMenuPrimitive.RadioItem>): JSX.Element {\n return (\n <ContextMenuPrimitive.RadioItem\n className={cn(\n \"focus:bg-accent focus:text-accent-foreground outline-hidden group/context-menu-item relative flex cursor-default select-none items-center gap-x-2 rounded-sm py-1.5 pl-8 pr-2 text-sm aria-disabled:opacity-50 [&_svg:not([class*='size-'])]:size-4 [&_svg]:shrink-0\",\n className,\n )}\n data-slot=\"context-menu-radio-item\"\n {...props}\n >\n <span className=\"absolute left-2 flex items-center justify-center\">\n <ContextMenuPrimitive.ItemIndicator>\n <DotIcon className=\"size-4 fill-current\" />\n </ContextMenuPrimitive.ItemIndicator>\n </span>\n {children}\n </ContextMenuPrimitive.RadioItem>\n );\n}\n\n/* -----------------------------------------------------------------------------\n * Component: ContextMenuLabel\n * -------------------------------------------------------------------------- */\n\nfunction ContextMenuLabel({\n className,\n inset,\n ...props\n}: ComponentProps<typeof ContextMenuPrimitive.Label> & {\n inset?: boolean;\n}): JSX.Element {\n return (\n <ContextMenuPrimitive.Label\n className={cn(\"data-inset:pl-8 flex items-center gap-x-2 px-2 py-1.5 text-sm font-semibold\", className)}\n data-inset={inset}\n data-slot=\"context-menu-label\"\n {...props}\n />\n );\n}\n\n/* -----------------------------------------------------------------------------\n * Component: ContextMenuSeparator\n * -------------------------------------------------------------------------- */\n\nfunction ContextMenuSeparator({\n className,\n ...props\n}: ComponentProps<typeof ContextMenuPrimitive.Separator>): JSX.Element {\n return (\n <ContextMenuPrimitive.Separator\n className={cn(\"bg-border mx-2 my-1 h-px\", className)}\n data-slot=\"context-menu-separator\"\n {...props}\n />\n );\n}\n\n/* -----------------------------------------------------------------------------\n * Component: ContextMenuShortcut\n * -------------------------------------------------------------------------- */\n\nfunction ContextMenuShortcut({ className, ...props }: ComponentProps<\"span\">): JSX.Element {\n return (\n <span\n className={cn(\n \"text-muted-foreground group-data-[variant=destructive]/context-menu-item:text-destructive/80 ml-auto text-xs tracking-widest\",\n className,\n )}\n data-slot=\"context-menu-shortcut\"\n {...props}\n />\n );\n}\n\n/* -----------------------------------------------------------------------------\n * Component: ContextMenuArrow\n * -------------------------------------------------------------------------- */\n\nfunction ContextMenuArrow({ className, ...props }: ComponentProps<typeof ContextMenuPrimitive.Arrow>): JSX.Element {\n return (\n <ContextMenuPrimitive.Arrow className={cn(\"fill-popover\", className)} data-slot=\"context-menu-arrow\" {...props} />\n );\n}\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport {\n ContextMenu,\n ContextMenuArrow,\n ContextMenuCheckboxItem,\n ContextMenuContent,\n ContextMenuGroup,\n ContextMenuItem,\n ContextMenuLabel,\n ContextMenuRadioGroup,\n ContextMenuRadioItem,\n ContextMenuSeparator,\n ContextMenuShortcut,\n ContextMenuSub,\n ContextMenuSubContent,\n ContextMenuSubTrigger,\n ContextMenuTrigger,\n};\n"],"names":["ContextMenu","props","ContextMenuPrimitive","ContextMenuTrigger","ContextMenuGroup","ContextMenuSub","ContextMenuRadioGroup","ContextMenuSubTrigger","children","className","inset","cn","ChevronRightIcon","ContextMenuSubContent","ContextMenuContent","ContextMenuItem","variant","ContextMenuCheckboxItem","checked","CheckIcon","ContextMenuRadioItem","DotIcon","ContextMenuLabel","ContextMenuSeparator","ContextMenuShortcut","ContextMenuArrow"],"mappings":"8nDAWA,SAASA,YAAY,CAAE,GAAGC,EAAyD,EACjF,MAAO,oCAACC,mCAAAA,IAAyB,EAAC,YAAU,eAAgB,GAAGD,CAAK,A,EACtE,CAMA,SAASE,mBAAmB,CAAE,GAAGF,EAA4D,EAC3F,MAAO,oCAACC,mCAAAA,OAA4B,EAAC,YAAU,uBAAwB,GAAGD,CAAK,A,EACjF,CAMA,SAASG,iBAAiB,CAAE,GAAGH,EAA0D,EACvF,MAAO,oCAACC,mCAAAA,KAA0B,EAAC,YAAU,qBAAsB,GAAGD,CAAK,A,EAC7E,CAMA,SAASI,eAAe,CAAE,GAAGJ,EAAwD,EACnF,MAAO,oCAACC,mCAAAA,GAAwB,EAAC,YAAU,mBAAoB,GAAGD,CAAK,A,EACzE,CAMA,SAASK,sBAAsB,CAAE,GAAGL,EAA+D,EACjG,MAAO,oCAACC,mCAAAA,UAA+B,EAAC,YAAU,2BAA4B,GAAGD,CAAK,A,EACxF,CAMA,SAASM,sBAAsB,CAC7BC,SAAAA,CAAQ,CACRC,UAAAA,CAAS,CACTC,MAAAA,CAAK,CACL,GAAGT,EAGJ,EACC,MACE,qCAACC,mCAAAA,UAA+B,EAC9B,UAAWS,AAAAA,GAAAA,0BAAAA,EAAAA,AAAAA,EACT,6RACAF,GAEF,aAAYC,EACZ,YAAU,2BACT,GAAGT,CAAK,C,UAERO,EACD,oCAACI,sCAAAA,gBAAgBA,CAAAA,CAAC,UAAU,gB,KAGlC,CAMA,SAASC,sBAAsB,CAC7BJ,UAAAA,CAAS,CACT,GAAGR,EACoD,EAC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R,CAAK,C,UAET,oCAAC,QAAK,UAAU,mD,SACd,oCAACC,mCAAAA,aAAkC,E,SACjC,oCAACmB,sCAAAA,OAAOA,CAAAA,CAAC,UAAU,qB,OAGtBb,E,EAGP,CAMA,SAASc,iBAAiB,CACxBb,UAAAA,CAAS,CACTC,MAAAA,CAAK,CACL,GAAGT,EAGJ,EACC,MACE,oCAACC,mCAAAA,KAA0B,EACzB,UAAWS,AAAAA,GAAAA,0BAAAA,EAAAA,AAAAA,EAAG,8EAA+EF,GAC7F,aAAYC,EACZ,YAAU,qBACT,GAAGT,CAAK,A,EAGf,CAMA,SAASsB,qBAAqB,CAC5Bd,UAAAA,CAAS,CACT,GAAGR,EACmD,EACtD,MACE,oCAACC,mCAAAA,SAA8B,EAC7B,UAAWS,AAAAA,GAAAA,0BAAAA,EAAAA,AAAAA,EAAG,2BAA4BF,GAC1C,YAAU,yBACT,GAAGR,CAAK,A,EAGf,CAMA,SAASuB,oBAAoB,CAAEf,UAAAA,CAAS,CAAE,GAAGR,EAA+B,EAC1E,MACE,oCAAC,QACC,UAAWU,AAAAA,GAAAA,0BAAAA,EAAAA,AAAAA,EACT,+HACAF,GAEF,YAAU,wBACT,GAAGR,CAAK,A,EAGf,CAMA,SAASwB,iBAAiB,CAAEhB,UAAAA,CAAS,CAAE,GAAGR,EAA0D,EAClG,MACE,oCAACC,mCAAAA,KAA0B,EAAC,UAAWS,AAAAA,GAAAA,0BAAAA,EAAAA,AAAAA,EAAG,eAAgBF,GAAY,YAAU,qBAAsB,GAAGR,CAAK,A,EAElH,C"}
|
|
1
|
+
{"version":3,"file":"components/context-menu.cjs","sources":["webpack://@codefast/ui/./src/components/context-menu.tsx"],"sourcesContent":["\n\nimport type { ComponentProps, JSX } from \"react\";\n\nimport * as ContextMenuPrimitive from \"@radix-ui/react-context-menu\";\nimport { CheckIcon, ChevronRightIcon, DotIcon } from \"lucide-react\";\n\nimport { cn } from \"@/lib/utils\";\n\n/* -----------------------------------------------------------------------------\n * Component: ContextMenu\n * -------------------------------------------------------------------------- */\n\nfunction ContextMenu({ ...props }: ComponentProps<typeof ContextMenuPrimitive.Root>): JSX.Element {\n return <ContextMenuPrimitive.Root data-slot=\"context-menu\" {...props} />;\n}\n\n/* -----------------------------------------------------------------------------\n * Component: ContextMenuTrigger\n * -------------------------------------------------------------------------- */\n\nfunction ContextMenuTrigger({ ...props }: ComponentProps<typeof ContextMenuPrimitive.Trigger>): JSX.Element {\n return <ContextMenuPrimitive.Trigger data-slot=\"context-menu-trigger\" {...props} />;\n}\n\n/* -----------------------------------------------------------------------------\n * Component: ContextMenuGroup\n * -------------------------------------------------------------------------- */\n\nfunction ContextMenuGroup({ ...props }: ComponentProps<typeof ContextMenuPrimitive.Group>): JSX.Element {\n return <ContextMenuPrimitive.Group data-slot=\"context-menu-group\" {...props} />;\n}\n\n/* -----------------------------------------------------------------------------\n * Component: ContextMenuSub\n * -------------------------------------------------------------------------- */\n\nfunction ContextMenuSub({ ...props }: ComponentProps<typeof ContextMenuPrimitive.Sub>): JSX.Element {\n return <ContextMenuPrimitive.Sub data-slot=\"context-menu-sub\" {...props} />;\n}\n\n/* -----------------------------------------------------------------------------\n * Component: ContextMenuRadioGroup\n * -------------------------------------------------------------------------- */\n\nfunction ContextMenuRadioGroup({ ...props }: ComponentProps<typeof ContextMenuPrimitive.RadioGroup>): JSX.Element {\n return <ContextMenuPrimitive.RadioGroup data-slot=\"context-menu-radio-group\" {...props} />;\n}\n\n/* -----------------------------------------------------------------------------\n * Component: ContextMenuSubTrigger\n * -------------------------------------------------------------------------- */\n\nfunction ContextMenuSubTrigger({\n children,\n className,\n inset,\n ...props\n}: ComponentProps<typeof ContextMenuPrimitive.SubTrigger> & {\n inset?: boolean;\n}): JSX.Element {\n return (\n <ContextMenuPrimitive.SubTrigger\n className={cn(\n \"focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground data-inset:pl-8 outline-hidden flex cursor-default select-none items-center gap-x-2 rounded-sm px-2 py-1.5 text-sm [&_svg:not([class*='size-'])]:size-4 [&_svg]:shrink-0\",\n className,\n )}\n data-inset={inset}\n data-slot=\"context-menu-sub-trigger\"\n {...props}\n >\n {children}\n <ChevronRightIcon className=\"ml-auto size-4\" />\n </ContextMenuPrimitive.SubTrigger>\n );\n}\n\n/* -----------------------------------------------------------------------------\n * Component: ContextMenuSubContent\n * -------------------------------------------------------------------------- */\n\nfunction ContextMenuSubContent({\n className,\n ...props\n}: ComponentProps<typeof ContextMenuPrimitive.SubContent>): JSX.Element {\n return (\n <ContextMenuPrimitive.Portal>\n <ContextMenuPrimitive.SubContent\n className={cn(\n \"bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 data-[state=open]:data-[side=top]:slide-in-from-bottom-2 data-[state=open]:data-[side=right]:slide-in-from-left-2 data-[state=open]:data-[side=bottom]:slide-in-from-top-2 data-[state=open]:data-[side=left]:slide-in-from-right-2 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=closed]:data-[side=top]:slide-out-to-bottom-2 data-[state=closed]:data-[side=right]:slide-out-to-left-2 data-[state=closed]:data-[side=bottom]:slide-out-to-top-2 data-[state=closed]:data-[side=left]:slide-out-to-right-2 z-50 min-w-32 rounded-lg border p-1 shadow-lg\",\n className,\n )}\n data-slot=\"context-menu-sub-content\"\n {...props}\n />\n </ContextMenuPrimitive.Portal>\n );\n}\n\n/* -----------------------------------------------------------------------------\n * Component: ContextMenuContent\n * -------------------------------------------------------------------------- */\n\nfunction ContextMenuContent({ className, ...props }: ComponentProps<typeof ContextMenuPrimitive.Content>): JSX.Element {\n return (\n <ContextMenuPrimitive.Portal>\n <ContextMenuPrimitive.Content\n className={cn(\n \"bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 data-[state=open]:data-[side=top]:slide-in-from-bottom-2 data-[state=open]:data-[side=right]:slide-in-from-left-2 data-[state=open]:data-[side=bottom]:slide-in-from-top-2 data-[state=open]:data-[side=left]:slide-in-from-right-2 z-50 min-w-32 rounded-lg border p-1 shadow-lg\",\n className,\n )}\n data-slot=\"context-menu-content\"\n {...props}\n />\n </ContextMenuPrimitive.Portal>\n );\n}\n\n/* -----------------------------------------------------------------------------\n * Component: ContextMenuItem\n * -------------------------------------------------------------------------- */\n\nfunction ContextMenuItem({\n className,\n inset,\n variant,\n ...props\n}: ComponentProps<typeof ContextMenuPrimitive.Item> & {\n inset?: boolean;\n variant?: \"default\" | \"destructive\";\n}): JSX.Element {\n return (\n <ContextMenuPrimitive.Item\n className={cn(\n \"focus:bg-accent focus:text-accent-foreground data-inset:pl-8 outline-hidden group/context-menu-item data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:[&_svg:not([class*='text-'])]:text-destructive/80 [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default select-none items-center gap-x-2 rounded-sm px-2 py-1.5 text-sm aria-disabled:opacity-50 [&_svg:not([class*='size-'])]:size-4 [&_svg]:shrink-0\",\n className,\n )}\n data-inset={inset}\n data-slot=\"context-menu-item\"\n data-variant={variant}\n {...props}\n />\n );\n}\n\n/* -----------------------------------------------------------------------------\n * Component: ContextMenuCheckboxItem\n * -------------------------------------------------------------------------- */\n\nfunction ContextMenuCheckboxItem({\n checked,\n children,\n className,\n ...props\n}: ComponentProps<typeof ContextMenuPrimitive.CheckboxItem>): JSX.Element {\n return (\n <ContextMenuPrimitive.CheckboxItem\n checked={checked}\n className={cn(\n \"focus:bg-accent focus:text-accent-foreground outline-hidden group/context-menu-item relative flex cursor-default select-none items-center gap-x-2 rounded-sm py-1.5 pl-8 pr-2 text-sm aria-disabled:opacity-50 [&_svg:not([class*='size-'])]:size-4 [&_svg]:shrink-0\",\n className,\n )}\n data-slot=\"context-menu-checkbox-item\"\n {...props}\n >\n <span className=\"absolute left-2 flex items-center justify-center\">\n <ContextMenuPrimitive.ItemIndicator>\n <CheckIcon className=\"size-4\" />\n </ContextMenuPrimitive.ItemIndicator>\n </span>\n {children}\n </ContextMenuPrimitive.CheckboxItem>\n );\n}\n\n/* -----------------------------------------------------------------------------\n * Component: ContextMenuRadioItem\n * -------------------------------------------------------------------------- */\n\nfunction ContextMenuRadioItem({\n children,\n className,\n ...props\n}: ComponentProps<typeof ContextMenuPrimitive.RadioItem>): JSX.Element {\n return (\n <ContextMenuPrimitive.RadioItem\n className={cn(\n \"focus:bg-accent focus:text-accent-foreground outline-hidden group/context-menu-item relative flex cursor-default select-none items-center gap-x-2 rounded-sm py-1.5 pl-8 pr-2 text-sm aria-disabled:opacity-50 [&_svg:not([class*='size-'])]:size-4 [&_svg]:shrink-0\",\n className,\n )}\n data-slot=\"context-menu-radio-item\"\n {...props}\n >\n <span className=\"absolute left-2 flex items-center justify-center\">\n <ContextMenuPrimitive.ItemIndicator>\n <DotIcon className=\"size-4 fill-current\" />\n </ContextMenuPrimitive.ItemIndicator>\n </span>\n {children}\n </ContextMenuPrimitive.RadioItem>\n );\n}\n\n/* -----------------------------------------------------------------------------\n * Component: ContextMenuLabel\n * -------------------------------------------------------------------------- */\n\nfunction ContextMenuLabel({\n className,\n inset,\n ...props\n}: ComponentProps<typeof ContextMenuPrimitive.Label> & {\n inset?: boolean;\n}): JSX.Element {\n return (\n <ContextMenuPrimitive.Label\n className={cn(\"data-inset:pl-8 flex items-center gap-x-2 px-2 py-1.5 text-sm font-semibold\", className)}\n data-inset={inset}\n data-slot=\"context-menu-label\"\n {...props}\n />\n );\n}\n\n/* -----------------------------------------------------------------------------\n * Component: ContextMenuSeparator\n * -------------------------------------------------------------------------- */\n\nfunction ContextMenuSeparator({\n className,\n ...props\n}: ComponentProps<typeof ContextMenuPrimitive.Separator>): JSX.Element {\n return (\n <ContextMenuPrimitive.Separator\n className={cn(\"bg-border mx-2 my-1 h-px\", className)}\n data-slot=\"context-menu-separator\"\n {...props}\n />\n );\n}\n\n/* -----------------------------------------------------------------------------\n * Component: ContextMenuShortcut\n * -------------------------------------------------------------------------- */\n\nfunction ContextMenuShortcut({ className, ...props }: ComponentProps<\"span\">): JSX.Element {\n return (\n <span\n className={cn(\n \"text-muted-foreground group-data-[variant=destructive]/context-menu-item:text-destructive/80 ml-auto text-xs tracking-widest\",\n className,\n )}\n data-slot=\"context-menu-shortcut\"\n {...props}\n />\n );\n}\n\n/* -----------------------------------------------------------------------------\n * Component: ContextMenuArrow\n * -------------------------------------------------------------------------- */\n\nfunction ContextMenuArrow({ className, ...props }: ComponentProps<typeof ContextMenuPrimitive.Arrow>): JSX.Element {\n return (\n <ContextMenuPrimitive.Arrow className={cn(\"fill-popover\", className)} data-slot=\"context-menu-arrow\" {...props} />\n );\n}\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport {\n ContextMenu,\n ContextMenuArrow,\n ContextMenuCheckboxItem,\n ContextMenuContent,\n ContextMenuGroup,\n ContextMenuItem,\n ContextMenuLabel,\n ContextMenuRadioGroup,\n ContextMenuRadioItem,\n ContextMenuSeparator,\n ContextMenuShortcut,\n ContextMenuSub,\n ContextMenuSubContent,\n ContextMenuSubTrigger,\n ContextMenuTrigger,\n};\n"],"names":["ContextMenu","props","ContextMenuPrimitive","ContextMenuTrigger","ContextMenuGroup","ContextMenuSub","ContextMenuRadioGroup","ContextMenuSubTrigger","children","className","inset","cn","ChevronRightIcon","ContextMenuSubContent","ContextMenuContent","ContextMenuItem","variant","ContextMenuCheckboxItem","checked","CheckIcon","ContextMenuRadioItem","DotIcon","ContextMenuLabel","ContextMenuSeparator","ContextMenuShortcut","ContextMenuArrow"],"mappings":";8nDAaA,SAASA,YAAY,CAAE,GAAGC,EAAyD,EACjF,MAAO,oCAACC,mCAAAA,IAAyB,EAAC,YAAU,eAAgB,GAAGD,CAAK,EACtE,CAMA,SAASE,mBAAmB,CAAE,GAAGF,EAA4D,EAC3F,MAAO,oCAACC,mCAAAA,O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oB,CAAEf,UAAAA,CAAS,CAAE,GAAGR,EAA+B,EAC1E,MACE,oCAAC,QACC,UAAWU,GAAAA,0BAAAA,EAAAA,EACT,+HACAF,GAEF,YAAU,wBACT,GAAGR,CAAK,EAGf,CAMA,SAASwB,iBAAiB,CAAEhB,UAAAA,CAAS,CAAE,GAAGR,EAA0D,EAClG,MACE,oCAACC,mCAAAA,KAA0B,EAAC,UAAWS,GAAAA,0BAAAA,EAAAA,EAAG,eAAgBF,GAAY,YAAU,qBAAsB,GAAGR,CAAK,EAElH,C"}
|
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
"use
|
|
1
|
+
"use client";
|
|
2
|
+
"use strict";let __rslib_import_meta_url__="undefined"==typeof document?new(require("url".replace("",""))).URL("file:"+__filename).href:document.currentScript&&document.currentScript.src||new URL("main.js",document.baseURI).href;var __webpack_require__={};__webpack_require__.d=(e,a)=>{for(var t in a)__webpack_require__.o(a,t)&&!__webpack_require__.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:a[t]})},__webpack_require__.o=(e,a)=>Object.prototype.hasOwnProperty.call(e,a),__webpack_require__.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var __webpack_exports__={};__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{DialogHeader:()=>DialogHeader,DialogClose:()=>DialogClose,Dialog:()=>Dialog,DialogFooter:()=>DialogFooter,DialogContent:()=>DialogContent,DialogBody:()=>DialogBody,DialogDescription:()=>DialogDescription,DialogTrigger:()=>DialogTrigger,DialogTitle:()=>DialogTitle});let jsx_runtime_namespaceObject=require("react/jsx-runtime"),react_dialog_namespaceObject=require("@radix-ui/react-dialog"),external_lucide_react_namespaceObject=require("lucide-react"),index_cjs_namespaceObject=require("./button/index.cjs"),utils_cjs_namespaceObject=require("../lib/utils.cjs");function Dialog({...e}){return(0,jsx_runtime_namespaceObject.jsx)(react_dialog_namespaceObject.Root,{"data-slot":"dialog",...e})}function DialogTrigger({...e}){return(0,jsx_runtime_namespaceObject.jsx)(react_dialog_namespaceObject.Trigger,{"data-slot":"dialog-trigger",...e})}function DialogContent({children:e,className:a,classNames:t,...o}){return(0,jsx_runtime_namespaceObject.jsxs)(react_dialog_namespaceObject.Portal,{children:[(0,jsx_runtime_namespaceObject.jsx)(react_dialog_namespaceObject.Overlay,{className:(0,utils_cjs_namespaceObject.cn)("bg-popover-overlay data-[state=open]:animate-fade-in data-[state=closed]:animate-fade-out fixed inset-0 z-50",t?.overlay),"data-slot":"dialog-overlay"}),(0,jsx_runtime_namespaceObject.jsx)(react_dialog_namespaceObject.Content,{className:(0,utils_cjs_namespaceObject.cn)("data-[state=open]:animate-in max-sm:data-[state=open]:animation-duration-500 max-sm:data-[state=open]:slide-in-from-bottom sm:data-[state=open]:fade-in-0 sm:data-[state=open]:zoom-in-95 data-[state=closed]:animate-out max-sm:data-[state=closed]:animation-duration-500 max-sm:data-[state=closed]:slide-out-to-bottom sm:data-[state=closed]:fade-out-0 sm:data-[state=closed]:zoom-out-95 fixed inset-0 z-50 grid grid-rows-[1fr_auto] justify-items-center overflow-auto sm:grid-rows-[1fr_auto_3fr] sm:p-4",t?.wrapper),"data-slot":"dialog-content-wrapper",...o,children:(0,jsx_runtime_namespaceObject.jsxs)("div",{className:(0,utils_cjs_namespaceObject.cn)("bg-popover text-popover-foreground relative row-start-2 flex w-full flex-col rounded-t-2xl border shadow-lg sm:max-w-lg sm:rounded-2xl",t?.content,a),"data-slot":"dialog-content",children:[e,(0,jsx_runtime_namespaceObject.jsxs)(react_dialog_namespaceObject.Close,{className:(0,index_cjs_namespaceObject.buttonVariants)({className:["absolute right-2.5 top-2.5 size-7",t?.close],size:"icon",variant:"ghost"}),"data-slot":"dialog-close",children:[(0,jsx_runtime_namespaceObject.jsx)(external_lucide_react_namespaceObject.XIcon,{className:"size-4"}),(0,jsx_runtime_namespaceObject.jsx)("span",{className:"sr-only",children:"Close"})]})]})})]})}function DialogHeader({className:e,...a}){return(0,jsx_runtime_namespaceObject.jsx)("header",{className:(0,utils_cjs_namespaceObject.cn)("flex shrink-0 flex-col gap-1.5 px-6 pb-2 pt-6 text-center sm:text-left",e),"data-slot":"dialog-header",...a})}function DialogBody({className:e,...a}){return(0,jsx_runtime_namespaceObject.jsx)("main",{className:(0,utils_cjs_namespaceObject.cn)("overflow-auto px-6 py-2",e),"data-slot":"dialog-body",...a})}function DialogFooter({className:e,...a}){return(0,jsx_runtime_namespaceObject.jsx)("footer",{className:(0,utils_cjs_namespaceObject.cn)("flex shrink-0 flex-col-reverse gap-2 px-6 pb-6 pt-2 sm:flex-row sm:justify-end",e),"data-slot":"dialog-footer",...a})}function DialogTitle({className:e,...a}){return(0,jsx_runtime_namespaceObject.jsx)(react_dialog_namespaceObject.Title,{className:(0,utils_cjs_namespaceObject.cn)("text-lg font-semibold leading-none tracking-tight",e),"data-slot":"dialog-title",...a})}function DialogDescription({className:e,...a}){return(0,jsx_runtime_namespaceObject.jsx)(react_dialog_namespaceObject.Description,{className:(0,utils_cjs_namespaceObject.cn)("text-muted-foreground text-sm",e),"data-slot":"dialog-description",...a})}function DialogClose({className:e,size:a,variant:t="outline",...o}){return(0,jsx_runtime_namespaceObject.jsx)(react_dialog_namespaceObject.Close,{className:(0,index_cjs_namespaceObject.buttonVariants)({className:e,size:a,variant:t}),"data-slot":"dialog-close",...o})}for(var __webpack_i__ in exports.Dialog=__webpack_exports__.Dialog,exports.DialogBody=__webpack_exports__.DialogBody,exports.DialogClose=__webpack_exports__.DialogClose,exports.DialogContent=__webpack_exports__.DialogContent,exports.DialogDescription=__webpack_exports__.DialogDescription,exports.DialogFooter=__webpack_exports__.DialogFooter,exports.DialogHeader=__webpack_exports__.DialogHeader,exports.DialogTitle=__webpack_exports__.DialogTitle,exports.DialogTrigger=__webpack_exports__.DialogTrigger,__webpack_exports__)-1===["Dialog","DialogBody","DialogClose","DialogContent","DialogDescription","DialogFooter","DialogHeader","DialogTitle","DialogTrigger"].indexOf(__webpack_i__)&&(exports[__webpack_i__]=__webpack_exports__[__webpack_i__]);Object.defineProperty(exports,"__esModule",{value:!0});
|
|
2
3
|
//# sourceMappingURL=dialog.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"components/dialog.cjs","sources":["webpack://@codefast/ui/./src/components/dialog.tsx"],"sourcesContent":["
|
|
1
|
+
{"version":3,"file":"components/dialog.cjs","sources":["webpack://@codefast/ui/./src/components/dialog.tsx"],"sourcesContent":["\n\nimport type { ComponentProps, JSX } from \"react\";\n\nimport * as DialogPrimitive from \"@radix-ui/react-dialog\";\nimport { XIcon } from \"lucide-react\";\n\nimport type { VariantProps } from \"@/lib/utils\";\n\nimport { buttonVariants } from \"@/components/button\";\nimport { cn } from \"@/lib/utils\";\n\n/* -----------------------------------------------------------------------------\n * Component: Dialog\n * -------------------------------------------------------------------------- */\n\nfunction Dialog({ ...props }: ComponentProps<typeof DialogPrimitive.Root>): JSX.Element {\n return <DialogPrimitive.Root data-slot=\"dialog\" {...props} />;\n}\n\n/* -----------------------------------------------------------------------------\n * Component: DialogTrigger\n * -------------------------------------------------------------------------- */\n\nfunction DialogTrigger({ ...props }: ComponentProps<typeof DialogPrimitive.Trigger>): JSX.Element {\n return <DialogPrimitive.Trigger data-slot=\"dialog-trigger\" {...props} />;\n}\n\n/* -----------------------------------------------------------------------------\n * Component: DialogContent\n * -------------------------------------------------------------------------- */\n\nfunction DialogContent({\n children,\n className,\n classNames,\n ...props\n}: ComponentProps<typeof DialogPrimitive.Content> & {\n classNames?: {\n close?: string;\n content?: string;\n overlay?: string;\n wrapper?: string;\n };\n}): JSX.Element {\n return (\n <DialogPrimitive.Portal>\n <DialogPrimitive.Overlay\n className={cn(\n \"bg-popover-overlay data-[state=open]:animate-fade-in data-[state=closed]:animate-fade-out fixed inset-0 z-50\",\n classNames?.overlay,\n )}\n data-slot=\"dialog-overlay\"\n />\n <DialogPrimitive.Content\n className={cn(\n \"data-[state=open]:animate-in max-sm:data-[state=open]:animation-duration-500 max-sm:data-[state=open]:slide-in-from-bottom sm:data-[state=open]:fade-in-0 sm:data-[state=open]:zoom-in-95 data-[state=closed]:animate-out max-sm:data-[state=closed]:animation-duration-500 max-sm:data-[state=closed]:slide-out-to-bottom sm:data-[state=closed]:fade-out-0 sm:data-[state=closed]:zoom-out-95 fixed inset-0 z-50 grid grid-rows-[1fr_auto] justify-items-center overflow-auto sm:grid-rows-[1fr_auto_3fr] sm:p-4\",\n classNames?.wrapper,\n )}\n data-slot=\"dialog-content-wrapper\"\n {...props}\n >\n <div\n className={cn(\n \"bg-popover text-popover-foreground relative row-start-2 flex w-full flex-col rounded-t-2xl border shadow-lg sm:max-w-lg sm:rounded-2xl\",\n classNames?.content,\n className,\n )}\n data-slot=\"dialog-content\"\n >\n {children}\n <DialogPrimitive.Close\n className={buttonVariants({\n className: [\"absolute right-2.5 top-2.5 size-7\", classNames?.close],\n size: \"icon\",\n variant: \"ghost\",\n })}\n data-slot=\"dialog-close\"\n >\n <XIcon className=\"size-4\" />\n <span className=\"sr-only\">Close</span>\n </DialogPrimitive.Close>\n </div>\n </DialogPrimitive.Content>\n </DialogPrimitive.Portal>\n );\n}\n\n/* -----------------------------------------------------------------------------\n * Component: DialogHeader\n * -------------------------------------------------------------------------- */\n\nfunction DialogHeader({ className, ...props }: ComponentProps<\"div\">): JSX.Element {\n return (\n <header\n className={cn(\"flex shrink-0 flex-col gap-1.5 px-6 pb-2 pt-6 text-center sm:text-left\", className)}\n data-slot=\"dialog-header\"\n {...props}\n />\n );\n}\n\n/* -----------------------------------------------------------------------------\n * Component: DialogBody\n * -------------------------------------------------------------------------- */\n\nfunction DialogBody({ className, ...props }: ComponentProps<\"div\">): JSX.Element {\n return <main className={cn(\"overflow-auto px-6 py-2\", className)} data-slot=\"dialog-body\" {...props} />;\n}\n\n/* -----------------------------------------------------------------------------\n * Component: DialogFooter\n * -------------------------------------------------------------------------- */\n\nfunction DialogFooter({ className, ...props }: ComponentProps<\"div\">): JSX.Element {\n return (\n <footer\n className={cn(\"flex shrink-0 flex-col-reverse gap-2 px-6 pb-6 pt-2 sm:flex-row sm:justify-end\", className)}\n data-slot=\"dialog-footer\"\n {...props}\n />\n );\n}\n\n/* -----------------------------------------------------------------------------\n * Component: DialogTitle\n * -------------------------------------------------------------------------- */\n\nfunction DialogTitle({ className, ...props }: ComponentProps<typeof DialogPrimitive.Title>): JSX.Element {\n return (\n <DialogPrimitive.Title\n className={cn(\"text-lg font-semibold leading-none tracking-tight\", className)}\n data-slot=\"dialog-title\"\n {...props}\n />\n );\n}\n\n/* -----------------------------------------------------------------------------\n * Component: DialogDescription\n * -------------------------------------------------------------------------- */\n\nfunction DialogDescription({ className, ...props }: ComponentProps<typeof DialogPrimitive.Description>): JSX.Element {\n return (\n <DialogPrimitive.Description\n className={cn(\"text-muted-foreground text-sm\", className)}\n data-slot=\"dialog-description\"\n {...props}\n />\n );\n}\n\n/* -----------------------------------------------------------------------------\n * Component: DialogClose\n * -------------------------------------------------------------------------- */\n\nfunction DialogClose({\n className,\n size,\n variant = \"outline\",\n ...props\n}: Omit<ComponentProps<typeof DialogPrimitive.Close>, \"ref\"> & {\n size?: VariantProps<typeof buttonVariants>[\"size\"];\n variant?: VariantProps<typeof buttonVariants>[\"variant\"];\n}): JSX.Element {\n return (\n <DialogPrimitive.Close\n className={buttonVariants({ className, size, variant })}\n data-slot=\"dialog-close\"\n {...props}\n />\n );\n}\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport {\n Dialog,\n DialogBody,\n DialogClose,\n DialogContent,\n DialogDescription,\n DialogFooter,\n DialogHeader,\n DialogTitle,\n DialogTrigger,\n};\n"],"names":["Dialog","props","DialogPrimitive","DialogTrigger","DialogContent","children","className","classNames","cn","buttonVariants","XIcon","DialogHeader","DialogBody","DialogFooter","DialogTitle","DialogDescription","DialogClose","size","variant"],"mappings":";8zCAgBA,SAASA,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CAMA,SAASY,aAAa,CAAEP,UAAAA,CAAS,CAAE,GAAGL,EAA8B,EAClE,MACE,oCAAC,UACC,UAAWO,GAAAA,0BAAAA,EAAAA,EAAG,iFAAkFF,GAChG,YAAU,gBACT,GAAGL,CAAK,EAGf,CAMA,SAASa,YAAY,CAAER,UAAAA,CAAS,CAAE,GAAGL,EAAqD,EACxF,MACE,oCAACC,6BAAAA,KAAqB,EACpB,UAAWM,GAAAA,0BAAAA,EAAAA,EAAG,oDAAqDF,GACnE,YAAU,eACT,GAAGL,CAAK,EAGf,CAMA,SAASc,kBAAkB,CAAET,UAAAA,CAAS,CAAE,GAAGL,EAA2D,EACpG,MACE,oCAACC,6BAAAA,WAA2B,EAC1B,UAAWM,GAAAA,0BAAAA,EAAAA,EAAG,gCAAiCF,GAC/C,YAAU,qBACT,GAAGL,CAAK,EAGf,CAMA,SAASe,YAAY,CACnBV,UAAAA,CAAS,CACTW,KAAAA,CAAI,CACJC,QAAAA,EAAU,SAAS,CACnB,GAAGjB,EAIJ,EACC,MACE,oCAACC,6BAAAA,KAAqB,EACpB,UAAWO,GAAAA,0BAAAA,cAAAA,EAAe,CAAEH,UAAAA,EAAWW,KAAAA,EAAMC,QAAAA,CAAQ,GACrD,YAAU,eACT,GAAGjB,CAAK,EAGf,C"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
"use strict";let __rslib_import_meta_url__="undefined"==typeof document?new(require("url".replace("",""))).URL("file:"+__filename).href:document.currentScript&&document.currentScript.src||new URL("main.js",document.baseURI).href;var __webpack_require__={};__webpack_require__.d=(e,r)=>{for(var a in r)__webpack_require__.o(r,a)&&!__webpack_require__.o(e,a)&&Object.defineProperty(e,a,{enumerable:!0,get:r[a]})},__webpack_require__.o=(e,r)=>Object.prototype.hasOwnProperty.call(e,r),__webpack_require__.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var __webpack_exports__={};__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{DrawerFooter:()=>DrawerFooter,DrawerBody:()=>DrawerBody,DrawerContent:()=>DrawerContent,Drawer:()=>Drawer,DrawerClose:()=>DrawerClose,DrawerTrigger:()=>DrawerTrigger,DrawerHeader:()=>DrawerHeader,DrawerTitle:()=>DrawerTitle,DrawerDescription:()=>DrawerDescription});let jsx_runtime_namespaceObject=require("react/jsx-runtime"),external_vaul_namespaceObject=require("vaul"),
|
|
2
|
+
"use strict";let __rslib_import_meta_url__="undefined"==typeof document?new(require("url".replace("",""))).URL("file:"+__filename).href:document.currentScript&&document.currentScript.src||new URL("main.js",document.baseURI).href;var __webpack_require__={};__webpack_require__.d=(e,r)=>{for(var a in r)__webpack_require__.o(r,a)&&!__webpack_require__.o(e,a)&&Object.defineProperty(e,a,{enumerable:!0,get:r[a]})},__webpack_require__.o=(e,r)=>Object.prototype.hasOwnProperty.call(e,r),__webpack_require__.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var __webpack_exports__={};__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{DrawerFooter:()=>DrawerFooter,DrawerBody:()=>DrawerBody,DrawerContent:()=>DrawerContent,Drawer:()=>Drawer,DrawerClose:()=>DrawerClose,DrawerTrigger:()=>DrawerTrigger,DrawerHeader:()=>DrawerHeader,DrawerTitle:()=>DrawerTitle,DrawerDescription:()=>DrawerDescription});let jsx_runtime_namespaceObject=require("react/jsx-runtime"),external_vaul_namespaceObject=require("vaul"),index_cjs_namespaceObject=require("./button/index.cjs"),utils_cjs_namespaceObject=require("../lib/utils.cjs");function Drawer({shouldScaleBackground:e=!0,...r}){return(0,jsx_runtime_namespaceObject.jsx)(external_vaul_namespaceObject.Drawer.Root,{"data-slot":"drawer",shouldScaleBackground:e,...r})}function DrawerTrigger({...e}){return(0,jsx_runtime_namespaceObject.jsx)(external_vaul_namespaceObject.Drawer.Trigger,{"data-slot":"drawer-trigger",...e})}function DrawerContent({children:e,className:r,classNames:a,...t}){return(0,jsx_runtime_namespaceObject.jsxs)(external_vaul_namespaceObject.Drawer.Portal,{children:[(0,jsx_runtime_namespaceObject.jsx)(external_vaul_namespaceObject.Drawer.Overlay,{className:(0,utils_cjs_namespaceObject.cn)("bg-popover-overlay fixed inset-0 z-50",a?.overlay),"data-slot":"drawer-overlay"}),(0,jsx_runtime_namespaceObject.jsxs)(external_vaul_namespaceObject.Drawer.Content,{className:(0,utils_cjs_namespaceObject.cn)("group/drawer-content bg-background fixed z-50 flex h-auto flex-col data-[vaul-drawer-direction=bottom]:inset-x-0 data-[vaul-drawer-direction=left]:inset-y-0 data-[vaul-drawer-direction=right]:inset-y-0 data-[vaul-drawer-direction=top]:inset-x-0 data-[vaul-drawer-direction=bottom]:bottom-0 data-[vaul-drawer-direction=left]:left-0 data-[vaul-drawer-direction=right]:right-0 data-[vaul-drawer-direction=top]:top-0 data-[vaul-drawer-direction=bottom]:mt-24 data-[vaul-drawer-direction=top]:mb-24 data-[vaul-drawer-direction=bottom]:max-h-[80vh] data-[vaul-drawer-direction=top]:max-h-[80vh] data-[vaul-drawer-direction=left]:w-3/4 data-[vaul-drawer-direction=right]:w-3/4 data-[vaul-drawer-direction=bottom]:rounded-t-2xl data-[vaul-drawer-direction=top]:rounded-b-2xl data-[vaul-drawer-direction=left]:sm:max-w-sm data-[vaul-drawer-direction=right]:sm:max-w-sm",a?.content,r),"data-slot":"drawer-content",...t,children:[(0,jsx_runtime_namespaceObject.jsx)("div",{className:(0,utils_cjs_namespaceObject.cn)("bg-muted mx-auto mt-4 hidden h-1.5 w-12 shrink-0 rounded-full group-data-[vaul-drawer-direction=bottom]/drawer-content:block",a?.handle)}),e]})]})}function DrawerHeader({className:e,...r}){return(0,jsx_runtime_namespaceObject.jsx)("div",{className:(0,utils_cjs_namespaceObject.cn)("flex flex-col gap-1.5 p-4",e),"data-slot":"drawer-header",...r})}function DrawerBody({className:e,...r}){return(0,jsx_runtime_namespaceObject.jsx)("main",{className:(0,utils_cjs_namespaceObject.cn)("overflow-auto px-4 py-2",e),"data-slot":"drawer-body",...r})}function DrawerFooter({className:e,...r}){return(0,jsx_runtime_namespaceObject.jsx)("div",{className:(0,utils_cjs_namespaceObject.cn)("mt-auto flex flex-col gap-2 p-4",e),"data-slot":"drawer-footer",...r})}function DrawerTitle({className:e,...r}){return(0,jsx_runtime_namespaceObject.jsx)(external_vaul_namespaceObject.Drawer.Title,{className:(0,utils_cjs_namespaceObject.cn)("text-foreground font-semibold",e),"data-slot":"drawer-title",...r})}function DrawerDescription({className:e,...r}){return(0,jsx_runtime_namespaceObject.jsx)(external_vaul_namespaceObject.Drawer.Description,{className:(0,utils_cjs_namespaceObject.cn)("text-muted-foreground text-sm",e),"data-slot":"drawer-description",...r})}function DrawerClose({className:e,size:r,variant:a="outline",...t}){return(0,jsx_runtime_namespaceObject.jsx)(external_vaul_namespaceObject.Drawer.Close,{className:(0,index_cjs_namespaceObject.buttonVariants)({className:e,size:r,variant:a}),"data-slot":"drawer-close",...t})}for(var __webpack_i__ in exports.Drawer=__webpack_exports__.Drawer,exports.DrawerBody=__webpack_exports__.DrawerBody,exports.DrawerClose=__webpack_exports__.DrawerClose,exports.DrawerContent=__webpack_exports__.DrawerContent,exports.DrawerDescription=__webpack_exports__.DrawerDescription,exports.DrawerFooter=__webpack_exports__.DrawerFooter,exports.DrawerHeader=__webpack_exports__.DrawerHeader,exports.DrawerTitle=__webpack_exports__.DrawerTitle,exports.DrawerTrigger=__webpack_exports__.DrawerTrigger,__webpack_exports__)-1===["Drawer","DrawerBody","DrawerClose","DrawerContent","DrawerDescription","DrawerFooter","DrawerHeader","DrawerTitle","DrawerTrigger"].indexOf(__webpack_i__)&&(exports[__webpack_i__]=__webpack_exports__[__webpack_i__]);Object.defineProperty(exports,"__esModule",{value:!0});
|
|
3
3
|
//# sourceMappingURL=drawer.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"components/drawer.cjs","sources":["webpack://@codefast/ui/./src/components/drawer.tsx"],"sourcesContent":["\n\nimport type { ComponentProps, JSX } from \"react\";\n\nimport { Drawer as DrawerPrimitive } from \"vaul\";\n\nimport type { VariantProps } from \"@/lib/utils\";\n\nimport { buttonVariants } from \"@/components/button\";\nimport { cn } from \"@/lib/utils\";\n\n/* -----------------------------------------------------------------------------\n * Component: Drawer\n * -------------------------------------------------------------------------- */\n\nfunction Drawer({ shouldScaleBackground = true, ...props }: ComponentProps<typeof DrawerPrimitive.Root>): JSX.Element {\n return <DrawerPrimitive.Root data-slot=\"drawer\" shouldScaleBackground={shouldScaleBackground} {...props} />;\n}\n\n/* -----------------------------------------------------------------------------\n * Component: DrawerTrigger\n * -------------------------------------------------------------------------- */\n\nfunction DrawerTrigger({ ...props }: ComponentProps<typeof DrawerPrimitive.Trigger>): JSX.Element {\n return <DrawerPrimitive.Trigger data-slot=\"drawer-trigger\" {...props} />;\n}\n\n/* -----------------------------------------------------------------------------\n * Component: DrawerContent\n * -------------------------------------------------------------------------- */\n\nfunction DrawerContent({\n children,\n className,\n classNames,\n ...props\n}: ComponentProps<typeof DrawerPrimitive.Content> & {\n classNames?: {\n content?: string;\n handle?: string;\n overlay?: string;\n };\n}): JSX.Element {\n return (\n <DrawerPrimitive.Portal>\n <DrawerPrimitive.Overlay\n className={cn(\"bg-popover-overlay fixed inset-0 z-50\", classNames?.overlay)}\n data-slot=\"drawer-overlay\"\n />\n <DrawerPrimitive.Content\n className={cn(\n \"group/drawer-content bg-background fixed z-50 flex h-auto flex-col data-[vaul-drawer-direction=bottom]:inset-x-0 data-[vaul-drawer-direction=left]:inset-y-0 data-[vaul-drawer-direction=right]:inset-y-0 data-[vaul-drawer-direction=top]:inset-x-0 data-[vaul-drawer-direction=bottom]:bottom-0 data-[vaul-drawer-direction=left]:left-0 data-[vaul-drawer-direction=right]:right-0 data-[vaul-drawer-direction=top]:top-0 data-[vaul-drawer-direction=bottom]:mt-24 data-[vaul-drawer-direction=top]:mb-24 data-[vaul-drawer-direction=bottom]:max-h-[80vh] data-[vaul-drawer-direction=top]:max-h-[80vh] data-[vaul-drawer-direction=left]:w-3/4 data-[vaul-drawer-direction=right]:w-3/4 data-[vaul-drawer-direction=bottom]:rounded-t-2xl data-[vaul-drawer-direction=top]:rounded-b-2xl data-[vaul-drawer-direction=left]:sm:max-w-sm data-[vaul-drawer-direction=right]:sm:max-w-sm\",\n classNames?.content,\n className,\n )}\n data-slot=\"drawer-content\"\n {...props}\n >\n <div\n className={cn(\n \"bg-muted mx-auto mt-4 hidden h-1.5 w-12 shrink-0 rounded-full group-data-[vaul-drawer-direction=bottom]/drawer-content:block\",\n classNames?.handle,\n )}\n />\n {children}\n </DrawerPrimitive.Content>\n </DrawerPrimitive.Portal>\n );\n}\n\n/* -----------------------------------------------------------------------------\n * Component: DrawerHeader\n * -------------------------------------------------------------------------- */\n\nfunction DrawerHeader({ className, ...props }: ComponentProps<\"div\">): JSX.Element {\n return <div className={cn(\"flex flex-col gap-1.5 p-4\", className)} data-slot=\"drawer-header\" {...props} />;\n}\n\n/* -----------------------------------------------------------------------------\n * Component: DrawerBody\n * -------------------------------------------------------------------------- */\n\nfunction DrawerBody({ className, ...props }: ComponentProps<\"div\">): JSX.Element {\n return <main className={cn(\"overflow-auto px-4 py-2\", className)} data-slot=\"drawer-body\" {...props} />;\n}\n\n/* -----------------------------------------------------------------------------\n * Component: DrawerFooter\n * -------------------------------------------------------------------------- */\n\nfunction DrawerFooter({ className, ...props }: ComponentProps<\"div\">): JSX.Element {\n return <div className={cn(\"mt-auto flex flex-col gap-2 p-4\", className)} data-slot=\"drawer-footer\" {...props} />;\n}\n\n/* -----------------------------------------------------------------------------\n * Component: DrawerTitle\n * -------------------------------------------------------------------------- */\n\nfunction DrawerTitle({ className, ...props }: ComponentProps<typeof DrawerPrimitive.Title>): JSX.Element {\n return (\n <DrawerPrimitive.Title\n className={cn(\"text-foreground font-semibold\", className)}\n data-slot=\"drawer-title\"\n {...props}\n />\n );\n}\n\n/* -----------------------------------------------------------------------------\n * Component: DrawerDescription\n * -------------------------------------------------------------------------- */\n\nfunction DrawerDescription({ className, ...props }: ComponentProps<typeof DrawerPrimitive.Description>): JSX.Element {\n return (\n <DrawerPrimitive.Description\n className={cn(\"text-muted-foreground text-sm\", className)}\n data-slot=\"drawer-description\"\n {...props}\n />\n );\n}\n\n/* -----------------------------------------------------------------------------\n * Component: DrawerClose\n * -------------------------------------------------------------------------- */\n\nfunction DrawerClose({\n className,\n size,\n variant = \"outline\",\n ...props\n}: ComponentProps<typeof DrawerPrimitive.Close> & {\n size?: VariantProps<typeof buttonVariants>[\"size\"];\n variant?: VariantProps<typeof buttonVariants>[\"variant\"];\n}): JSX.Element {\n return (\n <DrawerPrimitive.Close\n className={buttonVariants({ className, size, variant })}\n data-slot=\"drawer-close\"\n {...props}\n />\n );\n}\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport {\n Drawer,\n DrawerBody,\n DrawerClose,\n DrawerContent,\n DrawerDescription,\n DrawerFooter,\n DrawerHeader,\n DrawerTitle,\n DrawerTrigger,\n};\n"],"names":["Drawer","shouldScaleBackground","props","DrawerPrimitive","DrawerTrigger","DrawerContent","children","className","classNames","cn","DrawerHeader","DrawerBody","DrawerFooter","DrawerTitle","DrawerDescription","DrawerClose","size","variant","buttonVariants"],"mappings":"
|
|
1
|
+
{"version":3,"file":"components/drawer.cjs","sources":["webpack://@codefast/ui/./src/components/drawer.tsx"],"sourcesContent":["\n\nimport type { ComponentProps, JSX } from \"react\";\n\nimport { Drawer as DrawerPrimitive } from \"vaul\";\n\nimport type { VariantProps } from \"@/lib/utils\";\n\nimport { buttonVariants } from \"@/components/button\";\nimport { cn } from \"@/lib/utils\";\n\n/* -----------------------------------------------------------------------------\n * Component: Drawer\n * -------------------------------------------------------------------------- */\n\nfunction Drawer({ shouldScaleBackground = true, ...props }: ComponentProps<typeof DrawerPrimitive.Root>): JSX.Element {\n return <DrawerPrimitive.Root data-slot=\"drawer\" shouldScaleBackground={shouldScaleBackground} {...props} />;\n}\n\n/* -----------------------------------------------------------------------------\n * Component: DrawerTrigger\n * -------------------------------------------------------------------------- */\n\nfunction DrawerTrigger({ ...props }: ComponentProps<typeof DrawerPrimitive.Trigger>): JSX.Element {\n return <DrawerPrimitive.Trigger data-slot=\"drawer-trigger\" {...props} />;\n}\n\n/* -----------------------------------------------------------------------------\n * Component: DrawerContent\n * -------------------------------------------------------------------------- */\n\nfunction DrawerContent({\n children,\n className,\n classNames,\n ...props\n}: ComponentProps<typeof DrawerPrimitive.Content> & {\n classNames?: {\n content?: string;\n handle?: string;\n overlay?: string;\n };\n}): JSX.Element {\n return (\n <DrawerPrimitive.Portal>\n <DrawerPrimitive.Overlay\n className={cn(\"bg-popover-overlay fixed inset-0 z-50\", classNames?.overlay)}\n data-slot=\"drawer-overlay\"\n />\n <DrawerPrimitive.Content\n className={cn(\n \"group/drawer-content bg-background fixed z-50 flex h-auto flex-col data-[vaul-drawer-direction=bottom]:inset-x-0 data-[vaul-drawer-direction=left]:inset-y-0 data-[vaul-drawer-direction=right]:inset-y-0 data-[vaul-drawer-direction=top]:inset-x-0 data-[vaul-drawer-direction=bottom]:bottom-0 data-[vaul-drawer-direction=left]:left-0 data-[vaul-drawer-direction=right]:right-0 data-[vaul-drawer-direction=top]:top-0 data-[vaul-drawer-direction=bottom]:mt-24 data-[vaul-drawer-direction=top]:mb-24 data-[vaul-drawer-direction=bottom]:max-h-[80vh] data-[vaul-drawer-direction=top]:max-h-[80vh] data-[vaul-drawer-direction=left]:w-3/4 data-[vaul-drawer-direction=right]:w-3/4 data-[vaul-drawer-direction=bottom]:rounded-t-2xl data-[vaul-drawer-direction=top]:rounded-b-2xl data-[vaul-drawer-direction=left]:sm:max-w-sm data-[vaul-drawer-direction=right]:sm:max-w-sm\",\n classNames?.content,\n className,\n )}\n data-slot=\"drawer-content\"\n {...props}\n >\n <div\n className={cn(\n \"bg-muted mx-auto mt-4 hidden h-1.5 w-12 shrink-0 rounded-full group-data-[vaul-drawer-direction=bottom]/drawer-content:block\",\n classNames?.handle,\n )}\n />\n {children}\n </DrawerPrimitive.Content>\n </DrawerPrimitive.Portal>\n );\n}\n\n/* -----------------------------------------------------------------------------\n * Component: DrawerHeader\n * -------------------------------------------------------------------------- */\n\nfunction DrawerHeader({ className, ...props }: ComponentProps<\"div\">): JSX.Element {\n return <div className={cn(\"flex flex-col gap-1.5 p-4\", className)} data-slot=\"drawer-header\" {...props} />;\n}\n\n/* -----------------------------------------------------------------------------\n * Component: DrawerBody\n * -------------------------------------------------------------------------- */\n\nfunction DrawerBody({ className, ...props }: ComponentProps<\"div\">): JSX.Element {\n return <main className={cn(\"overflow-auto px-4 py-2\", className)} data-slot=\"drawer-body\" {...props} />;\n}\n\n/* -----------------------------------------------------------------------------\n * Component: DrawerFooter\n * -------------------------------------------------------------------------- */\n\nfunction DrawerFooter({ className, ...props }: ComponentProps<\"div\">): JSX.Element {\n return <div className={cn(\"mt-auto flex flex-col gap-2 p-4\", className)} data-slot=\"drawer-footer\" {...props} />;\n}\n\n/* -----------------------------------------------------------------------------\n * Component: DrawerTitle\n * -------------------------------------------------------------------------- */\n\nfunction DrawerTitle({ className, ...props }: ComponentProps<typeof DrawerPrimitive.Title>): JSX.Element {\n return (\n <DrawerPrimitive.Title\n className={cn(\"text-foreground font-semibold\", className)}\n data-slot=\"drawer-title\"\n {...props}\n />\n );\n}\n\n/* -----------------------------------------------------------------------------\n * Component: DrawerDescription\n * -------------------------------------------------------------------------- */\n\nfunction DrawerDescription({ className, ...props }: ComponentProps<typeof DrawerPrimitive.Description>): JSX.Element {\n return (\n <DrawerPrimitive.Description\n className={cn(\"text-muted-foreground text-sm\", className)}\n data-slot=\"drawer-description\"\n {...props}\n />\n );\n}\n\n/* -----------------------------------------------------------------------------\n * Component: DrawerClose\n * -------------------------------------------------------------------------- */\n\nfunction DrawerClose({\n className,\n size,\n variant = \"outline\",\n ...props\n}: ComponentProps<typeof DrawerPrimitive.Close> & {\n size?: VariantProps<typeof buttonVariants>[\"size\"];\n variant?: VariantProps<typeof buttonVariants>[\"variant\"];\n}): JSX.Element {\n return (\n <DrawerPrimitive.Close\n className={buttonVariants({ className, size, variant })}\n data-slot=\"drawer-close\"\n {...props}\n />\n );\n}\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport {\n Drawer,\n DrawerBody,\n DrawerClose,\n DrawerContent,\n DrawerDescription,\n DrawerFooter,\n DrawerHeader,\n DrawerTitle,\n DrawerTrigger,\n};\n"],"names":["Drawer","shouldScaleBackground","props","DrawerPrimitive","DrawerTrigger","DrawerContent","children","className","classNames","cn","DrawerHeader","DrawerBody","DrawerFooter","DrawerTitle","DrawerDescription","DrawerClose","size","variant","buttonVariants"],"mappings":";+uCAeA,SAASA,OAAO,CAAEC,sBAAAA,EAAwB,EAAI,CAAE,GAAGC,EAAoD,EACrG,MAAO,oCAACC,8BAAAA,MAAAA,CAAAA,IAAoB,EAAC,YAAU,SAAS,sBAAuBF,EAAwB,GAAGC,CAAK,EACzG,CAMA,SAASE,cAAc,CAAE,GAAGF,EAAuD,EACjF,MAAO,oCAACC,8BAAAA,MAAAA,CAAAA,OAAuB,EAAC,YAAU,iBAAkB,GAAGD,CAAK,EACtE,CAMA,SAASG,cAAc,CACrBC,SAAAA,CAAQ,CACRC,UAAAA,CAAS,CACTC,WAAAA,CAAU,CACV,GAAGN,EAOJ,EACC,MACE,qCAACC,8BAAAA,MAAAA,CAAAA,MAAsB,E,UACrB,oCAACA,8BAAAA,MAAAA,CAAAA,OAAuB,EACtB,UAAWM,GAAAA,0BAAAA,EAAAA,EAAG,wCAAyCD,GAAY,SACnE,YAAU,gB,GAEZ,qCAACL,8BAAAA,MAAAA,CAAAA,OAAuB,EACtB,UAAWM,GAAAA,0BAAAA,EAAAA,EACT,81BACA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AEX,UAAAA,EAAWS,KAAAA,EAAMC,QAAAA,CAAQ,GACrD,YAAU,eACT,GAAGf,CAAK,EAGf,C"}
|
|
@@ -1,2 +1,3 @@
|
|
|
1
|
+
"use client";
|
|
1
2
|
"use strict";let __rslib_import_meta_url__="undefined"==typeof document?new(require("url".replace("",""))).URL("file:"+__filename).href:document.currentScript&&document.currentScript.src||new URL("main.js",document.baseURI).href;var __webpack_require__={};__webpack_require__.d=(e,t)=>{for(var o in t)__webpack_require__.o(t,o)&&!__webpack_require__.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},__webpack_require__.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),__webpack_require__.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var __webpack_exports__={};__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{DropdownMenuSubTrigger:()=>DropdownMenuSubTrigger,DropdownMenuGroup:()=>DropdownMenuGroup,DropdownMenuItem:()=>DropdownMenuItem,DropdownMenuShortcut:()=>DropdownMenuShortcut,DropdownMenuSubContent:()=>DropdownMenuSubContent,DropdownMenuRadioItem:()=>DropdownMenuRadioItem,DropdownMenuSeparator:()=>DropdownMenuSeparator,DropdownMenuArrow:()=>DropdownMenuArrow,DropdownMenuRadioGroup:()=>DropdownMenuRadioGroup,DropdownMenu:()=>DropdownMenu,DropdownMenuCheckboxItem:()=>DropdownMenuCheckboxItem,DropdownMenuContent:()=>DropdownMenuContent,DropdownMenuLabel:()=>DropdownMenuLabel,DropdownMenuTrigger:()=>DropdownMenuTrigger,DropdownMenuSub:()=>DropdownMenuSub});let jsx_runtime_namespaceObject=require("react/jsx-runtime"),react_dropdown_menu_namespaceObject=require("@radix-ui/react-dropdown-menu"),external_lucide_react_namespaceObject=require("lucide-react"),utils_cjs_namespaceObject=require("../lib/utils.cjs");function DropdownMenu({...e}){return(0,jsx_runtime_namespaceObject.jsx)(react_dropdown_menu_namespaceObject.Root,{"data-slot":"dropdown-menu",...e})}function DropdownMenuTrigger({...e}){return(0,jsx_runtime_namespaceObject.jsx)(react_dropdown_menu_namespaceObject.Trigger,{"data-slot":"dropdown-menu-trigger",...e})}function DropdownMenuGroup({...e}){return(0,jsx_runtime_namespaceObject.jsx)(react_dropdown_menu_namespaceObject.Group,{"data-slot":"dropdown-menu-group",...e})}function DropdownMenuSub({...e}){return(0,jsx_runtime_namespaceObject.jsx)(react_dropdown_menu_namespaceObject.Sub,{"data-slot":"dropdown-menu-sub",...e})}function DropdownMenuRadioGroup({...e}){return(0,jsx_runtime_namespaceObject.jsx)(react_dropdown_menu_namespaceObject.RadioGroup,{"data-slot":"dropdown-menu-radio-group",...e})}function DropdownMenuSubTrigger({children:e,className:t,inset:o,...n}){return(0,jsx_runtime_namespaceObject.jsxs)(react_dropdown_menu_namespaceObject.SubTrigger,{className:(0,utils_cjs_namespaceObject.cn)("focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground data-inset:pl-8 outline-hidden flex cursor-default select-none items-center gap-x-2 rounded-sm px-2 py-1.5 text-sm",t),"data-inset":o,"data-slot":"dropdown-menu-sub-trigger",...n,children:[e,(0,jsx_runtime_namespaceObject.jsx)(external_lucide_react_namespaceObject.ChevronRightIcon,{className:"ml-auto size-4"})]})}function DropdownMenuSubContent({className:e,...t}){return(0,jsx_runtime_namespaceObject.jsx)(react_dropdown_menu_namespaceObject.Portal,{children:(0,jsx_runtime_namespaceObject.jsx)(react_dropdown_menu_namespaceObject.SubContent,{className:(0,utils_cjs_namespaceObject.cn)("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 data-[state=open]:data-[side=top]:slide-in-from-bottom-2 data-[state=open]:data-[side=right]:slide-in-from-left-2 data-[state=open]:data-[side=bottom]:slide-in-from-top-2 data-[state=open]:data-[side=left]:slide-in-from-right-2 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=closed]:data-[side=top]:slide-out-to-bottom-2 data-[state=closed]:data-[side=right]:slide-out-to-left-2 data-[state=closed]:data-[side=bottom]:slide-out-to-top-2 data-[state=closed]:data-[side=left]:slide-out-to-right-2 z-50 min-w-32 rounded-lg border p-1 shadow-lg",e),"data-slot":"dropdown-menu-sub-content",...t})})}function DropdownMenuContent({className:e,sideOffset:t=4,...o}){return(0,jsx_runtime_namespaceObject.jsx)(react_dropdown_menu_namespaceObject.Portal,{children:(0,jsx_runtime_namespaceObject.jsx)(react_dropdown_menu_namespaceObject.Content,{className:(0,utils_cjs_namespaceObject.cn)("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 data-[state=open]:data-[side=top]:slide-in-from-bottom-2 data-[state=open]:data-[side=right]:slide-in-from-left-2 data-[state=open]:data-[side=bottom]:slide-in-from-top-2 data-[state=open]:data-[side=left]:slide-in-from-right-2 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=closed]:data-[side=top]:slide-out-to-bottom-2 data-[state=closed]:data-[side=right]:slide-out-to-left-2 data-[state=closed]:data-[side=bottom]:slide-out-to-top-2 data-[state=closed]:data-[side=left]:slide-out-to-right-2 z-50 min-w-32 rounded-lg border p-1 shadow-lg",e),"data-slot":"dropdown-menu-content",sideOffset:t,...o})})}function DropdownMenuItem({className:e,inset:t,variant:o,...n}){return(0,jsx_runtime_namespaceObject.jsx)(react_dropdown_menu_namespaceObject.Item,{className:(0,utils_cjs_namespaceObject.cn)("focus:bg-accent focus:text-accent-foreground data-inset:pl-8 outline-hidden group/dropdown-menu-item data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:[&_svg:not([class*='text-'])]:text-destructive/80 [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default select-none items-center gap-x-2 rounded-sm px-2 py-1.5 text-sm aria-disabled:opacity-50 [&_svg:not([class*='size-'])]:size-4 [&_svg]:shrink-0",e),"data-inset":t,"data-slot":"dropdown-menu-item","data-variant":o,...n})}function DropdownMenuCheckboxItem({checked:e,children:t,className:o,...n}){return(0,jsx_runtime_namespaceObject.jsxs)(react_dropdown_menu_namespaceObject.CheckboxItem,{checked:e,className:(0,utils_cjs_namespaceObject.cn)("focus:bg-accent focus:text-accent-foreground outline-hidden group/dropdown-menu-item relative flex cursor-default select-none items-center gap-x-2 rounded-sm py-1.5 pl-8 pr-2 text-sm aria-disabled:opacity-50 [&_svg:not([class*='size-'])]:size-4 [&_svg]:shrink-0",o),"data-slot":"dropdown-menu-checkbox-item",...n,children:[(0,jsx_runtime_namespaceObject.jsx)("span",{className:"absolute left-2 flex items-center justify-center",children:(0,jsx_runtime_namespaceObject.jsx)(react_dropdown_menu_namespaceObject.ItemIndicator,{children:(0,jsx_runtime_namespaceObject.jsx)(external_lucide_react_namespaceObject.CheckIcon,{className:"size-4"})})}),t]})}function DropdownMenuRadioItem({children:e,className:t,...o}){return(0,jsx_runtime_namespaceObject.jsxs)(react_dropdown_menu_namespaceObject.RadioItem,{className:(0,utils_cjs_namespaceObject.cn)("focus:bg-accent focus:text-accent-foreground outline-hidden group/dropdown-menu-item relative flex cursor-default select-none items-center gap-x-2 rounded-sm py-1.5 pl-8 pr-2 text-sm aria-disabled:opacity-50 [&_svg:not([class*='size-'])]:size-4 [&_svg]:shrink-0",t),"data-slot":"dropdown-menu-radio-item",...o,children:[(0,jsx_runtime_namespaceObject.jsx)("span",{className:"absolute left-2 flex items-center justify-center",children:(0,jsx_runtime_namespaceObject.jsx)(react_dropdown_menu_namespaceObject.ItemIndicator,{children:(0,jsx_runtime_namespaceObject.jsx)(external_lucide_react_namespaceObject.DotIcon,{className:"size-4 fill-current"})})}),e]})}function DropdownMenuLabel({className:e,inset:t,...o}){return(0,jsx_runtime_namespaceObject.jsx)(react_dropdown_menu_namespaceObject.Label,{className:(0,utils_cjs_namespaceObject.cn)("data-inset:pl-8 flex items-center gap-x-2 px-2 py-1.5 text-sm font-semibold",e),"data-inset":t,"data-slot":"dropdown-menu-label",...o})}function DropdownMenuSeparator({className:e,...t}){return(0,jsx_runtime_namespaceObject.jsx)(react_dropdown_menu_namespaceObject.Separator,{className:(0,utils_cjs_namespaceObject.cn)("bg-border mx-2 my-1 h-px",e),"data-slot":"dropdown-menu-separator",...t})}function DropdownMenuShortcut({className:e,...t}){return(0,jsx_runtime_namespaceObject.jsx)("span",{className:(0,utils_cjs_namespaceObject.cn)("text-muted-foreground group-data-[variant=destructive]/dropdown-menu-item:text-destructive/80 ml-auto text-xs tracking-widest",e),"data-slot":"dropdown-menu-shortcut",...t})}function DropdownMenuArrow({className:e,...t}){return(0,jsx_runtime_namespaceObject.jsx)(react_dropdown_menu_namespaceObject.Arrow,{className:(0,utils_cjs_namespaceObject.cn)("fill-popover",e),"data-slot":"dropdown-menu-arrow",...t})}for(var __webpack_i__ in exports.DropdownMenu=__webpack_exports__.DropdownMenu,exports.DropdownMenuArrow=__webpack_exports__.DropdownMenuArrow,exports.DropdownMenuCheckboxItem=__webpack_exports__.DropdownMenuCheckboxItem,exports.DropdownMenuContent=__webpack_exports__.DropdownMenuContent,exports.DropdownMenuGroup=__webpack_exports__.DropdownMenuGroup,exports.DropdownMenuItem=__webpack_exports__.DropdownMenuItem,exports.DropdownMenuLabel=__webpack_exports__.DropdownMenuLabel,exports.DropdownMenuRadioGroup=__webpack_exports__.DropdownMenuRadioGroup,exports.DropdownMenuRadioItem=__webpack_exports__.DropdownMenuRadioItem,exports.DropdownMenuSeparator=__webpack_exports__.DropdownMenuSeparator,exports.DropdownMenuShortcut=__webpack_exports__.DropdownMenuShortcut,exports.DropdownMenuSub=__webpack_exports__.DropdownMenuSub,exports.DropdownMenuSubContent=__webpack_exports__.DropdownMenuSubContent,exports.DropdownMenuSubTrigger=__webpack_exports__.DropdownMenuSubTrigger,exports.DropdownMenuTrigger=__webpack_exports__.DropdownMenuTrigger,__webpack_exports__)-1===["DropdownMenu","DropdownMenuArrow","DropdownMenuCheckboxItem","DropdownMenuContent","DropdownMenuGroup","DropdownMenuItem","DropdownMenuLabel","DropdownMenuRadioGroup","DropdownMenuRadioItem","DropdownMenuSeparator","DropdownMenuShortcut","DropdownMenuSub","DropdownMenuSubContent","DropdownMenuSubTrigger","DropdownMenuTrigger"].indexOf(__webpack_i__)&&(exports[__webpack_i__]=__webpack_exports__[__webpack_i__]);Object.defineProperty(exports,"__esModule",{value:!0});
|
|
2
3
|
//# sourceMappingURL=dropdown-menu.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"components/dropdown-menu.cjs","sources":["webpack://@codefast/ui/./src/components/dropdown-menu.tsx"],"sourcesContent":["import type { ComponentProps, JSX } from \"react\";\n\nimport * as DropdownMenuPrimitive from \"@radix-ui/react-dropdown-menu\";\nimport { CheckIcon, ChevronRightIcon, DotIcon } from \"lucide-react\";\n\nimport { cn } from \"@/lib/utils\";\n\n/* -----------------------------------------------------------------------------\n * Component: DropdownMenu\n * -------------------------------------------------------------------------- */\n\nfunction DropdownMenu({ ...props }: ComponentProps<typeof DropdownMenuPrimitive.Root>): JSX.Element {\n return <DropdownMenuPrimitive.Root data-slot=\"dropdown-menu\" {...props} />;\n}\n\n/* -----------------------------------------------------------------------------\n * Component: DropdownMenuTrigger\n * -------------------------------------------------------------------------- */\n\nfunction DropdownMenuTrigger({ ...props }: ComponentProps<typeof DropdownMenuPrimitive.Trigger>): JSX.Element {\n return <DropdownMenuPrimitive.Trigger data-slot=\"dropdown-menu-trigger\" {...props} />;\n}\n\n/* -----------------------------------------------------------------------------\n * Component: DropdownMenuGroup\n * -------------------------------------------------------------------------- */\n\nfunction DropdownMenuGroup({ ...props }: ComponentProps<typeof DropdownMenuPrimitive.Group>): JSX.Element {\n return <DropdownMenuPrimitive.Group data-slot=\"dropdown-menu-group\" {...props} />;\n}\n\n/* -----------------------------------------------------------------------------\n * Component: DropdownMenuSub\n * -------------------------------------------------------------------------- */\n\nfunction DropdownMenuSub({ ...props }: ComponentProps<typeof DropdownMenuPrimitive.Sub>): JSX.Element {\n return <DropdownMenuPrimitive.Sub data-slot=\"dropdown-menu-sub\" {...props} />;\n}\n\n/* -----------------------------------------------------------------------------\n * Component: DropdownMenuSubTrigger\n * -------------------------------------------------------------------------- */\n\nfunction DropdownMenuRadioGroup({ ...props }: ComponentProps<typeof DropdownMenuPrimitive.RadioGroup>): JSX.Element {\n return <DropdownMenuPrimitive.RadioGroup data-slot=\"dropdown-menu-radio-group\" {...props} />;\n}\n\n/* -----------------------------------------------------------------------------\n * Component: DropdownMenuSubTrigger\n * -------------------------------------------------------------------------- */\n\nfunction DropdownMenuSubTrigger({\n children,\n className,\n inset,\n ...props\n}: ComponentProps<typeof DropdownMenuPrimitive.SubTrigger> & {\n inset?: boolean;\n}): JSX.Element {\n return (\n <DropdownMenuPrimitive.SubTrigger\n className={cn(\n \"focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground data-inset:pl-8 outline-hidden flex cursor-default select-none items-center gap-x-2 rounded-sm px-2 py-1.5 text-sm\",\n className,\n )}\n data-inset={inset}\n data-slot=\"dropdown-menu-sub-trigger\"\n {...props}\n >\n {children}\n <ChevronRightIcon className=\"ml-auto size-4\" />\n </DropdownMenuPrimitive.SubTrigger>\n );\n}\n\n/* -----------------------------------------------------------------------------\n * Component: DropdownMenuSubContent\n * -------------------------------------------------------------------------- */\n\nfunction DropdownMenuSubContent({\n className,\n ...props\n}: ComponentProps<typeof DropdownMenuPrimitive.SubContent>): JSX.Element {\n return (\n <DropdownMenuPrimitive.Portal>\n <DropdownMenuPrimitive.SubContent\n className={cn(\n \"bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 data-[state=open]:data-[side=top]:slide-in-from-bottom-2 data-[state=open]:data-[side=right]:slide-in-from-left-2 data-[state=open]:data-[side=bottom]:slide-in-from-top-2 data-[state=open]:data-[side=left]:slide-in-from-right-2 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=closed]:data-[side=top]:slide-out-to-bottom-2 data-[state=closed]:data-[side=right]:slide-out-to-left-2 data-[state=closed]:data-[side=bottom]:slide-out-to-top-2 data-[state=closed]:data-[side=left]:slide-out-to-right-2 z-50 min-w-32 rounded-lg border p-1 shadow-lg\",\n className,\n )}\n data-slot=\"dropdown-menu-sub-content\"\n {...props}\n />\n </DropdownMenuPrimitive.Portal>\n );\n}\n\n/* -----------------------------------------------------------------------------\n * Component: DropdownMenuContent\n * -------------------------------------------------------------------------- */\n\nfunction DropdownMenuContent({\n className,\n sideOffset = 4,\n ...props\n}: ComponentProps<typeof DropdownMenuPrimitive.Content>): JSX.Element {\n return (\n <DropdownMenuPrimitive.Portal>\n <DropdownMenuPrimitive.Content\n className={cn(\n \"bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 data-[state=open]:data-[side=top]:slide-in-from-bottom-2 data-[state=open]:data-[side=right]:slide-in-from-left-2 data-[state=open]:data-[side=bottom]:slide-in-from-top-2 data-[state=open]:data-[side=left]:slide-in-from-right-2 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=closed]:data-[side=top]:slide-out-to-bottom-2 data-[state=closed]:data-[side=right]:slide-out-to-left-2 data-[state=closed]:data-[side=bottom]:slide-out-to-top-2 data-[state=closed]:data-[side=left]:slide-out-to-right-2 z-50 min-w-32 rounded-lg border p-1 shadow-lg\",\n className,\n )}\n data-slot=\"dropdown-menu-content\"\n sideOffset={sideOffset}\n {...props}\n />\n </DropdownMenuPrimitive.Portal>\n );\n}\n\n/* -----------------------------------------------------------------------------\n * Component: DropdownMenuItem\n * -------------------------------------------------------------------------- */\n\nfunction DropdownMenuItem({\n className,\n inset,\n variant,\n ...props\n}: ComponentProps<typeof DropdownMenuPrimitive.Item> & {\n inset?: boolean;\n variant?: \"default\" | \"destructive\";\n}): JSX.Element {\n return (\n <DropdownMenuPrimitive.Item\n className={cn(\n \"focus:bg-accent focus:text-accent-foreground data-inset:pl-8 outline-hidden group/dropdown-menu-item data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:[&_svg:not([class*='text-'])]:text-destructive/80 [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default select-none items-center gap-x-2 rounded-sm px-2 py-1.5 text-sm aria-disabled:opacity-50 [&_svg:not([class*='size-'])]:size-4 [&_svg]:shrink-0\",\n className,\n )}\n data-inset={inset}\n data-slot=\"dropdown-menu-item\"\n data-variant={variant}\n {...props}\n />\n );\n}\n\n/* -----------------------------------------------------------------------------\n * Component: DropdownMenuCheckboxItem\n * -------------------------------------------------------------------------- */\n\nfunction DropdownMenuCheckboxItem({\n checked,\n children,\n className,\n ...props\n}: ComponentProps<typeof DropdownMenuPrimitive.CheckboxItem>): JSX.Element {\n return (\n <DropdownMenuPrimitive.CheckboxItem\n checked={checked}\n className={cn(\n \"focus:bg-accent focus:text-accent-foreground outline-hidden group/dropdown-menu-item relative flex cursor-default select-none items-center gap-x-2 rounded-sm py-1.5 pl-8 pr-2 text-sm aria-disabled:opacity-50 [&_svg:not([class*='size-'])]:size-4 [&_svg]:shrink-0\",\n className,\n )}\n data-slot=\"dropdown-menu-checkbox-item\"\n {...props}\n >\n <span className=\"absolute left-2 flex items-center justify-center\">\n <DropdownMenuPrimitive.ItemIndicator>\n <CheckIcon className=\"size-4\" />\n </DropdownMenuPrimitive.ItemIndicator>\n </span>\n {children}\n </DropdownMenuPrimitive.CheckboxItem>\n );\n}\n\n/* -----------------------------------------------------------------------------\n * Component: DropdownMenuRadioItem\n * -------------------------------------------------------------------------- */\n\nfunction DropdownMenuRadioItem({\n children,\n className,\n ...props\n}: ComponentProps<typeof DropdownMenuPrimitive.RadioItem>): JSX.Element {\n return (\n <DropdownMenuPrimitive.RadioItem\n className={cn(\n \"focus:bg-accent focus:text-accent-foreground outline-hidden group/dropdown-menu-item relative flex cursor-default select-none items-center gap-x-2 rounded-sm py-1.5 pl-8 pr-2 text-sm aria-disabled:opacity-50 [&_svg:not([class*='size-'])]:size-4 [&_svg]:shrink-0\",\n className,\n )}\n data-slot=\"dropdown-menu-radio-item\"\n {...props}\n >\n <span className=\"absolute left-2 flex items-center justify-center\">\n <DropdownMenuPrimitive.ItemIndicator>\n <DotIcon className=\"size-4 fill-current\" />\n </DropdownMenuPrimitive.ItemIndicator>\n </span>\n {children}\n </DropdownMenuPrimitive.RadioItem>\n );\n}\n\n/* -----------------------------------------------------------------------------\n * Component: DropdownMenuLabel\n * -------------------------------------------------------------------------- */\n\nfunction DropdownMenuLabel({\n className,\n inset,\n ...props\n}: ComponentProps<typeof DropdownMenuPrimitive.Label> & {\n inset?: boolean;\n}): JSX.Element {\n return (\n <DropdownMenuPrimitive.Label\n className={cn(\"data-inset:pl-8 flex items-center gap-x-2 px-2 py-1.5 text-sm font-semibold\", className)}\n data-inset={inset}\n data-slot=\"dropdown-menu-label\"\n {...props}\n />\n );\n}\n\n/* -----------------------------------------------------------------------------\n * Component: DropdownMenuSeparator\n * -------------------------------------------------------------------------- */\n\nfunction DropdownMenuSeparator({\n className,\n ...props\n}: ComponentProps<typeof DropdownMenuPrimitive.Separator>): JSX.Element {\n return (\n <DropdownMenuPrimitive.Separator\n className={cn(\"bg-border mx-2 my-1 h-px\", className)}\n data-slot=\"dropdown-menu-separator\"\n {...props}\n />\n );\n}\n\n/* -----------------------------------------------------------------------------\n * Component: DropdownMenuShortcut\n * -------------------------------------------------------------------------- */\n\nfunction DropdownMenuShortcut({ className, ...props }: ComponentProps<\"span\">): JSX.Element {\n return (\n <span\n className={cn(\n \"text-muted-foreground group-data-[variant=destructive]/dropdown-menu-item:text-destructive/80 ml-auto text-xs tracking-widest\",\n className,\n )}\n data-slot=\"dropdown-menu-shortcut\"\n {...props}\n />\n );\n}\n\n/* -----------------------------------------------------------------------------\n * Component: DropdownMenuArrow\n * -------------------------------------------------------------------------- */\n\nfunction DropdownMenuArrow({ className, ...props }: ComponentProps<typeof DropdownMenuPrimitive.Arrow>): JSX.Element {\n return (\n <DropdownMenuPrimitive.Arrow className={cn(\"fill-popover\", className)} data-slot=\"dropdown-menu-arrow\" {...props} />\n );\n}\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport {\n DropdownMenu,\n DropdownMenuArrow,\n DropdownMenuCheckboxItem,\n DropdownMenuContent,\n DropdownMenuGroup,\n DropdownMenuItem,\n DropdownMenuLabel,\n DropdownMenuRadioGroup,\n DropdownMenuRadioItem,\n DropdownMenuSeparator,\n DropdownMenuShortcut,\n DropdownMenuSub,\n DropdownMenuSubContent,\n DropdownMenuSubTrigger,\n DropdownMenuTrigger,\n};\n"],"names":["DropdownMenu","props","DropdownMenuPrimitive","DropdownMenuTrigger","DropdownMenuGroup","DropdownMenuSub","DropdownMenuRadioGroup","DropdownMenuSubTrigger","children","className","inset","cn","ChevronRightIcon","DropdownMenuSubContent","DropdownMenuContent","sideOffset","DropdownMenuItem","variant","DropdownMenuCheckboxItem","checked","CheckIcon","DropdownMenuRadioItem","DotIcon","DropdownMenuLabel","DropdownMenuSeparator","DropdownMenuShortcut","DropdownMenuArrow"],"mappings":"8pDAWA,SAASA,aAAa,CAAE,GAAGC,EAA0D,EACnF,MAAO,oCAACC,oCAAAA,IAA0B,EAAC,YAAU,gBAAiB,GAAGD,CAAK,A,EACxE,CAMA,SAASE,oBAAoB,CAAE,GAAGF,EAA6D,EAC7F,MAAO,oCAACC,oCAAAA,OAA6B,EAAC,YAAU,wBAAyB,GAAGD,CAAK,A,EACnF,CAMA,SAASG,kBAAkB,CAAE,GAAGH,EAA2D,EACzF,MAAO,oCAACC,oCAAAA,KAA2B,EAAC,YAAU,sBAAuB,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AAGR,CAAK,A,EAGf,CAMA,SAASwB,qBAAqB,CAAEhB,UAAAA,CAAS,CAAE,GAAGR,EAA+B,EAC3E,MACE,oCAAC,QACC,UAAWU,AAAAA,GAAAA,0BAAAA,EAAAA,AAAAA,EACT,gIACAF,GAEF,YAAU,yBACT,GAAGR,CAAK,A,EAGf,CAMA,SAASyB,kBAAkB,CAAEjB,UAAAA,CAAS,CAAE,GAAGR,EAA2D,EACpG,MACE,oCAACC,oCAAAA,KAA2B,EAAC,UAAWS,AAAAA,GAAAA,0BAAAA,EAAAA,AAAAA,EAAG,eAAgBF,GAAY,YAAU,sBAAuB,GAAGR,CAAK,A,EAEpH,C"}
|
|
1
|
+
{"version":3,"file":"components/dropdown-menu.cjs","sources":["webpack://@codefast/ui/./src/components/dropdown-menu.tsx"],"sourcesContent":["\n\nimport type { ComponentProps, JSX } from \"react\";\n\nimport * as DropdownMenuPrimitive from \"@radix-ui/react-dropdown-menu\";\nimport { CheckIcon, ChevronRightIcon, DotIcon } from \"lucide-react\";\n\nimport { cn } from \"@/lib/utils\";\n\n/* -----------------------------------------------------------------------------\n * Component: DropdownMenu\n * -------------------------------------------------------------------------- */\n\nfunction DropdownMenu({ ...props }: ComponentProps<typeof DropdownMenuPrimitive.Root>): JSX.Element {\n return <DropdownMenuPrimitive.Root data-slot=\"dropdown-menu\" {...props} />;\n}\n\n/* -----------------------------------------------------------------------------\n * Component: DropdownMenuTrigger\n * -------------------------------------------------------------------------- */\n\nfunction DropdownMenuTrigger({ ...props }: ComponentProps<typeof DropdownMenuPrimitive.Trigger>): JSX.Element {\n return <DropdownMenuPrimitive.Trigger data-slot=\"dropdown-menu-trigger\" {...props} />;\n}\n\n/* -----------------------------------------------------------------------------\n * Component: DropdownMenuGroup\n * -------------------------------------------------------------------------- */\n\nfunction DropdownMenuGroup({ ...props }: ComponentProps<typeof DropdownMenuPrimitive.Group>): JSX.Element {\n return <DropdownMenuPrimitive.Group data-slot=\"dropdown-menu-group\" {...props} />;\n}\n\n/* -----------------------------------------------------------------------------\n * Component: DropdownMenuSub\n * -------------------------------------------------------------------------- */\n\nfunction DropdownMenuSub({ ...props }: ComponentProps<typeof DropdownMenuPrimitive.Sub>): JSX.Element {\n return <DropdownMenuPrimitive.Sub data-slot=\"dropdown-menu-sub\" {...props} />;\n}\n\n/* -----------------------------------------------------------------------------\n * Component: DropdownMenuSubTrigger\n * -------------------------------------------------------------------------- */\n\nfunction DropdownMenuRadioGroup({ ...props }: ComponentProps<typeof DropdownMenuPrimitive.RadioGroup>): JSX.Element {\n return <DropdownMenuPrimitive.RadioGroup data-slot=\"dropdown-menu-radio-group\" {...props} />;\n}\n\n/* -----------------------------------------------------------------------------\n * Component: DropdownMenuSubTrigger\n * -------------------------------------------------------------------------- */\n\nfunction DropdownMenuSubTrigger({\n children,\n className,\n inset,\n ...props\n}: ComponentProps<typeof DropdownMenuPrimitive.SubTrigger> & {\n inset?: boolean;\n}): JSX.Element {\n return (\n <DropdownMenuPrimitive.SubTrigger\n className={cn(\n \"focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground data-inset:pl-8 outline-hidden flex cursor-default select-none items-center gap-x-2 rounded-sm px-2 py-1.5 text-sm\",\n className,\n )}\n data-inset={inset}\n data-slot=\"dropdown-menu-sub-trigger\"\n {...props}\n >\n {children}\n <ChevronRightIcon className=\"ml-auto size-4\" />\n </DropdownMenuPrimitive.SubTrigger>\n );\n}\n\n/* -----------------------------------------------------------------------------\n * Component: DropdownMenuSubContent\n * -------------------------------------------------------------------------- */\n\nfunction DropdownMenuSubContent({\n className,\n ...props\n}: ComponentProps<typeof DropdownMenuPrimitive.SubContent>): JSX.Element {\n return (\n <DropdownMenuPrimitive.Portal>\n <DropdownMenuPrimitive.SubContent\n className={cn(\n \"bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 data-[state=open]:data-[side=top]:slide-in-from-bottom-2 data-[state=open]:data-[side=right]:slide-in-from-left-2 data-[state=open]:data-[side=bottom]:slide-in-from-top-2 data-[state=open]:data-[side=left]:slide-in-from-right-2 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=closed]:data-[side=top]:slide-out-to-bottom-2 data-[state=closed]:data-[side=right]:slide-out-to-left-2 data-[state=closed]:data-[side=bottom]:slide-out-to-top-2 data-[state=closed]:data-[side=left]:slide-out-to-right-2 z-50 min-w-32 rounded-lg border p-1 shadow-lg\",\n className,\n )}\n data-slot=\"dropdown-menu-sub-content\"\n {...props}\n />\n </DropdownMenuPrimitive.Portal>\n );\n}\n\n/* -----------------------------------------------------------------------------\n * Component: DropdownMenuContent\n * -------------------------------------------------------------------------- */\n\nfunction DropdownMenuContent({\n className,\n sideOffset = 4,\n ...props\n}: ComponentProps<typeof DropdownMenuPrimitive.Content>): JSX.Element {\n return (\n <DropdownMenuPrimitive.Portal>\n <DropdownMenuPrimitive.Content\n className={cn(\n \"bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 data-[state=open]:data-[side=top]:slide-in-from-bottom-2 data-[state=open]:data-[side=right]:slide-in-from-left-2 data-[state=open]:data-[side=bottom]:slide-in-from-top-2 data-[state=open]:data-[side=left]:slide-in-from-right-2 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=closed]:data-[side=top]:slide-out-to-bottom-2 data-[state=closed]:data-[side=right]:slide-out-to-left-2 data-[state=closed]:data-[side=bottom]:slide-out-to-top-2 data-[state=closed]:data-[side=left]:slide-out-to-right-2 z-50 min-w-32 rounded-lg border p-1 shadow-lg\",\n className,\n )}\n data-slot=\"dropdown-menu-content\"\n sideOffset={sideOffset}\n {...props}\n />\n </DropdownMenuPrimitive.Portal>\n );\n}\n\n/* -----------------------------------------------------------------------------\n * Component: DropdownMenuItem\n * -------------------------------------------------------------------------- */\n\nfunction DropdownMenuItem({\n className,\n inset,\n variant,\n ...props\n}: ComponentProps<typeof DropdownMenuPrimitive.Item> & {\n inset?: boolean;\n variant?: \"default\" | \"destructive\";\n}): JSX.Element {\n return (\n <DropdownMenuPrimitive.Item\n className={cn(\n \"focus:bg-accent focus:text-accent-foreground data-inset:pl-8 outline-hidden group/dropdown-menu-item data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:[&_svg:not([class*='text-'])]:text-destructive/80 [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default select-none items-center gap-x-2 rounded-sm px-2 py-1.5 text-sm aria-disabled:opacity-50 [&_svg:not([class*='size-'])]:size-4 [&_svg]:shrink-0\",\n className,\n )}\n data-inset={inset}\n data-slot=\"dropdown-menu-item\"\n data-variant={variant}\n {...props}\n />\n );\n}\n\n/* -----------------------------------------------------------------------------\n * Component: DropdownMenuCheckboxItem\n * -------------------------------------------------------------------------- */\n\nfunction DropdownMenuCheckboxItem({\n checked,\n children,\n className,\n ...props\n}: ComponentProps<typeof DropdownMenuPrimitive.CheckboxItem>): JSX.Element {\n return (\n <DropdownMenuPrimitive.CheckboxItem\n checked={checked}\n className={cn(\n \"focus:bg-accent focus:text-accent-foreground outline-hidden group/dropdown-menu-item relative flex cursor-default select-none items-center gap-x-2 rounded-sm py-1.5 pl-8 pr-2 text-sm aria-disabled:opacity-50 [&_svg:not([class*='size-'])]:size-4 [&_svg]:shrink-0\",\n className,\n )}\n data-slot=\"dropdown-menu-checkbox-item\"\n {...props}\n >\n <span className=\"absolute left-2 flex items-center justify-center\">\n <DropdownMenuPrimitive.ItemIndicator>\n <CheckIcon className=\"size-4\" />\n </DropdownMenuPrimitive.ItemIndicator>\n </span>\n {children}\n </DropdownMenuPrimitive.CheckboxItem>\n );\n}\n\n/* -----------------------------------------------------------------------------\n * Component: DropdownMenuRadioItem\n * -------------------------------------------------------------------------- */\n\nfunction DropdownMenuRadioItem({\n children,\n className,\n ...props\n}: ComponentProps<typeof DropdownMenuPrimitive.RadioItem>): JSX.Element {\n return (\n <DropdownMenuPrimitive.RadioItem\n className={cn(\n \"focus:bg-accent focus:text-accent-foreground outline-hidden group/dropdown-menu-item relative flex cursor-default select-none items-center gap-x-2 rounded-sm py-1.5 pl-8 pr-2 text-sm aria-disabled:opacity-50 [&_svg:not([class*='size-'])]:size-4 [&_svg]:shrink-0\",\n className,\n )}\n data-slot=\"dropdown-menu-radio-item\"\n {...props}\n >\n <span className=\"absolute left-2 flex items-center justify-center\">\n <DropdownMenuPrimitive.ItemIndicator>\n <DotIcon className=\"size-4 fill-current\" />\n </DropdownMenuPrimitive.ItemIndicator>\n </span>\n {children}\n </DropdownMenuPrimitive.RadioItem>\n );\n}\n\n/* -----------------------------------------------------------------------------\n * Component: DropdownMenuLabel\n * -------------------------------------------------------------------------- */\n\nfunction DropdownMenuLabel({\n className,\n inset,\n ...props\n}: ComponentProps<typeof DropdownMenuPrimitive.Label> & {\n inset?: boolean;\n}): JSX.Element {\n return (\n <DropdownMenuPrimitive.Label\n className={cn(\"data-inset:pl-8 flex items-center gap-x-2 px-2 py-1.5 text-sm font-semibold\", className)}\n data-inset={inset}\n data-slot=\"dropdown-menu-label\"\n {...props}\n />\n );\n}\n\n/* -----------------------------------------------------------------------------\n * Component: DropdownMenuSeparator\n * -------------------------------------------------------------------------- */\n\nfunction DropdownMenuSeparator({\n className,\n ...props\n}: ComponentProps<typeof DropdownMenuPrimitive.Separator>): JSX.Element {\n return (\n <DropdownMenuPrimitive.Separator\n className={cn(\"bg-border mx-2 my-1 h-px\", className)}\n data-slot=\"dropdown-menu-separator\"\n {...props}\n />\n );\n}\n\n/* -----------------------------------------------------------------------------\n * Component: DropdownMenuShortcut\n * -------------------------------------------------------------------------- */\n\nfunction DropdownMenuShortcut({ className, ...props }: ComponentProps<\"span\">): JSX.Element {\n return (\n <span\n className={cn(\n \"text-muted-foreground group-data-[variant=destructive]/dropdown-menu-item:text-destructive/80 ml-auto text-xs tracking-widest\",\n className,\n )}\n data-slot=\"dropdown-menu-shortcut\"\n {...props}\n />\n );\n}\n\n/* -----------------------------------------------------------------------------\n * Component: DropdownMenuArrow\n * -------------------------------------------------------------------------- */\n\nfunction DropdownMenuArrow({ className, ...props }: ComponentProps<typeof DropdownMenuPrimitive.Arrow>): JSX.Element {\n return (\n <DropdownMenuPrimitive.Arrow className={cn(\"fill-popover\", className)} data-slot=\"dropdown-menu-arrow\" {...props} />\n );\n}\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport {\n DropdownMenu,\n DropdownMenuArrow,\n DropdownMenuCheckboxItem,\n DropdownMenuContent,\n DropdownMenuGroup,\n DropdownMenuItem,\n DropdownMenuLabel,\n DropdownMenuRadioGroup,\n DropdownMenuRadioItem,\n DropdownMenuSeparator,\n DropdownMenuShortcut,\n DropdownMenuSub,\n DropdownMenuSubContent,\n DropdownMenuSubTrigger,\n DropdownMenuTrigger,\n};\n"],"names":["DropdownMenu","props","DropdownMenuPrimitive","DropdownMenuTrigger","DropdownMenuGroup","DropdownMenuSub","DropdownMenuRadioGroup","DropdownMenuSubTrigger","children","className","inset","cn","ChevronRightIcon","DropdownMenuSubContent","DropdownMenuContent","sideOffset","DropdownMenuItem","variant","DropdownMenuCheckboxItem","checked","CheckIcon","DropdownMenuRadioItem","DotIcon","DropdownMenuLabel","DropdownMenuSeparator","DropdownMenuShortcut","DropdownMenuArrow"],"mappings":";8pDAaA,SAASA,aAAa,CAAE,GAAGC,EAA0D,EACnF,MAAO,oCAACC,oCAAAA,IAA0B,EAAC,YAAU,gBAAiB,GAAGD,CAAK,EACxE,CAMA,SAASE,oBAAoB,CAAE,GAAGF,EAA6D,EAC7F,MAAO,oCAACC,oCAAAA,OAA6B,EAAC,YAAU,wBAAyB,GAAGD,CAAK,EACnF,CAMA,SAASG,kBAAkB,CAAE,GAAGH,EAA2D,EACzF,MAAO,oCAACC,oCAAAA,KAA2B,EAAC,YAAU,sBAAuB,GAAGD,CA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