prometeo-design-system 2.8.5 → 2.8.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Avatar.js +4 -0
- package/dist/Button.js +4 -0
- package/dist/CardProfile.js +5 -0
- package/dist/CheckBox.js +4 -0
- package/dist/DatePicker.js +5 -0
- package/dist/DialogModal.js +6 -0
- package/dist/DrawerDesktop.js +6 -0
- package/dist/DrawerMobile.js +6 -0
- package/dist/DropZone.js +5 -0
- package/dist/FAButton.js +4 -0
- package/dist/Header.js +4 -0
- package/dist/Icons/Icons.js +1055 -0
- package/dist/Icons.js +5 -0
- package/dist/Image.js +4 -0
- package/dist/ImageGallery.js +6 -0
- package/dist/Input.js +4 -0
- package/dist/InputMultiple.js +5 -0
- package/dist/LayoutGeneric.js +4 -0
- package/dist/Logo.js +4 -0
- package/dist/Menu.js +5 -0
- package/dist/OtpInput.js +4 -0
- package/dist/Pagination.js +4 -0
- package/dist/ProfilePictureUpload.js +5 -0
- package/dist/ProgressBar.js +4 -0
- package/dist/RadioButton.js +5 -0
- package/dist/SegmentedButton.js +5 -0
- package/dist/Select.js +4 -0
- package/dist/SelectSearch.js +4 -0
- package/dist/Skeleton.js +5 -0
- package/dist/Spinner.js +4 -0
- package/dist/Steps.js +5 -0
- package/dist/SwipeContainer.js +4 -0
- package/dist/Switch.js +5 -0
- package/dist/TabLinks.js +4 -0
- package/dist/Table.js +11 -0
- package/dist/TextArea.js +4 -0
- package/dist/Toast.js +5 -0
- package/dist/ToastProvider.js +4 -0
- package/dist/Tooltip.js +4 -0
- package/dist/components/Autocomplete/useAutocomplete.js +143 -0
- package/dist/{Avatar.es.js → components/Avatar/Avatar.js} +24 -24
- package/dist/{Button.es.js → components/Button/Button.js} +55 -55
- package/dist/{CardProfile-CsytJlKZ.js → components/CardProfile/CardProfile.js} +68 -94
- package/dist/{CheckBox.es.js → components/CheckBox/CheckBox.js} +25 -25
- package/dist/components/DatePicker/DatePicker.js +396 -0
- package/dist/components/Dialog/Dialog.js +60 -0
- package/dist/components/Dialog/useDialogControl.js +18 -0
- package/dist/components/Drawer/DrawerDesktop.js +179 -0
- package/dist/components/Drawer/DrawerMobile.js +219 -0
- package/dist/components/Drawer/useDrawerDesktop.js +18 -0
- package/dist/components/Drawer/useDrawerMobile.js +27 -0
- package/dist/components/DropZone/DropZone.js +86 -0
- package/dist/components/DropZone/useFileDropzone.js +24 -0
- package/dist/{FAButton.es.js → components/FAB/FAButton.js} +5 -5
- package/dist/components/Header/Header.js +32 -0
- package/dist/components/Image/GalleryPreview.js +40 -0
- package/dist/{Image.es.js → components/Image/Image.js} +32 -32
- package/dist/components/Image/ImageGallery.js +68 -0
- package/dist/components/Image/LightBox.js +223 -0
- package/dist/{ImageGallery.es.js → components/Image/useImageGallery.js} +0 -2
- package/dist/components/Input/Input.js +219 -0
- package/dist/components/InputMultiple/InputMultiple.js +262 -0
- package/dist/components/Layout/LayoutGeneric.js +13 -0
- package/dist/components/Logo/Logo.js +9 -0
- package/dist/{Menu.es.js → components/Menu/MenuComposable.js} +12 -13
- package/dist/components/OtpInput/OtpInput.js +112 -0
- package/dist/{Pagination.es.js → components/Pagination/Pagination.js} +32 -32
- package/dist/{ProfilePictureUpload.es.js → components/ProfilePictureUpload/ProfilePictureUpload.js} +56 -57
- package/dist/components/ProgressBar/ProgressBar.js +70 -0
- package/dist/{RadioButton.es.js → components/RadioButton/RadioButton.js} +35 -36
- package/dist/{SegmentedButton.es.js → components/SegmentedButton/SegmentedButton.js} +37 -38
- package/dist/components/Select/Select.js +1005 -0
- package/dist/components/SelectSearch/SelectSearch.js +101 -0
- package/dist/components/Shared/Chip.js +55 -0
- package/dist/components/Shared/HelperComponent.js +24 -0
- package/dist/components/Sidebar/SecondaryBar/SecondaryBar.js +62 -0
- package/dist/components/Sidebar/SecondaryBar/hooks/useSecondaryBarAnimation.js +59 -0
- package/dist/components/Sidebar/SidebarComposable.js +84 -0
- package/dist/components/Sidebar/components/NavigationLink.js +34 -0
- package/dist/components/Sidebar/components/badge.js +33 -0
- package/dist/components/Sidebar/components/changue-account.js +31 -0
- package/dist/components/Sidebar/components/collapse-button.js +18 -0
- package/dist/components/Sidebar/components/company-logo.js +12 -0
- package/dist/components/Sidebar/components/nav-actions.js +98 -0
- package/dist/components/Sidebar/components/nav-links.js +100 -0
- package/dist/components/Sidebar/context/SidebarContext.js +19 -0
- package/dist/components/Sidebar/hooks/SidebarProvider.js +33 -0
- package/dist/components/Sidebar/hooks/useNavBarActions.js +9 -0
- package/dist/components/Sidebar/hooks/useNavBarCollapse.js +11 -0
- package/dist/components/Sidebar/hooks/useSidebarHook.js +13 -0
- package/dist/components/Sidebar/ui/useNavbarAnimation.js +326 -0
- package/dist/{Skeleton.es.js → components/Skeleton/Skeleton.js} +16 -18
- package/dist/components/Spinner/Spinner.js +52 -0
- package/dist/{Steps.es.js → components/Steps/Steps.js} +61 -62
- package/dist/{SwipeContainer.es.js → components/SwipeContainer/SwipeContainer.js} +68 -68
- package/dist/{Switch.es.js → components/Switch/Switch.js} +17 -18
- package/dist/{TabLinks.es.js → components/TabLinks/TabLinks.js} +11 -11
- package/dist/components/TabSwitch/TabSwitch.js +57 -0
- package/dist/{Table.es.js → components/Table/Table.js} +38 -41
- package/dist/{TextArea.es.js → components/TextArea/TextArea.js} +24 -26
- package/dist/components/Toaster/ToastProvider.js +6 -0
- package/dist/{Toast.es.js → components/Toaster/Toaster.js} +48 -48
- package/dist/components/Tooltip/Tootip.js +62 -0
- package/dist/hooks/useClickOutside.js +24 -0
- package/dist/{useDragScroll-CHN9OMwn.js → hooks/useDragScroll.js} +1 -1
- package/dist/hooks/useLabelBackground.js +25 -0
- package/dist/index.js +119 -0
- package/dist/{cn-B6yFEsav.js → lib/cn.js} +2 -2
- package/dist/lib/utils.js +54 -0
- package/dist/node_modules/@date-fns/tz/date/index.js +61 -0
- package/dist/node_modules/@date-fns/tz/date/mini.js +69 -0
- package/dist/node_modules/@date-fns/tz/tzName/index.js +11 -0
- package/dist/node_modules/@date-fns/tz/tzOffset/index.js +22 -0
- package/dist/{index-BOQuZ0gG.js → node_modules/class-variance-authority/dist/index.js} +10 -9
- package/dist/node_modules/date-fns/_lib/addLeadingZeros.js +7 -0
- package/dist/node_modules/date-fns/_lib/defaultOptions.js +7 -0
- package/dist/node_modules/date-fns/_lib/format/formatters.js +583 -0
- package/dist/node_modules/date-fns/_lib/format/lightFormatters.js +59 -0
- package/dist/node_modules/date-fns/_lib/format/longFormatters.js +52 -0
- package/dist/node_modules/date-fns/_lib/getTimezoneOffsetInMilliseconds.js +18 -0
- package/dist/node_modules/date-fns/_lib/normalizeDates.js +11 -0
- package/dist/node_modules/date-fns/_lib/normalizeInterval.js +8 -0
- package/dist/node_modules/date-fns/_lib/protectedTokens.js +20 -0
- package/dist/node_modules/date-fns/addDays.js +10 -0
- package/dist/node_modules/date-fns/addMonths.js +20 -0
- package/dist/node_modules/date-fns/addWeeks.js +8 -0
- package/dist/node_modules/date-fns/addYears.js +8 -0
- package/dist/node_modules/date-fns/constants.js +6 -0
- package/dist/node_modules/date-fns/constructFrom.js +8 -0
- package/dist/node_modules/date-fns/differenceInCalendarDays.js +16 -0
- package/dist/node_modules/date-fns/differenceInCalendarMonths.js +13 -0
- package/dist/node_modules/date-fns/eachMonthOfInterval.js +17 -0
- package/dist/node_modules/date-fns/eachYearOfInterval.js +17 -0
- package/dist/node_modules/date-fns/endOfISOWeek.js +8 -0
- package/dist/node_modules/date-fns/endOfMonth.js +9 -0
- package/dist/node_modules/date-fns/endOfWeek.js +10 -0
- package/dist/node_modules/date-fns/endOfYear.js +9 -0
- package/dist/node_modules/date-fns/format.js +58 -0
- package/dist/node_modules/date-fns/getDayOfYear.js +11 -0
- package/dist/node_modules/date-fns/getDaysInMonth.js +10 -0
- package/dist/node_modules/date-fns/getISOWeek.js +12 -0
- package/dist/node_modules/date-fns/getISOWeekYear.js +15 -0
- package/dist/node_modules/date-fns/getMonth.js +8 -0
- package/dist/node_modules/date-fns/getWeek.js +12 -0
- package/dist/node_modules/date-fns/getWeekYear.js +16 -0
- package/dist/node_modules/date-fns/getYear.js +8 -0
- package/dist/node_modules/date-fns/isAfter.js +8 -0
- package/dist/node_modules/date-fns/isBefore.js +8 -0
- package/dist/node_modules/date-fns/isDate.js +7 -0
- package/dist/node_modules/date-fns/isSameDay.js +14 -0
- package/dist/node_modules/date-fns/isSameMonth.js +13 -0
- package/dist/node_modules/date-fns/isSameYear.js +13 -0
- package/dist/node_modules/date-fns/isValid.js +9 -0
- package/dist/node_modules/date-fns/locale/_lib/buildFormatLongFn.js +9 -0
- package/dist/node_modules/date-fns/locale/_lib/buildLocalizeFn.js +18 -0
- package/dist/node_modules/date-fns/locale/_lib/buildMatchFn.js +31 -0
- package/dist/node_modules/date-fns/locale/_lib/buildMatchPatternFn.js +15 -0
- package/dist/node_modules/date-fns/locale/en-US/_lib/formatDistance.js +70 -0
- package/dist/node_modules/date-fns/locale/en-US/_lib/formatLong.js +33 -0
- package/dist/node_modules/date-fns/locale/en-US/_lib/formatRelative.js +11 -0
- package/dist/node_modules/date-fns/locale/en-US/_lib/localize.js +155 -0
- package/dist/node_modules/date-fns/locale/en-US/_lib/match.js +110 -0
- package/dist/node_modules/date-fns/locale/en-US.js +21 -0
- package/dist/node_modules/date-fns/locale/es/_lib/formatDistance.js +70 -0
- package/dist/node_modules/date-fns/locale/es/_lib/formatLong.js +33 -0
- package/dist/node_modules/date-fns/locale/es/_lib/formatRelative.js +18 -0
- package/dist/node_modules/date-fns/locale/es/_lib/localize.js +143 -0
- package/dist/node_modules/date-fns/locale/es/_lib/match.js +116 -0
- package/dist/node_modules/date-fns/locale/es.js +21 -0
- package/dist/node_modules/date-fns/max.js +14 -0
- package/dist/node_modules/date-fns/min.js +14 -0
- package/dist/node_modules/date-fns/setMonth.js +13 -0
- package/dist/node_modules/date-fns/setYear.js +10 -0
- package/dist/node_modules/date-fns/startOfDay.js +9 -0
- package/dist/node_modules/date-fns/startOfISOWeek.js +8 -0
- package/dist/node_modules/date-fns/startOfISOWeekYear.js +11 -0
- package/dist/node_modules/date-fns/startOfMonth.js +9 -0
- package/dist/node_modules/date-fns/startOfWeek.js +10 -0
- package/dist/node_modules/date-fns/startOfWeekYear.js +12 -0
- package/dist/node_modules/date-fns/startOfYear.js +9 -0
- package/dist/node_modules/date-fns/toDate.js +8 -0
- package/dist/node_modules/input-otp/dist/index.js +194 -0
- package/dist/node_modules/react-day-picker/dist/esm/DayPicker.js +227 -0
- package/dist/node_modules/react-day-picker/dist/esm/UI.js +22 -0
- package/dist/node_modules/react-day-picker/dist/esm/classes/CalendarDay.js +19 -0
- package/dist/node_modules/react-day-picker/dist/esm/classes/CalendarMonth.js +8 -0
- package/dist/node_modules/react-day-picker/dist/esm/classes/CalendarWeek.js +8 -0
- package/dist/node_modules/react-day-picker/dist/esm/classes/DateLib.js +147 -0
- package/dist/node_modules/react-day-picker/dist/esm/components/Button.js +7 -0
- package/dist/node_modules/react-day-picker/dist/esm/components/CaptionLabel.js +7 -0
- package/dist/node_modules/react-day-picker/dist/esm/components/Chevron.js +18 -0
- package/dist/node_modules/react-day-picker/dist/esm/components/Day.js +8 -0
- package/dist/node_modules/react-day-picker/dist/esm/components/DayButton.js +10 -0
- package/dist/node_modules/react-day-picker/dist/esm/components/Dropdown.js +19 -0
- package/dist/node_modules/react-day-picker/dist/esm/components/DropdownNav.js +7 -0
- package/dist/node_modules/react-day-picker/dist/esm/components/Footer.js +7 -0
- package/dist/node_modules/react-day-picker/dist/esm/components/Month.js +8 -0
- package/dist/node_modules/react-day-picker/dist/esm/components/MonthCaption.js +8 -0
- package/dist/node_modules/react-day-picker/dist/esm/components/MonthGrid.js +7 -0
- package/dist/node_modules/react-day-picker/dist/esm/components/Months.js +7 -0
- package/dist/node_modules/react-day-picker/dist/esm/components/MonthsDropdown.js +9 -0
- package/dist/node_modules/react-day-picker/dist/esm/components/Nav.js +27 -0
- package/dist/node_modules/react-day-picker/dist/esm/components/NextMonthButton.js +9 -0
- package/dist/node_modules/react-day-picker/dist/esm/components/Option.js +7 -0
- package/dist/node_modules/react-day-picker/dist/esm/components/PreviousMonthButton.js +9 -0
- package/dist/node_modules/react-day-picker/dist/esm/components/Root.js +8 -0
- package/dist/node_modules/react-day-picker/dist/esm/components/Select.js +7 -0
- package/dist/node_modules/react-day-picker/dist/esm/components/Week.js +8 -0
- package/dist/node_modules/react-day-picker/dist/esm/components/WeekNumber.js +8 -0
- package/dist/node_modules/react-day-picker/dist/esm/components/WeekNumberHeader.js +7 -0
- package/dist/node_modules/react-day-picker/dist/esm/components/Weekday.js +7 -0
- package/dist/node_modules/react-day-picker/dist/esm/components/Weekdays.js +11 -0
- package/dist/node_modules/react-day-picker/dist/esm/components/Weeks.js +7 -0
- package/dist/node_modules/react-day-picker/dist/esm/components/YearsDropdown.js +9 -0
- package/dist/node_modules/react-day-picker/dist/esm/components/custom-components.js +54 -0
- package/dist/node_modules/react-day-picker/dist/esm/formatters/formatCaption.js +9 -0
- package/dist/node_modules/react-day-picker/dist/esm/formatters/formatDay.js +7 -0
- package/dist/node_modules/react-day-picker/dist/esm/formatters/formatMonthDropdown.js +7 -0
- package/dist/node_modules/react-day-picker/dist/esm/formatters/formatWeekNumber.js +7 -0
- package/dist/node_modules/react-day-picker/dist/esm/formatters/formatWeekNumberHeader.js +6 -0
- package/dist/node_modules/react-day-picker/dist/esm/formatters/formatWeekdayName.js +7 -0
- package/dist/node_modules/react-day-picker/dist/esm/formatters/formatYearDropdown.js +9 -0
- package/dist/node_modules/react-day-picker/dist/esm/formatters/index.js +18 -0
- package/dist/node_modules/react-day-picker/dist/esm/helpers/calculateFocusTarget.js +19 -0
- package/dist/node_modules/react-day-picker/dist/esm/helpers/createGetModifiers.js +42 -0
- package/dist/node_modules/react-day-picker/dist/esm/helpers/endOfBroadcastWeek.js +9 -0
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getBroadcastWeeksInMonth.js +7 -0
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getClassNamesForModifiers.js +7 -0
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getComponents.js +10 -0
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getDataAttributes.js +16 -0
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getDates.js +21 -0
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getDays.js +10 -0
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getDefaultClassNames.js +16 -0
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getDisplayMonths.js +13 -0
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getFocusableDate.js +15 -0
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getFormatters.js +10 -0
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getInitialMonth.js +13 -0
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getMonthOptions.js +13 -0
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getMonths.js +24 -0
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getNavMonth.js +13 -0
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getNextFocus.js +12 -0
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getNextMonth.js +12 -0
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getPreviousMonth.js +12 -0
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getStyleForModifiers.js +13 -0
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getWeekdays.js +11 -0
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getWeeks.js +7 -0
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getYearOptions.js +16 -0
- package/dist/node_modules/react-day-picker/dist/esm/helpers/startOfBroadcastWeek.js +7 -0
- package/dist/node_modules/react-day-picker/dist/esm/helpers/useControlledValue.js +8 -0
- package/dist/node_modules/react-day-picker/dist/esm/labels/index.js +26 -0
- package/dist/node_modules/react-day-picker/dist/esm/labels/labelDayButton.js +10 -0
- package/dist/node_modules/react-day-picker/dist/esm/labels/labelGrid.js +9 -0
- package/dist/node_modules/react-day-picker/dist/esm/labels/labelGridcell.js +8 -0
- package/dist/node_modules/react-day-picker/dist/esm/labels/labelMonthDropdown.js +6 -0
- package/dist/node_modules/react-day-picker/dist/esm/labels/labelNav.js +6 -0
- package/dist/node_modules/react-day-picker/dist/esm/labels/labelNext.js +6 -0
- package/dist/node_modules/react-day-picker/dist/esm/labels/labelPrevious.js +6 -0
- package/dist/node_modules/react-day-picker/dist/esm/labels/labelWeekNumber.js +6 -0
- package/dist/node_modules/react-day-picker/dist/esm/labels/labelWeekNumberHeader.js +6 -0
- package/dist/node_modules/react-day-picker/dist/esm/labels/labelWeekday.js +7 -0
- package/dist/node_modules/react-day-picker/dist/esm/labels/labelYearDropdown.js +6 -0
- package/dist/node_modules/react-day-picker/dist/esm/selection/useMulti.js +21 -0
- package/dist/node_modules/react-day-picker/dist/esm/selection/useRange.js +18 -0
- package/dist/node_modules/react-day-picker/dist/esm/selection/useSingle.js +15 -0
- package/dist/node_modules/react-day-picker/dist/esm/useAnimation.js +56 -0
- package/dist/node_modules/react-day-picker/dist/esm/useCalendar.js +44 -0
- package/dist/node_modules/react-day-picker/dist/esm/useDayPicker.js +12 -0
- package/dist/node_modules/react-day-picker/dist/esm/useFocus.js +23 -0
- package/dist/node_modules/react-day-picker/dist/esm/useSelection.js +19 -0
- package/dist/node_modules/react-day-picker/dist/esm/utils/addToRange.js +32 -0
- package/dist/node_modules/react-day-picker/dist/esm/utils/dateMatchModifiers.js +26 -0
- package/dist/node_modules/react-day-picker/dist/esm/utils/rangeContainsDayOfWeek.js +15 -0
- package/dist/node_modules/react-day-picker/dist/esm/utils/rangeContainsModifiers.js +28 -0
- package/dist/node_modules/react-day-picker/dist/esm/utils/rangeIncludesDate.js +9 -0
- package/dist/node_modules/react-day-picker/dist/esm/utils/rangeOverlaps.js +8 -0
- package/dist/node_modules/react-day-picker/dist/esm/utils/typeguards.js +26 -0
- package/dist/prometeo-design-system.css +1 -1
- package/dist/useDevice.js +4 -0
- package/package.json +114 -115
- package/dist/CardProfile.es.js +0 -5
- package/dist/DatePicker.es.js +0 -3441
- package/dist/DialogModal.es.js +0 -75
- package/dist/DrawerDesktop.es.js +0 -192
- package/dist/DrawerMobile.es.js +0 -242
- package/dist/DropZone.es.js +0 -87
- package/dist/Header.es.js +0 -32
- package/dist/HelperComponent-g_xuKWzK.js +0 -24
- package/dist/Icons-DtFC5DJ7.js +0 -1079
- package/dist/Icons.es.js +0 -5
- package/dist/ImageGallery-Ckxg9OIC.js +0 -317
- package/dist/Input-Cck37DpG.js +0 -240
- package/dist/Input.es.js +0 -4
- package/dist/InputMultiple.es.js +0 -263
- package/dist/LayoutGeneric-CbaoatQB.js +0 -26
- package/dist/LayoutGeneric.es.js +0 -4
- package/dist/Logo.es.js +0 -9
- package/dist/OtpInput.es.js +0 -301
- package/dist/ProgressBar.es.js +0 -70
- package/dist/Select-BD5FTxVw.js +0 -1100
- package/dist/Select.es.js +0 -4
- package/dist/SelectSearch.es.js +0 -237
- package/dist/Spinner.es.js +0 -52
- package/dist/ToastProvider.es.js +0 -6
- package/dist/Tooltip.es.js +0 -62
- package/dist/jsx-runtime-DKDX3adD.js +0 -281
- package/dist/prometeo-design-system.es.js +0 -1002
- /package/dist/{useDevice.es.js → hooks/useDevice.js} +0 -0
package/dist/Icons.es.js
DELETED
|
@@ -1,317 +0,0 @@
|
|
|
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
|
-
};
|
package/dist/Input-Cck37DpG.js
DELETED
|
@@ -1,240 +0,0 @@
|
|
|
1
|
-
import { j as r } from "./jsx-runtime-DKDX3adD.js";
|
|
2
|
-
import { g as _, h as q, a as V } from "./Icons-DtFC5DJ7.js";
|
|
3
|
-
import { c as t } from "./cn-B6yFEsav.js";
|
|
4
|
-
import { useRef as F, useLayoutEffect as ee, memo as te, forwardRef as re, useState as oe } from "react";
|
|
5
|
-
import le from "./Spinner.es.js";
|
|
6
|
-
import { H as se } from "./HelperComponent-g_xuKWzK.js";
|
|
7
|
-
const ae = (o) => {
|
|
8
|
-
let e = o;
|
|
9
|
-
for (; e && e !== document.body; ) {
|
|
10
|
-
const n = window.getComputedStyle(e).backgroundColor;
|
|
11
|
-
if (n && n !== "transparent" && n !== "rgba(0, 0, 0, 0)")
|
|
12
|
-
return n;
|
|
13
|
-
e = e.parentElement;
|
|
14
|
-
}
|
|
15
|
-
const l = window.getComputedStyle(document.body).backgroundColor;
|
|
16
|
-
return l && l !== "transparent" && l !== "rgba(0, 0, 0, 0)" ? l : "rgb(255, 255, 255)";
|
|
17
|
-
};
|
|
18
|
-
function ne() {
|
|
19
|
-
const o = F(null);
|
|
20
|
-
return ee(() => {
|
|
21
|
-
if (!o.current || !o.current.parentElement) return;
|
|
22
|
-
const e = ae(o.current.parentElement);
|
|
23
|
-
o.current.style.backgroundColor = e;
|
|
24
|
-
}, []), {
|
|
25
|
-
ref: o
|
|
26
|
-
};
|
|
27
|
-
}
|
|
28
|
-
const g = {
|
|
29
|
-
default: {
|
|
30
|
-
container: "",
|
|
31
|
-
input: t(
|
|
32
|
-
"border-neutral-default-default text-neutral-default-default!",
|
|
33
|
-
"focus:ring-primary-default-default focus:ring-[1px] focus:border-primary-default-default ",
|
|
34
|
-
"hover:border-neutral-strong-default"
|
|
35
|
-
),
|
|
36
|
-
label: t("text-neutral-medium-default"),
|
|
37
|
-
icon: t(
|
|
38
|
-
"text-neutral-medium-default",
|
|
39
|
-
"peer-focus:text-primary-default-default"
|
|
40
|
-
)
|
|
41
|
-
},
|
|
42
|
-
error: {
|
|
43
|
-
container: "",
|
|
44
|
-
input: t(
|
|
45
|
-
"border-error-default-default text-neutral-default-default",
|
|
46
|
-
"focus:border-error-default focus:border-2",
|
|
47
|
-
"focus:ring-0 focus:ring-error-default/20"
|
|
48
|
-
),
|
|
49
|
-
label: t("text-lime-500", "peer-focus:text-error-light"),
|
|
50
|
-
icon: t("text-error-light", "peer-focus:text-error-light")
|
|
51
|
-
},
|
|
52
|
-
success: {
|
|
53
|
-
container: "",
|
|
54
|
-
input: t(
|
|
55
|
-
"border-success-default-default text-neutral-default-default",
|
|
56
|
-
"focus:border-success-default focus:border-2",
|
|
57
|
-
"focus:ring-0 focus:ring-success-default/20"
|
|
58
|
-
),
|
|
59
|
-
label: t("text-success", "peer-focus:text-success-light"),
|
|
60
|
-
icon: t("text-success-light", "peer-focus:text-success-light")
|
|
61
|
-
}
|
|
62
|
-
}, S = re(
|
|
63
|
-
({
|
|
64
|
-
label: o,
|
|
65
|
-
icon: e,
|
|
66
|
-
iconPosition: l = "left",
|
|
67
|
-
onChange: C,
|
|
68
|
-
value: n,
|
|
69
|
-
name: b,
|
|
70
|
-
width: x = "100%",
|
|
71
|
-
height: u,
|
|
72
|
-
variant: c = "default",
|
|
73
|
-
labelVariant: a = "default",
|
|
74
|
-
size: H = "medium",
|
|
75
|
-
disabled: f = !1,
|
|
76
|
-
type: s = "text",
|
|
77
|
-
isFetching: p,
|
|
78
|
-
errorComponent: h,
|
|
79
|
-
helperComponent: w,
|
|
80
|
-
placeholder: $,
|
|
81
|
-
required: N = !1,
|
|
82
|
-
onFocus: k,
|
|
83
|
-
onBlur: I,
|
|
84
|
-
onKeyDown: L,
|
|
85
|
-
onKeyUp: R,
|
|
86
|
-
className: B,
|
|
87
|
-
style: P,
|
|
88
|
-
readOnly: D = !1,
|
|
89
|
-
onClear: z,
|
|
90
|
-
...v
|
|
91
|
-
}, A) => {
|
|
92
|
-
const [y, M] = oe(!1), { ref: O } = ne();
|
|
93
|
-
let d = H;
|
|
94
|
-
u && (d = "customHeight");
|
|
95
|
-
const i = {
|
|
96
|
-
small: {
|
|
97
|
-
container: "text-sm",
|
|
98
|
-
input: "h-10 px-3 text-[1rem] prometeo-fonts-body-large",
|
|
99
|
-
label: ` prometeo-fonts-label-large
|
|
100
|
-
peer-focus:prometeo-fonts-label-large
|
|
101
|
-
peer-placeholder-shown:${a === "default" ? "prometeo-fonts-body-large" : "prometeo-fonts-label-large"} peer-placeholder-shown:text-neutral-medium-default peer-focus:text-neutral-medium-default `,
|
|
102
|
-
icon: "w-4 h-4 right-3"
|
|
103
|
-
},
|
|
104
|
-
medium: {
|
|
105
|
-
container: "text-base",
|
|
106
|
-
input: "h-12 px-3 prometeo-fonts-body-large",
|
|
107
|
-
label: ` prometeo-fonts-label-large
|
|
108
|
-
peer-focus:prometeo-fonts-label-large
|
|
109
|
-
peer-placeholder-shown:${a === "default" ? "prometeo-fonts-body-large" : "prometeo-fonts-label-large"} peer-placeholder-shown:text-neutral-medium-default text-neutral-medium-default peer-focus:text-neutral-medium-default `,
|
|
110
|
-
icon: "w-5 h-5 right-3"
|
|
111
|
-
},
|
|
112
|
-
large: {
|
|
113
|
-
container: "text-lg",
|
|
114
|
-
input: "h-14 px-3 text-lg border-b border-t-0 border-x-0 rounded-none focus:ring-0 prometeo-fonts-body-xlarge ",
|
|
115
|
-
label: "peer-placeholder-shown:prometeo-fonts-body-xlarge peer-focus:prometeo-fonts-label-large peer-focus:text-neutral-medium-default prometeo-fonts-label-large ",
|
|
116
|
-
icon: "w-6 h-6 right-3"
|
|
117
|
-
},
|
|
118
|
-
customHeight: {
|
|
119
|
-
container: "text-base",
|
|
120
|
-
input: "text-base",
|
|
121
|
-
label: "text-sm peer-focus:text-sm peer-placeholder-shown:text-xs ",
|
|
122
|
-
icon: "w-6 h-6 right-3"
|
|
123
|
-
}
|
|
124
|
-
}, T = () => {
|
|
125
|
-
M(!y);
|
|
126
|
-
}, j = {};
|
|
127
|
-
x && x !== "100%" && (j.width = x), u && (j.height = u);
|
|
128
|
-
const E = c === "error" && h, G = !E && w, J = s === "password", K = () => a === "static" ? "-top-1 -translate-y-full left-0 pl-3" : e ? `${m ? "peer-placeholder-shown:top-[calc(50%-12px)]" : "peer-placeholder-shown:top-1/2"} -translate-y-1/2 peer-focus:top-0 peer-focus:left-3 peer-focus:px-1 peer-focus:ml-0 peer-focus:mr-0 ${l === "left" ? "peer-placeholder-shown:ml-6" : "peer-placeholder-shown:mr-6"}` : `${m ? "peer-placeholder-shown:top-[calc(50%-12px)]" : "peer-placeholder-shown:top-1/2"} -translate-y-1/2 peer-focus:top-0 peer-focus:left-3 peer-focus:px-1`, Q = () => u ? i.customHeight.label : i[d].label, U = () => u ? { height: u } : {}, W = () => a === "default" ? o : $ || o || "", X = () => J ? e ? l === "left" ? "pl-10 pr-10" : "pr-16" : "pr-10" : e ? l === "left" ? "pl-10 pr-3" : "pr-10 pl-3" : "", Y = a === "default" && "transition-all duration-200 ease-in-out", m = h || w;
|
|
129
|
-
return /* @__PURE__ */ r.jsxs(
|
|
130
|
-
"div",
|
|
131
|
-
{
|
|
132
|
-
className: t(
|
|
133
|
-
"relative",
|
|
134
|
-
i[d].container,
|
|
135
|
-
!x && "w-full",
|
|
136
|
-
"bg-inherit",
|
|
137
|
-
a === "static" && "mt-2",
|
|
138
|
-
B
|
|
139
|
-
),
|
|
140
|
-
style: { ...P, ...j },
|
|
141
|
-
children: [
|
|
142
|
-
/* @__PURE__ */ r.jsx(
|
|
143
|
-
"input",
|
|
144
|
-
{
|
|
145
|
-
id: b,
|
|
146
|
-
name: b,
|
|
147
|
-
ref: A,
|
|
148
|
-
value: n,
|
|
149
|
-
placeholder: W(),
|
|
150
|
-
type: s === "password" && y ? "text" : s,
|
|
151
|
-
className: t(
|
|
152
|
-
"peer w-full border rounded-lg bg-transparent appearance-none transition-all duration-200 ease-in-out",
|
|
153
|
-
"focus:outline-none px-3",
|
|
154
|
-
a === "default" && "placeholder:text-transparent",
|
|
155
|
-
a === "static" && "placeholder:text-neutral-medium-default ",
|
|
156
|
-
g[c].input,
|
|
157
|
-
i[d].input,
|
|
158
|
-
e && "pr-10",
|
|
159
|
-
f && "bg-transparent opacity-60 border-neutral-strong-default text-neutral-medium-disabled",
|
|
160
|
-
g[c].container,
|
|
161
|
-
X()
|
|
162
|
-
),
|
|
163
|
-
style: U(),
|
|
164
|
-
onChange: C,
|
|
165
|
-
onFocus: k,
|
|
166
|
-
onBlur: I,
|
|
167
|
-
disabled: f,
|
|
168
|
-
required: N,
|
|
169
|
-
onKeyDown: L,
|
|
170
|
-
onKeyUp: R,
|
|
171
|
-
defaultValue: v.defaultValue,
|
|
172
|
-
readOnly: D,
|
|
173
|
-
...v
|
|
174
|
-
}
|
|
175
|
-
),
|
|
176
|
-
/* @__PURE__ */ r.jsx(
|
|
177
|
-
"label",
|
|
178
|
-
{
|
|
179
|
-
ref: O,
|
|
180
|
-
htmlFor: b,
|
|
181
|
-
className: t(
|
|
182
|
-
"absolute left-3 pointer-events-none px-1 z-10",
|
|
183
|
-
Y,
|
|
184
|
-
Q(),
|
|
185
|
-
g[c].label,
|
|
186
|
-
K(),
|
|
187
|
-
N && "after:content-['*'] after:text-error-default after:ml-1",
|
|
188
|
-
f && "text-neutral-medium-disabled prometeo-fonts-label-large"
|
|
189
|
-
),
|
|
190
|
-
children: o
|
|
191
|
-
}
|
|
192
|
-
),
|
|
193
|
-
(e || s === "password" || p) && /* @__PURE__ */ r.jsx(
|
|
194
|
-
"button",
|
|
195
|
-
{
|
|
196
|
-
tabIndex: -1,
|
|
197
|
-
type: "button",
|
|
198
|
-
className: t(
|
|
199
|
-
`absolute ${m ? "top-[calc(50%-12px)]" : "top-1/2"} -translate-y-1/2 flex items-center justify-center z-10`,
|
|
200
|
-
i[d].icon,
|
|
201
|
-
g[c].icon,
|
|
202
|
-
s === "password" && !p ? "cursor-pointer" : "pointer-events-none",
|
|
203
|
-
l === "right" ? "right-3" : "left-3"
|
|
204
|
-
),
|
|
205
|
-
onClick: s === "password" && !p ? T : void 0,
|
|
206
|
-
onMouseDown: (Z) => s === "password" && !p && Z.preventDefault(),
|
|
207
|
-
children: /* @__PURE__ */ r.jsxs("div", { children: [
|
|
208
|
-
p && s !== "password" && /* @__PURE__ */ r.jsx("div", { children: /* @__PURE__ */ r.jsx(le, { size: 24, color: "#7c86ff", loading: !0, variant: "clip" }) }),
|
|
209
|
-
s === "password" && (y ? /* @__PURE__ */ r.jsx(_, { size: 24, className: "" }) : /* @__PURE__ */ r.jsx(q, { size: 24, className: "" })),
|
|
210
|
-
e
|
|
211
|
-
] })
|
|
212
|
-
}
|
|
213
|
-
),
|
|
214
|
-
z && /* @__PURE__ */ r.jsx(
|
|
215
|
-
"button",
|
|
216
|
-
{
|
|
217
|
-
type: "button",
|
|
218
|
-
className: t(
|
|
219
|
-
`absolute ${m ? "top-[calc(50%-12px)]" : "top-1/2"} -translate-y-1/2 flex items-center justify-center z-10 right-1`,
|
|
220
|
-
"size-6 p-1 rounded-full",
|
|
221
|
-
"hover:bg-neutral-medium-hover transition-colors",
|
|
222
|
-
f && "opacity-50 cursor-not-allowed"
|
|
223
|
-
),
|
|
224
|
-
disabled: f,
|
|
225
|
-
onClick: z,
|
|
226
|
-
children: /* @__PURE__ */ r.jsx(V, { size: 20, className: "" })
|
|
227
|
-
}
|
|
228
|
-
),
|
|
229
|
-
m && /* @__PURE__ */ r.jsx("div", { className: "min-h-6", children: (E || G) && /* @__PURE__ */ r.jsx(se, { className: "absolute ", variant: c, children: h || w }) })
|
|
230
|
-
]
|
|
231
|
-
}
|
|
232
|
-
);
|
|
233
|
-
}
|
|
234
|
-
);
|
|
235
|
-
S.displayName = "Input";
|
|
236
|
-
const me = te(S);
|
|
237
|
-
export {
|
|
238
|
-
me as I,
|
|
239
|
-
ne as u
|
|
240
|
-
};
|
package/dist/Input.es.js
DELETED