ropav 0.0.8 → 0.0.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/accordion.css +10 -10
- package/dist/accordion.js +2 -2
- package/dist/alert.css +109 -0
- package/dist/alert.js +168 -0
- package/dist/aspect-ratio.css +17 -0
- package/dist/aspect-ratio.js +26 -0
- package/dist/avatar.css +97 -0
- package/dist/avatar.js +161 -0
- package/dist/badge.css +40 -115
- package/dist/badge.js +19 -16
- package/dist/base.css +609 -180
- package/dist/button-link.css +161 -0
- package/dist/button-link.js +108 -0
- package/dist/button.css +50 -229
- package/dist/button.js +7 -9
- package/dist/card.css +12 -12
- package/dist/check.js +12 -0
- package/dist/checkbox.css +16 -57
- package/dist/checkbox.js +14 -31
- package/dist/collapse.css +2 -2
- package/dist/collapse.js +1 -1
- package/dist/color-input.css +108 -0
- package/dist/color-input.js +349 -0
- package/dist/color-picker.css +304 -0
- package/dist/color-picker.js +797 -0
- package/dist/color-picker2.js +18 -0
- package/dist/color-swatch.css +50 -0
- package/dist/color-swatch.js +73 -0
- package/dist/color.js +190 -0
- package/dist/componentColors.js +206 -13
- package/dist/components/accordion/accordion-item.d.ts +4 -4
- package/dist/components/accordion/accordion.d.ts +1 -1
- package/dist/components/accordion/index.d.ts +4 -4
- package/dist/components/accordion/types.d.ts +1 -1
- package/dist/components/accordion/useAccordion.d.ts +1 -1
- package/dist/components/alert/alert.d.ts +30 -0
- package/dist/components/alert/index.d.ts +3 -0
- package/dist/components/alert/index.js +2 -0
- package/dist/components/alert/types.d.ts +20 -0
- package/dist/components/alert/useAlertColor.d.ts +3 -0
- package/dist/components/aspect-ratio/aspect-ratio.d.ts +21 -0
- package/dist/components/aspect-ratio/index.d.ts +2 -0
- package/dist/components/aspect-ratio/index.js +2 -0
- package/dist/components/aspect-ratio/types.d.ts +3 -0
- package/dist/components/avatar/avatar.d.ts +24 -0
- package/dist/components/avatar/index.d.ts +3 -0
- package/dist/components/avatar/index.js +2 -0
- package/dist/components/avatar/types.d.ts +20 -0
- package/dist/components/avatar/useAvatarColor.d.ts +3 -0
- package/dist/components/badge/badge.d.ts +1 -1
- package/dist/components/badge/index.d.ts +3 -3
- package/dist/components/badge/types.d.ts +3 -2
- package/dist/components/badge/useBadgeColor.d.ts +3 -8
- package/dist/components/button/button.d.ts +1 -1
- package/dist/components/button/index.d.ts +2 -2
- package/dist/components/button/types.d.ts +2 -1
- package/dist/components/button/useButtonColor.d.ts +3 -13
- package/dist/components/button-group/button-group.d.ts +1 -1
- package/dist/components/button-group/index.d.ts +2 -2
- package/dist/components/button-link/button-link.d.ts +27 -0
- package/dist/components/button-link/index.d.ts +2 -0
- package/dist/components/button-link/index.js +2 -0
- package/dist/components/button-link/types.d.ts +20 -0
- package/dist/components/card/card.d.ts +1 -1
- package/dist/components/card/index.d.ts +2 -2
- package/dist/components/checkbox/checkbox.d.ts +1 -1
- package/dist/components/checkbox/index.d.ts +2 -2
- package/dist/components/checkbox/types.d.ts +2 -1
- package/dist/components/checkbox/useCheckbox.d.ts +4 -6
- package/dist/components/collapse/collapse.d.ts +2 -2
- package/dist/components/collapse/index.d.ts +3 -3
- package/dist/components/collapse/useCollapse.d.ts +1 -1
- package/dist/components/color-input/color-input.d.ts +29 -0
- package/dist/components/color-input/index.d.ts +2 -0
- package/dist/components/color-input/index.js +2 -0
- package/dist/components/color-input/types.d.ts +35 -0
- package/dist/components/color-input/useColorInput.d.ts +27 -0
- package/dist/components/color-input/useColorInputEyeDropper.d.ts +13 -0
- package/dist/components/color-input/useColorInputPopover.d.ts +11 -0
- package/dist/components/color-input/useColorInputValue.d.ts +8 -0
- package/dist/components/color-picker/color-picker-saturation.d.ts +21 -0
- package/dist/components/color-picker/color-picker-slider.d.ts +21 -0
- package/dist/components/color-picker/color-picker-utils.d.ts +23 -0
- package/dist/components/color-picker/color-picker.d.ts +23 -0
- package/dist/components/color-picker/index.d.ts +3 -0
- package/dist/components/color-picker/index.js +3 -0
- package/dist/components/color-picker/types.d.ts +39 -0
- package/dist/components/color-picker/useColorPickerDrag.d.ts +16 -0
- package/dist/components/color-picker/useColorPickerSwatches.d.ts +21 -0
- package/dist/components/color-picker/useColorPickerValue.d.ts +15 -0
- package/dist/components/color-swatch/color-swatch.d.ts +21 -0
- package/dist/components/color-swatch/index.d.ts +2 -0
- package/dist/components/color-swatch/index.js +2 -0
- package/dist/components/color-swatch/types.d.ts +6 -0
- package/dist/components/color-swatch/useColorSwatchColor.d.ts +5 -0
- package/dist/components/dropdown-menu/dropdown-menu-items.d.ts +15 -6
- package/dist/components/dropdown-menu/dropdown-menu-utils.d.ts +1 -1
- package/dist/components/dropdown-menu/dropdown-menu.d.ts +3 -3
- package/dist/components/dropdown-menu/index.d.ts +3 -3
- package/dist/components/dropdown-menu/useDropdownMenu.d.ts +11 -10
- package/dist/components/dropdown-menu/useDropdownMenuDisclosure.d.ts +2 -2
- package/dist/components/dropdown-menu/useDropdownMenuDom.d.ts +2 -2
- package/dist/components/dropdown-menu/useDropdownMenuHoverIntent.d.ts +2 -2
- package/dist/components/dropdown-menu/useDropdownMenuInteractions.d.ts +2 -2
- package/dist/components/dropdown-menu/useDropdownMenuNavigation.d.ts +3 -3
- package/dist/components/dropdown-menu/useDropdownMenuRenderItems.d.ts +12 -4
- package/dist/components/dropdown-menu/useDropdownSubmenus.d.ts +3 -3
- package/dist/components/field/field.d.ts +2 -2
- package/dist/components/field/index.d.ts +2 -2
- package/dist/components/field/types.d.ts +0 -2
- package/dist/components/field/useField.d.ts +1 -3
- package/dist/components/icon-button/icon-button.d.ts +1 -1
- package/dist/components/icon-button/index.d.ts +2 -2
- package/dist/components/icon-button/types.d.ts +2 -1
- package/dist/components/input/index.d.ts +2 -2
- package/dist/components/input/input.d.ts +1 -1
- package/dist/components/input/types.d.ts +3 -0
- package/dist/components/input/useInput.d.ts +2 -2
- package/dist/components/modal/index.d.ts +2 -2
- package/dist/components/modal/modal.d.ts +1 -1
- package/dist/components/modal/types.d.ts +1 -1
- package/dist/components/modal/useModal.d.ts +1 -1
- package/dist/components/number-input/index.d.ts +2 -0
- package/dist/components/number-input/index.js +2 -0
- package/dist/components/number-input/number-input.d.ts +29 -0
- package/dist/components/number-input/types.d.ts +34 -0
- package/dist/components/number-input/useNumberInput.d.ts +31 -0
- package/dist/components/overlay/index.d.ts +2 -2
- package/dist/components/overlay/overlay.d.ts +1 -1
- package/dist/components/overlay/useOverlay.d.ts +1 -1
- package/dist/components/popover/index.d.ts +3 -2
- package/dist/components/popover/index.js +2 -1
- package/dist/components/popover/popover.d.ts +2 -2
- package/dist/components/popover/types.d.ts +3 -1
- package/dist/components/popover/usePopover.d.ts +2 -1
- package/dist/components/progress/index.d.ts +3 -3
- package/dist/components/progress/progress.d.ts +1 -1
- package/dist/components/progress/types.d.ts +2 -2
- package/dist/components/progress/useProgress.d.ts +2 -2
- package/dist/components/radio/index.d.ts +3 -3
- package/dist/components/radio/radio-group.d.ts +1 -1
- package/dist/components/radio/radio.d.ts +1 -1
- package/dist/components/radio/types.d.ts +4 -1
- package/dist/components/radio/useRadio.d.ts +4 -6
- package/dist/components/select/index.d.ts +2 -2
- package/dist/components/select/select.d.ts +1 -1
- package/dist/components/select/types.d.ts +3 -0
- package/dist/components/select/useSelect.d.ts +2 -2
- package/dist/components/slider/index.d.ts +4 -3
- package/dist/components/slider/index.js +2 -2
- package/dist/components/slider/range-slider-tooltip.d.ts +34 -0
- package/dist/components/slider/range-slider.d.ts +37 -0
- package/dist/components/slider/slider.d.ts +1 -1
- package/dist/components/slider/sliderCore.d.ts +35 -0
- package/dist/components/slider/types.d.ts +15 -6
- package/dist/components/slider/useRangeSlider.d.ts +57 -0
- package/dist/components/slider/useRangeSliderPointer.d.ts +19 -0
- package/dist/components/slider/useRangeSliderTooltipCollision.d.ts +36 -0
- package/dist/components/slider/useRangeSliderTooltipState.d.ts +23 -0
- package/dist/components/slider/useSlider.d.ts +11 -15
- package/dist/components/switch/index.d.ts +2 -2
- package/dist/components/switch/switch.d.ts +1 -1
- package/dist/components/switch/types.d.ts +1 -1
- package/dist/components/switch/useSwitch.d.ts +4 -5
- package/dist/components/tabs/index.d.ts +6 -6
- package/dist/components/tabs/tabs-content.d.ts +2 -2
- package/dist/components/tabs/tabs-list.d.ts +4 -4
- package/dist/components/tabs/tabs-trigger.d.ts +5 -5
- package/dist/components/tabs/tabs.d.ts +5 -5
- package/dist/components/tabs/useTabs.d.ts +1 -1
- package/dist/components/textarea/index.d.ts +2 -2
- package/dist/components/textarea/textarea.d.ts +1 -1
- package/dist/components/textarea/useTextarea.d.ts +2 -2
- package/dist/components/toast/defaults.d.ts +7 -0
- package/dist/components/toast/index.d.ts +7 -0
- package/dist/components/toast/index.js +2 -0
- package/dist/components/toast/toast-provider.d.ts +21 -0
- package/dist/components/toast/toast-viewport.d.ts +34 -0
- package/dist/components/toast/toast.d.ts +31 -0
- package/dist/components/toast/types.d.ts +106 -0
- package/dist/components/toast/useToast.d.ts +4 -0
- package/dist/components/toast/useToastColor.d.ts +3 -0
- package/dist/components/toast/useToastState.d.ts +2 -0
- package/dist/components/tooltip/index.d.ts +2 -2
- package/dist/components/tooltip/tooltip.d.ts +2 -2
- package/dist/components/tooltip/types.d.ts +2 -1
- package/dist/components/tooltip/useTooltip.d.ts +3 -1
- package/dist/dropdown-menu.css +17 -17
- package/dist/dropdown-menu.js +160 -39
- package/dist/field.css +15 -18
- package/dist/field.js +17 -35
- package/dist/icon-button.css +57 -236
- package/dist/icon-button.js +5 -6
- package/dist/index.d.ts +31 -22
- package/dist/index.js +17 -4
- package/dist/input.css +40 -46
- package/dist/input.js +39 -21
- package/dist/minus.js +12 -0
- package/dist/modal.css +9 -9
- package/dist/modal.js +1 -1
- package/dist/number-input.css +86 -0
- package/dist/number-input.js +350 -0
- package/dist/overlay.css +5 -5
- package/dist/overlay.js +3 -3
- package/dist/popover.css +62 -29
- package/dist/popover.js +33 -19
- package/dist/popover2.js +17 -0
- package/dist/progress.css +9 -30
- package/dist/progress.js +3 -6
- package/dist/radio.css +34 -62
- package/dist/radio.js +28 -16
- package/dist/rafScheduler.js +34 -0
- package/dist/select.css +105 -61
- package/dist/select.js +12 -8
- package/dist/slider.css +719 -125
- package/dist/slider.js +1251 -149
- package/dist/switch.css +19 -44
- package/dist/switch.js +4 -5
- package/dist/tabs.css +36 -36
- package/dist/tabs.js +1 -1
- package/dist/textarea.css +33 -25
- package/dist/textarea.js +8 -2
- package/dist/toast.css +232 -0
- package/dist/toast.js +679 -0
- package/dist/tooltip.css +7 -35
- package/dist/tooltip.js +30 -18
- package/dist/useButtonColor.js +16 -14
- package/dist/utils/componentColors.d.ts +60 -0
- package/package.json +55 -15
- package/src/styles/_mixins.scss +25 -41
- package/src/styles/_tokens.scss +615 -182
- package/src/styles/_variables.scss +177 -49
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
export declare const colorPickerFormats: readonly ["hex", "hexa", "rgb", "rgba", "hsl", "hsla"];
|
|
2
|
+
export declare const colorPickerSizes: readonly ["xs", "sm", "md", "lg", "xl"];
|
|
3
|
+
export type ColorPickerFormat = (typeof colorPickerFormats)[number];
|
|
4
|
+
export type ColorPickerSize = (typeof colorPickerSizes)[number];
|
|
5
|
+
export interface ColorPickerSelection {
|
|
6
|
+
saturation: number;
|
|
7
|
+
value: number;
|
|
8
|
+
opacity?: number;
|
|
9
|
+
}
|
|
10
|
+
export type ColorPickerValue = string;
|
|
11
|
+
export interface ColorPickerProps {
|
|
12
|
+
id?: string;
|
|
13
|
+
modelValue: ColorPickerValue;
|
|
14
|
+
format?: ColorPickerFormat;
|
|
15
|
+
size?: ColorPickerSize;
|
|
16
|
+
readonly?: boolean;
|
|
17
|
+
withPicker?: boolean;
|
|
18
|
+
swatches?: string[];
|
|
19
|
+
swatchesPerRow?: number;
|
|
20
|
+
ariaLabel?: string;
|
|
21
|
+
describedby?: string;
|
|
22
|
+
labelledby?: string;
|
|
23
|
+
}
|
|
24
|
+
export interface ColorPickerSaturationProps {
|
|
25
|
+
id?: string;
|
|
26
|
+
modelValue: ColorPickerSelection;
|
|
27
|
+
hue?: number;
|
|
28
|
+
readonly?: boolean;
|
|
29
|
+
ariaLabel?: string;
|
|
30
|
+
describedby?: string;
|
|
31
|
+
labelledby?: string;
|
|
32
|
+
}
|
|
33
|
+
export type ColorPickerSliderVariant = 'hue' | 'opacity';
|
|
34
|
+
export interface ColorPickerSliderProps {
|
|
35
|
+
variant: ColorPickerSliderVariant;
|
|
36
|
+
value?: number;
|
|
37
|
+
color?: string;
|
|
38
|
+
readonly?: boolean;
|
|
39
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Ref } from 'vue';
|
|
2
|
+
export interface ColorPickerPointerCoordinates {
|
|
3
|
+
clientX: number;
|
|
4
|
+
clientY: number;
|
|
5
|
+
}
|
|
6
|
+
interface UseColorPickerDragOptions {
|
|
7
|
+
target: Ref<HTMLElement | null>;
|
|
8
|
+
focusTarget?: Ref<HTMLElement | null>;
|
|
9
|
+
readonly: () => boolean;
|
|
10
|
+
isGeometryValid: (rect: DOMRect) => boolean;
|
|
11
|
+
updateFromPointer: (pointer: ColorPickerPointerCoordinates, rect: DOMRect) => void;
|
|
12
|
+
}
|
|
13
|
+
export declare function useColorPickerDrag({ target, focusTarget, readonly, isGeometryValid, updateFromPointer, }: UseColorPickerDragOptions): {
|
|
14
|
+
onPointerDown: (event: PointerEvent) => void;
|
|
15
|
+
};
|
|
16
|
+
export {};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { CSSProperties } from 'vue';
|
|
2
|
+
import { ColorPickerProps } from './types.js';
|
|
3
|
+
type ColorPickerSwatchesProps = Readonly<Pick<ColorPickerProps, 'swatches' | 'swatchesPerRow'>>;
|
|
4
|
+
interface UseColorPickerSwatchesOptions {
|
|
5
|
+
isSelected: (swatch: string) => boolean;
|
|
6
|
+
select: (swatch: string) => void;
|
|
7
|
+
}
|
|
8
|
+
export declare function useColorPickerSwatches(props: ColorPickerSwatchesProps, options: UseColorPickerSwatchesOptions): {
|
|
9
|
+
swatchesRef: import('vue').Ref<HTMLElement | null, HTMLElement | null>;
|
|
10
|
+
normalizedSwatchesPerRow: import('vue').ComputedRef<number | undefined>;
|
|
11
|
+
validSwatches: import('vue').ComputedRef<string[]>;
|
|
12
|
+
swatchesStyle: import('vue').ComputedRef<CSSProperties | undefined>;
|
|
13
|
+
swatchSize: import('vue').ComputedRef<"100%" | "var(--_rp-color-picker-swatch-size)">;
|
|
14
|
+
isSwatchSelected: (index: number) => boolean;
|
|
15
|
+
getSwatchTabindex: (index: number) => 0 | -1;
|
|
16
|
+
selectSwatch: (swatch: string) => void;
|
|
17
|
+
onSwatchFocus: (index: number) => void;
|
|
18
|
+
onSwatchesFocusout: (event: FocusEvent) => void;
|
|
19
|
+
onSwatchKeydown: (event: KeyboardEvent, index: number) => void;
|
|
20
|
+
};
|
|
21
|
+
export {};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { ColorPickerHsvColor } from './color-picker-utils.js';
|
|
2
|
+
import { ColorPickerProps, ColorPickerSelection, ColorPickerValue } from './types.js';
|
|
3
|
+
type ColorPickerValueProps = Readonly<Pick<ColorPickerProps, 'modelValue' | 'format' | 'readonly'>>;
|
|
4
|
+
export declare function useColorPickerValue(props: ColorPickerValueProps, emitUpdate: (value: ColorPickerValue) => void): {
|
|
5
|
+
selectedColor: import('vue').ComputedRef<ColorPickerHsvColor>;
|
|
6
|
+
saturationValue: import('vue').ComputedRef<ColorPickerSelection>;
|
|
7
|
+
opacityColor: import('vue').ComputedRef<string>;
|
|
8
|
+
showAlphaControls: import('vue').ComputedRef<boolean>;
|
|
9
|
+
updateSelection: (value: ColorPickerSelection) => void;
|
|
10
|
+
updateHue: (value: number) => void;
|
|
11
|
+
updateOpacity: (value: number) => void;
|
|
12
|
+
selectColor: (value: string) => void;
|
|
13
|
+
isColorSelected: (value: string) => boolean;
|
|
14
|
+
};
|
|
15
|
+
export {};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { ColorSwatchProps } 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<ColorSwatchProps> & (typeof globalThis extends {
|
|
4
|
+
__VLS_PROPS_FALLBACK: infer P;
|
|
5
|
+
} ? P : {});
|
|
6
|
+
expose: (exposed: {}) => void;
|
|
7
|
+
attrs: any;
|
|
8
|
+
slots: {
|
|
9
|
+
default?: (props: {}) => any;
|
|
10
|
+
};
|
|
11
|
+
emit: {};
|
|
12
|
+
}>) => import('vue').VNode & {
|
|
13
|
+
__ctx?: NonNullable<Awaited<typeof __VLS_setup>>;
|
|
14
|
+
};
|
|
15
|
+
declare const _default: typeof __VLS_export;
|
|
16
|
+
export default _default;
|
|
17
|
+
type __VLS_PrettifyLocal<T> = (T extends any ? {
|
|
18
|
+
[K in keyof T]: T[K];
|
|
19
|
+
} : {
|
|
20
|
+
[K in keyof T as K]: T[K];
|
|
21
|
+
}) & {};
|
|
@@ -1,15 +1,24 @@
|
|
|
1
|
-
import { PropType } from 'vue';
|
|
2
|
-
import {
|
|
1
|
+
import { PropType, VNode } from 'vue';
|
|
2
|
+
import { DropdownMenuItem } from './types.js';
|
|
3
|
+
import { DropdownMenuRenderContext } from './useDropdownMenuRenderItems.js';
|
|
3
4
|
declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
5
|
+
context: {
|
|
6
|
+
readonly type: PropType<DropdownMenuRenderContext>;
|
|
7
|
+
readonly required: true;
|
|
8
|
+
};
|
|
4
9
|
items: {
|
|
5
|
-
type: PropType<
|
|
10
|
+
type: PropType<DropdownMenuItem[]>;
|
|
6
11
|
required: true;
|
|
7
12
|
};
|
|
8
|
-
}>, () =>
|
|
13
|
+
}>, () => VNode<import('vue').RendererNode, import('vue').RendererElement, {
|
|
9
14
|
[key: string]: any;
|
|
10
|
-
}
|
|
15
|
+
}>, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
16
|
+
context: {
|
|
17
|
+
readonly type: PropType<DropdownMenuRenderContext>;
|
|
18
|
+
readonly required: true;
|
|
19
|
+
};
|
|
11
20
|
items: {
|
|
12
|
-
type: PropType<
|
|
21
|
+
type: PropType<DropdownMenuItem[]>;
|
|
13
22
|
required: true;
|
|
14
23
|
};
|
|
15
24
|
}>> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { DropdownMenuFocusTarget, DropdownMenuItem, DropdownMenuItemPath, DropdownMenuOpenOptions, DropdownMenuPlacement } from './types';
|
|
1
|
+
import { DropdownMenuFocusTarget, DropdownMenuItem, DropdownMenuItemPath, DropdownMenuOpenOptions, DropdownMenuPlacement } from './types.js';
|
|
2
2
|
export declare const DEFAULT_PLACEMENT: DropdownMenuPlacement;
|
|
3
3
|
export declare const DEFAULT_FOCUS_TARGET: DropdownMenuFocusTarget;
|
|
4
4
|
export type ItemPath = DropdownMenuItemPath;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { DropdownMenuItem, DropdownMenuItemSlotProps, DropdownMenuProps, DropdownMenuSlotProps } from './types';
|
|
1
|
+
import { DropdownMenuItem, DropdownMenuItemSlotProps, DropdownMenuProps, DropdownMenuSlotProps } from './types.js';
|
|
2
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
3
|
props: import('vue').PublicProps & __VLS_PrettifyLocal<DropdownMenuProps & {
|
|
4
|
-
onSelect?: ((item: DropdownMenuItem) => any) | undefined;
|
|
5
4
|
"onUpdate:open"?: ((value: boolean) => any) | undefined;
|
|
5
|
+
onSelect?: ((item: DropdownMenuItem) => any) | undefined;
|
|
6
6
|
}> & (typeof globalThis extends {
|
|
7
7
|
__VLS_PROPS_FALLBACK: infer P;
|
|
8
8
|
} ? P : {});
|
|
@@ -13,7 +13,7 @@ declare const __VLS_export: (__VLS_props: NonNullable<Awaited<typeof __VLS_setup
|
|
|
13
13
|
item?(props: DropdownMenuItemSlotProps): unknown;
|
|
14
14
|
empty?(): unknown;
|
|
15
15
|
};
|
|
16
|
-
emit: ((evt: "
|
|
16
|
+
emit: ((evt: "update:open", value: boolean) => void) & ((evt: "select", item: DropdownMenuItem) => void);
|
|
17
17
|
}>) => import('vue').VNode & {
|
|
18
18
|
__ctx?: NonNullable<Awaited<typeof __VLS_setup>>;
|
|
19
19
|
};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { default as DropdownMenu } from './dropdown-menu';
|
|
2
|
-
export { useDropdownMenu } from './useDropdownMenu';
|
|
3
|
-
export type { DropdownMenuCloseOptions, DropdownMenuContentProps, DropdownMenuFocusTarget, DropdownMenuItem, DropdownMenuItemPath, DropdownMenuItemProps, DropdownMenuItemSlotProps, DropdownMenuItemValue, DropdownMenuOpenOptions, DropdownMenuPlacement, DropdownMenuProps, DropdownMenuRenderedItem, DropdownMenuSlotProps, DropdownMenuSubmenuProps, DropdownMenuTriggerProps, } from './types';
|
|
1
|
+
export { default as DropdownMenu } from './dropdown-menu.js';
|
|
2
|
+
export { useDropdownMenu } from './useDropdownMenu.js';
|
|
3
|
+
export type { DropdownMenuCloseOptions, DropdownMenuContentProps, DropdownMenuFocusTarget, DropdownMenuItem, DropdownMenuItemPath, DropdownMenuItemProps, DropdownMenuItemSlotProps, DropdownMenuItemValue, DropdownMenuOpenOptions, DropdownMenuPlacement, DropdownMenuProps, DropdownMenuRenderedItem, DropdownMenuSlotProps, DropdownMenuSubmenuProps, DropdownMenuTriggerProps, } from './types.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { DropdownMenuContentProps, DropdownMenuItem, DropdownMenuProps, DropdownMenuSlotProps, DropdownMenuTriggerProps } from './types';
|
|
1
|
+
import { DropdownMenuContentProps, DropdownMenuItem, DropdownMenuProps, DropdownMenuSlotProps, DropdownMenuTriggerProps } from './types.js';
|
|
2
2
|
export declare function useDropdownMenu(props: Readonly<DropdownMenuProps>, emit?: {
|
|
3
3
|
openChange?: (open: boolean) => void;
|
|
4
4
|
select?: (item: DropdownMenuItem) => void;
|
|
@@ -9,24 +9,25 @@ export declare function useDropdownMenu(props: Readonly<DropdownMenuProps>, emit
|
|
|
9
9
|
isVisible: import('vue').ComputedRef<boolean>;
|
|
10
10
|
isEmpty: import('vue').ComputedRef<boolean>;
|
|
11
11
|
visibleItems: import('vue').ComputedRef<DropdownMenuItem[]>;
|
|
12
|
-
renderedItems: import('vue').ComputedRef<import('./types').DropdownMenuRenderedItem[]>;
|
|
12
|
+
renderedItems: import('vue').ComputedRef<import('./types.js').DropdownMenuRenderedItem[]>;
|
|
13
|
+
renderContext: import('./useDropdownMenuRenderItems.js').DropdownMenuRenderContext;
|
|
13
14
|
focusedIndex: import('vue').ComputedRef<number>;
|
|
14
|
-
focusedPath: import('vue').Ref<number[], import('./types').DropdownMenuItemPath
|
|
15
|
+
focusedPath: import('vue').Ref<number[], number[] | import('./types.js').DropdownMenuItemPath>;
|
|
15
16
|
activeDescendantId: import('vue').ComputedRef<string | undefined>;
|
|
16
17
|
rootClass: import('vue').ComputedRef<string[]>;
|
|
17
18
|
contentClass: import('vue').ComputedRef<string[]>;
|
|
18
19
|
triggerProps: import('vue').ComputedRef<DropdownMenuTriggerProps>;
|
|
19
20
|
contentProps: import('vue').ComputedRef<DropdownMenuContentProps>;
|
|
20
21
|
slotProps: import('vue').ComputedRef<DropdownMenuSlotProps>;
|
|
21
|
-
open: (options?: import('./types').DropdownMenuOpenOptions | import('./types').DropdownMenuFocusTarget) => void;
|
|
22
|
-
close: (options?: import('./types').DropdownMenuCloseOptions) => void;
|
|
22
|
+
open: (options?: import('./types.js').DropdownMenuOpenOptions | import('./types.js').DropdownMenuFocusTarget) => void;
|
|
23
|
+
close: (options?: import('./types.js').DropdownMenuCloseOptions) => void;
|
|
23
24
|
toggle: () => void;
|
|
24
25
|
selectItem: (item: DropdownMenuItem) => void;
|
|
25
|
-
openSubmenu: (path: import('./dropdown-menu-utils').ItemPath, focus?: import('./dropdown-menu-utils').SubmenuFocusTarget, point?: import('./dropdown-menu-utils').PointerPoint) => boolean;
|
|
26
|
-
closeSubmenu: (path: import('./dropdown-menu-utils').ItemPath) => boolean;
|
|
27
|
-
onItemMouseenter: (item: DropdownMenuItem, indexOrPath: number | import('./dropdown-menu-utils').ItemPath, event?: MouseEvent) => void;
|
|
26
|
+
openSubmenu: (path: import('./dropdown-menu-utils.js').ItemPath, focus?: import('./dropdown-menu-utils.js').SubmenuFocusTarget, point?: import('./dropdown-menu-utils.js').PointerPoint) => boolean;
|
|
27
|
+
closeSubmenu: (path: import('./dropdown-menu-utils.js').ItemPath) => boolean;
|
|
28
|
+
onItemMouseenter: (item: DropdownMenuItem, indexOrPath: number | import('./dropdown-menu-utils.js').ItemPath, event?: MouseEvent) => void;
|
|
28
29
|
onTriggerKeydown: (event: KeyboardEvent) => void;
|
|
29
30
|
onMenuKeydown: (event: KeyboardEvent) => void;
|
|
30
|
-
getItemProps: (item: DropdownMenuItem, indexOrPath: number | import('./dropdown-menu-utils').ItemPath, focused?: boolean, disabled?: boolean) => import('./types').DropdownMenuItemProps;
|
|
31
|
-
getItemSlotProps: (item: DropdownMenuItem, indexOrPath: number | import('./dropdown-menu-utils').ItemPath, focused?: boolean, disabled?: boolean) => import('./types').DropdownMenuItemSlotProps;
|
|
31
|
+
getItemProps: (item: DropdownMenuItem, indexOrPath: number | import('./dropdown-menu-utils.js').ItemPath, focused?: boolean, disabled?: boolean, submenuOpen?: boolean) => import('./types.js').DropdownMenuItemProps;
|
|
32
|
+
getItemSlotProps: (item: DropdownMenuItem, indexOrPath: number | import('./dropdown-menu-utils.js').ItemPath, focused?: boolean, disabled?: boolean, submenuOpen?: boolean) => import('./types.js').DropdownMenuItemSlotProps;
|
|
32
33
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Ref } from 'vue';
|
|
2
|
-
import { DropdownMenuCloseOptions, DropdownMenuFocusTarget, DropdownMenuItem, DropdownMenuOpenOptions, DropdownMenuProps } from './types';
|
|
3
|
-
import { ItemPath } from './dropdown-menu-utils';
|
|
2
|
+
import { DropdownMenuCloseOptions, DropdownMenuFocusTarget, DropdownMenuItem, DropdownMenuOpenOptions, DropdownMenuProps } from './types.js';
|
|
3
|
+
import { ItemPath } from './dropdown-menu-utils.js';
|
|
4
4
|
type BooleanSource = Readonly<Ref<boolean>>;
|
|
5
5
|
type UseDropdownMenuDisclosureOptions = {
|
|
6
6
|
props: Readonly<DropdownMenuProps>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Ref } from 'vue';
|
|
2
|
-
import { DropdownMenuPlacement } from './types';
|
|
3
|
-
import { ItemPath } from './dropdown-menu-utils';
|
|
2
|
+
import { DropdownMenuPlacement } from './types.js';
|
|
3
|
+
import { ItemPath } from './dropdown-menu-utils.js';
|
|
4
4
|
type StringSource = {
|
|
5
5
|
readonly value: string;
|
|
6
6
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Ref } from 'vue';
|
|
2
|
-
import { DropdownMenuItem } from './types';
|
|
3
|
-
import { ItemPath, PointerPoint } from './dropdown-menu-utils';
|
|
2
|
+
import { DropdownMenuItem } from './types.js';
|
|
3
|
+
import { ItemPath, PointerPoint } from './dropdown-menu-utils.js';
|
|
4
4
|
export type SafeTriangle = [PointerPoint, PointerPoint, PointerPoint];
|
|
5
5
|
type GetSafeTriangleOptions = {
|
|
6
6
|
itemRect: DOMRect | null;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Ref } from 'vue';
|
|
2
|
-
import { DropdownMenuCloseOptions, DropdownMenuFocusTarget, DropdownMenuItem, DropdownMenuOpenOptions, DropdownMenuProps } from './types';
|
|
3
|
-
import { ItemPath, PointerPoint, SubmenuFocusTarget } from './dropdown-menu-utils';
|
|
2
|
+
import { DropdownMenuCloseOptions, DropdownMenuFocusTarget, DropdownMenuItem, DropdownMenuOpenOptions, DropdownMenuProps } from './types.js';
|
|
3
|
+
import { ItemPath, PointerPoint, SubmenuFocusTarget } from './dropdown-menu-utils.js';
|
|
4
4
|
type BooleanSource = Readonly<Ref<boolean>>;
|
|
5
5
|
type DisclosureControls = {
|
|
6
6
|
open: (options?: DropdownMenuOpenOptions | DropdownMenuFocusTarget) => void;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { DropdownMenuFocusTarget, DropdownMenuItem } from './types';
|
|
2
|
-
import { ItemPath } from './dropdown-menu-utils';
|
|
1
|
+
import { DropdownMenuFocusTarget, DropdownMenuItem } from './types.js';
|
|
2
|
+
import { ItemPath } from './dropdown-menu-utils.js';
|
|
3
3
|
type DropdownMenuItemsSource = {
|
|
4
4
|
readonly value: DropdownMenuItem[];
|
|
5
5
|
};
|
|
6
6
|
export declare function useDropdownMenuNavigation(items: DropdownMenuItemsSource): {
|
|
7
|
-
focusedPath: import('vue').Ref<number[], import('./types').DropdownMenuItemPath
|
|
7
|
+
focusedPath: import('vue').Ref<number[], number[] | import('./types.js').DropdownMenuItemPath>;
|
|
8
8
|
focusedIndex: import('vue').ComputedRef<number>;
|
|
9
9
|
getItemsAtPath: (path: ItemPath) => DropdownMenuItem[];
|
|
10
10
|
getItemAtPath: (path: ItemPath) => DropdownMenuItem | undefined;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { DropdownMenuCloseOptions, DropdownMenuFocusTarget, DropdownMenuItem, DropdownMenuItemProps, DropdownMenuItemSlotProps, DropdownMenuRenderedItem } from './types';
|
|
2
|
-
import { ItemPath } from './dropdown-menu-utils';
|
|
1
|
+
import { DropdownMenuCloseOptions, DropdownMenuFocusTarget, DropdownMenuItem, DropdownMenuItemProps, DropdownMenuItemSlotProps, DropdownMenuRenderedItem, DropdownMenuSubmenuProps } from './types.js';
|
|
2
|
+
import { ItemPath } from './dropdown-menu-utils.js';
|
|
3
3
|
type DropdownMenuItemsSource = {
|
|
4
4
|
readonly value: DropdownMenuItem[];
|
|
5
5
|
};
|
|
@@ -17,9 +17,17 @@ type UseDropdownMenuRenderItemsOptions = {
|
|
|
17
17
|
closeSubmenu: (path: ItemPath) => void;
|
|
18
18
|
close: (options?: DropdownMenuCloseOptions) => void;
|
|
19
19
|
};
|
|
20
|
+
export interface DropdownMenuRenderContext {
|
|
21
|
+
isItemFocused: (indexOrPath: number | ItemPath) => boolean;
|
|
22
|
+
isSubmenuOpen: (path: ItemPath) => boolean;
|
|
23
|
+
getItemProps: (item: DropdownMenuItem, indexOrPath: number | ItemPath, focused?: boolean, disabled?: boolean, submenuOpen?: boolean) => DropdownMenuItemProps;
|
|
24
|
+
getSubmenuProps: (item: DropdownMenuItem, path: ItemPath, submenuOpen?: boolean) => DropdownMenuSubmenuProps;
|
|
25
|
+
getItemSlotProps: (item: DropdownMenuItem, indexOrPath: number | ItemPath, focused?: boolean, disabled?: boolean, submenuOpen?: boolean) => DropdownMenuItemSlotProps;
|
|
26
|
+
}
|
|
20
27
|
export declare function useDropdownMenuRenderItems({ items, getItemId, getSubmenuId, getMenuActiveDescendant, isItemFocused, isSubmenuOpen, activateItem, focusHoveredItem, selectItem, openSubmenu, closeSubmenu, close, }: UseDropdownMenuRenderItemsOptions): {
|
|
21
28
|
renderedItems: import('vue').ComputedRef<DropdownMenuRenderedItem[]>;
|
|
22
|
-
|
|
23
|
-
|
|
29
|
+
renderContext: DropdownMenuRenderContext;
|
|
30
|
+
getItemProps: (item: DropdownMenuItem, indexOrPath: number | ItemPath, focused?: boolean, disabled?: boolean, submenuOpen?: boolean) => DropdownMenuItemProps;
|
|
31
|
+
getItemSlotProps: (item: DropdownMenuItem, indexOrPath: number | ItemPath, focused?: boolean, disabled?: boolean, submenuOpen?: boolean) => DropdownMenuItemSlotProps;
|
|
24
32
|
};
|
|
25
33
|
export {};
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { Ref } from 'vue';
|
|
2
|
-
import { DropdownMenuItem } from './types';
|
|
3
|
-
import { ItemPath, SubmenuFocusTarget } from './dropdown-menu-utils';
|
|
2
|
+
import { DropdownMenuItem } from './types.js';
|
|
3
|
+
import { ItemPath, SubmenuFocusTarget } from './dropdown-menu-utils.js';
|
|
4
4
|
type UseDropdownSubmenusOptions = {
|
|
5
5
|
focusedPath: Ref<ItemPath>;
|
|
6
6
|
getItemAtPath: (path: ItemPath) => DropdownMenuItem | undefined;
|
|
7
7
|
focusItem: (target: Exclude<SubmenuFocusTarget, false>, menuPath?: ItemPath) => boolean;
|
|
8
8
|
};
|
|
9
9
|
export declare function useDropdownSubmenus({ focusedPath, getItemAtPath, focusItem, }: UseDropdownSubmenusOptions): {
|
|
10
|
-
openSubmenuPath: Ref<number[], import('./types').DropdownMenuItemPath
|
|
10
|
+
openSubmenuPath: Ref<number[], number[] | import('./types.js').DropdownMenuItemPath>;
|
|
11
11
|
resetSubmenus: () => void;
|
|
12
12
|
isSubmenuOpen: (path: ItemPath) => boolean;
|
|
13
13
|
closeSubmenusAfter: (menuPath: ItemPath) => void;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { FieldProps } from './types';
|
|
1
|
+
import { FieldProps } from './types.js';
|
|
2
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
3
|
props: import('vue').PublicProps & __VLS_PrettifyLocal<FieldProps> & (typeof globalThis extends {
|
|
4
4
|
__VLS_PROPS_FALLBACK: infer P;
|
|
@@ -15,7 +15,7 @@ declare const __VLS_export: (__VLS_props: NonNullable<Awaited<typeof __VLS_setup
|
|
|
15
15
|
invalid: true | undefined;
|
|
16
16
|
labelledby: string | undefined;
|
|
17
17
|
describedby: string | undefined;
|
|
18
|
-
controlProps: import('./types').FieldControlProps;
|
|
18
|
+
controlProps: import('./types.js').FieldControlProps;
|
|
19
19
|
}) => any;
|
|
20
20
|
} & {
|
|
21
21
|
description?: (props: {}) => any;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { default as Field } from './field';
|
|
2
|
-
export type { FieldControlProps, FieldProps, FieldSlotProps } from './types';
|
|
1
|
+
export { default as Field } from './field.js';
|
|
2
|
+
export type { FieldControlProps, FieldProps, FieldSlotProps } from './types.js';
|
|
@@ -1,11 +1,9 @@
|
|
|
1
|
-
import { FieldControlProps, FieldProps } from './types';
|
|
1
|
+
import { FieldControlProps, FieldProps } from './types.js';
|
|
2
2
|
export declare function useField(props: Readonly<FieldProps>): {
|
|
3
3
|
controlId: import('vue').ComputedRef<string>;
|
|
4
4
|
labelId: import('vue').ComputedRef<string>;
|
|
5
5
|
descriptionId: import('vue').ComputedRef<string>;
|
|
6
|
-
messageId: import('vue').ComputedRef<string>;
|
|
7
6
|
isInvalid: import('vue').ComputedRef<boolean>;
|
|
8
|
-
messageText: import('vue').ComputedRef<string | undefined>;
|
|
9
7
|
hasLabel: import('vue').ComputedRef<boolean>;
|
|
10
8
|
hasDescription: import('vue').ComputedRef<boolean>;
|
|
11
9
|
hasMessage: import('vue').ComputedRef<boolean>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IconButtonProps } from './types';
|
|
1
|
+
import { IconButtonProps } from './types.js';
|
|
2
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
3
|
props: import('vue').PublicProps & __VLS_PrettifyLocal<IconButtonProps> & (typeof globalThis extends {
|
|
4
4
|
__VLS_PROPS_FALLBACK: infer P;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { default as IconButton } from './icon-button';
|
|
2
|
-
export type { IconButtonColor, IconButtonProps, IconButtonRadius, IconButtonSize, IconButtonVariant, } from './types';
|
|
1
|
+
export { default as IconButton } from './icon-button.js';
|
|
2
|
+
export type { IconButtonColor, IconButtonProps, IconButtonRadius, IconButtonSize, IconButtonVariant, } from './types.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ButtonColor, ButtonRadius, ButtonSize, ButtonVariant } from '../button/types';
|
|
1
|
+
import { ButtonColor, ButtonRadius, ButtonSize, ButtonVariant } from '../button/types.js';
|
|
2
2
|
export type IconButtonColor = ButtonColor;
|
|
3
3
|
export type IconButtonSize = ButtonSize;
|
|
4
4
|
export type IconButtonRadius = ButtonRadius;
|
|
@@ -7,6 +7,7 @@ export interface IconButtonProps {
|
|
|
7
7
|
ariaLabel: string;
|
|
8
8
|
variant?: IconButtonVariant;
|
|
9
9
|
color?: IconButtonColor;
|
|
10
|
+
autoContrast?: boolean;
|
|
10
11
|
size?: IconButtonSize;
|
|
11
12
|
radius?: IconButtonRadius;
|
|
12
13
|
type?: 'button' | 'submit' | 'reset';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { default as Input } from './input';
|
|
2
|
-
export type { InputProps, InputRadius, InputSize } from './types';
|
|
1
|
+
export { default as Input } from './input.js';
|
|
2
|
+
export type { InputProps, InputRadius, InputSize } from './types.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { InputProps } from './types';
|
|
1
|
+
import { InputProps } from './types.js';
|
|
2
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
3
|
props: import('vue').PublicProps & __VLS_PrettifyLocal<InputProps & {
|
|
4
4
|
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { InputHTMLAttributes } from 'vue';
|
|
1
2
|
export type InputRadius = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
2
3
|
export type InputSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
3
4
|
export interface InputProps {
|
|
@@ -16,4 +17,6 @@ export interface InputProps {
|
|
|
16
17
|
ariaLabel?: string;
|
|
17
18
|
describedby?: string;
|
|
18
19
|
labelledby?: string;
|
|
20
|
+
inputAttrs?: InputHTMLAttributes;
|
|
21
|
+
validationMessage?: string;
|
|
19
22
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { InputProps } from './types';
|
|
1
|
+
import { InputProps } from './types.js';
|
|
2
2
|
export declare function useInput(props: Readonly<InputProps>, emitUpdate: (value: string) => void): {
|
|
3
3
|
inputRef: import('vue').Ref<HTMLInputElement | null, HTMLInputElement | null>;
|
|
4
|
-
control: import('../../composables/useControlState').ControlState;
|
|
4
|
+
control: import('../../composables/useControlState.js').ControlState;
|
|
5
5
|
rootClass: import('vue').ComputedRef<string[]>;
|
|
6
6
|
onInput: (e: Event) => void;
|
|
7
7
|
focusInput: (e: MouseEvent) => void;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { default as Modal } from './modal';
|
|
2
|
-
export type { ModalInitialFocus, ModalPresetSize, ModalProps, ModalRole, ModalSize, ModalSlotProps, } from './types';
|
|
1
|
+
export { default as Modal } from './modal.js';
|
|
2
|
+
export type { ModalInitialFocus, ModalPresetSize, ModalProps, ModalRole, ModalSize, ModalSlotProps, } from './types.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ModalProps } from './types';
|
|
1
|
+
import { ModalProps } from './types.js';
|
|
2
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
3
|
props: import('vue').PublicProps & __VLS_PrettifyLocal<ModalProps & {
|
|
4
4
|
"onUpdate:open"?: ((value: boolean) => any) | undefined;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Ref } from 'vue';
|
|
2
|
-
import { OverlayProps } from '../overlay/types';
|
|
2
|
+
import { OverlayProps } from '../overlay/types.js';
|
|
3
3
|
export type ModalPresetSize = 'sm' | 'md' | 'lg' | 'xl' | 'full';
|
|
4
4
|
export type ModalSize = ModalPresetSize | (string & {});
|
|
5
5
|
export type ModalRole = 'dialog' | 'alertdialog';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { CSSProperties } from 'vue';
|
|
2
|
-
import { ModalProps, ModalRole, ModalSlotProps } from './types';
|
|
2
|
+
import { ModalProps, ModalRole, ModalSlotProps } from './types.js';
|
|
3
3
|
export declare function useModal(props: Readonly<ModalProps>, emitOpenChange?: (open: boolean) => void): {
|
|
4
4
|
panelRef: import('vue').Ref<HTMLElement | null, HTMLElement | null>;
|
|
5
5
|
modalId: import('vue').ComputedRef<string>;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { NumberInputProps, NumberInputValue } 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<NumberInputProps & {
|
|
4
|
+
"onUpdate:modelValue"?: ((value: NumberInputValue) => any) | undefined;
|
|
5
|
+
}> & (typeof globalThis extends {
|
|
6
|
+
__VLS_PROPS_FALLBACK: infer P;
|
|
7
|
+
} ? P : {});
|
|
8
|
+
expose: (exposed: {}) => void;
|
|
9
|
+
attrs: any;
|
|
10
|
+
slots: {
|
|
11
|
+
'increment-icon'?: (props: {}) => any;
|
|
12
|
+
} & {
|
|
13
|
+
'decrement-icon'?: (props: {}) => any;
|
|
14
|
+
} & {
|
|
15
|
+
'increment-icon'?: (props: {}) => any;
|
|
16
|
+
} & {
|
|
17
|
+
'decrement-icon'?: (props: {}) => any;
|
|
18
|
+
};
|
|
19
|
+
emit: (evt: "update:modelValue", value: NumberInputValue) => 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,34 @@
|
|
|
1
|
+
import { InputHTMLAttributes } from 'vue';
|
|
2
|
+
import { InputRadius, InputSize } from '../input/types.js';
|
|
3
|
+
export type NumberInputValue = number | null;
|
|
4
|
+
export type NumberInputRadius = InputRadius;
|
|
5
|
+
export type NumberInputSize = InputSize;
|
|
6
|
+
export type NumberInputControlsPosition = 'left' | 'right' | 'split';
|
|
7
|
+
export type NumberInputTextAlign = 'left' | 'center' | 'right';
|
|
8
|
+
export interface NumberInputProps {
|
|
9
|
+
id?: string;
|
|
10
|
+
name?: string;
|
|
11
|
+
modelValue: NumberInputValue;
|
|
12
|
+
min?: number;
|
|
13
|
+
max?: number;
|
|
14
|
+
step?: number;
|
|
15
|
+
size?: NumberInputSize;
|
|
16
|
+
radius?: NumberInputRadius;
|
|
17
|
+
placeholder?: string;
|
|
18
|
+
controls?: boolean;
|
|
19
|
+
controlsPosition?: NumberInputControlsPosition;
|
|
20
|
+
textAlign?: NumberInputTextAlign;
|
|
21
|
+
clampOnBlur?: boolean;
|
|
22
|
+
disabled?: boolean;
|
|
23
|
+
readonly?: boolean;
|
|
24
|
+
required?: boolean;
|
|
25
|
+
invalid?: boolean;
|
|
26
|
+
valid?: boolean;
|
|
27
|
+
ariaLabel?: string;
|
|
28
|
+
describedby?: string;
|
|
29
|
+
labelledby?: string;
|
|
30
|
+
inputAttrs?: InputHTMLAttributes;
|
|
31
|
+
validationMessage?: string;
|
|
32
|
+
incrementLabel?: string;
|
|
33
|
+
decrementLabel?: string;
|
|
34
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { InputHTMLAttributes } from 'vue';
|
|
2
|
+
import { NumberInputControlsPosition, NumberInputProps, NumberInputTextAlign, NumberInputValue } from './types.js';
|
|
3
|
+
export interface NumberInputBounds {
|
|
4
|
+
min: number | undefined;
|
|
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 useNumberInput(props: Readonly<NumberInputProps>, emitUpdate: (value: NumberInputValue) => void): {
|
|
17
|
+
control: import('../../composables/useControlState.js').ControlState;
|
|
18
|
+
rootClass: import('vue').ComputedRef<string[]>;
|
|
19
|
+
bounds: import('vue').ComputedRef<NumberInputBounds>;
|
|
20
|
+
nativeStep: import('vue').ComputedRef<number>;
|
|
21
|
+
nativeInputAttrs: import('vue').ComputedRef<InputHTMLAttributes>;
|
|
22
|
+
modelInputValue: import('vue').ComputedRef<string>;
|
|
23
|
+
leftControls: import('vue').ComputedRef<NumberInputControl[]>;
|
|
24
|
+
rightControls: import('vue').ComputedRef<NumberInputControl[]>;
|
|
25
|
+
canIncrement: import('vue').ComputedRef<boolean>;
|
|
26
|
+
canDecrement: import('vue').ComputedRef<boolean>;
|
|
27
|
+
increment: () => boolean;
|
|
28
|
+
decrement: () => boolean;
|
|
29
|
+
onInputUpdate: (value: string) => void;
|
|
30
|
+
};
|
|
31
|
+
export {};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { default as Overlay } from './overlay';
|
|
2
|
-
export type { OverlayBlur, OverlayProps, OverlayZIndex } from './types';
|
|
1
|
+
export { default as Overlay } from './overlay.js';
|
|
2
|
+
export type { OverlayBlur, OverlayProps, OverlayZIndex } from './types.js';
|