@soybeanjs/headless 0.15.5 → 0.17.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/dist/components/_icon/types.d.ts +9 -0
- package/dist/components/accordion/types.d.ts +87 -0
- package/dist/components/affix/types.d.ts +39 -0
- package/dist/components/alert/types.d.ts +78 -0
- package/dist/components/anchor/anchor-compact.js +1 -1
- package/dist/components/anchor/{anchor-compact-item.js → anchor-item-compact.js} +1 -1
- package/dist/components/anchor/anchor-item-compact.vue.d.ts +8 -0
- package/dist/components/anchor/anchor-link.js +1 -1
- package/dist/components/anchor/anchor-root.vue.d.ts +1 -1
- package/dist/components/anchor/index.d.ts +5 -4
- package/dist/components/anchor/index.js +1 -1
- package/dist/components/anchor/types.d.ts +122 -10
- package/dist/components/arrow/types.d.ts +3 -0
- package/dist/components/aspect-ratio/types.d.ts +3 -0
- package/dist/components/autocomplete/autocomplete-compact.js +1 -1
- package/dist/components/autocomplete/autocomplete-compact.vue.d.ts +2 -2
- package/dist/components/autocomplete/autocomplete-input.js +1 -1
- package/dist/components/autocomplete/autocomplete-input.vue.d.ts +2 -2
- package/dist/components/autocomplete/autocomplete-root.js +1 -1
- package/dist/components/autocomplete/autocomplete-root.vue.d.ts +15 -5
- package/dist/components/autocomplete/context.d.ts +2 -2
- package/dist/components/autocomplete/context.js +1 -1
- package/dist/components/autocomplete/index.d.ts +17 -13
- package/dist/components/autocomplete/index.js +1 -1
- package/dist/components/autocomplete/types.d.ts +159 -32
- package/dist/components/avatar/types.d.ts +18 -0
- package/dist/components/backtop/backtop.vue.d.ts +9 -3
- package/dist/components/backtop/index.d.ts +2 -2
- package/dist/components/backtop/types.d.ts +19 -12
- package/dist/components/badge/types.d.ts +21 -0
- package/dist/components/bottom-sheet/bottom-sheet-compact.js +1 -1
- package/dist/components/bottom-sheet/bottom-sheet-root-nested.js +1 -1
- package/dist/components/bottom-sheet/bottom-sheet-root-nested.vue.d.ts +2 -2
- package/dist/components/bottom-sheet/bottom-sheet-root.js +1 -1
- package/dist/components/bottom-sheet/types.d.ts +99 -0
- package/dist/components/breadcrumb/index.d.ts +2 -2
- package/dist/components/breadcrumb/types.d.ts +103 -1
- package/dist/components/button/types.d.ts +16 -1
- package/dist/components/calendar/calendar-cell-trigger.js +1 -0
- package/dist/components/calendar/calendar-cell-trigger.vue.d.ts +28 -0
- package/dist/components/calendar/calendar-cell.js +1 -0
- package/dist/components/{autocomplete/autocomplete-anchor.vue.d.ts → calendar/calendar-cell.vue.d.ts} +3 -3
- package/dist/components/calendar/calendar-compact.js +1 -0
- package/dist/components/calendar/calendar-compact.vue.d.ts +23 -0
- package/dist/components/calendar/calendar-grid-body.js +1 -0
- package/dist/components/{combobox/combobox-item-indicator.vue.d.ts → calendar/calendar-grid-body.vue.d.ts} +3 -3
- package/dist/components/calendar/calendar-grid-head.js +1 -0
- package/dist/components/calendar/calendar-grid-head.vue.d.ts +21 -0
- package/dist/components/calendar/calendar-grid-row.js +1 -0
- package/dist/components/calendar/calendar-grid-row.vue.d.ts +21 -0
- package/dist/components/calendar/calendar-grid.js +1 -0
- package/dist/components/calendar/calendar-grid.vue.d.ts +21 -0
- package/dist/components/calendar/calendar-head-cell.js +1 -0
- package/dist/components/calendar/calendar-head-cell.vue.d.ts +21 -0
- package/dist/components/calendar/calendar-header.js +1 -0
- package/dist/components/calendar/calendar-header.vue.d.ts +21 -0
- package/dist/components/calendar/calendar-heading.js +1 -0
- package/dist/components/calendar/calendar-heading.vue.d.ts +22 -0
- package/dist/components/calendar/calendar-next.js +1 -0
- package/dist/components/calendar/calendar-next.vue.d.ts +24 -0
- package/dist/components/calendar/calendar-prev.js +1 -0
- package/dist/components/calendar/calendar-prev.vue.d.ts +24 -0
- package/dist/components/calendar/calendar-root.js +1 -0
- package/dist/components/calendar/calendar-root.vue.d.ts +25 -0
- package/dist/components/calendar/context.d.ts +9 -0
- package/dist/components/calendar/context.js +1 -0
- package/dist/components/calendar/index.d.ts +16 -0
- package/dist/components/calendar/index.js +1 -0
- package/dist/components/calendar/types.d.ts +528 -0
- package/dist/components/calendar/use-calendar.d.ts +45 -0
- package/dist/components/calendar/use-calendar.js +1 -0
- package/dist/components/card/card-compact.js +1 -0
- package/dist/components/card/card-compact.vue.d.ts +19 -0
- package/dist/components/card/card-root.vue.d.ts +1 -1
- package/dist/components/card/index.d.ts +10 -9
- package/dist/components/card/index.js +1 -1
- package/dist/components/card/types.d.ts +112 -1
- package/dist/components/carousel/carousel-root.vue.d.ts +39 -2
- package/dist/components/carousel/index.d.ts +4 -2
- package/dist/components/carousel/types.d.ts +50 -8
- package/dist/components/checkbox/checkbox-group-root.js +1 -1
- package/dist/components/checkbox/checkbox-root.js +1 -1
- package/dist/components/checkbox/types.d.ts +111 -0
- package/dist/components/clipboard/types.d.ts +42 -0
- package/dist/components/collapsible/collapsible-root.vue.d.ts +1 -1
- package/dist/components/collapsible/types.d.ts +18 -0
- package/dist/components/color-area/color-area-root.vue.d.ts +4 -4
- package/dist/components/color-area/types.d.ts +60 -0
- package/dist/components/color-field/color-field-root.vue.d.ts +3 -3
- package/dist/components/color-field/types.d.ts +51 -0
- package/dist/components/color-picker/color-picker-root.vue.d.ts +4 -4
- package/dist/components/color-picker/types.d.ts +39 -0
- package/dist/components/color-slider/color-slider-root.vue.d.ts +4 -4
- package/dist/components/color-slider/types.d.ts +60 -0
- package/dist/components/color-swatch/types.d.ts +9 -0
- package/dist/components/color-swatch-picker/color-swatch-picker-root.vue.d.ts +2 -2
- package/dist/components/color-swatch-picker/types.d.ts +27 -0
- package/dist/components/combobox/combobox-arrow.js +1 -1
- package/dist/components/combobox/combobox-arrow.vue.d.ts +2 -2
- package/dist/components/combobox/combobox-compact.js +1 -1
- package/dist/components/combobox/combobox-compact.vue.d.ts +2 -2
- package/dist/components/combobox/combobox-content-impl.js +1 -1
- package/dist/components/combobox/combobox-group.vue.d.ts +2 -2
- package/dist/components/combobox/combobox-input.js +1 -1
- package/dist/components/combobox/combobox-item.js +1 -1
- package/dist/components/combobox/combobox-root.js +1 -1
- package/dist/components/combobox/combobox-root.vue.d.ts +2 -2
- package/dist/components/combobox/combobox-trigger.js +1 -1
- package/dist/components/combobox/combobox-virtualizer.js +1 -1
- package/dist/components/combobox/context.js +1 -1
- package/dist/components/combobox/index.d.ts +12 -10
- package/dist/components/combobox/index.js +1 -1
- package/dist/components/combobox/types.d.ts +247 -20
- package/dist/components/command/command-compact.js +1 -1
- package/dist/components/command/command-compact.vue.d.ts +2 -2
- package/dist/components/command/types.d.ts +148 -1
- package/dist/components/config-provider/config-provider.vue.d.ts +1 -1
- package/dist/components/config-provider/types.d.ts +3 -0
- package/dist/components/context-menu/context-menu-checkbox-compact.js +1 -1
- package/dist/components/context-menu/context-menu-checkbox-compact.vue.d.ts +2 -2
- package/dist/components/context-menu/context-menu-compact.js +1 -1
- package/dist/components/context-menu/context-menu-compact.vue.d.ts +2 -2
- package/dist/components/context-menu/context-menu-radio-compact.js +1 -1
- package/dist/components/context-menu/context-menu-radio-compact.vue.d.ts +2 -2
- package/dist/components/context-menu/context-menu-root.js +1 -1
- package/dist/components/context-menu/context-menu-wrapper-compact.js +1 -1
- package/dist/components/context-menu/context-menu-wrapper-compact.vue.d.ts +2 -2
- package/dist/components/context-menu/index.d.ts +2 -2
- package/dist/components/context-menu/index.js +1 -1
- package/dist/components/context-menu/types.d.ts +78 -0
- package/dist/components/date-field/context.d.ts +9 -0
- package/dist/components/date-field/context.js +1 -0
- package/dist/components/date-field/date-field-compact.js +1 -0
- package/dist/components/date-field/date-field-compact.vue.d.ts +15 -0
- package/dist/components/date-field/date-field-input.js +1 -0
- package/dist/components/date-field/date-field-input.vue.d.ts +21 -0
- package/dist/components/date-field/date-field-root.js +1 -0
- package/dist/components/date-field/date-field-root.vue.d.ts +42 -0
- package/dist/components/date-field/index.d.ts +6 -0
- package/dist/components/date-field/index.js +1 -0
- package/dist/components/date-field/types.d.ts +214 -0
- package/dist/components/date-picker/context.d.ts +9 -0
- package/dist/components/date-picker/context.js +1 -0
- package/dist/components/date-picker/date-picker-compact.js +1 -0
- package/dist/components/date-picker/date-picker-compact.vue.d.ts +27 -0
- package/dist/components/date-picker/date-picker-content.js +1 -0
- package/dist/components/date-picker/date-picker-content.vue.d.ts +33 -0
- package/dist/components/date-picker/date-picker-root.js +1 -0
- package/dist/components/date-picker/date-picker-root.vue.d.ts +38 -0
- package/dist/components/date-picker/index.d.ts +9 -0
- package/dist/components/date-picker/index.js +1 -0
- package/dist/components/date-picker/types.d.ts +290 -0
- package/dist/components/date-range-field/context.d.ts +9 -0
- package/dist/components/date-range-field/context.js +1 -0
- package/dist/components/date-range-field/date-range-field-compact.js +1 -0
- package/dist/components/date-range-field/date-range-field-compact.vue.d.ts +29 -0
- package/dist/components/date-range-field/date-range-field-input.js +1 -0
- package/dist/components/date-range-field/date-range-field-input.vue.d.ts +22 -0
- package/dist/components/date-range-field/date-range-field-root.js +1 -0
- package/dist/components/date-range-field/date-range-field-root.vue.d.ts +55 -0
- package/dist/components/date-range-field/index.d.ts +6 -0
- package/dist/components/date-range-field/index.js +1 -0
- package/dist/components/date-range-field/types.d.ts +280 -0
- package/dist/components/date-range-picker/context.d.ts +9 -0
- package/dist/components/date-range-picker/context.js +1 -0
- package/dist/components/date-range-picker/date-range-picker-compact.js +1 -0
- package/dist/components/date-range-picker/date-range-picker-compact.vue.d.ts +31 -0
- package/dist/components/date-range-picker/date-range-picker-popup.js +1 -0
- package/dist/components/date-range-picker/date-range-picker-popup.vue.d.ts +21 -0
- package/dist/components/date-range-picker/date-range-picker-root.js +1 -0
- package/dist/components/date-range-picker/date-range-picker-root.vue.d.ts +50 -0
- package/dist/components/date-range-picker/date-range-picker-trigger.js +1 -0
- package/dist/components/date-range-picker/date-range-picker-trigger.vue.d.ts +21 -0
- package/dist/components/date-range-picker/index.d.ts +7 -0
- package/dist/components/date-range-picker/index.js +1 -0
- package/dist/components/date-range-picker/types.d.ts +282 -0
- package/dist/components/dialog/dialog-compact.js +1 -1
- package/dist/components/dialog/dialog-compact.vue.d.ts +6 -6
- package/dist/components/dialog/dialog-root.js +1 -1
- package/dist/components/dialog/types.d.ts +196 -2
- package/dist/components/dropdown-menu/dropdown-menu-checkbox-compact.js +1 -1
- package/dist/components/dropdown-menu/dropdown-menu-checkbox-compact.vue.d.ts +2 -2
- package/dist/components/dropdown-menu/dropdown-menu-compact.js +1 -1
- package/dist/components/dropdown-menu/dropdown-menu-compact.vue.d.ts +2 -2
- package/dist/components/dropdown-menu/dropdown-menu-radio-compact.js +1 -1
- package/dist/components/dropdown-menu/dropdown-menu-radio-compact.vue.d.ts +2 -2
- package/dist/components/dropdown-menu/dropdown-menu-root.js +1 -1
- package/dist/components/dropdown-menu/dropdown-menu-root.vue.d.ts +1 -1
- package/dist/components/dropdown-menu/dropdown-menu-wrapper-compact.js +1 -1
- package/dist/components/dropdown-menu/dropdown-menu-wrapper-compact.vue.d.ts +2 -2
- package/dist/components/dropdown-menu/index.d.ts +2 -2
- package/dist/components/dropdown-menu/index.js +1 -1
- package/dist/components/dropdown-menu/types.d.ts +84 -0
- package/dist/components/editable/editable-compact.js +1 -0
- package/dist/components/editable/editable-compact.vue.d.ts +23 -0
- package/dist/components/editable/editable-root.vue.d.ts +1 -1
- package/dist/components/editable/index.d.ts +8 -7
- package/dist/components/editable/index.js +1 -1
- package/dist/components/editable/types.d.ts +151 -2
- package/dist/components/empty/types.d.ts +24 -0
- package/dist/components/form/core/types.d.ts +396 -13
- package/dist/components/form/types.d.ts +27 -0
- package/dist/components/hover-card/hover-card-compact.js +1 -0
- package/dist/components/hover-card/hover-card-compact.vue.d.ts +30 -0
- package/dist/components/hover-card/hover-card-positioner-impl.js +1 -1
- package/dist/components/hover-card/hover-card-positioner.js +1 -1
- package/dist/components/hover-card/hover-card-positioner.vue.d.ts +1 -0
- package/dist/components/hover-card/hover-card-root.vue.d.ts +1 -1
- package/dist/components/hover-card/index.d.ts +8 -7
- package/dist/components/hover-card/index.js +1 -1
- package/dist/components/hover-card/types.d.ts +72 -1
- package/dist/components/input/input-root.js +1 -1
- package/dist/components/input/types.d.ts +21 -0
- package/dist/components/input-number/types.d.ts +30 -0
- package/dist/components/input-otp/index.d.ts +1 -2
- package/dist/components/input-otp/index.js +1 -1
- package/dist/components/input-otp/input-otp-compact.vue.d.ts +2 -2
- package/dist/components/input-otp/input-otp-root.vue.d.ts +3 -3
- package/dist/components/input-otp/types.d.ts +186 -0
- package/dist/components/kbd/types.d.ts +6 -0
- package/dist/components/label/types.d.ts +3 -0
- package/dist/components/layout/layout-classic-compact.vue.d.ts +1 -1
- package/dist/components/layout/layout-compact.vue.d.ts +1 -1
- package/dist/components/layout/layout-root.vue.d.ts +1 -1
- package/dist/components/layout/types.d.ts +124 -10
- package/dist/components/link/link.vue.d.ts +1 -1
- package/dist/components/link/types.d.ts +12 -0
- package/dist/components/list/types.d.ts +21 -0
- package/dist/components/listbox/index.js +1 -1
- package/dist/components/listbox/listbox-root.js +1 -1
- package/dist/components/listbox/listbox-root.vue.d.ts +2 -2
- package/dist/components/listbox/types.d.ts +66 -0
- package/dist/components/menu/hooks.js +1 -1
- package/dist/components/menu/index.d.ts +2 -2
- package/dist/components/menu/index.js +1 -1
- package/dist/components/menu/menu-checkbox-options-compact.js +1 -1
- package/dist/components/menu/menu-option-compact.js +1 -1
- package/dist/components/menu/menu-option-compact.vue.d.ts +2 -2
- package/dist/components/menu/menu-options-compact.js +1 -1
- package/dist/components/menu/menu-options-compact.vue.d.ts +2 -2
- package/dist/components/menu/menu-radio-options-compact.js +1 -1
- package/dist/components/menu/menu-root.js +1 -1
- package/dist/components/menu/types.d.ts +267 -3
- package/dist/components/menubar/index.js +1 -1
- package/dist/components/menubar/menubar-compact.js +1 -1
- package/dist/components/menubar/menubar-compact.vue.d.ts +2 -2
- package/dist/components/menubar/types.d.ts +72 -0
- package/dist/components/month-picker/context.d.ts +9 -0
- package/dist/components/month-picker/context.js +1 -0
- package/dist/components/month-picker/index.d.ts +6 -0
- package/dist/components/month-picker/index.js +1 -0
- package/dist/components/month-picker/month-picker-popup.js +1 -0
- package/dist/components/month-picker/month-picker-popup.vue.d.ts +36 -0
- package/dist/components/month-picker/month-picker-root.js +1 -0
- package/dist/components/month-picker/month-picker-root.vue.d.ts +39 -0
- package/dist/components/month-picker/month-picker-trigger.js +1 -0
- package/dist/components/{autocomplete/autocomplete-trigger.vue.d.ts → month-picker/month-picker-trigger.vue.d.ts} +3 -3
- package/dist/components/month-picker/types.d.ts +202 -0
- package/dist/components/month-range-picker/context.d.ts +9 -0
- package/dist/components/month-range-picker/context.js +1 -0
- package/dist/components/month-range-picker/index.d.ts +6 -0
- package/dist/components/month-range-picker/index.js +1 -0
- package/dist/components/month-range-picker/month-range-picker-popup.js +1 -0
- package/dist/components/month-range-picker/month-range-picker-popup.vue.d.ts +39 -0
- package/dist/components/month-range-picker/month-range-picker-root.js +1 -0
- package/dist/components/month-range-picker/month-range-picker-root.vue.d.ts +43 -0
- package/dist/components/month-range-picker/month-range-picker-trigger.js +1 -0
- package/dist/components/month-range-picker/month-range-picker-trigger.vue.d.ts +21 -0
- package/dist/components/month-range-picker/types.d.ts +234 -0
- package/dist/components/navigation-menu/index.d.ts +12 -11
- package/dist/components/navigation-menu/index.js +1 -1
- package/dist/components/navigation-menu/navigation-menu-compact.js +1 -0
- package/dist/components/navigation-menu/navigation-menu-compact.vue.d.ts +34 -0
- package/dist/components/navigation-menu/navigation-menu-root.vue.d.ts +1 -1
- package/dist/components/navigation-menu/types.d.ts +153 -2
- package/dist/components/page-tabs/types.d.ts +24 -0
- package/dist/components/pagination/index.d.ts +11 -10
- package/dist/components/pagination/index.js +1 -1
- package/dist/components/pagination/pagination-compact.js +1 -0
- package/dist/components/pagination/pagination-compact.vue.d.ts +23 -0
- package/dist/components/pagination/types.d.ts +117 -1
- package/dist/components/popover/context.d.ts +9 -0
- package/dist/components/popover/context.js +1 -1
- package/dist/components/popover/index.d.ts +10 -9
- package/dist/components/popover/index.js +1 -1
- package/dist/components/popover/popover-compact.js +1 -0
- package/dist/components/popover/popover-compact.vue.d.ts +36 -0
- package/dist/components/popover/popover-root.js +1 -1
- package/dist/components/popover/popover-root.vue.d.ts +0 -2
- package/dist/components/popover/popover-trigger.js +1 -1
- package/dist/components/popover/types.d.ts +111 -6
- package/dist/components/popper/index.js +1 -1
- package/dist/components/popper/popper-anchor.js +1 -1
- package/dist/components/popper/popper-positioner.vue.d.ts +2 -2
- package/dist/components/popper/types.d.ts +22 -1
- package/dist/components/portal/types.d.ts +3 -0
- package/dist/components/primitive/types.d.ts +6 -0
- package/dist/components/progress/types.d.ts +81 -0
- package/dist/components/radio-group/types.d.ts +66 -0
- package/dist/components/range-calendar/context.d.ts +9 -0
- package/dist/components/range-calendar/context.js +1 -0
- package/dist/components/range-calendar/index.d.ts +16 -0
- package/dist/components/range-calendar/index.js +1 -0
- package/dist/components/range-calendar/range-calendar-cell-trigger.js +1 -0
- package/dist/components/range-calendar/range-calendar-cell-trigger.vue.d.ts +33 -0
- package/dist/components/range-calendar/range-calendar-cell.js +1 -0
- package/dist/components/range-calendar/range-calendar-cell.vue.d.ts +21 -0
- package/dist/components/range-calendar/range-calendar-compact.js +1 -0
- package/dist/components/range-calendar/range-calendar-compact.vue.d.ts +25 -0
- package/dist/components/range-calendar/range-calendar-grid-body.js +1 -0
- package/dist/components/range-calendar/range-calendar-grid-body.vue.d.ts +21 -0
- package/dist/components/range-calendar/range-calendar-grid-head.js +1 -0
- package/dist/components/range-calendar/range-calendar-grid-head.vue.d.ts +21 -0
- package/dist/components/range-calendar/range-calendar-grid-row.js +1 -0
- package/dist/components/range-calendar/range-calendar-grid-row.vue.d.ts +21 -0
- package/dist/components/range-calendar/range-calendar-grid.js +1 -0
- package/dist/components/range-calendar/range-calendar-grid.vue.d.ts +21 -0
- package/dist/components/range-calendar/range-calendar-head-cell.js +1 -0
- package/dist/components/range-calendar/range-calendar-head-cell.vue.d.ts +21 -0
- package/dist/components/range-calendar/range-calendar-header.js +1 -0
- package/dist/components/range-calendar/range-calendar-header.vue.d.ts +21 -0
- package/dist/components/range-calendar/range-calendar-heading.js +1 -0
- package/dist/components/range-calendar/range-calendar-heading.vue.d.ts +22 -0
- package/dist/components/range-calendar/range-calendar-next.js +1 -0
- package/dist/components/range-calendar/range-calendar-next.vue.d.ts +24 -0
- package/dist/components/range-calendar/range-calendar-prev.js +1 -0
- package/dist/components/range-calendar/range-calendar-prev.vue.d.ts +24 -0
- package/dist/components/range-calendar/range-calendar-root.js +1 -0
- package/dist/components/range-calendar/range-calendar-root.vue.d.ts +55 -0
- package/dist/components/range-calendar/types.d.ts +488 -0
- package/dist/components/range-calendar/use-range-calendar.js +1 -0
- package/dist/components/roving-focus/types.d.ts +18 -0
- package/dist/components/scroll-area/types.d.ts +33 -0
- package/dist/components/segment/types.d.ts +36 -0
- package/dist/components/select/select-content.vue.d.ts +1 -1
- package/dist/components/select/types.d.ts +240 -0
- package/dist/components/separator/types.d.ts +12 -0
- package/dist/components/skeleton/types.d.ts +3 -0
- package/dist/components/slider/slider-root.vue.d.ts +2 -2
- package/dist/components/slider/types.d.ts +90 -0
- package/dist/components/splitter/splitter-group.vue.d.ts +1 -1
- package/dist/components/splitter/types.d.ts +114 -0
- package/dist/components/stepper/index.d.ts +10 -9
- package/dist/components/stepper/index.js +1 -1
- package/dist/components/stepper/stepper-compact.js +1 -0
- package/dist/components/stepper/stepper-compact.vue.d.ts +19 -0
- package/dist/components/stepper/stepper-root.vue.d.ts +2 -2
- package/dist/components/stepper/types.d.ts +136 -2
- package/dist/components/switch/types.d.ts +21 -0
- package/dist/components/table/table-compact.vue.d.ts +2 -2
- package/dist/components/table/types.d.ts +819 -0
- package/dist/components/tabs/tabs-root.vue.d.ts +1 -1
- package/dist/components/tabs/types.d.ts +75 -0
- package/dist/components/tag/types.d.ts +12 -0
- package/dist/components/tags-input/types.d.ts +63 -0
- package/dist/components/textarea/types.d.ts +27 -0
- package/dist/components/time-field/context.d.ts +9 -0
- package/dist/components/time-field/context.js +1 -0
- package/dist/components/time-field/index.d.ts +5 -0
- package/dist/components/time-field/index.js +1 -0
- package/dist/components/time-field/time-field-input.js +1 -0
- package/dist/components/time-field/time-field-input.vue.d.ts +21 -0
- package/dist/components/time-field/time-field-root.js +1 -0
- package/dist/components/time-field/time-field-root.vue.d.ts +43 -0
- package/dist/components/time-field/types.d.ts +201 -0
- package/dist/components/time-picker/context.d.ts +9 -0
- package/dist/components/time-picker/context.js +1 -0
- package/dist/components/time-picker/index.d.ts +6 -0
- package/dist/components/time-picker/index.js +1 -0
- package/dist/components/time-picker/time-picker-popup.js +1 -0
- package/dist/components/time-picker/time-picker-popup.vue.d.ts +27 -0
- package/dist/components/time-picker/time-picker-root.js +1 -0
- package/dist/components/time-picker/time-picker-root.vue.d.ts +45 -0
- package/dist/components/time-picker/time-picker-trigger.js +1 -0
- package/dist/components/time-picker/time-picker-trigger.vue.d.ts +21 -0
- package/dist/components/time-picker/types.d.ts +224 -0
- package/dist/components/time-range-field/context.d.ts +9 -0
- package/dist/components/time-range-field/context.js +1 -0
- package/dist/components/time-range-field/index.d.ts +6 -0
- package/dist/components/time-range-field/index.js +1 -0
- package/dist/components/time-range-field/time-range-field-compact.js +1 -0
- package/dist/components/time-range-field/time-range-field-compact.vue.d.ts +29 -0
- package/dist/components/time-range-field/time-range-field-input.js +1 -0
- package/dist/components/time-range-field/time-range-field-input.vue.d.ts +22 -0
- package/dist/components/time-range-field/time-range-field-root.js +1 -0
- package/dist/components/time-range-field/time-range-field-root.vue.d.ts +53 -0
- package/dist/components/time-range-field/types.d.ts +280 -0
- package/dist/components/time-range-picker/context.d.ts +9 -0
- package/dist/components/time-range-picker/context.js +1 -0
- package/dist/components/time-range-picker/index.d.ts +7 -0
- package/dist/components/time-range-picker/index.js +1 -0
- package/dist/components/time-range-picker/time-range-picker-compact.js +1 -0
- package/dist/components/time-range-picker/time-range-picker-compact.vue.d.ts +31 -0
- package/dist/components/time-range-picker/time-range-picker-popup.js +1 -0
- package/dist/components/time-range-picker/time-range-picker-popup.vue.d.ts +30 -0
- package/dist/components/time-range-picker/time-range-picker-root.js +1 -0
- package/dist/components/time-range-picker/time-range-picker-root.vue.d.ts +50 -0
- package/dist/components/time-range-picker/time-range-picker-trigger.js +1 -0
- package/dist/components/time-range-picker/time-range-picker-trigger.vue.d.ts +21 -0
- package/dist/components/time-range-picker/types.d.ts +304 -0
- package/dist/components/toast/shared.js +1 -1
- package/dist/components/toast/toaster.vue.d.ts +2 -2
- package/dist/components/toast/types.d.ts +224 -4
- package/dist/components/toggle/toggle.vue.d.ts +1 -1
- package/dist/components/toggle/types.d.ts +9 -0
- package/dist/components/toggle-group/types.d.ts +15 -0
- package/dist/components/toolbar/types.d.ts +48 -0
- package/dist/components/tooltip/index.js +1 -1
- package/dist/components/tooltip/tooltip-popup.js +1 -1
- package/dist/components/tooltip/tooltip-root.vue.d.ts +1 -1
- package/dist/components/tooltip/types.d.ts +27 -0
- package/dist/components/tree/types.d.ts +75 -0
- package/dist/components/tree-menu/tree-menu-root.vue.d.ts +1 -1
- package/dist/components/tree-menu/types.d.ts +60 -0
- package/dist/components/virtualizer/types.d.ts +33 -0
- package/dist/components/visually-hidden/types.d.ts +30 -0
- package/dist/components/year-picker/context.d.ts +9 -0
- package/dist/components/year-picker/context.js +1 -0
- package/dist/components/year-picker/index.d.ts +6 -0
- package/dist/components/year-picker/index.js +1 -0
- package/dist/components/year-picker/types.d.ts +207 -0
- package/dist/components/year-picker/year-picker-popup.js +1 -0
- package/dist/components/year-picker/year-picker-popup.vue.d.ts +36 -0
- package/dist/components/year-picker/year-picker-root.js +1 -0
- package/dist/components/year-picker/year-picker-root.vue.d.ts +39 -0
- package/dist/components/year-picker/year-picker-trigger.js +1 -0
- package/dist/components/year-picker/year-picker-trigger.vue.d.ts +21 -0
- package/dist/components/year-range-picker/context.d.ts +9 -0
- package/dist/components/year-range-picker/context.js +1 -0
- package/dist/components/year-range-picker/index.d.ts +6 -0
- package/dist/components/year-range-picker/index.js +1 -0
- package/dist/components/year-range-picker/types.d.ts +239 -0
- package/dist/components/year-range-picker/year-range-picker-popup.js +1 -0
- package/dist/components/year-range-picker/year-range-picker-popup.vue.d.ts +39 -0
- package/dist/components/year-range-picker/year-range-picker-root.js +1 -0
- package/dist/components/year-range-picker/year-range-picker-root.vue.d.ts +43 -0
- package/dist/components/year-range-picker/year-range-picker-trigger.js +1 -0
- package/dist/components/year-range-picker/year-range-picker-trigger.vue.d.ts +21 -0
- package/dist/composables/use-collection.js +1 -1
- package/dist/composables/use-hide-others.d.ts +2 -1
- package/dist/composables/use-hide-others.js +1 -1
- package/dist/constants/components.d.ts +19 -5
- package/dist/constants/components.js +1 -1
- package/dist/constants/index.d.ts +2 -1
- package/dist/constants/index.js +1 -1
- package/dist/{components/input-otp → constants}/regexp.d.ts +1 -1
- package/dist/date/comparators.d.ts +24 -14
- package/dist/date/comparators.js +1 -1
- package/dist/date/formatter.d.ts +27 -0
- package/dist/date/formatter.js +1 -0
- package/dist/date/index.d.ts +10 -4
- package/dist/date/index.js +1 -1
- package/dist/date/parser.d.ts +34 -0
- package/dist/date/parser.js +1 -0
- package/dist/date/parts.d.ts +15 -0
- package/dist/date/parts.js +1 -0
- package/dist/date/placeholders.d.ts +23 -0
- package/dist/date/placeholders.js +1 -0
- package/dist/date/segment.d.ts +7 -0
- package/dist/date/segment.js +1 -0
- package/dist/date/types.d.ts +34 -21
- package/dist/date/use-date-field.d.ts +50 -0
- package/dist/date/use-date-field.js +1 -0
- package/dist/date/utils.d.ts +15 -1
- package/dist/date/utils.js +1 -1
- package/dist/index.d.ts +460 -375
- package/dist/index.js +1 -1
- package/dist/namespaced/index.d.ts +884 -725
- package/dist/namespaced/index.js +1 -1
- package/dist/node_modules/.pnpm/@soybeanjs_utils@0.1.1/node_modules/@soybeanjs/utils/dist/index.js +1 -0
- package/dist/node_modules/.pnpm/embla-carousel@8.6.0/node_modules/embla-carousel/esm/components/Alignment.d.ts +4 -0
- package/dist/node_modules/.pnpm/embla-carousel@8.6.0/node_modules/embla-carousel/esm/components/Animations.d.ts +11 -0
- package/dist/node_modules/.pnpm/embla-carousel@8.6.0/node_modules/embla-carousel/esm/components/Axis.d.ts +16 -0
- package/dist/node_modules/.pnpm/embla-carousel@8.6.0/node_modules/embla-carousel/esm/components/Counter.d.ts +9 -0
- package/dist/node_modules/.pnpm/embla-carousel@8.6.0/node_modules/embla-carousel/esm/components/DragHandler.d.ts +13 -0
- package/dist/node_modules/.pnpm/embla-carousel@8.6.0/node_modules/embla-carousel/esm/components/DragTracker.d.ts +4 -0
- package/dist/node_modules/.pnpm/embla-carousel@8.6.0/node_modules/embla-carousel/esm/components/EmblaCarousel.d.ts +31 -0
- package/dist/node_modules/.pnpm/embla-carousel@8.6.0/node_modules/embla-carousel/esm/components/Engine.d.ts +67 -0
- package/dist/node_modules/.pnpm/embla-carousel@8.6.0/node_modules/embla-carousel/esm/components/EventHandler.d.ts +29 -0
- package/dist/node_modules/.pnpm/embla-carousel@8.6.0/node_modules/embla-carousel/esm/components/EventStore.d.ts +10 -0
- package/dist/node_modules/.pnpm/embla-carousel@8.6.0/node_modules/embla-carousel/esm/components/Limit.d.ts +13 -0
- package/dist/node_modules/.pnpm/embla-carousel@8.6.0/node_modules/embla-carousel/esm/components/NodeRects.d.ts +11 -0
- package/dist/node_modules/.pnpm/embla-carousel@8.6.0/node_modules/embla-carousel/esm/components/Options.d.ts +43 -0
- package/dist/node_modules/.pnpm/embla-carousel@8.6.0/node_modules/embla-carousel/esm/components/OptionsHandler.d.ts +11 -0
- package/dist/node_modules/.pnpm/embla-carousel@8.6.0/node_modules/embla-carousel/esm/components/PercentOfView.d.ts +6 -0
- package/dist/node_modules/.pnpm/embla-carousel@8.6.0/node_modules/embla-carousel/esm/components/Plugins.d.ts +20 -0
- package/dist/node_modules/.pnpm/embla-carousel@8.6.0/node_modules/embla-carousel/esm/components/ResizeHandler.d.ts +11 -0
- package/dist/node_modules/.pnpm/embla-carousel@8.6.0/node_modules/embla-carousel/esm/components/ScrollBody.d.ts +14 -0
- package/dist/node_modules/.pnpm/embla-carousel@8.6.0/node_modules/embla-carousel/esm/components/ScrollBounds.d.ts +8 -0
- package/dist/node_modules/.pnpm/embla-carousel@8.6.0/node_modules/embla-carousel/esm/components/ScrollContain.d.ts +4 -0
- package/dist/node_modules/.pnpm/embla-carousel@8.6.0/node_modules/embla-carousel/esm/components/ScrollLooper.d.ts +6 -0
- package/dist/node_modules/.pnpm/embla-carousel@8.6.0/node_modules/embla-carousel/esm/components/ScrollProgress.d.ts +6 -0
- package/dist/node_modules/.pnpm/embla-carousel@8.6.0/node_modules/embla-carousel/esm/components/ScrollTarget.d.ts +12 -0
- package/dist/node_modules/.pnpm/embla-carousel@8.6.0/node_modules/embla-carousel/esm/components/ScrollTo.d.ts +7 -0
- package/dist/node_modules/.pnpm/embla-carousel@8.6.0/node_modules/embla-carousel/esm/components/SlideFocus.d.ts +10 -0
- package/dist/node_modules/.pnpm/embla-carousel@8.6.0/node_modules/embla-carousel/esm/components/SlideLooper.d.ts +19 -0
- package/dist/node_modules/.pnpm/embla-carousel@8.6.0/node_modules/embla-carousel/esm/components/SlideRegistry.d.ts +6 -0
- package/dist/node_modules/.pnpm/embla-carousel@8.6.0/node_modules/embla-carousel/esm/components/SlidesHandler.d.ts +11 -0
- package/dist/node_modules/.pnpm/embla-carousel@8.6.0/node_modules/embla-carousel/esm/components/SlidesInView.d.ts +9 -0
- package/dist/node_modules/.pnpm/embla-carousel@8.6.0/node_modules/embla-carousel/esm/components/SlidesToScroll.d.ts +7 -0
- package/dist/node_modules/.pnpm/embla-carousel@8.6.0/node_modules/embla-carousel/esm/components/Translate.d.ts +8 -0
- package/dist/node_modules/.pnpm/embla-carousel@8.6.0/node_modules/embla-carousel/esm/components/Vector1d.d.ts +9 -0
- package/dist/node_modules/.pnpm/embla-carousel@8.6.0/node_modules/embla-carousel/esm/components/utils.d.ts +4 -0
- package/dist/resolver/index.js +1 -1
- package/dist/shared/index.d.ts +3 -2
- package/dist/shared/index.js +1 -1
- package/dist/shared/string.d.ts +1 -34
- package/dist/shared/string.js +1 -1
- package/dist/shared/time-picker.d.ts +30 -0
- package/dist/shared/time-picker.js +1 -0
- package/dist/types/common.d.ts +9 -1
- package/dist/types/dom.d.ts +3 -1
- package/dist/types/event.d.ts +10 -1
- package/dist/types/index.d.ts +5 -4
- package/dist/types/index.js +0 -0
- package/dist/types/vue.d.ts +4 -1
- package/package.json +13 -8
- package/dist/components/autocomplete/autocomplete-anchor.js +0 -1
- package/dist/components/autocomplete/autocomplete-content.js +0 -1
- package/dist/components/autocomplete/autocomplete-content.vue.d.ts +0 -24
- package/dist/components/autocomplete/autocomplete-group-label.js +0 -1
- package/dist/components/autocomplete/autocomplete-group-label.vue.d.ts +0 -18
- package/dist/components/autocomplete/autocomplete-group.js +0 -1
- package/dist/components/autocomplete/autocomplete-group.vue.d.ts +0 -18
- package/dist/components/autocomplete/autocomplete-item-indicator.js +0 -1
- package/dist/components/autocomplete/autocomplete-item-indicator.vue.d.ts +0 -18
- package/dist/components/autocomplete/autocomplete-item.js +0 -1
- package/dist/components/autocomplete/autocomplete-item.vue.d.ts +0 -26
- package/dist/components/autocomplete/autocomplete-separator.js +0 -1
- package/dist/components/autocomplete/autocomplete-separator.vue.d.ts +0 -18
- package/dist/components/autocomplete/autocomplete-trigger.js +0 -1
- package/dist/components/autocomplete/autocomplete-viewport.js +0 -1
- package/dist/components/autocomplete/autocomplete-viewport.vue.d.ts +0 -18
- package/dist/components/combobox/combobox-anchor.js +0 -1
- package/dist/components/combobox/combobox-anchor.vue.d.ts +0 -18
- package/dist/components/combobox/combobox-group-label.js +0 -1
- package/dist/components/combobox/combobox-group-label.vue.d.ts +0 -18
- package/dist/components/combobox/combobox-item-indicator.js +0 -1
- package/dist/node_modules/.pnpm/@soybeanjs_utils@0.1.0/node_modules/@soybeanjs/utils/dist/index.js +0 -1
- /package/dist/{components/input-otp → constants}/regexp.js +0 -0
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { AsTag } from "../primitive/types.js";
|
|
2
|
+
import { MonthPickerPopupProps } from "./types.js";
|
|
3
|
+
import * as _$vue from "vue";
|
|
4
|
+
import { DateValue } from "@internationalized/date";
|
|
5
|
+
|
|
6
|
+
//#region src/components/month-picker/month-picker-popup.vue.d.ts
|
|
7
|
+
type __VLS_Slots = {
|
|
8
|
+
heading?: (props: {
|
|
9
|
+
headingValue: string;
|
|
10
|
+
}) => any;
|
|
11
|
+
prev?: (props: {
|
|
12
|
+
disabled: boolean;
|
|
13
|
+
}) => any;
|
|
14
|
+
next?: (props: {
|
|
15
|
+
disabled: boolean;
|
|
16
|
+
}) => any;
|
|
17
|
+
month?: (props: {
|
|
18
|
+
date: DateValue;
|
|
19
|
+
label: string;
|
|
20
|
+
disabled: boolean;
|
|
21
|
+
focused: boolean;
|
|
22
|
+
selected: boolean;
|
|
23
|
+
}) => any;
|
|
24
|
+
};
|
|
25
|
+
declare const __VLS_base: _$vue.DefineComponent<MonthPickerPopupProps, {}, {}, {}, {}, _$vue.ComponentOptionsMixin, _$vue.ComponentOptionsMixin, {}, string, _$vue.PublicProps, Readonly<MonthPickerPopupProps> & Readonly<{}>, {
|
|
26
|
+
as: AsTag | _$vue.Component;
|
|
27
|
+
}, {}, {}, {}, string, _$vue.ComponentProvideOptions, false, {}, any>;
|
|
28
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
29
|
+
declare const _default: typeof __VLS_export;
|
|
30
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
31
|
+
new (): {
|
|
32
|
+
$slots: S;
|
|
33
|
+
};
|
|
34
|
+
};
|
|
35
|
+
//#endregion
|
|
36
|
+
export { _default };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{compareYearMonth as e,getDefaultDate as t,toDate as n}from"../../date/comparators.js";import{useDateFormatter as r}from"../../date/formatter.js";import"../../date/index.js";import{useControllableState as i}from"../../composables/use-controllable-state.js";import"../../composables/index.js";import{useDirection as a,useLocale as o}from"../config-provider/context.js";import{Primitive as s}from"../primitive/primitive.js";import"../primitive/index.js";import{provideMonthPickerRootContext as c,useMonthPickerUi as l}from"./context.js";import{computed as u,createBlock as d,defineComponent as f,normalizeClass as p,openBlock as m,renderSlot as h,shallowRef as g,unref as _,useId as v,watch as y,withCtx as b}from"vue";const x=f({name:`MonthPickerRoot`,__name:`month-picker-root`,props:{defaultValue:{default:void 0},defaultPlaceholder:{default:void 0},placeholder:{default:void 0},modelValue:{},minValue:{},maxValue:{},locale:{},disabled:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},id:{},dir:{},defaultOpen:{type:Boolean,default:!1},open:{type:Boolean,default:void 0},modal:{type:Boolean,default:!1},asChild:{type:Boolean},as:{},name:{},required:{type:Boolean}},emits:[`update:modelValue`,`update:placeholder`,`update:open`],setup(f,{emit:x}){let S=f,C=x,w=l(`root`),T=v(),E=o(()=>S.locale),D=a(()=>S.dir),O=r(E.value),k=i(()=>S.modelValue,e=>C(`update:modelValue`,e),S.defaultValue),A=t({defaultPlaceholder:S.placeholder,defaultValue:k.value,locale:S.locale}).set({day:1}),j=i(()=>S.placeholder,e=>C(`update:placeholder`,e),S.defaultPlaceholder?.set({day:1})??A.copy()),M=i(()=>S.open,e=>C(`update:open`,e??!1),S.defaultOpen),N=g((k.value??j.value).set({day:1})),P=u(()=>S.minValue?.set({day:1})),F=u(()=>S.maxValue?.set({day:1})),I=t=>!!(S.disabled||P.value&&e(t,P.value)<0||F.value&&e(t,F.value)>0),L=t=>k.value?e(t,k.value.set({day:1}))===0:!1,R=u(()=>k.value?I(k.value.set({day:1})):!1),z=u(()=>k.value?O.fullMonthAndYear(n(k.value.set({day:1}))):``),B=u(()=>O.fullYear(n(j.value.set({day:1})))),V=e=>{let t=e.set({day:1});j.value=t.copy(),N.value=t.copy()};return y(E,e=>{O.getLocale()!==e&&O.setLocale(e)}),y(k,t=>{if(!t){N.value=j.value.set({day:1}).copy();return}let n=t.set({day:1});e(j.value,n)!==0&&(j.value=n.copy()),N.value=n.copy()}),c({locale:E,dir:D,modelValue:k,placeholder:j,isInvalid:R,formatter:O,open:M,popupId:T,displayValue:z,headingValue:B,focusedMonth:N,minValue:P,maxValue:F,onMonthChange:e=>{let t=e.set({day:1});S.readonly||I(t)||(k.value=t.copy(),V(t),M.value=!1)},onPlaceholderChange:V,isMonthDisabled:I,isMonthSelected:L,setOpen(e){M.value=e},setFocusedMonth:e=>{N.value=e.set({day:1}).copy()},prevPage:()=>{V(j.value.subtract({years:1}))},nextPage:()=>{V(j.value.add({years:1}))},isPrevButtonDisabled:()=>S.disabled?!0:P.value?e(j.value.subtract({years:1}).set({month:12,day:1}),P.value)<0:!1,isNextButtonDisabled:()=>S.disabled?!0:F.value?e(j.value.add({years:1}).set({month:1,day:1}),F.value)>0:!1,disabled:u(()=>S.disabled),readonly:u(()=>S.readonly)}),(e,t)=>(m(),d(_(s),{as:f.as,"as-child":f.asChild,class:p(_(w)),"data-disabled":f.disabled?``:void 0,"data-invalid":R.value?``:void 0,"data-readonly":f.readonly?``:void 0,dir:_(D),"data-slot":`root`},{default:b(()=>[h(e.$slots,`default`,{displayValue:z.value,modelValue:_(k),open:!!_(M)})]),_:3},8,[`as`,`as-child`,`class`,`data-disabled`,`data-invalid`,`data-readonly`,`dir`]))}});export{x as default};
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { MonthPickerRootProps } from "./types.js";
|
|
2
|
+
import * as _$vue from "vue";
|
|
3
|
+
import { DateValue } from "@internationalized/date";
|
|
4
|
+
|
|
5
|
+
//#region src/components/month-picker/month-picker-root.vue.d.ts
|
|
6
|
+
type __VLS_Slots = {
|
|
7
|
+
default?: (props: {
|
|
8
|
+
modelValue: DateValue | undefined;
|
|
9
|
+
displayValue: string;
|
|
10
|
+
open: boolean;
|
|
11
|
+
}) => any;
|
|
12
|
+
};
|
|
13
|
+
declare const __VLS_base: _$vue.DefineComponent<MonthPickerRootProps, {}, {}, {}, {}, _$vue.ComponentOptionsMixin, _$vue.ComponentOptionsMixin, {
|
|
14
|
+
"update:modelValue": (date: DateValue | undefined) => any;
|
|
15
|
+
"update:open": (open: boolean) => any;
|
|
16
|
+
"update:placeholder": (date: DateValue) => any;
|
|
17
|
+
}, string, _$vue.PublicProps, Readonly<MonthPickerRootProps> & Readonly<{
|
|
18
|
+
"onUpdate:modelValue"?: ((date: DateValue | undefined) => any) | undefined;
|
|
19
|
+
"onUpdate:open"?: ((open: boolean) => any) | undefined;
|
|
20
|
+
"onUpdate:placeholder"?: ((date: DateValue) => any) | undefined;
|
|
21
|
+
}>, {
|
|
22
|
+
placeholder: DateValue;
|
|
23
|
+
disabled: boolean;
|
|
24
|
+
defaultValue: DateValue;
|
|
25
|
+
open: boolean;
|
|
26
|
+
defaultOpen: boolean;
|
|
27
|
+
readonly: boolean;
|
|
28
|
+
defaultPlaceholder: DateValue;
|
|
29
|
+
modal: boolean;
|
|
30
|
+
}, {}, {}, {}, string, _$vue.ComponentProvideOptions, false, {}, any>;
|
|
31
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
32
|
+
declare const _default: typeof __VLS_export;
|
|
33
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
34
|
+
new (): {
|
|
35
|
+
$slots: S;
|
|
36
|
+
};
|
|
37
|
+
};
|
|
38
|
+
//#endregion
|
|
39
|
+
export { _default };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{Primitive as e}from"../primitive/primitive.js";import"../primitive/index.js";import{useMonthPickerRootContext as t,useMonthPickerUi as n}from"./context.js";import{createBlock as r,defineComponent as i,normalizeClass as a,openBlock as o,renderSlot as s,unref as c,withCtx as l}from"vue";const u=i({name:`MonthPickerTrigger`,__name:`month-picker-trigger`,props:{asChild:{type:Boolean},as:{default:`button`}},setup(i){let u=n(`trigger`),{disabled:d,readonly:f,open:p,setOpen:m,popupId:h}=t(`MonthPickerTrigger`),g=()=>{d.value||f.value||m(!p.value)};return(t,n)=>(o(),r(c(e),{as:i.as,"as-child":i.asChild,"aria-controls":c(h),"aria-disabled":c(d)?!0:void 0,"aria-expanded":!!c(p),class:a(c(u)),"data-disabled":c(d)?``:void 0,"data-state":c(p)?`open`:`closed`,"data-slot":`trigger`,type:`button`,onClick:g},{default:l(()=>[s(t.$slots,`default`)]),_:3},8,[`as`,`as-child`,`aria-controls`,`aria-disabled`,`aria-expanded`,`class`,`data-disabled`,`data-state`]))}});export{u as default};
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { AsTag } from "../primitive/types.js";
|
|
2
|
-
import {
|
|
2
|
+
import { MonthPickerTriggerProps } from "./types.js";
|
|
3
3
|
import * as _$vue from "vue";
|
|
4
4
|
|
|
5
|
-
//#region src/components/
|
|
5
|
+
//#region src/components/month-picker/month-picker-trigger.vue.d.ts
|
|
6
6
|
declare var __VLS_10: {};
|
|
7
7
|
type __VLS_Slots = {} & {
|
|
8
8
|
default?: (props: typeof __VLS_10) => any;
|
|
9
9
|
};
|
|
10
|
-
declare const __VLS_base: _$vue.DefineComponent<
|
|
10
|
+
declare const __VLS_base: _$vue.DefineComponent<MonthPickerTriggerProps, {}, {}, {}, {}, _$vue.ComponentOptionsMixin, _$vue.ComponentOptionsMixin, {}, string, _$vue.PublicProps, Readonly<MonthPickerTriggerProps> & Readonly<{}>, {
|
|
11
11
|
as: AsTag | _$vue.Component;
|
|
12
12
|
}, {}, {}, {}, string, _$vue.ComponentProvideOptions, false, {}, any>;
|
|
13
13
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
import { Direction, UiClass } from "../../types/common.js";
|
|
2
|
+
import { FormFieldCommonProps } from "../../types/component.js";
|
|
3
|
+
import { PropsToContext } from "../../types/vue.js";
|
|
4
|
+
import { PrimitiveProps } from "../primitive/types.js";
|
|
5
|
+
import { Formatter } from "../../date/formatter.js";
|
|
6
|
+
import { ComputedRef, HTMLAttributes, ShallowRef } from "vue";
|
|
7
|
+
import { DateValue } from "@internationalized/date";
|
|
8
|
+
|
|
9
|
+
//#region src/components/month-picker/types.d.ts
|
|
10
|
+
/**
|
|
11
|
+
* Props for the month picker root component.
|
|
12
|
+
*/
|
|
13
|
+
interface MonthPickerRootProps extends PrimitiveProps, FormFieldCommonProps, /** @vue-ignore */Omit<HTMLAttributes, 'placeholder'> {
|
|
14
|
+
/**
|
|
15
|
+
* Default value.
|
|
16
|
+
*/
|
|
17
|
+
defaultValue?: DateValue;
|
|
18
|
+
/**
|
|
19
|
+
* Default placeholder.
|
|
20
|
+
*/
|
|
21
|
+
defaultPlaceholder?: DateValue;
|
|
22
|
+
/**
|
|
23
|
+
* Placeholder.
|
|
24
|
+
*/
|
|
25
|
+
placeholder?: DateValue;
|
|
26
|
+
/**
|
|
27
|
+
* Current model value.
|
|
28
|
+
*/
|
|
29
|
+
modelValue?: DateValue;
|
|
30
|
+
/**
|
|
31
|
+
* Min value.
|
|
32
|
+
*/
|
|
33
|
+
minValue?: DateValue;
|
|
34
|
+
/**
|
|
35
|
+
* Max value.
|
|
36
|
+
*/
|
|
37
|
+
maxValue?: DateValue;
|
|
38
|
+
/**
|
|
39
|
+
* Locale.
|
|
40
|
+
*/
|
|
41
|
+
locale?: string;
|
|
42
|
+
/**
|
|
43
|
+
* Whether the component is disabled.
|
|
44
|
+
*/
|
|
45
|
+
disabled?: boolean;
|
|
46
|
+
/**
|
|
47
|
+
* Whether the component is readonly.
|
|
48
|
+
*/
|
|
49
|
+
readonly?: boolean;
|
|
50
|
+
/**
|
|
51
|
+
* Id.
|
|
52
|
+
*/
|
|
53
|
+
id?: string;
|
|
54
|
+
/**
|
|
55
|
+
* Reading direction of the component.
|
|
56
|
+
*/
|
|
57
|
+
dir?: Direction;
|
|
58
|
+
/**
|
|
59
|
+
* Whether the component is open by default.
|
|
60
|
+
*/
|
|
61
|
+
defaultOpen?: boolean;
|
|
62
|
+
/**
|
|
63
|
+
* Whether the component is open.
|
|
64
|
+
*/
|
|
65
|
+
open?: boolean;
|
|
66
|
+
/**
|
|
67
|
+
* Whether the popup is modal.
|
|
68
|
+
*/
|
|
69
|
+
modal?: boolean;
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* Emits for the month picker root component.
|
|
73
|
+
*/
|
|
74
|
+
type MonthPickerRootEmits = {
|
|
75
|
+
/**
|
|
76
|
+
* Emitted when the model value changes.
|
|
77
|
+
*/
|
|
78
|
+
'update:modelValue': [date: DateValue | undefined];
|
|
79
|
+
/**
|
|
80
|
+
* Emitted when the placeholder value changes.
|
|
81
|
+
*/
|
|
82
|
+
'update:placeholder': [date: DateValue];
|
|
83
|
+
/**
|
|
84
|
+
* Emitted when the open state changes.
|
|
85
|
+
*/
|
|
86
|
+
'update:open': [open: boolean];
|
|
87
|
+
};
|
|
88
|
+
/**
|
|
89
|
+
* Props for the month picker trigger component.
|
|
90
|
+
*/
|
|
91
|
+
interface MonthPickerTriggerProps extends PrimitiveProps, /** @vue-ignore */HTMLAttributes {}
|
|
92
|
+
/**
|
|
93
|
+
* Props for the month picker popup component.
|
|
94
|
+
*/
|
|
95
|
+
interface MonthPickerPopupProps extends PrimitiveProps, /** @vue-ignore */HTMLAttributes {}
|
|
96
|
+
/**
|
|
97
|
+
* Context for the month picker root component.
|
|
98
|
+
*/
|
|
99
|
+
interface MonthPickerRootContext extends PropsToContext<MonthPickerRootProps, 'disabled' | 'readonly'> {
|
|
100
|
+
/**
|
|
101
|
+
* Locale used by the component context.
|
|
102
|
+
*/
|
|
103
|
+
locale: ComputedRef<string>;
|
|
104
|
+
/**
|
|
105
|
+
* Reading direction of the component.
|
|
106
|
+
*/
|
|
107
|
+
dir: ComputedRef<Direction>;
|
|
108
|
+
/**
|
|
109
|
+
* Current model value.
|
|
110
|
+
*/
|
|
111
|
+
modelValue: ShallowRef<DateValue | undefined>;
|
|
112
|
+
/**
|
|
113
|
+
* Placeholder used by the component context.
|
|
114
|
+
*/
|
|
115
|
+
placeholder: ShallowRef<DateValue>;
|
|
116
|
+
/**
|
|
117
|
+
* Whether the current value is invalid.
|
|
118
|
+
*/
|
|
119
|
+
isInvalid: ComputedRef<boolean>;
|
|
120
|
+
/**
|
|
121
|
+
* Formatter used by the component context.
|
|
122
|
+
*/
|
|
123
|
+
formatter: Formatter;
|
|
124
|
+
/**
|
|
125
|
+
* Whether the component is open.
|
|
126
|
+
*/
|
|
127
|
+
open: ShallowRef<boolean | undefined>;
|
|
128
|
+
/**
|
|
129
|
+
* Popup id used by the component context.
|
|
130
|
+
*/
|
|
131
|
+
popupId: string;
|
|
132
|
+
/**
|
|
133
|
+
* Display value used by the component context.
|
|
134
|
+
*/
|
|
135
|
+
displayValue: ComputedRef<string>;
|
|
136
|
+
/**
|
|
137
|
+
* Heading value used by the component context.
|
|
138
|
+
*/
|
|
139
|
+
headingValue: ComputedRef<string>;
|
|
140
|
+
/**
|
|
141
|
+
* Focused month used by the component context.
|
|
142
|
+
*/
|
|
143
|
+
focusedMonth: ShallowRef<DateValue>;
|
|
144
|
+
/**
|
|
145
|
+
* Min value used by the component context.
|
|
146
|
+
*/
|
|
147
|
+
minValue: ComputedRef<DateValue | undefined>;
|
|
148
|
+
/**
|
|
149
|
+
* Max value used by the component context.
|
|
150
|
+
*/
|
|
151
|
+
maxValue: ComputedRef<DateValue | undefined>;
|
|
152
|
+
/**
|
|
153
|
+
* Callback invoked when the month changes.
|
|
154
|
+
*/
|
|
155
|
+
onMonthChange: (date: DateValue) => void;
|
|
156
|
+
/**
|
|
157
|
+
* Callback invoked when the placeholder changes.
|
|
158
|
+
*/
|
|
159
|
+
onPlaceholderChange: (date: DateValue) => void;
|
|
160
|
+
/**
|
|
161
|
+
* Whether the month is disabled.
|
|
162
|
+
*/
|
|
163
|
+
isMonthDisabled: (date: DateValue) => boolean;
|
|
164
|
+
/**
|
|
165
|
+
* Whether the month is selected.
|
|
166
|
+
*/
|
|
167
|
+
isMonthSelected: (date: DateValue) => boolean;
|
|
168
|
+
/**
|
|
169
|
+
* Set open used by the component context.
|
|
170
|
+
*/
|
|
171
|
+
setOpen: (value: boolean) => void;
|
|
172
|
+
/**
|
|
173
|
+
* Set focused month used by the component context.
|
|
174
|
+
*/
|
|
175
|
+
setFocusedMonth: (date: DateValue) => void;
|
|
176
|
+
/**
|
|
177
|
+
* Prev page used by the component context.
|
|
178
|
+
*/
|
|
179
|
+
prevPage: () => void;
|
|
180
|
+
/**
|
|
181
|
+
* Next page used by the component context.
|
|
182
|
+
*/
|
|
183
|
+
nextPage: () => void;
|
|
184
|
+
/**
|
|
185
|
+
* Whether the previous button is disabled.
|
|
186
|
+
*/
|
|
187
|
+
isPrevButtonDisabled: () => boolean;
|
|
188
|
+
/**
|
|
189
|
+
* Whether the next button is disabled.
|
|
190
|
+
*/
|
|
191
|
+
isNextButtonDisabled: () => boolean;
|
|
192
|
+
}
|
|
193
|
+
/**
|
|
194
|
+
* Available UI slots for the month picker component.
|
|
195
|
+
*/
|
|
196
|
+
type MonthPickerUiSlot = 'root' | 'trigger' | 'popup' | 'header' | 'heading' | 'prev' | 'next' | 'grid' | 'cellTrigger';
|
|
197
|
+
/**
|
|
198
|
+
* UI class overrides for the month picker component.
|
|
199
|
+
*/
|
|
200
|
+
type MonthPickerUi = UiClass<MonthPickerUiSlot>;
|
|
201
|
+
//#endregion
|
|
202
|
+
export { MonthPickerPopupProps, MonthPickerRootContext, MonthPickerRootEmits, MonthPickerRootProps, MonthPickerTriggerProps, MonthPickerUi, MonthPickerUiSlot };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { UiClass } from "../../types/common.js";
|
|
2
|
+
import { UseUiConsumer } from "../../composables/use-ui-context.js";
|
|
3
|
+
import { MonthRangePickerUiSlot } from "./types.js";
|
|
4
|
+
import * as _$vue from "vue";
|
|
5
|
+
|
|
6
|
+
//#region src/components/month-range-picker/context.d.ts
|
|
7
|
+
declare const provideMonthRangePickerUi: (ui: _$vue.ComputedRef<Partial<UiClass<MonthRangePickerUiSlot>>>) => _$vue.ComputedRef<Partial<UiClass<MonthRangePickerUiSlot>>>, useMonthRangePickerUi: UseUiConsumer<MonthRangePickerUiSlot>;
|
|
8
|
+
//#endregion
|
|
9
|
+
export { provideMonthRangePickerUi };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{useContext as e}from"../../composables/use-context.js";import{useUiContext as t}from"../../composables/use-ui-context.js";import"../../composables/index.js";const[n,r]=e(`MonthRangePickerRoot`),[i,a]=t(`MonthRangePickerUi`);export{n as provideMonthRangePickerRootContext,i as provideMonthRangePickerUi,r as useMonthRangePickerRootContext,a as useMonthRangePickerUi};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { MonthRangePickerPopupProps, MonthRangePickerRootContext, MonthRangePickerRootEmits, MonthRangePickerRootProps, MonthRangePickerTriggerProps, MonthRangePickerUi, MonthRangePickerUiSlot } from "./types.js";
|
|
2
|
+
import { _default } from "./month-range-picker-popup.vue.js";
|
|
3
|
+
import { _default as _default$1 } from "./month-range-picker-root.vue.js";
|
|
4
|
+
import { _default as _default$2 } from "./month-range-picker-trigger.vue.js";
|
|
5
|
+
import { provideMonthRangePickerUi } from "./context.js";
|
|
6
|
+
export { _default as MonthRangePickerPopup, type MonthRangePickerPopupProps, _default$1 as MonthRangePickerRoot, type MonthRangePickerRootContext, type MonthRangePickerRootEmits, type MonthRangePickerRootProps, _default$2 as MonthRangePickerTrigger, type MonthRangePickerTriggerProps, type MonthRangePickerUi, type MonthRangePickerUiSlot, provideMonthRangePickerUi };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{provideMonthRangePickerUi as e}from"./context.js";import t from"./month-range-picker-popup.js";import n from"./month-range-picker-root.js";import r from"./month-range-picker-trigger.js";export{t as MonthRangePickerPopup,n as MonthRangePickerRoot,r as MonthRangePickerTrigger,e as provideMonthRangePickerUi};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{compareYearMonth as e,toDate as t}from"../../date/comparators.js";import"../../date/index.js";import{useForwardElement as n}from"../../composables/use-forward-element.js";import"../../composables/index.js";import{Primitive as r}from"../primitive/primitive.js";import"../primitive/index.js";import{useMonthRangePickerRootContext as i,useMonthRangePickerUi as a}from"./context.js";import{Fragment as ee,computed as te,createBlock as ne,createCommentVNode as o,createElementBlock as s,createElementVNode as c,createTextVNode as l,defineComponent as u,nextTick as d,normalizeClass as f,openBlock as p,renderList as re,renderSlot as m,toDisplayString as h,unref as g,useId as ie,watch as ae,withCtx as oe}from"vue";const se=[`data-disabled`,`disabled`],ce=[`id`],_=[`data-disabled`,`disabled`],v=[`aria-label`,`aria-pressed`,`data-disabled`,`data-focused`,`data-highlighted`,`data-month-value`,`data-range-end`,`data-range-start`,`data-selected`,`disabled`,`tabindex`,`onClick`,`onFocus`,`onKeydown`,`onMouseenter`],y=u({name:`MonthRangePickerPopup`,__name:`month-range-picker-popup`,props:{asChild:{type:Boolean},as:{default:`div`}},setup(u){let y=a(`popup`),b=a(`header`),x=a(`heading`),S=a(`prev`),C=a(`next`),w=a(`grid`),T=a(`cellTrigger`),{dir:E,formatter:D,focusedMonth:O,headingValue:k,isMonthDisabled:A,isMonthHighlighted:j,isMonthSelected:M,isNextButtonDisabled:N,isPrevButtonDisabled:P,isRangeEnd:F,isRangeStart:I,modelValue:L,nextPage:R,onRangeChange:z,open:B,placeholder:V,popupId:H,prevPage:U,setFocusedMonth:W,setHoveredMonth:G}=i(`MonthRangePickerPopup`),[le,ue]=n(),K=ie(),q=te(()=>Array.from({length:12},(e,t)=>V.value.set({month:t+1,day:1}))),J=e=>{(le.value?.querySelector(`[data-month-value='${e.toString()}']`))?.focus()},Y=(e,t)=>{let n=e;for(;n>=0&&n<q.value.length;){let e=q.value[n];if(!A(e))return W(e),d(()=>{J(e)}),!0;n+=t}return!1},X=t=>{let n=q.value.findIndex(n=>e(n,t)===0),r=n===-1?0:n;Y(r,1)||Y(r,-1)},de=(e,t)=>{if(t>0){if(N())return;R()}else{if(P())return;U()}d(()=>{Y(e,t)})},Z=(e,t)=>{let n=e+t,r=t>=0?1:-1;if(n>=0&&n<q.value.length){Y(n,r);return}de(n<0?q.value.length+n:n-q.value.length,r)},Q=()=>{P()||(U(),d(()=>{X(O.value)}))},$=()=>{N()||(R(),d(()=>{X(O.value)}))},fe=e=>{W(e)},pe=e=>{L.value.start&&!L.value.end&&!A(e)&&G(e)},me=e=>{A(e)||z(e)},he=(e,t,n)=>{if(A(e))return;let r=E.value===`rtl`?-1:1;switch(n.key){case`ArrowRight`:n.preventDefault(),Z(t,r);break;case`ArrowLeft`:n.preventDefault(),Z(t,-r);break;case`ArrowDown`:n.preventDefault(),Z(t,3);break;case`ArrowUp`:n.preventDefault(),Z(t,-3);break;case`Home`:n.preventDefault(),Y(t-t%3,1);break;case`End`:n.preventDefault(),Y(t+(2-t%3),-1);break;case`PageUp`:n.preventDefault(),Q();break;case`PageDown`:n.preventDefault(),$();break;case`Enter`:case` `:n.preventDefault(),z(e);break;default:break}};return ae(()=>B.value,e=>{e&&d(()=>{X(O.value)})}),(n,i)=>g(B)?(p(),ne(g(r),{key:0,id:g(H),ref:g(ue),as:u.as,"as-child":u.asChild,"aria-labelledby":g(K),class:f(g(y)),"data-slot":`popup`,role:`dialog`,onMouseleave:i[0]||(i[0]=e=>g(G)(void 0))},{default:oe(()=>[c(`div`,{class:f(g(b)),"data-slot":`header`},[c(`button`,{"aria-label":`Previous year`,class:f(g(S)),"data-disabled":g(P)()?``:void 0,"data-slot":`prev`,disabled:g(P)(),type:`button`,onClick:Q},[m(n.$slots,`prev`,{disabled:g(P)()},()=>[i[1]||(i[1]=l(`Prev`,-1))])],10,se),c(`div`,{id:g(K),class:f(g(x)),"data-slot":`heading`},[m(n.$slots,`heading`,{headingValue:g(k)},()=>[l(h(g(k)),1)])],10,ce),c(`button`,{"aria-label":`Next year`,class:f(g(C)),"data-disabled":g(N)()?``:void 0,"data-slot":`next`,disabled:g(N)(),type:`button`,onClick:$},[m(n.$slots,`next`,{disabled:g(N)()},()=>[i[2]||(i[2]=l(`Next`,-1))])],10,_)],2),c(`div`,{class:f(g(w)),"data-slot":`grid`},[(p(!0),s(ee,null,re(q.value,(r,i)=>(p(),s(`button`,{key:r.toString(),"aria-label":g(D).fullMonthAndYear(g(t)(r)),"aria-pressed":g(M)(r)?!0:void 0,class:f(g(T)),"data-disabled":g(A)(r)?``:void 0,"data-focused":g(e)(r,g(O))===0?``:void 0,"data-highlighted":g(j)(r)?``:void 0,"data-month-value":r.toString(),"data-range-end":g(F)(r)?``:void 0,"data-range-start":g(I)(r)?``:void 0,"data-selected":g(M)(r)?``:void 0,"data-slot":`cell-trigger`,disabled:g(A)(r),tabindex:g(e)(r,g(O))===0&&!g(A)(r)?0:-1,type:`button`,onClick:e=>me(r),onFocus:e=>fe(r),onKeydown:e=>he(r,i,e),onMouseenter:e=>pe(r)},[m(n.$slots,`month`,{date:r,disabled:g(A)(r),focused:g(e)(r,g(O))===0,highlighted:g(j)(r),label:g(D).custom(g(t)(r),{month:`short`}),rangeEnd:g(F)(r),rangeStart:g(I)(r),selected:g(M)(r)},()=>[l(h(g(D).custom(g(t)(r),{month:`short`})),1)])],42,v))),128))],2)]),_:3},8,[`id`,`as`,`as-child`,`aria-labelledby`,`class`])):o(`v-if`,!0)}});export{y as default};
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { AsTag } from "../primitive/types.js";
|
|
2
|
+
import { MonthRangePickerPopupProps } from "./types.js";
|
|
3
|
+
import * as _$vue from "vue";
|
|
4
|
+
import { DateValue } from "@internationalized/date";
|
|
5
|
+
|
|
6
|
+
//#region src/components/month-range-picker/month-range-picker-popup.vue.d.ts
|
|
7
|
+
type __VLS_Slots = {
|
|
8
|
+
heading?: (props: {
|
|
9
|
+
headingValue: string;
|
|
10
|
+
}) => any;
|
|
11
|
+
prev?: (props: {
|
|
12
|
+
disabled: boolean;
|
|
13
|
+
}) => any;
|
|
14
|
+
next?: (props: {
|
|
15
|
+
disabled: boolean;
|
|
16
|
+
}) => any;
|
|
17
|
+
month?: (props: {
|
|
18
|
+
date: DateValue;
|
|
19
|
+
label: string;
|
|
20
|
+
disabled: boolean;
|
|
21
|
+
focused: boolean;
|
|
22
|
+
highlighted: boolean;
|
|
23
|
+
rangeEnd: boolean;
|
|
24
|
+
rangeStart: boolean;
|
|
25
|
+
selected: boolean;
|
|
26
|
+
}) => any;
|
|
27
|
+
};
|
|
28
|
+
declare const __VLS_base: _$vue.DefineComponent<MonthRangePickerPopupProps, {}, {}, {}, {}, _$vue.ComponentOptionsMixin, _$vue.ComponentOptionsMixin, {}, string, _$vue.PublicProps, Readonly<MonthRangePickerPopupProps> & Readonly<{}>, {
|
|
29
|
+
as: AsTag | _$vue.Component;
|
|
30
|
+
}, {}, {}, {}, string, _$vue.ComponentProvideOptions, false, {}, any>;
|
|
31
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
32
|
+
declare const _default: typeof __VLS_export;
|
|
33
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
34
|
+
new (): {
|
|
35
|
+
$slots: S;
|
|
36
|
+
};
|
|
37
|
+
};
|
|
38
|
+
//#endregion
|
|
39
|
+
export { _default };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{isNullish as e}from"../../shared/guard.js";import{compareYearMonth as t,getDefaultDate as n,isMonthBetweenInclusive as r,toDate as i}from"../../date/comparators.js";import{useDateFormatter as a}from"../../date/formatter.js";import"../../date/index.js";import"../../shared/index.js";import{useControllableState as o}from"../../composables/use-controllable-state.js";import"../../composables/index.js";import{useDirection as s,useLocale as c}from"../config-provider/context.js";import{Primitive as l}from"../primitive/primitive.js";import"../primitive/index.js";import{provideMonthRangePickerRootContext as u,useMonthRangePickerUi as d}from"./context.js";import{computed as f,createBlock as p,defineComponent as m,normalizeClass as h,openBlock as g,renderSlot as _,shallowRef as v,unref as y,useId as b,watch as x,withCtx as S}from"vue";const C=m({name:`MonthRangePickerRoot`,__name:`month-range-picker-root`,props:{defaultValue:{default:void 0},defaultPlaceholder:{default:void 0},placeholder:{default:void 0},modelValue:{},minValue:{},maxValue:{},locale:{},disabled:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},id:{},dir:{},defaultOpen:{type:Boolean,default:!1},open:{type:Boolean,default:void 0},modal:{type:Boolean,default:!1},asChild:{type:Boolean},as:{},name:{},required:{type:Boolean}},emits:[`update:modelValue`,`update:placeholder`,`update:startValue`,`update:endValue`,`update:open`],setup(m,{emit:C}){let w=m,T=C,E=d(`root`),D=b(),O=c(()=>w.locale),k=s(()=>w.dir),A=a(O.value),j=o(()=>w.modelValue,e=>{T(`update:modelValue`,e),T(`update:startValue`,e.start),T(`update:endValue`,e.end)},w.defaultValue??{}),M=n({defaultPlaceholder:w.placeholder,defaultValue:j.value.start,locale:w.locale}).set({day:1}),N=o(()=>w.placeholder,e=>T(`update:placeholder`,e),w.defaultPlaceholder?.set({day:1})??M.copy()),P=o(()=>w.open,e=>T(`update:open`,e??!1),w.defaultOpen),F=v((j.value.end??j.value.start??N.value).set({day:1})),I=v(),L=f(()=>w.minValue?.set({day:1})),R=f(()=>w.maxValue?.set({day:1})),z=(e,n)=>t(e,n)<=0?{start:e.copy(),end:n.copy()}:{start:n.copy(),end:e.copy()},B=e=>!!(w.disabled||L.value&&t(e,L.value)<0||R.value&&t(e,R.value)>0),V=e=>j.value.start?t(e,j.value.start.set({day:1}))===0:!1,H=e=>j.value.end?t(e,j.value.end.set({day:1}))===0:!1,U=e=>{let{start:n,end:i}=j.value;return!n&&!i?!1:n&&!i?t(e,n.set({day:1}))===0:n&&i?r(e,n.set({day:1}),i.set({day:1})):!1},W=e=>{let{start:t,end:n}=j.value;if(!t||n||!I.value)return!1;let i=z(t.set({day:1}),I.value.set({day:1}));return r(e,i.start,i.end)},G=f(()=>{let{start:e,end:n}=j.value;return!!(e&&B(e.set({day:1}))||n&&B(n.set({day:1}))||e&&n&&t(n.set({day:1}),e.set({day:1}))<0)}),K=f(()=>{let{start:e,end:t}=j.value;return e&&t?`${A.fullMonthAndYear(i(e.set({day:1})))} – ${A.fullMonthAndYear(i(t.set({day:1})))}`:e?`${A.fullMonthAndYear(i(e.set({day:1})))} – ...`:``}),q=f(()=>A.fullYear(i(N.value.set({day:1})))),J=f(()=>!e(j.value.start)&&!e(j.value.end)),Y=e=>{let t=e.set({day:1});N.value=t.copy(),F.value=t.copy()};return x(O,e=>{A.getLocale()!==e&&A.setLocale(e)}),x(()=>j.value.start,e=>{if(!e)return;let n=e.set({day:1});t(N.value,n)!==0&&(N.value=n.copy())}),x(j,e=>{F.value=(e.end??e.start??N.value).set({day:1}).copy()},{deep:!0}),u({locale:O,dir:k,modelValue:j,placeholder:N,isInvalid:G,formatter:A,open:P,popupId:D,displayValue:K,headingValue:q,focusedMonth:F,hoveredMonth:I,minValue:L,maxValue:R,hasSelectedRange:J,onRangeChange:e=>{let t=e.set({day:1});if(w.readonly||B(t))return;let{start:n,end:r}=j.value;if(!n||r){j.value={start:t.copy(),end:void 0},F.value=t.copy(),I.value=void 0,Y(t);return}let i=z(n.set({day:1}),t);j.value=i,F.value=t.copy(),I.value=void 0,Y(i.start),P.value=!1},onPlaceholderChange:Y,isMonthDisabled:B,isMonthSelected:U,isMonthHighlighted:W,isRangeStart:V,isRangeEnd:H,setOpen(e){P.value=e},setFocusedMonth:e=>{F.value=e.set({day:1}).copy()},setHoveredMonth:e=>{I.value=e?.set({day:1}).copy()},prevPage:()=>{Y(N.value.subtract({years:1}))},nextPage:()=>{Y(N.value.add({years:1}))},isPrevButtonDisabled:()=>w.disabled?!0:L.value?t(N.value.subtract({years:1}).set({month:12,day:1}),L.value)<0:!1,isNextButtonDisabled:()=>w.disabled?!0:R.value?t(N.value.add({years:1}).set({month:1,day:1}),R.value)>0:!1,disabled:f(()=>w.disabled),readonly:f(()=>w.readonly)}),(e,t)=>(g(),p(y(l),{as:m.as,"as-child":m.asChild,class:h(y(E)),"data-disabled":m.disabled?``:void 0,"data-invalid":G.value?``:void 0,"data-readonly":m.readonly?``:void 0,dir:y(k),"data-slot":`root`},{default:S(()=>[_(e.$slots,`default`,{displayValue:K.value,modelValue:y(j),open:!!y(P)})]),_:3},8,[`as`,`as-child`,`class`,`data-disabled`,`data-invalid`,`data-readonly`,`dir`]))}});export{C as default};
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { DateRange, DateValue } from "../../date/types.js";
|
|
2
|
+
import { MonthRangePickerRootProps } from "./types.js";
|
|
3
|
+
import * as _$vue from "vue";
|
|
4
|
+
|
|
5
|
+
//#region src/components/month-range-picker/month-range-picker-root.vue.d.ts
|
|
6
|
+
type __VLS_Slots = {
|
|
7
|
+
default?: (props: {
|
|
8
|
+
displayValue: string;
|
|
9
|
+
modelValue: DateRange;
|
|
10
|
+
open: boolean;
|
|
11
|
+
}) => any;
|
|
12
|
+
};
|
|
13
|
+
declare const __VLS_base: _$vue.DefineComponent<MonthRangePickerRootProps, {}, {}, {}, {}, _$vue.ComponentOptionsMixin, _$vue.ComponentOptionsMixin, {
|
|
14
|
+
"update:modelValue": (range: DateRange) => any;
|
|
15
|
+
"update:open": (open: boolean) => any;
|
|
16
|
+
"update:placeholder": (date: DateValue) => any;
|
|
17
|
+
"update:startValue": (date: DateValue | undefined) => any;
|
|
18
|
+
"update:endValue": (date: DateValue | undefined) => any;
|
|
19
|
+
}, string, _$vue.PublicProps, Readonly<MonthRangePickerRootProps> & Readonly<{
|
|
20
|
+
"onUpdate:modelValue"?: ((range: DateRange) => any) | undefined;
|
|
21
|
+
"onUpdate:open"?: ((open: boolean) => any) | undefined;
|
|
22
|
+
"onUpdate:placeholder"?: ((date: DateValue) => any) | undefined;
|
|
23
|
+
"onUpdate:startValue"?: ((date: DateValue | undefined) => any) | undefined;
|
|
24
|
+
"onUpdate:endValue"?: ((date: DateValue | undefined) => any) | undefined;
|
|
25
|
+
}>, {
|
|
26
|
+
placeholder: DateValue;
|
|
27
|
+
disabled: boolean;
|
|
28
|
+
defaultValue: DateRange;
|
|
29
|
+
open: boolean;
|
|
30
|
+
defaultOpen: boolean;
|
|
31
|
+
readonly: boolean;
|
|
32
|
+
defaultPlaceholder: DateValue;
|
|
33
|
+
modal: boolean;
|
|
34
|
+
}, {}, {}, {}, string, _$vue.ComponentProvideOptions, false, {}, any>;
|
|
35
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
36
|
+
declare const _default: typeof __VLS_export;
|
|
37
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
38
|
+
new (): {
|
|
39
|
+
$slots: S;
|
|
40
|
+
};
|
|
41
|
+
};
|
|
42
|
+
//#endregion
|
|
43
|
+
export { _default };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{Primitive as e}from"../primitive/primitive.js";import"../primitive/index.js";import{useMonthRangePickerRootContext as t,useMonthRangePickerUi as n}from"./context.js";import{createBlock as r,defineComponent as i,normalizeClass as a,openBlock as o,renderSlot as s,unref as c,withCtx as l}from"vue";const u=i({name:`MonthRangePickerTrigger`,__name:`month-range-picker-trigger`,props:{asChild:{type:Boolean},as:{default:`button`}},setup(i){let u=n(`trigger`),{disabled:d,readonly:f,open:p,setOpen:m,popupId:h}=t(`MonthRangePickerTrigger`),g=()=>{d.value||f.value||m(!p.value)};return(t,n)=>(o(),r(c(e),{as:i.as,"as-child":i.asChild,"aria-controls":c(h),"aria-disabled":c(d)?!0:void 0,"aria-expanded":!!c(p),class:a(c(u)),"data-disabled":c(d)?``:void 0,"data-state":c(p)?`open`:`closed`,"data-slot":`trigger`,type:`button`,onClick:g},{default:l(()=>[s(t.$slots,`default`)]),_:3},8,[`as`,`as-child`,`aria-controls`,`aria-disabled`,`aria-expanded`,`class`,`data-disabled`,`data-state`]))}});export{u as default};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { AsTag } from "../primitive/types.js";
|
|
2
|
+
import { MonthRangePickerTriggerProps } from "./types.js";
|
|
3
|
+
import * as _$vue from "vue";
|
|
4
|
+
|
|
5
|
+
//#region src/components/month-range-picker/month-range-picker-trigger.vue.d.ts
|
|
6
|
+
declare var __VLS_10: {};
|
|
7
|
+
type __VLS_Slots = {} & {
|
|
8
|
+
default?: (props: typeof __VLS_10) => any;
|
|
9
|
+
};
|
|
10
|
+
declare const __VLS_base: _$vue.DefineComponent<MonthRangePickerTriggerProps, {}, {}, {}, {}, _$vue.ComponentOptionsMixin, _$vue.ComponentOptionsMixin, {}, string, _$vue.PublicProps, Readonly<MonthRangePickerTriggerProps> & Readonly<{}>, {
|
|
11
|
+
as: AsTag | _$vue.Component;
|
|
12
|
+
}, {}, {}, {}, string, _$vue.ComponentProvideOptions, false, {}, any>;
|
|
13
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
14
|
+
declare const _default: typeof __VLS_export;
|
|
15
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
16
|
+
new (): {
|
|
17
|
+
$slots: S;
|
|
18
|
+
};
|
|
19
|
+
};
|
|
20
|
+
//#endregion
|
|
21
|
+
export { _default };
|