@btst/stack 1.4.1 → 1.5.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/node_modules/.pnpm/@date-fns_tz@1.4.1/node_modules/@date-fns/tz/date/index.cjs +85 -0
- package/dist/node_modules/.pnpm/@date-fns_tz@1.4.1/node_modules/@date-fns/tz/date/index.mjs +83 -0
- package/dist/node_modules/.pnpm/@date-fns_tz@1.4.1/node_modules/@date-fns/tz/date/mini.cjs +237 -0
- package/dist/node_modules/.pnpm/@date-fns_tz@1.4.1/node_modules/@date-fns/tz/date/mini.mjs +235 -0
- package/dist/node_modules/.pnpm/@date-fns_tz@1.4.1/node_modules/@date-fns/tz/tzName/index.cjs +41 -0
- package/dist/node_modules/.pnpm/@date-fns_tz@1.4.1/node_modules/@date-fns/tz/tzName/index.mjs +39 -0
- package/dist/node_modules/.pnpm/@date-fns_tz@1.4.1/node_modules/@date-fns/tz/tzOffset/index.cjs +46 -0
- package/dist/node_modules/.pnpm/@date-fns_tz@1.4.1/node_modules/@date-fns/tz/tzOffset/index.mjs +44 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-checkbox@1.3.3_@types_react-dom@19.2.3_@types_react@19.2.6__@types_reac_c1e3fbdebd5ee34a254141dc5a2dcd28/node_modules/@radix-ui/react-checkbox/dist/index.cjs +296 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-checkbox@1.3.3_@types_react-dom@19.2.3_@types_react@19.2.6__@types_reac_c1e3fbdebd5ee34a254141dc5a2dcd28/node_modules/@radix-ui/react-checkbox/dist/index.mjs +271 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-popover@1.1.15_@types_react-dom@19.2.3_@types_react@19.2.6__@types_reac_5c5a3ca63b34dfe7d9d23f1e8cee675c/node_modules/@radix-ui/react-popover/dist/index.cjs +325 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-popover@1.1.15_@types_react-dom@19.2.3_@types_react@19.2.6__@types_reac_5c5a3ca63b34dfe7d9d23f1e8cee675c/node_modules/@radix-ui/react-popover/dist/index.mjs +299 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-primitive@2.1.4_@types_react-dom@19.2.3_@types_react@19.2.6__@types_rea_43b950ce9f6b8d55739cce33fe173a1c/node_modules/@radix-ui/react-primitive/dist/index.cjs +56 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-primitive@2.1.4_@types_react-dom@19.2.3_@types_react@19.2.6__@types_rea_43b950ce9f6b8d55739cce33fe173a1c/node_modules/@radix-ui/react-primitive/dist/index.mjs +40 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-radio-group@1.3.8_@types_react-dom@19.2.3_@types_react@19.2.6__@types_r_e0d4db654009398ea41c8e459eeae4ee/node_modules/@radix-ui/react-radio-group/dist/index.cjs +304 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-radio-group@1.3.8_@types_react-dom@19.2.3_@types_react@19.2.6__@types_r_e0d4db654009398ea41c8e459eeae4ee/node_modules/@radix-ui/react-radio-group/dist/index.mjs +283 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-separator@1.1.8_@types_react-dom@19.2.3_@types_react@19.2.6__@types_rea_8aae318b88145540882c32de0262377a/node_modules/@radix-ui/react-separator/dist/index.cjs +47 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-separator@1.1.8_@types_react-dom@19.2.3_@types_react@19.2.6__@types_rea_8aae318b88145540882c32de0262377a/node_modules/@radix-ui/react-separator/dist/index.mjs +30 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/DayPicker.cjs +326 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/DayPicker.mjs +320 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/UI.cjs +122 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/UI.mjs +122 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/classes/CalendarDay.cjs +35 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/classes/CalendarDay.mjs +33 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/classes/CalendarMonth.cjs +16 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/classes/CalendarMonth.mjs +14 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/classes/CalendarWeek.cjs +15 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/classes/CalendarWeek.mjs +13 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/classes/DateLib.cjs +577 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/classes/DateLib.mjs +573 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/components/Button.cjs +19 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/components/Button.mjs +13 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/components/CaptionLabel.cjs +19 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/components/CaptionLabel.mjs +13 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/components/Chevron.cjs +26 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/components/Chevron.mjs +20 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/components/Day.cjs +24 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/components/Day.mjs +18 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/components/DayButton.cjs +25 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/components/DayButton.mjs +19 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/components/Dropdown.cjs +27 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/components/Dropdown.mjs +21 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/components/DropdownNav.cjs +19 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/components/DropdownNav.mjs +13 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/components/Footer.cjs +19 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/components/Footer.mjs +13 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/components/Month.cjs +21 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/components/Month.mjs +15 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/components/MonthCaption.cjs +20 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/components/MonthCaption.mjs +14 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/components/MonthGrid.cjs +19 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/components/MonthGrid.mjs +13 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/components/Months.cjs +19 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/components/Months.mjs +13 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/components/MonthsDropdown.cjs +21 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/components/MonthsDropdown.mjs +15 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/components/Nav.cjs +37 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/components/Nav.mjs +31 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/components/NextMonthButton.cjs +21 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/components/NextMonthButton.mjs +15 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/components/Option.cjs +19 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/components/Option.mjs +13 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/components/PreviousMonthButton.cjs +21 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/components/PreviousMonthButton.mjs +15 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/components/Root.cjs +20 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/components/Root.mjs +14 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/components/Select.cjs +19 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/components/Select.mjs +13 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/components/Week.cjs +20 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/components/Week.mjs +14 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/components/WeekNumber.cjs +20 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/components/WeekNumber.mjs +14 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/components/WeekNumberHeader.cjs +19 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/components/WeekNumberHeader.mjs +13 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/components/Weekday.cjs +19 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/components/Weekday.mjs +13 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/components/Weekdays.cjs +20 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/components/Weekdays.mjs +14 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/components/Weeks.cjs +19 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/components/Weeks.mjs +13 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/components/YearsDropdown.cjs +21 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/components/YearsDropdown.mjs +15 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/components/custom-components.cjs +57 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/components/custom-components.mjs +26 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/formatters/formatCaption.cjs +29 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/formatters/formatCaption.mjs +26 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/formatters/formatDay.cjs +21 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/formatters/formatDay.mjs +19 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/formatters/formatMonthDropdown.cjs +20 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/formatters/formatMonthDropdown.mjs +18 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/formatters/formatWeekNumber.cjs +23 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/formatters/formatWeekNumber.mjs +21 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/formatters/formatWeekNumberHeader.cjs +15 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/formatters/formatWeekNumberHeader.mjs +13 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/formatters/formatWeekdayName.cjs +21 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/formatters/formatWeekdayName.mjs +19 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/formatters/formatYearDropdown.cjs +26 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/formatters/formatYearDropdown.mjs +23 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/formatters/index.cjs +21 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/formatters/index.mjs +7 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/helpers/calculateFocusTarget.cjs +75 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/helpers/calculateFocusTarget.mjs +73 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/helpers/createGetModifiers.cjs +97 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/helpers/createGetModifiers.mjs +95 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/helpers/endOfBroadcastWeek.cjs +24 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/helpers/endOfBroadcastWeek.mjs +22 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/helpers/getBroadcastWeeksInMonth.cjs +30 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/helpers/getBroadcastWeeksInMonth.mjs +28 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/helpers/getClassNamesForModifiers.cjs +35 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/helpers/getClassNamesForModifiers.mjs +33 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/helpers/getComponents.cjs +22 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/helpers/getComponents.mjs +20 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/helpers/getDataAttributes.cjs +29 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/helpers/getDataAttributes.mjs +27 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/helpers/getDates.cjs +61 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/helpers/getDates.mjs +59 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/helpers/getDays.cjs +21 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/helpers/getDays.mjs +19 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/helpers/getDefaultClassNames.cjs +35 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/helpers/getDefaultClassNames.mjs +33 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/helpers/getDisplayMonths.cjs +26 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/helpers/getDisplayMonths.mjs +24 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/helpers/getFocusableDate.cjs +48 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/helpers/getFocusableDate.mjs +46 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/helpers/getFormatters.cjs +26 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/helpers/getFormatters.mjs +24 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/helpers/getInitialMonth.cjs +29 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/helpers/getInitialMonth.mjs +27 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/helpers/getLabels.cjs +55 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/helpers/getLabels.mjs +53 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/helpers/getMonthOptions.cjs +35 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/helpers/getMonthOptions.mjs +33 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/helpers/getMonths.cjs +71 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/helpers/getMonths.mjs +69 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/helpers/getNavMonth.cjs +53 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/helpers/getNavMonth.mjs +51 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/helpers/getNextFocus.cjs +42 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/helpers/getNextFocus.mjs +40 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/helpers/getNextMonth.cjs +38 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/helpers/getNextMonth.mjs +36 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/helpers/getPreviousMonth.cjs +39 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/helpers/getPreviousMonth.mjs +37 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/helpers/getStyleForModifiers.cjs +29 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/helpers/getStyleForModifiers.mjs +27 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/helpers/getWeekdays.cjs +28 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/helpers/getWeekdays.mjs +26 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/helpers/getWeeks.cjs +16 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/helpers/getWeeks.mjs +14 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/helpers/getYearOptions.cjs +38 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/helpers/getYearOptions.mjs +36 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/helpers/startOfBroadcastWeek.cjs +29 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/helpers/startOfBroadcastWeek.mjs +27 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/helpers/useControlledValue.cjs +33 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/helpers/useControlledValue.mjs +31 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/labels/index.cjs +29 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/labels/index.mjs +11 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/labels/labelDayButton.cjs +35 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/labels/labelDayButton.mjs +32 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/labels/labelGrid.cjs +28 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/labels/labelGrid.mjs +25 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/labels/labelGridcell.cjs +24 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/labels/labelGridcell.mjs +22 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/labels/labelMonthDropdown.cjs +16 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/labels/labelMonthDropdown.mjs +14 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/labels/labelNav.cjs +15 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/labels/labelNav.mjs +13 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/labels/labelNext.cjs +18 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/labels/labelNext.mjs +16 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/labels/labelPrevious.cjs +17 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/labels/labelPrevious.mjs +15 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/labels/labelWeekNumber.cjs +17 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/labels/labelWeekNumber.mjs +15 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/labels/labelWeekNumberHeader.cjs +16 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/labels/labelWeekNumberHeader.mjs +14 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/labels/labelWeekday.cjs +20 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/labels/labelWeekday.mjs +18 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/labels/labelYearDropdown.cjs +16 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/labels/labelYearDropdown.mjs +14 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/locale/en-US.cjs +69 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/locale/en-US.mjs +67 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/selection/useMulti.cjs +59 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/selection/useMulti.mjs +57 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/selection/useRange.cjs +47 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/selection/useRange.mjs +45 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/selection/useSingle.cjs +46 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/selection/useSingle.mjs +44 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/useAnimation.cjs +176 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/useAnimation.mjs +174 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/useCalendar.cjs +115 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/useCalendar.mjs +113 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/useDayPicker.cjs +28 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/useDayPicker.mjs +25 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/useFocus.cjs +58 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/useFocus.mjs +56 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/useSelection.cjs +33 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/useSelection.mjs +31 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/utils/addToRange.cjs +97 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/utils/addToRange.mjs +95 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/utils/convertMatchersToTimeZone.cjs +59 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/utils/convertMatchersToTimeZone.mjs +57 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/utils/dateMatchModifiers.cjs +64 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/utils/dateMatchModifiers.mjs +62 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/utils/rangeContainsDayOfWeek.cjs +32 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/utils/rangeContainsDayOfWeek.mjs +30 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/utils/rangeContainsModifiers.cjs +76 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/utils/rangeContainsModifiers.mjs +74 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/utils/rangeIncludesDate.cjs +37 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/utils/rangeIncludesDate.mjs +35 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/utils/rangeOverlaps.cjs +23 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/utils/rangeOverlaps.mjs +21 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/utils/toTimeZone.cjs +18 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/utils/toTimeZone.mjs +16 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/utils/typeguards.cjs +73 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/utils/typeguards.mjs +66 -0
- package/dist/packages/better-stack/src/plugins/ai-chat/client/components/chat-interface.cjs +7 -0
- package/dist/packages/better-stack/src/plugins/ai-chat/client/components/chat-interface.mjs +7 -0
- package/dist/packages/better-stack/src/plugins/ai-chat/client/components/chat-sidebar.cjs +131 -124
- package/dist/packages/better-stack/src/plugins/ai-chat/client/components/chat-sidebar.mjs +131 -124
- package/dist/packages/better-stack/src/plugins/ai-chat/schemas.cjs +23 -23
- package/dist/packages/better-stack/src/plugins/blog/api/plugin.cjs +28 -12
- package/dist/packages/better-stack/src/plugins/blog/api/plugin.mjs +18 -2
- package/dist/packages/better-stack/src/plugins/blog/client/components/loading/form-page-skeleton.cjs +1 -1
- package/dist/packages/better-stack/src/plugins/blog/client/components/loading/form-page-skeleton.mjs +1 -1
- package/dist/packages/better-stack/src/plugins/blog/client/components/loading/list-page-skeleton.cjs +1 -1
- package/dist/packages/better-stack/src/plugins/blog/client/components/loading/list-page-skeleton.mjs +1 -1
- package/dist/packages/better-stack/src/plugins/blog/client/components/loading/post-page-skeleton.cjs +1 -1
- package/dist/packages/better-stack/src/plugins/blog/client/components/loading/post-page-skeleton.mjs +1 -1
- package/dist/packages/better-stack/src/plugins/blog/client/components/pages/edit-post-page.internal.cjs +7 -6
- package/dist/packages/better-stack/src/plugins/blog/client/components/pages/edit-post-page.internal.mjs +7 -6
- package/dist/packages/better-stack/src/plugins/blog/client/components/pages/home-page.internal.cjs +9 -7
- package/dist/packages/better-stack/src/plugins/blog/client/components/pages/home-page.internal.mjs +9 -7
- package/dist/packages/better-stack/src/plugins/blog/client/components/pages/new-post-page.internal.cjs +7 -6
- package/dist/packages/better-stack/src/plugins/blog/client/components/pages/new-post-page.internal.mjs +7 -6
- package/dist/packages/better-stack/src/plugins/blog/client/components/pages/post-page.internal.cjs +7 -5
- package/dist/packages/better-stack/src/plugins/blog/client/components/pages/post-page.internal.mjs +7 -5
- package/dist/packages/better-stack/src/plugins/blog/client/components/pages/tag-page.internal.cjs +5 -3
- package/dist/packages/better-stack/src/plugins/blog/client/components/pages/tag-page.internal.mjs +5 -3
- package/dist/packages/better-stack/src/plugins/blog/client/components/shared/page-wrapper.cjs +10 -6
- package/dist/packages/better-stack/src/plugins/blog/client/components/shared/page-wrapper.mjs +11 -7
- package/dist/packages/better-stack/src/plugins/blog/client/plugin.cjs +6 -6
- package/dist/packages/better-stack/src/plugins/blog/client/plugin.mjs +6 -6
- package/dist/packages/better-stack/src/plugins/blog/schemas.cjs +17 -17
- package/dist/packages/better-stack/src/plugins/cms/api/plugin.cjs +457 -0
- package/dist/packages/better-stack/src/plugins/cms/api/plugin.mjs +455 -0
- package/dist/packages/better-stack/src/plugins/cms/client/components/forms/content-form.cjs +299 -0
- package/dist/packages/better-stack/src/plugins/cms/client/components/forms/content-form.mjs +297 -0
- package/dist/packages/better-stack/src/plugins/cms/client/components/forms/file-upload.cjs +118 -0
- package/dist/packages/better-stack/src/plugins/cms/client/components/forms/file-upload.mjs +116 -0
- package/dist/packages/better-stack/src/plugins/cms/client/components/loading/dashboard-skeleton.cjs +18 -0
- package/dist/packages/better-stack/src/plugins/cms/client/components/loading/dashboard-skeleton.mjs +16 -0
- package/dist/packages/better-stack/src/plugins/cms/client/components/loading/editor-skeleton.cjs +32 -0
- package/dist/packages/better-stack/src/plugins/cms/client/components/loading/editor-skeleton.mjs +30 -0
- package/dist/packages/better-stack/src/plugins/cms/client/components/loading/list-skeleton.cjs +32 -0
- package/dist/packages/better-stack/src/plugins/cms/client/components/loading/list-skeleton.mjs +30 -0
- package/dist/packages/better-stack/src/plugins/cms/client/components/pages/404-page.cjs +20 -0
- package/dist/packages/better-stack/src/plugins/cms/client/components/pages/404-page.mjs +18 -0
- package/dist/packages/better-stack/src/plugins/cms/client/components/pages/content-editor-page.cjs +46 -0
- package/dist/packages/better-stack/src/plugins/cms/client/components/pages/content-editor-page.internal.cjs +100 -0
- package/dist/packages/better-stack/src/plugins/cms/client/components/pages/content-editor-page.internal.mjs +98 -0
- package/dist/packages/better-stack/src/plugins/cms/client/components/pages/content-editor-page.mjs +44 -0
- package/dist/packages/better-stack/src/plugins/cms/client/components/pages/content-list-page.cjs +43 -0
- package/dist/packages/better-stack/src/plugins/cms/client/components/pages/content-list-page.internal.cjs +165 -0
- package/dist/packages/better-stack/src/plugins/cms/client/components/pages/content-list-page.internal.mjs +163 -0
- package/dist/packages/better-stack/src/plugins/cms/client/components/pages/content-list-page.mjs +41 -0
- package/dist/packages/better-stack/src/plugins/cms/client/components/pages/dashboard-page.cjs +39 -0
- package/dist/packages/better-stack/src/plugins/cms/client/components/pages/dashboard-page.internal.cjs +84 -0
- package/dist/packages/better-stack/src/plugins/cms/client/components/pages/dashboard-page.internal.mjs +82 -0
- package/dist/packages/better-stack/src/plugins/cms/client/components/pages/dashboard-page.mjs +37 -0
- package/dist/packages/better-stack/src/plugins/cms/client/components/shared/default-error.cjs +17 -0
- package/dist/packages/better-stack/src/plugins/cms/client/components/shared/default-error.mjs +15 -0
- package/dist/packages/better-stack/src/plugins/cms/client/components/shared/empty-state.cjs +16 -0
- package/dist/packages/better-stack/src/plugins/cms/client/components/shared/empty-state.mjs +14 -0
- package/dist/packages/better-stack/src/plugins/cms/client/components/shared/page-wrapper.cjs +27 -0
- package/dist/packages/better-stack/src/plugins/cms/client/components/shared/page-wrapper.mjs +25 -0
- package/dist/packages/better-stack/src/plugins/cms/client/hooks/cms-hooks.cjs +402 -0
- package/dist/packages/better-stack/src/plugins/cms/client/hooks/cms-hooks.mjs +390 -0
- package/dist/packages/better-stack/src/plugins/cms/client/localization/cms-common.cjs +29 -0
- package/dist/packages/better-stack/src/plugins/cms/client/localization/cms-common.mjs +27 -0
- package/dist/packages/better-stack/src/plugins/cms/client/localization/cms-dashboard.cjs +13 -0
- package/dist/packages/better-stack/src/plugins/cms/client/localization/cms-dashboard.mjs +11 -0
- package/dist/packages/better-stack/src/plugins/cms/client/localization/cms-editor.cjs +12 -0
- package/dist/packages/better-stack/src/plugins/cms/client/localization/cms-editor.mjs +10 -0
- package/dist/packages/better-stack/src/plugins/cms/client/localization/cms-list.cjs +18 -0
- package/dist/packages/better-stack/src/plugins/cms/client/localization/cms-list.mjs +16 -0
- package/dist/packages/better-stack/src/plugins/cms/client/localization/cms-toasts.cjs +12 -0
- package/dist/packages/better-stack/src/plugins/cms/client/localization/cms-toasts.mjs +10 -0
- package/dist/packages/better-stack/src/plugins/cms/client/localization/index.cjs +17 -0
- package/dist/packages/better-stack/src/plugins/cms/client/localization/index.mjs +15 -0
- package/dist/packages/better-stack/src/plugins/cms/client/plugin.cjs +275 -0
- package/dist/packages/better-stack/src/plugins/cms/client/plugin.mjs +273 -0
- package/dist/packages/better-stack/src/plugins/cms/db.cjs +76 -0
- package/dist/packages/better-stack/src/plugins/cms/db.mjs +74 -0
- package/dist/packages/better-stack/src/plugins/cms/schemas.cjs +54 -0
- package/dist/packages/better-stack/src/plugins/cms/schemas.mjs +49 -0
- package/dist/packages/better-stack/src/plugins/cms/utils.cjs +15 -0
- package/dist/packages/better-stack/src/plugins/cms/utils.mjs +9 -0
- package/dist/packages/ui/src/components/calendar.cjs +205 -0
- package/dist/packages/ui/src/components/calendar.mjs +188 -0
- package/dist/packages/ui/src/components/checkbox.cjs +34 -0
- package/dist/packages/ui/src/components/checkbox.mjs +32 -0
- package/dist/packages/ui/src/components/date-picker.cjs +41 -0
- package/dist/packages/ui/src/components/date-picker.mjs +39 -0
- package/dist/packages/ui/src/components/form.mjs +1 -1
- package/dist/packages/{better-stack/src/plugins/blog/client/components/shared → ui/src/components}/page-layout.cjs +2 -1
- package/dist/packages/{better-stack/src/plugins/blog/client/components/shared → ui/src/components}/page-layout.mjs +2 -1
- package/dist/packages/ui/src/components/page-wrapper.cjs +20 -0
- package/dist/packages/ui/src/components/page-wrapper.mjs +18 -0
- package/dist/packages/ui/src/components/popover.cjs +41 -0
- package/dist/packages/ui/src/components/popover.mjs +37 -0
- package/dist/packages/ui/src/components/radio-group.cjs +48 -0
- package/dist/packages/ui/src/components/radio-group.mjs +45 -0
- package/dist/packages/ui/src/components/separator.cjs +29 -0
- package/dist/packages/ui/src/components/separator.mjs +27 -0
- package/dist/packages/ui/src/components/table.cjs +89 -0
- package/dist/packages/ui/src/components/table.mjs +82 -0
- package/dist/packages/ui/src/components/ui/auto-form/common/label.cjs +18 -0
- package/dist/packages/ui/src/components/ui/auto-form/common/label.mjs +16 -0
- package/dist/packages/ui/src/components/ui/auto-form/common/tooltip.cjs +9 -0
- package/dist/packages/ui/src/components/ui/auto-form/common/tooltip.mjs +7 -0
- package/dist/packages/ui/src/components/ui/auto-form/config.cjs +42 -0
- package/dist/packages/ui/src/components/ui/auto-form/config.mjs +39 -0
- package/dist/packages/ui/src/components/ui/auto-form/dependencies.cjs +48 -0
- package/dist/packages/ui/src/components/ui/auto-form/dependencies.mjs +46 -0
- package/dist/packages/ui/src/components/ui/auto-form/fields/array.cjs +103 -0
- package/dist/packages/ui/src/components/ui/auto-form/fields/array.mjs +87 -0
- package/dist/packages/ui/src/components/ui/auto-form/fields/checkbox.cjs +38 -0
- package/dist/packages/ui/src/components/ui/auto-form/fields/checkbox.mjs +36 -0
- package/dist/packages/ui/src/components/ui/auto-form/fields/date.cjs +37 -0
- package/dist/packages/ui/src/components/ui/auto-form/fields/date.mjs +35 -0
- package/dist/packages/ui/src/components/ui/auto-form/fields/enum.cjs +73 -0
- package/dist/packages/ui/src/components/ui/auto-form/fields/enum.mjs +71 -0
- package/dist/packages/ui/src/components/ui/auto-form/fields/file.cjs +63 -0
- package/dist/packages/ui/src/components/ui/auto-form/fields/file.mjs +61 -0
- package/dist/packages/ui/src/components/ui/auto-form/fields/input.cjs +32 -0
- package/dist/packages/ui/src/components/ui/auto-form/fields/input.mjs +30 -0
- package/dist/packages/ui/src/components/ui/auto-form/fields/number.cjs +31 -0
- package/dist/packages/ui/src/components/ui/auto-form/fields/number.mjs +29 -0
- package/dist/packages/ui/src/components/ui/auto-form/fields/object.cjs +149 -0
- package/dist/packages/ui/src/components/ui/auto-form/fields/object.mjs +133 -0
- package/dist/packages/ui/src/components/ui/auto-form/fields/radio-group.cjs +67 -0
- package/dist/packages/ui/src/components/ui/auto-form/fields/radio-group.mjs +65 -0
- package/dist/packages/ui/src/components/ui/auto-form/fields/switch.cjs +38 -0
- package/dist/packages/ui/src/components/ui/auto-form/fields/switch.mjs +36 -0
- package/dist/packages/ui/src/components/ui/auto-form/fields/textarea.cjs +31 -0
- package/dist/packages/ui/src/components/ui/auto-form/fields/textarea.mjs +29 -0
- package/dist/packages/ui/src/components/ui/auto-form/index.cjs +87 -0
- package/dist/packages/ui/src/components/ui/auto-form/index.mjs +78 -0
- package/dist/packages/ui/src/components/ui/auto-form/types.cjs +11 -0
- package/dist/packages/ui/src/components/ui/auto-form/types.mjs +9 -0
- package/dist/packages/ui/src/components/ui/auto-form/utils.cjs +179 -0
- package/dist/packages/ui/src/components/ui/auto-form/utils.mjs +169 -0
- package/dist/packages/{better-stack/src/plugins/blog/client/components/shared → ui/src/hooks}/use-route-lifecycle.cjs +8 -9
- package/dist/packages/{better-stack/src/plugins/blog/client/components/shared → ui/src/hooks}/use-route-lifecycle.mjs +1 -2
- package/dist/plugins/ai-chat/api/index.d.cts +1 -1
- package/dist/plugins/ai-chat/api/index.d.mts +1 -1
- package/dist/plugins/ai-chat/api/index.d.ts +1 -1
- package/dist/plugins/ai-chat/client/hooks/index.d.cts +1 -1
- package/dist/plugins/ai-chat/client/hooks/index.d.mts +1 -1
- package/dist/plugins/ai-chat/client/hooks/index.d.ts +1 -1
- package/dist/plugins/ai-chat/query-keys.d.cts +56 -250
- package/dist/plugins/ai-chat/query-keys.d.mts +56 -250
- package/dist/plugins/ai-chat/query-keys.d.ts +56 -250
- package/dist/plugins/blog/api/index.d.cts +1 -1
- package/dist/plugins/blog/api/index.d.mts +1 -1
- package/dist/plugins/blog/api/index.d.ts +1 -1
- package/dist/plugins/blog/client/hooks/index.d.cts +2 -2
- package/dist/plugins/blog/client/hooks/index.d.mts +2 -2
- package/dist/plugins/blog/client/hooks/index.d.ts +2 -2
- package/dist/plugins/blog/client/index.d.cts +1 -1
- package/dist/plugins/blog/client/index.d.mts +1 -1
- package/dist/plugins/blog/client/index.d.ts +1 -1
- package/dist/plugins/blog/query-keys.d.cts +103 -363
- package/dist/plugins/blog/query-keys.d.mts +103 -363
- package/dist/plugins/blog/query-keys.d.ts +103 -363
- package/dist/plugins/cms/api/index.cjs +7 -0
- package/dist/plugins/cms/api/index.d.cts +101 -0
- package/dist/plugins/cms/api/index.d.mts +101 -0
- package/dist/plugins/cms/api/index.d.ts +101 -0
- package/dist/plugins/cms/api/index.mjs +1 -0
- package/dist/plugins/cms/client/components/index.cjs +14 -0
- package/dist/plugins/cms/client/components/index.d.cts +20 -0
- package/dist/plugins/cms/client/components/index.d.mts +20 -0
- package/dist/plugins/cms/client/components/index.d.ts +20 -0
- package/dist/plugins/cms/client/components/index.mjs +10 -0
- package/dist/plugins/cms/client/hooks/index.cjs +17 -0
- package/dist/plugins/cms/client/hooks/index.d.cts +203 -0
- package/dist/plugins/cms/client/hooks/index.d.mts +203 -0
- package/dist/plugins/cms/client/hooks/index.d.ts +203 -0
- package/dist/plugins/cms/client/hooks/index.mjs +1 -0
- package/dist/plugins/cms/client/index.cjs +9 -0
- package/dist/plugins/cms/client/index.d.cts +409 -0
- package/dist/plugins/cms/client/index.d.mts +409 -0
- package/dist/plugins/cms/client/index.d.ts +409 -0
- package/dist/plugins/cms/client/index.mjs +2 -0
- package/dist/plugins/cms/client.css +2 -0
- package/dist/plugins/cms/query-keys.cjs +137 -0
- package/dist/plugins/cms/query-keys.d.cts +79 -0
- package/dist/plugins/cms/query-keys.d.mts +79 -0
- package/dist/plugins/cms/query-keys.d.ts +79 -0
- package/dist/plugins/cms/query-keys.mjs +135 -0
- package/dist/plugins/cms/style.css +19 -0
- package/dist/shared/stack.BwkyFwF8.d.cts +135 -0
- package/dist/shared/stack.DBqxCs0V.d.mts +135 -0
- package/dist/shared/stack.DwnJA87a.d.ts +135 -0
- package/dist/shared/stack.NZJogTUn.d.cts +66 -0
- package/dist/shared/stack.NZJogTUn.d.mts +66 -0
- package/dist/shared/stack.NZJogTUn.d.ts +66 -0
- package/package.json +58 -5
- package/src/plugins/ai-chat/client/components/chat-interface.tsx +15 -0
- package/src/plugins/ai-chat/client/components/chat-sidebar.tsx +4 -1
- package/src/plugins/blog/api/plugin.ts +29 -2
- package/src/plugins/blog/client/components/loading/form-page-skeleton.tsx +1 -1
- package/src/plugins/blog/client/components/loading/list-page-skeleton.tsx +1 -1
- package/src/plugins/blog/client/components/loading/post-page-skeleton.tsx +1 -1
- package/src/plugins/blog/client/components/pages/edit-post-page.internal.tsx +4 -3
- package/src/plugins/blog/client/components/pages/home-page.internal.tsx +4 -2
- package/src/plugins/blog/client/components/pages/new-post-page.internal.tsx +4 -3
- package/src/plugins/blog/client/components/pages/post-page.internal.tsx +4 -2
- package/src/plugins/blog/client/components/pages/tag-page.internal.tsx +4 -2
- package/src/plugins/blog/client/components/shared/page-wrapper.tsx +9 -9
- package/src/plugins/blog/client/plugin.tsx +10 -9
- package/src/plugins/cms/__tests__/schema-roundtrip.test.ts +611 -0
- package/src/plugins/cms/api/index.ts +1 -0
- package/src/plugins/cms/api/plugin.ts +611 -0
- package/src/plugins/cms/client/components/forms/content-form.tsx +477 -0
- package/src/plugins/cms/client/components/forms/file-upload.tsx +164 -0
- package/src/plugins/cms/client/components/index.tsx +10 -0
- package/src/plugins/cms/client/components/loading/dashboard-skeleton.tsx +22 -0
- package/src/plugins/cms/client/components/loading/editor-skeleton.tsx +35 -0
- package/src/plugins/cms/client/components/loading/index.tsx +3 -0
- package/src/plugins/cms/client/components/loading/list-skeleton.tsx +38 -0
- package/src/plugins/cms/client/components/pages/404-page.tsx +27 -0
- package/src/plugins/cms/client/components/pages/content-editor-page.internal.tsx +139 -0
- package/src/plugins/cms/client/components/pages/content-editor-page.tsx +50 -0
- package/src/plugins/cms/client/components/pages/content-list-page.internal.tsx +213 -0
- package/src/plugins/cms/client/components/pages/content-list-page.tsx +45 -0
- package/src/plugins/cms/client/components/pages/dashboard-page.internal.tsx +111 -0
- package/src/plugins/cms/client/components/pages/dashboard-page.tsx +37 -0
- package/src/plugins/cms/client/components/shared/default-error.tsx +30 -0
- package/src/plugins/cms/client/components/shared/empty-state.tsx +26 -0
- package/src/plugins/cms/client/components/shared/page-wrapper.tsx +32 -0
- package/src/plugins/cms/client/components/shared/pagination.tsx +72 -0
- package/src/plugins/cms/client/hooks/cms-hooks.tsx +724 -0
- package/src/plugins/cms/client/hooks/index.tsx +1 -0
- package/src/plugins/cms/client/index.ts +13 -0
- package/src/plugins/cms/client/localization/cms-common.ts +29 -0
- package/src/plugins/cms/client/localization/cms-dashboard.ts +10 -0
- package/src/plugins/cms/client/localization/cms-editor.ts +8 -0
- package/src/plugins/cms/client/localization/cms-list.ts +14 -0
- package/src/plugins/cms/client/localization/cms-toasts.ts +8 -0
- package/src/plugins/cms/client/localization/index.ts +15 -0
- package/src/plugins/cms/client/overrides.ts +166 -0
- package/src/plugins/cms/client/plugin.tsx +494 -0
- package/src/plugins/cms/client.css +2 -0
- package/src/plugins/cms/db.ts +76 -0
- package/src/plugins/cms/query-keys.ts +186 -0
- package/src/plugins/cms/schemas.ts +81 -0
- package/src/plugins/cms/style.css +19 -0
- package/src/plugins/cms/types.ts +220 -0
- package/src/plugins/cms/utils.ts +11 -0
- package/src/plugins/blog/client/components/shared/page-layout.tsx +0 -23
- package/src/plugins/blog/client/components/shared/use-route-lifecycle.tsx +0 -68
- package/dist/shared/{stack.CcI4sYJP.d.cts → stack.DLhzx1-D.d.cts} +1 -1
- package/dist/shared/{stack.CcI4sYJP.d.mts → stack.DLhzx1-D.d.mts} +1 -1
- package/dist/shared/{stack.CcI4sYJP.d.ts → stack.DLhzx1-D.d.ts} +1 -1
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Returns all the dates to display in the calendar.
|
|
5
|
+
*
|
|
6
|
+
* This function calculates the range of dates to display based on the provided
|
|
7
|
+
* display months, constraints, and calendar configuration.
|
|
8
|
+
*
|
|
9
|
+
* @param displayMonths The months to display in the calendar.
|
|
10
|
+
* @param maxDate The maximum date to include in the range.
|
|
11
|
+
* @param props The DayPicker props, including calendar configuration options.
|
|
12
|
+
* @param dateLib The date library to use for date manipulation.
|
|
13
|
+
* @returns An array of dates to display in the calendar.
|
|
14
|
+
*/
|
|
15
|
+
function getDates(displayMonths, maxDate, props, dateLib) {
|
|
16
|
+
const firstMonth = displayMonths[0];
|
|
17
|
+
const lastMonth = displayMonths[displayMonths.length - 1];
|
|
18
|
+
const { ISOWeek, fixedWeeks, broadcastCalendar } = props ?? {};
|
|
19
|
+
const { addDays, differenceInCalendarDays, differenceInCalendarMonths, endOfBroadcastWeek, endOfISOWeek, endOfMonth, endOfWeek, isAfter, startOfBroadcastWeek, startOfISOWeek, startOfWeek, } = dateLib;
|
|
20
|
+
const startWeekFirstDate = broadcastCalendar
|
|
21
|
+
? startOfBroadcastWeek(firstMonth, dateLib)
|
|
22
|
+
: ISOWeek
|
|
23
|
+
? startOfISOWeek(firstMonth)
|
|
24
|
+
: startOfWeek(firstMonth);
|
|
25
|
+
const displayMonthsWeekEnd = broadcastCalendar
|
|
26
|
+
? endOfBroadcastWeek(lastMonth)
|
|
27
|
+
: ISOWeek
|
|
28
|
+
? endOfISOWeek(endOfMonth(lastMonth))
|
|
29
|
+
: endOfWeek(endOfMonth(lastMonth));
|
|
30
|
+
// If maxDate is set, clamp the grid to the end of that week.
|
|
31
|
+
const constraintWeekEnd = maxDate &&
|
|
32
|
+
(broadcastCalendar
|
|
33
|
+
? endOfBroadcastWeek(maxDate)
|
|
34
|
+
: ISOWeek
|
|
35
|
+
? endOfISOWeek(maxDate)
|
|
36
|
+
: endOfWeek(maxDate));
|
|
37
|
+
// Pick the earliest week end between the displayed months and the constraint.
|
|
38
|
+
const gridEndDate = constraintWeekEnd && isAfter(displayMonthsWeekEnd, constraintWeekEnd)
|
|
39
|
+
? constraintWeekEnd
|
|
40
|
+
: displayMonthsWeekEnd;
|
|
41
|
+
const nOfDays = differenceInCalendarDays(gridEndDate, startWeekFirstDate);
|
|
42
|
+
const nOfMonths = differenceInCalendarMonths(lastMonth, firstMonth) + 1;
|
|
43
|
+
const dates = [];
|
|
44
|
+
for (let i = 0; i <= nOfDays; i++) {
|
|
45
|
+
const date = addDays(startWeekFirstDate, i);
|
|
46
|
+
dates.push(date);
|
|
47
|
+
}
|
|
48
|
+
// If fixed weeks is enabled, add the extra dates to the array
|
|
49
|
+
const nrOfDaysWithFixedWeeks = broadcastCalendar ? 35 : 42;
|
|
50
|
+
const extraDates = nrOfDaysWithFixedWeeks * nOfMonths;
|
|
51
|
+
if (fixedWeeks && dates.length < extraDates) {
|
|
52
|
+
const daysToAdd = extraDates - dates.length;
|
|
53
|
+
for (let i = 0; i < daysToAdd; i++) {
|
|
54
|
+
const date = addDays(dates[dates.length - 1], 1);
|
|
55
|
+
dates.push(date);
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
return dates;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
exports.getDates = getDates;
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Returns all the dates to display in the calendar.
|
|
3
|
+
*
|
|
4
|
+
* This function calculates the range of dates to display based on the provided
|
|
5
|
+
* display months, constraints, and calendar configuration.
|
|
6
|
+
*
|
|
7
|
+
* @param displayMonths The months to display in the calendar.
|
|
8
|
+
* @param maxDate The maximum date to include in the range.
|
|
9
|
+
* @param props The DayPicker props, including calendar configuration options.
|
|
10
|
+
* @param dateLib The date library to use for date manipulation.
|
|
11
|
+
* @returns An array of dates to display in the calendar.
|
|
12
|
+
*/
|
|
13
|
+
function getDates(displayMonths, maxDate, props, dateLib) {
|
|
14
|
+
const firstMonth = displayMonths[0];
|
|
15
|
+
const lastMonth = displayMonths[displayMonths.length - 1];
|
|
16
|
+
const { ISOWeek, fixedWeeks, broadcastCalendar } = props ?? {};
|
|
17
|
+
const { addDays, differenceInCalendarDays, differenceInCalendarMonths, endOfBroadcastWeek, endOfISOWeek, endOfMonth, endOfWeek, isAfter, startOfBroadcastWeek, startOfISOWeek, startOfWeek, } = dateLib;
|
|
18
|
+
const startWeekFirstDate = broadcastCalendar
|
|
19
|
+
? startOfBroadcastWeek(firstMonth, dateLib)
|
|
20
|
+
: ISOWeek
|
|
21
|
+
? startOfISOWeek(firstMonth)
|
|
22
|
+
: startOfWeek(firstMonth);
|
|
23
|
+
const displayMonthsWeekEnd = broadcastCalendar
|
|
24
|
+
? endOfBroadcastWeek(lastMonth)
|
|
25
|
+
: ISOWeek
|
|
26
|
+
? endOfISOWeek(endOfMonth(lastMonth))
|
|
27
|
+
: endOfWeek(endOfMonth(lastMonth));
|
|
28
|
+
// If maxDate is set, clamp the grid to the end of that week.
|
|
29
|
+
const constraintWeekEnd = maxDate &&
|
|
30
|
+
(broadcastCalendar
|
|
31
|
+
? endOfBroadcastWeek(maxDate)
|
|
32
|
+
: ISOWeek
|
|
33
|
+
? endOfISOWeek(maxDate)
|
|
34
|
+
: endOfWeek(maxDate));
|
|
35
|
+
// Pick the earliest week end between the displayed months and the constraint.
|
|
36
|
+
const gridEndDate = constraintWeekEnd && isAfter(displayMonthsWeekEnd, constraintWeekEnd)
|
|
37
|
+
? constraintWeekEnd
|
|
38
|
+
: displayMonthsWeekEnd;
|
|
39
|
+
const nOfDays = differenceInCalendarDays(gridEndDate, startWeekFirstDate);
|
|
40
|
+
const nOfMonths = differenceInCalendarMonths(lastMonth, firstMonth) + 1;
|
|
41
|
+
const dates = [];
|
|
42
|
+
for (let i = 0; i <= nOfDays; i++) {
|
|
43
|
+
const date = addDays(startWeekFirstDate, i);
|
|
44
|
+
dates.push(date);
|
|
45
|
+
}
|
|
46
|
+
// If fixed weeks is enabled, add the extra dates to the array
|
|
47
|
+
const nrOfDaysWithFixedWeeks = broadcastCalendar ? 35 : 42;
|
|
48
|
+
const extraDates = nrOfDaysWithFixedWeeks * nOfMonths;
|
|
49
|
+
if (fixedWeeks && dates.length < extraDates) {
|
|
50
|
+
const daysToAdd = extraDates - dates.length;
|
|
51
|
+
for (let i = 0; i < daysToAdd; i++) {
|
|
52
|
+
const date = addDays(dates[dates.length - 1], 1);
|
|
53
|
+
dates.push(date);
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
return dates;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
export { getDates };
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Returns all the days belonging to the calendar by merging the days in the
|
|
5
|
+
* weeks for each month.
|
|
6
|
+
*
|
|
7
|
+
* @param calendarMonths The array of calendar months.
|
|
8
|
+
* @returns An array of `CalendarDay` objects representing all the days in the
|
|
9
|
+
* calendar.
|
|
10
|
+
*/
|
|
11
|
+
function getDays(calendarMonths) {
|
|
12
|
+
const initialDays = [];
|
|
13
|
+
return calendarMonths.reduce((days, month) => {
|
|
14
|
+
const weekDays = month.weeks.reduce((weekDays, week) => {
|
|
15
|
+
return weekDays.concat(week.days.slice());
|
|
16
|
+
}, initialDays.slice());
|
|
17
|
+
return days.concat(weekDays.slice());
|
|
18
|
+
}, initialDays.slice());
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
exports.getDays = getDays;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Returns all the days belonging to the calendar by merging the days in the
|
|
3
|
+
* weeks for each month.
|
|
4
|
+
*
|
|
5
|
+
* @param calendarMonths The array of calendar months.
|
|
6
|
+
* @returns An array of `CalendarDay` objects representing all the days in the
|
|
7
|
+
* calendar.
|
|
8
|
+
*/
|
|
9
|
+
function getDays(calendarMonths) {
|
|
10
|
+
const initialDays = [];
|
|
11
|
+
return calendarMonths.reduce((days, month) => {
|
|
12
|
+
const weekDays = month.weeks.reduce((weekDays, week) => {
|
|
13
|
+
return weekDays.concat(week.days.slice());
|
|
14
|
+
}, initialDays.slice());
|
|
15
|
+
return days.concat(weekDays.slice());
|
|
16
|
+
}, initialDays.slice());
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export { getDays };
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
const UI = require('../UI.cjs');
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Returns the default class names for the UI elements.
|
|
7
|
+
*
|
|
8
|
+
* This function generates a mapping of default class names for various UI
|
|
9
|
+
* elements, day flags, selection states, and animations.
|
|
10
|
+
*
|
|
11
|
+
* @returns An object containing the default class names.
|
|
12
|
+
* @group Utilities
|
|
13
|
+
*/
|
|
14
|
+
function getDefaultClassNames() {
|
|
15
|
+
const classNames = {};
|
|
16
|
+
for (const key in UI.UI) {
|
|
17
|
+
classNames[UI.UI[key]] =
|
|
18
|
+
`rdp-${UI.UI[key]}`;
|
|
19
|
+
}
|
|
20
|
+
for (const key in UI.DayFlag) {
|
|
21
|
+
classNames[UI.DayFlag[key]] =
|
|
22
|
+
`rdp-${UI.DayFlag[key]}`;
|
|
23
|
+
}
|
|
24
|
+
for (const key in UI.SelectionState) {
|
|
25
|
+
classNames[UI.SelectionState[key]] =
|
|
26
|
+
`rdp-${UI.SelectionState[key]}`;
|
|
27
|
+
}
|
|
28
|
+
for (const key in UI.Animation) {
|
|
29
|
+
classNames[UI.Animation[key]] =
|
|
30
|
+
`rdp-${UI.Animation[key]}`;
|
|
31
|
+
}
|
|
32
|
+
return classNames;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
exports.getDefaultClassNames = getDefaultClassNames;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { UI, DayFlag, SelectionState, Animation } from '../UI.mjs';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Returns the default class names for the UI elements.
|
|
5
|
+
*
|
|
6
|
+
* This function generates a mapping of default class names for various UI
|
|
7
|
+
* elements, day flags, selection states, and animations.
|
|
8
|
+
*
|
|
9
|
+
* @returns An object containing the default class names.
|
|
10
|
+
* @group Utilities
|
|
11
|
+
*/
|
|
12
|
+
function getDefaultClassNames() {
|
|
13
|
+
const classNames = {};
|
|
14
|
+
for (const key in UI) {
|
|
15
|
+
classNames[UI[key]] =
|
|
16
|
+
`rdp-${UI[key]}`;
|
|
17
|
+
}
|
|
18
|
+
for (const key in DayFlag) {
|
|
19
|
+
classNames[DayFlag[key]] =
|
|
20
|
+
`rdp-${DayFlag[key]}`;
|
|
21
|
+
}
|
|
22
|
+
for (const key in SelectionState) {
|
|
23
|
+
classNames[SelectionState[key]] =
|
|
24
|
+
`rdp-${SelectionState[key]}`;
|
|
25
|
+
}
|
|
26
|
+
for (const key in Animation) {
|
|
27
|
+
classNames[Animation[key]] =
|
|
28
|
+
`rdp-${Animation[key]}`;
|
|
29
|
+
}
|
|
30
|
+
return classNames;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
export { getDefaultClassNames };
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Returns the months to display in the calendar.
|
|
5
|
+
*
|
|
6
|
+
* @param firstDisplayedMonth The first month currently displayed in the
|
|
7
|
+
* calendar.
|
|
8
|
+
* @param calendarEndMonth The latest month the user can navigate to.
|
|
9
|
+
* @param props The DayPicker props, including `numberOfMonths`.
|
|
10
|
+
* @param dateLib The date library to use for date manipulation.
|
|
11
|
+
* @returns An array of dates representing the months to display.
|
|
12
|
+
*/
|
|
13
|
+
function getDisplayMonths(firstDisplayedMonth, calendarEndMonth, props, dateLib) {
|
|
14
|
+
const { numberOfMonths = 1 } = props;
|
|
15
|
+
const months = [];
|
|
16
|
+
for (let i = 0; i < numberOfMonths; i++) {
|
|
17
|
+
const month = dateLib.addMonths(firstDisplayedMonth, i);
|
|
18
|
+
if (calendarEndMonth && month > calendarEndMonth) {
|
|
19
|
+
break;
|
|
20
|
+
}
|
|
21
|
+
months.push(month);
|
|
22
|
+
}
|
|
23
|
+
return months;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
exports.getDisplayMonths = getDisplayMonths;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Returns the months to display in the calendar.
|
|
3
|
+
*
|
|
4
|
+
* @param firstDisplayedMonth The first month currently displayed in the
|
|
5
|
+
* calendar.
|
|
6
|
+
* @param calendarEndMonth The latest month the user can navigate to.
|
|
7
|
+
* @param props The DayPicker props, including `numberOfMonths`.
|
|
8
|
+
* @param dateLib The date library to use for date manipulation.
|
|
9
|
+
* @returns An array of dates representing the months to display.
|
|
10
|
+
*/
|
|
11
|
+
function getDisplayMonths(firstDisplayedMonth, calendarEndMonth, props, dateLib) {
|
|
12
|
+
const { numberOfMonths = 1 } = props;
|
|
13
|
+
const months = [];
|
|
14
|
+
for (let i = 0; i < numberOfMonths; i++) {
|
|
15
|
+
const month = dateLib.addMonths(firstDisplayedMonth, i);
|
|
16
|
+
if (calendarEndMonth && month > calendarEndMonth) {
|
|
17
|
+
break;
|
|
18
|
+
}
|
|
19
|
+
months.push(month);
|
|
20
|
+
}
|
|
21
|
+
return months;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export { getDisplayMonths };
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Calculates the next date that should be focused in the calendar.
|
|
5
|
+
*
|
|
6
|
+
* This function determines the next focusable date based on the movement
|
|
7
|
+
* direction, constraints, and calendar configuration.
|
|
8
|
+
*
|
|
9
|
+
* @param moveBy The unit of movement (e.g., "day", "week").
|
|
10
|
+
* @param moveDir The direction of movement ("before" or "after").
|
|
11
|
+
* @param refDate The reference date from which to calculate the next focusable
|
|
12
|
+
* date.
|
|
13
|
+
* @param navStart The earliest date the user can navigate to.
|
|
14
|
+
* @param navEnd The latest date the user can navigate to.
|
|
15
|
+
* @param props The DayPicker props, including calendar configuration options.
|
|
16
|
+
* @param dateLib The date library to use for date manipulation.
|
|
17
|
+
* @returns The next focusable date.
|
|
18
|
+
*/
|
|
19
|
+
function getFocusableDate(moveBy, moveDir, refDate, navStart, navEnd, props, dateLib) {
|
|
20
|
+
const { ISOWeek, broadcastCalendar } = props;
|
|
21
|
+
const { addDays, addMonths, addWeeks, addYears, endOfBroadcastWeek, endOfISOWeek, endOfWeek, max, min, startOfBroadcastWeek, startOfISOWeek, startOfWeek, } = dateLib;
|
|
22
|
+
const moveFns = {
|
|
23
|
+
day: addDays,
|
|
24
|
+
week: addWeeks,
|
|
25
|
+
month: addMonths,
|
|
26
|
+
year: addYears,
|
|
27
|
+
startOfWeek: (date) => broadcastCalendar
|
|
28
|
+
? startOfBroadcastWeek(date, dateLib)
|
|
29
|
+
: ISOWeek
|
|
30
|
+
? startOfISOWeek(date)
|
|
31
|
+
: startOfWeek(date),
|
|
32
|
+
endOfWeek: (date) => broadcastCalendar
|
|
33
|
+
? endOfBroadcastWeek(date)
|
|
34
|
+
: ISOWeek
|
|
35
|
+
? endOfISOWeek(date)
|
|
36
|
+
: endOfWeek(date),
|
|
37
|
+
};
|
|
38
|
+
let focusableDate = moveFns[moveBy](refDate, moveDir === "after" ? 1 : -1);
|
|
39
|
+
if (moveDir === "before" && navStart) {
|
|
40
|
+
focusableDate = max([navStart, focusableDate]);
|
|
41
|
+
}
|
|
42
|
+
else if (moveDir === "after" && navEnd) {
|
|
43
|
+
focusableDate = min([navEnd, focusableDate]);
|
|
44
|
+
}
|
|
45
|
+
return focusableDate;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
exports.getFocusableDate = getFocusableDate;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Calculates the next date that should be focused in the calendar.
|
|
3
|
+
*
|
|
4
|
+
* This function determines the next focusable date based on the movement
|
|
5
|
+
* direction, constraints, and calendar configuration.
|
|
6
|
+
*
|
|
7
|
+
* @param moveBy The unit of movement (e.g., "day", "week").
|
|
8
|
+
* @param moveDir The direction of movement ("before" or "after").
|
|
9
|
+
* @param refDate The reference date from which to calculate the next focusable
|
|
10
|
+
* date.
|
|
11
|
+
* @param navStart The earliest date the user can navigate to.
|
|
12
|
+
* @param navEnd The latest date the user can navigate to.
|
|
13
|
+
* @param props The DayPicker props, including calendar configuration options.
|
|
14
|
+
* @param dateLib The date library to use for date manipulation.
|
|
15
|
+
* @returns The next focusable date.
|
|
16
|
+
*/
|
|
17
|
+
function getFocusableDate(moveBy, moveDir, refDate, navStart, navEnd, props, dateLib) {
|
|
18
|
+
const { ISOWeek, broadcastCalendar } = props;
|
|
19
|
+
const { addDays, addMonths, addWeeks, addYears, endOfBroadcastWeek, endOfISOWeek, endOfWeek, max, min, startOfBroadcastWeek, startOfISOWeek, startOfWeek, } = dateLib;
|
|
20
|
+
const moveFns = {
|
|
21
|
+
day: addDays,
|
|
22
|
+
week: addWeeks,
|
|
23
|
+
month: addMonths,
|
|
24
|
+
year: addYears,
|
|
25
|
+
startOfWeek: (date) => broadcastCalendar
|
|
26
|
+
? startOfBroadcastWeek(date, dateLib)
|
|
27
|
+
: ISOWeek
|
|
28
|
+
? startOfISOWeek(date)
|
|
29
|
+
: startOfWeek(date),
|
|
30
|
+
endOfWeek: (date) => broadcastCalendar
|
|
31
|
+
? endOfBroadcastWeek(date)
|
|
32
|
+
: ISOWeek
|
|
33
|
+
? endOfISOWeek(date)
|
|
34
|
+
: endOfWeek(date),
|
|
35
|
+
};
|
|
36
|
+
let focusableDate = moveFns[moveBy](refDate, moveDir === "after" ? 1 : -1);
|
|
37
|
+
if (moveDir === "before" && navStart) {
|
|
38
|
+
focusableDate = max([navStart, focusableDate]);
|
|
39
|
+
}
|
|
40
|
+
else if (moveDir === "after" && navEnd) {
|
|
41
|
+
focusableDate = min([navEnd, focusableDate]);
|
|
42
|
+
}
|
|
43
|
+
return focusableDate;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
export { getFocusableDate };
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
const index = require('../formatters/index.cjs');
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Merges custom formatters from the props with the default formatters.
|
|
7
|
+
*
|
|
8
|
+
* @param customFormatters The custom formatters provided in the DayPicker
|
|
9
|
+
* props.
|
|
10
|
+
* @returns The merged formatters object.
|
|
11
|
+
*/
|
|
12
|
+
function getFormatters(customFormatters) {
|
|
13
|
+
if (customFormatters?.formatMonthCaption && !customFormatters.formatCaption) {
|
|
14
|
+
customFormatters.formatCaption = customFormatters.formatMonthCaption;
|
|
15
|
+
}
|
|
16
|
+
if (customFormatters?.formatYearCaption &&
|
|
17
|
+
!customFormatters.formatYearDropdown) {
|
|
18
|
+
customFormatters.formatYearDropdown = customFormatters.formatYearCaption;
|
|
19
|
+
}
|
|
20
|
+
return {
|
|
21
|
+
...index,
|
|
22
|
+
...customFormatters,
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
exports.getFormatters = getFormatters;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import * as index from '../formatters/index.mjs';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Merges custom formatters from the props with the default formatters.
|
|
5
|
+
*
|
|
6
|
+
* @param customFormatters The custom formatters provided in the DayPicker
|
|
7
|
+
* props.
|
|
8
|
+
* @returns The merged formatters object.
|
|
9
|
+
*/
|
|
10
|
+
function getFormatters(customFormatters) {
|
|
11
|
+
if (customFormatters?.formatMonthCaption && !customFormatters.formatCaption) {
|
|
12
|
+
customFormatters.formatCaption = customFormatters.formatMonthCaption;
|
|
13
|
+
}
|
|
14
|
+
if (customFormatters?.formatYearCaption &&
|
|
15
|
+
!customFormatters.formatYearDropdown) {
|
|
16
|
+
customFormatters.formatYearDropdown = customFormatters.formatYearCaption;
|
|
17
|
+
}
|
|
18
|
+
return {
|
|
19
|
+
...index,
|
|
20
|
+
...customFormatters,
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export { getFormatters };
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Determines the initial month to display in the calendar based on the provided
|
|
5
|
+
* props.
|
|
6
|
+
*
|
|
7
|
+
* This function calculates the starting month, considering constraints such as
|
|
8
|
+
* `startMonth`, `endMonth`, and the number of months to display.
|
|
9
|
+
*
|
|
10
|
+
* @param props The DayPicker props, including navigation and date constraints.
|
|
11
|
+
* @param dateLib The date library to use for date manipulation.
|
|
12
|
+
* @returns The initial month to display.
|
|
13
|
+
*/
|
|
14
|
+
function getInitialMonth(props, navStart, navEnd, dateLib) {
|
|
15
|
+
const { month, defaultMonth, today = dateLib.today(), numberOfMonths = 1, } = props;
|
|
16
|
+
let initialMonth = month || defaultMonth || today;
|
|
17
|
+
const { differenceInCalendarMonths, addMonths, startOfMonth } = dateLib;
|
|
18
|
+
if (navEnd &&
|
|
19
|
+
differenceInCalendarMonths(navEnd, initialMonth) < numberOfMonths - 1) {
|
|
20
|
+
const offset = -1 * (numberOfMonths - 1);
|
|
21
|
+
initialMonth = addMonths(navEnd, offset);
|
|
22
|
+
}
|
|
23
|
+
if (navStart && differenceInCalendarMonths(initialMonth, navStart) < 0) {
|
|
24
|
+
initialMonth = navStart;
|
|
25
|
+
}
|
|
26
|
+
return startOfMonth(initialMonth);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
exports.getInitialMonth = getInitialMonth;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Determines the initial month to display in the calendar based on the provided
|
|
3
|
+
* props.
|
|
4
|
+
*
|
|
5
|
+
* This function calculates the starting month, considering constraints such as
|
|
6
|
+
* `startMonth`, `endMonth`, and the number of months to display.
|
|
7
|
+
*
|
|
8
|
+
* @param props The DayPicker props, including navigation and date constraints.
|
|
9
|
+
* @param dateLib The date library to use for date manipulation.
|
|
10
|
+
* @returns The initial month to display.
|
|
11
|
+
*/
|
|
12
|
+
function getInitialMonth(props, navStart, navEnd, dateLib) {
|
|
13
|
+
const { month, defaultMonth, today = dateLib.today(), numberOfMonths = 1, } = props;
|
|
14
|
+
let initialMonth = month || defaultMonth || today;
|
|
15
|
+
const { differenceInCalendarMonths, addMonths, startOfMonth } = dateLib;
|
|
16
|
+
if (navEnd &&
|
|
17
|
+
differenceInCalendarMonths(navEnd, initialMonth) < numberOfMonths - 1) {
|
|
18
|
+
const offset = -1 * (numberOfMonths - 1);
|
|
19
|
+
initialMonth = addMonths(navEnd, offset);
|
|
20
|
+
}
|
|
21
|
+
if (navStart && differenceInCalendarMonths(initialMonth, navStart) < 0) {
|
|
22
|
+
initialMonth = navStart;
|
|
23
|
+
}
|
|
24
|
+
return startOfMonth(initialMonth);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export { getInitialMonth };
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
const index = require('../labels/index.cjs');
|
|
4
|
+
const labelWeekday = require('../labels/labelWeekday.cjs');
|
|
5
|
+
const labelWeekNumberHeader = require('../labels/labelWeekNumberHeader.cjs');
|
|
6
|
+
const labelNav = require('../labels/labelNav.cjs');
|
|
7
|
+
const labelGridcell = require('../labels/labelGridcell.cjs');
|
|
8
|
+
const labelGrid = require('../labels/labelGrid.cjs');
|
|
9
|
+
const labelYearDropdown = require('../labels/labelYearDropdown.cjs');
|
|
10
|
+
const labelWeekNumber = require('../labels/labelWeekNumber.cjs');
|
|
11
|
+
const labelPrevious = require('../labels/labelPrevious.cjs');
|
|
12
|
+
const labelNext = require('../labels/labelNext.cjs');
|
|
13
|
+
const labelMonthDropdown = require('../labels/labelMonthDropdown.cjs');
|
|
14
|
+
const labelDayButton = require('../labels/labelDayButton.cjs');
|
|
15
|
+
|
|
16
|
+
const resolveLabel = (defaultLabel, customLabel, localeLabel) => {
|
|
17
|
+
if (customLabel)
|
|
18
|
+
return customLabel;
|
|
19
|
+
if (localeLabel) {
|
|
20
|
+
return (typeof localeLabel === "function"
|
|
21
|
+
? localeLabel
|
|
22
|
+
: (..._args) => localeLabel);
|
|
23
|
+
}
|
|
24
|
+
return defaultLabel;
|
|
25
|
+
};
|
|
26
|
+
/**
|
|
27
|
+
* Merges custom labels from the props with the default labels.
|
|
28
|
+
*
|
|
29
|
+
* When available, uses the locale-provided translation for `labelNext`.
|
|
30
|
+
*
|
|
31
|
+
* @param customLabels The custom labels provided in the DayPicker props.
|
|
32
|
+
* @param options Options from the date library, used to resolve locale
|
|
33
|
+
* translations.
|
|
34
|
+
* @returns The merged labels object with locale-aware defaults.
|
|
35
|
+
*/
|
|
36
|
+
function getLabels(customLabels, options) {
|
|
37
|
+
const localeLabels = options.locale?.labels ?? {};
|
|
38
|
+
return {
|
|
39
|
+
...index,
|
|
40
|
+
...(customLabels ?? {}),
|
|
41
|
+
labelDayButton: resolveLabel(labelDayButton.labelDayButton, customLabels?.labelDayButton, localeLabels.labelDayButton),
|
|
42
|
+
labelMonthDropdown: resolveLabel(labelMonthDropdown.labelMonthDropdown, customLabels?.labelMonthDropdown, localeLabels.labelMonthDropdown),
|
|
43
|
+
labelNext: resolveLabel(labelNext.labelNext, customLabels?.labelNext, localeLabels.labelNext),
|
|
44
|
+
labelPrevious: resolveLabel(labelPrevious.labelPrevious, customLabels?.labelPrevious, localeLabels.labelPrevious),
|
|
45
|
+
labelWeekNumber: resolveLabel(labelWeekNumber.labelWeekNumber, customLabels?.labelWeekNumber, localeLabels.labelWeekNumber),
|
|
46
|
+
labelYearDropdown: resolveLabel(labelYearDropdown.labelYearDropdown, customLabels?.labelYearDropdown, localeLabels.labelYearDropdown),
|
|
47
|
+
labelGrid: resolveLabel(labelGrid.labelGrid, customLabels?.labelGrid, localeLabels.labelGrid),
|
|
48
|
+
labelGridcell: resolveLabel(labelGridcell.labelGridcell, customLabels?.labelGridcell, localeLabels.labelGridcell),
|
|
49
|
+
labelNav: resolveLabel(labelNav.labelNav, customLabels?.labelNav, localeLabels.labelNav),
|
|
50
|
+
labelWeekNumberHeader: resolveLabel(labelWeekNumberHeader.labelWeekNumberHeader, customLabels?.labelWeekNumberHeader, localeLabels.labelWeekNumberHeader),
|
|
51
|
+
labelWeekday: resolveLabel(labelWeekday.labelWeekday, customLabels?.labelWeekday, localeLabels.labelWeekday),
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
exports.getLabels = getLabels;
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import * as index from '../labels/index.mjs';
|
|
2
|
+
import { labelWeekday } from '../labels/labelWeekday.mjs';
|
|
3
|
+
import { labelWeekNumberHeader } from '../labels/labelWeekNumberHeader.mjs';
|
|
4
|
+
import { labelNav } from '../labels/labelNav.mjs';
|
|
5
|
+
import { labelGridcell } from '../labels/labelGridcell.mjs';
|
|
6
|
+
import { labelGrid } from '../labels/labelGrid.mjs';
|
|
7
|
+
import { labelYearDropdown } from '../labels/labelYearDropdown.mjs';
|
|
8
|
+
import { labelWeekNumber } from '../labels/labelWeekNumber.mjs';
|
|
9
|
+
import { labelPrevious } from '../labels/labelPrevious.mjs';
|
|
10
|
+
import { labelNext } from '../labels/labelNext.mjs';
|
|
11
|
+
import { labelMonthDropdown } from '../labels/labelMonthDropdown.mjs';
|
|
12
|
+
import { labelDayButton } from '../labels/labelDayButton.mjs';
|
|
13
|
+
|
|
14
|
+
const resolveLabel = (defaultLabel, customLabel, localeLabel) => {
|
|
15
|
+
if (customLabel)
|
|
16
|
+
return customLabel;
|
|
17
|
+
if (localeLabel) {
|
|
18
|
+
return (typeof localeLabel === "function"
|
|
19
|
+
? localeLabel
|
|
20
|
+
: (..._args) => localeLabel);
|
|
21
|
+
}
|
|
22
|
+
return defaultLabel;
|
|
23
|
+
};
|
|
24
|
+
/**
|
|
25
|
+
* Merges custom labels from the props with the default labels.
|
|
26
|
+
*
|
|
27
|
+
* When available, uses the locale-provided translation for `labelNext`.
|
|
28
|
+
*
|
|
29
|
+
* @param customLabels The custom labels provided in the DayPicker props.
|
|
30
|
+
* @param options Options from the date library, used to resolve locale
|
|
31
|
+
* translations.
|
|
32
|
+
* @returns The merged labels object with locale-aware defaults.
|
|
33
|
+
*/
|
|
34
|
+
function getLabels(customLabels, options) {
|
|
35
|
+
const localeLabels = options.locale?.labels ?? {};
|
|
36
|
+
return {
|
|
37
|
+
...index,
|
|
38
|
+
...(customLabels ?? {}),
|
|
39
|
+
labelDayButton: resolveLabel(labelDayButton, customLabels?.labelDayButton, localeLabels.labelDayButton),
|
|
40
|
+
labelMonthDropdown: resolveLabel(labelMonthDropdown, customLabels?.labelMonthDropdown, localeLabels.labelMonthDropdown),
|
|
41
|
+
labelNext: resolveLabel(labelNext, customLabels?.labelNext, localeLabels.labelNext),
|
|
42
|
+
labelPrevious: resolveLabel(labelPrevious, customLabels?.labelPrevious, localeLabels.labelPrevious),
|
|
43
|
+
labelWeekNumber: resolveLabel(labelWeekNumber, customLabels?.labelWeekNumber, localeLabels.labelWeekNumber),
|
|
44
|
+
labelYearDropdown: resolveLabel(labelYearDropdown, customLabels?.labelYearDropdown, localeLabels.labelYearDropdown),
|
|
45
|
+
labelGrid: resolveLabel(labelGrid, customLabels?.labelGrid, localeLabels.labelGrid),
|
|
46
|
+
labelGridcell: resolveLabel(labelGridcell, customLabels?.labelGridcell, localeLabels.labelGridcell),
|
|
47
|
+
labelNav: resolveLabel(labelNav, customLabels?.labelNav, localeLabels.labelNav),
|
|
48
|
+
labelWeekNumberHeader: resolveLabel(labelWeekNumberHeader, customLabels?.labelWeekNumberHeader, localeLabels.labelWeekNumberHeader),
|
|
49
|
+
labelWeekday: resolveLabel(labelWeekday, customLabels?.labelWeekday, localeLabels.labelWeekday),
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
export { getLabels };
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Returns the months to show in the dropdown.
|
|
5
|
+
*
|
|
6
|
+
* This function generates a list of months for the current year, formatted
|
|
7
|
+
* using the provided formatter, and determines whether each month should be
|
|
8
|
+
* disabled based on the navigation range.
|
|
9
|
+
*
|
|
10
|
+
* @param displayMonth The currently displayed month.
|
|
11
|
+
* @param navStart The start date for navigation.
|
|
12
|
+
* @param navEnd The end date for navigation.
|
|
13
|
+
* @param formatters The formatters to use for formatting the month labels.
|
|
14
|
+
* @param dateLib The date library to use for date manipulation.
|
|
15
|
+
* @returns An array of dropdown options representing the months, or `undefined`
|
|
16
|
+
* if no months are available.
|
|
17
|
+
*/
|
|
18
|
+
function getMonthOptions(displayMonth, navStart, navEnd, formatters, dateLib) {
|
|
19
|
+
const { startOfMonth, startOfYear, endOfYear, eachMonthOfInterval, getMonth, } = dateLib;
|
|
20
|
+
const months = eachMonthOfInterval({
|
|
21
|
+
start: startOfYear(displayMonth),
|
|
22
|
+
end: endOfYear(displayMonth),
|
|
23
|
+
});
|
|
24
|
+
const options = months.map((month) => {
|
|
25
|
+
const label = formatters.formatMonthDropdown(month, dateLib);
|
|
26
|
+
const value = getMonth(month);
|
|
27
|
+
const disabled = (navStart && month < startOfMonth(navStart)) ||
|
|
28
|
+
(navEnd && month > startOfMonth(navEnd)) ||
|
|
29
|
+
false;
|
|
30
|
+
return { value, label, disabled };
|
|
31
|
+
});
|
|
32
|
+
return options;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
exports.getMonthOptions = getMonthOptions;
|