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