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,30 @@
|
|
|
1
|
+
import { MultiSelectEmptySlotProps, MultiSelectOptionSlotProps, MultiSelectPillSlotProps, MultiSelectProps, MultiSelectValue } 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<MultiSelectProps & {
|
|
4
|
+
onSearch?: ((searchValue: string) => any) | undefined;
|
|
5
|
+
"onUpdate:modelValue"?: ((value: MultiSelectValue[]) => any) | undefined;
|
|
6
|
+
}> & (typeof globalThis extends {
|
|
7
|
+
__VLS_PROPS_FALLBACK: infer P;
|
|
8
|
+
} ? P : {});
|
|
9
|
+
expose: (exposed: import('vue').ShallowUnwrapRef<{
|
|
10
|
+
nativeElement: import('vue').Ref<HTMLSelectElement | null, HTMLSelectElement | null>;
|
|
11
|
+
inputElement: import('vue').Ref<HTMLInputElement | null, HTMLInputElement | null>;
|
|
12
|
+
focus: () => void | undefined;
|
|
13
|
+
}>) => void;
|
|
14
|
+
attrs: any;
|
|
15
|
+
slots: {
|
|
16
|
+
option?(props: MultiSelectOptionSlotProps): unknown;
|
|
17
|
+
pill?(props: MultiSelectPillSlotProps): unknown;
|
|
18
|
+
empty?(props: MultiSelectEmptySlotProps): unknown;
|
|
19
|
+
};
|
|
20
|
+
emit: ((evt: "search", searchValue: string) => void) & ((evt: "update:modelValue", value: MultiSelectValue[]) => void);
|
|
21
|
+
}>) => import('vue').VNode & {
|
|
22
|
+
__ctx?: NonNullable<Awaited<typeof __VLS_setup>>;
|
|
23
|
+
};
|
|
24
|
+
declare const _default: typeof __VLS_export;
|
|
25
|
+
export default _default;
|
|
26
|
+
type __VLS_PrettifyLocal<T> = (T extends any ? {
|
|
27
|
+
[K in keyof T]: T[K];
|
|
28
|
+
} : {
|
|
29
|
+
[K in keyof T as K]: T[K];
|
|
30
|
+
}) & {};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { MultiSelectOption, MultiSelectValue } from './types.js';
|
|
2
|
+
export declare function getMultiSelectSelectedOptions(options: readonly MultiSelectOption[] | undefined, values: readonly MultiSelectValue[]): MultiSelectOption[];
|
|
3
|
+
export declare function toggleMultiSelectValue(values: readonly MultiSelectValue[], value: MultiSelectValue, maxValues?: number): MultiSelectValue[];
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { InputHTMLAttributes } from 'vue';
|
|
2
|
+
import { StylesApiProps } from '../../styles-api.js';
|
|
3
|
+
export type MultiSelectValue = string | number;
|
|
4
|
+
export interface MultiSelectOption {
|
|
5
|
+
label: string;
|
|
6
|
+
value: MultiSelectValue;
|
|
7
|
+
disabled?: boolean;
|
|
8
|
+
}
|
|
9
|
+
export type MultiSelectFilter = (option: MultiSelectOption, searchValue: string) => boolean;
|
|
10
|
+
export type MultiSelectRadius = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
11
|
+
export type MultiSelectSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
12
|
+
export interface MultiSelectOptionSlotProps {
|
|
13
|
+
option: MultiSelectOption;
|
|
14
|
+
selected: boolean;
|
|
15
|
+
highlighted: boolean;
|
|
16
|
+
}
|
|
17
|
+
export interface MultiSelectPillSlotProps {
|
|
18
|
+
option: MultiSelectOption;
|
|
19
|
+
}
|
|
20
|
+
export interface MultiSelectEmptySlotProps {
|
|
21
|
+
searchValue: string;
|
|
22
|
+
}
|
|
23
|
+
export interface MultiSelectProps extends StylesApiProps<MultiSelectPart> {
|
|
24
|
+
id?: string;
|
|
25
|
+
name?: string;
|
|
26
|
+
form?: string;
|
|
27
|
+
modelValue?: MultiSelectValue[];
|
|
28
|
+
defaultValue?: MultiSelectValue[];
|
|
29
|
+
options?: MultiSelectOption[];
|
|
30
|
+
filter?: MultiSelectFilter | false;
|
|
31
|
+
maxValues?: number;
|
|
32
|
+
size?: MultiSelectSize;
|
|
33
|
+
radius?: MultiSelectRadius;
|
|
34
|
+
placeholder?: string;
|
|
35
|
+
clearable?: boolean;
|
|
36
|
+
clearLabel?: string;
|
|
37
|
+
removeLabel?: string;
|
|
38
|
+
toggleLabel?: string;
|
|
39
|
+
disabled?: boolean;
|
|
40
|
+
required?: boolean;
|
|
41
|
+
invalid?: boolean;
|
|
42
|
+
ariaLabel?: string;
|
|
43
|
+
describedby?: string;
|
|
44
|
+
labelledby?: string;
|
|
45
|
+
inputAttrs?: InputHTMLAttributes;
|
|
46
|
+
validationMessage?: string;
|
|
47
|
+
}
|
|
48
|
+
export declare const multiSelectParts: readonly ["root", "pills", "pill", "pillLabel", "pillRemove", "input", "indicator", "clear", "toggle", "content", "option", "empty"];
|
|
49
|
+
export type MultiSelectPart = (typeof multiSelectParts)[number];
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { CSSProperties, ComputedRef, Ref, SelectHTMLAttributes } from 'vue';
|
|
2
|
+
import { ControlState } from '../../internal/composables/useControlState.js';
|
|
3
|
+
import { FlatOptionState } from '../../internal/composables/useFlatOptionCollection.js';
|
|
4
|
+
import { ComponentElementRef } from '../../utils/dom/componentRef.js';
|
|
5
|
+
import { FloatingPlacement, FloatingSide } from '../floating/types.js';
|
|
6
|
+
import { MultiSelectOption, MultiSelectProps, MultiSelectValue } from './types.js';
|
|
7
|
+
export interface MultiSelectControl {
|
|
8
|
+
templateRefs: {
|
|
9
|
+
root: Ref<HTMLElement | null>;
|
|
10
|
+
input: Ref<HTMLInputElement | null>;
|
|
11
|
+
native: Ref<HTMLSelectElement | null>;
|
|
12
|
+
};
|
|
13
|
+
nativeSelectAttrs: ComputedRef<SelectHTMLAttributes>;
|
|
14
|
+
isOpen: Ref<boolean>;
|
|
15
|
+
popupId: string;
|
|
16
|
+
listboxId: string;
|
|
17
|
+
control: ControlState;
|
|
18
|
+
visibleOptions: ComputedRef<MultiSelectOption[]>;
|
|
19
|
+
renderedOptions: ComputedRef<readonly FlatOptionState<MultiSelectOption>[]>;
|
|
20
|
+
selectedOptions: ComputedRef<MultiSelectOption[]>;
|
|
21
|
+
activeDescendantId: ComputedRef<string | undefined>;
|
|
22
|
+
rootClass: ComputedRef<string[]>;
|
|
23
|
+
floatingStyle: Readonly<Ref<CSSProperties>>;
|
|
24
|
+
actualPlacement: Readonly<Ref<FloatingPlacement>>;
|
|
25
|
+
placementSide: ComputedRef<FloatingSide>;
|
|
26
|
+
searchValue: Ref<string>;
|
|
27
|
+
canClear: ComputedRef<boolean>;
|
|
28
|
+
setDropdownElement: (elementRef: ComponentElementRef) => void;
|
|
29
|
+
toggle: () => void;
|
|
30
|
+
selectOption: (option: MultiSelectOption) => void;
|
|
31
|
+
removeOption: (option: MultiSelectOption) => void;
|
|
32
|
+
clearSelection: () => void;
|
|
33
|
+
onOptionMouseenter: (option: MultiSelectOption) => void;
|
|
34
|
+
onRootMousedown: (event: MouseEvent) => void;
|
|
35
|
+
onFocusout: (event: FocusEvent) => void;
|
|
36
|
+
onInput: (event: Event) => void;
|
|
37
|
+
onInputFocus: () => void;
|
|
38
|
+
onInputClick: () => void;
|
|
39
|
+
onInputKeydown: (event: KeyboardEvent) => void;
|
|
40
|
+
}
|
|
41
|
+
interface MultiSelectCallbacks {
|
|
42
|
+
valueChange: (value: MultiSelectValue[]) => void;
|
|
43
|
+
search: (searchValue: string) => void;
|
|
44
|
+
}
|
|
45
|
+
export declare function useMultiSelect(props: Readonly<MultiSelectProps>, callbacks: MultiSelectCallbacks): MultiSelectControl;
|
|
46
|
+
export {};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { NumberInputControlsPosition, NumberInputTextAlign, NumberInputValue } from './types.js';
|
|
2
|
+
export interface NumberInputBounds {
|
|
3
|
+
min: number | undefined;
|
|
4
|
+
max: number | undefined;
|
|
5
|
+
}
|
|
6
|
+
export type NumberInputControl = 'decrement' | 'increment';
|
|
7
|
+
export type NumberInputStepDirection = -1 | 1;
|
|
8
|
+
export declare function normalizeNumberInputBounds(min: number | undefined, max: number | undefined): NumberInputBounds;
|
|
9
|
+
export declare function normalizeNumberInputStep(step: number | undefined): number;
|
|
10
|
+
export declare function clampNumberInputValue(value: number, bounds: NumberInputBounds): number;
|
|
11
|
+
export declare function stepNumberInputValue(value: NumberInputValue, direction: NumberInputStepDirection, step: number, bounds: NumberInputBounds): number;
|
|
12
|
+
export declare function parseNumberInputValue(value: string): NumberInputValue;
|
|
13
|
+
export declare function normalizeNumberInputControlsPosition(position: NumberInputControlsPosition | undefined): NumberInputControlsPosition;
|
|
14
|
+
export declare function normalizeNumberInputTextAlign(textAlign: NumberInputTextAlign | undefined): NumberInputTextAlign;
|
|
15
|
+
export declare function getModelInputValue(value: NumberInputValue): string;
|
|
@@ -1,24 +1,9 @@
|
|
|
1
1
|
import { InputHTMLAttributes } from 'vue';
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
max: number | undefined;
|
|
6
|
-
}
|
|
7
|
-
type StepDirection = -1 | 1;
|
|
8
|
-
export type NumberInputControl = 'decrement' | 'increment';
|
|
9
|
-
export declare function normalizeNumberInputBounds(min: number | undefined, max: number | undefined): NumberInputBounds;
|
|
10
|
-
export declare function normalizeNumberInputStep(step: number | undefined): number;
|
|
11
|
-
export declare function clampNumberInputValue(value: number, bounds: NumberInputBounds): number;
|
|
12
|
-
export declare function stepNumberInputValue(value: NumberInputValue, direction: StepDirection, step: number, bounds: NumberInputBounds): number;
|
|
13
|
-
export declare function parseNumberInputValue(value: string): NumberInputValue;
|
|
14
|
-
export declare function normalizeNumberInputControlsPosition(position: NumberInputControlsPosition | undefined): NumberInputControlsPosition;
|
|
15
|
-
export declare function normalizeNumberInputTextAlign(textAlign: NumberInputTextAlign | undefined): NumberInputTextAlign;
|
|
16
|
-
export declare function getModelInputValue(value: NumberInputValue): string;
|
|
17
|
-
export declare function useNumberInput(props: Readonly<NumberInputProps>, emitUpdate: (value: NumberInputValue) => void, getValue?: () => NumberInputValue): {
|
|
2
|
+
import { NumberInputControl } from './numberInputModel.js';
|
|
3
|
+
import { NumberInputProps, NumberInputValue } from './types.js';
|
|
4
|
+
export declare function useNumberInput(props: Readonly<NumberInputProps>, onUpdate: (value: NumberInputValue) => void): {
|
|
18
5
|
control: import('../../internal/composables/useControlState.js').ControlState;
|
|
19
6
|
rootClass: import('vue').ComputedRef<string[]>;
|
|
20
|
-
bounds: import('vue').ComputedRef<NumberInputBounds>;
|
|
21
|
-
nativeStep: import('vue').ComputedRef<number>;
|
|
22
7
|
nativeInputAttrs: import('vue').ComputedRef<InputHTMLAttributes>;
|
|
23
8
|
modelInputValue: import('vue').ComputedRef<string>;
|
|
24
9
|
leftControls: import('vue').ComputedRef<NumberInputControl[]>;
|
|
@@ -29,4 +14,3 @@ export declare function useNumberInput(props: Readonly<NumberInputProps>, emitUp
|
|
|
29
14
|
decrement: () => boolean;
|
|
30
15
|
onInputUpdate: (value: string) => void;
|
|
31
16
|
};
|
|
32
|
-
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export { default as Pagination } from './pagination.js';
|
|
2
2
|
export { paginationColors, paginationParts, paginationRadiuses, paginationSizes } from './types.js';
|
|
3
|
-
export type { PaginationColor, PaginationControl, PaginationControlSlotProps, PaginationEllipsisItem, PaginationGetPageAriaLabel, PaginationItem, PaginationPageItem, PaginationPageSlotProps, PaginationPart, PaginationProps, PaginationRadius, PaginationSize, } from './types.js';
|
|
3
|
+
export type { PaginationColor, PaginationControl, PaginationControlSlotProps, PaginationEllipsisItem, PaginationGetPageAriaLabel, PaginationItem, PaginationPageItem, PaginationPageSlotProps, PaginationPart, PaginationProps, PaginationRadius, PaginationSize, UsePaginationReturn, } from './types.js';
|
|
4
4
|
export { getPaginationItems, normalizePaginationPage, normalizePaginationTotal, usePagination, } from './usePagination.js';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as pagination_default, c as
|
|
1
|
+
import { a as pagination_default, c as normalizePaginationPage, i as paginationSizes, l as normalizePaginationTotal, n as paginationParts, o as usePagination, r as paginationRadiuses, s as getPaginationItems, t as paginationColors } from "../../pagination.js";
|
|
2
2
|
export { pagination_default as Pagination, getPaginationItems, normalizePaginationPage, normalizePaginationTotal, paginationColors, paginationParts, paginationRadiuses, paginationSizes, usePagination };
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { PaginationItem } from './types.js';
|
|
2
|
+
export declare function normalizePaginationTotal(total: number): number;
|
|
3
|
+
export declare function normalizePaginationPage(page: number, total: number): number;
|
|
4
|
+
export declare function getPaginationItems(total: number, page: number, siblings?: number, boundaries?: number): PaginationItem[];
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { ComponentColorValue } from '../../utils/componentColors.js';
|
|
2
2
|
import { StylesApiProps } from '../../styles-api.js';
|
|
3
|
+
import { ComputedRef, CSSProperties } from 'vue';
|
|
3
4
|
export declare const paginationParts: readonly ["root", "items", "control", "page", "ellipsis"];
|
|
4
5
|
export type PaginationPart = (typeof paginationParts)[number];
|
|
5
6
|
export declare const paginationColors: readonly ["dark", "gray", "red", "pink", "grape", "violet", "indigo", "blue", "cyan", "teal", "green", "lime", "yellow", "orange"];
|
|
@@ -52,3 +53,17 @@ export interface PaginationProps extends StylesApiProps<PaginationPart> {
|
|
|
52
53
|
lastLabel?: string;
|
|
53
54
|
getPageAriaLabel?: PaginationGetPageAriaLabel;
|
|
54
55
|
}
|
|
56
|
+
export interface UsePaginationReturn {
|
|
57
|
+
totalPages: ComputedRef<number>;
|
|
58
|
+
currentPage: ComputedRef<number>;
|
|
59
|
+
items: ComputedRef<PaginationItem[]>;
|
|
60
|
+
rootClass: ComputedRef<string[]>;
|
|
61
|
+
rootStyle: ComputedRef<CSSProperties | undefined>;
|
|
62
|
+
firstPage: ComputedRef<number>;
|
|
63
|
+
previousPage: ComputedRef<number>;
|
|
64
|
+
nextPage: ComputedRef<number>;
|
|
65
|
+
lastPage: ComputedRef<number>;
|
|
66
|
+
isFirstDisabled: ComputedRef<boolean>;
|
|
67
|
+
isLastDisabled: ComputedRef<boolean>;
|
|
68
|
+
selectPage: (page: number) => boolean;
|
|
69
|
+
}
|
|
@@ -1,19 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
export declare function
|
|
4
|
-
export declare function normalizePaginationPage(page: number, total: number): number;
|
|
5
|
-
export declare function getPaginationItems(total: number, page: number, siblings?: number, boundaries?: number): PaginationItem[];
|
|
6
|
-
export declare function usePagination(props: Readonly<PaginationProps>, getCurrentValue: () => number, onChange: (page: number) => void): {
|
|
7
|
-
totalPages: import('vue').ComputedRef<number>;
|
|
8
|
-
currentPage: import('vue').ComputedRef<number>;
|
|
9
|
-
items: import('vue').ComputedRef<PaginationItem[]>;
|
|
10
|
-
rootClass: import('vue').ComputedRef<string[]>;
|
|
11
|
-
rootStyle: import('vue').ComputedRef<CSSProperties | undefined>;
|
|
12
|
-
firstPage: import('vue').ComputedRef<number>;
|
|
13
|
-
previousPage: import('vue').ComputedRef<number>;
|
|
14
|
-
nextPage: import('vue').ComputedRef<number>;
|
|
15
|
-
lastPage: import('vue').ComputedRef<number>;
|
|
16
|
-
isFirstDisabled: import('vue').ComputedRef<boolean>;
|
|
17
|
-
isLastDisabled: import('vue').ComputedRef<boolean>;
|
|
18
|
-
selectPage: (page: number) => boolean;
|
|
19
|
-
};
|
|
1
|
+
import { PaginationProps, UsePaginationReturn } from './types.js';
|
|
2
|
+
export { getPaginationItems, normalizePaginationPage, normalizePaginationTotal, } from './paginationModel.js';
|
|
3
|
+
export declare function usePagination(props: Readonly<PaginationProps>, getCurrentValue: () => number, onChange: (page: number) => void): UsePaginationReturn;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Ref } from 'vue';
|
|
2
|
+
import { FloatingTargetLifecycle } from '../floating/useFloatingTargetLifecycle.js';
|
|
3
|
+
import { PopoverRole } from './types.js';
|
|
4
|
+
interface UsePopoverBindingsOptions {
|
|
5
|
+
targetLifecycle: FloatingTargetLifecycle;
|
|
6
|
+
popoverId: Readonly<Ref<string>>;
|
|
7
|
+
popoverRole: Readonly<Ref<PopoverRole>>;
|
|
8
|
+
isVisible: Readonly<Ref<boolean>>;
|
|
9
|
+
isDisabled: Readonly<Ref<boolean>>;
|
|
10
|
+
onTriggerClick: () => void;
|
|
11
|
+
}
|
|
12
|
+
export declare function usePopoverBindings({ targetLifecycle, popoverId, popoverRole, isVisible, isDisabled, onTriggerClick, }: UsePopoverBindingsOptions): void;
|
|
13
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ProgressProps } from './types.js';
|
|
2
|
+
export declare function normalizeProgressBounds(min: number, max: number): {
|
|
3
|
+
min: number;
|
|
4
|
+
max: number;
|
|
5
|
+
};
|
|
6
|
+
export declare function normalizeProgressValue(value: number | null | undefined, min: number, max: number): number;
|
|
7
|
+
export declare function formatProgressValue(value: number, percent: number, formatter: ProgressProps['formatValue']): string | number;
|
|
8
|
+
export declare function getProgressAriaValueText(value: number, percent: number, ariaValueText: ProgressProps['ariaValueText'], formatter: ProgressProps['formatValue']): string | undefined;
|
|
@@ -6,12 +6,6 @@ type ProgressStateProps = Readonly<ProgressProps & {
|
|
|
6
6
|
indeterminate: boolean;
|
|
7
7
|
showValue: boolean;
|
|
8
8
|
}>;
|
|
9
|
-
export declare function normalizeProgressBounds(min: number, max: number): {
|
|
10
|
-
min: number;
|
|
11
|
-
max: number;
|
|
12
|
-
};
|
|
13
|
-
export declare function normalizeProgressValue(value: number | null | undefined, min: number, max: number): number;
|
|
14
|
-
export declare function getProgressValuePercent(value: number, min: number, max: number): number;
|
|
15
9
|
export declare function useProgress(props: ProgressStateProps): {
|
|
16
10
|
control: import('../../internal/composables/useControlState.js').ControlState;
|
|
17
11
|
rootClass: import('vue').ComputedRef<string[]>;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { CSSProperties } from 'vue';
|
|
2
1
|
import { RadioGroupProps, RadioProps } from './types.js';
|
|
3
2
|
export declare function useRadio(props: Readonly<RadioProps>, emitChange: (event: Event) => void): {
|
|
4
3
|
inputRef: import('vue').Ref<HTMLInputElement | null, HTMLInputElement | null>;
|
|
@@ -11,7 +10,7 @@ export declare function useRadio(props: Readonly<RadioProps>, emitChange: (event
|
|
|
11
10
|
isRequired: import('vue').ComputedRef<boolean>;
|
|
12
11
|
isInvalid: import('vue').ComputedRef<boolean>;
|
|
13
12
|
rootClass: import('vue').ComputedRef<string[]>;
|
|
14
|
-
rootStyle: import('vue').ComputedRef<
|
|
13
|
+
rootStyle: import('vue').ComputedRef<Record<string, string> | undefined>;
|
|
15
14
|
onSelect: (event: Event) => void;
|
|
16
15
|
focus: (options?: FocusOptions) => void;
|
|
17
16
|
};
|
|
@@ -16,7 +16,7 @@ declare const __VLS_export: (__VLS_props: NonNullable<Awaited<typeof __VLS_setup
|
|
|
16
16
|
default: string;
|
|
17
17
|
};
|
|
18
18
|
scrollbarSize: {
|
|
19
|
-
type: (
|
|
19
|
+
type: (NumberConstructor | StringConstructor)[];
|
|
20
20
|
default: number;
|
|
21
21
|
};
|
|
22
22
|
scrollHideDelay: {
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { CSSProperties } from 'vue';
|
|
2
|
+
import { ScrollAxis, ScrollDirection } from '../../utils/dom/scroll.js';
|
|
3
|
+
import { ScrollAreaPosition, ScrollAreaScrollbars, ScrollAreaType } from './types.js';
|
|
4
|
+
export type ScrollBoundary = 'top' | 'bottom' | 'left' | 'right';
|
|
5
|
+
export interface ScrollAreaMetrics {
|
|
6
|
+
direction: ScrollDirection;
|
|
7
|
+
clientWidth: number;
|
|
8
|
+
clientHeight: number;
|
|
9
|
+
scrollWidth: number;
|
|
10
|
+
scrollHeight: number;
|
|
11
|
+
x: number;
|
|
12
|
+
y: number;
|
|
13
|
+
overflowX: boolean;
|
|
14
|
+
overflowY: boolean;
|
|
15
|
+
horizontalThumbSize: number;
|
|
16
|
+
horizontalThumbOffset: number;
|
|
17
|
+
verticalThumbSize: number;
|
|
18
|
+
verticalThumbOffset: number;
|
|
19
|
+
}
|
|
20
|
+
export interface ScrollAreaAxisState {
|
|
21
|
+
direction: ScrollDirection;
|
|
22
|
+
maxPosition: number;
|
|
23
|
+
overflow: boolean;
|
|
24
|
+
position: number;
|
|
25
|
+
}
|
|
26
|
+
interface ScrollbarVisibilityOptions {
|
|
27
|
+
active: boolean;
|
|
28
|
+
axis: ScrollAxis;
|
|
29
|
+
draggingAxis: ScrollAxis | null;
|
|
30
|
+
focusWithin: boolean;
|
|
31
|
+
hovered: boolean;
|
|
32
|
+
scrolling: boolean;
|
|
33
|
+
type: ScrollAreaType;
|
|
34
|
+
}
|
|
35
|
+
interface TrackPositionOptions {
|
|
36
|
+
axis: ScrollAxis;
|
|
37
|
+
coordinate: number;
|
|
38
|
+
direction: ScrollDirection;
|
|
39
|
+
maxPosition: number;
|
|
40
|
+
thumbSize: number;
|
|
41
|
+
trackSize: number;
|
|
42
|
+
trackStart: number;
|
|
43
|
+
}
|
|
44
|
+
interface DragPositionOptions {
|
|
45
|
+
coordinate: number;
|
|
46
|
+
coordinateDirection: 1 | -1;
|
|
47
|
+
maxPosition: number;
|
|
48
|
+
startCoordinate: number;
|
|
49
|
+
startPosition: number;
|
|
50
|
+
travel: number;
|
|
51
|
+
}
|
|
52
|
+
export declare function createScrollAreaMetrics(): ScrollAreaMetrics;
|
|
53
|
+
export declare function isScrollAreaAxisEnabled(scrollbars: ScrollAreaScrollbars | false | undefined, axis: ScrollAxis): boolean;
|
|
54
|
+
export declare function isScrollAreaScrollbarActive(type: ScrollAreaType, enabled: boolean, overflowing: boolean): boolean;
|
|
55
|
+
export declare function isScrollAreaScrollbarVisible({ active, axis, draggingAxis, focusWithin, hovered, scrolling, type, }: ScrollbarVisibilityOptions): boolean;
|
|
56
|
+
export declare function getScrollAreaAxisPosition(metrics: ScrollAreaMetrics, axis: ScrollAxis): number;
|
|
57
|
+
export declare function getScrollAreaMaxPosition(metrics: ScrollAreaMetrics, axis: ScrollAxis): number;
|
|
58
|
+
export declare function getScrollAreaOverflow(metrics: ScrollAreaMetrics, axis: ScrollAxis): boolean;
|
|
59
|
+
export declare function getScrollAreaAxisState(metrics: ScrollAreaMetrics, axis: ScrollAxis): ScrollAreaAxisState;
|
|
60
|
+
export declare function getReachedScrollAreaBoundaries(position: ScrollAreaPosition, previousPosition: ScrollAreaPosition, metrics: ScrollAreaMetrics): ScrollBoundary[];
|
|
61
|
+
export declare function getScrollAreaTrackPosition({ axis, coordinate, direction, maxPosition, thumbSize, trackSize, trackStart, }: TrackPositionOptions): number | undefined;
|
|
62
|
+
export declare function getScrollAreaDragPosition({ coordinate, coordinateDirection, maxPosition, startCoordinate, startPosition, travel, }: DragPositionOptions): number;
|
|
63
|
+
export declare function getScrollAreaRootStyle(scrollbarSize: number | string | undefined): CSSProperties;
|
|
64
|
+
export {};
|
|
@@ -1,59 +1,76 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
1
|
+
import { ScrollAxis } from '../../utils/dom/scroll.js';
|
|
2
|
+
import { ScrollAreaPosition, ScrollAreaProps, ScrollAreaSlotProps } from './types.js';
|
|
3
|
+
interface ScrollAreaEmit {
|
|
4
|
+
(event: 'scroll', value: Event): void;
|
|
5
|
+
(event: 'scrollPositionChange', value: ScrollAreaPosition): void;
|
|
6
|
+
(event: 'reachTop', value: Event): void;
|
|
7
|
+
(event: 'reachBottom', value: Event): void;
|
|
8
|
+
(event: 'reachLeft', value: Event): void;
|
|
9
|
+
(event: 'reachRight', value: Event): void;
|
|
10
10
|
}
|
|
11
|
-
export declare function useScrollArea(
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
scrollBy: (scrollOptions: ScrollToOptions) => void;
|
|
11
|
+
export declare function useScrollArea(props: Readonly<ScrollAreaProps>, emit: ScrollAreaEmit): {
|
|
12
|
+
templateRefs: {
|
|
13
|
+
root: import('vue').Ref<HTMLElement | null, HTMLElement | null>;
|
|
14
|
+
viewport: import('vue').Ref<HTMLElement | null, HTMLElement | null>;
|
|
15
|
+
content: import('vue').Ref<HTMLElement | null, HTMLElement | null>;
|
|
16
|
+
horizontalScrollbar: import('vue').Ref<HTMLElement | null, HTMLElement | null>;
|
|
17
|
+
verticalScrollbar: import('vue').Ref<HTMLElement | null, HTMLElement | null>;
|
|
18
|
+
};
|
|
20
19
|
renderHorizontalScrollbar: import('vue').ComputedRef<boolean>;
|
|
21
20
|
renderVerticalScrollbar: import('vue').ComputedRef<boolean>;
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
21
|
+
rootAttrs: import('vue').ComputedRef<Record<string, unknown>>;
|
|
22
|
+
viewportAttrs: import('vue').ComputedRef<import('vue').HTMLAttributes>;
|
|
23
|
+
contentAttrs: import('vue').ComputedRef<import('vue').HTMLAttributes>;
|
|
24
|
+
horizontalScrollbarAttrs: import('vue').ComputedRef<{
|
|
25
|
+
role: string;
|
|
26
|
+
tabindex: number;
|
|
27
|
+
'aria-controls': string | undefined;
|
|
28
|
+
'aria-orientation': import('./types.js').ScrollAreaOrientation;
|
|
29
|
+
'aria-valuemin': number;
|
|
30
|
+
'aria-valuemax': number;
|
|
31
|
+
'aria-valuenow': number;
|
|
32
|
+
'aria-disabled': true | undefined;
|
|
33
|
+
'aria-hidden': true | undefined;
|
|
34
|
+
'data-orientation': string;
|
|
35
|
+
'data-direction': import('../../utils/dom/direction.js').ElementDirection;
|
|
36
|
+
'data-active': "" | undefined;
|
|
37
|
+
'data-visible': "" | undefined;
|
|
38
|
+
class?: import('vue').ClassValue;
|
|
39
|
+
style?: import('vue').StyleValue;
|
|
40
|
+
}>;
|
|
41
|
+
verticalScrollbarAttrs: import('vue').ComputedRef<{
|
|
42
|
+
role: string;
|
|
43
|
+
tabindex: number;
|
|
44
|
+
'aria-controls': string | undefined;
|
|
45
|
+
'aria-orientation': import('./types.js').ScrollAreaOrientation;
|
|
46
|
+
'aria-valuemin': number;
|
|
47
|
+
'aria-valuemax': number;
|
|
48
|
+
'aria-valuenow': number;
|
|
49
|
+
'aria-disabled': true | undefined;
|
|
50
|
+
'aria-hidden': true | undefined;
|
|
51
|
+
'data-orientation': string;
|
|
52
|
+
'data-direction': import('../../utils/dom/direction.js').ElementDirection;
|
|
53
|
+
'data-active': "" | undefined;
|
|
54
|
+
'data-visible': "" | undefined;
|
|
55
|
+
class?: import('vue').ClassValue;
|
|
56
|
+
style?: import('vue').StyleValue;
|
|
57
|
+
}>;
|
|
58
|
+
horizontalThumbAttrs: import('vue').ComputedRef<Pick<import('vue').HTMLAttributes, "class" | "style">>;
|
|
59
|
+
verticalThumbAttrs: import('vue').ComputedRef<Pick<import('vue').HTMLAttributes, "class" | "style">>;
|
|
60
|
+
cornerAttrs: import('vue').ComputedRef<{
|
|
61
|
+
'aria-hidden': boolean;
|
|
62
|
+
'data-direction': import('../../utils/dom/direction.js').ElementDirection;
|
|
63
|
+
'data-visible': "" | undefined;
|
|
64
|
+
class?: import('vue').ClassValue;
|
|
65
|
+
style?: import('vue').StyleValue;
|
|
66
|
+
}>;
|
|
67
|
+
slotProps: import('vue').ComputedRef<ScrollAreaSlotProps>;
|
|
68
|
+
onScrollbarKeydown: (axis: ScrollAxis, event: KeyboardEvent) => void;
|
|
69
|
+
onScrollbarWheel: (axis: ScrollAxis, event: WheelEvent) => void;
|
|
70
|
+
onScrollbarPointerdown: (axis: ScrollAxis, event: PointerEvent) => void;
|
|
71
|
+
onThumbPointerdown: (axis: ScrollAxis, event: PointerEvent) => boolean;
|
|
72
|
+
scrollTo: (scrollOptions: ScrollToOptions) => void;
|
|
73
|
+
scrollBy: (scrollOptions: ScrollToOptions) => void;
|
|
53
74
|
update: () => void;
|
|
54
|
-
getPosition: (axis: import('./scrollAreaCore.js').ScrollAxis) => number;
|
|
55
|
-
getMaxPosition: (axis: import('./scrollAreaCore.js').ScrollAxis) => number;
|
|
56
|
-
getOverflow: (axis: import('./scrollAreaCore.js').ScrollAxis) => boolean;
|
|
57
75
|
};
|
|
58
|
-
export type ScrollAreaController = ReturnType<typeof useScrollArea>;
|
|
59
76
|
export {};
|
package/dist/components/scroll-area/{useScrollAreaPresentation.d.ts → useScrollAreaAttributes.d.ts}
RENAMED
|
@@ -1,10 +1,35 @@
|
|
|
1
|
-
import { HTMLAttributes } from 'vue';
|
|
2
|
-
import {
|
|
3
|
-
import { ScrollAreaOrientation, ScrollAreaProps
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
import { HTMLAttributes, Ref } from 'vue';
|
|
2
|
+
import { ScrollAreaMetrics } from './scrollAreaModel.js';
|
|
3
|
+
import { ScrollAreaOrientation, ScrollAreaProps } from './types.js';
|
|
4
|
+
interface ScrollAreaRootHandlers {
|
|
5
|
+
onFocusin: () => void;
|
|
6
|
+
onFocusout: (event: FocusEvent) => void;
|
|
7
|
+
onPointerenter: () => void;
|
|
8
|
+
onPointerleave: () => void;
|
|
9
|
+
}
|
|
10
|
+
interface ScrollAreaAttributeState {
|
|
11
|
+
horizontalActive: Readonly<Ref<boolean>>;
|
|
12
|
+
horizontalVisible: Readonly<Ref<boolean>>;
|
|
13
|
+
verticalActive: Readonly<Ref<boolean>>;
|
|
14
|
+
verticalVisible: Readonly<Ref<boolean>>;
|
|
15
|
+
}
|
|
16
|
+
interface UseScrollAreaAttributesOptions {
|
|
17
|
+
metrics: ScrollAreaMetrics;
|
|
18
|
+
onViewportScroll: (event: Event) => void;
|
|
19
|
+
props: Readonly<ScrollAreaProps>;
|
|
20
|
+
rootHandlers: ScrollAreaRootHandlers;
|
|
21
|
+
state: ScrollAreaAttributeState;
|
|
22
|
+
viewport: Ref<HTMLElement | null>;
|
|
23
|
+
}
|
|
24
|
+
export declare function useScrollAreaAttributes({ metrics, onViewportScroll, props, rootHandlers, state, viewport, }: UseScrollAreaAttributesOptions): {
|
|
7
25
|
contentAttrs: import('vue').ComputedRef<HTMLAttributes>;
|
|
26
|
+
cornerAttrs: import('vue').ComputedRef<{
|
|
27
|
+
'aria-hidden': boolean;
|
|
28
|
+
'data-direction': import('../../utils/dom/direction.js').ElementDirection;
|
|
29
|
+
'data-visible': "" | undefined;
|
|
30
|
+
class?: import('vue').ClassValue;
|
|
31
|
+
style?: import('vue').StyleValue;
|
|
32
|
+
}>;
|
|
8
33
|
horizontalScrollbarAttrs: import('vue').ComputedRef<{
|
|
9
34
|
role: string;
|
|
10
35
|
tabindex: number;
|
|
@@ -16,12 +41,14 @@ export declare function useScrollAreaPresentation(props: Readonly<ScrollAreaProp
|
|
|
16
41
|
'aria-disabled': true | undefined;
|
|
17
42
|
'aria-hidden': true | undefined;
|
|
18
43
|
'data-orientation': string;
|
|
19
|
-
'data-direction': import('
|
|
44
|
+
'data-direction': import('../../utils/dom/direction.js').ElementDirection;
|
|
20
45
|
'data-active': "" | undefined;
|
|
21
46
|
'data-visible': "" | undefined;
|
|
22
47
|
class?: import('vue').ClassValue;
|
|
23
48
|
style?: import('vue').StyleValue;
|
|
24
49
|
}>;
|
|
50
|
+
horizontalThumbAttrs: import('vue').ComputedRef<Pick<HTMLAttributes, "class" | "style">>;
|
|
51
|
+
rootAttrs: import('vue').ComputedRef<Record<string, unknown>>;
|
|
25
52
|
verticalScrollbarAttrs: import('vue').ComputedRef<{
|
|
26
53
|
role: string;
|
|
27
54
|
tabindex: number;
|
|
@@ -33,20 +60,13 @@ export declare function useScrollAreaPresentation(props: Readonly<ScrollAreaProp
|
|
|
33
60
|
'aria-disabled': true | undefined;
|
|
34
61
|
'aria-hidden': true | undefined;
|
|
35
62
|
'data-orientation': string;
|
|
36
|
-
'data-direction': import('
|
|
63
|
+
'data-direction': import('../../utils/dom/direction.js').ElementDirection;
|
|
37
64
|
'data-active': "" | undefined;
|
|
38
65
|
'data-visible': "" | undefined;
|
|
39
66
|
class?: import('vue').ClassValue;
|
|
40
67
|
style?: import('vue').StyleValue;
|
|
41
68
|
}>;
|
|
42
|
-
horizontalThumbAttrs: import('vue').ComputedRef<Pick<HTMLAttributes, "class" | "style">>;
|
|
43
69
|
verticalThumbAttrs: import('vue').ComputedRef<Pick<HTMLAttributes, "class" | "style">>;
|
|
44
|
-
|
|
45
|
-
'aria-hidden': boolean;
|
|
46
|
-
'data-direction': import('./scrollAreaCore.js').ScrollDirection;
|
|
47
|
-
'data-visible': "" | undefined;
|
|
48
|
-
class?: import('vue').ClassValue;
|
|
49
|
-
style?: import('vue').StyleValue;
|
|
50
|
-
}>;
|
|
51
|
-
slotProps: import('vue').ComputedRef<ScrollAreaSlotProps>;
|
|
70
|
+
viewportAttrs: import('vue').ComputedRef<HTMLAttributes>;
|
|
52
71
|
};
|
|
72
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ScrollAreaMetrics } from './scrollAreaModel.js';
|
|
2
|
+
import { ScrollAreaProps } from './types.js';
|
|
3
|
+
export declare function useScrollAreaDerivedState(props: Readonly<ScrollAreaProps>, metrics: ScrollAreaMetrics): {
|
|
4
|
+
horizontalScrollbarActive: import('vue').ComputedRef<boolean>;
|
|
5
|
+
renderHorizontalScrollbar: import('vue').ComputedRef<boolean>;
|
|
6
|
+
renderVerticalScrollbar: import('vue').ComputedRef<boolean>;
|
|
7
|
+
verticalScrollbarActive: import('vue').ComputedRef<boolean>;
|
|
8
|
+
};
|