@rupe/v-datepicker 1.0.0-alpha.0
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/LICENSE +21 -0
- package/dist/components/Calendar/CalendarCell.d.ts +17 -0
- package/dist/components/Calendar/CalendarCell.vue.js +34 -0
- package/dist/components/Calendar/CalendarCell.vue.js.map +1 -0
- package/dist/components/Calendar/CalendarCell.vue2.js +5 -0
- package/dist/components/Calendar/CalendarCell.vue2.js.map +1 -0
- package/dist/components/Calendar/CalendarCellTrigger.d.ts +72 -0
- package/dist/components/Calendar/CalendarCellTrigger.vue.js +159 -0
- package/dist/components/Calendar/CalendarCellTrigger.vue.js.map +1 -0
- package/dist/components/Calendar/CalendarCellTrigger.vue2.js +5 -0
- package/dist/components/Calendar/CalendarCellTrigger.vue2.js.map +1 -0
- package/dist/components/Calendar/CalendarGrid.d.ts +13 -0
- package/dist/components/Calendar/CalendarGrid.vue.js +40 -0
- package/dist/components/Calendar/CalendarGrid.vue.js.map +1 -0
- package/dist/components/Calendar/CalendarGrid.vue2.js +5 -0
- package/dist/components/Calendar/CalendarGrid.vue2.js.map +1 -0
- package/dist/components/Calendar/CalendarGridBody.d.ts +13 -0
- package/dist/components/Calendar/CalendarGridBody.vue.js +25 -0
- package/dist/components/Calendar/CalendarGridBody.vue.js.map +1 -0
- package/dist/components/Calendar/CalendarGridBody.vue2.js +5 -0
- package/dist/components/Calendar/CalendarGridBody.vue2.js.map +1 -0
- package/dist/components/Calendar/CalendarGridHead.d.ts +13 -0
- package/dist/components/Calendar/CalendarGridHead.vue.js +25 -0
- package/dist/components/Calendar/CalendarGridHead.vue.js.map +1 -0
- package/dist/components/Calendar/CalendarGridHead.vue2.js +5 -0
- package/dist/components/Calendar/CalendarGridHead.vue2.js.map +1 -0
- package/dist/components/Calendar/CalendarGridRow.d.ts +13 -0
- package/dist/components/Calendar/CalendarGridRow.vue.js +25 -0
- package/dist/components/Calendar/CalendarGridRow.vue.js.map +1 -0
- package/dist/components/Calendar/CalendarGridRow.vue2.js +5 -0
- package/dist/components/Calendar/CalendarGridRow.vue2.js.map +1 -0
- package/dist/components/Calendar/CalendarHeadCell.d.ts +13 -0
- package/dist/components/Calendar/CalendarHeadCell.vue.js +25 -0
- package/dist/components/Calendar/CalendarHeadCell.vue.js.map +1 -0
- package/dist/components/Calendar/CalendarHeadCell.vue2.js +5 -0
- package/dist/components/Calendar/CalendarHeadCell.vue2.js.map +1 -0
- package/dist/components/Calendar/CalendarHeader.d.ts +13 -0
- package/dist/components/Calendar/CalendarHeader.vue.js +25 -0
- package/dist/components/Calendar/CalendarHeader.vue.js.map +1 -0
- package/dist/components/Calendar/CalendarHeader.vue2.js +5 -0
- package/dist/components/Calendar/CalendarHeader.vue2.js.map +1 -0
- package/dist/components/Calendar/CalendarHeading.d.ts +21 -0
- package/dist/components/Calendar/CalendarHeading.vue.js +33 -0
- package/dist/components/Calendar/CalendarHeading.vue.js.map +1 -0
- package/dist/components/Calendar/CalendarHeading.vue2.js +5 -0
- package/dist/components/Calendar/CalendarHeading.vue2.js.map +1 -0
- package/dist/components/Calendar/CalendarMonthHeading.d.ts +22 -0
- package/dist/components/Calendar/CalendarMonthHeading.vue.js +49 -0
- package/dist/components/Calendar/CalendarMonthHeading.vue.js.map +1 -0
- package/dist/components/Calendar/CalendarMonthHeading.vue2.js +5 -0
- package/dist/components/Calendar/CalendarMonthHeading.vue2.js.map +1 -0
- package/dist/components/Calendar/CalendarMonthYearOverlay.d.ts +27 -0
- package/dist/components/Calendar/CalendarMonthYearOverlay.vue.js +61 -0
- package/dist/components/Calendar/CalendarMonthYearOverlay.vue.js.map +1 -0
- package/dist/components/Calendar/CalendarMonthYearOverlay.vue2.js +5 -0
- package/dist/components/Calendar/CalendarMonthYearOverlay.vue2.js.map +1 -0
- package/dist/components/Calendar/CalendarNext.d.ts +21 -0
- package/dist/components/Calendar/CalendarNext.vue.js +42 -0
- package/dist/components/Calendar/CalendarNext.vue.js.map +1 -0
- package/dist/components/Calendar/CalendarNext.vue2.js +5 -0
- package/dist/components/Calendar/CalendarNext.vue2.js.map +1 -0
- package/dist/components/Calendar/CalendarOverlayItem.d.ts +24 -0
- package/dist/components/Calendar/CalendarOverlayItem.vue.js +34 -0
- package/dist/components/Calendar/CalendarOverlayItem.vue.js.map +1 -0
- package/dist/components/Calendar/CalendarOverlayItem.vue2.js +5 -0
- package/dist/components/Calendar/CalendarOverlayItem.vue2.js.map +1 -0
- package/dist/components/Calendar/CalendarPrev.d.ts +21 -0
- package/dist/components/Calendar/CalendarPrev.vue.js +42 -0
- package/dist/components/Calendar/CalendarPrev.vue.js.map +1 -0
- package/dist/components/Calendar/CalendarPrev.vue2.js +5 -0
- package/dist/components/Calendar/CalendarPrev.vue2.js.map +1 -0
- package/dist/components/Calendar/CalendarRoot.d.ts +210 -0
- package/dist/components/Calendar/CalendarRoot.vue.js +253 -0
- package/dist/components/Calendar/CalendarRoot.vue.js.map +1 -0
- package/dist/components/Calendar/CalendarRoot.vue2.js +8 -0
- package/dist/components/Calendar/CalendarRoot.vue2.js.map +1 -0
- package/dist/components/Calendar/CalendarYearHeading.d.ts +22 -0
- package/dist/components/Calendar/CalendarYearHeading.vue.js +49 -0
- package/dist/components/Calendar/CalendarYearHeading.vue.js.map +1 -0
- package/dist/components/Calendar/CalendarYearHeading.vue2.js +5 -0
- package/dist/components/Calendar/CalendarYearHeading.vue2.js.map +1 -0
- package/dist/components/Calendar/index.d.ts +15 -0
- package/dist/components/Calendar/useCalendar.d.ts +50 -0
- package/dist/components/Calendar/useCalendar.js +317 -0
- package/dist/components/Calendar/useCalendar.js.map +1 -0
- package/dist/components/ConfigProvider/ConfigProvider.d.ts +51 -0
- package/dist/components/ConfigProvider/ConfigProvider.vue.js +7 -0
- package/dist/components/ConfigProvider/ConfigProvider.vue.js.map +1 -0
- package/dist/components/ConfigProvider/index.d.ts +1 -0
- package/dist/components/DateField/DateFieldInput.d.ts +15 -0
- package/dist/components/DateField/DateFieldInput.vue.js +70 -0
- package/dist/components/DateField/DateFieldInput.vue.js.map +1 -0
- package/dist/components/DateField/DateFieldInput.vue2.js +5 -0
- package/dist/components/DateField/DateFieldInput.vue2.js.map +1 -0
- package/dist/components/DateField/DateFieldRoot.d.ts +151 -0
- package/dist/components/DateField/DateFieldRoot.vue.js +237 -0
- package/dist/components/DateField/DateFieldRoot.vue.js.map +1 -0
- package/dist/components/DateField/DateFieldRoot.vue2.js +8 -0
- package/dist/components/DateField/DateFieldRoot.vue2.js.map +1 -0
- package/dist/components/DateField/index.d.ts +2 -0
- package/dist/components/DatePicker/DatePickerAnchor.d.ts +11 -0
- package/dist/components/DatePicker/DatePickerAnchor.vue.js +29 -0
- package/dist/components/DatePicker/DatePickerAnchor.vue.js.map +1 -0
- package/dist/components/DatePicker/DatePickerAnchor.vue2.js +5 -0
- package/dist/components/DatePicker/DatePickerAnchor.vue2.js.map +1 -0
- package/dist/components/DatePicker/DatePickerArrow.d.ts +11 -0
- package/dist/components/DatePicker/DatePickerArrow.vue.js +31 -0
- package/dist/components/DatePicker/DatePickerArrow.vue.js.map +1 -0
- package/dist/components/DatePicker/DatePickerArrow.vue2.js +5 -0
- package/dist/components/DatePicker/DatePickerArrow.vue2.js.map +1 -0
- package/dist/components/DatePicker/DatePickerCalendar.d.ts +17 -0
- package/dist/components/DatePicker/DatePickerCalendar.vue.js +60 -0
- package/dist/components/DatePicker/DatePickerCalendar.vue.js.map +1 -0
- package/dist/components/DatePicker/DatePickerCalendar.vue2.js +5 -0
- package/dist/components/DatePicker/DatePickerCalendar.vue2.js.map +1 -0
- package/dist/components/DatePicker/DatePickerCell.d.ts +11 -0
- package/dist/components/DatePicker/DatePickerCell.vue.js +28 -0
- package/dist/components/DatePicker/DatePickerCell.vue.js.map +1 -0
- package/dist/components/DatePicker/DatePickerCell.vue2.js +5 -0
- package/dist/components/DatePicker/DatePickerCell.vue2.js.map +1 -0
- package/dist/components/DatePicker/DatePickerCellTrigger.d.ts +10 -0
- package/dist/components/DatePicker/DatePickerCellTrigger.vue.js +29 -0
- package/dist/components/DatePicker/DatePickerCellTrigger.vue.js.map +1 -0
- package/dist/components/DatePicker/DatePickerCellTrigger.vue2.js +5 -0
- package/dist/components/DatePicker/DatePickerCellTrigger.vue2.js.map +1 -0
- package/dist/components/DatePicker/DatePickerClose.d.ts +11 -0
- package/dist/components/DatePicker/DatePickerClose.vue.js +28 -0
- package/dist/components/DatePicker/DatePickerClose.vue.js.map +1 -0
- package/dist/components/DatePicker/DatePickerClose.vue2.js +5 -0
- package/dist/components/DatePicker/DatePickerClose.vue2.js.map +1 -0
- package/dist/components/DatePicker/DatePickerContent.d.ts +31 -0
- package/dist/components/DatePicker/DatePickerContent.vue.js +69 -0
- package/dist/components/DatePicker/DatePickerContent.vue.js.map +1 -0
- package/dist/components/DatePicker/DatePickerContent.vue2.js +5 -0
- package/dist/components/DatePicker/DatePickerContent.vue2.js.map +1 -0
- package/dist/components/DatePicker/DatePickerField.d.ts +16 -0
- package/dist/components/DatePicker/DatePickerField.vue.js +55 -0
- package/dist/components/DatePicker/DatePickerField.vue.js.map +1 -0
- package/dist/components/DatePicker/DatePickerField.vue2.js +5 -0
- package/dist/components/DatePicker/DatePickerField.vue2.js.map +1 -0
- package/dist/components/DatePicker/DatePickerGrid.d.ts +11 -0
- package/dist/components/DatePicker/DatePickerGrid.vue.js +27 -0
- package/dist/components/DatePicker/DatePickerGrid.vue.js.map +1 -0
- package/dist/components/DatePicker/DatePickerGrid.vue2.js +5 -0
- package/dist/components/DatePicker/DatePickerGrid.vue2.js.map +1 -0
- package/dist/components/DatePicker/DatePickerGridBody.d.ts +11 -0
- package/dist/components/DatePicker/DatePickerGridBody.vue.js +27 -0
- package/dist/components/DatePicker/DatePickerGridBody.vue.js.map +1 -0
- package/dist/components/DatePicker/DatePickerGridBody.vue2.js +5 -0
- package/dist/components/DatePicker/DatePickerGridBody.vue2.js.map +1 -0
- package/dist/components/DatePicker/DatePickerGridHead.d.ts +11 -0
- package/dist/components/DatePicker/DatePickerGridHead.vue.js +27 -0
- package/dist/components/DatePicker/DatePickerGridHead.vue.js.map +1 -0
- package/dist/components/DatePicker/DatePickerGridHead.vue2.js +5 -0
- package/dist/components/DatePicker/DatePickerGridHead.vue2.js.map +1 -0
- package/dist/components/DatePicker/DatePickerGridRow.d.ts +11 -0
- package/dist/components/DatePicker/DatePickerGridRow.vue.js +27 -0
- package/dist/components/DatePicker/DatePickerGridRow.vue.js.map +1 -0
- package/dist/components/DatePicker/DatePickerGridRow.vue2.js +5 -0
- package/dist/components/DatePicker/DatePickerGridRow.vue2.js.map +1 -0
- package/dist/components/DatePicker/DatePickerHeadCell.d.ts +11 -0
- package/dist/components/DatePicker/DatePickerHeadCell.vue.js +27 -0
- package/dist/components/DatePicker/DatePickerHeadCell.vue.js.map +1 -0
- package/dist/components/DatePicker/DatePickerHeadCell.vue2.js +5 -0
- package/dist/components/DatePicker/DatePickerHeadCell.vue2.js.map +1 -0
- package/dist/components/DatePicker/DatePickerHeader.d.ts +11 -0
- package/dist/components/DatePicker/DatePickerHeader.vue.js +27 -0
- package/dist/components/DatePicker/DatePickerHeader.vue.js.map +1 -0
- package/dist/components/DatePicker/DatePickerHeader.vue2.js +5 -0
- package/dist/components/DatePicker/DatePickerHeader.vue2.js.map +1 -0
- package/dist/components/DatePicker/DatePickerHeading.d.ts +19 -0
- package/dist/components/DatePicker/DatePickerHeading.vue.js +29 -0
- package/dist/components/DatePicker/DatePickerHeading.vue.js.map +1 -0
- package/dist/components/DatePicker/DatePickerHeading.vue2.js +5 -0
- package/dist/components/DatePicker/DatePickerHeading.vue2.js.map +1 -0
- package/dist/components/DatePicker/DatePickerInput.d.ts +11 -0
- package/dist/components/DatePicker/DatePickerInput.vue.js +27 -0
- package/dist/components/DatePicker/DatePickerInput.vue.js.map +1 -0
- package/dist/components/DatePicker/DatePickerInput.vue2.js +5 -0
- package/dist/components/DatePicker/DatePickerInput.vue2.js.map +1 -0
- package/dist/components/DatePicker/DatePickerMonthHeading.d.ts +13 -0
- package/dist/components/DatePicker/DatePickerMonthHeading.vue.js +27 -0
- package/dist/components/DatePicker/DatePickerMonthHeading.vue.js.map +1 -0
- package/dist/components/DatePicker/DatePickerMonthHeading.vue2.js +5 -0
- package/dist/components/DatePicker/DatePickerMonthHeading.vue2.js.map +1 -0
- package/dist/components/DatePicker/DatePickerMonthYearOverlay.d.ts +24 -0
- package/dist/components/DatePicker/DatePickerMonthYearOverlay.vue.js +30 -0
- package/dist/components/DatePicker/DatePickerMonthYearOverlay.vue.js.map +1 -0
- package/dist/components/DatePicker/DatePickerMonthYearOverlay.vue2.js +5 -0
- package/dist/components/DatePicker/DatePickerMonthYearOverlay.vue2.js.map +1 -0
- package/dist/components/DatePicker/DatePickerNext.d.ts +10 -0
- package/dist/components/DatePicker/DatePickerNext.vue.js +28 -0
- package/dist/components/DatePicker/DatePickerNext.vue.js.map +1 -0
- package/dist/components/DatePicker/DatePickerNext.vue2.js +5 -0
- package/dist/components/DatePicker/DatePickerNext.vue2.js.map +1 -0
- package/dist/components/DatePicker/DatePickerOverlayItem.d.ts +19 -0
- package/dist/components/DatePicker/DatePickerOverlayItem.vue.js +25 -0
- package/dist/components/DatePicker/DatePickerOverlayItem.vue.js.map +1 -0
- package/dist/components/DatePicker/DatePickerOverlayItem.vue2.js +5 -0
- package/dist/components/DatePicker/DatePickerOverlayItem.vue2.js.map +1 -0
- package/dist/components/DatePicker/DatePickerPrev.d.ts +10 -0
- package/dist/components/DatePicker/DatePickerPrev.vue.js +28 -0
- package/dist/components/DatePicker/DatePickerPrev.vue.js.map +1 -0
- package/dist/components/DatePicker/DatePickerPrev.vue2.js +5 -0
- package/dist/components/DatePicker/DatePickerPrev.vue2.js.map +1 -0
- package/dist/components/DatePicker/DatePickerRoot.d.ts +84 -0
- package/dist/components/DatePicker/DatePickerRoot.vue.js +169 -0
- package/dist/components/DatePicker/DatePickerRoot.vue.js.map +1 -0
- package/dist/components/DatePicker/DatePickerRoot.vue2.js +8 -0
- package/dist/components/DatePicker/DatePickerRoot.vue2.js.map +1 -0
- package/dist/components/DatePicker/DatePickerTrigger.d.ts +11 -0
- package/dist/components/DatePicker/DatePickerTrigger.vue.js +37 -0
- package/dist/components/DatePicker/DatePickerTrigger.vue.js.map +1 -0
- package/dist/components/DatePicker/DatePickerTrigger.vue2.js +5 -0
- package/dist/components/DatePicker/DatePickerTrigger.vue2.js.map +1 -0
- package/dist/components/DatePicker/DatePickerYearHeading.d.ts +13 -0
- package/dist/components/DatePicker/DatePickerYearHeading.vue.js +27 -0
- package/dist/components/DatePicker/DatePickerYearHeading.vue.js.map +1 -0
- package/dist/components/DatePicker/DatePickerYearHeading.vue2.js +5 -0
- package/dist/components/DatePicker/DatePickerYearHeading.vue2.js.map +1 -0
- package/dist/components/DatePicker/index.d.ts +24 -0
- package/dist/components/DismissableLayer/DismissableLayer.d.ts +67 -0
- package/dist/components/DismissableLayer/DismissableLayer.vue.js +118 -0
- package/dist/components/DismissableLayer/DismissableLayer.vue.js.map +1 -0
- package/dist/components/DismissableLayer/DismissableLayer.vue2.js +7 -0
- package/dist/components/DismissableLayer/DismissableLayer.vue2.js.map +1 -0
- package/dist/components/DismissableLayer/DismissableLayerBranch.d.ts +11 -0
- package/dist/components/DismissableLayer/index.d.ts +3 -0
- package/dist/components/DismissableLayer/utils.d.ts +28 -0
- package/dist/components/DismissableLayer/utils.js +112 -0
- package/dist/components/DismissableLayer/utils.js.map +1 -0
- package/dist/components/FocusScope/FocusScope.d.ts +82 -0
- package/dist/components/FocusScope/FocusScope.test.d.ts +1 -0
- package/dist/components/FocusScope/FocusScope.vue.js +149 -0
- package/dist/components/FocusScope/FocusScope.vue.js.map +1 -0
- package/dist/components/FocusScope/FocusScope.vue2.js +5 -0
- package/dist/components/FocusScope/FocusScope.vue2.js.map +1 -0
- package/dist/components/FocusScope/index.d.ts +1 -0
- package/dist/components/FocusScope/stack.d.ts +12 -0
- package/dist/components/FocusScope/stack.js +38 -0
- package/dist/components/FocusScope/stack.js.map +1 -0
- package/dist/components/FocusScope/utils.d.ts +46 -0
- package/dist/components/FocusScope/utils.js +70 -0
- package/dist/components/FocusScope/utils.js.map +1 -0
- package/dist/components/Popover/PopoverAnchor.d.ts +11 -0
- package/dist/components/Popover/PopoverAnchor.vue.js +37 -0
- package/dist/components/Popover/PopoverAnchor.vue.js.map +1 -0
- package/dist/components/Popover/PopoverAnchor.vue2.js +5 -0
- package/dist/components/Popover/PopoverAnchor.vue2.js.map +1 -0
- package/dist/components/Popover/PopoverArrow.d.ts +15 -0
- package/dist/components/Popover/PopoverArrow.vue.js +31 -0
- package/dist/components/Popover/PopoverArrow.vue.js.map +1 -0
- package/dist/components/Popover/PopoverArrow.vue2.js +5 -0
- package/dist/components/Popover/PopoverArrow.vue2.js.map +1 -0
- package/dist/components/Popover/PopoverClose.d.ts +13 -0
- package/dist/components/Popover/PopoverClose.vue.js +34 -0
- package/dist/components/Popover/PopoverClose.vue.js.map +1 -0
- package/dist/components/Popover/PopoverClose.vue2.js +5 -0
- package/dist/components/Popover/PopoverClose.vue2.js.map +1 -0
- package/dist/components/Popover/PopoverContent.d.ts +32 -0
- package/dist/components/Popover/PopoverContent.vue.js +61 -0
- package/dist/components/Popover/PopoverContent.vue.js.map +1 -0
- package/dist/components/Popover/PopoverContent.vue2.js +5 -0
- package/dist/components/Popover/PopoverContent.vue2.js.map +1 -0
- package/dist/components/Popover/PopoverContentImpl.d.ts +47 -0
- package/dist/components/Popover/PopoverContentImpl.vue.js +97 -0
- package/dist/components/Popover/PopoverContentImpl.vue.js.map +1 -0
- package/dist/components/Popover/PopoverContentImpl.vue2.js +5 -0
- package/dist/components/Popover/PopoverContentImpl.vue2.js.map +1 -0
- package/dist/components/Popover/PopoverContentNonModal.d.ts +32 -0
- package/dist/components/Popover/PopoverContentNonModal.vue.js +78 -0
- package/dist/components/Popover/PopoverContentNonModal.vue.js.map +1 -0
- package/dist/components/Popover/PopoverContentNonModal.vue2.js +5 -0
- package/dist/components/Popover/PopoverContentNonModal.vue2.js.map +1 -0
- package/dist/components/Popover/PopoverPortal.d.ts +11 -0
- package/dist/components/Popover/PopoverPortal.vue.js +26 -0
- package/dist/components/Popover/PopoverPortal.vue.js.map +1 -0
- package/dist/components/Popover/PopoverPortal.vue2.js +5 -0
- package/dist/components/Popover/PopoverPortal.vue2.js.map +1 -0
- package/dist/components/Popover/PopoverRoot.d.ts +55 -0
- package/dist/components/Popover/PopoverRoot.vue.js +55 -0
- package/dist/components/Popover/PopoverRoot.vue.js.map +1 -0
- package/dist/components/Popover/PopoverRoot.vue2.js +8 -0
- package/dist/components/Popover/PopoverRoot.vue2.js.map +1 -0
- package/dist/components/Popover/PopoverTrigger.d.ts +13 -0
- package/dist/components/Popover/PopoverTrigger.vue.js +51 -0
- package/dist/components/Popover/PopoverTrigger.vue.js.map +1 -0
- package/dist/components/Popover/PopoverTrigger.vue2.js +5 -0
- package/dist/components/Popover/PopoverTrigger.vue2.js.map +1 -0
- package/dist/components/Popover/index.d.ts +7 -0
- package/dist/components/Popper/PopperAnchor.d.ts +19 -0
- package/dist/components/Popper/PopperAnchor.vue.js +37 -0
- package/dist/components/Popper/PopperAnchor.vue.js.map +1 -0
- package/dist/components/Popper/PopperAnchor.vue2.js +5 -0
- package/dist/components/Popper/PopperAnchor.vue2.js.map +1 -0
- package/dist/components/Popper/PopperArrow.d.ts +15 -0
- package/dist/components/Popper/PopperArrow.vue.js +76 -0
- package/dist/components/Popper/PopperArrow.vue.js.map +1 -0
- package/dist/components/Popper/PopperArrow.vue2.js +5 -0
- package/dist/components/Popper/PopperArrow.vue2.js.map +1 -0
- package/dist/components/Popper/PopperContent.d.ts +179 -0
- package/dist/components/Popper/PopperContent.vue.js +9 -0
- package/dist/components/Popper/PopperContent.vue.js.map +1 -0
- package/dist/components/Popper/PopperContent.vue2.js +230 -0
- package/dist/components/Popper/PopperContent.vue2.js.map +1 -0
- package/dist/components/Popper/PopperRoot.d.ts +19 -0
- package/dist/components/Popper/PopperRoot.vue.js +25 -0
- package/dist/components/Popper/PopperRoot.vue.js.map +1 -0
- package/dist/components/Popper/PopperRoot.vue2.js +8 -0
- package/dist/components/Popper/PopperRoot.vue2.js.map +1 -0
- package/dist/components/Popper/index.d.ts +5 -0
- package/dist/components/Popper/utils.d.ts +12 -0
- package/dist/components/Popper/utils.js +46 -0
- package/dist/components/Popper/utils.js.map +1 -0
- package/dist/components/Presence/Presence.d.ts +43 -0
- package/dist/components/Presence/Presence.js +61 -0
- package/dist/components/Presence/Presence.js.map +1 -0
- package/dist/components/Presence/index.d.ts +1 -0
- package/dist/components/Presence/usePresence.d.ts +4 -0
- package/dist/components/Presence/usePresence.js +131 -0
- package/dist/components/Presence/usePresence.js.map +1 -0
- package/dist/components/Primitive/Primitive.d.ts +39 -0
- package/dist/components/Primitive/Primitive.js +29 -0
- package/dist/components/Primitive/Primitive.js.map +1 -0
- package/dist/components/Primitive/Slot.d.ts +5 -0
- package/dist/components/Primitive/Slot.js +30 -0
- package/dist/components/Primitive/Slot.js.map +1 -0
- package/dist/components/Primitive/index.d.ts +3 -0
- package/dist/components/Primitive/usePrimitiveElement.d.ts +5 -0
- package/dist/components/Primitive/usePrimitiveElement.js +14 -0
- package/dist/components/Primitive/usePrimitiveElement.js.map +1 -0
- package/dist/components/Teleport/Teleport.d.ts +37 -0
- package/dist/components/Teleport/Teleport.vue.js +28 -0
- package/dist/components/Teleport/Teleport.vue.js.map +1 -0
- package/dist/components/Teleport/Teleport.vue2.js +5 -0
- package/dist/components/Teleport/Teleport.vue2.js.map +1 -0
- package/dist/components/Teleport/index.d.ts +1 -0
- package/dist/components/VisuallyHidden/VisuallyHidden.d.ts +16 -0
- package/dist/components/VisuallyHidden/VisuallyHidden.vue.js +49 -0
- package/dist/components/VisuallyHidden/VisuallyHidden.vue.js.map +1 -0
- package/dist/components/VisuallyHidden/VisuallyHidden.vue2.js +5 -0
- package/dist/components/VisuallyHidden/VisuallyHidden.vue2.js.map +1 -0
- package/dist/components/VisuallyHidden/VisuallyHiddenInput.d.ts +14 -0
- package/dist/components/VisuallyHidden/VisuallyHiddenInputBubble.d.ts +22 -0
- package/dist/components/VisuallyHidden/index.d.ts +2 -0
- package/dist/date/calendar.d.ts +59 -0
- package/dist/date/calendar.js +90 -0
- package/dist/date/calendar.js.map +1 -0
- package/dist/date/comparators.d.ts +80 -0
- package/dist/date/comparators.js +61 -0
- package/dist/date/comparators.js.map +1 -0
- package/dist/date/index.d.ts +3 -0
- package/dist/date/types.d.ts +28 -0
- package/dist/date/utils.d.ts +12 -0
- package/dist/date/utils.js +10 -0
- package/dist/date/utils.js.map +1 -0
- package/dist/index.cjs +9097 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.ts +27 -0
- package/dist/index.js +54 -0
- package/dist/index.js.map +1 -0
- package/dist/node_modules/.pnpm/@floating-ui_core@1.7.3/node_modules/@floating-ui/core/dist/floating-ui.core.js +722 -0
- package/dist/node_modules/.pnpm/@floating-ui_core@1.7.3/node_modules/@floating-ui/core/dist/floating-ui.core.js.map +1 -0
- package/dist/node_modules/.pnpm/@floating-ui_dom@1.7.4/node_modules/@floating-ui/dom/dist/floating-ui.dom.js +626 -0
- package/dist/node_modules/.pnpm/@floating-ui_dom@1.7.4/node_modules/@floating-ui/dom/dist/floating-ui.dom.js.map +1 -0
- package/dist/node_modules/.pnpm/@floating-ui_utils@0.2.10/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.js +174 -0
- package/dist/node_modules/.pnpm/@floating-ui_utils@0.2.10/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.js.map +1 -0
- package/dist/node_modules/.pnpm/@floating-ui_utils@0.2.10/node_modules/@floating-ui/utils/dist/floating-ui.utils.js +155 -0
- package/dist/node_modules/.pnpm/@floating-ui_utils@0.2.10/node_modules/@floating-ui/utils/dist/floating-ui.utils.js.map +1 -0
- package/dist/node_modules/.pnpm/@floating-ui_vue@1.1.9_vue@3.5.26_typescript@5.9.3_/node_modules/@floating-ui/vue/dist/floating-ui.vue.js +180 -0
- package/dist/node_modules/.pnpm/@floating-ui_vue@1.1.9_vue@3.5.26_typescript@5.9.3_/node_modules/@floating-ui/vue/dist/floating-ui.vue.js.map +1 -0
- package/dist/node_modules/.pnpm/@internationalized_date@3.10.1/node_modules/@internationalized/date/dist/BuddhistCalendar.js +34 -0
- package/dist/node_modules/.pnpm/@internationalized_date@3.10.1/node_modules/@internationalized/date/dist/BuddhistCalendar.js.map +1 -0
- package/dist/node_modules/.pnpm/@internationalized_date@3.10.1/node_modules/@internationalized/date/dist/CalendarDate.js +213 -0
- package/dist/node_modules/.pnpm/@internationalized_date@3.10.1/node_modules/@internationalized/date/dist/CalendarDate.js.map +1 -0
- package/dist/node_modules/.pnpm/@internationalized_date@3.10.1/node_modules/@internationalized/date/dist/DateFormatter.js +116 -0
- package/dist/node_modules/.pnpm/@internationalized_date@3.10.1/node_modules/@internationalized/date/dist/DateFormatter.js.map +1 -0
- package/dist/node_modules/.pnpm/@internationalized_date@3.10.1/node_modules/@internationalized/date/dist/EthiopicCalendar.js +129 -0
- package/dist/node_modules/.pnpm/@internationalized_date@3.10.1/node_modules/@internationalized/date/dist/EthiopicCalendar.js.map +1 -0
- package/dist/node_modules/.pnpm/@internationalized_date@3.10.1/node_modules/@internationalized/date/dist/GregorianCalendar.js +123 -0
- package/dist/node_modules/.pnpm/@internationalized_date@3.10.1/node_modules/@internationalized/date/dist/GregorianCalendar.js.map +1 -0
- package/dist/node_modules/.pnpm/@internationalized_date@3.10.1/node_modules/@internationalized/date/dist/HebrewCalendar.js +114 -0
- package/dist/node_modules/.pnpm/@internationalized_date@3.10.1/node_modules/@internationalized/date/dist/HebrewCalendar.js.map +1 -0
- package/dist/node_modules/.pnpm/@internationalized_date@3.10.1/node_modules/@internationalized/date/dist/IndianCalendar.js +77 -0
- package/dist/node_modules/.pnpm/@internationalized_date@3.10.1/node_modules/@internationalized/date/dist/IndianCalendar.js.map +1 -0
- package/dist/node_modules/.pnpm/@internationalized_date@3.10.1/node_modules/@internationalized/date/dist/IslamicCalendar.js +141 -0
- package/dist/node_modules/.pnpm/@internationalized_date@3.10.1/node_modules/@internationalized/date/dist/IslamicCalendar.js.map +1 -0
- package/dist/node_modules/.pnpm/@internationalized_date@3.10.1/node_modules/@internationalized/date/dist/JapaneseCalendar.js +155 -0
- package/dist/node_modules/.pnpm/@internationalized_date@3.10.1/node_modules/@internationalized/date/dist/JapaneseCalendar.js.map +1 -0
- package/dist/node_modules/.pnpm/@internationalized_date@3.10.1/node_modules/@internationalized/date/dist/PersianCalendar.js +59 -0
- package/dist/node_modules/.pnpm/@internationalized_date@3.10.1/node_modules/@internationalized/date/dist/PersianCalendar.js.map +1 -0
- package/dist/node_modules/.pnpm/@internationalized_date@3.10.1/node_modules/@internationalized/date/dist/TaiwanCalendar.js +59 -0
- package/dist/node_modules/.pnpm/@internationalized_date@3.10.1/node_modules/@internationalized/date/dist/TaiwanCalendar.js.map +1 -0
- package/dist/node_modules/.pnpm/@internationalized_date@3.10.1/node_modules/@internationalized/date/dist/conversion.js +170 -0
- package/dist/node_modules/.pnpm/@internationalized_date@3.10.1/node_modules/@internationalized/date/dist/conversion.js.map +1 -0
- package/dist/node_modules/.pnpm/@internationalized_date@3.10.1/node_modules/@internationalized/date/dist/createCalendar.js +44 -0
- package/dist/node_modules/.pnpm/@internationalized_date@3.10.1/node_modules/@internationalized/date/dist/createCalendar.js.map +1 -0
- package/dist/node_modules/.pnpm/@internationalized_date@3.10.1/node_modules/@internationalized/date/dist/manipulation.js +301 -0
- package/dist/node_modules/.pnpm/@internationalized_date@3.10.1/node_modules/@internationalized/date/dist/manipulation.js.map +1 -0
- package/dist/node_modules/.pnpm/@internationalized_date@3.10.1/node_modules/@internationalized/date/dist/queries.js +141 -0
- package/dist/node_modules/.pnpm/@internationalized_date@3.10.1/node_modules/@internationalized/date/dist/queries.js.map +1 -0
- package/dist/node_modules/.pnpm/@internationalized_date@3.10.1/node_modules/@internationalized/date/dist/string.js +35 -0
- package/dist/node_modules/.pnpm/@internationalized_date@3.10.1/node_modules/@internationalized/date/dist/string.js.map +1 -0
- package/dist/node_modules/.pnpm/@internationalized_date@3.10.1/node_modules/@internationalized/date/dist/utils.js +7 -0
- package/dist/node_modules/.pnpm/@internationalized_date@3.10.1/node_modules/@internationalized/date/dist/utils.js.map +1 -0
- package/dist/node_modules/.pnpm/@internationalized_date@3.10.1/node_modules/@internationalized/date/dist/weekStartData.js +101 -0
- package/dist/node_modules/.pnpm/@internationalized_date@3.10.1/node_modules/@internationalized/date/dist/weekStartData.js.map +1 -0
- package/dist/node_modules/.pnpm/@swc_helpers@0.5.18/node_modules/@swc/helpers/esm/_check_private_redeclaration.js +9 -0
- package/dist/node_modules/.pnpm/@swc_helpers@0.5.18/node_modules/@swc/helpers/esm/_check_private_redeclaration.js.map +1 -0
- package/dist/node_modules/.pnpm/@swc_helpers@0.5.18/node_modules/@swc/helpers/esm/_class_private_field_init.js +9 -0
- package/dist/node_modules/.pnpm/@swc_helpers@0.5.18/node_modules/@swc/helpers/esm/_class_private_field_init.js.map +1 -0
- package/dist/node_modules/.pnpm/@vueuse_core@14.1.0_vue@3.5.26_typescript@5.9.3_/node_modules/@vueuse/core/dist/index.js +140 -0
- package/dist/node_modules/.pnpm/@vueuse_core@14.1.0_vue@3.5.26_typescript@5.9.3_/node_modules/@vueuse/core/dist/index.js.map +1 -0
- package/dist/node_modules/.pnpm/@vueuse_shared@14.1.0_vue@3.5.26_typescript@5.9.3_/node_modules/@vueuse/shared/dist/index.js +88 -0
- package/dist/node_modules/.pnpm/@vueuse_shared@14.1.0_vue@3.5.26_typescript@5.9.3_/node_modules/@vueuse/shared/dist/index.js.map +1 -0
- package/dist/node_modules/.pnpm/defu@6.1.4/node_modules/defu/dist/defu.js +60 -0
- package/dist/node_modules/.pnpm/defu@6.1.4/node_modules/defu/dist/defu.js.map +1 -0
- package/dist/shared/arrays.d.ts +37 -0
- package/dist/shared/component/Arrow.d.ts +34 -0
- package/dist/shared/component/Arrow.vue.js +45 -0
- package/dist/shared/component/Arrow.vue.js.map +1 -0
- package/dist/shared/component/Arrow.vue2.js +5 -0
- package/dist/shared/component/Arrow.vue2.js.map +1 -0
- package/dist/shared/component/BaseSeparator.d.ts +26 -0
- package/dist/shared/component/index.d.ts +2 -0
- package/dist/shared/constant/countryList.d.ts +1 -0
- package/dist/shared/constant/index.d.ts +1 -0
- package/dist/shared/createContext.d.ts +8 -0
- package/dist/shared/createContext.js +26 -0
- package/dist/shared/createContext.js.map +1 -0
- package/dist/shared/date/comparators.d.ts +27 -0
- package/dist/shared/date/comparators.js +27 -0
- package/dist/shared/date/comparators.js.map +1 -0
- package/dist/shared/date/index.d.ts +8 -0
- package/dist/shared/date/parser.d.ts +37 -0
- package/dist/shared/date/parser.js +161 -0
- package/dist/shared/date/parser.js.map +1 -0
- package/dist/shared/date/parts.d.ts +12 -0
- package/dist/shared/date/parts.js +17 -0
- package/dist/shared/date/parts.js.map +1 -0
- package/dist/shared/date/placeholders.d.ts +8 -0
- package/dist/shared/date/placeholders.js +196 -0
- package/dist/shared/date/placeholders.js.map +1 -0
- package/dist/shared/date/segment.d.ts +5 -0
- package/dist/shared/date/segment.js +44 -0
- package/dist/shared/date/segment.js.map +1 -0
- package/dist/shared/date/types.d.ts +37 -0
- package/dist/shared/date/useDateField.d.ts +142 -0
- package/dist/shared/date/useDateField.js +618 -0
- package/dist/shared/date/useDateField.js.map +1 -0
- package/dist/shared/date/utils.d.ts +11 -0
- package/dist/shared/date/utils.js +76 -0
- package/dist/shared/date/utils.js.map +1 -0
- package/dist/shared/getActiveElement.d.ts +1 -0
- package/dist/shared/getActiveElement.js +14 -0
- package/dist/shared/getActiveElement.js.map +1 -0
- package/dist/shared/handleAndDispatchCustomEvent.d.ts +3 -0
- package/dist/shared/handleAndDispatchCustomEvent.js +15 -0
- package/dist/shared/handleAndDispatchCustomEvent.js.map +1 -0
- package/dist/shared/index.d.ts +22 -0
- package/dist/shared/nullish.d.ts +1 -0
- package/dist/shared/nullish.js +7 -0
- package/dist/shared/nullish.js.map +1 -0
- package/dist/shared/onFocusOutside.d.ts +2 -0
- package/dist/shared/renderSlotFragments.d.ts +2 -0
- package/dist/shared/renderSlotFragments.js +14 -0
- package/dist/shared/renderSlotFragments.js.map +1 -0
- package/dist/shared/trap-focus.d.ts +1 -0
- package/dist/shared/types.d.ts +48 -0
- package/dist/shared/useDateFormatter.d.ts +30 -0
- package/dist/shared/useDateFormatter.js +121 -0
- package/dist/shared/useDateFormatter.js.map +1 -0
- package/dist/shared/useDirection.d.ts +8 -0
- package/dist/shared/useDirection.js +12 -0
- package/dist/shared/useDirection.js.map +1 -0
- package/dist/shared/useEmitAsProps.d.ts +10 -0
- package/dist/shared/useEmitAsProps.js +19 -0
- package/dist/shared/useEmitAsProps.js.map +1 -0
- package/dist/shared/useFocusGuards.d.ts +5 -0
- package/dist/shared/useFocusGuards.js +39 -0
- package/dist/shared/useFocusGuards.js.map +1 -0
- package/dist/shared/useForwardExpose.d.ts +6 -0
- package/dist/shared/useForwardExpose.js +49 -0
- package/dist/shared/useForwardExpose.js.map +1 -0
- package/dist/shared/useForwardProps.d.ts +9 -0
- package/dist/shared/useForwardProps.js +27 -0
- package/dist/shared/useForwardProps.js.map +1 -0
- package/dist/shared/useForwardPropsEmits.d.ts +14 -0
- package/dist/shared/useForwardPropsEmits.js +15 -0
- package/dist/shared/useForwardPropsEmits.js.map +1 -0
- package/dist/shared/useId.d.ts +9 -0
- package/dist/shared/useId.js +19 -0
- package/dist/shared/useId.js.map +1 -0
- package/dist/shared/useIsUsingKeyboard.d.ts +3 -0
- package/dist/shared/useKbd.d.ts +78 -0
- package/dist/shared/useKbd.js +42 -0
- package/dist/shared/useKbd.js.map +1 -0
- package/dist/shared/useLocale.d.ts +7 -0
- package/dist/shared/useLocale.js +12 -0
- package/dist/shared/useLocale.js.map +1 -0
- package/dist/shared/useNonce.d.ts +2 -0
- package/dist/shared/useSize.d.ts +5 -0
- package/dist/shared/useSize.js +44 -0
- package/dist/shared/useSize.js.map +1 -0
- package/dist/shared/useStateMachine.d.ts +25 -0
- package/dist/shared/useStateMachine.js +19 -0
- package/dist/shared/useStateMachine.js.map +1 -0
- package/dist/shared/withDefault.d.ts +22 -0
- package/package.json +72 -0
- package/src/components/Calendar/CalendarCell.vue +39 -0
- package/src/components/Calendar/CalendarCellTrigger.vue +206 -0
- package/src/components/Calendar/CalendarGrid.vue +35 -0
- package/src/components/Calendar/CalendarGridBody.vue +19 -0
- package/src/components/Calendar/CalendarGridHead.vue +19 -0
- package/src/components/Calendar/CalendarGridRow.vue +17 -0
- package/src/components/Calendar/CalendarHeadCell.vue +17 -0
- package/src/components/Calendar/CalendarHeader.vue +17 -0
- package/src/components/Calendar/CalendarHeading.vue +32 -0
- package/src/components/Calendar/CalendarMonthHeading.vue +65 -0
- package/src/components/Calendar/CalendarMonthYearOverlay.vue +48 -0
- package/src/components/Calendar/CalendarNext.vue +51 -0
- package/src/components/Calendar/CalendarOverlayItem.vue +30 -0
- package/src/components/Calendar/CalendarPrev.vue +51 -0
- package/src/components/Calendar/CalendarRoot.vue +394 -0
- package/src/components/Calendar/CalendarYearHeading.vue +63 -0
- package/src/components/Calendar/index.ts +63 -0
- package/src/components/Calendar/useCalendar.ts +453 -0
- package/src/components/ConfigProvider/ConfigProvider.vue +73 -0
- package/src/components/ConfigProvider/index.ts +5 -0
- package/src/components/DateField/DateFieldInput.vue +72 -0
- package/src/components/DateField/DateFieldRoot.vue +359 -0
- package/src/components/DateField/index.ts +10 -0
- package/src/components/DatePicker/DatePickerAnchor.vue +16 -0
- package/src/components/DatePicker/DatePickerArrow.vue +16 -0
- package/src/components/DatePicker/DatePickerCalendar.vue +62 -0
- package/src/components/DatePicker/DatePickerCell.vue +16 -0
- package/src/components/DatePicker/DatePickerCellTrigger.vue +18 -0
- package/src/components/DatePicker/DatePickerClose.vue +16 -0
- package/src/components/DatePicker/DatePickerContent.vue +50 -0
- package/src/components/DatePicker/DatePickerField.vue +53 -0
- package/src/components/DatePicker/DatePickerGrid.vue +16 -0
- package/src/components/DatePicker/DatePickerGridBody.vue +16 -0
- package/src/components/DatePicker/DatePickerGridHead.vue +16 -0
- package/src/components/DatePicker/DatePickerGridRow.vue +16 -0
- package/src/components/DatePicker/DatePickerHeadCell.vue +16 -0
- package/src/components/DatePicker/DatePickerHeader.vue +16 -0
- package/src/components/DatePicker/DatePickerHeading.vue +24 -0
- package/src/components/DatePicker/DatePickerInput.vue +16 -0
- package/src/components/DatePicker/DatePickerMonthHeading.vue +19 -0
- package/src/components/DatePicker/DatePickerMonthYearOverlay.vue +13 -0
- package/src/components/DatePicker/DatePickerNext.vue +19 -0
- package/src/components/DatePicker/DatePickerOverlayItem.vue +16 -0
- package/src/components/DatePicker/DatePickerPrev.vue +18 -0
- package/src/components/DatePicker/DatePickerRoot.vue +216 -0
- package/src/components/DatePicker/DatePickerTrigger.vue +29 -0
- package/src/components/DatePicker/DatePickerYearHeading.vue +19 -0
- package/src/components/DatePicker/index.ts +92 -0
- package/src/components/DismissableLayer/DismissableLayer.vue +175 -0
- package/src/components/DismissableLayer/DismissableLayerBranch.vue +28 -0
- package/src/components/DismissableLayer/index.ts +7 -0
- package/src/components/DismissableLayer/utils.ts +194 -0
- package/src/components/FocusScope/FocusScope.vue +220 -0
- package/src/components/FocusScope/index.ts +5 -0
- package/src/components/FocusScope/stack.ts +49 -0
- package/src/components/FocusScope/utils.ts +108 -0
- package/src/components/Popover/PopoverAnchor.vue +30 -0
- package/src/components/Popover/PopoverArrow.vue +23 -0
- package/src/components/Popover/PopoverClose.vue +29 -0
- package/src/components/Popover/PopoverContent.vue +41 -0
- package/src/components/Popover/PopoverContentImpl.vue +97 -0
- package/src/components/Popover/PopoverContentNonModal.vue +74 -0
- package/src/components/Popover/PopoverPortal.vue +17 -0
- package/src/components/Popover/PopoverRoot.vue +83 -0
- package/src/components/Popover/PopoverTrigger.vue +48 -0
- package/src/components/Popover/index.ts +31 -0
- package/src/components/Popper/PopperAnchor.vue +36 -0
- package/src/components/Popper/PopperArrow.vue +81 -0
- package/src/components/Popper/PopperContent.vue +399 -0
- package/src/components/Popper/PopperRoot.vue +36 -0
- package/src/components/Popper/index.ts +15 -0
- package/src/components/Popper/utils.ts +63 -0
- package/src/components/Presence/Presence.ts +91 -0
- package/src/components/Presence/index.ts +1 -0
- package/src/components/Presence/usePresence.ts +175 -0
- package/src/components/Primitive/Primitive.ts +66 -0
- package/src/components/Primitive/Slot.ts +40 -0
- package/src/components/Primitive/index.ts +3 -0
- package/src/components/Primitive/usePrimitiveElement.ts +13 -0
- package/src/components/Teleport/Teleport.vue +49 -0
- package/src/components/Teleport/index.ts +1 -0
- package/src/components/VisuallyHidden/VisuallyHidden.vue +47 -0
- package/src/components/VisuallyHidden/VisuallyHiddenInput.vue +67 -0
- package/src/components/VisuallyHidden/VisuallyHiddenInputBubble.vue +56 -0
- package/src/components/VisuallyHidden/index.ts +2 -0
- package/src/date/calendar.ts +242 -0
- package/src/date/comparators.ts +199 -0
- package/src/date/index.ts +3 -0
- package/src/date/types.ts +37 -0
- package/src/date/utils.ts +18 -0
- package/src/index.ts +78 -0
- package/src/shared/arrays.ts +66 -0
- package/src/shared/component/Arrow.vue +55 -0
- package/src/shared/component/BaseSeparator.vue +57 -0
- package/src/shared/component/index.ts +2 -0
- package/src/shared/constant/countryList.ts +251 -0
- package/src/shared/constant/index.ts +1 -0
- package/src/shared/createContext.ts +57 -0
- package/src/shared/date/comparators.ts +74 -0
- package/src/shared/date/index.ts +42 -0
- package/src/shared/date/parser.ts +252 -0
- package/src/shared/date/parts.ts +32 -0
- package/src/shared/date/placeholders.ts +221 -0
- package/src/shared/date/segment.ts +50 -0
- package/src/shared/date/types.ts +50 -0
- package/src/shared/date/useDateField.ts +998 -0
- package/src/shared/date/utils.ts +84 -0
- package/src/shared/getActiveElement.ts +12 -0
- package/src/shared/handleAndDispatchCustomEvent.ts +21 -0
- package/src/shared/index.ts +27 -0
- package/src/shared/nullish.ts +3 -0
- package/src/shared/onFocusOutside.ts +29 -0
- package/src/shared/renderSlotFragments.ts +13 -0
- package/src/shared/trap-focus.ts +45 -0
- package/src/shared/types.ts +64 -0
- package/src/shared/useDateFormatter.ts +186 -0
- package/src/shared/useDirection.ts +16 -0
- package/src/shared/useEmitAsProps.ts +32 -0
- package/src/shared/useFocusGuards.ts +46 -0
- package/src/shared/useForwardExpose.ts +66 -0
- package/src/shared/useForwardProps.ts +43 -0
- package/src/shared/useForwardPropsEmits.ts +26 -0
- package/src/shared/useId.ts +34 -0
- package/src/shared/useIsUsingKeyboard.ts +22 -0
- package/src/shared/useKbd.ts +58 -0
- package/src/shared/useLocale.ts +15 -0
- package/src/shared/useNonce.ts +10 -0
- package/src/shared/useSize.ts +64 -0
- package/src/shared/useStateMachine.ts +48 -0
- package/src/shared/withDefault.ts +61 -0
|
@@ -0,0 +1,242 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Implementation ported from from from https://github.com/melt-ui/melt-ui/blob/develop/src/lib/builders/calendar/create.ts
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import type { DateValue, DayOfWeek } from '@internationalized/date'
|
|
6
|
+
import type { Grid } from './types'
|
|
7
|
+
import type { DateRange } from '@/shared'
|
|
8
|
+
import { CalendarDate, endOfMonth, endOfYear, getDayOfWeek, startOfMonth, startOfYear } from '@internationalized/date'
|
|
9
|
+
import { getDaysInMonth, getLastFirstDayOfWeek, getNextLastDayOfWeek } from './comparators'
|
|
10
|
+
import { chunk } from './utils'
|
|
11
|
+
|
|
12
|
+
export type WeekDayFormat = 'narrow' | 'short' | 'long'
|
|
13
|
+
|
|
14
|
+
export type CreateSelectProps = {
|
|
15
|
+
/**
|
|
16
|
+
* The date object representing the date (usually the first day of the month/year).
|
|
17
|
+
*/
|
|
18
|
+
dateObj: DateValue
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export type CreateMonthProps = {
|
|
22
|
+
/**
|
|
23
|
+
* The date object representing the month's date (usually the first day of the month).
|
|
24
|
+
*/
|
|
25
|
+
dateObj: DateValue
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* The day of the week to start the calendar on (0 for Sunday, 1 for Monday, etc.).
|
|
29
|
+
*/
|
|
30
|
+
weekStartsOn: number
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* Whether to always render 6 weeks in the calendar, even if the month doesn't
|
|
34
|
+
* span 6 weeks.
|
|
35
|
+
*/
|
|
36
|
+
fixedWeeks: boolean
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* The locale to use when creating the calendar month.
|
|
40
|
+
*/
|
|
41
|
+
locale: string
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* Retrieves an array of date values representing the days between
|
|
46
|
+
* the provided start and end dates.
|
|
47
|
+
*/
|
|
48
|
+
export function getDaysBetween(start: DateValue, end: DateValue) {
|
|
49
|
+
const days: DateValue[] = []
|
|
50
|
+
let dCurrent = start.add({ days: 1 })
|
|
51
|
+
const dEnd = end
|
|
52
|
+
while (dCurrent.compare(dEnd) < 0) {
|
|
53
|
+
days.push(dCurrent)
|
|
54
|
+
dCurrent = dCurrent.add({ days: 1 })
|
|
55
|
+
}
|
|
56
|
+
return days
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
export function createMonth(props: CreateMonthProps): Grid<DateValue> {
|
|
60
|
+
const { dateObj, weekStartsOn, fixedWeeks, locale } = props
|
|
61
|
+
const daysInMonth = getDaysInMonth(dateObj)
|
|
62
|
+
|
|
63
|
+
const datesArray = Array.from({ length: daysInMonth }, (_, i) => dateObj.set({ day: i + 1 }))
|
|
64
|
+
|
|
65
|
+
const firstDayOfMonth = startOfMonth(dateObj)
|
|
66
|
+
const lastDayOfMonth = endOfMonth(dateObj)
|
|
67
|
+
|
|
68
|
+
const lastSunday = getLastFirstDayOfWeek(firstDayOfMonth, weekStartsOn, locale)
|
|
69
|
+
const nextSaturday = getNextLastDayOfWeek(lastDayOfMonth, weekStartsOn, locale)
|
|
70
|
+
|
|
71
|
+
const lastMonthDays = getDaysBetween(lastSunday.subtract({ days: 1 }), firstDayOfMonth)
|
|
72
|
+
const nextMonthDays = getDaysBetween(lastDayOfMonth, nextSaturday.add({ days: 1 }))
|
|
73
|
+
|
|
74
|
+
const totalDays = lastMonthDays.length + datesArray.length + nextMonthDays.length
|
|
75
|
+
|
|
76
|
+
if (fixedWeeks && totalDays < 42) {
|
|
77
|
+
const extraDays = 42 - totalDays
|
|
78
|
+
|
|
79
|
+
let startFrom = nextMonthDays[nextMonthDays.length - 1]
|
|
80
|
+
|
|
81
|
+
if (!startFrom)
|
|
82
|
+
startFrom = endOfMonth(dateObj)
|
|
83
|
+
|
|
84
|
+
const extraDaysArray = Array.from({ length: extraDays }, (_, i) => {
|
|
85
|
+
const incr = i + 1
|
|
86
|
+
return startFrom.add({ days: incr })
|
|
87
|
+
})
|
|
88
|
+
nextMonthDays.push(...extraDaysArray)
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
const allDays = lastMonthDays.concat(datesArray, nextMonthDays)
|
|
92
|
+
|
|
93
|
+
const weeks = chunk(allDays, 7)
|
|
94
|
+
|
|
95
|
+
return {
|
|
96
|
+
value: dateObj,
|
|
97
|
+
cells: allDays,
|
|
98
|
+
rows: weeks,
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
type SetMonthProps = CreateMonthProps & {
|
|
103
|
+
numberOfMonths: number | undefined
|
|
104
|
+
currentMonths?: Grid<DateValue>[]
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
type SetYearProps = CreateSelectProps & {
|
|
108
|
+
numberOfMonths?: number
|
|
109
|
+
pagedNavigation?: boolean
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
type SetDecadeProps = CreateSelectProps & {
|
|
113
|
+
startIndex?: number
|
|
114
|
+
endIndex: number
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
export function startOfDecade(dateObj: DateValue) {
|
|
118
|
+
// round to the lowest nearest 10 when building the decade
|
|
119
|
+
return startOfYear(dateObj.subtract({ years: dateObj.year - Math.floor(dateObj.year / 10) * 10 }).set({ day: 1, month: 1 }))
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
export function endOfDecade(dateObj: DateValue) {
|
|
123
|
+
// round to the lowest nearest 10 when building the decade
|
|
124
|
+
return endOfYear(dateObj.add({ years: Math.ceil((dateObj.year + 1) / 10) * 10 - dateObj.year - 1 }).set({ day: 35, month: 12 }))
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
export function createDecade(props: SetDecadeProps): DateValue[] {
|
|
128
|
+
const { dateObj, startIndex, endIndex } = props
|
|
129
|
+
|
|
130
|
+
const decadeArray = Array.from({ length: Math.abs(startIndex ?? 0) + endIndex }, (_, i) =>
|
|
131
|
+
i <= Math.abs((startIndex ?? 0))
|
|
132
|
+
? dateObj.subtract({ years: i }).set({ day: 1, month: 1 })
|
|
133
|
+
: dateObj.add({ years: i - endIndex }).set({ day: 1, month: 1 }))
|
|
134
|
+
|
|
135
|
+
decadeArray.sort((a: DateValue, b: DateValue) => a.year - b.year)
|
|
136
|
+
|
|
137
|
+
return decadeArray
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
export function createYear(props: SetYearProps): DateValue[] {
|
|
141
|
+
const { dateObj, numberOfMonths = 1, pagedNavigation = false } = props
|
|
142
|
+
|
|
143
|
+
if (numberOfMonths && pagedNavigation) {
|
|
144
|
+
const monthsArray = Array.from({ length: Math.floor(12 / numberOfMonths) }, (_, i) => startOfMonth(dateObj.set({ month: i * numberOfMonths + 1 })))
|
|
145
|
+
|
|
146
|
+
return monthsArray
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
const monthsArray = Array.from({ length: 12 }, (_, i) => startOfMonth(dateObj.set({ month: i + 1 })))
|
|
150
|
+
return monthsArray
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
export function createMonths(props: SetMonthProps) {
|
|
154
|
+
const { numberOfMonths, dateObj, ...monthProps } = props
|
|
155
|
+
|
|
156
|
+
const months: Grid<DateValue>[] = []
|
|
157
|
+
|
|
158
|
+
if (!numberOfMonths || numberOfMonths === 1) {
|
|
159
|
+
months.push(
|
|
160
|
+
createMonth({
|
|
161
|
+
...monthProps,
|
|
162
|
+
dateObj,
|
|
163
|
+
}),
|
|
164
|
+
)
|
|
165
|
+
return months
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
months.push(
|
|
169
|
+
createMonth({
|
|
170
|
+
...monthProps,
|
|
171
|
+
dateObj,
|
|
172
|
+
}),
|
|
173
|
+
)
|
|
174
|
+
|
|
175
|
+
// Create all the months, starting with the current month
|
|
176
|
+
for (let i = 1; i < numberOfMonths; i++) {
|
|
177
|
+
const nextMonth = dateObj.add({ months: i })
|
|
178
|
+
months.push(
|
|
179
|
+
createMonth({
|
|
180
|
+
...monthProps,
|
|
181
|
+
dateObj: nextMonth,
|
|
182
|
+
}),
|
|
183
|
+
)
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
return months
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
export function createYearRange({ start, end }: DateRange): DateValue[] {
|
|
190
|
+
const years: DateValue[] = []
|
|
191
|
+
|
|
192
|
+
if (!start || !end)
|
|
193
|
+
return years
|
|
194
|
+
|
|
195
|
+
let current = start
|
|
196
|
+
|
|
197
|
+
while (current.compare(end) <= 0) {
|
|
198
|
+
years.push(current)
|
|
199
|
+
// Move to the first day of the next year
|
|
200
|
+
current = current.add({ years: 1 })
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
return years
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
export function createDateRange({ start, end }: DateRange): DateValue[] {
|
|
207
|
+
const dates: DateValue[] = []
|
|
208
|
+
|
|
209
|
+
if (!start || !end)
|
|
210
|
+
return dates
|
|
211
|
+
|
|
212
|
+
let current = start
|
|
213
|
+
|
|
214
|
+
while (current.compare(end) <= 0) {
|
|
215
|
+
dates.push(current)
|
|
216
|
+
current = current.add({ days: 1 })
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
return dates
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
/**
|
|
223
|
+
* Returns the locale-specific week number
|
|
224
|
+
*/
|
|
225
|
+
export function getWeekNumber(date: DateValue, locale: string = 'en-US', firstDayOfWeek?: DayOfWeek): number {
|
|
226
|
+
const firstDayOfYear = new CalendarDate(date.year, 1, 1)
|
|
227
|
+
|
|
228
|
+
const firstDayOfYearWeekday = getDayOfWeek(firstDayOfYear, locale, firstDayOfWeek)
|
|
229
|
+
|
|
230
|
+
const firstWeekStart = firstDayOfYear.subtract({ days: firstDayOfYearWeekday })
|
|
231
|
+
|
|
232
|
+
// If date is before the first week start It belongs to the last week of the previous year
|
|
233
|
+
if (date.compare(firstWeekStart) < 0) {
|
|
234
|
+
const prevYearDate = new CalendarDate(date.year - 1, 12, 31)
|
|
235
|
+
return getWeekNumber(prevYearDate, locale, firstDayOfWeek)
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
const days = getDaysBetween(firstWeekStart, date)
|
|
239
|
+
|
|
240
|
+
// Week number is days divided by 7 plus 1
|
|
241
|
+
return Math.floor(days.length / 7) + 1
|
|
242
|
+
}
|
|
@@ -0,0 +1,199 @@
|
|
|
1
|
+
import type { DateValue } from '@internationalized/date'
|
|
2
|
+
import type { Matcher } from './types'
|
|
3
|
+
import { CalendarDateTime, getDayOfWeek, getLocalTimeZone, parseDate, parseDateTime, parseZonedDateTime, toCalendar, ZonedDateTime } from '@internationalized/date'
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Given a date string and a reference `DateValue` object, parse the
|
|
7
|
+
* string to the same type as the reference object.
|
|
8
|
+
*
|
|
9
|
+
* Useful for parsing strings from data attributes, which are always
|
|
10
|
+
* strings, to the same type being used by the date component.
|
|
11
|
+
*/
|
|
12
|
+
export function parseStringToDateValue(dateStr: string, referenceVal: DateValue): DateValue {
|
|
13
|
+
let dateValue: DateValue
|
|
14
|
+
if (isZonedDateTime(referenceVal))
|
|
15
|
+
dateValue = parseZonedDateTime(dateStr)
|
|
16
|
+
|
|
17
|
+
else if (isCalendarDateTime(referenceVal))
|
|
18
|
+
dateValue = parseDateTime(dateStr)
|
|
19
|
+
|
|
20
|
+
else
|
|
21
|
+
dateValue = parseDate(dateStr)
|
|
22
|
+
|
|
23
|
+
return dateValue.calendar !== referenceVal.calendar ? toCalendar(dateValue, referenceVal.calendar) : dateValue
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* Given a `DateValue` object, convert it to a native `Date` object.
|
|
28
|
+
* If a timezone is provided, the date will be converted to that timezone.
|
|
29
|
+
* If no timezone is provided, the date will be converted to the local timezone.
|
|
30
|
+
*/
|
|
31
|
+
export function toDate(dateValue: DateValue, tz: string = getLocalTimeZone()) {
|
|
32
|
+
if (isZonedDateTime(dateValue))
|
|
33
|
+
return dateValue.toDate()
|
|
34
|
+
else
|
|
35
|
+
return dateValue.toDate(tz)
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export function isCalendarDateTime(dateValue: DateValue): dateValue is CalendarDateTime {
|
|
39
|
+
return dateValue instanceof CalendarDateTime
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export function isZonedDateTime(dateValue: DateValue): dateValue is ZonedDateTime {
|
|
43
|
+
return dateValue instanceof ZonedDateTime
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
export function hasTime(dateValue: DateValue) {
|
|
47
|
+
return isCalendarDateTime(dateValue) || isZonedDateTime(dateValue)
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* Given a date, return the number of days in the month.
|
|
52
|
+
*/
|
|
53
|
+
export function getDaysInMonth(date: Date | DateValue) {
|
|
54
|
+
if (date instanceof Date) {
|
|
55
|
+
const year = date.getFullYear()
|
|
56
|
+
const month = date.getMonth() + 1
|
|
57
|
+
/**
|
|
58
|
+
* By using zero as the day, we get the
|
|
59
|
+
* last day of the previous month, which
|
|
60
|
+
* is the month we originally passed in.
|
|
61
|
+
*/
|
|
62
|
+
return new Date(year, month, 0).getDate()
|
|
63
|
+
}
|
|
64
|
+
else {
|
|
65
|
+
return date.set({ day: 100 }).day
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
* Determine if a date is before the reference date.
|
|
71
|
+
* @param dateToCompare - is this date before the `referenceDate`
|
|
72
|
+
* @param referenceDate - is the `dateToCompare` before this date
|
|
73
|
+
*
|
|
74
|
+
* @see {@link isBeforeOrSame} for inclusive
|
|
75
|
+
*/
|
|
76
|
+
export function isBefore(dateToCompare: DateValue, referenceDate: DateValue) {
|
|
77
|
+
return dateToCompare.compare(referenceDate) < 0
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
/**
|
|
81
|
+
* Determine if a date is after the reference date.
|
|
82
|
+
* @param dateToCompare - is this date after the `referenceDate`
|
|
83
|
+
* @param referenceDate - is the `dateToCompare` after this date
|
|
84
|
+
*
|
|
85
|
+
* @see {@link isAfterOrSame} for inclusive
|
|
86
|
+
*/
|
|
87
|
+
export function isAfter(dateToCompare: DateValue, referenceDate: DateValue) {
|
|
88
|
+
return dateToCompare.compare(referenceDate) > 0
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
/**
|
|
92
|
+
* Determine if a date is before or the same as the reference date.
|
|
93
|
+
*
|
|
94
|
+
* @param dateToCompare - the date to compare
|
|
95
|
+
* @param referenceDate - the reference date to make the comparison against
|
|
96
|
+
*
|
|
97
|
+
* @see {@link isBefore} for non-inclusive
|
|
98
|
+
*/
|
|
99
|
+
export function isBeforeOrSame(dateToCompare: DateValue, referenceDate: DateValue) {
|
|
100
|
+
return dateToCompare.compare(referenceDate) <= 0
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
/**
|
|
104
|
+
* Determine if a date is after or the same as the reference date.
|
|
105
|
+
*
|
|
106
|
+
* @param dateToCompare - is this date after or the same as the `referenceDate`
|
|
107
|
+
* @param referenceDate - is the `dateToCompare` after or the same as this date
|
|
108
|
+
*
|
|
109
|
+
* @see {@link isAfter} for non-inclusive
|
|
110
|
+
*/
|
|
111
|
+
export function isAfterOrSame(dateToCompare: DateValue, referenceDate: DateValue) {
|
|
112
|
+
return dateToCompare.compare(referenceDate) >= 0
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
/**
|
|
116
|
+
* Determine if a date is inclusively between a start and end reference date.
|
|
117
|
+
*
|
|
118
|
+
* @param date - is this date inclusively between the `start` and `end` dates
|
|
119
|
+
* @param start - the start reference date to make the comparison against
|
|
120
|
+
* @param end - the end reference date to make the comparison against
|
|
121
|
+
*
|
|
122
|
+
* @see {@link isBetween} for non-inclusive
|
|
123
|
+
*/
|
|
124
|
+
export function isBetweenInclusive(date: DateValue, start: DateValue, end: DateValue) {
|
|
125
|
+
return isAfterOrSame(date, start) && isBeforeOrSame(date, end)
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
/**
|
|
129
|
+
* Determine if a date is between a start and end reference date.
|
|
130
|
+
*
|
|
131
|
+
* @param date - is this date between the `start` and `end` dates
|
|
132
|
+
* @param start - the start reference date to make the comparison against
|
|
133
|
+
* @param end - the end reference date to make the comparison against
|
|
134
|
+
*
|
|
135
|
+
* @see {@link isBetweenInclusive} for inclusive
|
|
136
|
+
*/
|
|
137
|
+
export function isBetween(date: DateValue, start: DateValue, end: DateValue) {
|
|
138
|
+
return isAfter(date, start) && isBefore(date, end)
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
export function getLastFirstDayOfWeek<T extends DateValue = DateValue>(
|
|
142
|
+
date: T,
|
|
143
|
+
firstDayOfWeek: number,
|
|
144
|
+
locale: string,
|
|
145
|
+
): T {
|
|
146
|
+
const day = getDayOfWeek(date, locale)
|
|
147
|
+
|
|
148
|
+
if (firstDayOfWeek > day)
|
|
149
|
+
return date.subtract({ days: day + 7 - firstDayOfWeek }) as T
|
|
150
|
+
|
|
151
|
+
if (firstDayOfWeek === day)
|
|
152
|
+
return date as T
|
|
153
|
+
|
|
154
|
+
return date.subtract({ days: day - firstDayOfWeek }) as T
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
export function getNextLastDayOfWeek<T extends DateValue = DateValue>(
|
|
158
|
+
date: T,
|
|
159
|
+
firstDayOfWeek: number,
|
|
160
|
+
locale: string,
|
|
161
|
+
): T {
|
|
162
|
+
const day = getDayOfWeek(date, locale)
|
|
163
|
+
const lastDayOfWeek = firstDayOfWeek === 0 ? 6 : firstDayOfWeek - 1
|
|
164
|
+
|
|
165
|
+
if (day === lastDayOfWeek)
|
|
166
|
+
return date as T
|
|
167
|
+
|
|
168
|
+
if (day > lastDayOfWeek)
|
|
169
|
+
return date.add({ days: 7 - day + lastDayOfWeek }) as T
|
|
170
|
+
|
|
171
|
+
return date.add({ days: lastDayOfWeek - day }) as T
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
export function areAllDaysBetweenValid(
|
|
175
|
+
start: DateValue,
|
|
176
|
+
end: DateValue,
|
|
177
|
+
isUnavailable: Matcher | undefined,
|
|
178
|
+
isDisabled: Matcher | undefined,
|
|
179
|
+
isHighlightable?: Matcher | undefined,
|
|
180
|
+
) {
|
|
181
|
+
if (isUnavailable === undefined && isDisabled === undefined && isHighlightable === undefined)
|
|
182
|
+
return true
|
|
183
|
+
|
|
184
|
+
let dCurrent = start.add({ days: 1 })
|
|
185
|
+
if ((isDisabled?.(dCurrent) || isUnavailable?.(dCurrent))
|
|
186
|
+
&& !isHighlightable?.(dCurrent)) {
|
|
187
|
+
return false
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
const dEnd = end
|
|
191
|
+
while (dCurrent.compare(dEnd) < 0) {
|
|
192
|
+
dCurrent = dCurrent.add({ days: 1 })
|
|
193
|
+
if ((isDisabled?.(dCurrent) || isUnavailable?.(dCurrent))
|
|
194
|
+
&& !isHighlightable?.(dCurrent)) {
|
|
195
|
+
return false
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
return true
|
|
199
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Implementation ported from https://github.com/melt-ui/melt-ui/blob/develop/src/lib/internal/helpers/date/types.ts
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import type { DateValue } from '@internationalized/date'
|
|
6
|
+
|
|
7
|
+
export type { DateValue }
|
|
8
|
+
|
|
9
|
+
export type Matcher = (date: DateValue) => boolean
|
|
10
|
+
|
|
11
|
+
export type Grid<T> = {
|
|
12
|
+
/**
|
|
13
|
+
* A `DateValue` used to represent the month. Since days
|
|
14
|
+
* from the previous and next months may be included in the
|
|
15
|
+
* calendar grid, we need a source of truth for the value
|
|
16
|
+
* the grid is representing.
|
|
17
|
+
*/
|
|
18
|
+
value: DateValue
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* An array of arrays representing the weeks in the calendar.
|
|
22
|
+
* Each sub-array represents a week, and contains the dates for each
|
|
23
|
+
* day in that week. This structure is useful for rendering the calendar
|
|
24
|
+
* grid using a table, where each row represents a week and each cell
|
|
25
|
+
* represents a day.
|
|
26
|
+
*/
|
|
27
|
+
rows: T[][]
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* An array of all the dates in the current month, including dates from
|
|
31
|
+
* the previous and next months that are used to fill out the calendar grid.
|
|
32
|
+
* This array is useful for rendering the calendar grid in a customizable way,
|
|
33
|
+
* as it provides all the dates that should be displayed in the grid in a flat
|
|
34
|
+
* array.
|
|
35
|
+
*/
|
|
36
|
+
cells: T[]
|
|
37
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Splits an array into chunks of a given size.
|
|
3
|
+
* @param arr The array to split.
|
|
4
|
+
* @param size The size of each chunk.
|
|
5
|
+
* @returns An array of arrays, where each sub-array has `size` elements from the original array.
|
|
6
|
+
* @example ```ts
|
|
7
|
+
* const arr = [1, 2, 3, 4, 5, 6, 7, 8];
|
|
8
|
+
* const chunks = chunk(arr, 3);
|
|
9
|
+
* // chunks = [[1, 2, 3], [4, 5, 6], [7, 8]]
|
|
10
|
+
* ```
|
|
11
|
+
*/
|
|
12
|
+
export function chunk<T>(arr: T[], size: number): T[][] {
|
|
13
|
+
const result = []
|
|
14
|
+
for (let i = 0; i < arr.length; i += size)
|
|
15
|
+
result.push(arr.slice(i, i + size))
|
|
16
|
+
|
|
17
|
+
return result
|
|
18
|
+
}
|
package/src/index.ts
ADDED
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import {
|
|
2
|
+
DatePickerRoot,
|
|
3
|
+
DatePickerHeader,
|
|
4
|
+
DatePickerHeading,
|
|
5
|
+
DatePickerGrid,
|
|
6
|
+
DatePickerCell,
|
|
7
|
+
DatePickerHeadCell,
|
|
8
|
+
DatePickerNext,
|
|
9
|
+
DatePickerPrev,
|
|
10
|
+
DatePickerGridHead,
|
|
11
|
+
DatePickerGridBody,
|
|
12
|
+
DatePickerGridRow,
|
|
13
|
+
DatePickerCellTrigger,
|
|
14
|
+
DatePickerInput,
|
|
15
|
+
DatePickerCalendar,
|
|
16
|
+
DatePickerField,
|
|
17
|
+
DatePickerAnchor,
|
|
18
|
+
DatePickerArrow,
|
|
19
|
+
DatePickerClose,
|
|
20
|
+
DatePickerTrigger,
|
|
21
|
+
DatePickerContent,
|
|
22
|
+
DatePickerMonthHeading,
|
|
23
|
+
DatePickerYearHeading,
|
|
24
|
+
DatePickerMonthYearOverlay,
|
|
25
|
+
DatePickerOverlayItem,
|
|
26
|
+
} from "./components/DatePicker/index";
|
|
27
|
+
|
|
28
|
+
export const DatePicker = {
|
|
29
|
+
Root: DatePickerRoot,
|
|
30
|
+
Header: DatePickerHeader,
|
|
31
|
+
Heading: DatePickerHeading,
|
|
32
|
+
Grid: DatePickerGrid,
|
|
33
|
+
Cell: DatePickerCell,
|
|
34
|
+
HeadCell: DatePickerHeadCell,
|
|
35
|
+
Next: DatePickerNext,
|
|
36
|
+
Prev: DatePickerPrev,
|
|
37
|
+
GridHead: DatePickerGridHead,
|
|
38
|
+
GridBody: DatePickerGridBody,
|
|
39
|
+
GridRow: DatePickerGridRow,
|
|
40
|
+
CellTrigger: DatePickerCellTrigger,
|
|
41
|
+
Input: DatePickerInput,
|
|
42
|
+
Calendar: DatePickerCalendar,
|
|
43
|
+
Field: DatePickerField,
|
|
44
|
+
Anchor: DatePickerAnchor,
|
|
45
|
+
Arrow: DatePickerArrow,
|
|
46
|
+
Close: DatePickerClose,
|
|
47
|
+
Trigger: DatePickerTrigger,
|
|
48
|
+
Content: DatePickerContent,
|
|
49
|
+
MonthHeading: DatePickerMonthHeading,
|
|
50
|
+
YearHeading: DatePickerYearHeading,
|
|
51
|
+
MonthYearOverlay: DatePickerMonthYearOverlay,
|
|
52
|
+
OverlayItem: DatePickerOverlayItem,
|
|
53
|
+
} as {
|
|
54
|
+
Root: typeof DatePickerRoot;
|
|
55
|
+
Header: typeof DatePickerHeader;
|
|
56
|
+
Heading: typeof DatePickerHeading;
|
|
57
|
+
Grid: typeof DatePickerGrid;
|
|
58
|
+
Cell: typeof DatePickerCell;
|
|
59
|
+
HeadCell: typeof DatePickerHeadCell;
|
|
60
|
+
Next: typeof DatePickerNext;
|
|
61
|
+
Prev: typeof DatePickerPrev;
|
|
62
|
+
GridHead: typeof DatePickerGridHead;
|
|
63
|
+
GridBody: typeof DatePickerGridBody;
|
|
64
|
+
GridRow: typeof DatePickerGridRow;
|
|
65
|
+
CellTrigger: typeof DatePickerCellTrigger;
|
|
66
|
+
Input: typeof DatePickerInput;
|
|
67
|
+
Calendar: typeof DatePickerCalendar;
|
|
68
|
+
Field: typeof DatePickerField;
|
|
69
|
+
Anchor: typeof DatePickerAnchor;
|
|
70
|
+
Arrow: typeof DatePickerArrow;
|
|
71
|
+
Close: typeof DatePickerClose;
|
|
72
|
+
Trigger: typeof DatePickerTrigger;
|
|
73
|
+
Content: typeof DatePickerContent;
|
|
74
|
+
MonthHeading: typeof DatePickerMonthHeading;
|
|
75
|
+
YearHeading: typeof DatePickerYearHeading;
|
|
76
|
+
MonthYearOverlay: typeof DatePickerMonthYearOverlay;
|
|
77
|
+
OverlayItem: typeof DatePickerOverlayItem;
|
|
78
|
+
};
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { isEqual } from 'ohash'
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* The function `areEqual` compares two arrays and returns true if they are equal in length and have
|
|
5
|
+
* the same elements at corresponding indexes.
|
|
6
|
+
* @param {any[]} arrayA - An array of any type of elements.
|
|
7
|
+
* @param {any[]} arrayB - It looks like you haven't provided the value for `arrayB`. Could you please
|
|
8
|
+
* provide the arrayB value so that I can assist you further?
|
|
9
|
+
* @returns The function `areEqual` is returning a boolean value, either `true` if the two input arrays
|
|
10
|
+
* `arrayA` and `arrayB` are equal, or `false` if they are not equal.
|
|
11
|
+
*/
|
|
12
|
+
export function areEqual(arrayA: any[], arrayB: any[]): boolean {
|
|
13
|
+
if (arrayA.length !== arrayB.length)
|
|
14
|
+
return false
|
|
15
|
+
|
|
16
|
+
for (let index = 0; index < arrayA.length; index++) {
|
|
17
|
+
if (arrayA[index] !== arrayB[index])
|
|
18
|
+
return false
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
return true
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Splits an array into chunks of a given size.
|
|
26
|
+
* @param arr The array to split.
|
|
27
|
+
* @param size The size of each chunk.
|
|
28
|
+
* @returns An array of arrays, where each sub-array has `size` elements from the original array.
|
|
29
|
+
* @example ```ts
|
|
30
|
+
* const arr = [1, 2, 3, 4, 5, 6, 7, 8];
|
|
31
|
+
* const chunks = chunk(arr, 3);
|
|
32
|
+
* // chunks = [[1, 2, 3], [4, 5, 6], [7, 8]]
|
|
33
|
+
* ```
|
|
34
|
+
*/
|
|
35
|
+
export function chunk<T>(arr: T[], size: number): T[][] {
|
|
36
|
+
const result = []
|
|
37
|
+
for (let i = 0; i < arr.length; i += size)
|
|
38
|
+
result.push(arr.slice(i, i + size))
|
|
39
|
+
|
|
40
|
+
return result
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* The function `findValuesBetween` takes an array and two values, then returns a subarray containing
|
|
45
|
+
* elements between the first occurrence of the start value and the first occurrence of the end value
|
|
46
|
+
* in the array.
|
|
47
|
+
* @param {T[]} array - The `array` parameter is an array of values of type `T`.
|
|
48
|
+
* @param {T} start - The `start` parameter is the value that marks the beginning of the range you want
|
|
49
|
+
* to find in the array.
|
|
50
|
+
* @param {T} end - The `end` parameter in the `findValuesBetween` function represents the end value
|
|
51
|
+
* that you want to find in the array. This function will return a subarray of values that are between
|
|
52
|
+
* the `start` and `end` values in the original array.
|
|
53
|
+
* @returns The `findValuesBetween` function returns an array of values from the input array that are
|
|
54
|
+
* between the `start` and `end` values (inclusive). If either the `start` or `end` values are not
|
|
55
|
+
* found in the input array, an empty array is returned.
|
|
56
|
+
*/
|
|
57
|
+
export function findValuesBetween<T>(array: T[], start: T, end: T) {
|
|
58
|
+
const startIndex = array.findIndex(i => isEqual(i, start))
|
|
59
|
+
const endIndex = array.findIndex(i => isEqual(i, end))
|
|
60
|
+
if (startIndex === -1 || endIndex === -1)
|
|
61
|
+
return []
|
|
62
|
+
|
|
63
|
+
const [minIndex, maxIndex] = [startIndex, endIndex].sort((a, b) => a - b)
|
|
64
|
+
|
|
65
|
+
return array.slice(minIndex, maxIndex + 1)
|
|
66
|
+
}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import type { PrimitiveProps } from "../../components/Primitive";
|
|
3
|
+
import { useForwardExpose } from "../useForwardExpose";
|
|
4
|
+
|
|
5
|
+
export interface ArrowProps extends PrimitiveProps {
|
|
6
|
+
/**
|
|
7
|
+
* The width of the arrow in pixels.
|
|
8
|
+
*
|
|
9
|
+
* @defaultValue 10
|
|
10
|
+
*/
|
|
11
|
+
width?: number;
|
|
12
|
+
/**
|
|
13
|
+
* The height of the arrow in pixels.
|
|
14
|
+
*
|
|
15
|
+
* @defaultValue 5
|
|
16
|
+
*/
|
|
17
|
+
height?: number;
|
|
18
|
+
/**
|
|
19
|
+
* When `true`, render the rounded version of arrow. Do not work with `as`/`asChild`
|
|
20
|
+
*
|
|
21
|
+
* @defaultValue false
|
|
22
|
+
*/
|
|
23
|
+
rounded?: boolean;
|
|
24
|
+
}
|
|
25
|
+
</script>
|
|
26
|
+
|
|
27
|
+
<script setup lang="ts">
|
|
28
|
+
import { Primitive } from "../../components/Primitive";
|
|
29
|
+
|
|
30
|
+
const props = withDefaults(defineProps<ArrowProps>(), {
|
|
31
|
+
width: 10,
|
|
32
|
+
height: 5,
|
|
33
|
+
as: "svg",
|
|
34
|
+
});
|
|
35
|
+
|
|
36
|
+
useForwardExpose();
|
|
37
|
+
</script>
|
|
38
|
+
|
|
39
|
+
<template>
|
|
40
|
+
<Primitive
|
|
41
|
+
v-bind="props"
|
|
42
|
+
:width="width"
|
|
43
|
+
:height="height"
|
|
44
|
+
:viewBox="asChild ? undefined : '0 0 12 6'"
|
|
45
|
+
:preserveAspectRatio="asChild ? undefined : 'none'"
|
|
46
|
+
>
|
|
47
|
+
<slot>
|
|
48
|
+
<path v-if="!rounded" d="M0 0L6 6L12 0" />
|
|
49
|
+
<path
|
|
50
|
+
v-else
|
|
51
|
+
d="M0 0L4.58579 4.58579C5.36683 5.36683 6.63316 5.36684 7.41421 4.58579L12 0"
|
|
52
|
+
/>
|
|
53
|
+
</slot>
|
|
54
|
+
</Primitive>
|
|
55
|
+
</template>
|