@soybeanjs/headless 0.17.0 → 0.18.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/README.md +10 -5
- package/README.zh-CN.md +10 -5
- package/dist/components/_icon/types.d.ts +2 -2
- package/dist/components/accordion/types.d.ts +19 -19
- package/dist/components/affix/types.d.ts +12 -12
- package/dist/components/alert/types.d.ts +15 -15
- package/dist/components/anchor/anchor-root.vue.d.ts +1 -1
- package/dist/components/anchor/types.d.ts +19 -19
- package/dist/components/arrow/types.d.ts +1 -1
- package/dist/components/aspect-ratio/types.d.ts +1 -1
- package/dist/components/autocomplete/autocomplete-compact.vue.d.ts +2 -2
- package/dist/components/autocomplete/autocomplete-root.vue.d.ts +4 -4
- package/dist/components/autocomplete/types.d.ts +23 -23
- package/dist/components/avatar/avatar-compact.js +1 -0
- package/dist/components/avatar/avatar-compact.vue.d.ts +20 -0
- 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/index.d.ts +6 -5
- package/dist/components/avatar/index.js +1 -1
- package/dist/components/avatar/types.d.ts +38 -7
- package/dist/components/backtop/backtop.vue.d.ts +3 -3
- package/dist/components/backtop/types.d.ts +5 -5
- package/dist/components/badge/badge-compact.js +1 -0
- package/dist/components/badge/badge-compact.vue.d.ts +21 -0
- package/dist/components/badge/badge-content.js +1 -1
- package/dist/components/badge/badge-root.js +1 -1
- package/dist/components/badge/index.d.ts +5 -4
- package/dist/components/badge/index.js +1 -1
- package/dist/components/badge/types.d.ts +26 -6
- package/dist/components/bottom-sheet/bottom-sheet-root-nested.vue.d.ts +2 -2
- package/dist/components/bottom-sheet/types.d.ts +13 -13
- package/dist/components/breadcrumb/types.d.ts +21 -21
- package/dist/components/button/button.js +1 -1
- package/dist/components/button/button.vue.d.ts +2 -2
- package/dist/components/button/types.d.ts +4 -4
- package/dist/components/calendar/types.d.ts +32 -32
- package/dist/components/card/card-root.vue.d.ts +1 -1
- package/dist/components/card/types.d.ts +20 -20
- package/dist/components/carousel/carousel-compact.js +1 -0
- package/dist/components/carousel/carousel-compact.vue.d.ts +23 -0
- package/dist/components/carousel/carousel-container.js +1 -0
- package/dist/components/carousel/carousel-container.vue.d.ts +18 -0
- package/dist/components/carousel/carousel-content.js +1 -1
- package/dist/components/carousel/carousel-control.js +1 -0
- package/dist/components/carousel/carousel-control.vue.d.ts +18 -0
- package/dist/components/carousel/carousel-item.js +1 -1
- package/dist/components/carousel/carousel-navigation.js +1 -0
- package/dist/components/carousel/carousel-navigation.vue.d.ts +18 -0
- package/dist/components/carousel/carousel-next.js +1 -1
- package/dist/components/carousel/carousel-next.vue.d.ts +2 -12
- package/dist/components/carousel/carousel-previous.js +1 -1
- package/dist/components/carousel/carousel-previous.vue.d.ts +2 -12
- package/dist/components/carousel/carousel-root.js +1 -1
- package/dist/components/carousel/carousel-root.vue.d.ts +6 -28
- package/dist/components/carousel/context.d.ts +0 -1
- package/dist/components/carousel/context.js +1 -1
- package/dist/components/carousel/hooks.js +1 -0
- package/dist/components/carousel/index.d.ts +11 -9
- package/dist/components/carousel/index.js +1 -1
- package/dist/components/carousel/types.d.ts +121 -29
- package/dist/components/checkbox/types.d.ts +27 -27
- package/dist/components/clipboard/clipboard.vue.d.ts +2 -2
- package/dist/components/clipboard/types.d.ts +5 -5
- package/dist/components/collapsible/collapsible-root.vue.d.ts +1 -1
- package/dist/components/collapsible/types.d.ts +6 -6
- package/dist/components/color-area/color-area-root.vue.d.ts +1 -1
- package/dist/components/color-area/types.d.ts +7 -7
- package/dist/components/color-field/color-field-root.vue.d.ts +1 -1
- package/dist/components/color-field/types.d.ts +5 -5
- package/dist/components/color-picker/types.d.ts +3 -3
- package/dist/components/color-slider/color-slider-root.vue.d.ts +2 -2
- package/dist/components/color-slider/types.d.ts +6 -6
- package/dist/components/color-swatch/types.d.ts +1 -1
- package/dist/components/color-swatch-picker/color-swatch-picker-root.vue.d.ts +2 -2
- package/dist/components/color-swatch-picker/types.d.ts +8 -8
- package/dist/components/combobox/combobox-compact.vue.d.ts +2 -2
- package/dist/components/combobox/combobox-content.vue.d.ts +1 -1
- package/dist/components/combobox/combobox-root.vue.d.ts +2 -2
- package/dist/components/combobox/types.d.ts +42 -42
- package/dist/components/command/command-compact.vue.d.ts +2 -2
- package/dist/components/command/types.d.ts +25 -25
- package/dist/components/config-provider/config-provider.js +12 -0
- package/dist/components/config-provider/config-provider.vue.d.ts +1 -1
- package/dist/components/config-provider/types.d.ts +1 -1
- package/dist/components/context-menu/context-menu-checkbox-compact.vue.d.ts +2 -2
- package/dist/components/context-menu/context-menu-compact.vue.d.ts +2 -2
- 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 +2 -2
- package/dist/components/context-menu/context-menu-wrapper-compact.vue.d.ts +2 -2
- package/dist/components/context-menu/types.d.ts +21 -21
- package/dist/components/date-field/date-field-root.vue.d.ts +2 -2
- package/dist/components/date-field/types.d.ts +10 -10
- package/dist/components/date-picker/date-picker-compact.vue.d.ts +2 -2
- package/dist/components/date-picker/date-picker-root.vue.d.ts +7 -7
- package/dist/components/date-picker/types.d.ts +18 -18
- package/dist/components/date-range-field/date-range-field-root.vue.d.ts +2 -2
- package/dist/components/date-range-field/types.d.ts +11 -11
- package/dist/components/date-range-picker/date-range-picker-compact.vue.d.ts +2 -2
- package/dist/components/date-range-picker/date-range-picker-root.vue.d.ts +7 -7
- package/dist/components/date-range-picker/types.d.ts +12 -12
- package/dist/components/dialog/dialog-compact.vue.d.ts +5 -5
- package/dist/components/dialog/types.d.ts +40 -40
- package/dist/components/dropdown-menu/dropdown-menu-checkbox-compact.vue.d.ts +2 -2
- package/dist/components/dropdown-menu/dropdown-menu-compact.vue.d.ts +2 -2
- 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 +2 -2
- package/dist/components/dropdown-menu/dropdown-menu-root.vue.d.ts +1 -1
- package/dist/components/dropdown-menu/dropdown-menu-wrapper-compact.vue.d.ts +2 -2
- package/dist/components/dropdown-menu/types.d.ts +21 -21
- package/dist/components/editable/types.d.ts +25 -25
- package/dist/components/empty/empty-compact.js +1 -0
- package/dist/components/empty/empty-compact.vue.d.ts +15 -0
- 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/index.d.ts +9 -8
- package/dist/components/empty/index.js +1 -1
- package/dist/components/empty/types.d.ts +72 -9
- package/dist/components/form/context.d.ts +3 -2
- package/dist/components/form/context.js +1 -1
- package/dist/components/form/core/types.d.ts +24 -24
- package/dist/components/form/core/use-form.js +1 -1
- package/dist/components/form/form-compact.js +1 -0
- package/dist/components/form/form-compact.vue.d.ts +21 -0
- 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 -0
- package/dist/components/form/form-field-array-compact.vue.d.ts +16 -0
- package/dist/components/form/form-field-base-compact.js +1 -0
- package/dist/components/form/form-field-base-compact.vue.d.ts +26 -0
- package/dist/components/form/form-field-compact.js +1 -0
- package/dist/components/form/form-field-compact.vue.d.ts +16 -0
- package/dist/components/form/form-field.js +1 -1
- package/dist/components/form/form-label.js +1 -1
- package/dist/components/form/index.d.ts +14 -10
- package/dist/components/form/index.js +1 -1
- package/dist/components/form/shared.js +1 -0
- package/dist/components/form/types.d.ts +129 -10
- package/dist/components/form/use-form.d.ts +8 -0
- package/dist/components/form/use-form.js +1 -0
- package/dist/components/hover-card/hover-card-compact.vue.d.ts +1 -1
- package/dist/components/hover-card/hover-card-root.vue.d.ts +1 -1
- package/dist/components/hover-card/types.d.ts +15 -15
- package/dist/components/input/index.d.ts +6 -4
- package/dist/components/input/index.js +1 -1
- package/dist/components/input/input-clear.js +1 -0
- package/dist/components/input/input-clear.vue.d.ts +22 -0
- package/dist/components/input/input-compact.js +1 -0
- package/dist/components/input/input-compact.vue.d.ts +21 -0
- package/dist/components/input/input-control.js +1 -1
- package/dist/components/input/input-root.js +1 -1
- package/dist/components/input/types.d.ts +79 -8
- package/dist/components/input-number/input-number-root.vue.d.ts +1 -1
- package/dist/components/input-number/types.d.ts +7 -7
- package/dist/components/input-otp/input-otp-compact.vue.d.ts +4 -4
- package/dist/components/input-otp/input-otp-root.vue.d.ts +4 -4
- package/dist/components/input-otp/types.d.ts +14 -14
- package/dist/components/kbd/types.d.ts +2 -2
- package/dist/components/label/types.d.ts +1 -1
- package/dist/components/layout/layout-classic-compact.vue.d.ts +1 -1
- package/dist/components/layout/layout-compact.vue.d.ts +1 -1
- package/dist/components/layout/layout-root.vue.d.ts +1 -1
- package/dist/components/layout/types.d.ts +28 -28
- package/dist/components/link/types.d.ts +4 -4
- package/dist/components/list/types.d.ts +7 -7
- package/dist/components/listbox/listbox-root.vue.d.ts +2 -2
- package/dist/components/listbox/types.d.ts +16 -16
- package/dist/components/menu/menu-content.vue.d.ts +2 -2
- 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-sub-content.vue.d.ts +2 -2
- package/dist/components/menu/types.d.ts +68 -68
- package/dist/components/menubar/menubar-compact.vue.d.ts +2 -2
- package/dist/components/menubar/menubar-content.vue.d.ts +2 -2
- package/dist/components/menubar/menubar-sub-content.vue.d.ts +2 -2
- package/dist/components/menubar/types.d.ts +19 -19
- package/dist/components/month-picker/month-picker-root.vue.d.ts +5 -5
- package/dist/components/month-picker/types.d.ts +7 -7
- package/dist/components/month-range-picker/month-range-picker-root.vue.d.ts +5 -5
- package/dist/components/month-range-picker/types.d.ts +7 -7
- package/dist/components/navigation-menu/types.d.ts +31 -31
- package/dist/components/page-tabs/types.d.ts +8 -8
- package/dist/components/pagination/types.d.ts +21 -21
- package/dist/components/popover/popover-compact.vue.d.ts +1 -1
- package/dist/components/popover/types.d.ts +20 -20
- package/dist/components/popper/popper-positioner.vue.d.ts +1 -1
- package/dist/components/popper/types.d.ts +7 -7
- package/dist/components/portal/types.d.ts +1 -1
- package/dist/components/primitive/types.d.ts +2 -2
- package/dist/components/progress/types.d.ts +11 -11
- package/dist/components/radio-group/types.d.ts +16 -16
- package/dist/components/range-calendar/range-calendar-root.vue.d.ts +2 -2
- package/dist/components/range-calendar/types.d.ts +30 -30
- package/dist/components/roving-focus/roving-focus-group.vue.d.ts +1 -1
- package/dist/components/roving-focus/types.d.ts +3 -3
- package/dist/components/scroll-area/types.d.ts +10 -10
- package/dist/components/segment/types.d.ts +8 -8
- package/dist/components/select/select-content.vue.d.ts +2 -2
- package/dist/components/select/types.d.ts +51 -51
- package/dist/components/separator/types.d.ts +4 -4
- package/dist/components/skeleton/types.d.ts +1 -1
- package/dist/components/slider/slider-root.vue.d.ts +1 -1
- package/dist/components/slider/types.d.ts +10 -10
- package/dist/components/splitter/splitter-group.vue.d.ts +1 -1
- package/dist/components/splitter/splitter-panel.vue.d.ts +2 -2
- package/dist/components/splitter/types.d.ts +11 -11
- package/dist/components/stepper/types.d.ts +21 -21
- package/dist/components/switch/types.d.ts +7 -7
- package/dist/components/table/types.d.ts +67 -67
- package/dist/components/tabs/types.d.ts +17 -17
- package/dist/components/tag/types.d.ts +2 -2
- package/dist/components/tags-input/tags-input-root.vue.d.ts +2 -2
- package/dist/components/tags-input/types.d.ts +10 -10
- package/dist/components/textarea/types.d.ts +8 -8
- package/dist/components/time-field/time-field-root.vue.d.ts +1 -1
- package/dist/components/time-field/types.d.ts +7 -7
- package/dist/components/time-picker/time-picker-root.vue.d.ts +6 -6
- package/dist/components/time-picker/types.d.ts +7 -7
- package/dist/components/time-range-field/time-range-field-root.vue.d.ts +1 -1
- package/dist/components/time-range-field/types.d.ts +11 -11
- package/dist/components/time-range-picker/time-range-picker-compact.vue.d.ts +2 -2
- package/dist/components/time-range-picker/time-range-picker-root.vue.d.ts +6 -6
- package/dist/components/time-range-picker/types.d.ts +12 -12
- package/dist/components/toast/types.d.ts +25 -25
- package/dist/components/toggle/toggle.vue.d.ts +1 -1
- package/dist/components/toggle/types.d.ts +3 -3
- package/dist/components/toggle-group/types.d.ts +5 -5
- package/dist/components/toolbar/toolbar-button.vue.d.ts +2 -2
- package/dist/components/toolbar/types.d.ts +12 -12
- package/dist/components/tooltip/tooltip-root.vue.d.ts +1 -1
- package/dist/components/tooltip/types.d.ts +9 -9
- package/dist/components/tree/types.d.ts +13 -13
- package/dist/components/tree-menu/tree-menu-root.vue.d.ts +1 -1
- package/dist/components/tree-menu/types.d.ts +14 -14
- package/dist/components/virtualizer/types.d.ts +6 -6
- package/dist/components/visually-hidden/types.d.ts +3 -3
- package/dist/components/year-picker/types.d.ts +7 -7
- package/dist/components/year-picker/year-picker-root.vue.d.ts +5 -5
- package/dist/components/year-range-picker/types.d.ts +7 -7
- package/dist/components/year-range-picker/year-range-picker-root.vue.d.ts +5 -5
- package/dist/constants/components.js +1 -1
- package/dist/date/parts.d.ts +1 -1
- package/dist/index.d.ts +416 -405
- package/dist/index.js +1 -1
- package/dist/namespaced/index.d.ts +877 -851
- package/dist/namespaced/index.js +1 -1
- package/dist/types/common.d.ts +1 -1
- package/package.json +4 -2
- package/dist/components/form/core/use-form.d.ts +0 -7
- package/dist/node_modules/.pnpm/embla-carousel@8.6.0/node_modules/embla-carousel/esm/components/Alignment.d.ts +0 -4
- package/dist/node_modules/.pnpm/embla-carousel@8.6.0/node_modules/embla-carousel/esm/components/Animations.d.ts +0 -11
- package/dist/node_modules/.pnpm/embla-carousel@8.6.0/node_modules/embla-carousel/esm/components/Axis.d.ts +0 -16
- package/dist/node_modules/.pnpm/embla-carousel@8.6.0/node_modules/embla-carousel/esm/components/Counter.d.ts +0 -9
- package/dist/node_modules/.pnpm/embla-carousel@8.6.0/node_modules/embla-carousel/esm/components/DragHandler.d.ts +0 -13
- package/dist/node_modules/.pnpm/embla-carousel@8.6.0/node_modules/embla-carousel/esm/components/DragTracker.d.ts +0 -4
- package/dist/node_modules/.pnpm/embla-carousel@8.6.0/node_modules/embla-carousel/esm/components/EmblaCarousel.d.ts +0 -31
- package/dist/node_modules/.pnpm/embla-carousel@8.6.0/node_modules/embla-carousel/esm/components/Engine.d.ts +0 -67
- package/dist/node_modules/.pnpm/embla-carousel@8.6.0/node_modules/embla-carousel/esm/components/EventHandler.d.ts +0 -29
- package/dist/node_modules/.pnpm/embla-carousel@8.6.0/node_modules/embla-carousel/esm/components/EventStore.d.ts +0 -10
- package/dist/node_modules/.pnpm/embla-carousel@8.6.0/node_modules/embla-carousel/esm/components/Limit.d.ts +0 -13
- package/dist/node_modules/.pnpm/embla-carousel@8.6.0/node_modules/embla-carousel/esm/components/NodeRects.d.ts +0 -11
- package/dist/node_modules/.pnpm/embla-carousel@8.6.0/node_modules/embla-carousel/esm/components/Options.d.ts +0 -43
- package/dist/node_modules/.pnpm/embla-carousel@8.6.0/node_modules/embla-carousel/esm/components/OptionsHandler.d.ts +0 -11
- package/dist/node_modules/.pnpm/embla-carousel@8.6.0/node_modules/embla-carousel/esm/components/PercentOfView.d.ts +0 -6
- package/dist/node_modules/.pnpm/embla-carousel@8.6.0/node_modules/embla-carousel/esm/components/Plugins.d.ts +0 -20
- package/dist/node_modules/.pnpm/embla-carousel@8.6.0/node_modules/embla-carousel/esm/components/ResizeHandler.d.ts +0 -11
- package/dist/node_modules/.pnpm/embla-carousel@8.6.0/node_modules/embla-carousel/esm/components/ScrollBody.d.ts +0 -14
- package/dist/node_modules/.pnpm/embla-carousel@8.6.0/node_modules/embla-carousel/esm/components/ScrollBounds.d.ts +0 -8
- package/dist/node_modules/.pnpm/embla-carousel@8.6.0/node_modules/embla-carousel/esm/components/ScrollContain.d.ts +0 -4
- package/dist/node_modules/.pnpm/embla-carousel@8.6.0/node_modules/embla-carousel/esm/components/ScrollLooper.d.ts +0 -6
- package/dist/node_modules/.pnpm/embla-carousel@8.6.0/node_modules/embla-carousel/esm/components/ScrollProgress.d.ts +0 -6
- package/dist/node_modules/.pnpm/embla-carousel@8.6.0/node_modules/embla-carousel/esm/components/ScrollTarget.d.ts +0 -12
- package/dist/node_modules/.pnpm/embla-carousel@8.6.0/node_modules/embla-carousel/esm/components/ScrollTo.d.ts +0 -7
- package/dist/node_modules/.pnpm/embla-carousel@8.6.0/node_modules/embla-carousel/esm/components/SlideFocus.d.ts +0 -10
- package/dist/node_modules/.pnpm/embla-carousel@8.6.0/node_modules/embla-carousel/esm/components/SlideLooper.d.ts +0 -19
- package/dist/node_modules/.pnpm/embla-carousel@8.6.0/node_modules/embla-carousel/esm/components/SlideRegistry.d.ts +0 -6
- package/dist/node_modules/.pnpm/embla-carousel@8.6.0/node_modules/embla-carousel/esm/components/SlidesHandler.d.ts +0 -11
- package/dist/node_modules/.pnpm/embla-carousel@8.6.0/node_modules/embla-carousel/esm/components/SlidesInView.d.ts +0 -9
- package/dist/node_modules/.pnpm/embla-carousel@8.6.0/node_modules/embla-carousel/esm/components/SlidesToScroll.d.ts +0 -7
- package/dist/node_modules/.pnpm/embla-carousel@8.6.0/node_modules/embla-carousel/esm/components/Translate.d.ts +0 -8
- package/dist/node_modules/.pnpm/embla-carousel@8.6.0/node_modules/embla-carousel/esm/components/Vector1d.d.ts +0 -9
- package/dist/node_modules/.pnpm/embla-carousel@8.6.0/node_modules/embla-carousel/esm/components/utils.d.ts +0 -4
package/README.md
CHANGED
|
@@ -13,6 +13,8 @@ A collection of unstyled, accessible UI primitives for Vue 3.
|
|
|
13
13
|
|
|
14
14
|
Some multi-slot components also expose `Compact` aggregators, such as `AccordionCompact` and `TableCompact`. These headless entry points own item iteration and default content/icon composition, while styled wrappers stay focused on classes and prop forwarding.
|
|
15
15
|
|
|
16
|
+
Current Compact coverage also includes stable structures such as card, date-field, dialog, editable, hover-card, layout, navigation-menu, pagination, popover, and stepper.
|
|
17
|
+
|
|
16
18
|
## 📦 Installation
|
|
17
19
|
|
|
18
20
|
```bash
|
|
@@ -63,27 +65,30 @@ import {
|
|
|
63
65
|
|
|
64
66
|
```
|
|
65
67
|
headless/src/
|
|
66
|
-
├── components/ #
|
|
67
|
-
├── composables/ #
|
|
68
|
+
├── components/ # 95 component dirs (accordion, dialog, select…)
|
|
69
|
+
├── composables/ # 25 shared hooks (state, focus, floating, selection…)
|
|
68
70
|
├── shared/ # Pure TS utilities (DOM, focus, tree, form, guard)
|
|
69
71
|
├── constants/ # ARIA attributes, component keys
|
|
72
|
+
├── date/ # Shared date and calendar helpers
|
|
70
73
|
├── types/ # Global types (ClassValue, UiClass, PropsToContext…)
|
|
71
|
-
└── index.ts
|
|
74
|
+
└── index.ts # Main barrel export
|
|
72
75
|
```
|
|
73
76
|
|
|
74
77
|
### Sub-path Exports
|
|
75
78
|
|
|
76
79
|
```ts
|
|
77
80
|
import { AccordionRoot } from '@soybeanjs/headless'; // components + types
|
|
78
|
-
import { useControllableState } from '@soybeanjs/headless/composables'; //
|
|
81
|
+
import { useControllableState } from '@soybeanjs/headless/composables'; // 25 composables
|
|
79
82
|
import { transformPropsToContext } from '@soybeanjs/headless/shared'; // pure TS utils
|
|
83
|
+
import { createMonth } from '@soybeanjs/headless/date'; // shared date helpers
|
|
80
84
|
import * as H from '@soybeanjs/headless/namespaced'; // namespace object
|
|
81
85
|
import type { AccordionUiSlot } from '@soybeanjs/headless/accordion'; // per-component
|
|
86
|
+
import type { UiClass } from '@soybeanjs/headless/types'; // shared type surface
|
|
82
87
|
```
|
|
83
88
|
|
|
84
89
|
## 🧩 Composables
|
|
85
90
|
|
|
86
|
-
|
|
91
|
+
25 hooks organized by category:
|
|
87
92
|
|
|
88
93
|
| Category | Composables |
|
|
89
94
|
| ------------- | -------------------------------------------------------------- |
|
package/README.zh-CN.md
CHANGED
|
@@ -13,6 +13,8 @@
|
|
|
13
13
|
|
|
14
14
|
部分多插槽组件还会暴露 `Compact` 聚合层,例如 `AccordionCompact` 和 `TableCompact`。这些 headless 入口负责条目遍历以及默认内容 / 图标组合,而样式包装层只专注于类名和 props 转发。
|
|
15
15
|
|
|
16
|
+
目前这类 Compact 约定式组合还覆盖了 card、date-field、dialog、editable、hover-card、layout、navigation-menu、pagination、popover、stepper 等稳定结构。
|
|
17
|
+
|
|
16
18
|
## 📦 安装
|
|
17
19
|
|
|
18
20
|
```bash
|
|
@@ -63,27 +65,30 @@ import {
|
|
|
63
65
|
|
|
64
66
|
```
|
|
65
67
|
headless/src/
|
|
66
|
-
├── components/ #
|
|
67
|
-
├── composables/ #
|
|
68
|
+
├── components/ # 95 个组件目录(accordion、dialog、select…)
|
|
69
|
+
├── composables/ # 25 个共享 hook(状态、焦点、浮层、选择…)
|
|
68
70
|
├── shared/ # 纯 TS 工具函数(DOM、焦点、树、表单、守卫)
|
|
69
71
|
├── constants/ # ARIA 属性常量、组件标识键
|
|
72
|
+
├── date/ # 共享日期与日历工具
|
|
70
73
|
├── types/ # 全局类型(ClassValue、UiClass、PropsToContext…)
|
|
71
|
-
└── index.ts
|
|
74
|
+
└── index.ts # 主 barrel 导出
|
|
72
75
|
```
|
|
73
76
|
|
|
74
77
|
### 子路径导出
|
|
75
78
|
|
|
76
79
|
```ts
|
|
77
80
|
import { AccordionRoot } from '@soybeanjs/headless'; // 组件 + 类型
|
|
78
|
-
import { useControllableState } from '@soybeanjs/headless/composables'; //
|
|
81
|
+
import { useControllableState } from '@soybeanjs/headless/composables'; // 25 个 composable
|
|
79
82
|
import { transformPropsToContext } from '@soybeanjs/headless/shared'; // 纯 TS 工具
|
|
83
|
+
import { createMonth } from '@soybeanjs/headless/date'; // 日期工具
|
|
80
84
|
import * as H from '@soybeanjs/headless/namespaced'; // 命名空间导入
|
|
81
85
|
import type { AccordionUiSlot } from '@soybeanjs/headless/accordion'; // 单组件类型
|
|
86
|
+
import type { UiClass } from '@soybeanjs/headless/types'; // 共享类型导出
|
|
82
87
|
```
|
|
83
88
|
|
|
84
89
|
## 🧩 Composables
|
|
85
90
|
|
|
86
|
-
|
|
91
|
+
25 个 hook,按功能分类:
|
|
87
92
|
|
|
88
93
|
| 分类 | Composables |
|
|
89
94
|
| -------- | -------------------------------------------------------------- |
|
|
@@ -2,11 +2,11 @@ import { Component, VNode } from "vue";
|
|
|
2
2
|
|
|
3
3
|
//#region src/components/_icon/types.d.ts
|
|
4
4
|
/**
|
|
5
|
-
* Type information for
|
|
5
|
+
* Type information for IconValue.
|
|
6
6
|
*/
|
|
7
7
|
type IconValue = VNode | Component | string | null | undefined;
|
|
8
8
|
/**
|
|
9
|
-
*
|
|
9
|
+
* Properties for the Icon component.
|
|
10
10
|
*/
|
|
11
11
|
interface IconProps {
|
|
12
12
|
/**
|
|
@@ -5,7 +5,7 @@ import { ComputedRef, HTMLAttributes, ShallowRef } from "vue";
|
|
|
5
5
|
|
|
6
6
|
//#region src/components/accordion/types.d.ts
|
|
7
7
|
/**
|
|
8
|
-
*
|
|
8
|
+
* Properties for the AccordionRoot component.
|
|
9
9
|
*/
|
|
10
10
|
interface AccordionRootProps<M extends boolean = false> extends SelectionProps<M>, /** @vue-ignore */HTMLAttributes {
|
|
11
11
|
/**
|
|
@@ -42,34 +42,34 @@ interface AccordionRootProps<M extends boolean = false> extends SelectionProps<M
|
|
|
42
42
|
unmountOnHide?: boolean;
|
|
43
43
|
}
|
|
44
44
|
/**
|
|
45
|
-
*
|
|
45
|
+
* Events for the AccordionRoot component.
|
|
46
46
|
*/
|
|
47
47
|
type AccordionRootEmits<M extends boolean = false> = SelectionEmits<M>;
|
|
48
48
|
/**
|
|
49
|
-
*
|
|
49
|
+
* Properties for the AccordionItem component.
|
|
50
50
|
*/
|
|
51
51
|
interface AccordionItemProps extends Omit<CollapsibleRootProps, 'open' | 'defaultOpen' | 'onOpenChange'> {
|
|
52
52
|
/** Value of the accordion item. All items within an accordion should use a unique value. */
|
|
53
53
|
value: string;
|
|
54
54
|
}
|
|
55
55
|
/**
|
|
56
|
-
*
|
|
56
|
+
* Properties for the AccordionHeader component.
|
|
57
57
|
*/
|
|
58
58
|
interface AccordionHeaderProps extends /** @vue-ignore */HTMLAttributes {}
|
|
59
59
|
/**
|
|
60
|
-
*
|
|
60
|
+
* Properties for the AccordionTrigger component.
|
|
61
61
|
*/
|
|
62
62
|
interface AccordionTriggerProps extends CollapsibleTriggerProps {}
|
|
63
63
|
/**
|
|
64
|
-
*
|
|
64
|
+
* Properties for the AccordionContent component.
|
|
65
65
|
*/
|
|
66
66
|
interface AccordionContentProps extends CollapsibleContentProps {}
|
|
67
67
|
/**
|
|
68
|
-
*
|
|
68
|
+
* Properties for the AccordionDescription component.
|
|
69
69
|
*/
|
|
70
70
|
interface AccordionDescriptionProps extends /** @vue-ignore */HTMLAttributes {}
|
|
71
71
|
/**
|
|
72
|
-
* Option data for the
|
|
72
|
+
* Option data for the Accordion component.
|
|
73
73
|
*/
|
|
74
74
|
interface AccordionOptionData extends Pick<AccordionItemProps, 'value' | 'disabled'> {
|
|
75
75
|
/** The title of the accordion item. */
|
|
@@ -82,7 +82,7 @@ interface AccordionOptionData extends Pick<AccordionItemProps, 'value' | 'disabl
|
|
|
82
82
|
icon?: IconValue;
|
|
83
83
|
}
|
|
84
84
|
/**
|
|
85
|
-
*
|
|
85
|
+
* Properties for the AccordionCompact component.
|
|
86
86
|
*/
|
|
87
87
|
interface AccordionCompactProps<T extends AccordionOptionData = AccordionOptionData, M extends boolean = false> extends AccordionRootProps<M> {
|
|
88
88
|
/**
|
|
@@ -90,32 +90,32 @@ interface AccordionCompactProps<T extends AccordionOptionData = AccordionOptionD
|
|
|
90
90
|
*/
|
|
91
91
|
items: T[];
|
|
92
92
|
/**
|
|
93
|
-
*
|
|
93
|
+
* Properties forwarded to the item element.
|
|
94
94
|
*/
|
|
95
95
|
itemProps?: AccordionItemProps;
|
|
96
96
|
/**
|
|
97
|
-
*
|
|
97
|
+
* Properties forwarded to the header element.
|
|
98
98
|
*/
|
|
99
99
|
headerProps?: AccordionHeaderProps;
|
|
100
100
|
/**
|
|
101
|
-
*
|
|
101
|
+
* Properties forwarded to the trigger element.
|
|
102
102
|
*/
|
|
103
103
|
triggerProps?: AccordionTriggerProps;
|
|
104
104
|
/**
|
|
105
|
-
*
|
|
105
|
+
* Properties forwarded to the content element.
|
|
106
106
|
*/
|
|
107
107
|
contentProps?: AccordionContentProps;
|
|
108
108
|
/**
|
|
109
|
-
*
|
|
109
|
+
* Properties forwarded to the description element.
|
|
110
110
|
*/
|
|
111
111
|
descriptionProps?: AccordionDescriptionProps;
|
|
112
112
|
}
|
|
113
113
|
/**
|
|
114
|
-
*
|
|
114
|
+
* Events for the AccordionCompact component.
|
|
115
115
|
*/
|
|
116
116
|
type AccordionCompactEmits<M extends boolean = false> = AccordionRootEmits<M>;
|
|
117
117
|
/**
|
|
118
|
-
* Slot
|
|
118
|
+
* Slot properties for the AccordionCompact component.
|
|
119
119
|
*/
|
|
120
120
|
interface AccordionCompactSlotProps<T extends AccordionOptionData = AccordionOptionData, M extends boolean = false> {
|
|
121
121
|
/**
|
|
@@ -136,7 +136,7 @@ interface AccordionCompactSlotProps<T extends AccordionOptionData = AccordionOpt
|
|
|
136
136
|
open: boolean;
|
|
137
137
|
}
|
|
138
138
|
/**
|
|
139
|
-
* Slots for the
|
|
139
|
+
* Slots for the AccordionCompact component.
|
|
140
140
|
*/
|
|
141
141
|
type AccordionCompactSlots<T extends AccordionOptionData = AccordionOptionData, M extends boolean = false> = {
|
|
142
142
|
/**
|
|
@@ -161,11 +161,11 @@ type AccordionCompactSlots<T extends AccordionOptionData = AccordionOptionData,
|
|
|
161
161
|
content?: (props: AccordionCompactSlotProps<T, M>) => any;
|
|
162
162
|
};
|
|
163
163
|
/**
|
|
164
|
-
* Available UI slots for the
|
|
164
|
+
* Available UI slots for the Accordion component.
|
|
165
165
|
*/
|
|
166
166
|
type AccordionUiSlot = 'root' | 'item' | 'header' | 'trigger' | 'content' | 'description' | 'triggerLeadingIcon' | 'triggerIcon';
|
|
167
167
|
/**
|
|
168
|
-
* UI class overrides for the
|
|
168
|
+
* UI class overrides for the Accordion component.
|
|
169
169
|
*/
|
|
170
170
|
type AccordionUi = UiClass<AccordionUiSlot>;
|
|
171
171
|
//#endregion
|
|
@@ -3,15 +3,15 @@ import { ComputedRef, HTMLAttributes, ShallowRef } from "vue";
|
|
|
3
3
|
|
|
4
4
|
//#region src/components/affix/types.d.ts
|
|
5
5
|
/**
|
|
6
|
-
* Type information for
|
|
6
|
+
* Type information for AffixTarget.
|
|
7
7
|
*/
|
|
8
8
|
type AffixTarget = string | Window | HTMLElement | (() => HTMLElement);
|
|
9
9
|
/**
|
|
10
|
-
* State values for
|
|
10
|
+
* State values for AffixState.
|
|
11
11
|
*/
|
|
12
12
|
type AffixState = 'fixed' | 'static';
|
|
13
13
|
/**
|
|
14
|
-
*
|
|
14
|
+
* Properties for the AffixRoot component.
|
|
15
15
|
*/
|
|
16
16
|
interface AffixRootProps extends /** @vue-ignore */Omit<HTMLAttributes, 'onChange'> {
|
|
17
17
|
/**
|
|
@@ -32,7 +32,7 @@ interface AffixRootProps extends /** @vue-ignore */Omit<HTMLAttributes, 'onChang
|
|
|
32
32
|
target?: AffixTarget | null;
|
|
33
33
|
}
|
|
34
34
|
/**
|
|
35
|
-
*
|
|
35
|
+
* Events for the AffixRoot component.
|
|
36
36
|
*/
|
|
37
37
|
type AffixRootEmits = {
|
|
38
38
|
/**
|
|
@@ -41,36 +41,36 @@ type AffixRootEmits = {
|
|
|
41
41
|
change: [affixed: boolean];
|
|
42
42
|
};
|
|
43
43
|
/**
|
|
44
|
-
*
|
|
44
|
+
* Properties for the AffixPlaceholder component.
|
|
45
45
|
*/
|
|
46
46
|
interface AffixPlaceholderProps extends /** @vue-ignore */HTMLAttributes {}
|
|
47
47
|
/**
|
|
48
|
-
*
|
|
48
|
+
* Properties for the AffixContent component.
|
|
49
49
|
*/
|
|
50
50
|
interface AffixContentProps extends /** @vue-ignore */HTMLAttributes {}
|
|
51
51
|
/**
|
|
52
|
-
*
|
|
52
|
+
* Properties for the AffixCompact component.
|
|
53
53
|
*/
|
|
54
54
|
interface AffixCompactProps extends AffixRootProps {
|
|
55
55
|
/**
|
|
56
|
-
*
|
|
56
|
+
* Properties forwarded to the placeholder element.
|
|
57
57
|
*/
|
|
58
58
|
placeholderProps?: AffixPlaceholderProps;
|
|
59
59
|
/**
|
|
60
|
-
*
|
|
60
|
+
* Properties forwarded to the content element.
|
|
61
61
|
*/
|
|
62
62
|
contentProps?: AffixContentProps;
|
|
63
63
|
}
|
|
64
64
|
/**
|
|
65
|
-
*
|
|
65
|
+
* Events for the AffixCompact component.
|
|
66
66
|
*/
|
|
67
67
|
type AffixCompactEmits = AffixRootEmits;
|
|
68
68
|
/**
|
|
69
|
-
* Available UI slots for the
|
|
69
|
+
* Available UI slots for the Affix component.
|
|
70
70
|
*/
|
|
71
71
|
type AffixUiSlot = 'root' | 'placeholder' | 'content';
|
|
72
72
|
/**
|
|
73
|
-
* UI class overrides for the
|
|
73
|
+
* UI class overrides for the Affix component.
|
|
74
74
|
*/
|
|
75
75
|
type AffixUi = UiClass<AffixUiSlot>;
|
|
76
76
|
//#endregion
|
|
@@ -5,7 +5,7 @@ import { ButtonHTMLAttributes, HTMLAttributes, ShallowRef } from "vue";
|
|
|
5
5
|
|
|
6
6
|
//#region src/components/alert/types.d.ts
|
|
7
7
|
/**
|
|
8
|
-
*
|
|
8
|
+
* Properties for the AlertRoot component.
|
|
9
9
|
*/
|
|
10
10
|
interface AlertRootProps extends /** @vue-ignore */HTMLAttributes {
|
|
11
11
|
/**
|
|
@@ -16,7 +16,7 @@ interface AlertRootProps extends /** @vue-ignore */HTMLAttributes {
|
|
|
16
16
|
open?: boolean;
|
|
17
17
|
}
|
|
18
18
|
/**
|
|
19
|
-
*
|
|
19
|
+
* Events for the AlertRoot component.
|
|
20
20
|
*/
|
|
21
21
|
type AlertRootEmits = {
|
|
22
22
|
/**
|
|
@@ -25,23 +25,23 @@ type AlertRootEmits = {
|
|
|
25
25
|
'update:open': [open: boolean];
|
|
26
26
|
};
|
|
27
27
|
/**
|
|
28
|
-
*
|
|
28
|
+
* Properties for the AlertContent component.
|
|
29
29
|
*/
|
|
30
30
|
interface AlertContentProps extends /** @vue-ignore */HTMLAttributes {}
|
|
31
31
|
/**
|
|
32
|
-
*
|
|
32
|
+
* Properties for the AlertTitle component.
|
|
33
33
|
*/
|
|
34
34
|
interface AlertTitleProps extends /** @vue-ignore */HTMLAttributes {}
|
|
35
35
|
/**
|
|
36
|
-
*
|
|
36
|
+
* Properties for the AlertDescription component.
|
|
37
37
|
*/
|
|
38
38
|
interface AlertDescriptionProps extends /** @vue-ignore */HTMLAttributes {}
|
|
39
39
|
/**
|
|
40
|
-
*
|
|
40
|
+
* Properties for the AlertClose component.
|
|
41
41
|
*/
|
|
42
42
|
interface AlertCloseProps extends PrimitiveProps, /** @vue-ignore */ButtonHTMLAttributes {}
|
|
43
43
|
/**
|
|
44
|
-
*
|
|
44
|
+
* Properties for the AlertCompact component.
|
|
45
45
|
*/
|
|
46
46
|
interface AlertCompactProps extends AlertRootProps {
|
|
47
47
|
/**
|
|
@@ -61,28 +61,28 @@ interface AlertCompactProps extends AlertRootProps {
|
|
|
61
61
|
*/
|
|
62
62
|
closable?: boolean;
|
|
63
63
|
/**
|
|
64
|
-
*
|
|
64
|
+
* Properties forwarded to the content element.
|
|
65
65
|
*/
|
|
66
66
|
contentProps?: AlertContentProps;
|
|
67
67
|
/**
|
|
68
|
-
*
|
|
68
|
+
* Properties forwarded to the title element.
|
|
69
69
|
*/
|
|
70
70
|
titleProps?: AlertTitleProps;
|
|
71
71
|
/**
|
|
72
|
-
*
|
|
72
|
+
* Properties forwarded to the description element.
|
|
73
73
|
*/
|
|
74
74
|
descriptionProps?: AlertDescriptionProps;
|
|
75
75
|
/**
|
|
76
|
-
*
|
|
76
|
+
* Properties forwarded to the close element.
|
|
77
77
|
*/
|
|
78
78
|
closeProps?: AlertCloseProps;
|
|
79
79
|
}
|
|
80
80
|
/**
|
|
81
|
-
*
|
|
81
|
+
* Events for the AlertCompact component.
|
|
82
82
|
*/
|
|
83
83
|
type AlertCompactEmits = AlertRootEmits;
|
|
84
84
|
/**
|
|
85
|
-
* Slots for the
|
|
85
|
+
* Slots for the AlertCompact component.
|
|
86
86
|
*/
|
|
87
87
|
type AlertCompactSlots = {
|
|
88
88
|
/**
|
|
@@ -111,11 +111,11 @@ type AlertCompactSlots = {
|
|
|
111
111
|
close?: () => any;
|
|
112
112
|
};
|
|
113
113
|
/**
|
|
114
|
-
* Available UI slots for the
|
|
114
|
+
* Available UI slots for the Alert component.
|
|
115
115
|
*/
|
|
116
116
|
type AlertUiSlot = 'root' | 'icon' | 'title' | 'description' | 'content' | 'close';
|
|
117
117
|
/**
|
|
118
|
-
* UI class overrides for the
|
|
118
|
+
* UI class overrides for the Alert component.
|
|
119
119
|
*/
|
|
120
120
|
type AlertUi = UiClass<AlertUiSlot>;
|
|
121
121
|
//#endregion
|
|
@@ -24,8 +24,8 @@ declare const __VLS_base: _$vue.DefineComponent<AnchorRootProps, {}, {}, {}, {},
|
|
|
24
24
|
}>, {
|
|
25
25
|
orientation: DataOrientation;
|
|
26
26
|
modelValue: string;
|
|
27
|
-
bounds: number;
|
|
28
27
|
offsetTop: number;
|
|
28
|
+
bounds: number;
|
|
29
29
|
}, {}, {}, {}, string, _$vue.ComponentProvideOptions, false, {}, any>;
|
|
30
30
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
31
31
|
declare const _default: typeof __VLS_export;
|
|
@@ -5,11 +5,11 @@ import { HTMLAttributes, ShallowRef } from "vue";
|
|
|
5
5
|
|
|
6
6
|
//#region src/components/anchor/types.d.ts
|
|
7
7
|
/**
|
|
8
|
-
* Type information for
|
|
8
|
+
* Type information for AnchorContainer.
|
|
9
9
|
*/
|
|
10
10
|
type AnchorContainer = HTMLElement | Window;
|
|
11
11
|
/**
|
|
12
|
-
*
|
|
12
|
+
* Properties for the AnchorRoot component.
|
|
13
13
|
*/
|
|
14
14
|
interface AnchorRootProps extends PrimitiveProps, /** @vue-ignore */HTMLAttributes {
|
|
15
15
|
/**
|
|
@@ -50,7 +50,7 @@ interface AnchorRootProps extends PrimitiveProps, /** @vue-ignore */HTMLAttribut
|
|
|
50
50
|
targetOffset?: number;
|
|
51
51
|
}
|
|
52
52
|
/**
|
|
53
|
-
*
|
|
53
|
+
* Events for the AnchorRoot component.
|
|
54
54
|
*/
|
|
55
55
|
type AnchorRootEmits = {
|
|
56
56
|
/**
|
|
@@ -69,11 +69,11 @@ type AnchorRootEmits = {
|
|
|
69
69
|
}];
|
|
70
70
|
};
|
|
71
71
|
/**
|
|
72
|
-
*
|
|
72
|
+
* Properties for the AnchorLink component.
|
|
73
73
|
*/
|
|
74
74
|
interface AnchorLinkProps extends PrimitiveProps, LinkBaseProps, /** @vue-ignore */HTMLAttributes {
|
|
75
75
|
/**
|
|
76
|
-
*
|
|
76
|
+
* The link of anchor
|
|
77
77
|
*/
|
|
78
78
|
href: string;
|
|
79
79
|
/**
|
|
@@ -82,7 +82,7 @@ interface AnchorLinkProps extends PrimitiveProps, LinkBaseProps, /** @vue-ignore
|
|
|
82
82
|
disabled?: boolean;
|
|
83
83
|
}
|
|
84
84
|
/**
|
|
85
|
-
* Option data for the
|
|
85
|
+
* Option data for the Anchor component.
|
|
86
86
|
*/
|
|
87
87
|
interface AnchorOptionData extends Pick<AnchorLinkProps, 'disabled' | 'href' | 'target'> {
|
|
88
88
|
/**
|
|
@@ -95,7 +95,7 @@ interface AnchorOptionData extends Pick<AnchorLinkProps, 'disabled' | 'href' | '
|
|
|
95
95
|
title?: string;
|
|
96
96
|
}
|
|
97
97
|
/**
|
|
98
|
-
*
|
|
98
|
+
* Properties for the AnchorItemCompact component.
|
|
99
99
|
*/
|
|
100
100
|
interface AnchorItemCompactProps extends /** @vue-ignore */HTMLAttributes {
|
|
101
101
|
/**
|
|
@@ -107,24 +107,24 @@ interface AnchorItemCompactProps extends /** @vue-ignore */HTMLAttributes {
|
|
|
107
107
|
*/
|
|
108
108
|
item: AnchorOptionData;
|
|
109
109
|
/**
|
|
110
|
-
*
|
|
110
|
+
* Properties forwarded to the link element.
|
|
111
111
|
*/
|
|
112
112
|
linkProps?: AnchorLinkProps;
|
|
113
113
|
/**
|
|
114
|
-
*
|
|
114
|
+
* Properties forwarded to the indicator element.
|
|
115
115
|
*/
|
|
116
116
|
indicatorProps?: HTMLAttributes;
|
|
117
117
|
/**
|
|
118
|
-
*
|
|
118
|
+
* Properties forwarded to the title element.
|
|
119
119
|
*/
|
|
120
120
|
titleProps?: HTMLAttributes;
|
|
121
121
|
/**
|
|
122
|
-
*
|
|
122
|
+
* Properties forwarded to the sub element.
|
|
123
123
|
*/
|
|
124
124
|
subProps?: HTMLAttributes;
|
|
125
125
|
}
|
|
126
126
|
/**
|
|
127
|
-
*
|
|
127
|
+
* Properties for the AnchorCompact component.
|
|
128
128
|
*/
|
|
129
129
|
interface AnchorCompactProps extends AnchorRootProps {
|
|
130
130
|
/**
|
|
@@ -132,32 +132,32 @@ interface AnchorCompactProps extends AnchorRootProps {
|
|
|
132
132
|
*/
|
|
133
133
|
items: AnchorOptionData[];
|
|
134
134
|
/**
|
|
135
|
-
*
|
|
135
|
+
* Properties forwarded to the link element.
|
|
136
136
|
*/
|
|
137
137
|
linkProps?: AnchorLinkProps;
|
|
138
138
|
/**
|
|
139
|
-
*
|
|
139
|
+
* Properties forwarded to the indicator element.
|
|
140
140
|
*/
|
|
141
141
|
indicatorProps?: HTMLAttributes;
|
|
142
142
|
/**
|
|
143
|
-
*
|
|
143
|
+
* Properties forwarded to the title element.
|
|
144
144
|
*/
|
|
145
145
|
titleProps?: HTMLAttributes;
|
|
146
146
|
/**
|
|
147
|
-
*
|
|
147
|
+
* Properties forwarded to the sub element.
|
|
148
148
|
*/
|
|
149
149
|
subProps?: HTMLAttributes;
|
|
150
150
|
}
|
|
151
151
|
/**
|
|
152
|
-
*
|
|
152
|
+
* Events for the AnchorCompact component.
|
|
153
153
|
*/
|
|
154
154
|
type AnchorCompactEmits = AnchorRootEmits;
|
|
155
155
|
/**
|
|
156
|
-
* Available UI slots for the
|
|
156
|
+
* Available UI slots for the Anchor component.
|
|
157
157
|
*/
|
|
158
158
|
type AnchorUiSlot = 'root' | 'link' | 'sub' | 'item' | 'indicator' | 'title';
|
|
159
159
|
/**
|
|
160
|
-
* UI class overrides for the
|
|
160
|
+
* UI class overrides for the Anchor component.
|
|
161
161
|
*/
|
|
162
162
|
type AnchorUi = UiClass<AnchorUiSlot>;
|
|
163
163
|
//#endregion
|
|
@@ -3,7 +3,7 @@ import { HTMLAttributes } from "vue";
|
|
|
3
3
|
|
|
4
4
|
//#region src/components/aspect-ratio/types.d.ts
|
|
5
5
|
/**
|
|
6
|
-
*
|
|
6
|
+
* Properties for the AspectRatio component.
|
|
7
7
|
*/
|
|
8
8
|
interface AspectRatioProps extends PrimitiveProps, /** @vue-ignore */HTMLAttributes {
|
|
9
9
|
/**
|
|
@@ -6,15 +6,15 @@ declare const __VLS_export: <T extends AutocompleteSingleOptionData = Autocomple
|
|
|
6
6
|
props: _$vue.PublicProps & __VLS_PrettifyLocal<AutocompleteCompactProps<T> & {
|
|
7
7
|
onSelect?: ((item: T) => any) | undefined;
|
|
8
8
|
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
9
|
-
onHighlight?: ((payload?: AutocompleteHighlightPayload | undefined) => any) | undefined;
|
|
10
9
|
"onUpdate:open"?: ((value: boolean) => any) | undefined;
|
|
10
|
+
onHighlight?: ((payload?: AutocompleteHighlightPayload | undefined) => any) | undefined;
|
|
11
11
|
}> & (typeof globalThis extends {
|
|
12
12
|
__VLS_PROPS_FALLBACK: infer P;
|
|
13
13
|
} ? P : {});
|
|
14
14
|
expose: (exposed: {}) => void;
|
|
15
15
|
attrs: any;
|
|
16
16
|
slots: AutocompleteCompactSlots<T>;
|
|
17
|
-
emit: ((evt: "select", item: T) => void) & ((evt: "update:modelValue", value: string) => void) & ((evt: "
|
|
17
|
+
emit: ((evt: "select", item: T) => void) & ((evt: "update:modelValue", value: string) => void) & ((evt: "update:open", value: boolean) => void) & ((evt: "highlight", payload?: AutocompleteHighlightPayload | undefined) => void);
|
|
18
18
|
}>) => _$vue.VNode & {
|
|
19
19
|
__ctx?: Awaited<typeof __VLS_setup>;
|
|
20
20
|
};
|
|
@@ -20,17 +20,17 @@ declare const __VLS_base: _$vue.DefineComponent<AutocompleteRootProps, {
|
|
|
20
20
|
highlightSelected: (event?: Event) => Promise<void> | undefined;
|
|
21
21
|
}, {}, {}, {}, _$vue.ComponentOptionsMixin, _$vue.ComponentOptionsMixin, {
|
|
22
22
|
"update:modelValue": (value: string) => any;
|
|
23
|
-
highlight: (payload?: AutocompleteHighlightPayload | undefined) => any;
|
|
24
23
|
"update:open": (value: boolean) => any;
|
|
24
|
+
highlight: (payload?: AutocompleteHighlightPayload | undefined) => any;
|
|
25
25
|
}, string, _$vue.PublicProps, Readonly<AutocompleteRootProps> & Readonly<{
|
|
26
26
|
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
27
|
-
onHighlight?: ((payload?: AutocompleteHighlightPayload | undefined) => any) | undefined;
|
|
28
27
|
"onUpdate:open"?: ((value: boolean) => any) | undefined;
|
|
28
|
+
onHighlight?: ((payload?: AutocompleteHighlightPayload | undefined) => any) | undefined;
|
|
29
29
|
}>, {
|
|
30
30
|
modelValue: string;
|
|
31
|
-
highlightOnHover: boolean;
|
|
32
|
-
open: boolean;
|
|
33
31
|
defaultOpen: boolean;
|
|
32
|
+
open: boolean;
|
|
33
|
+
highlightOnHover: boolean;
|
|
34
34
|
openOnFocus: boolean;
|
|
35
35
|
openOnClick: boolean;
|
|
36
36
|
}, {}, {}, {}, string, _$vue.ComponentProvideOptions, false, {}, any>;
|