eai-frontend-components 2.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +299 -0
- package/dist/components/accordion.d.ts +8 -0
- package/dist/components/accordion.d.ts.map +1 -0
- package/dist/components/accordion.js +13 -0
- package/dist/components/alert-dialog.d.ts +25 -0
- package/dist/components/alert-dialog.d.ts.map +1 -0
- package/dist/components/alert-dialog.js +27 -0
- package/dist/components/alert.d.ts +9 -0
- package/dist/components/alert.d.ts.map +1 -0
- package/dist/components/alert.js +22 -0
- package/dist/components/avatar.d.ts +7 -0
- package/dist/components/avatar.d.ts.map +1 -0
- package/dist/components/avatar.js +11 -0
- package/dist/components/badge.d.ts +10 -0
- package/dist/components/badge.d.ts.map +1 -0
- package/dist/components/badge.js +26 -0
- package/dist/components/breadcrumb.d.ts +20 -0
- package/dist/components/breadcrumb.d.ts.map +1 -0
- package/dist/components/breadcrumb.js +23 -0
- package/dist/components/button.d.ts +12 -0
- package/dist/components/button.d.ts.map +1 -0
- package/dist/components/button.js +33 -0
- package/dist/components/calendar.d.ts +9 -0
- package/dist/components/calendar.d.ts.map +1 -0
- package/dist/components/calendar.js +70 -0
- package/dist/components/card.d.ts +9 -0
- package/dist/components/card.d.ts.map +1 -0
- package/dist/components/card.js +16 -0
- package/dist/components/carousel.d.ts +19 -0
- package/dist/components/carousel.d.ts.map +1 -0
- package/dist/components/carousel.js +98 -0
- package/dist/components/chart.d.ts +63 -0
- package/dist/components/chart.d.ts.map +1 -0
- package/dist/components/chart.js +130 -0
- package/dist/components/checkbox.d.ts +5 -0
- package/dist/components/checkbox.d.ts.map +1 -0
- package/dist/components/checkbox.js +8 -0
- package/dist/components/collapsible.d.ts +6 -0
- package/dist/components/collapsible.d.ts.map +1 -0
- package/dist/components/collapsible.js +5 -0
- package/dist/components/command.d.ts +81 -0
- package/dist/components/command.d.ts.map +1 -0
- package/dist/components/command.js +28 -0
- package/dist/components/context-menu.d.ts +28 -0
- package/dist/components/context-menu.d.ts.map +1 -0
- package/dist/components/context-menu.js +33 -0
- package/dist/components/custom/date-picker.d.ts +12 -0
- package/dist/components/custom/date-picker.d.ts.map +1 -0
- package/dist/components/custom/date-picker.js +35 -0
- package/dist/components/custom/form/checkbox.d.ts +13 -0
- package/dist/components/custom/form/checkbox.d.ts.map +1 -0
- package/dist/components/custom/form/checkbox.js +15 -0
- package/dist/components/custom/form/color.d.ts +15 -0
- package/dist/components/custom/form/color.d.ts.map +1 -0
- package/dist/components/custom/form/color.js +40 -0
- package/dist/components/custom/form/combobox.d.ts +37 -0
- package/dist/components/custom/form/combobox.d.ts.map +1 -0
- package/dist/components/custom/form/combobox.js +82 -0
- package/dist/components/custom/form/cpf-cnpj.d.ts +16 -0
- package/dist/components/custom/form/cpf-cnpj.d.ts.map +1 -0
- package/dist/components/custom/form/cpf-cnpj.js +32 -0
- package/dist/components/custom/form/currency.d.ts +14 -0
- package/dist/components/custom/form/currency.d.ts.map +1 -0
- package/dist/components/custom/form/currency.js +15 -0
- package/dist/components/custom/form/date-range.d.ts +16 -0
- package/dist/components/custom/form/date-range.d.ts.map +1 -0
- package/dist/components/custom/form/date-range.js +24 -0
- package/dist/components/custom/form/date.d.ts +16 -0
- package/dist/components/custom/form/date.d.ts.map +1 -0
- package/dist/components/custom/form/date.js +35 -0
- package/dist/components/custom/form/decimal.d.ts +14 -0
- package/dist/components/custom/form/decimal.d.ts.map +1 -0
- package/dist/components/custom/form/decimal.js +15 -0
- package/dist/components/custom/form/file.d.ts +15 -0
- package/dist/components/custom/form/file.d.ts.map +1 -0
- package/dist/components/custom/form/file.js +18 -0
- package/dist/components/custom/form/form-help-text.d.ts +3 -0
- package/dist/components/custom/form/form-help-text.d.ts.map +1 -0
- package/dist/components/custom/form/form-help-text.js +7 -0
- package/dist/components/custom/form/form-label.d.ts +4 -0
- package/dist/components/custom/form/form-label.d.ts.map +1 -0
- package/dist/components/custom/form/form-label.js +9 -0
- package/dist/components/custom/form/form-message.d.ts +3 -0
- package/dist/components/custom/form/form-message.d.ts.map +1 -0
- package/dist/components/custom/form/form-message.js +5 -0
- package/dist/components/custom/form/ghost.d.ts +8 -0
- package/dist/components/custom/form/ghost.d.ts.map +1 -0
- package/dist/components/custom/form/ghost.js +8 -0
- package/dist/components/custom/form/input.d.ts +18 -0
- package/dist/components/custom/form/input.d.ts.map +1 -0
- package/dist/components/custom/form/input.js +14 -0
- package/dist/components/custom/form/mask.d.ts +19 -0
- package/dist/components/custom/form/mask.d.ts.map +1 -0
- package/dist/components/custom/form/mask.js +19 -0
- package/dist/components/custom/form/multi-select-old.d.ts +19 -0
- package/dist/components/custom/form/multi-select-old.d.ts.map +1 -0
- package/dist/components/custom/form/multi-select-old.js +30 -0
- package/dist/components/custom/form/multi-select.d.ts +26 -0
- package/dist/components/custom/form/multi-select.d.ts.map +1 -0
- package/dist/components/custom/form/multi-select.js +66 -0
- package/dist/components/custom/form/password.d.ts +16 -0
- package/dist/components/custom/form/password.d.ts.map +1 -0
- package/dist/components/custom/form/password.js +14 -0
- package/dist/components/custom/form/percent.d.ts +14 -0
- package/dist/components/custom/form/percent.d.ts.map +1 -0
- package/dist/components/custom/form/percent.js +15 -0
- package/dist/components/custom/form/phone.d.ts +16 -0
- package/dist/components/custom/form/phone.d.ts.map +1 -0
- package/dist/components/custom/form/phone.js +23 -0
- package/dist/components/custom/form/radio-group.d.ts +23 -0
- package/dist/components/custom/form/radio-group.d.ts.map +1 -0
- package/dist/components/custom/form/radio-group.js +15 -0
- package/dist/components/custom/form/select.d.ts +20 -0
- package/dist/components/custom/form/select.d.ts.map +1 -0
- package/dist/components/custom/form/select.js +12 -0
- package/dist/components/custom/form/step-new-form.d.ts +10 -0
- package/dist/components/custom/form/step-new-form.d.ts.map +1 -0
- package/dist/components/custom/form/step-new-form.js +13 -0
- package/dist/components/custom/form/switch.d.ts +13 -0
- package/dist/components/custom/form/switch.d.ts.map +1 -0
- package/dist/components/custom/form/switch.js +16 -0
- package/dist/components/custom/form/text.d.ts +18 -0
- package/dist/components/custom/form/text.d.ts.map +1 -0
- package/dist/components/custom/form/text.js +14 -0
- package/dist/components/custom/form/textarea.d.ts +16 -0
- package/dist/components/custom/form/textarea.d.ts.map +1 -0
- package/dist/components/custom/form/textarea.js +19 -0
- package/dist/components/custom/form/utils.d.ts +18 -0
- package/dist/components/custom/form/utils.d.ts.map +1 -0
- package/dist/components/custom/form/utils.js +88 -0
- package/dist/components/custom/header.d.ts +3 -0
- package/dist/components/custom/header.d.ts.map +1 -0
- package/dist/components/custom/header.js +94 -0
- package/dist/components/custom/label.d.ts +13 -0
- package/dist/components/custom/label.d.ts.map +1 -0
- package/dist/components/custom/label.js +20 -0
- package/dist/components/custom/not-found.d.ts +3 -0
- package/dist/components/custom/not-found.d.ts.map +1 -0
- package/dist/components/custom/not-found.js +9 -0
- package/dist/components/custom/sidebar/app-sidebar.d.ts +5 -0
- package/dist/components/custom/sidebar/app-sidebar.d.ts.map +1 -0
- package/dist/components/custom/sidebar/app-sidebar.js +26 -0
- package/dist/components/custom/sidebar/module-switcher.d.ts +3 -0
- package/dist/components/custom/sidebar/module-switcher.d.ts.map +1 -0
- package/dist/components/custom/sidebar/module-switcher.js +55 -0
- package/dist/components/custom/sidebar/nav-footer.d.ts +3 -0
- package/dist/components/custom/sidebar/nav-footer.d.ts.map +1 -0
- package/dist/components/custom/sidebar/nav-footer.js +17 -0
- package/dist/components/custom/sidebar/nav-main.d.ts +3 -0
- package/dist/components/custom/sidebar/nav-main.d.ts.map +1 -0
- package/dist/components/custom/sidebar/nav-main.js +32 -0
- package/dist/components/custom/sidebar/nav-submenu-collapsible.d.ts +9 -0
- package/dist/components/custom/sidebar/nav-submenu-collapsible.d.ts.map +1 -0
- package/dist/components/custom/sidebar/nav-submenu-collapsible.js +21 -0
- package/dist/components/custom/sidebar/nav-submenu-dropdown.d.ts +10 -0
- package/dist/components/custom/sidebar/nav-submenu-dropdown.d.ts.map +1 -0
- package/dist/components/custom/sidebar/nav-submenu-dropdown.js +13 -0
- package/dist/components/custom/sidebar/nav-user.d.ts +3 -0
- package/dist/components/custom/sidebar/nav-user.d.ts.map +1 -0
- package/dist/components/custom/sidebar/nav-user.js +51 -0
- package/dist/components/custom/sidebar/sidebar-button.d.ts +9 -0
- package/dist/components/custom/sidebar/sidebar-button.d.ts.map +1 -0
- package/dist/components/custom/sidebar/sidebar-button.js +7 -0
- package/dist/components/custom/sidebar/sidebar-item-two-lines.d.ts +12 -0
- package/dist/components/custom/sidebar/sidebar-item-two-lines.d.ts.map +1 -0
- package/dist/components/custom/sidebar/sidebar-item-two-lines.js +5 -0
- package/dist/components/custom/sidebar/sidebar-item.d.ts +9 -0
- package/dist/components/custom/sidebar/sidebar-item.d.ts.map +1 -0
- package/dist/components/custom/sidebar/sidebar-item.js +7 -0
- package/dist/components/custom/sidebar/types/sidebar.d.ts +29 -0
- package/dist/components/custom/sidebar/types/sidebar.d.ts.map +1 -0
- package/dist/components/custom/sidebar/types/sidebar.js +5 -0
- package/dist/components/custom/table/data-table-export.d.ts +8 -0
- package/dist/components/custom/table/data-table-export.d.ts.map +1 -0
- package/dist/components/custom/table/data-table-export.js +65 -0
- package/dist/components/custom/table/data-table-footer.d.ts +25 -0
- package/dist/components/custom/table/data-table-footer.d.ts.map +1 -0
- package/dist/components/custom/table/data-table-footer.js +39 -0
- package/dist/components/custom/table/data-table-header.d.ts +9 -0
- package/dist/components/custom/table/data-table-header.d.ts.map +1 -0
- package/dist/components/custom/table/data-table-header.js +11 -0
- package/dist/components/custom/table/data-table-rows.d.ts +13 -0
- package/dist/components/custom/table/data-table-rows.d.ts.map +1 -0
- package/dist/components/custom/table/data-table-rows.js +25 -0
- package/dist/components/custom/table/data-table.d.ts +35 -0
- package/dist/components/custom/table/data-table.d.ts.map +1 -0
- package/dist/components/custom/table/data-table.js +99 -0
- package/dist/components/custom/table/types/data-table.d.ts +29 -0
- package/dist/components/custom/table/types/data-table.d.ts.map +1 -0
- package/dist/components/custom/table/types/data-table.js +1 -0
- package/dist/components/custom/theme-provider.d.ts +24 -0
- package/dist/components/custom/theme-provider.d.ts.map +1 -0
- package/dist/components/custom/theme-provider.js +79 -0
- package/dist/components/dateRangePicker.d.ts +3 -0
- package/dist/components/dateRangePicker.d.ts.map +1 -0
- package/dist/components/dateRangePicker.js +15 -0
- package/dist/components/dialog.d.ts +23 -0
- package/dist/components/dialog.d.ts.map +1 -0
- package/dist/components/dialog.js +23 -0
- package/dist/components/drawer.d.ts +23 -0
- package/dist/components/drawer.d.ts.map +1 -0
- package/dist/components/drawer.js +22 -0
- package/dist/components/dropdown-menu.d.ts +28 -0
- package/dist/components/dropdown-menu.d.ts.map +1 -0
- package/dist/components/dropdown-menu.js +32 -0
- package/dist/components/form.d.ts +24 -0
- package/dist/components/form.d.ts.map +1 -0
- package/dist/components/form.js +60 -0
- package/dist/components/hover-card.d.ts +7 -0
- package/dist/components/hover-card.d.ts.map +1 -0
- package/dist/components/hover-card.js +9 -0
- package/dist/components/input.d.ts +24 -0
- package/dist/components/input.d.ts.map +1 -0
- package/dist/components/input.js +71 -0
- package/dist/components/label.d.ts +6 -0
- package/dist/components/label.d.ts.map +1 -0
- package/dist/components/label.js +9 -0
- package/dist/components/masks.d.ts +17 -0
- package/dist/components/masks.d.ts.map +1 -0
- package/dist/components/masks.js +25 -0
- package/dist/components/pagination.d.ts +30 -0
- package/dist/components/pagination.d.ts.map +1 -0
- package/dist/components/pagination.js +23 -0
- package/dist/components/popover.d.ts +7 -0
- package/dist/components/popover.d.ts.map +1 -0
- package/dist/components/popover.js +11 -0
- package/dist/components/progress.d.ts +5 -0
- package/dist/components/progress.d.ts.map +1 -0
- package/dist/components/progress.js +7 -0
- package/dist/components/radio-group.d.ts +6 -0
- package/dist/components/radio-group.d.ts.map +1 -0
- package/dist/components/radio-group.js +14 -0
- package/dist/components/scroll-area.d.ts +6 -0
- package/dist/components/scroll-area.d.ts.map +1 -0
- package/dist/components/scroll-area.js +11 -0
- package/dist/components/select.d.ts +14 -0
- package/dist/components/select.d.ts.map +1 -0
- package/dist/components/select.js +24 -0
- package/dist/components/separator.d.ts +5 -0
- package/dist/components/separator.d.ts.map +1 -0
- package/dist/components/separator.js +7 -0
- package/dist/components/sheet.d.ts +26 -0
- package/dist/components/sheet.d.ts.map +1 -0
- package/dist/components/sheet.js +37 -0
- package/dist/components/sidebar.d.ts +67 -0
- package/dist/components/sidebar.d.ts.map +1 -0
- package/dist/components/sidebar.js +221 -0
- package/dist/components/skeleton.d.ts +3 -0
- package/dist/components/skeleton.d.ts.map +1 -0
- package/dist/components/skeleton.js +6 -0
- package/dist/components/slider.d.ts +5 -0
- package/dist/components/slider.d.ts.map +1 -0
- package/dist/components/slider.js +7 -0
- package/dist/components/switch.d.ts +5 -0
- package/dist/components/switch.d.ts.map +1 -0
- package/dist/components/switch.js +7 -0
- package/dist/components/table.d.ts +11 -0
- package/dist/components/table.d.ts.map +1 -0
- package/dist/components/table.js +20 -0
- package/dist/components/tabs.d.ts +8 -0
- package/dist/components/tabs.d.ts.map +1 -0
- package/dist/components/tabs.js +12 -0
- package/dist/components/textarea.d.ts +4 -0
- package/dist/components/textarea.d.ts.map +1 -0
- package/dist/components/textarea.js +14 -0
- package/dist/components/toast.d.ts +16 -0
- package/dist/components/toast.d.ts.map +1 -0
- package/dist/components/toast.js +34 -0
- package/dist/components/toaster.d.ts +2 -0
- package/dist/components/toaster.d.ts.map +1 -0
- package/dist/components/toaster.js +21 -0
- package/dist/components/tooltip.d.ts +8 -0
- package/dist/components/tooltip.d.ts.map +1 -0
- package/dist/components/tooltip.js +10 -0
- package/dist/components/ui/accordion.d.ts +8 -0
- package/dist/components/ui/accordion.d.ts.map +1 -0
- package/dist/components/ui/accordion.js +13 -0
- package/dist/components/ui/alert-dialog.d.ts +25 -0
- package/dist/components/ui/alert-dialog.d.ts.map +1 -0
- package/dist/components/ui/alert-dialog.js +27 -0
- package/dist/components/ui/alert.d.ts +9 -0
- package/dist/components/ui/alert.d.ts.map +1 -0
- package/dist/components/ui/alert.js +22 -0
- package/dist/components/ui/avatar.d.ts +7 -0
- package/dist/components/ui/avatar.d.ts.map +1 -0
- package/dist/components/ui/avatar.js +11 -0
- package/dist/components/ui/badge.d.ts +10 -0
- package/dist/components/ui/badge.d.ts.map +1 -0
- package/dist/components/ui/badge.js +26 -0
- package/dist/components/ui/breadcrumb.d.ts +20 -0
- package/dist/components/ui/breadcrumb.d.ts.map +1 -0
- package/dist/components/ui/breadcrumb.js +23 -0
- package/dist/components/ui/button.d.ts +12 -0
- package/dist/components/ui/button.d.ts.map +1 -0
- package/dist/components/ui/button.js +33 -0
- package/dist/components/ui/calendar.d.ts +9 -0
- package/dist/components/ui/calendar.d.ts.map +1 -0
- package/dist/components/ui/calendar.js +70 -0
- package/dist/components/ui/card.d.ts +9 -0
- package/dist/components/ui/card.d.ts.map +1 -0
- package/dist/components/ui/card.js +16 -0
- package/dist/components/ui/carousel.d.ts +19 -0
- package/dist/components/ui/carousel.d.ts.map +1 -0
- package/dist/components/ui/carousel.js +98 -0
- package/dist/components/ui/chart.d.ts +63 -0
- package/dist/components/ui/chart.d.ts.map +1 -0
- package/dist/components/ui/chart.js +130 -0
- package/dist/components/ui/checkbox.d.ts +5 -0
- package/dist/components/ui/checkbox.d.ts.map +1 -0
- package/dist/components/ui/checkbox.js +8 -0
- package/dist/components/ui/collapsible.d.ts +6 -0
- package/dist/components/ui/collapsible.d.ts.map +1 -0
- package/dist/components/ui/collapsible.js +5 -0
- package/dist/components/ui/command.d.ts +81 -0
- package/dist/components/ui/command.d.ts.map +1 -0
- package/dist/components/ui/command.js +28 -0
- package/dist/components/ui/context-menu.d.ts +28 -0
- package/dist/components/ui/context-menu.d.ts.map +1 -0
- package/dist/components/ui/context-menu.js +33 -0
- package/dist/components/ui/custom/date-picker.d.ts +12 -0
- package/dist/components/ui/custom/date-picker.d.ts.map +1 -0
- package/dist/components/ui/custom/date-picker.js +35 -0
- package/dist/components/ui/custom/form/checkbox.d.ts +13 -0
- package/dist/components/ui/custom/form/checkbox.d.ts.map +1 -0
- package/dist/components/ui/custom/form/checkbox.js +15 -0
- package/dist/components/ui/custom/form/color.d.ts +15 -0
- package/dist/components/ui/custom/form/color.d.ts.map +1 -0
- package/dist/components/ui/custom/form/color.js +40 -0
- package/dist/components/ui/custom/form/combobox.d.ts +37 -0
- package/dist/components/ui/custom/form/combobox.d.ts.map +1 -0
- package/dist/components/ui/custom/form/combobox.js +82 -0
- package/dist/components/ui/custom/form/cpf-cnpj.d.ts +16 -0
- package/dist/components/ui/custom/form/cpf-cnpj.d.ts.map +1 -0
- package/dist/components/ui/custom/form/cpf-cnpj.js +32 -0
- package/dist/components/ui/custom/form/currency.d.ts +14 -0
- package/dist/components/ui/custom/form/currency.d.ts.map +1 -0
- package/dist/components/ui/custom/form/currency.js +15 -0
- package/dist/components/ui/custom/form/date-range.d.ts +16 -0
- package/dist/components/ui/custom/form/date-range.d.ts.map +1 -0
- package/dist/components/ui/custom/form/date-range.js +24 -0
- package/dist/components/ui/custom/form/date.d.ts +16 -0
- package/dist/components/ui/custom/form/date.d.ts.map +1 -0
- package/dist/components/ui/custom/form/date.js +35 -0
- package/dist/components/ui/custom/form/decimal.d.ts +14 -0
- package/dist/components/ui/custom/form/decimal.d.ts.map +1 -0
- package/dist/components/ui/custom/form/decimal.js +15 -0
- package/dist/components/ui/custom/form/file.d.ts +15 -0
- package/dist/components/ui/custom/form/file.d.ts.map +1 -0
- package/dist/components/ui/custom/form/file.js +18 -0
- package/dist/components/ui/custom/form/form-help-text.d.ts +3 -0
- package/dist/components/ui/custom/form/form-help-text.d.ts.map +1 -0
- package/dist/components/ui/custom/form/form-help-text.js +7 -0
- package/dist/components/ui/custom/form/form-label.d.ts +7 -0
- package/dist/components/ui/custom/form/form-label.d.ts.map +1 -0
- package/dist/components/ui/custom/form/form-label.js +9 -0
- package/dist/components/ui/custom/form/form-message.d.ts +5 -0
- package/dist/components/ui/custom/form/form-message.d.ts.map +1 -0
- package/dist/components/ui/custom/form/form-message.js +5 -0
- package/dist/components/ui/custom/form/ghost.d.ts +8 -0
- package/dist/components/ui/custom/form/ghost.d.ts.map +1 -0
- package/dist/components/ui/custom/form/ghost.js +8 -0
- package/dist/components/ui/custom/form/input.d.ts +18 -0
- package/dist/components/ui/custom/form/input.d.ts.map +1 -0
- package/dist/components/ui/custom/form/input.js +14 -0
- package/dist/components/ui/custom/form/mask.d.ts +19 -0
- package/dist/components/ui/custom/form/mask.d.ts.map +1 -0
- package/dist/components/ui/custom/form/mask.js +19 -0
- package/dist/components/ui/custom/form/multi-select-old.d.ts +19 -0
- package/dist/components/ui/custom/form/multi-select-old.d.ts.map +1 -0
- package/dist/components/ui/custom/form/multi-select-old.js +30 -0
- package/dist/components/ui/custom/form/multi-select.d.ts +26 -0
- package/dist/components/ui/custom/form/multi-select.d.ts.map +1 -0
- package/dist/components/ui/custom/form/multi-select.js +66 -0
- package/dist/components/ui/custom/form/password.d.ts +16 -0
- package/dist/components/ui/custom/form/password.d.ts.map +1 -0
- package/dist/components/ui/custom/form/password.js +14 -0
- package/dist/components/ui/custom/form/percent.d.ts +14 -0
- package/dist/components/ui/custom/form/percent.d.ts.map +1 -0
- package/dist/components/ui/custom/form/percent.js +15 -0
- package/dist/components/ui/custom/form/phone.d.ts +16 -0
- package/dist/components/ui/custom/form/phone.d.ts.map +1 -0
- package/dist/components/ui/custom/form/phone.js +23 -0
- package/dist/components/ui/custom/form/radio-group.d.ts +23 -0
- package/dist/components/ui/custom/form/radio-group.d.ts.map +1 -0
- package/dist/components/ui/custom/form/radio-group.js +15 -0
- package/dist/components/ui/custom/form/select.d.ts +20 -0
- package/dist/components/ui/custom/form/select.d.ts.map +1 -0
- package/dist/components/ui/custom/form/select.js +12 -0
- package/dist/components/ui/custom/form/step-new-form.d.ts +10 -0
- package/dist/components/ui/custom/form/step-new-form.d.ts.map +1 -0
- package/dist/components/ui/custom/form/step-new-form.js +13 -0
- package/dist/components/ui/custom/form/switch.d.ts +13 -0
- package/dist/components/ui/custom/form/switch.d.ts.map +1 -0
- package/dist/components/ui/custom/form/switch.js +16 -0
- package/dist/components/ui/custom/form/text.d.ts +18 -0
- package/dist/components/ui/custom/form/text.d.ts.map +1 -0
- package/dist/components/ui/custom/form/text.js +14 -0
- package/dist/components/ui/custom/form/textarea.d.ts +16 -0
- package/dist/components/ui/custom/form/textarea.d.ts.map +1 -0
- package/dist/components/ui/custom/form/textarea.js +19 -0
- package/dist/components/ui/custom/form/utils.d.ts +18 -0
- package/dist/components/ui/custom/form/utils.d.ts.map +1 -0
- package/dist/components/ui/custom/form/utils.js +88 -0
- package/dist/components/ui/custom/header.d.ts +11 -0
- package/dist/components/ui/custom/header.d.ts.map +1 -0
- package/dist/components/ui/custom/header.js +74 -0
- package/dist/components/ui/custom/label.d.ts +13 -0
- package/dist/components/ui/custom/label.d.ts.map +1 -0
- package/dist/components/ui/custom/label.js +20 -0
- package/dist/components/ui/custom/not-found.d.ts +3 -0
- package/dist/components/ui/custom/not-found.d.ts.map +1 -0
- package/dist/components/ui/custom/not-found.js +9 -0
- package/dist/components/ui/custom/sidebar/app-sidebar.d.ts +5 -0
- package/dist/components/ui/custom/sidebar/app-sidebar.d.ts.map +1 -0
- package/dist/components/ui/custom/sidebar/app-sidebar.js +26 -0
- package/dist/components/ui/custom/sidebar/module-switcher.d.ts +9 -0
- package/dist/components/ui/custom/sidebar/module-switcher.d.ts.map +1 -0
- package/dist/components/ui/custom/sidebar/module-switcher.js +55 -0
- package/dist/components/ui/custom/sidebar/nav-footer.d.ts +7 -0
- package/dist/components/ui/custom/sidebar/nav-footer.d.ts.map +1 -0
- package/dist/components/ui/custom/sidebar/nav-footer.js +13 -0
- package/dist/components/ui/custom/sidebar/nav-main.d.ts +7 -0
- package/dist/components/ui/custom/sidebar/nav-main.d.ts.map +1 -0
- package/dist/components/ui/custom/sidebar/nav-main.js +27 -0
- package/dist/components/ui/custom/sidebar/nav-submenu-collapsible.d.ts +9 -0
- package/dist/components/ui/custom/sidebar/nav-submenu-collapsible.d.ts.map +1 -0
- package/dist/components/ui/custom/sidebar/nav-submenu-collapsible.js +18 -0
- package/dist/components/ui/custom/sidebar/nav-submenu-dropdown.d.ts +10 -0
- package/dist/components/ui/custom/sidebar/nav-submenu-dropdown.d.ts.map +1 -0
- package/dist/components/ui/custom/sidebar/nav-submenu-dropdown.js +10 -0
- package/dist/components/ui/custom/sidebar/nav-user.d.ts +9 -0
- package/dist/components/ui/custom/sidebar/nav-user.d.ts.map +1 -0
- package/dist/components/ui/custom/sidebar/nav-user.js +24 -0
- package/dist/components/ui/custom/sidebar/sidebar-button.d.ts +9 -0
- package/dist/components/ui/custom/sidebar/sidebar-button.d.ts.map +1 -0
- package/dist/components/ui/custom/sidebar/sidebar-button.js +7 -0
- package/dist/components/ui/custom/sidebar/sidebar-item-two-lines.d.ts +12 -0
- package/dist/components/ui/custom/sidebar/sidebar-item-two-lines.d.ts.map +1 -0
- package/dist/components/ui/custom/sidebar/sidebar-item-two-lines.js +5 -0
- package/dist/components/ui/custom/sidebar/sidebar-item.d.ts +9 -0
- package/dist/components/ui/custom/sidebar/sidebar-item.d.ts.map +1 -0
- package/dist/components/ui/custom/sidebar/sidebar-item.js +7 -0
- package/dist/components/ui/custom/sidebar/sidebar-module-switcher.d.ts +9 -0
- package/dist/components/ui/custom/sidebar/sidebar-module-switcher.d.ts.map +1 -0
- package/dist/components/ui/custom/sidebar/sidebar-module-switcher.js +20 -0
- package/dist/components/ui/custom/sidebar/types/sidebar.d.ts +29 -0
- package/dist/components/ui/custom/sidebar/types/sidebar.d.ts.map +1 -0
- package/dist/components/ui/custom/sidebar/types/sidebar.js +5 -0
- package/dist/components/ui/custom/table/data-table-export.d.ts +8 -0
- package/dist/components/ui/custom/table/data-table-export.d.ts.map +1 -0
- package/dist/components/ui/custom/table/data-table-export.js +65 -0
- package/dist/components/ui/custom/table/data-table-footer.d.ts +25 -0
- package/dist/components/ui/custom/table/data-table-footer.d.ts.map +1 -0
- package/dist/components/ui/custom/table/data-table-footer.js +39 -0
- package/dist/components/ui/custom/table/data-table-header.d.ts +9 -0
- package/dist/components/ui/custom/table/data-table-header.d.ts.map +1 -0
- package/dist/components/ui/custom/table/data-table-header.js +11 -0
- package/dist/components/ui/custom/table/data-table-rows.d.ts +13 -0
- package/dist/components/ui/custom/table/data-table-rows.d.ts.map +1 -0
- package/dist/components/ui/custom/table/data-table-rows.js +25 -0
- package/dist/components/ui/custom/table/data-table.d.ts +35 -0
- package/dist/components/ui/custom/table/data-table.d.ts.map +1 -0
- package/dist/components/ui/custom/table/data-table.js +99 -0
- package/dist/components/ui/custom/table/types/data-table.d.ts +29 -0
- package/dist/components/ui/custom/table/types/data-table.d.ts.map +1 -0
- package/dist/components/ui/custom/table/types/data-table.js +1 -0
- package/dist/components/ui/custom/theme-provider.d.ts +24 -0
- package/dist/components/ui/custom/theme-provider.d.ts.map +1 -0
- package/dist/components/ui/custom/theme-provider.js +79 -0
- package/dist/components/ui/dateRangePicker.d.ts +3 -0
- package/dist/components/ui/dateRangePicker.d.ts.map +1 -0
- package/dist/components/ui/dateRangePicker.js +15 -0
- package/dist/components/ui/dialog.d.ts +23 -0
- package/dist/components/ui/dialog.d.ts.map +1 -0
- package/dist/components/ui/dialog.js +23 -0
- package/dist/components/ui/drawer.d.ts +23 -0
- package/dist/components/ui/drawer.d.ts.map +1 -0
- package/dist/components/ui/drawer.js +22 -0
- package/dist/components/ui/dropdown-menu.d.ts +28 -0
- package/dist/components/ui/dropdown-menu.d.ts.map +1 -0
- package/dist/components/ui/dropdown-menu.js +32 -0
- package/dist/components/ui/form.d.ts +24 -0
- package/dist/components/ui/form.d.ts.map +1 -0
- package/dist/components/ui/form.js +60 -0
- package/dist/components/ui/hover-card.d.ts +7 -0
- package/dist/components/ui/hover-card.d.ts.map +1 -0
- package/dist/components/ui/hover-card.js +9 -0
- package/dist/components/ui/input.d.ts +24 -0
- package/dist/components/ui/input.d.ts.map +1 -0
- package/dist/components/ui/input.js +71 -0
- package/dist/components/ui/label.d.ts +6 -0
- package/dist/components/ui/label.d.ts.map +1 -0
- package/dist/components/ui/label.js +9 -0
- package/dist/components/ui/masks.d.ts +17 -0
- package/dist/components/ui/masks.d.ts.map +1 -0
- package/dist/components/ui/masks.js +25 -0
- package/dist/components/ui/pagination.d.ts +30 -0
- package/dist/components/ui/pagination.d.ts.map +1 -0
- package/dist/components/ui/pagination.js +23 -0
- package/dist/components/ui/popover.d.ts +7 -0
- package/dist/components/ui/popover.d.ts.map +1 -0
- package/dist/components/ui/popover.js +11 -0
- package/dist/components/ui/progress.d.ts +5 -0
- package/dist/components/ui/progress.d.ts.map +1 -0
- package/dist/components/ui/progress.js +7 -0
- package/dist/components/ui/radio-group.d.ts +6 -0
- package/dist/components/ui/radio-group.d.ts.map +1 -0
- package/dist/components/ui/radio-group.js +14 -0
- package/dist/components/ui/scroll-area.d.ts +6 -0
- package/dist/components/ui/scroll-area.d.ts.map +1 -0
- package/dist/components/ui/scroll-area.js +11 -0
- package/dist/components/ui/select.d.ts +14 -0
- package/dist/components/ui/select.d.ts.map +1 -0
- package/dist/components/ui/select.js +24 -0
- package/dist/components/ui/separator.d.ts +5 -0
- package/dist/components/ui/separator.d.ts.map +1 -0
- package/dist/components/ui/separator.js +7 -0
- package/dist/components/ui/sheet.d.ts +26 -0
- package/dist/components/ui/sheet.d.ts.map +1 -0
- package/dist/components/ui/sheet.js +37 -0
- package/dist/components/ui/sidebar.d.ts +67 -0
- package/dist/components/ui/sidebar.d.ts.map +1 -0
- package/dist/components/ui/sidebar.js +221 -0
- package/dist/components/ui/skeleton.d.ts +3 -0
- package/dist/components/ui/skeleton.d.ts.map +1 -0
- package/dist/components/ui/skeleton.js +6 -0
- package/dist/components/ui/slider.d.ts +5 -0
- package/dist/components/ui/slider.d.ts.map +1 -0
- package/dist/components/ui/slider.js +7 -0
- package/dist/components/ui/switch.d.ts +5 -0
- package/dist/components/ui/switch.d.ts.map +1 -0
- package/dist/components/ui/switch.js +7 -0
- package/dist/components/ui/table.d.ts +11 -0
- package/dist/components/ui/table.d.ts.map +1 -0
- package/dist/components/ui/table.js +20 -0
- package/dist/components/ui/tabs.d.ts +8 -0
- package/dist/components/ui/tabs.d.ts.map +1 -0
- package/dist/components/ui/tabs.js +12 -0
- package/dist/components/ui/textarea.d.ts +4 -0
- package/dist/components/ui/textarea.d.ts.map +1 -0
- package/dist/components/ui/textarea.js +14 -0
- package/dist/components/ui/toast.d.ts +16 -0
- package/dist/components/ui/toast.d.ts.map +1 -0
- package/dist/components/ui/toast.js +34 -0
- package/dist/components/ui/toaster.d.ts +2 -0
- package/dist/components/ui/toaster.d.ts.map +1 -0
- package/dist/components/ui/toaster.js +21 -0
- package/dist/components/ui/tooltip.d.ts +8 -0
- package/dist/components/ui/tooltip.d.ts.map +1 -0
- package/dist/components/ui/tooltip.js +10 -0
- package/dist/components/ui/use-calendar.d.ts +7 -0
- package/dist/components/ui/use-calendar.d.ts.map +1 -0
- package/dist/components/ui/use-calendar.js +23 -0
- package/dist/components/ui/use-toast.d.ts +46 -0
- package/dist/components/ui/use-toast.d.ts.map +1 -0
- package/dist/components/ui/use-toast.js +125 -0
- package/dist/components/use-calendar.d.ts +7 -0
- package/dist/components/use-calendar.d.ts.map +1 -0
- package/dist/components/use-calendar.js +23 -0
- package/dist/components/use-toast.d.ts +46 -0
- package/dist/components/use-toast.d.ts.map +1 -0
- package/dist/components/use-toast.js +125 -0
- package/dist/hooks/use-mobile.d.ts +2 -0
- package/dist/hooks/use-mobile.d.ts.map +1 -0
- package/dist/hooks/use-mobile.js +15 -0
- package/dist/index.d.ts +1514 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.esm.js +3233 -0
- package/dist/index.esm.js.map +1 -0
- package/dist/index.js +3558 -0
- package/dist/index.js.map +1 -0
- package/dist/lib/help/date-utils.d.ts +7 -0
- package/dist/lib/help/date-utils.d.ts.map +1 -0
- package/dist/lib/help/date-utils.js +34 -0
- package/dist/lib/help/format.d.ts +22 -0
- package/dist/lib/help/format.d.ts.map +1 -0
- package/dist/lib/help/format.js +140 -0
- package/dist/lib/help/theme.d.ts +291 -0
- package/dist/lib/help/theme.d.ts.map +1 -0
- package/dist/lib/help/theme.js +340 -0
- package/dist/lib/help/uuid.d.ts +2 -0
- package/dist/lib/help/uuid.d.ts.map +1 -0
- package/dist/lib/help/uuid.js +4 -0
- package/dist/lib/utils.d.ts +3 -0
- package/dist/lib/utils.d.ts.map +1 -0
- package/dist/lib/utils.js +5 -0
- package/package.json +146 -0
- package/src/components/ui/accordion.tsx +48 -0
- package/src/components/ui/alert-dialog.tsx +138 -0
- package/src/components/ui/alert.tsx +36 -0
- package/src/components/ui/avatar.tsx +48 -0
- package/src/components/ui/badge.tsx +35 -0
- package/src/components/ui/breadcrumb.tsx +115 -0
- package/src/components/ui/button.tsx +43 -0
- package/src/components/ui/calendar.tsx +142 -0
- package/src/components/ui/card.tsx +35 -0
- package/src/components/ui/carousel.tsx +257 -0
- package/src/components/ui/chart.tsx +364 -0
- package/src/components/ui/checkbox.tsx +26 -0
- package/src/components/ui/collapsible.tsx +9 -0
- package/src/components/ui/command.tsx +145 -0
- package/src/components/ui/context-menu.tsx +198 -0
- package/src/components/ui/custom/date-picker.tsx +97 -0
- package/src/components/ui/custom/form/checkbox.tsx +53 -0
- package/src/components/ui/custom/form/color.tsx +140 -0
- package/src/components/ui/custom/form/combobox.tsx +259 -0
- package/src/components/ui/custom/form/cpf-cnpj.tsx +85 -0
- package/src/components/ui/custom/form/currency.tsx +51 -0
- package/src/components/ui/custom/form/date-range.tsx +110 -0
- package/src/components/ui/custom/form/date.tsx +109 -0
- package/src/components/ui/custom/form/decimal.tsx +50 -0
- package/src/components/ui/custom/form/file.tsx +65 -0
- package/src/components/ui/custom/form/form-help-text.tsx +20 -0
- package/src/components/ui/custom/form/form-label.tsx +24 -0
- package/src/components/ui/custom/form/form-message.tsx +10 -0
- package/src/components/ui/custom/form/ghost.tsx +28 -0
- package/src/components/ui/custom/form/input.tsx +69 -0
- package/src/components/ui/custom/form/mask.tsx +78 -0
- package/src/components/ui/custom/form/multi-select.tsx +209 -0
- package/src/components/ui/custom/form/password.tsx +70 -0
- package/src/components/ui/custom/form/percent.tsx +52 -0
- package/src/components/ui/custom/form/phone.tsx +79 -0
- package/src/components/ui/custom/form/radio-group.tsx +94 -0
- package/src/components/ui/custom/form/select.tsx +62 -0
- package/src/components/ui/custom/form/step-new-form.tsx +49 -0
- package/src/components/ui/custom/form/switch.tsx +51 -0
- package/src/components/ui/custom/form/text.tsx +71 -0
- package/src/components/ui/custom/form/textarea.tsx +71 -0
- package/src/components/ui/custom/form/utils.ts +100 -0
- package/src/components/ui/custom/header.tsx +128 -0
- package/src/components/ui/custom/label.tsx +79 -0
- package/src/components/ui/custom/not-found.tsx +30 -0
- package/src/components/ui/custom/sidebar/module-switcher.tsx +58 -0
- package/src/components/ui/custom/sidebar/nav-footer.tsx +35 -0
- package/src/components/ui/custom/sidebar/nav-main.tsx +64 -0
- package/src/components/ui/custom/sidebar/nav-submenu-collapsible.tsx +60 -0
- package/src/components/ui/custom/sidebar/nav-submenu-dropdown.tsx +56 -0
- package/src/components/ui/custom/sidebar/nav-user.tsx +77 -0
- package/src/components/ui/custom/sidebar/sidebar-button.tsx +30 -0
- package/src/components/ui/custom/sidebar/sidebar-item-two-lines.tsx +25 -0
- package/src/components/ui/custom/sidebar/sidebar-item.tsx +19 -0
- package/src/components/ui/custom/sidebar/types/sidebar.ts +31 -0
- package/src/components/ui/custom/table/data-table-export.tsx +126 -0
- package/src/components/ui/custom/table/data-table-footer.tsx +148 -0
- package/src/components/ui/custom/table/data-table-header.tsx +58 -0
- package/src/components/ui/custom/table/data-table-rows.tsx +94 -0
- package/src/components/ui/custom/table/data-table.tsx +285 -0
- package/src/components/ui/custom/table/types/data-table.ts +31 -0
- package/src/components/ui/custom/theme-provider.tsx +121 -0
- package/src/components/ui/dateRangePicker.tsx +63 -0
- package/src/components/ui/dialog.tsx +84 -0
- package/src/components/ui/drawer.tsx +116 -0
- package/src/components/ui/dropdown-menu.tsx +173 -0
- package/src/components/ui/form.tsx +114 -0
- package/src/components/ui/hover-card.tsx +27 -0
- package/src/components/ui/input.tsx +265 -0
- package/src/components/ui/label.tsx +15 -0
- package/src/components/ui/masks.ts +35 -0
- package/src/components/ui/pagination.tsx +78 -0
- package/src/components/ui/popover.tsx +32 -0
- package/src/components/ui/progress.tsx +22 -0
- package/src/components/ui/radio-group.tsx +36 -0
- package/src/components/ui/scroll-area.tsx +46 -0
- package/src/components/ui/select.tsx +130 -0
- package/src/components/ui/separator.tsx +29 -0
- package/src/components/ui/sheet.tsx +90 -0
- package/src/components/ui/sidebar.tsx +598 -0
- package/src/components/ui/skeleton.tsx +15 -0
- package/src/components/ui/slider.tsx +18 -0
- package/src/components/ui/switch.tsx +26 -0
- package/src/components/ui/table.tsx +53 -0
- package/src/components/ui/tabs.tsx +47 -0
- package/src/components/ui/textarea.tsx +27 -0
- package/src/components/ui/toast.tsx +88 -0
- package/src/components/ui/toaster.tsx +49 -0
- package/src/components/ui/tooltip.tsx +31 -0
- package/src/components/ui/use-calendar.tsx +61 -0
- package/src/components/ui/use-toast.ts +186 -0
- package/src/hooks/use-mobile.tsx +19 -0
- package/src/index.ts +299 -0
- package/src/lib/help/date-utils.ts +41 -0
- package/src/lib/help/format.ts +171 -0
- package/src/lib/help/theme.ts +346 -0
- package/src/lib/help/uuid.ts +4 -0
- package/src/lib/utils.ts +6 -0
- package/src/styles/globals.css +59 -0
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
import { cn } from "@/lib/utils"
|
|
2
|
+
import * as AlertDialogPrimitive from "@radix-ui/react-alert-dialog"
|
|
3
|
+
import * as React from "react"
|
|
4
|
+
import { buttonVariants } from "./button"
|
|
5
|
+
|
|
6
|
+
const AlertDialog = AlertDialogPrimitive.Root
|
|
7
|
+
|
|
8
|
+
const AlertDialogTrigger = AlertDialogPrimitive.Trigger
|
|
9
|
+
|
|
10
|
+
const AlertDialogPortal = AlertDialogPrimitive.Portal
|
|
11
|
+
|
|
12
|
+
const AlertDialogOverlay = React.forwardRef<
|
|
13
|
+
React.ElementRef<typeof AlertDialogPrimitive.Overlay>,
|
|
14
|
+
React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Overlay>
|
|
15
|
+
>(({ className, ...props }, ref) => (
|
|
16
|
+
<AlertDialogPrimitive.Overlay
|
|
17
|
+
className={cn(
|
|
18
|
+
"fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
|
|
19
|
+
className
|
|
20
|
+
)}
|
|
21
|
+
{...props}
|
|
22
|
+
ref={ref}
|
|
23
|
+
/>
|
|
24
|
+
))
|
|
25
|
+
AlertDialogOverlay.displayName = AlertDialogPrimitive.Overlay.displayName
|
|
26
|
+
|
|
27
|
+
const AlertDialogContent = React.forwardRef<
|
|
28
|
+
React.ElementRef<typeof AlertDialogPrimitive.Content>,
|
|
29
|
+
React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Content>
|
|
30
|
+
>(({ className, ...props }, ref) => (
|
|
31
|
+
<AlertDialogPortal>
|
|
32
|
+
<AlertDialogOverlay />
|
|
33
|
+
<AlertDialogPrimitive.Content
|
|
34
|
+
ref={ref}
|
|
35
|
+
className={cn(
|
|
36
|
+
"fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",
|
|
37
|
+
className
|
|
38
|
+
)}
|
|
39
|
+
{...props}
|
|
40
|
+
/>
|
|
41
|
+
</AlertDialogPortal>
|
|
42
|
+
))
|
|
43
|
+
AlertDialogContent.displayName = AlertDialogPrimitive.Content.displayName
|
|
44
|
+
|
|
45
|
+
const AlertDialogHeader = ({
|
|
46
|
+
className,
|
|
47
|
+
...props
|
|
48
|
+
}: React.HTMLAttributes<HTMLDivElement>) => (
|
|
49
|
+
<div
|
|
50
|
+
className={cn(
|
|
51
|
+
"flex flex-col space-y-2 text-center sm:text-left",
|
|
52
|
+
className
|
|
53
|
+
)}
|
|
54
|
+
{...props}
|
|
55
|
+
/>
|
|
56
|
+
)
|
|
57
|
+
AlertDialogHeader.displayName = "AlertDialogHeader"
|
|
58
|
+
|
|
59
|
+
const AlertDialogFooter = ({
|
|
60
|
+
className,
|
|
61
|
+
...props
|
|
62
|
+
}: React.HTMLAttributes<HTMLDivElement>) => (
|
|
63
|
+
<div
|
|
64
|
+
className={cn(
|
|
65
|
+
"flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",
|
|
66
|
+
className
|
|
67
|
+
)}
|
|
68
|
+
{...props}
|
|
69
|
+
/>
|
|
70
|
+
)
|
|
71
|
+
AlertDialogFooter.displayName = "AlertDialogFooter"
|
|
72
|
+
|
|
73
|
+
const AlertDialogTitle = React.forwardRef<
|
|
74
|
+
React.ElementRef<typeof AlertDialogPrimitive.Title>,
|
|
75
|
+
React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Title>
|
|
76
|
+
>(({ className, ...props }, ref) => (
|
|
77
|
+
<AlertDialogPrimitive.Title
|
|
78
|
+
ref={ref}
|
|
79
|
+
className={cn("text-lg font-semibold", className)}
|
|
80
|
+
{...props}
|
|
81
|
+
/>
|
|
82
|
+
))
|
|
83
|
+
AlertDialogTitle.displayName = AlertDialogPrimitive.Title.displayName
|
|
84
|
+
|
|
85
|
+
const AlertDialogDescription = React.forwardRef<
|
|
86
|
+
React.ElementRef<typeof AlertDialogPrimitive.Description>,
|
|
87
|
+
React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Description>
|
|
88
|
+
>(({ className, ...props }, ref) => (
|
|
89
|
+
<AlertDialogPrimitive.Description
|
|
90
|
+
ref={ref}
|
|
91
|
+
className={cn("text-sm text-muted-foreground", className)}
|
|
92
|
+
{...props}
|
|
93
|
+
/>
|
|
94
|
+
))
|
|
95
|
+
AlertDialogDescription.displayName =
|
|
96
|
+
AlertDialogPrimitive.Description.displayName
|
|
97
|
+
|
|
98
|
+
const AlertDialogAction = React.forwardRef<
|
|
99
|
+
React.ElementRef<typeof AlertDialogPrimitive.Action>,
|
|
100
|
+
React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Action> & {
|
|
101
|
+
variant?: "default" | "outline" | "destructive" | "secondary"; // Adapte conforme suas variantes
|
|
102
|
+
}
|
|
103
|
+
>(({ className, variant = "default", ...props }, ref) => (
|
|
104
|
+
<AlertDialogPrimitive.Action
|
|
105
|
+
ref={ref}
|
|
106
|
+
className={cn(buttonVariants({ variant }), className)}
|
|
107
|
+
{...props}
|
|
108
|
+
/>
|
|
109
|
+
));
|
|
110
|
+
|
|
111
|
+
AlertDialogAction.displayName = AlertDialogPrimitive.Action.displayName;
|
|
112
|
+
|
|
113
|
+
|
|
114
|
+
const AlertDialogCancel = React.forwardRef<
|
|
115
|
+
React.ElementRef<typeof AlertDialogPrimitive.Cancel>,
|
|
116
|
+
React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Cancel> & {
|
|
117
|
+
variant?: "default" | "outline" | "destructive" | "secondary"; // Adapte conforme suas variantes
|
|
118
|
+
}
|
|
119
|
+
>(({ className, variant = "outline", ...props }, ref) => (
|
|
120
|
+
<AlertDialogPrimitive.Cancel
|
|
121
|
+
ref={ref}
|
|
122
|
+
className={cn(
|
|
123
|
+
buttonVariants({ variant }), // Usa a variante passada como prop
|
|
124
|
+
"mt-2 sm:mt-0",
|
|
125
|
+
className
|
|
126
|
+
)}
|
|
127
|
+
{...props}
|
|
128
|
+
/>
|
|
129
|
+
));
|
|
130
|
+
|
|
131
|
+
AlertDialogCancel.displayName = AlertDialogPrimitive.Cancel.displayName;
|
|
132
|
+
|
|
133
|
+
|
|
134
|
+
export {
|
|
135
|
+
AlertDialog, AlertDialogAction,
|
|
136
|
+
AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger
|
|
137
|
+
}
|
|
138
|
+
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { cva, type VariantProps } from 'class-variance-authority';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import { cn } from '../../lib/utils';
|
|
4
|
+
|
|
5
|
+
const alertVariants = cva(
|
|
6
|
+
'relative w-full rounded-lg border p-4 [&>svg~*]:pl-7 [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground',
|
|
7
|
+
{
|
|
8
|
+
variants: {
|
|
9
|
+
variant: {
|
|
10
|
+
default: 'bg-background text-foreground',
|
|
11
|
+
destructive: 'border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive',
|
|
12
|
+
},
|
|
13
|
+
},
|
|
14
|
+
defaultVariants: {
|
|
15
|
+
variant: 'default',
|
|
16
|
+
},
|
|
17
|
+
},
|
|
18
|
+
);
|
|
19
|
+
|
|
20
|
+
const Alert = React.forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLDivElement> & VariantProps<typeof alertVariants>>(
|
|
21
|
+
({ className, variant, ...props }, ref) => <div ref={ref} role='alert' className={cn(alertVariants({ variant }), className)} {...props} />,
|
|
22
|
+
);
|
|
23
|
+
Alert.displayName = 'Alert';
|
|
24
|
+
|
|
25
|
+
const AlertTitle = React.forwardRef<HTMLParagraphElement, React.HTMLAttributes<HTMLHeadingElement>>(({ className, ...props }, ref) => (
|
|
26
|
+
<h5 ref={ref} className={cn('mb-1 font-medium leading-none tracking-tight', className)} {...props} />
|
|
27
|
+
));
|
|
28
|
+
AlertTitle.displayName = 'AlertTitle';
|
|
29
|
+
|
|
30
|
+
const AlertDescription = React.forwardRef<HTMLParagraphElement, React.HTMLAttributes<HTMLParagraphElement>>(({ className, ...props }, ref) => (
|
|
31
|
+
<div ref={ref} className={cn('text-sm [&_p]:leading-relaxed', className)} {...props} />
|
|
32
|
+
));
|
|
33
|
+
AlertDescription.displayName = 'AlertDescription';
|
|
34
|
+
|
|
35
|
+
export { Alert, AlertDescription, AlertTitle };
|
|
36
|
+
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import * as React from "react"
|
|
2
|
+
import * as AvatarPrimitive from "@radix-ui/react-avatar"
|
|
3
|
+
|
|
4
|
+
import { cn } from "@/lib/utils"
|
|
5
|
+
|
|
6
|
+
const Avatar = React.forwardRef<
|
|
7
|
+
React.ElementRef<typeof AvatarPrimitive.Root>,
|
|
8
|
+
React.ComponentPropsWithoutRef<typeof AvatarPrimitive.Root>
|
|
9
|
+
>(({ className, ...props }, ref) => (
|
|
10
|
+
<AvatarPrimitive.Root
|
|
11
|
+
ref={ref}
|
|
12
|
+
className={cn(
|
|
13
|
+
"relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",
|
|
14
|
+
className
|
|
15
|
+
)}
|
|
16
|
+
{...props}
|
|
17
|
+
/>
|
|
18
|
+
))
|
|
19
|
+
Avatar.displayName = AvatarPrimitive.Root.displayName
|
|
20
|
+
|
|
21
|
+
const AvatarImage = React.forwardRef<
|
|
22
|
+
React.ElementRef<typeof AvatarPrimitive.Image>,
|
|
23
|
+
React.ComponentPropsWithoutRef<typeof AvatarPrimitive.Image>
|
|
24
|
+
>(({ className, ...props }, ref) => (
|
|
25
|
+
<AvatarPrimitive.Image
|
|
26
|
+
ref={ref}
|
|
27
|
+
className={cn("aspect-square h-full w-full", className)}
|
|
28
|
+
{...props}
|
|
29
|
+
/>
|
|
30
|
+
))
|
|
31
|
+
AvatarImage.displayName = AvatarPrimitive.Image.displayName
|
|
32
|
+
|
|
33
|
+
const AvatarFallback = React.forwardRef<
|
|
34
|
+
React.ElementRef<typeof AvatarPrimitive.Fallback>,
|
|
35
|
+
React.ComponentPropsWithoutRef<typeof AvatarPrimitive.Fallback>
|
|
36
|
+
>(({ className, ...props }, ref) => (
|
|
37
|
+
<AvatarPrimitive.Fallback
|
|
38
|
+
ref={ref}
|
|
39
|
+
className={cn(
|
|
40
|
+
"flex h-full w-full items-center justify-center rounded-full bg-muted",
|
|
41
|
+
className
|
|
42
|
+
)}
|
|
43
|
+
{...props}
|
|
44
|
+
/>
|
|
45
|
+
))
|
|
46
|
+
AvatarFallback.displayName = AvatarPrimitive.Fallback.displayName
|
|
47
|
+
|
|
48
|
+
export { Avatar, AvatarImage, AvatarFallback }
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { type VariantProps, cva } from 'class-variance-authority';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import { cn } from '../../lib/utils';
|
|
4
|
+
|
|
5
|
+
const badgeVariants = cva(
|
|
6
|
+
'inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2',
|
|
7
|
+
{
|
|
8
|
+
variants: {
|
|
9
|
+
variant: {
|
|
10
|
+
default: 'border-transparent bg-background-primary text-primary-foreground',
|
|
11
|
+
secondary: 'border-transparent bg-background-secondary text-secondary-foreground',
|
|
12
|
+
surface: 'border-transparent bg-primary-100 text-primary',
|
|
13
|
+
destructive: 'border-transparent bg-destructive text-destructive-foreground',
|
|
14
|
+
outline: 'text-foreground',
|
|
15
|
+
green: 'border-transparent bg-green-50 text-emerald-700',
|
|
16
|
+
red: 'border-transparent bg-red-50 text-red-600',
|
|
17
|
+
gray: 'border-transparent bg-zinc-100 text-zinc-950',
|
|
18
|
+
blue: 'border-transparent bg-blue-50 text-blue-600',
|
|
19
|
+
orange: 'border-transparent bg-orange-50 text-orange-600',
|
|
20
|
+
},
|
|
21
|
+
},
|
|
22
|
+
defaultVariants: {
|
|
23
|
+
variant: 'default',
|
|
24
|
+
},
|
|
25
|
+
},
|
|
26
|
+
);
|
|
27
|
+
|
|
28
|
+
export interface BadgeProps extends React.HTMLAttributes<HTMLDivElement>, VariantProps<typeof badgeVariants> {}
|
|
29
|
+
|
|
30
|
+
function Badge({ className, variant, ...props }: BadgeProps) {
|
|
31
|
+
return <div className={cn(badgeVariants({ variant }), className)} {...props} />;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export { Badge, badgeVariants };
|
|
35
|
+
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
import * as React from "react"
|
|
2
|
+
import { Slot } from "@radix-ui/react-slot"
|
|
3
|
+
import { ChevronRight, MoreHorizontal } from "lucide-react"
|
|
4
|
+
|
|
5
|
+
import { cn } from "@/lib/utils"
|
|
6
|
+
|
|
7
|
+
const Breadcrumb = React.forwardRef<
|
|
8
|
+
HTMLElement,
|
|
9
|
+
React.ComponentPropsWithoutRef<"nav"> & {
|
|
10
|
+
separator?: React.ReactNode
|
|
11
|
+
}
|
|
12
|
+
>(({ ...props }, ref) => <nav ref={ref} aria-label="breadcrumb" {...props} />)
|
|
13
|
+
Breadcrumb.displayName = "Breadcrumb"
|
|
14
|
+
|
|
15
|
+
const BreadcrumbList = React.forwardRef<
|
|
16
|
+
HTMLOListElement,
|
|
17
|
+
React.ComponentPropsWithoutRef<"ol">
|
|
18
|
+
>(({ className, ...props }, ref) => (
|
|
19
|
+
<ol
|
|
20
|
+
ref={ref}
|
|
21
|
+
className={cn(
|
|
22
|
+
"flex flex-wrap items-center gap-1.5 break-words text-sm text-muted-foreground sm:gap-2.5",
|
|
23
|
+
className
|
|
24
|
+
)}
|
|
25
|
+
{...props}
|
|
26
|
+
/>
|
|
27
|
+
))
|
|
28
|
+
BreadcrumbList.displayName = "BreadcrumbList"
|
|
29
|
+
|
|
30
|
+
const BreadcrumbItem = React.forwardRef<
|
|
31
|
+
HTMLLIElement,
|
|
32
|
+
React.ComponentPropsWithoutRef<"li">
|
|
33
|
+
>(({ className, ...props }, ref) => (
|
|
34
|
+
<li
|
|
35
|
+
ref={ref}
|
|
36
|
+
className={cn("inline-flex items-center gap-1.5", className)}
|
|
37
|
+
{...props}
|
|
38
|
+
/>
|
|
39
|
+
))
|
|
40
|
+
BreadcrumbItem.displayName = "BreadcrumbItem"
|
|
41
|
+
|
|
42
|
+
const BreadcrumbLink = React.forwardRef<
|
|
43
|
+
HTMLAnchorElement,
|
|
44
|
+
React.ComponentPropsWithoutRef<"a"> & {
|
|
45
|
+
asChild?: boolean
|
|
46
|
+
}
|
|
47
|
+
>(({ asChild, className, ...props }, ref) => {
|
|
48
|
+
const Comp = asChild ? Slot : "a"
|
|
49
|
+
|
|
50
|
+
return (
|
|
51
|
+
<Comp
|
|
52
|
+
ref={ref}
|
|
53
|
+
className={cn("transition-colors hover:text-foreground", className)}
|
|
54
|
+
{...props}
|
|
55
|
+
/>
|
|
56
|
+
)
|
|
57
|
+
})
|
|
58
|
+
BreadcrumbLink.displayName = "BreadcrumbLink"
|
|
59
|
+
|
|
60
|
+
const BreadcrumbPage = React.forwardRef<
|
|
61
|
+
HTMLSpanElement,
|
|
62
|
+
React.ComponentPropsWithoutRef<"span">
|
|
63
|
+
>(({ className, ...props }, ref) => (
|
|
64
|
+
<span
|
|
65
|
+
ref={ref}
|
|
66
|
+
role="link"
|
|
67
|
+
aria-disabled="true"
|
|
68
|
+
aria-current="page"
|
|
69
|
+
className={cn("font-normal text-foreground", className)}
|
|
70
|
+
{...props}
|
|
71
|
+
/>
|
|
72
|
+
))
|
|
73
|
+
BreadcrumbPage.displayName = "BreadcrumbPage"
|
|
74
|
+
|
|
75
|
+
const BreadcrumbSeparator = ({
|
|
76
|
+
children,
|
|
77
|
+
className,
|
|
78
|
+
...props
|
|
79
|
+
}: React.ComponentProps<"li">) => (
|
|
80
|
+
<li
|
|
81
|
+
role="presentation"
|
|
82
|
+
aria-hidden="true"
|
|
83
|
+
className={cn("[&>svg]:w-3.5 [&>svg]:h-3.5", className)}
|
|
84
|
+
{...props}
|
|
85
|
+
>
|
|
86
|
+
{children ?? <ChevronRight />}
|
|
87
|
+
</li>
|
|
88
|
+
)
|
|
89
|
+
BreadcrumbSeparator.displayName = "BreadcrumbSeparator"
|
|
90
|
+
|
|
91
|
+
const BreadcrumbEllipsis = ({
|
|
92
|
+
className,
|
|
93
|
+
...props
|
|
94
|
+
}: React.ComponentProps<"span">) => (
|
|
95
|
+
<span
|
|
96
|
+
role="presentation"
|
|
97
|
+
aria-hidden="true"
|
|
98
|
+
className={cn("flex h-9 w-9 items-center justify-center", className)}
|
|
99
|
+
{...props}
|
|
100
|
+
>
|
|
101
|
+
<MoreHorizontal className="h-4 w-4" />
|
|
102
|
+
<span className="sr-only">More</span>
|
|
103
|
+
</span>
|
|
104
|
+
)
|
|
105
|
+
BreadcrumbEllipsis.displayName = "BreadcrumbElipssis"
|
|
106
|
+
|
|
107
|
+
export {
|
|
108
|
+
Breadcrumb,
|
|
109
|
+
BreadcrumbList,
|
|
110
|
+
BreadcrumbItem,
|
|
111
|
+
BreadcrumbLink,
|
|
112
|
+
BreadcrumbPage,
|
|
113
|
+
BreadcrumbSeparator,
|
|
114
|
+
BreadcrumbEllipsis,
|
|
115
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { Slot } from '@radix-ui/react-slot';
|
|
2
|
+
import { type VariantProps, cva } from 'class-variance-authority';
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
import { cn } from '../../lib/utils';
|
|
5
|
+
|
|
6
|
+
const buttonVariants = cva(
|
|
7
|
+
'inline-flex items-center justify-center gap-2 self-start px-4 py-2 whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0',
|
|
8
|
+
{
|
|
9
|
+
variants: {
|
|
10
|
+
variant: {
|
|
11
|
+
default: 'bg-background-primary text-white hover:bg-background-primary-hover disabled:opacity-50',
|
|
12
|
+
secondary: 'bg-secondary text-secondary-foreground hover:bg-secondary-hover disabled:opacity-50',
|
|
13
|
+
destructive: 'bg-red-600 text-destructive-foreground hover:bg-destructive/90 disabled:opacity-50',
|
|
14
|
+
outline: 'border border-input bg-background hover:bg-accent hover:text-accent-foreground disabled:opacity-50',
|
|
15
|
+
ghost: 'hover:bg-accent hover:text-accent-foreground disabled:opacity-50',
|
|
16
|
+
link: 'text-primary underline-offset-4 hover:underline disabled:opacity-50',
|
|
17
|
+
},
|
|
18
|
+
size: {
|
|
19
|
+
default: 'h-10 px-4 py-2',
|
|
20
|
+
sm: 'h-9 rounded-md px-3',
|
|
21
|
+
lg: 'h-11 rounded-md px-8',
|
|
22
|
+
icon: 'h-10 w-10',
|
|
23
|
+
},
|
|
24
|
+
},
|
|
25
|
+
defaultVariants: {
|
|
26
|
+
variant: 'default',
|
|
27
|
+
size: 'default',
|
|
28
|
+
},
|
|
29
|
+
},
|
|
30
|
+
);
|
|
31
|
+
|
|
32
|
+
export interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {
|
|
33
|
+
asChild?: boolean;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
const Button = React.forwardRef<HTMLButtonElement, ButtonProps>(({ className, variant, size, asChild = false, ...props }, ref) => {
|
|
37
|
+
const Comp = asChild ? Slot : 'button';
|
|
38
|
+
return <Comp className={cn(buttonVariants({ variant, size, className }))} ref={ref} {...props} />;
|
|
39
|
+
});
|
|
40
|
+
Button.displayName = 'Button';
|
|
41
|
+
|
|
42
|
+
export { Button, buttonVariants };
|
|
43
|
+
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
import { ChevronDownIcon, ChevronLeftIcon, ChevronRightIcon } from 'lucide-react';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import { DayButton, DayPicker, getDefaultClassNames } from 'react-day-picker';
|
|
4
|
+
import { cn } from '../../lib/utils';
|
|
5
|
+
import { Button, buttonVariants } from './button';
|
|
6
|
+
|
|
7
|
+
function Calendar({
|
|
8
|
+
className,
|
|
9
|
+
classNames,
|
|
10
|
+
showOutsideDays = true,
|
|
11
|
+
captionLayout = 'label',
|
|
12
|
+
buttonVariant = 'ghost',
|
|
13
|
+
formatters,
|
|
14
|
+
components,
|
|
15
|
+
...props
|
|
16
|
+
}: React.ComponentProps<typeof DayPicker> & {
|
|
17
|
+
buttonVariant?: React.ComponentProps<typeof Button>['variant'];
|
|
18
|
+
}) {
|
|
19
|
+
const defaultClassNames = getDefaultClassNames();
|
|
20
|
+
|
|
21
|
+
return (
|
|
22
|
+
<DayPicker
|
|
23
|
+
showOutsideDays={showOutsideDays}
|
|
24
|
+
className={cn(
|
|
25
|
+
'bg-background group/calendar p-3 [--cell-size:2rem] [[data-slot=card-content]_&]:bg-transparent [[data-slot=popover-content]_&]:bg-transparent',
|
|
26
|
+
String.raw`rtl:**:[.rdp-button\_next>svg]:rotate-180`,
|
|
27
|
+
String.raw`rtl:**:[.rdp-button\_previous>svg]:rotate-180`,
|
|
28
|
+
className,
|
|
29
|
+
)}
|
|
30
|
+
captionLayout={captionLayout}
|
|
31
|
+
formatters={{
|
|
32
|
+
formatMonthDropdown: (date) => date.toLocaleString('default', { month: 'short' }),
|
|
33
|
+
...formatters,
|
|
34
|
+
}}
|
|
35
|
+
classNames={{
|
|
36
|
+
root: cn('w-fit', defaultClassNames.root),
|
|
37
|
+
months: cn('relative flex flex-col gap-4 md:flex-row', defaultClassNames.months),
|
|
38
|
+
month: cn('flex w-full flex-col gap-4', defaultClassNames.month),
|
|
39
|
+
nav: cn('absolute inset-x-0 top-0 flex w-full items-center justify-between gap-1', defaultClassNames.nav),
|
|
40
|
+
button_previous: cn(
|
|
41
|
+
buttonVariants({ variant: buttonVariant }),
|
|
42
|
+
'h-[--cell-size] w-[--cell-size] select-none p-0 aria-disabled:opacity-50',
|
|
43
|
+
defaultClassNames.button_previous,
|
|
44
|
+
),
|
|
45
|
+
button_next: cn(
|
|
46
|
+
buttonVariants({ variant: buttonVariant }),
|
|
47
|
+
'h-[--cell-size] w-[--cell-size] select-none p-0 aria-disabled:opacity-50',
|
|
48
|
+
defaultClassNames.button_next,
|
|
49
|
+
),
|
|
50
|
+
month_caption: cn('flex h-[--cell-size] w-full items-center justify-center px-[--cell-size]', defaultClassNames.month_caption),
|
|
51
|
+
dropdowns: cn('flex h-[--cell-size] w-full items-center justify-center gap-1.5 text-sm font-medium', defaultClassNames.dropdowns),
|
|
52
|
+
dropdown_root: cn(
|
|
53
|
+
'has-focus:border-ring border-input shadow-xs has-focus:ring-ring/50 has-focus:ring-[3px] relative rounded-md border',
|
|
54
|
+
defaultClassNames.dropdown_root,
|
|
55
|
+
),
|
|
56
|
+
dropdown: cn('absolute inset-0 opacity-0', defaultClassNames.dropdown),
|
|
57
|
+
caption_label: cn(
|
|
58
|
+
'select-none font-medium',
|
|
59
|
+
captionLayout === 'label'
|
|
60
|
+
? 'text-sm'
|
|
61
|
+
: '[&>svg]:text-muted-foreground flex h-8 items-center gap-1 rounded-md pl-2 pr-1 text-sm [&>svg]:size-3.5',
|
|
62
|
+
defaultClassNames.caption_label,
|
|
63
|
+
),
|
|
64
|
+
table: 'w-full border-collapse',
|
|
65
|
+
weekdays: cn('flex', defaultClassNames.weekdays),
|
|
66
|
+
weekday: cn('text-muted-foreground flex-1 select-none rounded-md text-[0.8rem] font-normal', defaultClassNames.weekday),
|
|
67
|
+
week: cn('mt-2 flex w-full', defaultClassNames.week),
|
|
68
|
+
week_number_header: cn('w-[--cell-size] select-none', defaultClassNames.week_number_header),
|
|
69
|
+
week_number: cn('text-muted-foreground select-none text-[0.8rem]', defaultClassNames.week_number),
|
|
70
|
+
day: cn(
|
|
71
|
+
'group/day relative aspect-square h-[32px] w-[32px] select-none p-0 text-center [&:first-child[data-selected=true]_button]:rounded-l-md [&:last-child[data-selected=true]_button]:rounded-r-md',
|
|
72
|
+
defaultClassNames.day,
|
|
73
|
+
),
|
|
74
|
+
range_start: cn('bg-accent rounded-l-md', defaultClassNames.range_start),
|
|
75
|
+
range_middle: cn('rounded-none', defaultClassNames.range_middle),
|
|
76
|
+
range_end: cn('bg-accent rounded-r-md', defaultClassNames.range_end),
|
|
77
|
+
today: cn('bg-accent text-accent-foreground rounded-md data-[selected=true]:rounded-none', defaultClassNames.today),
|
|
78
|
+
outside: cn('text-muted-foreground aria-selected:text-muted-foreground', defaultClassNames.outside),
|
|
79
|
+
disabled: cn('text-muted-foreground opacity-50', defaultClassNames.disabled),
|
|
80
|
+
hidden: cn('invisible', defaultClassNames.hidden),
|
|
81
|
+
...classNames,
|
|
82
|
+
}}
|
|
83
|
+
components={{
|
|
84
|
+
Root: ({ className, rootRef, ...props }) => {
|
|
85
|
+
return <div data-slot='calendar' ref={rootRef} className={cn(className)} {...props} />;
|
|
86
|
+
},
|
|
87
|
+
Chevron: ({ className, orientation, ...props }) => {
|
|
88
|
+
if (orientation === 'left') {
|
|
89
|
+
return <ChevronLeftIcon className={cn('size-4', className)} {...props} />;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
if (orientation === 'right') {
|
|
93
|
+
return <ChevronRightIcon className={cn('size-4', className)} {...props} />;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
return <ChevronDownIcon className={cn('size-4', className)} {...props} />;
|
|
97
|
+
},
|
|
98
|
+
DayButton: CalendarDayButton,
|
|
99
|
+
WeekNumber: ({ children, ...props }) => {
|
|
100
|
+
return (
|
|
101
|
+
<td {...props}>
|
|
102
|
+
<div className='flex size-[--cell-size] items-center justify-center text-center'>{children}</div>
|
|
103
|
+
</td>
|
|
104
|
+
);
|
|
105
|
+
},
|
|
106
|
+
...components,
|
|
107
|
+
}}
|
|
108
|
+
{...props}
|
|
109
|
+
/>
|
|
110
|
+
);
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
function CalendarDayButton({ className, day, modifiers, ...props }: React.ComponentProps<typeof DayButton>) {
|
|
114
|
+
const defaultClassNames = getDefaultClassNames();
|
|
115
|
+
|
|
116
|
+
const ref = React.useRef<HTMLButtonElement>(null);
|
|
117
|
+
React.useEffect(() => {
|
|
118
|
+
if (modifiers.focused) ref.current?.focus();
|
|
119
|
+
}, [modifiers.focused]);
|
|
120
|
+
|
|
121
|
+
return (
|
|
122
|
+
<Button
|
|
123
|
+
ref={ref}
|
|
124
|
+
variant='ghost'
|
|
125
|
+
size='icon'
|
|
126
|
+
data-day={day.date.toLocaleDateString()}
|
|
127
|
+
data-selected-single={modifiers.selected && !modifiers.range_start && !modifiers.range_end && !modifiers.range_middle}
|
|
128
|
+
data-range-start={modifiers.range_start}
|
|
129
|
+
data-range-end={modifiers.range_end}
|
|
130
|
+
data-range-middle={modifiers.range_middle}
|
|
131
|
+
className={cn(
|
|
132
|
+
'data-[selected-single=true]:bg-background-primary data-[selected-single=true]:text-primary-foreground data-[range-middle=true]:bg-accent data-[range-middle=true]:text-accent-foreground data-[range-start=true]:bg-background-primary data-[range-start=true]:text-primary-foreground data-[range-end=true]:bg-background-primary data-[range-end=true]:text-primary-foreground group-data-[focused=true]/day:border-ring group-data-[focused=true]/day:ring-ring/50 flex aspect-square h-auto w-full min-w-[--cell-size] flex-col gap-1 font-normal leading-none data-[range-end=true]:rounded-md data-[range-middle=true]:rounded-none data-[range-start=true]:rounded-md group-data-[focused=true]/day:relative group-data-[focused=true]/day:z-10 group-data-[focused=true]/day:ring-[3px] [&>span]:text-xs [&>span]:opacity-70',
|
|
133
|
+
defaultClassNames.day,
|
|
134
|
+
className,
|
|
135
|
+
)}
|
|
136
|
+
{...props}
|
|
137
|
+
/>
|
|
138
|
+
);
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
export { Calendar, CalendarDayButton };
|
|
142
|
+
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { cn } from '../../lib/utils';
|
|
3
|
+
|
|
4
|
+
const Card = React.forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLDivElement>>(({ className, ...props }, ref) => (
|
|
5
|
+
<div ref={ref} className={cn('rounded-lg border bg-card text-card-foreground shadow-sm', className)} {...props} />
|
|
6
|
+
));
|
|
7
|
+
Card.displayName = 'Card';
|
|
8
|
+
|
|
9
|
+
const CardHeader = React.forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLDivElement>>(({ className, ...props }, ref) => (
|
|
10
|
+
<div ref={ref} className={cn('flex p-6', className)} {...props} />
|
|
11
|
+
));
|
|
12
|
+
CardHeader.displayName = 'CardHeader';
|
|
13
|
+
|
|
14
|
+
const CardTitle = React.forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLDivElement>>(({ className, ...props }, ref) => (
|
|
15
|
+
<div ref={ref} className={cn('text-2xl font-semibold leading-none tracking-tight', className)} {...props} />
|
|
16
|
+
));
|
|
17
|
+
CardTitle.displayName = 'CardTitle';
|
|
18
|
+
|
|
19
|
+
const CardDescription = React.forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLDivElement>>(({ className, ...props }, ref) => (
|
|
20
|
+
<div ref={ref} className={cn('text-sm text-muted-foreground', className)} {...props} />
|
|
21
|
+
));
|
|
22
|
+
CardDescription.displayName = 'CardDescription';
|
|
23
|
+
|
|
24
|
+
const CardContent = React.forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLDivElement>>(({ className, ...props }, ref) => (
|
|
25
|
+
<div ref={ref} className={cn('py-8 px-6', className)} {...props} />
|
|
26
|
+
));
|
|
27
|
+
CardContent.displayName = 'CardContent';
|
|
28
|
+
|
|
29
|
+
const CardFooter = React.forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLDivElement>>(({ className, ...props }, ref) => (
|
|
30
|
+
<div ref={ref} className={cn('flex items-center p-6', className)} {...props} />
|
|
31
|
+
));
|
|
32
|
+
CardFooter.displayName = 'CardFooter';
|
|
33
|
+
|
|
34
|
+
export { Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle };
|
|
35
|
+
|