prometeo-design-system 2.8.4 → 2.8.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Avatar.js +4 -0
- package/dist/Button.js +4 -0
- package/dist/CardProfile.d.ts +4 -0
- package/dist/CardProfile.js +5 -0
- package/dist/CheckBox.js +4 -0
- package/dist/DatePicker.d.ts +2 -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.d.ts +4 -0
- package/dist/DropZone.js +5 -0
- package/dist/FAButton.js +4 -0
- package/dist/Header.js +4 -0
- package/dist/Icons/Icons.d.ts +1 -1
- package/dist/Icons/Icons.js +1055 -0
- package/dist/Icons.d.ts +4 -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.d.ts +4 -0
- package/dist/InputMultiple.js +5 -0
- package/dist/LayoutGeneric.js +4 -0
- package/dist/Logo.js +4 -0
- package/dist/Menu.d.ts +4 -0
- package/dist/Menu.js +5 -0
- package/dist/OtpInput.js +4 -0
- package/dist/Pagination.js +4 -0
- package/dist/ProfilePictureUpload.d.ts +4 -0
- package/dist/ProfilePictureUpload.js +5 -0
- package/dist/ProgressBar.js +4 -0
- package/dist/RadioButton.d.ts +4 -0
- package/dist/RadioButton.js +5 -0
- package/dist/SegmentedButton.d.ts +4 -0
- package/dist/SegmentedButton.js +5 -0
- package/dist/Select.js +4 -0
- package/dist/SelectSearch.js +4 -0
- package/dist/Skeleton.d.ts +4 -0
- package/dist/Skeleton.js +5 -0
- package/dist/Spinner.js +4 -0
- package/dist/Steps.d.ts +4 -0
- package/dist/Steps.js +5 -0
- package/dist/SwipeContainer.js +4 -0
- package/dist/Switch.d.ts +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} +28 -33
- package/dist/{Button.es.js → components/Button/Button.js} +55 -55
- package/dist/{CardProfile-BB-IP1MR.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/{InputMultiple.es.js → components/InputMultiple/InputMultiple.js} +91 -91
- 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} +11 -11
- package/dist/components/OtpInput/OtpInput.js +112 -0
- package/dist/{Pagination.es.js → components/Pagination/Pagination.js} +32 -32
- package/dist/components/ProfilePictureUpload/ProfilePictureUpload.d.ts +1 -1
- package/dist/{ProfilePictureUpload.es.js → components/ProfilePictureUpload/ProfilePictureUpload.js} +73 -98
- package/dist/components/ProgressBar/ProgressBar.js +70 -0
- package/dist/{RadioButton.es.js → components/RadioButton/RadioButton.js} +35 -35
- package/dist/{SegmentedButton.es.js → components/SegmentedButton/SegmentedButton.js} +37 -37
- 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 -17
- package/dist/components/Spinner/Spinner.js +52 -0
- package/dist/{Steps.es.js → components/Steps/Steps.js} +61 -61
- package/dist/{SwipeContainer.es.js → components/SwipeContainer/SwipeContainer.js} +68 -68
- package/dist/{Switch.es.js → components/Switch/Switch.js} +17 -17
- 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} +42 -42
- package/dist/components/Tooltip/Tootip.js +62 -0
- package/dist/exports/CardProfile.d.ts +1 -0
- package/dist/exports/DatePicker.d.ts +2 -0
- package/dist/exports/DropZone.d.ts +2 -0
- package/dist/exports/Icons.d.ts +2 -1
- package/dist/exports/InputMultiple.d.ts +2 -0
- package/dist/exports/Menu.d.ts +1 -0
- package/dist/exports/ProfilePictureUpload.d.ts +1 -0
- package/dist/exports/RadioButton.d.ts +2 -0
- package/dist/exports/SegmentedButton.d.ts +2 -0
- package/dist/exports/Skeleton.d.ts +2 -0
- package/dist/exports/Steps.d.ts +1 -0
- package/dist/exports/Switch.d.ts +2 -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 +0 -4
- package/dist/index.js +119 -0
- package/dist/{cn-B6yFEsav.js → lib/cn.js} +2 -2
- package/dist/lib/utils.js +54 -0
- package/dist/node_modules/@date-fns/tz/date/index.js +61 -0
- package/dist/node_modules/@date-fns/tz/date/mini.js +69 -0
- package/dist/node_modules/@date-fns/tz/tzName/index.js +11 -0
- package/dist/node_modules/@date-fns/tz/tzOffset/index.js +22 -0
- package/dist/{index-BOQuZ0gG.js → node_modules/class-variance-authority/dist/index.js} +10 -9
- package/dist/node_modules/date-fns/_lib/addLeadingZeros.js +7 -0
- package/dist/node_modules/date-fns/_lib/defaultOptions.js +7 -0
- package/dist/node_modules/date-fns/_lib/format/formatters.js +583 -0
- package/dist/node_modules/date-fns/_lib/format/lightFormatters.js +59 -0
- package/dist/node_modules/date-fns/_lib/format/longFormatters.js +52 -0
- package/dist/node_modules/date-fns/_lib/getTimezoneOffsetInMilliseconds.js +18 -0
- package/dist/node_modules/date-fns/_lib/normalizeDates.js +11 -0
- package/dist/node_modules/date-fns/_lib/normalizeInterval.js +8 -0
- package/dist/node_modules/date-fns/_lib/protectedTokens.js +20 -0
- package/dist/node_modules/date-fns/addDays.js +10 -0
- package/dist/node_modules/date-fns/addMonths.js +20 -0
- package/dist/node_modules/date-fns/addWeeks.js +8 -0
- package/dist/node_modules/date-fns/addYears.js +8 -0
- package/dist/node_modules/date-fns/constants.js +6 -0
- package/dist/node_modules/date-fns/constructFrom.js +8 -0
- package/dist/node_modules/date-fns/differenceInCalendarDays.js +16 -0
- package/dist/node_modules/date-fns/differenceInCalendarMonths.js +13 -0
- package/dist/node_modules/date-fns/eachMonthOfInterval.js +17 -0
- package/dist/node_modules/date-fns/eachYearOfInterval.js +17 -0
- package/dist/node_modules/date-fns/endOfISOWeek.js +8 -0
- package/dist/node_modules/date-fns/endOfMonth.js +9 -0
- package/dist/node_modules/date-fns/endOfWeek.js +10 -0
- package/dist/node_modules/date-fns/endOfYear.js +9 -0
- package/dist/node_modules/date-fns/format.js +58 -0
- package/dist/node_modules/date-fns/getDayOfYear.js +11 -0
- package/dist/node_modules/date-fns/getDaysInMonth.js +10 -0
- package/dist/node_modules/date-fns/getISOWeek.js +12 -0
- package/dist/node_modules/date-fns/getISOWeekYear.js +15 -0
- package/dist/node_modules/date-fns/getMonth.js +8 -0
- package/dist/node_modules/date-fns/getWeek.js +12 -0
- package/dist/node_modules/date-fns/getWeekYear.js +16 -0
- package/dist/node_modules/date-fns/getYear.js +8 -0
- package/dist/node_modules/date-fns/isAfter.js +8 -0
- package/dist/node_modules/date-fns/isBefore.js +8 -0
- package/dist/node_modules/date-fns/isDate.js +7 -0
- package/dist/node_modules/date-fns/isSameDay.js +14 -0
- package/dist/node_modules/date-fns/isSameMonth.js +13 -0
- package/dist/node_modules/date-fns/isSameYear.js +13 -0
- package/dist/node_modules/date-fns/isValid.js +9 -0
- package/dist/node_modules/date-fns/locale/_lib/buildFormatLongFn.js +9 -0
- package/dist/node_modules/date-fns/locale/_lib/buildLocalizeFn.js +18 -0
- package/dist/node_modules/date-fns/locale/_lib/buildMatchFn.js +31 -0
- package/dist/node_modules/date-fns/locale/_lib/buildMatchPatternFn.js +15 -0
- package/dist/node_modules/date-fns/locale/en-US/_lib/formatDistance.js +70 -0
- package/dist/node_modules/date-fns/locale/en-US/_lib/formatLong.js +33 -0
- package/dist/node_modules/date-fns/locale/en-US/_lib/formatRelative.js +11 -0
- package/dist/node_modules/date-fns/locale/en-US/_lib/localize.js +155 -0
- package/dist/node_modules/date-fns/locale/en-US/_lib/match.js +110 -0
- package/dist/node_modules/date-fns/locale/en-US.js +21 -0
- package/dist/node_modules/date-fns/locale/es/_lib/formatDistance.js +70 -0
- package/dist/node_modules/date-fns/locale/es/_lib/formatLong.js +33 -0
- package/dist/node_modules/date-fns/locale/es/_lib/formatRelative.js +18 -0
- package/dist/node_modules/date-fns/locale/es/_lib/localize.js +143 -0
- package/dist/node_modules/date-fns/locale/es/_lib/match.js +116 -0
- package/dist/node_modules/date-fns/locale/es.js +21 -0
- package/dist/node_modules/date-fns/max.js +14 -0
- package/dist/node_modules/date-fns/min.js +14 -0
- package/dist/node_modules/date-fns/setMonth.js +13 -0
- package/dist/node_modules/date-fns/setYear.js +10 -0
- package/dist/node_modules/date-fns/startOfDay.js +9 -0
- package/dist/node_modules/date-fns/startOfISOWeek.js +8 -0
- package/dist/node_modules/date-fns/startOfISOWeekYear.js +11 -0
- package/dist/node_modules/date-fns/startOfMonth.js +9 -0
- package/dist/node_modules/date-fns/startOfWeek.js +10 -0
- package/dist/node_modules/date-fns/startOfWeekYear.js +12 -0
- package/dist/node_modules/date-fns/startOfYear.js +9 -0
- package/dist/node_modules/date-fns/toDate.js +8 -0
- package/dist/node_modules/input-otp/dist/index.js +194 -0
- package/dist/node_modules/react-day-picker/dist/esm/DayPicker.js +227 -0
- package/dist/node_modules/react-day-picker/dist/esm/UI.js +22 -0
- package/dist/node_modules/react-day-picker/dist/esm/classes/CalendarDay.js +19 -0
- package/dist/node_modules/react-day-picker/dist/esm/classes/CalendarMonth.js +8 -0
- package/dist/node_modules/react-day-picker/dist/esm/classes/CalendarWeek.js +8 -0
- package/dist/node_modules/react-day-picker/dist/esm/classes/DateLib.js +147 -0
- package/dist/node_modules/react-day-picker/dist/esm/components/Button.js +7 -0
- package/dist/node_modules/react-day-picker/dist/esm/components/CaptionLabel.js +7 -0
- package/dist/node_modules/react-day-picker/dist/esm/components/Chevron.js +18 -0
- package/dist/node_modules/react-day-picker/dist/esm/components/Day.js +8 -0
- package/dist/node_modules/react-day-picker/dist/esm/components/DayButton.js +10 -0
- package/dist/node_modules/react-day-picker/dist/esm/components/Dropdown.js +19 -0
- package/dist/node_modules/react-day-picker/dist/esm/components/DropdownNav.js +7 -0
- package/dist/node_modules/react-day-picker/dist/esm/components/Footer.js +7 -0
- package/dist/node_modules/react-day-picker/dist/esm/components/Month.js +8 -0
- package/dist/node_modules/react-day-picker/dist/esm/components/MonthCaption.js +8 -0
- package/dist/node_modules/react-day-picker/dist/esm/components/MonthGrid.js +7 -0
- package/dist/node_modules/react-day-picker/dist/esm/components/Months.js +7 -0
- package/dist/node_modules/react-day-picker/dist/esm/components/MonthsDropdown.js +9 -0
- package/dist/node_modules/react-day-picker/dist/esm/components/Nav.js +27 -0
- package/dist/node_modules/react-day-picker/dist/esm/components/NextMonthButton.js +9 -0
- package/dist/node_modules/react-day-picker/dist/esm/components/Option.js +7 -0
- package/dist/node_modules/react-day-picker/dist/esm/components/PreviousMonthButton.js +9 -0
- package/dist/node_modules/react-day-picker/dist/esm/components/Root.js +8 -0
- package/dist/node_modules/react-day-picker/dist/esm/components/Select.js +7 -0
- package/dist/node_modules/react-day-picker/dist/esm/components/Week.js +8 -0
- package/dist/node_modules/react-day-picker/dist/esm/components/WeekNumber.js +8 -0
- package/dist/node_modules/react-day-picker/dist/esm/components/WeekNumberHeader.js +7 -0
- package/dist/node_modules/react-day-picker/dist/esm/components/Weekday.js +7 -0
- package/dist/node_modules/react-day-picker/dist/esm/components/Weekdays.js +11 -0
- package/dist/node_modules/react-day-picker/dist/esm/components/Weeks.js +7 -0
- package/dist/node_modules/react-day-picker/dist/esm/components/YearsDropdown.js +9 -0
- package/dist/node_modules/react-day-picker/dist/esm/components/custom-components.js +54 -0
- package/dist/node_modules/react-day-picker/dist/esm/formatters/formatCaption.js +9 -0
- package/dist/node_modules/react-day-picker/dist/esm/formatters/formatDay.js +7 -0
- package/dist/node_modules/react-day-picker/dist/esm/formatters/formatMonthDropdown.js +7 -0
- package/dist/node_modules/react-day-picker/dist/esm/formatters/formatWeekNumber.js +7 -0
- package/dist/node_modules/react-day-picker/dist/esm/formatters/formatWeekNumberHeader.js +6 -0
- package/dist/node_modules/react-day-picker/dist/esm/formatters/formatWeekdayName.js +7 -0
- package/dist/node_modules/react-day-picker/dist/esm/formatters/formatYearDropdown.js +9 -0
- package/dist/node_modules/react-day-picker/dist/esm/formatters/index.js +18 -0
- package/dist/node_modules/react-day-picker/dist/esm/helpers/calculateFocusTarget.js +19 -0
- package/dist/node_modules/react-day-picker/dist/esm/helpers/createGetModifiers.js +42 -0
- package/dist/node_modules/react-day-picker/dist/esm/helpers/endOfBroadcastWeek.js +9 -0
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getBroadcastWeeksInMonth.js +7 -0
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getClassNamesForModifiers.js +7 -0
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getComponents.js +10 -0
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getDataAttributes.js +16 -0
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getDates.js +21 -0
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getDays.js +10 -0
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getDefaultClassNames.js +16 -0
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getDisplayMonths.js +13 -0
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getFocusableDate.js +15 -0
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getFormatters.js +10 -0
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getInitialMonth.js +13 -0
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getMonthOptions.js +13 -0
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getMonths.js +24 -0
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getNavMonth.js +13 -0
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getNextFocus.js +12 -0
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getNextMonth.js +12 -0
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getPreviousMonth.js +12 -0
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getStyleForModifiers.js +13 -0
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getWeekdays.js +11 -0
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getWeeks.js +7 -0
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getYearOptions.js +16 -0
- package/dist/node_modules/react-day-picker/dist/esm/helpers/startOfBroadcastWeek.js +7 -0
- package/dist/node_modules/react-day-picker/dist/esm/helpers/useControlledValue.js +8 -0
- package/dist/node_modules/react-day-picker/dist/esm/labels/index.js +26 -0
- package/dist/node_modules/react-day-picker/dist/esm/labels/labelDayButton.js +10 -0
- package/dist/node_modules/react-day-picker/dist/esm/labels/labelGrid.js +9 -0
- package/dist/node_modules/react-day-picker/dist/esm/labels/labelGridcell.js +8 -0
- package/dist/node_modules/react-day-picker/dist/esm/labels/labelMonthDropdown.js +6 -0
- package/dist/node_modules/react-day-picker/dist/esm/labels/labelNav.js +6 -0
- package/dist/node_modules/react-day-picker/dist/esm/labels/labelNext.js +6 -0
- package/dist/node_modules/react-day-picker/dist/esm/labels/labelPrevious.js +6 -0
- package/dist/node_modules/react-day-picker/dist/esm/labels/labelWeekNumber.js +6 -0
- package/dist/node_modules/react-day-picker/dist/esm/labels/labelWeekNumberHeader.js +6 -0
- package/dist/node_modules/react-day-picker/dist/esm/labels/labelWeekday.js +7 -0
- package/dist/node_modules/react-day-picker/dist/esm/labels/labelYearDropdown.js +6 -0
- package/dist/node_modules/react-day-picker/dist/esm/selection/useMulti.js +21 -0
- package/dist/node_modules/react-day-picker/dist/esm/selection/useRange.js +18 -0
- package/dist/node_modules/react-day-picker/dist/esm/selection/useSingle.js +15 -0
- package/dist/node_modules/react-day-picker/dist/esm/useAnimation.js +56 -0
- package/dist/node_modules/react-day-picker/dist/esm/useCalendar.js +44 -0
- package/dist/node_modules/react-day-picker/dist/esm/useDayPicker.js +12 -0
- package/dist/node_modules/react-day-picker/dist/esm/useFocus.js +23 -0
- package/dist/node_modules/react-day-picker/dist/esm/useSelection.js +19 -0
- package/dist/node_modules/react-day-picker/dist/esm/utils/addToRange.js +32 -0
- package/dist/node_modules/react-day-picker/dist/esm/utils/dateMatchModifiers.js +26 -0
- package/dist/node_modules/react-day-picker/dist/esm/utils/rangeContainsDayOfWeek.js +15 -0
- package/dist/node_modules/react-day-picker/dist/esm/utils/rangeContainsModifiers.js +28 -0
- package/dist/node_modules/react-day-picker/dist/esm/utils/rangeIncludesDate.js +9 -0
- package/dist/node_modules/react-day-picker/dist/esm/utils/rangeOverlaps.js +8 -0
- package/dist/node_modules/react-day-picker/dist/esm/utils/typeguards.js +26 -0
- package/dist/prometeo-design-system.css +1 -1
- package/dist/styles.d.ts +0 -0
- package/dist/useDevice.js +4 -0
- package/package.json +282 -274
- package/src/styles/app.css +1314 -0
- package/src/styles/base.css +1323 -0
- package/src/styles/fonts.css +46 -0
- package/src/styles/palette.css +83 -0
- package/src/styles/utilities.css +1126 -0
- package/dist/CardProfile.es.js +0 -4
- package/dist/DatePicker.es.js +0 -3500
- 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 -86
- package/dist/Header.es.js +0 -32
- package/dist/HelperComponent-D_Cqdf1J.js +0 -24
- package/dist/Icons.es.js +0 -1055
- package/dist/ImageGallery-CjaJ0UCN.js +0 -317
- package/dist/Input-Bdo-Acix.js +0 -240
- package/dist/Input.es.js +0 -4
- package/dist/LayoutGeneric-B6E-yOYJ.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-D2APaG1z.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/components/Button/Button_Legacy.d.ts +0 -29
- package/dist/jsx-runtime-ByW6EXIE.js +0 -283
- package/dist/prometeo-design-system.es.js +0 -1008
- /package/dist/{useDevice.es.js → hooks/useDevice.js} +0 -0
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
import { enUS as f } from "../../../../date-fns/locale/en-US.js";
|
|
2
|
+
import { endOfBroadcastWeek as d } from "../helpers/endOfBroadcastWeek.js";
|
|
3
|
+
import { startOfBroadcastWeek as m } from "../helpers/startOfBroadcastWeek.js";
|
|
4
|
+
import { TZDate as a } from "../../../../@date-fns/tz/date/index.js";
|
|
5
|
+
import { addDays as v } from "../../../../date-fns/addDays.js";
|
|
6
|
+
import { addMonths as p } from "../../../../date-fns/addMonths.js";
|
|
7
|
+
import { addWeeks as O } from "../../../../date-fns/addWeeks.js";
|
|
8
|
+
import { addYears as c } from "../../../../date-fns/addYears.js";
|
|
9
|
+
import { differenceInCalendarDays as u } from "../../../../date-fns/differenceInCalendarDays.js";
|
|
10
|
+
import { differenceInCalendarMonths as l } from "../../../../date-fns/differenceInCalendarMonths.js";
|
|
11
|
+
import { eachMonthOfInterval as M } from "../../../../date-fns/eachMonthOfInterval.js";
|
|
12
|
+
import { eachYearOfInterval as k } from "../../../../date-fns/eachYearOfInterval.js";
|
|
13
|
+
import { endOfISOWeek as W } from "../../../../date-fns/endOfISOWeek.js";
|
|
14
|
+
import { endOfMonth as D } from "../../../../date-fns/endOfMonth.js";
|
|
15
|
+
import { endOfWeek as Y } from "../../../../date-fns/endOfWeek.js";
|
|
16
|
+
import { endOfYear as S } from "../../../../date-fns/endOfYear.js";
|
|
17
|
+
import { formatDate as y } from "../../../../date-fns/format.js";
|
|
18
|
+
import { getISOWeek as g } from "../../../../date-fns/getISOWeek.js";
|
|
19
|
+
import { getMonth as I } from "../../../../date-fns/getMonth.js";
|
|
20
|
+
import { getYear as w } from "../../../../date-fns/getYear.js";
|
|
21
|
+
import { getWeek as B } from "../../../../date-fns/getWeek.js";
|
|
22
|
+
import { isAfter as L } from "../../../../date-fns/isAfter.js";
|
|
23
|
+
import { isBefore as C } from "../../../../date-fns/isBefore.js";
|
|
24
|
+
import { isDate as z } from "../../../../date-fns/isDate.js";
|
|
25
|
+
import { isSameDay as Z } from "../../../../date-fns/isSameDay.js";
|
|
26
|
+
import { isSameMonth as b } from "../../../../date-fns/isSameMonth.js";
|
|
27
|
+
import { isSameYear as A } from "../../../../date-fns/isSameYear.js";
|
|
28
|
+
import { max as F } from "../../../../date-fns/max.js";
|
|
29
|
+
import { min as N } from "../../../../date-fns/min.js";
|
|
30
|
+
import { setMonth as _ } from "../../../../date-fns/setMonth.js";
|
|
31
|
+
import { setYear as j } from "../../../../date-fns/setYear.js";
|
|
32
|
+
import { startOfDay as x } from "../../../../date-fns/startOfDay.js";
|
|
33
|
+
import { startOfISOWeek as H } from "../../../../date-fns/startOfISOWeek.js";
|
|
34
|
+
import { startOfMonth as K } from "../../../../date-fns/startOfMonth.js";
|
|
35
|
+
import { startOfWeek as T } from "../../../../date-fns/startOfWeek.js";
|
|
36
|
+
import { startOfYear as U } from "../../../../date-fns/startOfYear.js";
|
|
37
|
+
class n {
|
|
38
|
+
/**
|
|
39
|
+
* Creates an instance of `DateLib`.
|
|
40
|
+
*
|
|
41
|
+
* @param options Configuration options for the date library.
|
|
42
|
+
* @param overrides Custom overrides for the date library functions.
|
|
43
|
+
*/
|
|
44
|
+
constructor(t, i) {
|
|
45
|
+
this.Date = Date, this.today = () => this.overrides?.today ? this.overrides.today() : this.options.timeZone ? a.tz(this.options.timeZone) : new this.Date(), this.newDate = (r, e, s) => this.overrides?.newDate ? this.overrides.newDate(r, e, s) : this.options.timeZone ? new a(r, e, s, this.options.timeZone) : new Date(r, e, s), this.addDays = (r, e) => this.overrides?.addDays ? this.overrides.addDays(r, e) : v(r, e), this.addMonths = (r, e) => this.overrides?.addMonths ? this.overrides.addMonths(r, e) : p(r, e), this.addWeeks = (r, e) => this.overrides?.addWeeks ? this.overrides.addWeeks(r, e) : O(r, e), this.addYears = (r, e) => this.overrides?.addYears ? this.overrides.addYears(r, e) : c(r, e), this.differenceInCalendarDays = (r, e) => this.overrides?.differenceInCalendarDays ? this.overrides.differenceInCalendarDays(r, e) : u(r, e), this.differenceInCalendarMonths = (r, e) => this.overrides?.differenceInCalendarMonths ? this.overrides.differenceInCalendarMonths(r, e) : l(r, e), this.eachMonthOfInterval = (r) => this.overrides?.eachMonthOfInterval ? this.overrides.eachMonthOfInterval(r) : M(r), this.eachYearOfInterval = (r) => {
|
|
46
|
+
const e = this.overrides?.eachYearOfInterval ? this.overrides.eachYearOfInterval(r) : k(r), s = new Set(e.map((h) => this.getYear(h)));
|
|
47
|
+
if (s.size === e.length)
|
|
48
|
+
return e;
|
|
49
|
+
const o = [];
|
|
50
|
+
return s.forEach((h) => {
|
|
51
|
+
o.push(new Date(h, 0, 1));
|
|
52
|
+
}), o;
|
|
53
|
+
}, this.endOfBroadcastWeek = (r) => this.overrides?.endOfBroadcastWeek ? this.overrides.endOfBroadcastWeek(r) : d(r, this), this.endOfISOWeek = (r) => this.overrides?.endOfISOWeek ? this.overrides.endOfISOWeek(r) : W(r), this.endOfMonth = (r) => this.overrides?.endOfMonth ? this.overrides.endOfMonth(r) : D(r), this.endOfWeek = (r, e) => this.overrides?.endOfWeek ? this.overrides.endOfWeek(r, e) : Y(r, this.options), this.endOfYear = (r) => this.overrides?.endOfYear ? this.overrides.endOfYear(r) : S(r), this.format = (r, e, s) => {
|
|
54
|
+
const o = this.overrides?.format ? this.overrides.format(r, e, this.options) : y(r, e, this.options);
|
|
55
|
+
return this.options.numerals && this.options.numerals !== "latn" ? this.replaceDigits(o) : o;
|
|
56
|
+
}, this.getISOWeek = (r) => this.overrides?.getISOWeek ? this.overrides.getISOWeek(r) : g(r), this.getMonth = (r, e) => this.overrides?.getMonth ? this.overrides.getMonth(r, this.options) : I(r, this.options), this.getYear = (r, e) => this.overrides?.getYear ? this.overrides.getYear(r, this.options) : w(r, this.options), this.getWeek = (r, e) => this.overrides?.getWeek ? this.overrides.getWeek(r, this.options) : B(r, this.options), this.isAfter = (r, e) => this.overrides?.isAfter ? this.overrides.isAfter(r, e) : L(r, e), this.isBefore = (r, e) => this.overrides?.isBefore ? this.overrides.isBefore(r, e) : C(r, e), this.isDate = (r) => this.overrides?.isDate ? this.overrides.isDate(r) : z(r), this.isSameDay = (r, e) => this.overrides?.isSameDay ? this.overrides.isSameDay(r, e) : Z(r, e), this.isSameMonth = (r, e) => this.overrides?.isSameMonth ? this.overrides.isSameMonth(r, e) : b(r, e), this.isSameYear = (r, e) => this.overrides?.isSameYear ? this.overrides.isSameYear(r, e) : A(r, e), this.max = (r) => this.overrides?.max ? this.overrides.max(r) : F(r), this.min = (r) => this.overrides?.min ? this.overrides.min(r) : N(r), this.setMonth = (r, e) => this.overrides?.setMonth ? this.overrides.setMonth(r, e) : _(r, e), this.setYear = (r, e) => this.overrides?.setYear ? this.overrides.setYear(r, e) : j(r, e), this.startOfBroadcastWeek = (r, e) => this.overrides?.startOfBroadcastWeek ? this.overrides.startOfBroadcastWeek(r, this) : m(r, this), this.startOfDay = (r) => this.overrides?.startOfDay ? this.overrides.startOfDay(r) : x(r), this.startOfISOWeek = (r) => this.overrides?.startOfISOWeek ? this.overrides.startOfISOWeek(r) : H(r), this.startOfMonth = (r) => this.overrides?.startOfMonth ? this.overrides.startOfMonth(r) : K(r), this.startOfWeek = (r, e) => this.overrides?.startOfWeek ? this.overrides.startOfWeek(r, this.options) : T(r, this.options), this.startOfYear = (r) => this.overrides?.startOfYear ? this.overrides.startOfYear(r) : U(r), this.options = { locale: f, ...t }, this.overrides = i;
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* Generates a mapping of Arabic digits (0-9) to the target numbering system
|
|
60
|
+
* digits.
|
|
61
|
+
*
|
|
62
|
+
* @since 9.5.0
|
|
63
|
+
* @returns A record mapping Arabic digits to the target numerals.
|
|
64
|
+
*/
|
|
65
|
+
getDigitMap() {
|
|
66
|
+
const { numerals: t = "latn" } = this.options, i = new Intl.NumberFormat("en-US", {
|
|
67
|
+
numberingSystem: t
|
|
68
|
+
}), r = {};
|
|
69
|
+
for (let e = 0; e < 10; e++)
|
|
70
|
+
r[e.toString()] = i.format(e);
|
|
71
|
+
return r;
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* Replaces Arabic digits in a string with the target numbering system digits.
|
|
75
|
+
*
|
|
76
|
+
* @since 9.5.0
|
|
77
|
+
* @param input The string containing Arabic digits.
|
|
78
|
+
* @returns The string with digits replaced.
|
|
79
|
+
*/
|
|
80
|
+
replaceDigits(t) {
|
|
81
|
+
const i = this.getDigitMap();
|
|
82
|
+
return t.replace(/\d/g, (r) => i[r] || r);
|
|
83
|
+
}
|
|
84
|
+
/**
|
|
85
|
+
* Formats a number using the configured numbering system.
|
|
86
|
+
*
|
|
87
|
+
* @since 9.5.0
|
|
88
|
+
* @param value The number to format.
|
|
89
|
+
* @returns The formatted number as a string.
|
|
90
|
+
*/
|
|
91
|
+
formatNumber(t) {
|
|
92
|
+
return this.replaceDigits(t.toString());
|
|
93
|
+
}
|
|
94
|
+
/**
|
|
95
|
+
* Returns the preferred ordering for month and year labels for the current
|
|
96
|
+
* locale.
|
|
97
|
+
*/
|
|
98
|
+
getMonthYearOrder() {
|
|
99
|
+
const t = this.options.locale?.code;
|
|
100
|
+
return t && n.yearFirstLocales.has(t) ? "year-first" : "month-first";
|
|
101
|
+
}
|
|
102
|
+
/**
|
|
103
|
+
* Formats the month/year pair respecting locale conventions.
|
|
104
|
+
*
|
|
105
|
+
* @since 9.11.0
|
|
106
|
+
*/
|
|
107
|
+
formatMonthYear(t) {
|
|
108
|
+
const { locale: i, timeZone: r, numerals: e } = this.options, s = i?.code;
|
|
109
|
+
if (s && n.yearFirstLocales.has(s))
|
|
110
|
+
try {
|
|
111
|
+
return new Intl.DateTimeFormat(s, {
|
|
112
|
+
month: "long",
|
|
113
|
+
year: "numeric",
|
|
114
|
+
timeZone: r,
|
|
115
|
+
numberingSystem: e
|
|
116
|
+
}).format(t);
|
|
117
|
+
} catch {
|
|
118
|
+
}
|
|
119
|
+
const o = this.getMonthYearOrder() === "year-first" ? "y LLLL" : "LLLL y";
|
|
120
|
+
return this.format(t, o);
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
n.yearFirstLocales = /* @__PURE__ */ new Set([
|
|
124
|
+
"eu",
|
|
125
|
+
"hu",
|
|
126
|
+
"ja",
|
|
127
|
+
"ja-Hira",
|
|
128
|
+
"ja-JP",
|
|
129
|
+
"ko",
|
|
130
|
+
"ko-KR",
|
|
131
|
+
"lt",
|
|
132
|
+
"lt-LT",
|
|
133
|
+
"lv",
|
|
134
|
+
"lv-LV",
|
|
135
|
+
"mn",
|
|
136
|
+
"mn-MN",
|
|
137
|
+
"zh",
|
|
138
|
+
"zh-CN",
|
|
139
|
+
"zh-HK",
|
|
140
|
+
"zh-TW"
|
|
141
|
+
]);
|
|
142
|
+
const wr = new n();
|
|
143
|
+
export {
|
|
144
|
+
n as DateLib,
|
|
145
|
+
wr as defaultDateLib,
|
|
146
|
+
f as defaultLocale
|
|
147
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import e from "react";
|
|
2
|
+
function r(n) {
|
|
3
|
+
const { size: o = 24, orientation: t = "left", className: l } = n;
|
|
4
|
+
return (
|
|
5
|
+
// biome-ignore lint/a11y/noSvgWithoutTitle: handled by the parent component
|
|
6
|
+
e.createElement(
|
|
7
|
+
"svg",
|
|
8
|
+
{ className: l, width: o, height: o, viewBox: "0 0 24 24" },
|
|
9
|
+
t === "up" && e.createElement("polygon", { points: "6.77 17 12.5 11.43 18.24 17 20 15.28 12.5 8 5 15.28" }),
|
|
10
|
+
t === "down" && e.createElement("polygon", { points: "6.77 8 12.5 13.57 18.24 8 20 9.72 12.5 17 5 9.72" }),
|
|
11
|
+
t === "left" && e.createElement("polygon", { points: "16 18.112 9.81111111 12 16 5.87733333 14.0888889 4 6 12 14.0888889 20" }),
|
|
12
|
+
t === "right" && e.createElement("polygon", { points: "8 18.112 14.18888889 12 8 5.87733333 9.91111111 4 18 12 9.91111111 20" })
|
|
13
|
+
)
|
|
14
|
+
);
|
|
15
|
+
}
|
|
16
|
+
export {
|
|
17
|
+
r as Chevron
|
|
18
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import e from "react";
|
|
2
|
+
function c(f) {
|
|
3
|
+
const { day: r, modifiers: t, ...u } = f, o = e.useRef(null);
|
|
4
|
+
return e.useEffect(() => {
|
|
5
|
+
t.focused && o.current?.focus();
|
|
6
|
+
}, [t.focused]), e.createElement("button", { ref: o, ...u });
|
|
7
|
+
}
|
|
8
|
+
export {
|
|
9
|
+
c as DayButton
|
|
10
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import e from "react";
|
|
2
|
+
import { UI as o } from "../UI.js";
|
|
3
|
+
function f(c) {
|
|
4
|
+
const { options: l, className: r, components: s, classNames: a, ...n } = c, i = [a[o.Dropdown], r].join(" "), m = l?.find(({ value: t }) => t === n.value);
|
|
5
|
+
return e.createElement(
|
|
6
|
+
"span",
|
|
7
|
+
{ "data-disabled": n.disabled, className: a[o.DropdownRoot] },
|
|
8
|
+
e.createElement(s.Select, { className: i, ...n }, l?.map(({ value: t, label: d, disabled: p }) => e.createElement(s.Option, { key: t, value: t, disabled: p }, d))),
|
|
9
|
+
e.createElement(
|
|
10
|
+
"span",
|
|
11
|
+
{ className: a[o.CaptionLabel], "aria-hidden": !0 },
|
|
12
|
+
m?.label,
|
|
13
|
+
e.createElement(s.Chevron, { orientation: "down", size: 18, className: a[o.Chevron] })
|
|
14
|
+
)
|
|
15
|
+
);
|
|
16
|
+
}
|
|
17
|
+
export {
|
|
18
|
+
f as Dropdown
|
|
19
|
+
};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import n, { useCallback as u } from "react";
|
|
2
|
+
import { UI as i } from "../UI.js";
|
|
3
|
+
import { useDayPicker as v } from "../useDayPicker.js";
|
|
4
|
+
function x(c) {
|
|
5
|
+
const { onPreviousClick: l, onNextClick: s, previousMonth: e, nextMonth: t, ...d } = c, { components: a, classNames: o, labels: { labelPrevious: m, labelNext: b } } = v(), f = u((r) => {
|
|
6
|
+
t && s?.(r);
|
|
7
|
+
}, [t, s]), h = u((r) => {
|
|
8
|
+
e && l?.(r);
|
|
9
|
+
}, [e, l]);
|
|
10
|
+
return n.createElement(
|
|
11
|
+
"nav",
|
|
12
|
+
{ ...d },
|
|
13
|
+
n.createElement(
|
|
14
|
+
a.PreviousMonthButton,
|
|
15
|
+
{ type: "button", className: o[i.PreviousMonthButton], tabIndex: e ? void 0 : -1, "aria-disabled": e ? void 0 : !0, "aria-label": m(e), onClick: h },
|
|
16
|
+
n.createElement(a.Chevron, { disabled: e ? void 0 : !0, className: o[i.Chevron], orientation: "left" })
|
|
17
|
+
),
|
|
18
|
+
n.createElement(
|
|
19
|
+
a.NextMonthButton,
|
|
20
|
+
{ type: "button", className: o[i.NextMonthButton], tabIndex: t ? void 0 : -1, "aria-disabled": t ? void 0 : !0, "aria-label": b(t), onClick: f },
|
|
21
|
+
n.createElement(a.Chevron, { disabled: t ? void 0 : !0, orientation: "right", className: o[i.Chevron] })
|
|
22
|
+
)
|
|
23
|
+
);
|
|
24
|
+
}
|
|
25
|
+
export {
|
|
26
|
+
x as Nav
|
|
27
|
+
};
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { Button as e } from "./Button.js";
|
|
2
|
+
import { CaptionLabel as p } from "./CaptionLabel.js";
|
|
3
|
+
import { Chevron as x } from "./Chevron.js";
|
|
4
|
+
import { Day as n } from "./Day.js";
|
|
5
|
+
import { DayButton as d } from "./DayButton.js";
|
|
6
|
+
import { Dropdown as u } from "./Dropdown.js";
|
|
7
|
+
import { DropdownNav as k } from "./DropdownNav.js";
|
|
8
|
+
import { Footer as D } from "./Footer.js";
|
|
9
|
+
import { Month as i } from "./Month.js";
|
|
10
|
+
import { MonthCaption as v } from "./MonthCaption.js";
|
|
11
|
+
import { MonthGrid as y } from "./MonthGrid.js";
|
|
12
|
+
import { Months as b } from "./Months.js";
|
|
13
|
+
import { MonthsDropdown as l } from "./MonthsDropdown.js";
|
|
14
|
+
import { Nav as F } from "./Nav.js";
|
|
15
|
+
import { NextMonthButton as H } from "./NextMonthButton.js";
|
|
16
|
+
import { Option as O } from "./Option.js";
|
|
17
|
+
import { PreviousMonthButton as R } from "./PreviousMonthButton.js";
|
|
18
|
+
import { Root as Y } from "./Root.js";
|
|
19
|
+
import { Select as j } from "./Select.js";
|
|
20
|
+
import { Week as z } from "./Week.js";
|
|
21
|
+
import { Weekday as E } from "./Weekday.js";
|
|
22
|
+
import { Weekdays as J } from "./Weekdays.js";
|
|
23
|
+
import { WeekNumber as Q } from "./WeekNumber.js";
|
|
24
|
+
import { WeekNumberHeader as U } from "./WeekNumberHeader.js";
|
|
25
|
+
import { Weeks as X } from "./Weeks.js";
|
|
26
|
+
import { YearsDropdown as _ } from "./YearsDropdown.js";
|
|
27
|
+
export {
|
|
28
|
+
e as Button,
|
|
29
|
+
p as CaptionLabel,
|
|
30
|
+
x as Chevron,
|
|
31
|
+
n as Day,
|
|
32
|
+
d as DayButton,
|
|
33
|
+
u as Dropdown,
|
|
34
|
+
k as DropdownNav,
|
|
35
|
+
D as Footer,
|
|
36
|
+
i as Month,
|
|
37
|
+
v as MonthCaption,
|
|
38
|
+
y as MonthGrid,
|
|
39
|
+
b as Months,
|
|
40
|
+
l as MonthsDropdown,
|
|
41
|
+
F as Nav,
|
|
42
|
+
H as NextMonthButton,
|
|
43
|
+
O as Option,
|
|
44
|
+
R as PreviousMonthButton,
|
|
45
|
+
Y as Root,
|
|
46
|
+
j as Select,
|
|
47
|
+
z as Week,
|
|
48
|
+
Q as WeekNumber,
|
|
49
|
+
U as WeekNumberHeader,
|
|
50
|
+
E as Weekday,
|
|
51
|
+
J as Weekdays,
|
|
52
|
+
X as Weeks,
|
|
53
|
+
_ as YearsDropdown
|
|
54
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { formatCaption as t, formatMonthCaption as e } from "./formatCaption.js";
|
|
2
|
+
import { formatDay as a } from "./formatDay.js";
|
|
3
|
+
import { formatMonthDropdown as p } from "./formatMonthDropdown.js";
|
|
4
|
+
import { formatWeekdayName as x } from "./formatWeekdayName.js";
|
|
5
|
+
import { formatWeekNumber as i } from "./formatWeekNumber.js";
|
|
6
|
+
import { formatWeekNumberHeader as C } from "./formatWeekNumberHeader.js";
|
|
7
|
+
import { formatYearCaption as N, formatYearDropdown as W } from "./formatYearDropdown.js";
|
|
8
|
+
export {
|
|
9
|
+
t as formatCaption,
|
|
10
|
+
a as formatDay,
|
|
11
|
+
e as formatMonthCaption,
|
|
12
|
+
p as formatMonthDropdown,
|
|
13
|
+
i as formatWeekNumber,
|
|
14
|
+
C as formatWeekNumberHeader,
|
|
15
|
+
x as formatWeekdayName,
|
|
16
|
+
N as formatYearCaption,
|
|
17
|
+
W as formatYearDropdown
|
|
18
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { DayFlag as s } from "../UI.js";
|
|
2
|
+
var d;
|
|
3
|
+
(function(e) {
|
|
4
|
+
e[e.Today = 0] = "Today", e[e.Selected = 1] = "Selected", e[e.LastFocused = 2] = "LastFocused", e[e.FocusedModifier = 3] = "FocusedModifier";
|
|
5
|
+
})(d || (d = {}));
|
|
6
|
+
function l(e) {
|
|
7
|
+
return !e[s.disabled] && !e[s.hidden] && !e[s.outside];
|
|
8
|
+
}
|
|
9
|
+
function F(e, u, t, n) {
|
|
10
|
+
let f, c = -1;
|
|
11
|
+
for (const o of e) {
|
|
12
|
+
const a = u(o);
|
|
13
|
+
l(a) && (a[s.focused] && c < d.FocusedModifier ? (f = o, c = d.FocusedModifier) : n?.isEqualTo(o) && c < d.LastFocused ? (f = o, c = d.LastFocused) : t(o.date) && c < d.Selected ? (f = o, c = d.Selected) : a[s.today] && c < d.Today && (f = o, c = d.Today));
|
|
14
|
+
}
|
|
15
|
+
return f || (f = e.find((o) => l(u(o)))), f;
|
|
16
|
+
}
|
|
17
|
+
export {
|
|
18
|
+
F as calculateFocusTarget
|
|
19
|
+
};
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { DayFlag as e } from "../UI.js";
|
|
2
|
+
import { dateMatchModifiers as u } from "../utils/dateMatchModifiers.js";
|
|
3
|
+
function V(b, S, h, M, a) {
|
|
4
|
+
const { disabled: m, hidden: p, modifiers: r, showOutsideDays: y, broadcastCalendar: B, today: g } = S, { isSameDay: v, isSameMonth: A, startOfMonth: E, isBefore: F, endOfMonth: j, isAfter: k } = a, O = h && E(h), D = M && j(M), i = {
|
|
5
|
+
[e.focused]: [],
|
|
6
|
+
[e.outside]: [],
|
|
7
|
+
[e.disabled]: [],
|
|
8
|
+
[e.hidden]: [],
|
|
9
|
+
[e.today]: []
|
|
10
|
+
}, d = {};
|
|
11
|
+
for (const s of b) {
|
|
12
|
+
const { date: o, displayMonth: n } = s, t = !!(n && !A(o, n)), f = !!(O && F(o, O)), l = !!(D && k(o, D)), w = !!(m && u(o, m, a)), x = !!(p && u(o, p, a)) || f || l || // Broadcast calendar will show outside days as default
|
|
13
|
+
!B && !y && t || B && y === !1 && t, C = v(o, g ?? a.today());
|
|
14
|
+
t && i.outside.push(s), w && i.disabled.push(s), x && i.hidden.push(s), C && i.today.push(s), r && Object.keys(r).forEach((c) => {
|
|
15
|
+
const N = r?.[c];
|
|
16
|
+
N && u(o, N, a) && (d[c] ? d[c].push(s) : d[c] = [s]);
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
return (s) => {
|
|
20
|
+
const o = {
|
|
21
|
+
[e.focused]: !1,
|
|
22
|
+
[e.disabled]: !1,
|
|
23
|
+
[e.hidden]: !1,
|
|
24
|
+
[e.outside]: !1,
|
|
25
|
+
[e.today]: !1
|
|
26
|
+
}, n = {};
|
|
27
|
+
for (const t in i) {
|
|
28
|
+
const f = i[t];
|
|
29
|
+
o[t] = f.some((l) => l === s);
|
|
30
|
+
}
|
|
31
|
+
for (const t in d)
|
|
32
|
+
n[t] = d[t].some((f) => f === s);
|
|
33
|
+
return {
|
|
34
|
+
...o,
|
|
35
|
+
// custom modifiers should override all the previous ones
|
|
36
|
+
...n
|
|
37
|
+
};
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
export {
|
|
41
|
+
V as createGetModifiers
|
|
42
|
+
};
|