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
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { DropdownMenuFocusTarget, DropdownMenuItem, DropdownMenuItemPath, DropdownMenuOpenOptions, DropdownMenuPlacement } from './types.js';
|
|
2
|
-
export declare const DEFAULT_PLACEMENT: DropdownMenuPlacement;
|
|
3
|
-
export declare const DEFAULT_FOCUS_TARGET: DropdownMenuFocusTarget;
|
|
4
|
-
export type ItemPath = DropdownMenuItemPath;
|
|
5
|
-
export type SubmenuFocusTarget = DropdownMenuFocusTarget | false;
|
|
6
|
-
export type PointerPoint = {
|
|
7
|
-
x: number;
|
|
8
|
-
y: number;
|
|
9
|
-
};
|
|
10
|
-
export declare function getOpenFocusTarget(options: DropdownMenuOpenOptions | DropdownMenuFocusTarget | undefined): DropdownMenuFocusTarget;
|
|
11
|
-
export declare function getItemClass(item: DropdownMenuItem, focused: boolean, disabled: boolean, hasSubmenu: boolean, submenuOpen: boolean): string[];
|
|
12
|
-
export declare function hasItemSubmenu(item: DropdownMenuItem): boolean;
|
|
13
|
-
export declare function hasNestedItems(items: DropdownMenuItem[]): boolean;
|
|
14
|
-
export declare function getPathKey(path: ItemPath): string;
|
|
15
|
-
export declare function getParentPath(path: ItemPath): number[];
|
|
16
|
-
export declare function arePathsEqual(a: ItemPath, b: ItemPath): boolean;
|
|
17
|
-
export declare function isPathPrefix(prefix: ItemPath, path: ItemPath): boolean;
|
|
18
|
-
export declare function normalizePath(indexOrPath: number | ItemPath): ItemPath;
|
|
19
|
-
export declare function getEventPoint(event: MouseEvent): PointerPoint;
|
|
20
|
-
export declare function hasMeasuredRect(rect: DOMRect): boolean;
|
|
21
|
-
export declare function isPointInRect(point: PointerPoint, rect: DOMRect, padding?: number): boolean;
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import { Ref } from 'vue';
|
|
2
|
-
import { OverlayLayerContext } from '../../internal/composables/useOverlayLayer.js';
|
|
3
|
-
import { DropdownMenuCloseOptions, DropdownMenuFocusTarget, DropdownMenuInteractOutsideEvent, DropdownMenuItem, DropdownMenuOpenOptions, DropdownMenuProps, DropdownMenuSelectEvent } from './types.js';
|
|
4
|
-
import { ItemPath } from './dropdown-menu-utils.js';
|
|
5
|
-
type BooleanSource = Readonly<Ref<boolean>>;
|
|
6
|
-
type UseDropdownMenuDisclosureOptions = {
|
|
7
|
-
props: Readonly<DropdownMenuProps>;
|
|
8
|
-
emit: {
|
|
9
|
-
select?: (item: DropdownMenuItem, event: DropdownMenuSelectEvent) => void;
|
|
10
|
-
pointerDownOutside?: (event: DropdownMenuInteractOutsideEvent) => void;
|
|
11
|
-
focusOutside?: (event: DropdownMenuInteractOutsideEvent) => void;
|
|
12
|
-
interactOutside?: (event: DropdownMenuInteractOutsideEvent) => void;
|
|
13
|
-
};
|
|
14
|
-
rootRef: Ref<HTMLElement | null>;
|
|
15
|
-
menuRef: Ref<HTMLElement | null>;
|
|
16
|
-
targetRef: Readonly<Ref<Element | null>>;
|
|
17
|
-
setControllableOpen: (open: boolean) => void;
|
|
18
|
-
isDisabled: BooleanSource;
|
|
19
|
-
isOpen: BooleanSource;
|
|
20
|
-
isVisible: BooleanSource;
|
|
21
|
-
focusedPath: Ref<ItemPath>;
|
|
22
|
-
resetFocus: () => void;
|
|
23
|
-
resetSubmenus: () => void;
|
|
24
|
-
resetHoverIntent: () => void;
|
|
25
|
-
focusItem: (target: DropdownMenuFocusTarget, menuPath?: ItemPath) => boolean;
|
|
26
|
-
focusMenu: () => void;
|
|
27
|
-
focusTrigger: () => void;
|
|
28
|
-
layer: OverlayLayerContext;
|
|
29
|
-
};
|
|
30
|
-
export declare function useDropdownMenuDisclosure({ props, emit, rootRef, menuRef, targetRef, setControllableOpen, isDisabled, isOpen, isVisible, focusedPath, resetFocus, resetSubmenus, resetHoverIntent, focusItem, focusMenu, focusTrigger, layer, }: UseDropdownMenuDisclosureOptions): {
|
|
31
|
-
open: (options?: DropdownMenuOpenOptions | DropdownMenuFocusTarget) => void;
|
|
32
|
-
close: (options?: DropdownMenuCloseOptions) => void;
|
|
33
|
-
toggle: () => void;
|
|
34
|
-
resetMenuFocus: () => void;
|
|
35
|
-
};
|
|
36
|
-
export {};
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { Ref } from 'vue';
|
|
2
|
-
import { DropdownMenuPlacement } from './types.js';
|
|
3
|
-
import { ItemPath } from './dropdown-menu-utils.js';
|
|
4
|
-
type StringSource = {
|
|
5
|
-
readonly value: string;
|
|
6
|
-
};
|
|
7
|
-
type PlacementSource = {
|
|
8
|
-
readonly value: DropdownMenuPlacement;
|
|
9
|
-
};
|
|
10
|
-
type UseDropdownMenuDomOptions = {
|
|
11
|
-
menuId: StringSource;
|
|
12
|
-
rootRef: Ref<HTMLElement | null>;
|
|
13
|
-
menuRef: Ref<HTMLElement | null>;
|
|
14
|
-
targetRef: Readonly<Ref<Element | null>>;
|
|
15
|
-
placement: PlacementSource;
|
|
16
|
-
focusedPath: Ref<ItemPath>;
|
|
17
|
-
};
|
|
18
|
-
export declare function useDropdownMenuDom({ menuId, rootRef, menuRef, targetRef, placement, focusedPath, }: UseDropdownMenuDomOptions): {
|
|
19
|
-
activeDescendantId: import('vue').ComputedRef<string | undefined>;
|
|
20
|
-
focusMenu: () => void;
|
|
21
|
-
focusTrigger: () => void;
|
|
22
|
-
getItemId: (indexOrPath: number | ItemPath) => string;
|
|
23
|
-
getSubmenuId: (path: ItemPath) => string;
|
|
24
|
-
getItemElement: (path: ItemPath) => HTMLElement | null;
|
|
25
|
-
getSubmenuElement: (path: ItemPath) => HTMLElement | null;
|
|
26
|
-
isSubmenuOpeningLeft: (path: ItemPath) => boolean;
|
|
27
|
-
getMenuActiveDescendant: (menuPath: ItemPath) => string | undefined;
|
|
28
|
-
};
|
|
29
|
-
export {};
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
import { Ref } from 'vue';
|
|
2
|
-
import { DropdownMenuCloseOptions, DropdownMenuFocusTarget, DropdownMenuItem, DropdownMenuOpenOptions, DropdownMenuProps, DropdownMenuSelectEvent } from './types.js';
|
|
3
|
-
import { ItemPath, PointerPoint, SubmenuFocusTarget } from './dropdown-menu-utils.js';
|
|
4
|
-
type BooleanSource = Readonly<Ref<boolean>>;
|
|
5
|
-
type DisclosureControls = {
|
|
6
|
-
open: (options?: DropdownMenuOpenOptions | DropdownMenuFocusTarget) => void;
|
|
7
|
-
close: (options?: DropdownMenuCloseOptions) => void;
|
|
8
|
-
toggle: () => void;
|
|
9
|
-
};
|
|
10
|
-
type SubmenuControls = {
|
|
11
|
-
closeSubmenusAfter: (menuPath: ItemPath) => void;
|
|
12
|
-
openSubmenu: (path: ItemPath, focus?: SubmenuFocusTarget) => boolean;
|
|
13
|
-
closeSubmenu: (path: ItemPath) => boolean;
|
|
14
|
-
closeCurrentSubmenu: () => boolean;
|
|
15
|
-
};
|
|
16
|
-
type HoverIntentControls = {
|
|
17
|
-
clearPendingHover: () => void;
|
|
18
|
-
resetHoverIntent: () => void;
|
|
19
|
-
trackSubmenuOpen: (path: ItemPath, point?: PointerPoint) => void;
|
|
20
|
-
handleItemHover: (item: DropdownMenuItem, path: ItemPath, event: MouseEvent | undefined, commit: (item: DropdownMenuItem, path: ItemPath, point?: PointerPoint) => void) => void;
|
|
21
|
-
handleMenuMousemove: (event: MouseEvent, commit: (item: DropdownMenuItem, path: ItemPath, point?: PointerPoint) => void) => void;
|
|
22
|
-
};
|
|
23
|
-
type UseDropdownMenuInteractionsOptions = {
|
|
24
|
-
props: Readonly<DropdownMenuProps>;
|
|
25
|
-
emit: {
|
|
26
|
-
select?: (item: DropdownMenuItem, event: DropdownMenuSelectEvent) => void;
|
|
27
|
-
};
|
|
28
|
-
isDisabled: BooleanSource;
|
|
29
|
-
focusedPath: Ref<ItemPath>;
|
|
30
|
-
openSubmenuPath: Ref<ItemPath>;
|
|
31
|
-
getItemAtPath: (path: ItemPath) => DropdownMenuItem | undefined;
|
|
32
|
-
focusItem: (target: DropdownMenuFocusTarget, menuPath?: ItemPath) => boolean;
|
|
33
|
-
moveFocus: (direction: 1 | -1) => ItemPath | undefined;
|
|
34
|
-
handleTypeahead: (event: KeyboardEvent) => boolean;
|
|
35
|
-
submenus: SubmenuControls;
|
|
36
|
-
hoverIntent: HoverIntentControls;
|
|
37
|
-
disclosure: DisclosureControls;
|
|
38
|
-
isSubmenuOpeningLeft: (path: ItemPath) => boolean;
|
|
39
|
-
};
|
|
40
|
-
export declare function useDropdownMenuInteractions({ props, emit, isDisabled, focusedPath, openSubmenuPath, getItemAtPath, focusItem, moveFocus, handleTypeahead, submenus, hoverIntent, disclosure, isSubmenuOpeningLeft, }: UseDropdownMenuInteractionsOptions): {
|
|
41
|
-
activateItem: (item: DropdownMenuItem, path: ItemPath, event?: MouseEvent | KeyboardEvent) => void;
|
|
42
|
-
selectItem: (item: DropdownMenuItem, originalEvent?: Event) => void;
|
|
43
|
-
openSubmenu: (path: ItemPath, focus?: SubmenuFocusTarget, point?: PointerPoint) => boolean;
|
|
44
|
-
closeSubmenu: (path: ItemPath) => boolean;
|
|
45
|
-
focusHoveredItem: (item: DropdownMenuItem, indexOrPath: number | ItemPath, event?: MouseEvent) => void;
|
|
46
|
-
onTriggerClick: () => void;
|
|
47
|
-
onTriggerKeydown: (event: KeyboardEvent) => void;
|
|
48
|
-
onMenuKeydown: (event: KeyboardEvent) => void;
|
|
49
|
-
onMenuMousemove: (event: MouseEvent) => void;
|
|
50
|
-
onMenuMouseleave: () => void;
|
|
51
|
-
};
|
|
52
|
-
export {};
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { DropdownMenuFocusTarget, DropdownMenuItem } from './types.js';
|
|
2
|
-
import { ItemPath } from './dropdown-menu-utils.js';
|
|
3
|
-
type DropdownMenuItemsSource = {
|
|
4
|
-
readonly value: DropdownMenuItem[];
|
|
5
|
-
};
|
|
6
|
-
export declare function useDropdownMenuNavigation(items: DropdownMenuItemsSource): {
|
|
7
|
-
focusedPath: import('vue').Ref<number[], number[] | import('./types.js').DropdownMenuItemPath>;
|
|
8
|
-
focusedIndex: import('vue').ComputedRef<number>;
|
|
9
|
-
getItemsAtPath: (path: ItemPath) => DropdownMenuItem[];
|
|
10
|
-
getItemAtPath: (path: ItemPath) => DropdownMenuItem | undefined;
|
|
11
|
-
focusItem: (target: DropdownMenuFocusTarget, menuPath?: ItemPath) => boolean;
|
|
12
|
-
resetFocus: () => void;
|
|
13
|
-
setFocusedIndex: (index: number, menuPath?: ItemPath) => boolean;
|
|
14
|
-
isItemFocused: (indexOrPath: number | ItemPath) => boolean;
|
|
15
|
-
moveFocus: (direction: 1 | -1) => number[] | undefined;
|
|
16
|
-
};
|
|
17
|
-
export {};
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { Ref } from 'vue';
|
|
2
|
-
import { DropdownMenuItem } from './types.js';
|
|
3
|
-
import { ItemPath, SubmenuFocusTarget } from './dropdown-menu-utils.js';
|
|
4
|
-
type UseDropdownSubmenusOptions = {
|
|
5
|
-
focusedPath: Ref<ItemPath>;
|
|
6
|
-
getItemAtPath: (path: ItemPath) => DropdownMenuItem | undefined;
|
|
7
|
-
focusItem: (target: Exclude<SubmenuFocusTarget, false>, menuPath?: ItemPath) => boolean;
|
|
8
|
-
};
|
|
9
|
-
export declare function useDropdownSubmenus({ focusedPath, getItemAtPath, focusItem, }: UseDropdownSubmenusOptions): {
|
|
10
|
-
openSubmenuPath: Ref<number[], number[] | import('./types.js').DropdownMenuItemPath>;
|
|
11
|
-
resetSubmenus: () => void;
|
|
12
|
-
isSubmenuOpen: (path: ItemPath) => boolean;
|
|
13
|
-
closeSubmenusAfter: (menuPath: ItemPath) => void;
|
|
14
|
-
openSubmenu: (path: ItemPath, focus?: SubmenuFocusTarget) => boolean;
|
|
15
|
-
closeSubmenu: (path: ItemPath) => boolean;
|
|
16
|
-
closeCurrentSubmenu: () => boolean;
|
|
17
|
-
};
|
|
18
|
-
export {};
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { ScrollAreaScrollbars, ScrollAreaType } from './types.js';
|
|
2
|
-
export type ScrollAxis = 'x' | 'y';
|
|
3
|
-
export type ScrollDirection = 'ltr' | 'rtl';
|
|
4
|
-
export interface ScrollAreaMetrics {
|
|
5
|
-
direction: ScrollDirection;
|
|
6
|
-
clientWidth: number;
|
|
7
|
-
clientHeight: number;
|
|
8
|
-
scrollWidth: number;
|
|
9
|
-
scrollHeight: number;
|
|
10
|
-
x: number;
|
|
11
|
-
y: number;
|
|
12
|
-
overflowX: boolean;
|
|
13
|
-
overflowY: boolean;
|
|
14
|
-
horizontalThumbSize: number;
|
|
15
|
-
horizontalThumbOffset: number;
|
|
16
|
-
verticalThumbSize: number;
|
|
17
|
-
verticalThumbOffset: number;
|
|
18
|
-
}
|
|
19
|
-
export declare function clamp(value: number, min: number, max: number): number;
|
|
20
|
-
export declare function getScrollDirection(viewport: HTMLElement): ScrollDirection;
|
|
21
|
-
export declare function getLogicalHorizontalPosition(scrollLeft: number, maxPosition: number, direction: ScrollDirection): number;
|
|
22
|
-
export declare function getRawHorizontalPosition(position: number, maxPosition: number, direction: ScrollDirection): number;
|
|
23
|
-
export declare function isAxisEnabled(scrollbars: ScrollAreaScrollbars | false | undefined, axis: ScrollAxis): boolean;
|
|
24
|
-
export declare function isScrollbarActive(type: ScrollAreaType, enabled: boolean, overflowing: boolean): boolean;
|
|
25
|
-
export declare function getThumbGeometry(trackSize: number, viewportSize: number, scrollSize: number): {
|
|
26
|
-
size: number;
|
|
27
|
-
offsetRatio: number;
|
|
28
|
-
};
|
|
29
|
-
export declare function getThumbOffset(position: number, maxPosition: number, sizeRatio: number): number;
|
|
30
|
-
export declare function getLengthValue(value: number | string | undefined): string;
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { Ref } from 'vue';
|
|
2
|
-
import { ScrollAxis } from './scrollAreaCore.js';
|
|
3
|
-
import { ScrollAreaMetricsController } from './useScrollAreaMetrics.js';
|
|
4
|
-
import { ScrollAreaPosition } from './types.js';
|
|
5
|
-
interface UseScrollAreaControlsOptions {
|
|
6
|
-
viewportRef: Ref<HTMLElement | null>;
|
|
7
|
-
metrics: ScrollAreaMetricsController;
|
|
8
|
-
showDuringScroll: () => void;
|
|
9
|
-
emitScroll: (event: Event) => void;
|
|
10
|
-
emitPositionChange: (position: ScrollAreaPosition) => void;
|
|
11
|
-
emitReachTop: (event: Event) => void;
|
|
12
|
-
emitReachBottom: (event: Event) => void;
|
|
13
|
-
emitReachLeft: (event: Event) => void;
|
|
14
|
-
emitReachRight: (event: Event) => void;
|
|
15
|
-
}
|
|
16
|
-
export declare function useScrollAreaControls(options: UseScrollAreaControlsOptions): {
|
|
17
|
-
onViewportScroll: (event: Event) => void;
|
|
18
|
-
onScrollbarKeydown: (axis: ScrollAxis, event: KeyboardEvent) => void;
|
|
19
|
-
onScrollbarWheel: (axis: ScrollAxis, event: WheelEvent) => void;
|
|
20
|
-
writeAxisPosition: (axis: ScrollAxis, value: number) => void;
|
|
21
|
-
scrollTo: (scrollOptions: ScrollToOptions) => void;
|
|
22
|
-
scrollBy: (scrollOptions: ScrollToOptions) => void;
|
|
23
|
-
};
|
|
24
|
-
export type ScrollAreaControlsController = ReturnType<typeof useScrollAreaControls>;
|
|
25
|
-
export {};
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import { Ref } from 'vue';
|
|
2
|
-
import { ScrollAxis } from './scrollAreaCore.js';
|
|
3
|
-
import { ScrollAreaPosition } from './types.js';
|
|
4
|
-
interface UseScrollAreaMetricsOptions {
|
|
5
|
-
viewportRef: Ref<HTMLElement | null>;
|
|
6
|
-
contentRef: Ref<HTMLElement | null>;
|
|
7
|
-
horizontalScrollbarRef: Ref<HTMLElement | null>;
|
|
8
|
-
verticalScrollbarRef: Ref<HTMLElement | null>;
|
|
9
|
-
horizontalEnabled: Readonly<Ref<boolean>>;
|
|
10
|
-
verticalEnabled: Readonly<Ref<boolean>>;
|
|
11
|
-
}
|
|
12
|
-
export declare function useScrollAreaMetrics(options: UseScrollAreaMetricsOptions): {
|
|
13
|
-
metrics: {
|
|
14
|
-
direction: import('./scrollAreaCore.js').ScrollDirection;
|
|
15
|
-
clientWidth: number;
|
|
16
|
-
clientHeight: number;
|
|
17
|
-
scrollWidth: number;
|
|
18
|
-
scrollHeight: number;
|
|
19
|
-
x: number;
|
|
20
|
-
y: number;
|
|
21
|
-
overflowX: boolean;
|
|
22
|
-
overflowY: boolean;
|
|
23
|
-
horizontalThumbSize: number;
|
|
24
|
-
horizontalThumbOffset: number;
|
|
25
|
-
verticalThumbSize: number;
|
|
26
|
-
verticalThumbOffset: number;
|
|
27
|
-
};
|
|
28
|
-
position: import('vue').ComputedRef<ScrollAreaPosition>;
|
|
29
|
-
update: () => void;
|
|
30
|
-
updatePosition: (viewport?: HTMLElement | null) => void;
|
|
31
|
-
scheduleUpdate: () => void;
|
|
32
|
-
schedulePositionUpdate: () => void;
|
|
33
|
-
getPosition: (axis: ScrollAxis) => number;
|
|
34
|
-
getMaxPosition: (axis: ScrollAxis) => number;
|
|
35
|
-
getOverflow: (axis: ScrollAxis) => boolean;
|
|
36
|
-
};
|
|
37
|
-
export type ScrollAreaMetricsController = ReturnType<typeof useScrollAreaMetrics>;
|
|
38
|
-
export {};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { Ref, SelectHTMLAttributes } from 'vue';
|
|
2
|
-
import { SelectProps } from './types.js';
|
|
3
|
-
import { SelectValue } from './useSelectNativeValue.js';
|
|
4
|
-
export declare function useSelectNativeControl(props: Readonly<SelectProps>, emitUpdate: (value: SelectValue) => void, triggerRef: Readonly<Ref<HTMLElement | null>>): {
|
|
5
|
-
nativeSelectRef: Ref<HTMLSelectElement | null, HTMLSelectElement | null>;
|
|
6
|
-
selectedValue: import('vue').ComputedRef<SelectValue>;
|
|
7
|
-
nativeInputAttrs: import('vue').ComputedRef<SelectHTMLAttributes>;
|
|
8
|
-
requestValueUpdate: (value: SelectValue) => void;
|
|
9
|
-
};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { SelectProps } from './types.js';
|
|
2
|
-
export type SelectValue = string | number | null;
|
|
3
|
-
export declare function useSelectNativeValue(props: Readonly<SelectProps>, emitUpdate: (value: SelectValue) => void): {
|
|
4
|
-
nativeSelectRef: import('vue').Ref<HTMLSelectElement | null, HTMLSelectElement | null>;
|
|
5
|
-
controllable: import('../../composables/useControllableValue.js').UseControllableValueReturn<SelectValue>;
|
|
6
|
-
getNativeValue: (select: HTMLSelectElement) => string | number | null;
|
|
7
|
-
syncNativeSelection: (value: SelectValue) => void;
|
|
8
|
-
requestValueUpdate: (value: SelectValue) => void;
|
|
9
|
-
};
|