@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,2 +1,3 @@
|
|
|
1
|
+
"use client";
|
|
1
2
|
import*as t from"react/jsx-runtime";import*as r from"@radix-ui/react-slot";import*as o from"../lib/utils.js";function a({asChild:a,className:i,...n}){let s=a?r.Slot:"div";return(0,t.jsx)(s,{className:(0,o.cn)("container",i),"data-slot":"container",...n})}export{a as Container};
|
|
2
3
|
//# sourceMappingURL=container.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"components/container.js","sources":["webpack://@codefast/ui/./src/components/container.tsx"],"sourcesContent":["
|
|
1
|
+
{"version":3,"file":"components/container.js","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":";6GAYA,SAASA,EAAU,CACjBC,QAAAA,CAAO,CACPC,UAAAA,CAAS,CACT,GAAGC,EAGJ,EACC,IAAMC,EAAYH,EAAUI,EAAAA,IAAIA,CAAG,MAEnC,MAAO,UAACD,EAAAA,CAAU,UAAWE,GAAAA,EAAAA,EAAAA,EAAG,YAAaJ,GAAY,YAAU,YAAa,GAAGC,CAAK,EAC1F,Q"}
|
|
@@ -1,2 +1,3 @@
|
|
|
1
|
+
"use client";
|
|
1
2
|
import*as t from"react/jsx-runtime";import*as e from"@radix-ui/react-context-menu";import*as a from"lucide-react";import*as n from"../lib/utils.js";function o({...a}){return(0,t.jsx)(e.Root,{"data-slot":"context-menu",...a})}function s({...a}){return(0,t.jsx)(e.Trigger,{"data-slot":"context-menu-trigger",...a})}function r({...a}){return(0,t.jsx)(e.Group,{"data-slot":"context-menu-group",...a})}function i({...a}){return(0,t.jsx)(e.Sub,{"data-slot":"context-menu-sub",...a})}function d({...a}){return(0,t.jsx)(e.RadioGroup,{"data-slot":"context-menu-radio-group",...a})}function c({children:o,className:s,inset:r,...i}){return(0,t.jsxs)(e.SubTrigger,{className:(0,n.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",s),"data-inset":r,"data-slot":"context-menu-sub-trigger",...i,children:[o,(0,t.jsx)(a.ChevronRightIcon,{className:"ml-auto size-4"})]})}function u({className:a,...o}){return(0,t.jsx)(e.Portal,{children:(0,t.jsx)(e.SubContent,{className:(0,n.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",a),"data-slot":"context-menu-sub-content",...o})})}function l({className:a,...o}){return(0,t.jsx)(e.Portal,{children:(0,t.jsx)(e.Content,{className:(0,n.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",a),"data-slot":"context-menu-content",...o})})}function m({className:a,inset:o,variant:s,...r}){return(0,t.jsx)(e.Item,{className:(0,n.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",a),"data-inset":o,"data-slot":"context-menu-item","data-variant":s,...r})}function x({checked:o,children:s,className:r,...i}){return(0,t.jsxs)(e.CheckboxItem,{checked:o,className:(0,n.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",r),"data-slot":"context-menu-checkbox-item",...i,children:[(0,t.jsx)("span",{className:"absolute left-2 flex items-center justify-center",children:(0,t.jsx)(e.ItemIndicator,{children:(0,t.jsx)(a.CheckIcon,{className:"size-4"})})}),s]})}function p({children:o,className:s,...r}){return(0,t.jsxs)(e.RadioItem,{className:(0,n.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",s),"data-slot":"context-menu-radio-item",...r,children:[(0,t.jsx)("span",{className:"absolute left-2 flex items-center justify-center",children:(0,t.jsx)(e.ItemIndicator,{children:(0,t.jsx)(a.DotIcon,{className:"size-4 fill-current"})})}),o]})}function f({className:a,inset:o,...s}){return(0,t.jsx)(e.Label,{className:(0,n.cn)("data-inset:pl-8 flex items-center gap-x-2 px-2 py-1.5 text-sm font-semibold",a),"data-inset":o,"data-slot":"context-menu-label",...s})}function g({className:a,...o}){return(0,t.jsx)(e.Separator,{className:(0,n.cn)("bg-border mx-2 my-1 h-px",a),"data-slot":"context-menu-separator",...o})}function b({className:e,...a}){return(0,t.jsx)("span",{className:(0,n.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",...a})}function h({className:a,...o}){return(0,t.jsx)(e.Arrow,{className:(0,n.cn)("fill-popover",a),"data-slot":"context-menu-arrow",...o})}export{o as ContextMenu,h as ContextMenuArrow,x as ContextMenuCheckboxItem,l as ContextMenuContent,r as ContextMenuGroup,m as ContextMenuItem,f as ContextMenuLabel,d as ContextMenuRadioGroup,p as ContextMenuRadioItem,g as ContextMenuSeparator,b as ContextMenuShortcut,i as ContextMenuSub,u as ContextMenuSubContent,c as ContextMenuSubTrigger,s as ContextMenuTrigger};
|
|
2
3
|
//# sourceMappingURL=context-menu.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"components/context-menu.js","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":"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"}
|
|
1
|
+
{"version":3,"file":"components/context-menu.js","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":";oJAaA,SAASA,EAAY,CAAE,GAAGC,EAAyD,EACjF,MAAO,UAACC,EAAAA,IAAyB,EAAC,YAAU,eAAgB,GAAGD,CAAK,EACtE,CAMA,SAASE,EAAmB,CAAE,GAAGF,EAA4D,EAC3F,MAAO,UAACC,EAAAA,OAA4B,EAAC,YAAU,uBAAwB,GAAGD,CAAK,EACjF,CAMA,SAASG,EAAiB,CAAE,GAAGH,EAA0D,EACvF,MAAO,UAACC,EAAAA,KAA0B,EAAC,YAAU,qBAAsB,GAAGD,CAAK,EAC7E,CAMA,SAASI,EAAe,CAAE,GAAGJ,EAAwD,EACnF,MAAO,UAACC,EAAAA,GAAwB,EAAC,YAAU,mBAAoB,GAAGD,CAAK,EACzE,CAMA,SAASK,EAAsB,CAAE,GAAGL,EAA+D,EACjG,MAAO,UAACC,EAAAA,UAA+B,EAAC,YAAU,2BAA4B,GAAGD,CAAK,EACxF,CAMA,SAASM,EAAsB,CAC7BC,SAAAA,CAAQ,CACRC,UAAAA,CAAS,CACTC,MAAAA,CAAK,CACL,GAAGT,EAGJ,EACC,MACE,WAACC,EAAAA,UAA+B,EAC9B,UAAWS,GAAAA,EAAAA,EAAAA,EACT,6RACAF,GAEF,aAAYC,EACZ,YAAU,2BACT,GAAGT,CAAK,C,UAERO,EACD,UAACI,EAAAA,gBAAgBA,CAAAA,CAAC,UAAU,gB,KAGlC,CAMA,SAASC,EAAsB,CAC7BJ,UAAAA,CAAS,CACT,GAAGR,EACoD,EACvD,MACE,UAACC,EAAAA,MAA2B,E,SAC1B,UAACA,EAAAA,UAA+B,EAC9B,UAAWS,GAAAA,EAAAA,EAAAA,EACT,otBACAF,GAEF,YAAU,2BACT,GAAGR,CAAK,IAIjB,CAMA,SAASa,EAAmB,CAAEL,UAAAA,CAAS,CAAE,GAAGR,EAA4D,EACtG,MACE,UAACC,EAAAA,MAA2B,E,SAC1B,UAACA,EAAAA,OAA4B,EAC3B,UAAWS,GAAAA,EAAAA,EAAAA,EACT,6YACAF,GAEF,YAAU,uBACT,GAAGR,CAAK,IAIjB,CAMA,SAASc,EAAgB,CACvBN,UAAAA,CAAS,CACTC,MAAAA,CAAK,CACLM,QAAAA,CAAO,CACP,GAAGf,EAIJ,EACC,MACE,UAACC,EAAAA,IAAyB,EACxB,UAAWS,GAAAA,EAAAA,EAAAA,EACT,0iBACAF,GAEF,aAAYC,EACZ,YAAU,oBACV,eAAcM,EACb,GAAGf,CAAK,EAGf,CAMA,SAASgB,EAAwB,CAC/BC,QAAAA,CAAO,CACPV,SAAAA,CAAQ,CACRC,UAAAA,CAAS,CACT,GAAGR,EACsD,EACzD,MACE,WAACC,EAAAA,YAAiC,EAChC,QAASgB,EACT,UAAWP,GAAAA,EAAAA,EAAAA,EACT,uQACAF,GAEF,YAAU,6BACT,GAAGR,CAAK,C,UAET,UAAC,QAAK,UAAU,mD,SACd,UAACC,EAAAA,aAAkC,E,SACjC,UAACiB,EAAAA,SAASA,CAAAA,CAAC,UAAU,Q,OAGxBX,E,EAGP,CAMA,SAASY,EAAqB,CAC5BZ,SAAAA,CAAQ,CACRC,UAAAA,CAAS,CACT,GAAGR,EACmD,EACtD,MACE,WAACC,EAAAA,SAA8B,EAC7B,UAAWS,GAAAA,EAAAA,EAAAA,EACT,uQACAF,GAEF,YAAU,0BACT,GAAGR,CAAK,C,UAET,UAAC,QAAK,UAAU,mD,SACd,UAACC,EAAAA,aAAkC,E,SACjC,UAACmB,EAAAA,OAAOA,CAAAA,CAAC,UAAU,qB,OAGtBb,E,EAGP,CAMA,SAASc,EAAiB,CACxBb,UAAAA,CAAS,CACTC,MAAAA,CAAK,CACL,GAAGT,EAGJ,EACC,MACE,UAACC,EAAAA,KAA0B,EACzB,UAAWS,GAAAA,EAAAA,EAAAA,EAAG,8EAA+EF,GAC7F,aAAYC,EACZ,YAAU,qBACT,GAAGT,CAAK,EAGf,CAMA,SAASsB,EAAqB,CAC5Bd,UAAAA,CAAS,CACT,GAAGR,EACmD,EACtD,MACE,UAACC,EAAAA,SAA8B,EAC7B,UAAWS,GAAAA,EAAAA,EAAAA,EAAG,2BAA4BF,GAC1C,YAAU,yBACT,GAAGR,CAAK,EAGf,CAMA,SAASuB,EAAoB,CAAEf,UAAAA,CAAS,CAAE,GAAGR,EAA+B,EAC1E,MACE,UAAC,QACC,UAAWU,GAAAA,EAAAA,EAAAA,EACT,+HACAF,GAEF,YAAU,wBACT,GAAGR,CAAK,EAGf,CAMA,SAASwB,EAAiB,CAAEhB,UAAAA,CAAS,CAAE,GAAGR,EAA0D,EAClG,MACE,UAACC,EAAAA,KAA0B,EAAC,UAAWS,GAAAA,EAAAA,EAAAA,EAAG,eAAgBF,GAAY,YAAU,qBAAsB,GAAGR,CAAK,EAElH,Q"}
|
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
|
|
1
|
+
"use client";
|
|
2
|
+
import*as t from"react/jsx-runtime";import*as a from"@radix-ui/react-dialog";import*as o from"lucide-react";import*as e from"./button/index.js";import*as s from"../lib/utils.js";function i({...o}){return(0,t.jsx)(a.Root,{"data-slot":"dialog",...o})}function l({...o}){return(0,t.jsx)(a.Trigger,{"data-slot":"dialog-trigger",...o})}function n({children:i,className:l,classNames:n,...r}){return(0,t.jsxs)(a.Portal,{children:[(0,t.jsx)(a.Overlay,{className:(0,s.cn)("bg-popover-overlay data-[state=open]:animate-fade-in data-[state=closed]:animate-fade-out fixed inset-0 z-50",n?.overlay),"data-slot":"dialog-overlay"}),(0,t.jsx)(a.Content,{className:(0,s.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",n?.wrapper),"data-slot":"dialog-content-wrapper",...r,children:(0,t.jsxs)("div",{className:(0,s.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",n?.content,l),"data-slot":"dialog-content",children:[i,(0,t.jsxs)(a.Close,{className:(0,e.buttonVariants)({className:["absolute right-2.5 top-2.5 size-7",n?.close],size:"icon",variant:"ghost"}),"data-slot":"dialog-close",children:[(0,t.jsx)(o.XIcon,{className:"size-4"}),(0,t.jsx)("span",{className:"sr-only",children:"Close"})]})]})})]})}function r({className:a,...o}){return(0,t.jsx)("header",{className:(0,s.cn)("flex shrink-0 flex-col gap-1.5 px-6 pb-2 pt-6 text-center sm:text-left",a),"data-slot":"dialog-header",...o})}function d({className:a,...o}){return(0,t.jsx)("main",{className:(0,s.cn)("overflow-auto px-6 py-2",a),"data-slot":"dialog-body",...o})}function c({className:a,...o}){return(0,t.jsx)("footer",{className:(0,s.cn)("flex shrink-0 flex-col-reverse gap-2 px-6 pb-6 pt-2 sm:flex-row sm:justify-end",a),"data-slot":"dialog-footer",...o})}function m({className:o,...e}){return(0,t.jsx)(a.Title,{className:(0,s.cn)("text-lg font-semibold leading-none tracking-tight",o),"data-slot":"dialog-title",...e})}function u({className:o,...e}){return(0,t.jsx)(a.Description,{className:(0,s.cn)("text-muted-foreground text-sm",o),"data-slot":"dialog-description",...e})}function g({className:o,size:s,variant:i="outline",...l}){return(0,t.jsx)(a.Close,{className:(0,e.buttonVariants)({className:o,size:s,variant:i}),"data-slot":"dialog-close",...l})}export{i as Dialog,d as DialogBody,g as DialogClose,n as DialogContent,u as DialogDescription,c as DialogFooter,r as DialogHeader,m as DialogTitle,l as DialogTrigger};
|
|
2
3
|
//# sourceMappingURL=dialog.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"components/dialog.js","sources":["webpack://@codefast/ui/./src/components/dialog.tsx"],"sourcesContent":["
|
|
1
|
+
{"version":3,"file":"components/dialog.js","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":";kLAgBA,SAASA,EAAO,CAAE,GAAGC,EAAoD,EACvE,MAAO,UAACC,EAAAA,IAAoB,EAAC,YAAU,SAAU,GAAGD,CAAK,EAC3D,CAMA,SAASE,EAAc,CAAE,GAAGF,EAAuD,EACjF,MAAO,UAACC,EAAAA,OAAuB,EAAC,YAAU,iBAAkB,GAAGD,CAAK,EACtE,CAMA,SAASG,EAAc,CACrBC,SAAAA,CAAQ,CACRC,UAAAA,CAAS,CACTC,WAAAA,CAAU,CACV,GAAGN,EAQJ,EACC,MACE,WAACC,EAAAA,MAAsB,E,UACrB,UAACA,EAAAA,OAAuB,EACtB,UAAWM,GAAAA,EAAAA,EAAAA,EACT,+GACAD,GAAY,SAEd,YAAU,gB,GAEZ,UAACL,EAAAA,OAAuB,EACtB,UAAWM,GAAAA,EAAAA,EAAAA,EACT,qfACAD,GAAY,SAEd,YAAU,yBACT,GAAGN,CAAK,C,SAET,WAAC,OACC,UAAWO,GAAAA,EAAAA,EAAAA,EACT,yIACAD,GAAY,QACZD,GAEF,YAAU,iB,UAETD,EACD,WAACH,EAAAA,KAAqB,EACpB,UAAWO,GAAAA,EAAAA,cAAAA,EAAe,CACxB,UAAW,CAAC,oCAAqCF,GAAY,MAAM,CACnE,KAAM,OACN,QAAS,OACX,GACA,YAAU,e,UAEV,UAACG,EAAAA,KAAKA,CAAAA,CAAC,UAAU,Q,GACjB,UAAC,QAAK,UAAU,U,SAAU,O,aAMtC,CAMA,SAASC,EAAa,CAAEL,UAAAA,CAAS,CAAE,GAAGL,EAA8B,EAClE,MACE,UAAC,UACC,UAAWO,GAAAA,EAAAA,EAAAA,EAAG,yEAA0EF,GACxF,YAAU,gBACT,GAAGL,CAAK,EAGf,CAMA,SAASW,EAAW,CAAEN,UAAAA,CAAS,CAAE,GAAGL,EAA8B,EAChE,MAAO,UAAC,QAAK,UAAWO,GAAAA,EAAAA,EAAAA,EAAG,0BAA2BF,GAAY,YAAU,cAAe,GAAGL,CAAK,EACrG,CAMA,SAASY,EAAa,CAAEP,UAAAA,CAAS,CAAE,GAAGL,EAA8B,EAClE,MACE,UAAC,UACC,UAAWO,GAAAA,EAAAA,EAAAA,EAAG,iFAAkFF,GAChG,YAAU,gBACT,GAAGL,CAAK,EAGf,CAMA,SAASa,EAAY,CAAER,UAAAA,CAAS,CAAE,GAAGL,EAAqD,EACxF,MACE,UAACC,EAAAA,KAAqB,EACpB,UAAWM,GAAAA,EAAAA,EAAAA,EAAG,oDAAqDF,GACnE,YAAU,eACT,GAAGL,CAAK,EAGf,CAMA,SAASc,EAAkB,CAAET,UAAAA,CAAS,CAAE,GAAGL,EAA2D,EACpG,MACE,UAACC,EAAAA,WAA2B,EAC1B,UAAWM,GAAAA,EAAAA,EAAAA,EAAG,gCAAiCF,GAC/C,YAAU,qBACT,GAAGL,CAAK,EAGf,CAMA,SAASe,EAAY,CACnBV,UAAAA,CAAS,CACTW,KAAAA,CAAI,CACJC,QAAAA,EAAU,SAAS,CACnB,GAAGjB,EAIJ,EACC,MACE,UAACC,EAAAA,KAAqB,EACpB,UAAWO,GAAAA,EAAAA,cAAAA,EAAe,CAAEH,UAAAA,EAAWW,KAAAA,EAAMC,QAAAA,CAAQ,GACrD,YAAU,eACT,GAAGjB,CAAK,EAGf,Q"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import*as r from"react/jsx-runtime";import*as a from"vaul";import*as t from"./button.js";import*as e from"../lib/utils.js";function o({shouldScaleBackground:t=!0,...e}){return(0,r.jsx)(a.Drawer.Root,{"data-slot":"drawer",shouldScaleBackground:t,...e})}function d({...t}){return(0,r.jsx)(a.Drawer.Trigger,{"data-slot":"drawer-trigger",...t})}function n({children:t,className:o,classNames:d,...n}){return(0,r.jsxs)(a.Drawer.Portal,{children:[(0,r.jsx)(a.Drawer.Overlay,{className:(0,e.cn)("bg-popover-overlay fixed inset-0 z-50",d?.overlay),"data-slot":"drawer-overlay"}),(0,r.jsxs)(a.Drawer.Content,{className:(0,e.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",d?.content,o),"data-slot":"drawer-content",...n,children:[(0,r.jsx)("div",{className:(0,e.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",d?.handle)}),t]})]})}function i({className:a,...t}){return(0,r.jsx)("div",{className:(0,e.cn)("flex flex-col gap-1.5 p-4",a),"data-slot":"drawer-header",...t})}function l({className:a,...t}){return(0,r.jsx)("main",{className:(0,e.cn)("overflow-auto px-4 py-2",a),"data-slot":"drawer-body",...t})}function s({className:a,...t}){return(0,r.jsx)("div",{className:(0,e.cn)("mt-auto flex flex-col gap-2 p-4",a),"data-slot":"drawer-footer",...t})}function c({className:t,...o}){return(0,r.jsx)(a.Drawer.Title,{className:(0,e.cn)("text-foreground font-semibold",t),"data-slot":"drawer-title",...o})}function u({className:t,...o}){return(0,r.jsx)(a.Drawer.Description,{className:(0,e.cn)("text-muted-foreground text-sm",t),"data-slot":"drawer-description",...o})}function w({className:e,size:o,variant:d="outline",...n}){return(0,r.jsx)(a.Drawer.Close,{className:(0,t.buttonVariants)({className:e,size:o,variant:d}),"data-slot":"drawer-close",...n})}export{o as Drawer,l as DrawerBody,w as DrawerClose,n as DrawerContent,u as DrawerDescription,s as DrawerFooter,i as DrawerHeader,c as DrawerTitle,d as DrawerTrigger};
|
|
2
|
+
import*as r from"react/jsx-runtime";import*as a from"vaul";import*as t from"./button/index.js";import*as e from"../lib/utils.js";function o({shouldScaleBackground:t=!0,...e}){return(0,r.jsx)(a.Drawer.Root,{"data-slot":"drawer",shouldScaleBackground:t,...e})}function d({...t}){return(0,r.jsx)(a.Drawer.Trigger,{"data-slot":"drawer-trigger",...t})}function n({children:t,className:o,classNames:d,...n}){return(0,r.jsxs)(a.Drawer.Portal,{children:[(0,r.jsx)(a.Drawer.Overlay,{className:(0,e.cn)("bg-popover-overlay fixed inset-0 z-50",d?.overlay),"data-slot":"drawer-overlay"}),(0,r.jsxs)(a.Drawer.Content,{className:(0,e.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",d?.content,o),"data-slot":"drawer-content",...n,children:[(0,r.jsx)("div",{className:(0,e.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",d?.handle)}),t]})]})}function i({className:a,...t}){return(0,r.jsx)("div",{className:(0,e.cn)("flex flex-col gap-1.5 p-4",a),"data-slot":"drawer-header",...t})}function l({className:a,...t}){return(0,r.jsx)("main",{className:(0,e.cn)("overflow-auto px-4 py-2",a),"data-slot":"drawer-body",...t})}function s({className:a,...t}){return(0,r.jsx)("div",{className:(0,e.cn)("mt-auto flex flex-col gap-2 p-4",a),"data-slot":"drawer-footer",...t})}function c({className:t,...o}){return(0,r.jsx)(a.Drawer.Title,{className:(0,e.cn)("text-foreground font-semibold",t),"data-slot":"drawer-title",...o})}function u({className:t,...o}){return(0,r.jsx)(a.Drawer.Description,{className:(0,e.cn)("text-muted-foreground text-sm",t),"data-slot":"drawer-description",...o})}function w({className:e,size:o,variant:d="outline",...n}){return(0,r.jsx)(a.Drawer.Close,{className:(0,t.buttonVariants)({className:e,size:o,variant:d}),"data-slot":"drawer-close",...n})}export{o as Drawer,l as DrawerBody,w as DrawerClose,n as DrawerContent,u as DrawerDescription,s as DrawerFooter,i as DrawerHeader,c as DrawerTitle,d as DrawerTrigger};
|
|
3
3
|
//# sourceMappingURL=drawer.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"components/drawer.js","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.js","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":";iIAeA,SAASA,EAAO,CAAEC,sBAAAA,EAAwB,EAAI,CAAE,GAAGC,EAAoD,EACrG,MAAO,UAACC,EAAAA,MAAAA,CAAAA,IAAoB,EAAC,YAAU,SAAS,sBAAuBF,EAAwB,GAAGC,CAAK,EACzG,CAMA,SAASE,EAAc,CAAE,GAAGF,EAAuD,EACjF,MAAO,UAACC,EAAAA,MAAAA,CAAAA,OAAuB,EAAC,YAAU,iBAAkB,GAAGD,CAAK,EACtE,CAMA,SAASG,EAAc,CACrBC,SAAAA,CAAQ,CACRC,UAAAA,CAAS,CACTC,WAAAA,CAAU,CACV,GAAGN,EAOJ,EACC,MACE,WAACC,EAAAA,MAAAA,CAAAA,MAAsB,E,UACrB,UAACA,EAAAA,MAAAA,CAAAA,OAAuB,EACtB,UAAWM,GAAAA,EAAAA,EAAAA,EAAG,wCAAyCD,GAAY,SACnE,YAAU,gB,GAEZ,WAACL,EAAAA,MAAAA,CAAAA,OAAuB,EACtB,UAAWM,GAAAA,EAAAA,EAAAA,EACT,81BACAD,GAAY,QACZD,GAEF,YAAU,iBACT,GAAGL,CAAK,C,UAET,UAAC,OACC,UAAWO,GAAAA,EAAAA,EAAAA,EACT,+HACAD,GAAY,O,GAGfF,E,KAIT,CAMA,SAASI,EAAa,CAAEH,UAAAA,CAAS,CAAE,GAAGL,EAA8B,EAClE,MAAO,UAAC,OAAI,UAAWO,GAAAA,EAAAA,EAAAA,EAAG,4BAA6BF,GAAY,YAAU,gBAAiB,GAAGL,CAAK,EACxG,CAMA,SAASS,EAAW,CAAEJ,UAAAA,CAAS,CAAE,GAAGL,EAA8B,EAChE,MAAO,UAAC,QAAK,UAAWO,GAAAA,EAAAA,EAAAA,EAAG,0BAA2BF,GAAY,YAAU,cAAe,GAAGL,CAAK,EACrG,CAMA,SAASU,EAAa,CAAEL,UAAAA,CAAS,CAAE,GAAGL,EAA8B,EAClE,MAAO,UAAC,OAAI,UAAWO,GAAAA,EAAAA,EAAAA,EAAG,kCAAmCF,GAAY,YAAU,gBAAiB,GAAGL,CAAK,EAC9G,CAMA,SAASW,EAAY,CAAEN,UAAAA,CAAS,CAAE,GAAGL,EAAqD,EACxF,MACE,UAACC,EAAAA,MAAAA,CAAAA,KAAqB,EACpB,UAAWM,GAAAA,EAAAA,EAAAA,EAAG,gCAAiCF,GAC/C,YAAU,eACT,GAAGL,CAAK,EAGf,CAMA,SAASY,EAAkB,CAAEP,UAAAA,CAAS,CAAE,GAAGL,EAA2D,EACpG,MACE,UAACC,EAAAA,MAAAA,CAAAA,WAA2B,EAC1B,UAAWM,GAAAA,EAAAA,EAAAA,EAAG,gCAAiCF,GAC/C,YAAU,qBACT,GAAGL,CAAK,EAGf,CAMA,SAASa,EAAY,CACnBR,UAAAA,CAAS,CACTS,KAAAA,CAAI,CACJC,QAAAA,EAAU,SAAS,CACnB,GAAGf,EAIJ,EACC,MACE,UAACC,EAAAA,MAAAA,CAAAA,KAAqB,EACpB,UAAWe,GAAAA,EAAAA,cAAAA,EAAe,CAAEX,UAAAA,EAAWS,KAAAA,EAAMC,QAAAA,CAAQ,GACrD,YAAU,eACT,GAAGf,CAAK,EAGf,Q"}
|
|
@@ -1,2 +1,3 @@
|
|
|
1
|
+
"use client";
|
|
1
2
|
import*as t from"react/jsx-runtime";import*as e from"@radix-ui/react-dropdown-menu";import*as o from"lucide-react";import*as a from"../lib/utils.js";function n({...o}){return(0,t.jsx)(e.Root,{"data-slot":"dropdown-menu",...o})}function d({...o}){return(0,t.jsx)(e.Trigger,{"data-slot":"dropdown-menu-trigger",...o})}function s({...o}){return(0,t.jsx)(e.Group,{"data-slot":"dropdown-menu-group",...o})}function r({...o}){return(0,t.jsx)(e.Sub,{"data-slot":"dropdown-menu-sub",...o})}function i({...o}){return(0,t.jsx)(e.RadioGroup,{"data-slot":"dropdown-menu-radio-group",...o})}function u({children:n,className:d,inset:s,...r}){return(0,t.jsxs)(e.SubTrigger,{className:(0,a.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",d),"data-inset":s,"data-slot":"dropdown-menu-sub-trigger",...r,children:[n,(0,t.jsx)(o.ChevronRightIcon,{className:"ml-auto size-4"})]})}function c({className:o,...n}){return(0,t.jsx)(e.Portal,{children:(0,t.jsx)(e.SubContent,{className:(0,a.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",o),"data-slot":"dropdown-menu-sub-content",...n})})}function l({className:o,sideOffset:n=4,...d}){return(0,t.jsx)(e.Portal,{children:(0,t.jsx)(e.Content,{className:(0,a.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",o),"data-slot":"dropdown-menu-content",sideOffset:n,...d})})}function p({className:o,inset:n,variant:d,...s}){return(0,t.jsx)(e.Item,{className:(0,a.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",o),"data-inset":n,"data-slot":"dropdown-menu-item","data-variant":d,...s})}function m({checked:n,children:d,className:s,...r}){return(0,t.jsxs)(e.CheckboxItem,{checked:n,className:(0,a.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",s),"data-slot":"dropdown-menu-checkbox-item",...r,children:[(0,t.jsx)("span",{className:"absolute left-2 flex items-center justify-center",children:(0,t.jsx)(e.ItemIndicator,{children:(0,t.jsx)(o.CheckIcon,{className:"size-4"})})}),d]})}function f({children:n,className:d,...s}){return(0,t.jsxs)(e.RadioItem,{className:(0,a.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",d),"data-slot":"dropdown-menu-radio-item",...s,children:[(0,t.jsx)("span",{className:"absolute left-2 flex items-center justify-center",children:(0,t.jsx)(e.ItemIndicator,{children:(0,t.jsx)(o.DotIcon,{className:"size-4 fill-current"})})}),n]})}function x({className:o,inset:n,...d}){return(0,t.jsx)(e.Label,{className:(0,a.cn)("data-inset:pl-8 flex items-center gap-x-2 px-2 py-1.5 text-sm font-semibold",o),"data-inset":n,"data-slot":"dropdown-menu-label",...d})}function g({className:o,...n}){return(0,t.jsx)(e.Separator,{className:(0,a.cn)("bg-border mx-2 my-1 h-px",o),"data-slot":"dropdown-menu-separator",...n})}function b({className:e,...o}){return(0,t.jsx)("span",{className:(0,a.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",...o})}function w({className:o,...n}){return(0,t.jsx)(e.Arrow,{className:(0,a.cn)("fill-popover",o),"data-slot":"dropdown-menu-arrow",...n})}export{n as DropdownMenu,w as DropdownMenuArrow,m as DropdownMenuCheckboxItem,l as DropdownMenuContent,s as DropdownMenuGroup,p as DropdownMenuItem,x as DropdownMenuLabel,i as DropdownMenuRadioGroup,f as DropdownMenuRadioItem,g as DropdownMenuSeparator,b as DropdownMenuShortcut,r as DropdownMenuSub,c as DropdownMenuSubContent,u as DropdownMenuSubTrigger,d as DropdownMenuTrigger};
|
|
2
3
|
//# sourceMappingURL=dropdown-menu.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"components/dropdown-menu.js","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":"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"}
|
|
1
|
+
{"version":3,"file":"components/dropdown-menu.js","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":"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"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"components/em.js","sources":["webpack://@codefast/ui/./src/components/em.tsx"],"sourcesContent":["
|
|
1
|
+
{"version":3,"file":"components/em.js","sources":["webpack://@codefast/ui/./src/components/em.tsx"],"sourcesContent":["\n\nimport type { ComponentProps, JSX } from \"react\";\n\nimport { Slot } from \"@radix-ui/react-slot\";\n\n/* -----------------------------------------------------------------------------\n * Component: Em\n * -------------------------------------------------------------------------- */\n\nfunction Em({\n asChild,\n ...props\n}: ComponentProps<\"em\"> & {\n asChild?: boolean;\n}): JSX.Element {\n const Component = asChild ? Slot : \"em\";\n\n return <Component data-slot=\"em\" {...props} />;\n}\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport { Em };\n"],"names":["Em","asChild","props","Component","Slot"],"mappings":";2EAUA,SAASA,EAAG,CACVC,QAAAA,CAAO,CACP,GAAGC,EAGJ,EACC,IAAMC,EAAYF,EAAUG,EAAAA,IAAIA,CAAG,KAEnC,MAAO,UAACD,EAAAA,CAAU,YAAU,KAAM,GAAGD,CAAK,EAC5C,Q"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"components/heading.js","sources":["webpack://@codefast/ui/./src/components/heading.tsx"],"sourcesContent":["
|
|
1
|
+
{"version":3,"file":"components/heading.js","sources":["webpack://@codefast/ui/./src/components/heading.tsx"],"sourcesContent":["\n\nimport type { ComponentProps, JSX } from \"react\";\n\nimport { Slot } from \"@radix-ui/react-slot\";\n\n/* -----------------------------------------------------------------------------\n * Component: Heading\n * -------------------------------------------------------------------------- */\n\nfunction Heading({\n as: Tag = \"h1\",\n asChild,\n ...props\n}: ComponentProps<\"h1\" | \"h2\" | \"h3\" | \"h4\" | \"h5\" | \"h6\"> & {\n as?: \"h1\" | \"h2\" | \"h3\" | \"h4\" | \"h5\" | \"h6\";\n asChild?: boolean;\n}): JSX.Element {\n const Component = asChild ? Slot : Tag;\n\n return <Component data-slot=\"heading\" {...props} />;\n}\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport { Heading };\n"],"names":["Heading","Tag","asChild","props","Component","Slot"],"mappings":";2EAUA,SAASA,EAAQ,CACf,GAAIC,EAAM,IAAI,CACdC,QAAAA,CAAO,CACP,GAAGC,EAIJ,EACC,IAAMC,EAAYF,EAAUG,EAAAA,IAAIA,CAAGJ,EAEnC,MAAO,UAACG,EAAAA,CAAU,YAAU,UAAW,GAAGD,CAAK,EACjD,Q"}
|
|
@@ -1,2 +1,3 @@
|
|
|
1
|
+
"use client";
|
|
1
2
|
import*as t from"react/jsx-runtime";import*as a from"@radix-ui/react-hover-card";import*as e from"../lib/utils.js";function o({...e}){return(0,t.jsx)(a.Root,{"data-slot":"hover-card",...e})}function d({...e}){return(0,t.jsx)(a.Trigger,{"data-slot":"hover-card-trigger",...e})}function r({align:o="center",className:d,sideOffset:r=4,...s}){return(0,t.jsx)(a.Portal,{children:(0,t.jsx)(a.Content,{align:o,className:(0,e.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=left]:slide-in-from-right-2 data-[state=open]:data-[side=bottom]:slide-in-from-top-2 data-[state=open]:data-[side=right]:slide-in-from-left-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=left]:slide-out-to-right-2 data-[state=closed]:data-[side=bottom]:slide-out-to-top-2 data-[state=closed]:data-[side=right]:slide-out-to-left-2 z-50 min-w-32 rounded-lg border p-4 shadow-lg",d),"data-slot":"hover-card-content",sideOffset:r,...s})})}function s({className:o,...d}){return(0,t.jsx)(a.Arrow,{className:(0,e.cn)("fill-popover",o),"data-slot":"hover-card-arrow",...d})}export{o as HoverCard,s as HoverCardArrow,r as HoverCardContent,d as HoverCardTrigger};
|
|
2
3
|
//# sourceMappingURL=hover-card.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"components/hover-card.js","sources":["webpack://@codefast/ui/./src/components/hover-card.tsx"],"sourcesContent":["
|
|
1
|
+
{"version":3,"file":"components/hover-card.js","sources":["webpack://@codefast/ui/./src/components/hover-card.tsx"],"sourcesContent":["\n\nimport type { ComponentProps, JSX } from \"react\";\n\nimport * as HoverCardPrimitive from \"@radix-ui/react-hover-card\";\n\nimport { cn } from \"@/lib/utils\";\n\n/* -----------------------------------------------------------------------------\n * Component: HoverCard\n * -------------------------------------------------------------------------- */\n\nfunction HoverCard({ ...props }: ComponentProps<typeof HoverCardPrimitive.Root>): JSX.Element {\n return <HoverCardPrimitive.Root data-slot=\"hover-card\" {...props} />;\n}\n\n/* -----------------------------------------------------------------------------\n * Component: HoverCardTrigger\n * -------------------------------------------------------------------------- */\n\nfunction HoverCardTrigger({ ...props }: ComponentProps<typeof HoverCardPrimitive.Trigger>): JSX.Element {\n return <HoverCardPrimitive.Trigger data-slot=\"hover-card-trigger\" {...props} />;\n}\n\n/* -----------------------------------------------------------------------------\n * Component: HoverCardContent\n * -------------------------------------------------------------------------- */\n\nfunction HoverCardContent({\n align = \"center\",\n className,\n sideOffset = 4,\n ...props\n}: ComponentProps<typeof HoverCardPrimitive.Content>): JSX.Element {\n return (\n <HoverCardPrimitive.Portal>\n <HoverCardPrimitive.Content\n align={align}\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=left]:slide-in-from-right-2 data-[state=open]:data-[side=bottom]:slide-in-from-top-2 data-[state=open]:data-[side=right]:slide-in-from-left-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=left]:slide-out-to-right-2 data-[state=closed]:data-[side=bottom]:slide-out-to-top-2 data-[state=closed]:data-[side=right]:slide-out-to-left-2 z-50 min-w-32 rounded-lg border p-4 shadow-lg\",\n className,\n )}\n data-slot=\"hover-card-content\"\n sideOffset={sideOffset}\n {...props}\n />\n </HoverCardPrimitive.Portal>\n );\n}\n\n/* -----------------------------------------------------------------------------\n * Component: HoverCardArrow\n * -------------------------------------------------------------------------- */\n\nfunction HoverCardArrow({ className, ...props }: ComponentProps<typeof HoverCardPrimitive.Arrow>): JSX.Element {\n return <HoverCardPrimitive.Arrow className={cn(\"fill-popover\", className)} data-slot=\"hover-card-arrow\" {...props} />;\n}\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport { HoverCard, HoverCardArrow, HoverCardContent, HoverCardTrigger };\n"],"names":["HoverCard","props","HoverCardPrimitive","HoverCardTrigger","HoverCardContent","align","className","sideOffset","cn","HoverCardArrow"],"mappings":";mHAYA,SAASA,EAAU,CAAE,GAAGC,EAAuD,EAC7E,MAAO,UAACC,EAAAA,IAAuB,EAAC,YAAU,aAAc,GAAGD,CAAK,EAClE,CAMA,SAASE,EAAiB,CAAE,GAAGF,EAA0D,EACvF,MAAO,UAACC,EAAAA,OAA0B,EAAC,YAAU,qBAAsB,GAAGD,CAAK,EAC7E,CAMA,SAASG,EAAiB,CACxBC,MAAAA,EAAQ,QAAQ,CAChBC,UAAAA,CAAS,CACTC,WAAAA,EAAa,CAAC,CACd,GAAGN,EAC+C,EAClD,MACE,UAACC,EAAAA,MAAyB,E,SACxB,UAACA,EAAAA,OAA0B,EACzB,MAAOG,EACP,UAAWG,GAAAA,EAAAA,EAAAA,EACT,otBACAF,GAEF,YAAU,qBACV,WAAYC,EACX,GAAGN,CAAK,IAIjB,CAMA,SAASQ,EAAe,CAAEH,UAAAA,CAAS,CAAE,GAAGL,EAAwD,EAC9F,MAAO,UAACC,EAAAA,KAAwB,EAAC,UAAWM,GAAAA,EAAAA,EAAAA,EAAG,eAAgBF,GAAY,YAAU,mBAAoB,GAAGL,CAAK,EACnH,Q"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"components/inline.js","sources":["webpack://@codefast/ui/./src/components/inline.tsx"],"sourcesContent":["
|
|
1
|
+
{"version":3,"file":"components/inline.js","sources":["webpack://@codefast/ui/./src/components/inline.tsx"],"sourcesContent":["\n\nimport type { ComponentProps, JSX } from \"react\";\n\nimport { Slot } from \"@radix-ui/react-slot\";\n\n/* -----------------------------------------------------------------------------\n * Component: Inline\n * -------------------------------------------------------------------------- */\n\nfunction Inline({\n asChild,\n ...props\n}: ComponentProps<\"span\"> & {\n asChild?: boolean;\n}): JSX.Element {\n const Component = asChild ? Slot : \"span\";\n\n return <Component data-slot=\"inline\" {...props} />;\n}\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport { Inline };\n"],"names":["Inline","asChild","props","Component","Slot"],"mappings":";2EAUA,SAASA,EAAO,CACdC,QAAAA,CAAO,CACP,GAAGC,EAGJ,EACC,IAAMC,EAAYF,EAAUG,EAAAA,IAAIA,CAAG,OAEnC,MAAO,UAACD,EAAAA,CAAU,YAAU,SAAU,GAAGD,CAAK,EAChD,Q"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export*from"./input.js";export*from"./input-variants.js";
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import*as i from"../../lib/utils.js";let t=(0,i.tv)({slots:{root:"border-input not-has-disabled:shadow-xs hover:not-has-disabled:not-focus-within:border-ring/60 focus-within:border-ring focus-within:ring-ring/50 focus-within:ring-3 has-disabled:opacity-50 [&>svg]:text-muted-foreground has-aria-invalid:border-destructive hover:not-has-disabled:not-focus-within:has-aria-invalid:border-destructive/60 focus-within:has-aria-invalid:ring-destructive/20 dark:focus-within:has-aria-invalid:ring-destructive/40 dark:bg-input/30 peer flex h-9 w-full grow items-center gap-3 rounded-lg border px-3 text-base transition md:text-sm [&_svg:not([class*='size-'])]:size-4 [&_svg]:shrink-0",input:"placeholder:text-muted-foreground outline-hidden file:py-1.75 size-full file:bg-transparent file:font-medium"}});export{t as inputVariants};
|
|
2
|
+
//# sourceMappingURL=input-variants.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"components/input/input-variants.js","sources":["webpack://@codefast/ui/./src/components/input/input-variants.tsx"],"sourcesContent":["import { tv } from \"@/lib/utils\";\n\n/* -----------------------------------------------------------------------------\n * Variant: Input\n * -------------------------------------------------------------------------- */\n\nconst inputVariants = tv({\n slots: {\n root: \"border-input not-has-disabled:shadow-xs hover:not-has-disabled:not-focus-within:border-ring/60 focus-within:border-ring focus-within:ring-ring/50 focus-within:ring-3 has-disabled:opacity-50 [&>svg]:text-muted-foreground has-aria-invalid:border-destructive hover:not-has-disabled:not-focus-within:has-aria-invalid:border-destructive/60 focus-within:has-aria-invalid:ring-destructive/20 dark:focus-within:has-aria-invalid:ring-destructive/40 dark:bg-input/30 peer flex h-9 w-full grow items-center gap-3 rounded-lg border px-3 text-base transition md:text-sm [&_svg:not([class*='size-'])]:size-4 [&_svg]:shrink-0\",\n input:\n \"placeholder:text-muted-foreground outline-hidden file:py-1.75 size-full file:bg-transparent file:font-medium\",\n },\n});\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport { inputVariants };\n"],"names":["inputVariants","tv"],"mappings":"qCAMA,IAAMA,EAAgBC,AAAAA,GAAAA,EAAAA,EAAAA,AAAAA,EAAG,CACvB,MAAO,CACL,KAAM,qmBACN,MACE,8GACJ,CACF,U"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import*as t from"react/jsx-runtime";import*as i from"@codefast-ui/input";import*as s from"./input-variants.js";import*as n from"../spinner.js";let{input:a,root:r}=(0,s.inputVariants)();function e({className:s,disabled:e,loaderPosition:o,loading:p,prefix:l,readOnly:m,spinner:u,suffix:d,...f}){return(0,t.jsx)(i.Root,{className:r({className:s}),"data-slot":"input",disabled:e,loaderPosition:o,loading:p,prefix:l,readOnly:m,spinner:u||(0,t.jsx)(n.Spinner,{}),suffix:d,children:(0,t.jsx)(i.Field,{className:a(),"data-slot":"input-item",...f})})}let o=e;export{e as Input,o as TextInput};
|
|
2
|
+
//# sourceMappingURL=input.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"components/input/input.js","sources":["webpack://@codefast/ui/./src/components/input/input.tsx"],"sourcesContent":["import type { ComponentProps, JSX } from \"react\";\n\nimport * as InputPrimitive from \"@codefast-ui/input\";\n\nimport type { VariantProps } from \"@/lib/utils\";\n\nimport { inputVariants } from \"@/components/input/input-variants\";\nimport { Spinner } from \"@/components/spinner\";\n\n/* -----------------------------------------------------------------------------\n * Variant: Input\n * -------------------------------------------------------------------------- */\n\nconst { input, root } = inputVariants();\n\n/* -----------------------------------------------------------------------------\n * Component: Input\n * -------------------------------------------------------------------------- */\n\nfunction Input({\n className,\n disabled,\n loaderPosition,\n loading,\n prefix,\n readOnly,\n spinner,\n suffix,\n ...props\n}: ComponentProps<typeof InputPrimitive.Root> &\n Omit<ComponentProps<typeof InputPrimitive.Field>, \"prefix\" | \"type\"> &\n VariantProps<typeof inputVariants> & {\n type?:\n | \"date\"\n | \"datetime-local\"\n | \"email\"\n | \"file\"\n | \"month\"\n | \"number\"\n | \"password\"\n | \"search\"\n | \"tel\"\n | \"text\"\n | \"time\"\n | \"url\"\n | \"week\";\n }): JSX.Element {\n return (\n <InputPrimitive.Root\n className={root({ className })}\n data-slot=\"input\"\n disabled={disabled}\n loaderPosition={loaderPosition}\n loading={loading}\n prefix={prefix}\n readOnly={readOnly}\n spinner={spinner || <Spinner />}\n suffix={suffix}\n >\n <InputPrimitive.Field className={input()} data-slot=\"input-item\" {...props} />\n </InputPrimitive.Root>\n );\n}\n\n/* -----------------------------------------------------------------------------\n * Deprecated\n * -------------------------------------------------------------------------- */\n\n/**\n * @deprecated\n * This component is an alias of the Input component.\n * Please use the Input component instead to ensure consistency.\n */\nconst TextInput = Input;\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport { Input, TextInput };\n"],"names":["input","root","inputVariants","Input","className","disabled","loaderPosition","loading","prefix","readOnly","spinner","suffix","props","InputPrimitive","Spinner","TextInput"],"mappings":"+IAaA,GAAM,CAAEA,MAAAA,CAAK,CAAEC,KAAAA,CAAI,CAAE,CAAGC,AAAAA,GAAAA,EAAAA,aAAAA,AAAAA,IAMxB,SAASC,EAAM,CACbC,UAAAA,CAAS,CACTC,SAAAA,CAAQ,CACRC,eAAAA,CAAc,CACdC,QAAAA,CAAO,CACPC,OAAAA,CAAM,CACNC,SAAAA,CAAQ,CACRC,QAAAA,CAAO,CACPC,OAAAA,CAAM,CACN,GAAGC,EAkBF,EACD,MACE,UAACC,EAAAA,IAAmB,EAClB,UAAWZ,EAAK,CAAEG,UAAAA,CAAU,GAC5B,YAAU,QACV,SAAUC,EACV,eAAgBC,EAChB,QAASC,EACT,OAAQC,EACR,SAAUC,EACV,QAASC,GAAW,UAACI,EAAAA,OAAOA,CAAAA,CAAAA,GAC5B,OAAQH,E,SAER,UAACE,EAAAA,KAAoB,EAAC,UAAWb,IAAS,YAAU,aAAc,GAAGY,CAAK,A,IAGhF,CAWA,IAAMG,EAAYZ,S"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import*as r from"react/jsx-runtime";import*as e from"@codefast-ui/input-number";import*as
|
|
1
|
+
import*as r from"react/jsx-runtime";import*as e from"@codefast-ui/input-number";import*as i from"lucide-react";import*as t from"./button/index.js";import*as o from"./input/index.js";import*as a from"./spinner.js";import*as n from"../lib/utils.js";let{input:s,root:u}=(0,o.inputVariants)();function d({id:o,ariaDecrementLabel:d,ariaIncrementLabel:l,className:c,defaultValue:p,disabled:m,formatOptions:b,loaderPosition:g,loading:h,max:v,min:f,onChange:x,prefix:j,readOnly:N,spinner:w,step:C,suffix:I,value:D,...V}){return(0,r.jsxs)(e.Root,{ariaDecrementLabel:d,ariaIncrementLabel:l,className:u({className:["group pr-0",c]}),"data-slot":"input-number",defaultValue:p,disabled:m,formatOptions:b,id:o,loaderPosition:g,loading:h,max:v,min:f,prefix:j,readOnly:N,spinner:w||(0,r.jsx)(a.Spinner,{}),step:C,suffix:I,value:D,onChange:x,children:[(0,r.jsx)(e.Field,{autoCapitalize:"none",autoComplete:"off",autoCorrect:"off",className:s(),spellCheck:"false",...V}),(0,r.jsxs)("div",{className:(0,n.cn)("divide-input border-l-input group-hover:not-group-focus-within:not-has-disabled:border-l-border-ring/60 group-hover:not-group-focus-within:not-has-disabled:divide-border-ring/60 group-focus-within:border-l-ring group-focus-within:divide-ring group-has-aria-invalid:border-l-destructive group-has-aria-invalid:divide-destructive group-hover:group-has-aria-invalid:not-group-focus-within:not-has-disabled:border-l-destructive/60 group-hover:group-has-aria-invalid:not-group-focus-within:not-has-disabled:divide-destructive/60 order-last ml-auto grid h-full shrink-0 divide-y border-l transition","*:[button]:focus-visible:ring-0 *:[button]:focus-visible:bg-ring/50 group-has-aria-invalid:*:[button]:focus-visible:bg-destructive/20 dark:group-has-aria-invalid:*:[button]:focus-visible:bg-destructive/40"),"data-slot":"input-number-buttons",children:[(0,r.jsx)(e.IncrementButton,{"aria-label":"Increment",className:(0,t.buttonVariants)({className:"text-muted-foreground h-auto rounded-none rounded-tr-[calc(var(--radius-lg)-1px)]",variant:"ghost"}),"data-slot":"input-number-increment-button",children:(0,r.jsx)(i.ChevronUpIcon,{})}),(0,r.jsx)(e.DecrementButton,{"aria-label":"Decrement",className:(0,t.buttonVariants)({className:"text-muted-foreground h-auto rounded-none rounded-br-[calc(var(--radius-lg)-1px)]",variant:"ghost"}),"data-slot":"input-number-decrement-button",children:(0,r.jsx)(i.ChevronDownIcon,{})})]})]})}let l=d;export{d as InputNumber,l as NumberInput};
|
|
2
2
|
//# sourceMappingURL=input-number.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"components/input-number.js","sources":["webpack://@codefast/ui/./src/components/input-number.tsx"],"sourcesContent":["import type { ComponentProps, JSX } from \"react\";\n\nimport * as InputNumberPrimitive from \"@codefast-ui/input-number\";\nimport { ChevronDownIcon, ChevronUpIcon } from \"lucide-react\";\n\nimport type { VariantProps } from \"@/lib/utils\";\n\nimport { buttonVariants } from \"@/components/button\";\nimport { inputVariants } from \"@/components/input\";\nimport { Spinner } from \"@/components/spinner\";\nimport { cn } from \"@/lib/utils\";\n\nconst { input, root } = inputVariants();\n\n/* -----------------------------------------------------------------------------\n * Component: InputNumber\n * -------------------------------------------------------------------------- */\n\nfunction InputNumber({\n id,\n ariaDecrementLabel,\n ariaIncrementLabel,\n className,\n defaultValue,\n disabled,\n formatOptions,\n loaderPosition,\n loading,\n max,\n min,\n onChange,\n prefix,\n readOnly,\n spinner,\n step,\n suffix,\n value,\n ...props\n}: ComponentProps<typeof InputNumberPrimitive.Field> &\n ComponentProps<typeof InputNumberPrimitive.Root> &\n VariantProps<typeof inputVariants>): JSX.Element {\n return (\n <InputNumberPrimitive.Root\n ariaDecrementLabel={ariaDecrementLabel}\n ariaIncrementLabel={ariaIncrementLabel}\n className={root({ className: [\"group pr-0\", className] })}\n data-slot=\"input-number\"\n defaultValue={defaultValue}\n disabled={disabled}\n formatOptions={formatOptions}\n id={id}\n loaderPosition={loaderPosition}\n loading={loading}\n max={max}\n min={min}\n prefix={prefix}\n readOnly={readOnly}\n spinner={spinner || <Spinner />}\n step={step}\n suffix={suffix}\n value={value}\n onChange={onChange}\n >\n <InputNumberPrimitive.Field\n autoCapitalize=\"none\"\n autoComplete=\"off\"\n autoCorrect=\"off\"\n className={input()}\n spellCheck=\"false\"\n {...props}\n />\n <div\n className={cn(\n \"divide-input border-l-input group-hover:not-group-focus-within:not-has-disabled:border-l-border-ring/60 group-hover:not-group-focus-within:not-has-disabled:divide-border-ring/60 group-focus-within:border-l-ring group-focus-within:divide-ring group-has-aria-invalid:border-l-destructive group-has-aria-invalid:divide-destructive group-hover:group-has-aria-invalid:not-group-focus-within:not-has-disabled:border-l-destructive/60 group-hover:group-has-aria-invalid:not-group-focus-within:not-has-disabled:divide-destructive/60 order-last ml-auto grid h-full shrink-0 divide-y border-l transition\",\n \"*:[button]:focus-visible:ring-0 *:[button]:focus-visible:bg-ring/50 group-has-aria-invalid:*:[button]:focus-visible:bg-destructive/20 dark:group-has-aria-invalid:*:[button]:focus-visible:bg-destructive/40\",\n )}\n data-slot=\"input-number-buttons\"\n >\n <InputNumberPrimitive.IncrementButton\n aria-label=\"Increment\"\n className={buttonVariants({\n className: \"text-muted-foreground h-auto rounded-none rounded-tr-[calc(var(--radius-lg)-1px)]\",\n variant: \"ghost\",\n })}\n data-slot=\"input-number-increment-button\"\n >\n <ChevronUpIcon />\n </InputNumberPrimitive.IncrementButton>\n <InputNumberPrimitive.DecrementButton\n aria-label=\"Decrement\"\n className={buttonVariants({\n className: \"text-muted-foreground h-auto rounded-none rounded-br-[calc(var(--radius-lg)-1px)]\",\n variant: \"ghost\",\n })}\n data-slot=\"input-number-decrement-button\"\n >\n <ChevronDownIcon />\n </InputNumberPrimitive.DecrementButton>\n </div>\n </InputNumberPrimitive.Root>\n );\n}\n\n/* -----------------------------------------------------------------------------\n * Deprecated\n * -------------------------------------------------------------------------- */\n\n/**\n * @deprecated\n * This component is an alias of the Input component.\n * Please use the Input component instead to ensure consistency.\n */\nconst NumberInput = InputNumber;\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport { InputNumber, NumberInput };\n"],"names":["input","root","inputVariants","InputNumber","id","ariaDecrementLabel","ariaIncrementLabel","className","defaultValue","disabled","formatOptions","loaderPosition","loading","max","min","onChange","prefix","readOnly","spinner","step","suffix","value","props","InputNumberPrimitive","Spinner","cn","buttonVariants","ChevronUpIcon","ChevronDownIcon","NumberInput"],"mappings":"
|
|
1
|
+
{"version":3,"file":"components/input-number.js","sources":["webpack://@codefast/ui/./src/components/input-number.tsx"],"sourcesContent":["import type { ComponentProps, JSX } from \"react\";\n\nimport * as InputNumberPrimitive from \"@codefast-ui/input-number\";\nimport { ChevronDownIcon, ChevronUpIcon } from \"lucide-react\";\n\nimport type { VariantProps } from \"@/lib/utils\";\n\nimport { buttonVariants } from \"@/components/button\";\nimport { inputVariants } from \"@/components/input\";\nimport { Spinner } from \"@/components/spinner\";\nimport { cn } from \"@/lib/utils\";\n\nconst { input, root } = inputVariants();\n\n/* -----------------------------------------------------------------------------\n * Component: InputNumber\n * -------------------------------------------------------------------------- */\n\nfunction InputNumber({\n id,\n ariaDecrementLabel,\n ariaIncrementLabel,\n className,\n defaultValue,\n disabled,\n formatOptions,\n loaderPosition,\n loading,\n max,\n min,\n onChange,\n prefix,\n readOnly,\n spinner,\n step,\n suffix,\n value,\n ...props\n}: ComponentProps<typeof InputNumberPrimitive.Field> &\n ComponentProps<typeof InputNumberPrimitive.Root> &\n VariantProps<typeof inputVariants>): JSX.Element {\n return (\n <InputNumberPrimitive.Root\n ariaDecrementLabel={ariaDecrementLabel}\n ariaIncrementLabel={ariaIncrementLabel}\n className={root({ className: [\"group pr-0\", className] })}\n data-slot=\"input-number\"\n defaultValue={defaultValue}\n disabled={disabled}\n formatOptions={formatOptions}\n id={id}\n loaderPosition={loaderPosition}\n loading={loading}\n max={max}\n min={min}\n prefix={prefix}\n readOnly={readOnly}\n spinner={spinner || <Spinner />}\n step={step}\n suffix={suffix}\n value={value}\n onChange={onChange}\n >\n <InputNumberPrimitive.Field\n autoCapitalize=\"none\"\n autoComplete=\"off\"\n autoCorrect=\"off\"\n className={input()}\n spellCheck=\"false\"\n {...props}\n />\n <div\n className={cn(\n \"divide-input border-l-input group-hover:not-group-focus-within:not-has-disabled:border-l-border-ring/60 group-hover:not-group-focus-within:not-has-disabled:divide-border-ring/60 group-focus-within:border-l-ring group-focus-within:divide-ring group-has-aria-invalid:border-l-destructive group-has-aria-invalid:divide-destructive group-hover:group-has-aria-invalid:not-group-focus-within:not-has-disabled:border-l-destructive/60 group-hover:group-has-aria-invalid:not-group-focus-within:not-has-disabled:divide-destructive/60 order-last ml-auto grid h-full shrink-0 divide-y border-l transition\",\n \"*:[button]:focus-visible:ring-0 *:[button]:focus-visible:bg-ring/50 group-has-aria-invalid:*:[button]:focus-visible:bg-destructive/20 dark:group-has-aria-invalid:*:[button]:focus-visible:bg-destructive/40\",\n )}\n data-slot=\"input-number-buttons\"\n >\n <InputNumberPrimitive.IncrementButton\n aria-label=\"Increment\"\n className={buttonVariants({\n className: \"text-muted-foreground h-auto rounded-none rounded-tr-[calc(var(--radius-lg)-1px)]\",\n variant: \"ghost\",\n })}\n data-slot=\"input-number-increment-button\"\n >\n <ChevronUpIcon />\n </InputNumberPrimitive.IncrementButton>\n <InputNumberPrimitive.DecrementButton\n aria-label=\"Decrement\"\n className={buttonVariants({\n className: \"text-muted-foreground h-auto rounded-none rounded-br-[calc(var(--radius-lg)-1px)]\",\n variant: \"ghost\",\n })}\n data-slot=\"input-number-decrement-button\"\n >\n <ChevronDownIcon />\n </InputNumberPrimitive.DecrementButton>\n </div>\n </InputNumberPrimitive.Root>\n );\n}\n\n/* -----------------------------------------------------------------------------\n * Deprecated\n * -------------------------------------------------------------------------- */\n\n/**\n * @deprecated\n * This component is an alias of the Input component.\n * Please use the Input component instead to ensure consistency.\n */\nconst NumberInput = InputNumber;\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport { InputNumber, NumberInput };\n"],"names":["input","root","inputVariants","InputNumber","id","ariaDecrementLabel","ariaIncrementLabel","className","defaultValue","disabled","formatOptions","loaderPosition","loading","max","min","onChange","prefix","readOnly","spinner","step","suffix","value","props","InputNumberPrimitive","Spinner","cn","buttonVariants","ChevronUpIcon","ChevronDownIcon","NumberInput"],"mappings":"uPAYA,GAAM,CAAEA,MAAAA,CAAK,CAAEC,KAAAA,CAAI,CAAE,CAAGC,AAAAA,GAAAA,EAAAA,aAAAA,AAAAA,IAMxB,SAASC,EAAY,CACnBC,GAAAA,CAAE,CACFC,mBAAAA,CAAkB,CAClBC,mBAAAA,CAAkB,CAClBC,UAAAA,CAAS,CACTC,aAAAA,CAAY,CACZC,SAAAA,CAAQ,CACRC,cAAAA,CAAa,CACbC,eAAAA,CAAc,CACdC,QAAAA,CAAO,CACPC,IAAAA,CAAG,CACHC,IAAAA,CAAG,CACHC,SAAAA,CAAQ,CACRC,OAAAA,CAAM,CACNC,SAAAA,CAAQ,CACRC,QAAAA,CAAO,CACPC,KAAAA,CAAI,CACJC,OAAAA,CAAM,CACNC,MAAAA,CAAK,CACL,GAAGC,EAG+B,EAClC,MACE,WAACC,EAAAA,IAAyB,EACxB,mBAAoBlB,EACpB,mBAAoBC,EACpB,UAAWL,EAAK,CAAE,UAAW,CAAC,aAAcM,EAAU,AAAC,GACvD,YAAU,eACV,aAAcC,EACd,SAAUC,EACV,cAAeC,EACf,GAAIN,EACJ,eAAgBO,EAChB,QAASC,EACT,IAAKC,EACL,IAAKC,EACL,OAAQE,EACR,SAAUC,EACV,QAASC,GAAW,UAACM,EAAAA,OAAOA,CAAAA,CAAAA,GAC5B,KAAML,EACN,OAAQC,EACR,MAAOC,EACP,SAAUN,E,UAEV,UAACQ,EAAAA,KAA0B,EACzB,eAAe,OACf,aAAa,MACb,YAAY,MACZ,UAAWvB,IACX,WAAW,QACV,GAAGsB,CAAK,A,GAEX,WAAC,OACC,UAAWG,AAAAA,GAAAA,EAAAA,EAAAA,AAAAA,EACT,mlBACA,gNAEF,YAAU,uB,UAEV,UAACF,EAAAA,eAAoC,EACnC,aAAW,YACX,UAAWG,AAAAA,GAAAA,EAAAA,cAAAA,AAAAA,EAAe,CACxB,UAAW,oFACX,QAAS,OACX,GACA,YAAU,gC,SAEV,UAACC,EAAAA,aAAaA,CAAAA,CAAAA,E,GAEhB,UAACJ,EAAAA,eAAoC,EACnC,aAAW,YACX,UAAWG,AAAAA,GAAAA,EAAAA,cAAAA,AAAAA,EAAe,CACxB,UAAW,oFACX,QAAS,OACX,GACA,YAAU,gC,SAEV,UAACE,EAAAA,eAAeA,CAAAA,CAAAA,E,QAK1B,CAWA,IAAMC,EAAc1B,S"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import*as s from"react/jsx-runtime";import*as a from"@codefast-ui/input";import*as o from"lucide-react";import*as t from"react";import*as i from"./button.js";import*as
|
|
2
|
+
import*as s from"react/jsx-runtime";import*as a from"@codefast-ui/input";import*as o from"lucide-react";import*as t from"react";import*as i from"./button/index.js";import*as e from"./input/index.js";import*as r from"./spinner.js";let{input:n,root:p}=(0,e.inputVariants)();function d({className:e,disabled:d,loaderPosition:l,loading:u,prefix:m,readOnly:c,spinner:f,suffix:x,...w}){let[j,b]=(0,t.useState)("password"),g=(0,t.useCallback)(()=>{b(s=>"password"===s?"text":"password")},[]);return(0,s.jsxs)(a.Root,{className:p({className:[!x&&"pr-1.5",e]}),"data-slot":"input-password",disabled:d,loaderPosition:l,loading:u,prefix:m,readOnly:c,spinner:f||(0,s.jsx)(r.Spinner,{}),suffix:x,children:[(0,s.jsx)(a.Field,{autoCapitalize:"none",className:n(),"data-slot":"input-password-item",type:j,...w}),(0,s.jsx)(i.Button,{"aria-label":"password"===j?"Show password":"Hide password",className:"focus-visible:not-disabled:bg-input size-7 rounded-full focus-visible:ring-0","data-slot":"input-password-toggle",disabled:d,prefix:"password"===j?(0,s.jsx)(o.EyeOffIcon,{}):(0,s.jsx)(o.EyeIcon,{}),size:"icon",variant:"ghost",onClick:g})]})}let l=d;export{d as InputPassword,l as PasswordInput};
|
|
3
3
|
//# sourceMappingURL=input-password.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"components/input-password.js","sources":["webpack://@codefast/ui/./src/components/input-password.tsx"],"sourcesContent":["\n\nimport type { ComponentProps, JSX, MouseEventHandler } from \"react\";\n\nimport * as InputPrimitive from \"@codefast-ui/input\";\nimport { EyeIcon, EyeOffIcon } from \"lucide-react\";\nimport { useCallback, useState } from \"react\";\n\nimport type { VariantProps } from \"@/lib/utils\";\n\nimport { Button } from \"@/components/button\";\nimport { inputVariants } from \"@/components/input\";\nimport { Spinner } from \"@/components/spinner\";\n\n/* -----------------------------------------------------------------------------\n * Variant: InputPassword\n * -------------------------------------------------------------------------- */\n\nconst { input, root } = inputVariants();\n\n/* -----------------------------------------------------------------------------\n * Component: InputPassword\n * -------------------------------------------------------------------------- */\n\nfunction InputPassword({\n className,\n disabled,\n loaderPosition,\n loading,\n prefix,\n readOnly,\n spinner,\n suffix,\n ...props\n}: ComponentProps<typeof InputPrimitive.Root> &\n Omit<ComponentProps<typeof InputPrimitive.Field>, \"prefix\" | \"type\"> &\n VariantProps<typeof inputVariants>): JSX.Element {\n const [type, setType] = useState<\"password\" | \"text\">(\"password\");\n\n const togglePasswordVisibility = useCallback<MouseEventHandler<HTMLButtonElement>>(() => {\n setType((prev) => (prev === \"password\" ? \"text\" : \"password\"));\n }, []);\n\n return (\n <InputPrimitive.Root\n className={root({ className: [!suffix && \"pr-1.5\", className] })}\n data-slot=\"input-password\"\n disabled={disabled}\n loaderPosition={loaderPosition}\n loading={loading}\n prefix={prefix}\n readOnly={readOnly}\n spinner={spinner || <Spinner />}\n suffix={suffix}\n >\n <InputPrimitive.Field\n autoCapitalize=\"none\"\n className={input()}\n data-slot=\"input-password-item\"\n type={type}\n {...props}\n />\n <Button\n aria-label={type === \"password\" ? \"Show password\" : \"Hide password\"}\n className=\"focus-visible:not-disabled:bg-input size-7 rounded-full focus-visible:ring-0\"\n data-slot=\"input-password-toggle\"\n disabled={disabled}\n prefix={type === \"password\" ? <EyeOffIcon /> : <EyeIcon />}\n size=\"icon\"\n variant=\"ghost\"\n onClick={togglePasswordVisibility}\n />\n </InputPrimitive.Root>\n );\n}\n\n/* -----------------------------------------------------------------------------\n * Deprecated\n * -------------------------------------------------------------------------- */\n\n/**\n * @deprecated\n * This component is an alias of the Input component.\n * Please use the Input component instead to ensure consistency.\n */\nconst PasswordInput = InputPassword;\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport { InputPassword, PasswordInput };\n"],"names":["input","root","inputVariants","InputPassword","className","disabled","loaderPosition","loading","prefix","readOnly","spinner","suffix","props","type","setType","useState","togglePasswordVisibility","useCallback","prev","InputPrimitive","Spinner","Button","EyeOffIcon","EyeIcon","PasswordInput"],"mappings":";
|
|
1
|
+
{"version":3,"file":"components/input-password.js","sources":["webpack://@codefast/ui/./src/components/input-password.tsx"],"sourcesContent":["\n\nimport type { ComponentProps, JSX, MouseEventHandler } from \"react\";\n\nimport * as InputPrimitive from \"@codefast-ui/input\";\nimport { EyeIcon, EyeOffIcon } from \"lucide-react\";\nimport { useCallback, useState } from \"react\";\n\nimport type { VariantProps } from \"@/lib/utils\";\n\nimport { Button } from \"@/components/button\";\nimport { inputVariants } from \"@/components/input\";\nimport { Spinner } from \"@/components/spinner\";\n\n/* -----------------------------------------------------------------------------\n * Variant: InputPassword\n * -------------------------------------------------------------------------- */\n\nconst { input, root } = inputVariants();\n\n/* -----------------------------------------------------------------------------\n * Component: InputPassword\n * -------------------------------------------------------------------------- */\n\nfunction InputPassword({\n className,\n disabled,\n loaderPosition,\n loading,\n prefix,\n readOnly,\n spinner,\n suffix,\n ...props\n}: ComponentProps<typeof InputPrimitive.Root> &\n Omit<ComponentProps<typeof InputPrimitive.Field>, \"prefix\" | \"type\"> &\n VariantProps<typeof inputVariants>): JSX.Element {\n const [type, setType] = useState<\"password\" | \"text\">(\"password\");\n\n const togglePasswordVisibility = useCallback<MouseEventHandler<HTMLButtonElement>>(() => {\n setType((prev) => (prev === \"password\" ? \"text\" : \"password\"));\n }, []);\n\n return (\n <InputPrimitive.Root\n className={root({ className: [!suffix && \"pr-1.5\", className] })}\n data-slot=\"input-password\"\n disabled={disabled}\n loaderPosition={loaderPosition}\n loading={loading}\n prefix={prefix}\n readOnly={readOnly}\n spinner={spinner || <Spinner />}\n suffix={suffix}\n >\n <InputPrimitive.Field\n autoCapitalize=\"none\"\n className={input()}\n data-slot=\"input-password-item\"\n type={type}\n {...props}\n />\n <Button\n aria-label={type === \"password\" ? \"Show password\" : \"Hide password\"}\n className=\"focus-visible:not-disabled:bg-input size-7 rounded-full focus-visible:ring-0\"\n data-slot=\"input-password-toggle\"\n disabled={disabled}\n prefix={type === \"password\" ? <EyeOffIcon /> : <EyeIcon />}\n size=\"icon\"\n variant=\"ghost\"\n onClick={togglePasswordVisibility}\n />\n </InputPrimitive.Root>\n );\n}\n\n/* -----------------------------------------------------------------------------\n * Deprecated\n * -------------------------------------------------------------------------- */\n\n/**\n * @deprecated\n * This component is an alias of the Input component.\n * Please use the Input component instead to ensure consistency.\n */\nconst PasswordInput = InputPassword;\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport { InputPassword, PasswordInput };\n"],"names":["input","root","inputVariants","InputPassword","className","disabled","loaderPosition","loading","prefix","readOnly","spinner","suffix","props","type","setType","useState","togglePasswordVisibility","useCallback","prev","InputPrimitive","Spinner","Button","EyeOffIcon","EyeIcon","PasswordInput"],"mappings":";sOAkBA,GAAM,CAAEA,MAAAA,CAAK,CAAEC,KAAAA,CAAI,CAAE,CAAGC,GAAAA,EAAAA,aAAAA,IAMxB,SAASC,EAAc,CACrBC,UAAAA,CAAS,CACTC,SAAAA,CAAQ,CACRC,eAAAA,CAAc,CACdC,QAAAA,CAAO,CACPC,OAAAA,CAAM,CACNC,SAAAA,CAAQ,CACRC,QAAAA,CAAO,CACPC,OAAAA,CAAM,CACN,GAAGC,EAG+B,EAClC,GAAM,CAACC,EAAMC,EAAQ,CAAGC,GAAAA,EAAAA,QAAAA,EAA8B,YAEhDC,EAA2BC,GAAAA,EAAAA,WAAAA,EAAkD,KACjFH,EAAQ,GAAWI,aAAAA,EAAsB,OAAS,WACpD,EAAG,EAAE,EAEL,MACE,WAACC,EAAAA,IAAmB,EAClB,UAAWlB,EAAK,CAAE,UAAW,CAAC,CAACU,GAAU,SAAUP,EAAU,GAC7D,YAAU,iBACV,SAAUC,EACV,eAAgBC,EAChB,QAASC,EACT,OAAQC,EACR,SAAUC,EACV,QAASC,GAAW,UAACU,EAAAA,OAAOA,CAAAA,CAAAA,GAC5B,OAAQT,E,UAER,UAACQ,EAAAA,KAAoB,EACnB,eAAe,OACf,UAAWnB,IACX,YAAU,sBACV,KAAMa,EACL,GAAGD,CAAK,GAEX,UAACS,EAAAA,MAAMA,CAAAA,CACL,aAAYR,aAAAA,EAAsB,gBAAkB,gBACpD,UAAU,+EACV,YAAU,wBACV,SAAUR,EACV,OAAQQ,aAAAA,EAAsB,UAACS,EAAAA,UAAUA,CAAAA,CAAAA,GAAM,UAACC,EAAAA,OAAOA,CAAAA,CAAAA,GACvD,KAAK,OACL,QAAQ,QACR,QAASP,C,KAIjB,CAWA,IAAMQ,EAAgBrB,S"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import*as a from"react/jsx-runtime";import*as e from"@codefast-ui/input";import*as s from"@radix-ui/react-use-controllable-state";import*as t from"lucide-react";import*as r from"./button.js";import*as i from"./input.js";import*as o from"./spinner.js";let{input:
|
|
2
|
+
import*as a from"react/jsx-runtime";import*as e from"@codefast-ui/input";import*as s from"@radix-ui/react-use-controllable-state";import*as t from"lucide-react";import*as r from"./button/index.js";import*as i from"./input/index.js";import*as o from"./spinner.js";let{input:n,root:l}=(0,i.inputVariants)();function u({className:i,defaultValue:u,disabled:c,loaderPosition:p,loading:d,onChange:m,prefix:f,readOnly:x,spinner:h,suffix:b,value:j,...g}){let[v,S]=(0,s.useControllableState)({defaultProp:u,onChange:m,prop:j});return(0,a.jsxs)(e.Root,{className:l({className:[!b&&"pr-1.5",i]}),"data-slot":"input-search",disabled:c,loaderPosition:p,loading:d,prefix:f||(0,a.jsx)(t.SearchIcon,{}),readOnly:x,spinner:h||(0,a.jsx)(o.Spinner,{}),suffix:b,children:[(0,a.jsx)(e.Field,{className:n(),"data-slot":"input-search-item",type:"search",value:v??"",onChange:a=>{S(a.target.value)},...g}),v?(0,a.jsx)(r.Button,{"aria-label":"Clear search",className:"focus-visible:not-disabled:bg-input size-7 rounded-full focus-visible:ring-0","data-slot":"input-search-clear",disabled:c||x,size:"icon",suffix:(0,a.jsx)(t.XIcon,{}),variant:"ghost",onClick:()=>{S("")}}):null]})}let c=u;export{u as InputSearch,c as SearchInput};
|
|
3
3
|
//# sourceMappingURL=input-search.js.map
|