@zimyo/ui 1.0.2 → 1.1.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/Accordion/index.d.ts +34 -0
- package/dist/Accordion/index.esm.js +129 -0
- package/dist/Accordion/index.js +137 -0
- package/dist/Button/index.d.ts +15 -0
- package/dist/Button/index.esm.js +23 -0
- package/dist/Button/index.js +28 -0
- package/dist/Card/index.d.ts +41 -0
- package/dist/Card/index.esm.js +36 -0
- package/dist/Card/index.js +38 -0
- package/dist/Popover/index.d.ts +19 -0
- package/dist/Popover/index.esm.js +22 -0
- package/dist/Popover/index.js +27 -0
- package/dist/RadioGroup/index.d.ts +31 -0
- package/dist/RadioGroup/index.esm.js +92 -0
- package/dist/RadioGroup/index.js +97 -0
- package/dist/Typography/index.d.ts +30 -0
- package/dist/Typography/index.esm.js +57 -0
- package/dist/Typography/index.js +66 -0
- package/package.json +106 -83
- package/dist/components/index.d.ts +0 -60
- package/dist/components/ui/accordion.d.ts +0 -10
- package/dist/components/ui/accordion.js +0 -58
- package/dist/components/ui/alert-dialog.d.ts +0 -17
- package/dist/components/ui/alert-dialog.js +0 -108
- package/dist/components/ui/alert.d.ts +0 -13
- package/dist/components/ui/alert.js +0 -52
- package/dist/components/ui/aspect-ratio.d.ts +0 -6
- package/dist/components/ui/aspect-ratio.js +0 -12
- package/dist/components/ui/avatar.d.ts +0 -9
- package/dist/components/ui/avatar.js +0 -37
- package/dist/components/ui/badge.d.ts +0 -13
- package/dist/components/ui/badge.js +0 -36
- package/dist/components/ui/breadcrumb.d.ts +0 -14
- package/dist/components/ui/breadcrumb.js +0 -94
- package/dist/components/ui/button.d.ts +0 -14
- package/dist/components/ui/button.js +0 -48
- package/dist/components/ui/calendar.d.ts +0 -13
- package/dist/components/ui/calendar.js +0 -137
- package/dist/components/ui/card.d.ts +0 -12
- package/dist/components/ui/card.js +0 -76
- package/dist/components/ui/carousel.d.ts +0 -25
- package/dist/components/ui/carousel.js +0 -173
- package/dist/components/ui/chart.d.ts +0 -44
- package/dist/components/ui/chart.js +0 -203
- package/dist/components/ui/checkbox.d.ts +0 -7
- package/dist/components/ui/checkbox.js +0 -26
- package/dist/components/ui/collapsible.d.ts +0 -8
- package/dist/components/ui/collapsible.js +0 -24
- package/dist/components/ui/command.d.ts +0 -22
- package/dist/components/ui/command.js +0 -119
- package/dist/components/ui/context-menu.d.ts +0 -28
- package/dist/components/ui/context-menu.js +0 -171
- package/dist/components/ui/dialog.d.ts +0 -18
- package/dist/components/ui/dialog.js +0 -106
- package/dist/components/ui/drawer.d.ts +0 -16
- package/dist/components/ui/drawer.js +0 -99
- package/dist/components/ui/dropdown-menu.d.ts +0 -28
- package/dist/components/ui/dropdown-menu.js +0 -173
- package/dist/components/ui/form.d.ts +0 -27
- package/dist/components/ui/form.js +0 -129
- package/dist/components/ui/hover-card.d.ts +0 -9
- package/dist/components/ui/hover-card.js +0 -36
- package/dist/components/ui/input-otp.d.ts +0 -14
- package/dist/components/ui/input-otp.js +0 -66
- package/dist/components/ui/input.d.ts +0 -6
- package/dist/components/ui/input.js +0 -18
- package/dist/components/ui/label.d.ts +0 -7
- package/dist/components/ui/label.js +0 -17
- package/dist/components/ui/menubar.d.ts +0 -29
- package/dist/components/ui/menubar.js +0 -191
- package/dist/components/ui/navigation-menu.d.ts +0 -18
- package/dist/components/ui/navigation-menu.js +0 -108
- package/dist/components/ui/pagination.d.ts +0 -18
- package/dist/components/ui/pagination.js +0 -103
- package/dist/components/ui/popover.d.ts +0 -10
- package/dist/components/ui/popover.js +0 -41
- package/dist/components/ui/progress.d.ts +0 -7
- package/dist/components/ui/progress.js +0 -26
- package/dist/components/ui/radio-group.d.ts +0 -8
- package/dist/components/ui/radio-group.js +0 -36
- package/dist/components/ui/resizable.d.ts +0 -11
- package/dist/components/ui/resizable.js +0 -42
- package/dist/components/ui/scroll-area.d.ts +0 -8
- package/dist/components/ui/scroll-area.js +0 -41
- package/dist/components/ui/select.d.ts +0 -18
- package/dist/components/ui/select.js +0 -136
- package/dist/components/ui/separator.d.ts +0 -7
- package/dist/components/ui/separator.js +0 -21
- package/dist/components/ui/sheet.d.ts +0 -16
- package/dist/components/ui/sheet.js +0 -106
- package/dist/components/ui/sidebar.d.ts +0 -74
- package/dist/components/ui/sidebar.js +0 -511
- package/dist/components/ui/skeleton.d.ts +0 -5
- package/dist/components/ui/skeleton.js +0 -16
- package/dist/components/ui/slider.d.ts +0 -7
- package/dist/components/ui/slider.js +0 -41
- package/dist/components/ui/sonner.d.ts +0 -6
- package/dist/components/ui/sonner.js +0 -18
- package/dist/components/ui/switch.d.ts +0 -7
- package/dist/components/ui/switch.js +0 -22
- package/dist/components/ui/table.d.ts +0 -13
- package/dist/components/ui/table.js +0 -90
- package/dist/components/ui/tabs.d.ts +0 -10
- package/dist/components/ui/tabs.js +0 -47
- package/dist/components/ui/textarea.d.ts +0 -6
- package/dist/components/ui/textarea.js +0 -16
- package/dist/components/ui/toggle-group.d.ts +0 -11
- package/dist/components/ui/toggle-group.js +0 -57
- package/dist/components/ui/toggle.d.ts +0 -13
- package/dist/components/ui/toggle.js +0 -41
- package/dist/components/ui/tooltip.d.ts +0 -10
- package/dist/components/ui/tooltip.js +0 -50
- package/dist/index.d.ts +0 -63
- package/dist/index.js +0 -48
- package/dist/lib/utils.d.ts +0 -5
- package/dist/lib/utils.js +0 -8
- package/dist/node_modules/@date-fns/tz/date/index.js +0 -101
- package/dist/node_modules/@date-fns/tz/date/mini.js +0 -207
- package/dist/node_modules/@date-fns/tz/tzOffset/index.js +0 -43
- package/dist/node_modules/@radix-ui/primitive/dist/index.js +0 -11
- package/dist/node_modules/@radix-ui/react-compose-refs/dist/index.js +0 -39
- package/dist/node_modules/@radix-ui/react-context/dist/index.js +0 -79
- package/dist/node_modules/@radix-ui/react-dialog/dist/index.js +0 -321
- package/dist/node_modules/@radix-ui/react-dismissable-layer/dist/index.js +0 -211
- package/dist/node_modules/@radix-ui/react-focus-guards/dist/index.js +0 -29
- package/dist/node_modules/@radix-ui/react-focus-scope/dist/index.js +0 -207
- package/dist/node_modules/@radix-ui/react-id/dist/index.js +0 -15
- package/dist/node_modules/@radix-ui/react-portal/dist/index.js +0 -17
- package/dist/node_modules/@radix-ui/react-presence/dist/index.js +0 -130
- package/dist/node_modules/@radix-ui/react-primitive/dist/index.js +0 -43
- package/dist/node_modules/@radix-ui/react-slot/dist/index.js +0 -89
- package/dist/node_modules/@radix-ui/react-use-callback-ref/dist/index.js +0 -12
- package/dist/node_modules/@radix-ui/react-use-controllable-state/dist/index.js +0 -70
- package/dist/node_modules/@radix-ui/react-use-escape-keydown/dist/index.js +0 -18
- package/dist/node_modules/@radix-ui/react-use-layout-effect/dist/index.js +0 -7
- package/dist/node_modules/aria-hidden/dist/es2015/index.js +0 -137
- package/dist/node_modules/class-variance-authority/dist/index.js +0 -44
- package/dist/node_modules/clsx/dist/clsx.js +0 -3
- package/dist/node_modules/cmdk/dist/chunk-NZJY6EH4.js +0 -3
- package/dist/node_modules/cmdk/dist/index.js +0 -10
- 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 -775
- package/dist/node_modules/date-fns/_lib/format/lightFormatters.js +0 -94
- package/dist/node_modules/date-fns/_lib/format/longFormatters.js +0 -66
- package/dist/node_modules/date-fns/_lib/getTimezoneOffsetInMilliseconds.js +0 -31
- 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 -25
- package/dist/node_modules/date-fns/addDays.js +0 -41
- package/dist/node_modules/date-fns/addMonths.js +0 -75
- package/dist/node_modules/date-fns/addWeeks.js +0 -33
- package/dist/node_modules/date-fns/addYears.js +0 -33
- package/dist/node_modules/date-fns/constants.js +0 -46
- package/dist/node_modules/date-fns/constructFrom.js +0 -49
- package/dist/node_modules/date-fns/differenceInCalendarDays.js +0 -62
- package/dist/node_modules/date-fns/differenceInCalendarMonths.js +0 -42
- package/dist/node_modules/date-fns/eachMonthOfInterval.js +0 -65
- package/dist/node_modules/date-fns/endOfISOWeek.js +0 -35
- package/dist/node_modules/date-fns/endOfMonth.js +0 -37
- package/dist/node_modules/date-fns/endOfWeek.js +0 -53
- package/dist/node_modules/date-fns/endOfYear.js +0 -37
- package/dist/node_modules/date-fns/format.js +0 -423
- package/dist/node_modules/date-fns/getDayOfYear.js +0 -34
- package/dist/node_modules/date-fns/getDaysInMonth.js +0 -36
- package/dist/node_modules/date-fns/getISOWeek.js +0 -40
- package/dist/node_modules/date-fns/getISOWeekYear.js +0 -52
- package/dist/node_modules/date-fns/getMonth.js +0 -29
- package/dist/node_modules/date-fns/getWeek.js +0 -54
- package/dist/node_modules/date-fns/getWeekYear.js +0 -75
- package/dist/node_modules/date-fns/getYear.js +0 -29
- package/dist/node_modules/date-fns/isAfter.js +0 -25
- package/dist/node_modules/date-fns/isBefore.js +0 -25
- package/dist/node_modules/date-fns/isDate.js +0 -41
- package/dist/node_modules/date-fns/isSameDay.js +0 -46
- package/dist/node_modules/date-fns/isSameMonth.js +0 -43
- package/dist/node_modules/date-fns/isSameYear.js +0 -35
- package/dist/node_modules/date-fns/isValid.js +0 -39
- package/dist/node_modules/date-fns/locale/_lib/buildFormatLongFn.js +0 -10
- package/dist/node_modules/date-fns/locale/_lib/buildLocalizeFn.js +0 -64
- package/dist/node_modules/date-fns/locale/_lib/buildMatchFn.js +0 -59
- package/dist/node_modules/date-fns/locale/_lib/buildMatchPatternFn.js +0 -22
- package/dist/node_modules/date-fns/locale/en-US/_lib/formatDistance.js +0 -103
- package/dist/node_modules/date-fns/locale/en-US/_lib/formatLong.js +0 -41
- package/dist/node_modules/date-fns/locale/en-US/_lib/formatRelative.js +0 -13
- package/dist/node_modules/date-fns/locale/en-US/_lib/localize.js +0 -189
- package/dist/node_modules/date-fns/locale/en-US/_lib/match.js +0 -134
- package/dist/node_modules/date-fns/locale/en-US.js +0 -28
- package/dist/node_modules/date-fns/max.js +0 -49
- package/dist/node_modules/date-fns/min.js +0 -49
- package/dist/node_modules/date-fns/setMonth.js +0 -46
- package/dist/node_modules/date-fns/setYear.js +0 -40
- package/dist/node_modules/date-fns/startOfDay.js +0 -35
- package/dist/node_modules/date-fns/startOfISOWeek.js +0 -35
- package/dist/node_modules/date-fns/startOfISOWeekYear.js +0 -42
- package/dist/node_modules/date-fns/startOfMonth.js +0 -37
- package/dist/node_modules/date-fns/startOfWeek.js +0 -53
- package/dist/node_modules/date-fns/startOfWeekYear.js +0 -64
- package/dist/node_modules/date-fns/startOfYear.js +0 -36
- package/dist/node_modules/date-fns/toDate.js +0 -46
- package/dist/node_modules/embla-carousel/esm/embla-carousel.esm.js +0 -1669
- package/dist/node_modules/embla-carousel-react/esm/embla-carousel-react.esm.js +0 -37
- package/dist/node_modules/embla-carousel-reactive-utils/esm/embla-carousel-reactive-utils.esm.js +0 -38
- package/dist/node_modules/get-nonce/dist/es2015/index.js +0 -8
- package/dist/node_modules/input-otp/dist/index.js +0 -24
- package/dist/node_modules/react-day-picker/dist/esm/DayPicker.js +0 -285
- package/dist/node_modules/react-day-picker/dist/esm/UI.js +0 -122
- package/dist/node_modules/react-day-picker/dist/esm/classes/CalendarDay.js +0 -30
- package/dist/node_modules/react-day-picker/dist/esm/classes/CalendarMonth.js +0 -14
- package/dist/node_modules/react-day-picker/dist/esm/classes/CalendarWeek.js +0 -13
- package/dist/node_modules/react-day-picker/dist/esm/classes/DateLib.js +0 -522
- package/dist/node_modules/react-day-picker/dist/esm/components/Button.js +0 -13
- package/dist/node_modules/react-day-picker/dist/esm/components/CaptionLabel.js +0 -13
- 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 -18
- package/dist/node_modules/react-day-picker/dist/esm/components/DayButton.js +0 -19
- package/dist/node_modules/react-day-picker/dist/esm/components/Dropdown.js +0 -21
- package/dist/node_modules/react-day-picker/dist/esm/components/DropdownNav.js +0 -13
- package/dist/node_modules/react-day-picker/dist/esm/components/Footer.js +0 -13
- package/dist/node_modules/react-day-picker/dist/esm/components/Month.js +0 -15
- package/dist/node_modules/react-day-picker/dist/esm/components/MonthCaption.js +0 -14
- package/dist/node_modules/react-day-picker/dist/esm/components/MonthGrid.js +0 -13
- package/dist/node_modules/react-day-picker/dist/esm/components/Months.js +0 -13
- package/dist/node_modules/react-day-picker/dist/esm/components/MonthsDropdown.js +0 -15
- package/dist/node_modules/react-day-picker/dist/esm/components/Nav.js +0 -31
- package/dist/node_modules/react-day-picker/dist/esm/components/NextMonthButton.js +0 -15
- package/dist/node_modules/react-day-picker/dist/esm/components/Option.js +0 -13
- package/dist/node_modules/react-day-picker/dist/esm/components/PreviousMonthButton.js +0 -15
- package/dist/node_modules/react-day-picker/dist/esm/components/Root.js +0 -14
- package/dist/node_modules/react-day-picker/dist/esm/components/Select.js +0 -13
- package/dist/node_modules/react-day-picker/dist/esm/components/Week.js +0 -14
- package/dist/node_modules/react-day-picker/dist/esm/components/WeekNumber.js +0 -14
- package/dist/node_modules/react-day-picker/dist/esm/components/WeekNumberHeader.js +0 -13
- package/dist/node_modules/react-day-picker/dist/esm/components/Weekday.js +0 -13
- package/dist/node_modules/react-day-picker/dist/esm/components/Weekdays.js +0 -14
- package/dist/node_modules/react-day-picker/dist/esm/components/Weeks.js +0 -13
- package/dist/node_modules/react-day-picker/dist/esm/components/YearsDropdown.js +0 -15
- package/dist/node_modules/react-day-picker/dist/esm/components/custom-components.js +0 -26
- package/dist/node_modules/react-day-picker/dist/esm/formatters/formatCaption.js +0 -25
- package/dist/node_modules/react-day-picker/dist/esm/formatters/formatDay.js +0 -19
- package/dist/node_modules/react-day-picker/dist/esm/formatters/formatMonthDropdown.js +0 -18
- package/dist/node_modules/react-day-picker/dist/esm/formatters/formatWeekNumber.js +0 -21
- package/dist/node_modules/react-day-picker/dist/esm/formatters/formatWeekNumberHeader.js +0 -13
- package/dist/node_modules/react-day-picker/dist/esm/formatters/formatWeekdayName.js +0 -19
- package/dist/node_modules/react-day-picker/dist/esm/formatters/formatYearDropdown.js +0 -23
- package/dist/node_modules/react-day-picker/dist/esm/formatters/index.js +0 -7
- package/dist/node_modules/react-day-picker/dist/esm/helpers/calculateFocusTarget.js +0 -73
- package/dist/node_modules/react-day-picker/dist/esm/helpers/createGetModifiers.js +0 -95
- package/dist/node_modules/react-day-picker/dist/esm/helpers/endOfBroadcastWeek.js +0 -22
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getBroadcastWeeksInMonth.js +0 -28
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getClassNamesForModifiers.js +0 -33
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getComponents.js +0 -20
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getDataAttributes.js +0 -27
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getDates.js +0 -51
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getDays.js +0 -19
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getDefaultClassNames.js +0 -33
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getDisplayMonths.js +0 -24
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getFocusableDate.js +0 -46
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getFormatters.js +0 -24
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getInitialMonth.js +0 -28
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getMonthOptions.js +0 -33
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getMonths.js +0 -69
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getNavMonth.js +0 -51
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getNextFocus.js +0 -39
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getNextMonth.js +0 -36
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getPreviousMonth.js +0 -37
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getStyleForModifiers.js +0 -27
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getWeekdays.js +0 -24
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getWeeks.js +0 -14
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getYearOptions.js +0 -38
- package/dist/node_modules/react-day-picker/dist/esm/helpers/startOfBroadcastWeek.js +0 -27
- package/dist/node_modules/react-day-picker/dist/esm/helpers/useControlledValue.js +0 -31
- package/dist/node_modules/react-day-picker/dist/esm/labels/index.js +0 -11
- package/dist/node_modules/react-day-picker/dist/esm/labels/labelDayButton.js +0 -32
- package/dist/node_modules/react-day-picker/dist/esm/labels/labelGrid.js +0 -24
- package/dist/node_modules/react-day-picker/dist/esm/labels/labelGridcell.js +0 -22
- package/dist/node_modules/react-day-picker/dist/esm/labels/labelMonthDropdown.js +0 -14
- package/dist/node_modules/react-day-picker/dist/esm/labels/labelNav.js +0 -13
- package/dist/node_modules/react-day-picker/dist/esm/labels/labelNext.js +0 -15
- package/dist/node_modules/react-day-picker/dist/esm/labels/labelPrevious.js +0 -15
- package/dist/node_modules/react-day-picker/dist/esm/labels/labelWeekNumber.js +0 -15
- package/dist/node_modules/react-day-picker/dist/esm/labels/labelWeekNumberHeader.js +0 -14
- package/dist/node_modules/react-day-picker/dist/esm/labels/labelWeekday.js +0 -18
- package/dist/node_modules/react-day-picker/dist/esm/labels/labelYearDropdown.js +0 -14
- package/dist/node_modules/react-day-picker/dist/esm/selection/useMulti.js +0 -57
- package/dist/node_modules/react-day-picker/dist/esm/selection/useRange.js +0 -45
- package/dist/node_modules/react-day-picker/dist/esm/selection/useSingle.js +0 -44
- package/dist/node_modules/react-day-picker/dist/esm/useAnimation.js +0 -175
- package/dist/node_modules/react-day-picker/dist/esm/useCalendar.js +0 -85
- package/dist/node_modules/react-day-picker/dist/esm/useDayPicker.js +0 -25
- package/dist/node_modules/react-day-picker/dist/esm/useFocus.js +0 -50
- package/dist/node_modules/react-day-picker/dist/esm/useSelection.js +0 -31
- package/dist/node_modules/react-day-picker/dist/esm/utils/addToRange.js +0 -92
- package/dist/node_modules/react-day-picker/dist/esm/utils/dateMatchModifiers.js +0 -62
- package/dist/node_modules/react-day-picker/dist/esm/utils/rangeContainsDayOfWeek.js +0 -30
- package/dist/node_modules/react-day-picker/dist/esm/utils/rangeContainsModifiers.js +0 -74
- package/dist/node_modules/react-day-picker/dist/esm/utils/rangeIncludesDate.js +0 -35
- package/dist/node_modules/react-day-picker/dist/esm/utils/rangeOverlaps.js +0 -21
- package/dist/node_modules/react-day-picker/dist/esm/utils/typeguards.js +0 -66
- package/dist/node_modules/react-hook-form/dist/index.esm.js +0 -507
- package/dist/node_modules/react-remove-scroll/dist/es2015/Combination.js +0 -9
- package/dist/node_modules/react-remove-scroll/dist/es2015/SideEffect.js +0 -160
- package/dist/node_modules/react-remove-scroll/dist/es2015/UI.js +0 -38
- package/dist/node_modules/react-remove-scroll/dist/es2015/aggresiveCapture.js +0 -21
- package/dist/node_modules/react-remove-scroll/dist/es2015/handleScroll.js +0 -110
- package/dist/node_modules/react-remove-scroll/dist/es2015/medium.js +0 -5
- package/dist/node_modules/react-remove-scroll/dist/es2015/sidecar.js +0 -7
- package/dist/node_modules/react-remove-scroll-bar/dist/es2015/component.js +0 -56
- package/dist/node_modules/react-remove-scroll-bar/dist/es2015/constants.js +0 -10
- package/dist/node_modules/react-remove-scroll-bar/dist/es2015/utils.js +0 -31
- package/dist/node_modules/react-resizable-panels/dist/react-resizable-panels.js +0 -2407
- package/dist/node_modules/react-style-singleton/dist/es2015/component.js +0 -19
- package/dist/node_modules/react-style-singleton/dist/es2015/hook.js +0 -25
- package/dist/node_modules/react-style-singleton/dist/es2015/singleton.js +0 -51
- package/dist/node_modules/sonner/dist/index.js +0 -1125
- package/dist/node_modules/tailwind-merge/dist/bundle-mjs.js +0 -2956
- package/dist/node_modules/tslib/tslib.es6.js +0 -56
- package/dist/node_modules/use-callback-ref/dist/es2015/assignRef.js +0 -24
- package/dist/node_modules/use-callback-ref/dist/es2015/useMergeRef.js +0 -48
- package/dist/node_modules/use-callback-ref/dist/es2015/useRef.js +0 -42
- package/dist/node_modules/use-sidecar/dist/es2015/exports.js +0 -21
- package/dist/node_modules/use-sidecar/dist/es2015/medium.js +0 -77
- package/dist/node_modules/vaul/dist/index.js +0 -1627
- package/dist/providers/ThemeProvider.d.ts +0 -12
- package/dist/providers/ThemeProvider.js +0 -27
- package/dist/providers/index.d.ts +0 -3
- package/dist/styles.css +0 -1
|
@@ -1,522 +0,0 @@
|
|
|
1
|
-
import { TZDate } from '../../../../@date-fns/tz/date/index.js';
|
|
2
|
-
import '../../../../@date-fns/tz/date/mini.js';
|
|
3
|
-
import { enUS } from '../../../../date-fns/locale/en-US.js';
|
|
4
|
-
import { endOfBroadcastWeek } from '../helpers/endOfBroadcastWeek.js';
|
|
5
|
-
import { startOfBroadcastWeek } from '../helpers/startOfBroadcastWeek.js';
|
|
6
|
-
import { addDays } from '../../../../date-fns/addDays.js';
|
|
7
|
-
import { addMonths } from '../../../../date-fns/addMonths.js';
|
|
8
|
-
import { addWeeks } from '../../../../date-fns/addWeeks.js';
|
|
9
|
-
import { addYears } from '../../../../date-fns/addYears.js';
|
|
10
|
-
import { differenceInCalendarDays } from '../../../../date-fns/differenceInCalendarDays.js';
|
|
11
|
-
import { differenceInCalendarMonths } from '../../../../date-fns/differenceInCalendarMonths.js';
|
|
12
|
-
import { eachMonthOfInterval } from '../../../../date-fns/eachMonthOfInterval.js';
|
|
13
|
-
import { endOfISOWeek } from '../../../../date-fns/endOfISOWeek.js';
|
|
14
|
-
import { endOfMonth } from '../../../../date-fns/endOfMonth.js';
|
|
15
|
-
import { endOfWeek } from '../../../../date-fns/endOfWeek.js';
|
|
16
|
-
import { endOfYear } from '../../../../date-fns/endOfYear.js';
|
|
17
|
-
import { formatDate as format } from '../../../../date-fns/format.js';
|
|
18
|
-
import { getISOWeek } from '../../../../date-fns/getISOWeek.js';
|
|
19
|
-
import { getMonth } from '../../../../date-fns/getMonth.js';
|
|
20
|
-
import { getYear } from '../../../../date-fns/getYear.js';
|
|
21
|
-
import { getWeek } from '../../../../date-fns/getWeek.js';
|
|
22
|
-
import { isAfter } from '../../../../date-fns/isAfter.js';
|
|
23
|
-
import { isBefore } from '../../../../date-fns/isBefore.js';
|
|
24
|
-
import { isDate } from '../../../../date-fns/isDate.js';
|
|
25
|
-
import { isSameDay } from '../../../../date-fns/isSameDay.js';
|
|
26
|
-
import { isSameMonth } from '../../../../date-fns/isSameMonth.js';
|
|
27
|
-
import { isSameYear } from '../../../../date-fns/isSameYear.js';
|
|
28
|
-
import { max } from '../../../../date-fns/max.js';
|
|
29
|
-
import { min } from '../../../../date-fns/min.js';
|
|
30
|
-
import { setMonth } from '../../../../date-fns/setMonth.js';
|
|
31
|
-
import { setYear } from '../../../../date-fns/setYear.js';
|
|
32
|
-
import { startOfDay } from '../../../../date-fns/startOfDay.js';
|
|
33
|
-
import { startOfISOWeek } from '../../../../date-fns/startOfISOWeek.js';
|
|
34
|
-
import { startOfMonth } from '../../../../date-fns/startOfMonth.js';
|
|
35
|
-
import { startOfWeek } from '../../../../date-fns/startOfWeek.js';
|
|
36
|
-
import { startOfYear } from '../../../../date-fns/startOfYear.js';
|
|
37
|
-
|
|
38
|
-
/**
|
|
39
|
-
* A wrapper class around [date-fns](http://date-fns.org) that provides utility
|
|
40
|
-
* methods for date manipulation and formatting.
|
|
41
|
-
*
|
|
42
|
-
* @since 9.2.0
|
|
43
|
-
* @example
|
|
44
|
-
* const dateLib = new DateLib({ locale: es });
|
|
45
|
-
* const newDate = dateLib.addDays(new Date(), 5);
|
|
46
|
-
*/
|
|
47
|
-
class DateLib {
|
|
48
|
-
/**
|
|
49
|
-
* Creates an instance of `DateLib`.
|
|
50
|
-
*
|
|
51
|
-
* @param options Configuration options for the date library.
|
|
52
|
-
* @param overrides Custom overrides for the date library functions.
|
|
53
|
-
*/
|
|
54
|
-
constructor(options, overrides) {
|
|
55
|
-
/**
|
|
56
|
-
* Reference to the built-in Date constructor.
|
|
57
|
-
*
|
|
58
|
-
* @deprecated Use `newDate()` or `today()`.
|
|
59
|
-
*/
|
|
60
|
-
this.Date = Date;
|
|
61
|
-
/**
|
|
62
|
-
* Creates a new `Date` object representing today's date.
|
|
63
|
-
*
|
|
64
|
-
* @since 9.5.0
|
|
65
|
-
* @returns A `Date` object for today's date.
|
|
66
|
-
*/
|
|
67
|
-
this.today = () => {
|
|
68
|
-
if (this.overrides?.today) {
|
|
69
|
-
return this.overrides.today();
|
|
70
|
-
}
|
|
71
|
-
if (this.options.timeZone) {
|
|
72
|
-
return TZDate.tz(this.options.timeZone);
|
|
73
|
-
}
|
|
74
|
-
return new this.Date();
|
|
75
|
-
};
|
|
76
|
-
/**
|
|
77
|
-
* Creates a new `Date` object with the specified year, month, and day.
|
|
78
|
-
*
|
|
79
|
-
* @since 9.5.0
|
|
80
|
-
* @param year The year.
|
|
81
|
-
* @param monthIndex The month (0-11).
|
|
82
|
-
* @param date The day of the month.
|
|
83
|
-
* @returns A new `Date` object.
|
|
84
|
-
*/
|
|
85
|
-
this.newDate = (year, monthIndex, date) => {
|
|
86
|
-
if (this.overrides?.newDate) {
|
|
87
|
-
return this.overrides.newDate(year, monthIndex, date);
|
|
88
|
-
}
|
|
89
|
-
if (this.options.timeZone) {
|
|
90
|
-
return new TZDate(year, monthIndex, date, this.options.timeZone);
|
|
91
|
-
}
|
|
92
|
-
return new Date(year, monthIndex, date);
|
|
93
|
-
};
|
|
94
|
-
/**
|
|
95
|
-
* Adds the specified number of days to the given date.
|
|
96
|
-
*
|
|
97
|
-
* @param date The date to add days to.
|
|
98
|
-
* @param amount The number of days to add.
|
|
99
|
-
* @returns The new date with the days added.
|
|
100
|
-
*/
|
|
101
|
-
this.addDays = (date, amount) => {
|
|
102
|
-
return this.overrides?.addDays
|
|
103
|
-
? this.overrides.addDays(date, amount)
|
|
104
|
-
: addDays(date, amount);
|
|
105
|
-
};
|
|
106
|
-
/**
|
|
107
|
-
* Adds the specified number of months to the given date.
|
|
108
|
-
*
|
|
109
|
-
* @param date The date to add months to.
|
|
110
|
-
* @param amount The number of months to add.
|
|
111
|
-
* @returns The new date with the months added.
|
|
112
|
-
*/
|
|
113
|
-
this.addMonths = (date, amount) => {
|
|
114
|
-
return this.overrides?.addMonths
|
|
115
|
-
? this.overrides.addMonths(date, amount)
|
|
116
|
-
: addMonths(date, amount);
|
|
117
|
-
};
|
|
118
|
-
/**
|
|
119
|
-
* Adds the specified number of weeks to the given date.
|
|
120
|
-
*
|
|
121
|
-
* @param date The date to add weeks to.
|
|
122
|
-
* @param amount The number of weeks to add.
|
|
123
|
-
* @returns The new date with the weeks added.
|
|
124
|
-
*/
|
|
125
|
-
this.addWeeks = (date, amount) => {
|
|
126
|
-
return this.overrides?.addWeeks
|
|
127
|
-
? this.overrides.addWeeks(date, amount)
|
|
128
|
-
: addWeeks(date, amount);
|
|
129
|
-
};
|
|
130
|
-
/**
|
|
131
|
-
* Adds the specified number of years to the given date.
|
|
132
|
-
*
|
|
133
|
-
* @param date The date to add years to.
|
|
134
|
-
* @param amount The number of years to add.
|
|
135
|
-
* @returns The new date with the years added.
|
|
136
|
-
*/
|
|
137
|
-
this.addYears = (date, amount) => {
|
|
138
|
-
return this.overrides?.addYears
|
|
139
|
-
? this.overrides.addYears(date, amount)
|
|
140
|
-
: addYears(date, amount);
|
|
141
|
-
};
|
|
142
|
-
/**
|
|
143
|
-
* Returns the number of calendar days between the given dates.
|
|
144
|
-
*
|
|
145
|
-
* @param dateLeft The later date.
|
|
146
|
-
* @param dateRight The earlier date.
|
|
147
|
-
* @returns The number of calendar days between the dates.
|
|
148
|
-
*/
|
|
149
|
-
this.differenceInCalendarDays = (dateLeft, dateRight) => {
|
|
150
|
-
return this.overrides?.differenceInCalendarDays
|
|
151
|
-
? this.overrides.differenceInCalendarDays(dateLeft, dateRight)
|
|
152
|
-
: differenceInCalendarDays(dateLeft, dateRight);
|
|
153
|
-
};
|
|
154
|
-
/**
|
|
155
|
-
* Returns the number of calendar months between the given dates.
|
|
156
|
-
*
|
|
157
|
-
* @param dateLeft The later date.
|
|
158
|
-
* @param dateRight The earlier date.
|
|
159
|
-
* @returns The number of calendar months between the dates.
|
|
160
|
-
*/
|
|
161
|
-
this.differenceInCalendarMonths = (dateLeft, dateRight) => {
|
|
162
|
-
return this.overrides?.differenceInCalendarMonths
|
|
163
|
-
? this.overrides.differenceInCalendarMonths(dateLeft, dateRight)
|
|
164
|
-
: differenceInCalendarMonths(dateLeft, dateRight);
|
|
165
|
-
};
|
|
166
|
-
/**
|
|
167
|
-
* Returns the months between the given dates.
|
|
168
|
-
*
|
|
169
|
-
* @param interval The interval to get the months for.
|
|
170
|
-
*/
|
|
171
|
-
this.eachMonthOfInterval = (interval) => {
|
|
172
|
-
return this.overrides?.eachMonthOfInterval
|
|
173
|
-
? this.overrides.eachMonthOfInterval(interval)
|
|
174
|
-
: eachMonthOfInterval(interval);
|
|
175
|
-
};
|
|
176
|
-
/**
|
|
177
|
-
* Returns the end of the broadcast week for the given date.
|
|
178
|
-
*
|
|
179
|
-
* @param date The original date.
|
|
180
|
-
* @returns The end of the broadcast week.
|
|
181
|
-
*/
|
|
182
|
-
this.endOfBroadcastWeek = (date) => {
|
|
183
|
-
return this.overrides?.endOfBroadcastWeek
|
|
184
|
-
? this.overrides.endOfBroadcastWeek(date)
|
|
185
|
-
: endOfBroadcastWeek(date, this);
|
|
186
|
-
};
|
|
187
|
-
/**
|
|
188
|
-
* Returns the end of the ISO week for the given date.
|
|
189
|
-
*
|
|
190
|
-
* @param date The original date.
|
|
191
|
-
* @returns The end of the ISO week.
|
|
192
|
-
*/
|
|
193
|
-
this.endOfISOWeek = (date) => {
|
|
194
|
-
return this.overrides?.endOfISOWeek
|
|
195
|
-
? this.overrides.endOfISOWeek(date)
|
|
196
|
-
: endOfISOWeek(date);
|
|
197
|
-
};
|
|
198
|
-
/**
|
|
199
|
-
* Returns the end of the month for the given date.
|
|
200
|
-
*
|
|
201
|
-
* @param date The original date.
|
|
202
|
-
* @returns The end of the month.
|
|
203
|
-
*/
|
|
204
|
-
this.endOfMonth = (date) => {
|
|
205
|
-
return this.overrides?.endOfMonth
|
|
206
|
-
? this.overrides.endOfMonth(date)
|
|
207
|
-
: endOfMonth(date);
|
|
208
|
-
};
|
|
209
|
-
/**
|
|
210
|
-
* Returns the end of the week for the given date.
|
|
211
|
-
*
|
|
212
|
-
* @param date The original date.
|
|
213
|
-
* @returns The end of the week.
|
|
214
|
-
*/
|
|
215
|
-
this.endOfWeek = (date, options) => {
|
|
216
|
-
return this.overrides?.endOfWeek
|
|
217
|
-
? this.overrides.endOfWeek(date, options)
|
|
218
|
-
: endOfWeek(date, this.options);
|
|
219
|
-
};
|
|
220
|
-
/**
|
|
221
|
-
* Returns the end of the year for the given date.
|
|
222
|
-
*
|
|
223
|
-
* @param date The original date.
|
|
224
|
-
* @returns The end of the year.
|
|
225
|
-
*/
|
|
226
|
-
this.endOfYear = (date) => {
|
|
227
|
-
return this.overrides?.endOfYear
|
|
228
|
-
? this.overrides.endOfYear(date)
|
|
229
|
-
: endOfYear(date);
|
|
230
|
-
};
|
|
231
|
-
/**
|
|
232
|
-
* Formats the given date using the specified format string.
|
|
233
|
-
*
|
|
234
|
-
* @param date The date to format.
|
|
235
|
-
* @param formatStr The format string.
|
|
236
|
-
* @returns The formatted date string.
|
|
237
|
-
*/
|
|
238
|
-
this.format = (date, formatStr, options) => {
|
|
239
|
-
const formatted = this.overrides?.format
|
|
240
|
-
? this.overrides.format(date, formatStr, this.options)
|
|
241
|
-
: format(date, formatStr, this.options);
|
|
242
|
-
if (this.options.numerals && this.options.numerals !== "latn") {
|
|
243
|
-
return this.replaceDigits(formatted);
|
|
244
|
-
}
|
|
245
|
-
return formatted;
|
|
246
|
-
};
|
|
247
|
-
/**
|
|
248
|
-
* Returns the ISO week number for the given date.
|
|
249
|
-
*
|
|
250
|
-
* @param date The date to get the ISO week number for.
|
|
251
|
-
* @returns The ISO week number.
|
|
252
|
-
*/
|
|
253
|
-
this.getISOWeek = (date) => {
|
|
254
|
-
return this.overrides?.getISOWeek
|
|
255
|
-
? this.overrides.getISOWeek(date)
|
|
256
|
-
: getISOWeek(date);
|
|
257
|
-
};
|
|
258
|
-
/**
|
|
259
|
-
* Returns the month of the given date.
|
|
260
|
-
*
|
|
261
|
-
* @param date The date to get the month for.
|
|
262
|
-
* @returns The month.
|
|
263
|
-
*/
|
|
264
|
-
this.getMonth = (date, options) => {
|
|
265
|
-
return this.overrides?.getMonth
|
|
266
|
-
? this.overrides.getMonth(date, this.options)
|
|
267
|
-
: getMonth(date, this.options);
|
|
268
|
-
};
|
|
269
|
-
/**
|
|
270
|
-
* Returns the year of the given date.
|
|
271
|
-
*
|
|
272
|
-
* @param date The date to get the year for.
|
|
273
|
-
* @returns The year.
|
|
274
|
-
*/
|
|
275
|
-
this.getYear = (date, options) => {
|
|
276
|
-
return this.overrides?.getYear
|
|
277
|
-
? this.overrides.getYear(date, this.options)
|
|
278
|
-
: getYear(date, this.options);
|
|
279
|
-
};
|
|
280
|
-
/**
|
|
281
|
-
* Returns the local week number for the given date.
|
|
282
|
-
*
|
|
283
|
-
* @param date The date to get the week number for.
|
|
284
|
-
* @returns The week number.
|
|
285
|
-
*/
|
|
286
|
-
this.getWeek = (date, options) => {
|
|
287
|
-
return this.overrides?.getWeek
|
|
288
|
-
? this.overrides.getWeek(date, this.options)
|
|
289
|
-
: getWeek(date, this.options);
|
|
290
|
-
};
|
|
291
|
-
/**
|
|
292
|
-
* Checks if the first date is after the second date.
|
|
293
|
-
*
|
|
294
|
-
* @param date The date to compare.
|
|
295
|
-
* @param dateToCompare The date to compare with.
|
|
296
|
-
* @returns True if the first date is after the second date.
|
|
297
|
-
*/
|
|
298
|
-
this.isAfter = (date, dateToCompare) => {
|
|
299
|
-
return this.overrides?.isAfter
|
|
300
|
-
? this.overrides.isAfter(date, dateToCompare)
|
|
301
|
-
: isAfter(date, dateToCompare);
|
|
302
|
-
};
|
|
303
|
-
/**
|
|
304
|
-
* Checks if the first date is before the second date.
|
|
305
|
-
*
|
|
306
|
-
* @param date The date to compare.
|
|
307
|
-
* @param dateToCompare The date to compare with.
|
|
308
|
-
* @returns True if the first date is before the second date.
|
|
309
|
-
*/
|
|
310
|
-
this.isBefore = (date, dateToCompare) => {
|
|
311
|
-
return this.overrides?.isBefore
|
|
312
|
-
? this.overrides.isBefore(date, dateToCompare)
|
|
313
|
-
: isBefore(date, dateToCompare);
|
|
314
|
-
};
|
|
315
|
-
/**
|
|
316
|
-
* Checks if the given value is a Date object.
|
|
317
|
-
*
|
|
318
|
-
* @param value The value to check.
|
|
319
|
-
* @returns True if the value is a Date object.
|
|
320
|
-
*/
|
|
321
|
-
this.isDate = (value) => {
|
|
322
|
-
return this.overrides?.isDate
|
|
323
|
-
? this.overrides.isDate(value)
|
|
324
|
-
: isDate(value);
|
|
325
|
-
};
|
|
326
|
-
/**
|
|
327
|
-
* Checks if the given dates are on the same day.
|
|
328
|
-
*
|
|
329
|
-
* @param dateLeft The first date to compare.
|
|
330
|
-
* @param dateRight The second date to compare.
|
|
331
|
-
* @returns True if the dates are on the same day.
|
|
332
|
-
*/
|
|
333
|
-
this.isSameDay = (dateLeft, dateRight) => {
|
|
334
|
-
return this.overrides?.isSameDay
|
|
335
|
-
? this.overrides.isSameDay(dateLeft, dateRight)
|
|
336
|
-
: isSameDay(dateLeft, dateRight);
|
|
337
|
-
};
|
|
338
|
-
/**
|
|
339
|
-
* Checks if the given dates are in the same month.
|
|
340
|
-
*
|
|
341
|
-
* @param dateLeft The first date to compare.
|
|
342
|
-
* @param dateRight The second date to compare.
|
|
343
|
-
* @returns True if the dates are in the same month.
|
|
344
|
-
*/
|
|
345
|
-
this.isSameMonth = (dateLeft, dateRight) => {
|
|
346
|
-
return this.overrides?.isSameMonth
|
|
347
|
-
? this.overrides.isSameMonth(dateLeft, dateRight)
|
|
348
|
-
: isSameMonth(dateLeft, dateRight);
|
|
349
|
-
};
|
|
350
|
-
/**
|
|
351
|
-
* Checks if the given dates are in the same year.
|
|
352
|
-
*
|
|
353
|
-
* @param dateLeft The first date to compare.
|
|
354
|
-
* @param dateRight The second date to compare.
|
|
355
|
-
* @returns True if the dates are in the same year.
|
|
356
|
-
*/
|
|
357
|
-
this.isSameYear = (dateLeft, dateRight) => {
|
|
358
|
-
return this.overrides?.isSameYear
|
|
359
|
-
? this.overrides.isSameYear(dateLeft, dateRight)
|
|
360
|
-
: isSameYear(dateLeft, dateRight);
|
|
361
|
-
};
|
|
362
|
-
/**
|
|
363
|
-
* Returns the latest date in the given array of dates.
|
|
364
|
-
*
|
|
365
|
-
* @param dates The array of dates to compare.
|
|
366
|
-
* @returns The latest date.
|
|
367
|
-
*/
|
|
368
|
-
this.max = (dates) => {
|
|
369
|
-
return this.overrides?.max ? this.overrides.max(dates) : max(dates);
|
|
370
|
-
};
|
|
371
|
-
/**
|
|
372
|
-
* Returns the earliest date in the given array of dates.
|
|
373
|
-
*
|
|
374
|
-
* @param dates The array of dates to compare.
|
|
375
|
-
* @returns The earliest date.
|
|
376
|
-
*/
|
|
377
|
-
this.min = (dates) => {
|
|
378
|
-
return this.overrides?.min ? this.overrides.min(dates) : min(dates);
|
|
379
|
-
};
|
|
380
|
-
/**
|
|
381
|
-
* Sets the month of the given date.
|
|
382
|
-
*
|
|
383
|
-
* @param date The date to set the month on.
|
|
384
|
-
* @param month The month to set (0-11).
|
|
385
|
-
* @returns The new date with the month set.
|
|
386
|
-
*/
|
|
387
|
-
this.setMonth = (date, month) => {
|
|
388
|
-
return this.overrides?.setMonth
|
|
389
|
-
? this.overrides.setMonth(date, month)
|
|
390
|
-
: setMonth(date, month);
|
|
391
|
-
};
|
|
392
|
-
/**
|
|
393
|
-
* Sets the year of the given date.
|
|
394
|
-
*
|
|
395
|
-
* @param date The date to set the year on.
|
|
396
|
-
* @param year The year to set.
|
|
397
|
-
* @returns The new date with the year set.
|
|
398
|
-
*/
|
|
399
|
-
this.setYear = (date, year) => {
|
|
400
|
-
return this.overrides?.setYear
|
|
401
|
-
? this.overrides.setYear(date, year)
|
|
402
|
-
: setYear(date, year);
|
|
403
|
-
};
|
|
404
|
-
/**
|
|
405
|
-
* Returns the start of the broadcast week for the given date.
|
|
406
|
-
*
|
|
407
|
-
* @param date The original date.
|
|
408
|
-
* @returns The start of the broadcast week.
|
|
409
|
-
*/
|
|
410
|
-
this.startOfBroadcastWeek = (date, dateLib) => {
|
|
411
|
-
return this.overrides?.startOfBroadcastWeek
|
|
412
|
-
? this.overrides.startOfBroadcastWeek(date, this)
|
|
413
|
-
: startOfBroadcastWeek(date, this);
|
|
414
|
-
};
|
|
415
|
-
/**
|
|
416
|
-
* Returns the start of the day for the given date.
|
|
417
|
-
*
|
|
418
|
-
* @param date The original date.
|
|
419
|
-
* @returns The start of the day.
|
|
420
|
-
*/
|
|
421
|
-
this.startOfDay = (date) => {
|
|
422
|
-
return this.overrides?.startOfDay
|
|
423
|
-
? this.overrides.startOfDay(date)
|
|
424
|
-
: startOfDay(date);
|
|
425
|
-
};
|
|
426
|
-
/**
|
|
427
|
-
* Returns the start of the ISO week for the given date.
|
|
428
|
-
*
|
|
429
|
-
* @param date The original date.
|
|
430
|
-
* @returns The start of the ISO week.
|
|
431
|
-
*/
|
|
432
|
-
this.startOfISOWeek = (date) => {
|
|
433
|
-
return this.overrides?.startOfISOWeek
|
|
434
|
-
? this.overrides.startOfISOWeek(date)
|
|
435
|
-
: startOfISOWeek(date);
|
|
436
|
-
};
|
|
437
|
-
/**
|
|
438
|
-
* Returns the start of the month for the given date.
|
|
439
|
-
*
|
|
440
|
-
* @param date The original date.
|
|
441
|
-
* @returns The start of the month.
|
|
442
|
-
*/
|
|
443
|
-
this.startOfMonth = (date) => {
|
|
444
|
-
return this.overrides?.startOfMonth
|
|
445
|
-
? this.overrides.startOfMonth(date)
|
|
446
|
-
: startOfMonth(date);
|
|
447
|
-
};
|
|
448
|
-
/**
|
|
449
|
-
* Returns the start of the week for the given date.
|
|
450
|
-
*
|
|
451
|
-
* @param date The original date.
|
|
452
|
-
* @returns The start of the week.
|
|
453
|
-
*/
|
|
454
|
-
this.startOfWeek = (date, options) => {
|
|
455
|
-
return this.overrides?.startOfWeek
|
|
456
|
-
? this.overrides.startOfWeek(date, this.options)
|
|
457
|
-
: startOfWeek(date, this.options);
|
|
458
|
-
};
|
|
459
|
-
/**
|
|
460
|
-
* Returns the start of the year for the given date.
|
|
461
|
-
*
|
|
462
|
-
* @param date The original date.
|
|
463
|
-
* @returns The start of the year.
|
|
464
|
-
*/
|
|
465
|
-
this.startOfYear = (date) => {
|
|
466
|
-
return this.overrides?.startOfYear
|
|
467
|
-
? this.overrides.startOfYear(date)
|
|
468
|
-
: startOfYear(date);
|
|
469
|
-
};
|
|
470
|
-
this.options = { locale: enUS, ...options };
|
|
471
|
-
this.overrides = overrides;
|
|
472
|
-
}
|
|
473
|
-
/**
|
|
474
|
-
* Generates a mapping of Arabic digits (0-9) to the target numbering system
|
|
475
|
-
* digits.
|
|
476
|
-
*
|
|
477
|
-
* @since 9.5.0
|
|
478
|
-
* @returns A record mapping Arabic digits to the target numerals.
|
|
479
|
-
*/
|
|
480
|
-
getDigitMap() {
|
|
481
|
-
const { numerals = "latn" } = this.options;
|
|
482
|
-
// Use Intl.NumberFormat to create a formatter with the specified numbering system
|
|
483
|
-
const formatter = new Intl.NumberFormat("en-US", {
|
|
484
|
-
numberingSystem: numerals
|
|
485
|
-
});
|
|
486
|
-
// Map Arabic digits (0-9) to the target numerals
|
|
487
|
-
const digitMap = {};
|
|
488
|
-
for (let i = 0; i < 10; i++) {
|
|
489
|
-
digitMap[i.toString()] = formatter.format(i);
|
|
490
|
-
}
|
|
491
|
-
return digitMap;
|
|
492
|
-
}
|
|
493
|
-
/**
|
|
494
|
-
* Replaces Arabic digits in a string with the target numbering system digits.
|
|
495
|
-
*
|
|
496
|
-
* @since 9.5.0
|
|
497
|
-
* @param input The string containing Arabic digits.
|
|
498
|
-
* @returns The string with digits replaced.
|
|
499
|
-
*/
|
|
500
|
-
replaceDigits(input) {
|
|
501
|
-
const digitMap = this.getDigitMap();
|
|
502
|
-
return input.replace(/\d/g, (digit) => digitMap[digit] || digit);
|
|
503
|
-
}
|
|
504
|
-
/**
|
|
505
|
-
* Formats a number using the configured numbering system.
|
|
506
|
-
*
|
|
507
|
-
* @since 9.5.0
|
|
508
|
-
* @param value The number to format.
|
|
509
|
-
* @returns The formatted number as a string.
|
|
510
|
-
*/
|
|
511
|
-
formatNumber(value) {
|
|
512
|
-
return this.replaceDigits(value.toString());
|
|
513
|
-
}
|
|
514
|
-
}
|
|
515
|
-
/**
|
|
516
|
-
* The default date library with English locale.
|
|
517
|
-
*
|
|
518
|
-
* @since 9.2.0
|
|
519
|
-
*/
|
|
520
|
-
const defaultDateLib = new DateLib();
|
|
521
|
-
|
|
522
|
-
export { DateLib, defaultDateLib, enUS as defaultLocale };
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import React__default from 'react';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Render the button elements in the calendar.
|
|
5
|
-
*
|
|
6
|
-
* @private
|
|
7
|
-
* @deprecated Use `PreviousMonthButton` or `@link NextMonthButton` instead.
|
|
8
|
-
*/
|
|
9
|
-
function Button(props) {
|
|
10
|
-
return React__default.createElement("button", { ...props });
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
export { Button };
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import React__default from 'react';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Render the label in the month caption.
|
|
5
|
-
*
|
|
6
|
-
* @group Components
|
|
7
|
-
* @see https://daypicker.dev/guides/custom-components
|
|
8
|
-
*/
|
|
9
|
-
function CaptionLabel(props) {
|
|
10
|
-
return React__default.createElement("span", { ...props });
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
export { CaptionLabel };
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import React__default from 'react';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Render the chevron icon used in the navigation buttons and dropdowns.
|
|
5
|
-
*
|
|
6
|
-
* @group Components
|
|
7
|
-
* @see https://daypicker.dev/guides/custom-components
|
|
8
|
-
*/
|
|
9
|
-
function Chevron(props) {
|
|
10
|
-
const { size = 24, orientation = "left", className } = props;
|
|
11
|
-
return (React__default.createElement("svg", { className: className, width: size, height: size, viewBox: "0 0 24 24" },
|
|
12
|
-
orientation === "up" && (React__default.createElement("polygon", { points: "6.77 17 12.5 11.43 18.24 17 20 15.28 12.5 8 5 15.28" })),
|
|
13
|
-
orientation === "down" && (React__default.createElement("polygon", { points: "6.77 8 12.5 13.57 18.24 8 20 9.72 12.5 17 5 9.72" })),
|
|
14
|
-
orientation === "left" && (React__default.createElement("polygon", { points: "16 18.112 9.81111111 12 16 5.87733333 14.0888889 4 6 12 14.0888889 20" })),
|
|
15
|
-
orientation === "right" && (React__default.createElement("polygon", { points: "8 18.112 14.18888889 12 8 5.87733333 9.91111111 4 18 12 9.91111111 20" }))));
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
export { Chevron };
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import React__default from 'react';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Render a grid cell for a specific day in the calendar.
|
|
5
|
-
*
|
|
6
|
-
* Handles interaction and focus for the day. If you only need to change the
|
|
7
|
-
* content of the day cell, consider swapping the `DayButton` component
|
|
8
|
-
* instead.
|
|
9
|
-
*
|
|
10
|
-
* @group Components
|
|
11
|
-
* @see https://daypicker.dev/guides/custom-components
|
|
12
|
-
*/
|
|
13
|
-
function Day(props) {
|
|
14
|
-
const { day, modifiers, ...tdProps } = props;
|
|
15
|
-
return React__default.createElement("td", { ...tdProps });
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
export { Day };
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import React__default from 'react';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Render a button for a specific day in the calendar.
|
|
5
|
-
*
|
|
6
|
-
* @group Components
|
|
7
|
-
* @see https://daypicker.dev/guides/custom-components
|
|
8
|
-
*/
|
|
9
|
-
function DayButton(props) {
|
|
10
|
-
const { day, modifiers, ...buttonProps } = props;
|
|
11
|
-
const ref = React__default.useRef(null);
|
|
12
|
-
React__default.useEffect(() => {
|
|
13
|
-
if (modifiers.focused)
|
|
14
|
-
ref.current?.focus();
|
|
15
|
-
}, [modifiers.focused]);
|
|
16
|
-
return React__default.createElement("button", { ref: ref, ...buttonProps });
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
export { DayButton };
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import React__default from 'react';
|
|
2
|
-
import { UI } from '../UI.js';
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* Render a dropdown component for navigation in the calendar.
|
|
6
|
-
*
|
|
7
|
-
* @group Components
|
|
8
|
-
* @see https://daypicker.dev/guides/custom-components
|
|
9
|
-
*/
|
|
10
|
-
function Dropdown(props) {
|
|
11
|
-
const { options, className, components, classNames, ...selectProps } = props;
|
|
12
|
-
const cssClassSelect = [classNames[UI.Dropdown], className].join(" ");
|
|
13
|
-
const selectedOption = options?.find(({ value }) => value === selectProps.value);
|
|
14
|
-
return (React__default.createElement("span", { "data-disabled": selectProps.disabled, className: classNames[UI.DropdownRoot] },
|
|
15
|
-
React__default.createElement(components.Select, { className: cssClassSelect, ...selectProps }, options?.map(({ value, label, disabled }) => (React__default.createElement(components.Option, { key: value, value: value, disabled: disabled }, label)))),
|
|
16
|
-
React__default.createElement("span", { className: classNames[UI.CaptionLabel], "aria-hidden": true },
|
|
17
|
-
selectedOption?.label,
|
|
18
|
-
React__default.createElement(components.Chevron, { orientation: "down", size: 18, className: classNames[UI.Chevron] }))));
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
export { Dropdown };
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import React__default from 'react';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Render the navigation dropdowns for the calendar.
|
|
5
|
-
*
|
|
6
|
-
* @group Components
|
|
7
|
-
* @see https://daypicker.dev/guides/custom-components
|
|
8
|
-
*/
|
|
9
|
-
function DropdownNav(props) {
|
|
10
|
-
return React__default.createElement("div", { ...props });
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
export { DropdownNav };
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import React__default from 'react';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Render the footer of the calendar.
|
|
5
|
-
*
|
|
6
|
-
* @group Components
|
|
7
|
-
* @see https://daypicker.dev/guides/custom-components
|
|
8
|
-
*/
|
|
9
|
-
function Footer(props) {
|
|
10
|
-
return React__default.createElement("div", { ...props });
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
export { Footer };
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import React__default from 'react';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Render the grid with the weekday header row and the weeks for a specific
|
|
5
|
-
* month.
|
|
6
|
-
*
|
|
7
|
-
* @group Components
|
|
8
|
-
* @see https://daypicker.dev/guides/custom-components
|
|
9
|
-
*/
|
|
10
|
-
function Month(props) {
|
|
11
|
-
const { calendarMonth, displayIndex, ...divProps } = props;
|
|
12
|
-
return React__default.createElement("div", { ...divProps }, props.children);
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
export { Month };
|