prometeo-design-system 2.8.8 → 2.9.1
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/src/styles/base.css +464 -473
- 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
package/dist/Icons.es.js
ADDED
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { memo as
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
import
|
|
6
|
-
const
|
|
1
|
+
import { j as n } from "./jsx-runtime-DKDX3adD.js";
|
|
2
|
+
import { memo as x, useState as E, useRef as R, useCallback as N, useEffect as b } from "react";
|
|
3
|
+
import M from "./Spinner.es.js";
|
|
4
|
+
import { c as d } from "./cn-B6yFEsav.js";
|
|
5
|
+
import S from "./Skeleton.es.js";
|
|
6
|
+
const T = (s, e) => {
|
|
7
7
|
if (s.src !== e.src || s.alt !== e.alt || s.width !== e.width || s.height !== e.height || s.className !== e.className || s.lazy !== e.lazy || s.showLoader !== e.showLoader || s.allowPreview !== e.allowPreview) return !1;
|
|
8
8
|
const r = s.loaderProps, a = e.loaderProps;
|
|
9
9
|
return !(r !== a && (!r || !a || r.loaderType !== a.loaderType || r.variant !== a.variant || r.speedMultiplier !== a.speedMultiplier || r.className !== a.className || r.size !== a.size || r.backdropClassName !== a.backdropClassName));
|
|
10
|
-
},
|
|
10
|
+
}, D = x(
|
|
11
11
|
(s) => {
|
|
12
|
-
const { src: e, alt: r, width: a, height:
|
|
12
|
+
const { src: e, alt: r, width: a, height: c, className: f, lazy: y = !0, showLoader: k = !0, loaderProps: I, allowPreview: t = !1, galleryRef: l } = s, { variant: v = "clip", speedMultiplier: j = 0.7, className: z, size: C = 48, backdropClassName: L, loaderType: u = "clasic" } = I || {}, [m, g] = E(!0), h = R(!1), p = N((i) => {
|
|
13
13
|
const o = new Image();
|
|
14
|
-
o.src =
|
|
14
|
+
o.src = i, o.onload = () => {
|
|
15
15
|
g(!1);
|
|
16
16
|
}, o.onerror = () => {
|
|
17
17
|
g(!1);
|
|
@@ -20,58 +20,58 @@ const q = (s, e) => {
|
|
|
20
20
|
b(() => {
|
|
21
21
|
p(e);
|
|
22
22
|
}, [e, p]), b(() => {
|
|
23
|
-
l?.current && !h.current && (l.current.addImage({ src: e, alt: r, width: a, height:
|
|
24
|
-
}, [l, e, r, a,
|
|
23
|
+
l?.current && !h.current && (l.current.addImage({ src: e, alt: r, width: a, height: c, className: f }), h.current = !0);
|
|
24
|
+
}, [l, e, r, a, c, f]);
|
|
25
25
|
const w = N(() => {
|
|
26
|
-
if (
|
|
27
|
-
const o = l.current.images.findIndex((
|
|
26
|
+
if (t && l?.current) {
|
|
27
|
+
const o = l.current.images.findIndex((P) => P.src === e);
|
|
28
28
|
l.current.openLightbox(o >= 0 ? o : 0);
|
|
29
29
|
}
|
|
30
|
-
}, [
|
|
30
|
+
}, [t, l, e]);
|
|
31
31
|
return (
|
|
32
32
|
// biome-ignore lint/a11y/noStaticElementInteractions: false positive
|
|
33
|
-
/* @__PURE__ */
|
|
33
|
+
/* @__PURE__ */ n.jsxs(
|
|
34
34
|
"div",
|
|
35
35
|
{
|
|
36
36
|
className: d(
|
|
37
37
|
"relative rounded-2xl overflow-hidden select-none",
|
|
38
|
-
|
|
39
|
-
|
|
38
|
+
t && l && "cursor-pointer hover:brightness-75 transition-all ease-in-out duration-300",
|
|
39
|
+
f
|
|
40
40
|
),
|
|
41
41
|
style: {
|
|
42
42
|
width: a,
|
|
43
|
-
height:
|
|
43
|
+
height: c,
|
|
44
44
|
minWidth: a,
|
|
45
|
-
minHeight:
|
|
45
|
+
minHeight: c
|
|
46
46
|
},
|
|
47
47
|
onClick: w,
|
|
48
|
-
role:
|
|
49
|
-
tabIndex:
|
|
50
|
-
onKeyDown:
|
|
51
|
-
(
|
|
48
|
+
role: t ? "button" : void 0,
|
|
49
|
+
tabIndex: t ? 0 : void 0,
|
|
50
|
+
onKeyDown: t ? (i) => {
|
|
51
|
+
(i.key === "Enter" || i.key === " ") && (i.preventDefault(), w());
|
|
52
52
|
} : void 0,
|
|
53
53
|
children: [
|
|
54
|
-
/* @__PURE__ */
|
|
54
|
+
/* @__PURE__ */ n.jsx(
|
|
55
55
|
"img",
|
|
56
56
|
{
|
|
57
57
|
draggable: !1,
|
|
58
58
|
src: e,
|
|
59
59
|
alt: r,
|
|
60
|
-
className: d("object-cover",
|
|
60
|
+
className: d("object-cover", f, "w-full h-full"),
|
|
61
61
|
loading: y ? "lazy" : "eager"
|
|
62
62
|
}
|
|
63
63
|
),
|
|
64
|
-
m && k && /* @__PURE__ */
|
|
64
|
+
m && k && /* @__PURE__ */ n.jsx(
|
|
65
65
|
"div",
|
|
66
66
|
{
|
|
67
67
|
className: d(
|
|
68
68
|
"absolute grid place-items-center",
|
|
69
69
|
"inset-0",
|
|
70
70
|
u === "skeleton" ? "bg-inherit" : "bg-black/30",
|
|
71
|
-
|
|
71
|
+
L
|
|
72
72
|
),
|
|
73
|
-
children: u === "clasic" ? /* @__PURE__ */
|
|
74
|
-
|
|
73
|
+
children: u === "clasic" ? /* @__PURE__ */ n.jsx(M, { variant: v, speedMultiplier: j, loading: m, className: z, size: C }) : /* @__PURE__ */ n.jsx(
|
|
74
|
+
S,
|
|
75
75
|
{
|
|
76
76
|
className: "w-full h-full z-100"
|
|
77
77
|
}
|
|
@@ -83,9 +83,9 @@ const q = (s, e) => {
|
|
|
83
83
|
)
|
|
84
84
|
);
|
|
85
85
|
},
|
|
86
|
-
|
|
86
|
+
T
|
|
87
87
|
);
|
|
88
|
-
|
|
88
|
+
D.displayName = "Image";
|
|
89
89
|
export {
|
|
90
|
-
|
|
90
|
+
D as default
|
|
91
91
|
};
|
|
@@ -0,0 +1,317 @@
|
|
|
1
|
+
import { j as t } from "./jsx-runtime-DKDX3adD.js";
|
|
2
|
+
import Q, { memo as M, forwardRef as A, useRef as v, useEffect as ee, useCallback as i, useState as R, useImperativeHandle as te } from "react";
|
|
3
|
+
import { c as X } from "./cn-B6yFEsav.js";
|
|
4
|
+
import { u as ne } from "./useDragScroll-CHN9OMwn.js";
|
|
5
|
+
import S from "./Button.es.js";
|
|
6
|
+
import { a as re, b as ae, c as se } from "./Icons-DtFC5DJ7.js";
|
|
7
|
+
const L = M(A(({ images: n, className: c }, r) => {
|
|
8
|
+
const { ref: d, bind: s } = ne({
|
|
9
|
+
axis: "x",
|
|
10
|
+
friction: 0.9,
|
|
11
|
+
minVelocity: 0.5,
|
|
12
|
+
startMomentumThreshold: 1,
|
|
13
|
+
momentum: !0,
|
|
14
|
+
clickThreshold: 5,
|
|
15
|
+
cursor: { idle: "default", dragging: "grabbing" },
|
|
16
|
+
preventTextSelection: !0
|
|
17
|
+
});
|
|
18
|
+
return /* @__PURE__ */ t.jsx(
|
|
19
|
+
"section",
|
|
20
|
+
{
|
|
21
|
+
ref: d,
|
|
22
|
+
className: X("flex gap-4 w-full overflow-x-auto py-2 relative", c),
|
|
23
|
+
onPointerDown: s.onPointerDown,
|
|
24
|
+
onPointerMove: s.onPointerMove,
|
|
25
|
+
onPointerUp: s.onPointerUp,
|
|
26
|
+
onPointerLeave: s.onPointerLeave,
|
|
27
|
+
onPointerCancel: s.onPointerCancel,
|
|
28
|
+
onClickCapture: s.onClickCapture,
|
|
29
|
+
"aria-label": "Image gallery",
|
|
30
|
+
children: n && n.length > 0 && n.map((l, o) => Q.cloneElement(l, {
|
|
31
|
+
key: l.props.src || o,
|
|
32
|
+
...l.props,
|
|
33
|
+
galleryRef: r,
|
|
34
|
+
allowPreview: !0
|
|
35
|
+
}))
|
|
36
|
+
}
|
|
37
|
+
);
|
|
38
|
+
}));
|
|
39
|
+
L.displayName = "GalleryPreview";
|
|
40
|
+
const O = M(({ images: n, lightboxClassName: c, closeLightbox: r, showThumbnails: d, thumbnailsClassName: s, currentIndex: l, goToNext: o, goToPrevious: a, goToIndex: N }) => {
|
|
41
|
+
const h = v(null), y = v(null), w = v(null), m = v({
|
|
42
|
+
scale: 1,
|
|
43
|
+
translateX: 0,
|
|
44
|
+
translateY: 0
|
|
45
|
+
}), u = v({
|
|
46
|
+
startX: 0,
|
|
47
|
+
startY: 0,
|
|
48
|
+
isDragging: !1,
|
|
49
|
+
distanceX: 0,
|
|
50
|
+
distanceY: 0
|
|
51
|
+
});
|
|
52
|
+
ee(() => {
|
|
53
|
+
w.current && w.current.focus();
|
|
54
|
+
}, []);
|
|
55
|
+
const k = i((e) => {
|
|
56
|
+
e.preventDefault(), e.stopPropagation(), e.key === "Escape" ? r() : e.key === "ArrowLeft" ? a() : e.key === "ArrowRight" && o();
|
|
57
|
+
}, [r, a, o]), P = i((e) => {
|
|
58
|
+
u.current = { startX: e.touches[0].clientX, startY: e.touches[0].clientY, isDragging: !0, distanceX: 0, distanceY: 0 };
|
|
59
|
+
}, []), j = i((e) => {
|
|
60
|
+
const g = e.touches[0];
|
|
61
|
+
u.current = { ...u.current, isDragging: !0, distanceX: g.clientX - u.current.startX, distanceY: g.clientY - u.current.startY };
|
|
62
|
+
}, []), z = i(() => {
|
|
63
|
+
u.current = { ...u.current, startX: 0, startY: 0, isDragging: !1 }, Math.abs(u.current.distanceX) > Math.abs(u.current.distanceY) && (u.current.distanceX < 0 ? o() : a());
|
|
64
|
+
}, [o, a]), C = i(() => {
|
|
65
|
+
const e = h.current;
|
|
66
|
+
if (!e) return;
|
|
67
|
+
const { scale: g, translateX: p, translateY: I } = m.current;
|
|
68
|
+
e.style.transform = `scale(${g}) translate(${p}px, ${I}px)`, e.style.transformOrigin = "center center", e.style.transition = "transform 0.1s ease-out";
|
|
69
|
+
}, []), b = i(() => {
|
|
70
|
+
m.current = { scale: 1, translateX: 0, translateY: 0 }, h.current && (h.current.style.transform = "scale(1) translate(0px, 0px)", h.current.style.transformOrigin = "center center");
|
|
71
|
+
}, []), f = i((e) => {
|
|
72
|
+
const g = h.current, p = y.current;
|
|
73
|
+
if (!g || !p) return;
|
|
74
|
+
if (e.shiftKey) {
|
|
75
|
+
e.deltaY < 0 ? o() : e.deltaY > 0 && a();
|
|
76
|
+
return;
|
|
77
|
+
}
|
|
78
|
+
const I = 2e-3, D = 1, B = 8, F = -e.deltaY * I, E = m.current.scale;
|
|
79
|
+
let x = E + F;
|
|
80
|
+
if (x = Math.max(D, Math.min(B, x)), x === D) {
|
|
81
|
+
b();
|
|
82
|
+
return;
|
|
83
|
+
}
|
|
84
|
+
const Y = p.getBoundingClientRect(), G = e.clientX - Y.left, W = e.clientY - Y.top, H = Y.width / 2, K = Y.height / 2, $ = G - H, q = W - K, T = x / E, U = m.current.translateX, V = m.current.translateY, Z = U - $ * (T - 1) / x, J = V - q * (T - 1) / x;
|
|
85
|
+
m.current = {
|
|
86
|
+
scale: x,
|
|
87
|
+
translateX: Z,
|
|
88
|
+
translateY: J
|
|
89
|
+
}, C();
|
|
90
|
+
}, [o, a, C, b]);
|
|
91
|
+
return n.length === 0 ? null : /* @__PURE__ */ t.jsxs(
|
|
92
|
+
"div",
|
|
93
|
+
{
|
|
94
|
+
ref: w,
|
|
95
|
+
className: X("fixed inset-0 z-50 bg-black/90 flex items-center justify-center lg:px-16", c),
|
|
96
|
+
onClick: r,
|
|
97
|
+
onKeyDown: k,
|
|
98
|
+
onTouchStart: P,
|
|
99
|
+
onTouchMove: j,
|
|
100
|
+
onTouchEnd: z,
|
|
101
|
+
tabIndex: 0,
|
|
102
|
+
role: "dialog",
|
|
103
|
+
"aria-modal": "true",
|
|
104
|
+
children: [
|
|
105
|
+
/* @__PURE__ */ t.jsx("div", { className: "absolute top-4 right-4 z-110", children: /* @__PURE__ */ t.jsx(
|
|
106
|
+
S,
|
|
107
|
+
{
|
|
108
|
+
variant: "text",
|
|
109
|
+
color: "secondary",
|
|
110
|
+
size: "small",
|
|
111
|
+
onClick: r,
|
|
112
|
+
className: "text-white! hover:text-gray-300! w-auto! h-auto! p-2!",
|
|
113
|
+
"aria-label": "Close gallery",
|
|
114
|
+
children: /* @__PURE__ */ t.jsx(re, { size: 24 })
|
|
115
|
+
}
|
|
116
|
+
) }),
|
|
117
|
+
n.length > 1 && /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
118
|
+
/* @__PURE__ */ t.jsx(
|
|
119
|
+
"div",
|
|
120
|
+
{
|
|
121
|
+
className: "absolute left-0 lg:h-full items-center flex justify-center w-16 z-100 cursor-w-resize",
|
|
122
|
+
onClick: (e) => {
|
|
123
|
+
e.stopPropagation(), a();
|
|
124
|
+
},
|
|
125
|
+
children: /* @__PURE__ */ t.jsx(
|
|
126
|
+
S,
|
|
127
|
+
{
|
|
128
|
+
variant: "text",
|
|
129
|
+
color: "secondary",
|
|
130
|
+
size: "small",
|
|
131
|
+
onClick: (e) => {
|
|
132
|
+
e.stopPropagation(), a();
|
|
133
|
+
},
|
|
134
|
+
className: "text-white! hover:text-gray-300! w-auto! h-auto! p-2!",
|
|
135
|
+
"aria-label": "Previous image",
|
|
136
|
+
children: /* @__PURE__ */ t.jsx(ae, { size: 24 })
|
|
137
|
+
}
|
|
138
|
+
)
|
|
139
|
+
}
|
|
140
|
+
),
|
|
141
|
+
/* @__PURE__ */ t.jsx(
|
|
142
|
+
"div",
|
|
143
|
+
{
|
|
144
|
+
className: "absolute right-0 lg:h-full items-center flex justify-center w-16 z-100 cursor-e-resize",
|
|
145
|
+
onClick: (e) => {
|
|
146
|
+
e.stopPropagation(), o();
|
|
147
|
+
},
|
|
148
|
+
children: /* @__PURE__ */ t.jsx(
|
|
149
|
+
S,
|
|
150
|
+
{
|
|
151
|
+
variant: "text",
|
|
152
|
+
color: "secondary",
|
|
153
|
+
size: "small",
|
|
154
|
+
onClick: (e) => {
|
|
155
|
+
e.stopPropagation(), o();
|
|
156
|
+
},
|
|
157
|
+
className: "text-white! hover:text-gray-300! w-auto! h-auto! p-2!",
|
|
158
|
+
"aria-label": "Next image",
|
|
159
|
+
children: /* @__PURE__ */ t.jsx(se, { size: 24 })
|
|
160
|
+
}
|
|
161
|
+
)
|
|
162
|
+
}
|
|
163
|
+
)
|
|
164
|
+
] }),
|
|
165
|
+
/* @__PURE__ */ t.jsx(
|
|
166
|
+
"div",
|
|
167
|
+
{
|
|
168
|
+
ref: y,
|
|
169
|
+
onClick: (e) => e.stopPropagation(),
|
|
170
|
+
className: "relative max-w-[90vw] max-h-[98vh] mx-auto flex flex-col w-max lg:h-full h-max",
|
|
171
|
+
onWheel: f,
|
|
172
|
+
children: /* @__PURE__ */ t.jsx(
|
|
173
|
+
"div",
|
|
174
|
+
{
|
|
175
|
+
className: "max-h-[98vh] relative overflow-hidden w-full h-full",
|
|
176
|
+
style: {
|
|
177
|
+
animation: "galleryFadeIn 0.6s ease-in-out"
|
|
178
|
+
},
|
|
179
|
+
ref: h,
|
|
180
|
+
children: /* @__PURE__ */ t.jsx(
|
|
181
|
+
"img",
|
|
182
|
+
{
|
|
183
|
+
src: n[l].src,
|
|
184
|
+
alt: n[l].alt,
|
|
185
|
+
className: X(
|
|
186
|
+
" w-full h-full object-contain select-none",
|
|
187
|
+
"prometeo-lightbox-image"
|
|
188
|
+
),
|
|
189
|
+
onLoad: () => b()
|
|
190
|
+
}
|
|
191
|
+
)
|
|
192
|
+
},
|
|
193
|
+
l
|
|
194
|
+
)
|
|
195
|
+
}
|
|
196
|
+
),
|
|
197
|
+
d && /* @__PURE__ */ t.jsx("div", { className: " w-full absolute items-center flex justify-center left-0 right-0 z-100 bottom-0", children: /* @__PURE__ */ t.jsx(_, { images: n, currentIndex: l, goToIndex: N, thumbnailsClassName: s }) }),
|
|
198
|
+
n.length > 1 && /* @__PURE__ */ t.jsxs("div", { className: "absolute bottom-20 left-1/2 transform -translate-x-1/2 text-neutral-default-default prometeo-fonts-label-xlarge px-4 py-2 rounded-full", children: [
|
|
199
|
+
l + 1,
|
|
200
|
+
" / ",
|
|
201
|
+
n.length
|
|
202
|
+
] })
|
|
203
|
+
]
|
|
204
|
+
}
|
|
205
|
+
);
|
|
206
|
+
});
|
|
207
|
+
O.displayName = "LightBox";
|
|
208
|
+
const le = (n, c) => {
|
|
209
|
+
if (n.currentIndex !== c.currentIndex || n.thumbnailsClassName !== c.thumbnailsClassName || n.images.length !== c.images.length) return !1;
|
|
210
|
+
for (let r = 0; r < n.images.length; r++)
|
|
211
|
+
if (n.images[r].src !== c.images[r].src) return !1;
|
|
212
|
+
return !0;
|
|
213
|
+
}, _ = M(({ images: n, currentIndex: c, goToIndex: r, thumbnailsClassName: d }) => /* @__PURE__ */ t.jsxs(
|
|
214
|
+
"div",
|
|
215
|
+
{
|
|
216
|
+
className: "flex gap-4 w-max overflow-x-auto overflow-y-visible max-w-full px-16 py-4",
|
|
217
|
+
style: {
|
|
218
|
+
scrollbarWidth: "none",
|
|
219
|
+
msOverflowStyle: "none",
|
|
220
|
+
WebkitOverflowScrolling: "touch"
|
|
221
|
+
},
|
|
222
|
+
children: [
|
|
223
|
+
/* @__PURE__ */ t.jsx("style", { children: `
|
|
224
|
+
.flex.gap-4.w-max::-webkit-scrollbar {
|
|
225
|
+
display: none;
|
|
226
|
+
}
|
|
227
|
+
` }),
|
|
228
|
+
n.map((s, l) => /* @__PURE__ */ t.jsx(
|
|
229
|
+
"button",
|
|
230
|
+
{
|
|
231
|
+
type: "button",
|
|
232
|
+
onClick: (o) => {
|
|
233
|
+
o.stopPropagation(), r(l);
|
|
234
|
+
},
|
|
235
|
+
className: X(
|
|
236
|
+
"w-16 h-16 aspect-square min-w-16 rounded overflow-hidden transition-all duration-300 hover:scale-125 cursor-pointer",
|
|
237
|
+
d,
|
|
238
|
+
l === c ? "scale-110" : ""
|
|
239
|
+
),
|
|
240
|
+
children: /* @__PURE__ */ t.jsx(
|
|
241
|
+
"img",
|
|
242
|
+
{
|
|
243
|
+
src: s.src,
|
|
244
|
+
alt: s.alt,
|
|
245
|
+
className: "w-full h-full object-cover select-none"
|
|
246
|
+
}
|
|
247
|
+
)
|
|
248
|
+
},
|
|
249
|
+
s.src
|
|
250
|
+
))
|
|
251
|
+
]
|
|
252
|
+
}
|
|
253
|
+
), le);
|
|
254
|
+
_.displayName = "Thumbnails";
|
|
255
|
+
const oe = A(
|
|
256
|
+
(n, c) => {
|
|
257
|
+
const {
|
|
258
|
+
children: r,
|
|
259
|
+
className: d,
|
|
260
|
+
lightboxClassName: s,
|
|
261
|
+
showThumbnails: l,
|
|
262
|
+
thumbnailsClassName: o
|
|
263
|
+
} = n, [a, N] = R([]), [h, y] = R(!1), [w, m] = R(0), u = r ? Array.isArray(r) ? r : [r] : [], k = i((f) => {
|
|
264
|
+
N((e) => e.some((p) => p.src === f.src) ? e : [...e, f]);
|
|
265
|
+
}, []), P = i((f = 0) => {
|
|
266
|
+
m(f), y(!0);
|
|
267
|
+
}, []), j = i(() => {
|
|
268
|
+
y(!1);
|
|
269
|
+
}, []);
|
|
270
|
+
te(
|
|
271
|
+
c,
|
|
272
|
+
() => ({
|
|
273
|
+
openLightbox: P,
|
|
274
|
+
closeLightbox: j,
|
|
275
|
+
isOpen: h,
|
|
276
|
+
addImage: k,
|
|
277
|
+
images: a
|
|
278
|
+
}),
|
|
279
|
+
[a]
|
|
280
|
+
);
|
|
281
|
+
const z = i(() => {
|
|
282
|
+
m((f) => (f + 1) % a.length);
|
|
283
|
+
}, [a.length]), C = i(() => {
|
|
284
|
+
m((f) => (f - 1 + a.length) % a.length);
|
|
285
|
+
}, [a.length]), b = i((f) => {
|
|
286
|
+
m(f);
|
|
287
|
+
}, []);
|
|
288
|
+
return /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
289
|
+
/* @__PURE__ */ t.jsx(
|
|
290
|
+
L,
|
|
291
|
+
{
|
|
292
|
+
images: u,
|
|
293
|
+
className: d,
|
|
294
|
+
ref: c
|
|
295
|
+
}
|
|
296
|
+
),
|
|
297
|
+
h && /* @__PURE__ */ t.jsx(
|
|
298
|
+
O,
|
|
299
|
+
{
|
|
300
|
+
images: a,
|
|
301
|
+
closeLightbox: j,
|
|
302
|
+
showThumbnails: l,
|
|
303
|
+
lightboxClassName: s,
|
|
304
|
+
thumbnailsClassName: o,
|
|
305
|
+
currentIndex: w,
|
|
306
|
+
goToNext: z,
|
|
307
|
+
goToPrevious: C,
|
|
308
|
+
goToIndex: b
|
|
309
|
+
}
|
|
310
|
+
)
|
|
311
|
+
] });
|
|
312
|
+
}
|
|
313
|
+
);
|
|
314
|
+
oe.displayName = "ImageGallery";
|
|
315
|
+
export {
|
|
316
|
+
oe as I
|
|
317
|
+
};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { I as p } from "./ImageGallery-Ckxg9OIC.js";
|
|
1
2
|
import { useRef as u, useCallback as r } from "react";
|
|
2
3
|
const g = () => {
|
|
3
4
|
const e = u(null), t = r((a) => {
|
|
@@ -17,5 +18,6 @@ const g = () => {
|
|
|
17
18
|
};
|
|
18
19
|
};
|
|
19
20
|
export {
|
|
21
|
+
p as default,
|
|
20
22
|
g as useImageGallery
|
|
21
23
|
};
|