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
package/dist/index.js
ADDED
|
@@ -0,0 +1,3558 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
4
|
+
var AccordionPrimitive = require('@radix-ui/react-accordion');
|
|
5
|
+
var lucideReact = require('lucide-react');
|
|
6
|
+
var React = require('react');
|
|
7
|
+
var clsx = require('clsx');
|
|
8
|
+
var tailwindMerge = require('tailwind-merge');
|
|
9
|
+
var classVarianceAuthority = require('class-variance-authority');
|
|
10
|
+
var AlertDialogPrimitive = require('@radix-ui/react-alert-dialog');
|
|
11
|
+
var reactSlot = require('@radix-ui/react-slot');
|
|
12
|
+
var AvatarPrimitive = require('@radix-ui/react-avatar');
|
|
13
|
+
var reactDayPicker = require('react-day-picker');
|
|
14
|
+
var useEmblaCarousel = require('embla-carousel-react');
|
|
15
|
+
var RechartsPrimitive = require('recharts');
|
|
16
|
+
var CheckboxPrimitive = require('@radix-ui/react-checkbox');
|
|
17
|
+
var CollapsiblePrimitive = require('@radix-ui/react-collapsible');
|
|
18
|
+
var cmdk = require('cmdk');
|
|
19
|
+
var DialogPrimitive = require('@radix-ui/react-dialog');
|
|
20
|
+
var ContextMenuPrimitive = require('@radix-ui/react-context-menu');
|
|
21
|
+
var dateFns = require('date-fns');
|
|
22
|
+
var PopoverPrimitive = require('@radix-ui/react-popover');
|
|
23
|
+
var vaul = require('vaul');
|
|
24
|
+
var DropdownMenuPrimitive = require('@radix-ui/react-dropdown-menu');
|
|
25
|
+
var reactHookForm = require('react-hook-form');
|
|
26
|
+
var LabelPrimitive = require('@radix-ui/react-label');
|
|
27
|
+
var HoverCardPrimitive = require('@radix-ui/react-hover-card');
|
|
28
|
+
var InputMask = require('@mona-health/react-input-mask');
|
|
29
|
+
var mask = require('@react-input/mask');
|
|
30
|
+
var SelectPrimitive = require('@radix-ui/react-select');
|
|
31
|
+
var ProgressPrimitive = require('@radix-ui/react-progress');
|
|
32
|
+
var RadioGroupPrimitive = require('@radix-ui/react-radio-group');
|
|
33
|
+
var ScrollAreaPrimitive = require('@radix-ui/react-scroll-area');
|
|
34
|
+
var SeparatorPrimitive = require('@radix-ui/react-separator');
|
|
35
|
+
var TooltipPrimitive = require('@radix-ui/react-tooltip');
|
|
36
|
+
var SliderPrimitive = require('@radix-ui/react-slider');
|
|
37
|
+
var SwitchPrimitives = require('@radix-ui/react-switch');
|
|
38
|
+
var TabsPrimitive = require('@radix-ui/react-tabs');
|
|
39
|
+
var ToastPrimitives = require('@radix-ui/react-toast');
|
|
40
|
+
var reactTable = require('@tanstack/react-table');
|
|
41
|
+
var zod$1 = require('@hookform/resolvers/zod');
|
|
42
|
+
var zod = require('zod');
|
|
43
|
+
var reactRouterDom = require('react-router-dom');
|
|
44
|
+
var LoadingBar = require('react-top-loading-bar');
|
|
45
|
+
|
|
46
|
+
function _interopNamespaceDefault(e) {
|
|
47
|
+
var n = Object.create(null);
|
|
48
|
+
if (e) {
|
|
49
|
+
Object.keys(e).forEach(function (k) {
|
|
50
|
+
if (k !== 'default') {
|
|
51
|
+
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
52
|
+
Object.defineProperty(n, k, d.get ? d : {
|
|
53
|
+
enumerable: true,
|
|
54
|
+
get: function () { return e[k]; }
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
n.default = e;
|
|
60
|
+
return Object.freeze(n);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
var AccordionPrimitive__namespace = /*#__PURE__*/_interopNamespaceDefault(AccordionPrimitive);
|
|
64
|
+
var React__namespace = /*#__PURE__*/_interopNamespaceDefault(React);
|
|
65
|
+
var AlertDialogPrimitive__namespace = /*#__PURE__*/_interopNamespaceDefault(AlertDialogPrimitive);
|
|
66
|
+
var AvatarPrimitive__namespace = /*#__PURE__*/_interopNamespaceDefault(AvatarPrimitive);
|
|
67
|
+
var RechartsPrimitive__namespace = /*#__PURE__*/_interopNamespaceDefault(RechartsPrimitive);
|
|
68
|
+
var CheckboxPrimitive__namespace = /*#__PURE__*/_interopNamespaceDefault(CheckboxPrimitive);
|
|
69
|
+
var CollapsiblePrimitive__namespace = /*#__PURE__*/_interopNamespaceDefault(CollapsiblePrimitive);
|
|
70
|
+
var DialogPrimitive__namespace = /*#__PURE__*/_interopNamespaceDefault(DialogPrimitive);
|
|
71
|
+
var ContextMenuPrimitive__namespace = /*#__PURE__*/_interopNamespaceDefault(ContextMenuPrimitive);
|
|
72
|
+
var PopoverPrimitive__namespace = /*#__PURE__*/_interopNamespaceDefault(PopoverPrimitive);
|
|
73
|
+
var DropdownMenuPrimitive__namespace = /*#__PURE__*/_interopNamespaceDefault(DropdownMenuPrimitive);
|
|
74
|
+
var LabelPrimitive__namespace = /*#__PURE__*/_interopNamespaceDefault(LabelPrimitive);
|
|
75
|
+
var HoverCardPrimitive__namespace = /*#__PURE__*/_interopNamespaceDefault(HoverCardPrimitive);
|
|
76
|
+
var SelectPrimitive__namespace = /*#__PURE__*/_interopNamespaceDefault(SelectPrimitive);
|
|
77
|
+
var ProgressPrimitive__namespace = /*#__PURE__*/_interopNamespaceDefault(ProgressPrimitive);
|
|
78
|
+
var RadioGroupPrimitive__namespace = /*#__PURE__*/_interopNamespaceDefault(RadioGroupPrimitive);
|
|
79
|
+
var ScrollAreaPrimitive__namespace = /*#__PURE__*/_interopNamespaceDefault(ScrollAreaPrimitive);
|
|
80
|
+
var SeparatorPrimitive__namespace = /*#__PURE__*/_interopNamespaceDefault(SeparatorPrimitive);
|
|
81
|
+
var TooltipPrimitive__namespace = /*#__PURE__*/_interopNamespaceDefault(TooltipPrimitive);
|
|
82
|
+
var SliderPrimitive__namespace = /*#__PURE__*/_interopNamespaceDefault(SliderPrimitive);
|
|
83
|
+
var SwitchPrimitives__namespace = /*#__PURE__*/_interopNamespaceDefault(SwitchPrimitives);
|
|
84
|
+
var TabsPrimitive__namespace = /*#__PURE__*/_interopNamespaceDefault(TabsPrimitive);
|
|
85
|
+
var ToastPrimitives__namespace = /*#__PURE__*/_interopNamespaceDefault(ToastPrimitives);
|
|
86
|
+
|
|
87
|
+
function cn(...inputs) {
|
|
88
|
+
return tailwindMerge.twMerge(clsx.clsx(inputs));
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
const Accordion = AccordionPrimitive__namespace.Root;
|
|
92
|
+
const AccordionItem = React__namespace.forwardRef(({ className, ...props }, ref) => jsxRuntime.jsx(AccordionPrimitive__namespace.Item, { ref: ref, className: cn('border-b', className), ...props }));
|
|
93
|
+
AccordionItem.displayName = 'AccordionItem';
|
|
94
|
+
const AccordionTrigger = React__namespace.forwardRef(({ className, children, ...props }, ref) => (jsxRuntime.jsx(AccordionPrimitive__namespace.Header, { className: 'flex', children: jsxRuntime.jsxs(AccordionPrimitive__namespace.Trigger, { ref: ref, className: cn('flex flex-1 items-center justify-between p-4 font-medium transition-all [&[data-state=open]>svg]:rotate-180', className), ...props, children: [children, jsxRuntime.jsx(lucideReact.ChevronDown, { className: 'h-4 w-4 shrink-0 transition-transform duration-200' })] }) })));
|
|
95
|
+
AccordionTrigger.displayName = AccordionPrimitive__namespace.Trigger.displayName;
|
|
96
|
+
const AccordionContent = React__namespace.forwardRef(({ className, children, ...props }, ref) => (jsxRuntime.jsx(AccordionPrimitive__namespace.Content, { ref: ref, className: 'overflow-hidden text-sm transition-all data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down', ...props, children: jsxRuntime.jsx("div", { className: cn('p-4 pt-0', className), children: children }) })));
|
|
97
|
+
AccordionContent.displayName = AccordionPrimitive__namespace.Content.displayName;
|
|
98
|
+
|
|
99
|
+
const alertVariants = classVarianceAuthority.cva('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', {
|
|
100
|
+
variants: {
|
|
101
|
+
variant: {
|
|
102
|
+
default: 'bg-background text-foreground',
|
|
103
|
+
destructive: 'border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive',
|
|
104
|
+
},
|
|
105
|
+
},
|
|
106
|
+
defaultVariants: {
|
|
107
|
+
variant: 'default',
|
|
108
|
+
},
|
|
109
|
+
});
|
|
110
|
+
const Alert = React__namespace.forwardRef(({ className, variant, ...props }, ref) => jsxRuntime.jsx("div", { ref: ref, role: 'alert', className: cn(alertVariants({ variant }), className), ...props }));
|
|
111
|
+
Alert.displayName = 'Alert';
|
|
112
|
+
const AlertTitle = React__namespace.forwardRef(({ className, ...props }, ref) => (jsxRuntime.jsx("h5", { ref: ref, className: cn('mb-1 font-medium leading-none tracking-tight', className), ...props })));
|
|
113
|
+
AlertTitle.displayName = 'AlertTitle';
|
|
114
|
+
const AlertDescription = React__namespace.forwardRef(({ className, ...props }, ref) => (jsxRuntime.jsx("div", { ref: ref, className: cn('text-sm [&_p]:leading-relaxed', className), ...props })));
|
|
115
|
+
AlertDescription.displayName = 'AlertDescription';
|
|
116
|
+
|
|
117
|
+
const buttonVariants = classVarianceAuthority.cva('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', {
|
|
118
|
+
variants: {
|
|
119
|
+
variant: {
|
|
120
|
+
default: 'bg-background-primary text-white hover:bg-background-primary-hover disabled:opacity-50',
|
|
121
|
+
secondary: 'bg-secondary text-secondary-foreground hover:bg-secondary-hover disabled:opacity-50',
|
|
122
|
+
destructive: 'bg-red-600 text-destructive-foreground hover:bg-destructive/90 disabled:opacity-50',
|
|
123
|
+
outline: 'border border-input bg-background hover:bg-accent hover:text-accent-foreground disabled:opacity-50',
|
|
124
|
+
ghost: 'hover:bg-accent hover:text-accent-foreground disabled:opacity-50',
|
|
125
|
+
link: 'text-primary underline-offset-4 hover:underline disabled:opacity-50',
|
|
126
|
+
},
|
|
127
|
+
size: {
|
|
128
|
+
default: 'h-10 px-4 py-2',
|
|
129
|
+
sm: 'h-9 rounded-md px-3',
|
|
130
|
+
lg: 'h-11 rounded-md px-8',
|
|
131
|
+
icon: 'h-10 w-10',
|
|
132
|
+
},
|
|
133
|
+
},
|
|
134
|
+
defaultVariants: {
|
|
135
|
+
variant: 'default',
|
|
136
|
+
size: 'default',
|
|
137
|
+
},
|
|
138
|
+
});
|
|
139
|
+
const Button = React__namespace.forwardRef(({ className, variant, size, asChild = false, ...props }, ref) => {
|
|
140
|
+
const Comp = asChild ? reactSlot.Slot : 'button';
|
|
141
|
+
return jsxRuntime.jsx(Comp, { className: cn(buttonVariants({ variant, size, className })), ref: ref, ...props });
|
|
142
|
+
});
|
|
143
|
+
Button.displayName = 'Button';
|
|
144
|
+
|
|
145
|
+
const AlertDialog = AlertDialogPrimitive__namespace.Root;
|
|
146
|
+
const AlertDialogTrigger = AlertDialogPrimitive__namespace.Trigger;
|
|
147
|
+
const AlertDialogPortal = AlertDialogPrimitive__namespace.Portal;
|
|
148
|
+
const AlertDialogOverlay = React__namespace.forwardRef(({ className, ...props }, ref) => (jsxRuntime.jsx(AlertDialogPrimitive__namespace.Overlay, { className: cn("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", className), ...props, ref: ref })));
|
|
149
|
+
AlertDialogOverlay.displayName = AlertDialogPrimitive__namespace.Overlay.displayName;
|
|
150
|
+
const AlertDialogContent = React__namespace.forwardRef(({ className, ...props }, ref) => (jsxRuntime.jsxs(AlertDialogPortal, { children: [jsxRuntime.jsx(AlertDialogOverlay, {}), jsxRuntime.jsx(AlertDialogPrimitive__namespace.Content, { ref: ref, className: cn("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", className), ...props })] })));
|
|
151
|
+
AlertDialogContent.displayName = AlertDialogPrimitive__namespace.Content.displayName;
|
|
152
|
+
const AlertDialogHeader = ({ className, ...props }) => (jsxRuntime.jsx("div", { className: cn("flex flex-col space-y-2 text-center sm:text-left", className), ...props }));
|
|
153
|
+
AlertDialogHeader.displayName = "AlertDialogHeader";
|
|
154
|
+
const AlertDialogFooter = ({ className, ...props }) => (jsxRuntime.jsx("div", { className: cn("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2", className), ...props }));
|
|
155
|
+
AlertDialogFooter.displayName = "AlertDialogFooter";
|
|
156
|
+
const AlertDialogTitle = React__namespace.forwardRef(({ className, ...props }, ref) => (jsxRuntime.jsx(AlertDialogPrimitive__namespace.Title, { ref: ref, className: cn("text-lg font-semibold", className), ...props })));
|
|
157
|
+
AlertDialogTitle.displayName = AlertDialogPrimitive__namespace.Title.displayName;
|
|
158
|
+
const AlertDialogDescription = React__namespace.forwardRef(({ className, ...props }, ref) => (jsxRuntime.jsx(AlertDialogPrimitive__namespace.Description, { ref: ref, className: cn("text-sm text-muted-foreground", className), ...props })));
|
|
159
|
+
AlertDialogDescription.displayName =
|
|
160
|
+
AlertDialogPrimitive__namespace.Description.displayName;
|
|
161
|
+
const AlertDialogAction = React__namespace.forwardRef(({ className, variant = "default", ...props }, ref) => (jsxRuntime.jsx(AlertDialogPrimitive__namespace.Action, { ref: ref, className: cn(buttonVariants({ variant }), className), ...props })));
|
|
162
|
+
AlertDialogAction.displayName = AlertDialogPrimitive__namespace.Action.displayName;
|
|
163
|
+
const AlertDialogCancel = React__namespace.forwardRef(({ className, variant = "outline", ...props }, ref) => (jsxRuntime.jsx(AlertDialogPrimitive__namespace.Cancel, { ref: ref, className: cn(buttonVariants({ variant }), // Usa a variante passada como prop
|
|
164
|
+
"mt-2 sm:mt-0", className), ...props })));
|
|
165
|
+
AlertDialogCancel.displayName = AlertDialogPrimitive__namespace.Cancel.displayName;
|
|
166
|
+
|
|
167
|
+
const Avatar = React__namespace.forwardRef(({ className, ...props }, ref) => (jsxRuntime.jsx(AvatarPrimitive__namespace.Root, { ref: ref, className: cn("relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full", className), ...props })));
|
|
168
|
+
Avatar.displayName = AvatarPrimitive__namespace.Root.displayName;
|
|
169
|
+
const AvatarImage = React__namespace.forwardRef(({ className, ...props }, ref) => (jsxRuntime.jsx(AvatarPrimitive__namespace.Image, { ref: ref, className: cn("aspect-square h-full w-full", className), ...props })));
|
|
170
|
+
AvatarImage.displayName = AvatarPrimitive__namespace.Image.displayName;
|
|
171
|
+
const AvatarFallback = React__namespace.forwardRef(({ className, ...props }, ref) => (jsxRuntime.jsx(AvatarPrimitive__namespace.Fallback, { ref: ref, className: cn("flex h-full w-full items-center justify-center rounded-full bg-muted", className), ...props })));
|
|
172
|
+
AvatarFallback.displayName = AvatarPrimitive__namespace.Fallback.displayName;
|
|
173
|
+
|
|
174
|
+
const badgeVariants = classVarianceAuthority.cva('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', {
|
|
175
|
+
variants: {
|
|
176
|
+
variant: {
|
|
177
|
+
default: 'border-transparent bg-background-primary text-primary-foreground',
|
|
178
|
+
secondary: 'border-transparent bg-background-secondary text-secondary-foreground',
|
|
179
|
+
surface: 'border-transparent bg-primary-100 text-primary',
|
|
180
|
+
destructive: 'border-transparent bg-destructive text-destructive-foreground',
|
|
181
|
+
outline: 'text-foreground',
|
|
182
|
+
green: 'border-transparent bg-green-50 text-emerald-700',
|
|
183
|
+
red: 'border-transparent bg-red-50 text-red-600',
|
|
184
|
+
gray: 'border-transparent bg-zinc-100 text-zinc-950',
|
|
185
|
+
blue: 'border-transparent bg-blue-50 text-blue-600',
|
|
186
|
+
orange: 'border-transparent bg-orange-50 text-orange-600',
|
|
187
|
+
},
|
|
188
|
+
},
|
|
189
|
+
defaultVariants: {
|
|
190
|
+
variant: 'default',
|
|
191
|
+
},
|
|
192
|
+
});
|
|
193
|
+
function Badge({ className, variant, ...props }) {
|
|
194
|
+
return jsxRuntime.jsx("div", { className: cn(badgeVariants({ variant }), className), ...props });
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
const Breadcrumb = React__namespace.forwardRef(({ ...props }, ref) => jsxRuntime.jsx("nav", { ref: ref, "aria-label": "breadcrumb", ...props }));
|
|
198
|
+
Breadcrumb.displayName = "Breadcrumb";
|
|
199
|
+
const BreadcrumbList = React__namespace.forwardRef(({ className, ...props }, ref) => (jsxRuntime.jsx("ol", { ref: ref, className: cn("flex flex-wrap items-center gap-1.5 break-words text-sm text-muted-foreground sm:gap-2.5", className), ...props })));
|
|
200
|
+
BreadcrumbList.displayName = "BreadcrumbList";
|
|
201
|
+
const BreadcrumbItem = React__namespace.forwardRef(({ className, ...props }, ref) => (jsxRuntime.jsx("li", { ref: ref, className: cn("inline-flex items-center gap-1.5", className), ...props })));
|
|
202
|
+
BreadcrumbItem.displayName = "BreadcrumbItem";
|
|
203
|
+
const BreadcrumbLink = React__namespace.forwardRef(({ asChild, className, ...props }, ref) => {
|
|
204
|
+
const Comp = asChild ? reactSlot.Slot : "a";
|
|
205
|
+
return (jsxRuntime.jsx(Comp, { ref: ref, className: cn("transition-colors hover:text-foreground", className), ...props }));
|
|
206
|
+
});
|
|
207
|
+
BreadcrumbLink.displayName = "BreadcrumbLink";
|
|
208
|
+
const BreadcrumbPage = React__namespace.forwardRef(({ className, ...props }, ref) => (jsxRuntime.jsx("span", { ref: ref, role: "link", "aria-disabled": "true", "aria-current": "page", className: cn("font-normal text-foreground", className), ...props })));
|
|
209
|
+
BreadcrumbPage.displayName = "BreadcrumbPage";
|
|
210
|
+
const BreadcrumbSeparator = ({ children, className, ...props }) => (jsxRuntime.jsx("li", { role: "presentation", "aria-hidden": "true", className: cn("[&>svg]:w-3.5 [&>svg]:h-3.5", className), ...props, children: children ?? jsxRuntime.jsx(lucideReact.ChevronRight, {}) }));
|
|
211
|
+
BreadcrumbSeparator.displayName = "BreadcrumbSeparator";
|
|
212
|
+
const BreadcrumbEllipsis = ({ className, ...props }) => (jsxRuntime.jsxs("span", { role: "presentation", "aria-hidden": "true", className: cn("flex h-9 w-9 items-center justify-center", className), ...props, children: [jsxRuntime.jsx(lucideReact.MoreHorizontal, { className: "h-4 w-4" }), jsxRuntime.jsx("span", { className: "sr-only", children: "More" })] }));
|
|
213
|
+
BreadcrumbEllipsis.displayName = "BreadcrumbElipssis";
|
|
214
|
+
|
|
215
|
+
function Calendar({ className, classNames, showOutsideDays = true, captionLayout = 'label', buttonVariant = 'ghost', formatters, components, ...props }) {
|
|
216
|
+
const defaultClassNames = reactDayPicker.getDefaultClassNames();
|
|
217
|
+
return (jsxRuntime.jsx(reactDayPicker.DayPicker, { showOutsideDays: showOutsideDays, className: cn('bg-background group/calendar p-3 [--cell-size:2rem] [[data-slot=card-content]_&]:bg-transparent [[data-slot=popover-content]_&]:bg-transparent', String.raw `rtl:**:[.rdp-button\_next>svg]:rotate-180`, String.raw `rtl:**:[.rdp-button\_previous>svg]:rotate-180`, className), captionLayout: captionLayout, formatters: {
|
|
218
|
+
formatMonthDropdown: (date) => date.toLocaleString('default', { month: 'short' }),
|
|
219
|
+
...formatters,
|
|
220
|
+
}, classNames: {
|
|
221
|
+
root: cn('w-fit', defaultClassNames.root),
|
|
222
|
+
months: cn('relative flex flex-col gap-4 md:flex-row', defaultClassNames.months),
|
|
223
|
+
month: cn('flex w-full flex-col gap-4', defaultClassNames.month),
|
|
224
|
+
nav: cn('absolute inset-x-0 top-0 flex w-full items-center justify-between gap-1', defaultClassNames.nav),
|
|
225
|
+
button_previous: cn(buttonVariants({ variant: buttonVariant }), 'h-[--cell-size] w-[--cell-size] select-none p-0 aria-disabled:opacity-50', defaultClassNames.button_previous),
|
|
226
|
+
button_next: cn(buttonVariants({ variant: buttonVariant }), 'h-[--cell-size] w-[--cell-size] select-none p-0 aria-disabled:opacity-50', defaultClassNames.button_next),
|
|
227
|
+
month_caption: cn('flex h-[--cell-size] w-full items-center justify-center px-[--cell-size]', defaultClassNames.month_caption),
|
|
228
|
+
dropdowns: cn('flex h-[--cell-size] w-full items-center justify-center gap-1.5 text-sm font-medium', defaultClassNames.dropdowns),
|
|
229
|
+
dropdown_root: cn('has-focus:border-ring border-input shadow-xs has-focus:ring-ring/50 has-focus:ring-[3px] relative rounded-md border', defaultClassNames.dropdown_root),
|
|
230
|
+
dropdown: cn('absolute inset-0 opacity-0', defaultClassNames.dropdown),
|
|
231
|
+
caption_label: cn('select-none font-medium', captionLayout === 'label'
|
|
232
|
+
? 'text-sm'
|
|
233
|
+
: '[&>svg]:text-muted-foreground flex h-8 items-center gap-1 rounded-md pl-2 pr-1 text-sm [&>svg]:size-3.5', defaultClassNames.caption_label),
|
|
234
|
+
table: 'w-full border-collapse',
|
|
235
|
+
weekdays: cn('flex', defaultClassNames.weekdays),
|
|
236
|
+
weekday: cn('text-muted-foreground flex-1 select-none rounded-md text-[0.8rem] font-normal', defaultClassNames.weekday),
|
|
237
|
+
week: cn('mt-2 flex w-full', defaultClassNames.week),
|
|
238
|
+
week_number_header: cn('w-[--cell-size] select-none', defaultClassNames.week_number_header),
|
|
239
|
+
week_number: cn('text-muted-foreground select-none text-[0.8rem]', defaultClassNames.week_number),
|
|
240
|
+
day: cn('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', defaultClassNames.day),
|
|
241
|
+
range_start: cn('bg-accent rounded-l-md', defaultClassNames.range_start),
|
|
242
|
+
range_middle: cn('rounded-none', defaultClassNames.range_middle),
|
|
243
|
+
range_end: cn('bg-accent rounded-r-md', defaultClassNames.range_end),
|
|
244
|
+
today: cn('bg-accent text-accent-foreground rounded-md data-[selected=true]:rounded-none', defaultClassNames.today),
|
|
245
|
+
outside: cn('text-muted-foreground aria-selected:text-muted-foreground', defaultClassNames.outside),
|
|
246
|
+
disabled: cn('text-muted-foreground opacity-50', defaultClassNames.disabled),
|
|
247
|
+
hidden: cn('invisible', defaultClassNames.hidden),
|
|
248
|
+
...classNames,
|
|
249
|
+
}, components: {
|
|
250
|
+
Root: ({ className, rootRef, ...props }) => {
|
|
251
|
+
return jsxRuntime.jsx("div", { "data-slot": 'calendar', ref: rootRef, className: cn(className), ...props });
|
|
252
|
+
},
|
|
253
|
+
Chevron: ({ className, orientation, ...props }) => {
|
|
254
|
+
if (orientation === 'left') {
|
|
255
|
+
return jsxRuntime.jsx(lucideReact.ChevronLeftIcon, { className: cn('size-4', className), ...props });
|
|
256
|
+
}
|
|
257
|
+
if (orientation === 'right') {
|
|
258
|
+
return jsxRuntime.jsx(lucideReact.ChevronRightIcon, { className: cn('size-4', className), ...props });
|
|
259
|
+
}
|
|
260
|
+
return jsxRuntime.jsx(lucideReact.ChevronDownIcon, { className: cn('size-4', className), ...props });
|
|
261
|
+
},
|
|
262
|
+
DayButton: CalendarDayButton,
|
|
263
|
+
WeekNumber: ({ children, ...props }) => {
|
|
264
|
+
return (jsxRuntime.jsx("td", { ...props, children: jsxRuntime.jsx("div", { className: 'flex size-[--cell-size] items-center justify-center text-center', children: children }) }));
|
|
265
|
+
},
|
|
266
|
+
...components,
|
|
267
|
+
}, ...props }));
|
|
268
|
+
}
|
|
269
|
+
function CalendarDayButton({ className, day, modifiers, ...props }) {
|
|
270
|
+
const defaultClassNames = reactDayPicker.getDefaultClassNames();
|
|
271
|
+
const ref = React__namespace.useRef(null);
|
|
272
|
+
React__namespace.useEffect(() => {
|
|
273
|
+
if (modifiers.focused)
|
|
274
|
+
ref.current?.focus();
|
|
275
|
+
}, [modifiers.focused]);
|
|
276
|
+
return (jsxRuntime.jsx(Button, { ref: ref, variant: 'ghost', size: 'icon', "data-day": day.date.toLocaleDateString(), "data-selected-single": modifiers.selected && !modifiers.range_start && !modifiers.range_end && !modifiers.range_middle, "data-range-start": modifiers.range_start, "data-range-end": modifiers.range_end, "data-range-middle": modifiers.range_middle, className: cn('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', defaultClassNames.day, className), ...props }));
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
const Card = React__namespace.forwardRef(({ className, ...props }, ref) => (jsxRuntime.jsx("div", { ref: ref, className: cn('rounded-lg border bg-card text-card-foreground shadow-sm', className), ...props })));
|
|
280
|
+
Card.displayName = 'Card';
|
|
281
|
+
const CardHeader = React__namespace.forwardRef(({ className, ...props }, ref) => (jsxRuntime.jsx("div", { ref: ref, className: cn('flex p-6', className), ...props })));
|
|
282
|
+
CardHeader.displayName = 'CardHeader';
|
|
283
|
+
const CardTitle = React__namespace.forwardRef(({ className, ...props }, ref) => (jsxRuntime.jsx("div", { ref: ref, className: cn('text-2xl font-semibold leading-none tracking-tight', className), ...props })));
|
|
284
|
+
CardTitle.displayName = 'CardTitle';
|
|
285
|
+
const CardDescription = React__namespace.forwardRef(({ className, ...props }, ref) => (jsxRuntime.jsx("div", { ref: ref, className: cn('text-sm text-muted-foreground', className), ...props })));
|
|
286
|
+
CardDescription.displayName = 'CardDescription';
|
|
287
|
+
const CardContent = React__namespace.forwardRef(({ className, ...props }, ref) => (jsxRuntime.jsx("div", { ref: ref, className: cn('py-8 px-6', className), ...props })));
|
|
288
|
+
CardContent.displayName = 'CardContent';
|
|
289
|
+
const CardFooter = React__namespace.forwardRef(({ className, ...props }, ref) => (jsxRuntime.jsx("div", { ref: ref, className: cn('flex items-center p-6', className), ...props })));
|
|
290
|
+
CardFooter.displayName = 'CardFooter';
|
|
291
|
+
|
|
292
|
+
const CarouselContext = React__namespace.createContext(null);
|
|
293
|
+
function useCarousel() {
|
|
294
|
+
const context = React__namespace.useContext(CarouselContext);
|
|
295
|
+
if (!context) {
|
|
296
|
+
throw new Error("useCarousel must be used within a <Carousel />");
|
|
297
|
+
}
|
|
298
|
+
return context;
|
|
299
|
+
}
|
|
300
|
+
const Carousel = React__namespace.forwardRef(({ orientation = "horizontal", opts, setApi, plugins, className, children, ...props }, ref) => {
|
|
301
|
+
const [carouselRef, api] = useEmblaCarousel({
|
|
302
|
+
...opts,
|
|
303
|
+
axis: orientation === "horizontal" ? "x" : "y",
|
|
304
|
+
}, plugins);
|
|
305
|
+
const [canScrollPrev, setCanScrollPrev] = React__namespace.useState(false);
|
|
306
|
+
const [canScrollNext, setCanScrollNext] = React__namespace.useState(false);
|
|
307
|
+
const onSelect = React__namespace.useCallback((api) => {
|
|
308
|
+
if (!api) {
|
|
309
|
+
return;
|
|
310
|
+
}
|
|
311
|
+
setCanScrollPrev(api.canScrollPrev());
|
|
312
|
+
setCanScrollNext(api.canScrollNext());
|
|
313
|
+
}, []);
|
|
314
|
+
const scrollPrev = React__namespace.useCallback(() => {
|
|
315
|
+
api?.scrollPrev();
|
|
316
|
+
}, [api]);
|
|
317
|
+
const scrollNext = React__namespace.useCallback(() => {
|
|
318
|
+
api?.scrollNext();
|
|
319
|
+
}, [api]);
|
|
320
|
+
const handleKeyDown = React__namespace.useCallback((event) => {
|
|
321
|
+
if (event.key === "ArrowLeft") {
|
|
322
|
+
event.preventDefault();
|
|
323
|
+
scrollPrev();
|
|
324
|
+
}
|
|
325
|
+
else if (event.key === "ArrowRight") {
|
|
326
|
+
event.preventDefault();
|
|
327
|
+
scrollNext();
|
|
328
|
+
}
|
|
329
|
+
}, [scrollPrev, scrollNext]);
|
|
330
|
+
React__namespace.useEffect(() => {
|
|
331
|
+
if (!api || !setApi) {
|
|
332
|
+
return;
|
|
333
|
+
}
|
|
334
|
+
setApi(api);
|
|
335
|
+
}, [api, setApi]);
|
|
336
|
+
React__namespace.useEffect(() => {
|
|
337
|
+
if (!api) {
|
|
338
|
+
return;
|
|
339
|
+
}
|
|
340
|
+
onSelect(api);
|
|
341
|
+
api.on("reInit", onSelect);
|
|
342
|
+
api.on("select", onSelect);
|
|
343
|
+
return () => {
|
|
344
|
+
api?.off("select", onSelect);
|
|
345
|
+
};
|
|
346
|
+
}, [api, onSelect]);
|
|
347
|
+
return (jsxRuntime.jsx(CarouselContext.Provider, { value: {
|
|
348
|
+
carouselRef,
|
|
349
|
+
api: api,
|
|
350
|
+
opts,
|
|
351
|
+
orientation: orientation || (opts?.axis === "y" ? "vertical" : "horizontal"),
|
|
352
|
+
scrollPrev,
|
|
353
|
+
scrollNext,
|
|
354
|
+
canScrollPrev,
|
|
355
|
+
canScrollNext,
|
|
356
|
+
}, children: jsxRuntime.jsx("div", { ref: ref, onKeyDownCapture: handleKeyDown, className: cn("relative", className), role: "region", "aria-roledescription": "carousel", ...props, children: children }) }));
|
|
357
|
+
});
|
|
358
|
+
Carousel.displayName = "Carousel";
|
|
359
|
+
const CarouselContent = React__namespace.forwardRef(({ className, ...props }, ref) => {
|
|
360
|
+
const { carouselRef, orientation } = useCarousel();
|
|
361
|
+
return (jsxRuntime.jsx("div", { ref: carouselRef, className: "overflow-hidden", children: jsxRuntime.jsx("div", { ref: ref, className: cn("flex", orientation === "horizontal" ? "-ml-4" : "-mt-4 flex-col", className), ...props }) }));
|
|
362
|
+
});
|
|
363
|
+
CarouselContent.displayName = "CarouselContent";
|
|
364
|
+
const CarouselItem = React__namespace.forwardRef(({ className, ...props }, ref) => {
|
|
365
|
+
const { orientation } = useCarousel();
|
|
366
|
+
return (jsxRuntime.jsx("div", { ref: ref, role: "group", "aria-roledescription": "slide", className: cn("min-w-0 shrink-0 grow-0 basis-full", orientation === "horizontal" ? "pl-4" : "pt-4", className), ...props }));
|
|
367
|
+
});
|
|
368
|
+
CarouselItem.displayName = "CarouselItem";
|
|
369
|
+
const CarouselPrevious = React__namespace.forwardRef(({ className, variant = "outline", size = "icon", ...props }, ref) => {
|
|
370
|
+
const { orientation, scrollPrev, canScrollPrev } = useCarousel();
|
|
371
|
+
return (jsxRuntime.jsxs(Button, { ref: ref, variant: variant, size: size, className: cn("absolute h-8 w-8 rounded-full", orientation === "horizontal"
|
|
372
|
+
? "-left-12 top-1/2 -translate-y-1/2"
|
|
373
|
+
: "-top-12 left-1/2 -translate-x-1/2 rotate-90", className), disabled: !canScrollPrev, onClick: scrollPrev, ...props, children: [jsxRuntime.jsx(lucideReact.ArrowLeft, { className: "h-4 w-4" }), jsxRuntime.jsx("span", { className: "sr-only", children: "Previous slide" })] }));
|
|
374
|
+
});
|
|
375
|
+
CarouselPrevious.displayName = "CarouselPrevious";
|
|
376
|
+
const CarouselNext = React__namespace.forwardRef(({ className, variant = "outline", size = "icon", ...props }, ref) => {
|
|
377
|
+
const { orientation, scrollNext, canScrollNext } = useCarousel();
|
|
378
|
+
return (jsxRuntime.jsxs(Button, { ref: ref, variant: variant, size: size, className: cn("absolute h-8 w-8 rounded-full", orientation === "horizontal"
|
|
379
|
+
? "-right-12 top-1/2 -translate-y-1/2"
|
|
380
|
+
: "-bottom-12 left-1/2 -translate-x-1/2 rotate-90", className), disabled: !canScrollNext, onClick: scrollNext, ...props, children: [jsxRuntime.jsx(lucideReact.ArrowRight, { className: "h-4 w-4" }), jsxRuntime.jsx("span", { className: "sr-only", children: "Next slide" })] }));
|
|
381
|
+
});
|
|
382
|
+
CarouselNext.displayName = "CarouselNext";
|
|
383
|
+
|
|
384
|
+
// Format: { THEME_NAME: CSS_SELECTOR }
|
|
385
|
+
const THEMES = { light: "", dark: ".dark" };
|
|
386
|
+
const ChartContext = React__namespace.createContext(null);
|
|
387
|
+
function useChart() {
|
|
388
|
+
const context = React__namespace.useContext(ChartContext);
|
|
389
|
+
if (!context) {
|
|
390
|
+
throw new Error("useChart must be used within a <ChartContainer />");
|
|
391
|
+
}
|
|
392
|
+
return context;
|
|
393
|
+
}
|
|
394
|
+
const ChartContainer = React__namespace.forwardRef(({ id, className, children, config, ...props }, ref) => {
|
|
395
|
+
const uniqueId = React__namespace.useId();
|
|
396
|
+
const chartId = `chart-${id || uniqueId.replace(/:/g, "")}`;
|
|
397
|
+
return (jsxRuntime.jsx(ChartContext.Provider, { value: { config }, children: jsxRuntime.jsxs("div", { "data-chart": chartId, ref: ref, className: cn("flex aspect-video justify-center text-xs [&_.recharts-cartesian-axis-tick_text]:fill-muted-foreground [&_.recharts-cartesian-grid_line[stroke='#ccc']]:stroke-border/50 [&_.recharts-curve.recharts-tooltip-cursor]:stroke-border [&_.recharts-dot[stroke='#fff']]:stroke-transparent [&_.recharts-layer]:outline-none [&_.recharts-polar-grid_[stroke='#ccc']]:stroke-border [&_.recharts-radial-bar-background-sector]:fill-muted [&_.recharts-rectangle.recharts-tooltip-cursor]:fill-muted [&_.recharts-reference-line_[stroke='#ccc']]:stroke-border [&_.recharts-sector[stroke='#fff']]:stroke-transparent [&_.recharts-sector]:outline-none [&_.recharts-surface]:outline-none", className), ...props, children: [jsxRuntime.jsx(ChartStyle, { id: chartId, config: config }), jsxRuntime.jsx(RechartsPrimitive__namespace.ResponsiveContainer, { children: children })] }) }));
|
|
398
|
+
});
|
|
399
|
+
ChartContainer.displayName = "Chart";
|
|
400
|
+
const ChartStyle = ({ id, config }) => {
|
|
401
|
+
const colorConfig = Object.entries(config).filter(([, config]) => config.theme || config.color);
|
|
402
|
+
if (!colorConfig.length) {
|
|
403
|
+
return null;
|
|
404
|
+
}
|
|
405
|
+
return (jsxRuntime.jsx("style", {
|
|
406
|
+
// biome-ignore lint/security/noDangerouslySetInnerHtml: Chart theme CSS generation requires dynamic CSS injection
|
|
407
|
+
dangerouslySetInnerHTML: {
|
|
408
|
+
__html: Object.entries(THEMES)
|
|
409
|
+
.map(([theme, prefix]) => `
|
|
410
|
+
${prefix} [data-chart=${id}] {
|
|
411
|
+
${colorConfig
|
|
412
|
+
.map(([key, itemConfig]) => {
|
|
413
|
+
const color = itemConfig.theme?.[theme] ||
|
|
414
|
+
itemConfig.color;
|
|
415
|
+
return color ? ` --color-${key}: ${color};` : null;
|
|
416
|
+
})
|
|
417
|
+
.join("\n")}
|
|
418
|
+
}
|
|
419
|
+
`)
|
|
420
|
+
.join("\n"),
|
|
421
|
+
} }));
|
|
422
|
+
};
|
|
423
|
+
const ChartTooltip = RechartsPrimitive__namespace.Tooltip;
|
|
424
|
+
const ChartTooltipContent = React__namespace.forwardRef(({ active, payload, className, indicator = "dot", hideLabel = false, hideIndicator = false, label, labelFormatter, labelClassName, formatter, color, nameKey, labelKey, }, ref) => {
|
|
425
|
+
const { config } = useChart();
|
|
426
|
+
const tooltipLabel = React__namespace.useMemo(() => {
|
|
427
|
+
if (hideLabel || !payload?.length) {
|
|
428
|
+
return null;
|
|
429
|
+
}
|
|
430
|
+
const [item] = payload;
|
|
431
|
+
const key = `${labelKey || item.dataKey || item.name || "value"}`;
|
|
432
|
+
const itemConfig = getPayloadConfigFromPayload(config, item, key);
|
|
433
|
+
const value = !labelKey && typeof label === "string"
|
|
434
|
+
? config[label]?.label || label
|
|
435
|
+
: itemConfig?.label;
|
|
436
|
+
if (labelFormatter) {
|
|
437
|
+
return (jsxRuntime.jsx("div", { className: cn("font-medium", labelClassName), children: labelFormatter(value, payload) }));
|
|
438
|
+
}
|
|
439
|
+
if (!value) {
|
|
440
|
+
return null;
|
|
441
|
+
}
|
|
442
|
+
return jsxRuntime.jsx("div", { className: cn("font-medium", labelClassName), children: value });
|
|
443
|
+
}, [
|
|
444
|
+
label,
|
|
445
|
+
labelFormatter,
|
|
446
|
+
payload,
|
|
447
|
+
hideLabel,
|
|
448
|
+
labelClassName,
|
|
449
|
+
config,
|
|
450
|
+
labelKey,
|
|
451
|
+
]);
|
|
452
|
+
if (!active || !payload?.length) {
|
|
453
|
+
return null;
|
|
454
|
+
}
|
|
455
|
+
const nestLabel = payload.length === 1 && indicator !== "dot";
|
|
456
|
+
return (jsxRuntime.jsxs("div", { ref: ref, className: cn("grid min-w-[8rem] items-start gap-1.5 rounded-lg border border-border/50 bg-background px-2.5 py-1.5 text-xs shadow-xl", className), children: [!nestLabel ? tooltipLabel : null, jsxRuntime.jsx("div", { className: "grid gap-1.5", children: payload.map((item, index) => {
|
|
457
|
+
const key = `${nameKey || item.name || item.dataKey || "value"}`;
|
|
458
|
+
const itemConfig = getPayloadConfigFromPayload(config, item, key);
|
|
459
|
+
const indicatorColor = color || item.payload.fill || item.color;
|
|
460
|
+
return (jsxRuntime.jsx("div", { className: cn("flex w-full flex-wrap items-stretch gap-2 [&>svg]:h-2.5 [&>svg]:w-2.5 [&>svg]:text-muted-foreground", indicator === "dot" && "items-center"), children: formatter && item?.value !== undefined && item.name ? (formatter(item.value, item.name, item, index, item.payload)) : (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [itemConfig?.icon ? (jsxRuntime.jsx(itemConfig.icon, {})) : (!hideIndicator && (jsxRuntime.jsx("div", { className: cn("shrink-0 rounded-[2px] border-[--color-border] bg-[--color-bg]", {
|
|
461
|
+
"h-2.5 w-2.5": indicator === "dot",
|
|
462
|
+
"w-1": indicator === "line",
|
|
463
|
+
"w-0 border-[1.5px] border-dashed bg-transparent": indicator === "dashed",
|
|
464
|
+
"my-0.5": nestLabel && indicator === "dashed",
|
|
465
|
+
}), style: {
|
|
466
|
+
"--color-bg": indicatorColor,
|
|
467
|
+
"--color-border": indicatorColor,
|
|
468
|
+
} }))), jsxRuntime.jsxs("div", { className: cn("flex flex-1 justify-between leading-none", nestLabel ? "items-end" : "items-center"), children: [jsxRuntime.jsxs("div", { className: "grid gap-1.5", children: [nestLabel ? tooltipLabel : null, jsxRuntime.jsx("span", { className: "text-muted-foreground", children: itemConfig?.label || item.name })] }), item.value && (jsxRuntime.jsx("span", { className: "font-mono font-medium tabular-nums text-foreground", children: item.value.toLocaleString() }))] })] })) }, item.dataKey));
|
|
469
|
+
}) })] }));
|
|
470
|
+
});
|
|
471
|
+
ChartTooltipContent.displayName = "ChartTooltip";
|
|
472
|
+
const ChartLegend = RechartsPrimitive__namespace.Legend;
|
|
473
|
+
const ChartLegendContent = React__namespace.forwardRef(({ className, hideIcon = false, payload, verticalAlign = "bottom", nameKey }, ref) => {
|
|
474
|
+
const { config } = useChart();
|
|
475
|
+
if (!payload?.length) {
|
|
476
|
+
return null;
|
|
477
|
+
}
|
|
478
|
+
return (jsxRuntime.jsx("div", { ref: ref, className: cn("flex items-center justify-center gap-4", verticalAlign === "top" ? "pb-3" : "pt-3", className), children: payload.map((item) => {
|
|
479
|
+
const key = `${nameKey || item.dataKey || "value"}`;
|
|
480
|
+
const itemConfig = getPayloadConfigFromPayload(config, item, key);
|
|
481
|
+
return (jsxRuntime.jsxs("div", { className: cn("flex items-center gap-1.5 [&>svg]:h-3 [&>svg]:w-3 [&>svg]:text-muted-foreground"), children: [itemConfig?.icon && !hideIcon ? (jsxRuntime.jsx(itemConfig.icon, {})) : (jsxRuntime.jsx("div", { className: "h-2 w-2 shrink-0 rounded-[2px]", style: {
|
|
482
|
+
backgroundColor: item.color,
|
|
483
|
+
} })), itemConfig?.label] }, item.value));
|
|
484
|
+
}) }));
|
|
485
|
+
});
|
|
486
|
+
ChartLegendContent.displayName = "ChartLegend";
|
|
487
|
+
// Helper to extract item config from a payload.
|
|
488
|
+
function getPayloadConfigFromPayload(config, payload, key) {
|
|
489
|
+
if (typeof payload !== "object" || payload === null) {
|
|
490
|
+
return undefined;
|
|
491
|
+
}
|
|
492
|
+
const payloadPayload = "payload" in payload &&
|
|
493
|
+
typeof payload.payload === "object" &&
|
|
494
|
+
payload.payload !== null
|
|
495
|
+
? payload.payload
|
|
496
|
+
: undefined;
|
|
497
|
+
let configLabelKey = key;
|
|
498
|
+
if (key in payload &&
|
|
499
|
+
typeof payload[key] === "string") {
|
|
500
|
+
configLabelKey = payload[key];
|
|
501
|
+
}
|
|
502
|
+
else if (payloadPayload &&
|
|
503
|
+
key in payloadPayload &&
|
|
504
|
+
typeof payloadPayload[key] === "string") {
|
|
505
|
+
configLabelKey = payloadPayload[key];
|
|
506
|
+
}
|
|
507
|
+
return configLabelKey in config
|
|
508
|
+
? config[configLabelKey]
|
|
509
|
+
: config[key];
|
|
510
|
+
}
|
|
511
|
+
|
|
512
|
+
const Checkbox = React__namespace.forwardRef(({ className, value, ...props }, ref) => (jsxRuntime.jsx(CheckboxPrimitive__namespace.Root, { ref: ref, checked: !!value, className: cn('peer h-4 w-4 shrink-0 rounded-sm border ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-background-primary data-[state=checked]:text-primary-foreground', className), ...props, children: jsxRuntime.jsx(CheckboxPrimitive__namespace.Indicator, { className: cn('flex items-center justify-center text-current'), children: jsxRuntime.jsx(lucideReact.Check, { className: 'h-4 w-4' }) }) })));
|
|
513
|
+
Checkbox.displayName = CheckboxPrimitive__namespace.Root.displayName;
|
|
514
|
+
|
|
515
|
+
const Collapsible = CollapsiblePrimitive__namespace.Root;
|
|
516
|
+
const CollapsibleTrigger = CollapsiblePrimitive__namespace.CollapsibleTrigger;
|
|
517
|
+
const CollapsibleContent = CollapsiblePrimitive__namespace.CollapsibleContent;
|
|
518
|
+
|
|
519
|
+
const Dialog = DialogPrimitive__namespace.Root;
|
|
520
|
+
const DialogTrigger = DialogPrimitive__namespace.Trigger;
|
|
521
|
+
const DialogPortal = DialogPrimitive__namespace.Portal;
|
|
522
|
+
const DialogClose = DialogPrimitive__namespace.Close;
|
|
523
|
+
const DialogOverlay = React__namespace.forwardRef(({ className, ...props }, ref) => (jsxRuntime.jsx(DialogPrimitive__namespace.Overlay, { ref: ref, className: cn('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', className), ...props })));
|
|
524
|
+
DialogOverlay.displayName = DialogPrimitive__namespace.Overlay.displayName;
|
|
525
|
+
const DialogContent = React__namespace.forwardRef(({ className, children, hideClose, ...props }, ref) => (jsxRuntime.jsxs(DialogPortal, { children: [jsxRuntime.jsx(DialogOverlay, {}), jsxRuntime.jsxs(DialogPrimitive__namespace.Content, { ref: ref, className: cn('fixed left-[50%] top-[50%] z-50 grid 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', className), ...props, children: [children, !hideClose && (jsxRuntime.jsxs(DialogPrimitive__namespace.Close, { className: 'absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground', children: [jsxRuntime.jsx(lucideReact.X, { className: 'h-4 w-4' }), jsxRuntime.jsx("span", { className: 'sr-only', children: "Close" })] }))] })] })));
|
|
526
|
+
DialogContent.displayName = DialogPrimitive__namespace.Content.displayName;
|
|
527
|
+
const DialogHeader = ({ className, ...props }) => (jsxRuntime.jsx("div", { className: cn('flex flex-col space-y-1.5 text-center sm:text-left', className), ...props }));
|
|
528
|
+
DialogHeader.displayName = 'DialogHeader';
|
|
529
|
+
const DialogFooter = ({ className, ...props }) => (jsxRuntime.jsx("div", { className: cn('flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2', className), ...props }));
|
|
530
|
+
DialogFooter.displayName = 'DialogFooter';
|
|
531
|
+
const DialogTitle = React__namespace.forwardRef(({ className, ...props }, ref) => (jsxRuntime.jsx(DialogPrimitive__namespace.Title, { ref: ref, className: cn('text-lg font-semibold leading-none tracking-tight', className), ...props })));
|
|
532
|
+
DialogTitle.displayName = DialogPrimitive__namespace.Title.displayName;
|
|
533
|
+
const DialogDescription = React__namespace.forwardRef(({ className, ...props }, ref) => jsxRuntime.jsx(DialogPrimitive__namespace.Description, { ref: ref, className: cn('text-sm text-muted-foreground', className), ...props }));
|
|
534
|
+
DialogDescription.displayName = DialogPrimitive__namespace.Description.displayName;
|
|
535
|
+
|
|
536
|
+
const Command = React__namespace.forwardRef(({ className, ...props }, ref) => (jsxRuntime.jsx(cmdk.Command, { ref: ref, className: cn("flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground", className), ...props })));
|
|
537
|
+
Command.displayName = cmdk.Command.displayName;
|
|
538
|
+
const CommandDialog = ({ children, ...props }) => {
|
|
539
|
+
return (jsxRuntime.jsx(Dialog, { ...props, children: jsxRuntime.jsx(DialogContent, { className: "overflow-hidden p-0 shadow-lg", children: jsxRuntime.jsx(Command, { className: "[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-group]]:px-2 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5", children: children }) }) }));
|
|
540
|
+
};
|
|
541
|
+
const CommandInput = React__namespace.forwardRef(({ className, ...props }, ref) => (jsxRuntime.jsxs("div", { className: "flex items-center border-b px-3", "cmdk-input-wrapper": "", children: [jsxRuntime.jsx(lucideReact.Search, { className: "mr-2 h-4 w-4 shrink-0 opacity-50" }), jsxRuntime.jsx(cmdk.Command.Input, { ref: ref, className: cn("flex h-11 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50", className), ...props })] })));
|
|
542
|
+
CommandInput.displayName = cmdk.Command.Input.displayName;
|
|
543
|
+
const CommandList = React__namespace.forwardRef(({ className, ...props }, ref) => (jsxRuntime.jsx(cmdk.Command.List, { ref: ref, className: cn("max-h-[300px] overflow-y-auto overflow-x-hidden", className), ...props })));
|
|
544
|
+
CommandList.displayName = cmdk.Command.List.displayName;
|
|
545
|
+
const CommandEmpty = React__namespace.forwardRef((props, ref) => (jsxRuntime.jsx(cmdk.Command.Empty, { ref: ref, className: "py-6 text-center text-sm", ...props })));
|
|
546
|
+
CommandEmpty.displayName = cmdk.Command.Empty.displayName;
|
|
547
|
+
const CommandGroup = React__namespace.forwardRef(({ className, ...props }, ref) => (jsxRuntime.jsx(cmdk.Command.Group, { ref: ref, className: cn("overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground", className), ...props })));
|
|
548
|
+
CommandGroup.displayName = cmdk.Command.Group.displayName;
|
|
549
|
+
const CommandSeparator = React__namespace.forwardRef(({ className, ...props }, ref) => (jsxRuntime.jsx(cmdk.Command.Separator, { ref: ref, className: cn("-mx-1 h-px bg-border", className), ...props })));
|
|
550
|
+
CommandSeparator.displayName = cmdk.Command.Separator.displayName;
|
|
551
|
+
const CommandItem = React__namespace.forwardRef(({ className, ...props }, ref) => (jsxRuntime.jsx(cmdk.Command.Item, { ref: ref, className: cn("relative flex cursor-default gap-2 select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none data-[disabled=true]:pointer-events-none data-[selected='true']:bg-accent data-[selected=true]:text-accent-foreground data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0", className), ...props })));
|
|
552
|
+
CommandItem.displayName = cmdk.Command.Item.displayName;
|
|
553
|
+
const CommandShortcut = ({ className, ...props }) => {
|
|
554
|
+
return (jsxRuntime.jsx("span", { className: cn("ml-auto text-xs tracking-widest text-muted-foreground", className), ...props }));
|
|
555
|
+
};
|
|
556
|
+
CommandShortcut.displayName = "CommandShortcut";
|
|
557
|
+
|
|
558
|
+
const ContextMenu = ContextMenuPrimitive__namespace.Root;
|
|
559
|
+
const ContextMenuTrigger = ContextMenuPrimitive__namespace.Trigger;
|
|
560
|
+
const ContextMenuGroup = ContextMenuPrimitive__namespace.Group;
|
|
561
|
+
const ContextMenuPortal = ContextMenuPrimitive__namespace.Portal;
|
|
562
|
+
const ContextMenuSub = ContextMenuPrimitive__namespace.Sub;
|
|
563
|
+
const ContextMenuRadioGroup = ContextMenuPrimitive__namespace.RadioGroup;
|
|
564
|
+
const ContextMenuSubTrigger = React__namespace.forwardRef(({ className, inset, children, ...props }, ref) => (jsxRuntime.jsxs(ContextMenuPrimitive__namespace.SubTrigger, { ref: ref, className: cn("flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground", inset && "pl-8", className), ...props, children: [children, jsxRuntime.jsx(lucideReact.ChevronRight, { className: "ml-auto h-4 w-4" })] })));
|
|
565
|
+
ContextMenuSubTrigger.displayName = ContextMenuPrimitive__namespace.SubTrigger.displayName;
|
|
566
|
+
const ContextMenuSubContent = React__namespace.forwardRef(({ className, ...props }, ref) => (jsxRuntime.jsx(ContextMenuPrimitive__namespace.SubContent, { ref: ref, className: cn("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md 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-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2", className), ...props })));
|
|
567
|
+
ContextMenuSubContent.displayName = ContextMenuPrimitive__namespace.SubContent.displayName;
|
|
568
|
+
const ContextMenuContent = React__namespace.forwardRef(({ className, ...props }, ref) => (jsxRuntime.jsx(ContextMenuPrimitive__namespace.Portal, { children: jsxRuntime.jsx(ContextMenuPrimitive__namespace.Content, { ref: ref, className: cn("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md animate-in fade-in-80 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-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2", className), ...props }) })));
|
|
569
|
+
ContextMenuContent.displayName = ContextMenuPrimitive__namespace.Content.displayName;
|
|
570
|
+
const ContextMenuItem = React__namespace.forwardRef(({ className, inset, ...props }, ref) => (jsxRuntime.jsx(ContextMenuPrimitive__namespace.Item, { ref: ref, className: cn("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50", inset && "pl-8", className), ...props })));
|
|
571
|
+
ContextMenuItem.displayName = ContextMenuPrimitive__namespace.Item.displayName;
|
|
572
|
+
const ContextMenuCheckboxItem = React__namespace.forwardRef(({ className, children, checked, ...props }, ref) => (jsxRuntime.jsxs(ContextMenuPrimitive__namespace.CheckboxItem, { ref: ref, className: cn("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50", className), checked: checked, ...props, children: [jsxRuntime.jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: jsxRuntime.jsx(ContextMenuPrimitive__namespace.ItemIndicator, { children: jsxRuntime.jsx(lucideReact.Check, { className: "h-4 w-4" }) }) }), children] })));
|
|
573
|
+
ContextMenuCheckboxItem.displayName =
|
|
574
|
+
ContextMenuPrimitive__namespace.CheckboxItem.displayName;
|
|
575
|
+
const ContextMenuRadioItem = React__namespace.forwardRef(({ className, children, ...props }, ref) => (jsxRuntime.jsxs(ContextMenuPrimitive__namespace.RadioItem, { ref: ref, className: cn("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50", className), ...props, children: [jsxRuntime.jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: jsxRuntime.jsx(ContextMenuPrimitive__namespace.ItemIndicator, { children: jsxRuntime.jsx(lucideReact.Circle, { className: "h-2 w-2 fill-current" }) }) }), children] })));
|
|
576
|
+
ContextMenuRadioItem.displayName = ContextMenuPrimitive__namespace.RadioItem.displayName;
|
|
577
|
+
const ContextMenuLabel = React__namespace.forwardRef(({ className, inset, ...props }, ref) => (jsxRuntime.jsx(ContextMenuPrimitive__namespace.Label, { ref: ref, className: cn("px-2 py-1.5 text-sm font-semibold text-foreground", inset && "pl-8", className), ...props })));
|
|
578
|
+
ContextMenuLabel.displayName = ContextMenuPrimitive__namespace.Label.displayName;
|
|
579
|
+
const ContextMenuSeparator = React__namespace.forwardRef(({ className, ...props }, ref) => (jsxRuntime.jsx(ContextMenuPrimitive__namespace.Separator, { ref: ref, className: cn("-mx-1 my-1 h-px bg-border", className), ...props })));
|
|
580
|
+
ContextMenuSeparator.displayName = ContextMenuPrimitive__namespace.Separator.displayName;
|
|
581
|
+
const ContextMenuShortcut = ({ className, ...props }) => {
|
|
582
|
+
return (jsxRuntime.jsx("span", { className: cn("ml-auto text-xs tracking-widest text-muted-foreground", className), ...props }));
|
|
583
|
+
};
|
|
584
|
+
ContextMenuShortcut.displayName = "ContextMenuShortcut";
|
|
585
|
+
|
|
586
|
+
const Popover = PopoverPrimitive__namespace.Root;
|
|
587
|
+
const PopoverTrigger = PopoverPrimitive__namespace.Trigger;
|
|
588
|
+
const PopoverContent = React__namespace.forwardRef(({ className, align = 'center', sideOffset = 4, ...props }, ref) => (jsxRuntime.jsx(PopoverPrimitive__namespace.Portal, { children: jsxRuntime.jsx(PopoverPrimitive__namespace.Content, { ref: ref, align: align, sideOffset: sideOffset, onWheel: (e) => {
|
|
589
|
+
e.stopPropagation();
|
|
590
|
+
}, className: cn('z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none 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-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2', className), ...props }) })));
|
|
591
|
+
PopoverContent.displayName = PopoverPrimitive__namespace.Content.displayName;
|
|
592
|
+
|
|
593
|
+
function DatePickerWithRange({ className, }) {
|
|
594
|
+
const [date, setDate] = React__namespace.useState({
|
|
595
|
+
from: new Date(2022, 0, 20),
|
|
596
|
+
to: dateFns.addDays(new Date(2022, 0, 20), 20),
|
|
597
|
+
});
|
|
598
|
+
return (jsxRuntime.jsx("div", { className: cn("grid gap-2", className), children: jsxRuntime.jsxs(Popover, { children: [jsxRuntime.jsx(PopoverTrigger, { asChild: true, children: jsxRuntime.jsxs(Button, { id: "date", variant: "outline", className: cn("w-[300px] justify-start text-left font-normal", !date && "text-muted-foreground"), children: [jsxRuntime.jsx(lucideReact.CalendarIcon, {}), date?.from ? (date.to ? (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [dateFns.format(date.from, "LLL dd, y"), " -", " ", dateFns.format(date.to, "LLL dd, y")] })) : (dateFns.format(date.from, "LLL dd, y"))) : (jsxRuntime.jsx("span", { children: "Pick a date" }))] }) }), jsxRuntime.jsx(PopoverContent, { className: "w-auto p-0", align: "start", children: jsxRuntime.jsx(Calendar, { initialFocus: true, mode: "range", defaultMonth: date?.from, selected: date, onSelect: setDate, numberOfMonths: 2 }) })] }) }));
|
|
599
|
+
}
|
|
600
|
+
|
|
601
|
+
const Drawer = ({ shouldScaleBackground = true, ...props }) => (jsxRuntime.jsx(vaul.Drawer.Root, { shouldScaleBackground: shouldScaleBackground, ...props }));
|
|
602
|
+
Drawer.displayName = "Drawer";
|
|
603
|
+
const DrawerTrigger = vaul.Drawer.Trigger;
|
|
604
|
+
const DrawerPortal = vaul.Drawer.Portal;
|
|
605
|
+
const DrawerClose = vaul.Drawer.Close;
|
|
606
|
+
const DrawerOverlay = React__namespace.forwardRef(({ className, ...props }, ref) => (jsxRuntime.jsx(vaul.Drawer.Overlay, { ref: ref, className: cn("fixed inset-0 z-50 bg-black/80", className), ...props })));
|
|
607
|
+
DrawerOverlay.displayName = vaul.Drawer.Overlay.displayName;
|
|
608
|
+
const DrawerContent = React__namespace.forwardRef(({ className, children, ...props }, ref) => (jsxRuntime.jsxs(DrawerPortal, { children: [jsxRuntime.jsx(DrawerOverlay, {}), jsxRuntime.jsxs(vaul.Drawer.Content, { ref: ref, className: cn("fixed inset-x-0 bottom-0 z-50 mt-24 flex h-auto flex-col rounded-t-[10px] border bg-background", className), ...props, children: [jsxRuntime.jsx("div", { className: "mx-auto mt-4 h-2 w-[100px] rounded-full bg-muted" }), children] })] })));
|
|
609
|
+
DrawerContent.displayName = "DrawerContent";
|
|
610
|
+
const DrawerHeader = ({ className, ...props }) => (jsxRuntime.jsx("div", { className: cn("grid gap-1.5 p-4 text-center sm:text-left", className), ...props }));
|
|
611
|
+
DrawerHeader.displayName = "DrawerHeader";
|
|
612
|
+
const DrawerFooter = ({ className, ...props }) => (jsxRuntime.jsx("div", { className: cn("mt-auto flex flex-col gap-2 p-4", className), ...props }));
|
|
613
|
+
DrawerFooter.displayName = "DrawerFooter";
|
|
614
|
+
const DrawerTitle = React__namespace.forwardRef(({ className, ...props }, ref) => (jsxRuntime.jsx(vaul.Drawer.Title, { ref: ref, className: cn("text-lg font-semibold leading-none tracking-tight", className), ...props })));
|
|
615
|
+
DrawerTitle.displayName = vaul.Drawer.Title.displayName;
|
|
616
|
+
const DrawerDescription = React__namespace.forwardRef(({ className, ...props }, ref) => (jsxRuntime.jsx(vaul.Drawer.Description, { ref: ref, className: cn("text-sm text-muted-foreground", className), ...props })));
|
|
617
|
+
DrawerDescription.displayName = vaul.Drawer.Description.displayName;
|
|
618
|
+
|
|
619
|
+
const DropdownMenu = DropdownMenuPrimitive__namespace.Root;
|
|
620
|
+
const DropdownMenuTrigger = DropdownMenuPrimitive__namespace.Trigger;
|
|
621
|
+
const DropdownMenuGroup = DropdownMenuPrimitive__namespace.Group;
|
|
622
|
+
const DropdownMenuPortal = DropdownMenuPrimitive__namespace.Portal;
|
|
623
|
+
const DropdownMenuSub = DropdownMenuPrimitive__namespace.Sub;
|
|
624
|
+
const DropdownMenuRadioGroup = DropdownMenuPrimitive__namespace.RadioGroup;
|
|
625
|
+
const DropdownMenuSubTrigger = React__namespace.forwardRef(({ className, inset, children, ...props }, ref) => (jsxRuntime.jsxs(DropdownMenuPrimitive__namespace.SubTrigger, { ref: ref, className: cn('flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent', inset && 'pl-8', className), ...props, children: [children, jsxRuntime.jsx(lucideReact.ChevronRight, { className: 'ml-auto h-4 w-4' })] })));
|
|
626
|
+
DropdownMenuSubTrigger.displayName = DropdownMenuPrimitive__namespace.SubTrigger.displayName;
|
|
627
|
+
const DropdownMenuSubContent = React__namespace.forwardRef(({ className, ...props }, ref) => (jsxRuntime.jsx(DropdownMenuPrimitive__namespace.SubContent, { ref: ref, className: cn('z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg 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-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2', className), ...props })));
|
|
628
|
+
DropdownMenuSubContent.displayName = DropdownMenuPrimitive__namespace.SubContent.displayName;
|
|
629
|
+
const DropdownMenuContent = React__namespace.forwardRef(({ className, sideOffset = 4, ...props }, ref) => (jsxRuntime.jsx(DropdownMenuPrimitive__namespace.Portal, { children: jsxRuntime.jsx(DropdownMenuPrimitive__namespace.Content, { ref: ref, sideOffset: sideOffset, className: cn('z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md 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-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2', className), ...props }) })));
|
|
630
|
+
DropdownMenuContent.displayName = DropdownMenuPrimitive__namespace.Content.displayName;
|
|
631
|
+
const DropdownMenuItem = React__namespace.forwardRef(({ className, inset, ...props }, ref) => (jsxRuntime.jsx(DropdownMenuPrimitive__namespace.Item, { ref: ref, className: cn('relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50', inset && 'pl-8', className), ...props })));
|
|
632
|
+
DropdownMenuItem.displayName = DropdownMenuPrimitive__namespace.Item.displayName;
|
|
633
|
+
const DropdownMenuCheckboxItem = React__namespace.forwardRef(({ className, children, checked, ...props }, ref) => (jsxRuntime.jsxs(DropdownMenuPrimitive__namespace.CheckboxItem, { ref: ref, className: cn('relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50', className), checked: checked, ...props, children: [jsxRuntime.jsx("span", { className: 'absolute left-2 flex h-3.5 w-3.5 items-center justify-center', children: jsxRuntime.jsx(DropdownMenuPrimitive__namespace.ItemIndicator, { children: jsxRuntime.jsx(lucideReact.Check, { className: 'h-4 w-4' }) }) }), children] })));
|
|
634
|
+
DropdownMenuCheckboxItem.displayName = DropdownMenuPrimitive__namespace.CheckboxItem.displayName;
|
|
635
|
+
const DropdownMenuRadioItem = React__namespace.forwardRef(({ className, children, ...props }, ref) => (jsxRuntime.jsxs(DropdownMenuPrimitive__namespace.RadioItem, { ref: ref, className: cn('relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50', className), ...props, children: [jsxRuntime.jsx("span", { className: 'absolute left-2 flex h-3.5 w-3.5 items-center justify-center', children: jsxRuntime.jsx(DropdownMenuPrimitive__namespace.ItemIndicator, { children: jsxRuntime.jsx(lucideReact.Circle, { className: 'h-2 w-2 fill-current' }) }) }), children] })));
|
|
636
|
+
DropdownMenuRadioItem.displayName = DropdownMenuPrimitive__namespace.RadioItem.displayName;
|
|
637
|
+
const DropdownMenuLabel = React__namespace.forwardRef(({ className, inset, ...props }, ref) => (jsxRuntime.jsx(DropdownMenuPrimitive__namespace.Label, { ref: ref, className: cn('px-2 py-1.5 text-sm font-semibold', inset && 'pl-8', className), ...props })));
|
|
638
|
+
DropdownMenuLabel.displayName = DropdownMenuPrimitive__namespace.Label.displayName;
|
|
639
|
+
const DropdownMenuSeparator = React__namespace.forwardRef(({ className, ...props }, ref) => jsxRuntime.jsx(DropdownMenuPrimitive__namespace.Separator, { ref: ref, className: cn('-mx-1 my-1 h-px bg-muted', className), ...props }));
|
|
640
|
+
DropdownMenuSeparator.displayName = DropdownMenuPrimitive__namespace.Separator.displayName;
|
|
641
|
+
const DropdownMenuShortcut = ({ className, ...props }) => {
|
|
642
|
+
return jsxRuntime.jsx("span", { className: cn('ml-auto text-xs tracking-widest opacity-60', className), ...props });
|
|
643
|
+
};
|
|
644
|
+
DropdownMenuShortcut.displayName = 'DropdownMenuShortcut';
|
|
645
|
+
|
|
646
|
+
const labelVariants = classVarianceAuthority.cva('text-sm font-medium peer-disabled:cursor-not-allowed peer-disabled:opacity-70');
|
|
647
|
+
const Label = React__namespace.forwardRef(({ className, ...props }, ref) => jsxRuntime.jsx(LabelPrimitive__namespace.Root, { ref: ref, className: cn(labelVariants(), className), ...props }));
|
|
648
|
+
Label.displayName = LabelPrimitive__namespace.Root.displayName;
|
|
649
|
+
|
|
650
|
+
const Form = reactHookForm.FormProvider;
|
|
651
|
+
const FormFieldContext = React__namespace.createContext({});
|
|
652
|
+
const FormField = ({ ...props }) => {
|
|
653
|
+
return (jsxRuntime.jsx(FormFieldContext.Provider, { value: { name: props.name }, children: jsxRuntime.jsx(reactHookForm.Controller, { ...props }) }));
|
|
654
|
+
};
|
|
655
|
+
const useFormField = () => {
|
|
656
|
+
const fieldContext = React__namespace.useContext(FormFieldContext);
|
|
657
|
+
const itemContext = React__namespace.useContext(FormItemContext);
|
|
658
|
+
const { getFieldState, formState } = reactHookForm.useFormContext();
|
|
659
|
+
const fieldState = getFieldState(fieldContext.name, formState);
|
|
660
|
+
if (!fieldContext) {
|
|
661
|
+
throw new Error('useFormField should be used within <FormField>');
|
|
662
|
+
}
|
|
663
|
+
const { id } = itemContext;
|
|
664
|
+
return {
|
|
665
|
+
id,
|
|
666
|
+
name: fieldContext.name,
|
|
667
|
+
formItemId: `${id}-form-item`,
|
|
668
|
+
formDescriptionId: `${id}-form-item-description`,
|
|
669
|
+
formMessageId: `${id}-form-item-message`,
|
|
670
|
+
...fieldState,
|
|
671
|
+
};
|
|
672
|
+
};
|
|
673
|
+
const FormItemContext = React__namespace.createContext({});
|
|
674
|
+
const FormItem = React__namespace.forwardRef(({ className, ...props }, ref) => {
|
|
675
|
+
const id = React__namespace.useId();
|
|
676
|
+
return (jsxRuntime.jsx(FormItemContext.Provider, { value: { id }, children: jsxRuntime.jsx("div", { ref: ref, className: cn('', className), ...props }) }));
|
|
677
|
+
});
|
|
678
|
+
FormItem.displayName = 'FormItem';
|
|
679
|
+
const FormLabel = React__namespace.forwardRef(({ className, ...props }, ref) => {
|
|
680
|
+
const { error, formItemId } = useFormField();
|
|
681
|
+
return jsxRuntime.jsx(Label, { ref: ref, className: cn(error && 'text-destructive', className), htmlFor: formItemId, ...props });
|
|
682
|
+
});
|
|
683
|
+
FormLabel.displayName = 'FormLabel';
|
|
684
|
+
const FormControl = React__namespace.forwardRef(({ ...props }, ref) => {
|
|
685
|
+
const { error, formItemId, formDescriptionId, formMessageId } = useFormField();
|
|
686
|
+
return (jsxRuntime.jsx(reactSlot.Slot, { ref: ref, id: formItemId, "aria-describedby": !error ? `${formDescriptionId}` : `${formDescriptionId} ${formMessageId}`, "aria-invalid": !!error, ...props }));
|
|
687
|
+
});
|
|
688
|
+
FormControl.displayName = 'FormControl';
|
|
689
|
+
const FormDescription = React__namespace.forwardRef(({ className, ...props }, ref) => {
|
|
690
|
+
const { formDescriptionId } = useFormField();
|
|
691
|
+
return jsxRuntime.jsx("p", { ref: ref, id: formDescriptionId, className: cn('text-sm text-muted-foreground', className), ...props });
|
|
692
|
+
});
|
|
693
|
+
FormDescription.displayName = 'FormDescription';
|
|
694
|
+
const FormMessage = React__namespace.forwardRef(({ className, children, ...props }, ref) => {
|
|
695
|
+
const { error, formMessageId } = useFormField();
|
|
696
|
+
const body = error ? String(error?.message) : children;
|
|
697
|
+
if (!body) {
|
|
698
|
+
return null;
|
|
699
|
+
}
|
|
700
|
+
return (jsxRuntime.jsx("p", { ref: ref, id: formMessageId, className: cn('text-sm font-medium text-destructive', className), ...props, children: body }));
|
|
701
|
+
});
|
|
702
|
+
FormMessage.displayName = 'FormMessage';
|
|
703
|
+
|
|
704
|
+
var FormComponents = /*#__PURE__*/Object.freeze({
|
|
705
|
+
__proto__: null,
|
|
706
|
+
Form: Form,
|
|
707
|
+
FormControl: FormControl,
|
|
708
|
+
FormDescription: FormDescription,
|
|
709
|
+
FormField: FormField,
|
|
710
|
+
FormItem: FormItem,
|
|
711
|
+
FormLabel: FormLabel,
|
|
712
|
+
FormMessage: FormMessage,
|
|
713
|
+
useFormField: useFormField
|
|
714
|
+
});
|
|
715
|
+
|
|
716
|
+
const HoverCard = HoverCardPrimitive__namespace.Root;
|
|
717
|
+
const HoverCardTrigger = HoverCardPrimitive__namespace.Trigger;
|
|
718
|
+
const HoverCardContent = React__namespace.forwardRef(({ className, align = 'center', sideOffset = 4, ...props }, ref) => (jsxRuntime.jsx(HoverCardPrimitive__namespace.Content, { ref: ref, align: align, sideOffset: sideOffset, className: cn('z-50 w-auto mr-20 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none 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-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-1 data-[side=top]:slide-in-from-bottom-2', className), ...props })));
|
|
719
|
+
HoverCardContent.displayName = HoverCardPrimitive__namespace.Content.displayName;
|
|
720
|
+
|
|
721
|
+
const modifyPhone = ({ value, data, selectionStart, selectionEnd }) => {
|
|
722
|
+
const _value = value.slice(0, selectionStart) + (data ?? '') + value.slice(selectionEnd);
|
|
723
|
+
_value ? _value.replace(/[\D]+/g, '').length : 0;
|
|
724
|
+
return maskPhone(_value);
|
|
725
|
+
};
|
|
726
|
+
function maskPhone(value) {
|
|
727
|
+
const len = value ? value.replace(/[\D]+/g, '').length : 0;
|
|
728
|
+
if (len > 10)
|
|
729
|
+
return { mask: '(__) _ ____-____', replacement: { _: /\d/ } };
|
|
730
|
+
return { mask: '(__) ____-_____', replacement: { _: /\d/ } };
|
|
731
|
+
}
|
|
732
|
+
const modifyCpfCnpj = ({ value, data, selectionStart, selectionEnd }) => {
|
|
733
|
+
const _value = value.slice(0, selectionStart) + (data ?? '') + value.slice(selectionEnd);
|
|
734
|
+
_value ? _value.replace(/[\D]+/g, '').length : 0;
|
|
735
|
+
return maskCpfCnpj(_value);
|
|
736
|
+
};
|
|
737
|
+
function maskCpfCnpj(value) {
|
|
738
|
+
const len = value ? value.replace(/[\D]+/g, '').length : 0;
|
|
739
|
+
if (len > 11)
|
|
740
|
+
return { mask: '__.___.___/____-__', replacement: { _: /\d/ } };
|
|
741
|
+
return { mask: '___.___.___-___', replacement: { _: /\d/ } };
|
|
742
|
+
}
|
|
743
|
+
|
|
744
|
+
// PHONE
|
|
745
|
+
function formatPhone(telefone, removerCountryCode = true) {
|
|
746
|
+
if (!telefone)
|
|
747
|
+
return '';
|
|
748
|
+
let numberPhone = telefone.replace(/\D/g, '');
|
|
749
|
+
// Remover código do país apenas se ele começar com '55'
|
|
750
|
+
if (removerCountryCode && numberPhone.startsWith('55')) {
|
|
751
|
+
numberPhone = numberPhone.substring(2);
|
|
752
|
+
}
|
|
753
|
+
return mask.format(numberPhone, maskPhone(numberPhone));
|
|
754
|
+
}
|
|
755
|
+
// CPF/CNPJ
|
|
756
|
+
function formatCpfCnpj(cpfCnpj) {
|
|
757
|
+
if (!cpfCnpj)
|
|
758
|
+
return '';
|
|
759
|
+
const numberCpfCnpj = cpfCnpj.replace(/\D/g, '');
|
|
760
|
+
return mask.format(numberCpfCnpj, maskCpfCnpj(numberCpfCnpj));
|
|
761
|
+
}
|
|
762
|
+
// DATE
|
|
763
|
+
function getDay(date) {
|
|
764
|
+
return date.getDate().toString().padStart(2, '0');
|
|
765
|
+
}
|
|
766
|
+
function getMonth(date) {
|
|
767
|
+
return (date.getMonth() + 1).toString().padStart(2, '0');
|
|
768
|
+
}
|
|
769
|
+
function getYear(date) {
|
|
770
|
+
return date.getFullYear().toString();
|
|
771
|
+
}
|
|
772
|
+
const formatDate = (date, separator = '/') => {
|
|
773
|
+
if (!date)
|
|
774
|
+
return '';
|
|
775
|
+
const d = new Date(date);
|
|
776
|
+
return d.toLocaleDateString('pt-BR');
|
|
777
|
+
};
|
|
778
|
+
const formatDateTime = (date, returnSeconds = false) => {
|
|
779
|
+
if (!date)
|
|
780
|
+
return '';
|
|
781
|
+
const hours = date.getHours().toString().padStart(2, '0');
|
|
782
|
+
const minutes = date.getMinutes().toString().padStart(2, '0');
|
|
783
|
+
const seconds = returnSeconds ? `:${date.getSeconds().toString().padStart(2, '0')}` : '';
|
|
784
|
+
return `${formatDate(date)} ${hours}:${minutes}${seconds}`;
|
|
785
|
+
};
|
|
786
|
+
function formatDateCalendar(date) {
|
|
787
|
+
if (!date)
|
|
788
|
+
return '';
|
|
789
|
+
const day = getDay(date);
|
|
790
|
+
const month = getMonth(date);
|
|
791
|
+
const year = getYear(date);
|
|
792
|
+
return `${year}-${month}-${day}`;
|
|
793
|
+
}
|
|
794
|
+
function stringDateToDate(date, separator = '/') {
|
|
795
|
+
if (!date)
|
|
796
|
+
return undefined;
|
|
797
|
+
const [day, month, year] = date.split(separator).map(Number);
|
|
798
|
+
// new Date(ano, mês-1, dia) interpreta a data no fuso horário local
|
|
799
|
+
return new Date(year, month - 1, day);
|
|
800
|
+
}
|
|
801
|
+
// NUMBER
|
|
802
|
+
const roundNumber = (value, fractionDigits = 2) => {
|
|
803
|
+
return Number(value.toFixed(fractionDigits));
|
|
804
|
+
};
|
|
805
|
+
const stringToNumber = (value) => {
|
|
806
|
+
if (!value)
|
|
807
|
+
return 0;
|
|
808
|
+
const numericValue = value
|
|
809
|
+
.replace(/[^\d,-]/g, '')
|
|
810
|
+
.replace(/\./g, '')
|
|
811
|
+
.replace(',', '.');
|
|
812
|
+
return Number.parseFloat(numericValue);
|
|
813
|
+
};
|
|
814
|
+
const convertMbToGb = (value) => {
|
|
815
|
+
return value > 0 ? roundNumber(value / 1024) : 0;
|
|
816
|
+
};
|
|
817
|
+
const convertGbToMb = (value) => {
|
|
818
|
+
return value > 0 ? roundNumber(value * 1024) : 0;
|
|
819
|
+
};
|
|
820
|
+
const convertSecondsToMinutes = (value) => {
|
|
821
|
+
return value > 0 ? roundNumber(value / 60) : 0;
|
|
822
|
+
};
|
|
823
|
+
const convertBytesToMB = (bytes) => {
|
|
824
|
+
if (!bytes || Number.isNaN(bytes))
|
|
825
|
+
return 0;
|
|
826
|
+
return roundNumber(bytes / (1024 * 1024));
|
|
827
|
+
};
|
|
828
|
+
const convertMonthToDays = (months) => {
|
|
829
|
+
return months > 0 ? months * 30 : 0;
|
|
830
|
+
};
|
|
831
|
+
const convertDaysToMonth = (days) => {
|
|
832
|
+
return days > 0 ? roundNumber(days / 30) : 0;
|
|
833
|
+
};
|
|
834
|
+
// NUMBER
|
|
835
|
+
const formatNumber = (value) => {
|
|
836
|
+
return value.toLocaleString('pt-BR', {
|
|
837
|
+
style: 'decimal',
|
|
838
|
+
minimumFractionDigits: 0,
|
|
839
|
+
maximumFractionDigits: 0,
|
|
840
|
+
});
|
|
841
|
+
};
|
|
842
|
+
// DECIMAL
|
|
843
|
+
const formatDecimal = (value, decimalPlaces = 2) => {
|
|
844
|
+
return value.toLocaleString('pt-BR', {
|
|
845
|
+
style: 'decimal',
|
|
846
|
+
minimumFractionDigits: decimalPlaces,
|
|
847
|
+
maximumFractionDigits: decimalPlaces,
|
|
848
|
+
});
|
|
849
|
+
};
|
|
850
|
+
|
|
851
|
+
function buildFormatLongFn(args) {
|
|
852
|
+
return (options = {}) => {
|
|
853
|
+
// TODO: Remove String()
|
|
854
|
+
const width = options.width ? String(options.width) : args.defaultWidth;
|
|
855
|
+
const format = args.formats[width] || args.formats[args.defaultWidth];
|
|
856
|
+
return format;
|
|
857
|
+
};
|
|
858
|
+
}
|
|
859
|
+
|
|
860
|
+
/**
|
|
861
|
+
* The localize function argument callback which allows to convert raw value to
|
|
862
|
+
* the actual type.
|
|
863
|
+
*
|
|
864
|
+
* @param value - The value to convert
|
|
865
|
+
*
|
|
866
|
+
* @returns The converted value
|
|
867
|
+
*/
|
|
868
|
+
|
|
869
|
+
/**
|
|
870
|
+
* The map of localized values for each width.
|
|
871
|
+
*/
|
|
872
|
+
|
|
873
|
+
/**
|
|
874
|
+
* The index type of the locale unit value. It types conversion of units of
|
|
875
|
+
* values that don't start at 0 (i.e. quarters).
|
|
876
|
+
*/
|
|
877
|
+
|
|
878
|
+
/**
|
|
879
|
+
* Converts the unit value to the tuple of values.
|
|
880
|
+
*/
|
|
881
|
+
|
|
882
|
+
/**
|
|
883
|
+
* The tuple of localized era values. The first element represents BC,
|
|
884
|
+
* the second element represents AD.
|
|
885
|
+
*/
|
|
886
|
+
|
|
887
|
+
/**
|
|
888
|
+
* The tuple of localized quarter values. The first element represents Q1.
|
|
889
|
+
*/
|
|
890
|
+
|
|
891
|
+
/**
|
|
892
|
+
* The tuple of localized day values. The first element represents Sunday.
|
|
893
|
+
*/
|
|
894
|
+
|
|
895
|
+
/**
|
|
896
|
+
* The tuple of localized month values. The first element represents January.
|
|
897
|
+
*/
|
|
898
|
+
|
|
899
|
+
function buildLocalizeFn(args) {
|
|
900
|
+
return (value, options) => {
|
|
901
|
+
const context = options?.context ? String(options.context) : "standalone";
|
|
902
|
+
|
|
903
|
+
let valuesArray;
|
|
904
|
+
if (context === "formatting" && args.formattingValues) {
|
|
905
|
+
const defaultWidth = args.defaultFormattingWidth || args.defaultWidth;
|
|
906
|
+
const width = options?.width ? String(options.width) : defaultWidth;
|
|
907
|
+
|
|
908
|
+
valuesArray =
|
|
909
|
+
args.formattingValues[width] || args.formattingValues[defaultWidth];
|
|
910
|
+
} else {
|
|
911
|
+
const defaultWidth = args.defaultWidth;
|
|
912
|
+
const width = options?.width ? String(options.width) : args.defaultWidth;
|
|
913
|
+
|
|
914
|
+
valuesArray = args.values[width] || args.values[defaultWidth];
|
|
915
|
+
}
|
|
916
|
+
const index = args.argumentCallback ? args.argumentCallback(value) : value;
|
|
917
|
+
|
|
918
|
+
// @ts-expect-error - For some reason TypeScript just don't want to match it, no matter how hard we try. I challenge you to try to remove it!
|
|
919
|
+
return valuesArray[index];
|
|
920
|
+
};
|
|
921
|
+
}
|
|
922
|
+
|
|
923
|
+
function buildMatchFn(args) {
|
|
924
|
+
return (string, options = {}) => {
|
|
925
|
+
const width = options.width;
|
|
926
|
+
|
|
927
|
+
const matchPattern =
|
|
928
|
+
(width && args.matchPatterns[width]) ||
|
|
929
|
+
args.matchPatterns[args.defaultMatchWidth];
|
|
930
|
+
const matchResult = string.match(matchPattern);
|
|
931
|
+
|
|
932
|
+
if (!matchResult) {
|
|
933
|
+
return null;
|
|
934
|
+
}
|
|
935
|
+
const matchedString = matchResult[0];
|
|
936
|
+
|
|
937
|
+
const parsePatterns =
|
|
938
|
+
(width && args.parsePatterns[width]) ||
|
|
939
|
+
args.parsePatterns[args.defaultParseWidth];
|
|
940
|
+
|
|
941
|
+
const key = Array.isArray(parsePatterns)
|
|
942
|
+
? findIndex(parsePatterns, (pattern) => pattern.test(matchedString))
|
|
943
|
+
: // [TODO] -- I challenge you to fix the type
|
|
944
|
+
findKey(parsePatterns, (pattern) => pattern.test(matchedString));
|
|
945
|
+
|
|
946
|
+
let value;
|
|
947
|
+
|
|
948
|
+
value = args.valueCallback ? args.valueCallback(key) : key;
|
|
949
|
+
value = options.valueCallback
|
|
950
|
+
? // [TODO] -- I challenge you to fix the type
|
|
951
|
+
options.valueCallback(value)
|
|
952
|
+
: value;
|
|
953
|
+
|
|
954
|
+
const rest = string.slice(matchedString.length);
|
|
955
|
+
|
|
956
|
+
return { value, rest };
|
|
957
|
+
};
|
|
958
|
+
}
|
|
959
|
+
|
|
960
|
+
function findKey(object, predicate) {
|
|
961
|
+
for (const key in object) {
|
|
962
|
+
if (
|
|
963
|
+
Object.prototype.hasOwnProperty.call(object, key) &&
|
|
964
|
+
predicate(object[key])
|
|
965
|
+
) {
|
|
966
|
+
return key;
|
|
967
|
+
}
|
|
968
|
+
}
|
|
969
|
+
return undefined;
|
|
970
|
+
}
|
|
971
|
+
|
|
972
|
+
function findIndex(array, predicate) {
|
|
973
|
+
for (let key = 0; key < array.length; key++) {
|
|
974
|
+
if (predicate(array[key])) {
|
|
975
|
+
return key;
|
|
976
|
+
}
|
|
977
|
+
}
|
|
978
|
+
return undefined;
|
|
979
|
+
}
|
|
980
|
+
|
|
981
|
+
function buildMatchPatternFn(args) {
|
|
982
|
+
return (string, options = {}) => {
|
|
983
|
+
const matchResult = string.match(args.matchPattern);
|
|
984
|
+
if (!matchResult) return null;
|
|
985
|
+
const matchedString = matchResult[0];
|
|
986
|
+
|
|
987
|
+
const parseResult = string.match(args.parsePattern);
|
|
988
|
+
if (!parseResult) return null;
|
|
989
|
+
let value = args.valueCallback
|
|
990
|
+
? args.valueCallback(parseResult[0])
|
|
991
|
+
: parseResult[0];
|
|
992
|
+
|
|
993
|
+
// [TODO] I challenge you to fix the type
|
|
994
|
+
value = options.valueCallback ? options.valueCallback(value) : value;
|
|
995
|
+
|
|
996
|
+
const rest = string.slice(matchedString.length);
|
|
997
|
+
|
|
998
|
+
return { value, rest };
|
|
999
|
+
};
|
|
1000
|
+
}
|
|
1001
|
+
|
|
1002
|
+
const formatDistanceLocale = {
|
|
1003
|
+
lessThanXSeconds: {
|
|
1004
|
+
one: "menos de um segundo",
|
|
1005
|
+
other: "menos de {{count}} segundos",
|
|
1006
|
+
},
|
|
1007
|
+
|
|
1008
|
+
xSeconds: {
|
|
1009
|
+
one: "1 segundo",
|
|
1010
|
+
other: "{{count}} segundos",
|
|
1011
|
+
},
|
|
1012
|
+
|
|
1013
|
+
halfAMinute: "meio minuto",
|
|
1014
|
+
|
|
1015
|
+
lessThanXMinutes: {
|
|
1016
|
+
one: "menos de um minuto",
|
|
1017
|
+
other: "menos de {{count}} minutos",
|
|
1018
|
+
},
|
|
1019
|
+
|
|
1020
|
+
xMinutes: {
|
|
1021
|
+
one: "1 minuto",
|
|
1022
|
+
other: "{{count}} minutos",
|
|
1023
|
+
},
|
|
1024
|
+
|
|
1025
|
+
aboutXHours: {
|
|
1026
|
+
one: "cerca de 1 hora",
|
|
1027
|
+
other: "cerca de {{count}} horas",
|
|
1028
|
+
},
|
|
1029
|
+
|
|
1030
|
+
xHours: {
|
|
1031
|
+
one: "1 hora",
|
|
1032
|
+
other: "{{count}} horas",
|
|
1033
|
+
},
|
|
1034
|
+
|
|
1035
|
+
xDays: {
|
|
1036
|
+
one: "1 dia",
|
|
1037
|
+
other: "{{count}} dias",
|
|
1038
|
+
},
|
|
1039
|
+
|
|
1040
|
+
aboutXWeeks: {
|
|
1041
|
+
one: "cerca de 1 semana",
|
|
1042
|
+
other: "cerca de {{count}} semanas",
|
|
1043
|
+
},
|
|
1044
|
+
|
|
1045
|
+
xWeeks: {
|
|
1046
|
+
one: "1 semana",
|
|
1047
|
+
other: "{{count}} semanas",
|
|
1048
|
+
},
|
|
1049
|
+
|
|
1050
|
+
aboutXMonths: {
|
|
1051
|
+
one: "cerca de 1 mês",
|
|
1052
|
+
other: "cerca de {{count}} meses",
|
|
1053
|
+
},
|
|
1054
|
+
|
|
1055
|
+
xMonths: {
|
|
1056
|
+
one: "1 mês",
|
|
1057
|
+
other: "{{count}} meses",
|
|
1058
|
+
},
|
|
1059
|
+
|
|
1060
|
+
aboutXYears: {
|
|
1061
|
+
one: "cerca de 1 ano",
|
|
1062
|
+
other: "cerca de {{count}} anos",
|
|
1063
|
+
},
|
|
1064
|
+
|
|
1065
|
+
xYears: {
|
|
1066
|
+
one: "1 ano",
|
|
1067
|
+
other: "{{count}} anos",
|
|
1068
|
+
},
|
|
1069
|
+
|
|
1070
|
+
overXYears: {
|
|
1071
|
+
one: "mais de 1 ano",
|
|
1072
|
+
other: "mais de {{count}} anos",
|
|
1073
|
+
},
|
|
1074
|
+
|
|
1075
|
+
almostXYears: {
|
|
1076
|
+
one: "quase 1 ano",
|
|
1077
|
+
other: "quase {{count}} anos",
|
|
1078
|
+
},
|
|
1079
|
+
};
|
|
1080
|
+
|
|
1081
|
+
const formatDistance = (token, count, options) => {
|
|
1082
|
+
let result;
|
|
1083
|
+
|
|
1084
|
+
const tokenValue = formatDistanceLocale[token];
|
|
1085
|
+
if (typeof tokenValue === "string") {
|
|
1086
|
+
result = tokenValue;
|
|
1087
|
+
} else if (count === 1) {
|
|
1088
|
+
result = tokenValue.one;
|
|
1089
|
+
} else {
|
|
1090
|
+
result = tokenValue.other.replace("{{count}}", String(count));
|
|
1091
|
+
}
|
|
1092
|
+
|
|
1093
|
+
if (options?.addSuffix) {
|
|
1094
|
+
if (options.comparison && options.comparison > 0) {
|
|
1095
|
+
return "em " + result;
|
|
1096
|
+
} else {
|
|
1097
|
+
return "há " + result;
|
|
1098
|
+
}
|
|
1099
|
+
}
|
|
1100
|
+
|
|
1101
|
+
return result;
|
|
1102
|
+
};
|
|
1103
|
+
|
|
1104
|
+
const dateFormats = {
|
|
1105
|
+
full: "EEEE, d 'de' MMMM 'de' y",
|
|
1106
|
+
long: "d 'de' MMMM 'de' y",
|
|
1107
|
+
medium: "d MMM y",
|
|
1108
|
+
short: "dd/MM/yyyy",
|
|
1109
|
+
};
|
|
1110
|
+
|
|
1111
|
+
const timeFormats = {
|
|
1112
|
+
full: "HH:mm:ss zzzz",
|
|
1113
|
+
long: "HH:mm:ss z",
|
|
1114
|
+
medium: "HH:mm:ss",
|
|
1115
|
+
short: "HH:mm",
|
|
1116
|
+
};
|
|
1117
|
+
|
|
1118
|
+
const dateTimeFormats = {
|
|
1119
|
+
full: "{{date}} 'às' {{time}}",
|
|
1120
|
+
long: "{{date}} 'às' {{time}}",
|
|
1121
|
+
medium: "{{date}}, {{time}}",
|
|
1122
|
+
short: "{{date}}, {{time}}",
|
|
1123
|
+
};
|
|
1124
|
+
|
|
1125
|
+
const formatLong = {
|
|
1126
|
+
date: buildFormatLongFn({
|
|
1127
|
+
formats: dateFormats,
|
|
1128
|
+
defaultWidth: "full",
|
|
1129
|
+
}),
|
|
1130
|
+
|
|
1131
|
+
time: buildFormatLongFn({
|
|
1132
|
+
formats: timeFormats,
|
|
1133
|
+
defaultWidth: "full",
|
|
1134
|
+
}),
|
|
1135
|
+
|
|
1136
|
+
dateTime: buildFormatLongFn({
|
|
1137
|
+
formats: dateTimeFormats,
|
|
1138
|
+
defaultWidth: "full",
|
|
1139
|
+
}),
|
|
1140
|
+
};
|
|
1141
|
+
|
|
1142
|
+
const formatRelativeLocale = {
|
|
1143
|
+
lastWeek: (date) => {
|
|
1144
|
+
const weekday = date.getDay();
|
|
1145
|
+
const last = weekday === 0 || weekday === 6 ? "último" : "última";
|
|
1146
|
+
return "'" + last + "' eeee 'às' p";
|
|
1147
|
+
},
|
|
1148
|
+
yesterday: "'ontem às' p",
|
|
1149
|
+
today: "'hoje às' p",
|
|
1150
|
+
tomorrow: "'amanhã às' p",
|
|
1151
|
+
nextWeek: "eeee 'às' p",
|
|
1152
|
+
other: "P",
|
|
1153
|
+
};
|
|
1154
|
+
|
|
1155
|
+
const formatRelative = (token, date, _baseDate, _options) => {
|
|
1156
|
+
const format = formatRelativeLocale[token];
|
|
1157
|
+
|
|
1158
|
+
if (typeof format === "function") {
|
|
1159
|
+
return format(date);
|
|
1160
|
+
}
|
|
1161
|
+
|
|
1162
|
+
return format;
|
|
1163
|
+
};
|
|
1164
|
+
|
|
1165
|
+
const eraValues = {
|
|
1166
|
+
narrow: ["AC", "DC"],
|
|
1167
|
+
abbreviated: ["AC", "DC"],
|
|
1168
|
+
wide: ["antes de cristo", "depois de cristo"],
|
|
1169
|
+
};
|
|
1170
|
+
|
|
1171
|
+
const quarterValues = {
|
|
1172
|
+
narrow: ["1", "2", "3", "4"],
|
|
1173
|
+
abbreviated: ["T1", "T2", "T3", "T4"],
|
|
1174
|
+
wide: ["1º trimestre", "2º trimestre", "3º trimestre", "4º trimestre"],
|
|
1175
|
+
};
|
|
1176
|
+
|
|
1177
|
+
const monthValues = {
|
|
1178
|
+
narrow: ["j", "f", "m", "a", "m", "j", "j", "a", "s", "o", "n", "d"],
|
|
1179
|
+
abbreviated: [
|
|
1180
|
+
"jan",
|
|
1181
|
+
"fev",
|
|
1182
|
+
"mar",
|
|
1183
|
+
"abr",
|
|
1184
|
+
"mai",
|
|
1185
|
+
"jun",
|
|
1186
|
+
"jul",
|
|
1187
|
+
"ago",
|
|
1188
|
+
"set",
|
|
1189
|
+
"out",
|
|
1190
|
+
"nov",
|
|
1191
|
+
"dez",
|
|
1192
|
+
],
|
|
1193
|
+
|
|
1194
|
+
wide: [
|
|
1195
|
+
"janeiro",
|
|
1196
|
+
"fevereiro",
|
|
1197
|
+
"março",
|
|
1198
|
+
"abril",
|
|
1199
|
+
"maio",
|
|
1200
|
+
"junho",
|
|
1201
|
+
"julho",
|
|
1202
|
+
"agosto",
|
|
1203
|
+
"setembro",
|
|
1204
|
+
"outubro",
|
|
1205
|
+
"novembro",
|
|
1206
|
+
"dezembro",
|
|
1207
|
+
],
|
|
1208
|
+
};
|
|
1209
|
+
|
|
1210
|
+
const dayValues = {
|
|
1211
|
+
narrow: ["D", "S", "T", "Q", "Q", "S", "S"],
|
|
1212
|
+
short: ["dom", "seg", "ter", "qua", "qui", "sex", "sab"],
|
|
1213
|
+
abbreviated: [
|
|
1214
|
+
"domingo",
|
|
1215
|
+
"segunda",
|
|
1216
|
+
"terça",
|
|
1217
|
+
"quarta",
|
|
1218
|
+
"quinta",
|
|
1219
|
+
"sexta",
|
|
1220
|
+
"sábado",
|
|
1221
|
+
],
|
|
1222
|
+
|
|
1223
|
+
wide: [
|
|
1224
|
+
"domingo",
|
|
1225
|
+
"segunda-feira",
|
|
1226
|
+
"terça-feira",
|
|
1227
|
+
"quarta-feira",
|
|
1228
|
+
"quinta-feira",
|
|
1229
|
+
"sexta-feira",
|
|
1230
|
+
"sábado",
|
|
1231
|
+
],
|
|
1232
|
+
};
|
|
1233
|
+
|
|
1234
|
+
const dayPeriodValues = {
|
|
1235
|
+
narrow: {
|
|
1236
|
+
am: "a",
|
|
1237
|
+
pm: "p",
|
|
1238
|
+
midnight: "mn",
|
|
1239
|
+
noon: "md",
|
|
1240
|
+
morning: "manhã",
|
|
1241
|
+
afternoon: "tarde",
|
|
1242
|
+
evening: "tarde",
|
|
1243
|
+
night: "noite",
|
|
1244
|
+
},
|
|
1245
|
+
abbreviated: {
|
|
1246
|
+
am: "AM",
|
|
1247
|
+
pm: "PM",
|
|
1248
|
+
midnight: "meia-noite",
|
|
1249
|
+
noon: "meio-dia",
|
|
1250
|
+
morning: "manhã",
|
|
1251
|
+
afternoon: "tarde",
|
|
1252
|
+
evening: "tarde",
|
|
1253
|
+
night: "noite",
|
|
1254
|
+
},
|
|
1255
|
+
wide: {
|
|
1256
|
+
am: "a.m.",
|
|
1257
|
+
pm: "p.m.",
|
|
1258
|
+
midnight: "meia-noite",
|
|
1259
|
+
noon: "meio-dia",
|
|
1260
|
+
morning: "manhã",
|
|
1261
|
+
afternoon: "tarde",
|
|
1262
|
+
evening: "tarde",
|
|
1263
|
+
night: "noite",
|
|
1264
|
+
},
|
|
1265
|
+
};
|
|
1266
|
+
|
|
1267
|
+
const formattingDayPeriodValues = {
|
|
1268
|
+
narrow: {
|
|
1269
|
+
am: "a",
|
|
1270
|
+
pm: "p",
|
|
1271
|
+
midnight: "mn",
|
|
1272
|
+
noon: "md",
|
|
1273
|
+
morning: "da manhã",
|
|
1274
|
+
afternoon: "da tarde",
|
|
1275
|
+
evening: "da tarde",
|
|
1276
|
+
night: "da noite",
|
|
1277
|
+
},
|
|
1278
|
+
abbreviated: {
|
|
1279
|
+
am: "AM",
|
|
1280
|
+
pm: "PM",
|
|
1281
|
+
midnight: "meia-noite",
|
|
1282
|
+
noon: "meio-dia",
|
|
1283
|
+
morning: "da manhã",
|
|
1284
|
+
afternoon: "da tarde",
|
|
1285
|
+
evening: "da tarde",
|
|
1286
|
+
night: "da noite",
|
|
1287
|
+
},
|
|
1288
|
+
wide: {
|
|
1289
|
+
am: "a.m.",
|
|
1290
|
+
pm: "p.m.",
|
|
1291
|
+
midnight: "meia-noite",
|
|
1292
|
+
noon: "meio-dia",
|
|
1293
|
+
morning: "da manhã",
|
|
1294
|
+
afternoon: "da tarde",
|
|
1295
|
+
evening: "da tarde",
|
|
1296
|
+
night: "da noite",
|
|
1297
|
+
},
|
|
1298
|
+
};
|
|
1299
|
+
|
|
1300
|
+
const ordinalNumber = (dirtyNumber, options) => {
|
|
1301
|
+
const number = Number(dirtyNumber);
|
|
1302
|
+
|
|
1303
|
+
if (options?.unit === "week") {
|
|
1304
|
+
return number + "ª";
|
|
1305
|
+
}
|
|
1306
|
+
return number + "º";
|
|
1307
|
+
};
|
|
1308
|
+
|
|
1309
|
+
const localize = {
|
|
1310
|
+
ordinalNumber,
|
|
1311
|
+
|
|
1312
|
+
era: buildLocalizeFn({
|
|
1313
|
+
values: eraValues,
|
|
1314
|
+
defaultWidth: "wide",
|
|
1315
|
+
}),
|
|
1316
|
+
|
|
1317
|
+
quarter: buildLocalizeFn({
|
|
1318
|
+
values: quarterValues,
|
|
1319
|
+
defaultWidth: "wide",
|
|
1320
|
+
argumentCallback: (quarter) => quarter - 1,
|
|
1321
|
+
}),
|
|
1322
|
+
|
|
1323
|
+
month: buildLocalizeFn({
|
|
1324
|
+
values: monthValues,
|
|
1325
|
+
defaultWidth: "wide",
|
|
1326
|
+
}),
|
|
1327
|
+
|
|
1328
|
+
day: buildLocalizeFn({
|
|
1329
|
+
values: dayValues,
|
|
1330
|
+
defaultWidth: "wide",
|
|
1331
|
+
}),
|
|
1332
|
+
|
|
1333
|
+
dayPeriod: buildLocalizeFn({
|
|
1334
|
+
values: dayPeriodValues,
|
|
1335
|
+
defaultWidth: "wide",
|
|
1336
|
+
formattingValues: formattingDayPeriodValues,
|
|
1337
|
+
defaultFormattingWidth: "wide",
|
|
1338
|
+
}),
|
|
1339
|
+
};
|
|
1340
|
+
|
|
1341
|
+
const matchOrdinalNumberPattern = /^(\d+)[ºªo]?/i;
|
|
1342
|
+
const parseOrdinalNumberPattern = /\d+/i;
|
|
1343
|
+
|
|
1344
|
+
const matchEraPatterns = {
|
|
1345
|
+
narrow: /^(ac|dc|a|d)/i,
|
|
1346
|
+
abbreviated: /^(a\.?\s?c\.?|d\.?\s?c\.?)/i,
|
|
1347
|
+
wide: /^(antes de cristo|depois de cristo)/i,
|
|
1348
|
+
};
|
|
1349
|
+
const parseEraPatterns = {
|
|
1350
|
+
any: [/^ac/i, /^dc/i],
|
|
1351
|
+
wide: [/^antes de cristo/i, /^depois de cristo/i],
|
|
1352
|
+
};
|
|
1353
|
+
|
|
1354
|
+
const matchQuarterPatterns = {
|
|
1355
|
+
narrow: /^[1234]/i,
|
|
1356
|
+
abbreviated: /^T[1234]/i,
|
|
1357
|
+
wide: /^[1234](º)? trimestre/i,
|
|
1358
|
+
};
|
|
1359
|
+
const parseQuarterPatterns = {
|
|
1360
|
+
any: [/1/i, /2/i, /3/i, /4/i],
|
|
1361
|
+
};
|
|
1362
|
+
|
|
1363
|
+
const matchMonthPatterns = {
|
|
1364
|
+
narrow: /^[jfmajsond]/i,
|
|
1365
|
+
abbreviated: /^(jan|fev|mar|abr|mai|jun|jul|ago|set|out|nov|dez)/i,
|
|
1366
|
+
wide: /^(janeiro|fevereiro|março|abril|maio|junho|julho|agosto|setembro|outubro|novembro|dezembro)/i,
|
|
1367
|
+
};
|
|
1368
|
+
const parseMonthPatterns = {
|
|
1369
|
+
narrow: [
|
|
1370
|
+
/^j/i,
|
|
1371
|
+
/^f/i,
|
|
1372
|
+
/^m/i,
|
|
1373
|
+
/^a/i,
|
|
1374
|
+
/^m/i,
|
|
1375
|
+
/^j/i,
|
|
1376
|
+
/^j/i,
|
|
1377
|
+
/^a/i,
|
|
1378
|
+
/^s/i,
|
|
1379
|
+
/^o/i,
|
|
1380
|
+
/^n/i,
|
|
1381
|
+
/^d/i,
|
|
1382
|
+
],
|
|
1383
|
+
|
|
1384
|
+
any: [
|
|
1385
|
+
/^ja/i,
|
|
1386
|
+
/^fev/i,
|
|
1387
|
+
/^mar/i,
|
|
1388
|
+
/^abr/i,
|
|
1389
|
+
/^mai/i,
|
|
1390
|
+
/^jun/i,
|
|
1391
|
+
/^jul/i,
|
|
1392
|
+
/^ago/i,
|
|
1393
|
+
/^set/i,
|
|
1394
|
+
/^out/i,
|
|
1395
|
+
/^nov/i,
|
|
1396
|
+
/^dez/i,
|
|
1397
|
+
],
|
|
1398
|
+
};
|
|
1399
|
+
|
|
1400
|
+
const matchDayPatterns = {
|
|
1401
|
+
narrow: /^(dom|[23456]ª?|s[aá]b)/i,
|
|
1402
|
+
short: /^(dom|[23456]ª?|s[aá]b)/i,
|
|
1403
|
+
abbreviated: /^(dom|seg|ter|qua|qui|sex|s[aá]b)/i,
|
|
1404
|
+
wide: /^(domingo|(segunda|ter[cç]a|quarta|quinta|sexta)([- ]feira)?|s[aá]bado)/i,
|
|
1405
|
+
};
|
|
1406
|
+
const parseDayPatterns = {
|
|
1407
|
+
short: [/^d/i, /^2/i, /^3/i, /^4/i, /^5/i, /^6/i, /^s[aá]/i],
|
|
1408
|
+
narrow: [/^d/i, /^2/i, /^3/i, /^4/i, /^5/i, /^6/i, /^s[aá]/i],
|
|
1409
|
+
any: [/^d/i, /^seg/i, /^t/i, /^qua/i, /^qui/i, /^sex/i, /^s[aá]b/i],
|
|
1410
|
+
};
|
|
1411
|
+
|
|
1412
|
+
const matchDayPeriodPatterns = {
|
|
1413
|
+
narrow: /^(a|p|mn|md|(da) (manhã|tarde|noite))/i,
|
|
1414
|
+
any: /^([ap]\.?\s?m\.?|meia[-\s]noite|meio[-\s]dia|(da) (manhã|tarde|noite))/i,
|
|
1415
|
+
};
|
|
1416
|
+
const parseDayPeriodPatterns = {
|
|
1417
|
+
any: {
|
|
1418
|
+
am: /^a/i,
|
|
1419
|
+
pm: /^p/i,
|
|
1420
|
+
midnight: /^mn|^meia[-\s]noite/i,
|
|
1421
|
+
noon: /^md|^meio[-\s]dia/i,
|
|
1422
|
+
morning: /manhã/i,
|
|
1423
|
+
afternoon: /tarde/i,
|
|
1424
|
+
evening: /tarde/i,
|
|
1425
|
+
night: /noite/i,
|
|
1426
|
+
},
|
|
1427
|
+
};
|
|
1428
|
+
|
|
1429
|
+
const match = {
|
|
1430
|
+
ordinalNumber: buildMatchPatternFn({
|
|
1431
|
+
matchPattern: matchOrdinalNumberPattern,
|
|
1432
|
+
parsePattern: parseOrdinalNumberPattern,
|
|
1433
|
+
valueCallback: (value) => parseInt(value, 10),
|
|
1434
|
+
}),
|
|
1435
|
+
|
|
1436
|
+
era: buildMatchFn({
|
|
1437
|
+
matchPatterns: matchEraPatterns,
|
|
1438
|
+
defaultMatchWidth: "wide",
|
|
1439
|
+
parsePatterns: parseEraPatterns,
|
|
1440
|
+
defaultParseWidth: "any",
|
|
1441
|
+
}),
|
|
1442
|
+
|
|
1443
|
+
quarter: buildMatchFn({
|
|
1444
|
+
matchPatterns: matchQuarterPatterns,
|
|
1445
|
+
defaultMatchWidth: "wide",
|
|
1446
|
+
parsePatterns: parseQuarterPatterns,
|
|
1447
|
+
defaultParseWidth: "any",
|
|
1448
|
+
valueCallback: (index) => index + 1,
|
|
1449
|
+
}),
|
|
1450
|
+
|
|
1451
|
+
month: buildMatchFn({
|
|
1452
|
+
matchPatterns: matchMonthPatterns,
|
|
1453
|
+
defaultMatchWidth: "wide",
|
|
1454
|
+
parsePatterns: parseMonthPatterns,
|
|
1455
|
+
defaultParseWidth: "any",
|
|
1456
|
+
}),
|
|
1457
|
+
|
|
1458
|
+
day: buildMatchFn({
|
|
1459
|
+
matchPatterns: matchDayPatterns,
|
|
1460
|
+
defaultMatchWidth: "wide",
|
|
1461
|
+
parsePatterns: parseDayPatterns,
|
|
1462
|
+
defaultParseWidth: "any",
|
|
1463
|
+
}),
|
|
1464
|
+
|
|
1465
|
+
dayPeriod: buildMatchFn({
|
|
1466
|
+
matchPatterns: matchDayPeriodPatterns,
|
|
1467
|
+
defaultMatchWidth: "any",
|
|
1468
|
+
parsePatterns: parseDayPeriodPatterns,
|
|
1469
|
+
defaultParseWidth: "any",
|
|
1470
|
+
}),
|
|
1471
|
+
};
|
|
1472
|
+
|
|
1473
|
+
/**
|
|
1474
|
+
* @category Locales
|
|
1475
|
+
* @summary Portuguese locale (Brazil).
|
|
1476
|
+
* @language Portuguese
|
|
1477
|
+
* @iso-639-2 por
|
|
1478
|
+
* @author Lucas Duailibe [@duailibe](https://github.com/duailibe)
|
|
1479
|
+
* @author Yago Carballo [@yagocarballo](https://github.com/YagoCarballo)
|
|
1480
|
+
*/
|
|
1481
|
+
const ptBR = {
|
|
1482
|
+
code: "pt-BR",
|
|
1483
|
+
formatDistance: formatDistance,
|
|
1484
|
+
formatLong: formatLong,
|
|
1485
|
+
formatRelative: formatRelative,
|
|
1486
|
+
localize: localize,
|
|
1487
|
+
match: match,
|
|
1488
|
+
options: {
|
|
1489
|
+
weekStartsOn: 0 /* Sunday */,
|
|
1490
|
+
firstWeekContainsDate: 1,
|
|
1491
|
+
},
|
|
1492
|
+
};
|
|
1493
|
+
|
|
1494
|
+
const Select = SelectPrimitive__namespace.Root;
|
|
1495
|
+
const SelectGroup = SelectPrimitive__namespace.Group;
|
|
1496
|
+
const SelectValue = SelectPrimitive__namespace.Value;
|
|
1497
|
+
const SelectTrigger = React__namespace.forwardRef(({ className, children, ...props }, ref) => (jsxRuntime.jsxs(SelectPrimitive__namespace.Trigger, { ref: ref, className: cn('flex h-10 w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background data-[placeholder]:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1', className), ...props, children: [children, jsxRuntime.jsx(SelectPrimitive__namespace.Icon, { asChild: true, children: jsxRuntime.jsx(lucideReact.ChevronDown, { className: 'h-4 w-4 opacity-50' }) })] })));
|
|
1498
|
+
SelectTrigger.displayName = SelectPrimitive__namespace.Trigger.displayName;
|
|
1499
|
+
const SelectScrollUpButton = React__namespace.forwardRef(({ className, ...props }, ref) => (jsxRuntime.jsx(SelectPrimitive__namespace.ScrollUpButton, { ref: ref, className: cn('flex cursor-default items-center justify-center py-1', className), ...props, children: jsxRuntime.jsx(lucideReact.ChevronUp, { className: 'h-4 w-4' }) })));
|
|
1500
|
+
SelectScrollUpButton.displayName = SelectPrimitive__namespace.ScrollUpButton.displayName;
|
|
1501
|
+
const SelectScrollDownButton = React__namespace.forwardRef(({ className, ...props }, ref) => (jsxRuntime.jsx(SelectPrimitive__namespace.ScrollDownButton, { ref: ref, className: cn('flex cursor-default items-center justify-center py-1', className), ...props, children: jsxRuntime.jsx(lucideReact.ChevronDown, { className: 'h-4 w-4' }) })));
|
|
1502
|
+
SelectScrollDownButton.displayName = SelectPrimitive__namespace.ScrollDownButton.displayName;
|
|
1503
|
+
const SelectContent = React__namespace.forwardRef(({ className, children, position = 'popper', ...props }, ref) => (jsxRuntime.jsx(SelectPrimitive__namespace.Portal, { children: jsxRuntime.jsxs(SelectPrimitive__namespace.Content, { ref: ref, className: cn('relative z-50 max-h-[--radix-select-content-available-height] min-w-[8rem] overflow-y-auto overflow-x-hidden rounded-md border bg-popover text-popover-foreground shadow-md 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-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-select-content-transform-origin]', position === 'popper' &&
|
|
1504
|
+
'data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1', className), position: position, ...props, children: [jsxRuntime.jsx(SelectScrollUpButton, {}), jsxRuntime.jsx(SelectPrimitive__namespace.Viewport, { className: cn('p-1', position === 'popper' && 'h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]'), children: children }), jsxRuntime.jsx(SelectScrollDownButton, {})] }) })));
|
|
1505
|
+
SelectContent.displayName = SelectPrimitive__namespace.Content.displayName;
|
|
1506
|
+
const SelectLabel = React__namespace.forwardRef(({ className, ...props }, ref) => (jsxRuntime.jsx(SelectPrimitive__namespace.Label, { ref: ref, className: cn('py-1.5 pl-8 pr-2 text-sm font-semibold', className), ...props })));
|
|
1507
|
+
SelectLabel.displayName = SelectPrimitive__namespace.Label.displayName;
|
|
1508
|
+
const SelectItem = React__namespace.forwardRef(({ className, children, ...props }, ref) => (jsxRuntime.jsxs(SelectPrimitive__namespace.Item, { ref: ref, className: cn('relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-3 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50', className), ...props, children: [jsxRuntime.jsx(SelectPrimitive__namespace.ItemText, { children: children }), jsxRuntime.jsx("span", { className: 'absolute right-2 flex h-3.5 w-3.5 items-center justify-center', children: jsxRuntime.jsx(SelectPrimitive__namespace.ItemIndicator, { children: jsxRuntime.jsx(lucideReact.Check, { className: 'h-4 w-4' }) }) })] })));
|
|
1509
|
+
SelectItem.displayName = SelectPrimitive__namespace.Item.displayName;
|
|
1510
|
+
const SelectSeparator = React__namespace.forwardRef(({ className, ...props }, ref) => jsxRuntime.jsx(SelectPrimitive__namespace.Separator, { ref: ref, className: cn('-mx-1 my-1 h-px bg-muted', className), ...props }));
|
|
1511
|
+
SelectSeparator.displayName = SelectPrimitive__namespace.Separator.displayName;
|
|
1512
|
+
|
|
1513
|
+
const DatePicker = React.forwardRef(({ className, onDateSelected, selectedDateProps, startYear = dateFns.getYear(new Date()) - 100, endYear = dateFns.getYear(new Date()) + 100, ...props }, ref) => {
|
|
1514
|
+
const [selectedDate, setSelectedDate] = React.useState(null);
|
|
1515
|
+
const [isPopoverOpen, setIsPopoverOpen] = React.useState(false);
|
|
1516
|
+
const months = ['Janeiro', 'Fevereiro', 'Março', 'Abril', 'Maio', 'Junho', 'Julho', 'Agosto', 'Setembro', 'Outubro', 'Novembro', 'Dezembro'];
|
|
1517
|
+
const years = Array.from({ length: endYear - startYear + 1 }, (_, i) => startYear + i);
|
|
1518
|
+
const handleMonthChange = (month) => {
|
|
1519
|
+
if (selectedDate) {
|
|
1520
|
+
const newDate = dateFns.setMonth(selectedDate, months.indexOf(month));
|
|
1521
|
+
setSelectedDate(newDate);
|
|
1522
|
+
}
|
|
1523
|
+
};
|
|
1524
|
+
const handleYearChange = (year) => {
|
|
1525
|
+
if (selectedDate) {
|
|
1526
|
+
const newDate = dateFns.setYear(selectedDate, parseInt(year, 10));
|
|
1527
|
+
setSelectedDate(newDate);
|
|
1528
|
+
}
|
|
1529
|
+
};
|
|
1530
|
+
const handleDateChange = (selectedDate) => {
|
|
1531
|
+
const newDate = selectedDate || null;
|
|
1532
|
+
setSelectedDate(newDate);
|
|
1533
|
+
setIsPopoverOpen(false);
|
|
1534
|
+
onDateSelected(newDate);
|
|
1535
|
+
};
|
|
1536
|
+
return (jsxRuntime.jsx("div", { className: cn('gap-2', className), ref: ref, ...props, children: jsxRuntime.jsxs(Popover, { open: isPopoverOpen, onOpenChange: setIsPopoverOpen, children: [jsxRuntime.jsx(PopoverTrigger, { asChild: true, children: jsxRuntime.jsx(lucideReact.Calendar, { size: 16, className: 'cursor-pointer text-gray-500', onClick: () => setIsPopoverOpen(true) }) }), jsxRuntime.jsxs(PopoverContent, { className: 'w-auto p-0 flex flex-col justify-center', align: 'start', children: [jsxRuntime.jsxs("div", { className: 'flex justify-between pt-5 px-5', children: [jsxRuntime.jsxs(Select, { onValueChange: handleMonthChange, value: months[dateFns.getMonth(selectedDate || new Date())], children: [jsxRuntime.jsx(SelectTrigger, { className: 'w-[100px]', children: jsxRuntime.jsx(SelectValue, { placeholder: 'Month' }) }), jsxRuntime.jsx(SelectContent, { children: months.map((month) => (jsxRuntime.jsx(SelectItem, { value: month, children: month }, month))) })] }), jsxRuntime.jsxs(Select, { onValueChange: handleYearChange, value: dateFns.getYear(selectedDate || new Date()).toString(), children: [jsxRuntime.jsx(SelectTrigger, { className: 'w-[100px]', children: jsxRuntime.jsx(SelectValue, { placeholder: 'Year' }) }), jsxRuntime.jsx(SelectContent, { children: years.map((year) => (jsxRuntime.jsx(SelectItem, { value: year.toString(), children: year }, year))) })] })] }), jsxRuntime.jsx(Calendar, { mode: 'single', locale: ptBR, onSelect: handleDateChange, className: 'bg-white text-black', month: selectedDate || undefined })] })] }) }));
|
|
1537
|
+
});
|
|
1538
|
+
|
|
1539
|
+
function classBorderColor$1(className, ariaInvalid) {
|
|
1540
|
+
if (className?.includes('border-none')) {
|
|
1541
|
+
return '';
|
|
1542
|
+
}
|
|
1543
|
+
return ariaInvalid ? 'border-red-600' : 'border-input';
|
|
1544
|
+
}
|
|
1545
|
+
const InputFile = React__namespace.forwardRef(({ className, placeholder, disabled, ...props }, ref) => {
|
|
1546
|
+
return (jsxRuntime.jsx("input", { type: 'file', placeholder: placeholder, disabled: disabled, className: cn('flex h-10 w-full rounded-md border bg-background px-3 py-2 text-base ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:border-disabled disabled:cursor-not-allowed disabled:opacity-50 md:text-sm', classBorderColor$1(className, props['aria-invalid'] === true), className), ref: ref, ...props }));
|
|
1547
|
+
});
|
|
1548
|
+
const Input = React__namespace.forwardRef(({ className, placeholder, type, maxLength, disabled, ...props }, ref) => {
|
|
1549
|
+
return (jsxRuntime.jsx("input", { type: type, placeholder: placeholder, maxLength: maxLength, disabled: disabled, className: cn('flex h-10 w-full rounded-md border bg-background px-3 py-2 text-base ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:border-disabled disabled:cursor-not-allowed disabled:opacity-50 md:text-sm', classBorderColor$1(className, props['aria-invalid'] === true), className), ref: ref, ...props }));
|
|
1550
|
+
});
|
|
1551
|
+
React__namespace.forwardRef(({ className, placeholder, type, maxLength, disabled, ...props }, ref) => {
|
|
1552
|
+
return (jsxRuntime.jsx("input", { type: type, placeholder: placeholder, maxLength: maxLength, disabled: disabled, className: cn('flex h-10 w-full rounded-md border px-3 py-2 text-base ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:border-disabled disabled:cursor-not-allowed disabled:opacity-50 md:text-sm', classBorderColor$1(className, props['aria-invalid'] === true), className), ref: ref, ...props, onChange: (e) => {
|
|
1553
|
+
alert(e.target.value);
|
|
1554
|
+
} }));
|
|
1555
|
+
});
|
|
1556
|
+
const InputText = React__namespace.forwardRef(({ className, placeholder, type, maxLength, value, disabled, ...props }, ref) => {
|
|
1557
|
+
return (jsxRuntime.jsx("input", { type: type, placeholder: placeholder, maxLength: maxLength, value: value || '', className: cn('flex h-10 w-full rounded-md border bg-background px-3 py-2 text-base ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:border-disabled disabled:cursor-not-allowed disabled:opacity-50 md:text-sm', classBorderColor$1(className, props['aria-invalid'] === true), className), disabled: disabled, ref: ref, ...props }));
|
|
1558
|
+
});
|
|
1559
|
+
const MaskInput = React__namespace.forwardRef(({ className, type, mask, maskPlaceholder, value, maxLength, disabled, placeholder, ...props }, ref) => {
|
|
1560
|
+
return (jsxRuntime.jsx(InputMask, { ref: ref, mask: mask || '', maskPlaceholder: maskPlaceholder, type: type, value: value || '', disabled: disabled, maxLength: maxLength, placeholder: placeholder, className: cn('flex h-10 w-full rounded-md border bg-background px-3 py-2 text-base ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:border-disabled disabled:cursor-not-allowed disabled:opacity-50 md:text-sm', classBorderColor$1(className, props['aria-invalid'] === true), className), ...props }));
|
|
1561
|
+
});
|
|
1562
|
+
React__namespace.forwardRef(({ className, type, mask, maxLength, disabled, placeholder, onChange, value, ...props }, ref) => {
|
|
1563
|
+
const [selectedDate, setSelectedDate] = React.useState(null);
|
|
1564
|
+
const handleDayPickerSelect = (selectedDate) => {
|
|
1565
|
+
setSelectedDate(selectedDate);
|
|
1566
|
+
if (selectedDate) {
|
|
1567
|
+
const formattedDate = selectedDate.toLocaleDateString('pt-BR');
|
|
1568
|
+
if (onChange) {
|
|
1569
|
+
onChange({ target: { value: formattedDate } });
|
|
1570
|
+
}
|
|
1571
|
+
}
|
|
1572
|
+
};
|
|
1573
|
+
React.useEffect(() => {
|
|
1574
|
+
if (value) {
|
|
1575
|
+
const parsedDate = new Date(Array.isArray(value) ? value[0] : value);
|
|
1576
|
+
if (!Number.isNaN(parsedDate.getTime())) {
|
|
1577
|
+
setSelectedDate(parsedDate);
|
|
1578
|
+
}
|
|
1579
|
+
}
|
|
1580
|
+
}, [value]);
|
|
1581
|
+
return (jsxRuntime.jsxs("div", { className: 'relative w-full', children: [jsxRuntime.jsx(InputMask, { ref: ref, mask: '99/99/9999', value: value || '', onChange: onChange, type: type, disabled: disabled, maxLength: maxLength, placeholder: placeholder ?? 'DD/MM/AAAA', className: cn('flex h-10 w-full rounded-md border bg-background pl-9 py-2 text-base ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:border-disabled disabled:cursor-not-allowed disabled:opacity-50 md:text-sm', classBorderColor$1(className, props['aria-invalid'] === true), className), ...props }), jsxRuntime.jsx("div", { className: 'absolute left-3 top-1/2 -translate-y-1/2 cursor-pointer', children: jsxRuntime.jsx(DatePicker, { onDateSelected: handleDayPickerSelect, selectedDateProps: selectedDate }) })] }));
|
|
1582
|
+
});
|
|
1583
|
+
const MaskInputCpfCnpj = React__namespace.forwardRef(({ className, type, mask, value, disabled, ...props }, ref) => {
|
|
1584
|
+
return (jsxRuntime.jsx("div", { children: jsxRuntime.jsx(InputMask, { ref: ref, type: type, mask: mask || '', maskPlaceholder: null, value: value || '', disabled: disabled, placeholder: '000.000.000-00', className: cn('flex h-10 w-full rounded-md border bg-background px-3 py-2 text-base ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:border-disabled disabled:cursor-not-allowed disabled:opacity-50 md:text-sm', classBorderColor$1(className, props['aria-invalid'] === true), className), ...props }) }));
|
|
1585
|
+
});
|
|
1586
|
+
const MaskInputFone = React__namespace.forwardRef(({ className, type, mask, value, disabled, ...props }, ref) => {
|
|
1587
|
+
return (jsxRuntime.jsx("div", { children: jsxRuntime.jsx(InputMask, { ref: ref, type: type, mask: mask || '', maskPlaceholder: null, value: value || '', disabled: disabled, placeholder: '(00) 0 0000-0000', className: cn('flex h-10 w-full rounded-md border bg-background px-3 py-2 text-base ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:border-disabled disabled:cursor-not-allowed disabled:opacity-50 md:text-sm', classBorderColor$1(className, props['aria-invalid'] === true), className), ...props }) }));
|
|
1588
|
+
});
|
|
1589
|
+
React__namespace.forwardRef(({ className, placeholder, type, maxLength, ...props }, ref) => {
|
|
1590
|
+
return (jsxRuntime.jsx("input", { type: type, placeholder: placeholder, maxLength: maxLength, className: cn('flex h-10 w-full rounded-md border bg-background px-3 py-2 text-base ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:border-disabled disabled:cursor-not-allowed disabled:opacity-50 md:text-sm', classBorderColor$1(className, props['aria-invalid'] === true), className), ref: ref, ...props }));
|
|
1591
|
+
});
|
|
1592
|
+
const MaskInputDecimal = React__namespace.forwardRef(({ className, value, onChange, disabled, symbol, ...props }, ref) => {
|
|
1593
|
+
const handleChange = (event) => {
|
|
1594
|
+
const numericValue = Number(event.target.value.replace(/\D/g, '')) / 100;
|
|
1595
|
+
const formattedValue = symbol ? `${symbol} ${formatDecimal(numericValue)}` : formatDecimal(numericValue);
|
|
1596
|
+
if (onChange) {
|
|
1597
|
+
onChange({ ...event, target: { ...event.target, value: formattedValue } });
|
|
1598
|
+
}
|
|
1599
|
+
};
|
|
1600
|
+
return (jsxRuntime.jsx(InputMask, { ref: ref, mask: '', value: value || '', onChange: handleChange, disabled: disabled, placeholder: symbol ? `${symbol} 0,00` : '0,00', className: cn('flex h-10 w-full rounded-md border bg-background px-3 py-2 text-base ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:border-disabled disabled:cursor-not-allowed disabled:opacity-50 md:text-sm', classBorderColor$1(className, props['aria-invalid'] === true), className), ...props }));
|
|
1601
|
+
});
|
|
1602
|
+
|
|
1603
|
+
const Pagination = ({ className, ...props }) => (jsxRuntime.jsx("nav", { role: 'navigation', "aria-label": 'pagination', className: cn('mx-auto flex w-full justify-center', className), ...props }));
|
|
1604
|
+
Pagination.displayName = 'Pagination';
|
|
1605
|
+
const PaginationContent = React__namespace.forwardRef(({ className, ...props }, ref) => (jsxRuntime.jsx("ul", { ref: ref, className: cn('flex flex-row items-center gap-1', className), ...props })));
|
|
1606
|
+
PaginationContent.displayName = 'PaginationContent';
|
|
1607
|
+
const PaginationItem = React__namespace.forwardRef(({ className, ...props }, ref) => (jsxRuntime.jsx("li", { ref: ref, className: cn('', className), ...props })));
|
|
1608
|
+
PaginationItem.displayName = 'PaginationItem';
|
|
1609
|
+
const PaginationLink = ({ className, isActive, size = 'icon', ...props }) => (jsxRuntime.jsx("a", { "aria-current": isActive ? 'page' : undefined, className: cn(buttonVariants({
|
|
1610
|
+
variant: isActive ? 'outline' : 'ghost',
|
|
1611
|
+
size,
|
|
1612
|
+
}), isActive ? '' : 'cursor-pointer', className), ...props }));
|
|
1613
|
+
PaginationLink.displayName = 'PaginationLink';
|
|
1614
|
+
const PaginationPrevious = ({ className, disabled, ...props }) => (jsxRuntime.jsxs(PaginationLink, { "aria-label": 'Go to previous page', size: 'default', className: cn('gap-1 pl-2.5', disabled ? 'cursor-default text-zinc-500' : 'cursor-pointer', className), ...props, children: [jsxRuntime.jsx(lucideReact.ChevronLeft, { className: 'h-4 w-4' }), jsxRuntime.jsx("span", { children: "Anterior" })] }));
|
|
1615
|
+
PaginationPrevious.displayName = 'PaginationPrevious';
|
|
1616
|
+
const PaginationNext = ({ className, disabled, ...props }) => (jsxRuntime.jsxs(PaginationLink, { "aria-label": 'Go to next page', size: 'default', className: cn('gap-1 pr-2.5', disabled ? 'cursor-default text-zinc-500' : 'cursor-pointer', className), ...props, children: [jsxRuntime.jsx("span", { children: "Pr\u00F3ximo" }), jsxRuntime.jsx(lucideReact.ChevronRight, { className: 'h-4 w-4' })] }));
|
|
1617
|
+
PaginationNext.displayName = 'PaginationNext';
|
|
1618
|
+
const PaginationEllipsis = ({ className, ...props }) => (jsxRuntime.jsxs("span", { "aria-hidden": true, className: cn('flex h-9 w-9 items-center justify-center', className), ...props, children: [jsxRuntime.jsx(lucideReact.MoreHorizontal, { className: 'h-4 w-4' }), jsxRuntime.jsx("span", { className: 'sr-only', children: "More pages" })] }));
|
|
1619
|
+
PaginationEllipsis.displayName = 'PaginationEllipsis';
|
|
1620
|
+
|
|
1621
|
+
const Progress = React__namespace.forwardRef(({ className, value, ...props }, ref) => (jsxRuntime.jsx(ProgressPrimitive__namespace.Root, { ref: ref, className: cn('relative h-4 w-full overflow-hidden rounded-full bg-background-secondary', className), ...props, children: jsxRuntime.jsx(ProgressPrimitive__namespace.Indicator, { className: 'h-full w-full flex-1 bg-background-primary transition-all', style: { transform: `translateX(-${100 - (value || 0)}%)` } }) })));
|
|
1622
|
+
Progress.displayName = ProgressPrimitive__namespace.Root.displayName;
|
|
1623
|
+
|
|
1624
|
+
const RadioGroup = React__namespace.forwardRef(({ className, ...props }, ref) => {
|
|
1625
|
+
return jsxRuntime.jsx(RadioGroupPrimitive__namespace.Root, { className: cn('', className), ...props, ref: ref });
|
|
1626
|
+
});
|
|
1627
|
+
RadioGroup.displayName = RadioGroupPrimitive__namespace.Root.displayName;
|
|
1628
|
+
const RadioGroupItem = React__namespace.forwardRef(({ className, ...props }, ref) => {
|
|
1629
|
+
return (jsxRuntime.jsx(RadioGroupPrimitive__namespace.Item, { ref: ref, className: cn('aspect-square h-4 w-4 rounded-full border border-primary text-primary ring-offset-background focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50', className), ...props, children: jsxRuntime.jsx(RadioGroupPrimitive__namespace.Indicator, { className: 'flex items-center justify-center', children: jsxRuntime.jsx(lucideReact.Circle, { className: 'h-2.5 w-2.5 fill-current text-current' }) }) }));
|
|
1630
|
+
});
|
|
1631
|
+
RadioGroupItem.displayName = RadioGroupPrimitive__namespace.Item.displayName;
|
|
1632
|
+
|
|
1633
|
+
const ScrollArea = React__namespace.forwardRef(({ className, children, ...props }, ref) => (jsxRuntime.jsxs(ScrollAreaPrimitive__namespace.Root, { ref: ref, className: cn("relative overflow-hidden", className), ...props, children: [jsxRuntime.jsx(ScrollAreaPrimitive__namespace.Viewport, { className: "h-full w-full rounded-[inherit]", children: children }), jsxRuntime.jsx(ScrollBar, {}), jsxRuntime.jsx(ScrollAreaPrimitive__namespace.Corner, {})] })));
|
|
1634
|
+
ScrollArea.displayName = ScrollAreaPrimitive__namespace.Root.displayName;
|
|
1635
|
+
const ScrollBar = React__namespace.forwardRef(({ className, orientation = "vertical", ...props }, ref) => (jsxRuntime.jsx(ScrollAreaPrimitive__namespace.ScrollAreaScrollbar, { ref: ref, orientation: orientation, className: cn("flex touch-none select-none transition-colors", orientation === "vertical" &&
|
|
1636
|
+
"h-full w-2.5 border-l border-l-transparent p-[1px]", orientation === "horizontal" &&
|
|
1637
|
+
"h-2.5 flex-col border-t border-t-transparent p-[1px]", className), ...props, children: jsxRuntime.jsx(ScrollAreaPrimitive__namespace.ScrollAreaThumb, { className: "relative flex-1 rounded-full bg-border" }) })));
|
|
1638
|
+
ScrollBar.displayName = ScrollAreaPrimitive__namespace.ScrollAreaScrollbar.displayName;
|
|
1639
|
+
|
|
1640
|
+
const Separator = React__namespace.forwardRef(({ className, orientation = "horizontal", decorative = true, ...props }, ref) => (jsxRuntime.jsx(SeparatorPrimitive__namespace.Root, { ref: ref, decorative: decorative, orientation: orientation, className: cn("shrink-0 bg-border", orientation === "horizontal" ? "h-[1px] w-full" : "h-full w-[1px]", className), ...props })));
|
|
1641
|
+
Separator.displayName = SeparatorPrimitive__namespace.Root.displayName;
|
|
1642
|
+
|
|
1643
|
+
const Sheet = DialogPrimitive__namespace.Root;
|
|
1644
|
+
const SheetTrigger = DialogPrimitive__namespace.Trigger;
|
|
1645
|
+
const SheetClose = DialogPrimitive__namespace.Close;
|
|
1646
|
+
const SheetPortal = DialogPrimitive__namespace.Portal;
|
|
1647
|
+
const SheetOverlay = React__namespace.forwardRef(({ className, ...props }, ref) => (jsxRuntime.jsx(DialogPrimitive__namespace.Overlay, { className: cn('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', className), ...props, ref: ref })));
|
|
1648
|
+
SheetOverlay.displayName = DialogPrimitive__namespace.Overlay.displayName;
|
|
1649
|
+
const sheetVariants = classVarianceAuthority.cva('fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:duration-300 data-[state=open]:duration-500', {
|
|
1650
|
+
variants: {
|
|
1651
|
+
side: {
|
|
1652
|
+
top: 'inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top',
|
|
1653
|
+
bottom: 'inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom',
|
|
1654
|
+
left: 'inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm',
|
|
1655
|
+
right: 'inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm',
|
|
1656
|
+
},
|
|
1657
|
+
},
|
|
1658
|
+
defaultVariants: {
|
|
1659
|
+
side: 'right',
|
|
1660
|
+
},
|
|
1661
|
+
});
|
|
1662
|
+
const SheetContent = React__namespace.forwardRef(({ side = 'right', className, children, ...props }, ref) => (jsxRuntime.jsxs(SheetPortal, { children: [jsxRuntime.jsx(SheetOverlay, {}), jsxRuntime.jsxs(DialogPrimitive__namespace.Content, { ref: ref, className: cn(sheetVariants({ side }), className), ...props, children: [children, jsxRuntime.jsxs(DialogPrimitive__namespace.Close, { className: 'absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-background-secondary', children: [jsxRuntime.jsx(lucideReact.X, { className: 'h-4 w-4' }), jsxRuntime.jsx("span", { className: 'sr-only', children: "Close" })] })] })] })));
|
|
1663
|
+
SheetContent.displayName = DialogPrimitive__namespace.Content.displayName;
|
|
1664
|
+
const SheetHeader = ({ className, ...props }) => (jsxRuntime.jsx("div", { className: cn('flex flex-col space-y-2 text-center sm:text-left', className), ...props }));
|
|
1665
|
+
SheetHeader.displayName = 'SheetHeader';
|
|
1666
|
+
const SheetFooter = ({ className, ...props }) => (jsxRuntime.jsx("div", { className: cn('flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2', className), ...props }));
|
|
1667
|
+
SheetFooter.displayName = 'SheetFooter';
|
|
1668
|
+
const SheetTitle = React__namespace.forwardRef(({ className, ...props }, ref) => (jsxRuntime.jsx(DialogPrimitive__namespace.Title, { ref: ref, className: cn('text-lg font-semibold text-foreground', className), ...props })));
|
|
1669
|
+
SheetTitle.displayName = DialogPrimitive__namespace.Title.displayName;
|
|
1670
|
+
const SheetDescription = React__namespace.forwardRef(({ className, ...props }, ref) => jsxRuntime.jsx(DialogPrimitive__namespace.Description, { ref: ref, className: cn('text-sm text-muted-foreground', className), ...props }));
|
|
1671
|
+
SheetDescription.displayName = DialogPrimitive__namespace.Description.displayName;
|
|
1672
|
+
|
|
1673
|
+
const MOBILE_BREAKPOINT = 1350;
|
|
1674
|
+
function useIsMobile() {
|
|
1675
|
+
const [isMobile, setIsMobile] = React__namespace.useState(undefined);
|
|
1676
|
+
React__namespace.useEffect(() => {
|
|
1677
|
+
const mql = window.matchMedia(`(max-width: ${MOBILE_BREAKPOINT - 1}px)`);
|
|
1678
|
+
const onChange = () => {
|
|
1679
|
+
setIsMobile(window.innerWidth < MOBILE_BREAKPOINT);
|
|
1680
|
+
};
|
|
1681
|
+
mql.addEventListener('change', onChange);
|
|
1682
|
+
setIsMobile(window.innerWidth < MOBILE_BREAKPOINT);
|
|
1683
|
+
return () => mql.removeEventListener('change', onChange);
|
|
1684
|
+
}, []);
|
|
1685
|
+
return !!isMobile;
|
|
1686
|
+
}
|
|
1687
|
+
|
|
1688
|
+
function Skeleton({ className, ...props }) {
|
|
1689
|
+
return (jsxRuntime.jsx("div", { className: cn("animate-pulse rounded-md bg-muted", className), ...props }));
|
|
1690
|
+
}
|
|
1691
|
+
|
|
1692
|
+
const TooltipProvider = TooltipPrimitive__namespace.Provider;
|
|
1693
|
+
const Tooltip = TooltipPrimitive__namespace.Root;
|
|
1694
|
+
const TooltipTrigger = TooltipPrimitive__namespace.Trigger;
|
|
1695
|
+
const TooltipContent = React__namespace.forwardRef(({ className, sideOffset = 4, ...props }, ref) => (jsxRuntime.jsxs(TooltipPrimitive__namespace.Content, { ref: ref, sideOffset: sideOffset, className: cn('z-50 overflow-hidden rounded-md bg-background-primary text-white px-3 py-1.5 text-sm shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2', className), ...props, children: [props.children, jsxRuntime.jsx(TooltipPrimitive__namespace.Arrow, { className: 'z-50 fill-primary animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2' })] })));
|
|
1696
|
+
TooltipContent.displayName = TooltipPrimitive__namespace.Content.displayName;
|
|
1697
|
+
|
|
1698
|
+
const SIDEBAR_COOKIE_NAME = 'sidebar:state';
|
|
1699
|
+
const SIDEBAR_COOKIE_MAX_AGE = 60 * 60 * 24 * 7;
|
|
1700
|
+
const SIDEBAR_WIDTH = '16rem';
|
|
1701
|
+
const SIDEBAR_WIDTH_MOBILE = '18rem';
|
|
1702
|
+
const SIDEBAR_WIDTH_ICON = '3rem';
|
|
1703
|
+
const SIDEBAR_KEYBOARD_SHORTCUT = 'b';
|
|
1704
|
+
const SidebarContext = React__namespace.createContext(null);
|
|
1705
|
+
function useSidebar() {
|
|
1706
|
+
const context = React__namespace.useContext(SidebarContext);
|
|
1707
|
+
if (!context) {
|
|
1708
|
+
throw new Error('useSidebar must be used within a SidebarProvider.');
|
|
1709
|
+
}
|
|
1710
|
+
return context;
|
|
1711
|
+
}
|
|
1712
|
+
const SidebarProvider = React__namespace.forwardRef(({ defaultOpen = true, open: openProp, onOpenChange: setOpenProp, className, style, children, ...props }, ref) => {
|
|
1713
|
+
const isMobile = useIsMobile();
|
|
1714
|
+
const [openMobile, setOpenMobile] = React__namespace.useState(false);
|
|
1715
|
+
// This is the internal state of the sidebar.
|
|
1716
|
+
// We use openProp and setOpenProp for control from outside the component.
|
|
1717
|
+
const [_open, _setOpen] = React__namespace.useState(defaultOpen);
|
|
1718
|
+
const open = openProp ?? _open;
|
|
1719
|
+
const setOpen = React__namespace.useCallback((value) => {
|
|
1720
|
+
const openState = typeof value === 'function' ? value(open) : value;
|
|
1721
|
+
if (setOpenProp) {
|
|
1722
|
+
setOpenProp(openState);
|
|
1723
|
+
}
|
|
1724
|
+
else {
|
|
1725
|
+
_setOpen(openState);
|
|
1726
|
+
}
|
|
1727
|
+
// This sets the cookie to keep the sidebar state.
|
|
1728
|
+
document.cookie = `${SIDEBAR_COOKIE_NAME}=${openState}; path=/; max-age=${SIDEBAR_COOKIE_MAX_AGE}`;
|
|
1729
|
+
}, [setOpenProp, open]);
|
|
1730
|
+
// Helper to toggle the sidebar.
|
|
1731
|
+
const toggleSidebar = React__namespace.useCallback(() => {
|
|
1732
|
+
return isMobile ? setOpenMobile((open) => !open) : setOpen((open) => !open);
|
|
1733
|
+
}, [isMobile, setOpen, setOpenMobile]);
|
|
1734
|
+
// Adds a keyboard shortcut to toggle the sidebar.
|
|
1735
|
+
React__namespace.useEffect(() => {
|
|
1736
|
+
const handleKeyDown = (event) => {
|
|
1737
|
+
if (event.key === SIDEBAR_KEYBOARD_SHORTCUT && (event.metaKey || event.ctrlKey)) {
|
|
1738
|
+
event.preventDefault();
|
|
1739
|
+
toggleSidebar();
|
|
1740
|
+
}
|
|
1741
|
+
};
|
|
1742
|
+
window.addEventListener('keydown', handleKeyDown);
|
|
1743
|
+
return () => window.removeEventListener('keydown', handleKeyDown);
|
|
1744
|
+
}, [toggleSidebar]);
|
|
1745
|
+
// We add a state so that we can do data-state="expanded" or "collapsed".
|
|
1746
|
+
// This makes it easier to style the sidebar with Tailwind classes.
|
|
1747
|
+
const state = open ? 'expanded' : 'collapsed';
|
|
1748
|
+
const contextValue = React__namespace.useMemo(() => ({
|
|
1749
|
+
state,
|
|
1750
|
+
open,
|
|
1751
|
+
setOpen,
|
|
1752
|
+
isMobile,
|
|
1753
|
+
openMobile,
|
|
1754
|
+
setOpenMobile,
|
|
1755
|
+
toggleSidebar,
|
|
1756
|
+
}), [state, open, setOpen, isMobile, openMobile, setOpenMobile, toggleSidebar]);
|
|
1757
|
+
return (jsxRuntime.jsx(SidebarContext.Provider, { value: contextValue, children: jsxRuntime.jsx(TooltipProvider, { delayDuration: 0, children: jsxRuntime.jsx("div", { style: {
|
|
1758
|
+
'--sidebar-width': SIDEBAR_WIDTH,
|
|
1759
|
+
'--sidebar-width-icon': SIDEBAR_WIDTH_ICON,
|
|
1760
|
+
...style,
|
|
1761
|
+
}, className: cn('group/sidebar-wrapper flex min-h-svh w-full has-[[data-variant=inset]]:bg-sidebar', className), ref: ref, ...props, children: children }) }) }));
|
|
1762
|
+
});
|
|
1763
|
+
SidebarProvider.displayName = 'SidebarProvider';
|
|
1764
|
+
const Sidebar = React__namespace.forwardRef(({ side = 'left', variant = 'sidebar', collapsible = 'offcanvas', className, children, ...props }, ref) => {
|
|
1765
|
+
const { isMobile, state, openMobile, setOpenMobile } = useSidebar();
|
|
1766
|
+
if (collapsible === 'none') {
|
|
1767
|
+
return (jsxRuntime.jsx("div", { className: cn('flex h-full w-[--sidebar-width] flex-col bg-sidebar text-sidebar-foreground', className), ref: ref, ...props, children: children }));
|
|
1768
|
+
}
|
|
1769
|
+
if (isMobile) {
|
|
1770
|
+
return (jsxRuntime.jsx(Sheet, { open: openMobile, onOpenChange: setOpenMobile, ...props, children: jsxRuntime.jsx(SheetContent, { "data-sidebar": 'sidebar', "data-mobile": 'true', className: 'w-[--sidebar-width] bg-sidebar p-0 text-sidebar-foreground [&>button]:hidden', style: {
|
|
1771
|
+
'--sidebar-width': SIDEBAR_WIDTH_MOBILE,
|
|
1772
|
+
}, side: side, children: jsxRuntime.jsx("div", { className: 'flex h-screen w-full flex-col', children: children }) }) }));
|
|
1773
|
+
}
|
|
1774
|
+
return (jsxRuntime.jsxs("div", { ref: ref, className: 'group peer hidden md:block text-sidebar-foreground', "data-state": state, "data-collapsible": state === 'collapsed' ? collapsible : '', "data-variant": variant, "data-side": side, children: [jsxRuntime.jsx("div", { className: cn('duration-200 relative h-svh w-[--sidebar-width] bg-transparent transition-[width] ease-linear', 'group-data-[collapsible=offcanvas]:w-0', 'group-data-[side=right]:rotate-180', variant === 'floating' || variant === 'inset'
|
|
1775
|
+
? 'group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)_+_theme(spacing.4))]'
|
|
1776
|
+
: 'group-data-[collapsible=icon]:w-[--sidebar-width-icon]') }), jsxRuntime.jsx("div", { className: cn('duration-200 fixed inset-y-0 z-10 hidden h-svh w-[--sidebar-width] transition-[left,right,width] ease-linear md:flex', side === 'left'
|
|
1777
|
+
? 'left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]'
|
|
1778
|
+
: 'right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]',
|
|
1779
|
+
// Adjust the padding for floating and inset variants.
|
|
1780
|
+
variant === 'floating' || variant === 'inset'
|
|
1781
|
+
? 'p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)_+_theme(spacing.4)_+2px)]'
|
|
1782
|
+
: 'group-data-[collapsible=icon]:w-[--sidebar-width-icon] group-data-[side=left]:border-r group-data-[side=right]:border-l', className), ...props, children: jsxRuntime.jsx("div", { "data-sidebar": 'sidebar', className: 'flex h-full w-full flex-col bg-sidebar group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:border group-data-[variant=floating]:border-sidebar-border group-data-[variant=floating]:shadow', children: children }) })] }));
|
|
1783
|
+
});
|
|
1784
|
+
Sidebar.displayName = 'Sidebar';
|
|
1785
|
+
const SidebarTrigger = React__namespace.forwardRef(({ className, onClick, ...props }, ref) => {
|
|
1786
|
+
const { toggleSidebar } = useSidebar();
|
|
1787
|
+
return (jsxRuntime.jsxs(Button, { ref: ref, "data-sidebar": 'trigger', variant: 'ghost', size: 'icon', type: 'button', className: cn('h-7 w-7', className), onClick: (event) => {
|
|
1788
|
+
onClick?.(event);
|
|
1789
|
+
toggleSidebar();
|
|
1790
|
+
}, ...props, children: [jsxRuntime.jsx(lucideReact.PanelLeft, {}), jsxRuntime.jsx("span", { className: 'sr-only', children: "Toggle Sidebar" })] }));
|
|
1791
|
+
});
|
|
1792
|
+
SidebarTrigger.displayName = 'SidebarTrigger';
|
|
1793
|
+
const SidebarRail = React__namespace.forwardRef(({ className, ...props }, ref) => {
|
|
1794
|
+
const { toggleSidebar } = useSidebar();
|
|
1795
|
+
return (jsxRuntime.jsx("button", { ref: ref, "data-sidebar": 'rail', "aria-label": 'Toggle Sidebar', tabIndex: -1, type: 'button', onClick: toggleSidebar, title: 'Toggle Sidebar', className: cn('absolute inset-y-0 z-20 hidden w-4 -translate-x-1/2 transition-all ease-linear after:absolute after:inset-y-0 after:left-1/2 after:w-[2px] hover:after:bg-sidebar-border group-data-[side=left]:-right-4 group-data-[side=right]:left-0 sm:flex', '[[data-side=left]_&]:cursor-w-resize [[data-side=right]_&]:cursor-e-resize', '[[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-state=collapsed]_&]:cursor-w-resize', 'group-data-[collapsible=offcanvas]:translate-x-0 group-data-[collapsible=offcanvas]:after:left-full group-data-[collapsible=offcanvas]:hover:bg-sidebar', '[[data-side=left][data-collapsible=offcanvas]_&]:-right-2', '[[data-side=right][data-collapsible=offcanvas]_&]:-left-2', className), ...props }));
|
|
1796
|
+
});
|
|
1797
|
+
SidebarRail.displayName = 'SidebarRail';
|
|
1798
|
+
const SidebarInset = React__namespace.forwardRef(({ className, ...props }, ref) => {
|
|
1799
|
+
return (jsxRuntime.jsx("main", { ref: ref, className: cn('relative flex min-h-svh flex-1 flex-col bg-background', 'peer-data-[variant=inset]:min-h-[calc(100svh-theme(spacing.4))] md:peer-data-[variant=inset]:m-2 md:peer-data-[state=collapsed]:peer-data-[variant=inset]:ml-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow', className), ...props }));
|
|
1800
|
+
});
|
|
1801
|
+
SidebarInset.displayName = 'SidebarInset';
|
|
1802
|
+
const SidebarInput = React__namespace.forwardRef(({ className, ...props }, ref) => {
|
|
1803
|
+
return (jsxRuntime.jsx(Input, { ref: ref, "data-sidebar": 'input', className: cn('h-8 w-full bg-background shadow-none focus-visible:ring-2 focus-visible:ring-sidebar-ring', className), ...props }));
|
|
1804
|
+
});
|
|
1805
|
+
SidebarInput.displayName = 'SidebarInput';
|
|
1806
|
+
const SidebarHeader = React__namespace.forwardRef(({ className, ...props }, ref) => {
|
|
1807
|
+
return jsxRuntime.jsx("div", { ref: ref, "data-sidebar": 'header', className: cn('flex flex-col gap-2 p-2', className), ...props });
|
|
1808
|
+
});
|
|
1809
|
+
SidebarHeader.displayName = 'SidebarHeader';
|
|
1810
|
+
const SidebarFooter = React__namespace.forwardRef(({ className, ...props }, ref) => {
|
|
1811
|
+
return jsxRuntime.jsx("div", { ref: ref, "data-sidebar": 'footer', className: cn('flex flex-col gap-2 p-2', className), ...props });
|
|
1812
|
+
});
|
|
1813
|
+
SidebarFooter.displayName = 'SidebarFooter';
|
|
1814
|
+
const SidebarSeparator = React__namespace.forwardRef(({ className, ...props }, ref) => {
|
|
1815
|
+
return jsxRuntime.jsx(Separator, { ref: ref, "data-sidebar": 'separator', className: cn('mx-2 w-auto bg-sidebar-border', className), ...props });
|
|
1816
|
+
});
|
|
1817
|
+
SidebarSeparator.displayName = 'SidebarSeparator';
|
|
1818
|
+
const SidebarContent = React__namespace.forwardRef(({ className, ...props }, ref) => {
|
|
1819
|
+
return (jsxRuntime.jsx("div", { ref: ref, "data-sidebar": 'content', className: cn('flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden', className), ...props }));
|
|
1820
|
+
});
|
|
1821
|
+
SidebarContent.displayName = 'SidebarContent';
|
|
1822
|
+
const SidebarGroup = React__namespace.forwardRef(({ className, ...props }, ref) => {
|
|
1823
|
+
return jsxRuntime.jsx("div", { ref: ref, "data-sidebar": 'group', className: cn('relative flex w-full min-w-0 flex-col p-2', className), ...props });
|
|
1824
|
+
});
|
|
1825
|
+
SidebarGroup.displayName = 'SidebarGroup';
|
|
1826
|
+
const SidebarGroupLabel = React__namespace.forwardRef(({ className, asChild = false, ...props }, ref) => {
|
|
1827
|
+
const Comp = asChild ? reactSlot.Slot : 'div';
|
|
1828
|
+
return (jsxRuntime.jsx(Comp, { ref: ref, "data-sidebar": 'group-label', className: cn('duration-200 flex h-8 shrink-0 items-center rounded-md px-2 text-xs font-medium text-sidebar-foreground/70 outline-none ring-sidebar-ring transition-[margin,opa] ease-linear focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0', 'group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0', className), ...props }));
|
|
1829
|
+
});
|
|
1830
|
+
SidebarGroupLabel.displayName = 'SidebarGroupLabel';
|
|
1831
|
+
const SidebarGroupAction = React__namespace.forwardRef(({ className, asChild = false, ...props }, ref) => {
|
|
1832
|
+
const Comp = asChild ? reactSlot.Slot : 'button';
|
|
1833
|
+
return (jsxRuntime.jsx(Comp, { ref: ref, "data-sidebar": 'group-action', className: cn('absolute right-3 top-3.5 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-none ring-sidebar-ring transition-transform hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0',
|
|
1834
|
+
// Increases the hit area of the button on mobile.
|
|
1835
|
+
'after:absolute after:-inset-2 after:md:hidden', 'group-data-[collapsible=icon]:hidden', className), ...props }));
|
|
1836
|
+
});
|
|
1837
|
+
SidebarGroupAction.displayName = 'SidebarGroupAction';
|
|
1838
|
+
const SidebarGroupContent = React__namespace.forwardRef(({ className, ...props }, ref) => (jsxRuntime.jsx("div", { ref: ref, "data-sidebar": 'group-content', className: cn('w-full text-sm', className), ...props })));
|
|
1839
|
+
SidebarGroupContent.displayName = 'SidebarGroupContent';
|
|
1840
|
+
const SidebarMenu = React__namespace.forwardRef(({ className, ...props }, ref) => (jsxRuntime.jsx("ul", { ref: ref, "data-sidebar": 'menu', className: cn('flex w-full min-w-0 flex-col gap-1', className), ...props })));
|
|
1841
|
+
SidebarMenu.displayName = 'SidebarMenu';
|
|
1842
|
+
const SidebarMenuItem = React__namespace.forwardRef(({ className, ...props }, ref) => (jsxRuntime.jsx("li", { ref: ref, "data-sidebar": 'menu-item', className: cn('group/menu-item relative', className), ...props })));
|
|
1843
|
+
SidebarMenuItem.displayName = 'SidebarMenuItem';
|
|
1844
|
+
const sidebarMenuButtonVariants = classVarianceAuthority.cva('peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm outline-none ring-sidebar-ring transition-[width,height,padding] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 group-has-[[data-sidebar=menu-action]]/menu-item:pr-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-accent data-[active=true]:font-medium data-[active=true]:text-sidebar-accent-foreground data-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-accent-foreground group-data-[collapsible=icon]:!size-8 group-data-[collapsible=icon]:!p-2 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0', {
|
|
1845
|
+
variants: {
|
|
1846
|
+
variant: {
|
|
1847
|
+
default: 'hover:bg-sidebar-accent hover:text-sidebar-accent-foreground',
|
|
1848
|
+
outline: 'bg-background shadow-[0_0_0_1px_var(--sidebar-border)] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_var(--sidebar-accent)]',
|
|
1849
|
+
},
|
|
1850
|
+
size: {
|
|
1851
|
+
default: 'h-8 text-sm',
|
|
1852
|
+
sm: 'h-7 text-xs',
|
|
1853
|
+
lg: 'h-12 text-sm group-data-[collapsible=icon]:!p-0',
|
|
1854
|
+
},
|
|
1855
|
+
},
|
|
1856
|
+
defaultVariants: {
|
|
1857
|
+
variant: 'default',
|
|
1858
|
+
size: 'default',
|
|
1859
|
+
},
|
|
1860
|
+
});
|
|
1861
|
+
const SidebarMenuButton = React__namespace.forwardRef(({ asChild = false, isActive = false, variant = 'default', size = 'default', tooltip, className, ...props }, ref) => {
|
|
1862
|
+
const Comp = asChild ? reactSlot.Slot : 'button';
|
|
1863
|
+
const { isMobile, state } = useSidebar();
|
|
1864
|
+
const button = (jsxRuntime.jsx(Comp, { ref: ref, "data-sidebar": 'menu-button', "data-size": size, "data-active": isActive, className: cn(sidebarMenuButtonVariants({ variant, size }), className), ...props }));
|
|
1865
|
+
if (!tooltip) {
|
|
1866
|
+
return button;
|
|
1867
|
+
}
|
|
1868
|
+
if (typeof tooltip === 'string') {
|
|
1869
|
+
tooltip = {
|
|
1870
|
+
children: tooltip,
|
|
1871
|
+
};
|
|
1872
|
+
}
|
|
1873
|
+
return (jsxRuntime.jsxs(Tooltip, { children: [jsxRuntime.jsx(TooltipTrigger, { asChild: true, children: button }), jsxRuntime.jsx(TooltipContent, { side: 'right', align: 'center', hidden: state !== 'collapsed' || isMobile, ...tooltip })] }));
|
|
1874
|
+
});
|
|
1875
|
+
SidebarMenuButton.displayName = 'SidebarMenuButton';
|
|
1876
|
+
const SidebarMenuAction = React__namespace.forwardRef(({ className, asChild = false, showOnHover = false, ...props }, ref) => {
|
|
1877
|
+
const Comp = asChild ? reactSlot.Slot : 'button';
|
|
1878
|
+
return (jsxRuntime.jsx(Comp, { ref: ref, "data-sidebar": 'menu-action', className: cn('absolute right-1 top-1.5 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-none ring-sidebar-ring transition-transform hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 peer-hover/menu-button:text-sidebar-accent-foreground [&>svg]:size-4 [&>svg]:shrink-0',
|
|
1879
|
+
// Increases the hit area of the button on mobile.
|
|
1880
|
+
'after:absolute after:-inset-2 after:md:hidden', 'peer-data-[size=sm]/menu-button:top-1', 'peer-data-[size=default]/menu-button:top-1.5', 'peer-data-[size=lg]/menu-button:top-2.5', 'group-data-[collapsible=icon]:hidden', showOnHover &&
|
|
1881
|
+
'group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 data-[state=open]:opacity-100 peer-data-[active=true]/menu-button:text-sidebar-accent-foreground md:opacity-0', className), ...props }));
|
|
1882
|
+
});
|
|
1883
|
+
SidebarMenuAction.displayName = 'SidebarMenuAction';
|
|
1884
|
+
const SidebarMenuBadge = React__namespace.forwardRef(({ className, ...props }, ref) => (jsxRuntime.jsx("div", { ref: ref, "data-sidebar": 'menu-badge', className: cn('absolute right-1 flex h-5 min-w-5 items-center justify-center rounded-md px-1 text-xs font-medium tabular-nums text-sidebar-foreground select-none pointer-events-none', 'peer-hover/menu-button:text-sidebar-accent-foreground peer-data-[active=true]/menu-button:text-sidebar-accent-foreground', 'peer-data-[size=sm]/menu-button:top-1', 'peer-data-[size=default]/menu-button:top-1.5', 'peer-data-[size=lg]/menu-button:top-2.5', 'group-data-[collapsible=icon]:hidden', className), ...props })));
|
|
1885
|
+
SidebarMenuBadge.displayName = 'SidebarMenuBadge';
|
|
1886
|
+
const SidebarMenuSkeleton = React__namespace.forwardRef(({ className, showIcon = false, ...props }, ref) => {
|
|
1887
|
+
// Random width between 50 to 90%.
|
|
1888
|
+
const width = React__namespace.useMemo(() => {
|
|
1889
|
+
return `${Math.floor(Math.random() * 40) + 50}%`;
|
|
1890
|
+
}, []);
|
|
1891
|
+
return (jsxRuntime.jsxs("div", { ref: ref, "data-sidebar": 'menu-skeleton', className: cn('rounded-md h-8 flex gap-2 px-2 items-center', className), ...props, children: [showIcon && jsxRuntime.jsx(Skeleton, { className: 'size-4 rounded-md', "data-sidebar": 'menu-skeleton-icon' }), jsxRuntime.jsx(Skeleton, { className: 'h-4 flex-1 max-w-[--skeleton-width]', "data-sidebar": 'menu-skeleton-text', style: {
|
|
1892
|
+
'--skeleton-width': width,
|
|
1893
|
+
} })] }));
|
|
1894
|
+
});
|
|
1895
|
+
SidebarMenuSkeleton.displayName = 'SidebarMenuSkeleton';
|
|
1896
|
+
const SidebarMenuSub = React__namespace.forwardRef(({ className, ...props }, ref) => (jsxRuntime.jsx("ul", { ref: ref, "data-sidebar": 'menu-sub', className: cn('mx-3.5 flex min-w-0 translate-x-px flex-col gap-1 border-l border-sidebar-border px-2.5 py-0.5', 'group-data-[collapsible=icon]:hidden', className), ...props })));
|
|
1897
|
+
SidebarMenuSub.displayName = 'SidebarMenuSub';
|
|
1898
|
+
const SidebarMenuSubItem = React__namespace.forwardRef(({ ...props }, ref) => jsxRuntime.jsx("li", { ref: ref, ...props }));
|
|
1899
|
+
SidebarMenuSubItem.displayName = 'SidebarMenuSubItem';
|
|
1900
|
+
const SidebarMenuSubButton = React__namespace.forwardRef(({ asChild = false, size = 'md', isActive, className, ...props }, ref) => {
|
|
1901
|
+
const Comp = asChild ? reactSlot.Slot : 'a';
|
|
1902
|
+
return (jsxRuntime.jsx(Comp, { ref: ref, "data-sidebar": 'menu-sub-button', "data-size": size, "data-active": isActive, className: cn('flex h-7 min-w-0 -translate-x-px items-center gap-2 overflow-hidden rounded-md px-2 text-sidebar-foreground outline-none ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0 [&>svg]:text-sidebar-accent-foreground', 'data-[active=true]:bg-sidebar-accent data-[active=true]:text-sidebar-accent-foreground', size === 'sm' && 'text-xs', size === 'md' && 'text-sm', 'group-data-[collapsible=icon]:hidden', className), ...props }));
|
|
1903
|
+
});
|
|
1904
|
+
SidebarMenuSubButton.displayName = 'SidebarMenuSubButton';
|
|
1905
|
+
|
|
1906
|
+
const Slider = React__namespace.forwardRef(({ className, ...props }, ref) => (jsxRuntime.jsxs(SliderPrimitive__namespace.Root, { ref: ref, className: cn('relative flex w-full touch-none select-none items-center', className), ...props, children: [jsxRuntime.jsx(SliderPrimitive__namespace.Track, { className: 'relative h-2 w-full grow overflow-hidden rounded-full bg-background-secondary', children: jsxRuntime.jsx(SliderPrimitive__namespace.Range, { className: 'absolute h-full bg-background-primary' }) }), jsxRuntime.jsx(SliderPrimitive__namespace.Thumb, { className: 'block h-5 w-5 rounded-full border-2 border-primary bg-background 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 disabled:opacity-50' })] })));
|
|
1907
|
+
Slider.displayName = SliderPrimitive__namespace.Root.displayName;
|
|
1908
|
+
|
|
1909
|
+
const Switch = React__namespace.forwardRef(({ className, ...props }, ref) => (jsxRuntime.jsx(SwitchPrimitives__namespace.Root, { className: cn('peer inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-background-primary data-[state=unchecked]:bg-accent', className), ...props, ref: ref, children: jsxRuntime.jsx(SwitchPrimitives__namespace.Thumb, { className: cn('pointer-events-none block h-5 w-5 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0') }) })));
|
|
1910
|
+
Switch.displayName = SwitchPrimitives__namespace.Root.displayName;
|
|
1911
|
+
|
|
1912
|
+
const Table = React__namespace.forwardRef(({ className, ...props }, ref) => (jsxRuntime.jsx("table", { ref: ref, className: cn('w-full caption-bottom text-sm', className), ...props })));
|
|
1913
|
+
Table.displayName = 'Table';
|
|
1914
|
+
const TableHeader = React__namespace.forwardRef(({ className, ...props }, ref) => (jsxRuntime.jsx("thead", { ref: ref, className: cn('sticky top-0 [&_tr]:border-b', className), ...props })));
|
|
1915
|
+
TableHeader.displayName = 'TableHeader';
|
|
1916
|
+
const TableBody = React__namespace.forwardRef(({ className, ...props }, ref) => (jsxRuntime.jsx("tbody", { ref: ref, className: cn('[&_tr:last-child]:border-0', className), ...props })));
|
|
1917
|
+
TableBody.displayName = 'TableBody';
|
|
1918
|
+
const TableFooter = React__namespace.forwardRef(({ className, ...props }, ref) => (jsxRuntime.jsx("tfoot", { ref: ref, className: cn('border-t bg-muted/50 font-medium [&>tr]:last:border-b-0', className), ...props })));
|
|
1919
|
+
TableFooter.displayName = 'TableFooter';
|
|
1920
|
+
const TableRow = React__namespace.forwardRef(({ className, ...props }, ref) => (jsxRuntime.jsx("tr", { ref: ref, className: cn('border-b transition-colors hover:bg-datatable-accent', 'data-[state=selected]:bg-background-secondary', className), ...props })));
|
|
1921
|
+
TableRow.displayName = 'TableRow';
|
|
1922
|
+
const TableHead = React__namespace.forwardRef(({ className, ...props }, ref) => (jsxRuntime.jsx("th", { ref: ref, className: cn('h-12 py-[12.25px] px-6 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0', className), ...props })));
|
|
1923
|
+
TableHead.displayName = 'TableHead';
|
|
1924
|
+
const TableCell = React__namespace.forwardRef(({ className, ...props }, ref) => (jsxRuntime.jsx("td", { ref: ref, className: cn('align-middle px-6 [&:has([role=checkbox])]:pr-0', className), ...props })));
|
|
1925
|
+
TableCell.displayName = 'TableCell';
|
|
1926
|
+
const TableCaption = React__namespace.forwardRef(({ className, ...props }, ref) => (jsxRuntime.jsx("caption", { ref: ref, className: cn('mt-4 text-sm text-muted-foreground', className), ...props })));
|
|
1927
|
+
TableCaption.displayName = 'TableCaption';
|
|
1928
|
+
|
|
1929
|
+
const Tabs = TabsPrimitive__namespace.Root;
|
|
1930
|
+
const TabsList = React__namespace.forwardRef(({ className, ...props }, ref) => (jsxRuntime.jsx(TabsPrimitive__namespace.List, { ref: ref, className: cn('inline-flex h-10 items-center justify-center rounded-md bg-background-elevated p-1 text-muted-foreground', className), ...props })));
|
|
1931
|
+
TabsList.displayName = TabsPrimitive__namespace.List.displayName;
|
|
1932
|
+
const TabsTrigger = React__namespace.forwardRef(({ className, ...props }, ref) => (jsxRuntime.jsx(TabsPrimitive__namespace.Trigger, { ref: ref, className: cn('inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-sm', className), ...props })));
|
|
1933
|
+
TabsTrigger.displayName = TabsPrimitive__namespace.Trigger.displayName;
|
|
1934
|
+
const TabsContent = React__namespace.forwardRef(({ className, ...props }, ref) => (jsxRuntime.jsx(TabsPrimitive__namespace.Content, { ref: ref, className: cn('mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2', className), ...props })));
|
|
1935
|
+
TabsContent.displayName = TabsPrimitive__namespace.Content.displayName;
|
|
1936
|
+
|
|
1937
|
+
function classBorderColor(className, ariaInvalid) {
|
|
1938
|
+
if (className?.includes('border-none')) {
|
|
1939
|
+
return '';
|
|
1940
|
+
}
|
|
1941
|
+
return ariaInvalid ? 'border-red-600' : 'border-input';
|
|
1942
|
+
}
|
|
1943
|
+
const Textarea = React__namespace.forwardRef(({ className, ...props }, ref) => {
|
|
1944
|
+
return (jsxRuntime.jsx("textarea", { className: cn('flex min-h-[80px] w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50', classBorderColor(className, props['aria-invalid'] === true), className), ref: ref, ...props }));
|
|
1945
|
+
});
|
|
1946
|
+
Textarea.displayName = 'Textarea';
|
|
1947
|
+
|
|
1948
|
+
const ToastProvider = ToastPrimitives__namespace.Provider;
|
|
1949
|
+
const ToastViewport = React__namespace.forwardRef(({ className, ...props }, ref) => (jsxRuntime.jsx(ToastPrimitives__namespace.Viewport, { ref: ref, className: cn('fixed top-0 right-0 p-4 space-y-2 z-[100]', className), ...props })));
|
|
1950
|
+
ToastViewport.displayName = ToastPrimitives__namespace.Viewport.displayName;
|
|
1951
|
+
const toastVariants = classVarianceAuthority.cva('group pointer-events-auto relative flex w-full items-center justify-between space-x-4 overflow-hidden rounded-md border p-6 pr-8 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-top-full', {
|
|
1952
|
+
variants: {
|
|
1953
|
+
variant: {
|
|
1954
|
+
default: 'border bg-background text-foreground',
|
|
1955
|
+
destructive: 'bg-white text-zinc-950',
|
|
1956
|
+
success: 'bg-white text-zinc-950',
|
|
1957
|
+
},
|
|
1958
|
+
},
|
|
1959
|
+
defaultVariants: {
|
|
1960
|
+
variant: 'default',
|
|
1961
|
+
},
|
|
1962
|
+
});
|
|
1963
|
+
const Toast = React__namespace.forwardRef(({ className, variant, ...props }, ref) => {
|
|
1964
|
+
return jsxRuntime.jsx(ToastPrimitives__namespace.Root, { ref: ref, className: cn(toastVariants({ variant }), className), ...props });
|
|
1965
|
+
});
|
|
1966
|
+
Toast.displayName = ToastPrimitives__namespace.Root.displayName;
|
|
1967
|
+
const ToastAction = React__namespace.forwardRef(({ className, ...props }, ref) => (jsxRuntime.jsx(ToastPrimitives__namespace.Action, { ref: ref, className: cn('inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium ring-offset-background transition-colors hover:bg-background-secondary focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 group-[.destructive]:border-muted/40 group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground group-[.destructive]:focus:ring-destructive', className), ...props })));
|
|
1968
|
+
ToastAction.displayName = ToastPrimitives__namespace.Action.displayName;
|
|
1969
|
+
const ToastClose = React__namespace.forwardRef(({ className, ...props }, ref) => (jsxRuntime.jsx(ToastPrimitives__namespace.Close, { ref: ref, className: cn('absolute right-2 top-2 rounded-md p-1 text-foreground/50 opacity-0 transition-opacity hover:text-foreground focus:opacity-100 focus:outline-none focus:ring-2 group-hover:opacity-100 group-[.destructive]:text-red-300 group-[.destructive]:hover:text-red-50 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600', className), "toast-close": '', ...props, children: jsxRuntime.jsx(lucideReact.X, { className: 'h-4 w-4' }) })));
|
|
1970
|
+
ToastClose.displayName = ToastPrimitives__namespace.Close.displayName;
|
|
1971
|
+
const ToastTitle = React__namespace.forwardRef(({ className, ...props }, ref) => jsxRuntime.jsx(ToastPrimitives__namespace.Title, { ref: ref, className: cn('text-sm font-semibold', className), ...props }));
|
|
1972
|
+
ToastTitle.displayName = ToastPrimitives__namespace.Title.displayName;
|
|
1973
|
+
const ToastDescription = React__namespace.forwardRef(({ className, ...props }, ref) => jsxRuntime.jsx(ToastPrimitives__namespace.Description, { ref: ref, className: cn('text-sm opacity-90', className), ...props }));
|
|
1974
|
+
ToastDescription.displayName = ToastPrimitives__namespace.Description.displayName;
|
|
1975
|
+
|
|
1976
|
+
// Inspired by react-hot-toast library
|
|
1977
|
+
const TOAST_LIMIT = 1;
|
|
1978
|
+
const TOAST_REMOVE_DELAY = 1000000;
|
|
1979
|
+
let count = 0;
|
|
1980
|
+
function genId() {
|
|
1981
|
+
count = (count + 1) % Number.MAX_SAFE_INTEGER;
|
|
1982
|
+
return count.toString();
|
|
1983
|
+
}
|
|
1984
|
+
const toastTimeouts = new Map();
|
|
1985
|
+
const addToRemoveQueue = (toastId) => {
|
|
1986
|
+
if (toastTimeouts.has(toastId)) {
|
|
1987
|
+
return;
|
|
1988
|
+
}
|
|
1989
|
+
const timeout = setTimeout(() => {
|
|
1990
|
+
toastTimeouts.delete(toastId);
|
|
1991
|
+
dispatch({
|
|
1992
|
+
type: 'REMOVE_TOAST',
|
|
1993
|
+
toastId: toastId,
|
|
1994
|
+
});
|
|
1995
|
+
}, TOAST_REMOVE_DELAY);
|
|
1996
|
+
toastTimeouts.set(toastId, timeout);
|
|
1997
|
+
};
|
|
1998
|
+
const reducer = (state, action) => {
|
|
1999
|
+
switch (action.type) {
|
|
2000
|
+
case 'ADD_TOAST':
|
|
2001
|
+
return {
|
|
2002
|
+
...state,
|
|
2003
|
+
toasts: [action.toast, ...state.toasts].slice(0, TOAST_LIMIT),
|
|
2004
|
+
};
|
|
2005
|
+
case 'UPDATE_TOAST':
|
|
2006
|
+
return {
|
|
2007
|
+
...state,
|
|
2008
|
+
toasts: state.toasts.map((t) => (t.id === action.toast.id ? { ...t, ...action.toast } : t)),
|
|
2009
|
+
};
|
|
2010
|
+
case 'DISMISS_TOAST': {
|
|
2011
|
+
const { toastId } = action;
|
|
2012
|
+
if (toastId) {
|
|
2013
|
+
addToRemoveQueue(toastId);
|
|
2014
|
+
}
|
|
2015
|
+
else {
|
|
2016
|
+
for (const toast of state.toasts) {
|
|
2017
|
+
addToRemoveQueue(toast.id);
|
|
2018
|
+
}
|
|
2019
|
+
}
|
|
2020
|
+
return {
|
|
2021
|
+
...state,
|
|
2022
|
+
toasts: state.toasts.map((t) => t.id === toastId || toastId === undefined
|
|
2023
|
+
? {
|
|
2024
|
+
...t,
|
|
2025
|
+
open: false,
|
|
2026
|
+
}
|
|
2027
|
+
: t),
|
|
2028
|
+
};
|
|
2029
|
+
}
|
|
2030
|
+
case 'REMOVE_TOAST':
|
|
2031
|
+
if (action.toastId === undefined) {
|
|
2032
|
+
return {
|
|
2033
|
+
...state,
|
|
2034
|
+
toasts: [],
|
|
2035
|
+
};
|
|
2036
|
+
}
|
|
2037
|
+
return {
|
|
2038
|
+
...state,
|
|
2039
|
+
toasts: state.toasts.filter((t) => t.id !== action.toastId),
|
|
2040
|
+
};
|
|
2041
|
+
}
|
|
2042
|
+
};
|
|
2043
|
+
const listeners = [];
|
|
2044
|
+
let memoryState = { toasts: [] };
|
|
2045
|
+
function dispatch(action) {
|
|
2046
|
+
memoryState = reducer(memoryState, action);
|
|
2047
|
+
for (const listener of listeners) {
|
|
2048
|
+
listener(memoryState);
|
|
2049
|
+
}
|
|
2050
|
+
}
|
|
2051
|
+
function toast({ ...props }) {
|
|
2052
|
+
const id = genId();
|
|
2053
|
+
const update = (props) => dispatch({
|
|
2054
|
+
type: 'UPDATE_TOAST',
|
|
2055
|
+
toast: { ...props, id },
|
|
2056
|
+
});
|
|
2057
|
+
const dismiss = () => dispatch({ type: 'DISMISS_TOAST', toastId: id });
|
|
2058
|
+
dispatch({
|
|
2059
|
+
type: 'ADD_TOAST',
|
|
2060
|
+
toast: {
|
|
2061
|
+
...props,
|
|
2062
|
+
id,
|
|
2063
|
+
open: true,
|
|
2064
|
+
onOpenChange: (open) => {
|
|
2065
|
+
if (!open)
|
|
2066
|
+
dismiss();
|
|
2067
|
+
},
|
|
2068
|
+
},
|
|
2069
|
+
});
|
|
2070
|
+
return {
|
|
2071
|
+
id: id,
|
|
2072
|
+
dismiss,
|
|
2073
|
+
update,
|
|
2074
|
+
};
|
|
2075
|
+
}
|
|
2076
|
+
function useToast() {
|
|
2077
|
+
const [state, setState] = React__namespace.useState(memoryState);
|
|
2078
|
+
React__namespace.useEffect(() => {
|
|
2079
|
+
listeners.push(setState);
|
|
2080
|
+
return () => {
|
|
2081
|
+
const index = listeners.indexOf(setState);
|
|
2082
|
+
if (index > -1) {
|
|
2083
|
+
listeners.splice(index, 1);
|
|
2084
|
+
}
|
|
2085
|
+
};
|
|
2086
|
+
}, [state]);
|
|
2087
|
+
return {
|
|
2088
|
+
...state,
|
|
2089
|
+
toast,
|
|
2090
|
+
dismiss: (toastId) => dispatch({ type: 'DISMISS_TOAST', toastId }),
|
|
2091
|
+
};
|
|
2092
|
+
}
|
|
2093
|
+
|
|
2094
|
+
function Toaster() {
|
|
2095
|
+
const { toasts } = useToast();
|
|
2096
|
+
const getIcon = (icon, variant) => {
|
|
2097
|
+
if (icon) {
|
|
2098
|
+
return icon;
|
|
2099
|
+
}
|
|
2100
|
+
switch (variant) {
|
|
2101
|
+
case 'success':
|
|
2102
|
+
return (jsxRuntime.jsx("div", { className: 'mr-3 p-px rounded-full bg-emerald-700', children: jsxRuntime.jsx(lucideReact.Check, { size: 16, className: 'text-white' }) }));
|
|
2103
|
+
case 'destructive':
|
|
2104
|
+
return (jsxRuntime.jsx("div", { className: 'mr-3 p-px rounded-full bg-red-700', children: jsxRuntime.jsx(lucideReact.CircleX, { size: 16, className: 'text-white' }) }));
|
|
2105
|
+
default:
|
|
2106
|
+
return null;
|
|
2107
|
+
}
|
|
2108
|
+
};
|
|
2109
|
+
return (jsxRuntime.jsxs(ToastProvider, { children: [toasts.map(({ id, title, description, action, icon, variant, ...props }) => (jsxRuntime.jsxs(Toast, { ...props, variant: variant, className: 'p-4 w-[334px] rounded-lg', children: [jsxRuntime.jsxs("div", { className: 'grid gap-1', children: [jsxRuntime.jsxs("div", { className: 'flex items-center', children: [getIcon(icon, variant ?? null), title && jsxRuntime.jsx(ToastTitle, { children: title }), " "] }), description && jsxRuntime.jsx(ToastDescription, { children: description })] }), action, jsxRuntime.jsx(ToastClose, { className: 'text-white' })] }, id))), jsxRuntime.jsx(ToastViewport, {})] }));
|
|
2110
|
+
}
|
|
2111
|
+
|
|
2112
|
+
function UseCalendar({ className, getDataFilter }) {
|
|
2113
|
+
const endDate = null;
|
|
2114
|
+
const startDate = null;
|
|
2115
|
+
const [date, setDate] = React.useState({
|
|
2116
|
+
from: startDate,
|
|
2117
|
+
to: endDate,
|
|
2118
|
+
});
|
|
2119
|
+
const submitDate = () => {
|
|
2120
|
+
if (date.from !== null && date.to !== null) {
|
|
2121
|
+
getDataFilter(date.from, date.to);
|
|
2122
|
+
}
|
|
2123
|
+
};
|
|
2124
|
+
return (jsxRuntime.jsx("div", { className: cn('grid gap-2', className), children: jsxRuntime.jsxs(PopoverPrimitive.Popover, { children: [jsxRuntime.jsx(PopoverPrimitive.PopoverTrigger, { asChild: true, children: jsxRuntime.jsxs(Button, { id: 'date', variant: 'outline', className: 'flex justify-center items-center px-4 py-2 cursor-pointer bg-primaryBack text-textFilter rounded-md', children: [jsxRuntime.jsx(lucideReact.CalendarDays, { color: '#0F172A', size: 16, className: 'mr-4' }), date?.to ? (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [dateFns.format(date.from, 'dd/MM', { locale: ptBR }), " - ", dateFns.format(date.to, 'dd/MM', { locale: ptBR })] })) : (jsxRuntime.jsx("span", { children: "Filtrar por Per\u00EDodo" }))] }) }), jsxRuntime.jsxs(PopoverPrimitive.PopoverContent, { className: 'w-auto p-0 testeCalendar flex flex-col justify-center bg-white z-10 shadow-md text-black ', align: 'start', children: [jsxRuntime.jsx(Calendar, { mode: 'range', locale: ptBR, selected: date, onSelect: setDate, className: ' ' }), jsxRuntime.jsx(PopoverPrimitive.PopoverClose, { className: 'flex justify-center items-center p-4', children: jsxRuntime.jsx(Button, { className: 'w-[150px] bg-background-primary mt-8 px-4 py-2 text-white', onClick: submitDate, children: "Aplicar Filtro" }) })] })] }) }));
|
|
2125
|
+
}
|
|
2126
|
+
|
|
2127
|
+
// Retorna todas as cores do Tailwind CSS das variações 50 a 950
|
|
2128
|
+
function getTailwindColorShades() {
|
|
2129
|
+
// Paleta padrão do Tailwind v3.3.0
|
|
2130
|
+
// Fonte: https://github.com/tailwindlabs/tailwindcss/blob/master/src/public/colors.js
|
|
2131
|
+
return {
|
|
2132
|
+
slate: {
|
|
2133
|
+
50: '#f8fafc',
|
|
2134
|
+
100: '#f1f5f9',
|
|
2135
|
+
200: '#e2e8f0',
|
|
2136
|
+
300: '#cbd5e1',
|
|
2137
|
+
400: '#94a3b8',
|
|
2138
|
+
500: '#64748b',
|
|
2139
|
+
600: '#475569',
|
|
2140
|
+
700: '#334155',
|
|
2141
|
+
800: '#1e293b',
|
|
2142
|
+
900: '#0f172a',
|
|
2143
|
+
950: '#020617',
|
|
2144
|
+
},
|
|
2145
|
+
gray: {
|
|
2146
|
+
50: '#f9fafb',
|
|
2147
|
+
100: '#f3f4f6',
|
|
2148
|
+
200: '#e5e7eb',
|
|
2149
|
+
300: '#d1d5db',
|
|
2150
|
+
400: '#9ca3af',
|
|
2151
|
+
500: '#6b7280',
|
|
2152
|
+
600: '#4b5563',
|
|
2153
|
+
700: '#374151',
|
|
2154
|
+
800: '#1f2937',
|
|
2155
|
+
900: '#111827',
|
|
2156
|
+
950: '#030712',
|
|
2157
|
+
},
|
|
2158
|
+
zinc: {
|
|
2159
|
+
50: '#fafafa',
|
|
2160
|
+
100: '#f4f4f5',
|
|
2161
|
+
200: '#e4e4e7',
|
|
2162
|
+
300: '#d4d4d8',
|
|
2163
|
+
400: '#a1a1aa',
|
|
2164
|
+
500: '#71717a',
|
|
2165
|
+
600: '#52525b',
|
|
2166
|
+
700: '#3f3f46',
|
|
2167
|
+
800: '#27272a',
|
|
2168
|
+
900: '#18181b',
|
|
2169
|
+
950: '#09090b',
|
|
2170
|
+
},
|
|
2171
|
+
neutral: {
|
|
2172
|
+
50: '#fafafa',
|
|
2173
|
+
100: '#f5f5f5',
|
|
2174
|
+
200: '#e5e5e5',
|
|
2175
|
+
300: '#d4d4d4',
|
|
2176
|
+
400: '#a3a3a3',
|
|
2177
|
+
500: '#737373',
|
|
2178
|
+
600: '#525252',
|
|
2179
|
+
700: '#404040',
|
|
2180
|
+
800: '#262626',
|
|
2181
|
+
900: '#171717',
|
|
2182
|
+
950: '#0a0a0a',
|
|
2183
|
+
},
|
|
2184
|
+
stone: {
|
|
2185
|
+
50: '#fafaf9',
|
|
2186
|
+
100: '#f5f5f4',
|
|
2187
|
+
200: '#e7e5e4',
|
|
2188
|
+
300: '#d6d3d1',
|
|
2189
|
+
400: '#a8a29e',
|
|
2190
|
+
500: '#78716c',
|
|
2191
|
+
600: '#57534e',
|
|
2192
|
+
700: '#44403c',
|
|
2193
|
+
800: '#292524',
|
|
2194
|
+
900: '#1c1917',
|
|
2195
|
+
950: '#0c0a09',
|
|
2196
|
+
},
|
|
2197
|
+
red: {
|
|
2198
|
+
50: '#fef2f2',
|
|
2199
|
+
100: '#fee2e2',
|
|
2200
|
+
200: '#fecaca',
|
|
2201
|
+
300: '#fca5a5',
|
|
2202
|
+
400: '#f87171',
|
|
2203
|
+
500: '#ef4444',
|
|
2204
|
+
600: '#dc2626',
|
|
2205
|
+
700: '#b91c1c',
|
|
2206
|
+
800: '#991b1b',
|
|
2207
|
+
900: '#7f1d1d',
|
|
2208
|
+
950: '#450a0a',
|
|
2209
|
+
},
|
|
2210
|
+
orange: {
|
|
2211
|
+
50: '#fff7ed',
|
|
2212
|
+
100: '#ffedd5',
|
|
2213
|
+
200: '#fed7aa',
|
|
2214
|
+
300: '#fdba74',
|
|
2215
|
+
400: '#fb923c',
|
|
2216
|
+
500: '#f97316',
|
|
2217
|
+
600: '#ea580c',
|
|
2218
|
+
700: '#c2410c',
|
|
2219
|
+
800: '#9a3412',
|
|
2220
|
+
900: '#7c2d12',
|
|
2221
|
+
950: '#431407',
|
|
2222
|
+
},
|
|
2223
|
+
amber: {
|
|
2224
|
+
50: '#fffbeb',
|
|
2225
|
+
100: '#fef3c7',
|
|
2226
|
+
200: '#fde68a',
|
|
2227
|
+
300: '#fcd34d',
|
|
2228
|
+
400: '#fbbf24',
|
|
2229
|
+
500: '#f59e42',
|
|
2230
|
+
600: '#d97706',
|
|
2231
|
+
700: '#b45309',
|
|
2232
|
+
800: '#92400e',
|
|
2233
|
+
900: '#78350f',
|
|
2234
|
+
950: '#451a03',
|
|
2235
|
+
},
|
|
2236
|
+
yellow: {
|
|
2237
|
+
50: '#fefce8',
|
|
2238
|
+
100: '#fef9c3',
|
|
2239
|
+
200: '#fef08a',
|
|
2240
|
+
300: '#fde047',
|
|
2241
|
+
400: '#facc15',
|
|
2242
|
+
500: '#eab308',
|
|
2243
|
+
600: '#ca8a04',
|
|
2244
|
+
700: '#a16207',
|
|
2245
|
+
800: '#854d0e',
|
|
2246
|
+
900: '#713f12',
|
|
2247
|
+
950: '#422006',
|
|
2248
|
+
},
|
|
2249
|
+
lime: {
|
|
2250
|
+
50: '#f7fee7',
|
|
2251
|
+
100: '#ecfccb',
|
|
2252
|
+
200: '#d9f99d',
|
|
2253
|
+
300: '#bef264',
|
|
2254
|
+
400: '#a3e635',
|
|
2255
|
+
500: '#84cc16',
|
|
2256
|
+
600: '#65a30d',
|
|
2257
|
+
700: '#4d7c0f',
|
|
2258
|
+
800: '#3f6212',
|
|
2259
|
+
900: '#365314',
|
|
2260
|
+
950: '#1a2e05',
|
|
2261
|
+
},
|
|
2262
|
+
green: {
|
|
2263
|
+
50: '#f0fdf4',
|
|
2264
|
+
100: '#dcfce7',
|
|
2265
|
+
200: '#bbf7d0',
|
|
2266
|
+
300: '#86efac',
|
|
2267
|
+
400: '#4ade80',
|
|
2268
|
+
500: '#22c55e',
|
|
2269
|
+
600: '#16a34a',
|
|
2270
|
+
700: '#15803d',
|
|
2271
|
+
800: '#166534',
|
|
2272
|
+
900: '#14532d',
|
|
2273
|
+
950: '#052e16',
|
|
2274
|
+
},
|
|
2275
|
+
emerald: {
|
|
2276
|
+
50: '#ecfdf5',
|
|
2277
|
+
100: '#d1fae5',
|
|
2278
|
+
200: '#a7f3d0',
|
|
2279
|
+
300: '#6ee7b7',
|
|
2280
|
+
400: '#34d399',
|
|
2281
|
+
500: '#10b981',
|
|
2282
|
+
600: '#059669',
|
|
2283
|
+
700: '#047857',
|
|
2284
|
+
800: '#065f46',
|
|
2285
|
+
900: '#064e3b',
|
|
2286
|
+
950: '#022c22',
|
|
2287
|
+
},
|
|
2288
|
+
teal: {
|
|
2289
|
+
50: '#f0fdfa',
|
|
2290
|
+
100: '#ccfbf1',
|
|
2291
|
+
200: '#99f6e4',
|
|
2292
|
+
300: '#5eead4',
|
|
2293
|
+
400: '#2dd4bf',
|
|
2294
|
+
500: '#14b8a6',
|
|
2295
|
+
600: '#0d9488',
|
|
2296
|
+
700: '#0f766e',
|
|
2297
|
+
800: '#115e59',
|
|
2298
|
+
900: '#134e4a',
|
|
2299
|
+
950: '#042f2e',
|
|
2300
|
+
},
|
|
2301
|
+
cyan: {
|
|
2302
|
+
50: '#ecfeff',
|
|
2303
|
+
100: '#cffafe',
|
|
2304
|
+
200: '#a5f3fc',
|
|
2305
|
+
300: '#67e8f9',
|
|
2306
|
+
400: '#22d3ee',
|
|
2307
|
+
500: '#06b6d4',
|
|
2308
|
+
600: '#0891b2',
|
|
2309
|
+
700: '#0e7490',
|
|
2310
|
+
800: '#155e75',
|
|
2311
|
+
900: '#164e63',
|
|
2312
|
+
950: '#083344',
|
|
2313
|
+
},
|
|
2314
|
+
sky: {
|
|
2315
|
+
50: '#f0f9ff',
|
|
2316
|
+
100: '#e0f2fe',
|
|
2317
|
+
200: '#bae6fd',
|
|
2318
|
+
300: '#7dd3fc',
|
|
2319
|
+
400: '#38bdf8',
|
|
2320
|
+
500: '#0ea5e9',
|
|
2321
|
+
600: '#0284c7',
|
|
2322
|
+
700: '#0369a1',
|
|
2323
|
+
800: '#075985',
|
|
2324
|
+
900: '#0e3a5e',
|
|
2325
|
+
950: '#082f49',
|
|
2326
|
+
},
|
|
2327
|
+
blue: {
|
|
2328
|
+
50: '#eff6ff',
|
|
2329
|
+
100: '#dbeafe',
|
|
2330
|
+
200: '#bfdbfe',
|
|
2331
|
+
300: '#93c5fd',
|
|
2332
|
+
400: '#60a5fa',
|
|
2333
|
+
500: '#3b82f6',
|
|
2334
|
+
600: '#2563eb',
|
|
2335
|
+
700: '#1d4ed8',
|
|
2336
|
+
800: '#1e40af',
|
|
2337
|
+
900: '#1e3a8a',
|
|
2338
|
+
950: '#172554',
|
|
2339
|
+
},
|
|
2340
|
+
indigo: {
|
|
2341
|
+
50: '#eef2ff',
|
|
2342
|
+
100: '#e0e7ff',
|
|
2343
|
+
200: '#c7d2fe',
|
|
2344
|
+
300: '#a5b4fc',
|
|
2345
|
+
400: '#818cf8',
|
|
2346
|
+
500: '#6366f1',
|
|
2347
|
+
600: '#4f46e5',
|
|
2348
|
+
700: '#4338ca',
|
|
2349
|
+
800: '#3730a3',
|
|
2350
|
+
900: '#312e81',
|
|
2351
|
+
950: '#1e1b4b',
|
|
2352
|
+
},
|
|
2353
|
+
violet: {
|
|
2354
|
+
50: '#f5f3ff',
|
|
2355
|
+
100: '#ede9fe',
|
|
2356
|
+
200: '#ddd6fe',
|
|
2357
|
+
300: '#c4b5fd',
|
|
2358
|
+
400: '#a78bfa',
|
|
2359
|
+
500: '#8b5cf6',
|
|
2360
|
+
600: '#7c3aed',
|
|
2361
|
+
700: '#6d28d9',
|
|
2362
|
+
800: '#5b21b6',
|
|
2363
|
+
900: '#4c1d95',
|
|
2364
|
+
950: '#2e1065',
|
|
2365
|
+
},
|
|
2366
|
+
purple: {
|
|
2367
|
+
50: '#faf5ff',
|
|
2368
|
+
100: '#f3e8ff',
|
|
2369
|
+
200: '#e9d5ff',
|
|
2370
|
+
300: '#d8b4fe',
|
|
2371
|
+
400: '#c084fc',
|
|
2372
|
+
500: '#a855f7',
|
|
2373
|
+
600: '#9333ea',
|
|
2374
|
+
700: '#7e22ce',
|
|
2375
|
+
800: '#6d19a8',
|
|
2376
|
+
900: '#581c87',
|
|
2377
|
+
950: '#3b0764',
|
|
2378
|
+
},
|
|
2379
|
+
fuchsia: {
|
|
2380
|
+
50: '#fdf4ff',
|
|
2381
|
+
100: '#fae8ff',
|
|
2382
|
+
200: '#f5d0fe',
|
|
2383
|
+
300: '#f0abfc',
|
|
2384
|
+
400: '#e879f9',
|
|
2385
|
+
500: '#d946ef',
|
|
2386
|
+
600: '#c026d3',
|
|
2387
|
+
700: '#a21caf',
|
|
2388
|
+
800: '#86198f',
|
|
2389
|
+
900: '#701a75',
|
|
2390
|
+
950: '#4a044e',
|
|
2391
|
+
},
|
|
2392
|
+
pink: {
|
|
2393
|
+
50: '#fdf2f8',
|
|
2394
|
+
100: '#fce7f3',
|
|
2395
|
+
200: '#fbcfe8',
|
|
2396
|
+
300: '#f9a8d4',
|
|
2397
|
+
400: '#f472b6',
|
|
2398
|
+
500: '#ec4899',
|
|
2399
|
+
600: '#db2777',
|
|
2400
|
+
700: '#be185d',
|
|
2401
|
+
800: '#9d174d',
|
|
2402
|
+
900: '#831843',
|
|
2403
|
+
950: '#500724',
|
|
2404
|
+
},
|
|
2405
|
+
rose: {
|
|
2406
|
+
50: '#fff1f2',
|
|
2407
|
+
100: '#ffe4e6',
|
|
2408
|
+
200: '#fecdd3',
|
|
2409
|
+
300: '#fda4af',
|
|
2410
|
+
400: '#fb7185',
|
|
2411
|
+
500: '#f43f5e',
|
|
2412
|
+
600: '#e11d48',
|
|
2413
|
+
700: '#be123c',
|
|
2414
|
+
800: '#9f1239',
|
|
2415
|
+
900: '#881337',
|
|
2416
|
+
950: '#4c0519',
|
|
2417
|
+
},
|
|
2418
|
+
};
|
|
2419
|
+
}
|
|
2420
|
+
const replaceThemeTailwindColors = (theme, tailwindColor) => {
|
|
2421
|
+
const colorShades = getTailwindColorShades();
|
|
2422
|
+
const isValidColor = (color) => color in colorShades;
|
|
2423
|
+
const colorPallete = isValidColor(tailwindColor) ? colorShades[tailwindColor] : colorShades.violet;
|
|
2424
|
+
const el = document.createElement('style');
|
|
2425
|
+
el.id = 'theme-variables';
|
|
2426
|
+
el.setAttribute('type', 'text/css');
|
|
2427
|
+
el.textContent = ':root {';
|
|
2428
|
+
if (theme === 'light') {
|
|
2429
|
+
el.textContent += `--sidebar-background: ${colorPallete[50]};\n`;
|
|
2430
|
+
el.textContent += `--sidebar-accent: ${colorPallete[200]};\n`;
|
|
2431
|
+
el.textContent += `--sidebar-ring: ${colorPallete[300]};\n`;
|
|
2432
|
+
el.textContent += `--sidebar-border: ${colorPallete[100]};\n`;
|
|
2433
|
+
el.textContent += `--sidebar-scrollbar-thumb: ${colorPallete[200]};\n`;
|
|
2434
|
+
}
|
|
2435
|
+
if (theme === 'light' || theme === 'dark-side') {
|
|
2436
|
+
el.textContent += `--background-elevated: ${colorPallete[200]};\n`;
|
|
2437
|
+
el.textContent += `--background-primary-hover: ${colorPallete[100]};\n`;
|
|
2438
|
+
el.textContent += `--background-subtle: ${colorPallete[50]};\n`;
|
|
2439
|
+
el.textContent += `--accent: ${colorPallete[200]};\n`;
|
|
2440
|
+
el.textContent += `--datatable-background: ${colorPallete[50]};\n`;
|
|
2441
|
+
el.textContent += `--datatable-accent: ${colorPallete[50]};\n`;
|
|
2442
|
+
el.textContent += `--scrollbar-thumb: ${colorPallete[200]};\n`;
|
|
2443
|
+
}
|
|
2444
|
+
if (theme === 'dark-side' || theme === 'dark') {
|
|
2445
|
+
// Verificar essa propriedade
|
|
2446
|
+
el.textContent += `--sidebar-accent: ${colorPallete[950]};\n`;
|
|
2447
|
+
}
|
|
2448
|
+
el.textContent += `--background-primary: ${colorPallete[900]};\n`;
|
|
2449
|
+
el.textContent += `--background-primary-hover: ${colorPallete[950]};\n`;
|
|
2450
|
+
el.textContent += `--primary: ${colorPallete[900]};\n`;
|
|
2451
|
+
el.textContent += `--primary-950: ${colorPallete[950]};\n`;
|
|
2452
|
+
el.textContent += `--primary-900: ${colorPallete[900]};\n`;
|
|
2453
|
+
el.textContent += `--primary-800: ${colorPallete[800]};\n`;
|
|
2454
|
+
el.textContent += `--primary-700: ${colorPallete[700]};\n`;
|
|
2455
|
+
el.textContent += `--primary-600: ${colorPallete[600]};\n`;
|
|
2456
|
+
el.textContent += `--primary-500: ${colorPallete[500]};\n`;
|
|
2457
|
+
el.textContent += `--primary-400: ${colorPallete[400]};\n`;
|
|
2458
|
+
el.textContent += `--primary-300: ${colorPallete[300]};\n`;
|
|
2459
|
+
el.textContent += `--primary-200: ${colorPallete[200]};\n`;
|
|
2460
|
+
el.textContent += `--primary-100: ${colorPallete[100]};\n`;
|
|
2461
|
+
el.textContent += `--primary-50: ${colorPallete[50]};\n`;
|
|
2462
|
+
el.textContent += `--chart-primary: ${colorPallete[800]};\n`;
|
|
2463
|
+
el.textContent += `--chart-secondary: ${colorPallete[200]};\n`;
|
|
2464
|
+
el.textContent += '}';
|
|
2465
|
+
return el;
|
|
2466
|
+
};
|
|
2467
|
+
|
|
2468
|
+
const DEFAULT_THEME_DATA = {
|
|
2469
|
+
faviconPath: '/logos/logosEai/Eai_roxo_48x48px.png',
|
|
2470
|
+
fullLogoPath: '/logos/logosEai/Eai_Roxo_60x42px.png',
|
|
2471
|
+
bannerDesktopPath: '/imgs/background-auth.png',
|
|
2472
|
+
mvnoPrimaryColor: 'violet',
|
|
2473
|
+
mvnoMainTheme: 'light',
|
|
2474
|
+
title: 'Eaí',
|
|
2475
|
+
hideModuleSwitcher: false,
|
|
2476
|
+
};
|
|
2477
|
+
const initialState = {
|
|
2478
|
+
portalDefinitions: DEFAULT_THEME_DATA,
|
|
2479
|
+
setPortalDefinitions: () => null,
|
|
2480
|
+
};
|
|
2481
|
+
const ThemeProviderContext = React.createContext(initialState);
|
|
2482
|
+
function ThemeProvider({ children, defaultTheme = DEFAULT_THEME_DATA, storageKey = 'vite-ui-theme', ...props }) {
|
|
2483
|
+
const [portalDefinitions, setPortalDefinitionsState] = React.useState({
|
|
2484
|
+
faviconPath: localStorage.getItem(`${storageKey}-faviconPath`) || defaultTheme.faviconPath,
|
|
2485
|
+
fullLogoPath: localStorage.getItem(`${storageKey}-fullLogoPath`) || defaultTheme.fullLogoPath,
|
|
2486
|
+
bannerDesktopPath: localStorage.getItem(`${storageKey}-bannerDesktopPath`) || defaultTheme.bannerDesktopPath,
|
|
2487
|
+
mvnoPrimaryColor: localStorage.getItem(`${storageKey}-mvnoPrimaryColor`) || defaultTheme.mvnoPrimaryColor,
|
|
2488
|
+
mvnoMainTheme: localStorage.getItem(storageKey) || defaultTheme.mvnoMainTheme,
|
|
2489
|
+
title: localStorage.getItem(`${storageKey}-title`) || defaultTheme.title,
|
|
2490
|
+
hideModuleSwitcher: localStorage.getItem(`${storageKey}-hideModuleSwitcher`) === 'true',
|
|
2491
|
+
});
|
|
2492
|
+
React.useEffect(() => {
|
|
2493
|
+
const theme = portalDefinitions?.mvnoMainTheme;
|
|
2494
|
+
const root = window.document.documentElement;
|
|
2495
|
+
root.classList.remove('light', 'dark', 'dark-side');
|
|
2496
|
+
root.classList.add(theme);
|
|
2497
|
+
document.title = portalDefinitions?.title;
|
|
2498
|
+
const meta = document.querySelector('meta[name="description"]');
|
|
2499
|
+
if (meta) {
|
|
2500
|
+
meta.setAttribute('content', portalDefinitions?.title);
|
|
2501
|
+
}
|
|
2502
|
+
let link = document.querySelector("link[rel~='icon']");
|
|
2503
|
+
if (!link) {
|
|
2504
|
+
link = document.createElement('link');
|
|
2505
|
+
link.rel = 'icon';
|
|
2506
|
+
document.getElementsByTagName('head')[0].appendChild(link);
|
|
2507
|
+
}
|
|
2508
|
+
link.href = portalDefinitions?.faviconPath;
|
|
2509
|
+
const el = replaceThemeTailwindColors(theme, portalDefinitions?.mvnoPrimaryColor);
|
|
2510
|
+
document.getElementById('theme-variables') &&
|
|
2511
|
+
document.getElementsByTagName('head')[0].removeChild(document.getElementById('theme-variables'));
|
|
2512
|
+
document.getElementsByTagName('head')[0].appendChild(el);
|
|
2513
|
+
}, [portalDefinitions]);
|
|
2514
|
+
const setPortalDefinitions = (portalDefinitions) => {
|
|
2515
|
+
localStorage.setItem(`${storageKey}-faviconPath`, portalDefinitions.faviconPath);
|
|
2516
|
+
localStorage.setItem(`${storageKey}-fullLogoPath`, portalDefinitions.fullLogoPath);
|
|
2517
|
+
localStorage.setItem(`${storageKey}-bannerDesktopPath`, portalDefinitions.bannerDesktopPath);
|
|
2518
|
+
localStorage.setItem(`${storageKey}-mvnoPrimaryColor`, portalDefinitions.mvnoPrimaryColor);
|
|
2519
|
+
localStorage.setItem(`${storageKey}-mvnoMainTheme`, portalDefinitions.mvnoMainTheme);
|
|
2520
|
+
localStorage.setItem(`${storageKey}-title`, portalDefinitions.title);
|
|
2521
|
+
localStorage.setItem(`${storageKey}-hideModuleSwitcher`, String(portalDefinitions.hideModuleSwitcher));
|
|
2522
|
+
setPortalDefinitionsState({
|
|
2523
|
+
faviconPath: portalDefinitions.faviconPath || DEFAULT_THEME_DATA.faviconPath,
|
|
2524
|
+
fullLogoPath: portalDefinitions.fullLogoPath || DEFAULT_THEME_DATA.fullLogoPath,
|
|
2525
|
+
bannerDesktopPath: portalDefinitions.bannerDesktopPath || DEFAULT_THEME_DATA.bannerDesktopPath,
|
|
2526
|
+
mvnoPrimaryColor: portalDefinitions.mvnoPrimaryColor || DEFAULT_THEME_DATA.mvnoPrimaryColor,
|
|
2527
|
+
mvnoMainTheme: portalDefinitions.mvnoMainTheme ? portalDefinitions.mvnoMainTheme : DEFAULT_THEME_DATA.mvnoMainTheme,
|
|
2528
|
+
title: portalDefinitions.title || DEFAULT_THEME_DATA.title,
|
|
2529
|
+
hideModuleSwitcher: portalDefinitions.hideModuleSwitcher || DEFAULT_THEME_DATA.hideModuleSwitcher,
|
|
2530
|
+
});
|
|
2531
|
+
};
|
|
2532
|
+
const value = {
|
|
2533
|
+
portalDefinitions,
|
|
2534
|
+
setPortalDefinitions: setPortalDefinitions,
|
|
2535
|
+
};
|
|
2536
|
+
return (jsxRuntime.jsx(ThemeProviderContext.Provider, { ...props, value: value, children: children }));
|
|
2537
|
+
}
|
|
2538
|
+
const useTheme = () => {
|
|
2539
|
+
const context = React.useContext(ThemeProviderContext);
|
|
2540
|
+
if (context === undefined)
|
|
2541
|
+
throw new Error('useTheme must be used within a ThemeProvider');
|
|
2542
|
+
return context;
|
|
2543
|
+
};
|
|
2544
|
+
|
|
2545
|
+
const formHelpText = (helpText) => {
|
|
2546
|
+
return (jsxRuntime.jsx(TooltipProvider, { children: jsxRuntime.jsxs(Tooltip, { children: [jsxRuntime.jsx(TooltipTrigger, { className: 'pb-2', children: jsxRuntime.jsx(lucideReact.CircleHelp, { size: 16, className: 'text-muted' }) }), jsxRuntime.jsx(TooltipContent, { className: 'text-white bg-background-primary', align: 'start', children: helpText })] }) }));
|
|
2547
|
+
};
|
|
2548
|
+
|
|
2549
|
+
const formLabel = (FormLabel, label) => {
|
|
2550
|
+
return jsxRuntime.jsx(FormLabel, { className: 'text-default font-medium text-sm h-5', children: label });
|
|
2551
|
+
};
|
|
2552
|
+
const formLabelAndSubLabel = (FormLabel, label, subLabel, required, className) => {
|
|
2553
|
+
return (jsxRuntime.jsxs("div", { className: cn('flex flex-col pb-2', className), children: [jsxRuntime.jsxs("div", { className: 'flex gap-1', children: [formLabel(FormLabel, label), required && jsxRuntime.jsx(FormLabel, { className: 'text-red-600 font-medium text-sm', children: "*" })] }), subLabel && jsxRuntime.jsx(FormLabel, { className: 'text-default font-normal pt-1', children: subLabel })] }));
|
|
2554
|
+
};
|
|
2555
|
+
|
|
2556
|
+
const formMessage = (FormMessage) => {
|
|
2557
|
+
return jsxRuntime.jsx(FormMessage, { className: 'text-red-600 mt-1' });
|
|
2558
|
+
};
|
|
2559
|
+
|
|
2560
|
+
const masks$1 = ['999.999.999-999', '99.999.999/9999-99'];
|
|
2561
|
+
const FormInputCpfCnpj = ({ control, name, label, subLabel, helpText, placeholder, className, disabled, required, onChange, onKeyUp, }) => {
|
|
2562
|
+
const { FormField, FormItem, FormLabel, FormControl, FormMessage } = FormComponents;
|
|
2563
|
+
const [mask, setMask] = React.useState(masks$1[0]);
|
|
2564
|
+
const handleMaskChange = (value) => {
|
|
2565
|
+
const numericValue = value.replace(/\D/g, '');
|
|
2566
|
+
if (numericValue.length > 11) {
|
|
2567
|
+
setMask(masks$1[1]);
|
|
2568
|
+
}
|
|
2569
|
+
else {
|
|
2570
|
+
setMask(masks$1[0]);
|
|
2571
|
+
}
|
|
2572
|
+
};
|
|
2573
|
+
return (jsxRuntime.jsx(FormField, { control: control, name: name, render: ({ field, formState }) => (jsxRuntime.jsxs(FormItem, { className: className, children: [jsxRuntime.jsxs("div", { className: 'flex items-center space-x-1.5', children: [label && formLabelAndSubLabel(FormLabel, label, subLabel, required), helpText && formHelpText(helpText)] }), jsxRuntime.jsx(FormControl, { children: jsxRuntime.jsx(MaskInputCpfCnpj, { ...field, className: `${className}`, placeholder: placeholder, disabled: disabled || formState.isSubmitting, mask: mask, onChange: (e) => {
|
|
2574
|
+
field.onChange(e);
|
|
2575
|
+
handleMaskChange(e.target.value);
|
|
2576
|
+
if (onChange) {
|
|
2577
|
+
onChange(e);
|
|
2578
|
+
}
|
|
2579
|
+
}, onKeyUp: (e) => {
|
|
2580
|
+
if (onKeyUp) {
|
|
2581
|
+
onKeyUp(e);
|
|
2582
|
+
}
|
|
2583
|
+
} }) }), formMessage(FormMessage)] })) }));
|
|
2584
|
+
};
|
|
2585
|
+
|
|
2586
|
+
const FormInputCurrency = ({ control, name, label, subLabel, helpText, className, disabled, required, onChange }) => {
|
|
2587
|
+
const { FormField, FormItem, FormLabel, FormControl, FormMessage } = FormComponents;
|
|
2588
|
+
return (jsxRuntime.jsx(FormField, { control: control, name: name, render: ({ field, formState }) => (jsxRuntime.jsxs(FormItem, { className: className, children: [jsxRuntime.jsxs("div", { className: 'flex items-center space-x-1.5', children: [label && formLabelAndSubLabel(FormLabel, label, subLabel, required), helpText && formHelpText(helpText)] }), jsxRuntime.jsx(FormControl, { children: jsxRuntime.jsx(MaskInputDecimal, { ...field, symbol: 'R$', className: `${className}`, disabled: disabled || formState.isSubmitting, onChange: (e) => {
|
|
2589
|
+
field.onChange(e);
|
|
2590
|
+
if (onChange) {
|
|
2591
|
+
onChange(e);
|
|
2592
|
+
}
|
|
2593
|
+
} }) }), formMessage(FormMessage)] })) }));
|
|
2594
|
+
};
|
|
2595
|
+
|
|
2596
|
+
const getFirstDayOfCurrentMonth = () => {
|
|
2597
|
+
const now = new Date();
|
|
2598
|
+
return new Date(now.getFullYear(), now.getMonth(), 1);
|
|
2599
|
+
};
|
|
2600
|
+
const getFirstDayOf90DaysAgo = () => {
|
|
2601
|
+
const now = new Date();
|
|
2602
|
+
return new Date(now.getFullYear(), now.getMonth() - 3, 1);
|
|
2603
|
+
};
|
|
2604
|
+
const stringToDate = (dateString, separator = '/') => {
|
|
2605
|
+
if (!dateString)
|
|
2606
|
+
return undefined;
|
|
2607
|
+
const dateParts = dateString.split(separator);
|
|
2608
|
+
if (dateParts.length !== 3)
|
|
2609
|
+
return undefined;
|
|
2610
|
+
const day = parseInt(dateParts[0], 10);
|
|
2611
|
+
const month = parseInt(dateParts[1], 10) - 1; // Months are zero-based in JavaScript
|
|
2612
|
+
const year = parseInt(dateParts[2], 10);
|
|
2613
|
+
return new Date(year, month, day);
|
|
2614
|
+
};
|
|
2615
|
+
const aYearAgo = () => {
|
|
2616
|
+
const aYearAgo = new Date();
|
|
2617
|
+
aYearAgo.setFullYear(aYearAgo.getFullYear() - 1);
|
|
2618
|
+
return aYearAgo;
|
|
2619
|
+
};
|
|
2620
|
+
const invertDate = (date, separator = '/') => {
|
|
2621
|
+
if (!date)
|
|
2622
|
+
return '';
|
|
2623
|
+
return date.split(separator).reverse().join('-');
|
|
2624
|
+
};
|
|
2625
|
+
const addDaysToToday = (days) => {
|
|
2626
|
+
const date = new Date();
|
|
2627
|
+
date.setDate(date.getDate() + days);
|
|
2628
|
+
return date;
|
|
2629
|
+
};
|
|
2630
|
+
|
|
2631
|
+
const FormInputDate = ({ control, name, label, subLabel, helpText, placeholder = '01/01/2023', className, disabled, required, onChange, onKeyUp, }) => {
|
|
2632
|
+
const { FormField, FormItem, FormLabel, FormControl, FormMessage } = FormComponents;
|
|
2633
|
+
const [open, setOpen] = React.useState(false);
|
|
2634
|
+
return (jsxRuntime.jsx(FormField, { control: control, name: name, render: ({ field, formState }) => (jsxRuntime.jsxs(FormItem, { className: className, children: [jsxRuntime.jsxs("div", { className: 'flex items-center space-x-1.5', children: [label && formLabelAndSubLabel(FormLabel, label, subLabel, required), helpText && formHelpText(helpText)] }), jsxRuntime.jsx(FormControl, { children: jsxRuntime.jsxs("div", { className: 'relative w-full', children: [jsxRuntime.jsx(MaskInput, { ...field, mask: '99/99/9999', maskPlaceholder: null, placeholder: placeholder, disabled: disabled || formState.isSubmitting, className: cn('pl-9', className), onChange: (e) => {
|
|
2635
|
+
field.onChange(e);
|
|
2636
|
+
if (onChange) {
|
|
2637
|
+
onChange(e);
|
|
2638
|
+
}
|
|
2639
|
+
}, onKeyUp: (e) => {
|
|
2640
|
+
if (onKeyUp) {
|
|
2641
|
+
onKeyUp(e);
|
|
2642
|
+
}
|
|
2643
|
+
} }), jsxRuntime.jsx("div", { className: 'absolute left-3 top-1/2 -translate-y-1/2 cursor-pointer', children: jsxRuntime.jsxs(Popover, { open: open, onOpenChange: setOpen, children: [jsxRuntime.jsx(PopoverTrigger, { asChild: true, children: jsxRuntime.jsx(lucideReact.CalendarIcon, { size: 16, className: 'cursor-pointer text-gray-500' }) }), jsxRuntime.jsx(PopoverContent, { className: 'w-[250px] p-0', align: 'start', children: jsxRuntime.jsx(Calendar, { mode: 'single', locale: ptBR, required: true, selected: stringToDate(field.value) ?? new Date(), onSelect: (date) => {
|
|
2644
|
+
field.onChange(date ? date.toLocaleDateString('pt-BR') : '');
|
|
2645
|
+
if (onChange) {
|
|
2646
|
+
onChange({
|
|
2647
|
+
target: { value: date ? date.toLocaleDateString('pt-BR') : '' },
|
|
2648
|
+
});
|
|
2649
|
+
}
|
|
2650
|
+
setOpen(false);
|
|
2651
|
+
}, className: 'rounded-md', captionLayout: 'dropdown' }) })] }) })] }) }), formMessage(FormMessage)] })) }));
|
|
2652
|
+
};
|
|
2653
|
+
|
|
2654
|
+
const FormDataRange = ({ control, name, label, subLabel, helpText, placeholder, className, disabled, required, onChange, }) => {
|
|
2655
|
+
const { FormField, FormItem, FormLabel, FormControl, FormMessage } = FormComponents;
|
|
2656
|
+
// const [date, setDate] = useState<DateRange | undefined>(field.value);
|
|
2657
|
+
const [open, setOpen] = React.useState(false);
|
|
2658
|
+
const handleDateChange = (newDate, field) => {
|
|
2659
|
+
// setDate(newDate);
|
|
2660
|
+
field.onChange(newDate);
|
|
2661
|
+
if (onChange)
|
|
2662
|
+
onChange(newDate);
|
|
2663
|
+
};
|
|
2664
|
+
return (jsxRuntime.jsx(FormField, { control: control, name: name, render: ({ field, formState }) => (jsxRuntime.jsxs(FormItem, { className: className, children: [jsxRuntime.jsxs("div", { className: 'flex items-center space-x-1.5', children: [label && formLabelAndSubLabel(FormLabel, label, subLabel, required), helpText && formHelpText(helpText)] }), jsxRuntime.jsx(FormControl, { children: jsxRuntime.jsxs(Popover, { open: open, onOpenChange: setOpen, children: [jsxRuntime.jsx(PopoverTrigger, { asChild: true, className: 'w-full', children: jsxRuntime.jsx("div", { className: ` rounded-sm outline-none ${open ? 'ring-2 ring-ring ring-offset-2' : 'ring-0'}`, children: jsxRuntime.jsxs(Button, { type: 'button', variant: 'outline', role: 'combobox', "aria-expanded": open, className: cn(` ${className} justify-start disabled:border-disabled disabled:cursor-not-allowed disabled:opacity-50`, formState.errors[name] ? 'border-red-600' : ''), disabled: disabled || formState.isSubmitting, children: [jsxRuntime.jsx(lucideReact.CalendarIcon, { className: 'text-zinc-500' }), field.value?.from ? (field.value?.to ? (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [dateFns.format(field.value?.from, 'dd/MM/yyyy'), " - ", dateFns.format(field.value?.to, 'dd/MM/yyyy')] })) : (dateFns.format(field.value?.from, 'dd/MM/yyyy'))) : (jsxRuntime.jsx("span", { className: 'font-normal text-zinc-500', children: "Escolha um Per\u00EDodo" }))] }) }) }), jsxRuntime.jsx(PopoverContent, { className: 'flex w-auto p-0', align: 'start', children: jsxRuntime.jsx("div", { className: 'flex flex-row space-x-4', children: jsxRuntime.jsx(Calendar, { initialFocus: true, mode: 'range', defaultMonth: field.value?.from, selected: field.value, numberOfMonths: 2, className: 'flex', onSelect: (newDate) => handleDateChange(newDate, field) }) }) })] }) }), formMessage(FormMessage)] })) }));
|
|
2665
|
+
};
|
|
2666
|
+
|
|
2667
|
+
const FormInputDecimal = ({ control, name, label, subLabel, helpText, className, disabled, required, onChange }) => {
|
|
2668
|
+
const { FormField, FormItem, FormLabel, FormControl, FormMessage } = FormComponents;
|
|
2669
|
+
return (jsxRuntime.jsx(FormField, { control: control, name: name, render: ({ field, formState }) => (jsxRuntime.jsxs(FormItem, { className: className, children: [jsxRuntime.jsxs("div", { className: 'flex items-center space-x-1.5', children: [label && formLabelAndSubLabel(FormLabel, label, subLabel, required), helpText && formHelpText(helpText)] }), jsxRuntime.jsx(FormControl, { children: jsxRuntime.jsx(MaskInputDecimal, { ...field, className: `${className}`, disabled: disabled || formState.isSubmitting, onChange: (e) => {
|
|
2670
|
+
field.onChange(e);
|
|
2671
|
+
if (onChange) {
|
|
2672
|
+
onChange(e);
|
|
2673
|
+
}
|
|
2674
|
+
} }) }), formMessage(FormMessage)] })) }));
|
|
2675
|
+
};
|
|
2676
|
+
|
|
2677
|
+
const FormInputFile = ({ control, name, label, subLabel, helpText, placeholder, className, disabled, required, onChange, }) => {
|
|
2678
|
+
const { FormField, FormItem, FormLabel, FormControl, FormMessage } = FormComponents;
|
|
2679
|
+
const [value, setValue] = React.useState('');
|
|
2680
|
+
return (jsxRuntime.jsx(FormField, { control: control, name: name, render: ({ field, formState }) => (jsxRuntime.jsxs(FormItem, { className: className, children: [jsxRuntime.jsxs("div", { className: 'flex items-center space-x-1.5', children: [label && formLabelAndSubLabel(FormLabel, label, subLabel, required), helpText && formHelpText(helpText)] }), jsxRuntime.jsx(FormControl, { children: jsxRuntime.jsx(InputFile, { value: value, placeholder: placeholder, disabled: disabled || formState.isSubmitting, onChange: (e) => {
|
|
2681
|
+
if (onChange) {
|
|
2682
|
+
onChange(e);
|
|
2683
|
+
}
|
|
2684
|
+
setValue(e.target.value);
|
|
2685
|
+
field.onChange(e.target.files);
|
|
2686
|
+
} }) }), formMessage(FormMessage)] })) }));
|
|
2687
|
+
};
|
|
2688
|
+
|
|
2689
|
+
const FormInputGhost = ({ control, name, className }) => {
|
|
2690
|
+
const { FormField, FormItem, FormControl, FormMessage } = FormComponents;
|
|
2691
|
+
return (jsxRuntime.jsx(FormField, { control: control, name: name, render: ({ field }) => (jsxRuntime.jsxs(FormItem, { className: className, children: [jsxRuntime.jsx(FormControl, { children: jsxRuntime.jsx(InputText, { ...field, className: 'hidden' }) }), formMessage(FormMessage)] })) }));
|
|
2692
|
+
};
|
|
2693
|
+
|
|
2694
|
+
const FormInput = ({ control, type, name, label, subLabel, helpText, placeholder, maxLength, className, disabled, required, onKeyUp, }) => {
|
|
2695
|
+
const { FormField, FormItem, FormLabel, FormControl, FormMessage } = FormComponents;
|
|
2696
|
+
return (jsxRuntime.jsx(FormField, { control: control, name: name, render: ({ field, formState }) => (jsxRuntime.jsxs(FormItem, { className: className, children: [jsxRuntime.jsxs("div", { className: 'flex items-center space-x-1.5', children: [label && formLabelAndSubLabel(FormLabel, label, subLabel, required), helpText && formHelpText(helpText)] }), jsxRuntime.jsx(FormControl, { children: jsxRuntime.jsx(Input, { ...field, className: className, maxLength: maxLength, placeholder: placeholder, disabled: disabled || formState.isSubmitting, type: type, onKeyUp: (e) => {
|
|
2697
|
+
if (onKeyUp) {
|
|
2698
|
+
onKeyUp(e);
|
|
2699
|
+
}
|
|
2700
|
+
} }) }), formMessage(FormMessage)] })) }));
|
|
2701
|
+
};
|
|
2702
|
+
|
|
2703
|
+
const FormInputMask = ({ control, name, label, subLabel, helpText, placeholder, mask, maskPlaceholder, className, disabled, required, inputRef, onChange, onKeyUp, }) => {
|
|
2704
|
+
const { FormField, FormItem, FormLabel, FormControl, FormMessage } = FormComponents;
|
|
2705
|
+
return (jsxRuntime.jsx(FormField, { control: control, name: name, render: ({ field, formState }) => (jsxRuntime.jsxs(FormItem, { className: className, children: [jsxRuntime.jsxs("div", { className: 'flex items-center space-x-1.5', children: [label && formLabelAndSubLabel(FormLabel, label, subLabel, required), helpText && formHelpText(helpText)] }), jsxRuntime.jsx(FormControl, { children: jsxRuntime.jsx(MaskInput, { ...field, mask: mask, maskPlaceholder: maskPlaceholder, placeholder: placeholder, disabled: disabled || formState.isSubmitting, onChange: (e) => {
|
|
2706
|
+
field.onChange(e);
|
|
2707
|
+
if (onChange) {
|
|
2708
|
+
onChange(e);
|
|
2709
|
+
}
|
|
2710
|
+
}, onKeyUp: (e) => {
|
|
2711
|
+
if (onKeyUp) {
|
|
2712
|
+
onKeyUp(e);
|
|
2713
|
+
}
|
|
2714
|
+
}, ref: inputRef }) }), formMessage(FormMessage)] })) }));
|
|
2715
|
+
};
|
|
2716
|
+
|
|
2717
|
+
const multiSelectVariants = classVarianceAuthority.cva('m-1 rounded-[6px]', {
|
|
2718
|
+
variants: {
|
|
2719
|
+
variant: {
|
|
2720
|
+
default: 'text-foreground bg-background-secondary dark:bg-popover hover:bg-background-secondary',
|
|
2721
|
+
secondary: 'border-foreground/10 bg-secondary text-secondary-foreground hover:bg-secondary/80',
|
|
2722
|
+
destructive: 'border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80',
|
|
2723
|
+
inverted: 'inverted',
|
|
2724
|
+
},
|
|
2725
|
+
},
|
|
2726
|
+
defaultVariants: {
|
|
2727
|
+
variant: 'default',
|
|
2728
|
+
},
|
|
2729
|
+
});
|
|
2730
|
+
const MultiSelect = React__namespace.forwardRef(({ control, name, label, subLabel, helpText, options, variant, placeholder, maxCount = 2, modalPopover = false, asChild = false, className, required, ...props }, ref) => {
|
|
2731
|
+
const { FormField, FormItem, FormLabel, FormMessage } = FormComponents;
|
|
2732
|
+
const [isPopoverOpen, setIsPopoverOpen] = React__namespace.useState(false);
|
|
2733
|
+
const DEFAULT_PLACEHOLDER_FILTER = 'Digite para buscar...';
|
|
2734
|
+
const DEFAULT_PLACEHOLDER = 'Selecione';
|
|
2735
|
+
const toggleOption = (option, field) => {
|
|
2736
|
+
const prevValue = field.value || [];
|
|
2737
|
+
const newValue = prevValue?.some((item) => item.value === option.value)
|
|
2738
|
+
? prevValue.filter((item) => item.value !== option.value)
|
|
2739
|
+
: [...prevValue, option];
|
|
2740
|
+
field.onChange(newValue);
|
|
2741
|
+
};
|
|
2742
|
+
const handleClear = (field) => {
|
|
2743
|
+
field.onChange([]);
|
|
2744
|
+
};
|
|
2745
|
+
const handleTogglePopover = () => {
|
|
2746
|
+
setIsPopoverOpen((prev) => !prev);
|
|
2747
|
+
};
|
|
2748
|
+
const toggleAll = (field) => {
|
|
2749
|
+
if (field.value?.length === options.length) {
|
|
2750
|
+
handleClear(field);
|
|
2751
|
+
}
|
|
2752
|
+
else {
|
|
2753
|
+
const allValues = options.map((option) => option);
|
|
2754
|
+
field.onChange(allValues);
|
|
2755
|
+
}
|
|
2756
|
+
};
|
|
2757
|
+
return (jsxRuntime.jsx(FormField, { control: control, name: name, render: ({ field }) => (jsxRuntime.jsxs(FormItem, { children: [jsxRuntime.jsxs("div", { className: 'flex items-center space-x-1.5', children: [label && formLabelAndSubLabel(FormLabel, label, subLabel, required), helpText && formHelpText(helpText)] }), jsxRuntime.jsxs(Popover, { open: isPopoverOpen, onOpenChange: setIsPopoverOpen, modal: modalPopover, children: [jsxRuntime.jsx(PopoverTrigger, { asChild: true, children: jsxRuntime.jsx(Button, { ref: ref, ...props, onClick: handleTogglePopover, className: cn('flex w-full p-1 rounded-md border min-h-10 h-auto items-center justify-between bg-background hover:bg-background [&_svg]:size-3.5', className), children: field.value?.length > 0 ? (jsxRuntime.jsxs("div", { className: 'flex justify-between items-center w-full', children: [jsxRuntime.jsxs("div", { className: 'flex items-center', children: [jsxRuntime.jsx("div", { className: `grid grid-cols-${maxCount}`, children: field.value.slice(0, maxCount).map((option) => {
|
|
2758
|
+
return (jsxRuntime.jsxs(Badge, { className: cn(multiSelectVariants({ variant })), onClick: (event) => {
|
|
2759
|
+
event.stopPropagation();
|
|
2760
|
+
toggleOption(option, field);
|
|
2761
|
+
}, children: [jsxRuntime.jsx("div", { className: 'truncate', children: option?.label }), jsxRuntime.jsx(lucideReact.X, { className: 'ml-2 cursor-pointer text-zinc-500' })] }, `msoptlbl-${option.value}`));
|
|
2762
|
+
}) }), field.value?.length > maxCount && (jsxRuntime.jsx(Badge, { variant: 'surface', children: `+${field.value?.length - maxCount}` }))] }), jsxRuntime.jsx("div", { className: 'flex items-center justify-between', children: jsxRuntime.jsx(lucideReact.ChevronDown, { className: 'h-4 mx-2 cursor-pointer text-muted-foreground' }) })] })) : (jsxRuntime.jsxs("div", { className: 'flex items-center justify-between w-full mx-auto', children: [jsxRuntime.jsx("span", { className: 'text-sm text-muted-foreground mx-3', children: placeholder ?? DEFAULT_PLACEHOLDER }), jsxRuntime.jsx(lucideReact.ChevronDown, { className: 'h-4 cursor-pointer text-muted-foreground mx-2' })] })) }) }), jsxRuntime.jsx(PopoverContent, { className: cn('w-auto p-0', 'w-[--radix-popover-trigger-width]'), align: 'start', onEscapeKeyDown: () => setIsPopoverOpen(false), children: jsxRuntime.jsxs(Command, { children: [jsxRuntime.jsx(CommandInput, { placeholder: DEFAULT_PLACEHOLDER_FILTER }), jsxRuntime.jsxs(CommandList, { children: [jsxRuntime.jsx(CommandEmpty, { children: "Nenhum resultado encontrado" }), jsxRuntime.jsxs(CommandGroup, { children: [jsxRuntime.jsxs(CommandItem, { onSelect: () => toggleAll(field), className: 'cursor-pointer', children: [jsxRuntime.jsx("div", { className: cn('mr-2 flex h-4 w-4 items-center justify-center rounded-sm border border-primary', field.value?.length === options.length
|
|
2763
|
+
? 'bg-primary text-primary-foreground'
|
|
2764
|
+
: 'opacity-50 [&_svg]:invisible'), children: jsxRuntime.jsx(lucideReact.CheckIcon, { className: 'h-4 w-4' }) }), jsxRuntime.jsx("span", { children: "(Selecionar Todos)" })] }, 'all'), options.map((option) => {
|
|
2765
|
+
const isSelected = field.value?.some((item) => item.value === option.value);
|
|
2766
|
+
return (jsxRuntime.jsxs(CommandItem, { onSelect: () => toggleOption(option, field), className: 'cursor-pointer', children: [jsxRuntime.jsx("div", { className: cn('mr-2 flex h-4 w-4 items-center justify-center rounded-sm border border-primary', isSelected ? 'bg-primary text-primary-foreground' : 'opacity-50 [&_svg]:invisible'), children: jsxRuntime.jsx(lucideReact.CheckIcon, { className: 'h-4 w-4' }) }), jsxRuntime.jsx("span", { children: option.label })] }, `msopt-${option.value}`));
|
|
2767
|
+
})] })] })] }) })] }), formMessage(FormMessage)] })) }));
|
|
2768
|
+
});
|
|
2769
|
+
MultiSelect.displayName = 'MultiSelect';
|
|
2770
|
+
|
|
2771
|
+
const FormInputPassWord = ({ control, name, label, subLabel, helpText, placeholder, maxLength, className, disabled, required, }) => {
|
|
2772
|
+
const { FormField, FormItem, FormLabel, FormControl, FormMessage } = FormComponents;
|
|
2773
|
+
const [showPassword, setShowPassword] = React.useState(true);
|
|
2774
|
+
const togglePasswordVisibility = () => setShowPassword((prev) => !prev);
|
|
2775
|
+
return (jsxRuntime.jsx(FormField, { control: control, name: name, render: ({ field, formState }) => (jsxRuntime.jsxs(FormItem, { className: className, children: [jsxRuntime.jsxs("div", { className: 'flex items-center space-x-1.5', children: [label && formLabelAndSubLabel(FormLabel, label, subLabel, required), helpText && formHelpText(helpText)] }), jsxRuntime.jsx(FormControl, { children: jsxRuntime.jsxs("div", { className: 'relative w-full', children: [jsxRuntime.jsx(InputText, { ...field, type: showPassword ? 'password' : 'text', name: name, maxLength: maxLength, className: className, placeholder: placeholder, disabled: disabled || formState.isSubmitting }), jsxRuntime.jsx("button", { type: 'button', onClick: togglePasswordVisibility, className: 'absolute inset-y-0 right-2 flex items-center', children: showPassword ? jsxRuntime.jsx(lucideReact.EyeOff, { className: 'w-5 h-5 text-slate-500' }) : jsxRuntime.jsx(lucideReact.Eye, { className: 'w-5 h-5 text-slate-500' }) })] }) }), formMessage(FormMessage)] })) }));
|
|
2776
|
+
};
|
|
2777
|
+
|
|
2778
|
+
const FormInputPercent = ({ control, name, label, subLabel, helpText, className, disabled, required, onChange }) => {
|
|
2779
|
+
const { FormField, FormItem, FormLabel, FormControl, FormMessage } = FormComponents;
|
|
2780
|
+
return (jsxRuntime.jsx(FormField, { control: control, name: name, render: ({ field, formState }) => (jsxRuntime.jsxs(FormItem, { className: className, children: [jsxRuntime.jsxs("div", { className: 'flex items-center space-x-1.5', children: [label && formLabelAndSubLabel(FormLabel, label, subLabel, required), helpText && formHelpText(helpText)] }), jsxRuntime.jsx(FormControl, { children: jsxRuntime.jsx(MaskInputDecimal, { ...field, symbol: '%', className: `${className}`, disabled: disabled || formState.isSubmitting, onChange: (e) => {
|
|
2781
|
+
field.onChange(e);
|
|
2782
|
+
if (onChange) {
|
|
2783
|
+
onChange(e);
|
|
2784
|
+
}
|
|
2785
|
+
} }) }), formMessage(FormMessage)] })) }));
|
|
2786
|
+
};
|
|
2787
|
+
|
|
2788
|
+
const masks = ['(99) 9999-99999', '(99) 9 9999-9999'];
|
|
2789
|
+
const FormInputPhone = ({ control, name, label, subLabel, helpText, placeholder, className, disabled, required, onChange, onKeyUp, }) => {
|
|
2790
|
+
const { FormField, FormItem, FormLabel, FormControl, FormMessage } = FormComponents;
|
|
2791
|
+
const [mask, setMask] = React.useState(masks[0]);
|
|
2792
|
+
const getMask = (val) => (val.replace(/\D/g, '').length > 10 ? masks[1] : masks[0]);
|
|
2793
|
+
return (jsxRuntime.jsx(FormField, { control: control, name: name, render: ({ field, formState }) => {
|
|
2794
|
+
React.useEffect(() => {
|
|
2795
|
+
setMask(getMask(field.value || ''));
|
|
2796
|
+
}, [field.value]);
|
|
2797
|
+
return (jsxRuntime.jsxs(FormItem, { className: className, children: [jsxRuntime.jsxs("div", { className: 'flex items-center space-x-1.5', children: [label && formLabelAndSubLabel(FormLabel, label, subLabel, required), helpText && formHelpText(helpText)] }), jsxRuntime.jsx(FormControl, { children: jsxRuntime.jsx(MaskInputFone, { ...field, className: className, placeholder: placeholder ?? '(00) 0 0000-0000', disabled: disabled || formState.isSubmitting, mask: mask, onChange: (e) => {
|
|
2798
|
+
onChange?.(e);
|
|
2799
|
+
field.onChange(e);
|
|
2800
|
+
setMask(getMask(e.target.value));
|
|
2801
|
+
}, onKeyUp: (e) => onKeyUp?.(e) }) }), formMessage(FormMessage)] }));
|
|
2802
|
+
} }));
|
|
2803
|
+
};
|
|
2804
|
+
|
|
2805
|
+
const FormRadioGroup = ({ control, name, value, label, subLabel, helpText, className, classNameOptions, disabled, required, options, onChange, }) => {
|
|
2806
|
+
const { FormField, FormItem, FormLabel, FormControl, FormMessage } = FormComponents;
|
|
2807
|
+
return (jsxRuntime.jsx(FormField, { control: control, name: name, render: ({ field, formState }) => (jsxRuntime.jsxs(FormItem, { children: [jsxRuntime.jsxs("div", { className: cn('flex items-center space-x-1.5 mb-2', className), children: [label && formLabelAndSubLabel(FormLabel, label, subLabel, required), helpText && formHelpText(helpText)] }), jsxRuntime.jsx(FormControl, { children: jsxRuntime.jsx(RadioGroup, { onValueChange: (value) => {
|
|
2808
|
+
field?.onChange?.(value);
|
|
2809
|
+
onChange?.(value);
|
|
2810
|
+
}, defaultValue: field.value, disabled: disabled || formState.isSubmitting, className: `${className}`, children: jsxRuntime.jsx("div", { className: cn('flex flex-grow gap-6', classNameOptions), children: options?.map((option, index) => (jsxRuntime.jsxs("div", { className: 'flex flex-col', children: [jsxRuntime.jsxs("div", { className: 'flex items-center space-x-2', children: [jsxRuntime.jsx(RadioGroupItem, { value: option.value, id: `r${option.value}`, checked: field.value === option.value, disabled: option.disabled }), jsxRuntime.jsx(Label, { htmlFor: `r${option.value}`, className: option.disabled ? 'opacity-50' : '', children: option.label })] }, `radio-${name}-${index}`), option.description && (jsxRuntime.jsx("div", { className: cn('pl-6 text-zinc-500', { 'opacity-50': option.disabled }), children: option.description }))] }, `radio-${name}-${index}`))) }) }) }), formMessage(FormMessage)] })) }, value));
|
|
2811
|
+
};
|
|
2812
|
+
|
|
2813
|
+
const FormSelect = ({ control, name, label, subLabel, helpText, placeholder, className, disabled, required, options }) => {
|
|
2814
|
+
const { FormField, FormItem, FormLabel, FormControl, FormMessage } = FormComponents;
|
|
2815
|
+
return (jsxRuntime.jsx(FormField, { control: control, name: name, render: ({ field, formState }) => (jsxRuntime.jsxs(FormItem, { className: className, children: [jsxRuntime.jsxs("div", { className: 'flex items-center space-x-1.5', children: [label && formLabelAndSubLabel(FormLabel, label, subLabel, required), helpText && formHelpText(helpText)] }), jsxRuntime.jsx(FormControl, { children: jsxRuntime.jsxs(SelectPrimitive.Select, { onValueChange: field.onChange, defaultValue: field.value, disabled: disabled, children: [jsxRuntime.jsx(SelectTrigger, { className: cn('', formState.errors[name] ? 'border-red-600' : '', className), children: jsxRuntime.jsx(SelectValue, { className: 'text-slate-400', placeholder: placeholder }) }), jsxRuntime.jsx(SelectContent, { className: 'bg-white cursor-pointer', children: jsxRuntime.jsx(SelectGroup, { children: options.map((option) => (jsxRuntime.jsx(SelectItem, { value: option.value, children: option.label }, option.value))) }) })] }) }), formMessage(FormMessage)] })) }));
|
|
2816
|
+
};
|
|
2817
|
+
|
|
2818
|
+
const FormInputSwitch = ({ control, name, label, subLabel, helpText, className, disabled, onCheckedChange }) => {
|
|
2819
|
+
const { FormField, FormItem, FormLabel, FormControl, FormMessage } = FormComponents;
|
|
2820
|
+
return (jsxRuntime.jsx(FormField, { control: control, name: name, render: ({ field }) => (jsxRuntime.jsxs(FormItem, { className: cn('flex items-top gap-x-2', className), children: [jsxRuntime.jsx(FormControl, { children: jsxRuntime.jsx(Switch, { ...field, checked: field.value, onCheckedChange: (checked) => {
|
|
2821
|
+
field.onChange(checked);
|
|
2822
|
+
if (onCheckedChange) {
|
|
2823
|
+
onCheckedChange(checked);
|
|
2824
|
+
}
|
|
2825
|
+
}, disabled: disabled }) }), jsxRuntime.jsxs("div", { className: 'flex h-full items-center space-x-1.5', children: [label && formLabelAndSubLabel(FormLabel, label, subLabel, false, 'pb-0'), helpText && formHelpText(helpText)] }), formMessage(FormMessage)] })) }));
|
|
2826
|
+
};
|
|
2827
|
+
|
|
2828
|
+
const FormInputText = ({ control, name, label, subLabel, helpText, placeholder, maxLength, className, disabled, required, inputRef, onKeyUp, onChange, }) => {
|
|
2829
|
+
const { FormField, FormItem, FormLabel, FormControl, FormMessage } = FormComponents;
|
|
2830
|
+
return (jsxRuntime.jsx(FormField, { control: control, name: name, render: ({ field, formState }) => (jsxRuntime.jsxs(FormItem, { className: className, children: [jsxRuntime.jsxs("div", { className: 'flex items-center space-x-1.5', children: [label && formLabelAndSubLabel(FormLabel, label, subLabel, required), helpText && formHelpText(helpText)] }), jsxRuntime.jsx(FormControl, { children: jsxRuntime.jsx(InputText, { ...field, maxLength: maxLength, placeholder: placeholder, disabled: disabled || formState.isSubmitting, value: field.value || '', onKeyUp: (e) => {
|
|
2831
|
+
if (onKeyUp) {
|
|
2832
|
+
onKeyUp(e);
|
|
2833
|
+
}
|
|
2834
|
+
}, ref: inputRef }) }), formMessage(FormMessage)] })) }));
|
|
2835
|
+
};
|
|
2836
|
+
|
|
2837
|
+
const FormTextarea = ({ control, name, label, subLabel, helpText, placeholder, className, disabled, required, onChange, onKeyUp, }) => {
|
|
2838
|
+
const { FormField, FormItem, FormLabel, FormControl, FormMessage } = FormComponents;
|
|
2839
|
+
return (jsxRuntime.jsx(FormField, { control: control, name: name, render: ({ field, formState }) => (jsxRuntime.jsxs(FormItem, { className: className, children: [jsxRuntime.jsxs("div", { className: 'flex items-center space-x-1.5', children: [label && formLabelAndSubLabel(FormLabel, label, subLabel, required), helpText && formHelpText(helpText)] }), jsxRuntime.jsx(FormControl, { children: jsxRuntime.jsx(Textarea, { ...field, className: 'resize-none outline-none focus:outline-none', placeholder: placeholder, disabled: disabled || formState.isSubmitting, onChange: (e) => {
|
|
2840
|
+
field.onChange(e);
|
|
2841
|
+
if (onChange) {
|
|
2842
|
+
onChange(e);
|
|
2843
|
+
}
|
|
2844
|
+
}, onKeyUp: (e) => {
|
|
2845
|
+
if (onKeyUp) {
|
|
2846
|
+
onKeyUp(e);
|
|
2847
|
+
}
|
|
2848
|
+
} }) }), formMessage(FormMessage)] })) }));
|
|
2849
|
+
};
|
|
2850
|
+
|
|
2851
|
+
function DataTableExport({ exportData, totalRows }) {
|
|
2852
|
+
const exportXlSX = () => {
|
|
2853
|
+
if (!exportData)
|
|
2854
|
+
return;
|
|
2855
|
+
if (totalRows === 0) {
|
|
2856
|
+
toast({
|
|
2857
|
+
title: 'Não há dados para exportar.',
|
|
2858
|
+
variant: 'destructive',
|
|
2859
|
+
});
|
|
2860
|
+
return {};
|
|
2861
|
+
}
|
|
2862
|
+
const params = new URLSearchParams(exportData.params).toString();
|
|
2863
|
+
window.open(`${exportData.url}?${params}`, '_blank');
|
|
2864
|
+
};
|
|
2865
|
+
const renderExport = () => {
|
|
2866
|
+
if (!exportData)
|
|
2867
|
+
return null;
|
|
2868
|
+
if (exportData.type === 'xlsx') {
|
|
2869
|
+
return (jsxRuntime.jsx(Button, { variant: 'secondary', onClick: exportXlSX, children: "Exportar" }));
|
|
2870
|
+
}
|
|
2871
|
+
if (exportData.type === 'dialog') {
|
|
2872
|
+
const ExportDataSchema = zod.z.object({
|
|
2873
|
+
model: zod.z.string(),
|
|
2874
|
+
format: zod.z.string(),
|
|
2875
|
+
});
|
|
2876
|
+
const form = reactHookForm.useForm({
|
|
2877
|
+
mode: 'onTouched',
|
|
2878
|
+
resolver: zod$1.zodResolver(ExportDataSchema),
|
|
2879
|
+
});
|
|
2880
|
+
const { control, trigger, handleSubmit } = form;
|
|
2881
|
+
const onSubmit = async (values) => {
|
|
2882
|
+
await trigger();
|
|
2883
|
+
toast({
|
|
2884
|
+
title: 'Em desenvolvimento.',
|
|
2885
|
+
variant: 'destructive',
|
|
2886
|
+
});
|
|
2887
|
+
};
|
|
2888
|
+
const onError = async (errors) => {
|
|
2889
|
+
toast({
|
|
2890
|
+
title: 'Erro ao salvar',
|
|
2891
|
+
description: 'Verifique os campos obrigatórios',
|
|
2892
|
+
variant: 'destructive',
|
|
2893
|
+
});
|
|
2894
|
+
};
|
|
2895
|
+
return (jsxRuntime.jsx(Form, { ...form, onSubmit: handleSubmit(onSubmit, onError), children: jsxRuntime.jsxs(Dialog, { children: [jsxRuntime.jsx(DialogTrigger, { asChild: true, children: jsxRuntime.jsx(Button, { variant: 'secondary', children: "Exportar" }) }), jsxRuntime.jsxs(DialogContent, { hideClose: true, className: 'fixed p-6 rounded-lg w-[451px]', children: [jsxRuntime.jsxs(DialogHeader, { children: [jsxRuntime.jsx(DialogTitle, { children: "Exportar" }), jsxRuntime.jsx(DialogDescription, {})] }), jsxRuntime.jsxs("div", { className: 'flex flex-col gap-6', children: [jsxRuntime.jsx(FormRadioGroup, { control: control, name: 'model', label: 'Selecione o modelo de visualiza\u00E7\u00E3o', options: [
|
|
2896
|
+
{ value: '0', label: 'Resumido' },
|
|
2897
|
+
{ value: '1', label: 'Detalhado' },
|
|
2898
|
+
], className: 'text-sm font-normal', classNameOptions: 'flex flex-col gap-4 mt-4 text-sm font-normal' }), jsxRuntime.jsx(FormRadioGroup, { control: control, name: 'format', label: 'Selecione o formato desejado para exporta\u00E7\u00E3o', options: [
|
|
2899
|
+
{ value: '0', label: 'PDF' },
|
|
2900
|
+
{ value: '1', label: 'XLSX' },
|
|
2901
|
+
], className: 'text-sm font-normal', classNameOptions: 'flex flex-col gap-4 mt-4 text-sm font-normal' })] }), jsxRuntime.jsxs(DialogFooter, { className: 'sm:justify-end gap-2', children: [jsxRuntime.jsx(Button, { type: 'button', variant: 'secondary', children: "Fechar" }), jsxRuntime.jsx(Button, { type: 'button', variant: 'default', onClick: () => exportXlSX(), children: "Exportar" })] })] })] }) }));
|
|
2902
|
+
}
|
|
2903
|
+
return null;
|
|
2904
|
+
};
|
|
2905
|
+
return exportData && renderExport();
|
|
2906
|
+
}
|
|
2907
|
+
|
|
2908
|
+
function DataTableFooter({ isLoading, totalRows, totalPages, currentPage, hidePagination, disablePagination, pagination, handlePageSize, handlePage, previousPage, nextPage, exportData, }) {
|
|
2909
|
+
const renderPaginationPages = () => {
|
|
2910
|
+
const paginationItems = [];
|
|
2911
|
+
const createPaginationItem = (pageIndex) => (jsxRuntime.jsx(PaginationItem, { children: jsxRuntime.jsx(PaginationLink, { onClick: () => handlePage(pageIndex), isActive: currentPage === pageIndex, children: pageIndex + 1 }) }, pageIndex));
|
|
2912
|
+
// Add first page
|
|
2913
|
+
paginationItems.push(createPaginationItem(0));
|
|
2914
|
+
// Add ellipsis if needed
|
|
2915
|
+
if (currentPage > 2) {
|
|
2916
|
+
paginationItems.push(jsxRuntime.jsx(PaginationEllipsis, {}, 'start-ellipsis'));
|
|
2917
|
+
}
|
|
2918
|
+
// Add pages before current page
|
|
2919
|
+
for (let i = Math.max(1, currentPage - 1); i < currentPage; i++) {
|
|
2920
|
+
paginationItems.push(createPaginationItem(i));
|
|
2921
|
+
}
|
|
2922
|
+
// Add current page
|
|
2923
|
+
if (currentPage !== 0 && currentPage !== totalPages - 1) {
|
|
2924
|
+
paginationItems.push(createPaginationItem(currentPage));
|
|
2925
|
+
}
|
|
2926
|
+
// Add pages after current page
|
|
2927
|
+
for (let i = currentPage + 1; i <= Math.min(totalPages - 2, currentPage + 1); i++) {
|
|
2928
|
+
paginationItems.push(createPaginationItem(i));
|
|
2929
|
+
}
|
|
2930
|
+
// Add ellipsis if needed
|
|
2931
|
+
if (currentPage < totalPages - 3) {
|
|
2932
|
+
paginationItems.push(jsxRuntime.jsx(PaginationEllipsis, {}, 'end-ellipsis'));
|
|
2933
|
+
}
|
|
2934
|
+
// Add last page
|
|
2935
|
+
if (totalPages > 1) {
|
|
2936
|
+
paginationItems.push(createPaginationItem(totalPages - 1));
|
|
2937
|
+
}
|
|
2938
|
+
return paginationItems;
|
|
2939
|
+
};
|
|
2940
|
+
return (!hidePagination && (jsxRuntime.jsxs("footer", { className: 'flex items-center justify-between h-[64px]', children: [jsxRuntime.jsxs("div", { className: 'flex flex-row items-center gap-6', children: [jsxRuntime.jsxs("div", { className: 'flex flex-row items-center gap-2', children: ["Linhas por p\u00E1gina", jsxRuntime.jsxs(Select, { value: pagination.pageSize.toString(), onValueChange: (value) => handlePageSize(Number(value)), disabled: isLoading || disablePagination, children: [jsxRuntime.jsx(SelectTrigger, { className: 'w-20', children: jsxRuntime.jsx(SelectValue, { placeholder: '', className: 'text-slate-800 font-medium' }) }), jsxRuntime.jsx(SelectContent, { children: jsxRuntime.jsxs(SelectGroup, { children: [jsxRuntime.jsx(SelectItem, { value: '25', children: "25" }), jsxRuntime.jsx(SelectItem, { value: '50', children: "50" }), jsxRuntime.jsx(SelectItem, { value: '100', children: "100" })] }) })] })] }), jsxRuntime.jsx(DataTableExport, { exportData: exportData, totalRows: totalPages })] }), jsxRuntime.jsxs("div", { className: 'flex items-center gap-4', children: [jsxRuntime.jsx("div", { children: !isLoading && (jsxRuntime.jsx(Badge, { variant: 'secondary', children: totalRows === 0 ? 'Nenhum item' : totalRows === 1 ? '1 item' : `${totalRows} itens` })) }), jsxRuntime.jsx("div", { children: jsxRuntime.jsx(Pagination, { children: jsxRuntime.jsxs(PaginationContent, { children: [jsxRuntime.jsx(PaginationItem, { children: jsxRuntime.jsx(PaginationPrevious, { onClick: () => previousPage.action(), disabled: previousPage.disabled || disablePagination }) }), renderPaginationPages(), jsxRuntime.jsx(PaginationItem, { children: jsxRuntime.jsx(PaginationNext, { onClick: () => nextPage.action(), disabled: nextPage.disabled || disablePagination }) })] }) }) })] })] })));
|
|
2941
|
+
}
|
|
2942
|
+
|
|
2943
|
+
function DataTableHeader({ table, canActionsRow, enableMultiRowSelection }) {
|
|
2944
|
+
const headerGroups = table.getHeaderGroups();
|
|
2945
|
+
return (jsxRuntime.jsx(TableHeader, { children: headerGroups.map((headerGroup) => (jsxRuntime.jsxs(TableRow, { className: 'bg-background dark:bg-datatable-accent rounded-t-md sticky top-0 z-10', children: [enableMultiRowSelection && (jsxRuntime.jsx(TableHead, { className: 'h-[65px] w-6', children: jsxRuntime.jsx(Checkbox, { checked: table.getIsAllPageRowsSelected() || (table.getIsSomePageRowsSelected() && 'indeterminate'), onCheckedChange: (value) => table.toggleAllPageRowsSelected(!!value) }) })), headerGroup.headers.map((header) => (jsxRuntime.jsx(TableHead, { className: cn('h-[65px] whitespace-nowrap', header.column.id === 'id' ? 'sticky left-0 z-20' : '', header.column.columnDef.enableSorting ? 'pl-2' : ''), children: header.column.columnDef.enableSorting ? (jsxRuntime.jsxs(Button, { variant: 'ghost', onClick: () => header.column.toggleSorting(header.column.getIsSorted() === 'asc'), children: [reactTable.flexRender(header.column.columnDef.header, header.getContext()), header.column.getIsSorted() === 'asc' ? (jsxRuntime.jsx(lucideReact.MoveUp, { className: 'ml-2 h-4 w-4' })) : header.column.getIsSorted() === 'desc' ? (jsxRuntime.jsx(lucideReact.MoveDown, { className: 'ml-2 h-4 w-4' })) : (jsxRuntime.jsx(lucideReact.ArrowUpDown, { className: 'ml-2 h-4 w-4' }))] })) : (reactTable.flexRender(header.column.columnDef.header, header.getContext())) }, header.id))), canActionsRow && jsxRuntime.jsx(TableHead, {})] }, headerGroup.id))) }));
|
|
2946
|
+
}
|
|
2947
|
+
|
|
2948
|
+
function DataTableRows({ table, isLoading, columns, actionsRow, textNoRecords, enableMultiRowSelection }) {
|
|
2949
|
+
const rows = table.getRowModel().rows;
|
|
2950
|
+
const renderLoadingRows = () => {
|
|
2951
|
+
const rows = [];
|
|
2952
|
+
for (let i = 0; i < 10; i++) {
|
|
2953
|
+
rows.push(jsxRuntime.jsxs(TableRow, { children: [enableMultiRowSelection && (jsxRuntime.jsx(TableCell, { className: 'py-2', children: jsxRuntime.jsx(Skeleton, { className: 'h-10 w-full' }) })), columns.map((column) => (jsxRuntime.jsx(TableCell, { className: 'py-2', children: jsxRuntime.jsx(Skeleton, { className: 'h-10 w-full' }) }, column.id)))] }, `loading-row-${i}`));
|
|
2954
|
+
}
|
|
2955
|
+
return rows;
|
|
2956
|
+
};
|
|
2957
|
+
const renderRows = () => {
|
|
2958
|
+
return rows.map((row) => (jsxRuntime.jsxs(TableRow, { "data-state": row.getIsSelected() && 'selected', className: 'group', children: [enableMultiRowSelection && (jsxRuntime.jsx(TableCell, { className: 'py-4', children: jsxRuntime.jsx(Checkbox, { checked: row.getIsSelected(), onCheckedChange: (value) => row.toggleSelected(!!value), "aria-label": 'Select row' }) })), row.getVisibleCells().map((cell) => (jsxRuntime.jsx(TableCell, { className: 'py-4', children: reactTable.flexRender(cell.column.columnDef.cell, cell.getContext()) }, cell.id))), actionsRow && (jsxRuntime.jsx(TableCell, { className: 'opacity-0 group-hover:opacity-100 hover:opacity-100 relative overflow-visible w-[0px]', children: jsxRuntime.jsx("div", { className: 'absolute transition-colors group-hover:bg-datatable-accent overflow-visible right-5 -translate-y-1/2 flex space-x-4', children: actionsRow.map((action, index) => (jsxRuntime.jsxs(Button, { variant: action.variant || 'default', className: cn('bg-datatable-accent', action.className?.(row.original) || ''), onClick: () => action.onClick?.(row.original), disabled: action.disabled?.(row.original) || false, children: [action.icon, action.label] }, `action-row-${index}`))) }) }, `buttons-${row.id}`))] }, row.id)));
|
|
2959
|
+
};
|
|
2960
|
+
const renderEmptyRows = () => {
|
|
2961
|
+
const colSpan = columns.length + (actionsRow ? 1 : 0);
|
|
2962
|
+
return (jsxRuntime.jsx(TableRow, { children: jsxRuntime.jsx(TableCell, { colSpan: colSpan, className: 'text-center h-[53px]', children: textNoRecords ? textNoRecords : 'Sem resultados.' }) }));
|
|
2963
|
+
};
|
|
2964
|
+
return isLoading ? renderLoadingRows() : rows.length ? renderRows() : renderEmptyRows();
|
|
2965
|
+
}
|
|
2966
|
+
|
|
2967
|
+
function DataTable({ columns, data, className, title, rowsPage, actions, actionsRow, customFilters, setSearch, pageChanged, pageSizeChanged, totalRows, filtersActions, exportData, textNoRecords, heightRemainingScroll, hideFilterField, multiRowSelection, hidePagination, disablePagination, isLoading, fixedHeight, }) {
|
|
2968
|
+
const [sorting, setSorting] = React.useState([]);
|
|
2969
|
+
const [pagination, setPagination] = React.useState({
|
|
2970
|
+
pageIndex: 0,
|
|
2971
|
+
pageSize: rowsPage ?? 25,
|
|
2972
|
+
});
|
|
2973
|
+
const enableMultiRowSelection = multiRowSelection !== undefined;
|
|
2974
|
+
const [rowSelection, setRowSelection] = React.useState(enableMultiRowSelection
|
|
2975
|
+
? Object.fromEntries((Array.isArray(data) ? data : []).map((row, idx) => {
|
|
2976
|
+
return [idx, row.checked];
|
|
2977
|
+
}))
|
|
2978
|
+
: {});
|
|
2979
|
+
const debounceTimeout = React.useRef(null);
|
|
2980
|
+
const tableContainerRef = React.useRef(null);
|
|
2981
|
+
const [tableHeight, setTableHeight] = React.useState('auto');
|
|
2982
|
+
totalRows = totalRows ?? data.length;
|
|
2983
|
+
const table = reactTable.useReactTable({
|
|
2984
|
+
manualPagination: true,
|
|
2985
|
+
data: data,
|
|
2986
|
+
columns,
|
|
2987
|
+
getPaginationRowModel: reactTable.getPaginationRowModel(),
|
|
2988
|
+
onPaginationChange: setPagination,
|
|
2989
|
+
getCoreRowModel: reactTable.getCoreRowModel(),
|
|
2990
|
+
onSortingChange: setSorting,
|
|
2991
|
+
getSortedRowModel: reactTable.getSortedRowModel(),
|
|
2992
|
+
getFilteredRowModel: reactTable.getFilteredRowModel(),
|
|
2993
|
+
onRowSelectionChange: (rowSelection) => {
|
|
2994
|
+
setRowSelection(rowSelection);
|
|
2995
|
+
},
|
|
2996
|
+
enableMultiRowSelection: enableMultiRowSelection,
|
|
2997
|
+
state: { pagination, rowSelection, sorting },
|
|
2998
|
+
pageCount: Math.ceil(totalRows / pagination.pageSize),
|
|
2999
|
+
});
|
|
3000
|
+
const totalPages = table.getPageCount();
|
|
3001
|
+
const currentPage = table.getState().pagination.pageIndex;
|
|
3002
|
+
const selectedRows = table.getSelectedRowModel().rows;
|
|
3003
|
+
const selectedIds = selectedRows.map((row) => row.original.id);
|
|
3004
|
+
React.useEffect(() => {
|
|
3005
|
+
if (data.length === 0 && pagination.pageIndex > 0) {
|
|
3006
|
+
setPagination({ ...pagination, pageIndex: 0 });
|
|
3007
|
+
}
|
|
3008
|
+
}, [data]);
|
|
3009
|
+
React.useEffect(() => {
|
|
3010
|
+
handleResize();
|
|
3011
|
+
window.addEventListener('resize', handleResize);
|
|
3012
|
+
return () => {
|
|
3013
|
+
window.removeEventListener('resize', handleResize);
|
|
3014
|
+
};
|
|
3015
|
+
}, []);
|
|
3016
|
+
React.useEffect(() => {
|
|
3017
|
+
if (pageChanged)
|
|
3018
|
+
pageChanged(pagination.pageIndex + 1);
|
|
3019
|
+
}, [pagination]);
|
|
3020
|
+
React.useEffect(() => {
|
|
3021
|
+
const selectedRowsChecked = selectedRows.map((row) => row.original);
|
|
3022
|
+
if (multiRowSelection && selectedRowsChecked.length > 0) {
|
|
3023
|
+
multiRowSelection.callback(selectedRowsChecked);
|
|
3024
|
+
}
|
|
3025
|
+
}, [rowSelection]);
|
|
3026
|
+
const handleResize = () => {
|
|
3027
|
+
if (tableContainerRef.current) {
|
|
3028
|
+
const newHeight = window.innerHeight - tableContainerRef.current.getBoundingClientRect().top - (hidePagination ? 30 : 74);
|
|
3029
|
+
setTableHeight(`${newHeight - (heightRemainingScroll ?? 0)}px`);
|
|
3030
|
+
}
|
|
3031
|
+
};
|
|
3032
|
+
const handleSearchChange = (event) => {
|
|
3033
|
+
const value = event.currentTarget.value;
|
|
3034
|
+
if (debounceTimeout.current) {
|
|
3035
|
+
clearTimeout(debounceTimeout.current);
|
|
3036
|
+
}
|
|
3037
|
+
debounceTimeout.current = setTimeout(() => {
|
|
3038
|
+
setSearch?.(value);
|
|
3039
|
+
handlePage(0);
|
|
3040
|
+
}, 300);
|
|
3041
|
+
};
|
|
3042
|
+
const handlePageSize = (value) => {
|
|
3043
|
+
pageSizeChanged?.(value);
|
|
3044
|
+
setPagination({ pageIndex: 0, pageSize: value });
|
|
3045
|
+
};
|
|
3046
|
+
const handlePage = (index) => {
|
|
3047
|
+
if (index !== currentPage) {
|
|
3048
|
+
setPagination({ ...pagination, pageIndex: index });
|
|
3049
|
+
}
|
|
3050
|
+
};
|
|
3051
|
+
return (jsxRuntime.jsxs("div", { className: 'flex flex-col flex-1', children: [(!hideFilterField || filtersActions || customFilters || actions) && (jsxRuntime.jsxs("div", { className: 'flex items-end justify-between mb-4 space-x-6', children: [jsxRuntime.jsxs("div", { className: 'flex items-center gap-x-4', children: [!hideFilterField && (jsxRuntime.jsxs("div", { className: 'flex bg-background items-center border border-slate-300 rounded-sm w-[350px] overflow-hidden focus-within:outline-none focus-within:ring-2 focus-within:ring-ring focus-within:ring-offset-2 group', children: [jsxRuntime.jsx("div", { className: 'pl-3.5 transform transition-transform duration-300 group-hover:-translate-x-1', children: jsxRuntime.jsx(lucideReact.Search, { size: 18, className: 'w-5 h-5 stroke-zinc-500 dark:stroke-default' }) }), jsxRuntime.jsx("input", { placeholder: 'Buscar', onKeyUp: (event) => {
|
|
3052
|
+
handleSearchChange(event);
|
|
3053
|
+
}, className: 'w-full bg-background text-default border-none focus:ring-0 focus:outline-none px-3 py-2 transform transition-transform duration-300 group-hover:-translate-x-1 ' })] })), filtersActions && (jsxRuntime.jsxs(Sheet, { open: filtersActions.filterOpen, onOpenChange: filtersActions.setFilterOpen, children: [jsxRuntime.jsx(SheetTrigger, { asChild: true, children: jsxRuntime.jsxs(Button, { variant: 'secondary', type: 'button', children: [jsxRuntime.jsx(lucideReact.Filter, { size: 20, className: 'h-4 w-4' }), " Filtros", filtersActions.countFilters > 0 && (jsxRuntime.jsx("div", { className: 'bg-background-primary text-white rounded-full h-5 w-5 flex items-center justify-center text-sm placeholder:text-muted-foreground', children: filtersActions.countFilters }))] }) }), jsxRuntime.jsxs(SheetContent, { children: [jsxRuntime.jsxs(SheetHeader, { children: [jsxRuntime.jsx(SheetTitle, { children: "Filtros" }), jsxRuntime.jsx(SheetDescription, {})] }), jsxRuntime.jsx("div", { className: 'flex flex-col py-6', children: filtersActions.fields })] })] }))] }), customFilters, jsxRuntime.jsx("div", { className: 'flex space-x-4 content-end', children: actions?.map((action, index) => (jsxRuntime.jsx("div", { children: jsxRuntime.jsxs(Button, { onClick: () => action.onClick?.(selectedIds, selectedRows), className: cn(action.className, action.hideUnselectedRows && selectedRows.length === 0 ? 'hidden' : ''), variant: action.variant || 'default', disabled: action.disabled, children: [jsxRuntime.jsx("div", { className: '[&_svg]:size-5', children: action.icon }), action.label] }) }, `action-table-${index}`))) })] })), jsxRuntime.jsxs("div", { className: `flex-1 flex flex-col rounded-md border ${className}`, children: [jsxRuntime.jsx("div", { className: 'flex items-center justify-between', children: title && jsxRuntime.jsx("div", { className: 'text-h4 p-4', children: title }) }), jsxRuntime.jsx("div", { id: 'data-table', ref: tableContainerRef, style: fixedHeight ? { height: fixedHeight } : { height: tableHeight }, className: 'flex flex-col justify-between rounded-md overflow-x-auto overflow-y-auto', children: jsxRuntime.jsxs(Table, { children: [jsxRuntime.jsx(DataTableHeader, { table: table, canActionsRow: actionsRow && actionsRow.length > 0, enableMultiRowSelection: enableMultiRowSelection }), jsxRuntime.jsx(TableBody, { className: 'bg-background', children: jsxRuntime.jsx(DataTableRows, { table: table, columns: columns, isLoading: isLoading, actionsRow: actionsRow, textNoRecords: textNoRecords, enableMultiRowSelection: enableMultiRowSelection }) })] }) })] }), jsxRuntime.jsx(DataTableFooter, { hidePagination: hidePagination, disablePagination: disablePagination, isLoading: isLoading, totalRows: totalRows, totalPages: totalPages, currentPage: currentPage, pagination: pagination, handlePageSize: handlePageSize, handlePage: handlePage, previousPage: { action: () => table.previousPage(), disabled: !table.getCanPreviousPage() }, nextPage: { action: () => table.nextPage(), disabled: !table.getCanNextPage() }, exportData: exportData })] }));
|
|
3054
|
+
}
|
|
3055
|
+
|
|
3056
|
+
const SidebarItemTwoLines = ({ item }) => {
|
|
3057
|
+
return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx("div", { className: '[&_svg]:size-4 text-white', children: item.iconLeft }), jsxRuntime.jsxs("div", { className: 'grid flex-1 text-left text-sm leading-tight', children: [jsxRuntime.jsx("span", { className: 'truncate font-semibold', children: item.title }), jsxRuntime.jsx("span", { className: 'truncate text-xs text-foreground', children: item.subTitle })] }), item.iconRight] }));
|
|
3058
|
+
};
|
|
3059
|
+
|
|
3060
|
+
const ModuleSwitcher = ({ modules, activeModule, onModuleChange, }) => {
|
|
3061
|
+
const { isMobile } = useSidebar();
|
|
3062
|
+
return (jsxRuntime.jsx(SidebarMenu, { children: jsxRuntime.jsx(SidebarMenuItem, { children: jsxRuntime.jsxs(DropdownMenu, { children: [jsxRuntime.jsx(DropdownMenuTrigger, { asChild: true, children: jsxRuntime.jsx(SidebarMenuButton, { size: 'lg', className: 'data-[state=open]:bg-sidebar-accent data-[state=open]:text-sidebar-accent-foreground', children: jsxRuntime.jsx(SidebarItemTwoLines, { item: {
|
|
3063
|
+
iconLeft: (jsxRuntime.jsx("div", { className: 'flex p-[7.6px] items-center rounded-md bg-background-primary', children: activeModule?.icon })),
|
|
3064
|
+
title: activeModule?.title ?? '',
|
|
3065
|
+
subTitle: activeModule?.subTitle ?? '',
|
|
3066
|
+
iconRight: jsxRuntime.jsx(lucideReact.ChevronsUpDown, { size: 16 }),
|
|
3067
|
+
} }) }) }), jsxRuntime.jsx(DropdownMenuContent, { className: 'w-[250px] rounded-lg', align: 'start', side: isMobile ? 'bottom' : 'right', sideOffset: 4, children: modules.map((module) => (jsxRuntime.jsx(DropdownMenuItem, { onClick: () => onModuleChange?.(module), className: 'gap-2 p-2', children: jsxRuntime.jsx(SidebarItemTwoLines, { item: {
|
|
3068
|
+
iconLeft: jsxRuntime.jsx("div", { className: 'flex p-[7.6px] items-center rounded-md bg-background-primary', children: module.icon }),
|
|
3069
|
+
title: module.title,
|
|
3070
|
+
subTitle: module.subTitle,
|
|
3071
|
+
iconRight: activeModule?.value === module.value ? jsxRuntime.jsx(lucideReact.Check, { size: 16 }) : null,
|
|
3072
|
+
} }) }, `module-switcher-${module.value}`))) })] }) }) }));
|
|
3073
|
+
};
|
|
3074
|
+
|
|
3075
|
+
const SidebarButton = ({ item, selectedRoute, onClick }) => {
|
|
3076
|
+
return (jsxRuntime.jsx(SidebarMenuButton, { asChild: true, className: cn('data-[state=open]:bg-sidebar-accent data-[state=open]:text-sidebar-accent-foreground hover:bg-sidebar-accent px-2 py-5 gap-3 cursor-pointer', selectedRoute?.includes(item.path) ? 'bg-sidebar-accent' : ''), tooltip: item.title, onClick: () => onClick?.(item.module ?? null, item.path), children: jsxRuntime.jsxs("div", { children: [jsxRuntime.jsx("div", { className: '[&_svg]:size-4 text-sidebar-foreground', children: item.icon }), jsxRuntime.jsx("span", { children: item.title })] }) }));
|
|
3077
|
+
};
|
|
3078
|
+
|
|
3079
|
+
const SidebarItem = ({ item, selectedRoute, onClick }) => {
|
|
3080
|
+
return (jsxRuntime.jsx(SidebarMenuItem, { children: jsxRuntime.jsx(SidebarButton, { item: item, selectedRoute: selectedRoute, onClick: onClick }) }));
|
|
3081
|
+
};
|
|
3082
|
+
|
|
3083
|
+
const NavFooter = ({ pages }) => {
|
|
3084
|
+
const navigate = reactRouterDom.useNavigate();
|
|
3085
|
+
const location = reactRouterDom.useLocation();
|
|
3086
|
+
const selectedRoutePath = location.pathname;
|
|
3087
|
+
return (jsxRuntime.jsx(SidebarGroup, { className: 'p-0', children: jsxRuntime.jsx(SidebarGroupContent, { children: jsxRuntime.jsx(SidebarMenu, { children: pages.map((item) => {
|
|
3088
|
+
return (jsxRuntime.jsx(SidebarItem, { item: item, selectedRoute: selectedRoutePath, onClick: () => navigate(item.path) }, `sidebar-menu-main-${item.path}`));
|
|
3089
|
+
}) }) }) }));
|
|
3090
|
+
};
|
|
3091
|
+
|
|
3092
|
+
const NavSubmenuCollapsible = ({ item, selectedRoute, onClick }) => {
|
|
3093
|
+
const { open, toggleSidebar } = useSidebar();
|
|
3094
|
+
const isOpen = () => {
|
|
3095
|
+
return selectedRoute?.includes(item.path) ?? false;
|
|
3096
|
+
};
|
|
3097
|
+
const handleToggleSidebar = () => {
|
|
3098
|
+
if (!open)
|
|
3099
|
+
toggleSidebar();
|
|
3100
|
+
};
|
|
3101
|
+
return (jsxRuntime.jsx(SidebarMenu, { children: jsxRuntime.jsx(Collapsible, { asChild: true, defaultOpen: isOpen(), children: jsxRuntime.jsxs(SidebarMenuItem, { children: [jsxRuntime.jsx(CollapsibleTrigger, { asChild: true, className: 'group/collapsible', children: jsxRuntime.jsxs(SidebarMenuButton, { tooltip: item.title, className: 'px-2 py-5 gap-3', onClick: () => handleToggleSidebar(), children: [item.icon, jsxRuntime.jsx("span", { children: item.title }), jsxRuntime.jsx(lucideReact.ChevronRight, { className: 'ml-auto transition-transform duration-200 group-data-[state=open]/collapsible:rotate-90' })] }) }), jsxRuntime.jsx(CollapsibleContent, { children: jsxRuntime.jsx(SidebarMenuSub, { children: item.subMenuItems
|
|
3102
|
+
?.map((subItem) => (jsxRuntime.jsx(SidebarMenuSubItem, { children: jsxRuntime.jsx(SidebarMenuSubButton, { asChild: true, onClick: () => onClick(subItem.path), "aria-disabled": subItem.disabled, children: jsxRuntime.jsx("div", { className: cn('cursor-pointer px-2 py-1 items-center self-stretch', selectedRoute === subItem.path ? 'bg-sidebar-accent' : ''), children: jsxRuntime.jsx("span", { children: subItem.label }) }) }) }, subItem.label))) }) })] }) }, item.title) }));
|
|
3103
|
+
};
|
|
3104
|
+
|
|
3105
|
+
const NavSubmenuDropdown = ({ cols, item, selectedRoute, onClick }) => {
|
|
3106
|
+
return (jsxRuntime.jsx(SidebarMenuItem, { children: jsxRuntime.jsxs(DropdownMenu, { children: [jsxRuntime.jsx(DropdownMenuTrigger, { asChild: true, children: jsxRuntime.jsx(SidebarMenuButton, { asChild: true, className: cn('data-[state=open]:bg-sidebar-accent data-[state=open]:text-sidebar-accent-foreground hover:bg-sidebar-accent px-2 py-5 gap-3 cursor-pointer', selectedRoute?.includes(item.path) ? 'bg-sidebar-accent' : ''), tooltip: item.title, children: jsxRuntime.jsxs("div", { children: [item.icon, jsxRuntime.jsx("span", { children: item.title }), jsxRuntime.jsx(lucideReact.ChevronRight, { className: 'ml-auto' })] }) }) }), jsxRuntime.jsx(DropdownMenuContent, { className: `grid grid-cols-${cols ?? '1'} gap-4 p-4`, align: 'start', side: 'right', sideOffset: 4, children: item.subMenuItems
|
|
3107
|
+
?.map((subItem, index) => (jsxRuntime.jsxs(DropdownMenuItem, { className: cn('flex flex-col items-start text-left max-w-[220px] gap-1 cursor-pointer', selectedRoute === subItem.path ? 'bg-sidebar-accent' : ''), onClick: () => onClick(subItem.path), disabled: subItem.disabled, children: [jsxRuntime.jsx("div", { className: 'text-sm font-semibold', children: subItem.label }), jsxRuntime.jsx("div", { className: 'text-sm text-muted-foreground', children: subItem.description })] }, `${index}`))) })] }) }));
|
|
3108
|
+
};
|
|
3109
|
+
|
|
3110
|
+
const SidebarSubmenuType = {
|
|
3111
|
+
COLLAPSIBLE: 'collapsible',
|
|
3112
|
+
// Deprecated: Use COLLAPSIBLE instead
|
|
3113
|
+
DROPDOWN: 'dropdown',
|
|
3114
|
+
};
|
|
3115
|
+
|
|
3116
|
+
const NavMain = ({ pages }) => {
|
|
3117
|
+
const navigate = reactRouterDom.useNavigate();
|
|
3118
|
+
const location = reactRouterDom.useLocation();
|
|
3119
|
+
const isMobile = useIsMobile();
|
|
3120
|
+
const selectedRoutePath = location.pathname;
|
|
3121
|
+
return (jsxRuntime.jsx(SidebarGroup, { children: jsxRuntime.jsx(SidebarGroupContent, { children: jsxRuntime.jsx(SidebarMenu, { children: pages.map((item) => {
|
|
3122
|
+
if (item.subMenuType) {
|
|
3123
|
+
if (item.subMenuType === SidebarSubmenuType.COLLAPSIBLE || isMobile) {
|
|
3124
|
+
return (jsxRuntime.jsx(NavSubmenuCollapsible, { item: item, selectedRoute: selectedRoutePath, onClick: (path) => navigate(path) }, `sidebar-submenu-collapsible-${item.path}`));
|
|
3125
|
+
}
|
|
3126
|
+
// Deprecated: Use COLLAPSIBLE instead
|
|
3127
|
+
if (item.subMenuType === SidebarSubmenuType.DROPDOWN) {
|
|
3128
|
+
return (jsxRuntime.jsx(NavSubmenuDropdown, { item: item, selectedRoute: selectedRoutePath, onClick: (path) => navigate(path), cols: 3 }, `sidebar-submenu-dropdown-${item.path}`));
|
|
3129
|
+
}
|
|
3130
|
+
}
|
|
3131
|
+
return (jsxRuntime.jsx(SidebarItem, { item: item, selectedRoute: selectedRoutePath, onClick: () => navigate(item.path) }, `sidebar-menu-main-${item.path}`));
|
|
3132
|
+
}) }) }) }));
|
|
3133
|
+
};
|
|
3134
|
+
|
|
3135
|
+
const NavUser = ({ userName, userEmail, userInitials, callbackLogout }) => {
|
|
3136
|
+
const [isLoggingOut, setIsLoggingOut] = React.useState(false);
|
|
3137
|
+
const { isMobile } = useSidebar();
|
|
3138
|
+
const handleLogout = () => {
|
|
3139
|
+
setIsLoggingOut(true);
|
|
3140
|
+
setTimeout(() => {
|
|
3141
|
+
callbackLogout();
|
|
3142
|
+
}, 1000);
|
|
3143
|
+
};
|
|
3144
|
+
return (jsxRuntime.jsx(SidebarMenu, { children: jsxRuntime.jsx(SidebarMenuItem, { children: jsxRuntime.jsxs(DropdownMenu, { children: [jsxRuntime.jsx(DropdownMenuTrigger, { asChild: true, children: jsxRuntime.jsx(SidebarMenuButton, { size: 'lg', className: 'data-[state=open]:bg-sidebar-accent data-[state=open]:text-sidebar-accent-foreground', children: jsxRuntime.jsx(SidebarItemTwoLines, { item: {
|
|
3145
|
+
iconLeft: (jsxRuntime.jsxs(Avatar, { className: 'h-[31px] w-[31px] rounded-md', children: [jsxRuntime.jsx(AvatarImage, { src: userInitials, alt: userName }), jsxRuntime.jsx(AvatarFallback, { className: 'rounded-md bg-background-primary text-white', children: userInitials })] })),
|
|
3146
|
+
title: isLoggingOut ? 'Saindo...' : userName,
|
|
3147
|
+
subTitle: isLoggingOut ? '' : userEmail,
|
|
3148
|
+
iconRight: isLoggingOut ? (jsxRuntime.jsx(lucideReact.LoaderCircle, { size: 16, className: 'text-sidebar-foreground animate-spin mr-2' })) : (jsxRuntime.jsx(lucideReact.LogOut, { size: 16, className: 'text-sidebar-foreground' })),
|
|
3149
|
+
} }) }) }), jsxRuntime.jsxs(DropdownMenuContent, { className: 'w-[250px] rounded-lg', side: isMobile ? 'bottom' : 'right', align: 'end', sideOffset: 4, children: [jsxRuntime.jsx(DropdownMenuLabel, { className: 'p-0 font-normal', children: jsxRuntime.jsxs("div", { className: 'flex items-center gap-2 px-1 py-1.5 text-left text-sm', children: [jsxRuntime.jsxs(Avatar, { className: 'h-8 w-8 rounded-lg', children: [jsxRuntime.jsx(AvatarImage, { src: userInitials, alt: userName }), jsxRuntime.jsx(AvatarFallback, { className: 'rounded-lg bg-background-primary text-white', children: userInitials })] }), jsxRuntime.jsxs("div", { className: 'grid flex-1 text-left text-sm leading-tight', children: [jsxRuntime.jsx("span", { className: 'truncate font-semibold', children: userName }), jsxRuntime.jsx("span", { className: 'truncate text-xs', children: userEmail })] })] }) }), jsxRuntime.jsx(DropdownMenuItem, { className: 'p-0 font-normal cursor-pointer', onClick: () => handleLogout(), children: jsxRuntime.jsxs("div", { className: 'flex items-center gap-2 px-1 py-1.5 text-left text-sm', children: [jsxRuntime.jsx("div", { className: 'flex w-8 h-8 p-2 items-center rounded-md', children: jsxRuntime.jsx(lucideReact.LogOut, { size: 16 }) }), "Log out"] }) })] })] }) }) }));
|
|
3150
|
+
};
|
|
3151
|
+
|
|
3152
|
+
const Header = ({ splittedPath, modules, pages, isLoading, combobox, }) => {
|
|
3153
|
+
const { portalDefinitions } = useTheme();
|
|
3154
|
+
const navigate = reactRouterDom.useNavigate();
|
|
3155
|
+
const refProgressLoading = React.useRef(null);
|
|
3156
|
+
const lastPage = splittedPath[splittedPath.length - 1];
|
|
3157
|
+
React.useEffect(() => {
|
|
3158
|
+
isLoading ? refProgressLoading.current?.start() : refProgressLoading.current?.complete();
|
|
3159
|
+
}, [isLoading]);
|
|
3160
|
+
const setRouter = (path) => {
|
|
3161
|
+
navigate(path);
|
|
3162
|
+
};
|
|
3163
|
+
const getPath = (index) => {
|
|
3164
|
+
let path = '';
|
|
3165
|
+
for (let i = 0; i <= index; i++) {
|
|
3166
|
+
path += `/${splittedPath[i]}`;
|
|
3167
|
+
}
|
|
3168
|
+
return path;
|
|
3169
|
+
};
|
|
3170
|
+
const getLinkSidebar = (index) => {
|
|
3171
|
+
return pages.find((item) => item.path === getPath(index));
|
|
3172
|
+
};
|
|
3173
|
+
const getSubMenuItem = (index) => {
|
|
3174
|
+
return pages.flatMap((item) => item.subMenuItems || []).find((sub) => sub.path === getPath(index));
|
|
3175
|
+
};
|
|
3176
|
+
const getModule = (page) => {
|
|
3177
|
+
const module = modules.find((mod) => mod.value === page);
|
|
3178
|
+
if (!module) {
|
|
3179
|
+
return page;
|
|
3180
|
+
}
|
|
3181
|
+
return module?.title;
|
|
3182
|
+
};
|
|
3183
|
+
const getTitle = (index) => {
|
|
3184
|
+
const linkSidebar = getLinkSidebar(index);
|
|
3185
|
+
const subMenuItem = getSubMenuItem(index);
|
|
3186
|
+
if (subMenuItem) {
|
|
3187
|
+
return subMenuItem.label;
|
|
3188
|
+
}
|
|
3189
|
+
return linkSidebar?.title;
|
|
3190
|
+
};
|
|
3191
|
+
const renderBreadcrumbPage = (index) => {
|
|
3192
|
+
return jsxRuntime.jsx(BreadcrumbPage, { children: getTitle(index) });
|
|
3193
|
+
};
|
|
3194
|
+
const renderBreadcrumbLink = (page, index) => {
|
|
3195
|
+
const linkSidebar = getLinkSidebar(index);
|
|
3196
|
+
return linkSidebar?.subMenuType ? (renderBreadcrumbPage(index)) : (jsxRuntime.jsx(BreadcrumbLink, { onClick: () => setRouter(getPath(index)), className: 'cursor-pointer', children: index === 0 ? getModule(page) : getTitle(index) }));
|
|
3197
|
+
};
|
|
3198
|
+
const renderBreadcrumbItens = () => {
|
|
3199
|
+
const breadcrumbItems = [];
|
|
3200
|
+
splittedPath.map((page, index) => {
|
|
3201
|
+
breadcrumbItems.push(jsxRuntime.jsx(BreadcrumbItem, { children: page === lastPage ? renderBreadcrumbPage(index) : renderBreadcrumbLink(page, index) }, `breadcrumb-item-${index}`));
|
|
3202
|
+
if (page !== lastPage) {
|
|
3203
|
+
breadcrumbItems.push(jsxRuntime.jsx(BreadcrumbSeparator, { className: 'mt-[1px]' }, `breadcrumb-separator-${index}`));
|
|
3204
|
+
}
|
|
3205
|
+
});
|
|
3206
|
+
return breadcrumbItems;
|
|
3207
|
+
};
|
|
3208
|
+
const getColorLoadingBar = () => {
|
|
3209
|
+
const colorShades = getTailwindColorShades();
|
|
3210
|
+
const tailwindColor = portalDefinitions?.mvnoPrimaryColor || DEFAULT_THEME_DATA.mvnoPrimaryColor;
|
|
3211
|
+
const isValidColor = (color) => color in colorShades;
|
|
3212
|
+
const colorPallete = isValidColor(tailwindColor) ? colorShades[tailwindColor] : colorShades.violet;
|
|
3213
|
+
return colorPallete[900];
|
|
3214
|
+
};
|
|
3215
|
+
return (jsxRuntime.jsxs("header", { className: 'flex flex-col justify-between items-center w-full', children: [jsxRuntime.jsxs("div", { className: 'flex justify-between items-center py-3 px-5 w-full', children: [jsxRuntime.jsxs("div", { className: 'flex items-center gap-x-2 h-[40px]', children: [jsxRuntime.jsx(SidebarTrigger, { className: 'p-5' }), jsxRuntime.jsx("div", { className: 'p-2', children: jsxRuntime.jsx(Breadcrumb, { children: jsxRuntime.jsx(BreadcrumbList, { children: renderBreadcrumbItens() }) }) })] }), jsxRuntime.jsx("div", { className: 'flex items-center', children: combobox })] }), jsxRuntime.jsx(LoadingBar, { ref: refProgressLoading, color: getColorLoadingBar(), height: 7 })] }));
|
|
3216
|
+
};
|
|
3217
|
+
|
|
3218
|
+
const LabelWithTitle = ({ title, value, value2, required, showCopyIcon = false, className, isLoading }) => {
|
|
3219
|
+
const handleCopy = () => {
|
|
3220
|
+
if (showCopyIcon && value) {
|
|
3221
|
+
navigator.clipboard.writeText(`${value}${value2 ?? ''}`);
|
|
3222
|
+
toast({
|
|
3223
|
+
title: `"${value}${value2 ?? ''}" foi copiado para a área de transferência.`,
|
|
3224
|
+
variant: 'success',
|
|
3225
|
+
});
|
|
3226
|
+
}
|
|
3227
|
+
};
|
|
3228
|
+
return (jsxRuntime.jsx("div", { className: cn('flex group', className), children: jsxRuntime.jsx("div", { className: cn('flex flex-col text-sm w-full', showCopyIcon ? 'p-1 rounded-md transition-colors group-hover:bg-sidebar-accent' : 'p-1'), children: jsxRuntime.jsxs("div", { className: 'relative', children: [jsxRuntime.jsxs("div", { className: 'flex items-center text-sm font-medium gap-0.5', children: [jsxRuntime.jsx("label", { className: 'text-default truncate', children: title }), required && jsxRuntime.jsx("div", { className: 'text-red-500 truncate', children: "*" })] }), jsxRuntime.jsx("div", { className: 'grid flex-1 items-center pt-1', children: isLoading ? jsxRuntime.jsx(Skeleton, { className: 'h-5 w-full rounded-lg' }) : jsxRuntime.jsx("div", { className: 'text-zinc-500 truncate', children: value }) }), value2 && (jsxRuntime.jsx("div", { className: 'grid flex-1 items-center pt-1', children: isLoading ? jsxRuntime.jsx(Skeleton, { className: 'h-5 w-full rounded-lg' }) : jsxRuntime.jsx("div", { className: 'text-zinc-500 truncate', children: value2 }) })), jsxRuntime.jsx("div", { className: cn('pr-1 absolute top-1/2 right-0 -translate-y-1/2 opacity-0 transition-opacity', showCopyIcon && 'group-hover:opacity-100'), children: jsxRuntime.jsx(TooltipProvider, { children: jsxRuntime.jsxs(Tooltip, { children: [jsxRuntime.jsx(TooltipTrigger, { asChild: true, children: jsxRuntime.jsx(Button, { variant: 'ghost', type: 'button', className: cn('p-1 h-8', !showCopyIcon && 'cursor-default'), onClick: handleCopy, children: jsxRuntime.jsx(lucideReact.Copy, { size: 16 }) }) }), jsxRuntime.jsx(TooltipContent, { children: "Copiar" })] }) }) })] }) }) }));
|
|
3229
|
+
};
|
|
3230
|
+
|
|
3231
|
+
const NotFound = () => {
|
|
3232
|
+
return (jsxRuntime.jsx("div", { className: "flex flex-col items-center justify-center h-screen bg-[url('/imgs/404.png')] bg-cover bg-no-repeat bg-center", children: jsxRuntime.jsxs("div", { className: 'flex flex-col items-center justify-center gap-8 w-[424px]', children: [jsxRuntime.jsxs("div", { className: 'flex flex-col items-center w-full', children: [jsxRuntime.jsx("div", { className: 'text-5xl font-extrabold', children: "404" }), jsxRuntime.jsx("div", { className: 'text-3xl font-semibold', children: "P\u00E1gina Indispon\u00EDvel" })] }), jsxRuntime.jsx("div", { className: 'flex text-center text-xl font-semibold text-zinc-500', children: "A p\u00E1gina que voc\u00EA est\u00E1 tentando acessar se encontra indispon\u00EDvel no momento, tente novamente mais tarde" }), jsxRuntime.jsx("div", { className: 'flex justify-center w-full', children: jsxRuntime.jsxs(Button, { onClick: () => {
|
|
3233
|
+
window.location.href = '/';
|
|
3234
|
+
}, className: '[&_svg]:size-5', children: [jsxRuntime.jsx(lucideReact.BarChart2, {}), "Voltar Para Inicial"] }) })] }) }));
|
|
3235
|
+
};
|
|
3236
|
+
|
|
3237
|
+
function isUUIDv4(str) {
|
|
3238
|
+
const uuidV4Regex = /^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i;
|
|
3239
|
+
return uuidV4Regex.test(str);
|
|
3240
|
+
}
|
|
3241
|
+
|
|
3242
|
+
function styleInject(css, ref) {
|
|
3243
|
+
if ( ref === void 0 ) ref = {};
|
|
3244
|
+
var insertAt = ref.insertAt;
|
|
3245
|
+
|
|
3246
|
+
if (typeof document === 'undefined') { return; }
|
|
3247
|
+
|
|
3248
|
+
var head = document.head || document.getElementsByTagName('head')[0];
|
|
3249
|
+
var style = document.createElement('style');
|
|
3250
|
+
style.type = 'text/css';
|
|
3251
|
+
|
|
3252
|
+
if (insertAt === 'top') {
|
|
3253
|
+
if (head.firstChild) {
|
|
3254
|
+
head.insertBefore(style, head.firstChild);
|
|
3255
|
+
} else {
|
|
3256
|
+
head.appendChild(style);
|
|
3257
|
+
}
|
|
3258
|
+
} else {
|
|
3259
|
+
head.appendChild(style);
|
|
3260
|
+
}
|
|
3261
|
+
|
|
3262
|
+
if (style.styleSheet) {
|
|
3263
|
+
style.styleSheet.cssText = css;
|
|
3264
|
+
} else {
|
|
3265
|
+
style.appendChild(document.createTextNode(css));
|
|
3266
|
+
}
|
|
3267
|
+
}
|
|
3268
|
+
|
|
3269
|
+
var css_248z = "*,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }/*! tailwindcss v3.4.18 | MIT License | https://tailwindcss.com*/*,:after,:before{border:0 solid #e5e7eb;box-sizing:border-box}:after,:before{--tw-content:\"\"}:host,html{-webkit-text-size-adjust:100%;font-feature-settings:normal;-webkit-tap-highlight-color:transparent;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-variation-settings:normal;line-height:1.5;-moz-tab-size:4;-o-tab-size:4;tab-size:4}body{line-height:inherit;margin:0}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-feature-settings:normal;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em;font-variation-settings:normal}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}button,input,optgroup,select,textarea{font-feature-settings:inherit;color:inherit;font-family:inherit;font-size:100%;font-variation-settings:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{color:#9ca3af;opacity:1}input::placeholder,textarea::placeholder{color:#9ca3af;opacity:1}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}[hidden]:where(:not([hidden=until-found])){display:none}:root{--background:0 0% 100%;--foreground:222.2 84% 4.9%;--card:0 0% 100%;--card-foreground:222.2 84% 4.9%;--popover:0 0% 100%;--popover-foreground:222.2 84% 4.9%;--primary:222.2 47.4% 11.2%;--primary-foreground:210 40% 98%;--secondary:210 40% 96%;--secondary-foreground:222.2 47.4% 11.2%;--muted:210 40% 96%;--muted-foreground:215.4 16.3% 46.9%;--accent:210 40% 96%;--accent-foreground:222.2 47.4% 11.2%;--destructive:0 84.2% 60.2%;--destructive-foreground:210 40% 98%;--border:214.3 31.8% 91.4%;--input:214.3 31.8% 91.4%;--ring:222.2 84% 4.9%;--radius:0.5rem}.dark{--background:222.2 84% 4.9%;--foreground:210 40% 98%;--card:222.2 84% 4.9%;--card-foreground:210 40% 98%;--popover:222.2 84% 4.9%;--popover-foreground:210 40% 98%;--primary:210 40% 98%;--primary-foreground:222.2 47.4% 11.2%;--secondary:217.2 32.6% 17.5%;--secondary-foreground:210 40% 98%;--muted:217.2 32.6% 17.5%;--muted-foreground:215 20.2% 65.1%;--accent:217.2 32.6% 17.5%;--accent-foreground:210 40% 98%;--destructive:0 62.8% 30.6%;--destructive-foreground:210 40% 98%;--border:217.2 32.6% 17.5%;--input:217.2 32.6% 17.5%;--ring:212.7 26.8% 83.9%}*{border-color:hsl(var(--border))}body{background-color:hsl(var(--background));color:hsl(var(--foreground))}.sr-only{clip:rect(0,0,0,0);border-width:0;height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;white-space:nowrap;width:1px}.pointer-events-none{pointer-events:none}.pointer-events-auto{pointer-events:auto}.invisible{visibility:hidden}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.sticky{position:sticky}.inset-0{inset:0}.inset-x-0{left:0;right:0}.inset-y-0{bottom:0;top:0}.-bottom-12{bottom:-3rem}.-left-12{left:-3rem}.-right-12{right:-3rem}.-top-12{top:-3rem}.bottom-0{bottom:0}.left-0{left:0}.left-1\\/2{left:50%}.left-2{left:.5rem}.left-3{left:.75rem}.left-\\[50\\%\\]{left:50%}.right-0{right:0}.right-1{right:.25rem}.right-2{right:.5rem}.right-3{right:.75rem}.right-4{right:1rem}.right-5{right:1.25rem}.top-0{top:0}.top-1\\.5{top:.375rem}.top-1\\/2{top:50%}.top-2{top:.5rem}.top-3\\.5{top:.875rem}.top-4{top:1rem}.top-\\[50\\%\\]{top:50%}.z-10{z-index:10}.z-20{z-index:20}.z-50{z-index:50}.z-\\[100\\]{z-index:100}.m-1{margin:.25rem}.-mx-1{margin-left:-.25rem;margin-right:-.25rem}.mx-2{margin-left:.5rem;margin-right:.5rem}.mx-3{margin-left:.75rem;margin-right:.75rem}.mx-3\\.5{margin-left:.875rem;margin-right:.875rem}.mx-auto{margin-left:auto;margin-right:auto}.my-0\\.5{margin-bottom:.125rem;margin-top:.125rem}.my-1{margin-bottom:.25rem;margin-top:.25rem}.my-2\\.5{margin-bottom:.625rem;margin-top:.625rem}.-ml-4{margin-left:-1rem}.-mt-4{margin-top:-1rem}.mb-1{margin-bottom:.25rem}.mb-2{margin-bottom:.5rem}.mb-4{margin-bottom:1rem}.ml-2{margin-left:.5rem}.ml-auto{margin-left:auto}.mr-2{margin-right:.5rem}.mr-20{margin-right:5rem}.mr-3{margin-right:.75rem}.mr-4{margin-right:1rem}.mt-1{margin-top:.25rem}.mt-2{margin-top:.5rem}.mt-24{margin-top:6rem}.mt-4{margin-top:1rem}.mt-8{margin-top:2rem}.mt-\\[1px\\]{margin-top:1px}.mt-auto{margin-top:auto}.block{display:block}.flex{display:flex}.inline-flex{display:inline-flex}.\\!table{display:table!important}.table{display:table}.grid{display:grid}.hidden{display:none}.aspect-square{aspect-ratio:1/1}.aspect-video{aspect-ratio:16/9}.size-4{height:1rem;width:1rem}.size-\\[--cell-size\\]{height:var(--cell-size);width:var(--cell-size)}.h-10{height:2.5rem}.h-11{height:2.75rem}.h-12{height:3rem}.h-2{height:.5rem}.h-2\\.5{height:.625rem}.h-3\\.5{height:.875rem}.h-4{height:1rem}.h-5{height:1.25rem}.h-6{height:1.5rem}.h-7{height:1.75rem}.h-8{height:2rem}.h-9{height:2.25rem}.h-\\[--cell-size\\]{height:var(--cell-size)}.h-\\[1px\\]{height:1px}.h-\\[31px\\]{height:31px}.h-\\[32px\\]{height:32px}.h-\\[40px\\]{height:40px}.h-\\[53px\\]{height:53px}.h-\\[64px\\]{height:64px}.h-\\[65px\\]{height:65px}.h-\\[var\\(--radix-select-trigger-height\\)\\]{height:var(--radix-select-trigger-height)}.h-auto{height:auto}.h-full{height:100%}.h-px{height:1px}.h-screen{height:100vh}.h-svh{height:100svh}.max-h-\\[--radix-select-content-available-height\\]{max-height:var(--radix-select-content-available-height)}.max-h-\\[300px\\]{max-height:300px}.min-h-0{min-height:0}.min-h-10{min-height:2.5rem}.min-h-\\[80px\\]{min-height:80px}.min-h-svh{min-height:100svh}.w-0{width:0}.w-1{width:.25rem}.w-10{width:2.5rem}.w-11{width:2.75rem}.w-14{width:3.5rem}.w-2{width:.5rem}.w-2\\.5{width:.625rem}.w-20{width:5rem}.w-3\\.5{width:.875rem}.w-3\\/4{width:75%}.w-4{width:1rem}.w-5{width:1.25rem}.w-6{width:1.5rem}.w-7{width:1.75rem}.w-72{width:18rem}.w-8{width:2rem}.w-80{width:20rem}.w-9{width:2.25rem}.w-\\[--cell-size\\]{width:var(--cell-size)}.w-\\[--radix-popover-trigger-width\\]{width:var(--radix-popover-trigger-width)}.w-\\[--sidebar-width\\]{width:var(--sidebar-width)}.w-\\[0px\\]{width:0}.w-\\[100px\\]{width:100px}.w-\\[150px\\]{width:150px}.w-\\[1px\\]{width:1px}.w-\\[240px\\]{width:240px}.w-\\[250px\\]{width:250px}.w-\\[300px\\]{width:300px}.w-\\[31px\\]{width:31px}.w-\\[32px\\]{width:32px}.w-\\[334px\\]{width:334px}.w-\\[350px\\]{width:350px}.w-\\[424px\\]{width:424px}.w-\\[451px\\]{width:451px}.w-auto{width:auto}.w-fit{width:-moz-fit-content;width:fit-content}.w-full{width:100%}.min-w-0{min-width:0}.min-w-5{min-width:1.25rem}.min-w-\\[--cell-size\\]{min-width:var(--cell-size)}.min-w-\\[8rem\\]{min-width:8rem}.min-w-\\[var\\(--radix-select-trigger-width\\)\\]{min-width:var(--radix-select-trigger-width)}.max-w-\\[--skeleton-width\\]{max-width:var(--skeleton-width)}.max-w-\\[220px\\]{max-width:220px}.max-w-lg{max-width:32rem}.flex-1{flex:1 1 0%}.shrink-0{flex-shrink:0}.flex-grow,.grow{flex-grow:1}.grow-0{flex-grow:0}.basis-full{flex-basis:100%}.caption-bottom{caption-side:bottom}.border-collapse{border-collapse:collapse}.origin-\\[--radix-select-content-transform-origin\\]{transform-origin:var(--radix-select-content-transform-origin)}.-translate-x-1\\/2{--tw-translate-x:-50%}.-translate-x-1\\/2,.-translate-x-px{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-translate-x-px{--tw-translate-x:-1px}.-translate-y-1\\/2{--tw-translate-y:-50%}.-translate-y-1\\/2,.translate-x-\\[-50\\%\\]{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-x-\\[-50\\%\\]{--tw-translate-x:-50%}.translate-x-px{--tw-translate-x:1px}.translate-x-px,.translate-y-\\[-50\\%\\]{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-y-\\[-50\\%\\]{--tw-translate-y:-50%}.rotate-90{--tw-rotate:90deg}.rotate-90,.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes pulse{50%{opacity:.5}}.animate-pulse{animation:pulse 2s cubic-bezier(.4,0,.6,1) infinite}@keyframes spin{to{transform:rotate(1turn)}}.animate-spin{animation:spin 1s linear infinite}.cursor-default{cursor:default}.cursor-pointer{cursor:pointer}.touch-none{touch-action:none}.select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.resize-none{resize:none}.resize{resize:both}.flex-row{flex-direction:row}.flex-col{flex-direction:column}.flex-col-reverse{flex-direction:column-reverse}.flex-wrap{flex-wrap:wrap}.content-end{align-content:flex-end}.items-start{align-items:flex-start}.items-end{align-items:flex-end}.items-center{align-items:center}.items-stretch{align-items:stretch}.justify-start{justify-content:flex-start}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-0\\.5{gap:.125rem}.gap-1{gap:.25rem}.gap-1\\.5{gap:.375rem}.gap-2{gap:.5rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.gap-6{gap:1.5rem}.gap-8{gap:2rem}.gap-x-2{-moz-column-gap:.5rem;column-gap:.5rem}.gap-x-3{-moz-column-gap:.75rem;column-gap:.75rem}.gap-x-4{-moz-column-gap:1rem;column-gap:1rem}.space-x-1\\.5>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-left:calc(.375rem*(1 - var(--tw-space-x-reverse)));margin-right:calc(.375rem*var(--tw-space-x-reverse))}.space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-left:calc(.5rem*(1 - var(--tw-space-x-reverse)));margin-right:calc(.5rem*var(--tw-space-x-reverse))}.space-x-4>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-left:calc(1rem*(1 - var(--tw-space-x-reverse)));margin-right:calc(1rem*var(--tw-space-x-reverse))}.space-x-6>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-left:calc(1.5rem*(1 - var(--tw-space-x-reverse)));margin-right:calc(1.5rem*var(--tw-space-x-reverse))}.space-y-1\\.5>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(.375rem*var(--tw-space-y-reverse));margin-top:calc(.375rem*(1 - var(--tw-space-y-reverse)))}.space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(.5rem*var(--tw-space-y-reverse));margin-top:calc(.5rem*(1 - var(--tw-space-y-reverse)))}.self-start{align-self:flex-start}.self-stretch{align-self:stretch}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-visible{overflow:visible}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.overflow-x-hidden{overflow-x:hidden}.truncate{overflow:hidden;text-overflow:ellipsis}.truncate,.whitespace-nowrap{white-space:nowrap}.break-words{overflow-wrap:break-word}.rounded{border-radius:.25rem}.rounded-\\[2px\\]{border-radius:2px}.rounded-\\[3px\\]{border-radius:3px}.rounded-\\[6px\\]{border-radius:6px}.rounded-\\[inherit\\]{border-radius:inherit}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:var(--radius)}.rounded-md{border-radius:calc(var(--radius) - 2px)}.rounded-none{border-radius:0}.rounded-sm{border-radius:calc(var(--radius) - 4px)}.rounded-l-md{border-bottom-left-radius:calc(var(--radius) - 2px);border-top-left-radius:calc(var(--radius) - 2px)}.rounded-r-md{border-bottom-right-radius:calc(var(--radius) - 2px);border-top-right-radius:calc(var(--radius) - 2px)}.rounded-t-\\[10px\\]{border-top-left-radius:10px;border-top-right-radius:10px}.rounded-t-md{border-top-left-radius:calc(var(--radius) - 2px);border-top-right-radius:calc(var(--radius) - 2px)}.border{border-width:1px}.border-2{border-width:2px}.border-\\[1\\.5px\\]{border-width:1.5px}.border-b{border-bottom-width:1px}.border-l{border-left-width:1px}.border-r{border-right-width:1px}.border-t{border-top-width:1px}.border-dashed{border-style:dashed}.border-none{border-style:none}.border-\\[--color-border\\]{border-color:var(--color-border)}.border-black{--tw-border-opacity:1;border-color:rgb(0 0 0/var(--tw-border-opacity,1))}.border-border\\/50{border-color:hsl(var(--border)/.5)}.border-destructive\\/50{border-color:hsl(var(--destructive)/.5)}.border-foreground\\/10{border-color:hsl(var(--foreground)/.1)}.border-input{border-color:hsl(var(--input))}.border-primary{border-color:hsl(var(--primary))}.border-purple-900{--tw-border-opacity:1;border-color:rgb(88 28 135/var(--tw-border-opacity,1))}.border-red-600{--tw-border-opacity:1;border-color:rgb(220 38 38/var(--tw-border-opacity,1))}.border-slate-300{--tw-border-opacity:1;border-color:rgb(203 213 225/var(--tw-border-opacity,1))}.border-transparent{border-color:transparent}.border-l-transparent{border-left-color:transparent}.border-t-transparent{border-top-color:transparent}.bg-\\[--color-bg\\]{background-color:var(--color-bg)}.bg-accent{background-color:hsl(var(--accent))}.bg-background{background-color:hsl(var(--background))}.bg-black\\/80{background-color:rgba(0,0,0,.8)}.bg-blue-50{--tw-bg-opacity:1;background-color:rgb(239 246 255/var(--tw-bg-opacity,1))}.bg-border{background-color:hsl(var(--border))}.bg-card{background-color:hsl(var(--card))}.bg-destructive{background-color:hsl(var(--destructive))}.bg-emerald-700{--tw-bg-opacity:1;background-color:rgb(4 120 87/var(--tw-bg-opacity,1))}.bg-green-50{--tw-bg-opacity:1;background-color:rgb(240 253 244/var(--tw-bg-opacity,1))}.bg-muted{background-color:hsl(var(--muted))}.bg-muted\\/50{background-color:hsl(var(--muted)/.5)}.bg-orange-50{--tw-bg-opacity:1;background-color:rgb(255 247 237/var(--tw-bg-opacity,1))}.bg-popover{background-color:hsl(var(--popover))}.bg-primary{background-color:hsl(var(--primary))}.bg-purple-700{--tw-bg-opacity:1;background-color:rgb(126 34 206/var(--tw-bg-opacity,1))}.bg-red-50{--tw-bg-opacity:1;background-color:rgb(254 242 242/var(--tw-bg-opacity,1))}.bg-red-600{--tw-bg-opacity:1;background-color:rgb(220 38 38/var(--tw-bg-opacity,1))}.bg-red-700{--tw-bg-opacity:1;background-color:rgb(185 28 28/var(--tw-bg-opacity,1))}.bg-secondary{background-color:hsl(var(--secondary))}.bg-transparent{background-color:transparent}.bg-white{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity,1))}.bg-zinc-100{--tw-bg-opacity:1;background-color:rgb(244 244 245/var(--tw-bg-opacity,1))}.bg-\\[url\\(\\'\\/imgs\\/404\\.png\\'\\)\\]{background-image:url(/imgs/404.png)}.\\!bg-cover{background-size:cover!important}.bg-cover{background-size:cover}.\\!bg-center{background-position:50%!important}.bg-center{background-position:50%}.bg-no-repeat{background-repeat:no-repeat}.fill-current{fill:currentColor}.fill-primary{fill:hsl(var(--primary))}.stroke-primary{stroke:hsl(var(--primary))}.stroke-zinc-500{stroke:#71717a}.stroke-2{stroke-width:2}.p-0{padding:0}.p-1{padding:.25rem}.p-2{padding:.5rem}.p-3{padding:.75rem}.p-4{padding:1rem}.p-5{padding:1.25rem}.p-6{padding:1.5rem}.p-\\[1px\\]{padding:1px}.p-\\[7\\.6px\\]{padding:7.6px}.p-px{padding:1px}.px-1{padding-left:.25rem;padding-right:.25rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-2\\.5{padding-left:.625rem;padding-right:.625rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.px-5{padding-left:1.25rem;padding-right:1.25rem}.px-6{padding-left:1.5rem;padding-right:1.5rem}.px-8{padding-left:2rem;padding-right:2rem}.px-\\[--cell-size\\]{padding-left:var(--cell-size);padding-right:var(--cell-size)}.py-0\\.5{padding-bottom:.125rem;padding-top:.125rem}.py-1{padding-bottom:.25rem;padding-top:.25rem}.py-1\\.5{padding-bottom:.375rem;padding-top:.375rem}.py-2{padding-bottom:.5rem;padding-top:.5rem}.py-3{padding-bottom:.75rem;padding-top:.75rem}.py-4{padding-bottom:1rem;padding-top:1rem}.py-5{padding-bottom:1.25rem;padding-top:1.25rem}.py-6{padding-bottom:1.5rem;padding-top:1.5rem}.py-8{padding-bottom:2rem;padding-top:2rem}.py-\\[12\\.25px\\]{padding-bottom:12.25px;padding-top:12.25px}.pb-0{padding-bottom:0}.pb-2{padding-bottom:.5rem}.pb-3{padding-bottom:.75rem}.pl-2{padding-left:.5rem}.pl-2\\.5{padding-left:.625rem}.pl-3{padding-left:.75rem}.pl-3\\.5{padding-left:.875rem}.pl-4{padding-left:1rem}.pl-6{padding-left:1.5rem}.pl-8{padding-left:2rem}.pl-9{padding-left:2.25rem}.pr-1{padding-right:.25rem}.pr-2{padding-right:.5rem}.pr-2\\.5{padding-right:.625rem}.pr-8{padding-right:2rem}.pt-0{padding-top:0}.pt-1{padding-top:.25rem}.pt-3{padding-top:.75rem}.pt-4{padding-top:1rem}.pt-5{padding-top:1.25rem}.text-left{text-align:left}.text-center{text-align:center}.align-middle{vertical-align:middle}.font-mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.text-2xl{font-size:1.5rem;line-height:2rem}.text-3xl{font-size:1.875rem;line-height:2.25rem}.text-5xl{font-size:3rem;line-height:1}.text-\\[0\\.8rem\\]{font-size:.8rem}.text-base{font-size:1rem;line-height:1.5rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-xs{font-size:.75rem;line-height:1rem}.font-extrabold{font-weight:800}.font-medium{font-weight:500}.font-normal{font-weight:400}.font-semibold{font-weight:600}.tabular-nums{--tw-numeric-spacing:tabular-nums;font-variant-numeric:var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)}.leading-none{line-height:1}.leading-tight{line-height:1.25}.tracking-tight{letter-spacing:-.025em}.tracking-widest{letter-spacing:.1em}.text-accent-foreground{color:hsl(var(--accent-foreground))}.text-black{--tw-text-opacity:1;color:rgb(0 0 0/var(--tw-text-opacity,1))}.text-blue-600{--tw-text-opacity:1;color:rgb(37 99 235/var(--tw-text-opacity,1))}.text-card-foreground{color:hsl(var(--card-foreground))}.text-current{color:currentColor}.text-destructive{color:hsl(var(--destructive))}.text-destructive-foreground{color:hsl(var(--destructive-foreground))}.text-emerald-700{--tw-text-opacity:1;color:rgb(4 120 87/var(--tw-text-opacity,1))}.text-foreground{color:hsl(var(--foreground))}.text-foreground\\/50{color:hsl(var(--foreground)/.5)}.text-gray-500{--tw-text-opacity:1;color:rgb(107 114 128/var(--tw-text-opacity,1))}.text-muted{color:hsl(var(--muted))}.text-muted-foreground{color:hsl(var(--muted-foreground))}.text-orange-600{--tw-text-opacity:1;color:rgb(234 88 12/var(--tw-text-opacity,1))}.text-popover-foreground{color:hsl(var(--popover-foreground))}.text-primary{color:hsl(var(--primary))}.text-primary-foreground{color:hsl(var(--primary-foreground))}.text-red-500{--tw-text-opacity:1;color:rgb(239 68 68/var(--tw-text-opacity,1))}.text-red-600{--tw-text-opacity:1;color:rgb(220 38 38/var(--tw-text-opacity,1))}.text-secondary-foreground{color:hsl(var(--secondary-foreground))}.text-slate-400{--tw-text-opacity:1;color:rgb(148 163 184/var(--tw-text-opacity,1))}.text-slate-500{--tw-text-opacity:1;color:rgb(100 116 139/var(--tw-text-opacity,1))}.text-slate-800{--tw-text-opacity:1;color:rgb(30 41 59/var(--tw-text-opacity,1))}.text-white{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity,1))}.text-zinc-500{--tw-text-opacity:1;color:rgb(113 113 122/var(--tw-text-opacity,1))}.text-zinc-950{--tw-text-opacity:1;color:rgb(9 9 11/var(--tw-text-opacity,1))}.underline-offset-4{text-underline-offset:4px}.opacity-0{opacity:0}.opacity-100{opacity:1}.opacity-50{opacity:.5}.opacity-60{opacity:.6}.opacity-70{opacity:.7}.opacity-90{opacity:.9}.shadow-\\[0_0_0_1px_var\\(--sidebar-border\\)\\]{--tw-shadow:0 0 0 1px var(--sidebar-border);--tw-shadow-colored:0 0 0 1px var(--tw-shadow-color)}.shadow-\\[0_0_0_1px_var\\(--sidebar-border\\)\\],.shadow-lg{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-lg{--tw-shadow:0 10px 15px -3px rgba(0,0,0,.1),0 4px 6px -4px rgba(0,0,0,.1);--tw-shadow-colored:0 10px 15px -3px var(--tw-shadow-color),0 4px 6px -4px var(--tw-shadow-color)}.shadow-md{--tw-shadow:0 4px 6px -1px rgba(0,0,0,.1),0 2px 4px -2px rgba(0,0,0,.1);--tw-shadow-colored:0 4px 6px -1px var(--tw-shadow-color),0 2px 4px -2px var(--tw-shadow-color)}.shadow-md,.shadow-none{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-none{--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000}.shadow-sm{--tw-shadow:0 1px 2px 0 rgba(0,0,0,.05);--tw-shadow-colored:0 1px 2px 0 var(--tw-shadow-color)}.shadow-sm,.shadow-xl{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-xl{--tw-shadow:0 20px 25px -5px rgba(0,0,0,.1),0 8px 10px -6px rgba(0,0,0,.1);--tw-shadow-colored:0 20px 25px -5px var(--tw-shadow-color),0 8px 10px -6px var(--tw-shadow-color)}.outline-none{outline:2px solid transparent;outline-offset:2px}.outline{outline-style:solid}.ring-0{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(var(--tw-ring-offset-width)) var(--tw-ring-color)}.ring-0,.ring-2{box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.ring-2{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color)}.ring-ring{--tw-ring-color:hsl(var(--ring))}.ring-offset-2{--tw-ring-offset-width:2px}.ring-offset-background{--tw-ring-offset-color:hsl(var(--background))}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.transition{transition-duration:.15s;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1)}.transition-\\[left\\2c right\\2c width\\]{transition-duration:.15s;transition-property:left,right,width;transition-timing-function:cubic-bezier(.4,0,.2,1)}.transition-\\[margin\\2c opa\\]{transition-duration:.15s;transition-property:margin,opa;transition-timing-function:cubic-bezier(.4,0,.2,1)}.transition-\\[width\\2c height\\2c padding\\]{transition-duration:.15s;transition-property:width,height,padding;transition-timing-function:cubic-bezier(.4,0,.2,1)}.transition-\\[width\\]{transition-duration:.15s;transition-property:width;transition-timing-function:cubic-bezier(.4,0,.2,1)}.transition-all{transition-duration:.15s;transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1)}.transition-colors{transition-duration:.15s;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1)}.transition-opacity{transition-duration:.15s;transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1)}.transition-transform{transition-duration:.15s;transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1)}.duration-200{transition-duration:.2s}.duration-300{transition-duration:.3s}.ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}.ease-linear{transition-timing-function:linear}@keyframes enter{0%{opacity:var(--tw-enter-opacity,1);transform:translate3d(var(--tw-enter-translate-x,0),var(--tw-enter-translate-y,0),0) scale3d(var(--tw-enter-scale,1),var(--tw-enter-scale,1),var(--tw-enter-scale,1)) rotate(var(--tw-enter-rotate,0))}}@keyframes exit{to{opacity:var(--tw-exit-opacity,1);transform:translate3d(var(--tw-exit-translate-x,0),var(--tw-exit-translate-y,0),0) scale3d(var(--tw-exit-scale,1),var(--tw-exit-scale,1),var(--tw-exit-scale,1)) rotate(var(--tw-exit-rotate,0))}}.animate-in{--tw-enter-opacity:initial;--tw-enter-scale:initial;--tw-enter-rotate:initial;--tw-enter-translate-x:initial;--tw-enter-translate-y:initial;animation-duration:.15s;animation-name:enter}.fade-in-0{--tw-enter-opacity:0}.fade-in-80{--tw-enter-opacity:0.8}.zoom-in-95{--tw-enter-scale:.95}.duration-200{animation-duration:.2s}.duration-300{animation-duration:.3s}.ease-in-out{animation-timing-function:cubic-bezier(.4,0,.2,1)}.ease-linear{animation-timing-function:linear}.\\[--cell-size\\:2rem\\]{--cell-size:2rem}.file\\:border-0::file-selector-button{border-width:0}.file\\:bg-transparent::file-selector-button{background-color:transparent}.file\\:text-sm::file-selector-button{font-size:.875rem;line-height:1.25rem}.file\\:font-medium::file-selector-button{font-weight:500}.file\\:text-foreground::file-selector-button{color:hsl(var(--foreground))}.placeholder\\:text-muted-foreground::-moz-placeholder{color:hsl(var(--muted-foreground))}.placeholder\\:text-muted-foreground::placeholder{color:hsl(var(--muted-foreground))}.after\\:absolute:after{content:var(--tw-content);position:absolute}.after\\:-inset-2:after{content:var(--tw-content);inset:-.5rem}.after\\:inset-y-0:after{bottom:0;content:var(--tw-content);top:0}.after\\:left-1\\/2:after{content:var(--tw-content);left:50%}.after\\:w-\\[2px\\]:after{content:var(--tw-content);width:2px}.focus-within\\:outline-none:focus-within{outline:2px solid transparent;outline-offset:2px}.focus-within\\:ring-2:focus-within{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.focus-within\\:ring-ring:focus-within{--tw-ring-color:hsl(var(--ring))}.focus-within\\:ring-offset-2:focus-within{--tw-ring-offset-width:2px}.hover\\:flex:hover{display:flex}.hover\\:hidden:hover{display:none}.hover\\:bg-accent:hover{background-color:hsl(var(--accent))}.hover\\:bg-background:hover{background-color:hsl(var(--background))}.hover\\:bg-destructive\\/80:hover{background-color:hsl(var(--destructive)/.8)}.hover\\:bg-destructive\\/90:hover{background-color:hsl(var(--destructive)/.9)}.hover\\:bg-secondary\\/80:hover{background-color:hsl(var(--secondary)/.8)}.hover\\:text-accent-foreground:hover{color:hsl(var(--accent-foreground))}.hover\\:text-foreground:hover{color:hsl(var(--foreground))}.hover\\:underline:hover{text-decoration-line:underline}.hover\\:opacity-100:hover{opacity:1}.hover\\:shadow-\\[0_0_0_1px_var\\(--sidebar-accent\\)\\]:hover{--tw-shadow:0 0 0 1px var(--sidebar-accent);--tw-shadow-colored:0 0 0 1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.focus\\:bg-accent:focus{background-color:hsl(var(--accent))}.focus\\:text-accent-foreground:focus{color:hsl(var(--accent-foreground))}.focus\\:opacity-100:focus{opacity:1}.focus\\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus\\:ring-0:focus{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(var(--tw-ring-offset-width)) var(--tw-ring-color)}.focus\\:ring-0:focus,.focus\\:ring-2:focus{box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.focus\\:ring-2:focus{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color)}.focus\\:ring-ring:focus{--tw-ring-color:hsl(var(--ring))}.focus\\:ring-offset-2:focus{--tw-ring-offset-width:2px}.focus-visible\\:outline-none:focus-visible{outline:2px solid transparent;outline-offset:2px}.focus-visible\\:ring-2:focus-visible{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.focus-visible\\:ring-ring:focus-visible{--tw-ring-color:hsl(var(--ring))}.focus-visible\\:ring-offset-2:focus-visible{--tw-ring-offset-width:2px}.focus-visible\\:ring-offset-background:focus-visible{--tw-ring-offset-color:hsl(var(--background))}.disabled\\:pointer-events-none:disabled{pointer-events:none}.disabled\\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\\:opacity-50:disabled{opacity:.5}.group\\/menu-item:focus-within .group-focus-within\\/menu-item\\:opacity-100{opacity:1}.group:hover .group-hover\\:flex{display:flex}.group:hover .group-hover\\:hidden{display:none}.group:hover .group-hover\\:-translate-x-1{--tw-translate-x:-0.25rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.group:hover .group-hover\\:opacity-100,.group\\/menu-item:hover .group-hover\\/menu-item\\:opacity-100{opacity:1}.group.destructive .group-\\[\\.destructive\\]\\:border-muted\\/40{border-color:hsl(var(--muted)/.4)}.group.destructive .group-\\[\\.destructive\\]\\:text-red-300{--tw-text-opacity:1;color:rgb(252 165 165/var(--tw-text-opacity,1))}.group.destructive .group-\\[\\.destructive\\]\\:hover\\:border-destructive\\/30:hover{border-color:hsl(var(--destructive)/.3)}.group.destructive .group-\\[\\.destructive\\]\\:hover\\:bg-destructive:hover{background-color:hsl(var(--destructive))}.group.destructive .group-\\[\\.destructive\\]\\:hover\\:text-destructive-foreground:hover{color:hsl(var(--destructive-foreground))}.group.destructive .group-\\[\\.destructive\\]\\:hover\\:text-red-50:hover{--tw-text-opacity:1;color:rgb(254 242 242/var(--tw-text-opacity,1))}.group.destructive .group-\\[\\.destructive\\]\\:focus\\:ring-destructive:focus{--tw-ring-color:hsl(var(--destructive))}.group.destructive .group-\\[\\.destructive\\]\\:focus\\:ring-red-400:focus{--tw-ring-opacity:1;--tw-ring-color:rgb(248 113 113/var(--tw-ring-opacity,1))}.group.destructive .group-\\[\\.destructive\\]\\:focus\\:ring-offset-red-600:focus{--tw-ring-offset-color:#dc2626}.peer:disabled~.peer-disabled\\:cursor-not-allowed{cursor:not-allowed}.peer:disabled~.peer-disabled\\:opacity-70{opacity:.7}.group\\/menu-item:has([data-sidebar=menu-action]) .group-has-\\[\\[data-sidebar\\=menu-action\\]\\]\\/menu-item\\:pr-8{padding-right:2rem}.aria-disabled\\:pointer-events-none[aria-disabled=true]{pointer-events:none}.aria-disabled\\:opacity-50[aria-disabled=true]{opacity:.5}.aria-selected\\:text-muted-foreground[aria-selected=true]{color:hsl(var(--muted-foreground))}.data-\\[disabled\\=true\\]\\:pointer-events-none[data-disabled=true],.data-\\[disabled\\]\\:pointer-events-none[data-disabled]{pointer-events:none}.data-\\[side\\=bottom\\]\\:translate-y-1[data-side=bottom]{--tw-translate-y:0.25rem}.data-\\[side\\=bottom\\]\\:translate-y-1[data-side=bottom],.data-\\[side\\=left\\]\\:-translate-x-1[data-side=left]{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\\[side\\=left\\]\\:-translate-x-1[data-side=left]{--tw-translate-x:-0.25rem}.data-\\[side\\=right\\]\\:translate-x-1[data-side=right]{--tw-translate-x:0.25rem}.data-\\[side\\=right\\]\\:translate-x-1[data-side=right],.data-\\[side\\=top\\]\\:-translate-y-1[data-side=top]{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\\[side\\=top\\]\\:-translate-y-1[data-side=top]{--tw-translate-y:-0.25rem}.data-\\[state\\=checked\\]\\:translate-x-5[data-state=checked]{--tw-translate-x:1.25rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\\[state\\=unchecked\\]\\:translate-x-0[data-state=unchecked],.data-\\[swipe\\=cancel\\]\\:translate-x-0[data-swipe=cancel]{--tw-translate-x:0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\\[swipe\\=end\\]\\:translate-x-\\[var\\(--radix-toast-swipe-end-x\\)\\][data-swipe=end]{--tw-translate-x:var(--radix-toast-swipe-end-x)}.data-\\[swipe\\=end\\]\\:translate-x-\\[var\\(--radix-toast-swipe-end-x\\)\\][data-swipe=end],.data-\\[swipe\\=move\\]\\:translate-x-\\[var\\(--radix-toast-swipe-move-x\\)\\][data-swipe=move]{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\\[swipe\\=move\\]\\:translate-x-\\[var\\(--radix-toast-swipe-move-x\\)\\][data-swipe=move]{--tw-translate-x:var(--radix-toast-swipe-move-x)}@keyframes accordion-up{0%{height:var(--radix-accordion-content-height)}to{height:0}}.data-\\[state\\=closed\\]\\:animate-accordion-up[data-state=closed]{animation:accordion-up .2s ease-out}@keyframes accordion-down{0%{height:0}to{height:var(--radix-accordion-content-height)}}.data-\\[state\\=open\\]\\:animate-accordion-down[data-state=open]{animation:accordion-down .2s ease-out}.data-\\[range-end\\=true\\]\\:rounded-md[data-range-end=true]{border-radius:calc(var(--radius) - 2px)}.data-\\[range-middle\\=true\\]\\:rounded-none[data-range-middle=true]{border-radius:0}.data-\\[range-start\\=true\\]\\:rounded-md[data-range-start=true]{border-radius:calc(var(--radius) - 2px)}.data-\\[selected\\=true\\]\\:rounded-none[data-selected=true]{border-radius:0}.data-\\[range-middle\\=true\\]\\:bg-accent[data-range-middle=true],.data-\\[selected\\=\\'true\\'\\]\\:bg-accent[data-selected=true]{background-color:hsl(var(--accent))}.data-\\[state\\=active\\]\\:bg-background[data-state=active]{background-color:hsl(var(--background))}.data-\\[state\\=open\\]\\:bg-accent[data-state=open],.data-\\[state\\=unchecked\\]\\:bg-accent[data-state=unchecked]{background-color:hsl(var(--accent))}.data-\\[active\\=true\\]\\:font-medium[data-active=true]{font-weight:500}.data-\\[placeholder\\]\\:text-muted-foreground[data-placeholder]{color:hsl(var(--muted-foreground))}.data-\\[range-end\\=true\\]\\:text-primary-foreground[data-range-end=true]{color:hsl(var(--primary-foreground))}.data-\\[range-middle\\=true\\]\\:text-accent-foreground[data-range-middle=true]{color:hsl(var(--accent-foreground))}.data-\\[range-start\\=true\\]\\:text-primary-foreground[data-range-start=true],.data-\\[selected-single\\=true\\]\\:text-primary-foreground[data-selected-single=true]{color:hsl(var(--primary-foreground))}.data-\\[selected\\=true\\]\\:text-accent-foreground[data-selected=true]{color:hsl(var(--accent-foreground))}.data-\\[state\\=active\\]\\:text-foreground[data-state=active]{color:hsl(var(--foreground))}.data-\\[state\\=checked\\]\\:text-primary-foreground[data-state=checked]{color:hsl(var(--primary-foreground))}.data-\\[state\\=open\\]\\:text-accent-foreground[data-state=open]{color:hsl(var(--accent-foreground))}.data-\\[state\\=open\\]\\:text-muted-foreground[data-state=open]{color:hsl(var(--muted-foreground))}.data-\\[disabled\\=true\\]\\:opacity-50[data-disabled=true],.data-\\[disabled\\]\\:opacity-50[data-disabled]{opacity:.5}.data-\\[state\\=open\\]\\:opacity-100[data-state=open]{opacity:1}.data-\\[state\\=active\\]\\:shadow-sm[data-state=active]{--tw-shadow:0 1px 2px 0 rgba(0,0,0,.05);--tw-shadow-colored:0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.data-\\[swipe\\=move\\]\\:transition-none[data-swipe=move]{transition-property:none}.data-\\[state\\=closed\\]\\:duration-300[data-state=closed]{transition-duration:.3s}.data-\\[state\\=open\\]\\:duration-500[data-state=open]{transition-duration:.5s}.data-\\[state\\=open\\]\\:animate-in[data-state=open]{--tw-enter-opacity:initial;--tw-enter-scale:initial;--tw-enter-rotate:initial;--tw-enter-translate-x:initial;--tw-enter-translate-y:initial;animation-duration:.15s;animation-name:enter}.data-\\[state\\=closed\\]\\:animate-out[data-state=closed],.data-\\[swipe\\=end\\]\\:animate-out[data-swipe=end]{--tw-exit-opacity:initial;--tw-exit-scale:initial;--tw-exit-rotate:initial;--tw-exit-translate-x:initial;--tw-exit-translate-y:initial;animation-duration:.15s;animation-name:exit}.data-\\[state\\=closed\\]\\:fade-out-0[data-state=closed]{--tw-exit-opacity:0}.data-\\[state\\=closed\\]\\:fade-out-80[data-state=closed]{--tw-exit-opacity:0.8}.data-\\[state\\=open\\]\\:fade-in-0[data-state=open]{--tw-enter-opacity:0}.data-\\[state\\=closed\\]\\:zoom-out-95[data-state=closed]{--tw-exit-scale:.95}.data-\\[state\\=open\\]\\:zoom-in-95[data-state=open]{--tw-enter-scale:.95}.data-\\[side\\=bottom\\]\\:slide-in-from-top-2[data-side=bottom]{--tw-enter-translate-y:-0.5rem}.data-\\[side\\=left\\]\\:slide-in-from-right-2[data-side=left]{--tw-enter-translate-x:0.5rem}.data-\\[side\\=right\\]\\:slide-in-from-left-1[data-side=right]{--tw-enter-translate-x:-0.25rem}.data-\\[side\\=right\\]\\:slide-in-from-left-2[data-side=right]{--tw-enter-translate-x:-0.5rem}.data-\\[side\\=top\\]\\:slide-in-from-bottom-2[data-side=top]{--tw-enter-translate-y:0.5rem}.data-\\[state\\=closed\\]\\:slide-out-to-bottom[data-state=closed]{--tw-exit-translate-y:100%}.data-\\[state\\=closed\\]\\:slide-out-to-left[data-state=closed]{--tw-exit-translate-x:-100%}.data-\\[state\\=closed\\]\\:slide-out-to-left-1\\/2[data-state=closed]{--tw-exit-translate-x:-50%}.data-\\[state\\=closed\\]\\:slide-out-to-right-full[data-state=closed],.data-\\[state\\=closed\\]\\:slide-out-to-right[data-state=closed]{--tw-exit-translate-x:100%}.data-\\[state\\=closed\\]\\:slide-out-to-top[data-state=closed]{--tw-exit-translate-y:-100%}.data-\\[state\\=closed\\]\\:slide-out-to-top-\\[48\\%\\][data-state=closed]{--tw-exit-translate-y:-48%}.data-\\[state\\=open\\]\\:slide-in-from-bottom[data-state=open]{--tw-enter-translate-y:100%}.data-\\[state\\=open\\]\\:slide-in-from-left[data-state=open]{--tw-enter-translate-x:-100%}.data-\\[state\\=open\\]\\:slide-in-from-left-1\\/2[data-state=open]{--tw-enter-translate-x:-50%}.data-\\[state\\=open\\]\\:slide-in-from-right[data-state=open]{--tw-enter-translate-x:100%}.data-\\[state\\=open\\]\\:slide-in-from-top[data-state=open]{--tw-enter-translate-y:-100%}.data-\\[state\\=open\\]\\:slide-in-from-top-\\[48\\%\\][data-state=open]{--tw-enter-translate-y:-48%}.data-\\[state\\=open\\]\\:slide-in-from-top-full[data-state=open]{--tw-enter-translate-y:-100%}.data-\\[state\\=closed\\]\\:duration-300[data-state=closed]{animation-duration:.3s}.data-\\[state\\=open\\]\\:duration-500[data-state=open]{animation-duration:.5s}.group\\/day[data-focused=true] .group-data-\\[focused\\=true\\]\\/day\\:relative{position:relative}.group[data-collapsible=offcanvas] .group-data-\\[collapsible\\=offcanvas\\]\\:left-\\[calc\\(var\\(--sidebar-width\\)\\*-1\\)\\]{left:calc(var(--sidebar-width)*-1)}.group[data-collapsible=offcanvas] .group-data-\\[collapsible\\=offcanvas\\]\\:right-\\[calc\\(var\\(--sidebar-width\\)\\*-1\\)\\]{right:calc(var(--sidebar-width)*-1)}.group[data-side=left] .group-data-\\[side\\=left\\]\\:-right-4{right:-1rem}.group[data-side=right] .group-data-\\[side\\=right\\]\\:left-0{left:0}.group\\/day[data-focused=true] .group-data-\\[focused\\=true\\]\\/day\\:z-10{z-index:10}.group[data-collapsible=icon] .group-data-\\[collapsible\\=icon\\]\\:-mt-8{margin-top:-2rem}.group[data-collapsible=icon] .group-data-\\[collapsible\\=icon\\]\\:hidden{display:none}.group[data-collapsible=icon] .group-data-\\[collapsible\\=icon\\]\\:\\!size-8{height:2rem!important;width:2rem!important}.group[data-collapsible=icon] .group-data-\\[collapsible\\=icon\\]\\:w-\\[--sidebar-width-icon\\]{width:var(--sidebar-width-icon)}.group[data-collapsible=icon] .group-data-\\[collapsible\\=icon\\]\\:w-\\[calc\\(var\\(--sidebar-width-icon\\)_\\+_theme\\(spacing\\.4\\)\\)\\]{width:calc(var(--sidebar-width-icon) + 1rem)}.group[data-collapsible=icon] .group-data-\\[collapsible\\=icon\\]\\:w-\\[calc\\(var\\(--sidebar-width-icon\\)_\\+_theme\\(spacing\\.4\\)_\\+2px\\)\\]{width:calc(var(--sidebar-width-icon) + 1rem + 2px)}.group[data-collapsible=offcanvas] .group-data-\\[collapsible\\=offcanvas\\]\\:w-0{width:0}.group[data-collapsible=offcanvas] .group-data-\\[collapsible\\=offcanvas\\]\\:translate-x-0{--tw-translate-x:0px}.group[data-collapsible=offcanvas] .group-data-\\[collapsible\\=offcanvas\\]\\:translate-x-0,.group[data-side=right] .group-data-\\[side\\=right\\]\\:rotate-180{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.group[data-side=right] .group-data-\\[side\\=right\\]\\:rotate-180{--tw-rotate:180deg}.group\\/collapsible[data-state=open] .group-data-\\[state\\=open\\]\\/collapsible\\:rotate-90{--tw-rotate:90deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.group[data-collapsible=icon] .group-data-\\[collapsible\\=icon\\]\\:overflow-hidden{overflow:hidden}.group[data-variant=floating] .group-data-\\[variant\\=floating\\]\\:rounded-lg{border-radius:var(--radius)}.group[data-variant=floating] .group-data-\\[variant\\=floating\\]\\:border{border-width:1px}.group[data-side=left] .group-data-\\[side\\=left\\]\\:border-r{border-right-width:1px}.group[data-side=right] .group-data-\\[side\\=right\\]\\:border-l{border-left-width:1px}.group\\/day[data-focused=true] .group-data-\\[focused\\=true\\]\\/day\\:border-ring{border-color:hsl(var(--ring))}.group[data-collapsible=icon] .group-data-\\[collapsible\\=icon\\]\\:\\!p-0{padding:0!important}.group[data-collapsible=icon] .group-data-\\[collapsible\\=icon\\]\\:\\!p-2{padding:.5rem!important}.group[data-collapsible=icon] .group-data-\\[collapsible\\=icon\\]\\:opacity-0{opacity:0}.group[data-variant=floating] .group-data-\\[variant\\=floating\\]\\:shadow{--tw-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.group\\/day[data-focused=true] .group-data-\\[focused\\=true\\]\\/day\\:ring-\\[3px\\]{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.group\\/day[data-focused=true] .group-data-\\[focused\\=true\\]\\/day\\:ring-ring\\/50{--tw-ring-color:hsl(var(--ring)/0.5)}.group[data-collapsible=offcanvas] .group-data-\\[collapsible\\=offcanvas\\]\\:after\\:left-full:after{content:var(--tw-content);left:100%}.peer\\/menu-button[data-size=default]~.peer-data-\\[size\\=default\\]\\/menu-button\\:top-1\\.5{top:.375rem}.peer\\/menu-button[data-size=lg]~.peer-data-\\[size\\=lg\\]\\/menu-button\\:top-2\\.5{top:.625rem}.peer\\/menu-button[data-size=sm]~.peer-data-\\[size\\=sm\\]\\/menu-button\\:top-1{top:.25rem}.peer[data-variant=inset]~.peer-data-\\[variant\\=inset\\]\\:min-h-\\[calc\\(100svh-theme\\(spacing\\.4\\)\\)\\]{min-height:calc(100svh - 1rem)}.dark\\:border-destructive:is(.dark *){border-color:hsl(var(--destructive))}.dark\\:bg-popover:is(.dark *){background-color:hsl(var(--popover))}@media (min-width:640px){.sm\\:mt-0{margin-top:0}.sm\\:flex{display:flex}.sm\\:max-w-sm{max-width:24rem}.sm\\:flex-row{flex-direction:row}.sm\\:justify-end{justify-content:flex-end}.sm\\:gap-2\\.5{gap:.625rem}.sm\\:space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-left:calc(.5rem*(1 - var(--tw-space-x-reverse)));margin-right:calc(.5rem*var(--tw-space-x-reverse))}.sm\\:rounded-lg{border-radius:var(--radius)}.sm\\:text-left{text-align:left}.data-\\[state\\=open\\]\\:sm\\:slide-in-from-top-full[data-state=open]{--tw-enter-translate-y:-100%}}@media (min-width:768px){.md\\:block{display:block}.md\\:flex{display:flex}.md\\:flex-row{flex-direction:row}.md\\:text-sm{font-size:.875rem;line-height:1.25rem}.md\\:opacity-0{opacity:0}.after\\:md\\:hidden:after{content:var(--tw-content);display:none}.peer[data-variant=inset]~.md\\:peer-data-\\[variant\\=inset\\]\\:m-2{margin:.5rem}.peer[data-state=collapsed][data-variant=inset]~.md\\:peer-data-\\[state\\=collapsed\\]\\:peer-data-\\[variant\\=inset\\]\\:ml-2{margin-left:.5rem}.peer[data-variant=inset]~.md\\:peer-data-\\[variant\\=inset\\]\\:ml-0{margin-left:0}.peer[data-variant=inset]~.md\\:peer-data-\\[variant\\=inset\\]\\:rounded-xl{border-radius:.75rem}.peer[data-variant=inset]~.md\\:peer-data-\\[variant\\=inset\\]\\:shadow{--tw-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}}.\\[\\&\\:first-child\\[data-selected\\=true\\]_button\\]\\:rounded-l-md:first-child[data-selected=true] button{border-bottom-left-radius:calc(var(--radius) - 2px);border-top-left-radius:calc(var(--radius) - 2px)}.\\[\\&\\:has\\(\\[role\\=checkbox\\]\\)\\]\\:pr-0:has([role=checkbox]){padding-right:0}.\\[\\&\\:last-child\\[data-selected\\=true\\]_button\\]\\:rounded-r-md:last-child[data-selected=true] button{border-bottom-right-radius:calc(var(--radius) - 2px);border-top-right-radius:calc(var(--radius) - 2px)}.\\[\\&\\>button\\]\\:hidden>button{display:none}.\\[\\&\\>span\\:last-child\\]\\:truncate>span:last-child{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.\\[\\&\\>span\\]\\:line-clamp-1>span{-webkit-box-orient:vertical;-webkit-line-clamp:1;display:-webkit-box;overflow:hidden}.\\[\\&\\>span\\]\\:text-xs>span{font-size:.75rem;line-height:1rem}.\\[\\&\\>span\\]\\:opacity-70>span{opacity:.7}.\\[\\&\\>svg\\+div\\]\\:translate-y-\\[-3px\\]>svg+div{--tw-translate-y:-3px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.\\[\\&\\>svg\\]\\:absolute>svg{position:absolute}.\\[\\&\\>svg\\]\\:left-4>svg{left:1rem}.\\[\\&\\>svg\\]\\:top-4>svg{top:1rem}.\\[\\&\\>svg\\]\\:size-3\\.5>svg{height:.875rem;width:.875rem}.\\[\\&\\>svg\\]\\:size-4>svg{height:1rem;width:1rem}.\\[\\&\\>svg\\]\\:h-2\\.5>svg{height:.625rem}.\\[\\&\\>svg\\]\\:h-3>svg{height:.75rem}.\\[\\&\\>svg\\]\\:h-3\\.5>svg{height:.875rem}.\\[\\&\\>svg\\]\\:w-2\\.5>svg{width:.625rem}.\\[\\&\\>svg\\]\\:w-3>svg{width:.75rem}.\\[\\&\\>svg\\]\\:w-3\\.5>svg{width:.875rem}.\\[\\&\\>svg\\]\\:shrink-0>svg{flex-shrink:0}.\\[\\&\\>svg\\]\\:text-destructive>svg{color:hsl(var(--destructive))}.\\[\\&\\>svg\\]\\:text-foreground>svg{color:hsl(var(--foreground))}.\\[\\&\\>svg\\]\\:text-muted-foreground>svg{color:hsl(var(--muted-foreground))}.\\[\\&\\>svg\\~\\*\\]\\:pl-7>svg~*{padding-left:1.75rem}.\\[\\&\\>tr\\]\\:last\\:border-b-0:last-child>tr{border-bottom-width:0}.\\[\\&\\[data-state\\=open\\]\\>svg\\]\\:rotate-180[data-state=open]>svg{--tw-rotate:180deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.\\[\\&_\\.react-colorful\\]\\:w-auto .react-colorful{width:auto}.\\[\\&_\\.recharts-cartesian-axis-tick_text\\]\\:fill-muted-foreground .recharts-cartesian-axis-tick text{fill:hsl(var(--muted-foreground))}.\\[\\&_\\.recharts-cartesian-grid_line\\[stroke\\=\\'\\#ccc\\'\\]\\]\\:stroke-border\\/50 .recharts-cartesian-grid line[stroke=\"#ccc\"]{stroke:hsl(var(--border)/.5)}.\\[\\&_\\.recharts-curve\\.recharts-tooltip-cursor\\]\\:stroke-border .recharts-curve.recharts-tooltip-cursor{stroke:hsl(var(--border))}.\\[\\&_\\.recharts-dot\\[stroke\\=\\'\\#fff\\'\\]\\]\\:stroke-transparent .recharts-dot[stroke=\"#fff\"]{stroke:transparent}.\\[\\&_\\.recharts-layer\\]\\:outline-none .recharts-layer{outline:2px solid transparent;outline-offset:2px}.\\[\\&_\\.recharts-polar-grid_\\[stroke\\=\\'\\#ccc\\'\\]\\]\\:stroke-border .recharts-polar-grid [stroke=\"#ccc\"]{stroke:hsl(var(--border))}.\\[\\&_\\.recharts-radial-bar-background-sector\\]\\:fill-muted .recharts-radial-bar-background-sector,.\\[\\&_\\.recharts-rectangle\\.recharts-tooltip-cursor\\]\\:fill-muted .recharts-rectangle.recharts-tooltip-cursor{fill:hsl(var(--muted))}.\\[\\&_\\.recharts-reference-line_\\[stroke\\=\\'\\#ccc\\'\\]\\]\\:stroke-border .recharts-reference-line [stroke=\"#ccc\"]{stroke:hsl(var(--border))}.\\[\\&_\\.recharts-sector\\[stroke\\=\\'\\#fff\\'\\]\\]\\:stroke-transparent .recharts-sector[stroke=\"#fff\"]{stroke:transparent}.\\[\\&_\\.recharts-sector\\]\\:outline-none .recharts-sector,.\\[\\&_\\.recharts-surface\\]\\:outline-none .recharts-surface{outline:2px solid transparent;outline-offset:2px}.\\[\\&_\\[cmdk-group-heading\\]\\]\\:px-2 [cmdk-group-heading]{padding-left:.5rem;padding-right:.5rem}.\\[\\&_\\[cmdk-group-heading\\]\\]\\:py-1\\.5 [cmdk-group-heading]{padding-bottom:.375rem;padding-top:.375rem}.\\[\\&_\\[cmdk-group-heading\\]\\]\\:text-xs [cmdk-group-heading]{font-size:.75rem;line-height:1rem}.\\[\\&_\\[cmdk-group-heading\\]\\]\\:font-medium [cmdk-group-heading]{font-weight:500}.\\[\\&_\\[cmdk-group-heading\\]\\]\\:text-muted-foreground [cmdk-group-heading]{color:hsl(var(--muted-foreground))}.\\[\\&_\\[cmdk-group\\]\\:not\\(\\[hidden\\]\\)_\\~\\[cmdk-group\\]\\]\\:pt-0 [cmdk-group]:not([hidden])~[cmdk-group]{padding-top:0}.\\[\\&_\\[cmdk-group\\]\\]\\:px-2 [cmdk-group]{padding-left:.5rem;padding-right:.5rem}.\\[\\&_\\[cmdk-input-wrapper\\]_svg\\]\\:h-5 [cmdk-input-wrapper] svg{height:1.25rem}.\\[\\&_\\[cmdk-input-wrapper\\]_svg\\]\\:w-5 [cmdk-input-wrapper] svg{width:1.25rem}.\\[\\&_\\[cmdk-input\\]\\]\\:h-12 [cmdk-input]{height:3rem}.\\[\\&_\\[cmdk-item\\]\\]\\:px-2 [cmdk-item]{padding-left:.5rem;padding-right:.5rem}.\\[\\&_\\[cmdk-item\\]\\]\\:py-3 [cmdk-item]{padding-bottom:.75rem;padding-top:.75rem}.\\[\\&_\\[cmdk-item\\]_svg\\]\\:h-5 [cmdk-item] svg{height:1.25rem}.\\[\\&_\\[cmdk-item\\]_svg\\]\\:w-5 [cmdk-item] svg{width:1.25rem}.\\[\\&_p\\]\\:leading-relaxed p{line-height:1.625}.\\[\\&_svg\\]\\:pointer-events-none svg{pointer-events:none}.\\[\\&_svg\\]\\:invisible svg{visibility:hidden}.\\[\\&_svg\\]\\:size-3\\.5 svg{height:.875rem;width:.875rem}.\\[\\&_svg\\]\\:size-4 svg{height:1rem;width:1rem}.\\[\\&_svg\\]\\:size-5 svg{height:1.25rem;width:1.25rem}.\\[\\&_svg\\]\\:shrink-0 svg{flex-shrink:0}.\\[\\&_tr\\:last-child\\]\\:border-0 tr:last-child{border-width:0}.\\[\\&_tr\\]\\:border-b tr{border-bottom-width:1px}[data-side=left][data-collapsible=offcanvas] .\\[\\[data-side\\=left\\]\\[data-collapsible\\=offcanvas\\]_\\&\\]\\:-right-2{right:-.5rem}[data-side=left][data-state=collapsed] .\\[\\[data-side\\=left\\]\\[data-state\\=collapsed\\]_\\&\\]\\:cursor-e-resize{cursor:e-resize}[data-side=left] .\\[\\[data-side\\=left\\]_\\&\\]\\:cursor-w-resize{cursor:w-resize}[data-side=right][data-collapsible=offcanvas] .\\[\\[data-side\\=right\\]\\[data-collapsible\\=offcanvas\\]_\\&\\]\\:-left-2{left:-.5rem}[data-side=right][data-state=collapsed] .\\[\\[data-side\\=right\\]\\[data-state\\=collapsed\\]_\\&\\]\\:cursor-w-resize{cursor:w-resize}[data-side=right] .\\[\\[data-side\\=right\\]_\\&\\]\\:cursor-e-resize{cursor:e-resize}[data-slot=card-content] .\\[\\[data-slot\\=card-content\\]_\\&\\]\\:bg-transparent,[data-slot=popover-content] .\\[\\[data-slot\\=popover-content\\]_\\&\\]\\:bg-transparent{background-color:transparent}";
|
|
3270
|
+
styleInject(css_248z,{"insertAt":"top"});
|
|
3271
|
+
|
|
3272
|
+
exports.Accordion = Accordion;
|
|
3273
|
+
exports.AccordionContent = AccordionContent;
|
|
3274
|
+
exports.AccordionItem = AccordionItem;
|
|
3275
|
+
exports.AccordionTrigger = AccordionTrigger;
|
|
3276
|
+
exports.Alert = Alert;
|
|
3277
|
+
exports.AlertDescription = AlertDescription;
|
|
3278
|
+
exports.AlertDialog = AlertDialog;
|
|
3279
|
+
exports.AlertDialogAction = AlertDialogAction;
|
|
3280
|
+
exports.AlertDialogCancel = AlertDialogCancel;
|
|
3281
|
+
exports.AlertDialogContent = AlertDialogContent;
|
|
3282
|
+
exports.AlertDialogDescription = AlertDialogDescription;
|
|
3283
|
+
exports.AlertDialogFooter = AlertDialogFooter;
|
|
3284
|
+
exports.AlertDialogHeader = AlertDialogHeader;
|
|
3285
|
+
exports.AlertDialogTitle = AlertDialogTitle;
|
|
3286
|
+
exports.AlertDialogTrigger = AlertDialogTrigger;
|
|
3287
|
+
exports.AlertTitle = AlertTitle;
|
|
3288
|
+
exports.Avatar = Avatar;
|
|
3289
|
+
exports.AvatarFallback = AvatarFallback;
|
|
3290
|
+
exports.AvatarImage = AvatarImage;
|
|
3291
|
+
exports.Badge = Badge;
|
|
3292
|
+
exports.Breadcrumb = Breadcrumb;
|
|
3293
|
+
exports.BreadcrumbEllipsis = BreadcrumbEllipsis;
|
|
3294
|
+
exports.BreadcrumbItem = BreadcrumbItem;
|
|
3295
|
+
exports.BreadcrumbLink = BreadcrumbLink;
|
|
3296
|
+
exports.BreadcrumbList = BreadcrumbList;
|
|
3297
|
+
exports.BreadcrumbPage = BreadcrumbPage;
|
|
3298
|
+
exports.BreadcrumbSeparator = BreadcrumbSeparator;
|
|
3299
|
+
exports.Button = Button;
|
|
3300
|
+
exports.Calendar = Calendar;
|
|
3301
|
+
exports.Card = Card;
|
|
3302
|
+
exports.CardContent = CardContent;
|
|
3303
|
+
exports.CardDescription = CardDescription;
|
|
3304
|
+
exports.CardFooter = CardFooter;
|
|
3305
|
+
exports.CardHeader = CardHeader;
|
|
3306
|
+
exports.CardTitle = CardTitle;
|
|
3307
|
+
exports.Carousel = Carousel;
|
|
3308
|
+
exports.CarouselContent = CarouselContent;
|
|
3309
|
+
exports.CarouselItem = CarouselItem;
|
|
3310
|
+
exports.CarouselNext = CarouselNext;
|
|
3311
|
+
exports.CarouselPrevious = CarouselPrevious;
|
|
3312
|
+
exports.ChartContainer = ChartContainer;
|
|
3313
|
+
exports.ChartLegend = ChartLegend;
|
|
3314
|
+
exports.ChartLegendContent = ChartLegendContent;
|
|
3315
|
+
exports.ChartTooltip = ChartTooltip;
|
|
3316
|
+
exports.ChartTooltipContent = ChartTooltipContent;
|
|
3317
|
+
exports.Checkbox = Checkbox;
|
|
3318
|
+
exports.Collapsible = Collapsible;
|
|
3319
|
+
exports.CollapsibleContent = CollapsibleContent;
|
|
3320
|
+
exports.CollapsibleTrigger = CollapsibleTrigger;
|
|
3321
|
+
exports.Command = Command;
|
|
3322
|
+
exports.CommandDialog = CommandDialog;
|
|
3323
|
+
exports.CommandEmpty = CommandEmpty;
|
|
3324
|
+
exports.CommandGroup = CommandGroup;
|
|
3325
|
+
exports.CommandInput = CommandInput;
|
|
3326
|
+
exports.CommandItem = CommandItem;
|
|
3327
|
+
exports.CommandList = CommandList;
|
|
3328
|
+
exports.CommandSeparator = CommandSeparator;
|
|
3329
|
+
exports.CommandShortcut = CommandShortcut;
|
|
3330
|
+
exports.ContextMenu = ContextMenu;
|
|
3331
|
+
exports.ContextMenuCheckboxItem = ContextMenuCheckboxItem;
|
|
3332
|
+
exports.ContextMenuContent = ContextMenuContent;
|
|
3333
|
+
exports.ContextMenuGroup = ContextMenuGroup;
|
|
3334
|
+
exports.ContextMenuItem = ContextMenuItem;
|
|
3335
|
+
exports.ContextMenuLabel = ContextMenuLabel;
|
|
3336
|
+
exports.ContextMenuPortal = ContextMenuPortal;
|
|
3337
|
+
exports.ContextMenuRadioGroup = ContextMenuRadioGroup;
|
|
3338
|
+
exports.ContextMenuRadioItem = ContextMenuRadioItem;
|
|
3339
|
+
exports.ContextMenuSeparator = ContextMenuSeparator;
|
|
3340
|
+
exports.ContextMenuShortcut = ContextMenuShortcut;
|
|
3341
|
+
exports.ContextMenuSub = ContextMenuSub;
|
|
3342
|
+
exports.ContextMenuSubContent = ContextMenuSubContent;
|
|
3343
|
+
exports.ContextMenuSubTrigger = ContextMenuSubTrigger;
|
|
3344
|
+
exports.ContextMenuTrigger = ContextMenuTrigger;
|
|
3345
|
+
exports.DEFAULT_THEME_DATA = DEFAULT_THEME_DATA;
|
|
3346
|
+
exports.DataTable = DataTable;
|
|
3347
|
+
exports.DataTableExport = DataTableExport;
|
|
3348
|
+
exports.DataTableFooter = DataTableFooter;
|
|
3349
|
+
exports.DataTableHeader = DataTableHeader;
|
|
3350
|
+
exports.DataTableRows = DataTableRows;
|
|
3351
|
+
exports.DateRangePicker = DatePickerWithRange;
|
|
3352
|
+
exports.Dialog = Dialog;
|
|
3353
|
+
exports.DialogClose = DialogClose;
|
|
3354
|
+
exports.DialogContent = DialogContent;
|
|
3355
|
+
exports.DialogDescription = DialogDescription;
|
|
3356
|
+
exports.DialogFooter = DialogFooter;
|
|
3357
|
+
exports.DialogHeader = DialogHeader;
|
|
3358
|
+
exports.DialogOverlay = DialogOverlay;
|
|
3359
|
+
exports.DialogPortal = DialogPortal;
|
|
3360
|
+
exports.DialogTitle = DialogTitle;
|
|
3361
|
+
exports.DialogTrigger = DialogTrigger;
|
|
3362
|
+
exports.Drawer = Drawer;
|
|
3363
|
+
exports.DrawerClose = DrawerClose;
|
|
3364
|
+
exports.DrawerContent = DrawerContent;
|
|
3365
|
+
exports.DrawerDescription = DrawerDescription;
|
|
3366
|
+
exports.DrawerFooter = DrawerFooter;
|
|
3367
|
+
exports.DrawerHeader = DrawerHeader;
|
|
3368
|
+
exports.DrawerOverlay = DrawerOverlay;
|
|
3369
|
+
exports.DrawerPortal = DrawerPortal;
|
|
3370
|
+
exports.DrawerTitle = DrawerTitle;
|
|
3371
|
+
exports.DrawerTrigger = DrawerTrigger;
|
|
3372
|
+
exports.DropdownMenu = DropdownMenu;
|
|
3373
|
+
exports.DropdownMenuCheckboxItem = DropdownMenuCheckboxItem;
|
|
3374
|
+
exports.DropdownMenuContent = DropdownMenuContent;
|
|
3375
|
+
exports.DropdownMenuGroup = DropdownMenuGroup;
|
|
3376
|
+
exports.DropdownMenuItem = DropdownMenuItem;
|
|
3377
|
+
exports.DropdownMenuLabel = DropdownMenuLabel;
|
|
3378
|
+
exports.DropdownMenuPortal = DropdownMenuPortal;
|
|
3379
|
+
exports.DropdownMenuRadioGroup = DropdownMenuRadioGroup;
|
|
3380
|
+
exports.DropdownMenuRadioItem = DropdownMenuRadioItem;
|
|
3381
|
+
exports.DropdownMenuSeparator = DropdownMenuSeparator;
|
|
3382
|
+
exports.DropdownMenuShortcut = DropdownMenuShortcut;
|
|
3383
|
+
exports.DropdownMenuSub = DropdownMenuSub;
|
|
3384
|
+
exports.DropdownMenuSubContent = DropdownMenuSubContent;
|
|
3385
|
+
exports.DropdownMenuSubTrigger = DropdownMenuSubTrigger;
|
|
3386
|
+
exports.DropdownMenuTrigger = DropdownMenuTrigger;
|
|
3387
|
+
exports.Form = Form;
|
|
3388
|
+
exports.FormControl = FormControl;
|
|
3389
|
+
exports.FormDataRange = FormDataRange;
|
|
3390
|
+
exports.FormDescription = FormDescription;
|
|
3391
|
+
exports.FormField = FormField;
|
|
3392
|
+
exports.FormInput = FormInput;
|
|
3393
|
+
exports.FormInputCpfCnpj = FormInputCpfCnpj;
|
|
3394
|
+
exports.FormInputCurrency = FormInputCurrency;
|
|
3395
|
+
exports.FormInputDate = FormInputDate;
|
|
3396
|
+
exports.FormInputDecimal = FormInputDecimal;
|
|
3397
|
+
exports.FormInputFile = FormInputFile;
|
|
3398
|
+
exports.FormInputGhost = FormInputGhost;
|
|
3399
|
+
exports.FormInputMask = FormInputMask;
|
|
3400
|
+
exports.FormInputPassWord = FormInputPassWord;
|
|
3401
|
+
exports.FormInputPercent = FormInputPercent;
|
|
3402
|
+
exports.FormInputPhone = FormInputPhone;
|
|
3403
|
+
exports.FormInputSwitch = FormInputSwitch;
|
|
3404
|
+
exports.FormInputText = FormInputText;
|
|
3405
|
+
exports.FormItem = FormItem;
|
|
3406
|
+
exports.FormLabel = FormLabel;
|
|
3407
|
+
exports.FormMessage = FormMessage;
|
|
3408
|
+
exports.FormRadioGroup = FormRadioGroup;
|
|
3409
|
+
exports.FormSelect = FormSelect;
|
|
3410
|
+
exports.FormTextarea = FormTextarea;
|
|
3411
|
+
exports.Header = Header;
|
|
3412
|
+
exports.HoverCard = HoverCard;
|
|
3413
|
+
exports.HoverCardContent = HoverCardContent;
|
|
3414
|
+
exports.HoverCardTrigger = HoverCardTrigger;
|
|
3415
|
+
exports.Input = Input;
|
|
3416
|
+
exports.Label = Label;
|
|
3417
|
+
exports.LabelWithTitle = LabelWithTitle;
|
|
3418
|
+
exports.ModuleSwitcher = ModuleSwitcher;
|
|
3419
|
+
exports.MultiSelect = MultiSelect;
|
|
3420
|
+
exports.NavFooter = NavFooter;
|
|
3421
|
+
exports.NavMain = NavMain;
|
|
3422
|
+
exports.NavSubmenuCollapsible = NavSubmenuCollapsible;
|
|
3423
|
+
exports.NavSubmenuDropdown = NavSubmenuDropdown;
|
|
3424
|
+
exports.NavUser = NavUser;
|
|
3425
|
+
exports.NotFound = NotFound;
|
|
3426
|
+
exports.Pagination = Pagination;
|
|
3427
|
+
exports.PaginationContent = PaginationContent;
|
|
3428
|
+
exports.PaginationEllipsis = PaginationEllipsis;
|
|
3429
|
+
exports.PaginationItem = PaginationItem;
|
|
3430
|
+
exports.PaginationLink = PaginationLink;
|
|
3431
|
+
exports.PaginationNext = PaginationNext;
|
|
3432
|
+
exports.PaginationPrevious = PaginationPrevious;
|
|
3433
|
+
exports.Popover = Popover;
|
|
3434
|
+
exports.PopoverContent = PopoverContent;
|
|
3435
|
+
exports.PopoverTrigger = PopoverTrigger;
|
|
3436
|
+
exports.Progress = Progress;
|
|
3437
|
+
exports.RadioGroup = RadioGroup;
|
|
3438
|
+
exports.RadioGroupItem = RadioGroupItem;
|
|
3439
|
+
exports.ScrollArea = ScrollArea;
|
|
3440
|
+
exports.ScrollBar = ScrollBar;
|
|
3441
|
+
exports.Select = Select;
|
|
3442
|
+
exports.SelectContent = SelectContent;
|
|
3443
|
+
exports.SelectGroup = SelectGroup;
|
|
3444
|
+
exports.SelectItem = SelectItem;
|
|
3445
|
+
exports.SelectLabel = SelectLabel;
|
|
3446
|
+
exports.SelectScrollDownButton = SelectScrollDownButton;
|
|
3447
|
+
exports.SelectScrollUpButton = SelectScrollUpButton;
|
|
3448
|
+
exports.SelectSeparator = SelectSeparator;
|
|
3449
|
+
exports.SelectTrigger = SelectTrigger;
|
|
3450
|
+
exports.SelectValue = SelectValue;
|
|
3451
|
+
exports.Separator = Separator;
|
|
3452
|
+
exports.Sheet = Sheet;
|
|
3453
|
+
exports.SheetClose = SheetClose;
|
|
3454
|
+
exports.SheetContent = SheetContent;
|
|
3455
|
+
exports.SheetDescription = SheetDescription;
|
|
3456
|
+
exports.SheetFooter = SheetFooter;
|
|
3457
|
+
exports.SheetHeader = SheetHeader;
|
|
3458
|
+
exports.SheetOverlay = SheetOverlay;
|
|
3459
|
+
exports.SheetPortal = SheetPortal;
|
|
3460
|
+
exports.SheetTitle = SheetTitle;
|
|
3461
|
+
exports.SheetTrigger = SheetTrigger;
|
|
3462
|
+
exports.Sidebar = Sidebar;
|
|
3463
|
+
exports.SidebarButton = SidebarButton;
|
|
3464
|
+
exports.SidebarContent = SidebarContent;
|
|
3465
|
+
exports.SidebarFooter = SidebarFooter;
|
|
3466
|
+
exports.SidebarGroup = SidebarGroup;
|
|
3467
|
+
exports.SidebarGroupAction = SidebarGroupAction;
|
|
3468
|
+
exports.SidebarGroupContent = SidebarGroupContent;
|
|
3469
|
+
exports.SidebarGroupLabel = SidebarGroupLabel;
|
|
3470
|
+
exports.SidebarHeader = SidebarHeader;
|
|
3471
|
+
exports.SidebarInput = SidebarInput;
|
|
3472
|
+
exports.SidebarInset = SidebarInset;
|
|
3473
|
+
exports.SidebarItem = SidebarItem;
|
|
3474
|
+
exports.SidebarItemTwoLines = SidebarItemTwoLines;
|
|
3475
|
+
exports.SidebarMenu = SidebarMenu;
|
|
3476
|
+
exports.SidebarMenuAction = SidebarMenuAction;
|
|
3477
|
+
exports.SidebarMenuBadge = SidebarMenuBadge;
|
|
3478
|
+
exports.SidebarMenuButton = SidebarMenuButton;
|
|
3479
|
+
exports.SidebarMenuItem = SidebarMenuItem;
|
|
3480
|
+
exports.SidebarMenuSkeleton = SidebarMenuSkeleton;
|
|
3481
|
+
exports.SidebarMenuSub = SidebarMenuSub;
|
|
3482
|
+
exports.SidebarMenuSubButton = SidebarMenuSubButton;
|
|
3483
|
+
exports.SidebarMenuSubItem = SidebarMenuSubItem;
|
|
3484
|
+
exports.SidebarProvider = SidebarProvider;
|
|
3485
|
+
exports.SidebarRail = SidebarRail;
|
|
3486
|
+
exports.SidebarSeparator = SidebarSeparator;
|
|
3487
|
+
exports.SidebarSubmenuType = SidebarSubmenuType;
|
|
3488
|
+
exports.SidebarTrigger = SidebarTrigger;
|
|
3489
|
+
exports.Skeleton = Skeleton;
|
|
3490
|
+
exports.Slider = Slider;
|
|
3491
|
+
exports.Switch = Switch;
|
|
3492
|
+
exports.Table = Table;
|
|
3493
|
+
exports.TableBody = TableBody;
|
|
3494
|
+
exports.TableCaption = TableCaption;
|
|
3495
|
+
exports.TableCell = TableCell;
|
|
3496
|
+
exports.TableFooter = TableFooter;
|
|
3497
|
+
exports.TableHead = TableHead;
|
|
3498
|
+
exports.TableHeader = TableHeader;
|
|
3499
|
+
exports.TableRow = TableRow;
|
|
3500
|
+
exports.Tabs = Tabs;
|
|
3501
|
+
exports.TabsContent = TabsContent;
|
|
3502
|
+
exports.TabsList = TabsList;
|
|
3503
|
+
exports.TabsTrigger = TabsTrigger;
|
|
3504
|
+
exports.Textarea = Textarea;
|
|
3505
|
+
exports.ThemeProvider = ThemeProvider;
|
|
3506
|
+
exports.Toast = Toast;
|
|
3507
|
+
exports.ToastAction = ToastAction;
|
|
3508
|
+
exports.ToastClose = ToastClose;
|
|
3509
|
+
exports.ToastDescription = ToastDescription;
|
|
3510
|
+
exports.ToastProvider = ToastProvider;
|
|
3511
|
+
exports.ToastTitle = ToastTitle;
|
|
3512
|
+
exports.ToastViewport = ToastViewport;
|
|
3513
|
+
exports.Toaster = Toaster;
|
|
3514
|
+
exports.Tooltip = Tooltip;
|
|
3515
|
+
exports.TooltipContent = TooltipContent;
|
|
3516
|
+
exports.TooltipProvider = TooltipProvider;
|
|
3517
|
+
exports.TooltipTrigger = TooltipTrigger;
|
|
3518
|
+
exports.UseCalendar = UseCalendar;
|
|
3519
|
+
exports.aYearAgo = aYearAgo;
|
|
3520
|
+
exports.addDaysToToday = addDaysToToday;
|
|
3521
|
+
exports.badgeVariants = badgeVariants;
|
|
3522
|
+
exports.buttonVariants = buttonVariants;
|
|
3523
|
+
exports.cn = cn;
|
|
3524
|
+
exports.convertBytesToMB = convertBytesToMB;
|
|
3525
|
+
exports.convertDaysToMonth = convertDaysToMonth;
|
|
3526
|
+
exports.convertGbToMb = convertGbToMb;
|
|
3527
|
+
exports.convertMbToGb = convertMbToGb;
|
|
3528
|
+
exports.convertMonthToDays = convertMonthToDays;
|
|
3529
|
+
exports.convertSecondsToMinutes = convertSecondsToMinutes;
|
|
3530
|
+
exports.formHelpText = formHelpText;
|
|
3531
|
+
exports.formLabel = formLabel;
|
|
3532
|
+
exports.formLabelAndSubLabel = formLabelAndSubLabel;
|
|
3533
|
+
exports.formMessage = formMessage;
|
|
3534
|
+
exports.formatCpfCnpj = formatCpfCnpj;
|
|
3535
|
+
exports.formatDate = formatDate;
|
|
3536
|
+
exports.formatDateCalendar = formatDateCalendar;
|
|
3537
|
+
exports.formatDateTime = formatDateTime;
|
|
3538
|
+
exports.formatDecimal = formatDecimal;
|
|
3539
|
+
exports.formatNumber = formatNumber;
|
|
3540
|
+
exports.formatPhone = formatPhone;
|
|
3541
|
+
exports.getFirstDayOf90DaysAgo = getFirstDayOf90DaysAgo;
|
|
3542
|
+
exports.getFirstDayOfCurrentMonth = getFirstDayOfCurrentMonth;
|
|
3543
|
+
exports.getTailwindColorShades = getTailwindColorShades;
|
|
3544
|
+
exports.invertDate = invertDate;
|
|
3545
|
+
exports.isUUIDv4 = isUUIDv4;
|
|
3546
|
+
exports.modifyCpfCnpj = modifyCpfCnpj;
|
|
3547
|
+
exports.modifyPhone = modifyPhone;
|
|
3548
|
+
exports.replaceThemeTailwindColors = replaceThemeTailwindColors;
|
|
3549
|
+
exports.roundNumber = roundNumber;
|
|
3550
|
+
exports.stringDateToDate = stringDateToDate;
|
|
3551
|
+
exports.stringToDate = stringToDate;
|
|
3552
|
+
exports.stringToNumber = stringToNumber;
|
|
3553
|
+
exports.toast = toast;
|
|
3554
|
+
exports.useFormField = useFormField;
|
|
3555
|
+
exports.useSidebar = useSidebar;
|
|
3556
|
+
exports.useTheme = useTheme;
|
|
3557
|
+
exports.useToast = useToast;
|
|
3558
|
+
//# sourceMappingURL=index.js.map
|