prometeo-design-system 2.8.6 → 2.8.8
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.d.ts +16 -12
- package/dist/index.js +127 -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/DialogModal.es.js
DELETED
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
import { j as o } from "./jsx-runtime-DKDX3adD.js";
|
|
2
|
-
import { forwardRef as h, memo as s, useState as D, useRef as p, useCallback as n, useImperativeHandle as R } from "react";
|
|
3
|
-
import { c as j } from "./cn-B6yFEsav.js";
|
|
4
|
-
const C = h(
|
|
5
|
-
({ children: e, onClose: t, className: a }, i) => {
|
|
6
|
-
const [l, r] = D(!1), [c, f] = D(null), x = p(t), u = p(c);
|
|
7
|
-
x.current = t, u.current = c;
|
|
8
|
-
const m = n((g) => {
|
|
9
|
-
f(g ?? null), r(!0);
|
|
10
|
-
}, []), d = n(() => {
|
|
11
|
-
r(!1), x.current?.(u.current), setTimeout(() => f(null), 300);
|
|
12
|
-
}, []);
|
|
13
|
-
return R(
|
|
14
|
-
i,
|
|
15
|
-
() => ({
|
|
16
|
-
open: m,
|
|
17
|
-
close: d,
|
|
18
|
-
isOpen: l,
|
|
19
|
-
getContext: () => u.current
|
|
20
|
-
}),
|
|
21
|
-
[m, d, l]
|
|
22
|
-
), /* @__PURE__ */ o.jsx(o.Fragment, { children: l && /* @__PURE__ */ o.jsx(
|
|
23
|
-
"div",
|
|
24
|
-
{
|
|
25
|
-
className: "fixed inset-0 z-50 flex items-center justify-center bg-black/30 backdrop-blur-[1.5px]",
|
|
26
|
-
onClick: d,
|
|
27
|
-
children: /* @__PURE__ */ o.jsx(
|
|
28
|
-
"div",
|
|
29
|
-
{
|
|
30
|
-
className: j(
|
|
31
|
-
"bg-neutral-default-default w-3/4 h-3/4 xl:w-3/4 xl:h-10/12 rounded-lg shadow-lg border-neutral-strong-default border relative p-6",
|
|
32
|
-
a
|
|
33
|
-
),
|
|
34
|
-
onClick: (g) => g.stopPropagation(),
|
|
35
|
-
children: typeof e == "function" ? e(c) : e
|
|
36
|
-
}
|
|
37
|
-
)
|
|
38
|
-
}
|
|
39
|
-
) });
|
|
40
|
-
}
|
|
41
|
-
);
|
|
42
|
-
C.displayName = "Dialog";
|
|
43
|
-
const b = s(({ children: e, className: t }) => /* @__PURE__ */ o.jsx("div", { className: t, children: /* @__PURE__ */ o.jsx("div", { className: j("flex flex-col gap-4 h-full"), children: e }) }));
|
|
44
|
-
b.displayName = "DialogContent";
|
|
45
|
-
const N = s(({ children: e, className: t }) => /* @__PURE__ */ o.jsx("h1", { className: t, children: e }));
|
|
46
|
-
N.displayName = "DialogTitle";
|
|
47
|
-
const v = s(({ children: e, className: t }) => /* @__PURE__ */ o.jsx("div", { className: t, children: e }));
|
|
48
|
-
v.displayName = "DialogHeader";
|
|
49
|
-
const y = s(({ children: e, className: t }) => /* @__PURE__ */ o.jsx("div", { className: t, children: e }));
|
|
50
|
-
y.displayName = "DialogFooter";
|
|
51
|
-
const k = Object.assign(C, {
|
|
52
|
-
Content: b,
|
|
53
|
-
Header: v,
|
|
54
|
-
Footer: y,
|
|
55
|
-
Title: N
|
|
56
|
-
});
|
|
57
|
-
k.displayName = "DialogModal";
|
|
58
|
-
const H = () => {
|
|
59
|
-
const e = p(null), t = n((r) => {
|
|
60
|
-
e.current?.open(r);
|
|
61
|
-
}, []), a = n(() => {
|
|
62
|
-
e.current?.close();
|
|
63
|
-
}, []), i = n(() => e.current?.isOpen ?? !1, []), l = n(() => e.current?.getContext() ?? null, []);
|
|
64
|
-
return {
|
|
65
|
-
ref: e,
|
|
66
|
-
open: t,
|
|
67
|
-
close: a,
|
|
68
|
-
isOpen: i,
|
|
69
|
-
getContext: l
|
|
70
|
-
};
|
|
71
|
-
};
|
|
72
|
-
export {
|
|
73
|
-
k as default,
|
|
74
|
-
H as useDialogControl
|
|
75
|
-
};
|
package/dist/DrawerDesktop.es.js
DELETED
|
@@ -1,192 +0,0 @@
|
|
|
1
|
-
import { j as l } from "./jsx-runtime-DKDX3adD.js";
|
|
2
|
-
import { c as h } from "./cn-B6yFEsav.js";
|
|
3
|
-
import { c as k } from "./index-BOQuZ0gG.js";
|
|
4
|
-
import { createPortal as E } from "react-dom";
|
|
5
|
-
import { forwardRef as V, useRef as u, useState as N, useEffect as d, useCallback as f, useImperativeHandle as I } from "react";
|
|
6
|
-
import { a as P } from "./Icons-DtFC5DJ7.js";
|
|
7
|
-
import B from "./Button.es.js";
|
|
8
|
-
const L = V((t, s) => {
|
|
9
|
-
const n = u(null), [e, a] = N(t.defaultOpen || !1), [r, y] = N(null), b = u(t.onClose), c = u(r), {
|
|
10
|
-
modal: i = !1,
|
|
11
|
-
children: m,
|
|
12
|
-
className: w,
|
|
13
|
-
direction: C = "left",
|
|
14
|
-
attachToParent: x = !1,
|
|
15
|
-
closeOnOverlayClick: o = !1,
|
|
16
|
-
hideCloseButton: T = !1
|
|
17
|
-
} = t, g = u(o), O = u(e);
|
|
18
|
-
c.current = r, d(() => {
|
|
19
|
-
O.current = e;
|
|
20
|
-
}, [e]), d(() => {
|
|
21
|
-
c.current = r;
|
|
22
|
-
}, [r]), d(() => {
|
|
23
|
-
g.current = o;
|
|
24
|
-
}, [o]);
|
|
25
|
-
const R = (p) => {
|
|
26
|
-
if (!n.current)
|
|
27
|
-
return;
|
|
28
|
-
const z = n.current;
|
|
29
|
-
z && !z.contains(p.target) && g.current && O.current && v();
|
|
30
|
-
};
|
|
31
|
-
d(() => {
|
|
32
|
-
if (!g.current || i || !e)
|
|
33
|
-
return;
|
|
34
|
-
const p = setTimeout(() => {
|
|
35
|
-
document.addEventListener("click", R);
|
|
36
|
-
}, 0);
|
|
37
|
-
return () => {
|
|
38
|
-
clearTimeout(p), document.removeEventListener("click", R);
|
|
39
|
-
};
|
|
40
|
-
}, [o, e, i]), d(() => {
|
|
41
|
-
b.current = t.onClose;
|
|
42
|
-
}, [t.onClose]);
|
|
43
|
-
const j = f((p) => {
|
|
44
|
-
y(p ?? null), a(!0);
|
|
45
|
-
}, []), v = f(() => {
|
|
46
|
-
a(!1), b.current?.(c.current), setTimeout(() => y(null), 300);
|
|
47
|
-
}, []);
|
|
48
|
-
I(
|
|
49
|
-
s,
|
|
50
|
-
() => ({
|
|
51
|
-
open: j,
|
|
52
|
-
close: v,
|
|
53
|
-
isOpen: e,
|
|
54
|
-
getContext: () => c.current
|
|
55
|
-
}),
|
|
56
|
-
[e, j, v]
|
|
57
|
-
);
|
|
58
|
-
const D = /* @__PURE__ */ l.jsx(
|
|
59
|
-
Y,
|
|
60
|
-
{
|
|
61
|
-
context: r,
|
|
62
|
-
ref: n,
|
|
63
|
-
isOpen: e,
|
|
64
|
-
close: v,
|
|
65
|
-
direction: C,
|
|
66
|
-
modal: i,
|
|
67
|
-
className: w,
|
|
68
|
-
attachToParent: x,
|
|
69
|
-
closeOnOverlayClick: o,
|
|
70
|
-
hideCloseButton: T,
|
|
71
|
-
children: typeof m == "function" ? m(r) : m
|
|
72
|
-
}
|
|
73
|
-
);
|
|
74
|
-
return x ? D : E(D, document.body);
|
|
75
|
-
});
|
|
76
|
-
L.displayName = "DrawerDesktopV2";
|
|
77
|
-
const Y = ({
|
|
78
|
-
ref: t,
|
|
79
|
-
children: s,
|
|
80
|
-
direction: n = "left",
|
|
81
|
-
isOpen: e,
|
|
82
|
-
close: a,
|
|
83
|
-
modal: r = !1,
|
|
84
|
-
className: y,
|
|
85
|
-
attachToParent: b = !1,
|
|
86
|
-
closeOnOverlayClick: c = !1,
|
|
87
|
-
hideCloseButton: i = !1,
|
|
88
|
-
context: m
|
|
89
|
-
}) => {
|
|
90
|
-
d(() => {
|
|
91
|
-
if (e && r) {
|
|
92
|
-
const o = window.scrollY;
|
|
93
|
-
return document.body.style.position = "fixed", document.body.style.top = `-${o}px`, document.body.style.width = "100%", () => {
|
|
94
|
-
document.body.style.position = "", document.body.style.top = "", document.body.style.width = "", window.scrollTo(0, o);
|
|
95
|
-
};
|
|
96
|
-
}
|
|
97
|
-
}, [e, r]);
|
|
98
|
-
const w = k("border-neutral-strong-default", {
|
|
99
|
-
variants: {
|
|
100
|
-
isOpen: {
|
|
101
|
-
true: "desktop-drawer-visible",
|
|
102
|
-
false: "desktop-drawer-hidden"
|
|
103
|
-
},
|
|
104
|
-
direction: {
|
|
105
|
-
left: "left-0 border-r-[1px] border-l-0",
|
|
106
|
-
right: "right-0 border-l-[1px] border-r-0"
|
|
107
|
-
}
|
|
108
|
-
}
|
|
109
|
-
}), C = k(
|
|
110
|
-
"fixed inset-0 bg-black/60 z-[55] cursor-default",
|
|
111
|
-
{
|
|
112
|
-
variants: {
|
|
113
|
-
isOpen: {
|
|
114
|
-
true: "drawer-overlay-visible",
|
|
115
|
-
false: "drawer-overlay-hidden"
|
|
116
|
-
}
|
|
117
|
-
}
|
|
118
|
-
}
|
|
119
|
-
), x = k("", {
|
|
120
|
-
variants: {
|
|
121
|
-
direction: {
|
|
122
|
-
left: "right-0",
|
|
123
|
-
right: "left-0"
|
|
124
|
-
}
|
|
125
|
-
}
|
|
126
|
-
});
|
|
127
|
-
return /* @__PURE__ */ l.jsxs(l.Fragment, { children: [
|
|
128
|
-
r && /* @__PURE__ */ l.jsx(
|
|
129
|
-
"div",
|
|
130
|
-
{
|
|
131
|
-
className: h(C({ isOpen: e })),
|
|
132
|
-
onClick: (o) => {
|
|
133
|
-
o.preventDefault(), o.stopPropagation(), c && a();
|
|
134
|
-
},
|
|
135
|
-
"aria-hidden": "true"
|
|
136
|
-
}
|
|
137
|
-
),
|
|
138
|
-
/* @__PURE__ */ l.jsxs(
|
|
139
|
-
"div",
|
|
140
|
-
{
|
|
141
|
-
ref: t,
|
|
142
|
-
className: h(
|
|
143
|
-
"bg-neutral-strong-default h-full top-0 z-60 w-max overflow-y-auto",
|
|
144
|
-
b ? "absolute" : "fixed",
|
|
145
|
-
w({ isOpen: e, direction: n }),
|
|
146
|
-
!i && "p-4 pt-10",
|
|
147
|
-
y
|
|
148
|
-
),
|
|
149
|
-
role: "dialog",
|
|
150
|
-
"aria-modal": r,
|
|
151
|
-
children: [
|
|
152
|
-
!i && /* @__PURE__ */ l.jsx(
|
|
153
|
-
B,
|
|
154
|
-
{
|
|
155
|
-
icon: /* @__PURE__ */ l.jsx(P, { size: 24 }),
|
|
156
|
-
animate: !1,
|
|
157
|
-
type: "button",
|
|
158
|
-
size: "small",
|
|
159
|
-
variant: "text",
|
|
160
|
-
onClick: a,
|
|
161
|
-
label: "",
|
|
162
|
-
color: "secondary",
|
|
163
|
-
className: h(
|
|
164
|
-
"absolute top-0 z-50",
|
|
165
|
-
x({ direction: n })
|
|
166
|
-
),
|
|
167
|
-
"aria-label": "Close drawer"
|
|
168
|
-
}
|
|
169
|
-
),
|
|
170
|
-
typeof s == "function" ? s(m) : s
|
|
171
|
-
]
|
|
172
|
-
}
|
|
173
|
-
)
|
|
174
|
-
] });
|
|
175
|
-
}, J = () => {
|
|
176
|
-
const t = u(null), s = f((r) => {
|
|
177
|
-
t.current?.open(r);
|
|
178
|
-
}, []), n = f(() => {
|
|
179
|
-
t.current?.close();
|
|
180
|
-
}, []), e = f(() => t.current?.isOpen ?? !1, []), a = f(() => t.current?.getContext() ?? null, []);
|
|
181
|
-
return {
|
|
182
|
-
isOpen: e,
|
|
183
|
-
open: s,
|
|
184
|
-
close: n,
|
|
185
|
-
drawerRef: t,
|
|
186
|
-
getContext: a
|
|
187
|
-
};
|
|
188
|
-
};
|
|
189
|
-
export {
|
|
190
|
-
L as default,
|
|
191
|
-
J as useDrawerDesktop
|
|
192
|
-
};
|
package/dist/DrawerMobile.es.js
DELETED
|
@@ -1,242 +0,0 @@
|
|
|
1
|
-
import { j as m } from "./jsx-runtime-DKDX3adD.js";
|
|
2
|
-
import { c as _ } from "./cn-B6yFEsav.js";
|
|
3
|
-
import { forwardRef as V, useState as $, useRef as v, useEffect as y, useCallback as c, useMemo as Q, useImperativeHandle as X } from "react";
|
|
4
|
-
import { createPortal as Z } from "react-dom";
|
|
5
|
-
const B = 44, P = "height 0.5s cubic-bezier(0.32, 0.72, 0, 1)", se = V((l, o) => {
|
|
6
|
-
const { children: D, defaultOpen: s = !1, onClose: g, snapPoints: w = ["60%"], setSnap: d, snap: u, attachToParent: x = !1 } = l, [R, Y] = $(u || "0%"), [M, r] = $(null), O = v(g), T = v(d), f = v(M), p = v(/* @__PURE__ */ new Set());
|
|
7
|
-
O.current = g, f.current = M, y(() => {
|
|
8
|
-
s && S();
|
|
9
|
-
}, [s]), y(() => {
|
|
10
|
-
T.current = d;
|
|
11
|
-
}, [d]);
|
|
12
|
-
const j = c(() => {
|
|
13
|
-
Y("0%"), O.current?.(f.current), setTimeout(() => r(null), 300);
|
|
14
|
-
}, []), S = c((h, k) => {
|
|
15
|
-
Y(h || w[0] || "60%"), r(k ?? null);
|
|
16
|
-
}, [w]), H = Q(() => R !== "0%", [R]);
|
|
17
|
-
y(() => {
|
|
18
|
-
p.current.forEach((h) => {
|
|
19
|
-
try {
|
|
20
|
-
h(H);
|
|
21
|
-
} catch {
|
|
22
|
-
}
|
|
23
|
-
});
|
|
24
|
-
}, [H]), X(o, () => ({
|
|
25
|
-
open: S,
|
|
26
|
-
close: j,
|
|
27
|
-
isOpen: H,
|
|
28
|
-
subscribeOpenChange: (h) => (p.current.add(h), () => {
|
|
29
|
-
p.current.delete(h);
|
|
30
|
-
}),
|
|
31
|
-
getContext: () => f.current
|
|
32
|
-
}), [S, j, H]);
|
|
33
|
-
const F = u || R;
|
|
34
|
-
return x ? /* @__PURE__ */ m.jsx(K, { ...l, snap: F, setSnap: Y, context: M, children: D }) : Z(/* @__PURE__ */ m.jsx(K, { ...l, snap: F, setSnap: Y, context: M, children: D }), document.body);
|
|
35
|
-
}), K = ({ children: l, attachToParent: o = !1, className: D, snap: s, snapPoints: g = ["60%"], setSnap: w, hideOnClose: d = !1, unmountChildrenOnClose: u = !1, header: x, modal: R = !1, closeOnOverlayClick: Y = !1, context: M }) => {
|
|
36
|
-
const r = v(null), O = v(null), T = v(null), f = v(null), p = v(null), j = c(() => {
|
|
37
|
-
if (!r.current) return [];
|
|
38
|
-
const e = o && r.current.parentElement?.offsetHeight || window.innerHeight;
|
|
39
|
-
return g?.map((t) => typeof t == "string" && t.endsWith("%") ? parseFloat(t) > 100 ? e : parseFloat(t) / 100 * e : typeof t == "string" && t.endsWith("px") ? parseFloat(t) : typeof t == "number" && t >= 0 && t <= 1 ? t * e : typeof t == "number" ? t : 0) || [];
|
|
40
|
-
}, [g, o]), S = c((e, t) => {
|
|
41
|
-
const n = j();
|
|
42
|
-
if (n.length === 0) return e;
|
|
43
|
-
if (Math.abs(t) > 0.05)
|
|
44
|
-
if (t > 0) {
|
|
45
|
-
const a = n.filter((i) => i < e);
|
|
46
|
-
return a.length > 0 ? Math.max(...a) : d ? 0 : B;
|
|
47
|
-
} else {
|
|
48
|
-
const a = n.filter((i) => i > e);
|
|
49
|
-
if (a.length > 0)
|
|
50
|
-
return Math.min(...a);
|
|
51
|
-
}
|
|
52
|
-
return n.reduce((a, i) => Math.abs(i - e) < Math.abs(a - e) ? i : a);
|
|
53
|
-
}, [j]), H = c((e) => {
|
|
54
|
-
if (w && g) {
|
|
55
|
-
const t = o && r.current?.parentElement?.offsetHeight || window.innerHeight, n = e <= B ? "0%" : `${Math.round(e / t * 100)}%`;
|
|
56
|
-
w(n);
|
|
57
|
-
}
|
|
58
|
-
}, [w, g, o]), F = c((e) => {
|
|
59
|
-
r.current && (r.current.style.transition = P, r.current.style.height = `${e}px`);
|
|
60
|
-
}, [w, g, o]), N = c(() => {
|
|
61
|
-
if (p.current && o) {
|
|
62
|
-
const { scrollY: e } = p.current;
|
|
63
|
-
document.body.style.position = "", document.body.style.top = "", document.body.style.width = "", window.scrollTo(0, e), p.current = null;
|
|
64
|
-
}
|
|
65
|
-
}, [o]);
|
|
66
|
-
y(() => () => {
|
|
67
|
-
N();
|
|
68
|
-
}, [N]), y(() => {
|
|
69
|
-
if (!r.current || !s) return;
|
|
70
|
-
const e = o && r.current.parentElement?.offsetHeight || window.innerHeight;
|
|
71
|
-
let t = 0;
|
|
72
|
-
typeof s == "string" && s.endsWith("%") ? parseFloat(s) <= 0 ? t = d ? 0 : B : t = parseFloat(s) / 100 * e : typeof s == "string" && s.endsWith("px") ? t = parseFloat(s) : typeof s == "number" && (s >= 0 && s <= 1 ? t = s * e : t = s), F(t);
|
|
73
|
-
}, [s, o]);
|
|
74
|
-
const h = c((e) => {
|
|
75
|
-
if (!r.current) return;
|
|
76
|
-
const t = e.touches[0], n = r.current.offsetHeight;
|
|
77
|
-
f.current = {
|
|
78
|
-
isDragging: !1,
|
|
79
|
-
startY: t.clientY,
|
|
80
|
-
startHeight: n,
|
|
81
|
-
lastY: t.clientY,
|
|
82
|
-
lastTime: Date.now(),
|
|
83
|
-
velocity: 0
|
|
84
|
-
};
|
|
85
|
-
}, []), k = c((e) => {
|
|
86
|
-
if (!r.current) return;
|
|
87
|
-
const t = e, n = r.current.offsetHeight;
|
|
88
|
-
f.current = {
|
|
89
|
-
isDragging: !1,
|
|
90
|
-
startY: t.clientY,
|
|
91
|
-
startHeight: n,
|
|
92
|
-
lastY: t.clientY,
|
|
93
|
-
lastTime: Date.now(),
|
|
94
|
-
velocity: 0
|
|
95
|
-
};
|
|
96
|
-
}, []), z = c((e) => {
|
|
97
|
-
if (!f.current || !r.current) return;
|
|
98
|
-
const t = e.touches[0], n = f.current, L = n.startY - t.clientY, a = n.isDragging || Math.abs(L) > 5;
|
|
99
|
-
if (!n.isDragging && a && (n.isDragging = !0, o)) {
|
|
100
|
-
const i = window.scrollY;
|
|
101
|
-
p.current = { scrollY: i }, document.body.style.position = "fixed", document.body.style.top = `-${i}px`, document.body.style.width = "100%";
|
|
102
|
-
}
|
|
103
|
-
if (a) {
|
|
104
|
-
e.preventDefault();
|
|
105
|
-
const i = Date.now(), I = i - n.lastTime;
|
|
106
|
-
if (I > 0) {
|
|
107
|
-
const A = (t.clientY - n.lastY) / I;
|
|
108
|
-
n.velocity = n.velocity * 0.8 + A * 0.2;
|
|
109
|
-
}
|
|
110
|
-
n.lastY = t.clientY, n.lastTime = i;
|
|
111
|
-
const C = n.startHeight + L, G = o && r.current.parentElement?.offsetHeight || window.innerHeight, W = Math.max(0, Math.min(C, G));
|
|
112
|
-
r.current.style.transition = "none", r.current.style.height = `${W}px`;
|
|
113
|
-
}
|
|
114
|
-
}, [o]), q = c((e) => {
|
|
115
|
-
if (!f.current || !r.current) return;
|
|
116
|
-
const t = e, n = f.current, L = n.startY - t.clientY, a = n.isDragging || Math.abs(L) > 5;
|
|
117
|
-
if (!n.isDragging && a && (n.isDragging = !0, o)) {
|
|
118
|
-
const i = window.scrollY;
|
|
119
|
-
p.current = { scrollY: i }, document.body.style.position = "fixed", document.body.style.top = `-${i}px`, document.body.style.width = "100%";
|
|
120
|
-
}
|
|
121
|
-
if (a) {
|
|
122
|
-
e.preventDefault();
|
|
123
|
-
const i = Date.now(), I = i - n.lastTime;
|
|
124
|
-
if (I > 0) {
|
|
125
|
-
const A = (t.clientY - n.lastY) / I;
|
|
126
|
-
n.velocity = n.velocity * 0.8 + A * 0.2;
|
|
127
|
-
}
|
|
128
|
-
n.lastY = t.clientY, n.lastTime = i;
|
|
129
|
-
const C = n.startHeight + L, G = o && r.current.parentElement?.offsetHeight || window.innerHeight, W = Math.max(0, Math.min(C, G));
|
|
130
|
-
r.current.style.transition = "none", r.current.style.height = `${W}px`;
|
|
131
|
-
}
|
|
132
|
-
}, [o]), b = c(() => {
|
|
133
|
-
if (!f.current || !r.current) return;
|
|
134
|
-
const e = f.current;
|
|
135
|
-
if (e.isDragging) {
|
|
136
|
-
N();
|
|
137
|
-
const t = r.current.offsetHeight, n = S(t, e.velocity);
|
|
138
|
-
H(n);
|
|
139
|
-
}
|
|
140
|
-
f.current = null;
|
|
141
|
-
}, [S, F, N]);
|
|
142
|
-
y(() => {
|
|
143
|
-
const e = T.current;
|
|
144
|
-
if (e)
|
|
145
|
-
return e.addEventListener("touchstart", h, { passive: !1 }), e.addEventListener("touchmove", z, { passive: !1 }), e.addEventListener("touchend", b), e.addEventListener("touchcancel", b), e.addEventListener("mousedown", k, { passive: !1 }), e.addEventListener("mousemove", q, { passive: !1 }), e.addEventListener("mouseup", b), e.addEventListener("mouseleave", b), () => {
|
|
146
|
-
e.removeEventListener("touchstart", h), e.removeEventListener("touchmove", z), e.removeEventListener("touchend", b), e.removeEventListener("touchcancel", b), e.removeEventListener("mousedown", k), e.removeEventListener("mousemove", q), e.removeEventListener("mouseup", b), e.removeEventListener("mouseleave", b);
|
|
147
|
-
};
|
|
148
|
-
}, [h, z, b]);
|
|
149
|
-
const E = Q(() => s !== "0%", [s]), [U, J] = $(() => u ? s !== "0%" : !0);
|
|
150
|
-
return y(() => {
|
|
151
|
-
u && E && J(!0);
|
|
152
|
-
}, [E, u]), y(() => {
|
|
153
|
-
if (!u) return;
|
|
154
|
-
const e = r.current;
|
|
155
|
-
if (!e) return;
|
|
156
|
-
const t = (n) => {
|
|
157
|
-
n.propertyName === "height" && !E && s === "0%" && J(!1);
|
|
158
|
-
};
|
|
159
|
-
return e.addEventListener("transitionend", t), () => {
|
|
160
|
-
e.removeEventListener("transitionend", t);
|
|
161
|
-
};
|
|
162
|
-
}, [E, s, u]), /* @__PURE__ */ m.jsxs(m.Fragment, { children: [
|
|
163
|
-
R && /* @__PURE__ */ m.jsx(
|
|
164
|
-
"div",
|
|
165
|
-
{
|
|
166
|
-
className: _(E ? "fixed inset-0 bg-black/40 z-55 cursor-default" : "hidden"),
|
|
167
|
-
onClick: (e) => {
|
|
168
|
-
e.preventDefault(), e.stopPropagation(), Y && H(0);
|
|
169
|
-
},
|
|
170
|
-
"aria-hidden": "true"
|
|
171
|
-
}
|
|
172
|
-
),
|
|
173
|
-
/* @__PURE__ */ m.jsxs(
|
|
174
|
-
"div",
|
|
175
|
-
{
|
|
176
|
-
ref: r,
|
|
177
|
-
className: _(
|
|
178
|
-
o ? "absolute" : "fixed",
|
|
179
|
-
"z-60 bottom-0 w-full overflow-hidden",
|
|
180
|
-
"bg-neutral-default-default",
|
|
181
|
-
"border-t border-neutral-strong-default rounded-t-[12px]",
|
|
182
|
-
E ? "" : "border-neutral-weak",
|
|
183
|
-
D,
|
|
184
|
-
"flex flex-col items-center",
|
|
185
|
-
"touch-none select-none"
|
|
186
|
-
),
|
|
187
|
-
children: [
|
|
188
|
-
/* @__PURE__ */ m.jsx(
|
|
189
|
-
"div",
|
|
190
|
-
{
|
|
191
|
-
ref: T,
|
|
192
|
-
className: "w-full absolute top-0 h-11 flex items-center justify-center cursor-grab active:cursor-grabbing z-50 bg-inherit!",
|
|
193
|
-
children: /* @__PURE__ */ m.jsx("span", { className: "w-12 h-1 rounded-full bg-neutral-weak-default" })
|
|
194
|
-
}
|
|
195
|
-
),
|
|
196
|
-
typeof x == "string" ? /* @__PURE__ */ m.jsx("p", { className: " prometeo-fonts-headline-small text-neutral-default-default w-full h-11 bg-inherit absolute top-11 z-50 px-4", children: x }) : x,
|
|
197
|
-
/* @__PURE__ */ m.jsx(
|
|
198
|
-
"div",
|
|
199
|
-
{
|
|
200
|
-
ref: O,
|
|
201
|
-
className: _(
|
|
202
|
-
"w-full h-full overflow-y-auto px-4 pb-4 ",
|
|
203
|
-
x ? "mt-22" : "mt-11"
|
|
204
|
-
),
|
|
205
|
-
style: {
|
|
206
|
-
overscrollBehavior: "contain",
|
|
207
|
-
overflow: E ? "auto" : "hidden"
|
|
208
|
-
},
|
|
209
|
-
children: (!u || U) && (typeof l == "function" ? l(M) : l)
|
|
210
|
-
}
|
|
211
|
-
)
|
|
212
|
-
]
|
|
213
|
-
}
|
|
214
|
-
)
|
|
215
|
-
] });
|
|
216
|
-
}, oe = () => {
|
|
217
|
-
const l = v(null), [o, D] = $(!1), s = c((d, u) => {
|
|
218
|
-
l.current?.open(d, u);
|
|
219
|
-
}, []), g = c(() => {
|
|
220
|
-
l.current?.close();
|
|
221
|
-
}, []), w = c(() => l.current?.getContext() ?? null, []);
|
|
222
|
-
return y(() => {
|
|
223
|
-
const d = l.current?.subscribeOpenChange;
|
|
224
|
-
if (!d) return;
|
|
225
|
-
const u = d((x) => {
|
|
226
|
-
D(x);
|
|
227
|
-
});
|
|
228
|
-
return () => {
|
|
229
|
-
u && u();
|
|
230
|
-
};
|
|
231
|
-
}, [l.current?.subscribeOpenChange]), {
|
|
232
|
-
isOpen: o,
|
|
233
|
-
open: s,
|
|
234
|
-
close: g,
|
|
235
|
-
drawerRef: l,
|
|
236
|
-
getContext: w
|
|
237
|
-
};
|
|
238
|
-
};
|
|
239
|
-
export {
|
|
240
|
-
se as default,
|
|
241
|
-
oe as useDrawerMobile
|
|
242
|
-
};
|
package/dist/DropZone.es.js
DELETED
|
@@ -1,87 +0,0 @@
|
|
|
1
|
-
import { j as e } from "./jsx-runtime-DKDX3adD.js";
|
|
2
|
-
import { E as P, U as R } from "./Icons-DtFC5DJ7.js";
|
|
3
|
-
import { c as i } from "./cn-B6yFEsav.js";
|
|
4
|
-
import z, { useCallback as E } from "react";
|
|
5
|
-
import { useDropzone as w } from "react-dropzone";
|
|
6
|
-
const q = z.forwardRef(
|
|
7
|
-
({
|
|
8
|
-
onFilesAccepted: d,
|
|
9
|
-
onFilesRejected: m,
|
|
10
|
-
className: u,
|
|
11
|
-
subtitle: x = "Arrastra y suelta el archivo aquí o haz clic para cargarlo desde tu computadora",
|
|
12
|
-
acceptedFormats: p = ".PNG, .JPG, .TXT o .PDF. Máx 100 BM.",
|
|
13
|
-
variant: f = "default",
|
|
14
|
-
disabled: l = !1,
|
|
15
|
-
showIcon: h = !0,
|
|
16
|
-
accept: v,
|
|
17
|
-
maxFiles: g = 1,
|
|
18
|
-
...j
|
|
19
|
-
}, N) => {
|
|
20
|
-
const b = E((s, o) => {
|
|
21
|
-
s.length > 0 && d?.(s), o.length > 0 && m?.(o);
|
|
22
|
-
}, [d, m]), {
|
|
23
|
-
getRootProps: y,
|
|
24
|
-
getInputProps: D,
|
|
25
|
-
isDragActive: a,
|
|
26
|
-
isDragReject: r,
|
|
27
|
-
fileRejections: n
|
|
28
|
-
} = w({
|
|
29
|
-
onDrop: b,
|
|
30
|
-
accept: v,
|
|
31
|
-
maxFiles: g,
|
|
32
|
-
disabled: l,
|
|
33
|
-
...j
|
|
34
|
-
}), t = n.length > 0;
|
|
35
|
-
return /* @__PURE__ */ e.jsx("div", { className: i("w-full", u), children: /* @__PURE__ */ e.jsxs(
|
|
36
|
-
"div",
|
|
37
|
-
{
|
|
38
|
-
ref: N,
|
|
39
|
-
...y(),
|
|
40
|
-
className: i(
|
|
41
|
-
"relative rounded-lg border border-dashed transition-all duration-200 h-36",
|
|
42
|
-
"flex flex-col items-center justify-center text-center",
|
|
43
|
-
f === "default" ? "p-8 min-h-[200px] " : "p-1 min-h-[120px] h-24 md:h-36",
|
|
44
|
-
!a && !t && !l && [
|
|
45
|
-
"border-neutral-default-default",
|
|
46
|
-
"hover:border-primary/50 hover:bg-primary/5"
|
|
47
|
-
],
|
|
48
|
-
a && !r && [
|
|
49
|
-
"border-primary bg-primary/10",
|
|
50
|
-
"ring-2 ring-primary/20"
|
|
51
|
-
],
|
|
52
|
-
(r || t) && [
|
|
53
|
-
"border-destructive bg-destructive/10",
|
|
54
|
-
"ring-2 ring-destructive/20"
|
|
55
|
-
],
|
|
56
|
-
l && [
|
|
57
|
-
"cursor-default opacity-60",
|
|
58
|
-
"border-muted-foreground/20 bg-muted/30"
|
|
59
|
-
]
|
|
60
|
-
),
|
|
61
|
-
children: [
|
|
62
|
-
/* @__PURE__ */ e.jsx("input", { ...D() }),
|
|
63
|
-
h && /* @__PURE__ */ e.jsx("div", { className: "mb-0.5 md:mb-4", children: t || r ? /* @__PURE__ */ e.jsx(P, { size: 24, className: " text-destructive" }) : /* @__PURE__ */ e.jsx(R, { size: 24, className: i(
|
|
64
|
-
"w-8 h-8 transition-colors",
|
|
65
|
-
a ? "text-primary" : "text-neutral-default-default"
|
|
66
|
-
) }) }),
|
|
67
|
-
/* @__PURE__ */ e.jsxs("div", { className: "space-y-2", children: [
|
|
68
|
-
/* @__PURE__ */ e.jsx("p", { className: i(
|
|
69
|
-
"text-base font-medium text-neutral-default-default",
|
|
70
|
-
t || r ? "text-destructive" : a ? "text-primary " : "text-neutral-default-default text-sm font-[400]"
|
|
71
|
-
), children: a && !r ? "Suelta los archivos aquí..." : r || t ? "Archivo no válido" : x }),
|
|
72
|
-
!t && /* @__PURE__ */ e.jsx("p", { className: "text-xs text-neutral-medium-default", children: p })
|
|
73
|
-
] }),
|
|
74
|
-
t && /* @__PURE__ */ e.jsx("div", { className: "mt-4 space-y-1", children: n.map(({ file: s, errors: o }) => /* @__PURE__ */ e.jsxs("div", { className: "text-sm text-destructive", children: [
|
|
75
|
-
/* @__PURE__ */ e.jsx("p", { className: "font-medium", children: s.name }),
|
|
76
|
-
o.map((c) => /* @__PURE__ */ e.jsx("p", { className: "text-xs", children: c.message }, c.code))
|
|
77
|
-
] }, s.name)) })
|
|
78
|
-
]
|
|
79
|
-
}
|
|
80
|
-
) });
|
|
81
|
-
}
|
|
82
|
-
);
|
|
83
|
-
q.displayName = "DropZone";
|
|
84
|
-
export {
|
|
85
|
-
q as DropZone,
|
|
86
|
-
q as default
|
|
87
|
-
};
|
package/dist/Header.es.js
DELETED
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import { j as a } from "./jsx-runtime-DKDX3adD.js";
|
|
2
|
-
import { c as l } from "./cn-B6yFEsav.js";
|
|
3
|
-
import { motion as n } from "framer-motion";
|
|
4
|
-
import { memo as c } from "react";
|
|
5
|
-
const d = ({ title: e, subtitle: t, children: i, className: s, subtitleClassName: m, titleClassName: r }) => /* @__PURE__ */ a.jsx(
|
|
6
|
-
"header",
|
|
7
|
-
{
|
|
8
|
-
className: l(
|
|
9
|
-
"h-16 flex items-center px-4 sm:h-20 md:h-24 md:px-6 lg:h-28 xl:h-32 2xl:h-36",
|
|
10
|
-
s
|
|
11
|
-
),
|
|
12
|
-
children: /* @__PURE__ */ a.jsxs(
|
|
13
|
-
n.div,
|
|
14
|
-
{
|
|
15
|
-
initial: { opacity: 0, y: -10 },
|
|
16
|
-
animate: { opacity: 1, y: 0 },
|
|
17
|
-
transition: { duration: 0.6, ease: "easeOut" },
|
|
18
|
-
className: "flex justify-between items-center w-full",
|
|
19
|
-
children: [
|
|
20
|
-
/* @__PURE__ */ a.jsxs("div", { className: "flex flex-col leading-6", children: [
|
|
21
|
-
t && /* @__PURE__ */ a.jsx("h3", { className: l(" prometeo-fonts-body-medium text-neutral-medium-default ", m), children: t }),
|
|
22
|
-
e && /* @__PURE__ */ a.jsx("h1", { className: l("prometeo-fonts-headline-small text-neutral-strong-default", r), children: e })
|
|
23
|
-
] }),
|
|
24
|
-
i && /* @__PURE__ */ a.jsx("div", { className: "flex gap-4", children: i })
|
|
25
|
-
]
|
|
26
|
-
}
|
|
27
|
-
)
|
|
28
|
-
}
|
|
29
|
-
), x = c(d, (e, t) => e.title !== t.title || e.subtitle !== t.subtitle || e.className !== t.className ? !1 : e.children !== t.children ? !e.children && !t.children : !0);
|
|
30
|
-
export {
|
|
31
|
-
x as default
|
|
32
|
-
};
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { j as e } from "./jsx-runtime-DKDX3adD.js";
|
|
2
|
-
import { memo as i } from "react";
|
|
3
|
-
import { c as a } from "./cn-B6yFEsav.js";
|
|
4
|
-
import { C as o, E as n, I as d } from "./Icons-DtFC5DJ7.js";
|
|
5
|
-
const r = (s) => {
|
|
6
|
-
const { variant: t, className: m } = s, l = {
|
|
7
|
-
default: "text-neutral-medium-default pt-[1px]",
|
|
8
|
-
error: "text-error-medium-default pt-[1px]",
|
|
9
|
-
success: "text-success-medium-default"
|
|
10
|
-
}, c = {
|
|
11
|
-
default: /* @__PURE__ */ e.jsx(d, { size: 16, className: "text-neutral-medium-default " }),
|
|
12
|
-
error: /* @__PURE__ */ e.jsx(n, { size: 16, className: "text-error-medium-default" }),
|
|
13
|
-
success: /* @__PURE__ */ e.jsx(o, { size: 16, className: "text-success-medium-default" })
|
|
14
|
-
};
|
|
15
|
-
return /* @__PURE__ */ e.jsx("div", { ref: s.ref, className: a("pl-3 mt-1", m), children: typeof s.children == "string" ? /* @__PURE__ */ e.jsxs("div", { className: "flex gap-0.5 items-start", children: [
|
|
16
|
-
c[t],
|
|
17
|
-
/* @__PURE__ */ e.jsx("p", { className: a(" prometeo-fonts-body-small", l[t]), children: s.children })
|
|
18
|
-
] }) : s.children });
|
|
19
|
-
};
|
|
20
|
-
r.displayName = "HelperText";
|
|
21
|
-
const j = i(r);
|
|
22
|
-
export {
|
|
23
|
-
j as H
|
|
24
|
-
};
|