@soybeanjs/headless 0.18.0 → 0.19.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 +1 -10
- package/dist/components/accordion/accordion-content.js +1 -1
- package/dist/components/accordion/accordion-description.js +1 -1
- package/dist/components/accordion/accordion-header.js +1 -1
- package/dist/components/accordion/accordion-item.js +1 -1
- package/dist/components/accordion/accordion-root.js +1 -1
- package/dist/components/accordion/accordion-trigger.js +1 -1
- package/dist/components/accordion/context.js +1 -1
- package/dist/components/accordion/types.d.ts +6 -5
- package/dist/components/affix/affix-content.js +1 -1
- package/dist/components/affix/affix-placeholder.js +1 -1
- package/dist/components/affix/affix-root.js +1 -1
- package/dist/components/affix/types.d.ts +5 -4
- package/dist/components/alert/alert-close.js +1 -1
- package/dist/components/alert/alert-close.vue.d.ts +5 -4
- package/dist/components/alert/alert-compact.js +1 -1
- package/dist/components/alert/alert-compact.vue.d.ts +2 -0
- package/dist/components/alert/alert-content.js +1 -1
- package/dist/components/alert/alert-description.js +1 -1
- package/dist/components/alert/alert-root.js +1 -1
- package/dist/components/alert/alert-title.js +1 -1
- package/dist/components/alert/types.d.ts +16 -9
- package/dist/components/anchor/anchor-link.js +1 -1
- package/dist/components/anchor/anchor-root.js +1 -1
- package/dist/components/anchor/anchor-root.vue.d.ts +2 -2
- package/dist/components/anchor/context.js +1 -1
- package/dist/components/anchor/types.d.ts +5 -4
- package/dist/components/arrow/arrow.js +1 -1
- package/dist/components/arrow/types.d.ts +2 -1
- package/dist/components/aspect-ratio/aspect-ratio.js +1 -1
- package/dist/components/aspect-ratio/types.d.ts +2 -3
- 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-root.js +1 -1
- package/dist/components/autocomplete/autocomplete-root.vue.d.ts +3 -3
- package/dist/components/autocomplete/types.d.ts +4 -3
- package/dist/components/avatar/avatar-fallback.js +1 -1
- package/dist/components/avatar/avatar-image.js +1 -1
- package/dist/components/avatar/avatar-root.js +1 -1
- package/dist/components/avatar/types.d.ts +5 -4
- package/dist/components/backtop/backtop.js +1 -1
- package/dist/components/backtop/backtop.vue.d.ts +3 -7
- package/dist/components/backtop/types.d.ts +2 -2
- package/dist/components/badge/badge-content.js +1 -1
- package/dist/components/badge/badge-root.js +1 -1
- package/dist/components/badge/types.d.ts +4 -3
- package/dist/components/bottom-sheet/bottom-sheet-compact.js +1 -1
- package/dist/components/bottom-sheet/bottom-sheet-popup.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/context.js +1 -1
- package/dist/components/bottom-sheet/types.d.ts +3 -2
- package/dist/components/breadcrumb/breadcrumb-ellipsis.js +1 -1
- package/dist/components/breadcrumb/breadcrumb-item.js +1 -1
- package/dist/components/breadcrumb/breadcrumb-link.js +1 -1
- package/dist/components/breadcrumb/breadcrumb-list.js +1 -1
- package/dist/components/breadcrumb/breadcrumb-page.js +1 -1
- package/dist/components/breadcrumb/breadcrumb-root.js +1 -1
- package/dist/components/breadcrumb/breadcrumb-separator.js +1 -1
- package/dist/components/breadcrumb/types.d.ts +8 -8
- package/dist/components/button/button.js +1 -1
- package/dist/components/button/types.d.ts +3 -2
- package/dist/components/calendar/calendar-cell-trigger.js +1 -1
- package/dist/components/calendar/calendar-cell-trigger.vue.d.ts +3 -16
- package/dist/components/calendar/calendar-cell.js +1 -1
- package/dist/components/calendar/calendar-compact.js +1 -1
- package/dist/components/calendar/calendar-compact.vue.d.ts +3 -3
- package/dist/components/calendar/calendar-grid-body.js +1 -1
- package/dist/components/calendar/calendar-grid-head.js +1 -1
- package/dist/components/calendar/calendar-grid-row.js +1 -1
- package/dist/components/calendar/calendar-grid.js +1 -1
- package/dist/components/calendar/calendar-head-cell.js +1 -1
- package/dist/components/calendar/calendar-header.js +1 -1
- package/dist/components/calendar/calendar-header.vue.d.ts +1 -4
- package/dist/components/calendar/calendar-heading.js +1 -1
- package/dist/components/calendar/calendar-heading.vue.d.ts +6 -8
- package/dist/components/calendar/calendar-next.js +1 -1
- package/dist/components/calendar/calendar-next.vue.d.ts +6 -10
- package/dist/components/calendar/calendar-prev.js +1 -1
- package/dist/components/calendar/calendar-prev.vue.d.ts +6 -10
- package/dist/components/calendar/calendar-root.js +1 -1
- package/dist/components/calendar/calendar-root.vue.d.ts +2 -4
- package/dist/components/calendar/index.d.ts +2 -2
- package/dist/components/calendar/shared.js +1 -0
- package/dist/components/calendar/types.d.ts +119 -202
- package/dist/components/calendar/use-calendar.js +1 -1
- package/dist/components/calendar-range/calendar-range-cell-trigger.js +1 -0
- package/dist/components/calendar-range/calendar-range-cell-trigger.vue.d.ts +15 -0
- package/dist/components/calendar-range/calendar-range-cell.js +1 -0
- package/dist/components/{range-calendar/range-calendar-cell.vue.d.ts → calendar-range/calendar-range-cell.vue.d.ts} +3 -3
- package/dist/components/calendar-range/calendar-range-compact.js +1 -0
- package/dist/components/{range-calendar/range-calendar-compact.vue.d.ts → calendar-range/calendar-range-compact.vue.d.ts} +5 -5
- package/dist/components/calendar-range/calendar-range-grid-body.js +1 -0
- package/dist/components/{range-calendar/range-calendar-grid-body.vue.d.ts → calendar-range/calendar-range-grid-body.vue.d.ts} +3 -3
- package/dist/components/calendar-range/calendar-range-grid-head.js +1 -0
- package/dist/components/{range-calendar/range-calendar-grid-head.vue.d.ts → calendar-range/calendar-range-grid-head.vue.d.ts} +3 -3
- package/dist/components/calendar-range/calendar-range-grid-row.js +1 -0
- package/dist/components/{range-calendar/range-calendar-grid-row.vue.d.ts → calendar-range/calendar-range-grid-row.vue.d.ts} +3 -3
- package/dist/components/calendar-range/calendar-range-grid.js +1 -0
- package/dist/components/{range-calendar/range-calendar-grid.vue.d.ts → calendar-range/calendar-range-grid.vue.d.ts} +3 -3
- package/dist/components/calendar-range/calendar-range-head-cell.js +1 -0
- package/dist/components/{range-calendar/range-calendar-head-cell.vue.d.ts → calendar-range/calendar-range-head-cell.vue.d.ts} +3 -3
- package/dist/components/calendar-range/calendar-range-header.js +1 -0
- package/dist/components/calendar-range/calendar-range-header.vue.d.ts +18 -0
- package/dist/components/calendar-range/calendar-range-heading.js +1 -0
- package/dist/components/calendar-range/calendar-range-heading.vue.d.ts +20 -0
- package/dist/components/calendar-range/calendar-range-next.js +1 -0
- package/dist/components/calendar-range/calendar-range-next.vue.d.ts +20 -0
- package/dist/components/calendar-range/calendar-range-prev.js +1 -0
- package/dist/components/calendar-range/calendar-range-prev.vue.d.ts +20 -0
- package/dist/components/calendar-range/calendar-range-root.js +1 -0
- package/dist/components/{range-calendar/range-calendar-root.vue.d.ts → calendar-range/calendar-range-root.vue.d.ts} +11 -23
- package/dist/components/calendar-range/context.d.ts +9 -0
- package/dist/components/calendar-range/context.js +1 -0
- package/dist/components/calendar-range/index.d.ts +16 -0
- package/dist/components/calendar-range/index.js +1 -0
- package/dist/components/calendar-range/types.d.ts +471 -0
- package/dist/components/{range-calendar/use-range-calendar.js → calendar-range/use-calendar-range.js} +1 -1
- package/dist/components/card/card-collapsible-trigger.js +1 -1
- package/dist/components/card/card-content.js +1 -1
- package/dist/components/card/card-description.js +1 -1
- package/dist/components/card/card-footer.js +1 -1
- package/dist/components/card/card-header.js +1 -1
- package/dist/components/card/card-root.js +1 -1
- package/dist/components/card/card-title-root.js +1 -1
- package/dist/components/card/card-title.js +1 -1
- package/dist/components/card/types.d.ts +6 -6
- package/dist/components/carousel/carousel-container.js +1 -1
- package/dist/components/carousel/carousel-content.js +1 -1
- package/dist/components/carousel/carousel-control.js +1 -1
- package/dist/components/carousel/carousel-item.js +1 -1
- package/dist/components/carousel/carousel-navigation.js +1 -1
- package/dist/components/carousel/carousel-next.js +1 -1
- package/dist/components/carousel/carousel-previous.js +1 -1
- package/dist/components/carousel/carousel-root.js +1 -1
- package/dist/components/carousel/types.d.ts +8 -7
- package/dist/components/checkbox/checkbox-card-compact.js +1 -1
- package/dist/components/checkbox/checkbox-card-group-compact.js +1 -1
- package/dist/components/checkbox/checkbox-compact.vue.d.ts +2 -2
- package/dist/components/checkbox/checkbox-control.js +1 -1
- package/dist/components/checkbox/checkbox-group-compact.js +1 -1
- package/dist/components/checkbox/checkbox-group-root.js +1 -1
- package/dist/components/checkbox/checkbox-indicator.js +1 -1
- package/dist/components/checkbox/checkbox-label.js +1 -1
- package/dist/components/checkbox/checkbox-root.js +1 -1
- package/dist/components/checkbox/checkbox-root.vue.d.ts +1 -1
- package/dist/components/checkbox/context.js +1 -1
- package/dist/components/checkbox/types.d.ts +8 -6
- package/dist/components/clipboard/clipboard.js +1 -1
- package/dist/components/clipboard/types.d.ts +1 -1
- package/dist/components/collapsible/collapsible-content.js +1 -1
- package/dist/components/collapsible/collapsible-root.js +1 -1
- package/dist/components/collapsible/collapsible-root.vue.d.ts +2 -2
- package/dist/components/collapsible/collapsible-trigger.js +1 -1
- package/dist/components/collapsible/collapsible-trigger.vue.d.ts +1 -4
- package/dist/components/collapsible/context.js +1 -1
- package/dist/components/collapsible/types.d.ts +6 -5
- package/dist/components/color-area/color-area-area.js +1 -1
- package/dist/components/color-area/color-area-area.vue.d.ts +1 -4
- package/dist/components/color-area/color-area-compact.js +1 -0
- package/dist/components/color-area/color-area-compact.vue.d.ts +19 -0
- package/dist/components/color-area/color-area-root.js +1 -1
- package/dist/components/color-area/color-area-root.vue.d.ts +2 -4
- package/dist/components/color-area/color-area-thumb.js +1 -1
- package/dist/components/color-area/index.d.ts +5 -4
- package/dist/components/color-area/index.js +1 -1
- package/dist/components/color-area/types.d.ts +24 -7
- package/dist/components/color-field/color-field-compact.js +1 -0
- package/dist/components/color-field/color-field-compact.vue.d.ts +15 -0
- package/dist/components/color-field/color-field-input.js +1 -1
- package/dist/components/color-field/color-field-root.js +1 -1
- package/dist/components/color-field/color-field-root.vue.d.ts +2 -4
- package/dist/components/color-field/index.d.ts +5 -4
- package/dist/components/color-field/index.js +1 -1
- package/dist/components/color-field/types.d.ts +20 -6
- package/dist/components/color-picker/color-picker-compact.js +1 -0
- package/dist/components/color-picker/color-picker-compact.vue.d.ts +60 -0
- package/dist/components/color-picker/color-picker-root.js +1 -1
- package/dist/components/color-picker/color-picker-root.vue.d.ts +16 -5
- package/dist/components/color-picker/color-picker-trigger.js +1 -0
- package/dist/components/color-picker/color-picker-trigger.vue.d.ts +25 -0
- package/dist/components/color-picker/context.d.ts +9 -0
- package/dist/components/color-picker/context.js +1 -0
- package/dist/components/color-picker/index.d.ts +6 -3
- package/dist/components/color-picker/index.js +1 -1
- package/dist/components/color-picker/shared.js +1 -0
- package/dist/components/color-picker/types.d.ts +132 -5
- package/dist/components/color-slider/color-slider-compact.js +1 -0
- package/dist/components/color-slider/color-slider-compact.vue.d.ts +19 -0
- package/dist/components/color-slider/color-slider-root.js +1 -1
- package/dist/components/color-slider/color-slider-root.vue.d.ts +3 -3
- package/dist/components/color-slider/color-slider-thumb.js +1 -1
- package/dist/components/color-slider/color-slider-track.js +1 -1
- package/dist/components/color-slider/index.d.ts +6 -5
- package/dist/components/color-slider/index.js +1 -1
- package/dist/components/color-slider/types.d.ts +24 -7
- package/dist/components/color-swatch/color-swatch-checker.js +1 -0
- package/dist/components/color-swatch/color-swatch-checker.vue.d.ts +8 -0
- package/dist/components/color-swatch/color-swatch-compact.js +1 -0
- package/dist/components/color-swatch/color-swatch-compact.vue.d.ts +15 -0
- package/dist/components/color-swatch/color-swatch-fill.js +1 -0
- package/dist/components/color-swatch/color-swatch-fill.vue.d.ts +8 -0
- package/dist/components/color-swatch/color-swatch-root.js +1 -0
- package/dist/components/color-swatch/color-swatch-root.vue.d.ts +15 -0
- package/dist/components/color-swatch/context.d.ts +9 -0
- package/dist/components/color-swatch/context.js +1 -0
- package/dist/components/color-swatch/index.d.ts +7 -3
- package/dist/components/color-swatch/index.js +1 -1
- package/dist/components/color-swatch/types.d.ts +58 -5
- package/dist/components/color-swatch-picker/color-swatch-picker-compact.js +1 -0
- package/dist/components/color-swatch-picker/color-swatch-picker-compact.vue.d.ts +28 -0
- package/dist/components/color-swatch-picker/color-swatch-picker-item-indicator.js +1 -1
- package/dist/components/color-swatch-picker/color-swatch-picker-item-swatch.js +1 -1
- package/dist/components/color-swatch-picker/color-swatch-picker-item.js +1 -1
- package/dist/components/color-swatch-picker/color-swatch-picker-root.js +1 -1
- package/dist/components/color-swatch-picker/color-swatch-picker-root.vue.d.ts +1 -1
- package/dist/components/color-swatch-picker/context.js +1 -1
- package/dist/components/color-swatch-picker/index.d.ts +7 -6
- package/dist/components/color-swatch-picker/index.js +1 -1
- package/dist/components/color-swatch-picker/types.d.ts +63 -8
- package/dist/components/combobox/combobox-arrow.js +1 -1
- package/dist/components/combobox/combobox-cancel.js +1 -1
- package/dist/components/combobox/combobox-compact.js +1 -1
- package/dist/components/combobox/combobox-compact.vue.d.ts +3 -3
- package/dist/components/combobox/combobox-content-impl.js +1 -1
- package/dist/components/combobox/combobox-content.js +1 -1
- package/dist/components/combobox/combobox-empty.js +1 -1
- package/dist/components/combobox/combobox-empty.vue.d.ts +1 -4
- package/dist/components/combobox/combobox-group.js +1 -1
- 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 +3 -3
- package/dist/components/combobox/combobox-separator.js +1 -1
- package/dist/components/combobox/combobox-trigger.js +1 -1
- package/dist/components/combobox/combobox-viewport.js +1 -1
- package/dist/components/combobox/combobox-virtualizer.js +1 -1
- package/dist/components/combobox/types.d.ts +9 -8
- package/dist/components/command/command-compact.js +1 -1
- package/dist/components/command/types.d.ts +4 -4
- package/dist/components/config-provider/config-provider.js +1 -1
- package/dist/components/config-provider/context.js +1 -1
- package/dist/components/config-provider/types.d.ts +9 -1
- package/dist/components/context-menu/context-menu-checkbox-compact.vue.d.ts +3 -3
- package/dist/components/context-menu/context-menu-compact.vue.d.ts +2 -2
- package/dist/components/context-menu/context-menu-content.js +1 -1
- package/dist/components/context-menu/context-menu-content.vue.d.ts +2 -2
- package/dist/components/context-menu/context-menu-radio-compact.vue.d.ts +3 -3
- package/dist/components/context-menu/context-menu-trigger.js +1 -1
- package/dist/components/context-menu/context-menu-wrapper-compact.vue.d.ts +2 -2
- package/dist/components/context-menu/context.js +1 -1
- package/dist/components/date-field/date-field-compact.js +1 -1
- package/dist/components/date-field/date-field-compact.vue.d.ts +17 -5
- package/dist/components/date-field/date-field-input.js +1 -1
- package/dist/components/date-field/date-field-root.js +1 -1
- package/dist/components/date-field/date-field-root.vue.d.ts +14 -22
- package/dist/components/date-field/index.d.ts +3 -3
- package/dist/components/date-field/types.d.ts +44 -144
- package/dist/components/date-picker/context.js +1 -1
- package/dist/components/date-picker/date-picker-compact.js +1 -1
- package/dist/components/date-picker/date-picker-compact.vue.d.ts +290 -10
- package/dist/components/date-picker/index.d.ts +2 -7
- package/dist/components/date-picker/index.js +1 -1
- package/dist/components/date-picker/types.d.ts +11 -274
- package/dist/components/date-range-field/date-range-field-compact.js +1 -1
- package/dist/components/date-range-field/date-range-field-input.js +1 -1
- package/dist/components/date-range-field/date-range-field-input.vue.d.ts +2 -2
- package/dist/components/date-range-field/date-range-field-root.js +1 -1
- package/dist/components/date-range-field/date-range-field-root.vue.d.ts +15 -30
- package/dist/components/date-range-field/index.d.ts +3 -3
- package/dist/components/date-range-field/types.d.ts +36 -183
- package/dist/components/date-range-picker/context.js +1 -1
- package/dist/components/date-range-picker/date-range-picker-compact.js +1 -1
- package/dist/components/date-range-picker/date-range-picker-compact.vue.d.ts +293 -12
- package/dist/components/date-range-picker/index.d.ts +2 -5
- package/dist/components/date-range-picker/index.js +1 -1
- package/dist/components/date-range-picker/types.d.ts +14 -269
- package/dist/components/dialog/context.js +1 -1
- package/dist/components/dialog/dialog-cancel.js +1 -1
- package/dist/components/dialog/dialog-close.js +1 -1
- package/dist/components/dialog/dialog-compact.js +1 -1
- package/dist/components/dialog/dialog-compact.vue.d.ts +7 -7
- package/dist/components/dialog/dialog-confirm.js +1 -1
- package/dist/components/dialog/dialog-content.js +1 -1
- package/dist/components/dialog/dialog-description.js +1 -1
- package/dist/components/dialog/dialog-footer.js +1 -1
- package/dist/components/dialog/dialog-header.js +1 -1
- package/dist/components/dialog/dialog-overlay.js +1 -1
- package/dist/components/dialog/dialog-popup-impl.js +1 -1
- package/dist/components/dialog/dialog-popup.js +1 -1
- package/dist/components/dialog/dialog-root.js +1 -1
- package/dist/components/dialog/dialog-title.js +1 -1
- package/dist/components/dialog/dialog-trigger.js +1 -1
- package/dist/components/dialog/dialog-trigger.vue.d.ts +5 -1
- package/dist/components/dialog/types.d.ts +21 -14
- package/dist/components/dropdown-menu/context.js +1 -1
- package/dist/components/dropdown-menu/dropdown-menu-checkbox-compact.vue.d.ts +3 -3
- package/dist/components/dropdown-menu/dropdown-menu-compact.vue.d.ts +2 -2
- package/dist/components/dropdown-menu/dropdown-menu-content.js +1 -1
- package/dist/components/dropdown-menu/dropdown-menu-content.vue.d.ts +2 -2
- package/dist/components/dropdown-menu/dropdown-menu-radio-compact.vue.d.ts +3 -3
- 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-trigger.js +1 -1
- package/dist/components/dropdown-menu/dropdown-menu-wrapper-compact.vue.d.ts +2 -2
- package/dist/components/editable/context.js +1 -1
- package/dist/components/editable/editable-area.js +1 -1
- package/dist/components/editable/editable-area.vue.d.ts +1 -4
- package/dist/components/editable/editable-cancel-trigger.js +1 -1
- package/dist/components/editable/editable-cancel-trigger.vue.d.ts +1 -4
- package/dist/components/editable/editable-compact.js +1 -1
- package/dist/components/editable/editable-edit-trigger.js +1 -1
- package/dist/components/editable/editable-edit-trigger.vue.d.ts +1 -4
- package/dist/components/editable/editable-input.js +1 -1
- package/dist/components/editable/editable-input.vue.d.ts +4 -1
- package/dist/components/editable/editable-preview.js +1 -1
- package/dist/components/editable/editable-root.js +1 -1
- package/dist/components/editable/editable-root.vue.d.ts +2 -4
- package/dist/components/editable/editable-submit-trigger.js +1 -1
- package/dist/components/editable/editable-submit-trigger.vue.d.ts +1 -4
- package/dist/components/editable/types.d.ts +10 -9
- package/dist/components/empty/empty-content.js +1 -1
- package/dist/components/empty/empty-description.js +1 -1
- package/dist/components/empty/empty-header.js +1 -1
- package/dist/components/empty/empty-media.js +1 -1
- package/dist/components/empty/empty-root.js +1 -1
- package/dist/components/empty/empty-title.js +1 -1
- package/dist/components/empty/types.d.ts +8 -8
- package/dist/components/form/form-compact.js +1 -1
- package/dist/components/form/form-control.js +1 -1
- package/dist/components/form/form-description.js +1 -1
- package/dist/components/form/form-error.js +1 -1
- package/dist/components/form/form-field-array-compact.js +1 -1
- package/dist/components/form/form-field-compact.js +1 -1
- package/dist/components/form/form-label.js +1 -1
- package/dist/components/form/types.d.ts +7 -6
- package/dist/components/hover-card/context.js +1 -1
- package/dist/components/hover-card/hover-card-popup.js +1 -1
- package/dist/components/hover-card/hover-card-positioner.js +1 -1
- package/dist/components/hover-card/hover-card-root.js +1 -1
- package/dist/components/hover-card/hover-card-root.vue.d.ts +1 -1
- package/dist/components/hover-card/hover-card-trigger.js +1 -1
- package/dist/components/hover-card/index.d.ts +1 -1
- package/dist/components/input/input-clear.js +1 -1
- package/dist/components/input/input-compact.js +1 -1
- package/dist/components/input/input-control.js +1 -1
- package/dist/components/input/input-root.js +1 -1
- package/dist/components/input/input-root.vue.d.ts +1 -1
- package/dist/components/input/types.d.ts +10 -9
- package/dist/components/input-number/context.js +1 -1
- package/dist/components/input-number/index.d.ts +7 -6
- package/dist/components/input-number/index.js +1 -1
- package/dist/components/input-number/input-number-clear.js +1 -0
- package/dist/components/input-number/input-number-compact.js +1 -0
- package/dist/components/input-number/input-number-compact.vue.d.ts +21 -0
- package/dist/components/input-number/input-number-control.js +1 -1
- package/dist/components/input-number/input-number-decrement.js +1 -1
- package/dist/components/input-number/input-number-decrement.vue.d.ts +1 -4
- package/dist/components/input-number/input-number-increment.js +1 -1
- package/dist/components/input-number/input-number-increment.vue.d.ts +1 -4
- package/dist/components/input-number/input-number-root.js +1 -1
- package/dist/components/input-number/input-number-root.vue.d.ts +4 -4
- package/dist/components/input-number/types.d.ts +87 -14
- package/dist/components/input-otp/input-otp-compact.js +1 -1
- package/dist/components/input-otp/input-otp-compact.vue.d.ts +2 -2
- package/dist/components/input-otp/input-otp-input.js +1 -1
- package/dist/components/input-otp/input-otp-positioner.js +1 -1
- package/dist/components/input-otp/input-otp-root.js +1 -1
- package/dist/components/input-otp/input-otp-root.vue.d.ts +2 -2
- package/dist/components/input-otp/types.d.ts +5 -4
- package/dist/components/kbd/kbd.js +1 -1
- package/dist/components/kbd/types.d.ts +2 -3
- package/dist/components/label/label.js +1 -1
- package/dist/components/label/types.d.ts +2 -3
- package/dist/components/layout/layout-classic-placeholder.js +1 -1
- package/dist/components/layout/layout-classic-root.js +1 -1
- package/dist/components/layout/layout-content.js +1 -1
- package/dist/components/layout/layout-footer.js +1 -1
- package/dist/components/layout/layout-header.js +1 -1
- package/dist/components/layout/layout-main.js +1 -1
- package/dist/components/layout/layout-mobile.js +1 -1
- package/dist/components/layout/layout-rail.js +1 -1
- package/dist/components/layout/layout-root.js +1 -1
- package/dist/components/layout/layout-root.vue.d.ts +2 -2
- package/dist/components/layout/layout-sidebar.js +1 -1
- package/dist/components/layout/layout-tab.js +1 -1
- package/dist/components/layout/layout-trigger.js +1 -1
- package/dist/components/layout/layout-trigger.vue.d.ts +1 -4
- package/dist/components/layout/types.d.ts +13 -12
- package/dist/components/link/link.js +1 -1
- package/dist/components/link/types.d.ts +2 -3
- package/dist/components/list/list-content.js +1 -1
- package/dist/components/list/list-description.js +1 -1
- package/dist/components/list/list-item.js +1 -1
- package/dist/components/list/list-root.js +1 -1
- package/dist/components/list/list-title.js +1 -1
- package/dist/components/list/types.d.ts +6 -7
- package/dist/components/listbox/context.js +1 -1
- package/dist/components/listbox/listbox-content.js +1 -1
- package/dist/components/listbox/listbox-filter.js +1 -1
- package/dist/components/listbox/listbox-group-label.js +1 -1
- package/dist/components/listbox/listbox-group.js +1 -1
- package/dist/components/listbox/listbox-item-indicator.js +1 -1
- package/dist/components/listbox/listbox-item.js +1 -1
- package/dist/components/listbox/listbox-item.vue.d.ts +1 -4
- package/dist/components/listbox/listbox-root.js +1 -1
- package/dist/components/listbox/types.d.ts +9 -8
- package/dist/components/menu/context.js +1 -1
- package/dist/components/menu/menu-checkbox-group.js +1 -1
- package/dist/components/menu/menu-checkbox-group.vue.d.ts +1 -1
- package/dist/components/menu/menu-checkbox-item.js +1 -1
- package/dist/components/menu/menu-content-impl.js +1 -1
- package/dist/components/menu/menu-content.js +1 -1
- package/dist/components/menu/menu-content.vue.d.ts +2 -2
- package/dist/components/menu/menu-group-label.js +1 -1
- package/dist/components/menu/menu-group.js +1 -1
- package/dist/components/menu/menu-item-impl.js +1 -1
- package/dist/components/menu/menu-item-indicator.js +1 -1
- package/dist/components/menu/menu-item.js +1 -1
- package/dist/components/menu/menu-option-compact.vue.d.ts +2 -2
- package/dist/components/menu/menu-options-compact.vue.d.ts +2 -2
- package/dist/components/menu/menu-radio-group.js +1 -1
- package/dist/components/menu/menu-radio-group.vue.d.ts +3 -3
- package/dist/components/menu/menu-radio-item.js +1 -1
- package/dist/components/menu/menu-radio-options-compact.js +1 -1
- package/dist/components/menu/menu-radio-options-compact.vue.d.ts +2 -2
- package/dist/components/menu/menu-root.js +1 -1
- package/dist/components/menu/menu-root.vue.d.ts +1 -1
- package/dist/components/menu/menu-sub-content.js +1 -1
- package/dist/components/menu/menu-sub-content.vue.d.ts +2 -2
- package/dist/components/menu/menu-sub-trigger.js +1 -1
- package/dist/components/menu/menu-sub.js +1 -1
- package/dist/components/menu/types.d.ts +11 -12
- package/dist/components/menubar/context.js +1 -1
- package/dist/components/menubar/menubar-compact.vue.d.ts +3 -3
- package/dist/components/menubar/menubar-content.js +1 -1
- package/dist/components/menubar/menubar-content.vue.d.ts +2 -2
- package/dist/components/menubar/menubar-menu.js +1 -1
- package/dist/components/menubar/menubar-root.js +1 -1
- package/dist/components/menubar/menubar-root.vue.d.ts +1 -1
- package/dist/components/menubar/menubar-sub-content.js +1 -1
- package/dist/components/menubar/menubar-sub-content.vue.d.ts +2 -2
- package/dist/components/menubar/menubar-sub-trigger.js +1 -1
- package/dist/components/menubar/menubar-trigger.js +1 -1
- package/dist/components/menubar/menubar-trigger.vue.d.ts +1 -4
- package/dist/components/menubar/types.d.ts +5 -7
- package/dist/components/navigation-menu/context.js +1 -1
- package/dist/components/navigation-menu/navigation-menu-content.js +1 -1
- package/dist/components/navigation-menu/navigation-menu-indicator.js +1 -1
- package/dist/components/navigation-menu/navigation-menu-item.js +1 -1
- package/dist/components/navigation-menu/navigation-menu-link.js +1 -1
- package/dist/components/navigation-menu/navigation-menu-list.js +1 -1
- package/dist/components/navigation-menu/navigation-menu-root.js +1 -1
- package/dist/components/navigation-menu/navigation-menu-sub-list.js +1 -1
- package/dist/components/navigation-menu/navigation-menu-trigger.js +1 -1
- package/dist/components/navigation-menu/navigation-menu-viewport.js +1 -1
- package/dist/components/navigation-menu/types.d.ts +12 -11
- package/dist/components/page-tabs/hooks.js +1 -1
- package/dist/components/page-tabs/index.d.ts +6 -5
- package/dist/components/page-tabs/index.js +1 -1
- package/dist/components/page-tabs/page-tabs-close.js +1 -1
- package/dist/components/page-tabs/page-tabs-compact.js +1 -0
- package/dist/components/page-tabs/page-tabs-compact.vue.d.ts +27 -0
- package/dist/components/page-tabs/page-tabs-item.js +1 -1
- package/dist/components/page-tabs/page-tabs-item.vue.d.ts +2 -2
- package/dist/components/page-tabs/page-tabs-pin.js +1 -1
- package/dist/components/page-tabs/page-tabs-root.js +1 -1
- package/dist/components/page-tabs/page-tabs-root.vue.d.ts +3 -2
- package/dist/components/page-tabs/types.d.ts +208 -9
- package/dist/components/pagination/pagination-ellipsis.js +1 -1
- package/dist/components/pagination/pagination-first.js +1 -1
- package/dist/components/pagination/pagination-first.vue.d.ts +2 -2
- package/dist/components/pagination/pagination-last.js +1 -1
- package/dist/components/pagination/pagination-last.vue.d.ts +2 -2
- package/dist/components/pagination/pagination-list-item.js +1 -1
- package/dist/components/pagination/pagination-list-item.vue.d.ts +2 -2
- package/dist/components/pagination/pagination-list.js +1 -1
- package/dist/components/pagination/pagination-next.js +1 -1
- package/dist/components/pagination/pagination-next.vue.d.ts +2 -2
- package/dist/components/pagination/pagination-prev.js +1 -1
- package/dist/components/pagination/pagination-prev.vue.d.ts +2 -2
- package/dist/components/pagination/pagination-root.js +1 -1
- package/dist/components/pagination/types.d.ts +8 -6
- package/dist/components/password/context.d.ts +9 -0
- package/dist/components/password/context.js +1 -0
- package/dist/components/password/index.d.ts +4 -0
- package/dist/components/password/index.js +1 -0
- package/dist/components/password/password-compact.js +1 -0
- package/dist/components/password/password-compact.vue.d.ts +23 -0
- package/dist/components/password/types.d.ts +97 -0
- package/dist/components/popconfirm/context.d.ts +9 -0
- package/dist/components/popconfirm/context.js +1 -0
- package/dist/components/popconfirm/index.d.ts +21 -0
- package/dist/components/popconfirm/index.js +1 -0
- package/dist/components/popconfirm/popconfirm-cancel.js +1 -0
- package/dist/components/popconfirm/popconfirm-cancel.vue.d.ts +22 -0
- package/dist/components/popconfirm/popconfirm-compact.js +1 -0
- package/dist/components/{date-picker/date-picker-content.vue.d.ts → popconfirm/popconfirm-compact.vue.d.ts} +17 -7
- package/dist/components/popconfirm/popconfirm-confirm.js +1 -0
- package/dist/components/popconfirm/popconfirm-confirm.vue.d.ts +22 -0
- package/dist/components/popconfirm/popconfirm-content.js +1 -0
- package/dist/components/popconfirm/popconfirm-content.vue.d.ts +18 -0
- package/dist/components/popconfirm/popconfirm-description.js +1 -0
- package/dist/components/popconfirm/popconfirm-description.vue.d.ts +18 -0
- package/dist/components/popconfirm/popconfirm-footer.js +1 -0
- package/dist/components/popconfirm/popconfirm-footer.vue.d.ts +18 -0
- package/dist/components/popconfirm/popconfirm-header.js +1 -0
- package/dist/components/popconfirm/popconfirm-header.vue.d.ts +18 -0
- package/dist/components/popconfirm/popconfirm-title.js +1 -0
- package/dist/components/popconfirm/popconfirm-title.vue.d.ts +18 -0
- package/dist/components/popconfirm/types.d.ts +221 -0
- package/dist/components/popover/context.js +1 -1
- package/dist/components/popover/index.d.ts +3 -3
- package/dist/components/popover/index.js +1 -1
- package/dist/components/popover/popover-anchor.js +1 -1
- package/dist/components/popover/popover-close.js +1 -1
- package/dist/components/popover/popover-close.vue.d.ts +3 -6
- package/dist/components/popover/popover-compact.js +1 -1
- package/dist/components/popover/popover-popup.js +1 -1
- package/dist/components/popover/popover-positioner-impl.js +1 -1
- package/dist/components/popover/popover-positioner.js +1 -1
- package/dist/components/popover/popover-positioner.vue.d.ts +1 -0
- package/dist/components/popover/popover-root.js +1 -1
- package/dist/components/popover/popover-root.vue.d.ts +1 -1
- package/dist/components/popover/popover-trigger.js +1 -1
- package/dist/components/popover/types.d.ts +13 -15
- package/dist/components/popper/index.d.ts +1 -1
- package/dist/components/popper/popper-anchor.js +1 -1
- package/dist/components/popper/popper-arrow.js +1 -1
- package/dist/components/popper/popper-positioner.js +1 -1
- package/dist/components/popper/popper-positioner.vue.d.ts +3 -2
- package/dist/components/popper/types.d.ts +7 -6
- package/dist/components/primitive/index.d.ts +2 -2
- package/dist/components/primitive/types.d.ts +3 -1
- package/dist/components/progress/index.d.ts +8 -6
- package/dist/components/progress/index.js +1 -1
- package/dist/components/progress/progress-circle-compact.js +1 -0
- package/dist/components/progress/progress-circle-compact.vue.d.ts +21 -0
- package/dist/components/progress/progress-circle-svg.js +1 -0
- package/dist/components/progress/{progress-circle.vue.d.ts → progress-circle-svg.vue.d.ts} +3 -3
- package/dist/components/progress/progress-compact.js +1 -0
- package/dist/components/progress/progress-compact.vue.d.ts +21 -0
- package/dist/components/progress/progress-indicator.js +1 -1
- package/dist/components/progress/progress-indicator.vue.d.ts +1 -4
- package/dist/components/progress/progress-provider.js +1 -1
- package/dist/components/progress/progress-root.js +1 -1
- package/dist/components/progress/progress-root.vue.d.ts +1 -3
- package/dist/components/progress/shared.js +1 -1
- package/dist/components/progress/types.d.ts +67 -22
- package/dist/components/radio-group/context.js +1 -1
- package/dist/components/radio-group/radio-group-compact.vue.d.ts +2 -2
- package/dist/components/radio-group/radio-group-control.js +1 -1
- package/dist/components/radio-group/radio-group-control.vue.d.ts +2 -2
- package/dist/components/radio-group/radio-group-indicator.js +1 -1
- package/dist/components/radio-group/radio-group-item.js +1 -1
- package/dist/components/radio-group/radio-group-label.js +1 -1
- package/dist/components/radio-group/radio-group-root.js +1 -1
- package/dist/components/radio-group/radio-group-root.vue.d.ts +3 -3
- package/dist/components/radio-group/types.d.ts +9 -7
- package/dist/components/roving-focus/context.js +1 -1
- package/dist/components/roving-focus/roving-focus-group.js +1 -1
- package/dist/components/roving-focus/roving-focus-group.vue.d.ts +1 -1
- package/dist/components/roving-focus/roving-focus-item.js +1 -1
- package/dist/components/roving-focus/types.d.ts +3 -4
- package/dist/components/scroll-area/index.d.ts +8 -7
- package/dist/components/scroll-area/index.js +1 -1
- package/dist/components/scroll-area/scroll-area-compact.js +1 -0
- package/dist/components/scroll-area/scroll-area-compact.vue.d.ts +15 -0
- package/dist/components/scroll-area/scroll-area-corner.js +1 -1
- package/dist/components/scroll-area/scroll-area-corner.vue.d.ts +1 -4
- package/dist/components/scroll-area/scroll-area-root.js +1 -1
- package/dist/components/scroll-area/scroll-area-root.vue.d.ts +0 -2
- package/dist/components/scroll-area/scroll-area-scrollbar.js +1 -1
- package/dist/components/scroll-area/scroll-area-scrollbar.vue.d.ts +0 -2
- package/dist/components/scroll-area/scroll-area-thumb.js +1 -1
- package/dist/components/scroll-area/scroll-area-thumb.vue.d.ts +1 -4
- package/dist/components/scroll-area/scroll-area-viewport.js +1 -1
- package/dist/components/scroll-area/types.d.ts +46 -8
- package/dist/components/segment/index.d.ts +1 -1
- package/dist/components/segment/segment-compact.js +1 -1
- package/dist/components/segment/segment-compact.vue.d.ts +2 -2
- package/dist/components/select/context.js +1 -1
- package/dist/components/select/select-arrow.js +1 -1
- package/dist/components/select/select-bubble-select.js +1 -1
- package/dist/components/select/select-compact.vue.d.ts +2 -2
- package/dist/components/select/select-content.js +1 -1
- package/dist/components/select/select-group-label.js +1 -1
- package/dist/components/select/select-group.js +1 -1
- package/dist/components/select/select-item-aligned-popup.js +1 -1
- package/dist/components/select/select-item-aligned-positioner.js +1 -1
- package/dist/components/select/select-item-indicator.js +1 -1
- package/dist/components/select/select-item-text.js +1 -1
- package/dist/components/select/select-item.js +1 -1
- package/dist/components/select/select-popper-popup.js +1 -1
- package/dist/components/select/select-root.vue.d.ts +2 -2
- package/dist/components/select/select-scroll-button-impl.js +1 -1
- package/dist/components/select/select-scroll-down-button.js +1 -1
- package/dist/components/select/select-scroll-up-button.js +1 -1
- package/dist/components/select/select-separator.js +1 -1
- package/dist/components/select/select-trigger-icon.js +1 -1
- package/dist/components/select/select-trigger.js +1 -1
- package/dist/components/select/select-value.js +1 -1
- package/dist/components/select/select-viewport.js +1 -1
- package/dist/components/select/types.d.ts +16 -14
- package/dist/components/separator/index.d.ts +5 -4
- package/dist/components/separator/index.js +1 -1
- package/dist/components/separator/separator-compact.js +1 -0
- package/dist/components/separator/separator-compact.vue.d.ts +18 -0
- package/dist/components/separator/separator-label.js +1 -1
- package/dist/components/separator/separator-root.js +1 -1
- package/dist/components/separator/types.d.ts +26 -5
- package/dist/components/skeleton/skeleton.js +1 -1
- package/dist/components/skeleton/skeleton.vue.d.ts +1 -4
- package/dist/components/skeleton/types.d.ts +2 -3
- package/dist/components/slider/index.d.ts +7 -6
- package/dist/components/slider/index.js +1 -1
- package/dist/components/slider/shared.js +1 -1
- package/dist/components/slider/slider-compact.js +1 -0
- package/dist/components/slider/slider-compact.vue.d.ts +21 -0
- package/dist/components/slider/slider-range.js +1 -1
- package/dist/components/slider/slider-range.vue.d.ts +1 -4
- package/dist/components/slider/slider-root.js +1 -1
- package/dist/components/slider/slider-root.vue.d.ts +1 -3
- package/dist/components/slider/slider-thumb.js +1 -1
- package/dist/components/slider/slider-thumb.vue.d.ts +1 -4
- package/dist/components/slider/slider-track.js +1 -1
- package/dist/components/slider/slider-track.vue.d.ts +1 -4
- package/dist/components/slider/types.d.ts +55 -8
- package/dist/components/splitter/context.js +1 -1
- package/dist/components/splitter/splitter-group.js +1 -1
- package/dist/components/splitter/splitter-group.vue.d.ts +1 -3
- package/dist/components/splitter/splitter-panel.js +1 -1
- package/dist/components/splitter/splitter-panel.vue.d.ts +4 -6
- package/dist/components/splitter/splitter-resize-handle.js +1 -1
- package/dist/components/splitter/splitter-resize-handle.vue.d.ts +0 -2
- package/dist/components/splitter/types.d.ts +5 -5
- package/dist/components/stepper/context.js +1 -1
- package/dist/components/stepper/stepper-description.js +1 -1
- package/dist/components/stepper/stepper-indicator.js +1 -1
- package/dist/components/stepper/stepper-item.js +1 -1
- package/dist/components/stepper/stepper-item.vue.d.ts +0 -2
- package/dist/components/stepper/stepper-root.js +1 -1
- package/dist/components/stepper/stepper-root.vue.d.ts +2 -4
- package/dist/components/stepper/stepper-separator.js +1 -1
- package/dist/components/stepper/stepper-title.js +1 -1
- package/dist/components/stepper/stepper-trigger.js +1 -1
- package/dist/components/stepper/types.d.ts +8 -8
- package/dist/components/switch/context.js +1 -1
- package/dist/components/switch/index.d.ts +6 -5
- package/dist/components/switch/index.js +1 -1
- package/dist/components/switch/switch-compact.js +1 -0
- package/dist/components/switch/switch-compact.vue.d.ts +22 -0
- package/dist/components/switch/switch-control.js +1 -1
- package/dist/components/switch/switch-control.vue.d.ts +2 -2
- package/dist/components/switch/switch-root.js +1 -1
- package/dist/components/switch/switch-root.vue.d.ts +1 -1
- package/dist/components/switch/switch-thumb.js +1 -1
- package/dist/components/switch/types.d.ts +51 -6
- package/dist/components/table/hooks.js +1 -1
- package/dist/components/table/shared.js +1 -1
- package/dist/components/table/table-body.js +1 -1
- package/dist/components/table/table-cell.js +1 -1
- package/dist/components/table/table-compact.js +1 -1
- package/dist/components/table/table-content.js +1 -1
- package/dist/components/table/table-footer.js +1 -1
- package/dist/components/table/table-head.js +1 -1
- package/dist/components/table/table-header.js +1 -1
- package/dist/components/table/table-root.js +1 -1
- package/dist/components/table/table-row.js +1 -1
- package/dist/components/table/table-scroll.js +1 -1
- package/dist/components/table/table-virtual-spacer-row.js +1 -1
- package/dist/components/table/types.d.ts +15 -11
- package/dist/components/tabs/context.js +1 -1
- package/dist/components/tabs/tabs-compact.vue.d.ts +2 -2
- package/dist/components/tabs/tabs-content.js +1 -1
- package/dist/components/tabs/tabs-indicator.js +1 -1
- package/dist/components/tabs/tabs-list.js +1 -1
- package/dist/components/tabs/tabs-root.js +1 -1
- package/dist/components/tabs/tabs-root.vue.d.ts +5 -5
- package/dist/components/tabs/tabs-trigger.js +1 -1
- package/dist/components/tabs/types.d.ts +8 -7
- package/dist/components/tag/tag.js +1 -1
- package/dist/components/tag/types.d.ts +2 -3
- package/dist/components/tags-input/index.d.ts +8 -7
- package/dist/components/tags-input/index.js +1 -1
- package/dist/components/tags-input/tags-input-clear.js +1 -1
- package/dist/components/tags-input/tags-input-clear.vue.d.ts +1 -4
- package/dist/components/tags-input/tags-input-compact.js +1 -0
- package/dist/components/tags-input/tags-input-compact.vue.d.ts +25 -0
- package/dist/components/tags-input/tags-input-control.js +1 -0
- package/dist/components/tags-input/tags-input-control.vue.d.ts +8 -0
- package/dist/components/tags-input/tags-input-item-delete.js +1 -1
- package/dist/components/tags-input/tags-input-item-delete.vue.d.ts +1 -4
- package/dist/components/tags-input/tags-input-item-text.js +1 -1
- package/dist/components/tags-input/tags-input-item-text.vue.d.ts +3 -6
- package/dist/components/tags-input/tags-input-item.js +1 -1
- package/dist/components/tags-input/tags-input-item.vue.d.ts +14 -14
- package/dist/components/tags-input/tags-input-root.js +1 -1
- package/dist/components/tags-input/tags-input-root.vue.d.ts +29 -21
- package/dist/components/tags-input/types.d.ts +75 -63
- package/dist/components/textarea/index.d.ts +7 -5
- package/dist/components/textarea/index.js +1 -1
- package/dist/components/textarea/textarea-clear.js +1 -0
- package/dist/components/textarea/textarea-clear.vue.d.ts +22 -0
- package/dist/components/textarea/textarea-compact.js +1 -0
- package/dist/components/textarea/textarea-compact.vue.d.ts +21 -0
- package/dist/components/textarea/textarea-control.js +1 -1
- package/dist/components/textarea/textarea-counter.js +1 -1
- package/dist/components/textarea/textarea-root.js +1 -1
- package/dist/components/textarea/textarea-root.vue.d.ts +3 -1
- package/dist/components/textarea/types.d.ts +96 -6
- package/dist/components/time-field/index.d.ts +6 -4
- package/dist/components/time-field/index.js +1 -1
- package/dist/components/time-field/time-field-compact.js +1 -0
- package/dist/components/time-field/time-field-compact.vue.d.ts +15 -0
- package/dist/components/time-field/time-field-input.js +1 -1
- package/dist/components/time-field/time-field-input.vue.d.ts +2 -2
- package/dist/components/time-field/time-field-root.js +1 -1
- package/dist/components/time-field/time-field-root.vue.d.ts +5 -15
- package/dist/components/time-field/types.d.ts +33 -132
- package/dist/components/time-range-field/index.d.ts +2 -2
- package/dist/components/time-range-field/time-range-field-compact.js +1 -1
- package/dist/components/time-range-field/time-range-field-compact.vue.d.ts +1 -2
- package/dist/components/time-range-field/time-range-field-input.js +1 -1
- package/dist/components/time-range-field/time-range-field-root.js +1 -1
- package/dist/components/time-range-field/time-range-field-root.vue.d.ts +6 -20
- package/dist/components/time-range-field/types.d.ts +36 -184
- package/dist/components/toast/toast-provider.js +1 -1
- package/dist/components/toast/toast.js +1 -1
- package/dist/components/toast/toaster.js +1 -1
- package/dist/components/toast/toaster.vue.d.ts +1 -1
- package/dist/components/toast/types.d.ts +3 -2
- package/dist/components/toggle/toggle.js +1 -1
- package/dist/components/toggle/toggle.vue.d.ts +1 -4
- package/dist/components/toggle/types.d.ts +2 -7
- package/dist/components/toggle-group/context.js +1 -1
- package/dist/components/toggle-group/toggle-group-item.js +1 -1
- package/dist/components/toggle-group/toggle-group-root.js +1 -1
- package/dist/components/toggle-group/types.d.ts +3 -5
- package/dist/components/toolbar/context.js +1 -1
- package/dist/components/toolbar/toolbar-button.js +1 -1
- package/dist/components/toolbar/toolbar-link.js +1 -1
- package/dist/components/toolbar/toolbar-root.js +1 -1
- package/dist/components/toolbar/toolbar-separator.js +1 -1
- package/dist/components/toolbar/toolbar-toggle-group.js +1 -1
- package/dist/components/toolbar/toolbar-toggle-item.js +1 -1
- package/dist/components/toolbar/types.d.ts +4 -4
- package/dist/components/tooltip/index.d.ts +8 -7
- package/dist/components/tooltip/index.js +1 -1
- package/dist/components/tooltip/tooltip-compact.js +1 -0
- package/dist/components/tooltip/tooltip-compact.vue.d.ts +28 -0
- package/dist/components/tooltip/tooltip-popup.js +1 -1
- package/dist/components/tooltip/tooltip-positioner-impl.js +1 -1
- package/dist/components/tooltip/tooltip-positioner.js +1 -1
- package/dist/components/tooltip/tooltip-positioner.vue.d.ts +1 -0
- package/dist/components/tooltip/tooltip-root.js +1 -1
- package/dist/components/tooltip/tooltip-root.vue.d.ts +1 -1
- package/dist/components/tooltip/tooltip-trigger.js +1 -1
- package/dist/components/tooltip/types.d.ts +58 -2
- package/dist/components/tree/context.js +1 -1
- package/dist/components/tree/tree-item.js +1 -1
- package/dist/components/tree/tree-root.js +1 -1
- package/dist/components/tree/tree-root.vue.d.ts +1 -1
- package/dist/components/tree/tree-virtualizer-item.js +1 -1
- package/dist/components/tree/tree-virtualizer-root.js +1 -1
- package/dist/components/tree/types.d.ts +5 -5
- package/dist/components/tree-menu/index.d.ts +12 -8
- package/dist/components/tree-menu/index.js +1 -1
- package/dist/components/tree-menu/shared.js +1 -0
- package/dist/components/tree-menu/tree-menu-button.js +1 -1
- package/dist/components/tree-menu/tree-menu-button.vue.d.ts +1 -4
- package/dist/components/tree-menu/tree-menu-collapsible.js +1 -1
- package/dist/components/tree-menu/tree-menu-compact.js +1 -0
- package/dist/components/tree-menu/tree-menu-compact.vue.d.ts +24 -0
- package/dist/components/tree-menu/tree-menu-group-label.js +1 -1
- package/dist/components/tree-menu/tree-menu-group-root.js +1 -1
- package/dist/components/tree-menu/tree-menu-group.js +1 -1
- package/dist/components/tree-menu/tree-menu-item.js +1 -1
- package/dist/components/tree-menu/tree-menu-option-compact.js +1 -0
- package/dist/components/tree-menu/tree-menu-option-compact.vue.d.ts +33 -0
- package/dist/components/tree-menu/tree-menu-options-compact.js +1 -0
- package/dist/components/tree-menu/tree-menu-options-compact.vue.d.ts +34 -0
- package/dist/components/tree-menu/tree-menu-root.js +1 -1
- package/dist/components/tree-menu/tree-menu-root.vue.d.ts +4 -1
- package/dist/components/tree-menu/tree-menu-slot-compact.js +1 -0
- package/dist/components/tree-menu/tree-menu-slot-compact.vue.d.ts +28 -0
- package/dist/components/tree-menu/tree-menu-sub.js +1 -1
- package/dist/components/tree-menu/types.d.ts +241 -12
- package/dist/components/virtualizer/types.d.ts +7 -6
- package/dist/components/virtualizer/virtualizer-content.js +1 -1
- package/dist/components/virtualizer/virtualizer-item.js +1 -1
- package/dist/components/virtualizer/virtualizer-root.js +1 -1
- package/dist/components/visually-hidden/types.d.ts +2 -3
- package/dist/components/visually-hidden/visually-hidden-input-bubble.js +1 -1
- package/dist/components/visually-hidden/visually-hidden-input.js +1 -1
- package/dist/components/visually-hidden/visually-hidden.js +1 -1
- package/dist/composables/index.d.ts +2 -1
- package/dist/composables/index.js +1 -1
- package/dist/composables/use-bool-prop.d.ts +12 -0
- package/dist/composables/use-bool-prop.js +1 -0
- package/dist/composables/use-collection.d.ts +0 -3
- package/dist/composables/use-collection.js +1 -1
- package/dist/composables/use-controllable-state.d.ts +10 -1
- package/dist/composables/use-controllable-state.js +1 -1
- package/dist/composables/use-selection.js +1 -1
- package/dist/constants/components.d.ts +3 -7
- package/dist/constants/components.js +1 -1
- package/dist/date/calendar.d.ts +22 -24
- package/dist/date/calendar.js +1 -1
- package/dist/date/comparators.d.ts +29 -30
- package/dist/date/formatter.d.ts +1 -1
- package/dist/date/index.d.ts +8 -8
- package/dist/date/index.js +1 -1
- package/dist/date/parser.d.ts +14 -13
- package/dist/date/parser.js +1 -1
- package/dist/date/parts.d.ts +6 -6
- package/dist/date/placeholders.d.ts +2 -21
- package/dist/date/placeholders.js +1 -1
- package/dist/date/types.d.ts +12 -11
- package/dist/date/use-date-field.d.ts +6 -8
- package/dist/date/use-date-field.js +1 -1
- package/dist/date/utils.d.ts +3 -7
- package/dist/date/utils.js +1 -1
- package/dist/index.d.ts +423 -414
- package/dist/index.js +1 -1
- package/dist/locale/hooks.d.ts +14 -0
- package/dist/locale/hooks.js +1 -0
- package/dist/locale/index.d.ts +5 -0
- package/dist/locale/index.js +1 -0
- package/dist/locale/langs/en.d.ts +6 -0
- package/dist/locale/langs/en.js +1 -0
- package/dist/locale/langs/zh-CN.d.ts +6 -0
- package/dist/locale/langs/zh-CN.js +1 -0
- package/dist/locale/locales.d.ts +23 -0
- package/dist/locale/locales.js +1 -0
- package/dist/locale/types.d.ts +234 -0
- package/dist/namespaced/index.d.ts +983 -966
- package/dist/namespaced/index.js +1 -1
- package/dist/shared/color.d.ts +3 -13
- package/dist/shared/color.js +1 -1
- package/dist/shared/index.d.ts +4 -4
- package/dist/shared/index.js +1 -1
- package/dist/shared/object.d.ts +2 -1
- package/dist/shared/object.js +1 -1
- package/dist/shared/string.d.ts +6 -1
- package/dist/shared/string.js +1 -1
- package/dist/shared/time-picker.d.ts +1 -2
- package/dist/shared/vue.js +1 -1
- package/dist/types/color.d.ts +16 -0
- package/dist/types/index.d.ts +3 -2
- package/dist/types/vue.d.ts +4 -2
- package/package.json +13 -3
- package/dist/components/_icon/icon.vue.d.ts +0 -8
- package/dist/components/_icon/index.d.ts +0 -3
- package/dist/components/_icon/index.js +0 -1
- package/dist/components/calendar/use-calendar.d.ts +0 -45
- package/dist/components/color-swatch/color-swatch.js +0 -1
- package/dist/components/color-swatch/color-swatch.vue.d.ts +0 -26
- package/dist/components/date-picker/date-picker-content.js +0 -1
- package/dist/components/date-picker/date-picker-root.js +0 -1
- package/dist/components/date-picker/date-picker-root.vue.d.ts +0 -38
- package/dist/components/date-range-picker/date-range-picker-popup.js +0 -1
- package/dist/components/date-range-picker/date-range-picker-popup.vue.d.ts +0 -21
- package/dist/components/date-range-picker/date-range-picker-root.js +0 -1
- package/dist/components/date-range-picker/date-range-picker-root.vue.d.ts +0 -50
- package/dist/components/date-range-picker/date-range-picker-trigger.js +0 -1
- package/dist/components/date-range-picker/date-range-picker-trigger.vue.d.ts +0 -21
- package/dist/components/month-picker/context.d.ts +0 -9
- package/dist/components/month-picker/context.js +0 -1
- package/dist/components/month-picker/index.d.ts +0 -6
- package/dist/components/month-picker/index.js +0 -1
- package/dist/components/month-picker/month-picker-popup.js +0 -1
- package/dist/components/month-picker/month-picker-popup.vue.d.ts +0 -36
- package/dist/components/month-picker/month-picker-root.js +0 -1
- package/dist/components/month-picker/month-picker-root.vue.d.ts +0 -39
- package/dist/components/month-picker/month-picker-trigger.js +0 -1
- package/dist/components/month-picker/month-picker-trigger.vue.d.ts +0 -21
- package/dist/components/month-picker/types.d.ts +0 -202
- package/dist/components/month-range-picker/context.d.ts +0 -9
- package/dist/components/month-range-picker/context.js +0 -1
- package/dist/components/month-range-picker/index.d.ts +0 -6
- package/dist/components/month-range-picker/index.js +0 -1
- package/dist/components/month-range-picker/month-range-picker-popup.js +0 -1
- package/dist/components/month-range-picker/month-range-picker-popup.vue.d.ts +0 -39
- package/dist/components/month-range-picker/month-range-picker-root.js +0 -1
- package/dist/components/month-range-picker/month-range-picker-root.vue.d.ts +0 -43
- package/dist/components/month-range-picker/month-range-picker-trigger.js +0 -1
- package/dist/components/month-range-picker/month-range-picker-trigger.vue.d.ts +0 -21
- package/dist/components/month-range-picker/types.d.ts +0 -234
- package/dist/components/progress/progress-circle.js +0 -1
- package/dist/components/range-calendar/context.d.ts +0 -9
- package/dist/components/range-calendar/context.js +0 -1
- package/dist/components/range-calendar/index.d.ts +0 -16
- package/dist/components/range-calendar/index.js +0 -1
- package/dist/components/range-calendar/range-calendar-cell-trigger.js +0 -1
- package/dist/components/range-calendar/range-calendar-cell-trigger.vue.d.ts +0 -33
- package/dist/components/range-calendar/range-calendar-cell.js +0 -1
- package/dist/components/range-calendar/range-calendar-compact.js +0 -1
- package/dist/components/range-calendar/range-calendar-grid-body.js +0 -1
- package/dist/components/range-calendar/range-calendar-grid-head.js +0 -1
- package/dist/components/range-calendar/range-calendar-grid-row.js +0 -1
- package/dist/components/range-calendar/range-calendar-grid.js +0 -1
- package/dist/components/range-calendar/range-calendar-head-cell.js +0 -1
- package/dist/components/range-calendar/range-calendar-header.js +0 -1
- package/dist/components/range-calendar/range-calendar-header.vue.d.ts +0 -21
- package/dist/components/range-calendar/range-calendar-heading.js +0 -1
- package/dist/components/range-calendar/range-calendar-heading.vue.d.ts +0 -22
- package/dist/components/range-calendar/range-calendar-next.js +0 -1
- package/dist/components/range-calendar/range-calendar-next.vue.d.ts +0 -24
- package/dist/components/range-calendar/range-calendar-prev.js +0 -1
- package/dist/components/range-calendar/range-calendar-prev.vue.d.ts +0 -24
- package/dist/components/range-calendar/range-calendar-root.js +0 -1
- package/dist/components/range-calendar/types.d.ts +0 -488
- package/dist/components/tags-input/tags-input-input.js +0 -1
- package/dist/components/tags-input/tags-input-input.vue.d.ts +0 -21
- package/dist/components/time-picker/context.d.ts +0 -9
- package/dist/components/time-picker/context.js +0 -1
- package/dist/components/time-picker/index.d.ts +0 -6
- package/dist/components/time-picker/index.js +0 -1
- package/dist/components/time-picker/time-picker-popup.js +0 -1
- package/dist/components/time-picker/time-picker-popup.vue.d.ts +0 -27
- package/dist/components/time-picker/time-picker-root.js +0 -1
- package/dist/components/time-picker/time-picker-root.vue.d.ts +0 -45
- package/dist/components/time-picker/time-picker-trigger.js +0 -1
- package/dist/components/time-picker/time-picker-trigger.vue.d.ts +0 -21
- package/dist/components/time-picker/types.d.ts +0 -224
- package/dist/components/time-range-picker/context.d.ts +0 -9
- package/dist/components/time-range-picker/context.js +0 -1
- package/dist/components/time-range-picker/index.d.ts +0 -7
- package/dist/components/time-range-picker/index.js +0 -1
- package/dist/components/time-range-picker/time-range-picker-compact.js +0 -1
- package/dist/components/time-range-picker/time-range-picker-compact.vue.d.ts +0 -31
- package/dist/components/time-range-picker/time-range-picker-popup.js +0 -1
- package/dist/components/time-range-picker/time-range-picker-popup.vue.d.ts +0 -30
- package/dist/components/time-range-picker/time-range-picker-root.js +0 -1
- package/dist/components/time-range-picker/time-range-picker-root.vue.d.ts +0 -50
- package/dist/components/time-range-picker/time-range-picker-trigger.js +0 -1
- package/dist/components/time-range-picker/time-range-picker-trigger.vue.d.ts +0 -21
- package/dist/components/time-range-picker/types.d.ts +0 -304
- package/dist/components/year-picker/context.d.ts +0 -9
- package/dist/components/year-picker/context.js +0 -1
- package/dist/components/year-picker/index.d.ts +0 -6
- package/dist/components/year-picker/index.js +0 -1
- package/dist/components/year-picker/types.d.ts +0 -207
- package/dist/components/year-picker/year-picker-popup.js +0 -1
- package/dist/components/year-picker/year-picker-popup.vue.d.ts +0 -36
- package/dist/components/year-picker/year-picker-root.js +0 -1
- package/dist/components/year-picker/year-picker-root.vue.d.ts +0 -39
- package/dist/components/year-picker/year-picker-trigger.js +0 -1
- package/dist/components/year-picker/year-picker-trigger.vue.d.ts +0 -21
- package/dist/components/year-range-picker/context.d.ts +0 -9
- package/dist/components/year-range-picker/context.js +0 -1
- package/dist/components/year-range-picker/index.d.ts +0 -6
- package/dist/components/year-range-picker/index.js +0 -1
- package/dist/components/year-range-picker/types.d.ts +0 -239
- package/dist/components/year-range-picker/year-range-picker-popup.js +0 -1
- package/dist/components/year-range-picker/year-range-picker-popup.vue.d.ts +0 -39
- package/dist/components/year-range-picker/year-range-picker-root.js +0 -1
- package/dist/components/year-range-picker/year-range-picker-root.vue.d.ts +0 -43
- package/dist/components/year-range-picker/year-range-picker-trigger.js +0 -1
- package/dist/components/year-range-picker/year-range-picker-trigger.vue.d.ts +0 -21
package/dist/date/calendar.d.ts
CHANGED
|
@@ -1,43 +1,41 @@
|
|
|
1
|
-
import { DateRange, DayOfWeek,
|
|
2
|
-
import { DateValue } from "@internationalized/date";
|
|
1
|
+
import { DateGrid, DateRange, DateValue, DayOfWeek, WeekStartsOn } from "./types.js";
|
|
3
2
|
|
|
4
3
|
//#region src/date/calendar.d.ts
|
|
5
|
-
type WeekDayFormat = 'narrow' | 'short' | 'long';
|
|
6
|
-
type WeekStartsOn = 0 | 1 | 2 | 3 | 4 | 5 | 6;
|
|
7
4
|
declare const DEFAULT_DATE_LOCALE = "en-US";
|
|
8
|
-
interface
|
|
5
|
+
interface CreateSelectOptions {
|
|
9
6
|
dateObj: DateValue;
|
|
10
7
|
}
|
|
11
|
-
|
|
8
|
+
declare function getDaysBetween(start: DateValue, end: DateValue): DateValue[];
|
|
9
|
+
interface CreateMonthOptions {
|
|
12
10
|
dateObj: DateValue;
|
|
13
11
|
weekStartsOn: WeekStartsOn;
|
|
14
12
|
fixedWeeks: boolean;
|
|
15
13
|
locale: string;
|
|
16
14
|
}
|
|
17
|
-
declare function
|
|
18
|
-
declare function
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
15
|
+
declare function createMonth(options: CreateMonthOptions): DateGrid<DateValue>;
|
|
16
|
+
declare function startOfDecade(dateObj: DateValue): DateValue;
|
|
17
|
+
declare function endOfDecade(dateObj: DateValue): DateValue;
|
|
18
|
+
interface CreateDecadeOptions extends CreateSelectOptions {
|
|
19
|
+
startIndex?: number;
|
|
20
|
+
endIndex: number;
|
|
22
21
|
}
|
|
23
|
-
|
|
22
|
+
declare function createDecade(props: CreateDecadeOptions): DateValue[];
|
|
23
|
+
interface CreateYearOptions extends CreateSelectOptions {
|
|
24
24
|
numberOfMonths?: number;
|
|
25
25
|
pagedNavigation?: boolean;
|
|
26
26
|
}
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
27
|
+
declare function createYear(props: CreateYearOptions): DateValue[];
|
|
28
|
+
interface CreateMonthsOptions extends CreateMonthOptions {
|
|
29
|
+
numberOfMonths: number | undefined;
|
|
30
|
+
currentMonths?: DateGrid<DateValue>[];
|
|
30
31
|
}
|
|
31
|
-
declare function
|
|
32
|
-
declare function
|
|
33
|
-
|
|
34
|
-
declare function createYear(props: SetYearProps): DateValue[];
|
|
35
|
-
declare function createMonths(props: SetMonthProps): Grid<DateValue>[];
|
|
36
|
-
declare function createMonthGrid(props: CreateSelectProps): Grid<DateValue>;
|
|
37
|
-
declare function createYearGrid(props: CreateSelectProps & {
|
|
32
|
+
declare function createMonths(options: CreateMonthsOptions): DateGrid<DateValue>[];
|
|
33
|
+
declare function createMonthGrid(options: CreateSelectOptions): DateGrid<DateValue>;
|
|
34
|
+
interface CreateYearGridOptions extends CreateSelectOptions {
|
|
38
35
|
yearsPerPage?: number;
|
|
39
36
|
decadeAligned?: boolean;
|
|
40
|
-
}
|
|
37
|
+
}
|
|
38
|
+
declare function createYearGrid(options: CreateYearGridOptions): DateGrid<DateValue>;
|
|
41
39
|
declare function createYearRange({
|
|
42
40
|
start,
|
|
43
41
|
end
|
|
@@ -49,4 +47,4 @@ declare function createDateRange({
|
|
|
49
47
|
declare function getWeekStartsOn(locale: string): WeekStartsOn;
|
|
50
48
|
declare function getWeekNumber(date: DateValue, locale?: string, firstDayOfWeek?: DayOfWeek): number;
|
|
51
49
|
//#endregion
|
|
52
|
-
export {
|
|
50
|
+
export { CreateMonthOptions, CreateSelectOptions, CreateYearGridOptions, DEFAULT_DATE_LOCALE, createDateRange, createDecade, createMonth, createMonthGrid, createMonths, createYear, createYearGrid, createYearRange, endOfDecade, getDaysBetween, getWeekNumber, getWeekStartsOn, startOfDecade };
|
package/dist/date/calendar.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{getDaysInMonth as
|
|
1
|
+
import{chunk as e}from"../shared/object.js";import{getDaysInMonth as t,getLastFirstDayOfWeek as n,getNextLastDayOfWeek as r}from"./comparators.js";import"../shared/index.js";import{CalendarDate as i,endOfMonth as a,endOfYear as o,getDayOfWeek as s,startOfMonth as c,startOfWeek as l,startOfYear as u}from"@internationalized/date";const d=`en-US`;function f(e,t){let n=[],r=e.add({days:1});for(;r.compare(t)<0;)n.push(r),r=r.add({days:1});return n}function p(i){let{dateObj:o,weekStartsOn:s,fixedWeeks:l,locale:u}=i,d=t(o),p=Array.from({length:d},(e,t)=>o.set({day:t+1})),m=c(o),h=a(o),g=n(m,s,u),_=r(h,s,u),v=f(g.subtract({days:1}),m),y=f(h,_.add({days:1})),b=v.length+p.length+y.length;if(l&&b<42){let e=42-b,t=y.at(-1)??a(o),n=Array.from({length:e},(e,n)=>t.add({days:n+1}));y.push(...n)}let x=v.concat(p,y);return{value:o,cells:x,rows:e(x,7)}}function m(e){return u(e.subtract({years:e.year-Math.floor(e.year/10)*10}).set({day:1,month:1}))}function h(e){return o(m(e).add({years:9}))}function g(e){let{dateObj:t,startIndex:n=0,endIndex:r}=e,i=r-n+1;return i<=0?[]:Array.from({length:i},(e,r)=>t.add({years:n+r}).set({day:1,month:1}))}function _(e){let{dateObj:t,numberOfMonths:n=1,pagedNavigation:r=!1}=e;if(n&&r){let e=[];for(let r=1;r<=12;r+=n)e.push(c(t.set({month:r})));return e}return Array.from({length:12},(e,n)=>c(t.set({month:n+1})))}function v(e){let{numberOfMonths:t,dateObj:n,...r}=e;if(!t||t===1)return[p({...r,dateObj:n})];let i=[p({...r,dateObj:n})];for(let e=1;e<t;e+=1)i.push(p({...r,dateObj:n.add({months:e})}));return i}function y(t){let{dateObj:n}=t,r=_({dateObj:n});return{value:n,cells:r,rows:e(r,4)}}function b(t){let{dateObj:n,yearsPerPage:r=12,decadeAligned:i=!0}=t,a=i?m(n).year:n.year,o=Array.from({length:r},(e,t)=>u(n.set({year:a+t})));return{value:o[0],cells:o,rows:e(o,4)}}function x({start:e,end:t}){let n=[];if(!e||!t)return n;let r=u(e);for(;r.compare(t)<=0;)n.push(r),r=u(r.add({years:1}));return n}function S({start:e,end:t}){let n=[];if(!e||!t)return n;let r=e;for(;r.compare(t)<=0;)n.push(r),r=r.add({days:1});return n}function C(e){return(1-s(new i(2025,1,6),e)+7)%7}function w(e,t=d,n){let r=new i(e.year,1,1),a=r.toDate(`UTC`).getUTCDay()!==s(r,t),o=n??(a?`mon`:`sun`),c=a?4:1,u=s(e,t,o),f=e.add({days:7-c-u}).year,p=l(new i(f,1,c),t,o),m=l(e,t,o);return Math.round((m.toDate(`UTC`).getTime()-p.toDate(`UTC`).getTime())/(10080*60*1e3))+1}export{d as DEFAULT_DATE_LOCALE,S as createDateRange,g as createDecade,p as createMonth,y as createMonthGrid,v as createMonths,_ as createYear,b as createYearGrid,x as createYearRange,h as endOfDecade,f as getDaysBetween,w as getWeekNumber,C as getWeekStartsOn,m as startOfDecade};
|
|
@@ -1,40 +1,39 @@
|
|
|
1
|
-
import { Granularity,
|
|
2
|
-
import { CalendarDateTime,
|
|
1
|
+
import { DateMatcher, DateValue as DateValue$1, Granularity, TimeValue } from "./types.js";
|
|
2
|
+
import { CalendarDateTime, Time, ZonedDateTime } from "@internationalized/date";
|
|
3
3
|
|
|
4
4
|
//#region src/date/comparators.d.ts
|
|
5
|
-
|
|
6
|
-
declare function
|
|
7
|
-
declare function
|
|
8
|
-
declare function
|
|
9
|
-
declare function
|
|
10
|
-
declare function
|
|
11
|
-
declare function
|
|
12
|
-
declare function getDaysInMonth(date: Date | DateValue): number;
|
|
5
|
+
declare function parseStringToDateValue(dateStr: string, referenceValue: DateValue$1): DateValue$1;
|
|
6
|
+
declare function isTime(dateValue: DateValue$1 | TimeValue): dateValue is Time;
|
|
7
|
+
declare function toDate(dateValue: DateValue$1 | TimeValue, tz?: string): Date;
|
|
8
|
+
declare function isCalendarDateTime(dateValue: DateValue$1 | TimeValue): dateValue is CalendarDateTime;
|
|
9
|
+
declare function isZonedDateTime(dateValue: DateValue$1 | TimeValue): dateValue is ZonedDateTime;
|
|
10
|
+
declare function hasTime(dateValue: DateValue$1 | TimeValue): dateValue is CalendarDateTime | ZonedDateTime | Time;
|
|
11
|
+
declare function getDaysInMonth(date: Date | DateValue$1): number;
|
|
13
12
|
declare function getDefaultDate(props: {
|
|
14
|
-
defaultValue?: DateValue | DateValue[];
|
|
15
|
-
defaultPlaceholder?: DateValue;
|
|
13
|
+
defaultValue?: DateValue$1 | DateValue$1[];
|
|
14
|
+
defaultPlaceholder?: DateValue$1;
|
|
16
15
|
granularity?: Granularity;
|
|
17
16
|
locale?: string;
|
|
18
|
-
}): DateValue;
|
|
17
|
+
}): DateValue$1;
|
|
19
18
|
declare function getDefaultTime(props: {
|
|
20
19
|
defaultValue?: TimeValue;
|
|
21
20
|
defaultPlaceholder?: TimeValue;
|
|
22
21
|
}): TimeValue;
|
|
23
|
-
declare function isBefore(dateToCompare: DateValue | TimeValue, referenceDate: DateValue | TimeValue): boolean;
|
|
24
|
-
declare function isAfter(dateToCompare: DateValue | TimeValue, referenceDate: DateValue | TimeValue): boolean;
|
|
25
|
-
declare function isBeforeOrSame(dateToCompare: DateValue | TimeValue, referenceDate: DateValue | TimeValue): boolean;
|
|
26
|
-
declare function isAfterOrSame(dateToCompare: DateValue | TimeValue, referenceDate: DateValue | TimeValue): boolean;
|
|
27
|
-
declare function isEqualValue(a: DateValue | TimeValue, b: DateValue | TimeValue): boolean;
|
|
28
|
-
declare function isBetweenInclusive(date: DateValue, start: DateValue, end: DateValue): boolean;
|
|
29
|
-
declare function isBetween(date: DateValue, start: DateValue, end: DateValue): boolean;
|
|
30
|
-
declare function getLastFirstDayOfWeek<T extends DateValue = DateValue>(date: T, firstDayOfWeek: number, locale: string): T;
|
|
31
|
-
declare function getNextLastDayOfWeek<T extends DateValue = DateValue>(date: T, firstDayOfWeek: number, locale: string): T;
|
|
32
|
-
declare function isSameYearMonth(a: DateValue, b: DateValue): boolean;
|
|
33
|
-
declare function isSameYear(a: DateValue, b: DateValue): boolean;
|
|
34
|
-
declare function areAllDaysBetweenValid(start: DateValue, end: DateValue, isUnavailable:
|
|
35
|
-
declare function compareYearMonth(a: DateValue, b: DateValue): number;
|
|
36
|
-
declare function isMonthBetweenInclusive(date: DateValue, start: DateValue, end: DateValue): boolean;
|
|
37
|
-
declare function isYearBetweenInclusive(date: DateValue, start: DateValue, end: DateValue): boolean;
|
|
38
|
-
declare function getMonthsBetween(start: DateValue, end: DateValue): number;
|
|
22
|
+
declare function isBefore(dateToCompare: DateValue$1 | TimeValue, referenceDate: DateValue$1 | TimeValue): boolean;
|
|
23
|
+
declare function isAfter(dateToCompare: DateValue$1 | TimeValue, referenceDate: DateValue$1 | TimeValue): boolean;
|
|
24
|
+
declare function isBeforeOrSame(dateToCompare: DateValue$1 | TimeValue, referenceDate: DateValue$1 | TimeValue): boolean;
|
|
25
|
+
declare function isAfterOrSame(dateToCompare: DateValue$1 | TimeValue, referenceDate: DateValue$1 | TimeValue): boolean;
|
|
26
|
+
declare function isEqualValue(a: DateValue$1 | TimeValue, b: DateValue$1 | TimeValue): boolean;
|
|
27
|
+
declare function isBetweenInclusive(date: DateValue$1, start: DateValue$1, end: DateValue$1): boolean;
|
|
28
|
+
declare function isBetween(date: DateValue$1, start: DateValue$1, end: DateValue$1): boolean;
|
|
29
|
+
declare function getLastFirstDayOfWeek<T extends DateValue$1 = DateValue$1>(date: T, firstDayOfWeek: number, locale: string): T;
|
|
30
|
+
declare function getNextLastDayOfWeek<T extends DateValue$1 = DateValue$1>(date: T, firstDayOfWeek: number, locale: string): T;
|
|
31
|
+
declare function isSameYearMonth(a: DateValue$1, b: DateValue$1): boolean;
|
|
32
|
+
declare function isSameYear(a: DateValue$1, b: DateValue$1): boolean;
|
|
33
|
+
declare function areAllDaysBetweenValid(start: DateValue$1, end: DateValue$1, isUnavailable: DateMatcher | undefined, isDisabled: DateMatcher | undefined, isHighlightable?: DateMatcher | undefined): boolean;
|
|
34
|
+
declare function compareYearMonth(a: DateValue$1, b: DateValue$1): number;
|
|
35
|
+
declare function isMonthBetweenInclusive(date: DateValue$1, start: DateValue$1, end: DateValue$1): boolean;
|
|
36
|
+
declare function isYearBetweenInclusive(date: DateValue$1, start: DateValue$1, end: DateValue$1): boolean;
|
|
37
|
+
declare function getMonthsBetween(start: DateValue$1, end: DateValue$1): number;
|
|
39
38
|
//#endregion
|
|
40
|
-
export {
|
|
39
|
+
export { areAllDaysBetweenValid, compareYearMonth, getDaysInMonth, getDefaultDate, getDefaultTime, getLastFirstDayOfWeek, getMonthsBetween, getNextLastDayOfWeek, hasTime, isAfter, isAfterOrSame, isBefore, isBeforeOrSame, isBetween, isBetweenInclusive, isCalendarDateTime, isEqualValue, isMonthBetweenInclusive, isSameYear, isSameYearMonth, isTime, isYearBetweenInclusive, isZonedDateTime, parseStringToDateValue, toDate };
|
package/dist/date/formatter.d.ts
CHANGED
package/dist/date/index.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { CreateMonthProps, CreateSelectProps, DEFAULT_DATE_LOCALE, WeekDayFormat, WeekStartsOn, createDateRange, createDecade, createMonth, createMonthGrid, createMonths, createYear, createYearGrid, createYearRange, endOfDecade, getDaysBetween, getWeekNumber, getWeekStartsOn, startOfDecade } from "./calendar.js";
|
|
1
|
+
import { AnyExceptLiteral, CalendarIdentifier, DateAndTimeSegmentObj, DateGrid, DateInputType, DateMatcher, DateRange, DateSegmentObj, DateSegmentPart, DateStep, DateValue, DayOfWeek, DayPeriod, EditableSegmentPart, Granularity, HourCycle, NonEditableSegmentPart, SegmentContentObj, SegmentPart, SegmentValueObj, TimeGranularity, TimeInputType, TimeMatcher, TimeRange, TimeSegmentObj, TimeSegmentPart, TimeValue, WeekDayFormat, WeekStartsOn } from "./types.js";
|
|
2
|
+
import { CreateMonthOptions, CreateSelectOptions, CreateYearGridOptions, DEFAULT_DATE_LOCALE, createDateRange, createDecade, createMonth, createMonthGrid, createMonths, createYear, createYearGrid, createYearRange, endOfDecade, getDaysBetween, getWeekNumber, getWeekStartsOn, startOfDecade } from "./calendar.js";
|
|
3
|
+
import { areAllDaysBetweenValid, compareYearMonth, getDaysInMonth, getDefaultDate, getDefaultTime, getLastFirstDayOfWeek, getMonthsBetween, getNextLastDayOfWeek, hasTime, isAfter, isAfterOrSame, isBefore, isBeforeOrSame, isBetween, isBetweenInclusive, isCalendarDateTime, isEqualValue, isMonthBetweenInclusive, isSameYear, isSameYearMonth, isTime, isYearBetweenInclusive, isZonedDateTime, parseStringToDateValue, toDate } from "./comparators.js";
|
|
5
4
|
import { DateFormatterOptions, Formatter, useDateFormatter } from "./formatter.js";
|
|
6
5
|
import { createContent, initializeSegmentValues, syncSegmentValues, syncTimeSegmentValues } from "./parser.js";
|
|
7
|
-
import {
|
|
6
|
+
import { ALL_EXCEPT_LITERAL_PARTS, ALL_SEGMENT_PARTS, DATE_SEGMENT_PARTS, EDITABLE_SEGMENT_PARTS, NON_EDITABLE_SEGMENT_PARTS, TIME_SEGMENT_PARTS, isAnySegmentPart, isDateSegmentPart, isSegmentPart, isTimeSegmentPart } from "./parts.js";
|
|
7
|
+
import { getPlaceholder } from "./placeholders.js";
|
|
8
8
|
import { getSegmentElements, isAcceptableSegmentKey, isNumberString, isSegmentNavigationKey } from "./segment.js";
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
export { ALL_EXCEPT_LITERAL_PARTS, ALL_SEGMENT_PARTS, AnyExceptLiteral,
|
|
9
|
+
import { UseDateFieldOptions, useDateField } from "./use-date-field.js";
|
|
10
|
+
import { getInputType, getOptsByGranularity, getTimeInputType, handleCalendarInitialFocus, normalizeDateStep, normalizeHour12, normalizeHourCycle, normalizeInputValue, normalizeTimeInputValue } from "./utils.js";
|
|
11
|
+
export { ALL_EXCEPT_LITERAL_PARTS, ALL_SEGMENT_PARTS, AnyExceptLiteral, CalendarIdentifier, CreateMonthOptions, CreateSelectOptions, CreateYearGridOptions, DATE_SEGMENT_PARTS, DEFAULT_DATE_LOCALE, DateAndTimeSegmentObj, DateFormatterOptions, DateGrid, DateInputType, DateMatcher, DateRange, DateSegmentObj, DateSegmentPart, DateStep, DateValue, DayOfWeek, DayPeriod, EDITABLE_SEGMENT_PARTS, EditableSegmentPart, Formatter, Granularity, HourCycle, NON_EDITABLE_SEGMENT_PARTS, NonEditableSegmentPart, SegmentContentObj, SegmentPart, SegmentValueObj, TIME_SEGMENT_PARTS, TimeGranularity, TimeInputType, TimeMatcher, TimeRange, TimeSegmentObj, TimeSegmentPart, TimeValue, UseDateFieldOptions, WeekDayFormat, WeekStartsOn, areAllDaysBetweenValid, compareYearMonth, createContent, createDateRange, createDecade, createMonth, createMonthGrid, createMonths, createYear, createYearGrid, createYearRange, endOfDecade, getDaysBetween, getDaysInMonth, getDefaultDate, getDefaultTime, getInputType, getLastFirstDayOfWeek, getMonthsBetween, getNextLastDayOfWeek, getOptsByGranularity, getPlaceholder, getSegmentElements, getTimeInputType, getWeekNumber, getWeekStartsOn, handleCalendarInitialFocus, hasTime, initializeSegmentValues, isAcceptableSegmentKey, isAfter, isAfterOrSame, isAnySegmentPart, isBefore, isBeforeOrSame, isBetween, isBetweenInclusive, isCalendarDateTime, isDateSegmentPart, isEqualValue, isMonthBetweenInclusive, isNumberString, isSameYear, isSameYearMonth, isSegmentNavigationKey, isSegmentPart, isTime, isTimeSegmentPart, isYearBetweenInclusive, isZonedDateTime, normalizeDateStep, normalizeHour12, normalizeHourCycle, normalizeInputValue, normalizeTimeInputValue, parseStringToDateValue, startOfDecade, syncSegmentValues, syncTimeSegmentValues, toDate, useDateField, useDateFormatter };
|
package/dist/date/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{areAllDaysBetweenValid as e,compareYearMonth as t,getDaysInMonth as n,getDefaultDate as r,getDefaultTime as i,getLastFirstDayOfWeek as a,getMonthsBetween as o,getNextLastDayOfWeek as s,hasTime as c,isAfter as l,isAfterOrSame as u,isBefore as d,isBeforeOrSame as f,isBetween as p,isBetweenInclusive as m,isCalendarDateTime as h,isEqualValue as g,isMonthBetweenInclusive as _,isSameYear as v,isSameYearMonth as y,isTime as b,isYearBetweenInclusive as x,isZonedDateTime as S,parseStringToDateValue as C,toDate as w}from"./comparators.js";import{
|
|
1
|
+
import{areAllDaysBetweenValid as e,compareYearMonth as t,getDaysInMonth as n,getDefaultDate as r,getDefaultTime as i,getLastFirstDayOfWeek as a,getMonthsBetween as o,getNextLastDayOfWeek as s,hasTime as c,isAfter as l,isAfterOrSame as u,isBefore as d,isBeforeOrSame as f,isBetween as p,isBetweenInclusive as m,isCalendarDateTime as h,isEqualValue as g,isMonthBetweenInclusive as _,isSameYear as v,isSameYearMonth as y,isTime as b,isYearBetweenInclusive as x,isZonedDateTime as S,parseStringToDateValue as C,toDate as w}from"./comparators.js";import{DEFAULT_DATE_LOCALE as T,createDateRange as E,createDecade as D,createMonth as O,createMonthGrid as k,createMonths as A,createYear as j,createYearGrid as M,createYearRange as N,endOfDecade as P,getDaysBetween as F,getWeekNumber as I,getWeekStartsOn as L,startOfDecade as R}from"./calendar.js";import{useDateFormatter as z}from"./formatter.js";import{ALL_EXCEPT_LITERAL_PARTS as B,ALL_SEGMENT_PARTS as V,DATE_SEGMENT_PARTS as H,EDITABLE_SEGMENT_PARTS as U,NON_EDITABLE_SEGMENT_PARTS as W,TIME_SEGMENT_PARTS as G,isAnySegmentPart as K,isDateSegmentPart as q,isSegmentPart as J,isTimeSegmentPart as Y}from"./parts.js";import{getPlaceholder as X}from"./placeholders.js";import{getInputType as Z,getOptsByGranularity as Q,getTimeInputType as $,handleCalendarInitialFocus as ee,normalizeDateStep as te,normalizeHour12 as ne,normalizeHourCycle as re,normalizeInputValue as ie,normalizeTimeInputValue as ae}from"./utils.js";import{createContent as oe,initializeSegmentValues as se,syncSegmentValues as ce,syncTimeSegmentValues as le}from"./parser.js";import{getSegmentElements as ue,isAcceptableSegmentKey as de,isNumberString as fe,isSegmentNavigationKey as pe}from"./segment.js";import{useDateField as me}from"./use-date-field.js";export{B as ALL_EXCEPT_LITERAL_PARTS,V as ALL_SEGMENT_PARTS,H as DATE_SEGMENT_PARTS,T as DEFAULT_DATE_LOCALE,U as EDITABLE_SEGMENT_PARTS,W as NON_EDITABLE_SEGMENT_PARTS,G as TIME_SEGMENT_PARTS,e as areAllDaysBetweenValid,t as compareYearMonth,oe as createContent,E as createDateRange,D as createDecade,O as createMonth,k as createMonthGrid,A as createMonths,j as createYear,M as createYearGrid,N as createYearRange,P as endOfDecade,F as getDaysBetween,n as getDaysInMonth,r as getDefaultDate,i as getDefaultTime,Z as getInputType,a as getLastFirstDayOfWeek,o as getMonthsBetween,s as getNextLastDayOfWeek,Q as getOptsByGranularity,X as getPlaceholder,ue as getSegmentElements,$ as getTimeInputType,I as getWeekNumber,L as getWeekStartsOn,ee as handleCalendarInitialFocus,c as hasTime,se as initializeSegmentValues,de as isAcceptableSegmentKey,l as isAfter,u as isAfterOrSame,K as isAnySegmentPart,d as isBefore,f as isBeforeOrSame,p as isBetween,m as isBetweenInclusive,h as isCalendarDateTime,q as isDateSegmentPart,g as isEqualValue,_ as isMonthBetweenInclusive,fe as isNumberString,v as isSameYear,y as isSameYearMonth,pe as isSegmentNavigationKey,J as isSegmentPart,b as isTime,Y as isTimeSegmentPart,x as isYearBetweenInclusive,S as isZonedDateTime,te as normalizeDateStep,ne as normalizeHour12,re as normalizeHourCycle,ie as normalizeInputValue,ae as normalizeTimeInputValue,C as parseStringToDateValue,R as startOfDecade,ce as syncSegmentValues,le as syncTimeSegmentValues,w as toDate,me as useDateField,z as useDateFormatter};
|
package/dist/date/parser.d.ts
CHANGED
|
@@ -1,19 +1,9 @@
|
|
|
1
|
-
import { TimeValue } from "./
|
|
2
|
-
import { DateValue, Granularity, HourCycle, SegmentContentObj, SegmentPart, SegmentValueObj } from "./types.js";
|
|
1
|
+
import { DateValue, Granularity, HourCycle, SegmentContentObj, SegmentPart, SegmentValueObj, TimeValue } from "./types.js";
|
|
3
2
|
import { Formatter } from "./formatter.js";
|
|
3
|
+
import { LocaleDateMessages } from "../locale/types.js";
|
|
4
4
|
import { Ref } from "vue";
|
|
5
5
|
|
|
6
6
|
//#region src/date/parser.d.ts
|
|
7
|
-
type CreateContentProps = {
|
|
8
|
-
granularity: Granularity;
|
|
9
|
-
dateRef: DateValue | TimeValue;
|
|
10
|
-
formatter: Formatter;
|
|
11
|
-
hideTimeZone: boolean;
|
|
12
|
-
hourCycle: HourCycle;
|
|
13
|
-
segmentValues: SegmentValueObj;
|
|
14
|
-
locale: Ref<string>;
|
|
15
|
-
isTimeValue?: boolean;
|
|
16
|
-
};
|
|
17
7
|
declare function syncTimeSegmentValues(props: {
|
|
18
8
|
value: DateValue | TimeValue;
|
|
19
9
|
formatter: Formatter;
|
|
@@ -23,7 +13,18 @@ declare function syncSegmentValues(props: {
|
|
|
23
13
|
formatter: Formatter;
|
|
24
14
|
}): SegmentValueObj;
|
|
25
15
|
declare function initializeSegmentValues(granularity: Granularity): SegmentValueObj;
|
|
26
|
-
|
|
16
|
+
type CreateContentOptions = {
|
|
17
|
+
granularity: Granularity;
|
|
18
|
+
dateRef: DateValue | TimeValue;
|
|
19
|
+
formatter: Formatter;
|
|
20
|
+
hideTimeZone: boolean;
|
|
21
|
+
hourCycle: HourCycle;
|
|
22
|
+
segmentValues: SegmentValueObj;
|
|
23
|
+
locale: Ref<string>;
|
|
24
|
+
isTimeValue?: boolean;
|
|
25
|
+
dateMessages?: LocaleDateMessages;
|
|
26
|
+
};
|
|
27
|
+
declare function createContent(options: CreateContentOptions): {
|
|
27
28
|
obj: SegmentContentObj;
|
|
28
29
|
arr: {
|
|
29
30
|
part: SegmentPart;
|
package/dist/date/parser.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{isTime as e,isZonedDateTime as t,toDate as n}from"./comparators.js";import{
|
|
1
|
+
import{isTime as e,isZonedDateTime as t,toDate as n}from"./comparators.js";import{DATE_SEGMENT_PARTS as r,EDITABLE_SEGMENT_PARTS as i,TIME_SEGMENT_PARTS as a,isDateSegmentPart as o,isSegmentPart as s}from"./parts.js";import{getPlaceholder as c}from"./placeholders.js";import{getOptsByGranularity as l,normalizeHourCycle as u}from"./utils.js";function d(e){return Object.fromEntries(a.map(t=>t===`dayPeriod`?[t,e.formatter.dayPeriod(n(e.value))]:[t,e.value[t]]))}function f(e){let t=r.map(t=>[t,e.value[t]]);return`hour`in e.value?{...Object.fromEntries(t),...d(e)}:Object.fromEntries(t)}function p(e){let t=[`hour`,`minute`,`second`],n=i.map(e=>e===`dayPeriod`?[e,`AM`]:[e,null]).filter(([n])=>e===`minute`&&n===`second`||e===`hour`&&(n===`second`||n===`minute`)?!1:e===`day`?!t.includes(n)&&n!==`dayPeriod`:!0);return Object.fromEntries(n)}function m(e){let{segmentValues:t,dateRef:n,formatter:r,hourCycle:i,locale:a}=e,l=t=>{let n=e.dateMessages;return n?t===`year`?n.placeholder.year:t===`month`?n.placeholder.month:t===`day`?n.placeholder.day:n.placeholder.time:c(t,``,a.value)},d=t,f=e=>{if(`hour`in t){let a=d[e];return a===null?l(e):e===`day`?r.part(n.set({[e]:a,month:`month`in t?t.month??1:1}),e,{hourCycle:u(i)}):r.part(n.set({[e]:a}),e,{hourCycle:u(i)})}if(o(e)){let i=d[e];return i===null?l(e):e===`day`?r.part(n.set({[e]:i,month:t.month??1}),e):r.part(n.set({[e]:i}),e)}return``};return Object.keys(t).reduce((e,n)=>s(n)?`hour`in t&&n===`dayPeriod`?(e[n]=t[n]??c(n,`AM`,a.value),e):(e[n]=h(n,f),e):e,{})}function h(e,t){return t(e)}function g(n){let{formatter:r,dateRef:i,hourCycle:a,hideTimeZone:o}=n,c=m(n);return{obj:c,arr:r.toParts(i,l(n.granularity,a,n.isTimeValue)).map(e=>e.type===`literal`||e.type===`timeZoneName`||e.type===null||!s(e.type)?{part:e.type,value:e.value}:{part:e.type,value:c[e.type]}).filter(n=>!(n.part===null||n.value===null||n.part===`timeZoneName`&&(e(i)||!t(i))||n.part===`timeZoneName`&&o))}}export{g as createContent,p as initializeSegmentValues,f as syncSegmentValues,d as syncTimeSegmentValues};
|
package/dist/date/parts.d.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { DateSegmentPart, EditableSegmentPart, SegmentPart, TimeSegmentPart } from "./types.js";
|
|
2
2
|
|
|
3
3
|
//#region src/date/parts.d.ts
|
|
4
|
-
declare const DATE_SEGMENT_PARTS: readonly [
|
|
5
|
-
declare const TIME_SEGMENT_PARTS: readonly [
|
|
6
|
-
declare const NON_EDITABLE_SEGMENT_PARTS: readonly [
|
|
7
|
-
declare const EDITABLE_SEGMENT_PARTS: readonly [
|
|
8
|
-
declare const ALL_SEGMENT_PARTS: readonly [
|
|
9
|
-
declare const ALL_EXCEPT_LITERAL_PARTS:
|
|
4
|
+
declare const DATE_SEGMENT_PARTS: readonly DateSegmentPart[];
|
|
5
|
+
declare const TIME_SEGMENT_PARTS: readonly TimeSegmentPart[];
|
|
6
|
+
declare const NON_EDITABLE_SEGMENT_PARTS: readonly SegmentPart[];
|
|
7
|
+
declare const EDITABLE_SEGMENT_PARTS: readonly EditableSegmentPart[];
|
|
8
|
+
declare const ALL_SEGMENT_PARTS: readonly SegmentPart[];
|
|
9
|
+
declare const ALL_EXCEPT_LITERAL_PARTS: readonly SegmentPart[];
|
|
10
10
|
declare function isDateSegmentPart(part: unknown): part is DateSegmentPart;
|
|
11
11
|
declare function isTimeSegmentPart(part: unknown): part is TimeSegmentPart;
|
|
12
12
|
declare function isSegmentPart(part: string): part is EditableSegmentPart;
|
|
@@ -1,23 +1,4 @@
|
|
|
1
1
|
//#region src/date/placeholders.d.ts
|
|
2
|
-
declare
|
|
3
|
-
readonly en: {
|
|
4
|
-
readonly year: "yyyy";
|
|
5
|
-
readonly month: "mm";
|
|
6
|
-
readonly day: "dd";
|
|
7
|
-
};
|
|
8
|
-
readonly 'zh-CN': {
|
|
9
|
-
readonly year: "年";
|
|
10
|
-
readonly month: "月";
|
|
11
|
-
readonly day: "日";
|
|
12
|
-
};
|
|
13
|
-
readonly 'zh-TW': {
|
|
14
|
-
readonly year: "年";
|
|
15
|
-
readonly month: "月";
|
|
16
|
-
readonly day: "日";
|
|
17
|
-
};
|
|
18
|
-
};
|
|
19
|
-
type PlaceholderField = 'year' | 'month' | 'day';
|
|
20
|
-
type SupportedLocale = keyof typeof placeholders;
|
|
21
|
-
declare function getPlaceholder(field: PlaceholderField | 'era' | 'hour' | 'minute' | 'second' | 'dayPeriod', value: string, locale: string): string;
|
|
2
|
+
declare function getPlaceholder(field: 'year' | 'month' | 'day' | 'era' | 'hour' | 'minute' | 'second' | 'dayPeriod', value: string, locale: string): string;
|
|
22
3
|
//#endregion
|
|
23
|
-
export {
|
|
4
|
+
export { getPlaceholder };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
import{resolveLocale as e}from"../locale/locales.js";function t(t,n,r){if(t===`year`||t===`month`||t===`day`){let n=e(r).date.placeholder;if(n)return n[t]}return t===`era`||t===`dayPeriod`?n:`––`}export{t as getPlaceholder};
|
package/dist/date/types.d.ts
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { DATE_SEGMENT_PARTS, EDITABLE_SEGMENT_PARTS, NON_EDITABLE_SEGMENT_PARTS, TIME_SEGMENT_PARTS } from "./parts.js";
|
|
3
|
-
import { DateValue as DateValue$1 } from "@internationalized/date";
|
|
1
|
+
import { CalendarDateTime, CalendarIdentifier, DateValue as DateValue$1, Time, ZonedDateTime } from "@internationalized/date";
|
|
4
2
|
|
|
5
3
|
//#region src/date/types.d.ts
|
|
4
|
+
type TimeValue = Time | CalendarDateTime | ZonedDateTime;
|
|
6
5
|
type DayOfWeek = 'sun' | 'mon' | 'tue' | 'wed' | 'thu' | 'fri' | 'sat';
|
|
7
|
-
type
|
|
6
|
+
type DateMatcher = (date: DateValue$1) => boolean;
|
|
8
7
|
type TimeMatcher = (time: TimeValue) => boolean;
|
|
9
8
|
interface DateRange {
|
|
10
9
|
start?: DateValue$1;
|
|
@@ -14,7 +13,7 @@ interface TimeRange {
|
|
|
14
13
|
start?: TimeValue;
|
|
15
14
|
end?: TimeValue;
|
|
16
15
|
}
|
|
17
|
-
interface
|
|
16
|
+
interface DateGrid<T> {
|
|
18
17
|
value: DateValue$1;
|
|
19
18
|
rows: T[][];
|
|
20
19
|
cells: T[];
|
|
@@ -29,13 +28,15 @@ interface DateStep {
|
|
|
29
28
|
millisecond?: number;
|
|
30
29
|
}
|
|
31
30
|
type HourCycle = 12 | 24 | undefined;
|
|
32
|
-
type DateSegmentPart =
|
|
33
|
-
type TimeSegmentPart =
|
|
34
|
-
type EditableSegmentPart =
|
|
35
|
-
type NonEditableSegmentPart =
|
|
31
|
+
type DateSegmentPart = 'day' | 'month' | 'year';
|
|
32
|
+
type TimeSegmentPart = 'hour' | 'minute' | 'second' | 'dayPeriod';
|
|
33
|
+
type EditableSegmentPart = DateSegmentPart | TimeSegmentPart;
|
|
34
|
+
type NonEditableSegmentPart = 'literal' | 'timeZoneName';
|
|
36
35
|
type SegmentPart = EditableSegmentPart | NonEditableSegmentPart;
|
|
37
36
|
type AnyExceptLiteral = Exclude<SegmentPart, 'literal'>;
|
|
38
37
|
type DayPeriod = 'AM' | 'PM' | null;
|
|
38
|
+
type WeekDayFormat = 'narrow' | 'short' | 'long';
|
|
39
|
+
type WeekStartsOn = 0 | 1 | 2 | 3 | 4 | 5 | 6;
|
|
39
40
|
type DateSegmentObj = { [K in DateSegmentPart]: number | null };
|
|
40
41
|
type TimeSegmentObj = { [K in TimeSegmentPart]: K extends 'dayPeriod' ? DayPeriod : number | null };
|
|
41
42
|
type DateAndTimeSegmentObj = DateSegmentObj & TimeSegmentObj;
|
|
@@ -43,7 +44,7 @@ type SegmentValueObj = DateSegmentObj | DateAndTimeSegmentObj;
|
|
|
43
44
|
type SegmentContentObj = Record<EditableSegmentPart, string>;
|
|
44
45
|
type DateInputType = 'date' | 'datetime-local';
|
|
45
46
|
type TimeInputType = 'time';
|
|
46
|
-
type Granularity = 'day' | 'hour' | 'minute' | 'second';
|
|
47
47
|
type TimeGranularity = 'hour' | 'minute' | 'second';
|
|
48
|
+
type Granularity = 'day' | TimeGranularity;
|
|
48
49
|
//#endregion
|
|
49
|
-
export { AnyExceptLiteral, DateAndTimeSegmentObj, DateInputType, DateRange, DateSegmentObj, DateSegmentPart, DateStep, type DateValue$1 as DateValue, DayOfWeek, DayPeriod, EditableSegmentPart, Granularity,
|
|
50
|
+
export { AnyExceptLiteral, type CalendarIdentifier, DateAndTimeSegmentObj, DateGrid, DateInputType, DateMatcher, DateRange, DateSegmentObj, DateSegmentPart, DateStep, type DateValue$1 as DateValue, DayOfWeek, DayPeriod, EditableSegmentPart, Granularity, HourCycle, NonEditableSegmentPart, SegmentContentObj, SegmentPart, SegmentValueObj, TimeGranularity, TimeInputType, TimeMatcher, TimeRange, TimeSegmentObj, TimeSegmentPart, TimeValue, WeekDayFormat, WeekStartsOn };
|
|
@@ -1,12 +1,10 @@
|
|
|
1
|
-
import { TimeValue } from "./
|
|
2
|
-
import { DateStep, HourCycle, SegmentPart, SegmentValueObj } from "./types.js";
|
|
1
|
+
import { DateStep, DateValue, HourCycle, SegmentPart, SegmentValueObj, TimeValue } from "./types.js";
|
|
3
2
|
import { Formatter } from "./formatter.js";
|
|
4
3
|
import * as _$vue from "vue";
|
|
5
4
|
import { Ref } from "vue";
|
|
6
|
-
import { DateValue } from "@internationalized/date";
|
|
7
5
|
|
|
8
6
|
//#region src/date/use-date-field.d.ts
|
|
9
|
-
type
|
|
7
|
+
type UseDateFieldOptions = {
|
|
10
8
|
hasLeftFocus: Ref<boolean>;
|
|
11
9
|
lastKeyZero: Ref<boolean>;
|
|
12
10
|
placeholder: Ref<DateValue | TimeValue>;
|
|
@@ -14,13 +12,13 @@ type UseDateFieldProps = {
|
|
|
14
12
|
step: Ref<DateStep>;
|
|
15
13
|
formatter: Formatter;
|
|
16
14
|
segmentValues: Ref<SegmentValueObj>;
|
|
17
|
-
disabled: Ref<boolean>;
|
|
18
|
-
readonly: Ref<boolean>;
|
|
15
|
+
disabled: Ref<boolean | undefined>;
|
|
16
|
+
readonly: Ref<boolean | undefined>;
|
|
19
17
|
part: SegmentPart;
|
|
20
18
|
modelValue: Ref<DateValue | TimeValue | undefined>;
|
|
21
19
|
focusNext: () => void;
|
|
22
20
|
};
|
|
23
|
-
declare function useDateField(props:
|
|
21
|
+
declare function useDateField(props: UseDateFieldOptions): {
|
|
24
22
|
attributes: _$vue.ComputedRef<{
|
|
25
23
|
inputmode: string;
|
|
26
24
|
'aria-label': string;
|
|
@@ -47,4 +45,4 @@ declare function useDateField(props: UseDateFieldProps): {
|
|
|
47
45
|
handleSegmentKeydown: (event: KeyboardEvent) => void;
|
|
48
46
|
};
|
|
49
47
|
//#endregion
|
|
50
|
-
export {
|
|
48
|
+
export { UseDateFieldOptions, useDateField };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{getDaysInMonth as e}from"./comparators.js";import{isAcceptableSegmentKey as t,isNumberString as n,isSegmentNavigationKey as r}from"./segment.js";import{computed as i}from"vue";import{DateFormatter as a}from"@internationalized/date";const o=e=>({role:`spinbutton`,contenteditable:!0,tabindex:e.disabled?void 0:0,spellcheck:!1,inputmode:`numeric`,autocorrect:`off`,enterkeyhint:`next`,style:`caret-color: transparent;`}),s=(e,t)=>{if(e!==void 0)return e===12;let n=new a(t,{hour:`numeric`}).resolvedOptions().hourCycle;return n===`h11`||n===`h12`},c=e=>{let t=`hour`in e.placeholder?e.placeholder.hour:0;return s(e.hourCycle,e.formatter.getLocale())?t%12||12:t},l={day:{attrs:t=>({...o(t),"aria-label":`day,`,"aria-valuemin":1,"aria-valuemax":e(t.placeholder),"aria-valuenow":t.placeholder.day,"aria-valuetext":t.segmentValues.day===null?`Empty`:`${t.placeholder.day}`,"data-placeholder":t.segmentValues.day===null?``:void 0})},month:{attrs:e=>({...o(e),"aria-label":`month, `,"aria-valuemin":1,"aria-valuemax":12,"aria-valuenow":e.placeholder.month,"aria-valuetext":e.segmentValues.month===null?`Empty`:`${e.placeholder.month} - ${e.formatter.fullMonth(e.placeholder.toDate(`UTC`))}`,"data-placeholder":e.segmentValues.month===null?``:void 0})},year:{attrs:e=>({...o(e),"aria-label":`year, `,"aria-valuemin":1,"aria-valuemax":9999,"aria-valuenow":e.placeholder.year,"aria-valuetext":e.segmentValues.year===null?`Empty`:`${e.placeholder.year}`,"data-placeholder":e.segmentValues.year===null?``:void 0})},hour:{attrs:e=>({...o(e),"aria-label":`hour, `,"aria-valuemin":+!!s(e.hourCycle,e.formatter.getLocale()),"aria-valuemax":s(e.hourCycle,e.formatter.getLocale())?12:23,"aria-valuenow":c(e),"aria-valuetext":`hour`in e.segmentValues&&e.segmentValues.hour===null?`Empty`:`${c(e)}`,"data-placeholder":`hour`in e.segmentValues&&e.segmentValues.hour===null?``:void 0})},minute:{attrs:e=>({...o(e),"aria-label":`minute, `,"aria-valuemin":0,"aria-valuemax":59,"aria-valuenow":`minute`in e.placeholder?e.placeholder.minute:0,"aria-valuetext":`minute`in e.segmentValues&&e.segmentValues.minute===null?`Empty`:`${`minute`in e.placeholder?e.placeholder.minute:0}`,"data-placeholder":`minute`in e.segmentValues&&e.segmentValues.minute===null?``:void 0})},second:{attrs:e=>({...o(e),"aria-label":`second, `,"aria-valuemin":0,"aria-valuemax":59,"aria-valuenow":`second`in e.placeholder?e.placeholder.second:0,"aria-valuetext":`second`in e.segmentValues&&e.segmentValues.second===null?`Empty`:`${`second`in e.placeholder?e.placeholder.second:0}`,"data-placeholder":`second`in e.segmentValues&&e.segmentValues.second===null?``:void 0})},dayPeriod:{attrs:e=>({...o(e),inputmode:`text`,"aria-label":`AM/PM, `,"aria-valuetext":`dayPeriod`in e.segmentValues&&e.segmentValues.dayPeriod===null?`Empty`:`dayPeriod`in e.segmentValues?e.segmentValues.dayPeriod:void 0})},literal:{attrs:()=>({"aria-hidden":!0,"data-segment":`literal`})},timeZoneName:{attrs:e=>({role:`textbox`,tabindex:e.disabled?void 0:0,"aria-label":`time zone, `,"data-readonly":!0,style:`caret-color: transparent;`})}};function u(a){let o=i(()=>l[a.part]?.attrs({disabled:a.disabled.value,placeholder:a.placeholder.value,hourCycle:a.hourCycle,segmentValues:a.segmentValues.value,formatter:a.formatter})??{}),c=e=>{if(a.hasLeftFocus.value=!1,e===null)return e;let t=e.toString();return t.length===1?(a.modelValue.value=void 0,null):Number.parseInt(t.slice(0,-1))},u=(e,t,n,r)=>{let i=a.step.value[t]??1,o=e.key===`ArrowUp`?i:-i;return r===null?o>0?0:59:n.set({[t]:r}).cycle(t,o)[t]},d=(e,t,n,r)=>{let i=a.step.value[t]??1,o=e.key===`ArrowUp`?i:-i;if(r===null){if(t===`hour`&&`hour`in n)return n.hour;let e=n;return t===`day`?e.day:t===`month`?e.month:e.year}if(t===`hour`&&`hour`in n)return n.set({[t]:r}).cycle(t,o)[t];let s=n;return t===`day`?s.set({[t]:r,month:a.segmentValues.value.month??1}).cycle(t,o)[t]:t===`month`?s.set({month:r}).cycle(`month`,o).month:s.set({year:r}).cycle(`year`,o).year},f=(e,t,n)=>{let r=!1,i=Math.floor(e/10);if(a.hasLeftFocus.value&&(a.hasLeftFocus.value=!1,a.lastKeyZero.value=!1,n=null),n===null)return t===0?(a.lastKeyZero.value=!0,{moveToNext:r,value:null}):((a.lastKeyZero.value||t>i)&&(r=!0),a.lastKeyZero.value=!1,{moveToNext:r,value:t});let o=n.toString().length,s=Number.parseInt(n.toString()+t.toString());return o===2||s>e?((t>i||s>e)&&(r=!0),{moveToNext:r,value:t}):(r=!0,{moveToNext:r,value:s})},p=(e,t)=>{let n=!1;if(a.hasLeftFocus.value&&(a.hasLeftFocus.value=!1,a.lastKeyZero.value=!1,t=null),t===null)return e===0?(a.lastKeyZero.value=!0,{moveToNext:n,value:0}):((a.lastKeyZero.value||e>5)&&(n=!0),a.lastKeyZero.value=!1,{moveToNext:n,value:e});let r=t.toString().length,i=Number.parseInt(t.toString()+e.toString());return r===2||i>59?(e>5&&(n=!0),{moveToNext:n,value:e}):(n=!0,{moveToNext:n,value:i})},m=(e,t,n)=>{let r=!1,i=Math.floor(e/10);if(a.hasLeftFocus.value&&(a.hasLeftFocus.value=!1,a.lastKeyZero.value=!1,n=null),n===null)return t===0?(a.lastKeyZero.value=!0,{moveToNext:r,value:0}):((a.lastKeyZero.value||t>i)&&(r=!0),a.lastKeyZero.value=!1,{moveToNext:r,value:t});let o=n.toString().length,s=Number.parseInt(n.toString()+t.toString());return o===2||s>e?(t>i&&(r=!0),{moveToNext:r,value:t}):(r=!0,{moveToNext:r,value:s})},h=(e,t)=>{let n=!1;if(a.hasLeftFocus.value&&(a.hasLeftFocus.value=!1,t=null),t===null)return{moveToNext:n,value:e===0?1:e};let r=t.toString()+e.toString();return r.length>4?{moveToNext:n,value:e===0?1:e}:(r.length===4&&(n=!0),{moveToNext:n,value:Number.parseInt(r)})},g=i=>{if(!t(i.key)||r(i.key))return;let o=a.segmentValues.value.day;if(i.key===`ArrowDown`||i.key===`ArrowUp`){a.segmentValues.value.day=d(i,`day`,a.placeholder.value,o);return}if(n(i.key)){let t=Number.parseInt(i.key),n=a.segmentValues.value.month,{moveToNext:r,value:s}=f(n?e(a.placeholder.value.set({month:n})):31,t,o);a.segmentValues.value.day=s,r&&a.focusNext()}i.key===`Backspace`&&(a.segmentValues.value.day=c(o))},_=e=>{if(!t(e.key)||r(e.key))return;let i=a.segmentValues.value.month;if(e.key===`ArrowDown`||e.key===`ArrowUp`){a.segmentValues.value.month=d(e,`month`,a.placeholder.value,i);return}if(n(e.key)){let{moveToNext:t,value:n}=f(12,Number.parseInt(e.key),i);a.segmentValues.value.month=n,t&&a.focusNext()}e.key===`Backspace`&&(a.segmentValues.value.month=c(i))},v=e=>{if(!t(e.key)||r(e.key))return;let i=a.segmentValues.value.year;if(e.key===`ArrowDown`||e.key===`ArrowUp`){a.segmentValues.value.year=d(e,`year`,a.placeholder.value,i);return}if(n(e.key)){let{moveToNext:t,value:n}=h(Number.parseInt(e.key),i);a.segmentValues.value.year=n,t&&a.focusNext()}e.key===`Backspace`&&(a.segmentValues.value.year=c(i))},y=e=>{if(!t(e.key)||r(e.key)||!(`hour`in a.placeholder.value)||!(`hour`in a.segmentValues.value))return;let i=a.segmentValues.value.hour;if(e.key===`ArrowDown`||e.key===`ArrowUp`){let t=d(e,`hour`,a.placeholder.value,i);a.segmentValues.value.hour=t,`dayPeriod`in a.segmentValues.value&&t!==null&&(a.segmentValues.value.dayPeriod=t>=12?`PM`:`AM`);return}if(n(e.key)){let t=Number.parseInt(e.key),n=s(a.hourCycle,a.formatter.getLocale()),r=n?12:24,o=i;n&&i!==null&&(o=i%12==0?0:i>12?i-12:i);let{moveToNext:c,value:l}=m(r,t,o),u=l;if(n&&l!==null&&`dayPeriod`in a.segmentValues.value){let e=a.segmentValues.value.dayPeriod||`AM`;u=l===12?e===`AM`?0:12:e===`PM`?l+12:l}a.segmentValues.value.hour=u,c&&a.focusNext()}e.key===`Backspace`&&(a.segmentValues.value.hour=c(i))},b=e=>{if(!t(e.key)||r(e.key)||!(`minute`in a.placeholder.value)||!(`minute`in a.segmentValues.value))return;let i=a.segmentValues.value.minute;if(e.key===`ArrowDown`||e.key===`ArrowUp`){a.segmentValues.value.minute=u(e,`minute`,a.placeholder.value,i);return}if(n(e.key)){let{moveToNext:t,value:n}=p(Number.parseInt(e.key),i);a.segmentValues.value.minute=n,t&&a.focusNext()}e.key===`Backspace`&&(a.segmentValues.value.minute=c(i))},x=e=>{if(!t(e.key)||r(e.key)||!(`second`in a.placeholder.value)||!(`second`in a.segmentValues.value))return;let i=a.segmentValues.value.second;if(e.key===`ArrowDown`||e.key===`ArrowUp`){a.segmentValues.value.second=u(e,`second`,a.placeholder.value,i);return}if(n(e.key)){let{moveToNext:t,value:n}=p(Number.parseInt(e.key),i);a.segmentValues.value.second=n,t&&a.focusNext()}e.key===`Backspace`&&(a.segmentValues.value.second=c(i))},S=e=>{if(!((!t(e.key)||r(e.key))&&![`a`,`A`,`p`,`P`].includes(e.key)||!(`hour`in a.placeholder.value)||!(`dayPeriod`in a.segmentValues.value))){if(e.key===`ArrowDown`||e.key===`ArrowUp`){if(a.segmentValues.value.dayPeriod===`AM`){a.segmentValues.value.dayPeriod=`PM`,a.segmentValues.value.hour=(a.segmentValues.value.hour??0)+12;return}a.segmentValues.value.dayPeriod=`AM`,a.segmentValues.value.hour=(a.segmentValues.value.hour??12)-12;return}if([`a`,`A`].includes(e.key)&&a.segmentValues.value.dayPeriod!==`AM`){a.segmentValues.value.dayPeriod=`AM`,a.segmentValues.value.hour=(a.segmentValues.value.hour??12)-12;return}[`p`,`P`].includes(e.key)&&a.segmentValues.value.dayPeriod!==`PM`&&(a.segmentValues.value.dayPeriod=`PM`,a.segmentValues.value.hour=(a.segmentValues.value.hour??0)+12)}};return{attributes:o,handleSegmentClick:e=>{a.disabled.value&&e.preventDefault()},handleSegmentFocusOut:()=>{if(!Object.values(a.segmentValues.value).every(e=>e!==null))return;let e=a.placeholder.value.set({...a.segmentValues.value});a.modelValue.value=e.copy()},handleSegmentKeydown:e=>{if(a.disabled.value||a.readonly.value)return;e.key!==`Tab`&&e.preventDefault();let n={day:g,dayPeriod:S,hour:y,minute:b,month:_,second:x,timeZoneName:()=>void 0,year:v};a.part!==`literal`&&(n[a.part](e),![`ArrowLeft`,`ArrowRight`,`Shift`,`Tab`].includes(e.key)&&t(e.key)&&Object.values(a.segmentValues.value).every(e=>e!==null)&&(a.modelValue.value=a.placeholder.value.set({...a.segmentValues.value}).copy()))}}}export{u as useDateField};
|
|
1
|
+
import{getDaysInMonth as e}from"./comparators.js";import{isAcceptableSegmentKey as t,isNumberString as n,isSegmentNavigationKey as r}from"./segment.js";import{useLocaleMessages as i}from"../locale/hooks.js";import"../locale/index.js";import{computed as a}from"vue";import{DateFormatter as o}from"@internationalized/date";const s=e=>({role:`spinbutton`,contenteditable:!0,tabindex:e?void 0:0,spellcheck:!1,inputmode:`numeric`,autocorrect:`off`,enterkeyhint:`next`,style:`caret-color: transparent;`}),c=(e,t)=>{if(e!==void 0)return e===12;let n=new o(t,{hour:`numeric`}).resolvedOptions().hourCycle;return n===`h11`||n===`h12`},l=e=>{let t=`hour`in e.placeholder?e.placeholder.hour:0;return c(e.hourCycle,e.formatter.getLocale())?t%12||12:t},u={day:{attrs:t=>({...s(t.disabled),"aria-label":t.messages.daySegment,"aria-valuemin":1,"aria-valuemax":e(t.placeholder),"aria-valuenow":t.placeholder.day,"aria-valuetext":t.segmentValues.day===null?t.messages.empty:`${t.placeholder.day}`,"data-placeholder":t.segmentValues.day===null?``:void 0})},month:{attrs:e=>({...s(e.disabled),"aria-label":e.messages.monthSegment,"aria-valuemin":1,"aria-valuemax":12,"aria-valuenow":e.placeholder.month,"aria-valuetext":e.segmentValues.month===null?e.messages.empty:`${e.placeholder.month} - ${e.formatter.fullMonth(e.placeholder.toDate(`UTC`))}`,"data-placeholder":e.segmentValues.month===null?``:void 0})},year:{attrs:e=>({...s(e.disabled),"aria-label":e.messages.yearSegment,"aria-valuemin":1,"aria-valuemax":9999,"aria-valuenow":e.placeholder.year,"aria-valuetext":e.segmentValues.year===null?e.messages.empty:`${e.placeholder.year}`,"data-placeholder":e.segmentValues.year===null?``:void 0})},hour:{attrs:e=>({...s(e.disabled),"aria-label":e.messages.hourSegment,"aria-valuemin":+!!c(e.hourCycle,e.formatter.getLocale()),"aria-valuemax":c(e.hourCycle,e.formatter.getLocale())?12:23,"aria-valuenow":l(e),"aria-valuetext":`hour`in e.segmentValues&&e.segmentValues.hour===null?e.messages.empty:`${l(e)}`,"data-placeholder":`hour`in e.segmentValues&&e.segmentValues.hour===null?``:void 0})},minute:{attrs:e=>({...s(e.disabled),"aria-label":e.messages.minuteSegment,"aria-valuemin":0,"aria-valuemax":59,"aria-valuenow":`minute`in e.placeholder?e.placeholder.minute:0,"aria-valuetext":`minute`in e.segmentValues&&e.segmentValues.minute===null?e.messages.empty:`${`minute`in e.placeholder?e.placeholder.minute:0}`,"data-placeholder":`minute`in e.segmentValues&&e.segmentValues.minute===null?``:void 0})},second:{attrs:e=>({...s(e.disabled),"aria-label":e.messages.secondSegment,"aria-valuemin":0,"aria-valuemax":59,"aria-valuenow":`second`in e.placeholder?e.placeholder.second:0,"aria-valuetext":`second`in e.segmentValues&&e.segmentValues.second===null?e.messages.empty:`${`second`in e.placeholder?e.placeholder.second:0}`,"data-placeholder":`second`in e.segmentValues&&e.segmentValues.second===null?``:void 0})},dayPeriod:{attrs:e=>({...s(e.disabled),inputmode:`text`,"aria-label":e.messages.dayPeriodSegment,"aria-valuetext":`dayPeriod`in e.segmentValues&&e.segmentValues.dayPeriod===null?e.messages.empty:`dayPeriod`in e.segmentValues?e.segmentValues.dayPeriod:void 0})},literal:{attrs:()=>({"aria-hidden":!0,"data-segment":`literal`})},timeZoneName:{attrs:e=>({role:`textbox`,tabindex:e.disabled?void 0:0,"aria-label":e.messages.timeZoneSegment,"data-readonly":!0,style:`caret-color: transparent;`})}};function d(o){let s=i(),l=a(()=>u[o.part]?.attrs({disabled:o.disabled.value,placeholder:o.placeholder.value,hourCycle:o.hourCycle,segmentValues:o.segmentValues.value,formatter:o.formatter,messages:s.value.date})??{}),d=e=>{if(o.hasLeftFocus.value=!1,e===null)return e;let t=e.toString();return t.length===1?(o.modelValue.value=void 0,null):Number.parseInt(t.slice(0,-1))},f=(e,t,n,r)=>{let i=o.step.value[t]??1,a=e.key===`ArrowUp`?i:-i;return r===null?a>0?0:59:n.set({[t]:r}).cycle(t,a)[t]},p=(e,t,n,r)=>{let i=o.step.value[t]??1,a=e.key===`ArrowUp`?i:-i;if(r===null){if(t===`hour`&&`hour`in n)return n.hour;let e=n;return t===`day`?e.day:t===`month`?e.month:e.year}if(t===`hour`&&`hour`in n)return n.set({[t]:r}).cycle(t,a)[t];let s=n;return t===`day`?s.set({[t]:r,month:o.segmentValues.value.month??1}).cycle(t,a)[t]:t===`month`?s.set({month:r}).cycle(`month`,a).month:s.set({year:r}).cycle(`year`,a).year},m=(e,t,n)=>{let r=!1,i=Math.floor(e/10);if(o.hasLeftFocus.value&&(o.hasLeftFocus.value=!1,o.lastKeyZero.value=!1,n=null),n===null)return t===0?(o.lastKeyZero.value=!0,{moveToNext:r,value:null}):((o.lastKeyZero.value||t>i)&&(r=!0),o.lastKeyZero.value=!1,{moveToNext:r,value:t});let a=n.toString().length,s=Number.parseInt(n.toString()+t.toString());return a===2||s>e?((t>i||s>e)&&(r=!0),{moveToNext:r,value:t}):(r=!0,{moveToNext:r,value:s})},h=(e,t)=>{let n=!1;if(o.hasLeftFocus.value&&(o.hasLeftFocus.value=!1,o.lastKeyZero.value=!1,t=null),t===null)return e===0?(o.lastKeyZero.value=!0,{moveToNext:n,value:0}):((o.lastKeyZero.value||e>5)&&(n=!0),o.lastKeyZero.value=!1,{moveToNext:n,value:e});let r=t.toString().length,i=Number.parseInt(t.toString()+e.toString());return r===2||i>59?(e>5&&(n=!0),{moveToNext:n,value:e}):(n=!0,{moveToNext:n,value:i})},g=(e,t,n)=>{let r=!1,i=Math.floor(e/10);if(o.hasLeftFocus.value&&(o.hasLeftFocus.value=!1,o.lastKeyZero.value=!1,n=null),n===null)return t===0?(o.lastKeyZero.value=!0,{moveToNext:r,value:0}):((o.lastKeyZero.value||t>i)&&(r=!0),o.lastKeyZero.value=!1,{moveToNext:r,value:t});let a=n.toString().length,s=Number.parseInt(n.toString()+t.toString());return a===2||s>e?(t>i&&(r=!0),{moveToNext:r,value:t}):(r=!0,{moveToNext:r,value:s})},_=(e,t)=>{let n=!1;if(o.hasLeftFocus.value&&(o.hasLeftFocus.value=!1,t=null),t===null)return{moveToNext:n,value:e===0?1:e};let r=t.toString()+e.toString();return r.length>4?{moveToNext:n,value:e===0?1:e}:(r.length===4&&(n=!0),{moveToNext:n,value:Number.parseInt(r)})},v=i=>{if(!t(i.key)||r(i.key))return;let a=o.segmentValues.value.day;if(i.key===`ArrowDown`||i.key===`ArrowUp`){o.segmentValues.value.day=p(i,`day`,o.placeholder.value,a);return}if(n(i.key)){let t=Number.parseInt(i.key),n=o.segmentValues.value.month,{moveToNext:r,value:s}=m(n?e(o.placeholder.value.set({month:n})):31,t,a);o.segmentValues.value.day=s,r&&o.focusNext()}i.key===`Backspace`&&(o.segmentValues.value.day=d(a))},y=e=>{if(!t(e.key)||r(e.key))return;let i=o.segmentValues.value.month;if(e.key===`ArrowDown`||e.key===`ArrowUp`){o.segmentValues.value.month=p(e,`month`,o.placeholder.value,i);return}if(n(e.key)){let{moveToNext:t,value:n}=m(12,Number.parseInt(e.key),i);o.segmentValues.value.month=n,t&&o.focusNext()}e.key===`Backspace`&&(o.segmentValues.value.month=d(i))},b=e=>{if(!t(e.key)||r(e.key))return;let i=o.segmentValues.value.year;if(e.key===`ArrowDown`||e.key===`ArrowUp`){o.segmentValues.value.year=p(e,`year`,o.placeholder.value,i);return}if(n(e.key)){let{moveToNext:t,value:n}=_(Number.parseInt(e.key),i);o.segmentValues.value.year=n,t&&o.focusNext()}e.key===`Backspace`&&(o.segmentValues.value.year=d(i))},x=e=>{if(!t(e.key)||r(e.key)||!(`hour`in o.placeholder.value)||!(`hour`in o.segmentValues.value))return;let i=o.segmentValues.value.hour;if(e.key===`ArrowDown`||e.key===`ArrowUp`){let t=p(e,`hour`,o.placeholder.value,i);o.segmentValues.value.hour=t,`dayPeriod`in o.segmentValues.value&&t!==null&&(o.segmentValues.value.dayPeriod=t>=12?`PM`:`AM`);return}if(n(e.key)){let t=Number.parseInt(e.key),n=c(o.hourCycle,o.formatter.getLocale()),r=n?12:24,a=i;n&&i!==null&&(a=i%12==0?0:i>12?i-12:i);let{moveToNext:s,value:l}=g(r,t,a),u=l;if(n&&l!==null&&`dayPeriod`in o.segmentValues.value){let e=o.segmentValues.value.dayPeriod||`AM`;u=l===12?e===`AM`?0:12:e===`PM`?l+12:l}o.segmentValues.value.hour=u,s&&o.focusNext()}e.key===`Backspace`&&(o.segmentValues.value.hour=d(i))},S=e=>{if(!t(e.key)||r(e.key)||!(`minute`in o.placeholder.value)||!(`minute`in o.segmentValues.value))return;let i=o.segmentValues.value.minute;if(e.key===`ArrowDown`||e.key===`ArrowUp`){o.segmentValues.value.minute=f(e,`minute`,o.placeholder.value,i);return}if(n(e.key)){let{moveToNext:t,value:n}=h(Number.parseInt(e.key),i);o.segmentValues.value.minute=n,t&&o.focusNext()}e.key===`Backspace`&&(o.segmentValues.value.minute=d(i))},C=e=>{if(!t(e.key)||r(e.key)||!(`second`in o.placeholder.value)||!(`second`in o.segmentValues.value))return;let i=o.segmentValues.value.second;if(e.key===`ArrowDown`||e.key===`ArrowUp`){o.segmentValues.value.second=f(e,`second`,o.placeholder.value,i);return}if(n(e.key)){let{moveToNext:t,value:n}=h(Number.parseInt(e.key),i);o.segmentValues.value.second=n,t&&o.focusNext()}e.key===`Backspace`&&(o.segmentValues.value.second=d(i))},w=e=>{if(!((!t(e.key)||r(e.key))&&![`a`,`A`,`p`,`P`].includes(e.key)||!(`hour`in o.placeholder.value)||!(`dayPeriod`in o.segmentValues.value))){if(e.key===`ArrowDown`||e.key===`ArrowUp`){if(o.segmentValues.value.dayPeriod===`AM`){o.segmentValues.value.dayPeriod=`PM`,o.segmentValues.value.hour=(o.segmentValues.value.hour??0)+12;return}o.segmentValues.value.dayPeriod=`AM`,o.segmentValues.value.hour=(o.segmentValues.value.hour??12)-12;return}if([`a`,`A`].includes(e.key)&&o.segmentValues.value.dayPeriod!==`AM`){o.segmentValues.value.dayPeriod=`AM`,o.segmentValues.value.hour=(o.segmentValues.value.hour??12)-12;return}[`p`,`P`].includes(e.key)&&o.segmentValues.value.dayPeriod!==`PM`&&(o.segmentValues.value.dayPeriod=`PM`,o.segmentValues.value.hour=(o.segmentValues.value.hour??0)+12)}};return{attributes:l,handleSegmentClick:e=>{o.disabled.value&&e.preventDefault()},handleSegmentFocusOut:()=>{if(!Object.values(o.segmentValues.value).every(e=>e!==null))return;let e=o.placeholder.value.set({...o.segmentValues.value});o.modelValue.value=e.copy()},handleSegmentKeydown:e=>{if(o.disabled.value||o.readonly.value)return;e.key!==`Tab`&&e.preventDefault();let n={day:v,dayPeriod:w,hour:x,minute:S,month:y,second:C,timeZoneName:()=>void 0,year:b};o.part!==`literal`&&(n[o.part](e),![`ArrowLeft`,`ArrowRight`,`Shift`,`Tab`].includes(e.key)&&t(e.key)&&Object.values(o.segmentValues.value).every(e=>e!==null)&&(o.modelValue.value=o.placeholder.value.set({...o.segmentValues.value}).copy()))}}}export{d as useDateField};
|
package/dist/date/utils.d.ts
CHANGED
|
@@ -1,12 +1,8 @@
|
|
|
1
|
-
import { TimeValue } from "./
|
|
2
|
-
import { DateStep, DateValue, Granularity, HourCycle, TimeGranularity, TimeInputType } from "./types.js";
|
|
1
|
+
import { DateStep, DateValue, Granularity, HourCycle, TimeGranularity, TimeInputType, TimeValue } from "./types.js";
|
|
3
2
|
|
|
4
3
|
//#region src/date/utils.d.ts
|
|
5
|
-
declare function chunk<T>(array: T[], size: number): T[][];
|
|
6
4
|
declare function getOptsByGranularity(granularity: Granularity, hourCycle: HourCycle, isTimeValue?: boolean): Intl.DateTimeFormatOptions;
|
|
7
|
-
declare function normalizeDateStep(
|
|
8
|
-
step?: DateStep;
|
|
9
|
-
}): DateStep;
|
|
5
|
+
declare function normalizeDateStep(step?: DateStep): DateStep;
|
|
10
6
|
declare function handleCalendarInitialFocus(calendar: HTMLElement): void;
|
|
11
7
|
declare function normalizeHourCycle(hourCycle: HourCycle): "h23" | "h11" | undefined;
|
|
12
8
|
declare function normalizeHour12(hourCycle: HourCycle): boolean | undefined;
|
|
@@ -15,4 +11,4 @@ declare function normalizeInputValue(date: DateValue | undefined, granularity: G
|
|
|
15
11
|
declare function getTimeInputType(_granularity: TimeGranularity): TimeInputType;
|
|
16
12
|
declare function normalizeTimeInputValue(time: TimeValue | undefined, granularity: TimeGranularity): string;
|
|
17
13
|
//#endregion
|
|
18
|
-
export {
|
|
14
|
+
export { getInputType, getOptsByGranularity, getTimeInputType, handleCalendarInitialFocus, normalizeDateStep, normalizeHour12, normalizeHourCycle, normalizeInputValue, normalizeTimeInputValue };
|
package/dist/date/utils.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
import{defu as e}from"defu";function t(e,t,n=!1){let r={year:`numeric`,month:`2-digit`,day:`2-digit`,hour:`2-digit`,minute:`2-digit`,second:`2-digit`,timeZoneName:`short`,hourCycle:i(t),hour12:a(t)};return n&&(delete r.year,delete r.month,delete r.day),e===`day`&&(delete r.hour,delete r.minute,delete r.second,delete r.timeZoneName),e===`hour`&&(delete r.minute,delete r.second),e===`minute`&&delete r.second,r}function n(t){return e(t,{year:1,month:1,day:1,hour:1,minute:1,second:1,millisecond:1})}function r(e){let t=e.querySelector(`[data-selected]`);if(t){t.focus();return}let n=e.querySelector(`[data-today]`);if(n){n.focus();return}e.querySelector(`[data-soybean-calendar-cell-trigger]:not([data-disabled]):not([data-unavailable])`)?.focus()}function i(e){if(e===24)return`h23`;if(e===12)return`h11`}function a(e){if(e===24)return!1;if(e===12)return!0}function o(e){return e===`day`?`date`:`datetime-local`}function s(e,t){if(!e)return``;let n=o(t),r=String(e.year).padStart(4,`0`),i=String(e.month).padStart(2,`0`),a=String(e.day).padStart(2,`0`);if(n===`date`)return`${r}-${i}-${a}`;let s=String(`hour`in e?e.hour:0).padStart(2,`0`),c=String(`minute`in e?e.minute:0).padStart(2,`0`);return t===`second`?`${r}-${i}-${a}T${s}:${c}:${String(`second`in e?e.second:0).padStart(2,`0`)}`:`${r}-${i}-${a}T${s}:${c}`}function c(e){return`time`}function l(e,t){if(!e)return``;let n=String(e.hour).padStart(2,`0`),r=String(e.minute).padStart(2,`0`);return t===`second`?`${n}:${r}:${String(e.second).padStart(2,`0`)}`:`${n}:${r}`}export{o as getInputType,t as getOptsByGranularity,c as getTimeInputType,r as handleCalendarInitialFocus,n as normalizeDateStep,a as normalizeHour12,i as normalizeHourCycle,s as normalizeInputValue,l as normalizeTimeInputValue};
|