ropav 0.1.6 → 0.1.8
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 +7 -1
- package/dist/accordion.css +17 -17
- package/dist/accordion.js +123 -155
- package/dist/alert.css +18 -18
- package/dist/alert.js +10 -11
- package/dist/ancestry.js +136 -0
- package/dist/aria.js +14 -0
- package/dist/aspect-ratio.js +1 -1
- package/dist/attributes.js +9 -0
- package/dist/attributes2.js +29 -0
- package/dist/avatar.css +19 -19
- package/dist/avatar.js +9 -17
- package/dist/badge.css +16 -16
- package/dist/badge.js +5 -5
- package/dist/button-group.js +1 -1
- package/dist/button-link.js +4 -3
- package/dist/button.js +4 -3
- package/dist/button.scss_vue_type_style_index_0_src_true_lang.js +1 -1
- package/dist/calendar.css +173 -0
- package/dist/calendar.js +714 -0
- package/dist/calendar2.js +37 -0
- package/dist/card.js +1 -1
- package/dist/checkbox.css +32 -32
- package/dist/checkbox.js +22 -28
- package/dist/chevron-left.js +12 -0
- package/dist/collapse.css +6 -6
- package/dist/collapse.js +7 -6
- package/dist/collectionNavigation.js +2 -99
- package/dist/color-input.css +19 -19
- package/dist/color-input.js +14 -13
- package/dist/color-picker.css +40 -40
- package/dist/color-picker.js +247 -276
- package/dist/color-picker2.js +1 -9
- package/dist/color-swatch.css +4 -4
- package/dist/color-swatch.js +6 -8
- package/dist/color.js +5 -10
- package/dist/combobox.css +251 -0
- package/dist/combobox.js +410 -0
- package/dist/componentColors.js +125 -84
- package/dist/componentRef.js +26 -0
- package/dist/components/accordion/accordionContext.d.ts +3 -0
- package/dist/components/accordion/accordionModel.d.ts +14 -0
- package/dist/components/accordion/index.d.ts +2 -1
- package/dist/components/accordion/index.js +1 -1
- package/dist/components/accordion/types.d.ts +1 -2
- package/dist/components/accordion/useAccordion.d.ts +2 -2
- package/dist/components/accordion/useAccordionItem.d.ts +2 -0
- package/dist/components/calendar/calendar.d.ts +30 -0
- package/dist/components/calendar/calendarBehavior.d.ts +49 -0
- package/dist/components/calendar/index.d.ts +3 -0
- package/dist/components/calendar/index.js +3 -0
- package/dist/components/calendar/types.d.ts +53 -0
- package/dist/components/calendar/useCalendar.d.ts +24 -0
- package/dist/components/checkbox/useCheckbox.d.ts +1 -2
- package/dist/components/color-picker/index.js +2 -2
- package/dist/components/color-picker/types.d.ts +2 -2
- package/dist/components/color-picker/useColorPickerDrag.d.ts +1 -1
- package/dist/components/color-picker/useColorPickerSaturation.d.ts +22 -0
- package/dist/components/color-picker/useColorPickerSlider.d.ts +20 -0
- package/dist/components/color-picker/useColorPickerValue.d.ts +1 -1
- package/dist/components/combobox/combobox.d.ts +29 -0
- package/dist/components/combobox/comboboxModel.d.ts +4 -0
- package/dist/components/combobox/index.d.ts +3 -0
- package/dist/components/combobox/index.js +2 -0
- package/dist/components/combobox/types.d.ts +43 -0
- package/dist/components/combobox/useCombobox.d.ts +45 -0
- package/dist/components/date-picker/date-picker.d.ts +33 -0
- package/dist/components/date-picker/datePickerModel.d.ts +10 -0
- package/dist/components/date-picker/index.d.ts +4 -0
- package/dist/components/date-picker/index.js +2 -0
- package/dist/components/date-picker/types.d.ts +57 -0
- package/dist/components/date-picker/useDatePicker.d.ts +29 -0
- package/dist/components/date-picker/useDatePickerValueState.d.ts +21 -0
- package/dist/components/dialog/{dialog-core.d.ts → dialogContext.d.ts} +1 -5
- package/dist/components/dialog/useDialogContentInteractions.d.ts +18 -0
- package/dist/components/dialog/useDialogRootState.d.ts +19 -0
- package/dist/components/dropdown-menu/dropdown-menu-content.d.ts +2 -2
- package/dist/components/dropdown-menu/dropdown-menu-item-row.d.ts +1 -1
- package/dist/components/dropdown-menu/dropdown-menu-items.d.ts +1 -1
- package/dist/components/dropdown-menu/dropdown-menu-model.d.ts +8 -0
- package/dist/components/dropdown-menu/dropdown-menu-root.d.ts +2 -2
- package/dist/components/dropdown-menu/dropdown-menu-sub-content.d.ts +2 -2
- package/dist/components/dropdown-menu/dropdown-menu-sub-trigger.d.ts +1 -1
- package/dist/components/dropdown-menu/dropdown-menu-sub.d.ts +1 -1
- package/dist/components/dropdown-menu/dropdown-menu.d.ts +2 -2
- package/dist/components/dropdown-menu/{dropdown-menu-primitive-core.d.ts → dropdownMenuContext.d.ts} +17 -30
- package/dist/components/dropdown-menu/dropdownMenuDataModel.d.ts +20 -0
- package/dist/components/dropdown-menu/dropdownMenuInteraction.d.ts +3 -0
- package/dist/components/dropdown-menu/dropdownMenuInteractionNavigation.d.ts +24 -0
- package/dist/components/dropdown-menu/dropdownMenuInteractionRegistry.d.ts +42 -0
- package/dist/components/dropdown-menu/dropdownMenuInteractionTypes.d.ts +114 -0
- package/dist/components/dropdown-menu/useDropdownMenu.d.ts +11 -11
- package/dist/components/dropdown-menu/useDropdownMenuContextTrigger.d.ts +9 -0
- package/dist/components/dropdown-menu/useDropdownMenuDataController.d.ts +35 -0
- package/dist/components/dropdown-menu/useDropdownMenuDataRegistration.d.ts +24 -0
- package/dist/components/dropdown-menu/useDropdownMenuHoverIntent.d.ts +6 -5
- package/dist/components/dropdown-menu/useDropdownMenuInteractionDismissal.d.ts +17 -0
- package/dist/components/dropdown-menu/useDropdownMenuInteractionKeyboard.d.ts +19 -0
- package/dist/components/dropdown-menu/useDropdownMenuPortalPosition.d.ts +0 -1
- package/dist/components/dropdown-menu/useDropdownMenuPresentation.d.ts +28 -0
- package/dist/components/dropdown-menu/useDropdownMenuPrimitiveContent.d.ts +2 -2
- package/dist/components/dropdown-menu/useDropdownMenuRenderItems.d.ts +1 -1
- package/dist/components/dropdown-menu/useDropdownMenuTargetBindings.d.ts +19 -0
- package/dist/components/dropzone/dropzone.d.ts +31 -0
- package/dist/components/dropzone/dropzoneModel.d.ts +16 -0
- package/dist/components/dropzone/index.d.ts +3 -0
- package/dist/components/dropzone/index.js +2 -0
- package/dist/components/dropzone/types.d.ts +56 -0
- package/dist/components/dropzone/useDropzone.d.ts +25 -0
- package/dist/components/file-input/file-input.d.ts +29 -0
- package/dist/components/file-input/index.d.ts +3 -0
- package/dist/components/file-input/index.js +2 -0
- package/dist/components/file-input/types.d.ts +37 -0
- package/dist/components/file-input/useFileInput.d.ts +15 -0
- package/dist/components/floating/index.js +2 -2
- package/dist/components/floating/useFloatingPosition.d.ts +1 -14
- package/dist/components/floating/useFloatingTargetLifecycle.d.ts +32 -0
- package/dist/components/floating/useHoverDisclosure.d.ts +10 -0
- package/dist/components/hover-card/hover-card.d.ts +25 -0
- package/dist/components/hover-card/index.d.ts +3 -0
- package/dist/components/hover-card/index.js +2 -0
- package/dist/components/hover-card/types.d.ts +45 -0
- package/dist/components/hover-card/useHoverCard.d.ts +22 -0
- package/dist/components/hover-card/useHoverCardDisclosure.d.ts +19 -0
- package/dist/components/multi-select/index.d.ts +3 -0
- package/dist/components/multi-select/index.js +2 -0
- package/dist/components/multi-select/multi-select.d.ts +30 -0
- package/dist/components/multi-select/multiSelectModel.d.ts +3 -0
- package/dist/components/multi-select/types.d.ts +49 -0
- package/dist/components/multi-select/useMultiSelect.d.ts +46 -0
- package/dist/components/number-input/numberInputModel.d.ts +15 -0
- package/dist/components/number-input/useNumberInput.d.ts +3 -19
- package/dist/components/pagination/index.d.ts +1 -1
- package/dist/components/pagination/index.js +1 -1
- package/dist/components/pagination/paginationModel.d.ts +4 -0
- package/dist/components/pagination/types.d.ts +15 -0
- package/dist/components/pagination/usePagination.d.ts +3 -19
- package/dist/components/popover/usePopoverBindings.d.ts +13 -0
- package/dist/components/progress/progressModel.d.ts +8 -0
- package/dist/components/progress/useProgress.d.ts +0 -6
- package/dist/components/radio/useRadio.d.ts +1 -2
- package/dist/components/scroll-area/scroll-area.d.ts +1 -1
- package/dist/components/scroll-area/scrollAreaModel.d.ts +64 -0
- package/dist/components/scroll-area/useScrollArea.d.ts +70 -53
- package/dist/components/scroll-area/{useScrollAreaPresentation.d.ts → useScrollAreaAttributes.d.ts} +37 -17
- package/dist/components/scroll-area/useScrollAreaDerivedState.d.ts +8 -0
- package/dist/components/scroll-area/useScrollAreaMeasurement.d.ts +35 -0
- package/dist/components/scroll-area/useScrollAreaPointer.d.ts +11 -9
- package/dist/components/scroll-area/useScrollAreaVisibility.d.ts +15 -20
- package/dist/components/segmented-control/index.d.ts +3 -0
- package/dist/components/segmented-control/index.js +2 -0
- package/dist/components/segmented-control/segmented-control.d.ts +26 -0
- package/dist/components/segmented-control/types.d.ts +47 -0
- package/dist/components/segmented-control/useSegmentedControl.d.ts +15 -0
- package/dist/components/select/useSelect.d.ts +31 -19
- package/dist/components/slider/rangeSliderModel.d.ts +41 -0
- package/dist/components/slider/{sliderCore.d.ts → sliderModel.d.ts} +0 -1
- package/dist/components/slider/useRangeSlider.d.ts +9 -17
- package/dist/components/slider/useRangeSliderPointer.d.ts +1 -1
- package/dist/components/slider/useRangeSliderValueState.d.ts +40 -0
- package/dist/components/slider/useSlider.d.ts +7 -13
- package/dist/components/slider/useSliderPointerPreview.d.ts +22 -0
- package/dist/components/slider/useSliderTooltipState.d.ts +40 -0
- package/dist/components/slider/useSliderValueState.d.ts +33 -0
- package/dist/components/tags-input/index.d.ts +3 -0
- package/dist/components/tags-input/index.js +2 -0
- package/dist/components/tags-input/tags-input.d.ts +27 -0
- package/dist/components/tags-input/tagsInputModel.d.ts +12 -0
- package/dist/components/tags-input/types.d.ts +37 -0
- package/dist/components/tags-input/useTagsInput.d.ts +23 -0
- package/dist/components/teleport-provider/index.js +1 -1
- package/dist/components/teleport-provider/useTeleportTarget.d.ts +1 -2
- package/dist/components/toast/useToastLifecycle.d.ts +19 -0
- package/dist/components/tooltip/useTooltip.d.ts +1 -2
- package/dist/components/tooltip/useTooltipTargetBindings.d.ts +12 -0
- package/dist/css.js +12 -0
- package/dist/date-picker.css +49 -0
- package/dist/date-picker.js +809 -0
- package/dist/dialog.js +215 -218
- package/dist/direction.js +6 -0
- package/dist/dropdown-menu.css +21 -3
- package/dist/dropdown-menu.js +1626 -1185
- package/dist/dropzone.css +135 -0
- package/dist/dropzone.js +431 -0
- package/dist/events.js +59 -0
- package/dist/field.css +8 -8
- package/dist/field.js +13 -25
- package/dist/file-input.css +135 -0
- package/dist/file-input.js +198 -0
- package/dist/floatingOffset.js +11 -0
- package/dist/focus-trap.js +7 -5
- package/dist/focusNavigation.js +37 -0
- package/dist/hover-card.css +80 -0
- package/dist/hover-card.js +402 -0
- package/dist/icon-button.css +8 -8
- package/dist/icon-button.js +7 -6
- package/dist/index.d.ts +9 -0
- package/dist/index.js +20 -9
- package/dist/input.css +24 -24
- package/dist/input.js +19 -31
- package/dist/interactive.js +18 -0
- package/dist/internal/composables/useOverlayLayer.d.ts +12 -0
- package/dist/modal.js +2 -2
- package/dist/multi-select.css +316 -0
- package/dist/multi-select.js +481 -0
- package/dist/nativeChoice.js +169 -0
- package/dist/number-input.css +18 -18
- package/dist/number-input.js +44 -44
- package/dist/number.js +22 -0
- package/dist/overlay.js +3 -2
- package/dist/pagination.css +28 -28
- package/dist/pagination.js +66 -73
- package/dist/pointerSession.js +130 -0
- package/dist/popover.css +55 -37
- package/dist/popover.js +75 -101
- package/dist/progress.js +10 -13
- package/dist/query.js +40 -0
- package/dist/radio.css +18 -18
- package/dist/radio.js +30 -36
- package/dist/rafScheduler.js +34 -0
- package/dist/scroll-area.css +28 -28
- package/dist/scroll-area.js +540 -554
- package/dist/segmented-control.css +176 -0
- package/dist/segmented-control.js +382 -0
- package/dist/select.css +50 -48
- package/dist/select.js +131 -289
- package/dist/slider.css +191 -191
- package/dist/slider.js +720 -706
- package/dist/styles-api.d.ts +0 -1
- package/dist/styles-api.js +1 -4
- package/dist/switch.css +17 -17
- package/dist/switch.js +14 -15
- package/dist/tabs.css +43 -43
- package/dist/tabs.js +29 -56
- package/dist/tags-input.css +197 -0
- package/dist/tags-input.js +380 -0
- package/dist/text.js +17 -0
- package/dist/textarea.css +26 -26
- package/dist/textarea.js +21 -32
- package/dist/toast.css +26 -26
- package/dist/toast.js +141 -118
- package/dist/tooltip.css +12 -12
- package/dist/tooltip.js +64 -63
- package/dist/useCollapse.js +8 -11
- package/dist/useControlState.js +3 -6
- package/dist/useEditableOptionList.js +216 -0
- package/dist/useFlatOptionCollection.js +134 -0
- package/dist/useFloatingPosition.js +14 -40
- package/dist/useFloatingTargetLifecycle.js +127 -0
- package/dist/useFormControl.js +1 -0
- package/dist/useHoverDisclosure.js +561 -0
- package/dist/useNativeChoiceTransaction.js +46 -0
- package/dist/useNativeFileSelection.js +86 -0
- package/dist/useOverlayZIndex.js +246 -19
- package/dist/useTeleportTarget.js +3 -14
- package/dist/useTypeahead.js +94 -0
- package/dist/utils/aria.d.ts +3 -0
- package/dist/utils/attributes.d.ts +2 -0
- package/dist/utils/bem.d.ts +3 -0
- package/dist/utils/collectionNavigation.d.ts +2 -0
- package/dist/utils/color.d.ts +7 -0
- package/dist/{components/color-picker/color-picker-utils.d.ts → utils/colorPicker.d.ts} +5 -4
- package/dist/utils/componentColors.d.ts +7 -0
- package/dist/utils/css.d.ts +3 -0
- package/dist/utils/date.d.ts +13 -0
- package/dist/utils/dateAvailability.d.ts +7 -0
- package/dist/utils/dom/ancestry.d.ts +8 -0
- package/dist/utils/dom/attributes.d.ts +16 -0
- package/dist/utils/dom/componentRef.d.ts +4 -0
- package/dist/utils/dom/direction.d.ts +2 -0
- package/dist/utils/dom/events.d.ts +5 -0
- package/dist/utils/dom/files.d.ts +3 -0
- package/dist/utils/dom/focusNavigation.d.ts +7 -0
- package/dist/utils/dom/interactive.d.ts +2 -0
- package/dist/utils/dom/nativeChoice.d.ts +17 -0
- package/dist/utils/dom/pointerSession.d.ts +20 -0
- package/dist/utils/dom/query.d.ts +4 -0
- package/dist/utils/dom/scroll.d.ts +24 -0
- package/dist/utils/floatingOffset.d.ts +10 -0
- package/dist/utils/geometry.d.ts +14 -0
- package/dist/utils/indexPath.d.ts +6 -0
- package/dist/utils/number.d.ts +4 -0
- package/dist/utils/optionFilter.d.ts +5 -0
- package/dist/utils/rafScheduler.d.ts +4 -0
- package/dist/utils/text.d.ts +2 -0
- package/docs/code-architecture.md +118 -0
- package/docs/public-floating-api.md +13 -9
- package/docs/public-styles-api.md +25 -12
- package/package.json +51 -14
- package/src/styles/_mixins.scss +26 -0
- package/src/styles/styles-manifest.json +1 -2
- package/dist/components/dropdown-menu/dropdown-menu-outside.d.ts +0 -3
- package/dist/components/dropdown-menu/dropdown-menu-utils.d.ts +0 -21
- package/dist/components/dropdown-menu/useDropdownMenuDisclosure.d.ts +0 -36
- package/dist/components/dropdown-menu/useDropdownMenuDom.d.ts +0 -29
- package/dist/components/dropdown-menu/useDropdownMenuInteractions.d.ts +0 -52
- package/dist/components/dropdown-menu/useDropdownMenuNavigation.d.ts +0 -17
- package/dist/components/dropdown-menu/useDropdownSubmenus.d.ts +0 -18
- package/dist/components/scroll-area/scrollAreaCore.d.ts +0 -30
- package/dist/components/scroll-area/useScrollAreaControls.d.ts +0 -25
- package/dist/components/scroll-area/useScrollAreaMetrics.d.ts +0 -38
- package/dist/components/select/useSelectNativeControl.d.ts +0 -9
- package/dist/components/select/useSelectNativeValue.d.ts +0 -9
- package/dist/floating.js +0 -415
- /package/dist/components/alert/{useAlertColor.d.ts → alertColor.d.ts} +0 -0
- /package/dist/components/avatar/{useAvatarColor.d.ts → avatarColor.d.ts} +0 -0
- /package/dist/components/badge/{useBadgeColor.d.ts → badgeColor.d.ts} +0 -0
- /package/dist/components/button/{useButtonColor.d.ts → buttonColor.d.ts} +0 -0
- /package/dist/components/color-swatch/{useColorSwatchColor.d.ts → colorSwatchColor.d.ts} +0 -0
- /package/dist/components/toast/{useToastColor.d.ts → toastColor.d.ts} +0 -0
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { Ref } from 'vue';
|
|
2
|
+
import { DropdownMenuDataIndex } from './dropdownMenuDataModel.js';
|
|
3
|
+
import { DropdownMenuInteraction, DropdownMenuInteractionItem, DropdownMenuInteractionMenu } from './dropdownMenuInteraction.js';
|
|
4
|
+
import { DropdownMenuItem, DropdownMenuProps, DropdownMenuSelectEvent } from './types.js';
|
|
5
|
+
import { ItemPath } from './dropdown-menu-model.js';
|
|
6
|
+
interface UseDropdownMenuDataRegistrationOptions {
|
|
7
|
+
props: Readonly<DropdownMenuProps>;
|
|
8
|
+
items: Readonly<Ref<DropdownMenuItem[]>>;
|
|
9
|
+
rootMenuId: string;
|
|
10
|
+
interaction: DropdownMenuInteraction;
|
|
11
|
+
rootMenu: DropdownMenuInteractionMenu;
|
|
12
|
+
menuRef: Readonly<Ref<HTMLElement | null>>;
|
|
13
|
+
getItemElement: (path: ItemPath) => HTMLElement | null;
|
|
14
|
+
getSubmenuElement: (path: ItemPath) => HTMLElement | null;
|
|
15
|
+
isSubmenuOpeningLeft: (path: ItemPath) => boolean;
|
|
16
|
+
onSelect?: (item: DropdownMenuItem, event: DropdownMenuSelectEvent) => void;
|
|
17
|
+
}
|
|
18
|
+
export declare function useDropdownMenuDataRegistration({ props, items, rootMenuId, interaction, rootMenu, menuRef, getItemElement, getSubmenuElement, isSubmenuOpeningLeft, onSelect, }: UseDropdownMenuDataRegistrationOptions): {
|
|
19
|
+
openMenuIds: Ref<Set<string> & Omit<Set<string>, keyof Set<any>>, Set<string> | (Set<string> & Omit<Set<string>, keyof Set<any>>)>;
|
|
20
|
+
registrationIndex: import('vue').ShallowRef<DropdownMenuDataIndex, DropdownMenuDataIndex>;
|
|
21
|
+
getItemInteraction: (id: string) => DropdownMenuInteractionItem | undefined;
|
|
22
|
+
getMenuInteraction: (id: string) => DropdownMenuInteractionMenu | undefined;
|
|
23
|
+
};
|
|
24
|
+
export {};
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import { Ref } from 'vue';
|
|
2
|
+
import { Point, Triangle } from '../../utils/geometry.js';
|
|
3
|
+
import { ItemPath } from './dropdown-menu-model.js';
|
|
2
4
|
import { DropdownMenuItem } from './types.js';
|
|
3
|
-
|
|
4
|
-
export type SafeTriangle = [PointerPoint, PointerPoint, PointerPoint];
|
|
5
|
+
export type SafeTriangle = Triangle;
|
|
5
6
|
type GetSafeTriangleOptions = {
|
|
6
7
|
itemRect: DOMRect | null;
|
|
7
8
|
submenuRect: DOMRect;
|
|
8
|
-
origin:
|
|
9
|
+
origin: Point;
|
|
9
10
|
};
|
|
10
|
-
type HoverCommit = (item: DropdownMenuItem, path: ItemPath, point?:
|
|
11
|
+
type HoverCommit = (item: DropdownMenuItem, path: ItemPath, point?: Point) => void;
|
|
11
12
|
type UseDropdownMenuHoverIntentOptions = {
|
|
12
13
|
openSubmenuPath: Ref<ItemPath>;
|
|
13
14
|
getItemElement: (path: ItemPath) => HTMLElement | null;
|
|
@@ -17,7 +18,7 @@ export declare function getDropdownMenuSafeTriangle({ itemRect, submenuRect, ori
|
|
|
17
18
|
export declare function useDropdownMenuHoverIntent({ openSubmenuPath, getItemElement, getSubmenuElement, }: UseDropdownMenuHoverIntentOptions): {
|
|
18
19
|
clearPendingHover: () => void;
|
|
19
20
|
resetHoverIntent: () => void;
|
|
20
|
-
trackSubmenuOpen: (path: ItemPath, point?:
|
|
21
|
+
trackSubmenuOpen: (path: ItemPath, point?: Point) => void;
|
|
21
22
|
handleItemHover: (item: DropdownMenuItem, path: ItemPath, event: MouseEvent | undefined, commit: HoverCommit) => void;
|
|
22
23
|
handleMenuMousemove: (event: MouseEvent, commit: HoverCommit) => void;
|
|
23
24
|
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { DropdownMenuCloseOptions } from './types.js';
|
|
2
|
+
import { DropdownMenuInteractionRegistry } from './dropdownMenuInteractionRegistry.js';
|
|
3
|
+
import { DropdownMenuInteractionDismissalRegistration, DropdownMenuInteractionHost } from './dropdownMenuInteractionTypes.js';
|
|
4
|
+
type DropdownMenuDismissalRegistry = Pick<DropdownMenuInteractionRegistry, 'activeMenuId' | 'focusMenuElement'>;
|
|
5
|
+
interface UseDropdownMenuInteractionDismissalOptions {
|
|
6
|
+
host: DropdownMenuInteractionHost;
|
|
7
|
+
registry: DropdownMenuDismissalRegistry;
|
|
8
|
+
closeRoot: (options?: DropdownMenuCloseOptions & {
|
|
9
|
+
returnFocus?: boolean;
|
|
10
|
+
}) => void;
|
|
11
|
+
}
|
|
12
|
+
export declare function useDropdownMenuInteractionDismissal({ host, registry, closeRoot, }: UseDropdownMenuInteractionDismissalOptions): {
|
|
13
|
+
registerInside: (element: Element) => void;
|
|
14
|
+
unregisterInside: (element: Element) => void;
|
|
15
|
+
registerDismissal: (registration: DropdownMenuInteractionDismissalRegistration) => () => void;
|
|
16
|
+
};
|
|
17
|
+
export {};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { DropdownMenuCloseOptions, DropdownMenuFocusTarget, DropdownMenuOpenOptions } from './types.js';
|
|
2
|
+
import { DropdownMenuInteractionNavigation } from './dropdownMenuInteractionNavigation.js';
|
|
3
|
+
import { DropdownMenuInteractionRegistry } from './dropdownMenuInteractionRegistry.js';
|
|
4
|
+
import { DropdownMenuInteractionHost } from './dropdownMenuInteractionTypes.js';
|
|
5
|
+
interface UseDropdownMenuInteractionKeyboardOptions {
|
|
6
|
+
host: DropdownMenuInteractionHost;
|
|
7
|
+
registry: DropdownMenuInteractionRegistry;
|
|
8
|
+
navigation: DropdownMenuInteractionNavigation;
|
|
9
|
+
openRoot: (options?: DropdownMenuOpenOptions | DropdownMenuFocusTarget) => void;
|
|
10
|
+
closeRoot: (options?: DropdownMenuCloseOptions & {
|
|
11
|
+
returnFocus?: boolean;
|
|
12
|
+
}) => void;
|
|
13
|
+
}
|
|
14
|
+
export declare function useDropdownMenuInteractionKeyboard({ host, registry, navigation, openRoot, closeRoot, }: UseDropdownMenuInteractionKeyboardOptions): {
|
|
15
|
+
onMenuKeydown: (menuId: string, event: KeyboardEvent) => void;
|
|
16
|
+
onTriggerKeydown: (event: KeyboardEvent, beforeOpen?: () => void) => void;
|
|
17
|
+
resetTypeahead: () => void;
|
|
18
|
+
};
|
|
19
|
+
export {};
|
|
@@ -10,7 +10,6 @@ export declare function useDropdownMenuPortalPosition(options: {
|
|
|
10
10
|
arrowRef: Ref<HTMLElement | null>;
|
|
11
11
|
isVisible: BooleanSource;
|
|
12
12
|
placement: PlacementSource;
|
|
13
|
-
restartKey: () => unknown;
|
|
14
13
|
}): {
|
|
15
14
|
actualPlacement: Readonly<Ref<import('../floating/index.js').FloatingPlacement, import('../floating/index.js').FloatingPlacement>>;
|
|
16
15
|
arrowStyle: Readonly<Ref<import('vue').CSSProperties | undefined, import('vue').CSSProperties | undefined>>;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { Ref } from 'vue';
|
|
2
|
+
import { DropdownMenuInteraction } from './dropdownMenuInteraction.js';
|
|
3
|
+
import { DropdownMenuCloseOptions, DropdownMenuContentProps, DropdownMenuFocusTarget, DropdownMenuOpenOptions, DropdownMenuPlacement, DropdownMenuProps, DropdownMenuSlotProps, DropdownMenuTriggerProps } from './types.js';
|
|
4
|
+
interface UseDropdownMenuPresentationOptions {
|
|
5
|
+
props: Readonly<DropdownMenuProps>;
|
|
6
|
+
menuId: Readonly<Ref<string>>;
|
|
7
|
+
isDisabled: Readonly<Ref<boolean>>;
|
|
8
|
+
isVisible: Readonly<Ref<boolean>>;
|
|
9
|
+
isExplicitTarget: Readonly<Ref<boolean>>;
|
|
10
|
+
actualPlacement: Readonly<Ref<DropdownMenuPlacement>>;
|
|
11
|
+
contentHasSubmenu: Readonly<Ref<boolean>>;
|
|
12
|
+
activeDescendantId: Readonly<Ref<string | undefined>>;
|
|
13
|
+
interaction: DropdownMenuInteraction;
|
|
14
|
+
resetHoverIntent: () => void;
|
|
15
|
+
onMenuMousemove: (event: MouseEvent) => void;
|
|
16
|
+
open: (options?: DropdownMenuOpenOptions | DropdownMenuFocusTarget) => void;
|
|
17
|
+
close: (options?: DropdownMenuCloseOptions) => void;
|
|
18
|
+
toggle: () => void;
|
|
19
|
+
}
|
|
20
|
+
export declare function useDropdownMenuPresentation({ props, menuId, isDisabled, isVisible, isExplicitTarget, actualPlacement, contentHasSubmenu, activeDescendantId, interaction, resetHoverIntent, onMenuMousemove, open, close, toggle, }: UseDropdownMenuPresentationOptions): {
|
|
21
|
+
rootClass: import('vue').ComputedRef<string[]>;
|
|
22
|
+
contentClass: import('vue').ComputedRef<string[]>;
|
|
23
|
+
triggerProps: import('vue').ComputedRef<DropdownMenuTriggerProps>;
|
|
24
|
+
contentProps: import('vue').ComputedRef<DropdownMenuContentProps>;
|
|
25
|
+
slotProps: import('vue').ComputedRef<DropdownMenuSlotProps>;
|
|
26
|
+
onMenuKeydown: (event: KeyboardEvent) => void;
|
|
27
|
+
};
|
|
28
|
+
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ComponentElementRef } from '../../utils/dom/componentRef.js';
|
|
2
2
|
import { DropdownMenuContentPrimitiveProps, DropdownMenuInteractOutsideEvent, DropdownMenuPlacement } from './types.js';
|
|
3
3
|
type ContentProps = Readonly<DropdownMenuContentPrimitiveProps>;
|
|
4
4
|
type ContentEvents = {
|
|
@@ -21,7 +21,7 @@ export declare function useDropdownMenuPrimitiveContent(props: ContentProps, att
|
|
|
21
21
|
[x: string]: unknown;
|
|
22
22
|
}>;
|
|
23
23
|
floating: import('../floating/index.js').UseFloatingPositionReturn;
|
|
24
|
-
setElement: (value:
|
|
24
|
+
setElement: (value: ComponentElementRef) => void;
|
|
25
25
|
close: () => void;
|
|
26
26
|
};
|
|
27
27
|
export {};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Ref } from 'vue';
|
|
2
2
|
import { StylesApiPartOptions } from '../../styles-api.js';
|
|
3
3
|
import { DropdownMenuCloseOptions, DropdownMenuFocusTarget, DropdownMenuItem, DropdownMenuItemProps, DropdownMenuItemSlotProps, DropdownMenuRenderedItem, DropdownMenuPlacement, DropdownMenuPart, DropdownMenuProps, DropdownMenuSubmenuProps } from './types.js';
|
|
4
|
-
import { ItemPath } from './dropdown-menu-
|
|
4
|
+
import { ItemPath } from './dropdown-menu-model.js';
|
|
5
5
|
type DropdownMenuItemsSource = {
|
|
6
6
|
readonly value: DropdownMenuItem[];
|
|
7
7
|
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { Ref } from 'vue';
|
|
2
|
+
import { FloatingTargetLifecycle } from '../floating/useFloatingTargetLifecycle.js';
|
|
3
|
+
import { DropdownMenuInteractOutsideEvent, DropdownMenuInteractOutsideTarget } from './types.js';
|
|
4
|
+
import { DropdownMenuInteraction } from './dropdownMenuInteraction.js';
|
|
5
|
+
interface UseDropdownMenuTargetBindingsOptions {
|
|
6
|
+
interaction: DropdownMenuInteraction;
|
|
7
|
+
rootRef: Readonly<Ref<HTMLElement | null>>;
|
|
8
|
+
menuRef: Readonly<Ref<HTMLElement | null>>;
|
|
9
|
+
targetLifecycle: FloatingTargetLifecycle;
|
|
10
|
+
menuId: Readonly<Ref<string>>;
|
|
11
|
+
isVisible: Readonly<Ref<boolean>>;
|
|
12
|
+
isDisabled: Readonly<Ref<boolean>>;
|
|
13
|
+
ignoredTargets: () => readonly DropdownMenuInteractOutsideTarget[];
|
|
14
|
+
pointerDownOutside?: (event: DropdownMenuInteractOutsideEvent) => void;
|
|
15
|
+
focusOutside?: (event: DropdownMenuInteractOutsideEvent) => void;
|
|
16
|
+
interactOutside?: (event: DropdownMenuInteractOutsideEvent) => void;
|
|
17
|
+
}
|
|
18
|
+
export declare function useDropdownMenuTargetBindings({ interaction, rootRef, menuRef, targetLifecycle, menuId, isVisible, isDisabled, ignoredTargets, pointerDownOutside, focusOutside, interactOutside, }: UseDropdownMenuTargetBindingsOptions): void;
|
|
19
|
+
export {};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { DropzoneFileRejection, DropzoneProps, DropzoneSelection, DropzoneSlotProps } from './types.js';
|
|
2
|
+
declare const __VLS_export: (__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
3
|
+
props: import('vue').PublicProps & __VLS_PrettifyLocal<DropzoneProps & {
|
|
4
|
+
"onUpdate:modelValue"?: ((files: File[]) => any) | undefined;
|
|
5
|
+
onDrop?: ((selection: DropzoneSelection) => any) | undefined;
|
|
6
|
+
onReject?: ((rejections: DropzoneFileRejection[]) => any) | undefined;
|
|
7
|
+
}> & (typeof globalThis extends {
|
|
8
|
+
__VLS_PROPS_FALLBACK: infer P;
|
|
9
|
+
} ? P : {});
|
|
10
|
+
expose: (exposed: import('vue').ShallowUnwrapRef<{
|
|
11
|
+
nativeElement: import('vue').Ref<HTMLInputElement | null, HTMLInputElement | null>;
|
|
12
|
+
rootElement: import('vue').Ref<HTMLElement | null, HTMLElement | null>;
|
|
13
|
+
open: () => void;
|
|
14
|
+
clear: () => void;
|
|
15
|
+
focus: (options?: FocusOptions) => void;
|
|
16
|
+
}>) => void;
|
|
17
|
+
attrs: any;
|
|
18
|
+
slots: {
|
|
19
|
+
default?(props: DropzoneSlotProps): unknown;
|
|
20
|
+
};
|
|
21
|
+
emit: ((evt: "update:modelValue", files: File[]) => void) & ((evt: "drop", selection: DropzoneSelection) => void) & ((evt: "reject", rejections: DropzoneFileRejection[]) => void);
|
|
22
|
+
}>) => import('vue').VNode & {
|
|
23
|
+
__ctx?: NonNullable<Awaited<typeof __VLS_setup>>;
|
|
24
|
+
};
|
|
25
|
+
declare const _default: typeof __VLS_export;
|
|
26
|
+
export default _default;
|
|
27
|
+
type __VLS_PrettifyLocal<T> = (T extends any ? {
|
|
28
|
+
[K in keyof T]: T[K];
|
|
29
|
+
} : {
|
|
30
|
+
[K in keyof T as K]: T[K];
|
|
31
|
+
}) & {};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { DropzoneSelection } from './types.js';
|
|
2
|
+
interface DropzonePolicyOptions {
|
|
3
|
+
accept?: string;
|
|
4
|
+
multiple: boolean;
|
|
5
|
+
maxFiles?: number;
|
|
6
|
+
maxSize?: number;
|
|
7
|
+
}
|
|
8
|
+
interface DropzoneDragItem {
|
|
9
|
+
kind: string;
|
|
10
|
+
type: string;
|
|
11
|
+
}
|
|
12
|
+
export declare function createDropzonePolicy(options: Readonly<DropzonePolicyOptions>): {
|
|
13
|
+
preview(items: Iterable<DropzoneDragItem>): "accept" | "reject";
|
|
14
|
+
commit(files: Iterable<File>): DropzoneSelection;
|
|
15
|
+
};
|
|
16
|
+
export {};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export { default as Dropzone } from './dropzone.js';
|
|
2
|
+
export { dropzoneErrorCodes, dropzoneParts, dropzoneStatuses } from './types.js';
|
|
3
|
+
export type { DropzoneErrorCode, DropzoneFileError, DropzoneFileRejection, DropzonePart, DropzoneProps, DropzoneRadius, DropzoneSelection, DropzoneSize, DropzoneSlotProps, DropzoneStatus, } from './types.js';
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { InputHTMLAttributes } from 'vue';
|
|
2
|
+
import { StylesApiProps } from '../../styles-api.js';
|
|
3
|
+
export declare const dropzoneParts: readonly ["root", "input", "content", "label", "description"];
|
|
4
|
+
export declare const dropzoneStatuses: readonly ["idle", "accept", "reject"];
|
|
5
|
+
export declare const dropzoneErrorCodes: readonly ["file-invalid-type", "file-too-large", "too-many-files"];
|
|
6
|
+
export type DropzonePart = (typeof dropzoneParts)[number];
|
|
7
|
+
export type DropzoneStatus = (typeof dropzoneStatuses)[number];
|
|
8
|
+
export type DropzoneErrorCode = (typeof dropzoneErrorCodes)[number];
|
|
9
|
+
export type DropzoneSize = 'sm' | 'md' | 'lg';
|
|
10
|
+
export type DropzoneRadius = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
11
|
+
export interface DropzoneFileError {
|
|
12
|
+
code: DropzoneErrorCode;
|
|
13
|
+
message: string;
|
|
14
|
+
}
|
|
15
|
+
export interface DropzoneFileRejection {
|
|
16
|
+
file: File;
|
|
17
|
+
errors: DropzoneFileError[];
|
|
18
|
+
}
|
|
19
|
+
export interface DropzoneSelection {
|
|
20
|
+
acceptedFiles: File[];
|
|
21
|
+
rejections: DropzoneFileRejection[];
|
|
22
|
+
}
|
|
23
|
+
export interface DropzoneSlotProps {
|
|
24
|
+
files: File[];
|
|
25
|
+
rejections: DropzoneFileRejection[];
|
|
26
|
+
status: DropzoneStatus;
|
|
27
|
+
dragging: boolean;
|
|
28
|
+
open: () => void;
|
|
29
|
+
clear: () => void;
|
|
30
|
+
}
|
|
31
|
+
export interface DropzoneProps extends StylesApiProps<DropzonePart> {
|
|
32
|
+
id?: string;
|
|
33
|
+
name?: string;
|
|
34
|
+
form?: string;
|
|
35
|
+
modelValue?: File[];
|
|
36
|
+
accept?: string;
|
|
37
|
+
capture?: boolean | 'user' | 'environment';
|
|
38
|
+
multiple?: boolean;
|
|
39
|
+
maxFiles?: number;
|
|
40
|
+
maxSize?: number;
|
|
41
|
+
size?: DropzoneSize;
|
|
42
|
+
radius?: DropzoneRadius;
|
|
43
|
+
label?: string;
|
|
44
|
+
description?: string;
|
|
45
|
+
activateOnClick?: boolean;
|
|
46
|
+
activateOnKeyboard?: boolean;
|
|
47
|
+
disabled?: boolean;
|
|
48
|
+
required?: boolean;
|
|
49
|
+
invalid?: boolean;
|
|
50
|
+
valid?: boolean;
|
|
51
|
+
ariaLabel?: string;
|
|
52
|
+
describedby?: string;
|
|
53
|
+
labelledby?: string;
|
|
54
|
+
inputAttrs?: InputHTMLAttributes;
|
|
55
|
+
validationMessage?: string;
|
|
56
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { DropzoneFileRejection, DropzoneProps, DropzoneSelection } from './types.js';
|
|
2
|
+
interface DropzoneCallbacks {
|
|
3
|
+
onUpdate: (files: File[]) => void;
|
|
4
|
+
onDrop: (selection: DropzoneSelection) => void;
|
|
5
|
+
onReject: (rejections: DropzoneFileRejection[]) => void;
|
|
6
|
+
}
|
|
7
|
+
export declare function useDropzone(props: Readonly<DropzoneProps>, callbacks: DropzoneCallbacks): {
|
|
8
|
+
rootRef: import('vue').Ref<HTMLElement | null, HTMLElement | null>;
|
|
9
|
+
inputRef: import('vue').Ref<HTMLInputElement | null, HTMLInputElement | null>;
|
|
10
|
+
control: import('../../internal/composables/useControlState.js').ControlState;
|
|
11
|
+
files: import('vue').ComputedRef<File[]>;
|
|
12
|
+
rejections: import('vue').ComputedRef<DropzoneFileRejection[]>;
|
|
13
|
+
status: import('vue').ComputedRef<"accept" | "idle" | "reject">;
|
|
14
|
+
rootClass: import('vue').ComputedRef<string[]>;
|
|
15
|
+
onDragenter: (event: DragEvent) => void;
|
|
16
|
+
onDragover: (event: DragEvent) => void;
|
|
17
|
+
onDragleave: () => void;
|
|
18
|
+
onDrop: (event: DragEvent) => void;
|
|
19
|
+
onChange: (event: Event) => void;
|
|
20
|
+
onKeydown: (event: KeyboardEvent) => void;
|
|
21
|
+
open: () => void;
|
|
22
|
+
clear: () => void;
|
|
23
|
+
focus: (options?: FocusOptions) => void;
|
|
24
|
+
};
|
|
25
|
+
export {};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { FileInputProps, FileInputTriggerSlotProps, FileInputValueSlotProps } from './types.js';
|
|
2
|
+
declare const __VLS_export: (__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
3
|
+
props: import('vue').PublicProps & __VLS_PrettifyLocal<FileInputProps & {
|
|
4
|
+
"onUpdate:modelValue"?: ((value: File[]) => any) | undefined;
|
|
5
|
+
}> & (typeof globalThis extends {
|
|
6
|
+
__VLS_PROPS_FALLBACK: infer P;
|
|
7
|
+
} ? P : {});
|
|
8
|
+
expose: (exposed: import('vue').ShallowUnwrapRef<{
|
|
9
|
+
nativeElement: import('vue').Ref<HTMLInputElement | null, HTMLInputElement | null>;
|
|
10
|
+
clear: () => void;
|
|
11
|
+
focus: (options?: FocusOptions) => void;
|
|
12
|
+
open: () => void;
|
|
13
|
+
}>) => void;
|
|
14
|
+
attrs: any;
|
|
15
|
+
slots: {
|
|
16
|
+
trigger?(props: FileInputTriggerSlotProps): unknown;
|
|
17
|
+
value?(props: FileInputValueSlotProps): unknown;
|
|
18
|
+
};
|
|
19
|
+
emit: (evt: "update:modelValue", value: File[]) => void;
|
|
20
|
+
}>) => import('vue').VNode & {
|
|
21
|
+
__ctx?: NonNullable<Awaited<typeof __VLS_setup>>;
|
|
22
|
+
};
|
|
23
|
+
declare const _default: typeof __VLS_export;
|
|
24
|
+
export default _default;
|
|
25
|
+
type __VLS_PrettifyLocal<T> = (T extends any ? {
|
|
26
|
+
[K in keyof T]: T[K];
|
|
27
|
+
} : {
|
|
28
|
+
[K in keyof T as K]: T[K];
|
|
29
|
+
}) & {};
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { InputHTMLAttributes } from 'vue';
|
|
2
|
+
import { StylesApiProps } from '../../styles-api.js';
|
|
3
|
+
export declare const fileInputParts: readonly ["root", "input", "trigger", "value"];
|
|
4
|
+
export type FileInputPart = (typeof fileInputParts)[number];
|
|
5
|
+
export type FileInputRadius = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
6
|
+
export type FileInputSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
7
|
+
export interface FileInputTriggerSlotProps {
|
|
8
|
+
files: File[];
|
|
9
|
+
multiple: boolean;
|
|
10
|
+
}
|
|
11
|
+
export interface FileInputValueSlotProps {
|
|
12
|
+
files: File[];
|
|
13
|
+
fileNames: string[];
|
|
14
|
+
hasFiles: boolean;
|
|
15
|
+
}
|
|
16
|
+
export interface FileInputProps extends StylesApiProps<FileInputPart> {
|
|
17
|
+
id?: string;
|
|
18
|
+
name?: string;
|
|
19
|
+
form?: string;
|
|
20
|
+
modelValue?: File[];
|
|
21
|
+
accept?: string;
|
|
22
|
+
capture?: boolean | 'user' | 'environment';
|
|
23
|
+
multiple?: boolean;
|
|
24
|
+
size?: FileInputSize;
|
|
25
|
+
radius?: FileInputRadius;
|
|
26
|
+
buttonLabel?: string;
|
|
27
|
+
placeholder?: string;
|
|
28
|
+
disabled?: boolean;
|
|
29
|
+
required?: boolean;
|
|
30
|
+
invalid?: boolean;
|
|
31
|
+
valid?: boolean;
|
|
32
|
+
ariaLabel?: string;
|
|
33
|
+
describedby?: string;
|
|
34
|
+
labelledby?: string;
|
|
35
|
+
inputAttrs?: InputHTMLAttributes;
|
|
36
|
+
validationMessage?: string;
|
|
37
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { FileInputProps } from './types.js';
|
|
2
|
+
export declare function useFileInput(props: Readonly<FileInputProps>, emitUpdate: (value: File[]) => void): {
|
|
3
|
+
inputRef: import('vue').Ref<HTMLInputElement | null, HTMLInputElement | null>;
|
|
4
|
+
control: import('../../internal/composables/useControlState.js').ControlState;
|
|
5
|
+
files: import('vue').ComputedRef<File[]>;
|
|
6
|
+
fileNames: import('vue').ComputedRef<string[]>;
|
|
7
|
+
hasFiles: import('vue').ComputedRef<boolean>;
|
|
8
|
+
rootClass: import('vue').ComputedRef<string[]>;
|
|
9
|
+
buttonText: import('vue').ComputedRef<string>;
|
|
10
|
+
displayValue: import('vue').ComputedRef<string>;
|
|
11
|
+
onChange: (event: Event) => void;
|
|
12
|
+
clear: () => void;
|
|
13
|
+
focus: (options?: FocusOptions) => void;
|
|
14
|
+
open: () => void;
|
|
15
|
+
};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { t as useHoverDisclosure } from "../../
|
|
1
|
+
import { t as useFloatingPosition } from "../../useFloatingPosition.js";
|
|
2
|
+
import { t as useHoverDisclosure } from "../../useHoverDisclosure.js";
|
|
3
3
|
export { useFloatingPosition, useHoverDisclosure };
|
|
@@ -1,15 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { FloatingReference, FloatingTarget, UseFloatingPositionOptions, UseFloatingPositionReturn } from './types.js';
|
|
3
|
-
type Source<T> = () => T;
|
|
4
|
-
export declare function readFloatingTarget(target: FloatingTarget | null | undefined): string | FloatingReference | null | undefined;
|
|
5
|
-
export declare function isVirtualReference(value: unknown): value is FloatingReference;
|
|
6
|
-
export declare function isElementReference(value: unknown): value is Element;
|
|
7
|
-
export declare function resolveFloatingTarget(target: string | FloatingReference | null | undefined): FloatingReference | null;
|
|
8
|
-
export declare function useFloatingTarget(getTarget: Source<FloatingTarget | null | undefined>, fallback: Readonly<Ref<Element | null>>): {
|
|
9
|
-
isExplicitTarget: import('vue').ComputedRef<boolean>;
|
|
10
|
-
reference: import('vue').ComputedRef<FloatingReference | null>;
|
|
11
|
-
resolvedTarget: import('vue').ShallowRef<FloatingReference | null, FloatingReference | null>;
|
|
12
|
-
syncTarget: () => void;
|
|
13
|
-
};
|
|
1
|
+
import { UseFloatingPositionOptions, UseFloatingPositionReturn } from './types.js';
|
|
14
2
|
export declare function useFloatingPosition(options: UseFloatingPositionOptions): UseFloatingPositionReturn;
|
|
15
|
-
export {};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { ComputedRef, Ref } from 'vue';
|
|
2
|
+
import { AttributeSnapshot } from '../../utils/dom/attributes.js';
|
|
3
|
+
import { FloatingReference, FloatingTarget } from './types.js';
|
|
4
|
+
type Source<T> = () => T;
|
|
5
|
+
export type FloatingTargetListener = readonly [
|
|
6
|
+
type: string,
|
|
7
|
+
listener: EventListenerOrEventListenerObject,
|
|
8
|
+
options?: boolean | AddEventListenerOptions
|
|
9
|
+
];
|
|
10
|
+
export interface FloatingTargetAttributeAdapter<AttributeName extends string> {
|
|
11
|
+
names: readonly AttributeName[];
|
|
12
|
+
isActive?: Source<boolean>;
|
|
13
|
+
apply: (target: Element, snapshot: AttributeSnapshot<AttributeName>) => void;
|
|
14
|
+
}
|
|
15
|
+
export interface FloatingTargetBindingAdapter<AttributeName extends string = never> {
|
|
16
|
+
connect?: (target: Element) => void | (() => void);
|
|
17
|
+
listeners?: readonly FloatingTargetListener[];
|
|
18
|
+
attributes?: FloatingTargetAttributeAdapter<AttributeName>;
|
|
19
|
+
}
|
|
20
|
+
export interface FloatingTargetLifecycle {
|
|
21
|
+
bindTarget: <AttributeName extends string = never>(adapter: FloatingTargetBindingAdapter<AttributeName>) => void;
|
|
22
|
+
isExplicitTarget: ComputedRef<boolean>;
|
|
23
|
+
reference: ComputedRef<FloatingReference | null>;
|
|
24
|
+
targetElement: ComputedRef<Element | null>;
|
|
25
|
+
}
|
|
26
|
+
interface UseFloatingTargetLifecycleOptions {
|
|
27
|
+
target: Source<FloatingTarget | null | undefined>;
|
|
28
|
+
fallback: Readonly<Ref<Element | null>>;
|
|
29
|
+
getTargetElement?: (reference: FloatingReference) => Element | null;
|
|
30
|
+
}
|
|
31
|
+
export declare function useFloatingTargetLifecycle({ target, fallback, getTargetElement, }: UseFloatingTargetLifecycleOptions): FloatingTargetLifecycle;
|
|
32
|
+
export {};
|
|
@@ -1,2 +1,12 @@
|
|
|
1
1
|
import { UseHoverDisclosureOptions, UseHoverDisclosureReturn } from './types.js';
|
|
2
|
+
interface HoverDisclosureDismissalHandlers {
|
|
3
|
+
escapeKeyDown: (event: KeyboardEvent) => void;
|
|
4
|
+
pointerDownOutside: (event: PointerEvent) => void;
|
|
5
|
+
}
|
|
6
|
+
interface HoverDisclosureWithExternalDismissal {
|
|
7
|
+
disclosure: UseHoverDisclosureReturn;
|
|
8
|
+
dismissalHandlers: HoverDisclosureDismissalHandlers;
|
|
9
|
+
}
|
|
2
10
|
export declare function useHoverDisclosure(options?: Readonly<UseHoverDisclosureOptions>): UseHoverDisclosureReturn;
|
|
11
|
+
export declare function useHoverDisclosureWithExternalDismissal(options: Readonly<UseHoverDisclosureOptions>): HoverDisclosureWithExternalDismissal;
|
|
12
|
+
export {};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { HoverCardContentSlotProps, HoverCardProps, HoverCardSlotProps } from './types.js';
|
|
2
|
+
declare const __VLS_export: (__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
3
|
+
props: import('vue').PublicProps & __VLS_PrettifyLocal<HoverCardProps & {
|
|
4
|
+
"onUpdate:open"?: ((value: boolean) => any) | undefined;
|
|
5
|
+
onOpenChange?: ((value: boolean, details: import('../floating/index.js').HoverDisclosureOpenChangeDetails) => any) | undefined;
|
|
6
|
+
}> & (typeof globalThis extends {
|
|
7
|
+
__VLS_PROPS_FALLBACK: infer P;
|
|
8
|
+
} ? P : {});
|
|
9
|
+
expose: (exposed: {}) => void;
|
|
10
|
+
attrs: any;
|
|
11
|
+
slots: {
|
|
12
|
+
default?(props: HoverCardSlotProps): unknown;
|
|
13
|
+
content?(props: HoverCardContentSlotProps): unknown;
|
|
14
|
+
};
|
|
15
|
+
emit: ((evt: "update:open", value: boolean) => void) & ((evt: "openChange", value: boolean, details: import('../floating/index.js').HoverDisclosureOpenChangeDetails) => void);
|
|
16
|
+
}>) => import('vue').VNode & {
|
|
17
|
+
__ctx?: NonNullable<Awaited<typeof __VLS_setup>>;
|
|
18
|
+
};
|
|
19
|
+
declare const _default: typeof __VLS_export;
|
|
20
|
+
export default _default;
|
|
21
|
+
type __VLS_PrettifyLocal<T> = (T extends any ? {
|
|
22
|
+
[K in keyof T]: T[K];
|
|
23
|
+
} : {
|
|
24
|
+
[K in keyof T as K]: T[K];
|
|
25
|
+
}) & {};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export { default as HoverCard } from './hover-card.js';
|
|
2
|
+
export { hoverCardParts, hoverCardPlacements } from './types.js';
|
|
3
|
+
export type { HoverCardContentSlotProps, HoverCardOffset, HoverCardOffsetOptions, HoverCardOpenChangeDetails, HoverCardOpenChangeReason, HoverCardPart, HoverCardPlacement, HoverCardProps, HoverCardSlotProps, HoverCardTarget, HoverCardTouchBehavior, HoverCardTriggerProps, } from './types.js';
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { HTMLAttributes } from 'vue';
|
|
2
|
+
import { StylesApiProps } from '../../styles-api.js';
|
|
3
|
+
import { FloatingOffset, FloatingOffsetOptions, FloatingPositionProps, FloatingTarget, HoverDisclosureOpenChangeDetails, HoverDisclosureOpenChangeReason, HoverDisclosureState, HoverDisclosureTouchBehavior } from '../floating/types.js';
|
|
4
|
+
export declare const hoverCardPlacements: readonly ["top-start", "top", "top-end", "right-start", "right", "right-end", "bottom-start", "bottom", "bottom-end", "left-start", "left", "left-end"];
|
|
5
|
+
export declare const hoverCardParts: readonly ["root", "trigger", "content"];
|
|
6
|
+
export type HoverCardPart = (typeof hoverCardParts)[number];
|
|
7
|
+
export type HoverCardPlacement = (typeof hoverCardPlacements)[number];
|
|
8
|
+
export type HoverCardTarget = FloatingTarget;
|
|
9
|
+
export type HoverCardOffsetOptions = FloatingOffsetOptions;
|
|
10
|
+
export type HoverCardOffset = FloatingOffset;
|
|
11
|
+
export type HoverCardTouchBehavior = HoverDisclosureTouchBehavior;
|
|
12
|
+
export type HoverCardOpenChangeReason = HoverDisclosureOpenChangeReason;
|
|
13
|
+
export type HoverCardOpenChangeDetails = HoverDisclosureOpenChangeDetails;
|
|
14
|
+
export interface HoverCardTriggerProps {
|
|
15
|
+
class?: HTMLAttributes['class'];
|
|
16
|
+
style?: HTMLAttributes['style'];
|
|
17
|
+
'data-state': HoverDisclosureState;
|
|
18
|
+
'data-disabled'?: '';
|
|
19
|
+
}
|
|
20
|
+
export interface HoverCardSlotProps {
|
|
21
|
+
triggerProps: HoverCardTriggerProps;
|
|
22
|
+
isOpen: boolean;
|
|
23
|
+
open: () => void;
|
|
24
|
+
close: () => void;
|
|
25
|
+
toggle: () => void;
|
|
26
|
+
}
|
|
27
|
+
export interface HoverCardContentSlotProps {
|
|
28
|
+
isOpen: boolean;
|
|
29
|
+
open: () => void;
|
|
30
|
+
close: () => void;
|
|
31
|
+
toggle: () => void;
|
|
32
|
+
}
|
|
33
|
+
export interface HoverCardProps extends FloatingPositionProps<HoverCardPlacement>, StylesApiProps<HoverCardPart> {
|
|
34
|
+
id?: string;
|
|
35
|
+
baseZIndex?: number;
|
|
36
|
+
open?: boolean;
|
|
37
|
+
defaultOpen?: boolean;
|
|
38
|
+
openDelay?: number;
|
|
39
|
+
closeDelay?: number;
|
|
40
|
+
disabled?: boolean;
|
|
41
|
+
openOnFocus?: boolean;
|
|
42
|
+
closeOnEscape?: boolean;
|
|
43
|
+
touchBehavior?: HoverCardTouchBehavior;
|
|
44
|
+
keepMounted?: boolean;
|
|
45
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { CSSProperties } from 'vue';
|
|
2
|
+
import { HoverCardContentSlotProps, HoverCardOpenChangeDetails, HoverCardProps } from './types.js';
|
|
3
|
+
export declare function useHoverCard(props: Readonly<HoverCardProps>, onOpenChange?: (open: boolean, details: HoverCardOpenChangeDetails) => void): {
|
|
4
|
+
rootRef: import('vue').Ref<HTMLElement | null, HTMLElement | null>;
|
|
5
|
+
contentRef: import('vue').Ref<HTMLElement | null, HTMLElement | null>;
|
|
6
|
+
arrowRef: import('vue').Ref<HTMLElement | null, HTMLElement | null>;
|
|
7
|
+
hoverCardId: import('vue').ComputedRef<string>;
|
|
8
|
+
isDisabled: import('vue').ComputedRef<boolean>;
|
|
9
|
+
isVisible: import('vue').ComputedRef<boolean>;
|
|
10
|
+
isTargetMode: import('vue').ComputedRef<boolean>;
|
|
11
|
+
state: import('vue').ComputedRef<import('../floating/index.js').HoverDisclosureState>;
|
|
12
|
+
shouldRenderContent: import('vue').ComputedRef<boolean>;
|
|
13
|
+
shouldShowContent: import('vue').ComputedRef<boolean>;
|
|
14
|
+
rootClass: import('vue').ComputedRef<string[]>;
|
|
15
|
+
contentStyle: import('vue').ComputedRef<CSSProperties>;
|
|
16
|
+
contentDirection: Readonly<import('vue').Ref<import('../../utils/dom/direction.js').ElementDirection, import('../../utils/dom/direction.js').ElementDirection>>;
|
|
17
|
+
contentSlotProps: import('vue').ComputedRef<HoverCardContentSlotProps>;
|
|
18
|
+
actualPlacement: Readonly<import('vue').Ref<import('../floating/index.js').FloatingPlacement, import('../floating/index.js').FloatingPlacement>>;
|
|
19
|
+
placementSide: import('vue').ComputedRef<string>;
|
|
20
|
+
arrowStyle: Readonly<import('vue').Ref<CSSProperties | undefined, CSSProperties | undefined>>;
|
|
21
|
+
teleportTo: import('vue').ComputedRef<import('../floating/index.js').TeleportTargetValue>;
|
|
22
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { MaybeRefOrGetter, Ref } from 'vue';
|
|
2
|
+
import { UseHoverDisclosureOptions } from '../floating/types.js';
|
|
3
|
+
interface HoverCardDisclosureLayerOptions {
|
|
4
|
+
baseZIndex: MaybeRefOrGetter<number>;
|
|
5
|
+
element: Ref<HTMLElement | null>;
|
|
6
|
+
inside: MaybeRefOrGetter<readonly (Element | null | undefined)[]>;
|
|
7
|
+
}
|
|
8
|
+
export declare function useHoverCardDisclosure(options: Readonly<UseHoverDisclosureOptions>, layerOptions: HoverCardDisclosureLayerOptions): {
|
|
9
|
+
zIndex: Readonly<Ref<number, number>>;
|
|
10
|
+
isOpen: import('vue').ComputedRef<boolean>;
|
|
11
|
+
isDisabled: import('vue').ComputedRef<boolean>;
|
|
12
|
+
state: import('vue').ComputedRef<import('../floating/index.js').HoverDisclosureState>;
|
|
13
|
+
triggerProps: import('vue').ComputedRef<import('../floating/index.js').HoverDisclosureTriggerProps>;
|
|
14
|
+
contentProps: import('vue').ComputedRef<import('../floating/index.js').HoverDisclosureContentProps>;
|
|
15
|
+
open: () => void;
|
|
16
|
+
close: () => void;
|
|
17
|
+
toggle: () => void;
|
|
18
|
+
};
|
|
19
|
+
export {};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export { default as MultiSelect } from './multi-select.js';
|
|
2
|
+
export { multiSelectParts } from './types.js';
|
|
3
|
+
export type { MultiSelectEmptySlotProps, MultiSelectFilter, MultiSelectOption, MultiSelectOptionSlotProps, MultiSelectPart, MultiSelectPillSlotProps, MultiSelectProps, MultiSelectRadius, MultiSelectSize, MultiSelectValue, } from './types.js';
|