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