@soybeanjs/headless 0.0.8 → 0.0.10
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/accordion/accordion-content.js +1 -1
- package/dist/components/accordion/accordion-content.vue.d.ts +2 -2
- package/dist/components/accordion/accordion-header.js +1 -1
- package/dist/components/accordion/accordion-header.vue.d.ts +2 -2
- package/dist/components/accordion/accordion-item.js +1 -1
- package/dist/components/accordion/accordion-item.vue.d.ts +5 -5
- package/dist/components/accordion/accordion-root.js +1 -1
- package/dist/components/accordion/accordion-root.vue.d.ts +3 -3
- package/dist/components/accordion/accordion-trigger.js +1 -1
- package/dist/components/accordion/accordion-trigger.vue.d.ts +2 -2
- package/dist/components/accordion/context.d.ts +5 -4
- package/dist/components/accordion/context.js +1 -1
- package/dist/components/accordion/index.d.ts +3 -3
- package/dist/components/accordion/index.js +1 -1
- package/dist/components/accordion/types.d.ts +4 -7
- package/dist/components/alert/alert-close.js +1 -1
- package/dist/components/alert/alert-close.vue.d.ts +2 -2
- package/dist/components/alert/alert-content.js +1 -1
- package/dist/components/alert/alert-content.vue.d.ts +2 -2
- package/dist/components/alert/alert-description.js +1 -1
- package/dist/components/alert/alert-description.vue.d.ts +2 -2
- package/dist/components/alert/alert-root.js +1 -1
- package/dist/components/alert/alert-root.vue.d.ts +4 -4
- package/dist/components/alert/alert-title.js +1 -1
- package/dist/components/alert/alert-title.vue.d.ts +2 -2
- package/dist/components/alert/context.d.ts +6 -4
- package/dist/components/alert/context.js +1 -1
- package/dist/components/alert/index.d.ts +3 -3
- package/dist/components/alert/index.js +1 -1
- package/dist/components/alert/types.d.ts +5 -8
- package/dist/components/alert-dialog/alert-dialog-close.vue.d.ts +2 -2
- package/dist/components/alert-dialog/alert-dialog-content.vue.d.ts +4 -4
- package/dist/components/alert-dialog/alert-dialog-root.vue.d.ts +4 -4
- package/dist/components/alert-dialog/index.d.ts +3 -3
- package/dist/components/alert-dialog/index.js +1 -1
- package/dist/components/arrow/arrow.vue.d.ts +2 -2
- package/dist/components/aspect-ratio/aspect-ratio.vue.d.ts +3 -3
- package/dist/components/avatar/avatar-fallback.js +1 -1
- package/dist/components/avatar/avatar-fallback.vue.d.ts +2 -2
- package/dist/components/avatar/avatar-image.js +1 -1
- package/dist/components/avatar/avatar-image.vue.d.ts +4 -4
- package/dist/components/avatar/avatar-root.js +1 -1
- package/dist/components/avatar/avatar-root.vue.d.ts +2 -2
- package/dist/components/avatar/context.d.ts +6 -4
- package/dist/components/avatar/context.js +1 -1
- package/dist/components/avatar/index.d.ts +3 -3
- package/dist/components/avatar/index.js +1 -1
- package/dist/components/avatar/types.d.ts +5 -8
- package/dist/components/badge/badge-content.js +1 -1
- package/dist/components/badge/badge-content.vue.d.ts +2 -2
- package/dist/components/badge/badge-root.js +1 -1
- package/dist/components/badge/badge-root.vue.d.ts +4 -4
- package/dist/components/badge/context.d.ts +6 -3
- package/dist/components/badge/context.js +1 -1
- package/dist/components/badge/index.d.ts +3 -3
- package/dist/components/badge/index.js +1 -1
- package/dist/components/badge/types.d.ts +5 -8
- package/dist/components/breadcrumb/breadcrumb-ellipsis.js +1 -1
- package/dist/components/breadcrumb/breadcrumb-ellipsis.vue.d.ts +2 -2
- package/dist/components/breadcrumb/breadcrumb-item.js +1 -1
- package/dist/components/breadcrumb/breadcrumb-item.vue.d.ts +2 -2
- package/dist/components/breadcrumb/breadcrumb-link.js +1 -1
- package/dist/components/breadcrumb/breadcrumb-link.vue.d.ts +2 -2
- package/dist/components/breadcrumb/breadcrumb-list.js +1 -1
- package/dist/components/breadcrumb/breadcrumb-list.vue.d.ts +2 -2
- package/dist/components/breadcrumb/breadcrumb-page.js +1 -1
- package/dist/components/breadcrumb/breadcrumb-page.vue.d.ts +2 -2
- package/dist/components/breadcrumb/breadcrumb-root.js +1 -1
- package/dist/components/breadcrumb/breadcrumb-root.vue.d.ts +2 -2
- package/dist/components/breadcrumb/breadcrumb-separator.js +1 -1
- package/dist/components/breadcrumb/breadcrumb-separator.vue.d.ts +2 -2
- package/dist/components/breadcrumb/context.d.ts +6 -3
- package/dist/components/breadcrumb/context.js +1 -1
- package/dist/components/breadcrumb/index.d.ts +3 -3
- package/dist/components/breadcrumb/index.js +1 -1
- package/dist/components/breadcrumb/types.d.ts +5 -8
- package/dist/components/button/button.vue.d.ts +5 -5
- package/dist/components/card/card-content.js +1 -1
- package/dist/components/card/card-content.vue.d.ts +2 -2
- package/dist/components/card/card-description.js +1 -1
- package/dist/components/card/card-description.vue.d.ts +2 -2
- package/dist/components/card/card-footer.js +1 -1
- package/dist/components/card/card-footer.vue.d.ts +2 -2
- package/dist/components/card/card-header.js +1 -1
- package/dist/components/card/card-header.vue.d.ts +2 -2
- package/dist/components/card/card-root.js +1 -1
- package/dist/components/card/card-root.vue.d.ts +2 -2
- package/dist/components/card/card-title-root.js +1 -1
- package/dist/components/card/card-title-root.vue.d.ts +2 -2
- package/dist/components/card/card-title.js +1 -1
- package/dist/components/card/card-title.vue.d.ts +2 -2
- package/dist/components/card/context.d.ts +6 -3
- package/dist/components/card/context.js +1 -1
- package/dist/components/card/index.d.ts +3 -3
- package/dist/components/card/index.js +1 -1
- package/dist/components/card/types.d.ts +5 -8
- package/dist/components/checkbox/checkbox-control.js +1 -1
- package/dist/components/checkbox/checkbox-control.vue.d.ts +2 -2
- package/dist/components/checkbox/checkbox-group-root.js +1 -1
- package/dist/components/checkbox/checkbox-group-root.vue.d.ts +3 -3
- package/dist/components/checkbox/checkbox-indicator.js +1 -1
- package/dist/components/checkbox/checkbox-indicator.vue.d.ts +4 -4
- package/dist/components/checkbox/checkbox-label.js +1 -1
- package/dist/components/checkbox/checkbox-label.vue.d.ts +2 -2
- package/dist/components/checkbox/checkbox-root.js +1 -1
- package/dist/components/checkbox/checkbox-root.vue.d.ts +4 -4
- package/dist/components/checkbox/context.d.ts +5 -4
- package/dist/components/checkbox/context.js +1 -1
- package/dist/components/checkbox/index.d.ts +3 -3
- package/dist/components/checkbox/index.js +1 -1
- package/dist/components/checkbox/types.d.ts +4 -7
- package/dist/components/collapsible/collapsible-content.js +1 -1
- package/dist/components/collapsible/collapsible-content.vue.d.ts +2 -2
- package/dist/components/collapsible/collapsible-root.js +1 -1
- package/dist/components/collapsible/collapsible-root.vue.d.ts +6 -6
- package/dist/components/collapsible/collapsible-trigger.js +1 -1
- package/dist/components/collapsible/collapsible-trigger.vue.d.ts +4 -4
- package/dist/components/collapsible/context.d.ts +6 -4
- package/dist/components/collapsible/context.js +1 -1
- package/dist/components/collapsible/index.d.ts +3 -3
- package/dist/components/collapsible/index.js +1 -1
- package/dist/components/collapsible/types.d.ts +8 -8
- package/dist/components/config-provider/config-provider.vue.d.ts +3 -3
- package/dist/components/context-menu/context-menu-content.vue.d.ts +6 -6
- package/dist/components/context-menu/context-menu-root.vue.d.ts +4 -4
- package/dist/components/context-menu/context-menu-trigger.vue.d.ts +4 -4
- package/dist/components/context-menu/index.d.ts +2 -2
- package/dist/components/dialog/context.d.ts +5 -4
- package/dist/components/dialog/context.js +1 -1
- package/dist/components/dialog/dialog-close.vue.d.ts +2 -2
- package/dist/components/dialog/dialog-content-impl.js +1 -1
- package/dist/components/dialog/dialog-content.vue.d.ts +4 -4
- package/dist/components/dialog/dialog-description.js +1 -1
- package/dist/components/dialog/dialog-description.vue.d.ts +2 -2
- package/dist/components/dialog/dialog-footer.js +1 -1
- package/dist/components/dialog/dialog-footer.vue.d.ts +2 -2
- package/dist/components/dialog/dialog-header.js +1 -1
- package/dist/components/dialog/dialog-header.vue.d.ts +2 -2
- package/dist/components/dialog/dialog-overlay.js +1 -1
- package/dist/components/dialog/dialog-overlay.vue.d.ts +2 -2
- package/dist/components/dialog/dialog-root.vue.d.ts +4 -4
- package/dist/components/dialog/dialog-title.js +1 -1
- package/dist/components/dialog/dialog-title.vue.d.ts +2 -2
- package/dist/components/dialog/dialog-trigger.vue.d.ts +2 -2
- package/dist/components/dialog/index.d.ts +3 -3
- package/dist/components/dialog/index.js +1 -1
- package/dist/components/dialog/types.d.ts +5 -8
- package/dist/components/dropdown-menu/dropdown-menu-content.vue.d.ts +6 -6
- package/dist/components/dropdown-menu/dropdown-menu-root.vue.d.ts +5 -5
- package/dist/components/dropdown-menu/dropdown-menu-trigger.vue.d.ts +4 -4
- package/dist/components/dropdown-menu/index.d.ts +2 -2
- package/dist/components/form/context.d.ts +6 -3
- package/dist/components/form/context.js +1 -1
- package/dist/components/form/core/shared.js +1 -0
- package/dist/components/form/core/standard.js +1 -0
- package/dist/components/form/core/types.d.ts +117 -0
- package/dist/components/form/core/use-field-array.js +1 -0
- package/dist/components/form/core/use-form-state.js +1 -0
- package/dist/components/form/core/use-form.d.ts +7 -0
- package/dist/components/form/core/use-form.js +1 -0
- package/dist/components/form/form-description.js +1 -1
- package/dist/components/form/form-description.vue.d.ts +2 -2
- package/dist/components/form/form-error.js +1 -1
- package/dist/components/form/form-error.vue.d.ts +2 -2
- package/dist/components/form/form-field.js +1 -1
- package/dist/components/form/form-field.vue.d.ts +2 -13
- package/dist/components/form/form-label.js +1 -1
- package/dist/components/form/form-label.vue.d.ts +2 -2
- package/dist/components/form/index.d.ts +7 -5
- package/dist/components/form/index.js +1 -1
- package/dist/components/form/types.d.ts +6 -11
- package/dist/components/input/context.d.ts +6 -3
- package/dist/components/input/context.js +1 -1
- package/dist/components/input/index.d.ts +3 -3
- package/dist/components/input/index.js +1 -1
- package/dist/components/input/input-control.js +1 -1
- package/dist/components/input/input-control.vue.d.ts +2 -2
- package/dist/components/input/input-root.js +1 -1
- package/dist/components/input/input-root.vue.d.ts +4 -4
- package/dist/components/input/types.d.ts +5 -8
- package/dist/components/kbd/kbd.vue.d.ts +2 -2
- package/dist/components/label/label.vue.d.ts +2 -2
- package/dist/components/layout/context.d.ts +6 -4
- package/dist/components/layout/context.js +1 -1
- package/dist/components/layout/index.d.ts +3 -3
- package/dist/components/layout/index.js +1 -1
- package/dist/components/layout/layout-footer.js +1 -1
- package/dist/components/layout/layout-footer.vue.d.ts +2 -2
- package/dist/components/layout/layout-header.js +1 -1
- package/dist/components/layout/layout-header.vue.d.ts +2 -2
- package/dist/components/layout/layout-main.js +1 -1
- package/dist/components/layout/layout-main.vue.d.ts +2 -2
- package/dist/components/layout/layout-mobile.js +1 -1
- package/dist/components/layout/layout-mobile.vue.d.ts +2 -2
- package/dist/components/layout/layout-rail.js +1 -1
- package/dist/components/layout/layout-rail.vue.d.ts +2 -2
- package/dist/components/layout/layout-root.js +1 -1
- package/dist/components/layout/layout-root.vue.d.ts +5 -5
- package/dist/components/layout/layout-sidebar.js +1 -1
- package/dist/components/layout/layout-sidebar.vue.d.ts +2 -2
- package/dist/components/layout/layout-tab.js +1 -1
- package/dist/components/layout/layout-tab.vue.d.ts +2 -2
- package/dist/components/layout/layout-trigger.js +1 -1
- package/dist/components/layout/layout-trigger.vue.d.ts +2 -2
- package/dist/components/layout/types.d.ts +13 -14
- package/dist/components/link/index.d.ts +2 -2
- package/dist/components/link/link.js +1 -1
- package/dist/components/link/link.vue.d.ts +5 -4
- package/dist/components/link/types.d.ts +6 -1
- package/dist/components/list/context.d.ts +6 -3
- package/dist/components/list/context.js +1 -1
- package/dist/components/list/index.d.ts +3 -3
- package/dist/components/list/index.js +1 -1
- package/dist/components/list/list-content.js +1 -1
- package/dist/components/list/list-content.vue.d.ts +2 -2
- package/dist/components/list/list-description.js +1 -1
- package/dist/components/list/list-description.vue.d.ts +2 -2
- package/dist/components/list/list-item.js +1 -1
- package/dist/components/list/list-item.vue.d.ts +2 -2
- package/dist/components/list/list-root.js +1 -1
- package/dist/components/list/list-root.vue.d.ts +2 -2
- package/dist/components/list/list-title.js +1 -1
- package/dist/components/list/list-title.vue.d.ts +2 -2
- package/dist/components/list/types.d.ts +5 -8
- package/dist/components/listbox/context.d.ts +5 -4
- package/dist/components/listbox/context.js +1 -1
- package/dist/components/listbox/index.d.ts +3 -3
- package/dist/components/listbox/index.js +1 -1
- package/dist/components/listbox/listbox-content.js +1 -1
- package/dist/components/listbox/listbox-content.vue.d.ts +2 -2
- package/dist/components/listbox/listbox-filter.vue.d.ts +4 -4
- package/dist/components/listbox/listbox-group-label.js +1 -1
- package/dist/components/listbox/listbox-group-label.vue.d.ts +2 -2
- package/dist/components/listbox/listbox-group.js +1 -1
- package/dist/components/listbox/listbox-group.vue.d.ts +2 -2
- package/dist/components/listbox/listbox-item-indicator.js +1 -1
- package/dist/components/listbox/listbox-item-indicator.vue.d.ts +4 -4
- package/dist/components/listbox/listbox-item.js +1 -1
- package/dist/components/listbox/listbox-item.vue.d.ts +5 -5
- package/dist/components/listbox/listbox-root.js +1 -1
- package/dist/components/listbox/listbox-root.vue.d.ts +7 -7
- package/dist/components/listbox/listbox-virtualizer.js +1 -1
- package/dist/components/listbox/listbox-virtualizer.vue.d.ts +2 -2
- package/dist/components/listbox/types.d.ts +4 -7
- package/dist/components/menu/context.d.ts +5 -4
- package/dist/components/menu/context.js +1 -1
- package/dist/components/menu/index.d.ts +3 -3
- package/dist/components/menu/index.js +1 -1
- package/dist/components/menu/menu-checkbox-group.js +1 -1
- package/dist/components/menu/menu-checkbox-group.vue.d.ts +3 -3
- package/dist/components/menu/menu-checkbox-item.js +1 -1
- package/dist/components/menu/menu-checkbox-item.vue.d.ts +4 -4
- package/dist/components/menu/menu-content-impl.js +1 -1
- package/dist/components/menu/menu-content.vue.d.ts +6 -6
- package/dist/components/menu/menu-group-label.js +1 -1
- package/dist/components/menu/menu-group-label.vue.d.ts +2 -2
- package/dist/components/menu/menu-group.js +1 -1
- package/dist/components/menu/menu-group.vue.d.ts +2 -2
- package/dist/components/menu/menu-item-indicator.js +1 -1
- package/dist/components/menu/menu-item-indicator.vue.d.ts +4 -4
- package/dist/components/menu/menu-item.js +1 -1
- package/dist/components/menu/menu-item.vue.d.ts +4 -4
- 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-item.vue.d.ts +4 -4
- package/dist/components/menu/menu-root.vue.d.ts +4 -4
- package/dist/components/menu/menu-sub-content.vue.d.ts +6 -6
- package/dist/components/menu/menu-sub-trigger.js +1 -1
- package/dist/components/menu/menu-sub-trigger.vue.d.ts +2 -2
- package/dist/components/menu/menu-sub.vue.d.ts +4 -4
- package/dist/components/menu/types.d.ts +4 -7
- package/dist/components/navigation-menu/context.d.ts +5 -4
- package/dist/components/navigation-menu/context.js +1 -1
- package/dist/components/navigation-menu/index.d.ts +3 -3
- package/dist/components/navigation-menu/index.js +1 -1
- package/dist/components/navigation-menu/navigation-menu-content-impl.js +1 -1
- package/dist/components/navigation-menu/navigation-menu-content.vue.d.ts +4 -4
- package/dist/components/navigation-menu/navigation-menu-indicator.js +1 -1
- package/dist/components/navigation-menu/navigation-menu-indicator.vue.d.ts +2 -2
- package/dist/components/navigation-menu/navigation-menu-item.js +1 -1
- package/dist/components/navigation-menu/navigation-menu-item.vue.d.ts +2 -2
- package/dist/components/navigation-menu/navigation-menu-link.js +1 -1
- package/dist/components/navigation-menu/navigation-menu-link.vue.d.ts +4 -4
- package/dist/components/navigation-menu/navigation-menu-list.js +1 -1
- package/dist/components/navigation-menu/navigation-menu-list.vue.d.ts +2 -2
- package/dist/components/navigation-menu/navigation-menu-root.js +1 -1
- package/dist/components/navigation-menu/navigation-menu-root.vue.d.ts +4 -4
- package/dist/components/navigation-menu/navigation-menu-sub-list.js +1 -1
- package/dist/components/navigation-menu/navigation-menu-sub-list.vue.d.ts +2 -2
- package/dist/components/navigation-menu/navigation-menu-trigger.js +1 -1
- package/dist/components/navigation-menu/navigation-menu-trigger.vue.d.ts +4 -4
- package/dist/components/navigation-menu/navigation-menu-viewport.js +1 -1
- package/dist/components/navigation-menu/navigation-menu-viewport.vue.d.ts +3 -3
- package/dist/components/navigation-menu/types.d.ts +5 -8
- package/dist/components/number-input/context.d.ts +5 -4
- package/dist/components/number-input/context.js +1 -1
- package/dist/components/number-input/index.d.ts +3 -3
- package/dist/components/number-input/index.js +1 -1
- package/dist/components/number-input/number-input-control.js +1 -1
- package/dist/components/number-input/number-input-control.vue.d.ts +2 -2
- package/dist/components/number-input/number-input-decrement.js +1 -1
- package/dist/components/number-input/number-input-decrement.vue.d.ts +4 -4
- package/dist/components/number-input/number-input-increment.js +1 -1
- package/dist/components/number-input/number-input-increment.vue.d.ts +4 -4
- package/dist/components/number-input/number-input-root.js +1 -1
- package/dist/components/number-input/number-input-root.vue.d.ts +4 -4
- package/dist/components/number-input/types.d.ts +5 -8
- package/dist/components/pagination/context.d.ts +6 -4
- package/dist/components/pagination/context.js +1 -1
- package/dist/components/pagination/index.d.ts +3 -3
- package/dist/components/pagination/index.js +1 -1
- package/dist/components/pagination/pagination-ellipsis.js +1 -1
- package/dist/components/pagination/pagination-ellipsis.vue.d.ts +2 -2
- 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-list.vue.d.ts +2 -2
- 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/pagination-root.vue.d.ts +5 -5
- package/dist/components/pagination/types.d.ts +5 -8
- package/dist/components/popover/index.d.ts +3 -3
- package/dist/components/popover/index.js +1 -1
- package/dist/components/popover/popover-anchor.vue.d.ts +2 -2
- package/dist/components/popover/popover-close.vue.d.ts +4 -4
- package/dist/components/popover/popover-popup.vue.d.ts +2 -2
- package/dist/components/popover/popover-positioner.vue.d.ts +4 -4
- package/dist/components/popover/popover-root.vue.d.ts +4 -4
- package/dist/components/popover/popover-trigger.vue.d.ts +4 -4
- package/dist/components/popper/context.d.ts +5 -4
- package/dist/components/popper/context.js +1 -1
- package/dist/components/popper/index.d.ts +3 -3
- package/dist/components/popper/index.js +1 -1
- package/dist/components/popper/popper-anchor.vue.d.ts +2 -2
- package/dist/components/popper/popper-arrow.js +1 -1
- package/dist/components/popper/popper-arrow.vue.d.ts +2 -2
- package/dist/components/popper/popper-popup.js +1 -1
- package/dist/components/popper/popper-popup.vue.d.ts +2 -2
- package/dist/components/popper/popper-positioner.js +1 -1
- package/dist/components/popper/popper-positioner.vue.d.ts +46 -46
- package/dist/components/popper/popper-root.vue.d.ts +2 -2
- package/dist/components/popper/types.d.ts +4 -7
- package/dist/components/primitive/primitive.d.ts +2 -2
- package/dist/components/radio-group/context.d.ts +5 -4
- package/dist/components/radio-group/context.js +1 -1
- package/dist/components/radio-group/index.d.ts +3 -3
- package/dist/components/radio-group/index.js +1 -1
- 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-indicator.vue.d.ts +4 -4
- package/dist/components/radio-group/radio-group-item.js +1 -1
- package/dist/components/radio-group/radio-group-item.vue.d.ts +4 -4
- package/dist/components/radio-group/radio-group-label.js +1 -1
- package/dist/components/radio-group/radio-group-label.vue.d.ts +2 -2
- 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 +4 -7
- package/dist/components/roving-focus/roving-focus-group.vue.d.ts +5 -5
- package/dist/components/roving-focus/roving-focus-item.vue.d.ts +3 -3
- package/dist/components/select/context.d.ts +5 -4
- package/dist/components/select/context.js +1 -1
- package/dist/components/select/index.d.ts +3 -3
- package/dist/components/select/index.js +1 -1
- package/dist/components/select/select-arrow.js +1 -1
- package/dist/components/select/select-arrow.vue.d.ts +2 -2
- package/dist/components/select/select-content-impl.js +1 -1
- package/dist/components/select/select-content.vue.d.ts +4 -4
- package/dist/components/select/select-group-label.js +1 -1
- package/dist/components/select/select-group-label.vue.d.ts +2 -2
- package/dist/components/select/select-group.js +1 -1
- package/dist/components/select/select-group.vue.d.ts +2 -2
- package/dist/components/select/select-item-indicator.js +1 -1
- package/dist/components/select/select-item-indicator.vue.d.ts +4 -4
- package/dist/components/select/select-item-text.js +1 -1
- package/dist/components/select/select-item-text.vue.d.ts +2 -2
- package/dist/components/select/select-item.js +1 -1
- package/dist/components/select/select-item.vue.d.ts +4 -4
- package/dist/components/select/select-root.vue.d.ts +3 -3
- package/dist/components/select/select-scroll-down-button.js +1 -1
- package/dist/components/select/select-scroll-down-button.vue.d.ts +2 -2
- package/dist/components/select/select-scroll-up-button.js +1 -1
- package/dist/components/select/select-scroll-up-button.vue.d.ts +2 -2
- package/dist/components/select/select-separator.js +1 -1
- package/dist/components/select/select-separator.vue.d.ts +2 -2
- package/dist/components/select/select-trigger-icon.js +1 -1
- package/dist/components/select/select-trigger-icon.vue.d.ts +2 -2
- package/dist/components/select/select-trigger.js +1 -1
- package/dist/components/select/select-trigger.vue.d.ts +4 -4
- package/dist/components/select/select-value.js +1 -1
- package/dist/components/select/select-value.vue.d.ts +3 -3
- package/dist/components/select/select-viewport.js +2 -2
- package/dist/components/select/select-viewport.vue.d.ts +2 -2
- package/dist/components/select/types.d.ts +4 -7
- package/dist/components/separator/context.d.ts +6 -3
- package/dist/components/separator/context.js +1 -1
- package/dist/components/separator/index.d.ts +3 -3
- package/dist/components/separator/index.js +1 -1
- package/dist/components/separator/separator-label.js +1 -1
- package/dist/components/separator/separator-label.vue.d.ts +2 -2
- package/dist/components/separator/separator-root.js +1 -1
- package/dist/components/separator/separator-root.vue.d.ts +3 -3
- package/dist/components/separator/types.d.ts +5 -8
- package/dist/components/slot/slot.d.ts +2 -2
- package/dist/components/switch/context.d.ts +6 -4
- package/dist/components/switch/context.js +1 -1
- package/dist/components/switch/index.d.ts +3 -3
- package/dist/components/switch/index.js +1 -1
- 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 +3 -3
- package/dist/components/switch/switch-thumb.js +1 -1
- package/dist/components/switch/switch-thumb.vue.d.ts +4 -4
- package/dist/components/switch/types.d.ts +5 -8
- package/dist/components/tabs/context.d.ts +5 -3
- package/dist/components/tabs/context.js +1 -1
- package/dist/components/tabs/index.d.ts +3 -3
- package/dist/components/tabs/index.js +1 -1
- package/dist/components/tabs/tabs-content.js +1 -1
- package/dist/components/tabs/tabs-content.vue.d.ts +2 -2
- package/dist/components/tabs/tabs-indicator.js +1 -1
- package/dist/components/tabs/tabs-indicator.vue.d.ts +2 -2
- package/dist/components/tabs/tabs-list.js +1 -1
- package/dist/components/tabs/tabs-list.vue.d.ts +2 -2
- package/dist/components/tabs/tabs-root.js +1 -1
- package/dist/components/tabs/tabs-root.vue.d.ts +4 -4
- package/dist/components/tabs/tabs-trigger.js +1 -1
- package/dist/components/tabs/tabs-trigger.vue.d.ts +4 -4
- package/dist/components/tabs/types.d.ts +5 -8
- package/dist/components/tag/tag.vue.d.ts +4 -4
- package/dist/components/textarea/context.d.ts +6 -3
- package/dist/components/textarea/context.js +1 -1
- package/dist/components/textarea/index.d.ts +3 -3
- package/dist/components/textarea/index.js +1 -1
- package/dist/components/textarea/textarea-control.js +1 -1
- package/dist/components/textarea/textarea-control.vue.d.ts +2 -2
- package/dist/components/textarea/textarea-counter.js +1 -1
- package/dist/components/textarea/textarea-counter.vue.d.ts +2 -2
- package/dist/components/textarea/textarea-root.js +1 -1
- package/dist/components/textarea/textarea-root.vue.d.ts +4 -4
- package/dist/components/textarea/types.d.ts +4 -7
- package/dist/components/toast/context.d.ts +5 -5
- package/dist/components/toast/context.js +1 -1
- package/dist/components/toast/index.d.ts +3 -3
- package/dist/components/toast/index.js +1 -1
- package/dist/components/toast/toast-action.js +1 -1
- package/dist/components/toast/toast-action.vue.d.ts +4 -4
- package/dist/components/toast/toast-close.js +1 -1
- package/dist/components/toast/toast-close.vue.d.ts +4 -4
- package/dist/components/toast/toast-description.js +1 -1
- package/dist/components/toast/toast-description.vue.d.ts +2 -2
- package/dist/components/toast/toast-provider.vue.d.ts +3 -3
- package/dist/components/toast/toast-root.js +1 -1
- package/dist/components/toast/toast-root.vue.d.ts +8 -8
- package/dist/components/toast/toast-title.js +1 -1
- package/dist/components/toast/toast-title.vue.d.ts +2 -2
- package/dist/components/toast/toast-viewport.js +1 -1
- package/dist/components/toast/toast-viewport.vue.d.ts +4 -4
- package/dist/components/toast/types.d.ts +5 -8
- package/dist/components/tooltip/index.d.ts +3 -3
- package/dist/components/tooltip/index.js +1 -1
- package/dist/components/tooltip/tooltip-popup.vue.d.ts +2 -2
- package/dist/components/tooltip/tooltip-positioner.vue.d.ts +4 -4
- package/dist/components/tooltip/tooltip-root.vue.d.ts +4 -4
- package/dist/components/tooltip/tooltip-trigger.vue.d.ts +4 -4
- package/dist/components/tree/tree-item.vue.d.ts +5 -5
- package/dist/components/tree/tree-root.vue.d.ts +3 -3
- package/dist/components/tree/tree-virtualizer-item.vue.d.ts +4 -4
- package/dist/components/tree/tree-virtualizer-root.vue.d.ts +3 -3
- package/dist/components/tree-menu/context.d.ts +10 -0
- package/dist/components/tree-menu/context.js +1 -0
- package/dist/components/tree-menu/index.d.ts +11 -0
- package/dist/components/tree-menu/index.js +1 -0
- package/dist/components/tree-menu/tree-menu-button.js +1 -0
- package/dist/components/tree-menu/tree-menu-button.vue.d.ts +22 -0
- package/dist/components/tree-menu/tree-menu-collapsible.js +1 -0
- package/dist/components/tree-menu/tree-menu-collapsible.vue.d.ts +22 -0
- package/dist/components/tree-menu/tree-menu-group-label.js +1 -0
- package/dist/components/tree-menu/tree-menu-group-label.vue.d.ts +18 -0
- package/dist/components/tree-menu/tree-menu-group-root.js +1 -0
- package/dist/components/tree-menu/tree-menu-group-root.vue.d.ts +18 -0
- package/dist/components/tree-menu/tree-menu-group.js +1 -0
- package/dist/components/tree-menu/tree-menu-group.vue.d.ts +22 -0
- package/dist/components/tree-menu/tree-menu-item.js +1 -0
- package/dist/components/tree-menu/tree-menu-item.vue.d.ts +22 -0
- package/dist/components/tree-menu/tree-menu-root.js +1 -0
- package/dist/components/tree-menu/tree-menu-root.vue.d.ts +31 -0
- package/dist/components/tree-menu/tree-menu-sub.js +1 -0
- package/dist/components/tree-menu/tree-menu-sub.vue.d.ts +22 -0
- package/dist/components/tree-menu/types.d.ts +73 -0
- package/dist/components/virtualizer/virtualizer-content.vue.d.ts +2 -2
- package/dist/components/virtualizer/virtualizer-item.vue.d.ts +2 -2
- package/dist/components/virtualizer/virtualizer-root.vue.d.ts +3 -3
- package/dist/components/visually-hidden/visually-hidden-input.vue.d.ts +3 -3
- package/dist/components/visually-hidden/visually-hidden.vue.d.ts +4 -4
- package/dist/composables/index.d.ts +2 -1
- package/dist/composables/index.js +1 -1
- package/dist/composables/use-collection.d.ts +6 -6
- package/dist/composables/use-direction.d.ts +2 -2
- package/dist/composables/use-dismissable-layer.d.ts +2 -2
- package/dist/composables/use-exposed-element.d.ts +2 -2
- package/dist/composables/use-forward-element.d.ts +2 -2
- package/dist/composables/use-image-loading-status.d.ts +2 -2
- package/dist/composables/use-is-using-keyboard.d.ts +2 -2
- package/dist/composables/use-kbd.d.ts +2 -2
- package/dist/composables/use-locale.d.ts +2 -2
- package/dist/composables/use-presence.d.ts +2 -2
- package/dist/composables/use-props.d.ts +3 -3
- package/dist/composables/use-selection.js +1 -1
- package/dist/composables/use-ui-context.d.ts +8 -0
- package/dist/composables/use-ui-context.js +1 -0
- package/dist/index.d.ts +185 -172
- package/dist/index.js +1 -1
- package/dist/namespaced/index.d.ts +223 -207
- package/dist/namespaced/index.js +1 -1
- package/dist/types/common.d.ts +3 -1
- package/dist/types/index.d.ts +1 -1
- package/package.json +4 -17
- package/dist/components/form/form-field-array.js +0 -1
- package/dist/components/form/form-field-array.vue.d.ts +0 -36
- package/dist/forms/core/context.d.ts +0 -21
- package/dist/forms/core/context.js +0 -1
- package/dist/forms/core/hooks.d.ts +0 -6
- package/dist/forms/core/hooks.js +0 -1
- package/dist/forms/core/index.d.ts +0 -3
- package/dist/forms/core/shared.js +0 -1
- package/dist/forms/core/types.d.ts +0 -88
- package/dist/forms/index.d.ts +0 -8
- package/dist/forms/index.js +0 -1
- package/dist/forms/resolvers/index.d.ts +0 -2
- package/dist/forms/resolvers/valibot/index.d.ts +0 -8
- package/dist/forms/resolvers/valibot/index.js +0 -1
- package/dist/forms/resolvers/zod/index.d.ts +0 -8
- package/dist/forms/resolvers/zod/index.js +0 -1
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
import { ArrayElement, MaybePromise } from "../../../types/common.js";
|
|
2
|
+
import { Path, PathValue } from "../../../types/path.js";
|
|
3
|
+
import "../../../types/index.js";
|
|
4
|
+
import { ComputedRef, Ref, ShallowRef, WritableComputedRef } from "vue";
|
|
5
|
+
import { StandardSchemaV1 } from "@standard-schema/spec";
|
|
6
|
+
|
|
7
|
+
//#region src/components/form/core/types.d.ts
|
|
8
|
+
type InferStandardSchemaInput<S extends StandardSchemaV1<FormValues, FormValues>> = NonNullable<S['~standard']['types']>['input'];
|
|
9
|
+
type FormValidateMode = 'blur' | 'input' | 'change' | 'submit';
|
|
10
|
+
type FormValues = Record<string, any>;
|
|
11
|
+
type FormErrors<Values extends FormValues> = { [K in keyof Path<Values>]?: string };
|
|
12
|
+
type FormTouched<Values extends FormValues> = { [K in keyof Path<Values>]?: boolean };
|
|
13
|
+
type FormFieldMeta = {
|
|
14
|
+
dirty: boolean;
|
|
15
|
+
error: string | undefined;
|
|
16
|
+
touched: boolean | undefined;
|
|
17
|
+
};
|
|
18
|
+
interface FormSubmitHelper<Values extends FormValues> {
|
|
19
|
+
setSubmitting: (isSubmitting: boolean) => void;
|
|
20
|
+
readonly initialValues: Values;
|
|
21
|
+
}
|
|
22
|
+
interface FormResetState<Values extends FormValues = FormValues> {
|
|
23
|
+
values: Values;
|
|
24
|
+
touched: FormTouched<Values>;
|
|
25
|
+
errors: FormErrors<Values>;
|
|
26
|
+
submitCount: number;
|
|
27
|
+
}
|
|
28
|
+
interface FormState<Values extends FormValues> {
|
|
29
|
+
values: Values;
|
|
30
|
+
touched: Ref<FormTouched<Values>>;
|
|
31
|
+
errors: Ref<FormErrors<Values>>;
|
|
32
|
+
submitCount: ShallowRef<number>;
|
|
33
|
+
isSubmitting: ShallowRef<boolean>;
|
|
34
|
+
isValidating: ShallowRef<boolean>;
|
|
35
|
+
}
|
|
36
|
+
interface UseFormOptions<S extends StandardSchemaV1<FormValues, FormValues>> {
|
|
37
|
+
schema: S;
|
|
38
|
+
initialValues?: InferStandardSchemaInput<S>;
|
|
39
|
+
initialErrors?: FormErrors<InferStandardSchemaInput<S>>;
|
|
40
|
+
initialTouched?: FormTouched<InferStandardSchemaInput<S>>;
|
|
41
|
+
validateMode?: FormValidateMode;
|
|
42
|
+
reValidateMode?: FormValidateMode;
|
|
43
|
+
validateOnMounted?: boolean;
|
|
44
|
+
onSubmit?: (values: InferStandardSchemaInput<S>, helper: FormSubmitHelper<InferStandardSchemaInput<S>>) => Promise<any>;
|
|
45
|
+
onInvalid?: (errors: FormErrors<InferStandardSchemaInput<S>>) => void;
|
|
46
|
+
}
|
|
47
|
+
type FormFieldValidator<Value> = (value: Value) => MaybePromise<string | undefined>;
|
|
48
|
+
interface FormRegisterOptions<Value> {
|
|
49
|
+
validate?: FormFieldValidator<Value>;
|
|
50
|
+
reset?: () => void;
|
|
51
|
+
}
|
|
52
|
+
interface FormEventHandler<S = string> {
|
|
53
|
+
onBlur: (event: Event | S, name?: S) => void;
|
|
54
|
+
onChange: () => void;
|
|
55
|
+
onInput: () => void;
|
|
56
|
+
}
|
|
57
|
+
interface FormSubmitHelper<Values extends FormValues> {
|
|
58
|
+
setSubmitting: (isSubmitting: boolean) => void;
|
|
59
|
+
readonly initialValues: Values;
|
|
60
|
+
}
|
|
61
|
+
interface FormFieldState<Values extends FormValues, Name extends Path<Values>> extends FormEventHandler<Name> {
|
|
62
|
+
name: Name;
|
|
63
|
+
value: PathValue<Values, Name>;
|
|
64
|
+
meta: FormFieldMeta;
|
|
65
|
+
}
|
|
66
|
+
interface FormFieldArrayState<Values extends FormValues, Name extends Path<Values>> extends FormEventHandler<Name> {
|
|
67
|
+
name: Name;
|
|
68
|
+
value: ArrayElement<NonNullable<PathValue<Values, Name>>>;
|
|
69
|
+
meta: FormFieldMeta;
|
|
70
|
+
}
|
|
71
|
+
interface UseFormStateReturn<Values extends FormValues> {
|
|
72
|
+
formState: FormState<Values>;
|
|
73
|
+
dirty: ComputedRef<boolean>;
|
|
74
|
+
submitHelper: FormSubmitHelper<Values>;
|
|
75
|
+
setSubmitting: (isSubmitting: boolean) => void;
|
|
76
|
+
registerField<Name extends Path<Values>>(name: Name, opts?: FormRegisterOptions<PathValue<Values, Name>>): Ref<FormFieldState<Values, Name>>;
|
|
77
|
+
registerFieldArray<Name extends Path<Values>>(name: Name, opts?: FormRegisterOptions<PathValue<Values, Name>>): Ref<FormFieldState<Values, Name>>;
|
|
78
|
+
validateField<Name extends Path<Values>>(name: Name): Promise<string | undefined | void>;
|
|
79
|
+
getFieldValue<Name extends Path<Values>>(name: Name): WritableComputedRef<PathValue<Values, Name>>;
|
|
80
|
+
getFieldMeta<Name extends Path<Values>>(name: Name): Ref<FormFieldMeta>;
|
|
81
|
+
getFieldError<Name extends Path<Values>>(name: Name): string | undefined;
|
|
82
|
+
getFieldTouched<Name extends Path<Values>>(name: Name): boolean | undefined;
|
|
83
|
+
getFieldDirty<Name extends Path<Values>>(name: Name): boolean;
|
|
84
|
+
getFieldState<Name extends Path<Values>>(name: Name): Ref<FormFieldState<Values, Name>>;
|
|
85
|
+
setValues(values: Values, shouldValidate?: boolean): Promise<FormErrors<Values>> | Promise<void>;
|
|
86
|
+
setErrors(errors: FormErrors<Values>): void;
|
|
87
|
+
setFieldValue<Name extends Path<Values>>(name: Name, value: PathValue<Values, Name>, shouldValidate?: boolean): Promise<FormErrors<Values>> | Promise<void>;
|
|
88
|
+
setFieldTouched<Name extends Path<Values>>(name: Name, touched: boolean): void;
|
|
89
|
+
setFieldError<Name extends Path<Values>>(name: Name, error: string | undefined): void;
|
|
90
|
+
setFieldArrayValue<Name extends Path<Values>, Method extends (...args: any) => any>(name: Name, value: PathValue<Values, Name>, method: Method, args?: Partial<{
|
|
91
|
+
argA: Parameters<Method>[1];
|
|
92
|
+
argB: Parameters<Method>[2];
|
|
93
|
+
}>, shouldSetValue?: boolean): Promise<void> | Promise<FormErrors<Values>>;
|
|
94
|
+
validateForm(values?: Values): Promise<FormErrors<Values>>;
|
|
95
|
+
resetForm(nextState?: FormResetState<Values>): void;
|
|
96
|
+
}
|
|
97
|
+
interface FormContext<Values extends FormValues> extends Omit<UseFormStateReturn<Values>, 'formState' | 'submitHelper'>, FormState<Values> {
|
|
98
|
+
handleSubmit(event?: Event): void;
|
|
99
|
+
handleReset(event?: Event): void;
|
|
100
|
+
useFieldArray<Name extends Path<Values>>(name: Name, opts?: FormRegisterOptions<PathValue<Values, Name>>): Ref<FormFieldArrayStates<Values, Name>>;
|
|
101
|
+
useField<Name extends Path<Values>>(name: Name, opts?: FormRegisterOptions<PathValue<Values, Name>>): Ref<FormFieldState<Values, Name>>;
|
|
102
|
+
}
|
|
103
|
+
interface FormFieldArrayStates<Values extends FormValues, Name extends Path<Values>> {
|
|
104
|
+
name: Name;
|
|
105
|
+
fields: readonly FormFieldArrayState<Values, Name>[];
|
|
106
|
+
meta: FormFieldMeta;
|
|
107
|
+
append: (value: ArrayElement<NonNullable<PathValue<Values, Name>>>) => void;
|
|
108
|
+
prepend: (value: ArrayElement<NonNullable<PathValue<Values, Name>>>) => void;
|
|
109
|
+
remove: (index?: number) => void;
|
|
110
|
+
swap: (indexA: number, indexB: number) => void;
|
|
111
|
+
move: (from: number, to: number) => void;
|
|
112
|
+
insert: (index: number, value: ArrayElement<NonNullable<PathValue<Values, Name>>>) => void;
|
|
113
|
+
update: (index: number, value: ArrayElement<NonNullable<PathValue<Values, Name>>>) => void;
|
|
114
|
+
replace: ($values: ArrayElement<NonNullable<PathValue<Values, Name>>>[]) => void;
|
|
115
|
+
}
|
|
116
|
+
//#endregion
|
|
117
|
+
export { FormContext, FormFieldArrayStates, FormFieldState, FormRegisterOptions, FormResetState, FormValues, InferStandardSchemaInput, UseFormOptions };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{appendAt as e,insertAt as t,moveAt as n,prependAt as r,removeAt as i,swapAt as a,updateAt as o}from"../../../shared/object.js";import{computed as s,toRef as c}from"vue";function l(l,u,d){let{getFieldState:f,getFieldValue:p,setFieldArrayValue:m,registerFieldArray:h}=u;h(l,{validate:d});let g=s(()=>p(l).value||[]),_=s(()=>g.value.map(v));function v(e){return{...f(l).value,name:l,value:e}}function y(t){m(l,e(g.value,t),e,{argA:void 0})}function b(e){m(l,r(g.value,e),r,{argA:void 0})}function x(e){m(l,i(g.value,e),i,{argA:e})}function S(e,t){if(!(e in g.value)||!(t in g.value))return;let n=[...g.value];a(n,e,t),m(l,n,a,{argA:e,argB:t},!1)}function C(e,t){if(!(e in g.value))return;let r=[...g.value];n(r,e,t),m(l,r,n,{argA:e,argB:t},!1)}function w(e,n){m(l,t(g.value,e,n),t,{argA:e,argB:void 0})}function T(e,t){e in g.value&&m(l,o(g.value,e,t),o,{argA:e,argB:void 0})}function E(e){m(l,[...e],e=>e,{})}let D=f(l);return c({name:l,fields:_,meta:s(()=>D.value.meta),append:y,prepend:b,remove:x,swap:S,move:C,insert:w,update:T,replace:E})}export{l as useRegisterFieldArray};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{isFunction as e,isNullish as t,isString as n,keysOf as r}from"../../../shared/guard.js";import{getValue as i,setValue as a}from"../../../shared/value.js";import{updateFormState as o}from"./shared.js";import{validateStandardSchema as s}from"./standard.js";import{computed as c,onMounted as l,reactive as u,ref as d,shallowRef as f,toRef as p}from"vue";import{isEqual as m}from"ohash";import{klona as h}from"klona/full";import{defu as g}from"defu";function _(_){let{validateOnMounted:v=!1,validateMode:y=`submit`,reValidateMode:b=`change`}=_,x=h(_.initialValues||{}),S=h(_.initialErrors||{}),C=h(_.initialTouched||{}),w={values:u(h(x)),touched:d(h(C)),errors:d(h(S)),submitCount:f(0),isSubmitting:f(!1),isValidating:f(!1)},T=c(()=>!m(w.values,x)),E={},D={},O=c(()=>w.submitCount.value===0?y:b);function k(e,t,n){let r=e;r in w.values||a(w.values,r,n?[]:void 0);let{validate:i}=t||{};return i&&(E[r]={validate:i}),K(e)}function A(e,t){let n=k(e,t,!0),r=e,{reset:i}=t||{};return i&&(D[r]={reset:i}),n}function j(e,n=!0){return o(w,{type:`SetValues`,payload:e}),(t(n)?O.value===`change`:n)?Z(w.values):Promise.resolve()}function M(e){o(w,{type:`SetErrors`,payload:e})}function N(e,t,n=!0){return o(w,{type:`SetFieldValue`,payload:{name:e,value:t}}),n?Z(w.values):Promise.resolve()}function P(e,t){o(w,{type:`SetTouched`,payload:{name:e,touched:t}})}function F(e,t){o(w,{type:`SetFieldError`,payload:{name:e,error:t}})}function I(e,t,n,a,s=!0){if(n&&a){if(r(w.errors.value).length&&Array.isArray(i(w.errors.value,e))){let t=n(i(w.errors.value,e),a.argA,a.argB);s&&F(e,t)}if(r(w.touched.value).length&&Array.isArray(i(w.touched.value,e))){let t=n(i(w.touched.value,e),a.argA,a.argB);s&&o(w,{type:`SetTouched`,payload:{name:e,touched:t}})}}return N(e,t)}function L(e){return c({get(){return i(w.values,e)},set(t){N(e,t)}})}function R(e){return p({dirty:c(()=>V(e)),error:c(()=>z(e)),touched:c(()=>B(e))})}function z(e){return i(w.errors.value,e)}function B(e){return i(w.touched.value,e,!1)}function V(e){return!m(i(x,e),i(w.values,e))}async function H(t){if(E[t]&&e(E[t].validate)){o(w,{type:`SetIsValidating`,payload:!0});let e=await X(t,i(w.values,t));return F(t,e),o(w,{type:`SetIsValidating`,payload:!1}),e}return Promise.resolve()}let U=(e,t)=>{if((e=>n(e))(e)){P(e,!0);return}let{name:r,id:i}=e.target,a=t??(r||i);a&&P(a,!0)},W=()=>{O.value===`change`&&Z(w.values)},G=()=>{O.value===`input`&&Z(w.values)};function K(e){let t=R(e);return p({name:e,value:L(e),meta:t,onBlur:U,onChange:W,onInput:G})}function q(e){o(w,{type:`SetIsSubmitting`,payload:e})}let J={setSubmitting:q,get initialValues(){return h(x||{})}};async function Y(t){let n=r(E).filter(t=>e(E?.[t]?.validate)),o=n.map(e=>X(e,i(t,e)));return Promise.all(o).then(e=>e.reduce((e,t,r)=>(t&&a(e,n[r],t),e),{}))}function X(e,t){return Promise.resolve(E[e]?.validate?.(t))}async function Z(e=w.values){return o(w,{type:`SetIsValidating`,payload:!0}),Promise.all([Y(e),s(e,_.schema)]).then(([e,t])=>{let n=g(e,t);return M(n),n}).finally(()=>{o(w,{type:`SetIsValidating`,payload:!1})})}function Q(e){let t=h(e?.values||x),n=h(e?.errors||S),r=h(e?.touched||C);x=h(t),S=h(n),C=h(r),o(w,{type:`ResetForm`,payload:{values:t,touched:r,errors:n,submitCount:typeof e?.submitCount==`number`?e.submitCount:0}}),Object.values(D).forEach(e=>{e?.reset?.()})}return l(()=>{v&&Z(x)}),{formState:w,dirty:T,submitHelper:J,setSubmitting:q,registerField:k,registerFieldArray:A,validateField:H,getFieldValue:L,getFieldMeta:R,getFieldError:z,getFieldTouched:B,getFieldDirty:V,getFieldState:K,setValues:j,setErrors:M,setFieldValue:N,setFieldTouched:P,setFieldError:F,setFieldArrayValue:I,validateForm:Z,resetForm:Q}}export{_ as useFormState};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { FormContext, FormValues, InferStandardSchemaInput, UseFormOptions } from "./types.js";
|
|
2
|
+
import { StandardSchemaV1 } from "@standard-schema/spec";
|
|
3
|
+
|
|
4
|
+
//#region src/components/form/core/use-form.d.ts
|
|
5
|
+
declare function useForm<S extends StandardSchemaV1<FormValues, FormValues>>(options: UseFormOptions<S>): Readonly<FormContext<InferStandardSchemaInput<S>>>;
|
|
6
|
+
//#endregion
|
|
7
|
+
export { useForm };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{isNullish as e,keysOf as t}from"../../../shared/guard.js";import{updateFormState as n}from"./shared.js";import{useFormState as r}from"./use-form-state.js";import{useRegisterFieldArray as i}from"./use-field-array.js";import{klona as a}from"klona/full";function o(o){let{onSubmit:s=()=>Promise.resolve(),onInvalid:c}=o,{formState:l,submitHelper:u,...d}=r(o),{resetForm:f,validateForm:p,registerField:m}=d;function h(e,t){let{getFieldState:n,getFieldValue:r,setFieldValue:a,setFieldArrayValue:o,registerFieldArray:s}=d;return i(e,{getFieldState:n,getFieldValue:r,setFieldValue:a,setFieldArrayValue:o,registerFieldArray:s},t?.validate)}function g(r){r?.preventDefault(),n(l,{type:`SubmitAttempt`}),p().then(r=>{if(t(r).length===0){let t=s(a(l.values),u);if(e(t))return;t.then(e=>(n(l,{type:`SubmitSuccess`}),e)).catch(()=>{n(l,{type:`SubmitFailure`})})}else n(l,{type:`SubmitFailure`}),c?.(r)})}function _(e){e?.preventDefault(),f()}return{...l,handleSubmit:g,handleReset:_,useField:m,useFieldArray:h,...d}}export{o as useForm};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{useFormFieldContext as e,
|
|
1
|
+
import{useFormFieldContext as e,useFormFieldUi as t}from"./context.js";import{createElementBlock as n,defineComponent as r,normalizeClass as i,openBlock as a,renderSlot as o,unref as s}from"vue";const c=[`id`];var l=r({name:`FormDescription`,__name:`form-description`,setup(r){let{formDescriptionId:l}=e(`FormDescription`),u=t(`description`);return(e,t)=>(a(),n(`p`,{id:s(l),class:i(s(u))},[o(e.$slots,`default`)],10,c))}});export{l as default};
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { FormDescriptionProps } from "./types.js";
|
|
2
|
-
import * as
|
|
2
|
+
import * as vue777 from "vue";
|
|
3
3
|
|
|
4
4
|
//#region src/components/form/form-description.vue.d.ts
|
|
5
5
|
declare var __VLS_1: {};
|
|
6
6
|
type __VLS_Slots = {} & {
|
|
7
7
|
default?: (props: typeof __VLS_1) => any;
|
|
8
8
|
};
|
|
9
|
-
declare const __VLS_base:
|
|
9
|
+
declare const __VLS_base: vue777.DefineComponent<FormDescriptionProps, {}, {}, {}, {}, vue777.ComponentOptionsMixin, vue777.ComponentOptionsMixin, {}, string, vue777.PublicProps, Readonly<FormDescriptionProps> & Readonly<{}>, {}, {}, {}, {}, string, vue777.ComponentProvideOptions, false, {}, any>;
|
|
10
10
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
11
11
|
declare const _default: typeof __VLS_export;
|
|
12
12
|
type __VLS_WithSlots<T, S> = T & {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{useFormFieldContext as e,
|
|
1
|
+
import{useFormFieldContext as e,useFormFieldUi as t}from"./context.js";import{createElementBlock as n,defineComponent as r,normalizeClass as i,openBlock as a,renderSlot as o,unref as s}from"vue";const c=[`id`];var l=r({name:`FormError`,__name:`form-error`,setup(r){let{formErrorId:l}=e(`FormError`),u=t(`error`);return(e,t)=>(a(),n(`p`,{id:s(l),class:i(s(u))},[o(e.$slots,`default`)],10,c))}});export{l as default};
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { FormErrorProps } from "./types.js";
|
|
2
|
-
import * as
|
|
2
|
+
import * as vue772 from "vue";
|
|
3
3
|
|
|
4
4
|
//#region src/components/form/form-error.vue.d.ts
|
|
5
5
|
declare var __VLS_1: {};
|
|
6
6
|
type __VLS_Slots = {} & {
|
|
7
7
|
default?: (props: typeof __VLS_1) => any;
|
|
8
8
|
};
|
|
9
|
-
declare const __VLS_base:
|
|
9
|
+
declare const __VLS_base: vue772.DefineComponent<FormErrorProps, {}, {}, {}, {}, vue772.ComponentOptionsMixin, vue772.ComponentOptionsMixin, {}, string, vue772.PublicProps, Readonly<FormErrorProps> & Readonly<{}>, {}, {}, {}, {}, string, vue772.ComponentProvideOptions, false, {}, any>;
|
|
10
10
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
11
11
|
declare const _default: typeof __VLS_export;
|
|
12
12
|
type __VLS_WithSlots<T, S> = T & {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{provideFormFieldContext as e,useFormFieldUi as t}from"./context.js";import{computed as n,createElementBlock as r,defineComponent as i,normalizeClass as a,openBlock as o,renderSlot as s,unref as c}from"vue";const l=[`id`];var u=i({name:`FormField`,__name:`form-field`,props:{error:{},isFieldArray:{type:Boolean}},setup(i){let u=i,d=n(()=>u.isFieldArray?t(`field`).value:t(`fieldArray`).value),{formFieldId:f,ariaDescribedBy:p,ariaInvalid:m}=e({error:n(()=>u.error)});return(e,t)=>(o(),r(`div`,{id:i.isFieldArray?c(f):void 0,class:a(d.value)},[s(e.$slots,`default`,{formFieldId:c(f),ariaDescribedBy:c(p),ariaInvalid:c(m)})],10,l))}});export{u as default};
|
|
@@ -1,27 +1,16 @@
|
|
|
1
|
-
import { FormErrors, FormFieldAttrs } from "../../forms/core/types.js";
|
|
2
|
-
import "../../forms/index.js";
|
|
3
1
|
import { FormFieldProps } from "./types.js";
|
|
4
|
-
import * as
|
|
2
|
+
import * as vue767 from "vue";
|
|
5
3
|
|
|
6
4
|
//#region src/components/form/form-field.vue.d.ts
|
|
7
|
-
declare function updateModelValue(val: any): void;
|
|
8
5
|
declare var __VLS_1: {
|
|
9
|
-
modelValue: any;
|
|
10
|
-
attrs: FormFieldAttrs;
|
|
11
|
-
dirty: boolean;
|
|
12
|
-
error: string | string[] | FormErrors<any> | undefined;
|
|
13
|
-
touched: boolean | undefined;
|
|
14
6
|
formFieldId: string;
|
|
15
|
-
formDescriptionId: string;
|
|
16
|
-
formErrorId: string;
|
|
17
7
|
ariaDescribedBy: string;
|
|
18
8
|
ariaInvalid: boolean;
|
|
19
|
-
updateModelValue: typeof updateModelValue;
|
|
20
9
|
};
|
|
21
10
|
type __VLS_Slots = {} & {
|
|
22
11
|
default?: (props: typeof __VLS_1) => any;
|
|
23
12
|
};
|
|
24
|
-
declare const __VLS_base:
|
|
13
|
+
declare const __VLS_base: vue767.DefineComponent<FormFieldProps, {}, {}, {}, {}, vue767.ComponentOptionsMixin, vue767.ComponentOptionsMixin, {}, string, vue767.PublicProps, Readonly<FormFieldProps> & Readonly<{}>, {}, {}, {}, {}, string, vue767.ComponentProvideOptions, false, {}, any>;
|
|
25
14
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
26
15
|
declare const _default: typeof __VLS_export;
|
|
27
16
|
type __VLS_WithSlots<T, S> = T & {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"../label/label.js";import{useFormFieldContext as t,
|
|
1
|
+
import e from"../label/label.js";import{useFormFieldContext as t,useFormFieldUi as n}from"./context.js";import{createBlock as r,defineComponent as i,normalizeClass as a,openBlock as o,renderSlot as s,unref as c,withCtx as l}from"vue";var u=i({name:`FormLabel`,__name:`form-label`,props:{for:{}},setup(i){let{formFieldId:u}=t(`FormLabel`),d=n(`label`);return(t,n)=>(o(),r(c(e),{for:c(u),class:a(c(d))},{default:l(()=>[s(t.$slots,`default`)]),_:3},8,[`for`,`class`]))}});export{u as default};
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { FormLabelProps } from "./types.js";
|
|
2
|
-
import * as
|
|
2
|
+
import * as vue762 from "vue";
|
|
3
3
|
|
|
4
4
|
//#region src/components/form/form-label.vue.d.ts
|
|
5
5
|
declare var __VLS_8: {};
|
|
6
6
|
type __VLS_Slots = {} & {
|
|
7
7
|
default?: (props: typeof __VLS_8) => any;
|
|
8
8
|
};
|
|
9
|
-
declare const __VLS_base:
|
|
9
|
+
declare const __VLS_base: vue762.DefineComponent<FormLabelProps, {}, {}, {}, {}, vue762.ComponentOptionsMixin, vue762.ComponentOptionsMixin, {}, string, vue762.PublicProps, Readonly<FormLabelProps> & Readonly<{}>, {}, {}, {}, {}, string, vue762.ComponentProvideOptions, false, {}, any>;
|
|
10
10
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
11
11
|
declare const _default: typeof __VLS_export;
|
|
12
12
|
type __VLS_WithSlots<T, S> = T & {
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
-
import { FormDescriptionProps, FormErrorProps,
|
|
1
|
+
import { FormDescriptionProps, FormErrorProps, FormFieldProps, FormFieldUi, FormFieldUiSlot, FormLabelProps } from "./types.js";
|
|
2
2
|
import { _default as _default$2 } from "./form-field.vue.js";
|
|
3
|
-
import { _default as _default$3 } from "./form-
|
|
4
|
-
import { _default as _default$4 } from "./form-label.vue.js";
|
|
3
|
+
import { _default as _default$3 } from "./form-label.vue.js";
|
|
5
4
|
import { _default } from "./form-description.vue.js";
|
|
6
5
|
import { _default as _default$1 } from "./form-error.vue.js";
|
|
7
|
-
import {
|
|
8
|
-
|
|
6
|
+
import { provideFormFieldUi } from "./context.js";
|
|
7
|
+
import { FormFieldArrayStates, FormFieldState, FormRegisterOptions, FormResetState, FormValues, InferStandardSchemaInput, UseFormOptions } from "./core/types.js";
|
|
8
|
+
import { useForm } from "./core/use-form.js";
|
|
9
|
+
import { StandardSchemaV1 } from "@standard-schema/spec";
|
|
10
|
+
export { _default as FormDescription, type FormDescriptionProps, _default$1 as FormError, type FormErrorProps, _default$2 as FormField, type FormFieldArrayStates, type FormFieldProps, type FormFieldState, type FormFieldUi, type FormFieldUiSlot, _default$3 as FormLabel, type FormLabelProps, type FormRegisterOptions, type FormResetState, type FormValues, type InferStandardSchemaInput, type StandardSchemaV1, type UseFormOptions, provideFormFieldUi, useForm };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{provideFormFieldUi as e}from"./context.js";import t from"./form-field.js";import n from"./form-label.js";import r from"./form-description.js";import i from"./form-error.js";import{useForm as a}from"./core/use-form.js";export{r as FormDescription,i as FormError,t as FormField,n as FormLabel,e as provideFormFieldUi,a as useForm};
|
|
@@ -1,22 +1,17 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { UiClass } from "../../types/common.js";
|
|
2
2
|
import "../../types/index.js";
|
|
3
3
|
import { LabelProps } from "../label/types.js";
|
|
4
4
|
import { ComputedRef, HTMLAttributes } from "vue";
|
|
5
5
|
|
|
6
6
|
//#region src/components/form/types.d.ts
|
|
7
7
|
interface FormFieldProps extends /** @vue-ignore */HTMLAttributes {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
interface FormFieldArrayProps extends /** @vue-ignore */HTMLAttributes {
|
|
11
|
-
name: string;
|
|
8
|
+
error?: string;
|
|
9
|
+
isFieldArray?: boolean;
|
|
12
10
|
}
|
|
13
11
|
interface FormLabelProps extends LabelProps {}
|
|
14
12
|
interface FormDescriptionProps extends /** @vue-ignore */HTMLAttributes {}
|
|
15
13
|
interface FormErrorProps extends /** @vue-ignore */HTMLAttributes {}
|
|
16
|
-
type
|
|
17
|
-
type FormFieldUi =
|
|
18
|
-
interface FormThemeParams {
|
|
19
|
-
ui?: ComputedRef<FormFieldUi>;
|
|
20
|
-
}
|
|
14
|
+
type FormFieldUiSlot = 'field' | 'fieldArray' | 'label' | 'description' | 'error';
|
|
15
|
+
type FormFieldUi = UiClass<FormFieldUiSlot>;
|
|
21
16
|
//#endregion
|
|
22
|
-
export { FormDescriptionProps, FormErrorProps,
|
|
17
|
+
export { FormDescriptionProps, FormErrorProps, FormFieldProps, FormFieldUi, FormFieldUiSlot, FormLabelProps };
|
|
@@ -1,6 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ClassValue, UiClass } from "../../types/common.js";
|
|
2
|
+
import { InputUiSlot } from "./types.js";
|
|
3
|
+
import "../../index.js";
|
|
4
|
+
import * as vue124 from "vue";
|
|
2
5
|
|
|
3
6
|
//#region src/components/input/context.d.ts
|
|
4
|
-
declare const
|
|
7
|
+
declare const provideInputUi: (ui: vue124.ComputedRef<Partial<UiClass<InputUiSlot>>>) => vue124.ComputedRef<Partial<UiClass<InputUiSlot>>>, useInputUi: <S extends InputUiSlot | undefined = undefined>(slot?: S | undefined) => S extends InputUiSlot ? vue124.ComputedRef<ClassValue> : vue124.ComputedRef<Partial<UiClass<InputUiSlot>>>;
|
|
5
8
|
//#endregion
|
|
6
|
-
export {
|
|
9
|
+
export { provideInputUi };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{useContext as e}from"../../composables/use-context.js";const[
|
|
1
|
+
import{useContext as e}from"../../composables/use-context.js";import{useUiContext as t}from"../../composables/use-ui-context.js";const[n,r]=e(`InputRoot`,e=>e),[i,a]=t(`InputUi`);export{n as provideInputRootContext,i as provideInputUi,r as useInputRootContext,a as useInputUi};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { InputControlProps, InputRootEmits, InputRootProps,
|
|
1
|
+
import { InputControlProps, InputRootEmits, InputRootProps, InputUi, InputUiSlot } from "./types.js";
|
|
2
2
|
import { _default as _default$1 } from "./input-root.vue.js";
|
|
3
3
|
import { _default } from "./input-control.vue.js";
|
|
4
|
-
import {
|
|
5
|
-
export { _default as InputControl, type InputControlProps, _default$1 as InputRoot, type InputRootEmits, type InputRootProps, type
|
|
4
|
+
import { provideInputUi } from "./context.js";
|
|
5
|
+
export { _default as InputControl, type InputControlProps, _default$1 as InputRoot, type InputRootEmits, type InputRootProps, type InputUi, type InputUiSlot, provideInputUi };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{provideInputUi as e}from"./context.js";import t from"./input-root.js";import n from"./input-control.js";export{n as InputControl,t as InputRoot,e as provideInputUi};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{useInputRootContext as e,
|
|
1
|
+
import{useInputRootContext as e,useInputUi as t}from"./context.js";import{createElementBlock as n,defineComponent as r,normalizeClass as i,openBlock as a,unref as o}from"vue";const s=[`id`,`aria-disabled`,`aria-valuenow`,`autofocus`,`data-disabled`,`data-readonly`,`disabled`,`maxlength`,`minlength`,`pattern`,`placeholder`,`readonly`,`name`,`required`,`value`];var c=r({name:`InputControl`,__name:`input-control`,setup(r){let{modelValue:c,id:l,autofocus:u,placeholder:d,disabled:f,readonly:p,maxlength:m,minlength:h,pattern:g,name:_,required:v}=e(`InputControl`),y=t(`control`),b=e=>{c.value=e.target.value};return(e,t)=>(a(),n(`input`,{id:o(l),class:i(o(y)),"aria-disabled":o(f)??void 0,"aria-roledescription":`Input`,"aria-valuenow":o(c)??void 0,autocorrect:`off`,autofocus:o(u),"data-disabled":o(f)?``:void 0,"data-readonly":o(p)?``:void 0,disabled:o(f),maxlength:o(m),minlength:o(h),pattern:o(g),placeholder:o(d),readonly:o(p),name:o(_),required:o(v),spellcheck:`false`,tabindex:`0`,value:o(c),onInput:b},null,42,s))}});export{c as default};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { InputControlProps } from "./types.js";
|
|
2
|
-
import * as
|
|
2
|
+
import * as vue119 from "vue";
|
|
3
3
|
|
|
4
4
|
//#region src/components/input/input-control.vue.d.ts
|
|
5
|
-
declare const __VLS_export:
|
|
5
|
+
declare const __VLS_export: vue119.DefineComponent<InputControlProps, {}, {}, {}, {}, vue119.ComponentOptionsMixin, vue119.ComponentOptionsMixin, {}, string, vue119.PublicProps, Readonly<InputControlProps> & Readonly<{}>, {}, {}, {}, {}, string, vue119.ComponentProvideOptions, false, {}, any>;
|
|
6
6
|
declare const _default: typeof __VLS_export;
|
|
7
7
|
//#endregion
|
|
8
8
|
export { _default };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{isFormControl as e,transformPropsToContext as t}from"../../shared/vue.js";import{useControllableState as n}from"../../composables/use-controllable-state.js";import{useForwardElement as r}from"../../composables/use-forward-element.js";import i from"../visually-hidden/visually-hidden-input.js";import{provideInputRootContext as a,
|
|
1
|
+
import{isFormControl as e,transformPropsToContext as t}from"../../shared/vue.js";import{useControllableState as n}from"../../composables/use-controllable-state.js";import{useForwardElement as r}from"../../composables/use-forward-element.js";import i from"../visually-hidden/visually-hidden-input.js";import{provideInputRootContext as a,useInputUi as o}from"./context.js";import{computed as s,createBlock as c,createCommentVNode as l,createElementBlock as u,defineComponent as d,normalizeClass as f,openBlock as p,renderSlot as m,unref as h}from"vue";const g=[`data-disabled`,`data-readonly`];var _=d({name:`InputRoot`,__name:`input-root`,props:{defaultValue:{},modelValue:{default:void 0},id:{},autofocus:{type:Boolean},disabled:{type:Boolean},maxlength:{},minlength:{},pattern:{},placeholder:{},readonly:{type:Boolean},name:{},required:{type:Boolean}},emits:[`update:modelValue`],setup(d,{emit:_}){let v=d,y=_,[b,x]=r(),S=o(`root`),C=n(()=>v.modelValue,e=>{y(`update:modelValue`,e)},v.defaultValue),w=s(()=>e(b.value)),T=()=>{C.value=``};return a({...t(v,[`id`,`autofocus`,`placeholder`,`disabled`,`readonly`,`maxlength`,`minlength`,`pattern`,`name`,`required`]),modelValue:C}),(e,t)=>(p(),u(`div`,{ref:h(x),class:f(h(S)),role:`group`,"data-disabled":d.disabled?``:void 0,"data-readonly":d.readonly?``:void 0},[m(e.$slots,`default`,{modelValue:h(C),clear:T}),w.value&&d.name?(p(),c(i,{key:0,type:`text`,value:h(C),name:d.name,disabled:d.disabled,readonly:d.readonly,required:d.required},null,8,[`value`,`name`,`disabled`,`readonly`,`required`])):l(`v-if`,!0)],10,g))}});export{_ as default};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { InputRootProps } from "./types.js";
|
|
2
|
-
import * as
|
|
2
|
+
import * as vue114 from "vue";
|
|
3
3
|
|
|
4
4
|
//#region src/components/input/input-root.vue.d.ts
|
|
5
5
|
declare var __VLS_1: {
|
|
@@ -9,13 +9,13 @@ declare var __VLS_1: {
|
|
|
9
9
|
type __VLS_Slots = {} & {
|
|
10
10
|
default?: (props: typeof __VLS_1) => any;
|
|
11
11
|
};
|
|
12
|
-
declare const __VLS_base:
|
|
12
|
+
declare const __VLS_base: vue114.DefineComponent<InputRootProps, {}, {}, {}, {}, vue114.ComponentOptionsMixin, vue114.ComponentOptionsMixin, {
|
|
13
13
|
"update:modelValue": (value: string) => any;
|
|
14
|
-
}, string,
|
|
14
|
+
}, string, vue114.PublicProps, Readonly<InputRootProps> & Readonly<{
|
|
15
15
|
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
16
16
|
}>, {
|
|
17
17
|
modelValue: string;
|
|
18
|
-
}, {}, {}, {}, string,
|
|
18
|
+
}, {}, {}, {}, string, vue114.ComponentProvideOptions, false, {}, any>;
|
|
19
19
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
20
20
|
declare const _default: typeof __VLS_export;
|
|
21
21
|
type __VLS_WithSlots<T, S> = T & {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { UiClass } from "../../types/common.js";
|
|
2
2
|
import { FormFieldCommonProps } from "../../types/component.js";
|
|
3
3
|
import "../../types/index.js";
|
|
4
|
-
import {
|
|
4
|
+
import { HTMLAttributes, InputHTMLAttributes, ShallowRef } from "vue";
|
|
5
5
|
|
|
6
6
|
//#region src/components/input/types.d.ts
|
|
7
7
|
interface InputBaseProps {
|
|
@@ -32,10 +32,7 @@ type InputRootEmits = {
|
|
|
32
32
|
'update:modelValue': [value: string];
|
|
33
33
|
};
|
|
34
34
|
interface InputControlProps extends /** @vue-ignore */InputHTMLAttributes {}
|
|
35
|
-
type
|
|
36
|
-
type InputUi =
|
|
37
|
-
interface InputThemeContextParams {
|
|
38
|
-
ui: ComputedRef<InputUi>;
|
|
39
|
-
}
|
|
35
|
+
type InputUiSlot = 'root' | 'control';
|
|
36
|
+
type InputUi = UiClass<InputUiSlot>;
|
|
40
37
|
//#endregion
|
|
41
|
-
export { InputBaseProps, InputControlProps, InputRootEmits, InputRootProps,
|
|
38
|
+
export { InputBaseProps, InputControlProps, InputRootEmits, InputRootProps, InputUi, InputUiSlot };
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { KbdProps } from "./types.js";
|
|
2
|
-
import * as
|
|
2
|
+
import * as vue38 from "vue";
|
|
3
3
|
|
|
4
4
|
//#region src/components/kbd/kbd.vue.d.ts
|
|
5
5
|
declare var __VLS_1: {};
|
|
6
6
|
type __VLS_Slots = {} & {
|
|
7
7
|
default?: (props: typeof __VLS_1) => any;
|
|
8
8
|
};
|
|
9
|
-
declare const __VLS_base:
|
|
9
|
+
declare const __VLS_base: vue38.DefineComponent<KbdProps, {}, {}, {}, {}, vue38.ComponentOptionsMixin, vue38.ComponentOptionsMixin, {}, string, vue38.PublicProps, Readonly<KbdProps> & Readonly<{}>, {}, {}, {}, {}, string, vue38.ComponentProvideOptions, false, {}, any>;
|
|
10
10
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
11
11
|
declare const _default: typeof __VLS_export;
|
|
12
12
|
type __VLS_WithSlots<T, S> = T & {
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { LabelProps } from "./types.js";
|
|
2
|
-
import * as
|
|
2
|
+
import * as vue28 from "vue";
|
|
3
3
|
|
|
4
4
|
//#region src/components/label/label.vue.d.ts
|
|
5
5
|
declare var __VLS_1: {};
|
|
6
6
|
type __VLS_Slots = {} & {
|
|
7
7
|
default?: (props: typeof __VLS_1) => any;
|
|
8
8
|
};
|
|
9
|
-
declare const __VLS_base:
|
|
9
|
+
declare const __VLS_base: vue28.DefineComponent<LabelProps, {}, {}, {}, {}, vue28.ComponentOptionsMixin, vue28.ComponentOptionsMixin, {}, string, vue28.PublicProps, Readonly<LabelProps> & Readonly<{}>, {}, {}, {}, {}, string, vue28.ComponentProvideOptions, false, {}, any>;
|
|
10
10
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
11
11
|
declare const _default: typeof __VLS_export;
|
|
12
12
|
type __VLS_WithSlots<T, S> = T & {
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import "
|
|
1
|
+
import { ClassValue, UiClass } from "../../types/common.js";
|
|
2
|
+
import { LayoutUiSlot } from "./types.js";
|
|
3
|
+
import "../../index.js";
|
|
4
|
+
import * as vue1257 from "vue";
|
|
3
5
|
|
|
4
6
|
//#region src/components/layout/context.d.ts
|
|
5
7
|
|
|
6
|
-
declare const
|
|
8
|
+
declare const provideLayoutUi: (ui: vue1257.ComputedRef<Partial<UiClass<LayoutUiSlot>>>) => vue1257.ComputedRef<Partial<UiClass<LayoutUiSlot>>>, useLayoutUi: <S extends LayoutUiSlot | undefined = undefined>(slot?: S | undefined) => S extends LayoutUiSlot ? vue1257.ComputedRef<ClassValue> : vue1257.ComputedRef<Partial<UiClass<LayoutUiSlot>>>;
|
|
7
9
|
//#endregion
|
|
8
|
-
export {
|
|
10
|
+
export { provideLayoutUi };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{useContext as e}from"../../composables/use-context.js";const[
|
|
1
|
+
import{useContext as e}from"../../composables/use-context.js";import{useUiContext as t}from"../../composables/use-ui-context.js";const[n,r]=e(`LayoutRoot`,e=>{let{open:t,isMobile:n,mobileOpen:r}=e,i=e=>{t.value=e},a=e=>{r.value=e},o=()=>{n.value?r.value=!r.value:t.value=!t.value};return{...e,onOpenChange:i,onMobileOpenChange:a,toggleSidebar:o}}),[i,a]=t(`LayoutUi`);export{n as provideLayoutRootContext,i as provideLayoutUi,r as useLayoutRootContext,a as useLayoutUi};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { LayoutCollapsible, LayoutFooterProps, LayoutHeaderProps, LayoutMainProps, LayoutMobileProps, LayoutRailProps, LayoutRootEmits, LayoutRootProps, LayoutSide, LayoutSidebarProps, LayoutSidebarState, LayoutTabProps,
|
|
1
|
+
import { LayoutCollapsible, LayoutFooterProps, LayoutHeaderProps, LayoutMainProps, LayoutMobileProps, LayoutRailProps, LayoutRootEmits, LayoutRootProps, LayoutSide, LayoutSidebarProps, LayoutSidebarState, LayoutTabProps, LayoutTriggerProps, LayoutUi, LayoutUiSlot, LayoutVariant } from "./types.js";
|
|
2
2
|
import { _default as _default$5 } from "./layout-root.vue.js";
|
|
3
3
|
import { _default as _default$6 } from "./layout-sidebar.vue.js";
|
|
4
4
|
import { _default as _default$1 } from "./layout-header.vue.js";
|
|
@@ -8,5 +8,5 @@ import { _default } from "./layout-footer.vue.js";
|
|
|
8
8
|
import { _default as _default$4 } from "./layout-rail.vue.js";
|
|
9
9
|
import { _default as _default$8 } from "./layout-trigger.vue.js";
|
|
10
10
|
import { _default as _default$3 } from "./layout-mobile.vue.js";
|
|
11
|
-
import {
|
|
12
|
-
export { type LayoutCollapsible, _default as LayoutFooter, type LayoutFooterProps, _default$1 as LayoutHeader, type LayoutHeaderProps, _default$2 as LayoutMain, type LayoutMainProps, _default$3 as LayoutMobile, type LayoutMobileProps, _default$4 as LayoutRail, type LayoutRailProps, _default$5 as LayoutRoot, type LayoutRootEmits, type LayoutRootProps, type LayoutSide, _default$6 as LayoutSidebar, type LayoutSidebarProps, type LayoutSidebarState, _default$7 as LayoutTab, type LayoutTabProps,
|
|
11
|
+
import { provideLayoutUi } from "./context.js";
|
|
12
|
+
export { type LayoutCollapsible, _default as LayoutFooter, type LayoutFooterProps, _default$1 as LayoutHeader, type LayoutHeaderProps, _default$2 as LayoutMain, type LayoutMainProps, _default$3 as LayoutMobile, type LayoutMobileProps, _default$4 as LayoutRail, type LayoutRailProps, _default$5 as LayoutRoot, type LayoutRootEmits, type LayoutRootProps, type LayoutSide, _default$6 as LayoutSidebar, type LayoutSidebarProps, type LayoutSidebarState, _default$7 as LayoutTab, type LayoutTabProps, _default$8 as LayoutTrigger, type LayoutTriggerProps, type LayoutUi, type LayoutUiSlot, type LayoutVariant, provideLayoutUi };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{provideLayoutUi as e}from"./context.js";import t from"./layout-root.js";import n from"./layout-mobile.js";import r from"./layout-sidebar.js";import i from"./layout-header.js";import a from"./layout-main.js";import o from"./layout-tab.js";import s from"./layout-footer.js";import c from"./layout-rail.js";import l from"./layout-trigger.js";export{s as LayoutFooter,i as LayoutHeader,a as LayoutMain,n as LayoutMobile,c as LayoutRail,t as LayoutRoot,r as LayoutSidebar,o as LayoutTab,l as LayoutTrigger,e as provideLayoutUi};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{useLayoutUi as e}from"./context.js";import{createElementBlock as t,defineComponent as n,normalizeClass as r,openBlock as i,renderSlot as a,unref as o}from"vue";var s=n({name:`LayoutFooter`,__name:`layout-footer`,setup(n){let s=e(`footer`);return(e,n)=>(i(),t(`div`,{class:r(o(s))},[a(e.$slots,`default`)],2))}});export{s as default};
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { LayoutFooterProps } from "./types.js";
|
|
2
|
-
import * as
|
|
2
|
+
import * as vue1237 from "vue";
|
|
3
3
|
|
|
4
4
|
//#region src/components/layout/layout-footer.vue.d.ts
|
|
5
5
|
declare var __VLS_1: {};
|
|
6
6
|
type __VLS_Slots = {} & {
|
|
7
7
|
default?: (props: typeof __VLS_1) => any;
|
|
8
8
|
};
|
|
9
|
-
declare const __VLS_base:
|
|
9
|
+
declare const __VLS_base: vue1237.DefineComponent<LayoutFooterProps, {}, {}, {}, {}, vue1237.ComponentOptionsMixin, vue1237.ComponentOptionsMixin, {}, string, vue1237.PublicProps, Readonly<LayoutFooterProps> & Readonly<{}>, {}, {}, {}, {}, string, vue1237.ComponentProvideOptions, false, {}, any>;
|
|
10
10
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
11
11
|
declare const _default: typeof __VLS_export;
|
|
12
12
|
type __VLS_WithSlots<T, S> = T & {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{useLayoutUi as e}from"./context.js";import{createElementBlock as t,defineComponent as n,normalizeClass as r,openBlock as i,renderSlot as a,unref as o}from"vue";var s=n({name:`LayoutHeader`,__name:`layout-header`,setup(n){let s=e(`header`);return(e,n)=>(i(),t(`header`,{class:r(o(s))},[a(e.$slots,`default`)],2))}});export{s as default};
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { LayoutHeaderProps } from "./types.js";
|
|
2
|
-
import * as
|
|
2
|
+
import * as vue1222 from "vue";
|
|
3
3
|
|
|
4
4
|
//#region src/components/layout/layout-header.vue.d.ts
|
|
5
5
|
declare var __VLS_1: {};
|
|
6
6
|
type __VLS_Slots = {} & {
|
|
7
7
|
default?: (props: typeof __VLS_1) => any;
|
|
8
8
|
};
|
|
9
|
-
declare const __VLS_base:
|
|
9
|
+
declare const __VLS_base: vue1222.DefineComponent<LayoutHeaderProps, {}, {}, {}, {}, vue1222.ComponentOptionsMixin, vue1222.ComponentOptionsMixin, {}, string, vue1222.PublicProps, Readonly<LayoutHeaderProps> & Readonly<{}>, {}, {}, {}, {}, string, vue1222.ComponentProvideOptions, false, {}, any>;
|
|
10
10
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
11
11
|
declare const _default: typeof __VLS_export;
|
|
12
12
|
type __VLS_WithSlots<T, S> = T & {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{useLayoutUi as e}from"./context.js";import{createElementBlock as t,defineComponent as n,normalizeClass as r,openBlock as i,renderSlot as a,unref as o}from"vue";var s=n({name:`LayoutMain`,__name:`layout-main`,setup(n){let s=e(`main`);return(e,n)=>(i(),t(`main`,{class:r(o(s))},[a(e.$slots,`default`)],2))}});export{s as default};
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { LayoutMainProps } from "./types.js";
|
|
2
|
-
import * as
|
|
2
|
+
import * as vue1227 from "vue";
|
|
3
3
|
|
|
4
4
|
//#region src/components/layout/layout-main.vue.d.ts
|
|
5
5
|
declare var __VLS_1: {};
|
|
6
6
|
type __VLS_Slots = {} & {
|
|
7
7
|
default?: (props: typeof __VLS_1) => any;
|
|
8
8
|
};
|
|
9
|
-
declare const __VLS_base:
|
|
9
|
+
declare const __VLS_base: vue1227.DefineComponent<LayoutMainProps, {}, {}, {}, {}, vue1227.ComponentOptionsMixin, vue1227.ComponentOptionsMixin, {}, string, vue1227.PublicProps, Readonly<LayoutMainProps> & Readonly<{}>, {}, {}, {}, {}, string, vue1227.ComponentProvideOptions, false, {}, any>;
|
|
10
10
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
11
11
|
declare const _default: typeof __VLS_export;
|
|
12
12
|
type __VLS_WithSlots<T, S> = T & {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"../portal/portal.js";import t from"../dialog/dialog-root.js";import n from"../dialog/dialog-overlay.js";import r from"../dialog/dialog-content.js";import{useLayoutRootContext as i,
|
|
1
|
+
import e from"../portal/portal.js";import t from"../dialog/dialog-root.js";import n from"../dialog/dialog-overlay.js";import r from"../dialog/dialog-content.js";import{useLayoutRootContext as i,useLayoutUi as a}from"./context.js";import{layoutCssVars as o}from"./shared.js";import{computed as s,createBlock as c,createElementVNode as l,createVNode as u,defineComponent as d,mergeProps as f,normalizeClass as p,normalizeStyle as m,openBlock as h,renderSlot as g,unref as _,useAttrs as v,withCtx as y}from"vue";var b=d({name:`LayoutMobile`,inheritAttrs:!1,__name:`layout-mobile`,setup(d){let b=v(),{mobileOpen:x,mobileSidebarWidth:S,onMobileOpenChange:C}=i(`LayoutMobile`),w=a(),T=s(()=>({[o.sidebarWidth]:`${S.value}rem`}));return(i,a)=>(h(),c(_(t),{open:_(x),"onUpdate:open":_(C)},{default:y(()=>[u(_(e),null,{default:y(()=>[u(_(n),{class:p(_(w).mobileOverlay)},null,8,[`class`]),u(_(r),{class:p(_(w).mobileDrawer),style:m(T.value)},{default:y(()=>[l(`div`,f(_(b),{class:_(w).mobile,"data-sidebar":`sidebar`,"data-mobile":``}),[g(i.$slots,`default`)],16)]),_:3},8,[`class`,`style`])]),_:3})]),_:3},8,[`open`,`onUpdate:open`]))}});export{b as default};
|