prometeo-design-system 2.8.8 → 2.8.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{components/Avatar/Avatar.js → Avatar.es.js} +24 -24
- package/dist/{components/Button/Button.js → Button.es.js} +55 -55
- package/dist/{components/CardProfile/CardProfile.js → CardProfile-CsytJlKZ.js} +94 -68
- package/dist/CardProfile.es.js +5 -0
- package/dist/{components/CheckBox/CheckBox.js → CheckBox.es.js} +25 -25
- package/dist/DatePicker.es.js +3441 -0
- package/dist/DialogModal.es.js +75 -0
- package/dist/DrawerDesktop.es.js +192 -0
- package/dist/DrawerMobile.es.js +242 -0
- package/dist/DropZone.es.js +87 -0
- package/dist/{components/FAB/FAButton.js → FAButton.es.js} +5 -5
- package/dist/Header.es.js +32 -0
- package/dist/HelperComponent-g_xuKWzK.js +24 -0
- package/dist/Icons-DtFC5DJ7.js +1079 -0
- package/dist/Icons.es.js +5 -0
- package/dist/{components/Image/Image.js → Image.es.js} +32 -32
- package/dist/ImageGallery-Ckxg9OIC.js +317 -0
- package/dist/{components/Image/useImageGallery.js → ImageGallery.es.js} +2 -0
- package/dist/Input-Cck37DpG.js +240 -0
- package/dist/Input.es.js +4 -0
- package/dist/InputMultiple.es.js +263 -0
- package/dist/LayoutGeneric-CbaoatQB.js +26 -0
- package/dist/LayoutGeneric.es.js +4 -0
- package/dist/Logo.es.js +9 -0
- package/dist/{components/Menu/MenuComposable.js → Menu.es.js} +13 -12
- package/dist/OtpInput.es.js +301 -0
- package/dist/{components/Pagination/Pagination.js → Pagination.es.js} +32 -32
- package/dist/{components/ProfilePictureUpload/ProfilePictureUpload.js → ProfilePictureUpload.es.js} +57 -56
- package/dist/ProgressBar.es.js +70 -0
- package/dist/{components/RadioButton/RadioButton.js → RadioButton.es.js} +36 -35
- package/dist/{components/SegmentedButton/SegmentedButton.js → SegmentedButton.es.js} +38 -37
- package/dist/Select-BD5FTxVw.js +1100 -0
- package/dist/Select.es.js +4 -0
- package/dist/SelectSearch.es.js +237 -0
- package/dist/{components/Skeleton/Skeleton.js → Skeleton.es.js} +18 -16
- package/dist/Spinner.es.js +52 -0
- package/dist/{components/Steps/Steps.js → Steps.es.js} +62 -61
- package/dist/{components/SwipeContainer/SwipeContainer.js → SwipeContainer.es.js} +68 -68
- package/dist/{components/Switch/Switch.js → Switch.es.js} +18 -17
- package/dist/{components/TabLinks/TabLinks.js → TabLinks.es.js} +11 -11
- package/dist/{components/Table/Table.js → Table.es.js} +41 -38
- package/dist/{components/TextArea/TextArea.js → TextArea.es.js} +26 -24
- package/dist/{components/Toaster/Toaster.js → Toast.es.js} +48 -48
- package/dist/ToastProvider.es.js +6 -0
- package/dist/Tooltip.es.js +62 -0
- package/dist/{lib/cn.js → cn-B6yFEsav.js} +2 -2
- package/dist/{node_modules/class-variance-authority/dist/index.js → index-BOQuZ0gG.js} +9 -10
- package/dist/index.d.ts +12 -16
- package/dist/jsx-runtime-DKDX3adD.js +281 -0
- package/dist/prometeo-design-system.css +1 -1
- package/dist/prometeo-design-system.es.js +1002 -0
- package/dist/{hooks/useDragScroll.js → useDragScroll-CHN9OMwn.js} +1 -1
- package/package.json +120 -116
- package/dist/Avatar.js +0 -4
- package/dist/Button.js +0 -4
- package/dist/CardProfile.js +0 -5
- package/dist/CheckBox.js +0 -4
- package/dist/DatePicker.js +0 -5
- package/dist/DialogModal.js +0 -6
- package/dist/DrawerDesktop.js +0 -6
- package/dist/DrawerMobile.js +0 -6
- package/dist/DropZone.js +0 -5
- package/dist/FAButton.js +0 -4
- package/dist/Header.js +0 -4
- package/dist/Icons/Icons.js +0 -1055
- package/dist/Icons.js +0 -5
- package/dist/Image.js +0 -4
- package/dist/ImageGallery.js +0 -6
- package/dist/Input.js +0 -4
- package/dist/InputMultiple.js +0 -5
- package/dist/LayoutGeneric.js +0 -4
- package/dist/Logo.js +0 -4
- package/dist/Menu.js +0 -5
- package/dist/OtpInput.js +0 -4
- package/dist/Pagination.js +0 -4
- package/dist/ProfilePictureUpload.js +0 -5
- package/dist/ProgressBar.js +0 -4
- package/dist/RadioButton.js +0 -5
- package/dist/SegmentedButton.js +0 -5
- package/dist/Select.js +0 -4
- package/dist/SelectSearch.js +0 -4
- package/dist/Skeleton.js +0 -5
- package/dist/Spinner.js +0 -4
- package/dist/Steps.js +0 -5
- package/dist/SwipeContainer.js +0 -4
- package/dist/Switch.js +0 -5
- package/dist/TabLinks.js +0 -4
- package/dist/Table.js +0 -11
- package/dist/TextArea.js +0 -4
- package/dist/Toast.js +0 -5
- package/dist/ToastProvider.js +0 -4
- package/dist/Tooltip.js +0 -4
- package/dist/components/Autocomplete/useAutocomplete.js +0 -143
- package/dist/components/DatePicker/DatePicker.js +0 -396
- package/dist/components/Dialog/Dialog.js +0 -60
- package/dist/components/Dialog/useDialogControl.js +0 -18
- package/dist/components/Drawer/DrawerDesktop.js +0 -179
- package/dist/components/Drawer/DrawerMobile.js +0 -219
- package/dist/components/Drawer/useDrawerDesktop.js +0 -18
- package/dist/components/Drawer/useDrawerMobile.js +0 -27
- package/dist/components/DropZone/DropZone.js +0 -86
- package/dist/components/DropZone/useFileDropzone.js +0 -24
- package/dist/components/Header/Header.js +0 -32
- package/dist/components/Image/GalleryPreview.js +0 -40
- package/dist/components/Image/ImageGallery.js +0 -68
- package/dist/components/Image/LightBox.js +0 -223
- package/dist/components/Input/Input.js +0 -219
- package/dist/components/InputMultiple/InputMultiple.js +0 -262
- package/dist/components/Layout/LayoutGeneric.js +0 -13
- package/dist/components/Logo/Logo.js +0 -9
- package/dist/components/OtpInput/OtpInput.js +0 -112
- package/dist/components/ProgressBar/ProgressBar.js +0 -70
- package/dist/components/Select/Select.js +0 -1005
- package/dist/components/SelectSearch/SelectSearch.js +0 -101
- package/dist/components/Shared/Chip.js +0 -55
- package/dist/components/Shared/HelperComponent.js +0 -24
- package/dist/components/Sidebar/SecondaryBar/SecondaryBar.js +0 -62
- package/dist/components/Sidebar/SecondaryBar/hooks/useSecondaryBarAnimation.js +0 -59
- package/dist/components/Sidebar/SidebarComposable.js +0 -84
- package/dist/components/Sidebar/components/NavigationLink.js +0 -34
- package/dist/components/Sidebar/components/badge.js +0 -33
- package/dist/components/Sidebar/components/changue-account.js +0 -31
- package/dist/components/Sidebar/components/collapse-button.js +0 -18
- package/dist/components/Sidebar/components/company-logo.js +0 -12
- package/dist/components/Sidebar/components/nav-actions.js +0 -98
- package/dist/components/Sidebar/components/nav-links.js +0 -100
- package/dist/components/Sidebar/context/SidebarContext.js +0 -19
- package/dist/components/Sidebar/hooks/SidebarProvider.js +0 -33
- package/dist/components/Sidebar/hooks/useNavBarActions.js +0 -9
- package/dist/components/Sidebar/hooks/useNavBarCollapse.js +0 -11
- package/dist/components/Sidebar/hooks/useSidebarHook.js +0 -13
- package/dist/components/Sidebar/ui/useNavbarAnimation.js +0 -326
- package/dist/components/Spinner/Spinner.js +0 -52
- package/dist/components/TabSwitch/TabSwitch.js +0 -57
- package/dist/components/Toaster/ToastProvider.js +0 -6
- package/dist/components/Tooltip/Tootip.js +0 -62
- package/dist/hooks/useClickOutside.js +0 -24
- package/dist/hooks/useLabelBackground.js +0 -25
- package/dist/index.js +0 -127
- package/dist/lib/utils.js +0 -54
- package/dist/node_modules/@date-fns/tz/date/index.js +0 -61
- package/dist/node_modules/@date-fns/tz/date/mini.js +0 -69
- package/dist/node_modules/@date-fns/tz/tzName/index.js +0 -11
- package/dist/node_modules/@date-fns/tz/tzOffset/index.js +0 -22
- package/dist/node_modules/date-fns/_lib/addLeadingZeros.js +0 -7
- package/dist/node_modules/date-fns/_lib/defaultOptions.js +0 -7
- package/dist/node_modules/date-fns/_lib/format/formatters.js +0 -583
- package/dist/node_modules/date-fns/_lib/format/lightFormatters.js +0 -59
- package/dist/node_modules/date-fns/_lib/format/longFormatters.js +0 -52
- package/dist/node_modules/date-fns/_lib/getTimezoneOffsetInMilliseconds.js +0 -18
- package/dist/node_modules/date-fns/_lib/normalizeDates.js +0 -11
- package/dist/node_modules/date-fns/_lib/normalizeInterval.js +0 -8
- package/dist/node_modules/date-fns/_lib/protectedTokens.js +0 -20
- package/dist/node_modules/date-fns/addDays.js +0 -10
- package/dist/node_modules/date-fns/addMonths.js +0 -20
- package/dist/node_modules/date-fns/addWeeks.js +0 -8
- package/dist/node_modules/date-fns/addYears.js +0 -8
- package/dist/node_modules/date-fns/constants.js +0 -6
- package/dist/node_modules/date-fns/constructFrom.js +0 -8
- package/dist/node_modules/date-fns/differenceInCalendarDays.js +0 -16
- package/dist/node_modules/date-fns/differenceInCalendarMonths.js +0 -13
- package/dist/node_modules/date-fns/eachMonthOfInterval.js +0 -17
- package/dist/node_modules/date-fns/eachYearOfInterval.js +0 -17
- package/dist/node_modules/date-fns/endOfISOWeek.js +0 -8
- package/dist/node_modules/date-fns/endOfMonth.js +0 -9
- package/dist/node_modules/date-fns/endOfWeek.js +0 -10
- package/dist/node_modules/date-fns/endOfYear.js +0 -9
- package/dist/node_modules/date-fns/format.js +0 -58
- package/dist/node_modules/date-fns/getDayOfYear.js +0 -11
- package/dist/node_modules/date-fns/getDaysInMonth.js +0 -10
- package/dist/node_modules/date-fns/getISOWeek.js +0 -12
- package/dist/node_modules/date-fns/getISOWeekYear.js +0 -15
- package/dist/node_modules/date-fns/getMonth.js +0 -8
- package/dist/node_modules/date-fns/getWeek.js +0 -12
- package/dist/node_modules/date-fns/getWeekYear.js +0 -16
- package/dist/node_modules/date-fns/getYear.js +0 -8
- package/dist/node_modules/date-fns/isAfter.js +0 -8
- package/dist/node_modules/date-fns/isBefore.js +0 -8
- package/dist/node_modules/date-fns/isDate.js +0 -7
- package/dist/node_modules/date-fns/isSameDay.js +0 -14
- package/dist/node_modules/date-fns/isSameMonth.js +0 -13
- package/dist/node_modules/date-fns/isSameYear.js +0 -13
- package/dist/node_modules/date-fns/isValid.js +0 -9
- package/dist/node_modules/date-fns/locale/_lib/buildFormatLongFn.js +0 -9
- package/dist/node_modules/date-fns/locale/_lib/buildLocalizeFn.js +0 -18
- package/dist/node_modules/date-fns/locale/_lib/buildMatchFn.js +0 -31
- package/dist/node_modules/date-fns/locale/_lib/buildMatchPatternFn.js +0 -15
- package/dist/node_modules/date-fns/locale/en-US/_lib/formatDistance.js +0 -70
- package/dist/node_modules/date-fns/locale/en-US/_lib/formatLong.js +0 -33
- package/dist/node_modules/date-fns/locale/en-US/_lib/formatRelative.js +0 -11
- package/dist/node_modules/date-fns/locale/en-US/_lib/localize.js +0 -155
- package/dist/node_modules/date-fns/locale/en-US/_lib/match.js +0 -110
- package/dist/node_modules/date-fns/locale/en-US.js +0 -21
- package/dist/node_modules/date-fns/locale/es/_lib/formatDistance.js +0 -70
- package/dist/node_modules/date-fns/locale/es/_lib/formatLong.js +0 -33
- package/dist/node_modules/date-fns/locale/es/_lib/formatRelative.js +0 -18
- package/dist/node_modules/date-fns/locale/es/_lib/localize.js +0 -143
- package/dist/node_modules/date-fns/locale/es/_lib/match.js +0 -116
- package/dist/node_modules/date-fns/locale/es.js +0 -21
- package/dist/node_modules/date-fns/max.js +0 -14
- package/dist/node_modules/date-fns/min.js +0 -14
- package/dist/node_modules/date-fns/setMonth.js +0 -13
- package/dist/node_modules/date-fns/setYear.js +0 -10
- package/dist/node_modules/date-fns/startOfDay.js +0 -9
- package/dist/node_modules/date-fns/startOfISOWeek.js +0 -8
- package/dist/node_modules/date-fns/startOfISOWeekYear.js +0 -11
- package/dist/node_modules/date-fns/startOfMonth.js +0 -9
- package/dist/node_modules/date-fns/startOfWeek.js +0 -10
- package/dist/node_modules/date-fns/startOfWeekYear.js +0 -12
- package/dist/node_modules/date-fns/startOfYear.js +0 -9
- package/dist/node_modules/date-fns/toDate.js +0 -8
- package/dist/node_modules/input-otp/dist/index.js +0 -194
- package/dist/node_modules/react-day-picker/dist/esm/DayPicker.js +0 -227
- package/dist/node_modules/react-day-picker/dist/esm/UI.js +0 -22
- package/dist/node_modules/react-day-picker/dist/esm/classes/CalendarDay.js +0 -19
- package/dist/node_modules/react-day-picker/dist/esm/classes/CalendarMonth.js +0 -8
- package/dist/node_modules/react-day-picker/dist/esm/classes/CalendarWeek.js +0 -8
- package/dist/node_modules/react-day-picker/dist/esm/classes/DateLib.js +0 -147
- package/dist/node_modules/react-day-picker/dist/esm/components/Button.js +0 -7
- package/dist/node_modules/react-day-picker/dist/esm/components/CaptionLabel.js +0 -7
- package/dist/node_modules/react-day-picker/dist/esm/components/Chevron.js +0 -18
- package/dist/node_modules/react-day-picker/dist/esm/components/Day.js +0 -8
- package/dist/node_modules/react-day-picker/dist/esm/components/DayButton.js +0 -10
- package/dist/node_modules/react-day-picker/dist/esm/components/Dropdown.js +0 -19
- package/dist/node_modules/react-day-picker/dist/esm/components/DropdownNav.js +0 -7
- package/dist/node_modules/react-day-picker/dist/esm/components/Footer.js +0 -7
- package/dist/node_modules/react-day-picker/dist/esm/components/Month.js +0 -8
- package/dist/node_modules/react-day-picker/dist/esm/components/MonthCaption.js +0 -8
- package/dist/node_modules/react-day-picker/dist/esm/components/MonthGrid.js +0 -7
- package/dist/node_modules/react-day-picker/dist/esm/components/Months.js +0 -7
- package/dist/node_modules/react-day-picker/dist/esm/components/MonthsDropdown.js +0 -9
- package/dist/node_modules/react-day-picker/dist/esm/components/Nav.js +0 -27
- package/dist/node_modules/react-day-picker/dist/esm/components/NextMonthButton.js +0 -9
- package/dist/node_modules/react-day-picker/dist/esm/components/Option.js +0 -7
- package/dist/node_modules/react-day-picker/dist/esm/components/PreviousMonthButton.js +0 -9
- package/dist/node_modules/react-day-picker/dist/esm/components/Root.js +0 -8
- package/dist/node_modules/react-day-picker/dist/esm/components/Select.js +0 -7
- package/dist/node_modules/react-day-picker/dist/esm/components/Week.js +0 -8
- package/dist/node_modules/react-day-picker/dist/esm/components/WeekNumber.js +0 -8
- package/dist/node_modules/react-day-picker/dist/esm/components/WeekNumberHeader.js +0 -7
- package/dist/node_modules/react-day-picker/dist/esm/components/Weekday.js +0 -7
- package/dist/node_modules/react-day-picker/dist/esm/components/Weekdays.js +0 -11
- package/dist/node_modules/react-day-picker/dist/esm/components/Weeks.js +0 -7
- package/dist/node_modules/react-day-picker/dist/esm/components/YearsDropdown.js +0 -9
- package/dist/node_modules/react-day-picker/dist/esm/components/custom-components.js +0 -54
- package/dist/node_modules/react-day-picker/dist/esm/formatters/formatCaption.js +0 -9
- package/dist/node_modules/react-day-picker/dist/esm/formatters/formatDay.js +0 -7
- package/dist/node_modules/react-day-picker/dist/esm/formatters/formatMonthDropdown.js +0 -7
- package/dist/node_modules/react-day-picker/dist/esm/formatters/formatWeekNumber.js +0 -7
- package/dist/node_modules/react-day-picker/dist/esm/formatters/formatWeekNumberHeader.js +0 -6
- package/dist/node_modules/react-day-picker/dist/esm/formatters/formatWeekdayName.js +0 -7
- package/dist/node_modules/react-day-picker/dist/esm/formatters/formatYearDropdown.js +0 -9
- package/dist/node_modules/react-day-picker/dist/esm/formatters/index.js +0 -18
- package/dist/node_modules/react-day-picker/dist/esm/helpers/calculateFocusTarget.js +0 -19
- package/dist/node_modules/react-day-picker/dist/esm/helpers/createGetModifiers.js +0 -42
- package/dist/node_modules/react-day-picker/dist/esm/helpers/endOfBroadcastWeek.js +0 -9
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getBroadcastWeeksInMonth.js +0 -7
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getClassNamesForModifiers.js +0 -7
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getComponents.js +0 -10
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getDataAttributes.js +0 -16
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getDates.js +0 -21
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getDays.js +0 -10
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getDefaultClassNames.js +0 -16
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getDisplayMonths.js +0 -13
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getFocusableDate.js +0 -15
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getFormatters.js +0 -10
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getInitialMonth.js +0 -13
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getMonthOptions.js +0 -13
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getMonths.js +0 -24
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getNavMonth.js +0 -13
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getNextFocus.js +0 -12
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getNextMonth.js +0 -12
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getPreviousMonth.js +0 -12
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getStyleForModifiers.js +0 -13
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getWeekdays.js +0 -11
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getWeeks.js +0 -7
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getYearOptions.js +0 -16
- package/dist/node_modules/react-day-picker/dist/esm/helpers/startOfBroadcastWeek.js +0 -7
- package/dist/node_modules/react-day-picker/dist/esm/helpers/useControlledValue.js +0 -8
- package/dist/node_modules/react-day-picker/dist/esm/labels/index.js +0 -26
- package/dist/node_modules/react-day-picker/dist/esm/labels/labelDayButton.js +0 -10
- package/dist/node_modules/react-day-picker/dist/esm/labels/labelGrid.js +0 -9
- package/dist/node_modules/react-day-picker/dist/esm/labels/labelGridcell.js +0 -8
- package/dist/node_modules/react-day-picker/dist/esm/labels/labelMonthDropdown.js +0 -6
- package/dist/node_modules/react-day-picker/dist/esm/labels/labelNav.js +0 -6
- package/dist/node_modules/react-day-picker/dist/esm/labels/labelNext.js +0 -6
- package/dist/node_modules/react-day-picker/dist/esm/labels/labelPrevious.js +0 -6
- package/dist/node_modules/react-day-picker/dist/esm/labels/labelWeekNumber.js +0 -6
- package/dist/node_modules/react-day-picker/dist/esm/labels/labelWeekNumberHeader.js +0 -6
- package/dist/node_modules/react-day-picker/dist/esm/labels/labelWeekday.js +0 -7
- package/dist/node_modules/react-day-picker/dist/esm/labels/labelYearDropdown.js +0 -6
- package/dist/node_modules/react-day-picker/dist/esm/selection/useMulti.js +0 -21
- package/dist/node_modules/react-day-picker/dist/esm/selection/useRange.js +0 -18
- package/dist/node_modules/react-day-picker/dist/esm/selection/useSingle.js +0 -15
- package/dist/node_modules/react-day-picker/dist/esm/useAnimation.js +0 -56
- package/dist/node_modules/react-day-picker/dist/esm/useCalendar.js +0 -44
- package/dist/node_modules/react-day-picker/dist/esm/useDayPicker.js +0 -12
- package/dist/node_modules/react-day-picker/dist/esm/useFocus.js +0 -23
- package/dist/node_modules/react-day-picker/dist/esm/useSelection.js +0 -19
- package/dist/node_modules/react-day-picker/dist/esm/utils/addToRange.js +0 -32
- package/dist/node_modules/react-day-picker/dist/esm/utils/dateMatchModifiers.js +0 -26
- package/dist/node_modules/react-day-picker/dist/esm/utils/rangeContainsDayOfWeek.js +0 -15
- package/dist/node_modules/react-day-picker/dist/esm/utils/rangeContainsModifiers.js +0 -28
- package/dist/node_modules/react-day-picker/dist/esm/utils/rangeIncludesDate.js +0 -9
- package/dist/node_modules/react-day-picker/dist/esm/utils/rangeOverlaps.js +0 -8
- package/dist/node_modules/react-day-picker/dist/esm/utils/typeguards.js +0 -26
- package/dist/useDevice.js +0 -4
- /package/dist/{hooks/useDevice.js → useDevice.es.js} +0 -0
|
@@ -0,0 +1,301 @@
|
|
|
1
|
+
import { j as p } from "./jsx-runtime-DKDX3adD.js";
|
|
2
|
+
import { C as Re, E as De } from "./Icons-DtFC5DJ7.js";
|
|
3
|
+
import { c as $ } from "./cn-B6yFEsav.js";
|
|
4
|
+
import * as n from "react";
|
|
5
|
+
import ge, { memo as Oe } from "react";
|
|
6
|
+
var Te = Object.defineProperty, We = Object.defineProperties, Ae = Object.getOwnPropertyDescriptors, ee = Object.getOwnPropertySymbols, be = Object.prototype.hasOwnProperty, we = Object.prototype.propertyIsEnumerable, xe = (t, a, r) => a in t ? Te(t, a, { enumerable: !0, configurable: !0, writable: !0, value: r }) : t[a] = r, Be = (t, a) => {
|
|
7
|
+
for (var r in a || (a = {})) be.call(a, r) && xe(t, r, a[r]);
|
|
8
|
+
if (ee) for (var r of ee(a)) we.call(a, r) && xe(t, r, a[r]);
|
|
9
|
+
return t;
|
|
10
|
+
}, _e = (t, a) => We(t, Ae(a)), Ie = (t, a) => {
|
|
11
|
+
var r = {};
|
|
12
|
+
for (var u in t) be.call(t, u) && a.indexOf(u) < 0 && (r[u] = t[u]);
|
|
13
|
+
if (t != null && ee) for (var u of ee(t)) a.indexOf(u) < 0 && we.call(t, u) && (r[u] = t[u]);
|
|
14
|
+
return r;
|
|
15
|
+
};
|
|
16
|
+
function Fe(t) {
|
|
17
|
+
let a = setTimeout(t, 0), r = setTimeout(t, 10), u = setTimeout(t, 50);
|
|
18
|
+
return [a, r, u];
|
|
19
|
+
}
|
|
20
|
+
function He(t) {
|
|
21
|
+
let a = n.useRef();
|
|
22
|
+
return n.useEffect(() => {
|
|
23
|
+
a.current = t;
|
|
24
|
+
}), a.current;
|
|
25
|
+
}
|
|
26
|
+
var Le = 18, ye = 40, $e = `${ye}px`, ze = ["[data-lastpass-icon-root]", "com-1password-button", "[data-dashlanecreated]", '[style$="2147483647 !important;"]'].join(",");
|
|
27
|
+
function Ge({ containerRef: t, inputRef: a, pushPasswordManagerStrategy: r, isFocused: u }) {
|
|
28
|
+
let [M, d] = n.useState(!1), [D, k] = n.useState(!1), [O, B] = n.useState(!1), _ = n.useMemo(() => r === "none" ? !1 : (r === "increase-width" || r === "experimental-no-flickering") && M && D, [M, D, r]), x = n.useCallback(() => {
|
|
29
|
+
let f = t.current, v = a.current;
|
|
30
|
+
if (!f || !v || O || r === "none") return;
|
|
31
|
+
let m = f, b = m.getBoundingClientRect().left + m.offsetWidth, w = m.getBoundingClientRect().top + m.offsetHeight / 2, o = b - Le, C = w;
|
|
32
|
+
document.querySelectorAll(ze).length === 0 && document.elementFromPoint(o, C) === f || (d(!0), B(!0));
|
|
33
|
+
}, [t, a, O, r]);
|
|
34
|
+
return n.useEffect(() => {
|
|
35
|
+
let f = t.current;
|
|
36
|
+
if (!f || r === "none") return;
|
|
37
|
+
function v() {
|
|
38
|
+
let b = window.innerWidth - f.getBoundingClientRect().right;
|
|
39
|
+
k(b >= ye);
|
|
40
|
+
}
|
|
41
|
+
v();
|
|
42
|
+
let m = setInterval(v, 1e3);
|
|
43
|
+
return () => {
|
|
44
|
+
clearInterval(m);
|
|
45
|
+
};
|
|
46
|
+
}, [t, r]), n.useEffect(() => {
|
|
47
|
+
let f = u || document.activeElement === a.current;
|
|
48
|
+
if (r === "none" || !f) return;
|
|
49
|
+
let v = setTimeout(x, 0), m = setTimeout(x, 2e3), b = setTimeout(x, 5e3), w = setTimeout(() => {
|
|
50
|
+
B(!0);
|
|
51
|
+
}, 6e3);
|
|
52
|
+
return () => {
|
|
53
|
+
clearTimeout(v), clearTimeout(m), clearTimeout(b), clearTimeout(w);
|
|
54
|
+
};
|
|
55
|
+
}, [a, u, r, x]), { hasPWMBadge: M, willPushPWMBadge: _, PWM_BADGE_SPACE_WIDTH: $e };
|
|
56
|
+
}
|
|
57
|
+
var Ve = n.createContext({}), Se = n.forwardRef((t, a) => {
|
|
58
|
+
var r = t, { value: u, onChange: M, maxLength: d, textAlign: D = "left", pattern: k, placeholder: O, inputMode: B = "numeric", onComplete: _, pushPasswordManagerStrategy: x = "increase-width", pasteTransformer: f, containerClassName: v, noScriptCSSFallback: m = qe, render: b, children: w } = r, o = Ie(r, ["value", "onChange", "maxLength", "textAlign", "pattern", "placeholder", "inputMode", "onComplete", "pushPasswordManagerStrategy", "pasteTransformer", "containerClassName", "noScriptCSSFallback", "render", "children"]), C, N, U, T, V;
|
|
59
|
+
let [te, ne] = n.useState(typeof o.defaultValue == "string" ? o.defaultValue : ""), s = u ?? te, E = He(s), q = n.useCallback((e) => {
|
|
60
|
+
M?.(e), ne(e);
|
|
61
|
+
}, [M]), P = n.useMemo(() => k ? typeof k == "string" ? new RegExp(k) : k : null, [k]), c = n.useRef(null), le = n.useRef(null), ae = n.useRef({ value: s, onChange: q, isIOS: typeof window < "u" && ((N = (C = window?.CSS) == null ? void 0 : C.supports) == null ? void 0 : N.call(C, "-webkit-touch-callout", "none")) }), X = n.useRef({ prev: [(U = c.current) == null ? void 0 : U.selectionStart, (T = c.current) == null ? void 0 : T.selectionEnd, (V = c.current) == null ? void 0 : V.selectionDirection] });
|
|
62
|
+
n.useImperativeHandle(a, () => c.current, []), n.useEffect(() => {
|
|
63
|
+
let e = c.current, l = le.current;
|
|
64
|
+
if (!e || !l) return;
|
|
65
|
+
ae.current.value !== e.value && ae.current.onChange(e.value), X.current.prev = [e.selectionStart, e.selectionEnd, e.selectionDirection];
|
|
66
|
+
function h() {
|
|
67
|
+
if (document.activeElement !== e) {
|
|
68
|
+
J(null), K(null);
|
|
69
|
+
return;
|
|
70
|
+
}
|
|
71
|
+
let i = e.selectionStart, g = e.selectionEnd, Y = e.selectionDirection, j = e.maxLength, F = e.value, R = X.current.prev, W = -1, A = -1, H;
|
|
72
|
+
if (F.length !== 0 && i !== null && g !== null) {
|
|
73
|
+
let Me = i === g, ke = i === F.length && F.length < j;
|
|
74
|
+
if (Me && !ke) {
|
|
75
|
+
let L = i;
|
|
76
|
+
if (L === 0) W = 0, A = 1, H = "forward";
|
|
77
|
+
else if (L === j) W = L - 1, A = L, H = "backward";
|
|
78
|
+
else if (j > 1 && F.length > 1) {
|
|
79
|
+
let se = 0;
|
|
80
|
+
if (R[0] !== null && R[1] !== null) {
|
|
81
|
+
H = L < R[1] ? "backward" : "forward";
|
|
82
|
+
let Ne = R[0] === R[1] && R[0] < j;
|
|
83
|
+
H === "backward" && !Ne && (se = -1);
|
|
84
|
+
}
|
|
85
|
+
W = se + L, A = se + L + 1;
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
W !== -1 && A !== -1 && W !== A && c.current.setSelectionRange(W, A, H);
|
|
89
|
+
}
|
|
90
|
+
let he = W !== -1 ? W : i, ve = A !== -1 ? A : g, Pe = H ?? Y;
|
|
91
|
+
J(he), K(ve), X.current.prev = [he, ve, Pe];
|
|
92
|
+
}
|
|
93
|
+
if (document.addEventListener("selectionchange", h, { capture: !0 }), h(), document.activeElement === e && re(!0), !document.getElementById("input-otp-style")) {
|
|
94
|
+
let i = document.createElement("style");
|
|
95
|
+
if (i.id = "input-otp-style", document.head.appendChild(i), i.sheet) {
|
|
96
|
+
let g = "background: transparent !important; color: transparent !important; border-color: transparent !important; opacity: 0 !important; box-shadow: none !important; -webkit-box-shadow: none !important; -webkit-text-fill-color: transparent !important;";
|
|
97
|
+
Q(i.sheet, "[data-input-otp]::selection { background: transparent !important; color: transparent !important; }"), Q(i.sheet, `[data-input-otp]:autofill { ${g} }`), Q(i.sheet, `[data-input-otp]:-webkit-autofill { ${g} }`), Q(i.sheet, "@supports (-webkit-touch-callout: none) { [data-input-otp] { letter-spacing: -.6em !important; font-weight: 100 !important; font-stretch: ultra-condensed; font-optical-sizing: none !important; left: -1px !important; right: 1px !important; } }"), Q(i.sheet, "[data-input-otp] + * { pointer-events: all !important; }");
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
let y = () => {
|
|
101
|
+
l && l.style.setProperty("--root-height", `${e.clientHeight}px`);
|
|
102
|
+
};
|
|
103
|
+
y();
|
|
104
|
+
let S = new ResizeObserver(y);
|
|
105
|
+
return S.observe(e), () => {
|
|
106
|
+
document.removeEventListener("selectionchange", h, { capture: !0 }), S.disconnect();
|
|
107
|
+
};
|
|
108
|
+
}, []);
|
|
109
|
+
let [ue, ce] = n.useState(!1), [Z, re] = n.useState(!1), [I, J] = n.useState(null), [z, K] = n.useState(null);
|
|
110
|
+
n.useEffect(() => {
|
|
111
|
+
Fe(() => {
|
|
112
|
+
var e, l, h, y;
|
|
113
|
+
(e = c.current) == null || e.dispatchEvent(new Event("input"));
|
|
114
|
+
let S = (l = c.current) == null ? void 0 : l.selectionStart, i = (h = c.current) == null ? void 0 : h.selectionEnd, g = (y = c.current) == null ? void 0 : y.selectionDirection;
|
|
115
|
+
S !== null && i !== null && (J(S), K(i), X.current.prev = [S, i, g]);
|
|
116
|
+
});
|
|
117
|
+
}, [s, Z]), n.useEffect(() => {
|
|
118
|
+
E !== void 0 && s !== E && E.length < d && s.length === d && _?.(s);
|
|
119
|
+
}, [d, _, E, s]);
|
|
120
|
+
let G = Ge({ containerRef: le, inputRef: c, pushPasswordManagerStrategy: x, isFocused: Z }), de = n.useCallback((e) => {
|
|
121
|
+
let l = e.currentTarget.value.slice(0, d);
|
|
122
|
+
if (l.length > 0 && P && !P.test(l)) {
|
|
123
|
+
e.preventDefault();
|
|
124
|
+
return;
|
|
125
|
+
}
|
|
126
|
+
typeof E == "string" && l.length < E.length && document.dispatchEvent(new Event("selectionchange")), q(l);
|
|
127
|
+
}, [d, q, E, P]), fe = n.useCallback(() => {
|
|
128
|
+
var e;
|
|
129
|
+
if (c.current) {
|
|
130
|
+
let l = Math.min(c.current.value.length, d - 1), h = c.current.value.length;
|
|
131
|
+
(e = c.current) == null || e.setSelectionRange(l, h), J(l), K(h);
|
|
132
|
+
}
|
|
133
|
+
re(!0);
|
|
134
|
+
}, [d]), pe = n.useCallback((e) => {
|
|
135
|
+
var l, h;
|
|
136
|
+
let y = c.current;
|
|
137
|
+
if (!f && (!ae.current.isIOS || !e.clipboardData || !y)) return;
|
|
138
|
+
let S = e.clipboardData.getData("text/plain"), i = f ? f(S) : S;
|
|
139
|
+
e.preventDefault();
|
|
140
|
+
let g = (l = c.current) == null ? void 0 : l.selectionStart, Y = (h = c.current) == null ? void 0 : h.selectionEnd, j = (g !== Y ? s.slice(0, g) + i + s.slice(Y) : s.slice(0, g) + i + s.slice(g)).slice(0, d);
|
|
141
|
+
if (j.length > 0 && P && !P.test(j)) return;
|
|
142
|
+
y.value = j, q(j);
|
|
143
|
+
let F = Math.min(j.length, d - 1), R = j.length;
|
|
144
|
+
y.setSelectionRange(F, R), J(F), K(R);
|
|
145
|
+
}, [d, q, P, s]), Ee = n.useMemo(() => ({ position: "relative", cursor: o.disabled ? "default" : "text", userSelect: "none", WebkitUserSelect: "none", pointerEvents: "none" }), [o.disabled]), me = n.useMemo(() => ({ position: "absolute", inset: 0, width: G.willPushPWMBadge ? `calc(100% + ${G.PWM_BADGE_SPACE_WIDTH})` : "100%", clipPath: G.willPushPWMBadge ? `inset(0 ${G.PWM_BADGE_SPACE_WIDTH} 0 0)` : void 0, height: "100%", display: "flex", textAlign: D, opacity: "1", color: "transparent", pointerEvents: "all", background: "transparent", caretColor: "transparent", border: "0 solid transparent", outline: "0 solid transparent", boxShadow: "none", lineHeight: "1", letterSpacing: "-.5em", fontSize: "var(--root-height)", fontFamily: "monospace", fontVariantNumeric: "tabular-nums" }), [G.PWM_BADGE_SPACE_WIDTH, G.willPushPWMBadge, D]), je = n.useMemo(() => n.createElement("input", _e(Be({ autoComplete: o.autoComplete || "one-time-code" }, o), { "data-input-otp": !0, "data-input-otp-placeholder-shown": s.length === 0 || void 0, "data-input-otp-mss": I, "data-input-otp-mse": z, inputMode: B, pattern: P?.source, "aria-placeholder": O, style: me, maxLength: d, value: s, ref: c, onPaste: (e) => {
|
|
146
|
+
var l;
|
|
147
|
+
pe(e), (l = o.onPaste) == null || l.call(o, e);
|
|
148
|
+
}, onChange: de, onMouseOver: (e) => {
|
|
149
|
+
var l;
|
|
150
|
+
ce(!0), (l = o.onMouseOver) == null || l.call(o, e);
|
|
151
|
+
}, onMouseLeave: (e) => {
|
|
152
|
+
var l;
|
|
153
|
+
ce(!1), (l = o.onMouseLeave) == null || l.call(o, e);
|
|
154
|
+
}, onFocus: (e) => {
|
|
155
|
+
var l;
|
|
156
|
+
fe(), (l = o.onFocus) == null || l.call(o, e);
|
|
157
|
+
}, onBlur: (e) => {
|
|
158
|
+
var l;
|
|
159
|
+
re(!1), (l = o.onBlur) == null || l.call(o, e);
|
|
160
|
+
} })), [de, fe, pe, B, me, d, z, I, o, P?.source, s]), oe = n.useMemo(() => ({ slots: Array.from({ length: d }).map((e, l) => {
|
|
161
|
+
var h;
|
|
162
|
+
let y = Z && I !== null && z !== null && (I === z && l === I || l >= I && l < z), S = s[l] !== void 0 ? s[l] : null, i = s[0] !== void 0 ? null : (h = O?.[l]) != null ? h : null;
|
|
163
|
+
return { char: S, placeholderChar: i, isActive: y, hasFakeCaret: y && S === null };
|
|
164
|
+
}), isFocused: Z, isHovering: !o.disabled && ue }), [Z, ue, d, z, I, o.disabled, s]), Ce = n.useMemo(() => b ? b(oe) : n.createElement(Ve.Provider, { value: oe }, w), [w, oe, b]);
|
|
165
|
+
return n.createElement(n.Fragment, null, m !== null && n.createElement("noscript", null, n.createElement("style", null, m)), n.createElement("div", { ref: le, "data-input-otp-container": !0, style: Ee, className: v }, Ce, n.createElement("div", { style: { position: "absolute", inset: 0, pointerEvents: "none" } }, je)));
|
|
166
|
+
});
|
|
167
|
+
Se.displayName = "Input";
|
|
168
|
+
function Q(t, a) {
|
|
169
|
+
try {
|
|
170
|
+
t.insertRule(a);
|
|
171
|
+
} catch {
|
|
172
|
+
console.error("input-otp could not insert CSS rule:", a);
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
var qe = `
|
|
176
|
+
[data-input-otp] {
|
|
177
|
+
--nojs-bg: white !important;
|
|
178
|
+
--nojs-fg: black !important;
|
|
179
|
+
|
|
180
|
+
background-color: var(--nojs-bg) !important;
|
|
181
|
+
color: var(--nojs-fg) !important;
|
|
182
|
+
caret-color: var(--nojs-fg) !important;
|
|
183
|
+
letter-spacing: .25em !important;
|
|
184
|
+
text-align: center !important;
|
|
185
|
+
border: 1px solid var(--nojs-fg) !important;
|
|
186
|
+
border-radius: 4px !important;
|
|
187
|
+
width: 100% !important;
|
|
188
|
+
}
|
|
189
|
+
@media (prefers-color-scheme: dark) {
|
|
190
|
+
[data-input-otp] {
|
|
191
|
+
--nojs-bg: black !important;
|
|
192
|
+
--nojs-fg: white !important;
|
|
193
|
+
}
|
|
194
|
+
}`;
|
|
195
|
+
const Ze = ({
|
|
196
|
+
value: t = "",
|
|
197
|
+
name: a,
|
|
198
|
+
onChange: r,
|
|
199
|
+
onComplete: u,
|
|
200
|
+
onBlur: M,
|
|
201
|
+
maxLength: d = 6,
|
|
202
|
+
placeholder: D = "•",
|
|
203
|
+
disabled: k = !1,
|
|
204
|
+
className: O,
|
|
205
|
+
autoFocus: B = !1,
|
|
206
|
+
pasteTransformer: _,
|
|
207
|
+
errorComponent: x,
|
|
208
|
+
hasError: f,
|
|
209
|
+
helperComponent: v,
|
|
210
|
+
helperAlignment: m = "left",
|
|
211
|
+
slotClassName: b,
|
|
212
|
+
variant: w = "default",
|
|
213
|
+
hideSlotsMiddleSeparator: o = !1
|
|
214
|
+
}) => {
|
|
215
|
+
const C = m === "left" ? "justify-start w-full text-left" : m === "center" ? "justify-center" : "justify-end text-right w-full", N = {
|
|
216
|
+
default: {
|
|
217
|
+
text: "text-neutral-default-default",
|
|
218
|
+
icon: null
|
|
219
|
+
},
|
|
220
|
+
error: {
|
|
221
|
+
text: "text-error-default-default",
|
|
222
|
+
icon: /* @__PURE__ */ p.jsx(De, { size: 18, className: "text-error-default-default" })
|
|
223
|
+
},
|
|
224
|
+
success: {
|
|
225
|
+
text: "text-success-default-default",
|
|
226
|
+
icon: /* @__PURE__ */ p.jsx(Re, { size: 18, className: "text-success-default-default" })
|
|
227
|
+
}
|
|
228
|
+
}, U = (T) => {
|
|
229
|
+
r?.(T, a);
|
|
230
|
+
};
|
|
231
|
+
return /* @__PURE__ */ p.jsx(
|
|
232
|
+
Se,
|
|
233
|
+
{
|
|
234
|
+
value: t,
|
|
235
|
+
name: a,
|
|
236
|
+
autoFocus: B,
|
|
237
|
+
onChange: U,
|
|
238
|
+
onComplete: u,
|
|
239
|
+
onBlur: M,
|
|
240
|
+
maxLength: d,
|
|
241
|
+
disabled: k,
|
|
242
|
+
pasteTransformer: _,
|
|
243
|
+
spellCheck: !1,
|
|
244
|
+
containerClassName: $("group flex items-center has-[:disabled]:opacity-30 w-max justify-center", O),
|
|
245
|
+
render: ({ slots: T }) => {
|
|
246
|
+
const V = Math.floor(T.length / 2), te = T.slice(0, V), ne = T.slice(V);
|
|
247
|
+
return /* @__PURE__ */ p.jsxs("div", { className: "flex flex-col items-center", children: [
|
|
248
|
+
/* @__PURE__ */ p.jsxs("div", { className: "flex items-center", children: [
|
|
249
|
+
/* @__PURE__ */ p.jsx("div", { className: "flex", children: te.map((s, E) => /* @__PURE__ */ p.jsx(ie, { ...s, placeholder: D, hasError: f, className: b, variant: w }, E)) }),
|
|
250
|
+
/* @__PURE__ */ p.jsx("hr", { className: $("w-2 h-1 mx-2 border-neutral-default-default", o && "hidden") }),
|
|
251
|
+
/* @__PURE__ */ p.jsx("div", { className: "flex", children: ne.map((s, E) => /* @__PURE__ */ p.jsx(ie, { ...s, placeholder: D, hasError: f, variant: w, className: b }, E)) })
|
|
252
|
+
] }),
|
|
253
|
+
f && x && (typeof x == "string" ? /* @__PURE__ */ p.jsxs("span", { className: $("text-error-default-default text-xs mt-1 flex items-center gap-1", C, N.error.text), children: [
|
|
254
|
+
N.error.icon,
|
|
255
|
+
x
|
|
256
|
+
] }) : ge.cloneElement(x, { className: $(
|
|
257
|
+
"text-error-default-default text-xs mt-1",
|
|
258
|
+
C,
|
|
259
|
+
N.error.text,
|
|
260
|
+
x?.props?.className
|
|
261
|
+
) })),
|
|
262
|
+
v && m && (typeof v == "string" ? /* @__PURE__ */ p.jsxs("span", { className: $("text-neutral-medium-default text-xs mt-1 flex items-center gap-1", N[w].text, C), children: [
|
|
263
|
+
N[w].icon,
|
|
264
|
+
v
|
|
265
|
+
] }) : ge.cloneElement(v, { className: $("text-neutral-medium-default text-xs mt-1", C, N[w].text, v?.props?.className) }))
|
|
266
|
+
] });
|
|
267
|
+
}
|
|
268
|
+
}
|
|
269
|
+
);
|
|
270
|
+
};
|
|
271
|
+
Ze.displayName = "OtpInput";
|
|
272
|
+
const Je = (t) => {
|
|
273
|
+
const a = {
|
|
274
|
+
default: "border-neutral-default-default",
|
|
275
|
+
error: "border-error-default-default",
|
|
276
|
+
success: "border-success-default-default"
|
|
277
|
+
};
|
|
278
|
+
return /* @__PURE__ */ p.jsxs(
|
|
279
|
+
"div",
|
|
280
|
+
{
|
|
281
|
+
className: $(
|
|
282
|
+
"relative w-12 h-12 md:w-14 md:h-14 text-[1rem] md:text-[1.2rem] text-white",
|
|
283
|
+
"flex items-center justify-center",
|
|
284
|
+
"transition-all duration-300",
|
|
285
|
+
"border-2 border-neutral-default-default rounded-md mx-1",
|
|
286
|
+
{ "border-2 border-primary-default-default": t.isActive },
|
|
287
|
+
a[t.variant || "default"],
|
|
288
|
+
t.className,
|
|
289
|
+
t.hasError && a.error
|
|
290
|
+
),
|
|
291
|
+
children: [
|
|
292
|
+
/* @__PURE__ */ p.jsx("div", { className: "group-has-[input[data-input-otp-placeholder-shown]]:opacity-20", children: t.char ?? t.placeholder }),
|
|
293
|
+
t.hasFakeCaret && /* @__PURE__ */ p.jsx("div", { className: "absolute inset-0 flex items-center justify-center", children: /* @__PURE__ */ p.jsx("div", { className: "w-3 h-1 rounded-full bg-neutral-default-default animate-pulse" }) })
|
|
294
|
+
]
|
|
295
|
+
}
|
|
296
|
+
);
|
|
297
|
+
}, ie = Oe(Je);
|
|
298
|
+
ie.displayName = "Slot";
|
|
299
|
+
export {
|
|
300
|
+
Ze as default
|
|
301
|
+
};
|
|
@@ -1,49 +1,49 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { j as t } from "./jsx-runtime-DKDX3adD.js";
|
|
2
2
|
import { motion as a } from "framer-motion";
|
|
3
|
-
function
|
|
4
|
-
currentPage:
|
|
3
|
+
function h({
|
|
4
|
+
currentPage: i = 1,
|
|
5
5
|
totalPages: l = 0,
|
|
6
|
-
onPageChange:
|
|
6
|
+
onPageChange: p
|
|
7
7
|
}) {
|
|
8
8
|
const n = (e) => {
|
|
9
|
-
e >= 1 && e <= l && e !==
|
|
10
|
-
},
|
|
9
|
+
e >= 1 && e <= l && e !== i && p?.(e);
|
|
10
|
+
}, d = (() => {
|
|
11
11
|
const e = [];
|
|
12
12
|
if (l > 7)
|
|
13
|
-
if (e.push(1),
|
|
14
|
-
for (let
|
|
15
|
-
e.push(
|
|
13
|
+
if (e.push(1), i <= 4) {
|
|
14
|
+
for (let s = 2; s <= 5; s++)
|
|
15
|
+
e.push(s);
|
|
16
16
|
e.push("ellipsis"), e.push(l);
|
|
17
|
-
} else if (
|
|
17
|
+
} else if (i >= l - 3) {
|
|
18
18
|
e.push("ellipsis");
|
|
19
|
-
for (let
|
|
20
|
-
e.push(
|
|
19
|
+
for (let s = l - 4; s <= l; s++)
|
|
20
|
+
e.push(s);
|
|
21
21
|
} else {
|
|
22
22
|
e.push("ellipsis");
|
|
23
|
-
for (let
|
|
24
|
-
e.push(
|
|
23
|
+
for (let s = i - 1; s <= i + 1; s++)
|
|
24
|
+
e.push(s);
|
|
25
25
|
e.push("ellipsis"), e.push(l);
|
|
26
26
|
}
|
|
27
27
|
else
|
|
28
|
-
for (let
|
|
29
|
-
e.push(
|
|
28
|
+
for (let s = 1; s <= l; s++)
|
|
29
|
+
e.push(s);
|
|
30
30
|
return e;
|
|
31
31
|
})();
|
|
32
|
-
return /* @__PURE__ */
|
|
33
|
-
/* @__PURE__ */ t(
|
|
32
|
+
return /* @__PURE__ */ t.jsxs("div", { className: "flex items-center justify-center gap-2 p-4", children: [
|
|
33
|
+
/* @__PURE__ */ t.jsx(
|
|
34
34
|
a.button,
|
|
35
35
|
{
|
|
36
36
|
whileHover: { scale: 1.05 },
|
|
37
37
|
whileTap: { scale: 0.95 },
|
|
38
|
-
onClick: () => n(
|
|
39
|
-
disabled:
|
|
38
|
+
onClick: () => n(i - 1),
|
|
39
|
+
disabled: i === 1,
|
|
40
40
|
className: "px-4 py-2 text-primary-medium-default hover:text-primary-default-default disabled:text-gray-600 disabled:cursor-default transition-colors cursor-pointer",
|
|
41
41
|
children: "Anterior"
|
|
42
42
|
}
|
|
43
43
|
),
|
|
44
|
-
/* @__PURE__ */ t("div", { className: "flex items-center gap-1 select-none", children:
|
|
44
|
+
/* @__PURE__ */ t.jsx("div", { className: "flex items-center gap-1 select-none", children: d.map((e, o) => {
|
|
45
45
|
if (e === "ellipsis")
|
|
46
|
-
return /* @__PURE__ */ t(
|
|
46
|
+
return /* @__PURE__ */ t.jsx(
|
|
47
47
|
"span",
|
|
48
48
|
{
|
|
49
49
|
className: "px-3 py-2 text-neutral-default-default",
|
|
@@ -51,16 +51,16 @@ function m({
|
|
|
51
51
|
},
|
|
52
52
|
`ellipsis-${o}`
|
|
53
53
|
);
|
|
54
|
-
const
|
|
55
|
-
return /* @__PURE__ */
|
|
54
|
+
const s = e, r = s === i;
|
|
55
|
+
return /* @__PURE__ */ t.jsxs(
|
|
56
56
|
a.button,
|
|
57
57
|
{
|
|
58
58
|
whileHover: r ? {} : { scale: 1.1 },
|
|
59
59
|
whileTap: r ? {} : { scale: 0.9 },
|
|
60
|
-
onClick: () => n(
|
|
60
|
+
onClick: () => n(s),
|
|
61
61
|
className: `relative px-3 py-2 min-w-[40px] text-center transition-colors ${r ? "text-primary-default-default" : "text-neutral-default-default hover:text-white cursor-pointer "}`,
|
|
62
62
|
children: [
|
|
63
|
-
r && /* @__PURE__ */ t(
|
|
63
|
+
r && /* @__PURE__ */ t.jsx(
|
|
64
64
|
a.div,
|
|
65
65
|
{
|
|
66
66
|
layoutId: "activePage",
|
|
@@ -73,19 +73,19 @@ function m({
|
|
|
73
73
|
}
|
|
74
74
|
}
|
|
75
75
|
),
|
|
76
|
-
/* @__PURE__ */ t("span", { className: "relative z-10", children:
|
|
76
|
+
/* @__PURE__ */ t.jsx("span", { className: "relative z-10", children: s })
|
|
77
77
|
]
|
|
78
78
|
},
|
|
79
|
-
|
|
79
|
+
s
|
|
80
80
|
);
|
|
81
81
|
}) }),
|
|
82
|
-
/* @__PURE__ */ t(
|
|
82
|
+
/* @__PURE__ */ t.jsx(
|
|
83
83
|
a.button,
|
|
84
84
|
{
|
|
85
85
|
whileHover: { scale: 1.05 },
|
|
86
86
|
whileTap: { scale: 0.95 },
|
|
87
|
-
onClick: () => n(
|
|
88
|
-
disabled:
|
|
87
|
+
onClick: () => n(i + 1),
|
|
88
|
+
disabled: i === l,
|
|
89
89
|
className: "px-4 py-2 text-primary-medium-default hover:text-primary-default-default disabled:text-gray-600 disabled:cursor-default transition-colors cursor-pointer",
|
|
90
90
|
children: "Siguiente"
|
|
91
91
|
}
|
|
@@ -93,5 +93,5 @@ function m({
|
|
|
93
93
|
] });
|
|
94
94
|
}
|
|
95
95
|
export {
|
|
96
|
-
|
|
96
|
+
h as default
|
|
97
97
|
};
|
package/dist/{components/ProfilePictureUpload/ProfilePictureUpload.js → ProfilePictureUpload.es.js}
RENAMED
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { memo as
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
const
|
|
1
|
+
import { j as o } from "./jsx-runtime-DKDX3adD.js";
|
|
2
|
+
import { memo as L, useRef as w, useLayoutEffect as N } from "react";
|
|
3
|
+
import R from "./Avatar.es.js";
|
|
4
|
+
import { c as i } from "./cn-B6yFEsav.js";
|
|
5
|
+
const F = {
|
|
6
6
|
sm: "w-16 h-16",
|
|
7
7
|
md: "w-24 h-24",
|
|
8
8
|
lg: "w-32 h-32",
|
|
9
9
|
xl: "w-40 h-40"
|
|
10
|
-
},
|
|
10
|
+
}, A = {
|
|
11
11
|
sm: "w-4 h-4",
|
|
12
12
|
md: "w-5 h-5",
|
|
13
13
|
lg: "w-6 h-6",
|
|
14
14
|
xl: "w-8 h-8"
|
|
15
|
-
},
|
|
15
|
+
}, M = {
|
|
16
16
|
sm: "w-6 h-6",
|
|
17
17
|
md: "w-7 h-7",
|
|
18
18
|
lg: "w-8 h-8",
|
|
19
19
|
xl: "w-10 h-10"
|
|
20
|
-
},
|
|
20
|
+
}, T = {
|
|
21
21
|
sm: "-bottom-1 -right-0.5",
|
|
22
22
|
md: "-bottom-0.5 -right-0.5",
|
|
23
23
|
lg: "bottom-1 right-1",
|
|
@@ -27,37 +27,37 @@ const A = {
|
|
|
27
27
|
md: "w-5 h-5",
|
|
28
28
|
lg: "w-6 h-6",
|
|
29
29
|
xl: "w-7 h-7"
|
|
30
|
-
},
|
|
30
|
+
}, U = {
|
|
31
31
|
sm: "-top-0.5 -right-0.5",
|
|
32
32
|
md: "-top-1 -right-1",
|
|
33
33
|
lg: "-top-1 -right-0",
|
|
34
34
|
xl: "top-1 right-1"
|
|
35
35
|
};
|
|
36
|
-
function
|
|
36
|
+
function z({
|
|
37
37
|
imageUrl: t,
|
|
38
38
|
fallbackText: e = "S L",
|
|
39
39
|
onFileSelect: y,
|
|
40
40
|
onEditClick: m,
|
|
41
41
|
onRemoveClick: k,
|
|
42
|
-
size:
|
|
42
|
+
size: r = "lg",
|
|
43
43
|
className: C,
|
|
44
|
-
disabled:
|
|
45
|
-
showRemoveButton:
|
|
46
|
-
acceptedTypes:
|
|
44
|
+
disabled: n = !1,
|
|
45
|
+
showRemoveButton: j = !0,
|
|
46
|
+
acceptedTypes: p = "image/*",
|
|
47
47
|
maxFileSize: h = 5 * 1024 * 1024,
|
|
48
48
|
onError: g
|
|
49
49
|
}) {
|
|
50
|
-
const f = w(null), u = w(null),
|
|
50
|
+
const f = w(null), u = w(null), x = (l) => l.type.startsWith("image/") ? l.size > h ? (g?.(
|
|
51
51
|
`La imagen debe ser menor a ${Math.round(h / 1024 / 1024)}MB`
|
|
52
|
-
), !1) : !0 : (g?.("Por favor selecciona un archivo de imagen válido"), !1),
|
|
52
|
+
), !1) : !0 : (g?.("Por favor selecciona un archivo de imagen válido"), !1), v = (l) => {
|
|
53
53
|
const a = l.target.files?.[0];
|
|
54
|
-
a && (
|
|
55
|
-
},
|
|
56
|
-
|
|
57
|
-
},
|
|
58
|
-
l.stopPropagation(), !
|
|
54
|
+
a && (x(a) && y?.(a), l.target.value = "");
|
|
55
|
+
}, B = () => {
|
|
56
|
+
n || (m ? m() : f.current?.click());
|
|
57
|
+
}, S = (l) => {
|
|
58
|
+
l.stopPropagation(), !n && k?.();
|
|
59
59
|
};
|
|
60
|
-
return
|
|
60
|
+
return N(() => {
|
|
61
61
|
if (u.current) {
|
|
62
62
|
const a = ((E) => {
|
|
63
63
|
let c = E;
|
|
@@ -74,61 +74,61 @@ function W({
|
|
|
74
74
|
);
|
|
75
75
|
u.current.style.borderColor = a;
|
|
76
76
|
}
|
|
77
|
-
}, []), /* @__PURE__ */
|
|
77
|
+
}, []), /* @__PURE__ */ o.jsxs(
|
|
78
78
|
"div",
|
|
79
79
|
{
|
|
80
80
|
className: i("relative inline-block border-inherit group", C),
|
|
81
81
|
children: [
|
|
82
|
-
/* @__PURE__ */
|
|
82
|
+
/* @__PURE__ */ o.jsx(
|
|
83
83
|
"input",
|
|
84
84
|
{
|
|
85
85
|
ref: f,
|
|
86
86
|
type: "file",
|
|
87
|
-
accept:
|
|
88
|
-
onChange:
|
|
87
|
+
accept: p,
|
|
88
|
+
onChange: v,
|
|
89
89
|
className: "hidden",
|
|
90
|
-
disabled:
|
|
90
|
+
disabled: n
|
|
91
91
|
}
|
|
92
92
|
),
|
|
93
|
-
/* @__PURE__ */
|
|
93
|
+
/* @__PURE__ */ o.jsx(
|
|
94
94
|
"div",
|
|
95
95
|
{
|
|
96
96
|
className: i(
|
|
97
|
-
|
|
97
|
+
F[r],
|
|
98
98
|
"rounded-full overflow-hidden flex items-center justify-center relative",
|
|
99
|
-
|
|
99
|
+
n && "opacity-50 cursor-not-default"
|
|
100
100
|
),
|
|
101
|
-
children: /* @__PURE__ */
|
|
102
|
-
|
|
101
|
+
children: /* @__PURE__ */ o.jsx(
|
|
102
|
+
R,
|
|
103
103
|
{
|
|
104
104
|
imageUrl: t,
|
|
105
105
|
fallbackText: e,
|
|
106
|
-
sizeImage:
|
|
107
|
-
sizeFallback:
|
|
106
|
+
sizeImage: r,
|
|
107
|
+
sizeFallback: r
|
|
108
108
|
}
|
|
109
109
|
)
|
|
110
110
|
}
|
|
111
111
|
),
|
|
112
|
-
/* @__PURE__ */
|
|
112
|
+
/* @__PURE__ */ o.jsx(
|
|
113
113
|
"button",
|
|
114
114
|
{
|
|
115
115
|
ref: u,
|
|
116
116
|
className: i(
|
|
117
117
|
"absolute bg-primary-default-default rounded-lg border-2 hover:bg-primary-default-hover cursor-pointer grid place-content-center",
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
118
|
+
T[r],
|
|
119
|
+
M[r],
|
|
120
|
+
n && "opacity-50 cursor-not-default"
|
|
121
121
|
),
|
|
122
|
-
onClick:
|
|
123
|
-
disabled:
|
|
124
|
-
children: /* @__PURE__ */
|
|
122
|
+
onClick: B,
|
|
123
|
+
disabled: n,
|
|
124
|
+
children: /* @__PURE__ */ o.jsx(
|
|
125
125
|
"svg",
|
|
126
126
|
{
|
|
127
|
-
className: i(
|
|
127
|
+
className: i(A[r], "text-white"),
|
|
128
128
|
fill: "none",
|
|
129
129
|
stroke: "currentColor",
|
|
130
130
|
viewBox: "0 0 24 24",
|
|
131
|
-
children: /* @__PURE__ */
|
|
131
|
+
children: /* @__PURE__ */ o.jsx(
|
|
132
132
|
"path",
|
|
133
133
|
{
|
|
134
134
|
strokeLinecap: "round",
|
|
@@ -141,27 +141,27 @@ function W({
|
|
|
141
141
|
)
|
|
142
142
|
}
|
|
143
143
|
),
|
|
144
|
-
t &&
|
|
144
|
+
t && j && !n && /* @__PURE__ */ o.jsx(
|
|
145
145
|
"button",
|
|
146
146
|
{
|
|
147
147
|
className: i(
|
|
148
148
|
"absolute rounded-full shadow-lg bg-error-light flex cursor-pointer items-center justify-center",
|
|
149
149
|
"opacity-0 scale-80 group-hover:opacity-100 group-hover:scale-100",
|
|
150
150
|
"transition-all duration-200 ease-out",
|
|
151
|
-
|
|
152
|
-
b[
|
|
153
|
-
|
|
151
|
+
U[r],
|
|
152
|
+
b[r],
|
|
153
|
+
n && "opacity-50 cursor-default"
|
|
154
154
|
),
|
|
155
|
-
disabled:
|
|
156
|
-
onClick:
|
|
157
|
-
children: /* @__PURE__ */
|
|
155
|
+
disabled: n,
|
|
156
|
+
onClick: S,
|
|
157
|
+
children: /* @__PURE__ */ o.jsx(
|
|
158
158
|
"svg",
|
|
159
159
|
{
|
|
160
|
-
className: i(b[
|
|
160
|
+
className: i(b[r], "text-white p-1"),
|
|
161
161
|
fill: "none",
|
|
162
162
|
stroke: "currentColor",
|
|
163
163
|
viewBox: "0 0 24 24",
|
|
164
|
-
children: /* @__PURE__ */
|
|
164
|
+
children: /* @__PURE__ */ o.jsx(
|
|
165
165
|
"path",
|
|
166
166
|
{
|
|
167
167
|
strokeLinecap: "round",
|
|
@@ -178,11 +178,12 @@ function W({
|
|
|
178
178
|
}
|
|
179
179
|
);
|
|
180
180
|
}
|
|
181
|
-
const
|
|
182
|
-
|
|
181
|
+
const W = L(
|
|
182
|
+
z,
|
|
183
183
|
(t, e) => t.imageUrl === e.imageUrl && t.fallbackText === e.fallbackText && t.size === e.size && t.className === e.className && t.disabled === e.disabled && t.showRemoveButton === e.showRemoveButton && t.acceptedTypes === e.acceptedTypes && t.maxFileSize === e.maxFileSize && t.disableEntryAnimation === e.disableEntryAnimation && t.onFileSelect === e.onFileSelect && t.onEditClick === e.onEditClick && t.onRemoveClick === e.onRemoveClick && t.onError === e.onError
|
|
184
184
|
);
|
|
185
|
-
|
|
185
|
+
W.displayName = "ProfilePictureUpload";
|
|
186
186
|
export {
|
|
187
|
-
|
|
187
|
+
W as ProfilePictureUpload,
|
|
188
|
+
W as default
|
|
188
189
|
};
|