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,70 @@
|
|
|
1
|
+
import { j as e } from "./jsx-runtime-DKDX3adD.js";
|
|
2
|
+
import { c as j } from "./cn-B6yFEsav.js";
|
|
3
|
+
import T from "react";
|
|
4
|
+
const M = T.forwardRef(
|
|
5
|
+
(o, g) => {
|
|
6
|
+
const { className: p, label: m, ...b } = o;
|
|
7
|
+
if (o.variant === "date") {
|
|
8
|
+
const { startDate: l, endDate: n } = o, r = new Date(l), t = new Date(n), a = /* @__PURE__ */ new Date(), i = t.getTime() - r.getTime(), c = a.getTime() - r.getTime(), d = Math.min(100, Math.max(0, c / i * 100)), u = 1440 * 60 * 1e3, f = Math.max(0, Math.ceil((t.getTime() - a.getTime()) / u)), x = Math.floor((a.getTime() - t.getTime()) / u), y = Math.ceil(i / u), w = Math.min(y, Math.max(0, Math.floor(c / u))), h = a > t, v = f === 0 && !h, N = h && x === 0;
|
|
9
|
+
let s = m;
|
|
10
|
+
return m || (h ? x === 0 ? s = "Vence hoy" : x === 1 ? s = "Vencido hace 1 día" : s = `Vencido hace ${x} días` : f === 0 ? s = "Vence hoy" : f === 1 ? s = "Falta 1 día" : s = `Faltan ${f} días`), /* @__PURE__ */ e.jsxs("div", { ref: g, className: p, ...b, children: [
|
|
11
|
+
/* @__PURE__ */ e.jsxs("div", { className: "flex justify-between items-end mb-2 gap-4 px-2", children: [
|
|
12
|
+
/* @__PURE__ */ e.jsxs("div", { className: "flex flex-col gap-1", children: [
|
|
13
|
+
/* @__PURE__ */ e.jsx("span", { className: "text-sm text-neutral-medium-default", children: "Tiempo restante de resolución" }),
|
|
14
|
+
/* @__PURE__ */ e.jsx("span", { className: "font-semibold text-base text-neutral-default-default", children: s })
|
|
15
|
+
] }),
|
|
16
|
+
/* @__PURE__ */ e.jsxs("span", { className: "text-sm text-neutral-medium-default whitespace-nowrap", children: [
|
|
17
|
+
w,
|
|
18
|
+
" / ",
|
|
19
|
+
y,
|
|
20
|
+
" días"
|
|
21
|
+
] })
|
|
22
|
+
] }),
|
|
23
|
+
/* @__PURE__ */ e.jsx("div", { className: "w-full bg-neutral-800 dark:bg-neutral-900 border border-neutral-600 dark:border-neutral-700 rounded-sm h-4 overflow-hidden", children: /* @__PURE__ */ e.jsx(
|
|
24
|
+
"div",
|
|
25
|
+
{
|
|
26
|
+
className: j(
|
|
27
|
+
"h-full transition-all duration-300",
|
|
28
|
+
v || N ? "bg-yellow-500" : h ? "bg-red-500" : "bg-primary-default-default"
|
|
29
|
+
),
|
|
30
|
+
style: { width: `${d}%` }
|
|
31
|
+
}
|
|
32
|
+
) })
|
|
33
|
+
] });
|
|
34
|
+
}
|
|
35
|
+
if (o.variant === "quantity") {
|
|
36
|
+
const { current: l, total: n, unit: r = "items" } = o, t = Math.min(100, Math.max(0, l / n * 100)), a = Math.max(0, n - l), i = l >= n, c = t >= 80 && !i;
|
|
37
|
+
let d = m;
|
|
38
|
+
return m || (i ? d = "Completado" : a === 1 ? d = `Falta 1 ${r}` : d = `Faltan ${a} ${r}`), /* @__PURE__ */ e.jsxs("div", { ref: g, className: p, ...b, children: [
|
|
39
|
+
/* @__PURE__ */ e.jsxs("div", { className: "flex justify-between items-end mb-2 gap-4 px-2", children: [
|
|
40
|
+
/* @__PURE__ */ e.jsxs("div", { className: "flex flex-col gap-1", children: [
|
|
41
|
+
/* @__PURE__ */ e.jsx("span", { className: "text-sm text-neutral-medium-default", children: "Progreso" }),
|
|
42
|
+
/* @__PURE__ */ e.jsx("span", { className: "font-semibold text-base text-neutral-default-default", children: d })
|
|
43
|
+
] }),
|
|
44
|
+
/* @__PURE__ */ e.jsxs("span", { className: "text-sm text-neutral-medium-default whitespace-nowrap", children: [
|
|
45
|
+
l,
|
|
46
|
+
" / ",
|
|
47
|
+
n,
|
|
48
|
+
" ",
|
|
49
|
+
r
|
|
50
|
+
] })
|
|
51
|
+
] }),
|
|
52
|
+
/* @__PURE__ */ e.jsx("div", { className: "w-full bg-neutral-800 dark:bg-neutral-900 border border-neutral-600 dark:border-neutral-700 rounded-sm h-4 overflow-hidden", children: /* @__PURE__ */ e.jsx(
|
|
53
|
+
"div",
|
|
54
|
+
{
|
|
55
|
+
className: j(
|
|
56
|
+
"h-full transition-all duration-300",
|
|
57
|
+
i ? "bg-green-500" : c ? "bg-yellow-500" : "bg-primary-default-default"
|
|
58
|
+
),
|
|
59
|
+
style: { width: `${t}%` }
|
|
60
|
+
}
|
|
61
|
+
) })
|
|
62
|
+
] });
|
|
63
|
+
}
|
|
64
|
+
return null;
|
|
65
|
+
}
|
|
66
|
+
);
|
|
67
|
+
M.displayName = "ProgressBar";
|
|
68
|
+
export {
|
|
69
|
+
M as default
|
|
70
|
+
};
|
|
@@ -1,37 +1,37 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { memo as
|
|
4
|
-
import
|
|
5
|
-
const
|
|
6
|
-
const
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
}, [
|
|
10
|
-
const
|
|
11
|
-
|
|
12
|
-
}, { disabled:
|
|
13
|
-
return /* @__PURE__ */
|
|
14
|
-
/* @__PURE__ */
|
|
15
|
-
/* @__PURE__ */
|
|
16
|
-
/* @__PURE__ */
|
|
1
|
+
import { j as e } from "./jsx-runtime-DKDX3adD.js";
|
|
2
|
+
import { c as t } from "./cn-B6yFEsav.js";
|
|
3
|
+
import { memo as x, forwardRef as k, useRef as g, useEffect as y } from "react";
|
|
4
|
+
import { H as j } from "./HelperComponent-g_xuKWzK.js";
|
|
5
|
+
const s = k((n, a) => {
|
|
6
|
+
const r = g(null);
|
|
7
|
+
y(() => {
|
|
8
|
+
a && (typeof a == "function" ? a(r.current) : a.current = r.current);
|
|
9
|
+
}, [a]);
|
|
10
|
+
const c = (v) => {
|
|
11
|
+
r.current && (v.stopPropagation(), r.current.click());
|
|
12
|
+
}, { disabled: o = !1, label: l, required: u = !1, errorComponent: d, helperComponent: i, variant: f = "default", className: p, labelClassName: m, ...b } = n, h = d !== void 0 || i !== void 0;
|
|
13
|
+
return /* @__PURE__ */ e.jsxs("div", { className: t("flex flex-col gap-1 min-h-10 min-w-max items-center", p), children: [
|
|
14
|
+
/* @__PURE__ */ e.jsxs("label", { className: t("flex items-center justify-start gap-3"), children: [
|
|
15
|
+
/* @__PURE__ */ e.jsxs("div", { className: "relative z-10 min-w-10 h-10 flex items-center justify-center ", children: [
|
|
16
|
+
/* @__PURE__ */ e.jsx(
|
|
17
17
|
"input",
|
|
18
18
|
{
|
|
19
19
|
hidden: !0,
|
|
20
20
|
type: "radio",
|
|
21
|
-
ref:
|
|
21
|
+
ref: r,
|
|
22
22
|
className: "peer",
|
|
23
|
-
disabled:
|
|
24
|
-
...
|
|
23
|
+
disabled: o,
|
|
24
|
+
...b
|
|
25
25
|
}
|
|
26
26
|
),
|
|
27
|
-
/* @__PURE__ */
|
|
27
|
+
/* @__PURE__ */ e.jsx(
|
|
28
28
|
"div",
|
|
29
29
|
{
|
|
30
30
|
role: "radio",
|
|
31
|
-
"aria-checked":
|
|
32
|
-
"aria-disabled":
|
|
33
|
-
onClick:
|
|
34
|
-
} :
|
|
31
|
+
"aria-checked": r.current?.checked,
|
|
32
|
+
"aria-disabled": o,
|
|
33
|
+
onClick: o ? () => {
|
|
34
|
+
} : c,
|
|
35
35
|
className: t(
|
|
36
36
|
"size-5 rounded-full border-neutral-default-hover hover:border-neutral-default-default border-2 p-[3px]",
|
|
37
37
|
"transition-all duration-300 cursor-pointer relative ",
|
|
@@ -45,7 +45,7 @@ const c = y((s, r) => {
|
|
|
45
45
|
"peer-disabled:border-neutral-default-disabled peer-disabled:peer-checked:border-neutral-default-default",
|
|
46
46
|
"peer-disabled:peer-checked:*:bg-neutral-weak-hover"
|
|
47
47
|
),
|
|
48
|
-
children: /* @__PURE__ */
|
|
48
|
+
children: /* @__PURE__ */ e.jsx(
|
|
49
49
|
"div",
|
|
50
50
|
{
|
|
51
51
|
className: t(
|
|
@@ -56,22 +56,23 @@ const c = y((s, r) => {
|
|
|
56
56
|
}
|
|
57
57
|
)
|
|
58
58
|
] }),
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
59
|
+
l && /* @__PURE__ */ e.jsxs("span", { className: t("prometeo-fonts-label-large w-max min-w-max", m), children: [
|
|
60
|
+
l,
|
|
61
|
+
u && " *"
|
|
62
62
|
] })
|
|
63
63
|
] }),
|
|
64
|
-
|
|
65
|
-
|
|
64
|
+
h && /* @__PURE__ */ e.jsx("div", { className: "min-h-5", children: /* @__PURE__ */ e.jsx(
|
|
65
|
+
j,
|
|
66
66
|
{
|
|
67
|
-
variant:
|
|
68
|
-
children:
|
|
67
|
+
variant: f,
|
|
68
|
+
children: d || i
|
|
69
69
|
}
|
|
70
70
|
) })
|
|
71
71
|
] });
|
|
72
72
|
});
|
|
73
|
-
|
|
74
|
-
const
|
|
73
|
+
s.displayName = "RadioButton";
|
|
74
|
+
const z = x(s);
|
|
75
75
|
export {
|
|
76
|
-
|
|
76
|
+
z as RadioButton,
|
|
77
|
+
z as default
|
|
77
78
|
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
import { motion as
|
|
5
|
-
const
|
|
6
|
-
const [
|
|
1
|
+
import { j as u } from "./jsx-runtime-DKDX3adD.js";
|
|
2
|
+
import { c as s } from "./cn-B6yFEsav.js";
|
|
3
|
+
import z, { useState as M, useMemo as C, useEffect as L } from "react";
|
|
4
|
+
import { motion as E } from "framer-motion";
|
|
5
|
+
const X = (T) => {
|
|
6
|
+
const [c, _] = M({}), { size: t = "medium", color: R = "default", options: l, value: h, name: x, onChange: j, icon: y, allowExpand: n = !1, disabled: d = !1 } = T, m = Math.max(l.findIndex((e) => e.value === h), 0), w = l.length, N = 9, b = 26, o = {
|
|
7
7
|
small: 120,
|
|
8
8
|
medium: 120,
|
|
9
9
|
large: 120
|
|
@@ -11,11 +11,11 @@ const $ = (S) => {
|
|
|
11
11
|
small: 94,
|
|
12
12
|
medium: 94,
|
|
13
13
|
large: 94
|
|
14
|
-
},
|
|
14
|
+
}, k = 16, S = {
|
|
15
15
|
small: { container: "p-2" },
|
|
16
16
|
medium: { container: "p-4 h-[48px] rounded-lg" },
|
|
17
17
|
large: { container: "p-6" }
|
|
18
|
-
},
|
|
18
|
+
}, f = {
|
|
19
19
|
default: {
|
|
20
20
|
switch: "bg-primary-medium-default text-neutral-weak-default",
|
|
21
21
|
container: "border-neutral-default-default",
|
|
@@ -46,24 +46,24 @@ const $ = (S) => {
|
|
|
46
46
|
icon: "text-neutral-strong-disabled",
|
|
47
47
|
option: "text-neutral-medium-pressed"
|
|
48
48
|
}
|
|
49
|
-
},
|
|
49
|
+
}, I = l.find((e) => e.value === h) ?? l[0], g = I.label.length * N + k * 2 + b, W = () => C(() => Object.values(c).reduce((i, r) => i + r, 0) + b, [c]), v = {
|
|
50
50
|
small: n ? W() : (w - 1) * a.small + o.small,
|
|
51
51
|
medium: n ? W() : (w - 1) * a.medium + o.medium,
|
|
52
52
|
large: n ? W() : (w - 1) * a.large + o.large
|
|
53
53
|
};
|
|
54
|
-
|
|
54
|
+
L(() => {
|
|
55
55
|
if (!n) return;
|
|
56
56
|
let e = {};
|
|
57
57
|
l.forEach((i, r) => {
|
|
58
|
-
e[r] = i.label.length *
|
|
59
|
-
}),
|
|
58
|
+
e[r] = i.label.length * N + k * 2;
|
|
59
|
+
}), _(e);
|
|
60
60
|
}, []);
|
|
61
|
-
const
|
|
61
|
+
const H = C(() => n ? Object.values(c).reduce((e, i, r) => r < m ? e + i : e, 0) : Math.max(m * a[t] - 2, 0), [m]), D = () => {
|
|
62
62
|
if (d) return;
|
|
63
|
-
const e =
|
|
64
|
-
|
|
65
|
-
},
|
|
66
|
-
return /* @__PURE__ */
|
|
63
|
+
const e = m === l.length - 1 ? l[0] : l[m + 1];
|
|
64
|
+
j?.(x, e.value);
|
|
65
|
+
}, p = d ? "disabled" : R;
|
|
66
|
+
return /* @__PURE__ */ u.jsxs(
|
|
67
67
|
"button",
|
|
68
68
|
{
|
|
69
69
|
name: x,
|
|
@@ -74,18 +74,18 @@ const $ = (S) => {
|
|
|
74
74
|
maxWidth: v[t]
|
|
75
75
|
},
|
|
76
76
|
className: s(
|
|
77
|
-
|
|
78
|
-
|
|
77
|
+
S[t].container,
|
|
78
|
+
f[p].container,
|
|
79
79
|
"border",
|
|
80
80
|
!d && "cursor-pointer",
|
|
81
81
|
"relative"
|
|
82
82
|
),
|
|
83
83
|
children: [
|
|
84
|
-
/* @__PURE__ */
|
|
85
|
-
|
|
84
|
+
/* @__PURE__ */ u.jsxs(
|
|
85
|
+
E.div,
|
|
86
86
|
{
|
|
87
87
|
animate: {
|
|
88
|
-
left: `${
|
|
88
|
+
left: `${H}px`,
|
|
89
89
|
width: n ? g : o[t],
|
|
90
90
|
minWidth: n ? g : o[t],
|
|
91
91
|
maxWidth: n ? g : o[t]
|
|
@@ -98,31 +98,31 @@ const $ = (S) => {
|
|
|
98
98
|
className: s(
|
|
99
99
|
"absolute top-0 left-0 h-full rounded-[6px] z-30",
|
|
100
100
|
"flex items-center justify-center gap-[2px] p-4",
|
|
101
|
-
|
|
101
|
+
f[p].switch
|
|
102
102
|
),
|
|
103
103
|
onClick: () => {
|
|
104
|
-
!d &&
|
|
104
|
+
!d && D();
|
|
105
105
|
},
|
|
106
106
|
children: [
|
|
107
|
-
|
|
107
|
+
y && z.cloneElement(y, { className: s(
|
|
108
108
|
"w-6 h-6 text-neutral-weak-default min-w-6 min-h-6",
|
|
109
|
-
|
|
109
|
+
f[p].icon
|
|
110
110
|
) }),
|
|
111
|
-
/* @__PURE__ */
|
|
111
|
+
/* @__PURE__ */ u.jsx(
|
|
112
112
|
"p",
|
|
113
113
|
{
|
|
114
114
|
className: s(
|
|
115
115
|
"prometeo-fonts-label-large ",
|
|
116
116
|
" overflow-hidden overflow-ellipsis text-nowrap select-none ",
|
|
117
|
-
|
|
117
|
+
f[p].switch
|
|
118
118
|
),
|
|
119
|
-
children:
|
|
119
|
+
children: I.label
|
|
120
120
|
}
|
|
121
121
|
)
|
|
122
122
|
]
|
|
123
123
|
}
|
|
124
124
|
),
|
|
125
|
-
/* @__PURE__ */
|
|
125
|
+
/* @__PURE__ */ u.jsx(
|
|
126
126
|
"div",
|
|
127
127
|
{
|
|
128
128
|
className: s(
|
|
@@ -130,12 +130,12 @@ const $ = (S) => {
|
|
|
130
130
|
"flex justify-center"
|
|
131
131
|
),
|
|
132
132
|
children: l?.map((e, i) => {
|
|
133
|
-
const r = e.value === (h || l[0].value),
|
|
134
|
-
return /* @__PURE__ */
|
|
135
|
-
|
|
133
|
+
const r = e.value === (h || l[0].value), A = n ? c[i] + b : o[t], P = n ? c[i] : a[t], O = r ? A : P;
|
|
134
|
+
return /* @__PURE__ */ u.jsx(
|
|
135
|
+
E.span,
|
|
136
136
|
{
|
|
137
137
|
onClick: () => {
|
|
138
|
-
!d &&
|
|
138
|
+
!d && j?.(x, e.value);
|
|
139
139
|
},
|
|
140
140
|
animate: {
|
|
141
141
|
width: O,
|
|
@@ -154,7 +154,7 @@ const $ = (S) => {
|
|
|
154
154
|
!d && "cursor-pointer"
|
|
155
155
|
),
|
|
156
156
|
"aria-label": e.label,
|
|
157
|
-
children: /* @__PURE__ */
|
|
157
|
+
children: /* @__PURE__ */ u.jsx(
|
|
158
158
|
"p",
|
|
159
159
|
{
|
|
160
160
|
style: {
|
|
@@ -164,7 +164,7 @@ const $ = (S) => {
|
|
|
164
164
|
},
|
|
165
165
|
className: s(
|
|
166
166
|
"px-3 place-content-center overflow-hidden text-ellipsis text-wrap prometeo-fonts-label-large h-full select-none",
|
|
167
|
-
|
|
167
|
+
f[p].option
|
|
168
168
|
),
|
|
169
169
|
children: e.label
|
|
170
170
|
}
|
|
@@ -180,5 +180,6 @@ const $ = (S) => {
|
|
|
180
180
|
);
|
|
181
181
|
};
|
|
182
182
|
export {
|
|
183
|
-
|
|
183
|
+
X as SegmentedButton,
|
|
184
|
+
X as default
|
|
184
185
|
};
|