@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,21 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
const formatCaption = require('./formatCaption.cjs');
|
|
4
|
+
const formatDay = require('./formatDay.cjs');
|
|
5
|
+
const formatMonthDropdown = require('./formatMonthDropdown.cjs');
|
|
6
|
+
const formatWeekdayName = require('./formatWeekdayName.cjs');
|
|
7
|
+
const formatWeekNumber = require('./formatWeekNumber.cjs');
|
|
8
|
+
const formatWeekNumberHeader = require('./formatWeekNumberHeader.cjs');
|
|
9
|
+
const formatYearDropdown = require('./formatYearDropdown.cjs');
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
exports.formatCaption = formatCaption.formatCaption;
|
|
14
|
+
exports.formatMonthCaption = formatCaption.formatMonthCaption;
|
|
15
|
+
exports.formatDay = formatDay.formatDay;
|
|
16
|
+
exports.formatMonthDropdown = formatMonthDropdown.formatMonthDropdown;
|
|
17
|
+
exports.formatWeekdayName = formatWeekdayName.formatWeekdayName;
|
|
18
|
+
exports.formatWeekNumber = formatWeekNumber.formatWeekNumber;
|
|
19
|
+
exports.formatWeekNumberHeader = formatWeekNumberHeader.formatWeekNumberHeader;
|
|
20
|
+
exports.formatYearCaption = formatYearDropdown.formatYearCaption;
|
|
21
|
+
exports.formatYearDropdown = formatYearDropdown.formatYearDropdown;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export { formatCaption, formatMonthCaption } from './formatCaption.mjs';
|
|
2
|
+
export { formatDay } from './formatDay.mjs';
|
|
3
|
+
export { formatMonthDropdown } from './formatMonthDropdown.mjs';
|
|
4
|
+
export { formatWeekdayName } from './formatWeekdayName.mjs';
|
|
5
|
+
export { formatWeekNumber } from './formatWeekNumber.mjs';
|
|
6
|
+
export { formatWeekNumberHeader } from './formatWeekNumberHeader.mjs';
|
|
7
|
+
export { formatYearCaption, formatYearDropdown } from './formatYearDropdown.mjs';
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
const UI = require('../UI.cjs');
|
|
4
|
+
|
|
5
|
+
var FocusTargetPriority;
|
|
6
|
+
(function (FocusTargetPriority) {
|
|
7
|
+
FocusTargetPriority[FocusTargetPriority["Today"] = 0] = "Today";
|
|
8
|
+
FocusTargetPriority[FocusTargetPriority["Selected"] = 1] = "Selected";
|
|
9
|
+
FocusTargetPriority[FocusTargetPriority["LastFocused"] = 2] = "LastFocused";
|
|
10
|
+
FocusTargetPriority[FocusTargetPriority["FocusedModifier"] = 3] = "FocusedModifier";
|
|
11
|
+
})(FocusTargetPriority || (FocusTargetPriority = {}));
|
|
12
|
+
/**
|
|
13
|
+
* Determines if a day is focusable based on its modifiers.
|
|
14
|
+
*
|
|
15
|
+
* A day is considered focusable if it is not disabled, hidden, or outside the
|
|
16
|
+
* displayed month.
|
|
17
|
+
*
|
|
18
|
+
* @param modifiers The modifiers applied to the day.
|
|
19
|
+
* @returns `true` if the day is focusable, otherwise `false`.
|
|
20
|
+
*/
|
|
21
|
+
function isFocusableDay(modifiers) {
|
|
22
|
+
return (!modifiers[UI.DayFlag.disabled] &&
|
|
23
|
+
!modifiers[UI.DayFlag.hidden] &&
|
|
24
|
+
!modifiers[UI.DayFlag.outside]);
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Calculates the focus target day based on priority.
|
|
28
|
+
*
|
|
29
|
+
* This function determines the day that should receive focus in the calendar,
|
|
30
|
+
* prioritizing days with specific modifiers (e.g., "focused", "today") or
|
|
31
|
+
* selection states.
|
|
32
|
+
*
|
|
33
|
+
* @param days The array of `CalendarDay` objects to evaluate.
|
|
34
|
+
* @param getModifiers A function to retrieve the modifiers for a given day.
|
|
35
|
+
* @param isSelected A function to determine if a day is selected.
|
|
36
|
+
* @param lastFocused The last focused day, if any.
|
|
37
|
+
* @returns The `CalendarDay` that should receive focus, or `undefined` if no
|
|
38
|
+
* focusable day is found.
|
|
39
|
+
*/
|
|
40
|
+
function calculateFocusTarget(days, getModifiers, isSelected, lastFocused) {
|
|
41
|
+
let focusTarget;
|
|
42
|
+
let foundFocusTargetPriority = -1;
|
|
43
|
+
for (const day of days) {
|
|
44
|
+
const modifiers = getModifiers(day);
|
|
45
|
+
if (isFocusableDay(modifiers)) {
|
|
46
|
+
if (modifiers[UI.DayFlag.focused] &&
|
|
47
|
+
foundFocusTargetPriority < FocusTargetPriority.FocusedModifier) {
|
|
48
|
+
focusTarget = day;
|
|
49
|
+
foundFocusTargetPriority = FocusTargetPriority.FocusedModifier;
|
|
50
|
+
}
|
|
51
|
+
else if (lastFocused?.isEqualTo(day) &&
|
|
52
|
+
foundFocusTargetPriority < FocusTargetPriority.LastFocused) {
|
|
53
|
+
focusTarget = day;
|
|
54
|
+
foundFocusTargetPriority = FocusTargetPriority.LastFocused;
|
|
55
|
+
}
|
|
56
|
+
else if (isSelected(day.date) &&
|
|
57
|
+
foundFocusTargetPriority < FocusTargetPriority.Selected) {
|
|
58
|
+
focusTarget = day;
|
|
59
|
+
foundFocusTargetPriority = FocusTargetPriority.Selected;
|
|
60
|
+
}
|
|
61
|
+
else if (modifiers[UI.DayFlag.today] &&
|
|
62
|
+
foundFocusTargetPriority < FocusTargetPriority.Today) {
|
|
63
|
+
focusTarget = day;
|
|
64
|
+
foundFocusTargetPriority = FocusTargetPriority.Today;
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
if (!focusTarget) {
|
|
69
|
+
// Return the first day that is focusable
|
|
70
|
+
focusTarget = days.find((day) => isFocusableDay(getModifiers(day)));
|
|
71
|
+
}
|
|
72
|
+
return focusTarget;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
exports.calculateFocusTarget = calculateFocusTarget;
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { DayFlag } from '../UI.mjs';
|
|
2
|
+
|
|
3
|
+
var FocusTargetPriority;
|
|
4
|
+
(function (FocusTargetPriority) {
|
|
5
|
+
FocusTargetPriority[FocusTargetPriority["Today"] = 0] = "Today";
|
|
6
|
+
FocusTargetPriority[FocusTargetPriority["Selected"] = 1] = "Selected";
|
|
7
|
+
FocusTargetPriority[FocusTargetPriority["LastFocused"] = 2] = "LastFocused";
|
|
8
|
+
FocusTargetPriority[FocusTargetPriority["FocusedModifier"] = 3] = "FocusedModifier";
|
|
9
|
+
})(FocusTargetPriority || (FocusTargetPriority = {}));
|
|
10
|
+
/**
|
|
11
|
+
* Determines if a day is focusable based on its modifiers.
|
|
12
|
+
*
|
|
13
|
+
* A day is considered focusable if it is not disabled, hidden, or outside the
|
|
14
|
+
* displayed month.
|
|
15
|
+
*
|
|
16
|
+
* @param modifiers The modifiers applied to the day.
|
|
17
|
+
* @returns `true` if the day is focusable, otherwise `false`.
|
|
18
|
+
*/
|
|
19
|
+
function isFocusableDay(modifiers) {
|
|
20
|
+
return (!modifiers[DayFlag.disabled] &&
|
|
21
|
+
!modifiers[DayFlag.hidden] &&
|
|
22
|
+
!modifiers[DayFlag.outside]);
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Calculates the focus target day based on priority.
|
|
26
|
+
*
|
|
27
|
+
* This function determines the day that should receive focus in the calendar,
|
|
28
|
+
* prioritizing days with specific modifiers (e.g., "focused", "today") or
|
|
29
|
+
* selection states.
|
|
30
|
+
*
|
|
31
|
+
* @param days The array of `CalendarDay` objects to evaluate.
|
|
32
|
+
* @param getModifiers A function to retrieve the modifiers for a given day.
|
|
33
|
+
* @param isSelected A function to determine if a day is selected.
|
|
34
|
+
* @param lastFocused The last focused day, if any.
|
|
35
|
+
* @returns The `CalendarDay` that should receive focus, or `undefined` if no
|
|
36
|
+
* focusable day is found.
|
|
37
|
+
*/
|
|
38
|
+
function calculateFocusTarget(days, getModifiers, isSelected, lastFocused) {
|
|
39
|
+
let focusTarget;
|
|
40
|
+
let foundFocusTargetPriority = -1;
|
|
41
|
+
for (const day of days) {
|
|
42
|
+
const modifiers = getModifiers(day);
|
|
43
|
+
if (isFocusableDay(modifiers)) {
|
|
44
|
+
if (modifiers[DayFlag.focused] &&
|
|
45
|
+
foundFocusTargetPriority < FocusTargetPriority.FocusedModifier) {
|
|
46
|
+
focusTarget = day;
|
|
47
|
+
foundFocusTargetPriority = FocusTargetPriority.FocusedModifier;
|
|
48
|
+
}
|
|
49
|
+
else if (lastFocused?.isEqualTo(day) &&
|
|
50
|
+
foundFocusTargetPriority < FocusTargetPriority.LastFocused) {
|
|
51
|
+
focusTarget = day;
|
|
52
|
+
foundFocusTargetPriority = FocusTargetPriority.LastFocused;
|
|
53
|
+
}
|
|
54
|
+
else if (isSelected(day.date) &&
|
|
55
|
+
foundFocusTargetPriority < FocusTargetPriority.Selected) {
|
|
56
|
+
focusTarget = day;
|
|
57
|
+
foundFocusTargetPriority = FocusTargetPriority.Selected;
|
|
58
|
+
}
|
|
59
|
+
else if (modifiers[DayFlag.today] &&
|
|
60
|
+
foundFocusTargetPriority < FocusTargetPriority.Today) {
|
|
61
|
+
focusTarget = day;
|
|
62
|
+
foundFocusTargetPriority = FocusTargetPriority.Today;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
if (!focusTarget) {
|
|
67
|
+
// Return the first day that is focusable
|
|
68
|
+
focusTarget = days.find((day) => isFocusableDay(getModifiers(day)));
|
|
69
|
+
}
|
|
70
|
+
return focusTarget;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
export { calculateFocusTarget };
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
const UI = require('../UI.cjs');
|
|
4
|
+
const dateMatchModifiers = require('../utils/dateMatchModifiers.cjs');
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Creates a function to retrieve the modifiers for a given day.
|
|
8
|
+
*
|
|
9
|
+
* This function calculates both internal and custom modifiers for each day
|
|
10
|
+
* based on the provided calendar days and DayPicker props.
|
|
11
|
+
*
|
|
12
|
+
* @private
|
|
13
|
+
* @param days The array of `CalendarDay` objects to process.
|
|
14
|
+
* @param props The DayPicker props, including modifiers and configuration
|
|
15
|
+
* options.
|
|
16
|
+
* @param dateLib The date library to use for date manipulation.
|
|
17
|
+
* @returns A function that retrieves the modifiers for a given `CalendarDay`.
|
|
18
|
+
*/
|
|
19
|
+
function createGetModifiers(days, props, navStart, navEnd, dateLib) {
|
|
20
|
+
const { disabled, hidden, modifiers, showOutsideDays, broadcastCalendar, today = dateLib.today(), } = props;
|
|
21
|
+
const { isSameDay, isSameMonth, startOfMonth, isBefore, endOfMonth, isAfter, } = dateLib;
|
|
22
|
+
const computedNavStart = navStart && startOfMonth(navStart);
|
|
23
|
+
const computedNavEnd = navEnd && endOfMonth(navEnd);
|
|
24
|
+
const internalModifiersMap = {
|
|
25
|
+
[UI.DayFlag.focused]: [],
|
|
26
|
+
[UI.DayFlag.outside]: [],
|
|
27
|
+
[UI.DayFlag.disabled]: [],
|
|
28
|
+
[UI.DayFlag.hidden]: [],
|
|
29
|
+
[UI.DayFlag.today]: [],
|
|
30
|
+
};
|
|
31
|
+
const customModifiersMap = {};
|
|
32
|
+
for (const day of days) {
|
|
33
|
+
const { date, displayMonth } = day;
|
|
34
|
+
const isOutside = Boolean(displayMonth && !isSameMonth(date, displayMonth));
|
|
35
|
+
const isBeforeNavStart = Boolean(computedNavStart && isBefore(date, computedNavStart));
|
|
36
|
+
const isAfterNavEnd = Boolean(computedNavEnd && isAfter(date, computedNavEnd));
|
|
37
|
+
const isDisabled = Boolean(disabled && dateMatchModifiers.dateMatchModifiers(date, disabled, dateLib));
|
|
38
|
+
const isHidden = Boolean(hidden && dateMatchModifiers.dateMatchModifiers(date, hidden, dateLib)) ||
|
|
39
|
+
isBeforeNavStart ||
|
|
40
|
+
isAfterNavEnd ||
|
|
41
|
+
// Broadcast calendar will show outside days as default
|
|
42
|
+
(!broadcastCalendar && !showOutsideDays && isOutside) ||
|
|
43
|
+
(broadcastCalendar && showOutsideDays === false && isOutside);
|
|
44
|
+
const isToday = isSameDay(date, today);
|
|
45
|
+
if (isOutside)
|
|
46
|
+
internalModifiersMap.outside.push(day);
|
|
47
|
+
if (isDisabled)
|
|
48
|
+
internalModifiersMap.disabled.push(day);
|
|
49
|
+
if (isHidden)
|
|
50
|
+
internalModifiersMap.hidden.push(day);
|
|
51
|
+
if (isToday)
|
|
52
|
+
internalModifiersMap.today.push(day);
|
|
53
|
+
// Add custom modifiers
|
|
54
|
+
if (modifiers) {
|
|
55
|
+
Object.keys(modifiers).forEach((name) => {
|
|
56
|
+
const modifierValue = modifiers?.[name];
|
|
57
|
+
const isMatch = modifierValue
|
|
58
|
+
? dateMatchModifiers.dateMatchModifiers(date, modifierValue, dateLib)
|
|
59
|
+
: false;
|
|
60
|
+
if (!isMatch)
|
|
61
|
+
return;
|
|
62
|
+
if (customModifiersMap[name]) {
|
|
63
|
+
customModifiersMap[name].push(day);
|
|
64
|
+
}
|
|
65
|
+
else {
|
|
66
|
+
customModifiersMap[name] = [day];
|
|
67
|
+
}
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
return (day) => {
|
|
72
|
+
// Initialize all the modifiers to false
|
|
73
|
+
const dayFlags = {
|
|
74
|
+
[UI.DayFlag.focused]: false,
|
|
75
|
+
[UI.DayFlag.disabled]: false,
|
|
76
|
+
[UI.DayFlag.hidden]: false,
|
|
77
|
+
[UI.DayFlag.outside]: false,
|
|
78
|
+
[UI.DayFlag.today]: false,
|
|
79
|
+
};
|
|
80
|
+
const customModifiers = {};
|
|
81
|
+
// Find the modifiers for the given day
|
|
82
|
+
for (const name in internalModifiersMap) {
|
|
83
|
+
const days = internalModifiersMap[name];
|
|
84
|
+
dayFlags[name] = days.some((d) => d === day);
|
|
85
|
+
}
|
|
86
|
+
for (const name in customModifiersMap) {
|
|
87
|
+
customModifiers[name] = customModifiersMap[name].some((d) => d === day);
|
|
88
|
+
}
|
|
89
|
+
return {
|
|
90
|
+
...dayFlags,
|
|
91
|
+
// custom modifiers should override all the previous ones
|
|
92
|
+
...customModifiers,
|
|
93
|
+
};
|
|
94
|
+
};
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
exports.createGetModifiers = createGetModifiers;
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import { DayFlag } from '../UI.mjs';
|
|
2
|
+
import { dateMatchModifiers } from '../utils/dateMatchModifiers.mjs';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Creates a function to retrieve the modifiers for a given day.
|
|
6
|
+
*
|
|
7
|
+
* This function calculates both internal and custom modifiers for each day
|
|
8
|
+
* based on the provided calendar days and DayPicker props.
|
|
9
|
+
*
|
|
10
|
+
* @private
|
|
11
|
+
* @param days The array of `CalendarDay` objects to process.
|
|
12
|
+
* @param props The DayPicker props, including modifiers and configuration
|
|
13
|
+
* options.
|
|
14
|
+
* @param dateLib The date library to use for date manipulation.
|
|
15
|
+
* @returns A function that retrieves the modifiers for a given `CalendarDay`.
|
|
16
|
+
*/
|
|
17
|
+
function createGetModifiers(days, props, navStart, navEnd, dateLib) {
|
|
18
|
+
const { disabled, hidden, modifiers, showOutsideDays, broadcastCalendar, today = dateLib.today(), } = props;
|
|
19
|
+
const { isSameDay, isSameMonth, startOfMonth, isBefore, endOfMonth, isAfter, } = dateLib;
|
|
20
|
+
const computedNavStart = navStart && startOfMonth(navStart);
|
|
21
|
+
const computedNavEnd = navEnd && endOfMonth(navEnd);
|
|
22
|
+
const internalModifiersMap = {
|
|
23
|
+
[DayFlag.focused]: [],
|
|
24
|
+
[DayFlag.outside]: [],
|
|
25
|
+
[DayFlag.disabled]: [],
|
|
26
|
+
[DayFlag.hidden]: [],
|
|
27
|
+
[DayFlag.today]: [],
|
|
28
|
+
};
|
|
29
|
+
const customModifiersMap = {};
|
|
30
|
+
for (const day of days) {
|
|
31
|
+
const { date, displayMonth } = day;
|
|
32
|
+
const isOutside = Boolean(displayMonth && !isSameMonth(date, displayMonth));
|
|
33
|
+
const isBeforeNavStart = Boolean(computedNavStart && isBefore(date, computedNavStart));
|
|
34
|
+
const isAfterNavEnd = Boolean(computedNavEnd && isAfter(date, computedNavEnd));
|
|
35
|
+
const isDisabled = Boolean(disabled && dateMatchModifiers(date, disabled, dateLib));
|
|
36
|
+
const isHidden = Boolean(hidden && dateMatchModifiers(date, hidden, dateLib)) ||
|
|
37
|
+
isBeforeNavStart ||
|
|
38
|
+
isAfterNavEnd ||
|
|
39
|
+
// Broadcast calendar will show outside days as default
|
|
40
|
+
(!broadcastCalendar && !showOutsideDays && isOutside) ||
|
|
41
|
+
(broadcastCalendar && showOutsideDays === false && isOutside);
|
|
42
|
+
const isToday = isSameDay(date, today);
|
|
43
|
+
if (isOutside)
|
|
44
|
+
internalModifiersMap.outside.push(day);
|
|
45
|
+
if (isDisabled)
|
|
46
|
+
internalModifiersMap.disabled.push(day);
|
|
47
|
+
if (isHidden)
|
|
48
|
+
internalModifiersMap.hidden.push(day);
|
|
49
|
+
if (isToday)
|
|
50
|
+
internalModifiersMap.today.push(day);
|
|
51
|
+
// Add custom modifiers
|
|
52
|
+
if (modifiers) {
|
|
53
|
+
Object.keys(modifiers).forEach((name) => {
|
|
54
|
+
const modifierValue = modifiers?.[name];
|
|
55
|
+
const isMatch = modifierValue
|
|
56
|
+
? dateMatchModifiers(date, modifierValue, dateLib)
|
|
57
|
+
: false;
|
|
58
|
+
if (!isMatch)
|
|
59
|
+
return;
|
|
60
|
+
if (customModifiersMap[name]) {
|
|
61
|
+
customModifiersMap[name].push(day);
|
|
62
|
+
}
|
|
63
|
+
else {
|
|
64
|
+
customModifiersMap[name] = [day];
|
|
65
|
+
}
|
|
66
|
+
});
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
return (day) => {
|
|
70
|
+
// Initialize all the modifiers to false
|
|
71
|
+
const dayFlags = {
|
|
72
|
+
[DayFlag.focused]: false,
|
|
73
|
+
[DayFlag.disabled]: false,
|
|
74
|
+
[DayFlag.hidden]: false,
|
|
75
|
+
[DayFlag.outside]: false,
|
|
76
|
+
[DayFlag.today]: false,
|
|
77
|
+
};
|
|
78
|
+
const customModifiers = {};
|
|
79
|
+
// Find the modifiers for the given day
|
|
80
|
+
for (const name in internalModifiersMap) {
|
|
81
|
+
const days = internalModifiersMap[name];
|
|
82
|
+
dayFlags[name] = days.some((d) => d === day);
|
|
83
|
+
}
|
|
84
|
+
for (const name in customModifiersMap) {
|
|
85
|
+
customModifiers[name] = customModifiersMap[name].some((d) => d === day);
|
|
86
|
+
}
|
|
87
|
+
return {
|
|
88
|
+
...dayFlags,
|
|
89
|
+
// custom modifiers should override all the previous ones
|
|
90
|
+
...customModifiers,
|
|
91
|
+
};
|
|
92
|
+
};
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
export { createGetModifiers };
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
const getBroadcastWeeksInMonth = require('./getBroadcastWeeksInMonth.cjs');
|
|
4
|
+
const startOfBroadcastWeek = require('./startOfBroadcastWeek.cjs');
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Returns the end date of the week in the broadcast calendar.
|
|
8
|
+
*
|
|
9
|
+
* The broadcast week ends on the last day of the last broadcast week for the
|
|
10
|
+
* given date.
|
|
11
|
+
*
|
|
12
|
+
* @since 9.4.0
|
|
13
|
+
* @param date The date for which to calculate the end of the broadcast week.
|
|
14
|
+
* @param dateLib The date library to use for date manipulation.
|
|
15
|
+
* @returns The end date of the broadcast week.
|
|
16
|
+
*/
|
|
17
|
+
function endOfBroadcastWeek(date, dateLib) {
|
|
18
|
+
const startDate = startOfBroadcastWeek.startOfBroadcastWeek(date, dateLib);
|
|
19
|
+
const numberOfWeeks = getBroadcastWeeksInMonth.getBroadcastWeeksInMonth(date, dateLib);
|
|
20
|
+
const endDate = dateLib.addDays(startDate, numberOfWeeks * 7 - 1);
|
|
21
|
+
return endDate;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
exports.endOfBroadcastWeek = endOfBroadcastWeek;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { getBroadcastWeeksInMonth } from './getBroadcastWeeksInMonth.mjs';
|
|
2
|
+
import { startOfBroadcastWeek } from './startOfBroadcastWeek.mjs';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Returns the end date of the week in the broadcast calendar.
|
|
6
|
+
*
|
|
7
|
+
* The broadcast week ends on the last day of the last broadcast week for the
|
|
8
|
+
* given date.
|
|
9
|
+
*
|
|
10
|
+
* @since 9.4.0
|
|
11
|
+
* @param date The date for which to calculate the end of the broadcast week.
|
|
12
|
+
* @param dateLib The date library to use for date manipulation.
|
|
13
|
+
* @returns The end date of the broadcast week.
|
|
14
|
+
*/
|
|
15
|
+
function endOfBroadcastWeek(date, dateLib) {
|
|
16
|
+
const startDate = startOfBroadcastWeek(date, dateLib);
|
|
17
|
+
const numberOfWeeks = getBroadcastWeeksInMonth(date, dateLib);
|
|
18
|
+
const endDate = dateLib.addDays(startDate, numberOfWeeks * 7 - 1);
|
|
19
|
+
return endDate;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export { endOfBroadcastWeek };
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
const FIVE_WEEKS = 5;
|
|
4
|
+
const FOUR_WEEKS = 4;
|
|
5
|
+
/**
|
|
6
|
+
* Returns the number of weeks to display in the broadcast calendar for a given
|
|
7
|
+
* month.
|
|
8
|
+
*
|
|
9
|
+
* The broadcast calendar may have either 4 or 5 weeks in a month, depending on
|
|
10
|
+
* the start and end dates of the broadcast weeks.
|
|
11
|
+
*
|
|
12
|
+
* @since 9.4.0
|
|
13
|
+
* @param month The month for which to calculate the number of weeks.
|
|
14
|
+
* @param dateLib The date library to use for date manipulation.
|
|
15
|
+
* @returns The number of weeks in the broadcast calendar (4 or 5).
|
|
16
|
+
*/
|
|
17
|
+
function getBroadcastWeeksInMonth(month, dateLib) {
|
|
18
|
+
// Get the first day of the month
|
|
19
|
+
const firstDayOfMonth = dateLib.startOfMonth(month);
|
|
20
|
+
// Get the day of the week for the first day of the month (1-7, where 1 is Monday)
|
|
21
|
+
const firstDayOfWeek = firstDayOfMonth.getDay() > 0 ? firstDayOfMonth.getDay() : 7;
|
|
22
|
+
const broadcastStartDate = dateLib.addDays(month, -firstDayOfWeek + 1);
|
|
23
|
+
const lastDateOfLastWeek = dateLib.addDays(broadcastStartDate, FIVE_WEEKS * 7 - 1);
|
|
24
|
+
const numberOfWeeks = dateLib.getMonth(month) === dateLib.getMonth(lastDateOfLastWeek)
|
|
25
|
+
? FIVE_WEEKS
|
|
26
|
+
: FOUR_WEEKS;
|
|
27
|
+
return numberOfWeeks;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
exports.getBroadcastWeeksInMonth = getBroadcastWeeksInMonth;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
const FIVE_WEEKS = 5;
|
|
2
|
+
const FOUR_WEEKS = 4;
|
|
3
|
+
/**
|
|
4
|
+
* Returns the number of weeks to display in the broadcast calendar for a given
|
|
5
|
+
* month.
|
|
6
|
+
*
|
|
7
|
+
* The broadcast calendar may have either 4 or 5 weeks in a month, depending on
|
|
8
|
+
* the start and end dates of the broadcast weeks.
|
|
9
|
+
*
|
|
10
|
+
* @since 9.4.0
|
|
11
|
+
* @param month The month for which to calculate the number of weeks.
|
|
12
|
+
* @param dateLib The date library to use for date manipulation.
|
|
13
|
+
* @returns The number of weeks in the broadcast calendar (4 or 5).
|
|
14
|
+
*/
|
|
15
|
+
function getBroadcastWeeksInMonth(month, dateLib) {
|
|
16
|
+
// Get the first day of the month
|
|
17
|
+
const firstDayOfMonth = dateLib.startOfMonth(month);
|
|
18
|
+
// Get the day of the week for the first day of the month (1-7, where 1 is Monday)
|
|
19
|
+
const firstDayOfWeek = firstDayOfMonth.getDay() > 0 ? firstDayOfMonth.getDay() : 7;
|
|
20
|
+
const broadcastStartDate = dateLib.addDays(month, -firstDayOfWeek + 1);
|
|
21
|
+
const lastDateOfLastWeek = dateLib.addDays(broadcastStartDate, FIVE_WEEKS * 7 - 1);
|
|
22
|
+
const numberOfWeeks = dateLib.getMonth(month) === dateLib.getMonth(lastDateOfLastWeek)
|
|
23
|
+
? FIVE_WEEKS
|
|
24
|
+
: FOUR_WEEKS;
|
|
25
|
+
return numberOfWeeks;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export { getBroadcastWeeksInMonth };
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
const UI = require('../UI.cjs');
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Returns the class names for a day based on its modifiers.
|
|
7
|
+
*
|
|
8
|
+
* This function combines the base class name for the day with any class names
|
|
9
|
+
* associated with active modifiers.
|
|
10
|
+
*
|
|
11
|
+
* @param modifiers The modifiers applied to the day.
|
|
12
|
+
* @param classNames The base class names for the calendar elements.
|
|
13
|
+
* @param modifiersClassNames The class names associated with specific
|
|
14
|
+
* modifiers.
|
|
15
|
+
* @returns An array of class names for the day.
|
|
16
|
+
*/
|
|
17
|
+
function getClassNamesForModifiers(modifiers, classNames, modifiersClassNames = {}) {
|
|
18
|
+
const modifierClassNames = Object.entries(modifiers)
|
|
19
|
+
.filter(([, active]) => active === true)
|
|
20
|
+
.reduce((previousValue, [key]) => {
|
|
21
|
+
if (modifiersClassNames[key]) {
|
|
22
|
+
previousValue.push(modifiersClassNames[key]);
|
|
23
|
+
}
|
|
24
|
+
else if (classNames[UI.DayFlag[key]]) {
|
|
25
|
+
previousValue.push(classNames[UI.DayFlag[key]]);
|
|
26
|
+
}
|
|
27
|
+
else if (classNames[UI.SelectionState[key]]) {
|
|
28
|
+
previousValue.push(classNames[UI.SelectionState[key]]);
|
|
29
|
+
}
|
|
30
|
+
return previousValue;
|
|
31
|
+
}, [classNames[UI.UI.Day]]);
|
|
32
|
+
return modifierClassNames;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
exports.getClassNamesForModifiers = getClassNamesForModifiers;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { DayFlag, SelectionState, UI } from '../UI.mjs';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Returns the class names for a day based on its modifiers.
|
|
5
|
+
*
|
|
6
|
+
* This function combines the base class name for the day with any class names
|
|
7
|
+
* associated with active modifiers.
|
|
8
|
+
*
|
|
9
|
+
* @param modifiers The modifiers applied to the day.
|
|
10
|
+
* @param classNames The base class names for the calendar elements.
|
|
11
|
+
* @param modifiersClassNames The class names associated with specific
|
|
12
|
+
* modifiers.
|
|
13
|
+
* @returns An array of class names for the day.
|
|
14
|
+
*/
|
|
15
|
+
function getClassNamesForModifiers(modifiers, classNames, modifiersClassNames = {}) {
|
|
16
|
+
const modifierClassNames = Object.entries(modifiers)
|
|
17
|
+
.filter(([, active]) => active === true)
|
|
18
|
+
.reduce((previousValue, [key]) => {
|
|
19
|
+
if (modifiersClassNames[key]) {
|
|
20
|
+
previousValue.push(modifiersClassNames[key]);
|
|
21
|
+
}
|
|
22
|
+
else if (classNames[DayFlag[key]]) {
|
|
23
|
+
previousValue.push(classNames[DayFlag[key]]);
|
|
24
|
+
}
|
|
25
|
+
else if (classNames[SelectionState[key]]) {
|
|
26
|
+
previousValue.push(classNames[SelectionState[key]]);
|
|
27
|
+
}
|
|
28
|
+
return previousValue;
|
|
29
|
+
}, [classNames[UI.Day]]);
|
|
30
|
+
return modifierClassNames;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
export { getClassNamesForModifiers };
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
const customComponents = require('../components/custom-components.cjs');
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Merges custom components from the props with the default components.
|
|
7
|
+
*
|
|
8
|
+
* This function ensures that any custom components provided in the props
|
|
9
|
+
* override the default components.
|
|
10
|
+
*
|
|
11
|
+
* @param customComponents The custom components provided in the DayPicker
|
|
12
|
+
* props.
|
|
13
|
+
* @returns An object containing the merged components.
|
|
14
|
+
*/
|
|
15
|
+
function getComponents(customComponents$1) {
|
|
16
|
+
return {
|
|
17
|
+
...customComponents,
|
|
18
|
+
...customComponents$1,
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
exports.getComponents = getComponents;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import * as customComponents from '../components/custom-components.mjs';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Merges custom components from the props with the default components.
|
|
5
|
+
*
|
|
6
|
+
* This function ensures that any custom components provided in the props
|
|
7
|
+
* override the default components.
|
|
8
|
+
*
|
|
9
|
+
* @param customComponents The custom components provided in the DayPicker
|
|
10
|
+
* props.
|
|
11
|
+
* @returns An object containing the merged components.
|
|
12
|
+
*/
|
|
13
|
+
function getComponents(customComponents$1) {
|
|
14
|
+
return {
|
|
15
|
+
...customComponents,
|
|
16
|
+
...customComponents$1,
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export { getComponents };
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Extracts `data-` attributes from the DayPicker props.
|
|
5
|
+
*
|
|
6
|
+
* This function collects all `data-` attributes from the props and adds
|
|
7
|
+
* additional attributes based on the DayPicker configuration.
|
|
8
|
+
*
|
|
9
|
+
* @param props The DayPicker props.
|
|
10
|
+
* @returns An object containing the `data-` attributes.
|
|
11
|
+
*/
|
|
12
|
+
function getDataAttributes(props) {
|
|
13
|
+
const dataAttributes = {
|
|
14
|
+
"data-mode": props.mode ?? undefined,
|
|
15
|
+
"data-required": "required" in props ? props.required : undefined,
|
|
16
|
+
"data-multiple-months": (props.numberOfMonths && props.numberOfMonths > 1) || undefined,
|
|
17
|
+
"data-week-numbers": props.showWeekNumber || undefined,
|
|
18
|
+
"data-broadcast-calendar": props.broadcastCalendar || undefined,
|
|
19
|
+
"data-nav-layout": props.navLayout || undefined,
|
|
20
|
+
};
|
|
21
|
+
Object.entries(props).forEach(([key, val]) => {
|
|
22
|
+
if (key.startsWith("data-")) {
|
|
23
|
+
dataAttributes[key] = val;
|
|
24
|
+
}
|
|
25
|
+
});
|
|
26
|
+
return dataAttributes;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
exports.getDataAttributes = getDataAttributes;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Extracts `data-` attributes from the DayPicker props.
|
|
3
|
+
*
|
|
4
|
+
* This function collects all `data-` attributes from the props and adds
|
|
5
|
+
* additional attributes based on the DayPicker configuration.
|
|
6
|
+
*
|
|
7
|
+
* @param props The DayPicker props.
|
|
8
|
+
* @returns An object containing the `data-` attributes.
|
|
9
|
+
*/
|
|
10
|
+
function getDataAttributes(props) {
|
|
11
|
+
const dataAttributes = {
|
|
12
|
+
"data-mode": props.mode ?? undefined,
|
|
13
|
+
"data-required": "required" in props ? props.required : undefined,
|
|
14
|
+
"data-multiple-months": (props.numberOfMonths && props.numberOfMonths > 1) || undefined,
|
|
15
|
+
"data-week-numbers": props.showWeekNumber || undefined,
|
|
16
|
+
"data-broadcast-calendar": props.broadcastCalendar || undefined,
|
|
17
|
+
"data-nav-layout": props.navLayout || undefined,
|
|
18
|
+
};
|
|
19
|
+
Object.entries(props).forEach(([key, val]) => {
|
|
20
|
+
if (key.startsWith("data-")) {
|
|
21
|
+
dataAttributes[key] = val;
|
|
22
|
+
}
|
|
23
|
+
});
|
|
24
|
+
return dataAttributes;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export { getDataAttributes };
|