prometeo-design-system 3.1.5 → 3.1.6
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/Avatar.d.ts +4 -0
- package/dist/Avatar.es.js +94 -0
- package/dist/Button.d.ts +6 -0
- package/dist/Button.es.js +400 -0
- package/dist/CardProfile-y9Knsg26.js +280 -0
- package/dist/CardProfile.d.ts +6 -0
- package/dist/CardProfile.es.js +5 -0
- package/dist/CheckBox.d.ts +6 -0
- package/dist/CheckBox.es.js +112 -0
- package/dist/DatePicker-6eb-0Ns5.js +3733 -0
- package/dist/DatePicker.d.ts +6 -0
- package/dist/DatePicker.es.js +5 -0
- package/dist/DialogModal.d.ts +6 -0
- package/dist/DialogModal.es.js +75 -0
- package/dist/DrawerDesktop.d.ts +6 -0
- package/dist/DrawerDesktop.es.js +217 -0
- package/dist/DrawerMobile.d.ts +6 -0
- package/dist/DrawerMobile.es.js +243 -0
- package/dist/DropZone.d.ts +6 -0
- package/dist/DropZone.es.js +88 -0
- package/dist/FAButton.d.ts +4 -0
- package/dist/FAButton.es.js +111 -0
- package/dist/Header.d.ts +6 -0
- package/dist/Header.es.js +32 -0
- package/dist/HelperComponent-ljsn0xD6.js +26 -0
- package/dist/Icons/AccountCircle.d.ts +6 -0
- package/dist/Icons/AccountCircle.es.js +21 -0
- package/dist/Icons/Add.d.ts +6 -0
- package/dist/Icons/Add.es.js +19 -0
- package/dist/Icons/ArrowLeft.d.ts +6 -0
- package/dist/Icons/ArrowLeft.es.js +19 -0
- package/dist/Icons/ArrowUpDown.d.ts +6 -0
- package/dist/Icons/ArrowUpDown.es.js +21 -0
- package/dist/Icons/AttachFile.d.ts +6 -0
- package/dist/Icons/AttachFile.es.js +19 -0
- package/dist/Icons/Boards.d.ts +6 -0
- package/dist/Icons/Boards.es.js +19 -0
- package/dist/Icons/Calendar.d.ts +6 -0
- package/dist/Icons/Calendar.es.js +19 -0
- package/dist/Icons/Cancel.d.ts +6 -0
- package/dist/Icons/Cancel.es.js +19 -0
- package/dist/Icons/Check.d.ts +6 -0
- package/dist/Icons/Check.es.js +19 -0
- package/dist/Icons/CheckCircle.d.ts +6 -0
- package/dist/Icons/CheckCircle.es.js +21 -0
- package/dist/Icons/CheckList.d.ts +6 -0
- package/dist/Icons/CheckList.es.js +25 -0
- package/dist/Icons/ChevronDown.d.ts +6 -0
- package/dist/Icons/ChevronDown.es.js +21 -0
- package/dist/Icons/Clock.d.ts +6 -0
- package/dist/Icons/Clock.es.js +19 -0
- package/dist/Icons/Close.d.ts +6 -0
- package/dist/Icons/Close.es.js +19 -0
- package/dist/Icons/CloseNavBarDesktop.d.ts +6 -0
- package/dist/Icons/CloseNavBarDesktop.es.js +36 -0
- package/dist/Icons/Collapse.d.ts +6 -0
- package/dist/Icons/Collapse.es.js +19 -0
- package/dist/Icons/Company.d.ts +6 -0
- package/dist/Icons/Company.es.js +25 -0
- package/dist/Icons/Copy.d.ts +6 -0
- package/dist/Icons/Copy.es.js +19 -0
- package/dist/Icons/CrevronLeft.d.ts +6 -0
- package/dist/Icons/CrevronLeft.es.js +21 -0
- package/dist/Icons/CrevronRight.d.ts +6 -0
- package/dist/Icons/CrevronRight.es.js +21 -0
- package/dist/Icons/DocumentFill.d.ts +6 -0
- package/dist/Icons/DocumentFill.es.js +27 -0
- package/dist/Icons/Download.d.ts +6 -0
- package/dist/Icons/Download.es.js +25 -0
- package/dist/Icons/Edit.d.ts +6 -0
- package/dist/Icons/Edit.es.js +19 -0
- package/dist/Icons/EditFill.d.ts +6 -0
- package/dist/Icons/EditFill.es.js +25 -0
- package/dist/Icons/Email.d.ts +6 -0
- package/dist/Icons/Email.es.js +25 -0
- package/dist/Icons/Error.d.ts +6 -0
- package/dist/Icons/Error.es.js +19 -0
- package/dist/Icons/EyeVisibility.d.ts +6 -0
- package/dist/Icons/EyeVisibility.es.js +21 -0
- package/dist/Icons/EyeVisibilityOff.d.ts +6 -0
- package/dist/Icons/EyeVisibilityOff.es.js +21 -0
- package/dist/Icons/FaLock.d.ts +6 -0
- package/dist/Icons/FaLock.es.js +19 -0
- package/dist/Icons/FastForward.d.ts +6 -0
- package/dist/Icons/FastForward.es.js +27 -0
- package/dist/Icons/File.d.ts +6 -0
- package/dist/Icons/File.es.js +25 -0
- package/dist/Icons/Filter.d.ts +6 -0
- package/dist/Icons/Filter.es.js +19 -0
- package/dist/Icons/FormatColorText.d.ts +6 -0
- package/dist/Icons/FormatColorText.es.js +26 -0
- package/dist/Icons/Help.d.ts +6 -0
- package/dist/Icons/Help.es.js +19 -0
- package/dist/Icons/HistoryActivity.d.ts +6 -0
- package/dist/Icons/HistoryActivity.es.js +21 -0
- package/dist/Icons/Home.d.ts +6 -0
- package/dist/Icons/Home.es.js +19 -0
- package/dist/Icons/Image.d.ts +6 -0
- package/dist/Icons/Image.es.js +25 -0
- package/dist/Icons/Info.d.ts +6 -0
- package/dist/Icons/Info.es.js +19 -0
- package/dist/Icons/Logout.d.ts +6 -0
- package/dist/Icons/Logout.es.js +19 -0
- package/dist/Icons/MessageSquare.d.ts +6 -0
- package/dist/Icons/MessageSquare.es.js +21 -0
- package/dist/Icons/MessageSquareFill.d.ts +6 -0
- package/dist/Icons/MessageSquareFill.es.js +27 -0
- package/dist/Icons/MoreVert.d.ts +6 -0
- package/dist/Icons/MoreVert.es.js +19 -0
- package/dist/Icons/Notifications.d.ts +6 -0
- package/dist/Icons/Notifications.es.js +21 -0
- package/dist/Icons/Pause.d.ts +6 -0
- package/dist/Icons/Pause.es.js +19 -0
- package/dist/Icons/Reassignment.d.ts +6 -0
- package/dist/Icons/Reassignment.es.js +22 -0
- package/dist/Icons/ReassignmentFill.d.ts +6 -0
- package/dist/Icons/ReassignmentFill.es.js +52 -0
- package/dist/Icons/Reload.d.ts +6 -0
- package/dist/Icons/Reload.es.js +25 -0
- package/dist/Icons/Search.d.ts +6 -0
- package/dist/Icons/Search.es.js +19 -0
- package/dist/Icons/Send.d.ts +6 -0
- package/dist/Icons/Send.es.js +24 -0
- package/dist/Icons/Settings.d.ts +6 -0
- package/dist/Icons/Settings.es.js +19 -0
- package/dist/Icons/Shared.d.ts +6 -0
- package/dist/Icons/Shared.es.js +19 -0
- package/dist/Icons/Sort.d.ts +6 -0
- package/dist/Icons/Sort.es.js +19 -0
- package/dist/Icons/Stars.d.ts +6 -0
- package/dist/Icons/Stars.es.js +19 -0
- package/dist/Icons/Ticket.d.ts +6 -0
- package/dist/Icons/Ticket.es.js +19 -0
- package/dist/Icons/TicketFilled.d.ts +6 -0
- package/dist/Icons/TicketFilled.es.js +21 -0
- package/dist/Icons/Trash.d.ts +6 -0
- package/dist/Icons/Trash.es.js +19 -0
- package/dist/Icons/TrashFill.d.ts +6 -0
- package/dist/Icons/TrashFill.es.js +25 -0
- package/dist/Icons/Upload.d.ts +6 -0
- package/dist/Icons/Upload.es.js +19 -0
- package/dist/Icons/UploadCloud.d.ts +6 -0
- package/dist/Icons/UploadCloud.es.js +21 -0
- package/dist/Icons/UserAdd.d.ts +6 -0
- package/dist/Icons/UserAdd.es.js +19 -0
- package/dist/Icons/UserAddFill.d.ts +6 -0
- package/dist/Icons/UserAddFill.es.js +27 -0
- package/dist/Icons/UserPerson.d.ts +6 -0
- package/dist/Icons/UserPerson.es.js +19 -0
- package/dist/Icons/WhatsApp.d.ts +6 -0
- package/dist/Icons/WhatsApp.es.js +76 -0
- package/dist/Icons/components/AccountCircle.d.ts +4 -0
- package/dist/Icons/components/Add.d.ts +4 -0
- package/dist/Icons/components/ArrowLeft.d.ts +4 -0
- package/dist/Icons/components/ArrowUpDown.d.ts +4 -0
- package/dist/Icons/components/AttachFile.d.ts +4 -0
- package/dist/Icons/components/Boards.d.ts +4 -0
- package/dist/Icons/components/Calendar.d.ts +4 -0
- package/dist/Icons/components/Cancel.d.ts +4 -0
- package/dist/Icons/components/Check.d.ts +4 -0
- package/dist/Icons/components/CheckCircle.d.ts +4 -0
- package/dist/Icons/components/CheckList.d.ts +4 -0
- package/dist/Icons/components/ChevronDown.d.ts +4 -0
- package/dist/Icons/components/Clock.d.ts +4 -0
- package/dist/Icons/components/Close.d.ts +4 -0
- package/dist/Icons/components/CloseNavBarDesktop.d.ts +4 -0
- package/dist/Icons/components/Collapse.d.ts +4 -0
- package/dist/Icons/components/Company.d.ts +4 -0
- package/dist/Icons/components/Copy.d.ts +4 -0
- package/dist/Icons/components/CrevronLeft.d.ts +4 -0
- package/dist/Icons/components/CrevronRight.d.ts +4 -0
- package/dist/Icons/components/DocumentFill.d.ts +4 -0
- package/dist/Icons/components/Download.d.ts +4 -0
- package/dist/Icons/components/Edit.d.ts +4 -0
- package/dist/Icons/components/EditFill.d.ts +4 -0
- package/dist/Icons/components/Email.d.ts +4 -0
- package/dist/Icons/components/Error.d.ts +4 -0
- package/dist/Icons/components/EyeVisibility.d.ts +4 -0
- package/dist/Icons/components/EyeVisibilityOff.d.ts +4 -0
- package/dist/Icons/components/FaLock.d.ts +4 -0
- package/dist/Icons/components/FastForward.d.ts +4 -0
- package/dist/Icons/components/File.d.ts +4 -0
- package/dist/Icons/components/Filter.d.ts +4 -0
- package/dist/Icons/components/FormatColorText.d.ts +4 -0
- package/dist/Icons/components/Help.d.ts +4 -0
- package/dist/Icons/components/HistoryActivity.d.ts +4 -0
- package/dist/Icons/components/Home.d.ts +4 -0
- package/dist/Icons/components/Image.d.ts +4 -0
- package/dist/Icons/components/Info.d.ts +4 -0
- package/dist/Icons/components/Logout.d.ts +4 -0
- package/dist/Icons/components/MessageSquare.d.ts +4 -0
- package/dist/Icons/components/MessageSquareFill.d.ts +4 -0
- package/dist/Icons/components/MoreVert.d.ts +4 -0
- package/dist/Icons/components/Notifications.d.ts +4 -0
- package/dist/Icons/components/Pause.d.ts +4 -0
- package/dist/Icons/components/Reassignment.d.ts +4 -0
- package/dist/Icons/components/ReassignmentFill.d.ts +4 -0
- package/dist/Icons/components/Reload.d.ts +4 -0
- package/dist/Icons/components/Search.d.ts +4 -0
- package/dist/Icons/components/Send.d.ts +4 -0
- package/dist/Icons/components/Settings.d.ts +4 -0
- package/dist/Icons/components/Shared.d.ts +4 -0
- package/dist/Icons/components/Sort.d.ts +4 -0
- package/dist/Icons/components/Stars.d.ts +4 -0
- package/dist/Icons/components/Ticket.d.ts +4 -0
- package/dist/Icons/components/TicketFilled.d.ts +4 -0
- package/dist/Icons/components/Trash.d.ts +4 -0
- package/dist/Icons/components/TrashFill.d.ts +4 -0
- package/dist/Icons/components/Upload.d.ts +4 -0
- package/dist/Icons/components/UploadCloud.d.ts +4 -0
- package/dist/Icons/components/UserAdd.d.ts +4 -0
- package/dist/Icons/components/UserAddFill.d.ts +4 -0
- package/dist/Icons/components/UserPerson.d.ts +4 -0
- package/dist/Icons/components/WhatsApp.d.ts +4 -0
- package/dist/Icons/iconUtils.d.ts +7 -0
- package/dist/Icons/index.d.ts +65 -0
- package/dist/Icons/types.d.ts +130 -0
- package/dist/Icons.d.ts +2 -0
- package/dist/Icons.es.js +128 -0
- package/dist/Image.d.ts +4 -0
- package/dist/Image.es.js +91 -0
- package/dist/ImageGallery-DG9ovlQ-.js +319 -0
- package/dist/ImageGallery.d.ts +6 -0
- package/dist/ImageGallery.es.js +23 -0
- package/dist/Input.d.ts +6 -0
- package/dist/Input.es.js +220 -0
- package/dist/InputMultiple.d.ts +6 -0
- package/dist/InputMultiple.es.js +265 -0
- package/dist/LayoutGeneric-CfWhV1ov.js +26 -0
- package/dist/LayoutGeneric.d.ts +6 -0
- package/dist/LayoutGeneric.es.js +4 -0
- package/dist/Logo.d.ts +4 -0
- package/dist/Logo.es.js +9 -0
- package/dist/Menu.d.ts +6 -0
- package/dist/Menu.es.js +77 -0
- package/dist/NotificationCard.d.ts +6 -0
- package/dist/NotificationCard.es.js +50 -0
- package/dist/OtpInput.d.ts +6 -0
- package/dist/OtpInput.es.js +302 -0
- package/dist/Pagination.d.ts +6 -0
- package/dist/Pagination.es.js +97 -0
- package/dist/ProfilePictureUpload.d.ts +6 -0
- package/dist/ProfilePictureUpload.es.js +189 -0
- package/dist/ProgressBar.d.ts +6 -0
- package/dist/ProgressBar.es.js +70 -0
- package/dist/PyrionNavigationDrawer.d.ts +6 -0
- package/dist/PyrionNavigationDrawer.es.js +962 -0
- package/dist/RadioButton.d.ts +6 -0
- package/dist/RadioButton.es.js +78 -0
- package/dist/RecurrentDatePicker.d.ts +2 -0
- package/dist/RecurrentDatePicker.es.js +694 -0
- package/dist/RecurrentDatePickerRRule.d.ts +2 -0
- package/dist/RecurrentDatePickerRRule.es.js +1682 -0
- package/dist/Scrollable.d.ts +2 -0
- package/dist/Scrollable.es.js +260 -0
- package/dist/SegmentedButton.d.ts +6 -0
- package/dist/SegmentedButton.es.js +185 -0
- package/dist/Select.d.ts +6 -0
- package/dist/Select.es.js +1061 -0
- package/dist/SelectSearch.d.ts +6 -0
- package/dist/SelectSearch.es.js +284 -0
- package/dist/Skeleton.d.ts +6 -0
- package/dist/Skeleton.es.js +74 -0
- package/dist/Spinner.d.ts +6 -0
- package/dist/Spinner.es.js +178 -0
- package/dist/Steps.d.ts +6 -0
- package/dist/Steps.es.js +214 -0
- package/dist/SwipeContainer.d.ts +4 -0
- package/dist/SwipeContainer.es.js +185 -0
- package/dist/Switch.d.ts +6 -0
- package/dist/Switch.es.js +97 -0
- package/dist/TabLinks.d.ts +4 -0
- package/dist/TabLinks.es.js +94 -0
- package/dist/Table.d.ts +2 -0
- package/dist/Table.es.js +121 -0
- package/dist/TextArea.d.ts +4 -0
- package/dist/TextArea.es.js +66 -0
- package/dist/TicketCard.d.ts +6 -0
- package/dist/TicketCard.es.js +130 -0
- package/dist/Toast.d.ts +6 -0
- package/dist/Toast.es.js +150 -0
- package/dist/ToastProvider.d.ts +6 -0
- package/dist/ToastProvider.es.js +6 -0
- package/dist/Tooltip.d.ts +6 -0
- package/dist/Tooltip.es.js +62 -0
- package/dist/assets/psmlogo.png +0 -0
- package/dist/badge-B1IK_-i5.js +87 -0
- package/dist/cn-B6yFEsav.js +8 -0
- package/dist/components/Autocomplete/Autocomplete.d.ts +20 -0
- package/dist/components/Autocomplete/useAutocomplete.d.ts +43 -0
- package/dist/components/Avatar/Avatar.d.ts +11 -0
- package/dist/components/Avatar/index.d.ts +1 -0
- package/dist/components/Button/Button.d.ts +23 -0
- package/dist/components/Button/index.d.ts +2 -0
- package/dist/components/Card/Card.d.ts +12 -0
- package/dist/components/CardProfile/CardProfile.d.ts +55 -0
- package/dist/components/CheckBox/CheckBox.d.ts +11 -0
- package/dist/components/DatePicker/DatePicker.d.ts +82 -0
- package/dist/components/Dialog/Dialog.d.ts +35 -0
- package/dist/components/Dialog/DialogV2.d.ts +35 -0
- package/dist/components/Dialog/useDialogControl.d.ts +8 -0
- package/dist/components/Drawer/DrawerDesktop.d.ts +21 -0
- package/dist/components/Drawer/DrawerMobile.d.ts +24 -0
- package/dist/components/Drawer/useDrawerDesktop.d.ts +8 -0
- package/dist/components/Drawer/useDrawerMobile.d.ts +8 -0
- package/dist/components/DropZone/DropZone.d.ts +16 -0
- package/dist/components/DropZone/DropzoneCompossable.d.ts +54 -0
- package/dist/components/DropZone/useFileDropzone.d.ts +21 -0
- package/dist/components/FAB/FAButton.d.ts +21 -0
- package/dist/components/FileCard/FileCard.d.ts +52 -0
- package/dist/components/Header/Header.d.ts +11 -0
- package/dist/components/Image/GalleryPreview.d.ts +8 -0
- package/dist/components/Image/Image.d.ts +23 -0
- package/dist/components/Image/ImageGallery.d.ts +18 -0
- package/dist/components/Image/LightBox.d.ts +14 -0
- package/dist/components/Image/index.d.ts +5 -0
- package/dist/components/Image/useImageGallery.d.ts +10 -0
- package/dist/components/Input/Input.d.ts +34 -0
- package/dist/components/InputMultiple/InputMultiple.d.ts +25 -0
- package/dist/components/Layout/LayoutGeneric.d.ts +6 -0
- package/dist/components/Logo/Logo.d.ts +2 -0
- package/dist/components/Menu/MenuComposable.d.ts +15 -0
- package/dist/components/NavigationDrawer/NavItemSecondary.d.ts +10 -0
- package/dist/components/NavigationDrawer/NavigationDrawer.d.ts +49 -0
- package/dist/components/NavigationDrawer/NavigationDrawerActionItem.d.ts +16 -0
- package/dist/components/NavigationDrawer/NavigationDrawerActions.d.ts +9 -0
- package/dist/components/NavigationDrawer/NavigationDrawerItemBase.d.ts +18 -0
- package/dist/components/NavigationDrawer/NavigationDrawerLinkItem.d.ts +30 -0
- package/dist/components/NavigationDrawer/NavigationDrawerNavlinks.d.ts +11 -0
- package/dist/components/NavigationDrawer/index.d.ts +2 -0
- package/dist/components/NotificationCard/NotificationCard.d.ts +25 -0
- package/dist/components/NotificationCard/index.d.ts +3 -0
- package/dist/components/OtpInput/OtpInput.d.ts +30 -0
- package/dist/components/Pagination/Pagination.d.ts +6 -0
- package/dist/components/ProfilePictureUpload/ProfilePictureUpload.d.ts +19 -0
- package/dist/components/ProgressBar/ProgressBar.d.ts +18 -0
- package/dist/components/PyrionNavigationDrawer/PyrionHelpSection.d.ts +8 -0
- package/dist/components/PyrionNavigationDrawer/PyrionNavigationDrawer.d.ts +130 -0
- package/dist/components/PyrionNavigationDrawer/PyrionNavigationDrawerMobileAppSwitcher.d.ts +10 -0
- package/dist/components/PyrionNavigationDrawer/PyrionNavigationDrawerSystemLogo.d.ts +7 -0
- package/dist/components/PyrionNavigationDrawer/PyrionNotificationsList.d.ts +8 -0
- package/dist/components/PyrionNavigationDrawer/SidebarContent.d.ts +13 -0
- package/dist/components/PyrionNavigationDrawer/SystemSessions.d.ts +12 -0
- package/dist/components/PyrionNavigationDrawer/index.d.ts +3 -0
- package/dist/components/RadioButton/RadioButton.d.ts +14 -0
- package/dist/components/RecurrentDatePicker/CustomFrequencySettings.d.ts +40 -0
- package/dist/components/RecurrentDatePicker/FrequencySettings.d.ts +13 -0
- package/dist/components/RecurrentDatePicker/MonthlyFrequencySettings.d.ts +35 -0
- package/dist/components/RecurrentDatePicker/PreviewCalendar.d.ts +5 -0
- package/dist/components/RecurrentDatePicker/RecurrentDatePicker.d.ts +39 -0
- package/dist/components/RecurrentDatePicker/RecurrentDatePickerRRule.d.ts +13 -0
- package/dist/components/RecurrentDatePicker/WeekdaysSelector.d.ts +13 -0
- package/dist/components/RecurrentDatePicker/WeeklyFrequencySetting.d.ts +9 -0
- package/dist/components/RecurrentDatePicker/YearlyFrequencySettings.d.ts +21 -0
- package/dist/components/RecurrentDatePicker/recurrentDatePicker.validations.d.ts +69 -0
- package/dist/components/Scrollable/Scrollable.d.ts +31 -0
- package/dist/components/SegmentedButton/SegmentedButton.d.ts +20 -0
- package/dist/components/Select/Select.d.ts +123 -0
- package/dist/components/SelectSearch/SelectSearch.d.ts +40 -0
- package/dist/components/Shared/Chip.d.ts +15 -0
- package/dist/components/Shared/HelperComponent.d.ts +13 -0
- package/dist/components/Sidebar/SecondaryBar/SecondaryBar.d.ts +32 -0
- package/dist/components/Sidebar/SecondaryBar/hooks/useSecondaryBarAnimation.d.ts +2 -0
- package/dist/components/Sidebar/SecondaryBar/index.d.ts +1 -0
- package/dist/components/Sidebar/SidebarComposable.d.ts +43 -0
- package/dist/components/Sidebar/components/NavigationLink.d.ts +11 -0
- package/dist/components/Sidebar/components/badge.d.ts +10 -0
- package/dist/components/Sidebar/components/changue-account.d.ts +5 -0
- package/dist/components/Sidebar/components/collapse-button.d.ts +5 -0
- package/dist/components/Sidebar/components/company-logo.d.ts +5 -0
- package/dist/components/Sidebar/components/nav-actions.d.ts +7 -0
- package/dist/components/Sidebar/components/nav-links.d.ts +7 -0
- package/dist/components/Sidebar/context/SidebarContext.d.ts +13 -0
- package/dist/components/Sidebar/hooks/SidebarProvider.d.ts +3 -0
- package/dist/components/Sidebar/hooks/useNavBarActions.d.ts +9 -0
- package/dist/components/Sidebar/hooks/useNavBarCollapse.d.ts +4 -0
- package/dist/components/Sidebar/hooks/useNavLinks.d.ts +32 -0
- package/dist/components/Sidebar/hooks/useSidebarHook.d.ts +13 -0
- package/dist/components/Sidebar/index.d.ts +12 -0
- package/dist/components/Sidebar/ui/useNavbarAnimation.d.ts +2 -0
- package/dist/components/Skeleton/Skeleton.d.ts +13 -0
- package/dist/components/Spinner/Spinner.d.ts +12 -0
- package/dist/components/Steps/Steps.d.ts +21 -0
- package/dist/components/SwipeContainer/SwipeContainer.d.ts +19 -0
- package/dist/components/Switch/Switch.d.ts +11 -0
- package/dist/components/TabLinks/TabLinks.d.ts +23 -0
- package/dist/components/TabSwitch/TabSwitch.d.ts +16 -0
- package/dist/components/Table/Table.d.ts +14 -0
- package/dist/components/Table/TableWithPagination.d.ts +11 -0
- package/dist/components/TextArea/TextArea.d.ts +15 -0
- package/dist/components/TicketCard/TicketCard.d.ts +32 -0
- package/dist/components/TicketCard/index.d.ts +3 -0
- package/dist/components/Toaster/ToastProvider.d.ts +5 -0
- package/dist/components/Toaster/Toaster.d.ts +36 -0
- package/dist/components/Tooltip/Tootip.d.ts +10 -0
- package/dist/components/UserCard/UserCard.d.ts +12 -0
- package/dist/exports/Autocomplete.d.ts +1 -0
- package/dist/exports/Avatar.d.ts +1 -0
- package/dist/exports/Button.d.ts +2 -0
- package/dist/exports/CardProfile.d.ts +3 -0
- package/dist/exports/CheckBox.d.ts +2 -0
- package/dist/exports/DatePicker.d.ts +3 -0
- package/dist/exports/DialogModal.d.ts +2 -0
- package/dist/exports/DrawerDesktop.d.ts +4 -0
- package/dist/exports/DrawerMobile.d.ts +4 -0
- package/dist/exports/DropZone.d.ts +3 -0
- package/dist/exports/FAButton.d.ts +1 -0
- package/dist/exports/Header.d.ts +2 -0
- package/dist/exports/Icons.d.ts +1 -0
- package/dist/exports/Image.d.ts +1 -0
- package/dist/exports/ImageGallery.d.ts +2 -0
- package/dist/exports/Input.d.ts +2 -0
- package/dist/exports/InputMultiple.d.ts +3 -0
- package/dist/exports/LayoutGeneric.d.ts +2 -0
- package/dist/exports/Logo.d.ts +1 -0
- package/dist/exports/Menu.d.ts +3 -0
- package/dist/exports/NotificationCard.d.ts +2 -0
- package/dist/exports/OtpInput.d.ts +2 -0
- package/dist/exports/Pagination.d.ts +2 -0
- package/dist/exports/ProfilePictureUpload.d.ts +3 -0
- package/dist/exports/ProgressBar.d.ts +2 -0
- package/dist/exports/PyrionNavigationDrawer.d.ts +2 -0
- package/dist/exports/RadioButton.d.ts +3 -0
- package/dist/exports/RecurrentDatePicker.d.ts +5 -0
- package/dist/exports/RecurrentDatePickerRRule.d.ts +2 -0
- package/dist/exports/Scrollable.d.ts +2 -0
- package/dist/exports/SegmentedButton.d.ts +3 -0
- package/dist/exports/Select.d.ts +5 -0
- package/dist/exports/SelectSearch.d.ts +3 -0
- package/dist/exports/Skeleton.d.ts +3 -0
- package/dist/exports/Spinner.d.ts +3 -0
- package/dist/exports/Steps.d.ts +3 -0
- package/dist/exports/SwipeContainer.d.ts +1 -0
- package/dist/exports/Switch.d.ts +3 -0
- package/dist/exports/TabLinks.d.ts +1 -0
- package/dist/exports/Table.d.ts +1 -0
- package/dist/exports/TextArea.d.ts +1 -0
- package/dist/exports/TicketCard.d.ts +2 -0
- package/dist/exports/Toast.d.ts +3 -0
- package/dist/exports/ToastProvider.d.ts +2 -0
- package/dist/exports/Tooltip.d.ts +2 -0
- package/dist/exports/useDevice.d.ts +1 -0
- package/dist/exports/usePyrionNavigation.d.ts +1 -0
- package/dist/hooks/useClickOutside.d.ts +8 -0
- package/dist/hooks/useDevice.d.ts +1 -0
- package/dist/hooks/useDragScroll.d.ts +29 -0
- package/dist/hooks/useLabelBackground.d.ts +6 -0
- package/dist/iconUtils-D0lVAgGT.js +5 -0
- package/dist/index-BOQuZ0gG.js +34 -0
- package/dist/index.d.ts +104 -0
- package/dist/jsx-runtime-GkKLlHH4.js +263 -0
- package/dist/lib/cn.d.ts +2 -0
- package/dist/lib/utils.d.ts +3 -0
- package/dist/prometeo-design-system.es.js +918 -0
- package/dist/styles.css +1 -0
- package/dist/styles.d.ts +1 -0
- package/dist/useDevice.d.ts +2 -0
- package/dist/useDevice.es.js +13 -0
- package/dist/useDragScroll-CHN9OMwn.js +165 -0
- package/dist/useLabelBackground-BDIHUdND.js +26 -0
- package/dist/usePyrionNavigation.d.ts +4 -0
- package/dist/usePyrionNavigation.es.js +4 -0
- package/dist/utils-X4-h3cum.js +54 -0
- package/dist/vite.svg +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,1061 @@
|
|
|
1
|
+
import { j as s } from "./jsx-runtime-GkKLlHH4.js";
|
|
2
|
+
import { c } from "./cn-B6yFEsav.js";
|
|
3
|
+
import we, { memo as V, useState as Ne, useRef as ae, useMemo as te, useCallback as _, useEffect as pe, useImperativeHandle as Qe } from "react";
|
|
4
|
+
import Xe from "./Spinner.es.js";
|
|
5
|
+
import { createPortal as Ye } from "react-dom";
|
|
6
|
+
import { u as Ze } from "./useDragScroll-CHN9OMwn.js";
|
|
7
|
+
import { u as et } from "./useLabelBackground-BDIHUdND.js";
|
|
8
|
+
import { H as tt } from "./HelperComponent-ljsn0xD6.js";
|
|
9
|
+
import { Close as nt } from "./Icons/Close.es.js";
|
|
10
|
+
import rt from "./CheckBox.es.js";
|
|
11
|
+
import { g as k, h as Fe } from "./utils-X4-h3cum.js";
|
|
12
|
+
import lt from "./Input.es.js";
|
|
13
|
+
import Ue from "./Skeleton.es.js";
|
|
14
|
+
import { Cancel as at } from "./Icons/Cancel.es.js";
|
|
15
|
+
import { ChevronDown as Re } from "./Icons/ChevronDown.es.js";
|
|
16
|
+
import { Search as ot } from "./Icons/Search.es.js";
|
|
17
|
+
const st = {
|
|
18
|
+
default: {
|
|
19
|
+
container: "text-neutral-default-default border-neutral-default-default ",
|
|
20
|
+
icon: ""
|
|
21
|
+
},
|
|
22
|
+
error: {
|
|
23
|
+
container: "",
|
|
24
|
+
icon: ""
|
|
25
|
+
},
|
|
26
|
+
success: {
|
|
27
|
+
container: "",
|
|
28
|
+
icon: ""
|
|
29
|
+
}
|
|
30
|
+
}, qe = {
|
|
31
|
+
icon: " text-neutral-default-disabled",
|
|
32
|
+
container: " border-neutral-strong-default text-neutral-default-disabled"
|
|
33
|
+
}, Ve = ({ id: e, label: n, onRemove: f, className: b, disabled: h, variant: y = "default", tabIndex: p }) => /* @__PURE__ */ s.jsxs(
|
|
34
|
+
"div",
|
|
35
|
+
{
|
|
36
|
+
tabIndex: p,
|
|
37
|
+
className: c(
|
|
38
|
+
"inline-flex max-w-[calc(50%-0.25rem)] items-center gap-1 px-2 py-1 bg-inherit text-xs rounded-lg border h-[30px]",
|
|
39
|
+
st[y].container,
|
|
40
|
+
h && qe.container
|
|
41
|
+
),
|
|
42
|
+
children: [
|
|
43
|
+
/* @__PURE__ */ s.jsx("span", { className: "truncate w-max ", children: n }),
|
|
44
|
+
f && /* @__PURE__ */ s.jsx(
|
|
45
|
+
"button",
|
|
46
|
+
{
|
|
47
|
+
onMouseDown: (H) => {
|
|
48
|
+
h || (H.stopPropagation(), H.preventDefault(), f?.(e));
|
|
49
|
+
},
|
|
50
|
+
className: c(
|
|
51
|
+
"shrink-0 p-0.5 transition-all duration-200 hover:text-neutral-default-hover cursor-pointer z-50 text-neutral-default-default hover:scale-105",
|
|
52
|
+
h && "cursor-default hover:scale-100",
|
|
53
|
+
b
|
|
54
|
+
),
|
|
55
|
+
type: "button",
|
|
56
|
+
tabIndex: p,
|
|
57
|
+
children: /* @__PURE__ */ s.jsx(nt, { size: 18, className: c(h && qe.icon) })
|
|
58
|
+
}
|
|
59
|
+
)
|
|
60
|
+
]
|
|
61
|
+
}
|
|
62
|
+
);
|
|
63
|
+
Ve.displayName = "Chip";
|
|
64
|
+
const it = V(Ve), ut = (e) => {
|
|
65
|
+
const n = [], f = (b) => {
|
|
66
|
+
b.forEach((h) => {
|
|
67
|
+
const y = h, p = typeof y == "object" ? y?.options : [];
|
|
68
|
+
Array.isArray(p) && p.length > 0 ? f(p) : n.push(h);
|
|
69
|
+
});
|
|
70
|
+
};
|
|
71
|
+
return f(e), n;
|
|
72
|
+
}, _e = {
|
|
73
|
+
default: {
|
|
74
|
+
container: "",
|
|
75
|
+
input: c(
|
|
76
|
+
"border-neutral-default-default text-neutral-default-default",
|
|
77
|
+
"focus:ring-primary-default-default focus:ring-[1px] focus:border-primary-default-default ",
|
|
78
|
+
"hover:border-primary-default-default"
|
|
79
|
+
),
|
|
80
|
+
label: c(
|
|
81
|
+
"text-neutral-medium-default",
|
|
82
|
+
"peer-focus:text-primary-default-default"
|
|
83
|
+
),
|
|
84
|
+
icon: c(
|
|
85
|
+
"text-neutral-medium-default",
|
|
86
|
+
"peer-focus:text-primary-default-default"
|
|
87
|
+
)
|
|
88
|
+
},
|
|
89
|
+
error: {
|
|
90
|
+
container: "",
|
|
91
|
+
input: c(
|
|
92
|
+
"border-error-default-default text-neutral-default-default hover:border-error-default-hover",
|
|
93
|
+
"focus:border-error-default focus:border-2",
|
|
94
|
+
"focus:ring-0 focus:ring-error-default/20"
|
|
95
|
+
),
|
|
96
|
+
label: c("text-error-light", "peer-focus:text-error-light"),
|
|
97
|
+
icon: c("text-error-medium-default", "peer-focus:text-error-light")
|
|
98
|
+
},
|
|
99
|
+
success: {
|
|
100
|
+
container: "",
|
|
101
|
+
input: c(
|
|
102
|
+
"border-success-default-default text-neutral-default-default",
|
|
103
|
+
"focus:border-success-default focus:border-2",
|
|
104
|
+
"focus:ring-0 focus:ring-success-default/20"
|
|
105
|
+
),
|
|
106
|
+
label: c("text-success", "peer-focus:text-success-light"),
|
|
107
|
+
icon: c("text-success-medium-default", "peer-focus:text-success-light")
|
|
108
|
+
}
|
|
109
|
+
}, We = {
|
|
110
|
+
input: c(
|
|
111
|
+
"border-neutral-strong-default text-neutral-default-default pointer-events-none",
|
|
112
|
+
"focus:ring-0 focus:border-primary-default-disabled ",
|
|
113
|
+
"hover:border-neutral-default-disabled"
|
|
114
|
+
),
|
|
115
|
+
label: c(
|
|
116
|
+
"text-neutral-medium-disabled",
|
|
117
|
+
"peer-focus:text-primary-default-default"
|
|
118
|
+
),
|
|
119
|
+
icon: c(
|
|
120
|
+
"text-neutral-medium-disabled",
|
|
121
|
+
"peer-focus:text-primary-default-default"
|
|
122
|
+
)
|
|
123
|
+
};
|
|
124
|
+
function ct(e) {
|
|
125
|
+
const [n, f] = Ne(!1), [b, h] = Ne([]), [y, p] = Ne(""), H = ae(null), m = ae(null), T = ae(null), W = ae(null), B = ae(
|
|
126
|
+
() => {
|
|
127
|
+
}
|
|
128
|
+
), je = ae(null), ge = ae(/* @__PURE__ */ new Set()), {
|
|
129
|
+
id: z,
|
|
130
|
+
name: w,
|
|
131
|
+
label: be,
|
|
132
|
+
height: xe,
|
|
133
|
+
options: J,
|
|
134
|
+
controls: ye,
|
|
135
|
+
className: K,
|
|
136
|
+
placeholder: E,
|
|
137
|
+
optionValue: N,
|
|
138
|
+
optionLabel: oe,
|
|
139
|
+
renderOption: F,
|
|
140
|
+
renderOptionGroupHeader: se,
|
|
141
|
+
renderSelection: De,
|
|
142
|
+
renderOptionContext: Ie,
|
|
143
|
+
buttonClassName: He,
|
|
144
|
+
dropdownClassName: ne,
|
|
145
|
+
containerClassName: U,
|
|
146
|
+
dropdownOptions: j,
|
|
147
|
+
helperComponent: Q,
|
|
148
|
+
errorComponent: ve,
|
|
149
|
+
onRemoveOption: ke,
|
|
150
|
+
onOptionClick: q,
|
|
151
|
+
onClose: Ce,
|
|
152
|
+
onClear: ie,
|
|
153
|
+
disabled: X = !1,
|
|
154
|
+
overflow: Ke = "wrap",
|
|
155
|
+
variant: P = "default",
|
|
156
|
+
isLoading: ue = !1,
|
|
157
|
+
attachToParent: ze = !1,
|
|
158
|
+
displayMode: Se = "compact",
|
|
159
|
+
labelVariant: re = "default",
|
|
160
|
+
disableOpenOnFocus: Ae = !1,
|
|
161
|
+
emptyMessage: Ee = "No hay opciones disponibles"
|
|
162
|
+
} = e, { ref: Oe } = et(), { bind: Y, ref: Me } = Ze({
|
|
163
|
+
axis: "x",
|
|
164
|
+
cursor: { idle: "default", dragging: "grabbing" }
|
|
165
|
+
}), ce = e.multiple ? Array.isArray(e.value) && e.value.length > 0 && e.value.every((t) => t != null && t !== "") : e.value !== void 0 && e.value !== null && e.value !== "", Le = {}, Te = te(() => re === "static" && E ? E : "", [re, E]), Ge = te(
|
|
166
|
+
() => j?.controledSearchValue || y,
|
|
167
|
+
[j?.controledSearchValue, y]
|
|
168
|
+
), Pe = () => {
|
|
169
|
+
const t = {
|
|
170
|
+
static: {
|
|
171
|
+
active: "relative prometeo-fonts-label-large",
|
|
172
|
+
default: "relative prometeo-fonts-label-large"
|
|
173
|
+
},
|
|
174
|
+
default: {
|
|
175
|
+
active: "absolute top-0 -translate-y-1/2 left-3 px-1 prometeo-fonts-body-small",
|
|
176
|
+
default: "absolute top-1/2 -translate-y-1/2 "
|
|
177
|
+
}
|
|
178
|
+
}, o = n || ce ? "active" : "default";
|
|
179
|
+
return t[re][o];
|
|
180
|
+
}, O = _(
|
|
181
|
+
(t) => ({
|
|
182
|
+
id: k(t, N),
|
|
183
|
+
value: k(t, N),
|
|
184
|
+
label: k(t, oe)
|
|
185
|
+
}),
|
|
186
|
+
[N, oe]
|
|
187
|
+
), R = te(() => ut(J), [J]), de = te(
|
|
188
|
+
() => R.map(O),
|
|
189
|
+
[R, O]
|
|
190
|
+
), r = te(() => {
|
|
191
|
+
const t = [];
|
|
192
|
+
if (e.multiple)
|
|
193
|
+
e.value?.forEach((o) => {
|
|
194
|
+
const l = R?.find(
|
|
195
|
+
(d) => k(d, N) === o
|
|
196
|
+
);
|
|
197
|
+
l && t.push(l);
|
|
198
|
+
});
|
|
199
|
+
else {
|
|
200
|
+
const o = R?.find(
|
|
201
|
+
(l) => k(l, N) === e.value
|
|
202
|
+
);
|
|
203
|
+
o && t.push(o);
|
|
204
|
+
}
|
|
205
|
+
return t;
|
|
206
|
+
}, [e.value, N, R, e.multiple]), a = te(
|
|
207
|
+
() => r.map(O),
|
|
208
|
+
[r, O]
|
|
209
|
+
), i = te(
|
|
210
|
+
() => new Set(a.map((t) => t.id)),
|
|
211
|
+
[a]
|
|
212
|
+
), u = te(() => {
|
|
213
|
+
const t = [];
|
|
214
|
+
return J.forEach((o, l) => {
|
|
215
|
+
const d = o, S = typeof d == "object" ? d?.options : [];
|
|
216
|
+
if (Array.isArray(S) && S.length > 0) {
|
|
217
|
+
const L = d.label, G = k(o, N), ee = `__group-${String(G ?? l)}`, me = {
|
|
218
|
+
id: ee,
|
|
219
|
+
value: ee,
|
|
220
|
+
label: typeof L == "string" ? L : String(G ?? `Grupo ${l + 1}`),
|
|
221
|
+
isGroupHeader: !0,
|
|
222
|
+
groupLabelNode: L,
|
|
223
|
+
originalOption: o,
|
|
224
|
+
groupData: {
|
|
225
|
+
groupOptions: S
|
|
226
|
+
}
|
|
227
|
+
};
|
|
228
|
+
t.push(me), S.forEach((he) => {
|
|
229
|
+
F ? t.push(he) : t.push(O(he));
|
|
230
|
+
});
|
|
231
|
+
} else
|
|
232
|
+
F ? t.push(o) : t.push(O(o));
|
|
233
|
+
}), t;
|
|
234
|
+
}, [J, N, F, O]), v = _(
|
|
235
|
+
(t, o) => {
|
|
236
|
+
if (!t || t.length === 0) return;
|
|
237
|
+
const l = t.map(
|
|
238
|
+
(x) => O(x)
|
|
239
|
+
);
|
|
240
|
+
if (!e.multiple) {
|
|
241
|
+
const x = l[0];
|
|
242
|
+
if (!x) return;
|
|
243
|
+
const C = i.has(x.id), M = o ?? "toggle";
|
|
244
|
+
let $e;
|
|
245
|
+
M === "select" || M === "toggle" && !C ? $e = x : $e = void 0, e.onChange?.($e, w);
|
|
246
|
+
return;
|
|
247
|
+
}
|
|
248
|
+
const d = e.value || [], S = [];
|
|
249
|
+
d.forEach((x) => {
|
|
250
|
+
const C = de.find((M) => M.value === x);
|
|
251
|
+
C && S.push(C);
|
|
252
|
+
});
|
|
253
|
+
const L = new Set(S.map((x) => x.id)), G = new Set(l.map((x) => x.id)), ee = l.every(
|
|
254
|
+
(x) => L.has(x.id)
|
|
255
|
+
), me = o ?? "toggle", he = me === "select" || me === "toggle" && !ee;
|
|
256
|
+
let I;
|
|
257
|
+
if (!he)
|
|
258
|
+
I = S.filter((x) => !G.has(x.id));
|
|
259
|
+
else {
|
|
260
|
+
const x = new Map(
|
|
261
|
+
S.map((C) => [C.id, C])
|
|
262
|
+
);
|
|
263
|
+
l.forEach((C) => {
|
|
264
|
+
x.set(C.id, C);
|
|
265
|
+
}), I = Array.from(x.values());
|
|
266
|
+
}
|
|
267
|
+
e.onChange?.(I, w);
|
|
268
|
+
},
|
|
269
|
+
[
|
|
270
|
+
e.multiple,
|
|
271
|
+
e.value,
|
|
272
|
+
e.onChange,
|
|
273
|
+
de,
|
|
274
|
+
i,
|
|
275
|
+
O,
|
|
276
|
+
w
|
|
277
|
+
]
|
|
278
|
+
), D = _(() => {
|
|
279
|
+
f((t) => !t);
|
|
280
|
+
}, []);
|
|
281
|
+
B.current = (t) => {
|
|
282
|
+
if (!e.multiple)
|
|
283
|
+
e.onChange?.(t, w);
|
|
284
|
+
else {
|
|
285
|
+
const o = e.value || [], l = [], d = o.includes(t.value);
|
|
286
|
+
o.forEach((L) => {
|
|
287
|
+
const G = de.find(
|
|
288
|
+
(ee) => ee.value === L
|
|
289
|
+
);
|
|
290
|
+
G && l.push(G);
|
|
291
|
+
});
|
|
292
|
+
const S = d ? l.filter((L) => L.value !== t.value) : [...l, t];
|
|
293
|
+
e.onChange?.(S, w);
|
|
294
|
+
}
|
|
295
|
+
};
|
|
296
|
+
const g = _(
|
|
297
|
+
(t, o = !1) => {
|
|
298
|
+
q?.(t, w), B.current?.(t), o && (f(!1), Ce?.());
|
|
299
|
+
},
|
|
300
|
+
[q, Ce, w]
|
|
301
|
+
), A = (t) => {
|
|
302
|
+
if (t.preventDefault(), t.stopPropagation(), t.target.blur(), ie?.(), e.multiple) {
|
|
303
|
+
const o = e.onChange;
|
|
304
|
+
o?.([], w);
|
|
305
|
+
} else {
|
|
306
|
+
const o = e.onChange;
|
|
307
|
+
o?.(void 0, w);
|
|
308
|
+
}
|
|
309
|
+
}, $ = _(
|
|
310
|
+
(t) => {
|
|
311
|
+
e.multiple || e.onChange?.(void 0, w);
|
|
312
|
+
const o = R.find(
|
|
313
|
+
(d) => k(d, N) === t
|
|
314
|
+
);
|
|
315
|
+
if (!o) return;
|
|
316
|
+
const l = O(o);
|
|
317
|
+
q?.(l, w), B.current?.(l), ke?.(o);
|
|
318
|
+
},
|
|
319
|
+
[
|
|
320
|
+
q,
|
|
321
|
+
ke,
|
|
322
|
+
R,
|
|
323
|
+
w,
|
|
324
|
+
e.multiple,
|
|
325
|
+
e.onChange,
|
|
326
|
+
O,
|
|
327
|
+
N
|
|
328
|
+
]
|
|
329
|
+
), Z = _(
|
|
330
|
+
(t) => {
|
|
331
|
+
$(t);
|
|
332
|
+
},
|
|
333
|
+
[$]
|
|
334
|
+
);
|
|
335
|
+
pe(() => {
|
|
336
|
+
if (!n) return;
|
|
337
|
+
const t = (o) => {
|
|
338
|
+
const l = o.target;
|
|
339
|
+
if (o.type === "mousedown") {
|
|
340
|
+
if (H.current?.contains(l) || m.current?.contains(l)) return;
|
|
341
|
+
f(!1);
|
|
342
|
+
}
|
|
343
|
+
if (o.type === "scroll") {
|
|
344
|
+
if (m.current?.contains(l)) return;
|
|
345
|
+
f(!1);
|
|
346
|
+
}
|
|
347
|
+
o.type === "resize" && f(!1);
|
|
348
|
+
};
|
|
349
|
+
return document.addEventListener("mousedown", t), window.addEventListener("scroll", t, !0), window.addEventListener("resize", t, !0), () => {
|
|
350
|
+
document.removeEventListener("mousedown", t), window.removeEventListener("scroll", t, !0), window.removeEventListener("resize", t, !0);
|
|
351
|
+
};
|
|
352
|
+
}, [n]), pe(() => {
|
|
353
|
+
ge.current.forEach((t) => {
|
|
354
|
+
try {
|
|
355
|
+
t(n);
|
|
356
|
+
} catch {
|
|
357
|
+
}
|
|
358
|
+
});
|
|
359
|
+
}, [n]), Qe(
|
|
360
|
+
ye,
|
|
361
|
+
() => ({
|
|
362
|
+
open: () => {
|
|
363
|
+
f(!0);
|
|
364
|
+
},
|
|
365
|
+
close: () => {
|
|
366
|
+
f(!1);
|
|
367
|
+
},
|
|
368
|
+
toggle: () => f((t) => !t),
|
|
369
|
+
handleOptionSelect: g,
|
|
370
|
+
subscribeOpenChange: (t) => (ge.current.add(t), () => {
|
|
371
|
+
ge.current.delete(t);
|
|
372
|
+
}),
|
|
373
|
+
searchInputRef: T
|
|
374
|
+
}),
|
|
375
|
+
[n, g]
|
|
376
|
+
);
|
|
377
|
+
const fe = (t) => {
|
|
378
|
+
t.preventDefault(), t.stopPropagation(), t.target.matches(":focus-visible") && !Ae && !n && (f(!0), setTimeout(() => {
|
|
379
|
+
T.current?.focus();
|
|
380
|
+
}, 10));
|
|
381
|
+
}, le = (t) => {
|
|
382
|
+
t.key === "Tab" && n && f(!1), (t.keyCode === 32 || t.key === "ArrowDown") && (f(!0), setTimeout(() => {
|
|
383
|
+
T.current?.focus();
|
|
384
|
+
}, 10));
|
|
385
|
+
};
|
|
386
|
+
return /* @__PURE__ */ s.jsxs(
|
|
387
|
+
"div",
|
|
388
|
+
{
|
|
389
|
+
className: c("relative bg-inherit select-none w-full", K),
|
|
390
|
+
ref: H,
|
|
391
|
+
draggable: !1,
|
|
392
|
+
style: Le,
|
|
393
|
+
children: [
|
|
394
|
+
/* @__PURE__ */ s.jsxs("div", { className: c("relative bg-inherit ", U), children: [
|
|
395
|
+
/* @__PURE__ */ s.jsx(
|
|
396
|
+
"label",
|
|
397
|
+
{
|
|
398
|
+
htmlFor: z,
|
|
399
|
+
ref: Oe,
|
|
400
|
+
className: c(
|
|
401
|
+
"left-3 pointer-events-none bg-inherit z-10",
|
|
402
|
+
re === "default" && "transition-all duration-200 ease-in-out",
|
|
403
|
+
Pe(),
|
|
404
|
+
ce || n ? _e[P].label : "text-neutral-medium-default",
|
|
405
|
+
X && We.label
|
|
406
|
+
),
|
|
407
|
+
children: be
|
|
408
|
+
}
|
|
409
|
+
),
|
|
410
|
+
/* @__PURE__ */ s.jsxs(
|
|
411
|
+
"div",
|
|
412
|
+
{
|
|
413
|
+
id: z,
|
|
414
|
+
tabIndex: 0,
|
|
415
|
+
role: "button",
|
|
416
|
+
ref: W,
|
|
417
|
+
onFocus: fe,
|
|
418
|
+
onKeyDown: le,
|
|
419
|
+
onClick: (t) => {
|
|
420
|
+
t.preventDefault(), t.stopPropagation(), D();
|
|
421
|
+
},
|
|
422
|
+
className: c(
|
|
423
|
+
"w-full px-2 text-left border rounded-lg transition-all duration-200 ease-in-out",
|
|
424
|
+
"flex items-center justify-start bg-inherit ",
|
|
425
|
+
"focus:outline-none",
|
|
426
|
+
Se === "chips" && e.multiple && ce ? "min-h-12 py-2 " : !xe && "h-12 min-h-12",
|
|
427
|
+
_e[P].input,
|
|
428
|
+
X && We.input,
|
|
429
|
+
He
|
|
430
|
+
),
|
|
431
|
+
children: [
|
|
432
|
+
/* @__PURE__ */ s.jsx(
|
|
433
|
+
"div",
|
|
434
|
+
{
|
|
435
|
+
className: c(
|
|
436
|
+
"flex-1 overflow-x-auto overflow-y-hidden px-1 prometeo-scrollbar-none "
|
|
437
|
+
),
|
|
438
|
+
ref: Me,
|
|
439
|
+
onPointerUp: Y.onPointerUp,
|
|
440
|
+
onPointerDown: Y.onPointerDown,
|
|
441
|
+
onPointerMove: Y.onPointerMove,
|
|
442
|
+
onPointerLeave: Y.onPointerLeave,
|
|
443
|
+
onPointerCancel: Y.onPointerCancel,
|
|
444
|
+
onClickCapture: Y.onClickCapture,
|
|
445
|
+
children: De ? we.createElement(
|
|
446
|
+
V(
|
|
447
|
+
De,
|
|
448
|
+
(t, o) => t.disabled === o.disabled && t.multiple === o.multiple
|
|
449
|
+
),
|
|
450
|
+
{
|
|
451
|
+
disabled: X,
|
|
452
|
+
multiple: e.multiple || !1,
|
|
453
|
+
placeholder: E,
|
|
454
|
+
selectedOptions: r,
|
|
455
|
+
onRemoveOption: Z
|
|
456
|
+
}
|
|
457
|
+
) : /* @__PURE__ */ s.jsx(
|
|
458
|
+
Je,
|
|
459
|
+
{
|
|
460
|
+
displayMode: Se,
|
|
461
|
+
selectedOptions: a,
|
|
462
|
+
placeholder: Te,
|
|
463
|
+
onRemoveOption: $,
|
|
464
|
+
multiple: e.multiple || !1,
|
|
465
|
+
className: c(
|
|
466
|
+
Ke === "scroll" ? "flex-nowrap" : "flex-wrap"
|
|
467
|
+
),
|
|
468
|
+
disabled: X
|
|
469
|
+
}
|
|
470
|
+
)
|
|
471
|
+
}
|
|
472
|
+
),
|
|
473
|
+
/* @__PURE__ */ s.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
474
|
+
ue && /* @__PURE__ */ s.jsx(
|
|
475
|
+
Xe,
|
|
476
|
+
{
|
|
477
|
+
size: "small",
|
|
478
|
+
variant: "sync",
|
|
479
|
+
className: " opacity-90"
|
|
480
|
+
}
|
|
481
|
+
),
|
|
482
|
+
ce && ie && /* @__PURE__ */ s.jsx(
|
|
483
|
+
"button",
|
|
484
|
+
{
|
|
485
|
+
className: "z-100",
|
|
486
|
+
onClick: (t) => {
|
|
487
|
+
t.preventDefault(), t.stopPropagation(), A(t);
|
|
488
|
+
},
|
|
489
|
+
type: "button",
|
|
490
|
+
tabIndex: -1,
|
|
491
|
+
children: /* @__PURE__ */ s.jsx(
|
|
492
|
+
at,
|
|
493
|
+
{
|
|
494
|
+
size: 20,
|
|
495
|
+
className: c(
|
|
496
|
+
" cursor-pointer transition-all",
|
|
497
|
+
_e[P].icon
|
|
498
|
+
)
|
|
499
|
+
}
|
|
500
|
+
)
|
|
501
|
+
}
|
|
502
|
+
),
|
|
503
|
+
/* @__PURE__ */ s.jsx(
|
|
504
|
+
Re,
|
|
505
|
+
{
|
|
506
|
+
size: 20,
|
|
507
|
+
className: c(
|
|
508
|
+
"transition-transform text-neutral-default-default",
|
|
509
|
+
n ? "rotate-180" : "",
|
|
510
|
+
X && We.icon
|
|
511
|
+
)
|
|
512
|
+
}
|
|
513
|
+
)
|
|
514
|
+
] })
|
|
515
|
+
]
|
|
516
|
+
}
|
|
517
|
+
)
|
|
518
|
+
] }),
|
|
519
|
+
n && /* @__PURE__ */ s.jsx(
|
|
520
|
+
mt,
|
|
521
|
+
{
|
|
522
|
+
label: be,
|
|
523
|
+
isOpen: n,
|
|
524
|
+
disabled: X,
|
|
525
|
+
optionValue: N,
|
|
526
|
+
optionLabel: oe,
|
|
527
|
+
emptyMessage: Ee,
|
|
528
|
+
labelVariant: re,
|
|
529
|
+
renderOption: F,
|
|
530
|
+
renderOptionGroupHeader: se,
|
|
531
|
+
attachToParent: ze,
|
|
532
|
+
filteredOptions: b,
|
|
533
|
+
multiple: e.multiple || !1,
|
|
534
|
+
dropdownClassName: ne,
|
|
535
|
+
selectedOptionsIds: i,
|
|
536
|
+
setFilteredOptions: h,
|
|
537
|
+
renderOptionContext: Ie,
|
|
538
|
+
options: u,
|
|
539
|
+
selectRef: H,
|
|
540
|
+
dropdownRef: m,
|
|
541
|
+
selectButtonRef: W,
|
|
542
|
+
helperComponentRef: je,
|
|
543
|
+
onOptionClick: g,
|
|
544
|
+
onCloseDropdown: () => f(!1),
|
|
545
|
+
searchValue: Ge,
|
|
546
|
+
setSearchValue: p,
|
|
547
|
+
searchInputRef: T,
|
|
548
|
+
isLoading: j?.isLoading,
|
|
549
|
+
onSearchClear: j?.onSearchClear,
|
|
550
|
+
hideSearchBar: j?.hideSearchBar,
|
|
551
|
+
dropdownHeight: j?.dropdownHeight,
|
|
552
|
+
onSearchValueChange: j?.onSearchValueChange,
|
|
553
|
+
inputSearchPlaceholder: j?.inputSearchPlaceholder,
|
|
554
|
+
footer: j?.footer,
|
|
555
|
+
loadingComponent: j?.loadingComponent,
|
|
556
|
+
inputProps: j?.inputProps,
|
|
557
|
+
enableGroupToggle: j?.enableGroupToggle,
|
|
558
|
+
onGroupSelectChange: v
|
|
559
|
+
}
|
|
560
|
+
),
|
|
561
|
+
(ve || Q) && /* @__PURE__ */ s.jsx("div", { className: "min-h-6", children: /* @__PURE__ */ s.jsx(
|
|
562
|
+
tt,
|
|
563
|
+
{
|
|
564
|
+
ref: je,
|
|
565
|
+
variant: P,
|
|
566
|
+
className: "absolute bottom-0 h-5 overflow-visible ",
|
|
567
|
+
children: ve || Q
|
|
568
|
+
}
|
|
569
|
+
) })
|
|
570
|
+
]
|
|
571
|
+
}
|
|
572
|
+
);
|
|
573
|
+
}
|
|
574
|
+
const dt = V(ct, (e, n) => e.value === n.value && e.options === n.options && e.isLoading === n.isLoading && e.disabled === n.disabled && e.errorComponent === n.errorComponent && e.helperComponent === n.helperComponent && e.variant === n.variant && e.label === n.label && e.id === n.id && e.name === n.name && e.placeholder === n.placeholder && e.renderOptionContext === n.renderOptionContext && e.dropdownOptions?.controledSearchValue === n.dropdownOptions?.controledSearchValue && e.dropdownOptions?.isLoading === n.dropdownOptions?.isLoading), Ot = dt;
|
|
575
|
+
function ft({
|
|
576
|
+
footer: e,
|
|
577
|
+
isOpen: n,
|
|
578
|
+
label: f,
|
|
579
|
+
options: b,
|
|
580
|
+
multiple: h,
|
|
581
|
+
disabled: y,
|
|
582
|
+
selectRef: p,
|
|
583
|
+
inputProps: H,
|
|
584
|
+
dropdownRef: m,
|
|
585
|
+
optionLabel: T,
|
|
586
|
+
optionValue: W,
|
|
587
|
+
searchValue: B,
|
|
588
|
+
labelVariant: je,
|
|
589
|
+
emptyMessage: ge,
|
|
590
|
+
renderOption: z,
|
|
591
|
+
renderOptionContext: w,
|
|
592
|
+
renderOptionGroupHeader: be,
|
|
593
|
+
onOptionClick: xe,
|
|
594
|
+
onSearchClear: J,
|
|
595
|
+
searchInputRef: ye,
|
|
596
|
+
setSearchValue: K,
|
|
597
|
+
dropdownHeight: E,
|
|
598
|
+
attachToParent: N,
|
|
599
|
+
filteredOptions: oe,
|
|
600
|
+
selectButtonRef: F,
|
|
601
|
+
onCloseDropdown: se,
|
|
602
|
+
loadingComponent: De,
|
|
603
|
+
dropdownClassName: Ie,
|
|
604
|
+
helperComponentRef: He,
|
|
605
|
+
selectedOptionsIds: ne,
|
|
606
|
+
setFilteredOptions: U,
|
|
607
|
+
onSearchValueChange: j,
|
|
608
|
+
isLoading: Q = !1,
|
|
609
|
+
hideSearchBar: ve = !1,
|
|
610
|
+
inputSearchPlaceholder: ke = "Buscar opciones",
|
|
611
|
+
enableGroupToggle: q = !0,
|
|
612
|
+
onGroupSelectChange: Ce
|
|
613
|
+
}) {
|
|
614
|
+
const ie = e ? 380 : 320, X = je === "static" ? f !== "" ? -20 : 4 : 7, P = _(() => E ? E.endsWith("px") ? Number(E.replace("px", "")) : E.endsWith("vh") ? window.innerHeight * Number(E.replace("vh", "")) / 100 : E.endsWith("%") ? window.innerHeight * Number(E.replace("%", "")) / 100 : ie : ie, [E, ie])(), [ue, ze] = Ne({
|
|
615
|
+
direction: "down",
|
|
616
|
+
height: P
|
|
617
|
+
}), [Se, re] = Ne(
|
|
618
|
+
() => /* @__PURE__ */ new Set()
|
|
619
|
+
), Ae = _(
|
|
620
|
+
(r) => !Se.has(r),
|
|
621
|
+
[Se]
|
|
622
|
+
), Ee = _(
|
|
623
|
+
(r, a) => {
|
|
624
|
+
re((i) => {
|
|
625
|
+
const u = new Set(i), v = u.has(r);
|
|
626
|
+
return (a === void 0 ? !v : !a) ? u.add(r) : u.delete(r), u;
|
|
627
|
+
});
|
|
628
|
+
},
|
|
629
|
+
[]
|
|
630
|
+
), Oe = (r) => {
|
|
631
|
+
if (!m.current || !p.current) return;
|
|
632
|
+
const a = p.current.getBoundingClientRect();
|
|
633
|
+
switch (r || ue.direction) {
|
|
634
|
+
case "down":
|
|
635
|
+
m.current.style.top = `${a.top + a.height - (He?.current?.offsetHeight ? He?.current?.offsetHeight + 4 : 0)}px`;
|
|
636
|
+
break;
|
|
637
|
+
case "up":
|
|
638
|
+
m.current.style.top = "auto", m.current.style.bottom = `${window.innerHeight - a.top + X}px`;
|
|
639
|
+
break;
|
|
640
|
+
}
|
|
641
|
+
m.current.style.left = `${a.left}px`, m.current.style.width = `${a.width}px`;
|
|
642
|
+
}, Y = (r) => {
|
|
643
|
+
m.current && (m.current.style.maxHeight = `${r}px`);
|
|
644
|
+
}, Me = () => {
|
|
645
|
+
if (!m.current || !p.current) return ue;
|
|
646
|
+
const r = p.current.getBoundingClientRect(), a = window.innerHeight - (window.innerHeight - r.top), i = window.innerHeight - r.bottom, u = i >= P, v = a >= P;
|
|
647
|
+
let D = "down", g;
|
|
648
|
+
return u ? (D = "down", g = P) : v ? (D = "up", g = P) : i > a ? (D = "down", g = i - 16) : (D = "up", g = a - 16), { direction: D, height: g };
|
|
649
|
+
}, ce = (r) => {
|
|
650
|
+
if (!(!m.current || !p.current)) {
|
|
651
|
+
if (m.current.style.transition = "max-height 0.2s ease,opacity 0.2s ease", !r) {
|
|
652
|
+
m.current.style.maxHeight = "0", m.current.style.opacity = "0", m.current.style.pointerEvents = "none";
|
|
653
|
+
return;
|
|
654
|
+
}
|
|
655
|
+
if (!N) {
|
|
656
|
+
const a = Me();
|
|
657
|
+
ze(a), Oe(a.direction), Y(a.height);
|
|
658
|
+
}
|
|
659
|
+
m.current.style.opacity = "1", m.current.style.pointerEvents = "auto";
|
|
660
|
+
}
|
|
661
|
+
};
|
|
662
|
+
pe(() => {
|
|
663
|
+
N || !p.current || !n || Oe();
|
|
664
|
+
}, [ne]), pe(() => {
|
|
665
|
+
ce(n);
|
|
666
|
+
}, [n]), pe(() => {
|
|
667
|
+
b && U(b);
|
|
668
|
+
}, [b]), pe(() => {
|
|
669
|
+
if (Q || !B) return;
|
|
670
|
+
const r = Le(b, B);
|
|
671
|
+
U(r);
|
|
672
|
+
}, [b]);
|
|
673
|
+
const Le = (r, a) => {
|
|
674
|
+
if (!a) return r;
|
|
675
|
+
if (z) {
|
|
676
|
+
const g = [];
|
|
677
|
+
let A = null, $ = [];
|
|
678
|
+
const Z = () => {
|
|
679
|
+
A && $.length > 0 && g.push(A, ...$), A = null, $ = [];
|
|
680
|
+
};
|
|
681
|
+
return r.forEach((fe) => {
|
|
682
|
+
const le = fe;
|
|
683
|
+
if (!!(le || {})?.isGroupHeader) {
|
|
684
|
+
Z(), A = le;
|
|
685
|
+
return;
|
|
686
|
+
}
|
|
687
|
+
const o = fe, l = k(
|
|
688
|
+
o,
|
|
689
|
+
T
|
|
690
|
+
), d = Fe(String(l ?? ""), a);
|
|
691
|
+
A ? d && $.push(o) : d && g.push(o);
|
|
692
|
+
}), Z(), g;
|
|
693
|
+
}
|
|
694
|
+
const i = [];
|
|
695
|
+
let u = null, v = [];
|
|
696
|
+
const D = () => {
|
|
697
|
+
u && v.length > 0 && i.push(u, ...v), u = null, v = [];
|
|
698
|
+
};
|
|
699
|
+
return r.forEach((g) => {
|
|
700
|
+
if (typeof g != "object" || g === null) return;
|
|
701
|
+
if ((g || {})?.isGroupHeader) {
|
|
702
|
+
D(), u = g;
|
|
703
|
+
return;
|
|
704
|
+
}
|
|
705
|
+
const A = Fe(g.label, a);
|
|
706
|
+
u ? A && v.push(g) : A && i.push(g);
|
|
707
|
+
}), D(), i;
|
|
708
|
+
}, Te = (r) => {
|
|
709
|
+
const a = Le(b, r);
|
|
710
|
+
if (U(a), j) {
|
|
711
|
+
if (r === "") {
|
|
712
|
+
Ge();
|
|
713
|
+
return;
|
|
714
|
+
}
|
|
715
|
+
j(r);
|
|
716
|
+
return;
|
|
717
|
+
}
|
|
718
|
+
K && b && K(r);
|
|
719
|
+
}, Ge = _(() => {
|
|
720
|
+
if (J) {
|
|
721
|
+
J(), U(
|
|
722
|
+
b.filter((r) => {
|
|
723
|
+
const a = z ? k(r, W) : r.id;
|
|
724
|
+
return ne.has(a);
|
|
725
|
+
})
|
|
726
|
+
);
|
|
727
|
+
return;
|
|
728
|
+
}
|
|
729
|
+
K && (K(""), U(b));
|
|
730
|
+
}, [
|
|
731
|
+
b,
|
|
732
|
+
ne,
|
|
733
|
+
W,
|
|
734
|
+
J,
|
|
735
|
+
U,
|
|
736
|
+
K,
|
|
737
|
+
z
|
|
738
|
+
]), Pe = (r) => {
|
|
739
|
+
r.key === "ArrowDown" ? (r.preventDefault(), m.current?.querySelector(
|
|
740
|
+
"[role=listitem]"
|
|
741
|
+
)?.focus()) : (r.key === "Tab" || r.key === "Escape") && setTimeout(() => {
|
|
742
|
+
F.current?.focus(), se();
|
|
743
|
+
}, 10);
|
|
744
|
+
}, O = (r, a) => {
|
|
745
|
+
const i = Array.from(
|
|
746
|
+
m.current?.querySelectorAll("[role=listitem]") || []
|
|
747
|
+
), u = i.indexOf(r.currentTarget);
|
|
748
|
+
if (r.key === "ArrowDown") {
|
|
749
|
+
r.preventDefault();
|
|
750
|
+
const v = u < i.length - 1 ? u + 1 : u;
|
|
751
|
+
i[v]?.focus();
|
|
752
|
+
} else if (r.key === "ArrowUp")
|
|
753
|
+
if (r.preventDefault(), u === 0)
|
|
754
|
+
ye && ye.current?.focus();
|
|
755
|
+
else {
|
|
756
|
+
const v = u - 1;
|
|
757
|
+
i[v]?.focus();
|
|
758
|
+
}
|
|
759
|
+
else if (r.key === "Enter" || r.key === " ") {
|
|
760
|
+
if (r.preventDefault(), (a || {})?.isGroupHeader || y) return;
|
|
761
|
+
xe(a, !h), h || setTimeout(() => {
|
|
762
|
+
F.current?.focus(), se();
|
|
763
|
+
}, 10);
|
|
764
|
+
} else r.key === "Escape" ? (r.preventDefault(), setTimeout(() => {
|
|
765
|
+
F.current?.focus(), se();
|
|
766
|
+
}, 10)) : r.key === "Tab" && setTimeout(() => {
|
|
767
|
+
F.current?.focus(), se();
|
|
768
|
+
}, 10);
|
|
769
|
+
}, R = Array.from({ length: 5 }).map(
|
|
770
|
+
(r, a) => z ? we.createElement(
|
|
771
|
+
V(z, (i, u) => i.isSelected === u.isSelected && i.option === u.option && i.disabled === u.disabled && i.multiple === u.multiple && i.renderContext === u.renderContext),
|
|
772
|
+
{
|
|
773
|
+
key: `skeleton-option-${a}`,
|
|
774
|
+
option: { id: a, label: "", value: "" },
|
|
775
|
+
isSelected: !1,
|
|
776
|
+
multiple: !1,
|
|
777
|
+
onSelect: () => {
|
|
778
|
+
},
|
|
779
|
+
disabled: !1,
|
|
780
|
+
isLoading: !0,
|
|
781
|
+
renderContext: w
|
|
782
|
+
}
|
|
783
|
+
) : /* @__PURE__ */ s.jsx(
|
|
784
|
+
Be,
|
|
785
|
+
{
|
|
786
|
+
multiple: !1,
|
|
787
|
+
isLoading: !0,
|
|
788
|
+
onSelect: () => {
|
|
789
|
+
},
|
|
790
|
+
isSelected: !1,
|
|
791
|
+
option: { id: a, label: "", value: "" }
|
|
792
|
+
},
|
|
793
|
+
`skeleton-option-${// biome-ignore lint/suspicious/noArrayIndexKey: <>
|
|
794
|
+
a}`
|
|
795
|
+
)
|
|
796
|
+
), de = /* @__PURE__ */ s.jsx(
|
|
797
|
+
"div",
|
|
798
|
+
{
|
|
799
|
+
tabIndex: 0,
|
|
800
|
+
ref: m,
|
|
801
|
+
style: { opacity: "0" },
|
|
802
|
+
className: c(
|
|
803
|
+
" z-100! w-full mt-1 bg-neutral-default-default border border-neutral-default-default rounded-lg shadow-lg",
|
|
804
|
+
" overflow-hidden focus-visible:bg-neutral-default-hover ",
|
|
805
|
+
N ? "absolute z-50 " : "fixed z-100 top-0 left-0",
|
|
806
|
+
ue.direction === "up" ? "h-auto" : " h-max",
|
|
807
|
+
Ie
|
|
808
|
+
),
|
|
809
|
+
children: /* @__PURE__ */ s.jsxs(
|
|
810
|
+
"div",
|
|
811
|
+
{
|
|
812
|
+
className: c(
|
|
813
|
+
"flex flex-col ",
|
|
814
|
+
ve ? "p-0" : "p-2 pt-0 gap-2"
|
|
815
|
+
),
|
|
816
|
+
style: {
|
|
817
|
+
height: "auto",
|
|
818
|
+
maxHeight: ue.height
|
|
819
|
+
},
|
|
820
|
+
children: [
|
|
821
|
+
!ve && /* @__PURE__ */ s.jsx(
|
|
822
|
+
lt,
|
|
823
|
+
{
|
|
824
|
+
name: "",
|
|
825
|
+
label: "",
|
|
826
|
+
size: "small",
|
|
827
|
+
tabIndex: 0,
|
|
828
|
+
value: B,
|
|
829
|
+
disabled: y,
|
|
830
|
+
ref: ye,
|
|
831
|
+
labelVariant: "static",
|
|
832
|
+
icon: /* @__PURE__ */ s.jsx(ot, { size: 22 }),
|
|
833
|
+
isFetching: Q,
|
|
834
|
+
onKeyDown: Pe,
|
|
835
|
+
onClear: Ge,
|
|
836
|
+
onChange: (r) => Te(r.target.value),
|
|
837
|
+
placeholder: ke,
|
|
838
|
+
className: " bg-neutral-medium-pressed",
|
|
839
|
+
...H
|
|
840
|
+
}
|
|
841
|
+
),
|
|
842
|
+
/* @__PURE__ */ s.jsx("div", { className: " overflow-y-auto flex-1 max-h-max ", children: oe.length === 0 ? Q ? /* @__PURE__ */ s.jsx("div", { className: "flex flex-col gap-1 overflow-hidden w-full", children: De || R }) : /* @__PURE__ */ s.jsx("div", { className: "px-3 py-2 text-neutral-medium-default", children: B ? `No se encontraron resultados para "${B}"` : ge }) : (() => {
|
|
843
|
+
let r = !0;
|
|
844
|
+
return oe.map((a) => {
|
|
845
|
+
const i = a, u = !!(i || {}).isGroupHeader, v = z && !u ? k(a, W) : i.id, D = ne.has(v), g = (l) => !z || u ? l : {
|
|
846
|
+
id: v,
|
|
847
|
+
label: String(k(l, T)),
|
|
848
|
+
value: k(l, W)
|
|
849
|
+
}, A = (l) => {
|
|
850
|
+
u || xe(
|
|
851
|
+
g(a),
|
|
852
|
+
l === void 0 ? !h : l
|
|
853
|
+
);
|
|
854
|
+
}, $ = (l) => {
|
|
855
|
+
if (xe(l, !h), !h) {
|
|
856
|
+
if (!K) return;
|
|
857
|
+
K(""), U(b);
|
|
858
|
+
}
|
|
859
|
+
}, Z = (l, d) => {
|
|
860
|
+
const S = !!(d || {}).isGroupHeader;
|
|
861
|
+
return (
|
|
862
|
+
// biome-ignore lint/a11y/useSemanticElements: <>
|
|
863
|
+
/* @__PURE__ */ s.jsx(
|
|
864
|
+
"div",
|
|
865
|
+
{
|
|
866
|
+
tabIndex: 0,
|
|
867
|
+
role: "listitem",
|
|
868
|
+
onKeyDown: (L) => O(L, d),
|
|
869
|
+
className: c(
|
|
870
|
+
!S && !y && "focus-visible:bg-neutral-medium-hover outline-none hover:bg-neutral-medium-hover",
|
|
871
|
+
D && "bg-neutral-medium-selected",
|
|
872
|
+
y && "cursor-default pointer-events-none"
|
|
873
|
+
),
|
|
874
|
+
children: l
|
|
875
|
+
},
|
|
876
|
+
d.id
|
|
877
|
+
)
|
|
878
|
+
);
|
|
879
|
+
};
|
|
880
|
+
if (u) {
|
|
881
|
+
const l = i.groupLabelNode ?? i.label, d = String(i.id), S = q === !1 ? !0 : Ae(d);
|
|
882
|
+
r = S;
|
|
883
|
+
const L = i.originalOption, G = i.groupData?.groupOptions ?? [], ee = (I) => {
|
|
884
|
+
q && Ee(d, I);
|
|
885
|
+
}, me = (I) => {
|
|
886
|
+
!G || G.length === 0 || Ce && Ce(G, I);
|
|
887
|
+
}, he = G.filter(
|
|
888
|
+
(I) => ne.has(k(I, W))
|
|
889
|
+
).map((I) => String(k(I, W)));
|
|
890
|
+
if (be) {
|
|
891
|
+
const I = V(
|
|
892
|
+
be,
|
|
893
|
+
(C, M) => C.label === M.label && C.group === M.group && C.groupOptions === M.groupOptions && C.disabled === M.disabled && C.multiple === M.multiple && C.expanded === M.expanded && C.renderContext === M.renderContext
|
|
894
|
+
), x = we.createElement(I, {
|
|
895
|
+
group: L,
|
|
896
|
+
label: l,
|
|
897
|
+
groupOptions: G,
|
|
898
|
+
multiple: h,
|
|
899
|
+
disabled: y,
|
|
900
|
+
expanded: S,
|
|
901
|
+
toggleGroup: ee,
|
|
902
|
+
selectGroup: me,
|
|
903
|
+
renderContext: w,
|
|
904
|
+
groupSelectedIds: he
|
|
905
|
+
});
|
|
906
|
+
return Z(x, i);
|
|
907
|
+
}
|
|
908
|
+
return Z(
|
|
909
|
+
/* @__PURE__ */ s.jsxs("div", { className: "px-3 py-2 text-neutral-medium-default font-medium text-sm w-full flex justify-between", children: [
|
|
910
|
+
/* @__PURE__ */ s.jsx("div", { children: l }),
|
|
911
|
+
q && /* @__PURE__ */ s.jsx(
|
|
912
|
+
"div",
|
|
913
|
+
{
|
|
914
|
+
className: "cursor-pointer",
|
|
915
|
+
onClick: () => Ee(d),
|
|
916
|
+
children: /* @__PURE__ */ s.jsx(
|
|
917
|
+
Re,
|
|
918
|
+
{
|
|
919
|
+
className: c(
|
|
920
|
+
"transition-transform duration-300 ease-out",
|
|
921
|
+
S ? "rotate-180" : "rotate-0"
|
|
922
|
+
)
|
|
923
|
+
}
|
|
924
|
+
)
|
|
925
|
+
}
|
|
926
|
+
)
|
|
927
|
+
] }),
|
|
928
|
+
i
|
|
929
|
+
);
|
|
930
|
+
}
|
|
931
|
+
const fe = z ? we.createElement(
|
|
932
|
+
V(
|
|
933
|
+
z,
|
|
934
|
+
(l, d) => l.isSelected === d.isSelected && l.option === d.option && l.disabled === d.disabled && l.multiple === d.multiple && l.renderContext === d.renderContext
|
|
935
|
+
),
|
|
936
|
+
{
|
|
937
|
+
key: v,
|
|
938
|
+
option: a,
|
|
939
|
+
isSelected: D,
|
|
940
|
+
multiple: h,
|
|
941
|
+
onSelect: A,
|
|
942
|
+
disabled: y,
|
|
943
|
+
isLoading: Q,
|
|
944
|
+
renderContext: w
|
|
945
|
+
}
|
|
946
|
+
) : /* @__PURE__ */ s.jsx(
|
|
947
|
+
Be,
|
|
948
|
+
{
|
|
949
|
+
disabled: y,
|
|
950
|
+
multiple: h,
|
|
951
|
+
isLoading: Q,
|
|
952
|
+
isSelected: D,
|
|
953
|
+
onSelect: $,
|
|
954
|
+
option: a
|
|
955
|
+
},
|
|
956
|
+
v
|
|
957
|
+
), le = Z(
|
|
958
|
+
fe,
|
|
959
|
+
g(a)
|
|
960
|
+
);
|
|
961
|
+
if (!q)
|
|
962
|
+
return le;
|
|
963
|
+
const t = !r, o = le;
|
|
964
|
+
return we.cloneElement(o, {
|
|
965
|
+
className: c(
|
|
966
|
+
o.props.className,
|
|
967
|
+
"overflow-hidden transition-[max-height] duration-300 ease-out",
|
|
968
|
+
t ? "max-h-0" : "max-h-[999px]"
|
|
969
|
+
)
|
|
970
|
+
});
|
|
971
|
+
});
|
|
972
|
+
})() }),
|
|
973
|
+
e && e
|
|
974
|
+
]
|
|
975
|
+
}
|
|
976
|
+
)
|
|
977
|
+
}
|
|
978
|
+
);
|
|
979
|
+
return N ? de : Ye(de, document.body);
|
|
980
|
+
}
|
|
981
|
+
const mt = V(
|
|
982
|
+
ft,
|
|
983
|
+
(e, n) => e.options === n.options && e.selectedOptionsIds === n.selectedOptionsIds && e.multiple === n.multiple && e.disabled === n.disabled && e.emptyMessage === n.emptyMessage && e.renderOption === n.renderOption && e.renderOptionContext === n.renderOptionContext && e.isOpen === n.isOpen && e.attachToParent === n.attachToParent && e.optionValue === n.optionValue && e.optionLabel === n.optionLabel && e.filteredOptions === n.filteredOptions && e.isLoading === n.isLoading
|
|
984
|
+
), Be = V(
|
|
985
|
+
({
|
|
986
|
+
option: e,
|
|
987
|
+
isSelected: n,
|
|
988
|
+
onSelect: f,
|
|
989
|
+
multiple: b,
|
|
990
|
+
disabled: h,
|
|
991
|
+
isLoading: y
|
|
992
|
+
}) => {
|
|
993
|
+
const p = (e || {})?.isGroupHeader;
|
|
994
|
+
if (y)
|
|
995
|
+
return /* @__PURE__ */ s.jsxs(
|
|
996
|
+
"div",
|
|
997
|
+
{
|
|
998
|
+
className: "flex gap-2 w-full px-3 py-2 cursor-wait",
|
|
999
|
+
children: [
|
|
1000
|
+
/* @__PURE__ */ s.jsx(Ue, { className: "size-6 aspect-square" }),
|
|
1001
|
+
/* @__PURE__ */ s.jsx(Ue, { className: "flex-1 h-6" })
|
|
1002
|
+
]
|
|
1003
|
+
},
|
|
1004
|
+
e.id
|
|
1005
|
+
);
|
|
1006
|
+
const H = (T) => {
|
|
1007
|
+
T.preventDefault(), T.stopPropagation(), !(h || p) && f?.(e);
|
|
1008
|
+
}, m = p && e.groupLabelNode ? e.groupLabelNode : e.label;
|
|
1009
|
+
return (
|
|
1010
|
+
// biome-ignore lint/a11y/noStaticElementInteractions: no keyboard interaction needed
|
|
1011
|
+
/* @__PURE__ */ s.jsxs(
|
|
1012
|
+
"div",
|
|
1013
|
+
{
|
|
1014
|
+
onMouseDown: H,
|
|
1015
|
+
className: c(
|
|
1016
|
+
"px-3 py-2 flex items-center transition-colors text-neutral-default-default ",
|
|
1017
|
+
p ? "cursor-default text-neutral-medium-default" : "cursor-pointer",
|
|
1018
|
+
!p && (n ? " text-primary-default-default" : "hover:bg-neutral-medium-hover text-neutral-default-hover"),
|
|
1019
|
+
h && !p && "text-neutral-default-disabled hover:bg-neutral-default-default"
|
|
1020
|
+
),
|
|
1021
|
+
children: [
|
|
1022
|
+
b && !p && /* @__PURE__ */ s.jsx(rt, { checked: n, disabled: h }),
|
|
1023
|
+
/* @__PURE__ */ s.jsx("span", { children: m })
|
|
1024
|
+
]
|
|
1025
|
+
},
|
|
1026
|
+
e.id
|
|
1027
|
+
)
|
|
1028
|
+
);
|
|
1029
|
+
},
|
|
1030
|
+
(e, n) => e.isSelected === n.isSelected && e.disabled === n.disabled
|
|
1031
|
+
);
|
|
1032
|
+
Be.displayName = "DefaultOptionRenderer";
|
|
1033
|
+
const Je = V(
|
|
1034
|
+
({
|
|
1035
|
+
selectedOptions: e,
|
|
1036
|
+
placeholder: n,
|
|
1037
|
+
onRemoveOption: f,
|
|
1038
|
+
displayMode: b,
|
|
1039
|
+
multiple: h,
|
|
1040
|
+
className: y,
|
|
1041
|
+
disabled: p
|
|
1042
|
+
}) => e?.length === 0 ? n ? /* @__PURE__ */ s.jsx("span", { className: "text-neutral-medium-default opacity-50", children: n }) : null : b === "chips" && h ? /* @__PURE__ */ s.jsx("div", { className: c("flex items-center gap-1 ", y), children: e.map((H) => /* @__PURE__ */ s.jsx(
|
|
1043
|
+
it,
|
|
1044
|
+
{
|
|
1045
|
+
tabIndex: -1,
|
|
1046
|
+
id: H.id,
|
|
1047
|
+
label: H.label,
|
|
1048
|
+
onRemove: f,
|
|
1049
|
+
disabled: p
|
|
1050
|
+
},
|
|
1051
|
+
H.id
|
|
1052
|
+
)) }) : e?.length === 1 ? /* @__PURE__ */ s.jsx("span", { children: e[0].label }) : /* @__PURE__ */ s.jsxs("span", { children: [
|
|
1053
|
+
e?.length,
|
|
1054
|
+
" seleccionados"
|
|
1055
|
+
] }),
|
|
1056
|
+
(e, n) => e.selectedOptions === n.selectedOptions && e.disabled === n.disabled
|
|
1057
|
+
);
|
|
1058
|
+
Je.displayName = "DefaultSelectionDisplay";
|
|
1059
|
+
export {
|
|
1060
|
+
Ot as default
|
|
1061
|
+
};
|