prometeo-design-system 2.8.4 → 2.8.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Avatar.js +4 -0
- package/dist/Button.js +4 -0
- package/dist/CardProfile.d.ts +4 -0
- package/dist/CardProfile.js +5 -0
- package/dist/CheckBox.js +4 -0
- package/dist/DatePicker.d.ts +2 -0
- package/dist/DatePicker.js +5 -0
- package/dist/DialogModal.js +6 -0
- package/dist/DrawerDesktop.js +6 -0
- package/dist/DrawerMobile.js +6 -0
- package/dist/DropZone.d.ts +4 -0
- package/dist/DropZone.js +5 -0
- package/dist/FAButton.js +4 -0
- package/dist/Header.js +4 -0
- package/dist/Icons/Icons.d.ts +1 -1
- package/dist/Icons/Icons.js +1055 -0
- package/dist/Icons.d.ts +4 -0
- package/dist/Icons.js +5 -0
- package/dist/Image.js +4 -0
- package/dist/ImageGallery.js +6 -0
- package/dist/Input.js +4 -0
- package/dist/InputMultiple.d.ts +4 -0
- package/dist/InputMultiple.js +5 -0
- package/dist/LayoutGeneric.js +4 -0
- package/dist/Logo.js +4 -0
- package/dist/Menu.d.ts +4 -0
- package/dist/Menu.js +5 -0
- package/dist/OtpInput.js +4 -0
- package/dist/Pagination.js +4 -0
- package/dist/ProfilePictureUpload.d.ts +4 -0
- package/dist/ProfilePictureUpload.js +5 -0
- package/dist/ProgressBar.js +4 -0
- package/dist/RadioButton.d.ts +4 -0
- package/dist/RadioButton.js +5 -0
- package/dist/SegmentedButton.d.ts +4 -0
- package/dist/SegmentedButton.js +5 -0
- package/dist/Select.js +4 -0
- package/dist/SelectSearch.js +4 -0
- package/dist/Skeleton.d.ts +4 -0
- package/dist/Skeleton.js +5 -0
- package/dist/Spinner.js +4 -0
- package/dist/Steps.d.ts +4 -0
- package/dist/Steps.js +5 -0
- package/dist/SwipeContainer.js +4 -0
- package/dist/Switch.d.ts +4 -0
- package/dist/Switch.js +5 -0
- package/dist/TabLinks.js +4 -0
- package/dist/Table.js +11 -0
- package/dist/TextArea.js +4 -0
- package/dist/Toast.js +5 -0
- package/dist/ToastProvider.js +4 -0
- package/dist/Tooltip.js +4 -0
- package/dist/components/Autocomplete/useAutocomplete.js +143 -0
- package/dist/{Avatar.es.js → components/Avatar/Avatar.js} +28 -33
- package/dist/{Button.es.js → components/Button/Button.js} +55 -55
- package/dist/{CardProfile-BB-IP1MR.js → components/CardProfile/CardProfile.js} +68 -94
- package/dist/{CheckBox.es.js → components/CheckBox/CheckBox.js} +25 -25
- package/dist/components/DatePicker/DatePicker.js +396 -0
- package/dist/components/Dialog/Dialog.js +60 -0
- package/dist/components/Dialog/useDialogControl.js +18 -0
- package/dist/components/Drawer/DrawerDesktop.js +179 -0
- package/dist/components/Drawer/DrawerMobile.js +219 -0
- package/dist/components/Drawer/useDrawerDesktop.js +18 -0
- package/dist/components/Drawer/useDrawerMobile.js +27 -0
- package/dist/components/DropZone/DropZone.js +86 -0
- package/dist/components/DropZone/useFileDropzone.js +24 -0
- package/dist/{FAButton.es.js → components/FAB/FAButton.js} +5 -5
- package/dist/components/Header/Header.js +32 -0
- package/dist/components/Image/GalleryPreview.js +40 -0
- package/dist/{Image.es.js → components/Image/Image.js} +32 -32
- package/dist/components/Image/ImageGallery.js +68 -0
- package/dist/components/Image/LightBox.js +223 -0
- package/dist/{ImageGallery.es.js → components/Image/useImageGallery.js} +0 -2
- package/dist/components/Input/Input.js +219 -0
- package/dist/{InputMultiple.es.js → components/InputMultiple/InputMultiple.js} +91 -91
- package/dist/components/Layout/LayoutGeneric.js +13 -0
- package/dist/components/Logo/Logo.js +9 -0
- package/dist/{Menu.es.js → components/Menu/MenuComposable.js} +11 -11
- package/dist/components/OtpInput/OtpInput.js +112 -0
- package/dist/{Pagination.es.js → components/Pagination/Pagination.js} +32 -32
- package/dist/components/ProfilePictureUpload/ProfilePictureUpload.d.ts +1 -1
- package/dist/{ProfilePictureUpload.es.js → components/ProfilePictureUpload/ProfilePictureUpload.js} +73 -98
- package/dist/components/ProgressBar/ProgressBar.js +70 -0
- package/dist/{RadioButton.es.js → components/RadioButton/RadioButton.js} +35 -35
- package/dist/{SegmentedButton.es.js → components/SegmentedButton/SegmentedButton.js} +37 -37
- package/dist/components/Select/Select.js +1005 -0
- package/dist/components/SelectSearch/SelectSearch.js +101 -0
- package/dist/components/Shared/Chip.js +55 -0
- package/dist/components/Shared/HelperComponent.js +24 -0
- package/dist/components/Sidebar/SecondaryBar/SecondaryBar.js +62 -0
- package/dist/components/Sidebar/SecondaryBar/hooks/useSecondaryBarAnimation.js +59 -0
- package/dist/components/Sidebar/SidebarComposable.js +84 -0
- package/dist/components/Sidebar/components/NavigationLink.js +34 -0
- package/dist/components/Sidebar/components/badge.js +33 -0
- package/dist/components/Sidebar/components/changue-account.js +31 -0
- package/dist/components/Sidebar/components/collapse-button.js +18 -0
- package/dist/components/Sidebar/components/company-logo.js +12 -0
- package/dist/components/Sidebar/components/nav-actions.js +98 -0
- package/dist/components/Sidebar/components/nav-links.js +100 -0
- package/dist/components/Sidebar/context/SidebarContext.js +19 -0
- package/dist/components/Sidebar/hooks/SidebarProvider.js +33 -0
- package/dist/components/Sidebar/hooks/useNavBarActions.js +9 -0
- package/dist/components/Sidebar/hooks/useNavBarCollapse.js +11 -0
- package/dist/components/Sidebar/hooks/useSidebarHook.js +13 -0
- package/dist/components/Sidebar/ui/useNavbarAnimation.js +326 -0
- package/dist/{Skeleton.es.js → components/Skeleton/Skeleton.js} +16 -17
- package/dist/components/Spinner/Spinner.js +52 -0
- package/dist/{Steps.es.js → components/Steps/Steps.js} +61 -61
- package/dist/{SwipeContainer.es.js → components/SwipeContainer/SwipeContainer.js} +68 -68
- package/dist/{Switch.es.js → components/Switch/Switch.js} +17 -17
- package/dist/{TabLinks.es.js → components/TabLinks/TabLinks.js} +11 -11
- package/dist/components/TabSwitch/TabSwitch.js +57 -0
- package/dist/{Table.es.js → components/Table/Table.js} +38 -41
- package/dist/{TextArea.es.js → components/TextArea/TextArea.js} +24 -26
- package/dist/components/Toaster/ToastProvider.js +6 -0
- package/dist/{Toast.es.js → components/Toaster/Toaster.js} +42 -42
- package/dist/components/Tooltip/Tootip.js +62 -0
- package/dist/exports/CardProfile.d.ts +1 -0
- package/dist/exports/DatePicker.d.ts +2 -0
- package/dist/exports/DropZone.d.ts +2 -0
- package/dist/exports/Icons.d.ts +2 -1
- package/dist/exports/InputMultiple.d.ts +2 -0
- package/dist/exports/Menu.d.ts +1 -0
- package/dist/exports/ProfilePictureUpload.d.ts +1 -0
- package/dist/exports/RadioButton.d.ts +2 -0
- package/dist/exports/SegmentedButton.d.ts +2 -0
- package/dist/exports/Skeleton.d.ts +2 -0
- package/dist/exports/Steps.d.ts +1 -0
- package/dist/exports/Switch.d.ts +2 -0
- package/dist/hooks/useClickOutside.js +24 -0
- package/dist/{useDragScroll-CHN9OMwn.js → hooks/useDragScroll.js} +1 -1
- package/dist/hooks/useLabelBackground.js +25 -0
- package/dist/index.d.ts +0 -4
- package/dist/index.js +119 -0
- package/dist/{cn-B6yFEsav.js → lib/cn.js} +2 -2
- package/dist/lib/utils.js +54 -0
- package/dist/node_modules/@date-fns/tz/date/index.js +61 -0
- package/dist/node_modules/@date-fns/tz/date/mini.js +69 -0
- package/dist/node_modules/@date-fns/tz/tzName/index.js +11 -0
- package/dist/node_modules/@date-fns/tz/tzOffset/index.js +22 -0
- package/dist/{index-BOQuZ0gG.js → node_modules/class-variance-authority/dist/index.js} +10 -9
- package/dist/node_modules/date-fns/_lib/addLeadingZeros.js +7 -0
- package/dist/node_modules/date-fns/_lib/defaultOptions.js +7 -0
- package/dist/node_modules/date-fns/_lib/format/formatters.js +583 -0
- package/dist/node_modules/date-fns/_lib/format/lightFormatters.js +59 -0
- package/dist/node_modules/date-fns/_lib/format/longFormatters.js +52 -0
- package/dist/node_modules/date-fns/_lib/getTimezoneOffsetInMilliseconds.js +18 -0
- package/dist/node_modules/date-fns/_lib/normalizeDates.js +11 -0
- package/dist/node_modules/date-fns/_lib/normalizeInterval.js +8 -0
- package/dist/node_modules/date-fns/_lib/protectedTokens.js +20 -0
- package/dist/node_modules/date-fns/addDays.js +10 -0
- package/dist/node_modules/date-fns/addMonths.js +20 -0
- package/dist/node_modules/date-fns/addWeeks.js +8 -0
- package/dist/node_modules/date-fns/addYears.js +8 -0
- package/dist/node_modules/date-fns/constants.js +6 -0
- package/dist/node_modules/date-fns/constructFrom.js +8 -0
- package/dist/node_modules/date-fns/differenceInCalendarDays.js +16 -0
- package/dist/node_modules/date-fns/differenceInCalendarMonths.js +13 -0
- package/dist/node_modules/date-fns/eachMonthOfInterval.js +17 -0
- package/dist/node_modules/date-fns/eachYearOfInterval.js +17 -0
- package/dist/node_modules/date-fns/endOfISOWeek.js +8 -0
- package/dist/node_modules/date-fns/endOfMonth.js +9 -0
- package/dist/node_modules/date-fns/endOfWeek.js +10 -0
- package/dist/node_modules/date-fns/endOfYear.js +9 -0
- package/dist/node_modules/date-fns/format.js +58 -0
- package/dist/node_modules/date-fns/getDayOfYear.js +11 -0
- package/dist/node_modules/date-fns/getDaysInMonth.js +10 -0
- package/dist/node_modules/date-fns/getISOWeek.js +12 -0
- package/dist/node_modules/date-fns/getISOWeekYear.js +15 -0
- package/dist/node_modules/date-fns/getMonth.js +8 -0
- package/dist/node_modules/date-fns/getWeek.js +12 -0
- package/dist/node_modules/date-fns/getWeekYear.js +16 -0
- package/dist/node_modules/date-fns/getYear.js +8 -0
- package/dist/node_modules/date-fns/isAfter.js +8 -0
- package/dist/node_modules/date-fns/isBefore.js +8 -0
- package/dist/node_modules/date-fns/isDate.js +7 -0
- package/dist/node_modules/date-fns/isSameDay.js +14 -0
- package/dist/node_modules/date-fns/isSameMonth.js +13 -0
- package/dist/node_modules/date-fns/isSameYear.js +13 -0
- package/dist/node_modules/date-fns/isValid.js +9 -0
- package/dist/node_modules/date-fns/locale/_lib/buildFormatLongFn.js +9 -0
- package/dist/node_modules/date-fns/locale/_lib/buildLocalizeFn.js +18 -0
- package/dist/node_modules/date-fns/locale/_lib/buildMatchFn.js +31 -0
- package/dist/node_modules/date-fns/locale/_lib/buildMatchPatternFn.js +15 -0
- package/dist/node_modules/date-fns/locale/en-US/_lib/formatDistance.js +70 -0
- package/dist/node_modules/date-fns/locale/en-US/_lib/formatLong.js +33 -0
- package/dist/node_modules/date-fns/locale/en-US/_lib/formatRelative.js +11 -0
- package/dist/node_modules/date-fns/locale/en-US/_lib/localize.js +155 -0
- package/dist/node_modules/date-fns/locale/en-US/_lib/match.js +110 -0
- package/dist/node_modules/date-fns/locale/en-US.js +21 -0
- package/dist/node_modules/date-fns/locale/es/_lib/formatDistance.js +70 -0
- package/dist/node_modules/date-fns/locale/es/_lib/formatLong.js +33 -0
- package/dist/node_modules/date-fns/locale/es/_lib/formatRelative.js +18 -0
- package/dist/node_modules/date-fns/locale/es/_lib/localize.js +143 -0
- package/dist/node_modules/date-fns/locale/es/_lib/match.js +116 -0
- package/dist/node_modules/date-fns/locale/es.js +21 -0
- package/dist/node_modules/date-fns/max.js +14 -0
- package/dist/node_modules/date-fns/min.js +14 -0
- package/dist/node_modules/date-fns/setMonth.js +13 -0
- package/dist/node_modules/date-fns/setYear.js +10 -0
- package/dist/node_modules/date-fns/startOfDay.js +9 -0
- package/dist/node_modules/date-fns/startOfISOWeek.js +8 -0
- package/dist/node_modules/date-fns/startOfISOWeekYear.js +11 -0
- package/dist/node_modules/date-fns/startOfMonth.js +9 -0
- package/dist/node_modules/date-fns/startOfWeek.js +10 -0
- package/dist/node_modules/date-fns/startOfWeekYear.js +12 -0
- package/dist/node_modules/date-fns/startOfYear.js +9 -0
- package/dist/node_modules/date-fns/toDate.js +8 -0
- package/dist/node_modules/input-otp/dist/index.js +194 -0
- package/dist/node_modules/react-day-picker/dist/esm/DayPicker.js +227 -0
- package/dist/node_modules/react-day-picker/dist/esm/UI.js +22 -0
- package/dist/node_modules/react-day-picker/dist/esm/classes/CalendarDay.js +19 -0
- package/dist/node_modules/react-day-picker/dist/esm/classes/CalendarMonth.js +8 -0
- package/dist/node_modules/react-day-picker/dist/esm/classes/CalendarWeek.js +8 -0
- package/dist/node_modules/react-day-picker/dist/esm/classes/DateLib.js +147 -0
- package/dist/node_modules/react-day-picker/dist/esm/components/Button.js +7 -0
- package/dist/node_modules/react-day-picker/dist/esm/components/CaptionLabel.js +7 -0
- package/dist/node_modules/react-day-picker/dist/esm/components/Chevron.js +18 -0
- package/dist/node_modules/react-day-picker/dist/esm/components/Day.js +8 -0
- package/dist/node_modules/react-day-picker/dist/esm/components/DayButton.js +10 -0
- package/dist/node_modules/react-day-picker/dist/esm/components/Dropdown.js +19 -0
- package/dist/node_modules/react-day-picker/dist/esm/components/DropdownNav.js +7 -0
- package/dist/node_modules/react-day-picker/dist/esm/components/Footer.js +7 -0
- package/dist/node_modules/react-day-picker/dist/esm/components/Month.js +8 -0
- package/dist/node_modules/react-day-picker/dist/esm/components/MonthCaption.js +8 -0
- package/dist/node_modules/react-day-picker/dist/esm/components/MonthGrid.js +7 -0
- package/dist/node_modules/react-day-picker/dist/esm/components/Months.js +7 -0
- package/dist/node_modules/react-day-picker/dist/esm/components/MonthsDropdown.js +9 -0
- package/dist/node_modules/react-day-picker/dist/esm/components/Nav.js +27 -0
- package/dist/node_modules/react-day-picker/dist/esm/components/NextMonthButton.js +9 -0
- package/dist/node_modules/react-day-picker/dist/esm/components/Option.js +7 -0
- package/dist/node_modules/react-day-picker/dist/esm/components/PreviousMonthButton.js +9 -0
- package/dist/node_modules/react-day-picker/dist/esm/components/Root.js +8 -0
- package/dist/node_modules/react-day-picker/dist/esm/components/Select.js +7 -0
- package/dist/node_modules/react-day-picker/dist/esm/components/Week.js +8 -0
- package/dist/node_modules/react-day-picker/dist/esm/components/WeekNumber.js +8 -0
- package/dist/node_modules/react-day-picker/dist/esm/components/WeekNumberHeader.js +7 -0
- package/dist/node_modules/react-day-picker/dist/esm/components/Weekday.js +7 -0
- package/dist/node_modules/react-day-picker/dist/esm/components/Weekdays.js +11 -0
- package/dist/node_modules/react-day-picker/dist/esm/components/Weeks.js +7 -0
- package/dist/node_modules/react-day-picker/dist/esm/components/YearsDropdown.js +9 -0
- package/dist/node_modules/react-day-picker/dist/esm/components/custom-components.js +54 -0
- package/dist/node_modules/react-day-picker/dist/esm/formatters/formatCaption.js +9 -0
- package/dist/node_modules/react-day-picker/dist/esm/formatters/formatDay.js +7 -0
- package/dist/node_modules/react-day-picker/dist/esm/formatters/formatMonthDropdown.js +7 -0
- package/dist/node_modules/react-day-picker/dist/esm/formatters/formatWeekNumber.js +7 -0
- package/dist/node_modules/react-day-picker/dist/esm/formatters/formatWeekNumberHeader.js +6 -0
- package/dist/node_modules/react-day-picker/dist/esm/formatters/formatWeekdayName.js +7 -0
- package/dist/node_modules/react-day-picker/dist/esm/formatters/formatYearDropdown.js +9 -0
- package/dist/node_modules/react-day-picker/dist/esm/formatters/index.js +18 -0
- package/dist/node_modules/react-day-picker/dist/esm/helpers/calculateFocusTarget.js +19 -0
- package/dist/node_modules/react-day-picker/dist/esm/helpers/createGetModifiers.js +42 -0
- package/dist/node_modules/react-day-picker/dist/esm/helpers/endOfBroadcastWeek.js +9 -0
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getBroadcastWeeksInMonth.js +7 -0
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getClassNamesForModifiers.js +7 -0
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getComponents.js +10 -0
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getDataAttributes.js +16 -0
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getDates.js +21 -0
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getDays.js +10 -0
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getDefaultClassNames.js +16 -0
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getDisplayMonths.js +13 -0
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getFocusableDate.js +15 -0
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getFormatters.js +10 -0
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getInitialMonth.js +13 -0
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getMonthOptions.js +13 -0
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getMonths.js +24 -0
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getNavMonth.js +13 -0
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getNextFocus.js +12 -0
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getNextMonth.js +12 -0
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getPreviousMonth.js +12 -0
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getStyleForModifiers.js +13 -0
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getWeekdays.js +11 -0
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getWeeks.js +7 -0
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getYearOptions.js +16 -0
- package/dist/node_modules/react-day-picker/dist/esm/helpers/startOfBroadcastWeek.js +7 -0
- package/dist/node_modules/react-day-picker/dist/esm/helpers/useControlledValue.js +8 -0
- package/dist/node_modules/react-day-picker/dist/esm/labels/index.js +26 -0
- package/dist/node_modules/react-day-picker/dist/esm/labels/labelDayButton.js +10 -0
- package/dist/node_modules/react-day-picker/dist/esm/labels/labelGrid.js +9 -0
- package/dist/node_modules/react-day-picker/dist/esm/labels/labelGridcell.js +8 -0
- package/dist/node_modules/react-day-picker/dist/esm/labels/labelMonthDropdown.js +6 -0
- package/dist/node_modules/react-day-picker/dist/esm/labels/labelNav.js +6 -0
- package/dist/node_modules/react-day-picker/dist/esm/labels/labelNext.js +6 -0
- package/dist/node_modules/react-day-picker/dist/esm/labels/labelPrevious.js +6 -0
- package/dist/node_modules/react-day-picker/dist/esm/labels/labelWeekNumber.js +6 -0
- package/dist/node_modules/react-day-picker/dist/esm/labels/labelWeekNumberHeader.js +6 -0
- package/dist/node_modules/react-day-picker/dist/esm/labels/labelWeekday.js +7 -0
- package/dist/node_modules/react-day-picker/dist/esm/labels/labelYearDropdown.js +6 -0
- package/dist/node_modules/react-day-picker/dist/esm/selection/useMulti.js +21 -0
- package/dist/node_modules/react-day-picker/dist/esm/selection/useRange.js +18 -0
- package/dist/node_modules/react-day-picker/dist/esm/selection/useSingle.js +15 -0
- package/dist/node_modules/react-day-picker/dist/esm/useAnimation.js +56 -0
- package/dist/node_modules/react-day-picker/dist/esm/useCalendar.js +44 -0
- package/dist/node_modules/react-day-picker/dist/esm/useDayPicker.js +12 -0
- package/dist/node_modules/react-day-picker/dist/esm/useFocus.js +23 -0
- package/dist/node_modules/react-day-picker/dist/esm/useSelection.js +19 -0
- package/dist/node_modules/react-day-picker/dist/esm/utils/addToRange.js +32 -0
- package/dist/node_modules/react-day-picker/dist/esm/utils/dateMatchModifiers.js +26 -0
- package/dist/node_modules/react-day-picker/dist/esm/utils/rangeContainsDayOfWeek.js +15 -0
- package/dist/node_modules/react-day-picker/dist/esm/utils/rangeContainsModifiers.js +28 -0
- package/dist/node_modules/react-day-picker/dist/esm/utils/rangeIncludesDate.js +9 -0
- package/dist/node_modules/react-day-picker/dist/esm/utils/rangeOverlaps.js +8 -0
- package/dist/node_modules/react-day-picker/dist/esm/utils/typeguards.js +26 -0
- package/dist/prometeo-design-system.css +1 -1
- package/dist/styles.d.ts +0 -0
- package/dist/useDevice.js +4 -0
- package/package.json +282 -274
- package/src/styles/app.css +1314 -0
- package/src/styles/base.css +1323 -0
- package/src/styles/fonts.css +46 -0
- package/src/styles/palette.css +83 -0
- package/src/styles/utilities.css +1126 -0
- package/dist/CardProfile.es.js +0 -4
- package/dist/DatePicker.es.js +0 -3500
- package/dist/DialogModal.es.js +0 -75
- package/dist/DrawerDesktop.es.js +0 -192
- package/dist/DrawerMobile.es.js +0 -242
- package/dist/DropZone.es.js +0 -86
- package/dist/Header.es.js +0 -32
- package/dist/HelperComponent-D_Cqdf1J.js +0 -24
- package/dist/Icons.es.js +0 -1055
- package/dist/ImageGallery-CjaJ0UCN.js +0 -317
- package/dist/Input-Bdo-Acix.js +0 -240
- package/dist/Input.es.js +0 -4
- package/dist/LayoutGeneric-B6E-yOYJ.js +0 -26
- package/dist/LayoutGeneric.es.js +0 -4
- package/dist/Logo.es.js +0 -9
- package/dist/OtpInput.es.js +0 -301
- package/dist/ProgressBar.es.js +0 -70
- package/dist/Select-D2APaG1z.js +0 -1100
- package/dist/Select.es.js +0 -4
- package/dist/SelectSearch.es.js +0 -237
- package/dist/Spinner.es.js +0 -52
- package/dist/ToastProvider.es.js +0 -6
- package/dist/Tooltip.es.js +0 -62
- package/dist/components/Button/Button_Legacy.d.ts +0 -29
- package/dist/jsx-runtime-ByW6EXIE.js +0 -283
- package/dist/prometeo-design-system.es.js +0 -1008
- /package/dist/{useDevice.es.js → hooks/useDevice.js} +0 -0
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
import { jsx as e, jsxs as l } from "react/jsx-runtime";
|
|
2
|
+
import { cn as d } from "../../../lib/cn.js";
|
|
3
|
+
import { motion as a, AnimatePresence as y } from "framer-motion";
|
|
4
|
+
import { Badge as g } from "./badge.js";
|
|
5
|
+
const O = ({
|
|
6
|
+
links: m,
|
|
7
|
+
isLinkActive: s,
|
|
8
|
+
onLinkClick: f
|
|
9
|
+
}) => /* @__PURE__ */ e("nav", { className: "flex flex-col gap-1", children: m?.map((p, r) => {
|
|
10
|
+
const { isView: i = !1, viewAccess: o, path: c, title: v, icon: u, count: n, relatedPaths: x } = p, h = (typeof i == "function" ? i() : i !== !1) && (!o || o()), t = s(c) || (x?.some(
|
|
11
|
+
(w) => s(w)
|
|
12
|
+
) ?? !1);
|
|
13
|
+
return h && /* @__PURE__ */ e(
|
|
14
|
+
a.div,
|
|
15
|
+
{
|
|
16
|
+
initial: { opacity: 0 },
|
|
17
|
+
animate: { opacity: 1 },
|
|
18
|
+
transition: {
|
|
19
|
+
duration: 0.4,
|
|
20
|
+
delay: r * 0.03,
|
|
21
|
+
ease: "easeOut"
|
|
22
|
+
},
|
|
23
|
+
className: "relative flex justify-center w-full items-center px-3",
|
|
24
|
+
children: /* @__PURE__ */ l(
|
|
25
|
+
"button",
|
|
26
|
+
{
|
|
27
|
+
onClick: () => {
|
|
28
|
+
f?.(c);
|
|
29
|
+
},
|
|
30
|
+
className: d(
|
|
31
|
+
"nav-link-item flex rounded-lg cursor-pointer relative overflow-hidden h-10 ",
|
|
32
|
+
"transition-all duration-300 ease-out w-full",
|
|
33
|
+
"group hover:bg-neutral-medium-selected",
|
|
34
|
+
t ? "text-primary-default-default bg-neutral-medium-selected" : "text-neutral-default-default"
|
|
35
|
+
),
|
|
36
|
+
children: [
|
|
37
|
+
/* @__PURE__ */ e(y, { mode: "wait", children: t && /* @__PURE__ */ e(
|
|
38
|
+
a.div,
|
|
39
|
+
{
|
|
40
|
+
layoutId: "nav-active-bg",
|
|
41
|
+
className: "absolute inset-0 bg-neutral-medium-selected rounded-lg",
|
|
42
|
+
initial: !1,
|
|
43
|
+
animate: { opacity: 1 },
|
|
44
|
+
exit: { opacity: 0 },
|
|
45
|
+
transition: {
|
|
46
|
+
type: "tween",
|
|
47
|
+
duration: 0.25,
|
|
48
|
+
ease: "easeInOut"
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
) }),
|
|
52
|
+
/* @__PURE__ */ l(
|
|
53
|
+
a.div,
|
|
54
|
+
{
|
|
55
|
+
className: "nav-content-wrapper flex items-center justify-between gap-3 px-3 relative z-10 w-full",
|
|
56
|
+
animate: {
|
|
57
|
+
x: 0
|
|
58
|
+
},
|
|
59
|
+
transition: {
|
|
60
|
+
duration: 0.25,
|
|
61
|
+
ease: "easeOut"
|
|
62
|
+
},
|
|
63
|
+
children: [
|
|
64
|
+
/* @__PURE__ */ l("div", { className: "flex items-center gap-3", children: [
|
|
65
|
+
/* @__PURE__ */ e(
|
|
66
|
+
a.div,
|
|
67
|
+
{
|
|
68
|
+
className: "nav-icon-wrapper flex items-center justify-center shrink-0",
|
|
69
|
+
animate: {
|
|
70
|
+
scale: t ? 1.05 : 1
|
|
71
|
+
},
|
|
72
|
+
transition: {
|
|
73
|
+
duration: 0.25,
|
|
74
|
+
ease: "easeOut"
|
|
75
|
+
},
|
|
76
|
+
children: typeof u == "function" ? u({
|
|
77
|
+
size: 24,
|
|
78
|
+
className: d(
|
|
79
|
+
"nav-icon transition-colors duration-250 ease-out",
|
|
80
|
+
t ? "text-primary-default-default" : "text-neutral-default-default group-hover:text-white-prometeo"
|
|
81
|
+
)
|
|
82
|
+
}) : null
|
|
83
|
+
}
|
|
84
|
+
),
|
|
85
|
+
/* @__PURE__ */ e("span", { className: "nav-label whitespace-nowrap text-sm font-semibold ", children: v })
|
|
86
|
+
] }),
|
|
87
|
+
/* @__PURE__ */ e("div", { className: "badge-in-link", children: n && n ? /* @__PURE__ */ e(g, { count: n, maxCount: 9, className: "" }) : "" })
|
|
88
|
+
]
|
|
89
|
+
}
|
|
90
|
+
)
|
|
91
|
+
]
|
|
92
|
+
}
|
|
93
|
+
)
|
|
94
|
+
},
|
|
95
|
+
r
|
|
96
|
+
);
|
|
97
|
+
}) });
|
|
98
|
+
export {
|
|
99
|
+
O as NavbarLinks
|
|
100
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { jsx as a } from "react/jsx-runtime";
|
|
2
|
+
import { useRef as o, createContext as c, useContext as d } from "react";
|
|
3
|
+
const i = c(null), l = ({ children: e }) => {
|
|
4
|
+
const t = o(null), n = o(null), u = (r) => {
|
|
5
|
+
r.current && t && (t.current = r.current);
|
|
6
|
+
}, s = (r) => {
|
|
7
|
+
r.current && n && (n.current = r.current);
|
|
8
|
+
};
|
|
9
|
+
return /* @__PURE__ */ a(i.Provider, { value: { primarySidebarRef: t, registerPrimarySidebar: u, tabBarRef: n, registerTabBar: s }, children: e });
|
|
10
|
+
}, m = () => {
|
|
11
|
+
const e = d(i);
|
|
12
|
+
if (!e)
|
|
13
|
+
throw new Error("useSidebarContext must be used within a SidebarProvider");
|
|
14
|
+
return e;
|
|
15
|
+
};
|
|
16
|
+
export {
|
|
17
|
+
l as SidebarProvider,
|
|
18
|
+
m as useSidebarContext
|
|
19
|
+
};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { jsx as S } from "react/jsx-runtime";
|
|
2
|
+
import { useState as r, useRef as f } from "react";
|
|
3
|
+
import { SidebarContext as p } from "./useSidebarHook.js";
|
|
4
|
+
const x = ({
|
|
5
|
+
children: t
|
|
6
|
+
}) => {
|
|
7
|
+
const [a, o] = r(!1), [s, e] = r(!1), n = f(null), l = () => {
|
|
8
|
+
o(!1), e(!1);
|
|
9
|
+
}, c = () => {
|
|
10
|
+
o(!0), e(!1);
|
|
11
|
+
}, d = {
|
|
12
|
+
isCollapsed: a,
|
|
13
|
+
setIsCollapsed: o,
|
|
14
|
+
navbarRef: n,
|
|
15
|
+
toggleCollapse: () => {
|
|
16
|
+
a ? l() : c();
|
|
17
|
+
},
|
|
18
|
+
activeSecondaryBar: s ? "notifications" : null,
|
|
19
|
+
openSecondaryBar: () => {
|
|
20
|
+
e(!0);
|
|
21
|
+
},
|
|
22
|
+
closeSecondaryBar: () => {
|
|
23
|
+
e(!1);
|
|
24
|
+
},
|
|
25
|
+
toggleSecondaryBar: () => {
|
|
26
|
+
e((i) => !i);
|
|
27
|
+
}
|
|
28
|
+
};
|
|
29
|
+
return /* @__PURE__ */ S(p.Provider, { value: d, children: t });
|
|
30
|
+
};
|
|
31
|
+
export {
|
|
32
|
+
x as SidebarProvider
|
|
33
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { createContext as e, useContext as o } from "react";
|
|
2
|
+
const r = e(
|
|
3
|
+
void 0
|
|
4
|
+
), i = () => {
|
|
5
|
+
const t = o(r);
|
|
6
|
+
if (!t)
|
|
7
|
+
throw new Error("useSidebar must be used within a Sidebar.Root");
|
|
8
|
+
return t;
|
|
9
|
+
};
|
|
10
|
+
export {
|
|
11
|
+
r as SidebarContext,
|
|
12
|
+
i as useSidebar
|
|
13
|
+
};
|
|
@@ -0,0 +1,326 @@
|
|
|
1
|
+
import { useGSAP as c } from "@gsap/react";
|
|
2
|
+
import e from "gsap";
|
|
3
|
+
const n = (t, o, i, r) => o && (Array.isArray(o) ? o.length > 0 : o) ? t.to(o, i, r) : t, y = (t, o, i) => {
|
|
4
|
+
c(
|
|
5
|
+
() => {
|
|
6
|
+
if (!t.current) return;
|
|
7
|
+
const r = e.timeline({
|
|
8
|
+
defaults: { duration: 0.7, ease: "power1.out" }
|
|
9
|
+
}), a = {
|
|
10
|
+
navbar: t.current,
|
|
11
|
+
navLabels: e.utils.toArray(".nav-label"),
|
|
12
|
+
navIconWrappers: e.utils.toArray(".nav-icon-wrapper"),
|
|
13
|
+
navIcons: e.utils.toArray(".nav-icon"),
|
|
14
|
+
navLinkItems: e.utils.toArray(".nav-link-item"),
|
|
15
|
+
logoutButton: document.querySelector(".logout-button"),
|
|
16
|
+
logoutLabel: document.querySelector(".logout-label"),
|
|
17
|
+
logoutIcon: document.querySelector(".logout-icon"),
|
|
18
|
+
profileContainer: document.querySelector(".profile-container"),
|
|
19
|
+
profileName: document.querySelector(".profile-name"),
|
|
20
|
+
profileOptions: document.querySelector(".profile-options"),
|
|
21
|
+
profileImageWrapper: document.querySelector(".profile-image-wrapper"),
|
|
22
|
+
coverImageProfile: document.querySelector(".cover-image-profile"),
|
|
23
|
+
navContentWrapper: document.querySelector(
|
|
24
|
+
".nav-content-wrapper-active"
|
|
25
|
+
),
|
|
26
|
+
buttonCrevron: document.querySelector(".button-select-crevron"),
|
|
27
|
+
separatorProfile: document.querySelector(".border-separator-profile"),
|
|
28
|
+
buttonProfile: document.querySelector(".button-profile"),
|
|
29
|
+
profileUserInfo: document.querySelector(".profile-user-info"),
|
|
30
|
+
buttonContentChevron: document.querySelector(".button-content-chevron"),
|
|
31
|
+
logo: {
|
|
32
|
+
contenedor: document.querySelector(".container-logo"),
|
|
33
|
+
icon: document.querySelector(".icon-logo"),
|
|
34
|
+
text: document.querySelector(".text-logo")
|
|
35
|
+
},
|
|
36
|
+
sidebarHeader: document.querySelector(".sidebar-header"),
|
|
37
|
+
containerIconcollapsade: document.querySelector(
|
|
38
|
+
".container-icon-collapsade"
|
|
39
|
+
),
|
|
40
|
+
// Secondary bar elements
|
|
41
|
+
secondaryBar: document.querySelector(".secondary-bar"),
|
|
42
|
+
secondaryBarContent: e.utils.toArray(".secondary-bar *"),
|
|
43
|
+
badgeInLink: e.utils.toArray(".badge-in-link")
|
|
44
|
+
};
|
|
45
|
+
o ? u(r, a) : d(r, a), a.secondaryBar && l(a.secondaryBar);
|
|
46
|
+
},
|
|
47
|
+
{ scope: t, dependencies: [o, i] }
|
|
48
|
+
);
|
|
49
|
+
}, u = (t, o) => {
|
|
50
|
+
t.to(o.navbar, {
|
|
51
|
+
width: "5rem",
|
|
52
|
+
duration: 0.2,
|
|
53
|
+
ease: "bounce.out"
|
|
54
|
+
}).to(
|
|
55
|
+
o.logo.contenedor,
|
|
56
|
+
{
|
|
57
|
+
height: 48,
|
|
58
|
+
width: 48,
|
|
59
|
+
minWidth: 48,
|
|
60
|
+
ease: "bounce.out"
|
|
61
|
+
},
|
|
62
|
+
-1
|
|
63
|
+
).to(
|
|
64
|
+
o.logo.text,
|
|
65
|
+
{
|
|
66
|
+
opacity: 0,
|
|
67
|
+
scale: 0.8,
|
|
68
|
+
duration: 0.5,
|
|
69
|
+
ease: "back.in(1.2)"
|
|
70
|
+
},
|
|
71
|
+
-1
|
|
72
|
+
).set(o.logo.text, {
|
|
73
|
+
display: "none"
|
|
74
|
+
}).to(
|
|
75
|
+
o.sidebarHeader,
|
|
76
|
+
{
|
|
77
|
+
justifyContent: "center",
|
|
78
|
+
display: "flex"
|
|
79
|
+
},
|
|
80
|
+
-1
|
|
81
|
+
).to(o.logo.icon, {
|
|
82
|
+
keyframes: {
|
|
83
|
+
"0%": { scale: 1 },
|
|
84
|
+
"33%": { scale: 1.5 },
|
|
85
|
+
"66%": { scale: 0.5 },
|
|
86
|
+
"100%": { scale: 1 }
|
|
87
|
+
},
|
|
88
|
+
duration: 0.6,
|
|
89
|
+
ease: "power1.inOut"
|
|
90
|
+
}).to(
|
|
91
|
+
o.navLinkItems,
|
|
92
|
+
{
|
|
93
|
+
justifyContent: "center",
|
|
94
|
+
alignItems: "center",
|
|
95
|
+
width: "3rem",
|
|
96
|
+
height: "3rem",
|
|
97
|
+
display: "flex"
|
|
98
|
+
},
|
|
99
|
+
-1
|
|
100
|
+
).to(
|
|
101
|
+
o.navLabels,
|
|
102
|
+
{
|
|
103
|
+
opacity: 0,
|
|
104
|
+
width: 30,
|
|
105
|
+
marginLeft: 0
|
|
106
|
+
},
|
|
107
|
+
0
|
|
108
|
+
).to(o.navIcons, { scale: 0.95, ease: "elastic.out(1, 0.3)" }, 0), n(
|
|
109
|
+
t,
|
|
110
|
+
o.buttonCrevron,
|
|
111
|
+
{
|
|
112
|
+
width: 0,
|
|
113
|
+
opacity: 0,
|
|
114
|
+
duration: 0.7,
|
|
115
|
+
ease: "power1.out",
|
|
116
|
+
onComplete: () => {
|
|
117
|
+
o.buttonCrevron.style.display = "none";
|
|
118
|
+
}
|
|
119
|
+
},
|
|
120
|
+
0
|
|
121
|
+
), n(
|
|
122
|
+
t,
|
|
123
|
+
o.buttonContentChevron,
|
|
124
|
+
{
|
|
125
|
+
display: "none"
|
|
126
|
+
},
|
|
127
|
+
-1
|
|
128
|
+
).to(
|
|
129
|
+
o.separatorProfile,
|
|
130
|
+
{
|
|
131
|
+
display: "none"
|
|
132
|
+
},
|
|
133
|
+
-1
|
|
134
|
+
).to(
|
|
135
|
+
o.profileUserInfo,
|
|
136
|
+
{
|
|
137
|
+
display: "none"
|
|
138
|
+
},
|
|
139
|
+
-1
|
|
140
|
+
).to(
|
|
141
|
+
o.navLinkItems,
|
|
142
|
+
{
|
|
143
|
+
borderRadius: "8px",
|
|
144
|
+
duration: 0.7,
|
|
145
|
+
ease: "power1.out"
|
|
146
|
+
},
|
|
147
|
+
0.8
|
|
148
|
+
).to(
|
|
149
|
+
o.profileImageWrapper,
|
|
150
|
+
{
|
|
151
|
+
width: 52,
|
|
152
|
+
height: 52,
|
|
153
|
+
marginLeft: 0,
|
|
154
|
+
marginRight: 0
|
|
155
|
+
},
|
|
156
|
+
-1
|
|
157
|
+
).to(
|
|
158
|
+
o.buttonProfile,
|
|
159
|
+
{
|
|
160
|
+
height: 44,
|
|
161
|
+
width: 58,
|
|
162
|
+
margin: 0,
|
|
163
|
+
padding: 0,
|
|
164
|
+
borderRadius: "60px",
|
|
165
|
+
duration: 0.3,
|
|
166
|
+
ease: "power2.out",
|
|
167
|
+
display: "flex",
|
|
168
|
+
justifyContent: "center",
|
|
169
|
+
alignItems: "center"
|
|
170
|
+
},
|
|
171
|
+
-1
|
|
172
|
+
).to(
|
|
173
|
+
o.containerIconcollapsade,
|
|
174
|
+
{
|
|
175
|
+
justifyContent: "center",
|
|
176
|
+
marginRight: 0
|
|
177
|
+
},
|
|
178
|
+
"=-1"
|
|
179
|
+
).to(
|
|
180
|
+
o.badgeInLink,
|
|
181
|
+
{
|
|
182
|
+
position: "absolute",
|
|
183
|
+
right: 1,
|
|
184
|
+
top: -7
|
|
185
|
+
},
|
|
186
|
+
-1
|
|
187
|
+
);
|
|
188
|
+
}, d = (t, o) => {
|
|
189
|
+
t.to(o.navbar, { width: "20rem" }, -1).to(
|
|
190
|
+
o.navLinkItems,
|
|
191
|
+
{
|
|
192
|
+
borderRadius: "10px",
|
|
193
|
+
duration: 0.3,
|
|
194
|
+
width: "100%",
|
|
195
|
+
justifyContent: "flex-start"
|
|
196
|
+
},
|
|
197
|
+
-1
|
|
198
|
+
), n(
|
|
199
|
+
t,
|
|
200
|
+
o.buttonCrevron,
|
|
201
|
+
{
|
|
202
|
+
width: "auto",
|
|
203
|
+
opacity: 1,
|
|
204
|
+
duration: 0,
|
|
205
|
+
ease: "power1.out",
|
|
206
|
+
onComplete: () => {
|
|
207
|
+
o.buttonCrevron.style.display = "flex";
|
|
208
|
+
}
|
|
209
|
+
},
|
|
210
|
+
0
|
|
211
|
+
), n(
|
|
212
|
+
t,
|
|
213
|
+
o.buttonContentChevron,
|
|
214
|
+
{
|
|
215
|
+
display: "flex"
|
|
216
|
+
},
|
|
217
|
+
0
|
|
218
|
+
).to(
|
|
219
|
+
o.logo.contenedor,
|
|
220
|
+
{
|
|
221
|
+
width: 185,
|
|
222
|
+
height: 48,
|
|
223
|
+
minWidth: 185
|
|
224
|
+
},
|
|
225
|
+
-1
|
|
226
|
+
).set(
|
|
227
|
+
o.logo.text,
|
|
228
|
+
{
|
|
229
|
+
display: "flex"
|
|
230
|
+
},
|
|
231
|
+
-1
|
|
232
|
+
).to(o.logo.text, {
|
|
233
|
+
opacity: 1,
|
|
234
|
+
duration: 0,
|
|
235
|
+
ease: "back.in(1)"
|
|
236
|
+
}).to(o.logo.icon, {
|
|
237
|
+
keyframes: {
|
|
238
|
+
"0%": { scale: 1 },
|
|
239
|
+
"33%": { scale: 1.5 },
|
|
240
|
+
"66%": { scale: 0.5 },
|
|
241
|
+
"100%": { scale: 1 }
|
|
242
|
+
},
|
|
243
|
+
duration: 0.3,
|
|
244
|
+
ease: "power1.inOut"
|
|
245
|
+
}).to(
|
|
246
|
+
o.sidebarHeader,
|
|
247
|
+
{
|
|
248
|
+
justifyContent: "start",
|
|
249
|
+
display: "flex"
|
|
250
|
+
},
|
|
251
|
+
-1
|
|
252
|
+
).to(
|
|
253
|
+
o.profileImageWrapper,
|
|
254
|
+
{
|
|
255
|
+
marginRight: 0,
|
|
256
|
+
duration: 0.2,
|
|
257
|
+
ease: "bounce.out"
|
|
258
|
+
},
|
|
259
|
+
-1
|
|
260
|
+
).to(
|
|
261
|
+
o.containerIconcollapsade,
|
|
262
|
+
{
|
|
263
|
+
justifyContent: "end",
|
|
264
|
+
marginRight: 20
|
|
265
|
+
},
|
|
266
|
+
-1
|
|
267
|
+
).to(
|
|
268
|
+
o.separatorProfile,
|
|
269
|
+
{
|
|
270
|
+
display: "flex"
|
|
271
|
+
},
|
|
272
|
+
0
|
|
273
|
+
).to(
|
|
274
|
+
o.badgeInLink,
|
|
275
|
+
{
|
|
276
|
+
position: "static",
|
|
277
|
+
right: "auto",
|
|
278
|
+
top: "auto",
|
|
279
|
+
display: "flex",
|
|
280
|
+
justifyContent: "end",
|
|
281
|
+
alignItems: "center"
|
|
282
|
+
},
|
|
283
|
+
-1
|
|
284
|
+
).to(
|
|
285
|
+
o.buttonProfile,
|
|
286
|
+
{
|
|
287
|
+
borderTopLeftRadius: "0.375rem",
|
|
288
|
+
borderBottomLeftRadius: "0.375rem",
|
|
289
|
+
borderTopRightRadius: "0",
|
|
290
|
+
borderBottomRightRadius: "0",
|
|
291
|
+
duration: 0
|
|
292
|
+
},
|
|
293
|
+
-1
|
|
294
|
+
).to(
|
|
295
|
+
o.separatorProfile,
|
|
296
|
+
{
|
|
297
|
+
display: "flex"
|
|
298
|
+
},
|
|
299
|
+
0
|
|
300
|
+
).to(
|
|
301
|
+
o.navLabels,
|
|
302
|
+
{
|
|
303
|
+
opacity: 1,
|
|
304
|
+
width: "auto",
|
|
305
|
+
scaleX: 1
|
|
306
|
+
},
|
|
307
|
+
0
|
|
308
|
+
).to(
|
|
309
|
+
o.profileUserInfo,
|
|
310
|
+
{
|
|
311
|
+
display: "flex",
|
|
312
|
+
ease: "fade.in"
|
|
313
|
+
},
|
|
314
|
+
0
|
|
315
|
+
).to(o.navIcons, { scale: 1 }, 0.3);
|
|
316
|
+
}, l = (t, o) => {
|
|
317
|
+
e.to(t, {
|
|
318
|
+
x: "-100%",
|
|
319
|
+
opacity: 0,
|
|
320
|
+
duration: 0.3,
|
|
321
|
+
ease: "power2.in"
|
|
322
|
+
});
|
|
323
|
+
};
|
|
324
|
+
export {
|
|
325
|
+
y as useNavbarAnimations
|
|
326
|
+
};
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { memo as
|
|
1
|
+
import { jsx as $ } from "react/jsx-runtime";
|
|
2
|
+
import { cn as B } from "../../lib/cn.js";
|
|
3
|
+
import { memo as E, useRef as N, useCallback as D, useLayoutEffect as M } from "react";
|
|
4
|
+
/* empty css */
|
|
4
5
|
const y = (n) => {
|
|
5
|
-
const e =
|
|
6
|
+
const e = N(null), { debugMode: h = !1, className: f = "", children: k, shape: C = "rounded", animation: g = "shimmer", onlyContainer: i = !1 } = n;
|
|
6
7
|
let m = "255, 255, 255", d = "255, 255, 255, 0.1";
|
|
7
8
|
const b = D(() => {
|
|
8
9
|
if (i || !e.current) return;
|
|
@@ -19,7 +20,7 @@ const y = (n) => {
|
|
|
19
20
|
break;
|
|
20
21
|
}
|
|
21
22
|
}, [g, d, m, i]);
|
|
22
|
-
M(() => {
|
|
23
|
+
return M(() => {
|
|
23
24
|
if (e.current) {
|
|
24
25
|
const o = (l) => {
|
|
25
26
|
let t = l;
|
|
@@ -41,17 +42,11 @@ const y = (n) => {
|
|
|
41
42
|
return [a[0], a[1], a[2]];
|
|
42
43
|
};
|
|
43
44
|
if (!e.current.parentElement) return;
|
|
44
|
-
const p = o(e.current.parentElement), s = c(p),
|
|
45
|
+
const p = o(e.current.parentElement), s = c(p), S = s.reduce((l, t) => l + t, 0) < 382;
|
|
45
46
|
let u;
|
|
46
|
-
|
|
47
|
+
S ? u = `rgb(${s[0] + 10}, ${s[1] + 10}, ${s[2] + 10})` : (u = `rgb(${s[0] - 30}, ${s[1] - 30}, ${s[2] - 30})`, m = "115,115,115", d = "255,255,255, 0.4"), i && (u = "transparent", e.current.style.animation = "none"), e.current.style.backgroundColor = u, b();
|
|
47
48
|
}
|
|
48
|
-
}, [d, m, i, b])
|
|
49
|
-
const S = {
|
|
50
|
-
circle: "rounded-full aspect-square",
|
|
51
|
-
square: "rounded-none",
|
|
52
|
-
rounded: "rounded"
|
|
53
|
-
};
|
|
54
|
-
return /* @__PURE__ */ E.jsx(
|
|
49
|
+
}, [d, m, i, b]), /* @__PURE__ */ $(
|
|
55
50
|
"div",
|
|
56
51
|
{
|
|
57
52
|
ref: e,
|
|
@@ -59,7 +54,11 @@ const y = (n) => {
|
|
|
59
54
|
h && " border-red-600/20 border",
|
|
60
55
|
f,
|
|
61
56
|
"skeleton-container",
|
|
62
|
-
|
|
57
|
+
{
|
|
58
|
+
circle: "rounded-full aspect-square",
|
|
59
|
+
square: "rounded-none",
|
|
60
|
+
rounded: "rounded"
|
|
61
|
+
}[C]
|
|
63
62
|
),
|
|
64
63
|
children: k
|
|
65
64
|
},
|
|
@@ -67,7 +66,7 @@ const y = (n) => {
|
|
|
67
66
|
);
|
|
68
67
|
};
|
|
69
68
|
y.displayName = "Skeleton";
|
|
70
|
-
const
|
|
69
|
+
const G = E(y, (n, e) => n.debugMode === e.debugMode && n.className === e.className && n.children === e.children && n.shape === e.shape && n.animation === e.animation && n.onlyContainer === e.onlyContainer);
|
|
71
70
|
export {
|
|
72
|
-
|
|
71
|
+
G as default
|
|
73
72
|
};
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { ClipLoader as d, SyncLoader as l, HashLoader as m, GridLoader as p, DotLoader as f, BounceLoader as L } from "react-spinners";
|
|
3
|
+
import { cn as S } from "../../lib/cn.js";
|
|
4
|
+
const w = ({
|
|
5
|
+
variant: t = "sync",
|
|
6
|
+
color: s = "#3B82F6",
|
|
7
|
+
loading: o = !0,
|
|
8
|
+
size: n = "medium",
|
|
9
|
+
className: c = "",
|
|
10
|
+
speedMultiplier: i = 1
|
|
11
|
+
}) => {
|
|
12
|
+
const a = (() => {
|
|
13
|
+
if (typeof n == "number") return n;
|
|
14
|
+
switch (n) {
|
|
15
|
+
case "small":
|
|
16
|
+
return 20;
|
|
17
|
+
case "medium":
|
|
18
|
+
return 35;
|
|
19
|
+
case "large":
|
|
20
|
+
return 50;
|
|
21
|
+
default:
|
|
22
|
+
return 35;
|
|
23
|
+
}
|
|
24
|
+
})(), r = {
|
|
25
|
+
color: s,
|
|
26
|
+
loading: o,
|
|
27
|
+
size: a,
|
|
28
|
+
speedMultiplier: i,
|
|
29
|
+
"aria-label": "Loading Spinner",
|
|
30
|
+
"data-testid": "spinner"
|
|
31
|
+
}, u = S("inline-block", c);
|
|
32
|
+
return /* @__PURE__ */ e("div", { className: u, children: (() => {
|
|
33
|
+
switch (t) {
|
|
34
|
+
case "bounce":
|
|
35
|
+
return /* @__PURE__ */ e(L, { ...r });
|
|
36
|
+
case "dot":
|
|
37
|
+
return /* @__PURE__ */ e(f, { ...r });
|
|
38
|
+
case "grid":
|
|
39
|
+
return /* @__PURE__ */ e(p, { ...r, size: a * 0.4 });
|
|
40
|
+
case "hash":
|
|
41
|
+
return /* @__PURE__ */ e(m, { ...r });
|
|
42
|
+
case "sync":
|
|
43
|
+
return /* @__PURE__ */ e(l, { ...r, size: a * 0.4 });
|
|
44
|
+
case "clip":
|
|
45
|
+
default:
|
|
46
|
+
return /* @__PURE__ */ e(d, { ...r });
|
|
47
|
+
}
|
|
48
|
+
})() });
|
|
49
|
+
};
|
|
50
|
+
export {
|
|
51
|
+
w as default
|
|
52
|
+
};
|