eai-frontend-components 2.0.7 → 2.0.8
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/dist/index.d.ts +24 -73
- package/package.json +1 -1
- package/dist/components/accordion.d.ts +0 -8
- package/dist/components/accordion.d.ts.map +0 -1
- package/dist/components/accordion.js +0 -13
- package/dist/components/alert-dialog.d.ts +0 -25
- package/dist/components/alert-dialog.d.ts.map +0 -1
- package/dist/components/alert-dialog.js +0 -27
- package/dist/components/alert.d.ts +0 -9
- package/dist/components/alert.d.ts.map +0 -1
- package/dist/components/alert.js +0 -22
- package/dist/components/avatar.d.ts +0 -7
- package/dist/components/avatar.d.ts.map +0 -1
- package/dist/components/avatar.js +0 -11
- package/dist/components/badge.d.ts +0 -10
- package/dist/components/badge.d.ts.map +0 -1
- package/dist/components/badge.js +0 -26
- package/dist/components/breadcrumb.d.ts +0 -20
- package/dist/components/breadcrumb.d.ts.map +0 -1
- package/dist/components/breadcrumb.js +0 -23
- package/dist/components/button.d.ts +0 -12
- package/dist/components/button.d.ts.map +0 -1
- package/dist/components/button.js +0 -33
- package/dist/components/calendar.d.ts +0 -9
- package/dist/components/calendar.d.ts.map +0 -1
- package/dist/components/calendar.js +0 -70
- package/dist/components/card.d.ts +0 -9
- package/dist/components/card.d.ts.map +0 -1
- package/dist/components/card.js +0 -16
- package/dist/components/carousel.d.ts +0 -19
- package/dist/components/carousel.d.ts.map +0 -1
- package/dist/components/carousel.js +0 -98
- package/dist/components/chart.d.ts +0 -63
- package/dist/components/chart.d.ts.map +0 -1
- package/dist/components/chart.js +0 -130
- package/dist/components/checkbox.d.ts +0 -5
- package/dist/components/checkbox.d.ts.map +0 -1
- package/dist/components/checkbox.js +0 -8
- package/dist/components/collapsible.d.ts +0 -6
- package/dist/components/collapsible.d.ts.map +0 -1
- package/dist/components/collapsible.js +0 -5
- package/dist/components/command.d.ts +0 -81
- package/dist/components/command.d.ts.map +0 -1
- package/dist/components/command.js +0 -28
- package/dist/components/context-menu.d.ts +0 -28
- package/dist/components/context-menu.d.ts.map +0 -1
- package/dist/components/context-menu.js +0 -33
- package/dist/components/custom/date-picker.d.ts +0 -12
- package/dist/components/custom/date-picker.d.ts.map +0 -1
- package/dist/components/custom/date-picker.js +0 -35
- package/dist/components/custom/form/checkbox.d.ts +0 -13
- package/dist/components/custom/form/checkbox.d.ts.map +0 -1
- package/dist/components/custom/form/checkbox.js +0 -15
- package/dist/components/custom/form/color.d.ts +0 -15
- package/dist/components/custom/form/color.d.ts.map +0 -1
- package/dist/components/custom/form/color.js +0 -40
- package/dist/components/custom/form/combobox.d.ts +0 -37
- package/dist/components/custom/form/combobox.d.ts.map +0 -1
- package/dist/components/custom/form/combobox.js +0 -82
- package/dist/components/custom/form/cpf-cnpj.d.ts +0 -16
- package/dist/components/custom/form/cpf-cnpj.d.ts.map +0 -1
- package/dist/components/custom/form/cpf-cnpj.js +0 -32
- package/dist/components/custom/form/currency.d.ts +0 -14
- package/dist/components/custom/form/currency.d.ts.map +0 -1
- package/dist/components/custom/form/currency.js +0 -15
- package/dist/components/custom/form/date-range.d.ts +0 -16
- package/dist/components/custom/form/date-range.d.ts.map +0 -1
- package/dist/components/custom/form/date-range.js +0 -24
- package/dist/components/custom/form/date.d.ts +0 -16
- package/dist/components/custom/form/date.d.ts.map +0 -1
- package/dist/components/custom/form/date.js +0 -35
- package/dist/components/custom/form/decimal.d.ts +0 -14
- package/dist/components/custom/form/decimal.d.ts.map +0 -1
- package/dist/components/custom/form/decimal.js +0 -15
- package/dist/components/custom/form/file.d.ts +0 -15
- package/dist/components/custom/form/file.d.ts.map +0 -1
- package/dist/components/custom/form/file.js +0 -18
- package/dist/components/custom/form/form-help-text.d.ts +0 -3
- package/dist/components/custom/form/form-help-text.d.ts.map +0 -1
- package/dist/components/custom/form/form-help-text.js +0 -7
- package/dist/components/custom/form/form-label.d.ts +0 -4
- package/dist/components/custom/form/form-label.d.ts.map +0 -1
- package/dist/components/custom/form/form-label.js +0 -9
- package/dist/components/custom/form/form-message.d.ts +0 -3
- package/dist/components/custom/form/form-message.d.ts.map +0 -1
- package/dist/components/custom/form/form-message.js +0 -5
- package/dist/components/custom/form/ghost.d.ts +0 -8
- package/dist/components/custom/form/ghost.d.ts.map +0 -1
- package/dist/components/custom/form/ghost.js +0 -8
- package/dist/components/custom/form/input.d.ts +0 -18
- package/dist/components/custom/form/input.d.ts.map +0 -1
- package/dist/components/custom/form/input.js +0 -14
- package/dist/components/custom/form/mask.d.ts +0 -19
- package/dist/components/custom/form/mask.d.ts.map +0 -1
- package/dist/components/custom/form/mask.js +0 -19
- package/dist/components/custom/form/multi-select-old.d.ts +0 -19
- package/dist/components/custom/form/multi-select-old.d.ts.map +0 -1
- package/dist/components/custom/form/multi-select-old.js +0 -30
- package/dist/components/custom/form/multi-select.d.ts +0 -26
- package/dist/components/custom/form/multi-select.d.ts.map +0 -1
- package/dist/components/custom/form/multi-select.js +0 -66
- package/dist/components/custom/form/password.d.ts +0 -16
- package/dist/components/custom/form/password.d.ts.map +0 -1
- package/dist/components/custom/form/password.js +0 -14
- package/dist/components/custom/form/percent.d.ts +0 -14
- package/dist/components/custom/form/percent.d.ts.map +0 -1
- package/dist/components/custom/form/percent.js +0 -15
- package/dist/components/custom/form/phone.d.ts +0 -16
- package/dist/components/custom/form/phone.d.ts.map +0 -1
- package/dist/components/custom/form/phone.js +0 -23
- package/dist/components/custom/form/radio-group.d.ts +0 -23
- package/dist/components/custom/form/radio-group.d.ts.map +0 -1
- package/dist/components/custom/form/radio-group.js +0 -15
- package/dist/components/custom/form/select.d.ts +0 -20
- package/dist/components/custom/form/select.d.ts.map +0 -1
- package/dist/components/custom/form/select.js +0 -12
- package/dist/components/custom/form/step-new-form.d.ts +0 -10
- package/dist/components/custom/form/step-new-form.d.ts.map +0 -1
- package/dist/components/custom/form/step-new-form.js +0 -13
- package/dist/components/custom/form/switch.d.ts +0 -13
- package/dist/components/custom/form/switch.d.ts.map +0 -1
- package/dist/components/custom/form/switch.js +0 -16
- package/dist/components/custom/form/text.d.ts +0 -18
- package/dist/components/custom/form/text.d.ts.map +0 -1
- package/dist/components/custom/form/text.js +0 -14
- package/dist/components/custom/form/textarea.d.ts +0 -16
- package/dist/components/custom/form/textarea.d.ts.map +0 -1
- package/dist/components/custom/form/textarea.js +0 -19
- package/dist/components/custom/form/utils.d.ts +0 -18
- package/dist/components/custom/form/utils.d.ts.map +0 -1
- package/dist/components/custom/form/utils.js +0 -88
- package/dist/components/custom/header.d.ts +0 -3
- package/dist/components/custom/header.d.ts.map +0 -1
- package/dist/components/custom/header.js +0 -94
- package/dist/components/custom/label.d.ts +0 -13
- package/dist/components/custom/label.d.ts.map +0 -1
- package/dist/components/custom/label.js +0 -20
- package/dist/components/custom/not-found.d.ts +0 -3
- package/dist/components/custom/not-found.d.ts.map +0 -1
- package/dist/components/custom/not-found.js +0 -9
- package/dist/components/custom/sidebar/app-sidebar.d.ts +0 -5
- package/dist/components/custom/sidebar/app-sidebar.d.ts.map +0 -1
- package/dist/components/custom/sidebar/app-sidebar.js +0 -26
- package/dist/components/custom/sidebar/module-switcher.d.ts +0 -3
- package/dist/components/custom/sidebar/module-switcher.d.ts.map +0 -1
- package/dist/components/custom/sidebar/module-switcher.js +0 -55
- package/dist/components/custom/sidebar/nav-footer.d.ts +0 -3
- package/dist/components/custom/sidebar/nav-footer.d.ts.map +0 -1
- package/dist/components/custom/sidebar/nav-footer.js +0 -17
- package/dist/components/custom/sidebar/nav-main.d.ts +0 -3
- package/dist/components/custom/sidebar/nav-main.d.ts.map +0 -1
- package/dist/components/custom/sidebar/nav-main.js +0 -32
- package/dist/components/custom/sidebar/nav-submenu-collapsible.d.ts +0 -9
- package/dist/components/custom/sidebar/nav-submenu-collapsible.d.ts.map +0 -1
- package/dist/components/custom/sidebar/nav-submenu-collapsible.js +0 -21
- package/dist/components/custom/sidebar/nav-submenu-dropdown.d.ts +0 -10
- package/dist/components/custom/sidebar/nav-submenu-dropdown.d.ts.map +0 -1
- package/dist/components/custom/sidebar/nav-submenu-dropdown.js +0 -13
- package/dist/components/custom/sidebar/nav-user.d.ts +0 -3
- package/dist/components/custom/sidebar/nav-user.d.ts.map +0 -1
- package/dist/components/custom/sidebar/nav-user.js +0 -51
- package/dist/components/custom/sidebar/sidebar-button.d.ts +0 -9
- package/dist/components/custom/sidebar/sidebar-button.d.ts.map +0 -1
- package/dist/components/custom/sidebar/sidebar-button.js +0 -7
- package/dist/components/custom/sidebar/sidebar-item-two-lines.d.ts +0 -12
- package/dist/components/custom/sidebar/sidebar-item-two-lines.d.ts.map +0 -1
- package/dist/components/custom/sidebar/sidebar-item-two-lines.js +0 -5
- package/dist/components/custom/sidebar/sidebar-item.d.ts +0 -9
- package/dist/components/custom/sidebar/sidebar-item.d.ts.map +0 -1
- package/dist/components/custom/sidebar/sidebar-item.js +0 -7
- package/dist/components/custom/sidebar/types/sidebar.d.ts +0 -29
- package/dist/components/custom/sidebar/types/sidebar.d.ts.map +0 -1
- package/dist/components/custom/sidebar/types/sidebar.js +0 -5
- package/dist/components/custom/table/data-table-export.d.ts +0 -8
- package/dist/components/custom/table/data-table-export.d.ts.map +0 -1
- package/dist/components/custom/table/data-table-export.js +0 -65
- package/dist/components/custom/table/data-table-footer.d.ts +0 -25
- package/dist/components/custom/table/data-table-footer.d.ts.map +0 -1
- package/dist/components/custom/table/data-table-footer.js +0 -39
- package/dist/components/custom/table/data-table-header.d.ts +0 -9
- package/dist/components/custom/table/data-table-header.d.ts.map +0 -1
- package/dist/components/custom/table/data-table-header.js +0 -11
- package/dist/components/custom/table/data-table-rows.d.ts +0 -13
- package/dist/components/custom/table/data-table-rows.d.ts.map +0 -1
- package/dist/components/custom/table/data-table-rows.js +0 -25
- package/dist/components/custom/table/data-table.d.ts +0 -35
- package/dist/components/custom/table/data-table.d.ts.map +0 -1
- package/dist/components/custom/table/data-table.js +0 -99
- package/dist/components/custom/table/types/data-table.d.ts +0 -29
- package/dist/components/custom/table/types/data-table.d.ts.map +0 -1
- package/dist/components/custom/table/types/data-table.js +0 -1
- package/dist/components/custom/theme-provider.d.ts +0 -24
- package/dist/components/custom/theme-provider.d.ts.map +0 -1
- package/dist/components/custom/theme-provider.js +0 -79
- package/dist/components/dateRangePicker.d.ts +0 -3
- package/dist/components/dateRangePicker.d.ts.map +0 -1
- package/dist/components/dateRangePicker.js +0 -15
- package/dist/components/dialog.d.ts +0 -23
- package/dist/components/dialog.d.ts.map +0 -1
- package/dist/components/dialog.js +0 -23
- package/dist/components/drawer.d.ts +0 -23
- package/dist/components/drawer.d.ts.map +0 -1
- package/dist/components/drawer.js +0 -22
- package/dist/components/dropdown-menu.d.ts +0 -28
- package/dist/components/dropdown-menu.d.ts.map +0 -1
- package/dist/components/dropdown-menu.js +0 -32
- package/dist/components/form.d.ts +0 -24
- package/dist/components/form.d.ts.map +0 -1
- package/dist/components/form.js +0 -60
- package/dist/components/hover-card.d.ts +0 -7
- package/dist/components/hover-card.d.ts.map +0 -1
- package/dist/components/hover-card.js +0 -9
- package/dist/components/input.d.ts +0 -24
- package/dist/components/input.d.ts.map +0 -1
- package/dist/components/input.js +0 -71
- package/dist/components/label.d.ts +0 -6
- package/dist/components/label.d.ts.map +0 -1
- package/dist/components/label.js +0 -9
- package/dist/components/masks.d.ts +0 -17
- package/dist/components/masks.d.ts.map +0 -1
- package/dist/components/masks.js +0 -25
- package/dist/components/pagination.d.ts +0 -30
- package/dist/components/pagination.d.ts.map +0 -1
- package/dist/components/pagination.js +0 -23
- package/dist/components/popover.d.ts +0 -7
- package/dist/components/popover.d.ts.map +0 -1
- package/dist/components/popover.js +0 -11
- package/dist/components/progress.d.ts +0 -5
- package/dist/components/progress.d.ts.map +0 -1
- package/dist/components/progress.js +0 -7
- package/dist/components/radio-group.d.ts +0 -6
- package/dist/components/radio-group.d.ts.map +0 -1
- package/dist/components/radio-group.js +0 -14
- package/dist/components/scroll-area.d.ts +0 -6
- package/dist/components/scroll-area.d.ts.map +0 -1
- package/dist/components/scroll-area.js +0 -11
- package/dist/components/select.d.ts +0 -14
- package/dist/components/select.d.ts.map +0 -1
- package/dist/components/select.js +0 -24
- package/dist/components/separator.d.ts +0 -5
- package/dist/components/separator.d.ts.map +0 -1
- package/dist/components/separator.js +0 -7
- package/dist/components/sheet.d.ts +0 -26
- package/dist/components/sheet.d.ts.map +0 -1
- package/dist/components/sheet.js +0 -37
- package/dist/components/sidebar.d.ts +0 -67
- package/dist/components/sidebar.d.ts.map +0 -1
- package/dist/components/sidebar.js +0 -221
- package/dist/components/skeleton.d.ts +0 -3
- package/dist/components/skeleton.d.ts.map +0 -1
- package/dist/components/skeleton.js +0 -6
- package/dist/components/slider.d.ts +0 -5
- package/dist/components/slider.d.ts.map +0 -1
- package/dist/components/slider.js +0 -7
- package/dist/components/switch.d.ts +0 -5
- package/dist/components/switch.d.ts.map +0 -1
- package/dist/components/switch.js +0 -7
- package/dist/components/table.d.ts +0 -11
- package/dist/components/table.d.ts.map +0 -1
- package/dist/components/table.js +0 -20
- package/dist/components/tabs.d.ts +0 -8
- package/dist/components/tabs.d.ts.map +0 -1
- package/dist/components/tabs.js +0 -12
- package/dist/components/textarea.d.ts +0 -4
- package/dist/components/textarea.d.ts.map +0 -1
- package/dist/components/textarea.js +0 -14
- package/dist/components/toast.d.ts +0 -16
- package/dist/components/toast.d.ts.map +0 -1
- package/dist/components/toast.js +0 -34
- package/dist/components/toaster.d.ts +0 -2
- package/dist/components/toaster.d.ts.map +0 -1
- package/dist/components/toaster.js +0 -21
- package/dist/components/tooltip.d.ts +0 -8
- package/dist/components/tooltip.d.ts.map +0 -1
- package/dist/components/tooltip.js +0 -10
- package/dist/components/ui/accordion.d.ts +0 -8
- package/dist/components/ui/accordion.d.ts.map +0 -1
- package/dist/components/ui/accordion.js +0 -13
- package/dist/components/ui/alert-dialog.d.ts +0 -25
- package/dist/components/ui/alert-dialog.d.ts.map +0 -1
- package/dist/components/ui/alert-dialog.js +0 -27
- package/dist/components/ui/alert.d.ts +0 -9
- package/dist/components/ui/alert.d.ts.map +0 -1
- package/dist/components/ui/alert.js +0 -22
- package/dist/components/ui/avatar.d.ts +0 -7
- package/dist/components/ui/avatar.d.ts.map +0 -1
- package/dist/components/ui/avatar.js +0 -11
- package/dist/components/ui/badge.d.ts +0 -10
- package/dist/components/ui/badge.d.ts.map +0 -1
- package/dist/components/ui/badge.js +0 -26
- package/dist/components/ui/breadcrumb.d.ts +0 -20
- package/dist/components/ui/breadcrumb.d.ts.map +0 -1
- package/dist/components/ui/breadcrumb.js +0 -23
- package/dist/components/ui/button.d.ts +0 -12
- package/dist/components/ui/button.d.ts.map +0 -1
- package/dist/components/ui/button.js +0 -33
- package/dist/components/ui/calendar.d.ts +0 -9
- package/dist/components/ui/calendar.d.ts.map +0 -1
- package/dist/components/ui/calendar.js +0 -70
- package/dist/components/ui/card.d.ts +0 -9
- package/dist/components/ui/card.d.ts.map +0 -1
- package/dist/components/ui/card.js +0 -16
- package/dist/components/ui/carousel.d.ts +0 -19
- package/dist/components/ui/carousel.d.ts.map +0 -1
- package/dist/components/ui/carousel.js +0 -98
- package/dist/components/ui/chart.d.ts +0 -63
- package/dist/components/ui/chart.d.ts.map +0 -1
- package/dist/components/ui/chart.js +0 -130
- package/dist/components/ui/checkbox.d.ts +0 -5
- package/dist/components/ui/checkbox.d.ts.map +0 -1
- package/dist/components/ui/checkbox.js +0 -8
- package/dist/components/ui/collapsible.d.ts +0 -6
- package/dist/components/ui/collapsible.d.ts.map +0 -1
- package/dist/components/ui/collapsible.js +0 -5
- package/dist/components/ui/command.d.ts +0 -81
- package/dist/components/ui/command.d.ts.map +0 -1
- package/dist/components/ui/command.js +0 -28
- package/dist/components/ui/context-menu.d.ts +0 -28
- package/dist/components/ui/context-menu.d.ts.map +0 -1
- package/dist/components/ui/context-menu.js +0 -33
- package/dist/components/ui/custom/date-picker.d.ts +0 -12
- package/dist/components/ui/custom/date-picker.d.ts.map +0 -1
- package/dist/components/ui/custom/date-picker.js +0 -35
- package/dist/components/ui/custom/form/checkbox.d.ts +0 -13
- package/dist/components/ui/custom/form/checkbox.d.ts.map +0 -1
- package/dist/components/ui/custom/form/checkbox.js +0 -15
- package/dist/components/ui/custom/form/color.d.ts +0 -15
- package/dist/components/ui/custom/form/color.d.ts.map +0 -1
- package/dist/components/ui/custom/form/color.js +0 -40
- package/dist/components/ui/custom/form/combobox.d.ts +0 -37
- package/dist/components/ui/custom/form/combobox.d.ts.map +0 -1
- package/dist/components/ui/custom/form/combobox.js +0 -82
- package/dist/components/ui/custom/form/cpf-cnpj.d.ts +0 -16
- package/dist/components/ui/custom/form/cpf-cnpj.d.ts.map +0 -1
- package/dist/components/ui/custom/form/cpf-cnpj.js +0 -32
- package/dist/components/ui/custom/form/currency.d.ts +0 -14
- package/dist/components/ui/custom/form/currency.d.ts.map +0 -1
- package/dist/components/ui/custom/form/currency.js +0 -15
- package/dist/components/ui/custom/form/date-range.d.ts +0 -16
- package/dist/components/ui/custom/form/date-range.d.ts.map +0 -1
- package/dist/components/ui/custom/form/date-range.js +0 -24
- package/dist/components/ui/custom/form/date.d.ts +0 -16
- package/dist/components/ui/custom/form/date.d.ts.map +0 -1
- package/dist/components/ui/custom/form/date.js +0 -35
- package/dist/components/ui/custom/form/decimal.d.ts +0 -14
- package/dist/components/ui/custom/form/decimal.d.ts.map +0 -1
- package/dist/components/ui/custom/form/decimal.js +0 -15
- package/dist/components/ui/custom/form/file.d.ts +0 -15
- package/dist/components/ui/custom/form/file.d.ts.map +0 -1
- package/dist/components/ui/custom/form/file.js +0 -18
- package/dist/components/ui/custom/form/form-help-text.d.ts +0 -3
- package/dist/components/ui/custom/form/form-help-text.d.ts.map +0 -1
- package/dist/components/ui/custom/form/form-help-text.js +0 -7
- package/dist/components/ui/custom/form/form-label.d.ts +0 -7
- package/dist/components/ui/custom/form/form-label.d.ts.map +0 -1
- package/dist/components/ui/custom/form/form-label.js +0 -9
- package/dist/components/ui/custom/form/form-message.d.ts +0 -5
- package/dist/components/ui/custom/form/form-message.d.ts.map +0 -1
- package/dist/components/ui/custom/form/form-message.js +0 -5
- package/dist/components/ui/custom/form/ghost.d.ts +0 -8
- package/dist/components/ui/custom/form/ghost.d.ts.map +0 -1
- package/dist/components/ui/custom/form/ghost.js +0 -8
- package/dist/components/ui/custom/form/input.d.ts +0 -18
- package/dist/components/ui/custom/form/input.d.ts.map +0 -1
- package/dist/components/ui/custom/form/input.js +0 -14
- package/dist/components/ui/custom/form/mask.d.ts +0 -19
- package/dist/components/ui/custom/form/mask.d.ts.map +0 -1
- package/dist/components/ui/custom/form/mask.js +0 -19
- package/dist/components/ui/custom/form/multi-select-old.d.ts +0 -19
- package/dist/components/ui/custom/form/multi-select-old.d.ts.map +0 -1
- package/dist/components/ui/custom/form/multi-select-old.js +0 -30
- package/dist/components/ui/custom/form/multi-select.d.ts +0 -26
- package/dist/components/ui/custom/form/multi-select.d.ts.map +0 -1
- package/dist/components/ui/custom/form/multi-select.js +0 -66
- package/dist/components/ui/custom/form/password.d.ts +0 -16
- package/dist/components/ui/custom/form/password.d.ts.map +0 -1
- package/dist/components/ui/custom/form/password.js +0 -14
- package/dist/components/ui/custom/form/percent.d.ts +0 -14
- package/dist/components/ui/custom/form/percent.d.ts.map +0 -1
- package/dist/components/ui/custom/form/percent.js +0 -15
- package/dist/components/ui/custom/form/phone.d.ts +0 -16
- package/dist/components/ui/custom/form/phone.d.ts.map +0 -1
- package/dist/components/ui/custom/form/phone.js +0 -23
- package/dist/components/ui/custom/form/radio-group.d.ts +0 -23
- package/dist/components/ui/custom/form/radio-group.d.ts.map +0 -1
- package/dist/components/ui/custom/form/radio-group.js +0 -15
- package/dist/components/ui/custom/form/select.d.ts +0 -20
- package/dist/components/ui/custom/form/select.d.ts.map +0 -1
- package/dist/components/ui/custom/form/select.js +0 -12
- package/dist/components/ui/custom/form/step-new-form.d.ts +0 -10
- package/dist/components/ui/custom/form/step-new-form.d.ts.map +0 -1
- package/dist/components/ui/custom/form/step-new-form.js +0 -13
- package/dist/components/ui/custom/form/switch.d.ts +0 -13
- package/dist/components/ui/custom/form/switch.d.ts.map +0 -1
- package/dist/components/ui/custom/form/switch.js +0 -16
- package/dist/components/ui/custom/form/text.d.ts +0 -18
- package/dist/components/ui/custom/form/text.d.ts.map +0 -1
- package/dist/components/ui/custom/form/text.js +0 -14
- package/dist/components/ui/custom/form/textarea.d.ts +0 -16
- package/dist/components/ui/custom/form/textarea.d.ts.map +0 -1
- package/dist/components/ui/custom/form/textarea.js +0 -19
- package/dist/components/ui/custom/form/utils.d.ts +0 -18
- package/dist/components/ui/custom/form/utils.d.ts.map +0 -1
- package/dist/components/ui/custom/form/utils.js +0 -88
- package/dist/components/ui/custom/header.d.ts +0 -11
- package/dist/components/ui/custom/header.d.ts.map +0 -1
- package/dist/components/ui/custom/header.js +0 -74
- package/dist/components/ui/custom/label.d.ts +0 -13
- package/dist/components/ui/custom/label.d.ts.map +0 -1
- package/dist/components/ui/custom/label.js +0 -20
- package/dist/components/ui/custom/not-found.d.ts +0 -3
- package/dist/components/ui/custom/not-found.d.ts.map +0 -1
- package/dist/components/ui/custom/not-found.js +0 -9
- package/dist/components/ui/custom/sidebar/app-sidebar.d.ts +0 -5
- package/dist/components/ui/custom/sidebar/app-sidebar.d.ts.map +0 -1
- package/dist/components/ui/custom/sidebar/app-sidebar.js +0 -26
- package/dist/components/ui/custom/sidebar/module-switcher.d.ts +0 -9
- package/dist/components/ui/custom/sidebar/module-switcher.d.ts.map +0 -1
- package/dist/components/ui/custom/sidebar/module-switcher.js +0 -55
- package/dist/components/ui/custom/sidebar/nav-footer.d.ts +0 -7
- package/dist/components/ui/custom/sidebar/nav-footer.d.ts.map +0 -1
- package/dist/components/ui/custom/sidebar/nav-footer.js +0 -13
- package/dist/components/ui/custom/sidebar/nav-main.d.ts +0 -7
- package/dist/components/ui/custom/sidebar/nav-main.d.ts.map +0 -1
- package/dist/components/ui/custom/sidebar/nav-main.js +0 -27
- package/dist/components/ui/custom/sidebar/nav-submenu-collapsible.d.ts +0 -9
- package/dist/components/ui/custom/sidebar/nav-submenu-collapsible.d.ts.map +0 -1
- package/dist/components/ui/custom/sidebar/nav-submenu-collapsible.js +0 -18
- package/dist/components/ui/custom/sidebar/nav-submenu-dropdown.d.ts +0 -10
- package/dist/components/ui/custom/sidebar/nav-submenu-dropdown.d.ts.map +0 -1
- package/dist/components/ui/custom/sidebar/nav-submenu-dropdown.js +0 -10
- package/dist/components/ui/custom/sidebar/nav-user.d.ts +0 -9
- package/dist/components/ui/custom/sidebar/nav-user.d.ts.map +0 -1
- package/dist/components/ui/custom/sidebar/nav-user.js +0 -24
- package/dist/components/ui/custom/sidebar/sidebar-button.d.ts +0 -9
- package/dist/components/ui/custom/sidebar/sidebar-button.d.ts.map +0 -1
- package/dist/components/ui/custom/sidebar/sidebar-button.js +0 -7
- package/dist/components/ui/custom/sidebar/sidebar-item-two-lines.d.ts +0 -12
- package/dist/components/ui/custom/sidebar/sidebar-item-two-lines.d.ts.map +0 -1
- package/dist/components/ui/custom/sidebar/sidebar-item-two-lines.js +0 -5
- package/dist/components/ui/custom/sidebar/sidebar-item.d.ts +0 -9
- package/dist/components/ui/custom/sidebar/sidebar-item.d.ts.map +0 -1
- package/dist/components/ui/custom/sidebar/sidebar-item.js +0 -7
- package/dist/components/ui/custom/sidebar/sidebar-module-switcher.d.ts +0 -9
- package/dist/components/ui/custom/sidebar/sidebar-module-switcher.d.ts.map +0 -1
- package/dist/components/ui/custom/sidebar/sidebar-module-switcher.js +0 -20
- package/dist/components/ui/custom/sidebar/types/sidebar.d.ts +0 -29
- package/dist/components/ui/custom/sidebar/types/sidebar.d.ts.map +0 -1
- package/dist/components/ui/custom/sidebar/types/sidebar.js +0 -5
- package/dist/components/ui/custom/table/data-table-export.d.ts +0 -8
- package/dist/components/ui/custom/table/data-table-export.d.ts.map +0 -1
- package/dist/components/ui/custom/table/data-table-export.js +0 -65
- package/dist/components/ui/custom/table/data-table-footer.d.ts +0 -25
- package/dist/components/ui/custom/table/data-table-footer.d.ts.map +0 -1
- package/dist/components/ui/custom/table/data-table-footer.js +0 -39
- package/dist/components/ui/custom/table/data-table-header.d.ts +0 -9
- package/dist/components/ui/custom/table/data-table-header.d.ts.map +0 -1
- package/dist/components/ui/custom/table/data-table-header.js +0 -11
- package/dist/components/ui/custom/table/data-table-rows.d.ts +0 -13
- package/dist/components/ui/custom/table/data-table-rows.d.ts.map +0 -1
- package/dist/components/ui/custom/table/data-table-rows.js +0 -25
- package/dist/components/ui/custom/table/data-table.d.ts +0 -35
- package/dist/components/ui/custom/table/data-table.d.ts.map +0 -1
- package/dist/components/ui/custom/table/data-table.js +0 -99
- package/dist/components/ui/custom/table/types/data-table.d.ts +0 -29
- package/dist/components/ui/custom/table/types/data-table.d.ts.map +0 -1
- package/dist/components/ui/custom/table/types/data-table.js +0 -1
- package/dist/components/ui/custom/theme-provider.d.ts +0 -24
- package/dist/components/ui/custom/theme-provider.d.ts.map +0 -1
- package/dist/components/ui/custom/theme-provider.js +0 -79
- package/dist/components/ui/dateRangePicker.d.ts +0 -3
- package/dist/components/ui/dateRangePicker.d.ts.map +0 -1
- package/dist/components/ui/dateRangePicker.js +0 -15
- package/dist/components/ui/dialog.d.ts +0 -23
- package/dist/components/ui/dialog.d.ts.map +0 -1
- package/dist/components/ui/dialog.js +0 -23
- package/dist/components/ui/drawer.d.ts +0 -23
- package/dist/components/ui/drawer.d.ts.map +0 -1
- package/dist/components/ui/drawer.js +0 -22
- package/dist/components/ui/dropdown-menu.d.ts +0 -28
- package/dist/components/ui/dropdown-menu.d.ts.map +0 -1
- package/dist/components/ui/dropdown-menu.js +0 -32
- package/dist/components/ui/form.d.ts +0 -24
- package/dist/components/ui/form.d.ts.map +0 -1
- package/dist/components/ui/form.js +0 -60
- package/dist/components/ui/hover-card.d.ts +0 -7
- package/dist/components/ui/hover-card.d.ts.map +0 -1
- package/dist/components/ui/hover-card.js +0 -9
- package/dist/components/ui/input.d.ts +0 -24
- package/dist/components/ui/input.d.ts.map +0 -1
- package/dist/components/ui/input.js +0 -71
- package/dist/components/ui/label.d.ts +0 -6
- package/dist/components/ui/label.d.ts.map +0 -1
- package/dist/components/ui/label.js +0 -9
- package/dist/components/ui/masks.d.ts +0 -17
- package/dist/components/ui/masks.d.ts.map +0 -1
- package/dist/components/ui/masks.js +0 -25
- package/dist/components/ui/pagination.d.ts +0 -30
- package/dist/components/ui/pagination.d.ts.map +0 -1
- package/dist/components/ui/pagination.js +0 -23
- package/dist/components/ui/popover.d.ts +0 -7
- package/dist/components/ui/popover.d.ts.map +0 -1
- package/dist/components/ui/popover.js +0 -11
- package/dist/components/ui/progress.d.ts +0 -5
- package/dist/components/ui/progress.d.ts.map +0 -1
- package/dist/components/ui/progress.js +0 -7
- package/dist/components/ui/radio-group.d.ts +0 -6
- package/dist/components/ui/radio-group.d.ts.map +0 -1
- package/dist/components/ui/radio-group.js +0 -14
- package/dist/components/ui/scroll-area.d.ts +0 -6
- package/dist/components/ui/scroll-area.d.ts.map +0 -1
- package/dist/components/ui/scroll-area.js +0 -11
- package/dist/components/ui/select.d.ts +0 -14
- package/dist/components/ui/select.d.ts.map +0 -1
- package/dist/components/ui/select.js +0 -24
- package/dist/components/ui/separator.d.ts +0 -5
- package/dist/components/ui/separator.d.ts.map +0 -1
- package/dist/components/ui/separator.js +0 -7
- package/dist/components/ui/sheet.d.ts +0 -26
- package/dist/components/ui/sheet.d.ts.map +0 -1
- package/dist/components/ui/sheet.js +0 -37
- package/dist/components/ui/sidebar.d.ts +0 -67
- package/dist/components/ui/sidebar.d.ts.map +0 -1
- package/dist/components/ui/sidebar.js +0 -221
- package/dist/components/ui/skeleton.d.ts +0 -3
- package/dist/components/ui/skeleton.d.ts.map +0 -1
- package/dist/components/ui/skeleton.js +0 -6
- package/dist/components/ui/slider.d.ts +0 -5
- package/dist/components/ui/slider.d.ts.map +0 -1
- package/dist/components/ui/slider.js +0 -7
- package/dist/components/ui/switch.d.ts +0 -5
- package/dist/components/ui/switch.d.ts.map +0 -1
- package/dist/components/ui/switch.js +0 -7
- package/dist/components/ui/table.d.ts +0 -11
- package/dist/components/ui/table.d.ts.map +0 -1
- package/dist/components/ui/table.js +0 -20
- package/dist/components/ui/tabs.d.ts +0 -8
- package/dist/components/ui/tabs.d.ts.map +0 -1
- package/dist/components/ui/tabs.js +0 -12
- package/dist/components/ui/textarea.d.ts +0 -4
- package/dist/components/ui/textarea.d.ts.map +0 -1
- package/dist/components/ui/textarea.js +0 -14
- package/dist/components/ui/toast.d.ts +0 -16
- package/dist/components/ui/toast.d.ts.map +0 -1
- package/dist/components/ui/toast.js +0 -34
- package/dist/components/ui/toaster.d.ts +0 -2
- package/dist/components/ui/toaster.d.ts.map +0 -1
- package/dist/components/ui/toaster.js +0 -21
- package/dist/components/ui/tooltip.d.ts +0 -8
- package/dist/components/ui/tooltip.d.ts.map +0 -1
- package/dist/components/ui/tooltip.js +0 -10
- package/dist/components/ui/use-calendar.d.ts +0 -7
- package/dist/components/ui/use-calendar.d.ts.map +0 -1
- package/dist/components/ui/use-calendar.js +0 -23
- package/dist/components/ui/use-toast.d.ts +0 -46
- package/dist/components/ui/use-toast.d.ts.map +0 -1
- package/dist/components/ui/use-toast.js +0 -125
- package/dist/components/use-calendar.d.ts +0 -7
- package/dist/components/use-calendar.d.ts.map +0 -1
- package/dist/components/use-calendar.js +0 -23
- package/dist/components/use-toast.d.ts +0 -46
- package/dist/components/use-toast.d.ts.map +0 -1
- package/dist/components/use-toast.js +0 -125
- package/dist/hooks/use-mobile.d.ts +0 -2
- package/dist/hooks/use-mobile.d.ts.map +0 -1
- package/dist/hooks/use-mobile.js +0 -15
- package/dist/index.d.ts.map +0 -1
- package/dist/lib/help/date-utils.d.ts +0 -7
- package/dist/lib/help/date-utils.d.ts.map +0 -1
- package/dist/lib/help/date-utils.js +0 -34
- package/dist/lib/help/format.d.ts +0 -22
- package/dist/lib/help/format.d.ts.map +0 -1
- package/dist/lib/help/format.js +0 -140
- package/dist/lib/help/theme.d.ts +0 -291
- package/dist/lib/help/theme.d.ts.map +0 -1
- package/dist/lib/help/theme.js +0 -340
- package/dist/lib/help/uuid.d.ts +0 -2
- package/dist/lib/help/uuid.d.ts.map +0 -1
- package/dist/lib/help/uuid.js +0 -4
- package/dist/lib/utils.d.ts +0 -3
- package/dist/lib/utils.d.ts.map +0 -1
- package/dist/lib/utils.js +0 -5
|
@@ -1,24 +0,0 @@
|
|
|
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
|
-
};
|
|
@@ -1,16 +0,0 @@
|
|
|
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
|
|
@@ -1 +0,0 @@
|
|
|
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"}
|
|
@@ -1,35 +0,0 @@
|
|
|
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
|
-
};
|
|
@@ -1,14 +0,0 @@
|
|
|
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
|
|
@@ -1 +0,0 @@
|
|
|
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"}
|
|
@@ -1,15 +0,0 @@
|
|
|
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
|
-
};
|
|
@@ -1,15 +0,0 @@
|
|
|
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
|
|
@@ -1 +0,0 @@
|
|
|
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"}
|
|
@@ -1,18 +0,0 @@
|
|
|
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
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"form-help-text.d.ts","sourceRoot":"","sources":["../../../../src/components/custom/form/form-help-text.tsx"],"names":[],"mappings":"AAGA,QAAA,MAAM,YAAY,GAAI,UAAU,GAAG,CAAC,OAAO,4CAa1C,CAAC;AAEF,OAAO,EAAE,YAAY,EAAE,CAAC"}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { CircleHelp } from 'lucide-react';
|
|
3
|
-
import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from './tooltip';
|
|
4
|
-
const formHelpText = (helpText) => {
|
|
5
|
-
return (_jsx(TooltipProvider, { children: _jsxs(Tooltip, { children: [_jsx(TooltipTrigger, { className: 'pb-2', children: _jsx(CircleHelp, { size: 16, className: 'text-muted' }) }), _jsx(TooltipContent, { className: 'text-white bg-background-primary', align: 'start', children: helpText })] }) }));
|
|
6
|
-
};
|
|
7
|
-
export { formHelpText };
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
declare const formLabel: (FormLabel: any, label: string) => import("react/jsx-runtime").JSX.Element;
|
|
2
|
-
declare const formLabelAndSubLabel: (FormLabel: any, label: string, subLabel?: string, required?: boolean | undefined, className?: string) => import("react/jsx-runtime").JSX.Element;
|
|
3
|
-
export { formLabel, formLabelAndSubLabel };
|
|
4
|
-
//# sourceMappingURL=form-label.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"form-label.d.ts","sourceRoot":"","sources":["../../../../src/components/custom/form/form-label.tsx"],"names":[],"mappings":"AAEA,QAAA,MAAM,SAAS,GAAI,cAAS,EAAE,OAAO,MAAM,4CAE1C,CAAC;AAEF,QAAA,MAAM,oBAAoB,GAAI,cAAS,EAAE,OAAO,MAAM,EAAE,WAAW,MAAM,EAAE,WAAW,OAAO,GAAG,SAAS,EAAE,YAAY,MAAM,4CAU5H,CAAC;AAEF,OAAO,EAAE,SAAS,EAAE,oBAAoB,EAAE,CAAC"}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { cn } from '@/lib/utils';
|
|
3
|
-
const formLabel = (FormLabel, label) => {
|
|
4
|
-
return _jsx(FormLabel, { className: 'text-default font-medium text-sm h-5', children: label });
|
|
5
|
-
};
|
|
6
|
-
const formLabelAndSubLabel = (FormLabel, label, subLabel, required, className) => {
|
|
7
|
-
return (_jsxs("div", { className: cn('flex flex-col pb-2', className), children: [_jsxs("div", { className: 'flex gap-1', children: [formLabel(FormLabel, label), required && _jsx(FormLabel, { className: 'text-red-600 font-medium text-sm', children: "*" })] }), subLabel && _jsx(FormLabel, { className: 'text-default font-normal pt-1', children: subLabel })] }));
|
|
8
|
-
};
|
|
9
|
-
export { formLabel, formLabelAndSubLabel };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"form-message.d.ts","sourceRoot":"","sources":["../../../../src/components/custom/form/form-message.tsx"],"names":[],"mappings":"AAAA,QAAA,MAAM,WAAW,GAAI,gBAAW,4CAE/B,CAAC;AAEF,OAAO,EAAE,WAAW,EAAE,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ghost.d.ts","sourceRoot":"","sources":["../../../../src/components/custom/form/ghost.tsx"],"names":[],"mappings":"AAIA,UAAU,KAAK;IACd,OAAO,EAAE,GAAG,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,eAAO,MAAM,cAAc,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,CAiB1C,CAAC"}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import * as FormComponents from '../../form';
|
|
3
|
-
import { formMessage } from './form-message';
|
|
4
|
-
import { InputText } from './input';
|
|
5
|
-
export const FormInputGhost = ({ control, name, className }) => {
|
|
6
|
-
const { FormField, FormItem, FormControl, FormMessage } = FormComponents;
|
|
7
|
-
return (_jsx(FormField, { control: control, name: name, render: ({ field }) => (_jsxs(FormItem, { className: className, children: [_jsx(FormControl, { children: _jsx(InputText, { ...field, className: 'hidden' }) }), formMessage(FormMessage)] })) }));
|
|
8
|
-
};
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
interface Props {
|
|
2
|
-
control: any;
|
|
3
|
-
type?: string;
|
|
4
|
-
name: string;
|
|
5
|
-
label: string;
|
|
6
|
-
subLabel?: string;
|
|
7
|
-
helpText?: JSX.Element;
|
|
8
|
-
placeholder?: string;
|
|
9
|
-
maxLength?: number;
|
|
10
|
-
className?: string;
|
|
11
|
-
disabled?: boolean;
|
|
12
|
-
required?: boolean;
|
|
13
|
-
onChange?: (event: React.KeyboardEvent<HTMLInputElement>) => void;
|
|
14
|
-
onKeyUp?: (event: React.KeyboardEvent<HTMLInputElement>) => void;
|
|
15
|
-
}
|
|
16
|
-
export declare const FormInput: React.FC<Props>;
|
|
17
|
-
export {};
|
|
18
|
-
//# sourceMappingURL=input.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"input.d.ts","sourceRoot":"","sources":["../../../../src/components/custom/form/input.tsx"],"names":[],"mappings":"AAMA,UAAU,KAAK;IACd,OAAO,EAAE,GAAG,CAAC;IACb,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,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,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,aAAa,CAAC,gBAAgB,CAAC,KAAK,IAAI,CAAC;IAClE,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,aAAa,CAAC,gBAAgB,CAAC,KAAK,IAAI,CAAC;CACjE;AAED,eAAO,MAAM,SAAS,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,CA8CrC,CAAC"}
|
|
@@ -1,14 +0,0 @@
|
|
|
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 { Input } from './input';
|
|
7
|
-
export const FormInput = ({ control, type, name, label, subLabel, helpText, placeholder, maxLength, className, disabled, required, onKeyUp, }) => {
|
|
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(Input, { ...field, className: className, maxLength: maxLength, placeholder: placeholder, disabled: disabled || formState.isSubmitting, type: type, onKeyUp: (e) => {
|
|
10
|
-
if (onKeyUp) {
|
|
11
|
-
onKeyUp(e);
|
|
12
|
-
}
|
|
13
|
-
} }) }), formMessage(FormMessage)] })) }));
|
|
14
|
-
};
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
interface Props {
|
|
2
|
-
control: any;
|
|
3
|
-
name: string;
|
|
4
|
-
label: string;
|
|
5
|
-
subLabel?: string;
|
|
6
|
-
helpText?: JSX.Element;
|
|
7
|
-
placeholder?: string;
|
|
8
|
-
mask: string;
|
|
9
|
-
maskPlaceholder?: string | null;
|
|
10
|
-
className?: string;
|
|
11
|
-
disabled?: boolean;
|
|
12
|
-
required?: boolean;
|
|
13
|
-
inputRef?: React.Ref<HTMLInputElement>;
|
|
14
|
-
onChange?: (event: React.ChangeEvent<HTMLInputElement>) => void;
|
|
15
|
-
onKeyUp?: (event: React.KeyboardEvent<HTMLInputElement>) => void;
|
|
16
|
-
}
|
|
17
|
-
export declare const FormInputMask: React.FC<Props>;
|
|
18
|
-
export {};
|
|
19
|
-
//# sourceMappingURL=mask.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"mask.d.ts","sourceRoot":"","sources":["../../../../src/components/custom/form/mask.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,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,IAAI,EAAE,MAAM,CAAC;IACb,eAAe,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAChC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,gBAAgB,CAAC,CAAC;IACvC,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,CAsDzC,CAAC"}
|
|
@@ -1,19 +0,0 @@
|
|
|
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 { MaskInput } from './input';
|
|
7
|
-
export const FormInputMask = ({ control, name, label, subLabel, helpText, placeholder, mask, maskPlaceholder, className, disabled, required, inputRef, onChange, onKeyUp, }) => {
|
|
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(MaskInput, { ...field, mask: mask, maskPlaceholder: maskPlaceholder, placeholder: placeholder, disabled: disabled || formState.isSubmitting, onChange: (e) => {
|
|
10
|
-
field.onChange(e);
|
|
11
|
-
if (onChange) {
|
|
12
|
-
onChange(e);
|
|
13
|
-
}
|
|
14
|
-
}, onKeyUp: (e) => {
|
|
15
|
-
if (onKeyUp) {
|
|
16
|
-
onKeyUp(e);
|
|
17
|
-
}
|
|
18
|
-
}, ref: inputRef }) }), formMessage(FormMessage)] })) }));
|
|
19
|
-
};
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
export interface FilterOption {
|
|
2
|
-
value: string;
|
|
3
|
-
label: string;
|
|
4
|
-
}
|
|
5
|
-
interface Props {
|
|
6
|
-
control: any;
|
|
7
|
-
name: string;
|
|
8
|
-
label?: string;
|
|
9
|
-
subLabel?: string;
|
|
10
|
-
helpText?: JSX.Element;
|
|
11
|
-
placeholder?: string;
|
|
12
|
-
className?: string;
|
|
13
|
-
disabled?: boolean;
|
|
14
|
-
required?: boolean;
|
|
15
|
-
options: FilterOption[];
|
|
16
|
-
}
|
|
17
|
-
export declare const FormMultiSelect: React.FC<Props>;
|
|
18
|
-
export {};
|
|
19
|
-
//# sourceMappingURL=multi-select-old.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"multi-select-old.d.ts","sourceRoot":"","sources":["../../../../src/components/custom/form/multi-select-old.tsx"],"names":[],"mappings":"AAUA,MAAM,WAAW,YAAY;IAC5B,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;CACd;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,YAAY,EAAE,CAAC;CACxB;AAED,eAAO,MAAM,eAAe,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,CA0F3C,CAAC"}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { cn } from '@/lib/utils';
|
|
3
|
-
import { Check, ChevronDown, X } from 'lucide-react';
|
|
4
|
-
import { useState } from 'react';
|
|
5
|
-
import * as FormComponents from '../../form';
|
|
6
|
-
import { Badge } from './badge';
|
|
7
|
-
import { formHelpText } from './form-help-text';
|
|
8
|
-
import { formLabelAndSubLabel } from './form-label';
|
|
9
|
-
import { formMessage } from './form-message';
|
|
10
|
-
import { Popover, PopoverContent, PopoverTrigger } from './popover';
|
|
11
|
-
export const FormMultiSelect = ({ control, name, label, subLabel, helpText, placeholder, className, disabled, required, options, }) => {
|
|
12
|
-
const { FormField, FormItem, FormLabel, FormControl, FormMessage } = FormComponents;
|
|
13
|
-
const [open, setOpen] = useState(false);
|
|
14
|
-
const removeOption = (option, field) => {
|
|
15
|
-
setOpen(false);
|
|
16
|
-
toggleOption(option, field);
|
|
17
|
-
};
|
|
18
|
-
const toggleOption = (option, field) => {
|
|
19
|
-
const prevValue = field.value || [];
|
|
20
|
-
const newValue = prevValue?.some((item) => item.value === option.value)
|
|
21
|
-
? prevValue.filter((item) => item.value !== option.value)
|
|
22
|
-
: [...prevValue, option];
|
|
23
|
-
field.onChange(newValue);
|
|
24
|
-
};
|
|
25
|
-
return (_jsx(FormField, { control: control, name: name, render: ({ field }) => (_jsxs(FormItem, { 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: setOpen, children: [_jsx(PopoverTrigger, { asChild: true, children: _jsx(FormControl, { children: _jsxs("div", { className: cn(className, 'flex rounded-md text-sm font-medium border border-input justify-between items-center'), children: [_jsx("div", { className: 'flex flex-wrap text-zinc-500 cursor-pointer w-full gap-1', children: field.value?.length > 0 ? (field.value.map((option) => (_jsxs(Badge, { className: 'flex max-h-[24px] items-center bg-zinc-100 text-zinc-950 text-[12px] font-medium py-1 px-2 rounded-[6px]', children: [option.label, _jsx(X, { className: 'cursor-pointer ml-2', size: 12, onClick: () => removeOption(option, field) })] }, option.value)))) : (_jsx("div", { className: 'w-full', children: placeholder || 'Selecionar' })) }), _jsx(ChevronDown, { size: 20, className: 'text-zinc-500 cursor-pointer' })] }) }) }), _jsx(PopoverContent, { className: cn('w-[240px] py-2 px-3', className), children: _jsx("div", { className: 'flex flex-col space-y-1 overflow-y-auto max-h-[200px]', children: options.map((option) => (_jsxs("div", { className: 'flex justify-between items-center gap-2 p-2 text-sm rounded-md cursor-pointer hover:bg-datatable-accent', onClick: () => toggleOption(option, field), onKeyDown: (e) => {
|
|
26
|
-
if (e.key === 'Enter' || e.key === ' ') {
|
|
27
|
-
toggleOption(option, field);
|
|
28
|
-
}
|
|
29
|
-
}, children: [option.label, field.value?.some((item) => item.value === option.value) && _jsx(Check, { size: 16 })] }, option.value))) }) })] }), formMessage(FormMessage)] })) }));
|
|
30
|
-
};
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { type VariantProps } from 'class-variance-authority';
|
|
2
|
-
import * as React from 'react';
|
|
3
|
-
declare const multiSelectVariants: (props?: ({
|
|
4
|
-
variant?: "default" | "destructive" | "secondary" | "inverted" | null | undefined;
|
|
5
|
-
} & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
|
|
6
|
-
export interface MultiSelectOption {
|
|
7
|
-
value: string;
|
|
8
|
-
label: string;
|
|
9
|
-
}
|
|
10
|
-
interface MultiSelectProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof multiSelectVariants> {
|
|
11
|
-
control: any;
|
|
12
|
-
name: string;
|
|
13
|
-
label?: string;
|
|
14
|
-
subLabel?: string;
|
|
15
|
-
helpText?: JSX.Element;
|
|
16
|
-
options: MultiSelectOption[];
|
|
17
|
-
placeholder?: string;
|
|
18
|
-
maxCount?: number;
|
|
19
|
-
modalPopover?: boolean;
|
|
20
|
-
asChild?: boolean;
|
|
21
|
-
className?: string;
|
|
22
|
-
required?: boolean;
|
|
23
|
-
}
|
|
24
|
-
export declare const MultiSelect: React.ForwardRefExoticComponent<MultiSelectProps & React.RefAttributes<HTMLButtonElement>>;
|
|
25
|
-
export {};
|
|
26
|
-
//# sourceMappingURL=multi-select.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"multi-select.d.ts","sourceRoot":"","sources":["../../../../src/components/custom/form/multi-select.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,YAAY,EAAO,MAAM,0BAA0B,CAAC;AAElE,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAU/B,QAAA,MAAM,mBAAmB;;mFAYvB,CAAC;AAEH,MAAM,WAAW,iBAAiB;IACjC,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;CACd;AAED,UAAU,gBAAiB,SAAQ,KAAK,CAAC,oBAAoB,CAAC,iBAAiB,CAAC,EAAE,YAAY,CAAC,OAAO,mBAAmB,CAAC;IACzH,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,OAAO,EAAE,iBAAiB,EAAE,CAAC;IAC7B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,eAAO,MAAM,WAAW,4FA8JvB,CAAC"}
|
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { cn } from '@/lib/utils';
|
|
3
|
-
import { cva } from 'class-variance-authority';
|
|
4
|
-
import { CheckIcon, ChevronDown, X } from 'lucide-react';
|
|
5
|
-
import * as React from 'react';
|
|
6
|
-
import * as FormComponents from '../../form';
|
|
7
|
-
import { Badge } from './badge';
|
|
8
|
-
import { Button } from './button';
|
|
9
|
-
import { Command, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList } from './command';
|
|
10
|
-
import { formHelpText } from './form-help-text';
|
|
11
|
-
import { formLabelAndSubLabel } from './form-label';
|
|
12
|
-
import { formMessage } from './form-message';
|
|
13
|
-
import { Popover, PopoverContent, PopoverTrigger } from './popover';
|
|
14
|
-
const multiSelectVariants = cva('m-1 rounded-[6px]', {
|
|
15
|
-
variants: {
|
|
16
|
-
variant: {
|
|
17
|
-
default: 'text-foreground bg-background-secondary dark:bg-popover hover:bg-background-secondary',
|
|
18
|
-
secondary: 'border-foreground/10 bg-secondary text-secondary-foreground hover:bg-secondary/80',
|
|
19
|
-
destructive: 'border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80',
|
|
20
|
-
inverted: 'inverted',
|
|
21
|
-
},
|
|
22
|
-
},
|
|
23
|
-
defaultVariants: {
|
|
24
|
-
variant: 'default',
|
|
25
|
-
},
|
|
26
|
-
});
|
|
27
|
-
export const MultiSelect = React.forwardRef(({ control, name, label, subLabel, helpText, options, variant, placeholder, maxCount = 2, modalPopover = false, asChild = false, className, required, ...props }, ref) => {
|
|
28
|
-
const { FormField, FormItem, FormLabel, FormControl, FormMessage } = FormComponents;
|
|
29
|
-
const [isPopoverOpen, setIsPopoverOpen] = React.useState(false);
|
|
30
|
-
const DEFAULT_PLACEHOLDER_FILTER = 'Digite para buscar...';
|
|
31
|
-
const DEFAULT_PLACEHOLDER = 'Selecione';
|
|
32
|
-
const toggleOption = (option, field) => {
|
|
33
|
-
const prevValue = field.value || [];
|
|
34
|
-
const newValue = prevValue?.some((item) => item.value === option.value)
|
|
35
|
-
? prevValue.filter((item) => item.value !== option.value)
|
|
36
|
-
: [...prevValue, option];
|
|
37
|
-
field.onChange(newValue);
|
|
38
|
-
};
|
|
39
|
-
const handleClear = (field) => {
|
|
40
|
-
field.onChange([]);
|
|
41
|
-
};
|
|
42
|
-
const handleTogglePopover = () => {
|
|
43
|
-
setIsPopoverOpen((prev) => !prev);
|
|
44
|
-
};
|
|
45
|
-
const toggleAll = (field) => {
|
|
46
|
-
if (field.value?.length === options.length) {
|
|
47
|
-
handleClear(field);
|
|
48
|
-
}
|
|
49
|
-
else {
|
|
50
|
-
const allValues = options.map((option) => option);
|
|
51
|
-
field.onChange(allValues);
|
|
52
|
-
}
|
|
53
|
-
};
|
|
54
|
-
return (_jsx(FormField, { control: control, name: name, render: ({ field }) => (_jsxs(FormItem, { children: [_jsxs("div", { className: 'flex items-center space-x-1.5', children: [label && formLabelAndSubLabel(FormLabel, label, subLabel, required), helpText && formHelpText(helpText)] }), _jsxs(Popover, { open: isPopoverOpen, onOpenChange: setIsPopoverOpen, modal: modalPopover, children: [_jsx(PopoverTrigger, { asChild: true, children: _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 ? (_jsxs("div", { className: 'flex justify-between items-center w-full', children: [_jsxs("div", { className: 'flex items-center', children: [_jsx("div", { className: `grid grid-cols-${maxCount}`, children: field.value.slice(0, maxCount).map((option) => {
|
|
55
|
-
return (_jsxs(Badge, { className: cn(multiSelectVariants({ variant })), onClick: (event) => {
|
|
56
|
-
event.stopPropagation();
|
|
57
|
-
toggleOption(option, field);
|
|
58
|
-
}, children: [_jsx("div", { className: 'truncate', children: option?.label }), _jsx(X, { className: 'ml-2 cursor-pointer text-zinc-500' })] }, `msoptlbl-${option.value}`));
|
|
59
|
-
}) }), field.value?.length > maxCount && (_jsx(Badge, { variant: 'surface', children: `+${field.value?.length - maxCount}` }))] }), _jsx("div", { className: 'flex items-center justify-between', children: _jsx(ChevronDown, { className: 'h-4 mx-2 cursor-pointer text-muted-foreground' }) })] })) : (_jsxs("div", { className: 'flex items-center justify-between w-full mx-auto', children: [_jsx("span", { className: 'text-sm text-muted-foreground mx-3', children: placeholder ?? DEFAULT_PLACEHOLDER }), _jsx(ChevronDown, { className: 'h-4 cursor-pointer text-muted-foreground mx-2' })] })) }) }), _jsx(PopoverContent, { className: cn('w-auto p-0', 'w-[--radix-popover-trigger-width]'), align: 'start', onEscapeKeyDown: () => setIsPopoverOpen(false), children: _jsxs(Command, { children: [_jsx(CommandInput, { placeholder: DEFAULT_PLACEHOLDER_FILTER }), _jsxs(CommandList, { children: [_jsx(CommandEmpty, { children: "Nenhum resultado encontrado" }), _jsxs(CommandGroup, { children: [_jsxs(CommandItem, { onSelect: () => toggleAll(field), className: 'cursor-pointer', children: [_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
|
|
60
|
-
? 'bg-primary text-primary-foreground'
|
|
61
|
-
: 'opacity-50 [&_svg]:invisible'), children: _jsx(CheckIcon, { className: 'h-4 w-4' }) }), _jsx("span", { children: "(Selecionar Todos)" })] }, 'all'), options.map((option) => {
|
|
62
|
-
const isSelected = field.value?.some((item) => item.value === option.value);
|
|
63
|
-
return (_jsxs(CommandItem, { onSelect: () => toggleOption(option, field), className: 'cursor-pointer', children: [_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: _jsx(CheckIcon, { className: 'h-4 w-4' }) }), _jsx("span", { children: option.label })] }, `msopt-${option.value}`));
|
|
64
|
-
})] })] })] }) })] }), formMessage(FormMessage)] })) }));
|
|
65
|
-
});
|
|
66
|
-
MultiSelect.displayName = 'MultiSelect';
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
interface Props {
|
|
2
|
-
control: any;
|
|
3
|
-
name: string;
|
|
4
|
-
label: string;
|
|
5
|
-
subLabel?: string;
|
|
6
|
-
helpText?: JSX.Element;
|
|
7
|
-
placeholder?: string;
|
|
8
|
-
maxLength?: number;
|
|
9
|
-
className?: string;
|
|
10
|
-
disabled?: boolean;
|
|
11
|
-
required?: boolean;
|
|
12
|
-
onChange?: (event: React.ChangeEvent<HTMLInputElement>) => void;
|
|
13
|
-
}
|
|
14
|
-
export declare const FormInputPassWord: React.FC<Props>;
|
|
15
|
-
export {};
|
|
16
|
-
//# sourceMappingURL=password.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"password.d.ts","sourceRoot":"","sources":["../../../../src/components/custom/form/password.tsx"],"names":[],"mappings":"AAQA,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,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,CA+C7C,CAAC"}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { Eye, EyeOff } from 'lucide-react';
|
|
3
|
-
import { useState } from 'react';
|
|
4
|
-
import * as FormComponents from '../../form';
|
|
5
|
-
import { formHelpText } from './form-help-text';
|
|
6
|
-
import { formLabelAndSubLabel } from './form-label';
|
|
7
|
-
import { formMessage } from './form-message';
|
|
8
|
-
import { InputText } from './input';
|
|
9
|
-
export const FormInputPassWord = ({ control, name, label, subLabel, helpText, placeholder, maxLength, className, disabled, required, }) => {
|
|
10
|
-
const { FormField, FormItem, FormLabel, FormControl, FormMessage } = FormComponents;
|
|
11
|
-
const [showPassword, setShowPassword] = useState(true);
|
|
12
|
-
const togglePasswordVisibility = () => setShowPassword((prev) => !prev);
|
|
13
|
-
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(InputText, { ...field, type: showPassword ? 'password' : 'text', name: name, maxLength: maxLength, className: className, placeholder: placeholder, disabled: disabled || formState.isSubmitting }), _jsx("button", { type: 'button', onClick: togglePasswordVisibility, className: 'absolute inset-y-0 right-2 flex items-center', children: showPassword ? _jsx(EyeOff, { className: 'w-5 h-5 text-slate-500' }) : _jsx(Eye, { className: 'w-5 h-5 text-slate-500' }) })] }) }), formMessage(FormMessage)] })) }));
|
|
14
|
-
};
|
|
@@ -1,14 +0,0 @@
|
|
|
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 FormInputPercent: React.FC<Props>;
|
|
13
|
-
export {};
|
|
14
|
-
//# sourceMappingURL=percent.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"percent.d.ts","sourceRoot":"","sources":["../../../../src/components/custom/form/percent.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,CAgC5C,CAAC"}
|
|
@@ -1,15 +0,0 @@
|
|
|
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 FormInputPercent = ({ 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: '%', className: `${className}`, disabled: disabled || formState.isSubmitting, onChange: (e) => {
|
|
10
|
-
field.onChange(e);
|
|
11
|
-
if (onChange) {
|
|
12
|
-
onChange(e);
|
|
13
|
-
}
|
|
14
|
-
} }) }), formMessage(FormMessage)] })) }));
|
|
15
|
-
};
|
|
@@ -1,16 +0,0 @@
|
|
|
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 FormInputPhone: React.FC<Props>;
|
|
15
|
-
export {};
|
|
16
|
-
//# sourceMappingURL=phone.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"phone.d.ts","sourceRoot":"","sources":["../../../../src/components/custom/form/phone.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,cAAc,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,CAsD1C,CAAC"}
|