eai-frontend-components 2.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +299 -0
- package/dist/components/accordion.d.ts +8 -0
- package/dist/components/accordion.d.ts.map +1 -0
- package/dist/components/accordion.js +13 -0
- package/dist/components/alert-dialog.d.ts +25 -0
- package/dist/components/alert-dialog.d.ts.map +1 -0
- package/dist/components/alert-dialog.js +27 -0
- package/dist/components/alert.d.ts +9 -0
- package/dist/components/alert.d.ts.map +1 -0
- package/dist/components/alert.js +22 -0
- package/dist/components/avatar.d.ts +7 -0
- package/dist/components/avatar.d.ts.map +1 -0
- package/dist/components/avatar.js +11 -0
- package/dist/components/badge.d.ts +10 -0
- package/dist/components/badge.d.ts.map +1 -0
- package/dist/components/badge.js +26 -0
- package/dist/components/breadcrumb.d.ts +20 -0
- package/dist/components/breadcrumb.d.ts.map +1 -0
- package/dist/components/breadcrumb.js +23 -0
- package/dist/components/button.d.ts +12 -0
- package/dist/components/button.d.ts.map +1 -0
- package/dist/components/button.js +33 -0
- package/dist/components/calendar.d.ts +9 -0
- package/dist/components/calendar.d.ts.map +1 -0
- package/dist/components/calendar.js +70 -0
- package/dist/components/card.d.ts +9 -0
- package/dist/components/card.d.ts.map +1 -0
- package/dist/components/card.js +16 -0
- package/dist/components/carousel.d.ts +19 -0
- package/dist/components/carousel.d.ts.map +1 -0
- package/dist/components/carousel.js +98 -0
- package/dist/components/chart.d.ts +63 -0
- package/dist/components/chart.d.ts.map +1 -0
- package/dist/components/chart.js +130 -0
- package/dist/components/checkbox.d.ts +5 -0
- package/dist/components/checkbox.d.ts.map +1 -0
- package/dist/components/checkbox.js +8 -0
- package/dist/components/collapsible.d.ts +6 -0
- package/dist/components/collapsible.d.ts.map +1 -0
- package/dist/components/collapsible.js +5 -0
- package/dist/components/command.d.ts +81 -0
- package/dist/components/command.d.ts.map +1 -0
- package/dist/components/command.js +28 -0
- package/dist/components/context-menu.d.ts +28 -0
- package/dist/components/context-menu.d.ts.map +1 -0
- package/dist/components/context-menu.js +33 -0
- package/dist/components/custom/date-picker.d.ts +12 -0
- package/dist/components/custom/date-picker.d.ts.map +1 -0
- package/dist/components/custom/date-picker.js +35 -0
- package/dist/components/custom/form/checkbox.d.ts +13 -0
- package/dist/components/custom/form/checkbox.d.ts.map +1 -0
- package/dist/components/custom/form/checkbox.js +15 -0
- package/dist/components/custom/form/color.d.ts +15 -0
- package/dist/components/custom/form/color.d.ts.map +1 -0
- package/dist/components/custom/form/color.js +40 -0
- package/dist/components/custom/form/combobox.d.ts +37 -0
- package/dist/components/custom/form/combobox.d.ts.map +1 -0
- package/dist/components/custom/form/combobox.js +82 -0
- package/dist/components/custom/form/cpf-cnpj.d.ts +16 -0
- package/dist/components/custom/form/cpf-cnpj.d.ts.map +1 -0
- package/dist/components/custom/form/cpf-cnpj.js +32 -0
- package/dist/components/custom/form/currency.d.ts +14 -0
- package/dist/components/custom/form/currency.d.ts.map +1 -0
- package/dist/components/custom/form/currency.js +15 -0
- package/dist/components/custom/form/date-range.d.ts +16 -0
- package/dist/components/custom/form/date-range.d.ts.map +1 -0
- package/dist/components/custom/form/date-range.js +24 -0
- package/dist/components/custom/form/date.d.ts +16 -0
- package/dist/components/custom/form/date.d.ts.map +1 -0
- package/dist/components/custom/form/date.js +35 -0
- package/dist/components/custom/form/decimal.d.ts +14 -0
- package/dist/components/custom/form/decimal.d.ts.map +1 -0
- package/dist/components/custom/form/decimal.js +15 -0
- package/dist/components/custom/form/file.d.ts +15 -0
- package/dist/components/custom/form/file.d.ts.map +1 -0
- package/dist/components/custom/form/file.js +18 -0
- package/dist/components/custom/form/form-help-text.d.ts +3 -0
- package/dist/components/custom/form/form-help-text.d.ts.map +1 -0
- package/dist/components/custom/form/form-help-text.js +7 -0
- package/dist/components/custom/form/form-label.d.ts +4 -0
- package/dist/components/custom/form/form-label.d.ts.map +1 -0
- package/dist/components/custom/form/form-label.js +9 -0
- package/dist/components/custom/form/form-message.d.ts +3 -0
- package/dist/components/custom/form/form-message.d.ts.map +1 -0
- package/dist/components/custom/form/form-message.js +5 -0
- package/dist/components/custom/form/ghost.d.ts +8 -0
- package/dist/components/custom/form/ghost.d.ts.map +1 -0
- package/dist/components/custom/form/ghost.js +8 -0
- package/dist/components/custom/form/input.d.ts +18 -0
- package/dist/components/custom/form/input.d.ts.map +1 -0
- package/dist/components/custom/form/input.js +14 -0
- package/dist/components/custom/form/mask.d.ts +19 -0
- package/dist/components/custom/form/mask.d.ts.map +1 -0
- package/dist/components/custom/form/mask.js +19 -0
- package/dist/components/custom/form/multi-select-old.d.ts +19 -0
- package/dist/components/custom/form/multi-select-old.d.ts.map +1 -0
- package/dist/components/custom/form/multi-select-old.js +30 -0
- package/dist/components/custom/form/multi-select.d.ts +26 -0
- package/dist/components/custom/form/multi-select.d.ts.map +1 -0
- package/dist/components/custom/form/multi-select.js +66 -0
- package/dist/components/custom/form/password.d.ts +16 -0
- package/dist/components/custom/form/password.d.ts.map +1 -0
- package/dist/components/custom/form/password.js +14 -0
- package/dist/components/custom/form/percent.d.ts +14 -0
- package/dist/components/custom/form/percent.d.ts.map +1 -0
- package/dist/components/custom/form/percent.js +15 -0
- package/dist/components/custom/form/phone.d.ts +16 -0
- package/dist/components/custom/form/phone.d.ts.map +1 -0
- package/dist/components/custom/form/phone.js +23 -0
- package/dist/components/custom/form/radio-group.d.ts +23 -0
- package/dist/components/custom/form/radio-group.d.ts.map +1 -0
- package/dist/components/custom/form/radio-group.js +15 -0
- package/dist/components/custom/form/select.d.ts +20 -0
- package/dist/components/custom/form/select.d.ts.map +1 -0
- package/dist/components/custom/form/select.js +12 -0
- package/dist/components/custom/form/step-new-form.d.ts +10 -0
- package/dist/components/custom/form/step-new-form.d.ts.map +1 -0
- package/dist/components/custom/form/step-new-form.js +13 -0
- package/dist/components/custom/form/switch.d.ts +13 -0
- package/dist/components/custom/form/switch.d.ts.map +1 -0
- package/dist/components/custom/form/switch.js +16 -0
- package/dist/components/custom/form/text.d.ts +18 -0
- package/dist/components/custom/form/text.d.ts.map +1 -0
- package/dist/components/custom/form/text.js +14 -0
- package/dist/components/custom/form/textarea.d.ts +16 -0
- package/dist/components/custom/form/textarea.d.ts.map +1 -0
- package/dist/components/custom/form/textarea.js +19 -0
- package/dist/components/custom/form/utils.d.ts +18 -0
- package/dist/components/custom/form/utils.d.ts.map +1 -0
- package/dist/components/custom/form/utils.js +88 -0
- package/dist/components/custom/header.d.ts +3 -0
- package/dist/components/custom/header.d.ts.map +1 -0
- package/dist/components/custom/header.js +94 -0
- package/dist/components/custom/label.d.ts +13 -0
- package/dist/components/custom/label.d.ts.map +1 -0
- package/dist/components/custom/label.js +20 -0
- package/dist/components/custom/not-found.d.ts +3 -0
- package/dist/components/custom/not-found.d.ts.map +1 -0
- package/dist/components/custom/not-found.js +9 -0
- package/dist/components/custom/sidebar/app-sidebar.d.ts +5 -0
- package/dist/components/custom/sidebar/app-sidebar.d.ts.map +1 -0
- package/dist/components/custom/sidebar/app-sidebar.js +26 -0
- package/dist/components/custom/sidebar/module-switcher.d.ts +3 -0
- package/dist/components/custom/sidebar/module-switcher.d.ts.map +1 -0
- package/dist/components/custom/sidebar/module-switcher.js +55 -0
- package/dist/components/custom/sidebar/nav-footer.d.ts +3 -0
- package/dist/components/custom/sidebar/nav-footer.d.ts.map +1 -0
- package/dist/components/custom/sidebar/nav-footer.js +17 -0
- package/dist/components/custom/sidebar/nav-main.d.ts +3 -0
- package/dist/components/custom/sidebar/nav-main.d.ts.map +1 -0
- package/dist/components/custom/sidebar/nav-main.js +32 -0
- package/dist/components/custom/sidebar/nav-submenu-collapsible.d.ts +9 -0
- package/dist/components/custom/sidebar/nav-submenu-collapsible.d.ts.map +1 -0
- package/dist/components/custom/sidebar/nav-submenu-collapsible.js +21 -0
- package/dist/components/custom/sidebar/nav-submenu-dropdown.d.ts +10 -0
- package/dist/components/custom/sidebar/nav-submenu-dropdown.d.ts.map +1 -0
- package/dist/components/custom/sidebar/nav-submenu-dropdown.js +13 -0
- package/dist/components/custom/sidebar/nav-user.d.ts +3 -0
- package/dist/components/custom/sidebar/nav-user.d.ts.map +1 -0
- package/dist/components/custom/sidebar/nav-user.js +51 -0
- package/dist/components/custom/sidebar/sidebar-button.d.ts +9 -0
- package/dist/components/custom/sidebar/sidebar-button.d.ts.map +1 -0
- package/dist/components/custom/sidebar/sidebar-button.js +7 -0
- package/dist/components/custom/sidebar/sidebar-item-two-lines.d.ts +12 -0
- package/dist/components/custom/sidebar/sidebar-item-two-lines.d.ts.map +1 -0
- package/dist/components/custom/sidebar/sidebar-item-two-lines.js +5 -0
- package/dist/components/custom/sidebar/sidebar-item.d.ts +9 -0
- package/dist/components/custom/sidebar/sidebar-item.d.ts.map +1 -0
- package/dist/components/custom/sidebar/sidebar-item.js +7 -0
- package/dist/components/custom/sidebar/types/sidebar.d.ts +29 -0
- package/dist/components/custom/sidebar/types/sidebar.d.ts.map +1 -0
- package/dist/components/custom/sidebar/types/sidebar.js +5 -0
- package/dist/components/custom/table/data-table-export.d.ts +8 -0
- package/dist/components/custom/table/data-table-export.d.ts.map +1 -0
- package/dist/components/custom/table/data-table-export.js +65 -0
- package/dist/components/custom/table/data-table-footer.d.ts +25 -0
- package/dist/components/custom/table/data-table-footer.d.ts.map +1 -0
- package/dist/components/custom/table/data-table-footer.js +39 -0
- package/dist/components/custom/table/data-table-header.d.ts +9 -0
- package/dist/components/custom/table/data-table-header.d.ts.map +1 -0
- package/dist/components/custom/table/data-table-header.js +11 -0
- package/dist/components/custom/table/data-table-rows.d.ts +13 -0
- package/dist/components/custom/table/data-table-rows.d.ts.map +1 -0
- package/dist/components/custom/table/data-table-rows.js +25 -0
- package/dist/components/custom/table/data-table.d.ts +35 -0
- package/dist/components/custom/table/data-table.d.ts.map +1 -0
- package/dist/components/custom/table/data-table.js +99 -0
- package/dist/components/custom/table/types/data-table.d.ts +29 -0
- package/dist/components/custom/table/types/data-table.d.ts.map +1 -0
- package/dist/components/custom/table/types/data-table.js +1 -0
- package/dist/components/custom/theme-provider.d.ts +24 -0
- package/dist/components/custom/theme-provider.d.ts.map +1 -0
- package/dist/components/custom/theme-provider.js +79 -0
- package/dist/components/dateRangePicker.d.ts +3 -0
- package/dist/components/dateRangePicker.d.ts.map +1 -0
- package/dist/components/dateRangePicker.js +15 -0
- package/dist/components/dialog.d.ts +23 -0
- package/dist/components/dialog.d.ts.map +1 -0
- package/dist/components/dialog.js +23 -0
- package/dist/components/drawer.d.ts +23 -0
- package/dist/components/drawer.d.ts.map +1 -0
- package/dist/components/drawer.js +22 -0
- package/dist/components/dropdown-menu.d.ts +28 -0
- package/dist/components/dropdown-menu.d.ts.map +1 -0
- package/dist/components/dropdown-menu.js +32 -0
- package/dist/components/form.d.ts +24 -0
- package/dist/components/form.d.ts.map +1 -0
- package/dist/components/form.js +60 -0
- package/dist/components/hover-card.d.ts +7 -0
- package/dist/components/hover-card.d.ts.map +1 -0
- package/dist/components/hover-card.js +9 -0
- package/dist/components/input.d.ts +24 -0
- package/dist/components/input.d.ts.map +1 -0
- package/dist/components/input.js +71 -0
- package/dist/components/label.d.ts +6 -0
- package/dist/components/label.d.ts.map +1 -0
- package/dist/components/label.js +9 -0
- package/dist/components/masks.d.ts +17 -0
- package/dist/components/masks.d.ts.map +1 -0
- package/dist/components/masks.js +25 -0
- package/dist/components/pagination.d.ts +30 -0
- package/dist/components/pagination.d.ts.map +1 -0
- package/dist/components/pagination.js +23 -0
- package/dist/components/popover.d.ts +7 -0
- package/dist/components/popover.d.ts.map +1 -0
- package/dist/components/popover.js +11 -0
- package/dist/components/progress.d.ts +5 -0
- package/dist/components/progress.d.ts.map +1 -0
- package/dist/components/progress.js +7 -0
- package/dist/components/radio-group.d.ts +6 -0
- package/dist/components/radio-group.d.ts.map +1 -0
- package/dist/components/radio-group.js +14 -0
- package/dist/components/scroll-area.d.ts +6 -0
- package/dist/components/scroll-area.d.ts.map +1 -0
- package/dist/components/scroll-area.js +11 -0
- package/dist/components/select.d.ts +14 -0
- package/dist/components/select.d.ts.map +1 -0
- package/dist/components/select.js +24 -0
- package/dist/components/separator.d.ts +5 -0
- package/dist/components/separator.d.ts.map +1 -0
- package/dist/components/separator.js +7 -0
- package/dist/components/sheet.d.ts +26 -0
- package/dist/components/sheet.d.ts.map +1 -0
- package/dist/components/sheet.js +37 -0
- package/dist/components/sidebar.d.ts +67 -0
- package/dist/components/sidebar.d.ts.map +1 -0
- package/dist/components/sidebar.js +221 -0
- package/dist/components/skeleton.d.ts +3 -0
- package/dist/components/skeleton.d.ts.map +1 -0
- package/dist/components/skeleton.js +6 -0
- package/dist/components/slider.d.ts +5 -0
- package/dist/components/slider.d.ts.map +1 -0
- package/dist/components/slider.js +7 -0
- package/dist/components/switch.d.ts +5 -0
- package/dist/components/switch.d.ts.map +1 -0
- package/dist/components/switch.js +7 -0
- package/dist/components/table.d.ts +11 -0
- package/dist/components/table.d.ts.map +1 -0
- package/dist/components/table.js +20 -0
- package/dist/components/tabs.d.ts +8 -0
- package/dist/components/tabs.d.ts.map +1 -0
- package/dist/components/tabs.js +12 -0
- package/dist/components/textarea.d.ts +4 -0
- package/dist/components/textarea.d.ts.map +1 -0
- package/dist/components/textarea.js +14 -0
- package/dist/components/toast.d.ts +16 -0
- package/dist/components/toast.d.ts.map +1 -0
- package/dist/components/toast.js +34 -0
- package/dist/components/toaster.d.ts +2 -0
- package/dist/components/toaster.d.ts.map +1 -0
- package/dist/components/toaster.js +21 -0
- package/dist/components/tooltip.d.ts +8 -0
- package/dist/components/tooltip.d.ts.map +1 -0
- package/dist/components/tooltip.js +10 -0
- package/dist/components/ui/accordion.d.ts +8 -0
- package/dist/components/ui/accordion.d.ts.map +1 -0
- package/dist/components/ui/accordion.js +13 -0
- package/dist/components/ui/alert-dialog.d.ts +25 -0
- package/dist/components/ui/alert-dialog.d.ts.map +1 -0
- package/dist/components/ui/alert-dialog.js +27 -0
- package/dist/components/ui/alert.d.ts +9 -0
- package/dist/components/ui/alert.d.ts.map +1 -0
- package/dist/components/ui/alert.js +22 -0
- package/dist/components/ui/avatar.d.ts +7 -0
- package/dist/components/ui/avatar.d.ts.map +1 -0
- package/dist/components/ui/avatar.js +11 -0
- package/dist/components/ui/badge.d.ts +10 -0
- package/dist/components/ui/badge.d.ts.map +1 -0
- package/dist/components/ui/badge.js +26 -0
- package/dist/components/ui/breadcrumb.d.ts +20 -0
- package/dist/components/ui/breadcrumb.d.ts.map +1 -0
- package/dist/components/ui/breadcrumb.js +23 -0
- package/dist/components/ui/button.d.ts +12 -0
- package/dist/components/ui/button.d.ts.map +1 -0
- package/dist/components/ui/button.js +33 -0
- package/dist/components/ui/calendar.d.ts +9 -0
- package/dist/components/ui/calendar.d.ts.map +1 -0
- package/dist/components/ui/calendar.js +70 -0
- package/dist/components/ui/card.d.ts +9 -0
- package/dist/components/ui/card.d.ts.map +1 -0
- package/dist/components/ui/card.js +16 -0
- package/dist/components/ui/carousel.d.ts +19 -0
- package/dist/components/ui/carousel.d.ts.map +1 -0
- package/dist/components/ui/carousel.js +98 -0
- package/dist/components/ui/chart.d.ts +63 -0
- package/dist/components/ui/chart.d.ts.map +1 -0
- package/dist/components/ui/chart.js +130 -0
- package/dist/components/ui/checkbox.d.ts +5 -0
- package/dist/components/ui/checkbox.d.ts.map +1 -0
- package/dist/components/ui/checkbox.js +8 -0
- package/dist/components/ui/collapsible.d.ts +6 -0
- package/dist/components/ui/collapsible.d.ts.map +1 -0
- package/dist/components/ui/collapsible.js +5 -0
- package/dist/components/ui/command.d.ts +81 -0
- package/dist/components/ui/command.d.ts.map +1 -0
- package/dist/components/ui/command.js +28 -0
- package/dist/components/ui/context-menu.d.ts +28 -0
- package/dist/components/ui/context-menu.d.ts.map +1 -0
- package/dist/components/ui/context-menu.js +33 -0
- package/dist/components/ui/custom/date-picker.d.ts +12 -0
- package/dist/components/ui/custom/date-picker.d.ts.map +1 -0
- package/dist/components/ui/custom/date-picker.js +35 -0
- package/dist/components/ui/custom/form/checkbox.d.ts +13 -0
- package/dist/components/ui/custom/form/checkbox.d.ts.map +1 -0
- package/dist/components/ui/custom/form/checkbox.js +15 -0
- package/dist/components/ui/custom/form/color.d.ts +15 -0
- package/dist/components/ui/custom/form/color.d.ts.map +1 -0
- package/dist/components/ui/custom/form/color.js +40 -0
- package/dist/components/ui/custom/form/combobox.d.ts +37 -0
- package/dist/components/ui/custom/form/combobox.d.ts.map +1 -0
- package/dist/components/ui/custom/form/combobox.js +82 -0
- package/dist/components/ui/custom/form/cpf-cnpj.d.ts +16 -0
- package/dist/components/ui/custom/form/cpf-cnpj.d.ts.map +1 -0
- package/dist/components/ui/custom/form/cpf-cnpj.js +32 -0
- package/dist/components/ui/custom/form/currency.d.ts +14 -0
- package/dist/components/ui/custom/form/currency.d.ts.map +1 -0
- package/dist/components/ui/custom/form/currency.js +15 -0
- package/dist/components/ui/custom/form/date-range.d.ts +16 -0
- package/dist/components/ui/custom/form/date-range.d.ts.map +1 -0
- package/dist/components/ui/custom/form/date-range.js +24 -0
- package/dist/components/ui/custom/form/date.d.ts +16 -0
- package/dist/components/ui/custom/form/date.d.ts.map +1 -0
- package/dist/components/ui/custom/form/date.js +35 -0
- package/dist/components/ui/custom/form/decimal.d.ts +14 -0
- package/dist/components/ui/custom/form/decimal.d.ts.map +1 -0
- package/dist/components/ui/custom/form/decimal.js +15 -0
- package/dist/components/ui/custom/form/file.d.ts +15 -0
- package/dist/components/ui/custom/form/file.d.ts.map +1 -0
- package/dist/components/ui/custom/form/file.js +18 -0
- package/dist/components/ui/custom/form/form-help-text.d.ts +3 -0
- package/dist/components/ui/custom/form/form-help-text.d.ts.map +1 -0
- package/dist/components/ui/custom/form/form-help-text.js +7 -0
- package/dist/components/ui/custom/form/form-label.d.ts +7 -0
- package/dist/components/ui/custom/form/form-label.d.ts.map +1 -0
- package/dist/components/ui/custom/form/form-label.js +9 -0
- package/dist/components/ui/custom/form/form-message.d.ts +5 -0
- package/dist/components/ui/custom/form/form-message.d.ts.map +1 -0
- package/dist/components/ui/custom/form/form-message.js +5 -0
- package/dist/components/ui/custom/form/ghost.d.ts +8 -0
- package/dist/components/ui/custom/form/ghost.d.ts.map +1 -0
- package/dist/components/ui/custom/form/ghost.js +8 -0
- package/dist/components/ui/custom/form/input.d.ts +18 -0
- package/dist/components/ui/custom/form/input.d.ts.map +1 -0
- package/dist/components/ui/custom/form/input.js +14 -0
- package/dist/components/ui/custom/form/mask.d.ts +19 -0
- package/dist/components/ui/custom/form/mask.d.ts.map +1 -0
- package/dist/components/ui/custom/form/mask.js +19 -0
- package/dist/components/ui/custom/form/multi-select-old.d.ts +19 -0
- package/dist/components/ui/custom/form/multi-select-old.d.ts.map +1 -0
- package/dist/components/ui/custom/form/multi-select-old.js +30 -0
- package/dist/components/ui/custom/form/multi-select.d.ts +26 -0
- package/dist/components/ui/custom/form/multi-select.d.ts.map +1 -0
- package/dist/components/ui/custom/form/multi-select.js +66 -0
- package/dist/components/ui/custom/form/password.d.ts +16 -0
- package/dist/components/ui/custom/form/password.d.ts.map +1 -0
- package/dist/components/ui/custom/form/password.js +14 -0
- package/dist/components/ui/custom/form/percent.d.ts +14 -0
- package/dist/components/ui/custom/form/percent.d.ts.map +1 -0
- package/dist/components/ui/custom/form/percent.js +15 -0
- package/dist/components/ui/custom/form/phone.d.ts +16 -0
- package/dist/components/ui/custom/form/phone.d.ts.map +1 -0
- package/dist/components/ui/custom/form/phone.js +23 -0
- package/dist/components/ui/custom/form/radio-group.d.ts +23 -0
- package/dist/components/ui/custom/form/radio-group.d.ts.map +1 -0
- package/dist/components/ui/custom/form/radio-group.js +15 -0
- package/dist/components/ui/custom/form/select.d.ts +20 -0
- package/dist/components/ui/custom/form/select.d.ts.map +1 -0
- package/dist/components/ui/custom/form/select.js +12 -0
- package/dist/components/ui/custom/form/step-new-form.d.ts +10 -0
- package/dist/components/ui/custom/form/step-new-form.d.ts.map +1 -0
- package/dist/components/ui/custom/form/step-new-form.js +13 -0
- package/dist/components/ui/custom/form/switch.d.ts +13 -0
- package/dist/components/ui/custom/form/switch.d.ts.map +1 -0
- package/dist/components/ui/custom/form/switch.js +16 -0
- package/dist/components/ui/custom/form/text.d.ts +18 -0
- package/dist/components/ui/custom/form/text.d.ts.map +1 -0
- package/dist/components/ui/custom/form/text.js +14 -0
- package/dist/components/ui/custom/form/textarea.d.ts +16 -0
- package/dist/components/ui/custom/form/textarea.d.ts.map +1 -0
- package/dist/components/ui/custom/form/textarea.js +19 -0
- package/dist/components/ui/custom/form/utils.d.ts +18 -0
- package/dist/components/ui/custom/form/utils.d.ts.map +1 -0
- package/dist/components/ui/custom/form/utils.js +88 -0
- package/dist/components/ui/custom/header.d.ts +11 -0
- package/dist/components/ui/custom/header.d.ts.map +1 -0
- package/dist/components/ui/custom/header.js +74 -0
- package/dist/components/ui/custom/label.d.ts +13 -0
- package/dist/components/ui/custom/label.d.ts.map +1 -0
- package/dist/components/ui/custom/label.js +20 -0
- package/dist/components/ui/custom/not-found.d.ts +3 -0
- package/dist/components/ui/custom/not-found.d.ts.map +1 -0
- package/dist/components/ui/custom/not-found.js +9 -0
- package/dist/components/ui/custom/sidebar/app-sidebar.d.ts +5 -0
- package/dist/components/ui/custom/sidebar/app-sidebar.d.ts.map +1 -0
- package/dist/components/ui/custom/sidebar/app-sidebar.js +26 -0
- package/dist/components/ui/custom/sidebar/module-switcher.d.ts +9 -0
- package/dist/components/ui/custom/sidebar/module-switcher.d.ts.map +1 -0
- package/dist/components/ui/custom/sidebar/module-switcher.js +55 -0
- package/dist/components/ui/custom/sidebar/nav-footer.d.ts +7 -0
- package/dist/components/ui/custom/sidebar/nav-footer.d.ts.map +1 -0
- package/dist/components/ui/custom/sidebar/nav-footer.js +13 -0
- package/dist/components/ui/custom/sidebar/nav-main.d.ts +7 -0
- package/dist/components/ui/custom/sidebar/nav-main.d.ts.map +1 -0
- package/dist/components/ui/custom/sidebar/nav-main.js +27 -0
- package/dist/components/ui/custom/sidebar/nav-submenu-collapsible.d.ts +9 -0
- package/dist/components/ui/custom/sidebar/nav-submenu-collapsible.d.ts.map +1 -0
- package/dist/components/ui/custom/sidebar/nav-submenu-collapsible.js +18 -0
- package/dist/components/ui/custom/sidebar/nav-submenu-dropdown.d.ts +10 -0
- package/dist/components/ui/custom/sidebar/nav-submenu-dropdown.d.ts.map +1 -0
- package/dist/components/ui/custom/sidebar/nav-submenu-dropdown.js +10 -0
- package/dist/components/ui/custom/sidebar/nav-user.d.ts +9 -0
- package/dist/components/ui/custom/sidebar/nav-user.d.ts.map +1 -0
- package/dist/components/ui/custom/sidebar/nav-user.js +24 -0
- package/dist/components/ui/custom/sidebar/sidebar-button.d.ts +9 -0
- package/dist/components/ui/custom/sidebar/sidebar-button.d.ts.map +1 -0
- package/dist/components/ui/custom/sidebar/sidebar-button.js +7 -0
- package/dist/components/ui/custom/sidebar/sidebar-item-two-lines.d.ts +12 -0
- package/dist/components/ui/custom/sidebar/sidebar-item-two-lines.d.ts.map +1 -0
- package/dist/components/ui/custom/sidebar/sidebar-item-two-lines.js +5 -0
- package/dist/components/ui/custom/sidebar/sidebar-item.d.ts +9 -0
- package/dist/components/ui/custom/sidebar/sidebar-item.d.ts.map +1 -0
- package/dist/components/ui/custom/sidebar/sidebar-item.js +7 -0
- package/dist/components/ui/custom/sidebar/sidebar-module-switcher.d.ts +9 -0
- package/dist/components/ui/custom/sidebar/sidebar-module-switcher.d.ts.map +1 -0
- package/dist/components/ui/custom/sidebar/sidebar-module-switcher.js +20 -0
- package/dist/components/ui/custom/sidebar/types/sidebar.d.ts +29 -0
- package/dist/components/ui/custom/sidebar/types/sidebar.d.ts.map +1 -0
- package/dist/components/ui/custom/sidebar/types/sidebar.js +5 -0
- package/dist/components/ui/custom/table/data-table-export.d.ts +8 -0
- package/dist/components/ui/custom/table/data-table-export.d.ts.map +1 -0
- package/dist/components/ui/custom/table/data-table-export.js +65 -0
- package/dist/components/ui/custom/table/data-table-footer.d.ts +25 -0
- package/dist/components/ui/custom/table/data-table-footer.d.ts.map +1 -0
- package/dist/components/ui/custom/table/data-table-footer.js +39 -0
- package/dist/components/ui/custom/table/data-table-header.d.ts +9 -0
- package/dist/components/ui/custom/table/data-table-header.d.ts.map +1 -0
- package/dist/components/ui/custom/table/data-table-header.js +11 -0
- package/dist/components/ui/custom/table/data-table-rows.d.ts +13 -0
- package/dist/components/ui/custom/table/data-table-rows.d.ts.map +1 -0
- package/dist/components/ui/custom/table/data-table-rows.js +25 -0
- package/dist/components/ui/custom/table/data-table.d.ts +35 -0
- package/dist/components/ui/custom/table/data-table.d.ts.map +1 -0
- package/dist/components/ui/custom/table/data-table.js +99 -0
- package/dist/components/ui/custom/table/types/data-table.d.ts +29 -0
- package/dist/components/ui/custom/table/types/data-table.d.ts.map +1 -0
- package/dist/components/ui/custom/table/types/data-table.js +1 -0
- package/dist/components/ui/custom/theme-provider.d.ts +24 -0
- package/dist/components/ui/custom/theme-provider.d.ts.map +1 -0
- package/dist/components/ui/custom/theme-provider.js +79 -0
- package/dist/components/ui/dateRangePicker.d.ts +3 -0
- package/dist/components/ui/dateRangePicker.d.ts.map +1 -0
- package/dist/components/ui/dateRangePicker.js +15 -0
- package/dist/components/ui/dialog.d.ts +23 -0
- package/dist/components/ui/dialog.d.ts.map +1 -0
- package/dist/components/ui/dialog.js +23 -0
- package/dist/components/ui/drawer.d.ts +23 -0
- package/dist/components/ui/drawer.d.ts.map +1 -0
- package/dist/components/ui/drawer.js +22 -0
- package/dist/components/ui/dropdown-menu.d.ts +28 -0
- package/dist/components/ui/dropdown-menu.d.ts.map +1 -0
- package/dist/components/ui/dropdown-menu.js +32 -0
- package/dist/components/ui/form.d.ts +24 -0
- package/dist/components/ui/form.d.ts.map +1 -0
- package/dist/components/ui/form.js +60 -0
- package/dist/components/ui/hover-card.d.ts +7 -0
- package/dist/components/ui/hover-card.d.ts.map +1 -0
- package/dist/components/ui/hover-card.js +9 -0
- package/dist/components/ui/input.d.ts +24 -0
- package/dist/components/ui/input.d.ts.map +1 -0
- package/dist/components/ui/input.js +71 -0
- package/dist/components/ui/label.d.ts +6 -0
- package/dist/components/ui/label.d.ts.map +1 -0
- package/dist/components/ui/label.js +9 -0
- package/dist/components/ui/masks.d.ts +17 -0
- package/dist/components/ui/masks.d.ts.map +1 -0
- package/dist/components/ui/masks.js +25 -0
- package/dist/components/ui/pagination.d.ts +30 -0
- package/dist/components/ui/pagination.d.ts.map +1 -0
- package/dist/components/ui/pagination.js +23 -0
- package/dist/components/ui/popover.d.ts +7 -0
- package/dist/components/ui/popover.d.ts.map +1 -0
- package/dist/components/ui/popover.js +11 -0
- package/dist/components/ui/progress.d.ts +5 -0
- package/dist/components/ui/progress.d.ts.map +1 -0
- package/dist/components/ui/progress.js +7 -0
- package/dist/components/ui/radio-group.d.ts +6 -0
- package/dist/components/ui/radio-group.d.ts.map +1 -0
- package/dist/components/ui/radio-group.js +14 -0
- package/dist/components/ui/scroll-area.d.ts +6 -0
- package/dist/components/ui/scroll-area.d.ts.map +1 -0
- package/dist/components/ui/scroll-area.js +11 -0
- package/dist/components/ui/select.d.ts +14 -0
- package/dist/components/ui/select.d.ts.map +1 -0
- package/dist/components/ui/select.js +24 -0
- package/dist/components/ui/separator.d.ts +5 -0
- package/dist/components/ui/separator.d.ts.map +1 -0
- package/dist/components/ui/separator.js +7 -0
- package/dist/components/ui/sheet.d.ts +26 -0
- package/dist/components/ui/sheet.d.ts.map +1 -0
- package/dist/components/ui/sheet.js +37 -0
- package/dist/components/ui/sidebar.d.ts +67 -0
- package/dist/components/ui/sidebar.d.ts.map +1 -0
- package/dist/components/ui/sidebar.js +221 -0
- package/dist/components/ui/skeleton.d.ts +3 -0
- package/dist/components/ui/skeleton.d.ts.map +1 -0
- package/dist/components/ui/skeleton.js +6 -0
- package/dist/components/ui/slider.d.ts +5 -0
- package/dist/components/ui/slider.d.ts.map +1 -0
- package/dist/components/ui/slider.js +7 -0
- package/dist/components/ui/switch.d.ts +5 -0
- package/dist/components/ui/switch.d.ts.map +1 -0
- package/dist/components/ui/switch.js +7 -0
- package/dist/components/ui/table.d.ts +11 -0
- package/dist/components/ui/table.d.ts.map +1 -0
- package/dist/components/ui/table.js +20 -0
- package/dist/components/ui/tabs.d.ts +8 -0
- package/dist/components/ui/tabs.d.ts.map +1 -0
- package/dist/components/ui/tabs.js +12 -0
- package/dist/components/ui/textarea.d.ts +4 -0
- package/dist/components/ui/textarea.d.ts.map +1 -0
- package/dist/components/ui/textarea.js +14 -0
- package/dist/components/ui/toast.d.ts +16 -0
- package/dist/components/ui/toast.d.ts.map +1 -0
- package/dist/components/ui/toast.js +34 -0
- package/dist/components/ui/toaster.d.ts +2 -0
- package/dist/components/ui/toaster.d.ts.map +1 -0
- package/dist/components/ui/toaster.js +21 -0
- package/dist/components/ui/tooltip.d.ts +8 -0
- package/dist/components/ui/tooltip.d.ts.map +1 -0
- package/dist/components/ui/tooltip.js +10 -0
- package/dist/components/ui/use-calendar.d.ts +7 -0
- package/dist/components/ui/use-calendar.d.ts.map +1 -0
- package/dist/components/ui/use-calendar.js +23 -0
- package/dist/components/ui/use-toast.d.ts +46 -0
- package/dist/components/ui/use-toast.d.ts.map +1 -0
- package/dist/components/ui/use-toast.js +125 -0
- package/dist/components/use-calendar.d.ts +7 -0
- package/dist/components/use-calendar.d.ts.map +1 -0
- package/dist/components/use-calendar.js +23 -0
- package/dist/components/use-toast.d.ts +46 -0
- package/dist/components/use-toast.d.ts.map +1 -0
- package/dist/components/use-toast.js +125 -0
- package/dist/hooks/use-mobile.d.ts +2 -0
- package/dist/hooks/use-mobile.d.ts.map +1 -0
- package/dist/hooks/use-mobile.js +15 -0
- package/dist/index.d.ts +1514 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.esm.js +3233 -0
- package/dist/index.esm.js.map +1 -0
- package/dist/index.js +3558 -0
- package/dist/index.js.map +1 -0
- package/dist/lib/help/date-utils.d.ts +7 -0
- package/dist/lib/help/date-utils.d.ts.map +1 -0
- package/dist/lib/help/date-utils.js +34 -0
- package/dist/lib/help/format.d.ts +22 -0
- package/dist/lib/help/format.d.ts.map +1 -0
- package/dist/lib/help/format.js +140 -0
- package/dist/lib/help/theme.d.ts +291 -0
- package/dist/lib/help/theme.d.ts.map +1 -0
- package/dist/lib/help/theme.js +340 -0
- package/dist/lib/help/uuid.d.ts +2 -0
- package/dist/lib/help/uuid.d.ts.map +1 -0
- package/dist/lib/help/uuid.js +4 -0
- package/dist/lib/utils.d.ts +3 -0
- package/dist/lib/utils.d.ts.map +1 -0
- package/dist/lib/utils.js +5 -0
- package/package.json +146 -0
- package/src/components/ui/accordion.tsx +48 -0
- package/src/components/ui/alert-dialog.tsx +138 -0
- package/src/components/ui/alert.tsx +36 -0
- package/src/components/ui/avatar.tsx +48 -0
- package/src/components/ui/badge.tsx +35 -0
- package/src/components/ui/breadcrumb.tsx +115 -0
- package/src/components/ui/button.tsx +43 -0
- package/src/components/ui/calendar.tsx +142 -0
- package/src/components/ui/card.tsx +35 -0
- package/src/components/ui/carousel.tsx +257 -0
- package/src/components/ui/chart.tsx +364 -0
- package/src/components/ui/checkbox.tsx +26 -0
- package/src/components/ui/collapsible.tsx +9 -0
- package/src/components/ui/command.tsx +145 -0
- package/src/components/ui/context-menu.tsx +198 -0
- package/src/components/ui/custom/date-picker.tsx +97 -0
- package/src/components/ui/custom/form/checkbox.tsx +53 -0
- package/src/components/ui/custom/form/color.tsx +140 -0
- package/src/components/ui/custom/form/combobox.tsx +259 -0
- package/src/components/ui/custom/form/cpf-cnpj.tsx +85 -0
- package/src/components/ui/custom/form/currency.tsx +51 -0
- package/src/components/ui/custom/form/date-range.tsx +110 -0
- package/src/components/ui/custom/form/date.tsx +109 -0
- package/src/components/ui/custom/form/decimal.tsx +50 -0
- package/src/components/ui/custom/form/file.tsx +65 -0
- package/src/components/ui/custom/form/form-help-text.tsx +20 -0
- package/src/components/ui/custom/form/form-label.tsx +24 -0
- package/src/components/ui/custom/form/form-message.tsx +10 -0
- package/src/components/ui/custom/form/ghost.tsx +28 -0
- package/src/components/ui/custom/form/input.tsx +69 -0
- package/src/components/ui/custom/form/mask.tsx +78 -0
- package/src/components/ui/custom/form/multi-select.tsx +209 -0
- package/src/components/ui/custom/form/password.tsx +70 -0
- package/src/components/ui/custom/form/percent.tsx +52 -0
- package/src/components/ui/custom/form/phone.tsx +79 -0
- package/src/components/ui/custom/form/radio-group.tsx +94 -0
- package/src/components/ui/custom/form/select.tsx +62 -0
- package/src/components/ui/custom/form/step-new-form.tsx +49 -0
- package/src/components/ui/custom/form/switch.tsx +51 -0
- package/src/components/ui/custom/form/text.tsx +71 -0
- package/src/components/ui/custom/form/textarea.tsx +71 -0
- package/src/components/ui/custom/form/utils.ts +100 -0
- package/src/components/ui/custom/header.tsx +128 -0
- package/src/components/ui/custom/label.tsx +79 -0
- package/src/components/ui/custom/not-found.tsx +30 -0
- package/src/components/ui/custom/sidebar/module-switcher.tsx +58 -0
- package/src/components/ui/custom/sidebar/nav-footer.tsx +35 -0
- package/src/components/ui/custom/sidebar/nav-main.tsx +64 -0
- package/src/components/ui/custom/sidebar/nav-submenu-collapsible.tsx +60 -0
- package/src/components/ui/custom/sidebar/nav-submenu-dropdown.tsx +56 -0
- package/src/components/ui/custom/sidebar/nav-user.tsx +77 -0
- package/src/components/ui/custom/sidebar/sidebar-button.tsx +30 -0
- package/src/components/ui/custom/sidebar/sidebar-item-two-lines.tsx +25 -0
- package/src/components/ui/custom/sidebar/sidebar-item.tsx +19 -0
- package/src/components/ui/custom/sidebar/types/sidebar.ts +31 -0
- package/src/components/ui/custom/table/data-table-export.tsx +126 -0
- package/src/components/ui/custom/table/data-table-footer.tsx +148 -0
- package/src/components/ui/custom/table/data-table-header.tsx +58 -0
- package/src/components/ui/custom/table/data-table-rows.tsx +94 -0
- package/src/components/ui/custom/table/data-table.tsx +285 -0
- package/src/components/ui/custom/table/types/data-table.ts +31 -0
- package/src/components/ui/custom/theme-provider.tsx +121 -0
- package/src/components/ui/dateRangePicker.tsx +63 -0
- package/src/components/ui/dialog.tsx +84 -0
- package/src/components/ui/drawer.tsx +116 -0
- package/src/components/ui/dropdown-menu.tsx +173 -0
- package/src/components/ui/form.tsx +114 -0
- package/src/components/ui/hover-card.tsx +27 -0
- package/src/components/ui/input.tsx +265 -0
- package/src/components/ui/label.tsx +15 -0
- package/src/components/ui/masks.ts +35 -0
- package/src/components/ui/pagination.tsx +78 -0
- package/src/components/ui/popover.tsx +32 -0
- package/src/components/ui/progress.tsx +22 -0
- package/src/components/ui/radio-group.tsx +36 -0
- package/src/components/ui/scroll-area.tsx +46 -0
- package/src/components/ui/select.tsx +130 -0
- package/src/components/ui/separator.tsx +29 -0
- package/src/components/ui/sheet.tsx +90 -0
- package/src/components/ui/sidebar.tsx +598 -0
- package/src/components/ui/skeleton.tsx +15 -0
- package/src/components/ui/slider.tsx +18 -0
- package/src/components/ui/switch.tsx +26 -0
- package/src/components/ui/table.tsx +53 -0
- package/src/components/ui/tabs.tsx +47 -0
- package/src/components/ui/textarea.tsx +27 -0
- package/src/components/ui/toast.tsx +88 -0
- package/src/components/ui/toaster.tsx +49 -0
- package/src/components/ui/tooltip.tsx +31 -0
- package/src/components/ui/use-calendar.tsx +61 -0
- package/src/components/ui/use-toast.ts +186 -0
- package/src/hooks/use-mobile.tsx +19 -0
- package/src/index.ts +299 -0
- package/src/lib/help/date-utils.ts +41 -0
- package/src/lib/help/format.ts +171 -0
- package/src/lib/help/theme.ts +346 -0
- package/src/lib/help/uuid.ts +4 -0
- package/src/lib/utils.ts +6 -0
- package/src/styles/globals.css +59 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"context-menu.d.ts","sourceRoot":"","sources":["../../src/components/context-menu.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,KAAK,oBAAoB,MAAM,8BAA8B,CAAA;AAKpE,QAAA,MAAM,WAAW,iDAA4B,CAAA;AAE7C,QAAA,MAAM,kBAAkB,sHAA+B,CAAA;AAEvD,QAAA,MAAM,gBAAgB,mHAA6B,CAAA;AAEnD,QAAA,MAAM,iBAAiB,uDAA8B,CAAA;AAErD,QAAA,MAAM,cAAc,oDAA2B,CAAA;AAE/C,QAAA,MAAM,qBAAqB,wHAAkC,CAAA;AAE7D,QAAA,MAAM,qBAAqB;YAGf,OAAO;wCAejB,CAAA;AAGF,QAAA,MAAM,qBAAqB,2KAYzB,CAAA;AAGF,QAAA,MAAM,kBAAkB,wKActB,CAAA;AAGF,QAAA,MAAM,eAAe;YAGT,OAAO;wCAYjB,CAAA;AAGF,QAAA,MAAM,uBAAuB,6KAoB3B,CAAA;AAIF,QAAA,MAAM,oBAAoB,0KAmBxB,CAAA;AAGF,QAAA,MAAM,gBAAgB;YAGV,OAAO;wCAYjB,CAAA;AAGF,QAAA,MAAM,oBAAoB,0KASxB,CAAA;AAGF,QAAA,MAAM,mBAAmB;8BAGtB,KAAK,CAAC,cAAc,CAAC,eAAe,CAAC;;CAUvC,CAAA;AAGD,OAAO,EACL,WAAW,EACX,kBAAkB,EAClB,kBAAkB,EAClB,eAAe,EACf,uBAAuB,EACvB,oBAAoB,EACpB,gBAAgB,EAChB,oBAAoB,EACpB,mBAAmB,EACnB,gBAAgB,EAChB,iBAAiB,EACjB,cAAc,EACd,qBAAqB,EACrB,qBAAqB,EACrB,qBAAqB,GACtB,CAAA"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import * as ContextMenuPrimitive from "@radix-ui/react-context-menu";
|
|
4
|
+
import { Check, ChevronRight, Circle } from "lucide-react";
|
|
5
|
+
import { cn } from "@/lib/utils";
|
|
6
|
+
const ContextMenu = ContextMenuPrimitive.Root;
|
|
7
|
+
const ContextMenuTrigger = ContextMenuPrimitive.Trigger;
|
|
8
|
+
const ContextMenuGroup = ContextMenuPrimitive.Group;
|
|
9
|
+
const ContextMenuPortal = ContextMenuPrimitive.Portal;
|
|
10
|
+
const ContextMenuSub = ContextMenuPrimitive.Sub;
|
|
11
|
+
const ContextMenuRadioGroup = ContextMenuPrimitive.RadioGroup;
|
|
12
|
+
const ContextMenuSubTrigger = React.forwardRef(({ className, inset, children, ...props }, ref) => (_jsxs(ContextMenuPrimitive.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, _jsx(ChevronRight, { className: "ml-auto h-4 w-4" })] })));
|
|
13
|
+
ContextMenuSubTrigger.displayName = ContextMenuPrimitive.SubTrigger.displayName;
|
|
14
|
+
const ContextMenuSubContent = React.forwardRef(({ className, ...props }, ref) => (_jsx(ContextMenuPrimitive.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 })));
|
|
15
|
+
ContextMenuSubContent.displayName = ContextMenuPrimitive.SubContent.displayName;
|
|
16
|
+
const ContextMenuContent = React.forwardRef(({ className, ...props }, ref) => (_jsx(ContextMenuPrimitive.Portal, { children: _jsx(ContextMenuPrimitive.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 }) })));
|
|
17
|
+
ContextMenuContent.displayName = ContextMenuPrimitive.Content.displayName;
|
|
18
|
+
const ContextMenuItem = React.forwardRef(({ className, inset, ...props }, ref) => (_jsx(ContextMenuPrimitive.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 })));
|
|
19
|
+
ContextMenuItem.displayName = ContextMenuPrimitive.Item.displayName;
|
|
20
|
+
const ContextMenuCheckboxItem = React.forwardRef(({ className, children, checked, ...props }, ref) => (_jsxs(ContextMenuPrimitive.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: [_jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: _jsx(ContextMenuPrimitive.ItemIndicator, { children: _jsx(Check, { className: "h-4 w-4" }) }) }), children] })));
|
|
21
|
+
ContextMenuCheckboxItem.displayName =
|
|
22
|
+
ContextMenuPrimitive.CheckboxItem.displayName;
|
|
23
|
+
const ContextMenuRadioItem = React.forwardRef(({ className, children, ...props }, ref) => (_jsxs(ContextMenuPrimitive.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: [_jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: _jsx(ContextMenuPrimitive.ItemIndicator, { children: _jsx(Circle, { className: "h-2 w-2 fill-current" }) }) }), children] })));
|
|
24
|
+
ContextMenuRadioItem.displayName = ContextMenuPrimitive.RadioItem.displayName;
|
|
25
|
+
const ContextMenuLabel = React.forwardRef(({ className, inset, ...props }, ref) => (_jsx(ContextMenuPrimitive.Label, { ref: ref, className: cn("px-2 py-1.5 text-sm font-semibold text-foreground", inset && "pl-8", className), ...props })));
|
|
26
|
+
ContextMenuLabel.displayName = ContextMenuPrimitive.Label.displayName;
|
|
27
|
+
const ContextMenuSeparator = React.forwardRef(({ className, ...props }, ref) => (_jsx(ContextMenuPrimitive.Separator, { ref: ref, className: cn("-mx-1 my-1 h-px bg-border", className), ...props })));
|
|
28
|
+
ContextMenuSeparator.displayName = ContextMenuPrimitive.Separator.displayName;
|
|
29
|
+
const ContextMenuShortcut = ({ className, ...props }) => {
|
|
30
|
+
return (_jsx("span", { className: cn("ml-auto text-xs tracking-widest text-muted-foreground", className), ...props }));
|
|
31
|
+
};
|
|
32
|
+
ContextMenuShortcut.displayName = "ContextMenuShortcut";
|
|
33
|
+
export { ContextMenu, ContextMenuTrigger, ContextMenuContent, ContextMenuItem, ContextMenuCheckboxItem, ContextMenuRadioItem, ContextMenuLabel, ContextMenuSeparator, ContextMenuShortcut, ContextMenuGroup, ContextMenuPortal, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuRadioGroup, };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { DayPicker } from 'react-day-picker';
|
|
3
|
+
export type CalendarProps = React.ComponentProps<typeof DayPicker>;
|
|
4
|
+
interface CalendarFormProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
5
|
+
onDateSelected: (selectedDateProps: Date | null) => void;
|
|
6
|
+
selectedDateProps?: Date | null;
|
|
7
|
+
startYear?: number;
|
|
8
|
+
endYear?: number;
|
|
9
|
+
}
|
|
10
|
+
declare const DatePicker: React.ForwardRefExoticComponent<CalendarFormProps & React.RefAttributes<HTMLDivElement>>;
|
|
11
|
+
export { DatePicker };
|
|
12
|
+
//# sourceMappingURL=date-picker.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"date-picker.d.ts","sourceRoot":"","sources":["../../../src/components/custom/date-picker.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAmB,MAAM,OAAO,CAAC;AACxC,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAK7C,MAAM,MAAM,aAAa,GAAG,KAAK,CAAC,cAAc,CAAC,OAAO,SAAS,CAAC,CAAC;AAEnE,UAAU,iBAAkB,SAAQ,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC;IACvE,cAAc,EAAE,CAAC,iBAAiB,EAAE,IAAI,GAAG,IAAI,KAAK,IAAI,CAAC;IACzD,iBAAiB,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;IAChC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,QAAA,MAAM,UAAU,0FA0Ef,CAAC;AAEF,OAAO,EAAE,UAAU,EAAE,CAAC"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { cn } from '@/lib/utils';
|
|
3
|
+
import { getMonth, getYear, setMonth, setYear } from 'date-fns';
|
|
4
|
+
import { ptBR } from 'date-fns/locale';
|
|
5
|
+
import { Calendar as CalendarIcon } from 'lucide-react';
|
|
6
|
+
import React, { useState } from 'react';
|
|
7
|
+
import { Calendar as CalendarComponent } from '../calendar';
|
|
8
|
+
import { Popover, PopoverContent, PopoverTrigger } from '../popover';
|
|
9
|
+
import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from '../select';
|
|
10
|
+
const DatePicker = React.forwardRef(({ className, onDateSelected, selectedDateProps, startYear = getYear(new Date()) - 100, endYear = getYear(new Date()) + 100, ...props }, ref) => {
|
|
11
|
+
const [selectedDate, setSelectedDate] = useState(null);
|
|
12
|
+
const [isPopoverOpen, setIsPopoverOpen] = useState(false);
|
|
13
|
+
const months = ['Janeiro', 'Fevereiro', 'Março', 'Abril', 'Maio', 'Junho', 'Julho', 'Agosto', 'Setembro', 'Outubro', 'Novembro', 'Dezembro'];
|
|
14
|
+
const years = Array.from({ length: endYear - startYear + 1 }, (_, i) => startYear + i);
|
|
15
|
+
const handleMonthChange = (month) => {
|
|
16
|
+
if (selectedDate) {
|
|
17
|
+
const newDate = setMonth(selectedDate, months.indexOf(month));
|
|
18
|
+
setSelectedDate(newDate);
|
|
19
|
+
}
|
|
20
|
+
};
|
|
21
|
+
const handleYearChange = (year) => {
|
|
22
|
+
if (selectedDate) {
|
|
23
|
+
const newDate = setYear(selectedDate, parseInt(year, 10));
|
|
24
|
+
setSelectedDate(newDate);
|
|
25
|
+
}
|
|
26
|
+
};
|
|
27
|
+
const handleDateChange = (selectedDate) => {
|
|
28
|
+
const newDate = selectedDate || null;
|
|
29
|
+
setSelectedDate(newDate);
|
|
30
|
+
setIsPopoverOpen(false);
|
|
31
|
+
onDateSelected(newDate);
|
|
32
|
+
};
|
|
33
|
+
return (_jsx("div", { className: cn('gap-2', className), ref: ref, ...props, children: _jsxs(Popover, { open: isPopoverOpen, onOpenChange: setIsPopoverOpen, children: [_jsx(PopoverTrigger, { asChild: true, children: _jsx(CalendarIcon, { size: 16, className: 'cursor-pointer text-gray-500', onClick: () => setIsPopoverOpen(true) }) }), _jsxs(PopoverContent, { className: 'w-auto p-0 flex flex-col justify-center', align: 'start', children: [_jsxs("div", { className: 'flex justify-between pt-5 px-5', children: [_jsxs(Select, { onValueChange: handleMonthChange, value: months[getMonth(selectedDate || new Date())], children: [_jsx(SelectTrigger, { className: 'w-[100px]', children: _jsx(SelectValue, { placeholder: 'Month' }) }), _jsx(SelectContent, { children: months.map((month) => (_jsx(SelectItem, { value: month, children: month }, month))) })] }), _jsxs(Select, { onValueChange: handleYearChange, value: getYear(selectedDate || new Date()).toString(), children: [_jsx(SelectTrigger, { className: 'w-[100px]', children: _jsx(SelectValue, { placeholder: 'Year' }) }), _jsx(SelectContent, { children: years.map((year) => (_jsx(SelectItem, { value: year.toString(), children: year }, year))) })] })] }), _jsx(CalendarComponent, { mode: 'single', locale: ptBR, onSelect: handleDateChange, className: 'bg-white text-black', month: selectedDate || undefined })] })] }) }));
|
|
34
|
+
});
|
|
35
|
+
export { DatePicker };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
interface Props {
|
|
2
|
+
control: any;
|
|
3
|
+
name: string;
|
|
4
|
+
label: string;
|
|
5
|
+
subLabel?: string;
|
|
6
|
+
helpText?: JSX.Element;
|
|
7
|
+
className?: string;
|
|
8
|
+
disabled?: boolean;
|
|
9
|
+
onCheckedChange?: (checked: boolean) => void;
|
|
10
|
+
}
|
|
11
|
+
export declare const FormInputCheckbox: React.FC<Props>;
|
|
12
|
+
export {};
|
|
13
|
+
//# sourceMappingURL=checkbox.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"checkbox.d.ts","sourceRoot":"","sources":["../../../../src/components/custom/form/checkbox.tsx"],"names":[],"mappings":"AAMA,UAAU,KAAK;IACd,OAAO,EAAE,GAAG,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,GAAG,CAAC,OAAO,CAAC;IACvB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,eAAe,CAAC,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,CAAC;CAC7C;AAED,eAAO,MAAM,iBAAiB,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,CAmC7C,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import * as FormComponents from '../../form';
|
|
3
|
+
import { Checkbox } from './../../checkbox';
|
|
4
|
+
import { formHelpText } from './form-help-text';
|
|
5
|
+
import { formLabel } from './form-label';
|
|
6
|
+
import { formMessage } from './form-message';
|
|
7
|
+
export const FormInputCheckbox = ({ control, name, label, helpText, className, disabled, onCheckedChange }) => {
|
|
8
|
+
const { FormField, FormItem, FormLabel, FormControl, FormMessage } = FormComponents;
|
|
9
|
+
return (_jsx(FormField, { control: control, name: name, render: ({ field }) => (_jsxs(FormItem, { className: className, children: [_jsxs("div", { className: 'flex items-center gap-2', children: [_jsx(FormControl, { children: _jsx(Checkbox, { value: field.value, className: `${field.value
|
|
10
|
+
? 'bg-purple-700 border border-purple-900 text-white rounded-[3px]'
|
|
11
|
+
: 'bg-white border border-black text-black'}`, onCheckedChange: (checked) => {
|
|
12
|
+
field?.onChange?.(checked);
|
|
13
|
+
onCheckedChange?.(checked);
|
|
14
|
+
}, disabled: disabled }) }), _jsxs("div", { className: 'flex h-full items-center space-x-1.5', children: [label && formLabel(FormLabel, label), helpText && formHelpText(helpText)] })] }), formMessage(FormMessage)] })) }));
|
|
15
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
interface Props {
|
|
2
|
+
control: any;
|
|
3
|
+
id?: string;
|
|
4
|
+
name: string;
|
|
5
|
+
label: string;
|
|
6
|
+
subLabel?: string;
|
|
7
|
+
helpText?: JSX.Element;
|
|
8
|
+
placeholder?: string;
|
|
9
|
+
className?: string;
|
|
10
|
+
disabled?: boolean;
|
|
11
|
+
required?: boolean;
|
|
12
|
+
}
|
|
13
|
+
export declare const FormInputColor: React.FC<Props>;
|
|
14
|
+
export {};
|
|
15
|
+
//# sourceMappingURL=color.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"color.d.ts","sourceRoot":"","sources":["../../../../src/components/custom/form/color.tsx"],"names":[],"mappings":"AAcA,UAAU,KAAK;IACd,OAAO,EAAE,GAAG,CAAC;IACb,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,GAAG,CAAC,OAAO,CAAC;IACvB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,eAAO,MAAM,cAAc,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,CAgH1C,CAAC"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { cn } from '@/lib/utils';
|
|
3
|
+
import { Paintbrush } from 'lucide-react';
|
|
4
|
+
import { useState } from 'react';
|
|
5
|
+
import { HexColorPicker } from 'react-colorful';
|
|
6
|
+
import * as FormComponents from '../../form';
|
|
7
|
+
import { Button } from './button';
|
|
8
|
+
import { formHelpText } from './form-help-text';
|
|
9
|
+
import { formLabelAndSubLabel } from './form-label';
|
|
10
|
+
import { formMessage } from './form-message';
|
|
11
|
+
import { Input } from './input';
|
|
12
|
+
import { Label } from './label';
|
|
13
|
+
import { Popover, PopoverContent, PopoverTrigger } from './popover';
|
|
14
|
+
import { hexToRgb, rgbToHex } from './utils';
|
|
15
|
+
export const FormInputColor = ({ control, name, label, subLabel, helpText, placeholder, className, disabled, required }) => {
|
|
16
|
+
const { FormField, FormItem, FormLabel, FormControl, FormMessage } = FormComponents;
|
|
17
|
+
const DEFAULT_COLOR = '#000000';
|
|
18
|
+
const [currentColor, setCurrentColor] = useState(DEFAULT_COLOR);
|
|
19
|
+
const rgb = hexToRgb(currentColor) || { r: 0, g: 0, b: 0 };
|
|
20
|
+
const handleColorChange = (newColor, onChange) => {
|
|
21
|
+
onChange?.(newColor);
|
|
22
|
+
setCurrentColor(newColor);
|
|
23
|
+
};
|
|
24
|
+
const handleHexChange = (hex, onChange) => {
|
|
25
|
+
if (/^#[0-9A-Fa-f]{6}$/.test(hex)) {
|
|
26
|
+
handleColorChange(hex, onChange);
|
|
27
|
+
}
|
|
28
|
+
else {
|
|
29
|
+
setCurrentColor(hex);
|
|
30
|
+
}
|
|
31
|
+
};
|
|
32
|
+
const handleRgbChange = (key, value, onChange) => {
|
|
33
|
+
const numValue = Number.parseInt(value);
|
|
34
|
+
if (!Number.isNaN(numValue) && numValue >= 0 && numValue <= 255) {
|
|
35
|
+
const newRgb = { ...rgb, [key]: numValue };
|
|
36
|
+
handleColorChange(rgbToHex(newRgb), onChange);
|
|
37
|
+
}
|
|
38
|
+
};
|
|
39
|
+
return (_jsx(FormField, { control: control, name: name, render: ({ field, formState }) => (_jsxs(FormItem, { className: className, children: [_jsxs("div", { className: 'flex items-center space-x-1.5', children: [label && formLabelAndSubLabel(FormLabel, label, subLabel, required), helpText && formHelpText(helpText)] }), _jsxs(Popover, { children: [_jsx(PopoverTrigger, { asChild: true, children: _jsx(FormControl, { children: _jsx(Button, { variant: 'outline', className: cn('w-[240px] justify-start text-left font-normal', !field.value && 'text-zinc-500', className), disabled: disabled || formState.isSubmitting, children: _jsxs("div", { className: 'w-full flex items-center gap-2', children: [field.value ? (_jsx("div", { className: 'h-4 w-4 rounded !bg-center !bg-cover transition-all border', style: { backgroundColor: field.value } })) : (_jsx(Paintbrush, { className: 'h-4 w-4' })), _jsx("div", { className: 'truncate flex-1 text-sm', children: field.value ? field.value : placeholder || 'Selecione uma cor' })] }) }) }) }), _jsx(PopoverContent, { className: cn('w-80', className), children: _jsxs("div", { className: 'flex flex-col gap-4', children: [_jsx("section", { className: '[&_.react-colorful]:w-auto', children: _jsx(HexColorPicker, { color: field.value ?? DEFAULT_COLOR, onChange: (newColor) => handleColorChange(newColor, field.onChange) }) }), _jsxs("div", { className: 'flex gap-2', children: [_jsxs("div", { className: 'flex flex-col gap-1', children: [_jsx(Label, { children: "Hex" }), _jsx(Input, { value: currentColor, onChange: (e) => handleHexChange(e.target.value, field.onChange), maxLength: 7 })] }), _jsxs("div", { className: 'flex gap-2', children: [_jsxs("div", { className: 'flex flex-col gap-1', children: [_jsx(Label, { children: "R" }), _jsx(Input, { value: rgb.r, onChange: (e) => handleRgbChange('r', e.target.value, field.onChange), className: 'w-14' })] }), _jsxs("div", { className: 'flex flex-col gap-1', children: [_jsx(Label, { children: "G" }), _jsx(Input, { value: rgb.g, onChange: (e) => handleRgbChange('g', e.target.value, field.onChange), className: 'w-14' })] }), _jsxs("div", { className: 'flex flex-col gap-1', children: [_jsx(Label, { children: "B" }), _jsx(Input, { value: rgb.b, onChange: (e) => handleRgbChange('b', e.target.value, field.onChange), className: 'w-14' })] })] })] })] }) })] }), formMessage(FormMessage)] })) }));
|
|
40
|
+
};
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
export interface ComboboxOption {
|
|
2
|
+
value: string | undefined;
|
|
3
|
+
icon?: React.ReactNode | undefined;
|
|
4
|
+
title: string;
|
|
5
|
+
subTitle?: string;
|
|
6
|
+
className?: string;
|
|
7
|
+
}
|
|
8
|
+
interface Props {
|
|
9
|
+
control: any;
|
|
10
|
+
name: string;
|
|
11
|
+
label?: string;
|
|
12
|
+
subLabel?: string;
|
|
13
|
+
helpText?: JSX.Element;
|
|
14
|
+
placeholder?: string;
|
|
15
|
+
className?: string;
|
|
16
|
+
disabled?: boolean;
|
|
17
|
+
required?: boolean;
|
|
18
|
+
options: ComboboxOption[];
|
|
19
|
+
selectedOption?: ComboboxOption;
|
|
20
|
+
iconLeft?: React.ReactNode | null;
|
|
21
|
+
iconRight?: React.ReactNode | null;
|
|
22
|
+
addEmptyOption?: boolean;
|
|
23
|
+
canUnselect?: boolean;
|
|
24
|
+
closePopUpOnChange?: boolean;
|
|
25
|
+
runInternalSearch?: boolean;
|
|
26
|
+
disabledSearch?: boolean;
|
|
27
|
+
onChange?: (option: ComboboxOption | undefined) => void;
|
|
28
|
+
onSearch?: (searchString: string) => void;
|
|
29
|
+
footerAction?: {
|
|
30
|
+
label: string;
|
|
31
|
+
icon?: React.ReactNode;
|
|
32
|
+
onClick: () => void;
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
export declare const FormCombobox: React.FC<Props>;
|
|
36
|
+
export {};
|
|
37
|
+
//# sourceMappingURL=combobox.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"combobox.d.ts","sourceRoot":"","sources":["../../../../src/components/custom/form/combobox.tsx"],"names":[],"mappings":"AAYA,MAAM,WAAW,cAAc;IAC9B,KAAK,EAAE,MAAM,GAAG,SAAS,CAAC;IAC1B,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,GAAG,SAAS,CAAC;IACnC,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,UAAU,KAAK;IACd,OAAO,EAAE,GAAG,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,GAAG,CAAC,OAAO,CAAC;IACvB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,OAAO,EAAE,cAAc,EAAE,CAAC;IAC1B,cAAc,CAAC,EAAE,cAAc,CAAC;IAChC,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,GAAG,IAAI,CAAC;IAClC,SAAS,CAAC,EAAE,KAAK,CAAC,SAAS,GAAG,IAAI,CAAC;IACnC,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,QAAQ,CAAC,EAAE,CAAC,MAAM,EAAE,cAAc,GAAG,SAAS,KAAK,IAAI,CAAC;IACxD,QAAQ,CAAC,EAAE,CAAC,YAAY,EAAE,MAAM,KAAK,IAAI,CAAC;IAC1C,YAAY,CAAC,EAAE;QACd,KAAK,EAAE,MAAM,CAAC;QACd,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;QACvB,OAAO,EAAE,MAAM,IAAI,CAAC;KACpB,CAAC;CACF;AAED,eAAO,MAAM,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,CAkNxC,CAAC"}
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { cn } from '@/lib/utils';
|
|
3
|
+
import { Check, ChevronsUpDown, LoaderCircle, X } from 'lucide-react';
|
|
4
|
+
import { useEffect, useState } from 'react';
|
|
5
|
+
import * as FormComponents from '../../form';
|
|
6
|
+
import { Button } from './button';
|
|
7
|
+
import { Command, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList } from './command';
|
|
8
|
+
import { formHelpText } from './form-help-text';
|
|
9
|
+
import { formLabelAndSubLabel } from './form-label';
|
|
10
|
+
import { formMessage } from './form-message';
|
|
11
|
+
import { Popover, PopoverContent, PopoverTrigger } from './popover';
|
|
12
|
+
export const FormCombobox = ({ control, name, label, subLabel, helpText, placeholder, className, disabled, required, options, selectedOption, iconLeft, iconRight, addEmptyOption, canUnselect = false, closePopUpOnChange = true, runInternalSearch = true, disabledSearch = false, onChange, onSearch, footerAction, }) => {
|
|
13
|
+
const { FormField, FormItem, FormLabel, FormControl, FormMessage } = FormComponents;
|
|
14
|
+
const [open, setOpen] = useState(false);
|
|
15
|
+
const [loading, setLoading] = useState(false);
|
|
16
|
+
const [searchString, setSearchString] = useState('');
|
|
17
|
+
const DEFAULT_PLACEHOLDER = 'Digite para buscar...';
|
|
18
|
+
useEffect(() => {
|
|
19
|
+
setLoading(false);
|
|
20
|
+
}, [options]);
|
|
21
|
+
const getOptions = () => {
|
|
22
|
+
if (options.length === 0) {
|
|
23
|
+
return [];
|
|
24
|
+
}
|
|
25
|
+
let filteredOptions = options;
|
|
26
|
+
if (runInternalSearch) {
|
|
27
|
+
filteredOptions = options.filter((option) => {
|
|
28
|
+
const title = option.title
|
|
29
|
+
.toLowerCase()
|
|
30
|
+
.normalize('NFD')
|
|
31
|
+
.replace(/[^a-z0-9\s]/gi, '');
|
|
32
|
+
const subTitle = option.subTitle
|
|
33
|
+
?.toLowerCase()
|
|
34
|
+
.normalize('NFD')
|
|
35
|
+
.replace(/[^a-z0-9\s]/gi, '');
|
|
36
|
+
const search = searchString
|
|
37
|
+
.toLowerCase()
|
|
38
|
+
.normalize('NFD')
|
|
39
|
+
.replace(/[^a-z0-9\s]/gi, '');
|
|
40
|
+
return title.includes(search) || subTitle?.includes(search);
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
if (addEmptyOption) {
|
|
44
|
+
filteredOptions.unshift({ value: undefined, title: '--Selecione--', subTitle: '' });
|
|
45
|
+
}
|
|
46
|
+
return filteredOptions;
|
|
47
|
+
};
|
|
48
|
+
const getSelectedOption = (value) => {
|
|
49
|
+
const option = options.find((option) => option.value === value);
|
|
50
|
+
if (option) {
|
|
51
|
+
return option;
|
|
52
|
+
}
|
|
53
|
+
return selectedOption;
|
|
54
|
+
};
|
|
55
|
+
const handleSelect = (value, field) => {
|
|
56
|
+
const option = value ? getSelectedOption(value) : undefined;
|
|
57
|
+
if (canUnselect) {
|
|
58
|
+
field.onChange(field.value === value ? undefined : value);
|
|
59
|
+
}
|
|
60
|
+
else {
|
|
61
|
+
field.onChange(value);
|
|
62
|
+
}
|
|
63
|
+
if (onChange) {
|
|
64
|
+
onChange(option);
|
|
65
|
+
}
|
|
66
|
+
if (closePopUpOnChange) {
|
|
67
|
+
setOpen(false);
|
|
68
|
+
}
|
|
69
|
+
};
|
|
70
|
+
const handleKeyUp = (event) => {
|
|
71
|
+
const searchString = event.target.value;
|
|
72
|
+
if (onSearch) {
|
|
73
|
+
setLoading(true);
|
|
74
|
+
onSearch(searchString);
|
|
75
|
+
}
|
|
76
|
+
setSearchString(searchString);
|
|
77
|
+
};
|
|
78
|
+
return (_jsx(FormField, { control: control, name: name, render: ({ field, formState }) => (_jsxs(FormItem, { className: className, children: [_jsxs("div", { className: 'flex items-center space-x-1.5', children: [label && formLabelAndSubLabel(FormLabel, label, subLabel, required), helpText && formHelpText(helpText)] }), _jsxs(Popover, { open: open, onOpenChange: (open) => {
|
|
79
|
+
if (!disabled)
|
|
80
|
+
setOpen(open);
|
|
81
|
+
}, children: [_jsx(PopoverTrigger, { asChild: true, children: _jsx(FormControl, { children: _jsx("div", { className: cn(`rounded-sm outline-none ${open ? 'ring-2 ring-ring ring-offset-2' : 'ring-0'}`, className), children: _jsxs(Button, { type: 'button', variant: 'outline', role: 'combobox', "aria-expanded": open, className: cn('justify-between disabled:border-disabled disabled:cursor-not-allowed disabled:opacity-50', formState.errors[name] ? 'border-red-600' : '', className), disabled: disabled || formState.isSubmitting, children: [iconLeft, _jsx("div", { className: 'grid flex-1 text-left text-sm leading-tight', children: _jsx("span", { className: 'truncate font-normal', children: getSelectedOption(field.value) ? (_jsxs("div", { className: 'flex gap-2', children: [getSelectedOption(field.value)?.icon, getSelectedOption(field.value)?.title] })) : (_jsx("span", { className: 'text-zinc-500', children: placeholder ?? DEFAULT_PLACEHOLDER })) }) }), iconRight ?? _jsx(ChevronsUpDown, { size: 20, className: 'stroke-zinc-500' })] }) }) }) }), _jsxs(PopoverContent, { className: cn('p-0', className, 'w-[--radix-popover-trigger-width]'), children: [_jsxs(Command, { shouldFilter: false, children: [!disabledSearch && _jsx(CommandInput, { placeholder: placeholder ?? DEFAULT_PLACEHOLDER, onKeyUp: handleKeyUp }), _jsxs(CommandList, { children: [_jsx(CommandEmpty, { className: 'flex flex-col justify-between items-center p-3 font-normal text-sm', children: loading ? (_jsx(LoaderCircle, { size: 16, className: 'text-sidebar-foreground animate-spin mr-2' })) : getOptions()?.length === 0 && (searchString !== '' || disabledSearch) ? ('Nenhum resultado encontrado') : ('Utilize o campo de busca acima') }), options.length > 0 && (_jsx(CommandGroup, { children: getOptions().map((option) => (_jsxs(CommandItem, { value: option.value, className: 'group', onSelect: () => handleSelect(option.value, field), children: [_jsxs("div", { className: cn('grid flex-1 text-left text-sm leading-tight', option.className), children: [_jsxs("div", { className: 'flex gap-2', children: [option.icon, _jsx("span", { className: 'truncate font-normal', children: option.title })] }), _jsx("span", { className: 'truncate text-xs text-zinc-500', children: option.subTitle })] }), _jsxs("div", { className: `ml-auto text-zinc-500 ${field.value === option.value ? 'opacity-100' : 'opacity-0'}`, children: [_jsx(Check, { className: cn('flex', canUnselect && 'group-hover:hidden hover:hidden'), size: 16 }), _jsx(X, { className: cn('hidden', canUnselect && 'group-hover:flex hover:flex'), size: 16 })] })] }, `key-opt-${option.value}`))) }))] })] }), footerAction && (_jsx("div", { className: 'grid w-full p-1 border-t', children: _jsxs(Button, { type: 'button', variant: 'ghost', className: 'h-8', onClick: () => footerAction.onClick(), children: [footerAction.icon, footerAction.label] }) }))] })] }), formMessage(FormMessage)] })) }));
|
|
82
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
interface Props {
|
|
2
|
+
control: any;
|
|
3
|
+
name: string;
|
|
4
|
+
label: string;
|
|
5
|
+
subLabel?: string;
|
|
6
|
+
helpText?: JSX.Element;
|
|
7
|
+
placeholder?: string;
|
|
8
|
+
className?: string;
|
|
9
|
+
disabled?: boolean;
|
|
10
|
+
required?: boolean;
|
|
11
|
+
onChange?: (event: React.ChangeEvent<HTMLInputElement>) => void;
|
|
12
|
+
onKeyUp?: (event: React.KeyboardEvent<HTMLInputElement>) => void;
|
|
13
|
+
}
|
|
14
|
+
export declare const FormInputCpfCnpj: React.FC<Props>;
|
|
15
|
+
export {};
|
|
16
|
+
//# sourceMappingURL=cpf-cnpj.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cpf-cnpj.d.ts","sourceRoot":"","sources":["../../../../src/components/custom/form/cpf-cnpj.tsx"],"names":[],"mappings":"AAOA,UAAU,KAAK;IACd,OAAO,EAAE,GAAG,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,GAAG,CAAC,OAAO,CAAC;IACvB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,WAAW,CAAC,gBAAgB,CAAC,KAAK,IAAI,CAAC;IAChE,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,aAAa,CAAC,gBAAgB,CAAC,KAAK,IAAI,CAAC;CACjE;AAID,eAAO,MAAM,gBAAgB,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,CA6D5C,CAAC"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useState } from 'react';
|
|
3
|
+
import * as FormComponents from '../../form';
|
|
4
|
+
import { formHelpText } from './form-help-text';
|
|
5
|
+
import { formLabelAndSubLabel } from './form-label';
|
|
6
|
+
import { formMessage } from './form-message';
|
|
7
|
+
import { MaskInputCpfCnpj } from './input';
|
|
8
|
+
const masks = ['999.999.999-999', '99.999.999/9999-99'];
|
|
9
|
+
export const FormInputCpfCnpj = ({ control, name, label, subLabel, helpText, placeholder, className, disabled, required, onChange, onKeyUp, }) => {
|
|
10
|
+
const { FormField, FormItem, FormLabel, FormControl, FormMessage } = FormComponents;
|
|
11
|
+
const [mask, setMask] = useState(masks[0]);
|
|
12
|
+
const handleMaskChange = (value) => {
|
|
13
|
+
const numericValue = value.replace(/\D/g, '');
|
|
14
|
+
if (numericValue.length > 11) {
|
|
15
|
+
setMask(masks[1]);
|
|
16
|
+
}
|
|
17
|
+
else {
|
|
18
|
+
setMask(masks[0]);
|
|
19
|
+
}
|
|
20
|
+
};
|
|
21
|
+
return (_jsx(FormField, { control: control, name: name, render: ({ field, formState }) => (_jsxs(FormItem, { className: className, children: [_jsxs("div", { className: 'flex items-center space-x-1.5', children: [label && formLabelAndSubLabel(FormLabel, label, subLabel, required), helpText && formHelpText(helpText)] }), _jsx(FormControl, { children: _jsx(MaskInputCpfCnpj, { ...field, className: `${className}`, placeholder: placeholder, disabled: disabled || formState.isSubmitting, mask: mask, onChange: (e) => {
|
|
22
|
+
field.onChange(e);
|
|
23
|
+
handleMaskChange(e.target.value);
|
|
24
|
+
if (onChange) {
|
|
25
|
+
onChange(e);
|
|
26
|
+
}
|
|
27
|
+
}, onKeyUp: (e) => {
|
|
28
|
+
if (onKeyUp) {
|
|
29
|
+
onKeyUp(e);
|
|
30
|
+
}
|
|
31
|
+
} }) }), formMessage(FormMessage)] })) }));
|
|
32
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
interface Props {
|
|
2
|
+
control: any;
|
|
3
|
+
name: string;
|
|
4
|
+
label: string;
|
|
5
|
+
subLabel?: string;
|
|
6
|
+
helpText?: JSX.Element;
|
|
7
|
+
className?: string;
|
|
8
|
+
disabled?: boolean;
|
|
9
|
+
required?: boolean;
|
|
10
|
+
onChange?: (event: React.ChangeEvent<HTMLInputElement>) => void;
|
|
11
|
+
}
|
|
12
|
+
export declare const FormInputCurrency: React.FC<Props>;
|
|
13
|
+
export {};
|
|
14
|
+
//# sourceMappingURL=currency.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"currency.d.ts","sourceRoot":"","sources":["../../../../src/components/custom/form/currency.tsx"],"names":[],"mappings":"AAMA,UAAU,KAAK;IACd,OAAO,EAAE,GAAG,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,GAAG,CAAC,OAAO,CAAC;IACvB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,WAAW,CAAC,gBAAgB,CAAC,KAAK,IAAI,CAAC;CAChE;AAED,eAAO,MAAM,iBAAiB,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,CAgC7C,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import * as FormComponents from '../../form';
|
|
3
|
+
import { formHelpText } from './form-help-text';
|
|
4
|
+
import { formLabelAndSubLabel } from './form-label';
|
|
5
|
+
import { formMessage } from './form-message';
|
|
6
|
+
import { MaskInputDecimal } from './input';
|
|
7
|
+
export const FormInputCurrency = ({ control, name, label, subLabel, helpText, className, disabled, required, onChange }) => {
|
|
8
|
+
const { FormField, FormItem, FormLabel, FormControl, FormMessage } = FormComponents;
|
|
9
|
+
return (_jsx(FormField, { control: control, name: name, render: ({ field, formState }) => (_jsxs(FormItem, { className: className, children: [_jsxs("div", { className: 'flex items-center space-x-1.5', children: [label && formLabelAndSubLabel(FormLabel, label, subLabel, required), helpText && formHelpText(helpText)] }), _jsx(FormControl, { children: _jsx(MaskInputDecimal, { ...field, symbol: 'R$', className: `${className}`, disabled: disabled || formState.isSubmitting, onChange: (e) => {
|
|
10
|
+
field.onChange(e);
|
|
11
|
+
if (onChange) {
|
|
12
|
+
onChange(e);
|
|
13
|
+
}
|
|
14
|
+
} }) }), formMessage(FormMessage)] })) }));
|
|
15
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { DateRange } from 'react-day-picker';
|
|
2
|
+
interface Props {
|
|
3
|
+
control: any;
|
|
4
|
+
name: string;
|
|
5
|
+
label: string;
|
|
6
|
+
subLabel?: string;
|
|
7
|
+
helpText?: JSX.Element;
|
|
8
|
+
placeholder?: string;
|
|
9
|
+
className?: string;
|
|
10
|
+
disabled?: boolean;
|
|
11
|
+
required?: boolean;
|
|
12
|
+
onChange?: (event: React.ChangeEvent<HTMLInputElement> | DateRange | undefined) => void;
|
|
13
|
+
}
|
|
14
|
+
export declare const FormDataRange: React.FC<Props>;
|
|
15
|
+
export {};
|
|
16
|
+
//# sourceMappingURL=date-range.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"date-range.d.ts","sourceRoot":"","sources":["../../../../src/components/custom/form/date-range.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAS7C,UAAU,KAAK;IACd,OAAO,EAAE,GAAG,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,GAAG,CAAC,OAAO,CAAC;IACvB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,WAAW,CAAC,gBAAgB,CAAC,GAAG,SAAS,GAAG,SAAS,KAAK,IAAI,CAAC;CACxF;AAED,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,CAmFzC,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { jsxs as _jsxs, jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
+
import { cn } from '@/lib/utils';
|
|
3
|
+
import { format } from 'date-fns';
|
|
4
|
+
import { CalendarIcon } from 'lucide-react';
|
|
5
|
+
import { useState } from 'react';
|
|
6
|
+
import * as FormComponents from '../../form';
|
|
7
|
+
import { Button } from './button';
|
|
8
|
+
import { Calendar } from './calendar';
|
|
9
|
+
import { formHelpText } from './form-help-text';
|
|
10
|
+
import { formLabelAndSubLabel } from './form-label';
|
|
11
|
+
import { formMessage } from './form-message';
|
|
12
|
+
import { Popover, PopoverContent, PopoverTrigger } from './popover';
|
|
13
|
+
export const FormDataRange = ({ control, name, label, subLabel, helpText, placeholder, className, disabled, required, onChange, }) => {
|
|
14
|
+
const { FormField, FormItem, FormLabel, FormControl, FormMessage } = FormComponents;
|
|
15
|
+
// const [date, setDate] = useState<DateRange | undefined>(field.value);
|
|
16
|
+
const [open, setOpen] = useState(false);
|
|
17
|
+
const handleDateChange = (newDate, field) => {
|
|
18
|
+
// setDate(newDate);
|
|
19
|
+
field.onChange(newDate);
|
|
20
|
+
if (onChange)
|
|
21
|
+
onChange(newDate);
|
|
22
|
+
};
|
|
23
|
+
return (_jsx(FormField, { control: control, name: name, render: ({ field, formState }) => (_jsxs(FormItem, { className: className, children: [_jsxs("div", { className: 'flex items-center space-x-1.5', children: [label && formLabelAndSubLabel(FormLabel, label, subLabel, required), helpText && formHelpText(helpText)] }), _jsx(FormControl, { children: _jsxs(Popover, { open: open, onOpenChange: setOpen, children: [_jsx(PopoverTrigger, { asChild: true, className: 'w-full', children: _jsx("div", { className: ` rounded-sm outline-none ${open ? 'ring-2 ring-ring ring-offset-2' : 'ring-0'}`, children: _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: [_jsx(CalendarIcon, { className: 'text-zinc-500' }), field.value?.from ? (field.value?.to ? (_jsxs(_Fragment, { children: [format(field.value?.from, 'dd/MM/yyyy'), " - ", format(field.value?.to, 'dd/MM/yyyy')] })) : (format(field.value?.from, 'dd/MM/yyyy'))) : (_jsx("span", { className: 'font-normal text-zinc-500', children: "Escolha um Per\u00EDodo" }))] }) }) }), _jsx(PopoverContent, { className: 'flex w-auto p-0', align: 'start', children: _jsx("div", { className: 'flex flex-row space-x-4', children: _jsx(Calendar, { initialFocus: true, mode: 'range', defaultMonth: field.value?.from, selected: field.value, numberOfMonths: 2, className: 'flex', onSelect: (newDate) => handleDateChange(newDate, field) }) }) })] }) }), formMessage(FormMessage)] })) }));
|
|
24
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
interface Props {
|
|
2
|
+
control: any;
|
|
3
|
+
name: string;
|
|
4
|
+
label: string;
|
|
5
|
+
subLabel?: string;
|
|
6
|
+
helpText?: JSX.Element;
|
|
7
|
+
placeholder?: string;
|
|
8
|
+
className?: string;
|
|
9
|
+
disabled?: boolean;
|
|
10
|
+
required?: boolean;
|
|
11
|
+
onChange?: (event: React.ChangeEvent<HTMLInputElement>) => void;
|
|
12
|
+
onKeyUp?: (event: React.KeyboardEvent<HTMLInputElement>) => void;
|
|
13
|
+
}
|
|
14
|
+
export declare const FormInputDate: React.FC<Props>;
|
|
15
|
+
export {};
|
|
16
|
+
//# sourceMappingURL=date.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"date.d.ts","sourceRoot":"","sources":["../../../../src/components/custom/form/date.tsx"],"names":[],"mappings":"AAaA,UAAU,KAAK;IACd,OAAO,EAAE,GAAG,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,GAAG,CAAC,OAAO,CAAC;IACvB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,WAAW,CAAC,gBAAgB,CAAC,KAAK,IAAI,CAAC;IAChE,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,aAAa,CAAC,gBAAgB,CAAC,KAAK,IAAI,CAAC;CACjE;AAED,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,CAiFzC,CAAC"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { stringToDate } from '@/lib/help/date-utils';
|
|
3
|
+
import { cn } from '@/lib/utils';
|
|
4
|
+
import { ptBR } from 'date-fns/locale';
|
|
5
|
+
import { CalendarIcon } from 'lucide-react';
|
|
6
|
+
import { useState } from 'react';
|
|
7
|
+
import * as FormComponents from '../../form';
|
|
8
|
+
import { Calendar } from './calendar';
|
|
9
|
+
import { formHelpText } from './form-help-text';
|
|
10
|
+
import { formLabelAndSubLabel } from './form-label';
|
|
11
|
+
import { formMessage } from './form-message';
|
|
12
|
+
import { MaskInput } from './input';
|
|
13
|
+
import { Popover, PopoverContent, PopoverTrigger } from './popover';
|
|
14
|
+
export const FormInputDate = ({ control, name, label, subLabel, helpText, placeholder = '01/01/2023', className, disabled, required, onChange, onKeyUp, }) => {
|
|
15
|
+
const { FormField, FormItem, FormLabel, FormControl, FormMessage } = FormComponents;
|
|
16
|
+
const [open, setOpen] = useState(false);
|
|
17
|
+
return (_jsx(FormField, { control: control, name: name, render: ({ field, formState }) => (_jsxs(FormItem, { className: className, children: [_jsxs("div", { className: 'flex items-center space-x-1.5', children: [label && formLabelAndSubLabel(FormLabel, label, subLabel, required), helpText && formHelpText(helpText)] }), _jsx(FormControl, { children: _jsxs("div", { className: 'relative w-full', children: [_jsx(MaskInput, { ...field, mask: '99/99/9999', maskPlaceholder: null, placeholder: placeholder, disabled: disabled || formState.isSubmitting, className: cn('pl-9', className), onChange: (e) => {
|
|
18
|
+
field.onChange(e);
|
|
19
|
+
if (onChange) {
|
|
20
|
+
onChange(e);
|
|
21
|
+
}
|
|
22
|
+
}, onKeyUp: (e) => {
|
|
23
|
+
if (onKeyUp) {
|
|
24
|
+
onKeyUp(e);
|
|
25
|
+
}
|
|
26
|
+
} }), _jsx("div", { className: 'absolute left-3 top-1/2 -translate-y-1/2 cursor-pointer', children: _jsxs(Popover, { open: open, onOpenChange: setOpen, children: [_jsx(PopoverTrigger, { asChild: true, children: _jsx(CalendarIcon, { size: 16, className: 'cursor-pointer text-gray-500' }) }), _jsx(PopoverContent, { className: 'w-[250px] p-0', align: 'start', children: _jsx(Calendar, { mode: 'single', locale: ptBR, required: true, selected: stringToDate(field.value) ?? new Date(), onSelect: (date) => {
|
|
27
|
+
field.onChange(date ? date.toLocaleDateString('pt-BR') : '');
|
|
28
|
+
if (onChange) {
|
|
29
|
+
onChange({
|
|
30
|
+
target: { value: date ? date.toLocaleDateString('pt-BR') : '' },
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
setOpen(false);
|
|
34
|
+
}, className: 'rounded-md', captionLayout: 'dropdown' }) })] }) })] }) }), formMessage(FormMessage)] })) }));
|
|
35
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
interface Props {
|
|
2
|
+
control: any;
|
|
3
|
+
name: string;
|
|
4
|
+
label: string;
|
|
5
|
+
subLabel?: string;
|
|
6
|
+
helpText?: JSX.Element;
|
|
7
|
+
className?: string;
|
|
8
|
+
disabled?: boolean;
|
|
9
|
+
required?: boolean;
|
|
10
|
+
onChange?: (event: React.ChangeEvent<HTMLInputElement>) => void;
|
|
11
|
+
}
|
|
12
|
+
export declare const FormInputDecimal: React.FC<Props>;
|
|
13
|
+
export {};
|
|
14
|
+
//# sourceMappingURL=decimal.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"decimal.d.ts","sourceRoot":"","sources":["../../../../src/components/custom/form/decimal.tsx"],"names":[],"mappings":"AAMA,UAAU,KAAK;IACd,OAAO,EAAE,GAAG,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,GAAG,CAAC,OAAO,CAAC;IACvB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,WAAW,CAAC,gBAAgB,CAAC,KAAK,IAAI,CAAC;CAChE;AAED,eAAO,MAAM,gBAAgB,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,CA+B5C,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import * as FormComponents from '../../form';
|
|
3
|
+
import { formHelpText } from './form-help-text';
|
|
4
|
+
import { formLabelAndSubLabel } from './form-label';
|
|
5
|
+
import { formMessage } from './form-message';
|
|
6
|
+
import { MaskInputDecimal } from './input';
|
|
7
|
+
export const FormInputDecimal = ({ control, name, label, subLabel, helpText, className, disabled, required, onChange }) => {
|
|
8
|
+
const { FormField, FormItem, FormLabel, FormControl, FormMessage } = FormComponents;
|
|
9
|
+
return (_jsx(FormField, { control: control, name: name, render: ({ field, formState }) => (_jsxs(FormItem, { className: className, children: [_jsxs("div", { className: 'flex items-center space-x-1.5', children: [label && formLabelAndSubLabel(FormLabel, label, subLabel, required), helpText && formHelpText(helpText)] }), _jsx(FormControl, { children: _jsx(MaskInputDecimal, { ...field, className: `${className}`, disabled: disabled || formState.isSubmitting, onChange: (e) => {
|
|
10
|
+
field.onChange(e);
|
|
11
|
+
if (onChange) {
|
|
12
|
+
onChange(e);
|
|
13
|
+
}
|
|
14
|
+
} }) }), formMessage(FormMessage)] })) }));
|
|
15
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
interface Props {
|
|
2
|
+
control: any;
|
|
3
|
+
name: string;
|
|
4
|
+
label: string;
|
|
5
|
+
subLabel?: string;
|
|
6
|
+
helpText?: JSX.Element;
|
|
7
|
+
placeholder?: string;
|
|
8
|
+
className?: string;
|
|
9
|
+
disabled?: boolean;
|
|
10
|
+
required?: boolean;
|
|
11
|
+
onChange?: (event: React.ChangeEvent<HTMLInputElement>) => void;
|
|
12
|
+
}
|
|
13
|
+
export declare const FormInputFile: React.FC<Props>;
|
|
14
|
+
export {};
|
|
15
|
+
//# sourceMappingURL=file.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"file.d.ts","sourceRoot":"","sources":["../../../../src/components/custom/form/file.tsx"],"names":[],"mappings":"AAOA,UAAU,KAAK;IACd,OAAO,EAAE,GAAG,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,GAAG,CAAC,OAAO,CAAC;IACvB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,WAAW,CAAC,gBAAgB,CAAC,KAAK,IAAI,CAAC;CAChE;AAED,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,CA4CzC,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useState } from 'react';
|
|
3
|
+
import * as FormComponents from '../../form';
|
|
4
|
+
import { formHelpText } from './form-help-text';
|
|
5
|
+
import { formLabelAndSubLabel } from './form-label';
|
|
6
|
+
import { formMessage } from './form-message';
|
|
7
|
+
import { InputFile } from './input';
|
|
8
|
+
export const FormInputFile = ({ control, name, label, subLabel, helpText, placeholder, className, disabled, required, onChange, }) => {
|
|
9
|
+
const { FormField, FormItem, FormLabel, FormControl, FormMessage } = FormComponents;
|
|
10
|
+
const [value, setValue] = useState('');
|
|
11
|
+
return (_jsx(FormField, { control: control, name: name, render: ({ field, formState }) => (_jsxs(FormItem, { className: className, children: [_jsxs("div", { className: 'flex items-center space-x-1.5', children: [label && formLabelAndSubLabel(FormLabel, label, subLabel, required), helpText && formHelpText(helpText)] }), _jsx(FormControl, { children: _jsx(InputFile, { value: value, placeholder: placeholder, disabled: disabled || formState.isSubmitting, onChange: (e) => {
|
|
12
|
+
if (onChange) {
|
|
13
|
+
onChange(e);
|
|
14
|
+
}
|
|
15
|
+
setValue(e.target.value);
|
|
16
|
+
field.onChange(e.target.files);
|
|
17
|
+
} }) }), formMessage(FormMessage)] })) }));
|
|
18
|
+
};
|