prometeo-design-system 2.8.5 → 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.js +5 -0
- package/dist/CheckBox.js +4 -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.js +5 -0
- package/dist/FAButton.js +4 -0
- package/dist/Header.js +4 -0
- package/dist/Icons/Icons.js +1055 -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.js +5 -0
- package/dist/LayoutGeneric.js +4 -0
- package/dist/Logo.js +4 -0
- package/dist/Menu.js +5 -0
- package/dist/OtpInput.js +4 -0
- package/dist/Pagination.js +4 -0
- package/dist/ProfilePictureUpload.js +5 -0
- package/dist/ProgressBar.js +4 -0
- package/dist/RadioButton.js +5 -0
- package/dist/SegmentedButton.js +5 -0
- package/dist/Select.js +4 -0
- package/dist/SelectSearch.js +4 -0
- package/dist/Skeleton.js +5 -0
- package/dist/Spinner.js +4 -0
- package/dist/Steps.js +5 -0
- package/dist/SwipeContainer.js +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} +24 -24
- package/dist/{Button.es.js → components/Button/Button.js} +55 -55
- package/dist/{CardProfile-CsytJlKZ.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/components/InputMultiple/InputMultiple.js +262 -0
- 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} +12 -13
- package/dist/components/OtpInput/OtpInput.js +112 -0
- package/dist/{Pagination.es.js → components/Pagination/Pagination.js} +32 -32
- package/dist/{ProfilePictureUpload.es.js → components/ProfilePictureUpload/ProfilePictureUpload.js} +56 -57
- package/dist/components/ProgressBar/ProgressBar.js +70 -0
- package/dist/{RadioButton.es.js → components/RadioButton/RadioButton.js} +35 -36
- package/dist/{SegmentedButton.es.js → components/SegmentedButton/SegmentedButton.js} +37 -38
- 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 -18
- package/dist/components/Spinner/Spinner.js +52 -0
- package/dist/{Steps.es.js → components/Steps/Steps.js} +61 -62
- package/dist/{SwipeContainer.es.js → components/SwipeContainer/SwipeContainer.js} +68 -68
- package/dist/{Switch.es.js → components/Switch/Switch.js} +17 -18
- 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} +48 -48
- package/dist/components/Tooltip/Tootip.js +62 -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.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/useDevice.js +4 -0
- package/package.json +114 -115
- package/dist/CardProfile.es.js +0 -5
- package/dist/DatePicker.es.js +0 -3441
- 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 -87
- package/dist/Header.es.js +0 -32
- package/dist/HelperComponent-g_xuKWzK.js +0 -24
- package/dist/Icons-DtFC5DJ7.js +0 -1079
- package/dist/Icons.es.js +0 -5
- package/dist/ImageGallery-Ckxg9OIC.js +0 -317
- package/dist/Input-Cck37DpG.js +0 -240
- package/dist/Input.es.js +0 -4
- package/dist/InputMultiple.es.js +0 -263
- package/dist/LayoutGeneric-CbaoatQB.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-BD5FTxVw.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/jsx-runtime-DKDX3adD.js +0 -281
- package/dist/prometeo-design-system.es.js +0 -1002
- /package/dist/{useDevice.es.js → hooks/useDevice.js} +0 -0
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
import { jsx as g } from "react/jsx-runtime";
|
|
2
|
+
import { getAccessorValue as d } from "../../lib/utils.js";
|
|
3
|
+
import { useRef as M, useEffect as k, useCallback as w, useMemo as I } from "react";
|
|
4
|
+
import { useAutocomplete as N } from "../Autocomplete/useAutocomplete.js";
|
|
5
|
+
import O from "../Select/Select.js";
|
|
6
|
+
const j = (e) => {
|
|
7
|
+
const a = M(null);
|
|
8
|
+
k(() => {
|
|
9
|
+
e.controls && (e.controls.current = a.current);
|
|
10
|
+
}, [e.controls]);
|
|
11
|
+
const { asyncMode: t = "fetch_in_open" } = e, V = (n, o, l) => {
|
|
12
|
+
const b = {
|
|
13
|
+
options: n.options,
|
|
14
|
+
fetcher: n.fetcher,
|
|
15
|
+
asyncMode: o,
|
|
16
|
+
debounceDelay: n.debounceDelay,
|
|
17
|
+
minCharacters: n.minCharacters,
|
|
18
|
+
disabled: n.disabled,
|
|
19
|
+
optionValue: n.optionValue,
|
|
20
|
+
optionLabel: n.optionLabel,
|
|
21
|
+
onFetchingStart: () => {
|
|
22
|
+
o === "fetch_on_type" && l.current?.open();
|
|
23
|
+
},
|
|
24
|
+
onTypeStart: () => {
|
|
25
|
+
!n?.fetcher && l.current?.open();
|
|
26
|
+
},
|
|
27
|
+
inputRef: () => l.current?.searchInputRef,
|
|
28
|
+
subscribeOpenChange: l.current?.subscribeOpenChange,
|
|
29
|
+
name: n.name
|
|
30
|
+
};
|
|
31
|
+
return n.multiple ? {
|
|
32
|
+
...b,
|
|
33
|
+
multiple: !0,
|
|
34
|
+
controlledValue: n.value,
|
|
35
|
+
onChange: n.onChange
|
|
36
|
+
} : {
|
|
37
|
+
...b,
|
|
38
|
+
multiple: !1,
|
|
39
|
+
controlledValue: n.value,
|
|
40
|
+
onChange: n.onChange
|
|
41
|
+
};
|
|
42
|
+
}, { inputValue: C, setInputValue: _, filteredOptions: u, isLoading: i, value: c, onOptionClick: y, cleanInputValue: v } = N(V(e, t, a)), L = w(() => t === "fetch_on_type" ? i : !1, [t, i]), s = I(() => e.multiple ? c.map((n) => d(n, e.optionValue)) : c ? d(c, e.optionValue) : void 0, [c, e.optionValue, e.multiple]), r = (n) => {
|
|
43
|
+
const o = u.find((l) => d(l, e.optionValue) === n.id);
|
|
44
|
+
o && y(o);
|
|
45
|
+
}, { displayMode: S = e.multiple ? "chips" : "compact", dropdownOptions: p, overflow: m = "scroll", onChange: P, ...f } = e.selectComponentProps || {}, h = {
|
|
46
|
+
controledSearchValue: C,
|
|
47
|
+
onSearchValueChange: t === "fetch_on_type" ? _ : void 0,
|
|
48
|
+
onSearchClear: t === "fetch_on_type" ? v : void 0,
|
|
49
|
+
inputSearchPlaceholder: e.inputSearchPlaceholder,
|
|
50
|
+
isLoading: L(),
|
|
51
|
+
...p || {}
|
|
52
|
+
};
|
|
53
|
+
return e.multiple ? /* @__PURE__ */ g(
|
|
54
|
+
O,
|
|
55
|
+
{
|
|
56
|
+
disabled: e.disabled,
|
|
57
|
+
className: e.className,
|
|
58
|
+
name: e.name,
|
|
59
|
+
overflow: m,
|
|
60
|
+
...f,
|
|
61
|
+
multiple: !0,
|
|
62
|
+
value: s,
|
|
63
|
+
label: e.label || "",
|
|
64
|
+
options: u,
|
|
65
|
+
optionValue: e.optionValue,
|
|
66
|
+
optionLabel: e.optionLabel,
|
|
67
|
+
renderOption: e.renderOption,
|
|
68
|
+
onOptionClick: r,
|
|
69
|
+
displayMode: S,
|
|
70
|
+
controls: a,
|
|
71
|
+
emptyMessage: "Use el buscador para obtener las opciones disponibles",
|
|
72
|
+
dropdownOptions: h,
|
|
73
|
+
isLoading: t === "fetch_in_open" ? i : !1
|
|
74
|
+
}
|
|
75
|
+
) : /* @__PURE__ */ g(
|
|
76
|
+
O,
|
|
77
|
+
{
|
|
78
|
+
disabled: e.disabled,
|
|
79
|
+
...f,
|
|
80
|
+
className: e.className,
|
|
81
|
+
overflow: m,
|
|
82
|
+
name: e.name,
|
|
83
|
+
multiple: !1,
|
|
84
|
+
value: s,
|
|
85
|
+
label: e.label || "",
|
|
86
|
+
options: u,
|
|
87
|
+
optionValue: e.optionValue,
|
|
88
|
+
optionLabel: e.optionLabel,
|
|
89
|
+
renderOption: e.renderOption,
|
|
90
|
+
onOptionClick: r,
|
|
91
|
+
displayMode: "compact",
|
|
92
|
+
controls: a,
|
|
93
|
+
emptyMessage: "Use el buscador para obtener las opciones disponibles",
|
|
94
|
+
dropdownOptions: h,
|
|
95
|
+
isLoading: t === "fetch_in_open" ? i : !1
|
|
96
|
+
}
|
|
97
|
+
);
|
|
98
|
+
};
|
|
99
|
+
export {
|
|
100
|
+
j as default
|
|
101
|
+
};
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { jsxs as f, jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import { cn as r } from "../../lib/cn.js";
|
|
3
|
+
import { memo as p } from "react";
|
|
4
|
+
import { Close as m } from "../../Icons/Icons.js";
|
|
5
|
+
const x = {
|
|
6
|
+
default: {
|
|
7
|
+
container: "text-neutral-default-default border-neutral-default-default ",
|
|
8
|
+
icon: ""
|
|
9
|
+
},
|
|
10
|
+
error: {
|
|
11
|
+
container: "",
|
|
12
|
+
icon: ""
|
|
13
|
+
},
|
|
14
|
+
success: {
|
|
15
|
+
container: "",
|
|
16
|
+
icon: ""
|
|
17
|
+
}
|
|
18
|
+
}, l = {
|
|
19
|
+
icon: " text-neutral-default-disabled",
|
|
20
|
+
container: " border-neutral-strong-default text-neutral-default-disabled"
|
|
21
|
+
}, s = ({ id: i, label: c, onRemove: a, className: u, disabled: e, variant: d = "default", tabIndex: n }) => /* @__PURE__ */ f(
|
|
22
|
+
"div",
|
|
23
|
+
{
|
|
24
|
+
tabIndex: n,
|
|
25
|
+
className: r(
|
|
26
|
+
"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]",
|
|
27
|
+
x[d].container,
|
|
28
|
+
e && l.container
|
|
29
|
+
),
|
|
30
|
+
children: [
|
|
31
|
+
/* @__PURE__ */ t("span", { className: "truncate w-max ", children: c }),
|
|
32
|
+
a && /* @__PURE__ */ t(
|
|
33
|
+
"button",
|
|
34
|
+
{
|
|
35
|
+
onMouseDown: (o) => {
|
|
36
|
+
e || (o.stopPropagation(), o.preventDefault(), a?.(i));
|
|
37
|
+
},
|
|
38
|
+
className: r(
|
|
39
|
+
"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",
|
|
40
|
+
e && "cursor-default hover:scale-100",
|
|
41
|
+
u
|
|
42
|
+
),
|
|
43
|
+
type: "button",
|
|
44
|
+
tabIndex: n,
|
|
45
|
+
children: /* @__PURE__ */ t(m, { size: 18, className: r(e && l.icon) })
|
|
46
|
+
}
|
|
47
|
+
)
|
|
48
|
+
]
|
|
49
|
+
}
|
|
50
|
+
);
|
|
51
|
+
s.displayName = "Chip";
|
|
52
|
+
const g = p(s);
|
|
53
|
+
export {
|
|
54
|
+
g as default
|
|
55
|
+
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { jsx as t, jsxs as i } from "react/jsx-runtime";
|
|
2
|
+
import { memo as o } from "react";
|
|
3
|
+
import { cn as r } from "../../lib/cn.js";
|
|
4
|
+
import { Check as n, Error as d, Info as u } from "../../Icons/Icons.js";
|
|
5
|
+
const a = (e) => {
|
|
6
|
+
const { variant: s, className: m } = e, l = {
|
|
7
|
+
default: "text-neutral-medium-default pt-[1px]",
|
|
8
|
+
error: "text-error-medium-default pt-[1px]",
|
|
9
|
+
success: "text-success-medium-default"
|
|
10
|
+
}, c = {
|
|
11
|
+
default: /* @__PURE__ */ t(u, { size: 16, className: "text-neutral-medium-default " }),
|
|
12
|
+
error: /* @__PURE__ */ t(d, { size: 16, className: "text-error-medium-default" }),
|
|
13
|
+
success: /* @__PURE__ */ t(n, { size: 16, className: "text-success-medium-default" })
|
|
14
|
+
};
|
|
15
|
+
return /* @__PURE__ */ t("div", { ref: e.ref, className: r("pl-3 mt-1", m), children: typeof e.children == "string" ? /* @__PURE__ */ i("div", { className: "flex gap-0.5 items-start", children: [
|
|
16
|
+
c[s],
|
|
17
|
+
/* @__PURE__ */ t("p", { className: r(" prometeo-fonts-body-small", l[s]), children: e.children })
|
|
18
|
+
] }) : e.children });
|
|
19
|
+
};
|
|
20
|
+
a.displayName = "HelperText";
|
|
21
|
+
const h = o(a);
|
|
22
|
+
export {
|
|
23
|
+
h as default
|
|
24
|
+
};
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { jsx as r, Fragment as l, jsxs as p } from "react/jsx-runtime";
|
|
2
|
+
import { cn as o } from "../../../lib/cn.js";
|
|
3
|
+
import { useRef as x, useState as g, useLayoutEffect as v } from "react";
|
|
4
|
+
import { useSidebarContext as S } from "../context/SidebarContext.js";
|
|
5
|
+
import { useSecondaryBarAnimation as N } from "./hooks/useSecondaryBarAnimation.js";
|
|
6
|
+
const d = ({
|
|
7
|
+
children: e,
|
|
8
|
+
isOpen: t = !1,
|
|
9
|
+
className: f = "",
|
|
10
|
+
width: u = "w-96",
|
|
11
|
+
action: m,
|
|
12
|
+
primarySidebarCollapsed: b,
|
|
13
|
+
onClose: h
|
|
14
|
+
}) => {
|
|
15
|
+
const s = x(null), [c, y] = g({ left: 0, width: 0 }), { primarySidebarRef: a, tabBarRef: n } = S();
|
|
16
|
+
return v(() => {
|
|
17
|
+
if (a?.current && n?.current) {
|
|
18
|
+
const i = a.current.getBoundingClientRect();
|
|
19
|
+
y({
|
|
20
|
+
left: i.width + n.current.offsetWidth,
|
|
21
|
+
width: i.width
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
}, [a, t, b, n]), N(s, t), /* @__PURE__ */ r(l, { children: t && /* @__PURE__ */ p(l, { children: [
|
|
25
|
+
/* @__PURE__ */ r(
|
|
26
|
+
"div",
|
|
27
|
+
{
|
|
28
|
+
className: "fixed inset-0 bg-black/95 z-40",
|
|
29
|
+
style: {
|
|
30
|
+
left: c.left
|
|
31
|
+
},
|
|
32
|
+
onClick: h
|
|
33
|
+
}
|
|
34
|
+
),
|
|
35
|
+
/* @__PURE__ */ r(
|
|
36
|
+
"div",
|
|
37
|
+
{
|
|
38
|
+
ref: s,
|
|
39
|
+
className: o(
|
|
40
|
+
"h-screen bg-neutral-default-default border-r border-neutral-strong-default flex flex-col secondary-bar shrink-0",
|
|
41
|
+
"absolute top-0 z-50",
|
|
42
|
+
u,
|
|
43
|
+
f
|
|
44
|
+
),
|
|
45
|
+
style: {
|
|
46
|
+
left: c.left
|
|
47
|
+
},
|
|
48
|
+
"data-action": m,
|
|
49
|
+
children: /* @__PURE__ */ r("div", { className: "secondary-bar-content", children: e })
|
|
50
|
+
}
|
|
51
|
+
)
|
|
52
|
+
] }) });
|
|
53
|
+
}, R = ({ children: e, className: t }) => /* @__PURE__ */ r("div", { className: o("h-16 ", t), children: e }), w = ({ children: e, className: t }) => /* @__PURE__ */ r("div", { className: o("flex-1 overflow-y-auto p-4", t), children: e }), B = ({ children: e, className: t }) => /* @__PURE__ */ r("div", { className: o("p-4 border-t border-neutral-strong-default", t), children: e }), C = ({ className: e }) => /* @__PURE__ */ r("div", { className: o("flex-1", e) }), A = Object.assign(d, {
|
|
54
|
+
Root: d,
|
|
55
|
+
Header: R,
|
|
56
|
+
Content: w,
|
|
57
|
+
Footer: B,
|
|
58
|
+
Spacer: C
|
|
59
|
+
});
|
|
60
|
+
export {
|
|
61
|
+
A as SecondaryBar
|
|
62
|
+
};
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { useGSAP as a } from "@gsap/react";
|
|
2
|
+
import t from "gsap";
|
|
3
|
+
const u = (r, n) => {
|
|
4
|
+
a(
|
|
5
|
+
() => {
|
|
6
|
+
if (!r.current) return;
|
|
7
|
+
const e = r.current, o = document.querySelector('[data-main-content="true"]');
|
|
8
|
+
if (n) {
|
|
9
|
+
t.fromTo(
|
|
10
|
+
e,
|
|
11
|
+
{
|
|
12
|
+
width: "0rem",
|
|
13
|
+
opacity: 0
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
width: "40rem",
|
|
17
|
+
opacity: 1,
|
|
18
|
+
duration: 0.4,
|
|
19
|
+
ease: "power2.out"
|
|
20
|
+
}
|
|
21
|
+
), o && t.to(o, {
|
|
22
|
+
marginLeft: e.offsetWidth + "px",
|
|
23
|
+
duration: 0.4,
|
|
24
|
+
ease: "power2.out"
|
|
25
|
+
});
|
|
26
|
+
const i = e.querySelectorAll(".secondary-bar-content > *");
|
|
27
|
+
i.length > 0 && t.fromTo(
|
|
28
|
+
i,
|
|
29
|
+
{
|
|
30
|
+
y: 20,
|
|
31
|
+
opacity: 0
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
y: 0,
|
|
35
|
+
opacity: 1,
|
|
36
|
+
duration: 0.3,
|
|
37
|
+
stagger: 0.05,
|
|
38
|
+
delay: 0.1,
|
|
39
|
+
ease: "power1.out"
|
|
40
|
+
}
|
|
41
|
+
);
|
|
42
|
+
} else
|
|
43
|
+
t.to(e, {
|
|
44
|
+
width: "0rem",
|
|
45
|
+
opacity: 0,
|
|
46
|
+
duration: 0.3,
|
|
47
|
+
ease: "power2.in"
|
|
48
|
+
}), o && t.to(o, {
|
|
49
|
+
marginLeft: "0px",
|
|
50
|
+
duration: 0.3,
|
|
51
|
+
ease: "power2.in"
|
|
52
|
+
});
|
|
53
|
+
},
|
|
54
|
+
{ scope: r, dependencies: [n] }
|
|
55
|
+
);
|
|
56
|
+
};
|
|
57
|
+
export {
|
|
58
|
+
u as useSecondaryBarAnimation
|
|
59
|
+
};
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import { jsx as t, jsxs as x } from "react/jsx-runtime";
|
|
2
|
+
import { cn as o } from "../../lib/cn.js";
|
|
3
|
+
import { forwardRef as p, useRef as f, useCallback as w, useEffect as b } from "react";
|
|
4
|
+
import { useSidebarContext as g } from "./context/SidebarContext.js";
|
|
5
|
+
import { SidebarProvider as S } from "./hooks/SidebarProvider.js";
|
|
6
|
+
import { useNavbarAnimations as R } from "./ui/useNavbarAnimation.js";
|
|
7
|
+
import y from "../TabSwitch/TabSwitch.js";
|
|
8
|
+
import { CloseNavBarDesktop as v } from "../../Icons/Icons.js";
|
|
9
|
+
const C = p(
|
|
10
|
+
({ children: r, isCollapsed: e = !1, className: c = "", tabs: u = [], currentTabName: h }, a) => {
|
|
11
|
+
const n = f(null), i = f(null), { registerPrimarySidebar: d, registerTabBar: m } = g(), N = w((s) => {
|
|
12
|
+
n.current = s, typeof a == "function" ? a(s) : a && (a.current = s);
|
|
13
|
+
}, [a]);
|
|
14
|
+
return b(() => {
|
|
15
|
+
n.current && d(n);
|
|
16
|
+
}, [d]), b(() => {
|
|
17
|
+
i.current && m(i);
|
|
18
|
+
}, [m]), R(n, e, !1), /* @__PURE__ */ x(
|
|
19
|
+
"div",
|
|
20
|
+
{
|
|
21
|
+
className: o(
|
|
22
|
+
"flex"
|
|
23
|
+
),
|
|
24
|
+
children: [
|
|
25
|
+
u.length > 0 && /* @__PURE__ */ t(
|
|
26
|
+
y,
|
|
27
|
+
{
|
|
28
|
+
tabs: u,
|
|
29
|
+
ref: i,
|
|
30
|
+
activeColor: "var(--neutral-900)",
|
|
31
|
+
currentTabName: h
|
|
32
|
+
}
|
|
33
|
+
),
|
|
34
|
+
/* @__PURE__ */ t(
|
|
35
|
+
"div",
|
|
36
|
+
{
|
|
37
|
+
ref: N,
|
|
38
|
+
className: `bg-neutral-default-default hidden overflow-hidden h-screen md:flex flex-col border-r border-neutral-strong-default transition-all duration-300 relative z-50 shrink-0
|
|
39
|
+
${e ? "w-16" : "w-64"} ${c}`,
|
|
40
|
+
children: r
|
|
41
|
+
}
|
|
42
|
+
)
|
|
43
|
+
]
|
|
44
|
+
}
|
|
45
|
+
);
|
|
46
|
+
}
|
|
47
|
+
), l = p(
|
|
48
|
+
(r, e) => /* @__PURE__ */ t(S, { children: /* @__PURE__ */ t(C, { ...r, ref: e }) })
|
|
49
|
+
);
|
|
50
|
+
l.displayName = "SidebarRoot";
|
|
51
|
+
const j = ({ isCollapsed: r, onToggleCollapse: e }) => /* @__PURE__ */ t("div", { className: o("flex mt-5 mb-4 justify-end mr-5 container-icon-collapsade", r && ""), children: /* @__PURE__ */ t(
|
|
52
|
+
"button",
|
|
53
|
+
{
|
|
54
|
+
type: "button",
|
|
55
|
+
onClick: e,
|
|
56
|
+
title: r ? "Expandir Navbar" : "Contraer Navbar",
|
|
57
|
+
"aria-label": r ? "Expandir Navbar" : "Contraer Navbar",
|
|
58
|
+
className: "cursor-pointer text-neutral-default-default hover:text-primary-default transition-colors duration-300",
|
|
59
|
+
children: r ? /* @__PURE__ */ t(v, { size: 24, className: "rotate-180 transition-transform duration-300" }) : /* @__PURE__ */ t(v, { size: 24, className: "rotate-0 transition-transform duration-300" })
|
|
60
|
+
}
|
|
61
|
+
) }), z = ({ children: r, className: e }) => /* @__PURE__ */ t("div", { className: `${e} sidebar-header`, children: r }), B = ({ className: r }) => /* @__PURE__ */ t("div", { className: o("px-3 flex justify-center items-center w-full mb-4", r), children: /* @__PURE__ */ t("div", { className: "border-b border-neutral-strong-default border w-full" }) }), k = ({ children: r, className: e }) => /* @__PURE__ */ t("div", { className: e, children: r }), E = ({ className: r, size: e = "auto" }) => /* @__PURE__ */ t("div", { className: o((() => {
|
|
62
|
+
switch (e) {
|
|
63
|
+
case "auto":
|
|
64
|
+
return "flex-grow";
|
|
65
|
+
case "small":
|
|
66
|
+
return "h-2 w-2";
|
|
67
|
+
case "medium":
|
|
68
|
+
return "h-4 w-4";
|
|
69
|
+
case "large":
|
|
70
|
+
return "h-8 w-8";
|
|
71
|
+
}
|
|
72
|
+
})(), r) }), I = ({ children: r, className: e }) => /* @__PURE__ */ t("div", { className: e, children: r }), q = Object.assign(l, {
|
|
73
|
+
Root: l,
|
|
74
|
+
CollapseButton: j,
|
|
75
|
+
Header: z,
|
|
76
|
+
Divider: B,
|
|
77
|
+
Content: k,
|
|
78
|
+
Spacer: E,
|
|
79
|
+
Footer: I
|
|
80
|
+
});
|
|
81
|
+
export {
|
|
82
|
+
j as CollapseButton,
|
|
83
|
+
q as Sidebar
|
|
84
|
+
};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { jsxs as o, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { cn as m } from "../../../lib/cn.js";
|
|
3
|
+
const d = ({
|
|
4
|
+
children: r,
|
|
5
|
+
icon: n,
|
|
6
|
+
label: t,
|
|
7
|
+
href: a,
|
|
8
|
+
onClick: l,
|
|
9
|
+
isActive: s = !1,
|
|
10
|
+
className: i
|
|
11
|
+
}) => /* @__PURE__ */ o(
|
|
12
|
+
a ? "a" : "button",
|
|
13
|
+
{
|
|
14
|
+
href: a,
|
|
15
|
+
onClick: l,
|
|
16
|
+
className: m(
|
|
17
|
+
"nav-link-item",
|
|
18
|
+
"flex items-center w-full px-3 py-2 text-left",
|
|
19
|
+
"hover:bg-neutral-medium-default transition-colors rounded-lg",
|
|
20
|
+
"focus:outline-none focus:ring-2 focus:ring-primary-default-default",
|
|
21
|
+
s && "bg-neutral-medium-default",
|
|
22
|
+
i
|
|
23
|
+
),
|
|
24
|
+
children: [
|
|
25
|
+
n && /* @__PURE__ */ e("div", { className: "nav-icon-wrapper mr-3 flex-shrink-0", children: /* @__PURE__ */ e("div", { className: "nav-icon flex items-center justify-center w-5 h-5", children: n }) }),
|
|
26
|
+
t && /* @__PURE__ */ e("span", { className: "nav-label text-sm text-neutral-strong-default", children: t }),
|
|
27
|
+
r
|
|
28
|
+
]
|
|
29
|
+
}
|
|
30
|
+
);
|
|
31
|
+
export {
|
|
32
|
+
d as NavigationLink,
|
|
33
|
+
d as default
|
|
34
|
+
};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import { cn as o } from "../../../lib/cn.js";
|
|
3
|
+
const g = ({
|
|
4
|
+
count: s,
|
|
5
|
+
maxCount: t = 9,
|
|
6
|
+
className: n = "",
|
|
7
|
+
size: a = "medium",
|
|
8
|
+
variant: l = "primary",
|
|
9
|
+
showZero: i = !1
|
|
10
|
+
}) => {
|
|
11
|
+
const e = s, u = e > t ? `+${t}` : e;
|
|
12
|
+
if (e === 0 && !i) return null;
|
|
13
|
+
const d = {
|
|
14
|
+
small: "w-4.5 h-4.5 text-xs ",
|
|
15
|
+
medium: "w-5 h-5 text-xs",
|
|
16
|
+
large: "w-6 h-6 text-sm"
|
|
17
|
+
}, m = {
|
|
18
|
+
primary: "bg-primary-default-default text-neutral-strong-default",
|
|
19
|
+
secondary: "bg-neutral-medium-default text-neutral-strong-default",
|
|
20
|
+
success: "bg-green-500 text-white",
|
|
21
|
+
warning: "bg-yellow-500 text-black",
|
|
22
|
+
danger: "bg-red-500 text-white"
|
|
23
|
+
};
|
|
24
|
+
return /* @__PURE__ */ r("div", { className: o(
|
|
25
|
+
"rounded-full flex items-center justify-center font-medium ",
|
|
26
|
+
d[a],
|
|
27
|
+
m[l],
|
|
28
|
+
n
|
|
29
|
+
), children: /* @__PURE__ */ r("span", { children: u }) });
|
|
30
|
+
};
|
|
31
|
+
export {
|
|
32
|
+
g as Badge
|
|
33
|
+
};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { CardProfile as n } from "../../CardProfile/CardProfile.js";
|
|
3
|
+
function c({
|
|
4
|
+
sessions: l,
|
|
5
|
+
handleTokenLogin: o
|
|
6
|
+
}) {
|
|
7
|
+
return /* @__PURE__ */ e("div", { className: "profile-options-container w-full ", children: l?.map((a) => /* @__PURE__ */ e(
|
|
8
|
+
"button",
|
|
9
|
+
{
|
|
10
|
+
className: "w-full ",
|
|
11
|
+
onClick: () => o?.(a.token),
|
|
12
|
+
children: /* @__PURE__ */ e(n, { children: /* @__PURE__ */ e(
|
|
13
|
+
n.Content,
|
|
14
|
+
{
|
|
15
|
+
onClick: () => {
|
|
16
|
+
console.log("hola");
|
|
17
|
+
},
|
|
18
|
+
isExpanded: !1,
|
|
19
|
+
nameUser: a.name,
|
|
20
|
+
nameArea: a?.areaId?.name,
|
|
21
|
+
nameCompany: a.companyId.name,
|
|
22
|
+
cardProfile: /* @__PURE__ */ e(n.Image, { isExpanded: !1 })
|
|
23
|
+
}
|
|
24
|
+
) })
|
|
25
|
+
},
|
|
26
|
+
a._id
|
|
27
|
+
)) });
|
|
28
|
+
}
|
|
29
|
+
export {
|
|
30
|
+
c as default
|
|
31
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { jsx as a } from "react/jsx-runtime";
|
|
2
|
+
import { CloseNavBarDesktop as t } from "../../../Icons/Icons.js";
|
|
3
|
+
const i = ({
|
|
4
|
+
isCollapsed: r,
|
|
5
|
+
onToggle: o
|
|
6
|
+
}) => /* @__PURE__ */ a("div", { className: "", children: /* @__PURE__ */ a(
|
|
7
|
+
"button",
|
|
8
|
+
{
|
|
9
|
+
onClick: o,
|
|
10
|
+
title: r ? "Expandir Navbar" : "Contraer Navbar",
|
|
11
|
+
"aria-label": r ? "Expandir Navbar" : "Contraer Navbar",
|
|
12
|
+
className: "cursor-pointer text-neutral-default-default hover:text-primary-default transition-colors duration-300",
|
|
13
|
+
children: r ? /* @__PURE__ */ a(t, { size: 34, className: "rotate-180 transition-transform duration-300" }) : /* @__PURE__ */ a(t, { size: 34, className: "rotate-0 transition-transform duration-300" })
|
|
14
|
+
}
|
|
15
|
+
) });
|
|
16
|
+
export {
|
|
17
|
+
i as NavbarCollapseButton
|
|
18
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { jsx as e } from "react/jsx-runtime";
|
|
2
|
+
const r = ({ logoUrl: l, companyName: s }) => /* @__PURE__ */ e("div", { className: "w-full flex justify-center items-center p-2 h-20", children: /* @__PURE__ */ e(
|
|
3
|
+
"img",
|
|
4
|
+
{
|
|
5
|
+
src: l,
|
|
6
|
+
className: "h-2/3 rounded-full",
|
|
7
|
+
alt: s ?? ""
|
|
8
|
+
}
|
|
9
|
+
) });
|
|
10
|
+
export {
|
|
11
|
+
r as CompanyLogo
|
|
12
|
+
};
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
import { jsx as e, jsxs as l } from "react/jsx-runtime";
|
|
2
|
+
import { cn as u } from "../../../lib/cn.js";
|
|
3
|
+
import { motion as a, AnimatePresence as h } from "framer-motion";
|
|
4
|
+
import { Badge as w } from "./badge.js";
|
|
5
|
+
const j = ({
|
|
6
|
+
linkActions: d,
|
|
7
|
+
onClick: m,
|
|
8
|
+
activeAction: f
|
|
9
|
+
}) => /* @__PURE__ */ e("nav", { className: "flex flex-col gap-1", children: d?.map((p, s) => {
|
|
10
|
+
const { isView: i = !1, actionName: r, title: v, icon: o, count: n, viewAccess: c } = p || {}, x = (typeof i == "function" ? i() : i !== !1) && (!c || c()), t = f === r;
|
|
11
|
+
return x && /* @__PURE__ */ e(
|
|
12
|
+
a.div,
|
|
13
|
+
{
|
|
14
|
+
initial: { opacity: 0 },
|
|
15
|
+
animate: { opacity: 1 },
|
|
16
|
+
transition: {
|
|
17
|
+
duration: 0.4,
|
|
18
|
+
delay: s * 0.03,
|
|
19
|
+
ease: "easeOut"
|
|
20
|
+
},
|
|
21
|
+
className: "relative flex justify-center w-full items-center px-3",
|
|
22
|
+
children: /* @__PURE__ */ l(
|
|
23
|
+
"button",
|
|
24
|
+
{
|
|
25
|
+
onClick: () => {
|
|
26
|
+
m?.(r);
|
|
27
|
+
},
|
|
28
|
+
className: u(
|
|
29
|
+
"nav-link-item flex rounded-lg cursor-pointer relative overflow-hidden h-10 ",
|
|
30
|
+
"transition-all duration-300 ease-out w-full",
|
|
31
|
+
"group hover:bg-neutral-medium-selected",
|
|
32
|
+
t ? "text-primary-default-default bg-neutral-medium-selected" : "text-neutral-default-default"
|
|
33
|
+
),
|
|
34
|
+
children: [
|
|
35
|
+
/* @__PURE__ */ e(h, { mode: "wait", children: t && /* @__PURE__ */ e(
|
|
36
|
+
a.div,
|
|
37
|
+
{
|
|
38
|
+
layoutId: "nav-active-bg",
|
|
39
|
+
className: "absolute inset-0 bg-neutral-medium-selected rounded-lg",
|
|
40
|
+
initial: !1,
|
|
41
|
+
animate: { opacity: 1 },
|
|
42
|
+
exit: { opacity: 0 },
|
|
43
|
+
transition: {
|
|
44
|
+
type: "tween",
|
|
45
|
+
duration: 0.25,
|
|
46
|
+
ease: "easeInOut"
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
) }),
|
|
50
|
+
/* @__PURE__ */ l(
|
|
51
|
+
a.div,
|
|
52
|
+
{
|
|
53
|
+
className: "nav-content-wrapper flex items-center justify-between gap-3 px-3 relative z-10 w-full",
|
|
54
|
+
animate: {
|
|
55
|
+
x: 0
|
|
56
|
+
},
|
|
57
|
+
transition: {
|
|
58
|
+
duration: 0.25,
|
|
59
|
+
ease: "easeOut"
|
|
60
|
+
},
|
|
61
|
+
children: [
|
|
62
|
+
/* @__PURE__ */ l("div", { className: "flex items-center gap-3", children: [
|
|
63
|
+
/* @__PURE__ */ e(
|
|
64
|
+
a.div,
|
|
65
|
+
{
|
|
66
|
+
className: "nav-icon-wrapper flex items-center justify-center flex-shrink-0",
|
|
67
|
+
animate: {
|
|
68
|
+
scale: t ? 1.05 : 1
|
|
69
|
+
},
|
|
70
|
+
transition: {
|
|
71
|
+
duration: 0.25,
|
|
72
|
+
ease: "easeOut"
|
|
73
|
+
},
|
|
74
|
+
children: typeof o == "function" ? o({
|
|
75
|
+
size: 24,
|
|
76
|
+
className: u(
|
|
77
|
+
"nav-icon transition-colors duration-250 ease-out",
|
|
78
|
+
t ? "text-primary-default-default" : "text-neutral-default-default group-hover:text-white-prometeo"
|
|
79
|
+
)
|
|
80
|
+
}) : null
|
|
81
|
+
}
|
|
82
|
+
),
|
|
83
|
+
/* @__PURE__ */ e("span", { className: "nav-label whitespace-nowrap text-sm font-semibold ", children: v })
|
|
84
|
+
] }),
|
|
85
|
+
/* @__PURE__ */ e("div", { className: "badge-in-link", children: n && n >= 1 ? /* @__PURE__ */ e(w, { count: n, maxCount: 9, className: "" }) : "" })
|
|
86
|
+
]
|
|
87
|
+
}
|
|
88
|
+
)
|
|
89
|
+
]
|
|
90
|
+
}
|
|
91
|
+
)
|
|
92
|
+
},
|
|
93
|
+
s
|
|
94
|
+
);
|
|
95
|
+
}) });
|
|
96
|
+
export {
|
|
97
|
+
j as NavBarActions
|
|
98
|
+
};
|