prometeo-design-system 2.8.8 → 2.9.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{components/Avatar/Avatar.js → Avatar.es.js} +24 -24
- package/dist/{components/Button/Button.js → Button.es.js} +55 -55
- package/dist/{components/CardProfile/CardProfile.js → CardProfile-CsytJlKZ.js} +94 -68
- package/dist/CardProfile.es.js +5 -0
- package/dist/{components/CheckBox/CheckBox.js → CheckBox.es.js} +25 -25
- package/dist/DatePicker.es.js +3441 -0
- package/dist/DialogModal.es.js +75 -0
- package/dist/DrawerDesktop.es.js +192 -0
- package/dist/DrawerMobile.es.js +242 -0
- package/dist/DropZone.es.js +87 -0
- package/dist/{components/FAB/FAButton.js → FAButton.es.js} +5 -5
- package/dist/Header.es.js +32 -0
- package/dist/HelperComponent-g_xuKWzK.js +24 -0
- package/dist/Icons-DtFC5DJ7.js +1079 -0
- package/dist/Icons.es.js +5 -0
- package/dist/{components/Image/Image.js → Image.es.js} +32 -32
- package/dist/ImageGallery-Ckxg9OIC.js +317 -0
- package/dist/{components/Image/useImageGallery.js → ImageGallery.es.js} +2 -0
- package/dist/Input-Cck37DpG.js +240 -0
- package/dist/Input.es.js +4 -0
- package/dist/InputMultiple.es.js +263 -0
- package/dist/LayoutGeneric-CbaoatQB.js +26 -0
- package/dist/LayoutGeneric.es.js +4 -0
- package/dist/Logo.es.js +9 -0
- package/dist/{components/Menu/MenuComposable.js → Menu.es.js} +13 -12
- package/dist/OtpInput.es.js +301 -0
- package/dist/{components/Pagination/Pagination.js → Pagination.es.js} +32 -32
- package/dist/{components/ProfilePictureUpload/ProfilePictureUpload.js → ProfilePictureUpload.es.js} +57 -56
- package/dist/ProgressBar.es.js +70 -0
- package/dist/{components/RadioButton/RadioButton.js → RadioButton.es.js} +36 -35
- package/dist/{components/SegmentedButton/SegmentedButton.js → SegmentedButton.es.js} +38 -37
- package/dist/Select-BD5FTxVw.js +1100 -0
- package/dist/Select.es.js +4 -0
- package/dist/SelectSearch.es.js +237 -0
- package/dist/{components/Skeleton/Skeleton.js → Skeleton.es.js} +18 -16
- package/dist/Spinner.es.js +52 -0
- package/dist/{components/Steps/Steps.js → Steps.es.js} +62 -61
- package/dist/{components/SwipeContainer/SwipeContainer.js → SwipeContainer.es.js} +68 -68
- package/dist/{components/Switch/Switch.js → Switch.es.js} +18 -17
- package/dist/{components/TabLinks/TabLinks.js → TabLinks.es.js} +11 -11
- package/dist/{components/Table/Table.js → Table.es.js} +41 -38
- package/dist/{components/TextArea/TextArea.js → TextArea.es.js} +26 -24
- package/dist/{components/Toaster/Toaster.js → Toast.es.js} +48 -48
- package/dist/ToastProvider.es.js +6 -0
- package/dist/Tooltip.es.js +62 -0
- package/dist/{lib/cn.js → cn-B6yFEsav.js} +2 -2
- package/dist/{node_modules/class-variance-authority/dist/index.js → index-BOQuZ0gG.js} +9 -10
- package/dist/index.d.ts +12 -16
- package/dist/jsx-runtime-DKDX3adD.js +281 -0
- package/dist/prometeo-design-system.css +1 -1
- package/dist/prometeo-design-system.es.js +1002 -0
- package/dist/{hooks/useDragScroll.js → useDragScroll-CHN9OMwn.js} +1 -1
- package/package.json +120 -116
- package/src/styles/base.css +464 -473
- package/dist/Avatar.js +0 -4
- package/dist/Button.js +0 -4
- package/dist/CardProfile.js +0 -5
- package/dist/CheckBox.js +0 -4
- package/dist/DatePicker.js +0 -5
- package/dist/DialogModal.js +0 -6
- package/dist/DrawerDesktop.js +0 -6
- package/dist/DrawerMobile.js +0 -6
- package/dist/DropZone.js +0 -5
- package/dist/FAButton.js +0 -4
- package/dist/Header.js +0 -4
- package/dist/Icons/Icons.js +0 -1055
- package/dist/Icons.js +0 -5
- package/dist/Image.js +0 -4
- package/dist/ImageGallery.js +0 -6
- package/dist/Input.js +0 -4
- package/dist/InputMultiple.js +0 -5
- package/dist/LayoutGeneric.js +0 -4
- package/dist/Logo.js +0 -4
- package/dist/Menu.js +0 -5
- package/dist/OtpInput.js +0 -4
- package/dist/Pagination.js +0 -4
- package/dist/ProfilePictureUpload.js +0 -5
- package/dist/ProgressBar.js +0 -4
- package/dist/RadioButton.js +0 -5
- package/dist/SegmentedButton.js +0 -5
- package/dist/Select.js +0 -4
- package/dist/SelectSearch.js +0 -4
- package/dist/Skeleton.js +0 -5
- package/dist/Spinner.js +0 -4
- package/dist/Steps.js +0 -5
- package/dist/SwipeContainer.js +0 -4
- package/dist/Switch.js +0 -5
- package/dist/TabLinks.js +0 -4
- package/dist/Table.js +0 -11
- package/dist/TextArea.js +0 -4
- package/dist/Toast.js +0 -5
- package/dist/ToastProvider.js +0 -4
- package/dist/Tooltip.js +0 -4
- package/dist/components/Autocomplete/useAutocomplete.js +0 -143
- package/dist/components/DatePicker/DatePicker.js +0 -396
- package/dist/components/Dialog/Dialog.js +0 -60
- package/dist/components/Dialog/useDialogControl.js +0 -18
- package/dist/components/Drawer/DrawerDesktop.js +0 -179
- package/dist/components/Drawer/DrawerMobile.js +0 -219
- package/dist/components/Drawer/useDrawerDesktop.js +0 -18
- package/dist/components/Drawer/useDrawerMobile.js +0 -27
- package/dist/components/DropZone/DropZone.js +0 -86
- package/dist/components/DropZone/useFileDropzone.js +0 -24
- package/dist/components/Header/Header.js +0 -32
- package/dist/components/Image/GalleryPreview.js +0 -40
- package/dist/components/Image/ImageGallery.js +0 -68
- package/dist/components/Image/LightBox.js +0 -223
- package/dist/components/Input/Input.js +0 -219
- package/dist/components/InputMultiple/InputMultiple.js +0 -262
- package/dist/components/Layout/LayoutGeneric.js +0 -13
- package/dist/components/Logo/Logo.js +0 -9
- package/dist/components/OtpInput/OtpInput.js +0 -112
- package/dist/components/ProgressBar/ProgressBar.js +0 -70
- package/dist/components/Select/Select.js +0 -1005
- package/dist/components/SelectSearch/SelectSearch.js +0 -101
- package/dist/components/Shared/Chip.js +0 -55
- package/dist/components/Shared/HelperComponent.js +0 -24
- package/dist/components/Sidebar/SecondaryBar/SecondaryBar.js +0 -62
- package/dist/components/Sidebar/SecondaryBar/hooks/useSecondaryBarAnimation.js +0 -59
- package/dist/components/Sidebar/SidebarComposable.js +0 -84
- package/dist/components/Sidebar/components/NavigationLink.js +0 -34
- package/dist/components/Sidebar/components/badge.js +0 -33
- package/dist/components/Sidebar/components/changue-account.js +0 -31
- package/dist/components/Sidebar/components/collapse-button.js +0 -18
- package/dist/components/Sidebar/components/company-logo.js +0 -12
- package/dist/components/Sidebar/components/nav-actions.js +0 -98
- package/dist/components/Sidebar/components/nav-links.js +0 -100
- package/dist/components/Sidebar/context/SidebarContext.js +0 -19
- package/dist/components/Sidebar/hooks/SidebarProvider.js +0 -33
- package/dist/components/Sidebar/hooks/useNavBarActions.js +0 -9
- package/dist/components/Sidebar/hooks/useNavBarCollapse.js +0 -11
- package/dist/components/Sidebar/hooks/useSidebarHook.js +0 -13
- package/dist/components/Sidebar/ui/useNavbarAnimation.js +0 -326
- package/dist/components/Spinner/Spinner.js +0 -52
- package/dist/components/TabSwitch/TabSwitch.js +0 -57
- package/dist/components/Toaster/ToastProvider.js +0 -6
- package/dist/components/Tooltip/Tootip.js +0 -62
- package/dist/hooks/useClickOutside.js +0 -24
- package/dist/hooks/useLabelBackground.js +0 -25
- package/dist/index.js +0 -127
- package/dist/lib/utils.js +0 -54
- package/dist/node_modules/@date-fns/tz/date/index.js +0 -61
- package/dist/node_modules/@date-fns/tz/date/mini.js +0 -69
- package/dist/node_modules/@date-fns/tz/tzName/index.js +0 -11
- package/dist/node_modules/@date-fns/tz/tzOffset/index.js +0 -22
- package/dist/node_modules/date-fns/_lib/addLeadingZeros.js +0 -7
- package/dist/node_modules/date-fns/_lib/defaultOptions.js +0 -7
- package/dist/node_modules/date-fns/_lib/format/formatters.js +0 -583
- package/dist/node_modules/date-fns/_lib/format/lightFormatters.js +0 -59
- package/dist/node_modules/date-fns/_lib/format/longFormatters.js +0 -52
- package/dist/node_modules/date-fns/_lib/getTimezoneOffsetInMilliseconds.js +0 -18
- package/dist/node_modules/date-fns/_lib/normalizeDates.js +0 -11
- package/dist/node_modules/date-fns/_lib/normalizeInterval.js +0 -8
- package/dist/node_modules/date-fns/_lib/protectedTokens.js +0 -20
- package/dist/node_modules/date-fns/addDays.js +0 -10
- package/dist/node_modules/date-fns/addMonths.js +0 -20
- package/dist/node_modules/date-fns/addWeeks.js +0 -8
- package/dist/node_modules/date-fns/addYears.js +0 -8
- package/dist/node_modules/date-fns/constants.js +0 -6
- package/dist/node_modules/date-fns/constructFrom.js +0 -8
- package/dist/node_modules/date-fns/differenceInCalendarDays.js +0 -16
- package/dist/node_modules/date-fns/differenceInCalendarMonths.js +0 -13
- package/dist/node_modules/date-fns/eachMonthOfInterval.js +0 -17
- package/dist/node_modules/date-fns/eachYearOfInterval.js +0 -17
- package/dist/node_modules/date-fns/endOfISOWeek.js +0 -8
- package/dist/node_modules/date-fns/endOfMonth.js +0 -9
- package/dist/node_modules/date-fns/endOfWeek.js +0 -10
- package/dist/node_modules/date-fns/endOfYear.js +0 -9
- package/dist/node_modules/date-fns/format.js +0 -58
- package/dist/node_modules/date-fns/getDayOfYear.js +0 -11
- package/dist/node_modules/date-fns/getDaysInMonth.js +0 -10
- package/dist/node_modules/date-fns/getISOWeek.js +0 -12
- package/dist/node_modules/date-fns/getISOWeekYear.js +0 -15
- package/dist/node_modules/date-fns/getMonth.js +0 -8
- package/dist/node_modules/date-fns/getWeek.js +0 -12
- package/dist/node_modules/date-fns/getWeekYear.js +0 -16
- package/dist/node_modules/date-fns/getYear.js +0 -8
- package/dist/node_modules/date-fns/isAfter.js +0 -8
- package/dist/node_modules/date-fns/isBefore.js +0 -8
- package/dist/node_modules/date-fns/isDate.js +0 -7
- package/dist/node_modules/date-fns/isSameDay.js +0 -14
- package/dist/node_modules/date-fns/isSameMonth.js +0 -13
- package/dist/node_modules/date-fns/isSameYear.js +0 -13
- package/dist/node_modules/date-fns/isValid.js +0 -9
- package/dist/node_modules/date-fns/locale/_lib/buildFormatLongFn.js +0 -9
- package/dist/node_modules/date-fns/locale/_lib/buildLocalizeFn.js +0 -18
- package/dist/node_modules/date-fns/locale/_lib/buildMatchFn.js +0 -31
- package/dist/node_modules/date-fns/locale/_lib/buildMatchPatternFn.js +0 -15
- package/dist/node_modules/date-fns/locale/en-US/_lib/formatDistance.js +0 -70
- package/dist/node_modules/date-fns/locale/en-US/_lib/formatLong.js +0 -33
- package/dist/node_modules/date-fns/locale/en-US/_lib/formatRelative.js +0 -11
- package/dist/node_modules/date-fns/locale/en-US/_lib/localize.js +0 -155
- package/dist/node_modules/date-fns/locale/en-US/_lib/match.js +0 -110
- package/dist/node_modules/date-fns/locale/en-US.js +0 -21
- package/dist/node_modules/date-fns/locale/es/_lib/formatDistance.js +0 -70
- package/dist/node_modules/date-fns/locale/es/_lib/formatLong.js +0 -33
- package/dist/node_modules/date-fns/locale/es/_lib/formatRelative.js +0 -18
- package/dist/node_modules/date-fns/locale/es/_lib/localize.js +0 -143
- package/dist/node_modules/date-fns/locale/es/_lib/match.js +0 -116
- package/dist/node_modules/date-fns/locale/es.js +0 -21
- package/dist/node_modules/date-fns/max.js +0 -14
- package/dist/node_modules/date-fns/min.js +0 -14
- package/dist/node_modules/date-fns/setMonth.js +0 -13
- package/dist/node_modules/date-fns/setYear.js +0 -10
- package/dist/node_modules/date-fns/startOfDay.js +0 -9
- package/dist/node_modules/date-fns/startOfISOWeek.js +0 -8
- package/dist/node_modules/date-fns/startOfISOWeekYear.js +0 -11
- package/dist/node_modules/date-fns/startOfMonth.js +0 -9
- package/dist/node_modules/date-fns/startOfWeek.js +0 -10
- package/dist/node_modules/date-fns/startOfWeekYear.js +0 -12
- package/dist/node_modules/date-fns/startOfYear.js +0 -9
- package/dist/node_modules/date-fns/toDate.js +0 -8
- package/dist/node_modules/input-otp/dist/index.js +0 -194
- package/dist/node_modules/react-day-picker/dist/esm/DayPicker.js +0 -227
- package/dist/node_modules/react-day-picker/dist/esm/UI.js +0 -22
- package/dist/node_modules/react-day-picker/dist/esm/classes/CalendarDay.js +0 -19
- package/dist/node_modules/react-day-picker/dist/esm/classes/CalendarMonth.js +0 -8
- package/dist/node_modules/react-day-picker/dist/esm/classes/CalendarWeek.js +0 -8
- package/dist/node_modules/react-day-picker/dist/esm/classes/DateLib.js +0 -147
- package/dist/node_modules/react-day-picker/dist/esm/components/Button.js +0 -7
- package/dist/node_modules/react-day-picker/dist/esm/components/CaptionLabel.js +0 -7
- package/dist/node_modules/react-day-picker/dist/esm/components/Chevron.js +0 -18
- package/dist/node_modules/react-day-picker/dist/esm/components/Day.js +0 -8
- package/dist/node_modules/react-day-picker/dist/esm/components/DayButton.js +0 -10
- package/dist/node_modules/react-day-picker/dist/esm/components/Dropdown.js +0 -19
- package/dist/node_modules/react-day-picker/dist/esm/components/DropdownNav.js +0 -7
- package/dist/node_modules/react-day-picker/dist/esm/components/Footer.js +0 -7
- package/dist/node_modules/react-day-picker/dist/esm/components/Month.js +0 -8
- package/dist/node_modules/react-day-picker/dist/esm/components/MonthCaption.js +0 -8
- package/dist/node_modules/react-day-picker/dist/esm/components/MonthGrid.js +0 -7
- package/dist/node_modules/react-day-picker/dist/esm/components/Months.js +0 -7
- package/dist/node_modules/react-day-picker/dist/esm/components/MonthsDropdown.js +0 -9
- package/dist/node_modules/react-day-picker/dist/esm/components/Nav.js +0 -27
- package/dist/node_modules/react-day-picker/dist/esm/components/NextMonthButton.js +0 -9
- package/dist/node_modules/react-day-picker/dist/esm/components/Option.js +0 -7
- package/dist/node_modules/react-day-picker/dist/esm/components/PreviousMonthButton.js +0 -9
- package/dist/node_modules/react-day-picker/dist/esm/components/Root.js +0 -8
- package/dist/node_modules/react-day-picker/dist/esm/components/Select.js +0 -7
- package/dist/node_modules/react-day-picker/dist/esm/components/Week.js +0 -8
- package/dist/node_modules/react-day-picker/dist/esm/components/WeekNumber.js +0 -8
- package/dist/node_modules/react-day-picker/dist/esm/components/WeekNumberHeader.js +0 -7
- package/dist/node_modules/react-day-picker/dist/esm/components/Weekday.js +0 -7
- package/dist/node_modules/react-day-picker/dist/esm/components/Weekdays.js +0 -11
- package/dist/node_modules/react-day-picker/dist/esm/components/Weeks.js +0 -7
- package/dist/node_modules/react-day-picker/dist/esm/components/YearsDropdown.js +0 -9
- package/dist/node_modules/react-day-picker/dist/esm/components/custom-components.js +0 -54
- package/dist/node_modules/react-day-picker/dist/esm/formatters/formatCaption.js +0 -9
- package/dist/node_modules/react-day-picker/dist/esm/formatters/formatDay.js +0 -7
- package/dist/node_modules/react-day-picker/dist/esm/formatters/formatMonthDropdown.js +0 -7
- package/dist/node_modules/react-day-picker/dist/esm/formatters/formatWeekNumber.js +0 -7
- package/dist/node_modules/react-day-picker/dist/esm/formatters/formatWeekNumberHeader.js +0 -6
- package/dist/node_modules/react-day-picker/dist/esm/formatters/formatWeekdayName.js +0 -7
- package/dist/node_modules/react-day-picker/dist/esm/formatters/formatYearDropdown.js +0 -9
- package/dist/node_modules/react-day-picker/dist/esm/formatters/index.js +0 -18
- package/dist/node_modules/react-day-picker/dist/esm/helpers/calculateFocusTarget.js +0 -19
- package/dist/node_modules/react-day-picker/dist/esm/helpers/createGetModifiers.js +0 -42
- package/dist/node_modules/react-day-picker/dist/esm/helpers/endOfBroadcastWeek.js +0 -9
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getBroadcastWeeksInMonth.js +0 -7
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getClassNamesForModifiers.js +0 -7
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getComponents.js +0 -10
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getDataAttributes.js +0 -16
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getDates.js +0 -21
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getDays.js +0 -10
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getDefaultClassNames.js +0 -16
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getDisplayMonths.js +0 -13
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getFocusableDate.js +0 -15
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getFormatters.js +0 -10
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getInitialMonth.js +0 -13
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getMonthOptions.js +0 -13
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getMonths.js +0 -24
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getNavMonth.js +0 -13
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getNextFocus.js +0 -12
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getNextMonth.js +0 -12
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getPreviousMonth.js +0 -12
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getStyleForModifiers.js +0 -13
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getWeekdays.js +0 -11
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getWeeks.js +0 -7
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getYearOptions.js +0 -16
- package/dist/node_modules/react-day-picker/dist/esm/helpers/startOfBroadcastWeek.js +0 -7
- package/dist/node_modules/react-day-picker/dist/esm/helpers/useControlledValue.js +0 -8
- package/dist/node_modules/react-day-picker/dist/esm/labels/index.js +0 -26
- package/dist/node_modules/react-day-picker/dist/esm/labels/labelDayButton.js +0 -10
- package/dist/node_modules/react-day-picker/dist/esm/labels/labelGrid.js +0 -9
- package/dist/node_modules/react-day-picker/dist/esm/labels/labelGridcell.js +0 -8
- package/dist/node_modules/react-day-picker/dist/esm/labels/labelMonthDropdown.js +0 -6
- package/dist/node_modules/react-day-picker/dist/esm/labels/labelNav.js +0 -6
- package/dist/node_modules/react-day-picker/dist/esm/labels/labelNext.js +0 -6
- package/dist/node_modules/react-day-picker/dist/esm/labels/labelPrevious.js +0 -6
- package/dist/node_modules/react-day-picker/dist/esm/labels/labelWeekNumber.js +0 -6
- package/dist/node_modules/react-day-picker/dist/esm/labels/labelWeekNumberHeader.js +0 -6
- package/dist/node_modules/react-day-picker/dist/esm/labels/labelWeekday.js +0 -7
- package/dist/node_modules/react-day-picker/dist/esm/labels/labelYearDropdown.js +0 -6
- package/dist/node_modules/react-day-picker/dist/esm/selection/useMulti.js +0 -21
- package/dist/node_modules/react-day-picker/dist/esm/selection/useRange.js +0 -18
- package/dist/node_modules/react-day-picker/dist/esm/selection/useSingle.js +0 -15
- package/dist/node_modules/react-day-picker/dist/esm/useAnimation.js +0 -56
- package/dist/node_modules/react-day-picker/dist/esm/useCalendar.js +0 -44
- package/dist/node_modules/react-day-picker/dist/esm/useDayPicker.js +0 -12
- package/dist/node_modules/react-day-picker/dist/esm/useFocus.js +0 -23
- package/dist/node_modules/react-day-picker/dist/esm/useSelection.js +0 -19
- package/dist/node_modules/react-day-picker/dist/esm/utils/addToRange.js +0 -32
- package/dist/node_modules/react-day-picker/dist/esm/utils/dateMatchModifiers.js +0 -26
- package/dist/node_modules/react-day-picker/dist/esm/utils/rangeContainsDayOfWeek.js +0 -15
- package/dist/node_modules/react-day-picker/dist/esm/utils/rangeContainsModifiers.js +0 -28
- package/dist/node_modules/react-day-picker/dist/esm/utils/rangeIncludesDate.js +0 -9
- package/dist/node_modules/react-day-picker/dist/esm/utils/rangeOverlaps.js +0 -8
- package/dist/node_modules/react-day-picker/dist/esm/utils/typeguards.js +0 -26
- package/dist/useDevice.js +0 -4
- /package/dist/{hooks/useDevice.js → useDevice.es.js} +0 -0
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { constructFrom as n } from "./constructFrom.js";
|
|
2
|
-
import { toDate as c } from "./toDate.js";
|
|
3
|
-
function m(f, i) {
|
|
4
|
-
let t, o = i?.in;
|
|
5
|
-
return f.forEach((r) => {
|
|
6
|
-
!o && typeof r == "object" && (o = n.bind(null, r));
|
|
7
|
-
const e = c(r, o);
|
|
8
|
-
(!t || t < e || isNaN(+e)) && (t = e);
|
|
9
|
-
}), n(o, t || NaN);
|
|
10
|
-
}
|
|
11
|
-
export {
|
|
12
|
-
m as default,
|
|
13
|
-
m as max
|
|
14
|
-
};
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { constructFrom as e } from "./constructFrom.js";
|
|
2
|
-
import { toDate as c } from "./toDate.js";
|
|
3
|
-
function u(i, f) {
|
|
4
|
-
let t, o = f?.in;
|
|
5
|
-
return i.forEach((r) => {
|
|
6
|
-
!o && typeof r == "object" && (o = e.bind(null, r));
|
|
7
|
-
const n = c(r, o);
|
|
8
|
-
(!t || t > n || isNaN(+n)) && (t = n);
|
|
9
|
-
}), e(o, t || NaN);
|
|
10
|
-
}
|
|
11
|
-
export {
|
|
12
|
-
u as default,
|
|
13
|
-
u as min
|
|
14
|
-
};
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { constructFrom as m } from "./constructFrom.js";
|
|
2
|
-
import { getDaysInMonth as i } from "./getDaysInMonth.js";
|
|
3
|
-
import { toDate as u } from "./toDate.js";
|
|
4
|
-
function l(n, e, r) {
|
|
5
|
-
const t = u(n, r?.in), s = t.getFullYear(), a = t.getDate(), o = m(n, 0);
|
|
6
|
-
o.setFullYear(s, e, 15), o.setHours(0, 0, 0, 0);
|
|
7
|
-
const c = i(o);
|
|
8
|
-
return t.setMonth(e, Math.min(a, c)), t;
|
|
9
|
-
}
|
|
10
|
-
export {
|
|
11
|
-
l as default,
|
|
12
|
-
l as setMonth
|
|
13
|
-
};
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { constructFrom as a } from "./constructFrom.js";
|
|
2
|
-
import { getISOWeekYear as f } from "./getISOWeekYear.js";
|
|
3
|
-
import { startOfISOWeek as s } from "./startOfISOWeek.js";
|
|
4
|
-
function O(t, e) {
|
|
5
|
-
const o = f(t, e), r = a(t, 0);
|
|
6
|
-
return r.setFullYear(o, 0, 4), r.setHours(0, 0, 0, 0), s(r);
|
|
7
|
-
}
|
|
8
|
-
export {
|
|
9
|
-
O as default,
|
|
10
|
-
O as startOfISOWeekYear
|
|
11
|
-
};
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { getDefaultOptions as f } from "./_lib/defaultOptions.js";
|
|
2
|
-
import { toDate as c } from "./toDate.js";
|
|
3
|
-
function l(n, e) {
|
|
4
|
-
const a = f(), o = e?.weekStartsOn ?? e?.locale?.options?.weekStartsOn ?? a.weekStartsOn ?? a.locale?.options?.weekStartsOn ?? 0, t = c(n, e?.in), s = t.getDay(), r = (s < o ? 7 : 0) + s - o;
|
|
5
|
-
return t.setDate(t.getDate() - r), t.setHours(0, 0, 0, 0), t;
|
|
6
|
-
}
|
|
7
|
-
export {
|
|
8
|
-
l as default,
|
|
9
|
-
l as startOfWeek
|
|
10
|
-
};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { getDefaultOptions as n } from "./_lib/defaultOptions.js";
|
|
2
|
-
import { constructFrom as i } from "./constructFrom.js";
|
|
3
|
-
import { getWeekYear as f } from "./getWeekYear.js";
|
|
4
|
-
import { startOfWeek as c } from "./startOfWeek.js";
|
|
5
|
-
function D(r, t) {
|
|
6
|
-
const a = n(), o = t?.firstWeekContainsDate ?? t?.locale?.options?.firstWeekContainsDate ?? a.firstWeekContainsDate ?? a.locale?.options?.firstWeekContainsDate ?? 1, s = f(r, t), e = i(t?.in || r, 0);
|
|
7
|
-
return e.setFullYear(s, 0, o), e.setHours(0, 0, 0, 0), c(e, t);
|
|
8
|
-
}
|
|
9
|
-
export {
|
|
10
|
-
D as default,
|
|
11
|
-
D as startOfWeekYear
|
|
12
|
-
};
|
|
@@ -1,194 +0,0 @@
|
|
|
1
|
-
import * as t from "react";
|
|
2
|
-
var Me = Object.defineProperty, xe = Object.defineProperties, ke = Object.getOwnPropertyDescriptors, J = Object.getOwnPropertySymbols, fe = Object.prototype.hasOwnProperty, me = Object.prototype.propertyIsEnumerable, de = (r, l, a) => l in r ? Me(r, l, { enumerable: !0, configurable: !0, writable: !0, value: a }) : r[l] = a, Re = (r, l) => {
|
|
3
|
-
for (var a in l || (l = {})) fe.call(l, a) && de(r, a, l[a]);
|
|
4
|
-
if (J) for (var a of J(l)) me.call(l, a) && de(r, a, l[a]);
|
|
5
|
-
return r;
|
|
6
|
-
}, Te = (r, l) => xe(r, ke(l)), De = (r, l) => {
|
|
7
|
-
var a = {};
|
|
8
|
-
for (var c in r) fe.call(r, c) && l.indexOf(c) < 0 && (a[c] = r[c]);
|
|
9
|
-
if (r != null && J) for (var c of J(r)) l.indexOf(c) < 0 && me.call(r, c) && (a[c] = r[c]);
|
|
10
|
-
return a;
|
|
11
|
-
};
|
|
12
|
-
function Oe(r) {
|
|
13
|
-
let l = setTimeout(r, 0), a = setTimeout(r, 10), c = setTimeout(r, 50);
|
|
14
|
-
return [l, a, c];
|
|
15
|
-
}
|
|
16
|
-
function We(r) {
|
|
17
|
-
let l = t.useRef();
|
|
18
|
-
return t.useEffect(() => {
|
|
19
|
-
l.current = r;
|
|
20
|
-
}), l.current;
|
|
21
|
-
}
|
|
22
|
-
var Ae = 18, ve = 40, Be = `${ve}px`, je = ["[data-lastpass-icon-root]", "com-1password-button", "[data-dashlanecreated]", '[style$="2147483647 !important;"]'].join(",");
|
|
23
|
-
function Ie({ containerRef: r, inputRef: l, pushPasswordManagerStrategy: a, isFocused: c }) {
|
|
24
|
-
let [M, p] = t.useState(!1), [_, x] = t.useState(!1), [W, F] = t.useState(!1), H = t.useMemo(() => a === "none" ? !1 : (a === "increase-width" || a === "experimental-no-flickering") && M && _, [M, _, a]), A = t.useCallback(() => {
|
|
25
|
-
let m = r.current, y = l.current;
|
|
26
|
-
if (!m || !y || W || a === "none") return;
|
|
27
|
-
let g = m, E = g.getBoundingClientRect().left + g.offsetWidth, B = g.getBoundingClientRect().top + g.offsetHeight / 2, i = E - Ae, L = B;
|
|
28
|
-
document.querySelectorAll(je).length === 0 && document.elementFromPoint(i, L) === m || (p(!0), F(!0));
|
|
29
|
-
}, [r, l, W, a]);
|
|
30
|
-
return t.useEffect(() => {
|
|
31
|
-
let m = r.current;
|
|
32
|
-
if (!m || a === "none") return;
|
|
33
|
-
function y() {
|
|
34
|
-
let E = window.innerWidth - m.getBoundingClientRect().right;
|
|
35
|
-
x(E >= ve);
|
|
36
|
-
}
|
|
37
|
-
y();
|
|
38
|
-
let g = setInterval(y, 1e3);
|
|
39
|
-
return () => {
|
|
40
|
-
clearInterval(g);
|
|
41
|
-
};
|
|
42
|
-
}, [r, a]), t.useEffect(() => {
|
|
43
|
-
let m = c || document.activeElement === l.current;
|
|
44
|
-
if (a === "none" || !m) return;
|
|
45
|
-
let y = setTimeout(A, 0), g = setTimeout(A, 2e3), E = setTimeout(A, 5e3), B = setTimeout(() => {
|
|
46
|
-
F(!0);
|
|
47
|
-
}, 6e3);
|
|
48
|
-
return () => {
|
|
49
|
-
clearTimeout(y), clearTimeout(g), clearTimeout(E), clearTimeout(B);
|
|
50
|
-
};
|
|
51
|
-
}, [l, c, a, A]), { hasPWMBadge: M, willPushPWMBadge: H, PWM_BADGE_SPACE_WIDTH: Be };
|
|
52
|
-
}
|
|
53
|
-
var _e = t.createContext({}), Fe = t.forwardRef((r, l) => {
|
|
54
|
-
var a = r, { value: c, onChange: M, maxLength: p, textAlign: _ = "left", pattern: x, placeholder: W, inputMode: F = "numeric", onComplete: H, pushPasswordManagerStrategy: A = "increase-width", pasteTransformer: m, containerClassName: y, noScriptCSSFallback: g = He, render: E, children: B } = a, i = De(a, ["value", "onChange", "maxLength", "textAlign", "pattern", "placeholder", "inputMode", "onComplete", "pushPasswordManagerStrategy", "pasteTransformer", "containerClassName", "noScriptCSSFallback", "render", "children"]), L, ee, te, ne, re;
|
|
55
|
-
let [he, ge] = t.useState(typeof i.defaultValue == "string" ? i.defaultValue : ""), u = c ?? he, k = We(u), $ = t.useCallback((e) => {
|
|
56
|
-
M?.(e), ge(e);
|
|
57
|
-
}, [M]), w = t.useMemo(() => x ? typeof x == "string" ? new RegExp(x) : x : null, [x]), s = t.useRef(null), K = t.useRef(null), Q = t.useRef({ value: u, onChange: $, isIOS: typeof window < "u" && ((ee = (L = window?.CSS) == null ? void 0 : L.supports) == null ? void 0 : ee.call(L, "-webkit-touch-callout", "none")) }), q = t.useRef({ prev: [(te = s.current) == null ? void 0 : te.selectionStart, (ne = s.current) == null ? void 0 : ne.selectionEnd, (re = s.current) == null ? void 0 : re.selectionDirection] });
|
|
58
|
-
t.useImperativeHandle(l, () => s.current, []), t.useEffect(() => {
|
|
59
|
-
let e = s.current, n = K.current;
|
|
60
|
-
if (!e || !n) return;
|
|
61
|
-
Q.current.value !== e.value && Q.current.onChange(e.value), q.current.prev = [e.selectionStart, e.selectionEnd, e.selectionDirection];
|
|
62
|
-
function d() {
|
|
63
|
-
if (document.activeElement !== e) {
|
|
64
|
-
N(null), z(null);
|
|
65
|
-
return;
|
|
66
|
-
}
|
|
67
|
-
let o = e.selectionStart, f = e.selectionEnd, Z = e.selectionDirection, b = e.maxLength, T = e.value, S = q.current.prev, P = -1, C = -1, D;
|
|
68
|
-
if (T.length !== 0 && o !== null && f !== null) {
|
|
69
|
-
let ye = o === f, Pe = o === T.length && T.length < b;
|
|
70
|
-
if (ye && !Pe) {
|
|
71
|
-
let O = o;
|
|
72
|
-
if (O === 0) P = 0, C = 1, D = "forward";
|
|
73
|
-
else if (O === b) P = O - 1, C = O, D = "backward";
|
|
74
|
-
else if (b > 1 && T.length > 1) {
|
|
75
|
-
let Y = 0;
|
|
76
|
-
if (S[0] !== null && S[1] !== null) {
|
|
77
|
-
D = O < S[1] ? "backward" : "forward";
|
|
78
|
-
let Ce = S[0] === S[1] && S[0] < b;
|
|
79
|
-
D === "backward" && !Ce && (Y = -1);
|
|
80
|
-
}
|
|
81
|
-
P = Y + O, C = Y + O + 1;
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
P !== -1 && C !== -1 && P !== C && s.current.setSelectionRange(P, C, D);
|
|
85
|
-
}
|
|
86
|
-
let ce = P !== -1 ? P : o, pe = C !== -1 ? C : f, Se = D ?? Z;
|
|
87
|
-
N(ce), z(pe), q.current.prev = [ce, pe, Se];
|
|
88
|
-
}
|
|
89
|
-
if (document.addEventListener("selectionchange", d, { capture: !0 }), d(), document.activeElement === e && U(!0), !document.getElementById("input-otp-style")) {
|
|
90
|
-
let o = document.createElement("style");
|
|
91
|
-
if (o.id = "input-otp-style", document.head.appendChild(o), o.sheet) {
|
|
92
|
-
let f = "background: transparent !important; color: transparent !important; border-color: transparent !important; opacity: 0 !important; box-shadow: none !important; -webkit-box-shadow: none !important; -webkit-text-fill-color: transparent !important;";
|
|
93
|
-
V(o.sheet, "[data-input-otp]::selection { background: transparent !important; color: transparent !important; }"), V(o.sheet, `[data-input-otp]:autofill { ${f} }`), V(o.sheet, `[data-input-otp]:-webkit-autofill { ${f} }`), V(o.sheet, "@supports (-webkit-touch-callout: none) { [data-input-otp] { letter-spacing: -.6em !important; font-weight: 100 !important; font-stretch: ultra-condensed; font-optical-sizing: none !important; left: -1px !important; right: 1px !important; } }"), V(o.sheet, "[data-input-otp] + * { pointer-events: all !important; }");
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
|
-
let v = () => {
|
|
97
|
-
n && n.style.setProperty("--root-height", `${e.clientHeight}px`);
|
|
98
|
-
};
|
|
99
|
-
v();
|
|
100
|
-
let h = new ResizeObserver(v);
|
|
101
|
-
return h.observe(e), () => {
|
|
102
|
-
document.removeEventListener("selectionchange", d, { capture: !0 }), h.disconnect();
|
|
103
|
-
};
|
|
104
|
-
}, []);
|
|
105
|
-
let [le, ae] = t.useState(!1), [G, U] = t.useState(!1), [R, N] = t.useState(null), [j, z] = t.useState(null);
|
|
106
|
-
t.useEffect(() => {
|
|
107
|
-
Oe(() => {
|
|
108
|
-
var e, n, d, v;
|
|
109
|
-
(e = s.current) == null || e.dispatchEvent(new Event("input"));
|
|
110
|
-
let h = (n = s.current) == null ? void 0 : n.selectionStart, o = (d = s.current) == null ? void 0 : d.selectionEnd, f = (v = s.current) == null ? void 0 : v.selectionDirection;
|
|
111
|
-
h !== null && o !== null && (N(h), z(o), q.current.prev = [h, o, f]);
|
|
112
|
-
});
|
|
113
|
-
}, [u, G]), t.useEffect(() => {
|
|
114
|
-
k !== void 0 && u !== k && k.length < p && u.length === p && H?.(u);
|
|
115
|
-
}, [p, H, k, u]);
|
|
116
|
-
let I = Ie({ containerRef: K, inputRef: s, pushPasswordManagerStrategy: A, isFocused: G }), oe = t.useCallback((e) => {
|
|
117
|
-
let n = e.currentTarget.value.slice(0, p);
|
|
118
|
-
if (n.length > 0 && w && !w.test(n)) {
|
|
119
|
-
e.preventDefault();
|
|
120
|
-
return;
|
|
121
|
-
}
|
|
122
|
-
typeof k == "string" && n.length < k.length && document.dispatchEvent(new Event("selectionchange")), $(n);
|
|
123
|
-
}, [p, $, k, w]), ie = t.useCallback(() => {
|
|
124
|
-
var e;
|
|
125
|
-
if (s.current) {
|
|
126
|
-
let n = Math.min(s.current.value.length, p - 1), d = s.current.value.length;
|
|
127
|
-
(e = s.current) == null || e.setSelectionRange(n, d), N(n), z(d);
|
|
128
|
-
}
|
|
129
|
-
U(!0);
|
|
130
|
-
}, [p]), ue = t.useCallback((e) => {
|
|
131
|
-
var n, d;
|
|
132
|
-
let v = s.current;
|
|
133
|
-
if (!m && (!Q.current.isIOS || !e.clipboardData || !v)) return;
|
|
134
|
-
let h = e.clipboardData.getData("text/plain"), o = m ? m(h) : h;
|
|
135
|
-
e.preventDefault();
|
|
136
|
-
let f = (n = s.current) == null ? void 0 : n.selectionStart, Z = (d = s.current) == null ? void 0 : d.selectionEnd, b = (f !== Z ? u.slice(0, f) + o + u.slice(Z) : u.slice(0, f) + o + u.slice(f)).slice(0, p);
|
|
137
|
-
if (b.length > 0 && w && !w.test(b)) return;
|
|
138
|
-
v.value = b, $(b);
|
|
139
|
-
let T = Math.min(b.length, p - 1), S = b.length;
|
|
140
|
-
v.setSelectionRange(T, S), N(T), z(S);
|
|
141
|
-
}, [p, $, w, u]), be = t.useMemo(() => ({ position: "relative", cursor: i.disabled ? "default" : "text", userSelect: "none", WebkitUserSelect: "none", pointerEvents: "none" }), [i.disabled]), se = t.useMemo(() => ({ position: "absolute", inset: 0, width: I.willPushPWMBadge ? `calc(100% + ${I.PWM_BADGE_SPACE_WIDTH})` : "100%", clipPath: I.willPushPWMBadge ? `inset(0 ${I.PWM_BADGE_SPACE_WIDTH} 0 0)` : void 0, height: "100%", display: "flex", textAlign: _, opacity: "1", color: "transparent", pointerEvents: "all", background: "transparent", caretColor: "transparent", border: "0 solid transparent", outline: "0 solid transparent", boxShadow: "none", lineHeight: "1", letterSpacing: "-.5em", fontSize: "var(--root-height)", fontFamily: "monospace", fontVariantNumeric: "tabular-nums" }), [I.PWM_BADGE_SPACE_WIDTH, I.willPushPWMBadge, _]), we = t.useMemo(() => t.createElement("input", Te(Re({ autoComplete: i.autoComplete || "one-time-code" }, i), { "data-input-otp": !0, "data-input-otp-placeholder-shown": u.length === 0 || void 0, "data-input-otp-mss": R, "data-input-otp-mse": j, inputMode: F, pattern: w?.source, "aria-placeholder": W, style: se, maxLength: p, value: u, ref: s, onPaste: (e) => {
|
|
142
|
-
var n;
|
|
143
|
-
ue(e), (n = i.onPaste) == null || n.call(i, e);
|
|
144
|
-
}, onChange: oe, onMouseOver: (e) => {
|
|
145
|
-
var n;
|
|
146
|
-
ae(!0), (n = i.onMouseOver) == null || n.call(i, e);
|
|
147
|
-
}, onMouseLeave: (e) => {
|
|
148
|
-
var n;
|
|
149
|
-
ae(!1), (n = i.onMouseLeave) == null || n.call(i, e);
|
|
150
|
-
}, onFocus: (e) => {
|
|
151
|
-
var n;
|
|
152
|
-
ie(), (n = i.onFocus) == null || n.call(i, e);
|
|
153
|
-
}, onBlur: (e) => {
|
|
154
|
-
var n;
|
|
155
|
-
U(!1), (n = i.onBlur) == null || n.call(i, e);
|
|
156
|
-
} })), [oe, ie, ue, F, se, p, j, R, i, w?.source, u]), X = t.useMemo(() => ({ slots: Array.from({ length: p }).map((e, n) => {
|
|
157
|
-
var d;
|
|
158
|
-
let v = G && R !== null && j !== null && (R === j && n === R || n >= R && n < j), h = u[n] !== void 0 ? u[n] : null, o = u[0] !== void 0 ? null : (d = W?.[n]) != null ? d : null;
|
|
159
|
-
return { char: h, placeholderChar: o, isActive: v, hasFakeCaret: v && h === null };
|
|
160
|
-
}), isFocused: G, isHovering: !i.disabled && le }), [G, le, p, j, R, i.disabled, u]), Ee = t.useMemo(() => E ? E(X) : t.createElement(_e.Provider, { value: X }, B), [B, X, E]);
|
|
161
|
-
return t.createElement(t.Fragment, null, g !== null && t.createElement("noscript", null, t.createElement("style", null, g)), t.createElement("div", { ref: K, "data-input-otp-container": !0, style: be, className: y }, Ee, t.createElement("div", { style: { position: "absolute", inset: 0, pointerEvents: "none" } }, we)));
|
|
162
|
-
});
|
|
163
|
-
Fe.displayName = "Input";
|
|
164
|
-
function V(r, l) {
|
|
165
|
-
try {
|
|
166
|
-
r.insertRule(l);
|
|
167
|
-
} catch {
|
|
168
|
-
console.error("input-otp could not insert CSS rule:", l);
|
|
169
|
-
}
|
|
170
|
-
}
|
|
171
|
-
var He = `
|
|
172
|
-
[data-input-otp] {
|
|
173
|
-
--nojs-bg: white !important;
|
|
174
|
-
--nojs-fg: black !important;
|
|
175
|
-
|
|
176
|
-
background-color: var(--nojs-bg) !important;
|
|
177
|
-
color: var(--nojs-fg) !important;
|
|
178
|
-
caret-color: var(--nojs-fg) !important;
|
|
179
|
-
letter-spacing: .25em !important;
|
|
180
|
-
text-align: center !important;
|
|
181
|
-
border: 1px solid var(--nojs-fg) !important;
|
|
182
|
-
border-radius: 4px !important;
|
|
183
|
-
width: 100% !important;
|
|
184
|
-
}
|
|
185
|
-
@media (prefers-color-scheme: dark) {
|
|
186
|
-
[data-input-otp] {
|
|
187
|
-
--nojs-bg: black !important;
|
|
188
|
-
--nojs-fg: white !important;
|
|
189
|
-
}
|
|
190
|
-
}`;
|
|
191
|
-
export {
|
|
192
|
-
Fe as OTPInput,
|
|
193
|
-
_e as OTPInputContext
|
|
194
|
-
};
|
|
@@ -1,227 +0,0 @@
|
|
|
1
|
-
import i, { useMemo as Z, useCallback as y, useRef as Ae } from "react";
|
|
2
|
-
import { DateLib as Te } from "./classes/DateLib.js";
|
|
3
|
-
import { createGetModifiers as Ke } from "./helpers/createGetModifiers.js";
|
|
4
|
-
import { getClassNamesForModifiers as Re } from "./helpers/getClassNamesForModifiers.js";
|
|
5
|
-
import { getComponents as Ge } from "./helpers/getComponents.js";
|
|
6
|
-
import { getDataAttributes as He } from "./helpers/getDataAttributes.js";
|
|
7
|
-
import { getDefaultClassNames as _e } from "./helpers/getDefaultClassNames.js";
|
|
8
|
-
import { getFormatters as Ie } from "./helpers/getFormatters.js";
|
|
9
|
-
import { getMonthOptions as Ue } from "./helpers/getMonthOptions.js";
|
|
10
|
-
import { getStyleForModifiers as je } from "./helpers/getStyleForModifiers.js";
|
|
11
|
-
import { getWeekdays as Ve } from "./helpers/getWeekdays.js";
|
|
12
|
-
import { getYearOptions as $e } from "./helpers/getYearOptions.js";
|
|
13
|
-
import * as qe from "./labels/index.js";
|
|
14
|
-
import { UI as o, DayFlag as ze, SelectionState as w } from "./UI.js";
|
|
15
|
-
import { useAnimation as Je } from "./useAnimation.js";
|
|
16
|
-
import { useCalendar as Qe } from "./useCalendar.js";
|
|
17
|
-
import { dayPickerContext as Xe } from "./useDayPicker.js";
|
|
18
|
-
import { useFocus as et } from "./useFocus.js";
|
|
19
|
-
import { useSelection as tt } from "./useSelection.js";
|
|
20
|
-
import { rangeIncludesDate as at } from "./utils/rangeIncludesDate.js";
|
|
21
|
-
import { isDateRange as ot } from "./utils/typeguards.js";
|
|
22
|
-
import { enUS as nt } from "../../../date-fns/locale/en-US.js";
|
|
23
|
-
import { TZDate as b } from "../../../@date-fns/tz/date/index.js";
|
|
24
|
-
function Et(A) {
|
|
25
|
-
let e = A;
|
|
26
|
-
e.timeZone && (e = {
|
|
27
|
-
...A
|
|
28
|
-
}, e.today && (e.today = new b(e.today, e.timeZone)), e.month && (e.month = new b(e.month, e.timeZone)), e.defaultMonth && (e.defaultMonth = new b(e.defaultMonth, e.timeZone)), e.startMonth && (e.startMonth = new b(e.startMonth, e.timeZone)), e.endMonth && (e.endMonth = new b(e.endMonth, e.timeZone)), e.mode === "single" && e.selected ? e.selected = new b(e.selected, e.timeZone) : e.mode === "multiple" && e.selected ? e.selected = e.selected?.map((n) => new b(n, e.timeZone)) : e.mode === "range" && e.selected && (e.selected = {
|
|
29
|
-
from: e.selected.from ? new b(e.selected.from, e.timeZone) : void 0,
|
|
30
|
-
to: e.selected.to ? new b(e.selected.to, e.timeZone) : void 0
|
|
31
|
-
}));
|
|
32
|
-
const { components: l, formatters: N, labels: T, dateLib: t, locale: oe, classNames: r } = Z(() => {
|
|
33
|
-
const n = { ...nt, ...e.locale };
|
|
34
|
-
return {
|
|
35
|
-
dateLib: new Te({
|
|
36
|
-
locale: n,
|
|
37
|
-
weekStartsOn: e.broadcastCalendar ? 1 : e.weekStartsOn,
|
|
38
|
-
firstWeekContainsDate: e.firstWeekContainsDate,
|
|
39
|
-
useAdditionalWeekYearTokens: e.useAdditionalWeekYearTokens,
|
|
40
|
-
useAdditionalDayOfYearTokens: e.useAdditionalDayOfYearTokens,
|
|
41
|
-
timeZone: e.timeZone,
|
|
42
|
-
numerals: e.numerals
|
|
43
|
-
}, e.dateLib),
|
|
44
|
-
components: Ge(e.components),
|
|
45
|
-
formatters: Ie(e.formatters),
|
|
46
|
-
labels: { ...qe, ...e.labels },
|
|
47
|
-
locale: n,
|
|
48
|
-
classNames: { ..._e(), ...e.classNames }
|
|
49
|
-
};
|
|
50
|
-
}, [
|
|
51
|
-
e.locale,
|
|
52
|
-
e.broadcastCalendar,
|
|
53
|
-
e.weekStartsOn,
|
|
54
|
-
e.firstWeekContainsDate,
|
|
55
|
-
e.useAdditionalWeekYearTokens,
|
|
56
|
-
e.useAdditionalDayOfYearTokens,
|
|
57
|
-
e.timeZone,
|
|
58
|
-
e.numerals,
|
|
59
|
-
e.dateLib,
|
|
60
|
-
e.components,
|
|
61
|
-
e.formatters,
|
|
62
|
-
e.labels,
|
|
63
|
-
e.classNames
|
|
64
|
-
]), { captionLayout: k, mode: g, navLayout: M, numberOfMonths: K = 1, onDayBlur: R, onDayClick: C, onDayFocus: G, onDayKeyDown: H, onDayMouseEnter: _, onDayMouseLeave: I, onNextClick: U, onPrevClick: j, showWeekNumber: V, styles: c } = e, { formatCaption: $, formatDay: q, formatMonthDropdown: ne, formatWeekNumber: se, formatWeekNumberHeader: re, formatWeekdayName: ie, formatYearDropdown: le } = N, z = Qe(e, t), { days: de, months: W, navStart: E, navEnd: B, previousMonth: f, nextMonth: p, goToMonth: h } = z, x = Ke(de, e, E, B, t), { isSelected: S, select: Y, selected: D } = tt(e, t) ?? {}, { blur: J, focused: Q, isFocusTarget: me, moveFocus: X, setFocused: v } = et(e, z, x, S ?? (() => !1), t), { labelDayButton: ce, labelGridcell: ue, labelGrid: fe, labelMonthDropdown: pe, labelNav: ee, labelPrevious: ye, labelNext: he, labelWeekday: be, labelWeekNumber: ke, labelWeekNumberHeader: Ne, labelYearDropdown: Me } = T, De = Z(() => Ve(t, e.ISOWeek), [t, e.ISOWeek]), te = g !== void 0 || C !== void 0, O = y(() => {
|
|
65
|
-
f && (h(f), j?.(f));
|
|
66
|
-
}, [f, h, j]), L = y(() => {
|
|
67
|
-
p && (h(p), U?.(p));
|
|
68
|
-
}, [h, p, U]), ve = y((n, m) => (a) => {
|
|
69
|
-
a.preventDefault(), a.stopPropagation(), v(n), Y?.(n.date, m, a), C?.(n.date, m, a);
|
|
70
|
-
}, [Y, C, v]), we = y((n, m) => (a) => {
|
|
71
|
-
v(n), G?.(n.date, m, a);
|
|
72
|
-
}, [G, v]), ge = y((n, m) => (a) => {
|
|
73
|
-
J(), R?.(n.date, m, a);
|
|
74
|
-
}, [J, R]), Ce = y((n, m) => (a) => {
|
|
75
|
-
const d = {
|
|
76
|
-
ArrowLeft: [
|
|
77
|
-
a.shiftKey ? "month" : "day",
|
|
78
|
-
e.dir === "rtl" ? "after" : "before"
|
|
79
|
-
],
|
|
80
|
-
ArrowRight: [
|
|
81
|
-
a.shiftKey ? "month" : "day",
|
|
82
|
-
e.dir === "rtl" ? "before" : "after"
|
|
83
|
-
],
|
|
84
|
-
ArrowDown: [a.shiftKey ? "year" : "week", "after"],
|
|
85
|
-
ArrowUp: [a.shiftKey ? "year" : "week", "before"],
|
|
86
|
-
PageUp: [a.shiftKey ? "year" : "month", "before"],
|
|
87
|
-
PageDown: [a.shiftKey ? "year" : "month", "after"],
|
|
88
|
-
Home: ["startOfWeek", "before"],
|
|
89
|
-
End: ["endOfWeek", "after"]
|
|
90
|
-
};
|
|
91
|
-
if (d[a.key]) {
|
|
92
|
-
a.preventDefault(), a.stopPropagation();
|
|
93
|
-
const [u, s] = d[a.key];
|
|
94
|
-
X(u, s);
|
|
95
|
-
}
|
|
96
|
-
H?.(n.date, m, a);
|
|
97
|
-
}, [X, H, e.dir]), We = y((n, m) => (a) => {
|
|
98
|
-
_?.(n.date, m, a);
|
|
99
|
-
}, [_]), Ee = y((n, m) => (a) => {
|
|
100
|
-
I?.(n.date, m, a);
|
|
101
|
-
}, [I]), Be = y((n) => (m) => {
|
|
102
|
-
const a = Number(m.target.value), d = t.setMonth(t.startOfMonth(n), a);
|
|
103
|
-
h(d);
|
|
104
|
-
}, [t, h]), xe = y((n) => (m) => {
|
|
105
|
-
const a = Number(m.target.value), d = t.setYear(t.startOfMonth(n), a);
|
|
106
|
-
h(d);
|
|
107
|
-
}, [t, h]), { className: Se, style: Ye } = Z(() => ({
|
|
108
|
-
className: [r[o.Root], e.className].filter(Boolean).join(" "),
|
|
109
|
-
style: { ...c?.[o.Root], ...e.style }
|
|
110
|
-
}), [r, e.className, e.style, c]), Oe = He(e), ae = Ae(null);
|
|
111
|
-
Je(ae, !!e.animate, {
|
|
112
|
-
classNames: r,
|
|
113
|
-
months: W,
|
|
114
|
-
focused: Q,
|
|
115
|
-
dateLib: t
|
|
116
|
-
});
|
|
117
|
-
const Le = {
|
|
118
|
-
dayPickerProps: e,
|
|
119
|
-
selected: D,
|
|
120
|
-
select: Y,
|
|
121
|
-
isSelected: S,
|
|
122
|
-
months: W,
|
|
123
|
-
nextMonth: p,
|
|
124
|
-
previousMonth: f,
|
|
125
|
-
goToMonth: h,
|
|
126
|
-
getModifiers: x,
|
|
127
|
-
components: l,
|
|
128
|
-
classNames: r,
|
|
129
|
-
styles: c,
|
|
130
|
-
labels: T,
|
|
131
|
-
formatters: N
|
|
132
|
-
};
|
|
133
|
-
return i.createElement(
|
|
134
|
-
Xe.Provider,
|
|
135
|
-
{ value: Le },
|
|
136
|
-
i.createElement(
|
|
137
|
-
l.Root,
|
|
138
|
-
{ rootRef: e.animate ? ae : void 0, className: Se, style: Ye, dir: e.dir, id: e.id, lang: e.lang, nonce: e.nonce, title: e.title, role: e.role, "aria-label": e["aria-label"], "aria-labelledby": e["aria-labelledby"], ...Oe },
|
|
139
|
-
i.createElement(
|
|
140
|
-
l.Months,
|
|
141
|
-
{ className: r[o.Months], style: c?.[o.Months] },
|
|
142
|
-
!e.hideNavigation && !M && i.createElement(l.Nav, { "data-animated-nav": e.animate ? "true" : void 0, className: r[o.Nav], style: c?.[o.Nav], "aria-label": ee(), onPreviousClick: O, onNextClick: L, previousMonth: f, nextMonth: p }),
|
|
143
|
-
W.map((n, m) => i.createElement(
|
|
144
|
-
l.Month,
|
|
145
|
-
{
|
|
146
|
-
"data-animated-month": e.animate ? "true" : void 0,
|
|
147
|
-
className: r[o.Month],
|
|
148
|
-
style: c?.[o.Month],
|
|
149
|
-
// biome-ignore lint/suspicious/noArrayIndexKey: breaks animation
|
|
150
|
-
key: m,
|
|
151
|
-
displayIndex: m,
|
|
152
|
-
calendarMonth: n
|
|
153
|
-
},
|
|
154
|
-
M === "around" && !e.hideNavigation && m === 0 && i.createElement(
|
|
155
|
-
l.PreviousMonthButton,
|
|
156
|
-
{ type: "button", className: r[o.PreviousMonthButton], tabIndex: f ? void 0 : -1, "aria-disabled": f ? void 0 : !0, "aria-label": ye(f), onClick: O, "data-animated-button": e.animate ? "true" : void 0 },
|
|
157
|
-
i.createElement(l.Chevron, { disabled: f ? void 0 : !0, className: r[o.Chevron], orientation: e.dir === "rtl" ? "right" : "left" })
|
|
158
|
-
),
|
|
159
|
-
i.createElement(l.MonthCaption, { "data-animated-caption": e.animate ? "true" : void 0, className: r[o.MonthCaption], style: c?.[o.MonthCaption], calendarMonth: n, displayIndex: m }, k?.startsWith("dropdown") ? i.createElement(
|
|
160
|
-
l.DropdownNav,
|
|
161
|
-
{ className: r[o.Dropdowns], style: c?.[o.Dropdowns] },
|
|
162
|
-
(() => {
|
|
163
|
-
const a = k === "dropdown" || k === "dropdown-months" ? i.createElement(l.MonthsDropdown, { key: "month", className: r[o.MonthsDropdown], "aria-label": pe(), classNames: r, components: l, disabled: !!e.disableNavigation, onChange: Be(n.date), options: Ue(n.date, E, B, N, t), style: c?.[o.Dropdown], value: t.getMonth(n.date) }) : i.createElement("span", { key: "month" }, ne(n.date, t)), d = k === "dropdown" || k === "dropdown-years" ? i.createElement(l.YearsDropdown, { key: "year", className: r[o.YearsDropdown], "aria-label": Me(t.options), classNames: r, components: l, disabled: !!e.disableNavigation, onChange: xe(n.date), options: $e(E, B, N, t, !!e.reverseYears), style: c?.[o.Dropdown], value: t.getYear(n.date) }) : i.createElement("span", { key: "year" }, le(n.date, t));
|
|
164
|
-
return t.getMonthYearOrder() === "year-first" ? [d, a] : [a, d];
|
|
165
|
-
})(),
|
|
166
|
-
i.createElement("span", { role: "status", "aria-live": "polite", style: {
|
|
167
|
-
border: 0,
|
|
168
|
-
clip: "rect(0 0 0 0)",
|
|
169
|
-
height: "1px",
|
|
170
|
-
margin: "-1px",
|
|
171
|
-
overflow: "hidden",
|
|
172
|
-
padding: 0,
|
|
173
|
-
position: "absolute",
|
|
174
|
-
width: "1px",
|
|
175
|
-
whiteSpace: "nowrap",
|
|
176
|
-
wordWrap: "normal"
|
|
177
|
-
} }, $(n.date, t.options, t))
|
|
178
|
-
) : (
|
|
179
|
-
// biome-ignore lint/a11y/useSemanticElements: breaking change
|
|
180
|
-
i.createElement(l.CaptionLabel, { className: r[o.CaptionLabel], role: "status", "aria-live": "polite" }, $(n.date, t.options, t))
|
|
181
|
-
)),
|
|
182
|
-
M === "around" && !e.hideNavigation && m === K - 1 && i.createElement(
|
|
183
|
-
l.NextMonthButton,
|
|
184
|
-
{ type: "button", className: r[o.NextMonthButton], tabIndex: p ? void 0 : -1, "aria-disabled": p ? void 0 : !0, "aria-label": he(p), onClick: L, "data-animated-button": e.animate ? "true" : void 0 },
|
|
185
|
-
i.createElement(l.Chevron, { disabled: p ? void 0 : !0, className: r[o.Chevron], orientation: e.dir === "rtl" ? "left" : "right" })
|
|
186
|
-
),
|
|
187
|
-
m === K - 1 && M === "after" && !e.hideNavigation && i.createElement(l.Nav, { "data-animated-nav": e.animate ? "true" : void 0, className: r[o.Nav], style: c?.[o.Nav], "aria-label": ee(), onPreviousClick: O, onNextClick: L, previousMonth: f, nextMonth: p }),
|
|
188
|
-
i.createElement(
|
|
189
|
-
l.MonthGrid,
|
|
190
|
-
{ role: "grid", "aria-multiselectable": g === "multiple" || g === "range", "aria-label": fe(n.date, t.options, t) || void 0, className: r[o.MonthGrid], style: c?.[o.MonthGrid] },
|
|
191
|
-
!e.hideWeekdays && i.createElement(
|
|
192
|
-
l.Weekdays,
|
|
193
|
-
{ "data-animated-weekdays": e.animate ? "true" : void 0, className: r[o.Weekdays], style: c?.[o.Weekdays] },
|
|
194
|
-
V && i.createElement(l.WeekNumberHeader, { "aria-label": Ne(t.options), className: r[o.WeekNumberHeader], style: c?.[o.WeekNumberHeader], scope: "col" }, re()),
|
|
195
|
-
De.map((a) => i.createElement(l.Weekday, { "aria-label": be(a, t.options, t), className: r[o.Weekday], key: String(a), style: c?.[o.Weekday], scope: "col" }, ie(a, t.options, t)))
|
|
196
|
-
),
|
|
197
|
-
i.createElement(l.Weeks, { "data-animated-weeks": e.animate ? "true" : void 0, className: r[o.Weeks], style: c?.[o.Weeks] }, n.weeks.map((a) => i.createElement(
|
|
198
|
-
l.Week,
|
|
199
|
-
{ className: r[o.Week], key: a.weekNumber, style: c?.[o.Week], week: a },
|
|
200
|
-
V && // biome-ignore lint/a11y/useSemanticElements: react component
|
|
201
|
-
i.createElement(l.WeekNumber, { week: a, style: c?.[o.WeekNumber], "aria-label": ke(a.weekNumber, {
|
|
202
|
-
locale: oe
|
|
203
|
-
}), className: r[o.WeekNumber], scope: "row", role: "rowheader" }, se(a.weekNumber, t)),
|
|
204
|
-
a.days.map((d) => {
|
|
205
|
-
const { date: u } = d, s = x(d);
|
|
206
|
-
if (s[ze.focused] = !s.hidden && !!Q?.isEqualTo(d), s[w.selected] = S?.(u) || s.selected, ot(D)) {
|
|
207
|
-
const { from: P, to: F } = D;
|
|
208
|
-
s[w.range_start] = !!(P && F && t.isSameDay(u, P)), s[w.range_end] = !!(P && F && t.isSameDay(u, F)), s[w.range_middle] = at(D, u, !0, t);
|
|
209
|
-
}
|
|
210
|
-
const Pe = je(s, c, e.modifiersStyles), Fe = Re(s, r, e.modifiersClassNames), Ze = !te && !s.hidden ? ue(u, s, t.options, t) : void 0;
|
|
211
|
-
return (
|
|
212
|
-
// biome-ignore lint/a11y/useSemanticElements: react component
|
|
213
|
-
i.createElement(l.Day, { key: `${t.format(u, "yyyy-MM-dd")}_${t.format(d.displayMonth, "yyyy-MM")}`, day: d, modifiers: s, className: Fe.join(" "), style: Pe, role: "gridcell", "aria-selected": s.selected || void 0, "aria-label": Ze, "data-day": t.format(u, "yyyy-MM-dd"), "data-month": d.outside ? t.format(u, "yyyy-MM") : void 0, "data-selected": s.selected || void 0, "data-disabled": s.disabled || void 0, "data-hidden": s.hidden || void 0, "data-outside": d.outside || void 0, "data-focused": s.focused || void 0, "data-today": s.today || void 0 }, !s.hidden && te ? i.createElement(l.DayButton, { className: r[o.DayButton], style: c?.[o.DayButton], type: "button", day: d, modifiers: s, disabled: s.disabled || void 0, tabIndex: me(d) ? 0 : -1, "aria-label": ce(u, s, t.options, t), onClick: ve(d, s), onBlur: ge(d, s), onFocus: we(d, s), onKeyDown: Ce(d, s), onMouseEnter: We(d, s), onMouseLeave: Ee(d, s) }, q(u, t.options, t)) : !s.hidden && q(d.date, t.options, t))
|
|
214
|
-
);
|
|
215
|
-
})
|
|
216
|
-
)))
|
|
217
|
-
)
|
|
218
|
-
))
|
|
219
|
-
),
|
|
220
|
-
e.footer && // biome-ignore lint/a11y/useSemanticElements: react component
|
|
221
|
-
i.createElement(l.Footer, { className: r[o.Footer], style: c?.[o.Footer], role: "status", "aria-live": "polite" }, e.footer)
|
|
222
|
-
)
|
|
223
|
-
);
|
|
224
|
-
}
|
|
225
|
-
export {
|
|
226
|
-
Et as DayPicker
|
|
227
|
-
};
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
var o;
|
|
2
|
-
(function(e) {
|
|
3
|
-
e.Root = "root", e.Chevron = "chevron", e.Day = "day", e.DayButton = "day_button", e.CaptionLabel = "caption_label", e.Dropdowns = "dropdowns", e.Dropdown = "dropdown", e.DropdownRoot = "dropdown_root", e.Footer = "footer", e.MonthGrid = "month_grid", e.MonthCaption = "month_caption", e.MonthsDropdown = "months_dropdown", e.Month = "month", e.Months = "months", e.Nav = "nav", e.NextMonthButton = "button_next", e.PreviousMonthButton = "button_previous", e.Week = "week", e.Weeks = "weeks", e.Weekday = "weekday", e.Weekdays = "weekdays", e.WeekNumber = "week_number", e.WeekNumberHeader = "week_number_header", e.YearsDropdown = "years_dropdown";
|
|
4
|
-
})(o || (o = {}));
|
|
5
|
-
var t;
|
|
6
|
-
(function(e) {
|
|
7
|
-
e.disabled = "disabled", e.hidden = "hidden", e.outside = "outside", e.focused = "focused", e.today = "today";
|
|
8
|
-
})(t || (t = {}));
|
|
9
|
-
var r;
|
|
10
|
-
(function(e) {
|
|
11
|
-
e.range_end = "range_end", e.range_middle = "range_middle", e.range_start = "range_start", e.selected = "selected";
|
|
12
|
-
})(r || (r = {}));
|
|
13
|
-
var n;
|
|
14
|
-
(function(e) {
|
|
15
|
-
e.weeks_before_enter = "weeks_before_enter", e.weeks_before_exit = "weeks_before_exit", e.weeks_after_enter = "weeks_after_enter", e.weeks_after_exit = "weeks_after_exit", e.caption_after_enter = "caption_after_enter", e.caption_after_exit = "caption_after_exit", e.caption_before_enter = "caption_before_enter", e.caption_before_exit = "caption_before_exit";
|
|
16
|
-
})(n || (n = {}));
|
|
17
|
-
export {
|
|
18
|
-
n as Animation,
|
|
19
|
-
t as DayFlag,
|
|
20
|
-
r as SelectionState,
|
|
21
|
-
o as UI
|
|
22
|
-
};
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { defaultDateLib as a } from "./DateLib.js";
|
|
2
|
-
class h {
|
|
3
|
-
constructor(t, i, s = a) {
|
|
4
|
-
this.date = t, this.displayMonth = i, this.outside = !!(i && !s.isSameMonth(t, i)), this.dateLib = s;
|
|
5
|
-
}
|
|
6
|
-
/**
|
|
7
|
-
* Checks if this day is equal to another `CalendarDay`, considering both the
|
|
8
|
-
* date and the displayed month.
|
|
9
|
-
*
|
|
10
|
-
* @param day The `CalendarDay` to compare with.
|
|
11
|
-
* @returns `true` if the days are equal, otherwise `false`.
|
|
12
|
-
*/
|
|
13
|
-
isEqualTo(t) {
|
|
14
|
-
return this.dateLib.isSameDay(t.date, this.date) && this.dateLib.isSameMonth(t.displayMonth, this.displayMonth);
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
export {
|
|
18
|
-
h as CalendarDay
|
|
19
|
-
};
|