ropav 0.0.9 → 0.0.11
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 +6 -0
- package/dist/accordion.css +115 -111
- package/dist/accordion.js +60 -16
- package/dist/alert.css +110 -108
- package/dist/alert.js +48 -26
- package/dist/aspect-ratio.css +17 -15
- package/dist/aspect-ratio.js +20 -6
- package/dist/avatar.css +98 -96
- package/dist/avatar.js +27 -16
- package/dist/badge.css +95 -93
- package/dist/badge.js +29 -16
- package/dist/base.css +672 -671
- package/dist/button-group.css +39 -37
- package/dist/button-group.js +23 -12
- package/dist/button-link.css +160 -158
- package/dist/button-link.js +43 -24
- package/dist/button.css +160 -158
- package/dist/button.js +37 -19
- package/dist/card.css +109 -107
- package/dist/card.js +42 -17
- package/dist/checkbox.css +139 -137
- package/dist/checkbox.js +79 -28
- package/dist/collapse.css +29 -27
- package/dist/collapse.js +44 -10
- package/dist/color-input.css +137 -107
- package/dist/color-input.js +91 -17
- package/dist/color-picker.css +309 -303
- package/dist/color-picker.js +250 -77
- package/dist/color-picker2.js +9 -1
- package/dist/color-swatch.css +48 -46
- package/dist/color-swatch.js +15 -11
- package/dist/color-swatch2.js +4 -0
- package/dist/components/accordion/accordion-item.d.ts +16 -4
- package/dist/components/accordion/accordion.d.ts +1 -1
- package/dist/components/accordion/index.d.ts +5 -4
- package/dist/components/accordion/index.js +2 -2
- package/dist/components/accordion/types.d.ts +10 -5
- package/dist/components/accordion/useAccordion.d.ts +1 -1
- package/dist/components/alert/alert.d.ts +3 -3
- package/dist/components/alert/index.d.ts +3 -3
- package/dist/components/alert/index.js +2 -2
- package/dist/components/alert/types.d.ts +5 -2
- package/dist/components/alert/useAlertColor.d.ts +1 -1
- package/dist/components/aspect-ratio/aspect-ratio.d.ts +1 -1
- package/dist/components/aspect-ratio/index.d.ts +3 -2
- package/dist/components/aspect-ratio/index.js +2 -2
- package/dist/components/aspect-ratio/types.d.ts +4 -1
- package/dist/components/avatar/avatar.d.ts +1 -1
- package/dist/components/avatar/index.d.ts +3 -3
- package/dist/components/avatar/index.js +2 -2
- package/dist/components/avatar/types.d.ts +5 -2
- package/dist/components/avatar/useAvatarColor.d.ts +1 -1
- package/dist/components/badge/badge.d.ts +1 -1
- package/dist/components/badge/index.d.ts +3 -3
- package/dist/components/badge/index.js +2 -2
- package/dist/components/badge/types.d.ts +5 -2
- package/dist/components/badge/useBadgeColor.d.ts +1 -1
- package/dist/components/button/button.d.ts +1 -1
- package/dist/components/button/index.d.ts +3 -2
- package/dist/components/button/index.js +2 -2
- package/dist/components/button/types.d.ts +5 -2
- package/dist/components/button/useButtonColor.d.ts +1 -1
- package/dist/components/button-group/button-group.d.ts +1 -1
- package/dist/components/button-group/index.d.ts +3 -2
- package/dist/components/button-group/index.js +2 -2
- package/dist/components/button-group/types.d.ts +4 -1
- package/dist/components/button-link/button-link.d.ts +1 -1
- package/dist/components/button-link/index.d.ts +3 -2
- package/dist/components/button-link/index.js +2 -2
- package/dist/components/button-link/types.d.ts +5 -2
- package/dist/components/card/card.d.ts +1 -1
- package/dist/components/card/index.d.ts +3 -2
- package/dist/components/card/index.js +2 -2
- package/dist/components/card/types.d.ts +5 -1
- package/dist/components/checkbox/checkbox.d.ts +5 -2
- package/dist/components/checkbox/index.d.ts +3 -2
- package/dist/components/checkbox/index.js +2 -2
- package/dist/components/checkbox/types.d.ts +7 -2
- package/dist/components/checkbox/useCheckbox.d.ts +4 -2
- package/dist/components/collapse/collapse.d.ts +2 -2
- package/dist/components/collapse/index.d.ts +4 -3
- package/dist/components/collapse/index.js +2 -2
- package/dist/components/collapse/types.d.ts +9 -2
- package/dist/components/collapse/useCollapse.d.ts +1 -1
- package/dist/components/color-input/color-input.d.ts +1 -1
- package/dist/components/color-input/index.d.ts +3 -2
- package/dist/components/color-input/index.js +2 -2
- package/dist/components/color-input/types.d.ts +8 -4
- package/dist/components/color-input/useColorInput.d.ts +5 -5
- package/dist/components/color-input/useColorInputEyeDropper.d.ts +1 -1
- package/dist/components/color-input/useColorInputPopover.d.ts +2 -2
- package/dist/components/color-input/useColorInputValue.d.ts +1 -1
- package/dist/components/color-picker/color-picker-saturation.d.ts +1 -1
- package/dist/components/color-picker/color-picker-slider.d.ts +1 -1
- package/dist/components/color-picker/color-picker-utils.d.ts +1 -1
- package/dist/components/color-picker/color-picker.d.ts +1 -1
- package/dist/components/color-picker/index.d.ts +3 -3
- package/dist/components/color-picker/index.js +2 -2
- package/dist/components/color-picker/types.d.ts +13 -1
- package/dist/components/color-picker/useColorPickerDrag.d.ts +7 -2
- package/dist/components/color-picker/useColorPickerSwatches.d.ts +1 -1
- package/dist/components/color-picker/useColorPickerValue.d.ts +2 -2
- package/dist/components/color-swatch/color-swatch.d.ts +1 -1
- package/dist/components/color-swatch/index.d.ts +3 -2
- package/dist/components/color-swatch/index.js +2 -1
- package/dist/components/color-swatch/types.d.ts +4 -1
- package/dist/components/dropdown-menu/dropdown-menu-items.d.ts +15 -6
- package/dist/components/dropdown-menu/dropdown-menu-primitives.d.ts +724 -0
- 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 +55 -3
- package/dist/components/dropdown-menu/index.js +2 -2
- package/dist/components/dropdown-menu/types.d.ts +142 -6
- package/dist/components/dropdown-menu/useDropdownMenu.d.ts +21 -12
- package/dist/components/dropdown-menu/useDropdownMenuDisclosure.d.ts +6 -4
- package/dist/components/dropdown-menu/useDropdownMenuDom.d.ts +4 -3
- package/dist/components/dropdown-menu/useDropdownMenuHoverIntent.d.ts +2 -2
- package/dist/components/dropdown-menu/useDropdownMenuInteractions.d.ts +5 -5
- package/dist/components/dropdown-menu/useDropdownMenuNavigation.d.ts +3 -3
- package/dist/components/dropdown-menu/useDropdownMenuPortalPosition.d.ts +19 -0
- package/dist/components/dropdown-menu/useDropdownMenuRenderItems.d.ts +25 -5
- 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 +3 -2
- package/dist/components/field/index.js +2 -2
- package/dist/components/field/types.d.ts +4 -1
- package/dist/components/field/useField.d.ts +1 -1
- package/dist/components/floating/index.d.ts +1 -0
- package/dist/components/floating/index.js +0 -0
- package/dist/components/floating/types.d.ts +31 -0
- package/dist/components/floating/useFloatingPosition.d.ts +38 -0
- package/dist/components/focus-trap/focus-trap.d.ts +31 -0
- package/dist/components/focus-trap/index.d.ts +4 -0
- package/dist/components/focus-trap/index.js +3 -0
- package/dist/components/focus-trap/types.d.ts +41 -0
- package/dist/components/focus-trap/useFocusTrap.d.ts +2 -0
- package/dist/components/icon-button/icon-button.d.ts +1 -1
- package/dist/components/icon-button/index.d.ts +3 -2
- package/dist/components/icon-button/index.js +2 -1
- package/dist/components/icon-button/types.d.ts +5 -2
- package/dist/components/input/index.d.ts +3 -2
- package/dist/components/input/index.js +2 -1
- package/dist/components/input/input.d.ts +1 -1
- package/dist/components/input/types.d.ts +4 -1
- package/dist/components/input/useInput.d.ts +2 -2
- package/dist/components/modal/index.d.ts +3 -2
- package/dist/components/modal/index.js +2 -2
- package/dist/components/modal/modal.d.ts +1 -1
- package/dist/components/modal/types.d.ts +9 -2
- package/dist/components/modal/useModal.d.ts +1 -1
- package/dist/components/number-input/index.d.ts +3 -2
- package/dist/components/number-input/index.js +2 -2
- package/dist/components/number-input/number-input.d.ts +1 -1
- package/dist/components/number-input/types.d.ts +5 -2
- package/dist/components/number-input/useNumberInput.d.ts +2 -2
- package/dist/components/overlay/index.d.ts +3 -2
- package/dist/components/overlay/index.js +2 -1
- package/dist/components/overlay/overlay.d.ts +1 -1
- package/dist/components/overlay/types.d.ts +4 -1
- package/dist/components/overlay/useOverlay.d.ts +1 -1
- package/dist/components/popover/index.d.ts +3 -3
- package/dist/components/popover/index.js +2 -2
- package/dist/components/popover/popover.d.ts +2 -2
- package/dist/components/popover/types.d.ts +21 -11
- package/dist/components/popover/usePopover.d.ts +11 -2
- package/dist/components/progress/index.d.ts +3 -3
- package/dist/components/progress/index.js +2 -2
- package/dist/components/progress/progress.d.ts +1 -1
- package/dist/components/progress/types.d.ts +5 -2
- package/dist/components/progress/useProgress.d.ts +2 -2
- package/dist/components/radio/index.d.ts +4 -3
- package/dist/components/radio/index.js +2 -2
- package/dist/components/radio/radio-group.d.ts +1 -1
- package/dist/components/radio/radio.d.ts +9 -4
- package/dist/components/radio/types.d.ts +21 -4
- package/dist/components/radio/useRadio.d.ts +10 -5
- package/dist/components/select/index.d.ts +3 -2
- package/dist/components/select/index.js +2 -2
- package/dist/components/select/select.d.ts +1 -1
- package/dist/components/select/types.d.ts +4 -1
- package/dist/components/select/useSelect.d.ts +4 -3
- package/dist/components/slider/index.d.ts +4 -4
- package/dist/components/slider/index.js +2 -2
- package/dist/components/slider/range-slider-tooltip.d.ts +37 -0
- package/dist/components/slider/range-slider.d.ts +8 -13
- package/dist/components/slider/slider.d.ts +5 -2
- package/dist/components/slider/sliderCore.d.ts +35 -0
- package/dist/components/slider/types.d.ts +14 -7
- package/dist/components/slider/useRangeSlider.d.ts +5 -7
- package/dist/components/slider/useRangeSliderPointer.d.ts +19 -0
- package/dist/components/slider/useRangeSliderTooltipCollision.d.ts +31 -2
- 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 +3 -2
- package/dist/components/switch/index.js +2 -2
- package/dist/components/switch/switch.d.ts +5 -2
- package/dist/components/switch/types.d.ts +7 -2
- package/dist/components/switch/useSwitch.d.ts +4 -2
- package/dist/components/tabs/index.d.ts +7 -6
- package/dist/components/tabs/index.js +2 -2
- 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/types.d.ts +13 -4
- package/dist/components/tabs/useTabs.d.ts +1 -1
- package/dist/components/teleport-provider/index.d.ts +2 -0
- package/dist/components/teleport-provider/index.js +2 -0
- package/dist/components/teleport-provider/teleport-provider.d.ts +21 -0
- package/dist/components/teleport-provider/types.d.ts +4 -0
- package/dist/components/teleport-provider/useTeleportTarget.d.ts +5 -0
- package/dist/components/textarea/index.d.ts +3 -2
- package/dist/components/textarea/index.js +2 -2
- package/dist/components/textarea/textarea.d.ts +5 -2
- package/dist/components/textarea/types.d.ts +6 -1
- package/dist/components/textarea/useTextarea.d.ts +3 -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 +110 -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 +3 -2
- package/dist/components/tooltip/index.js +2 -1
- package/dist/components/tooltip/tooltip.d.ts +2 -2
- package/dist/components/tooltip/types.d.ts +14 -13
- package/dist/components/tooltip/useTooltip.d.ts +15 -3
- package/dist/dropdown-menu.css +191 -107
- package/dist/dropdown-menu.js +1729 -107
- package/dist/field.css +41 -39
- package/dist/field.js +40 -16
- package/dist/focus-trap.js +80 -0
- package/dist/icon-button.css +193 -189
- package/dist/icon-button.js +23 -18
- package/dist/icon-button2.js +8 -0
- package/dist/index.d.ts +35 -30
- package/dist/index.js +36 -31
- package/dist/input.css +122 -120
- package/dist/input.js +47 -34
- package/dist/input2.js +9 -0
- package/dist/legacy-unlayered.css +5461 -0
- package/dist/modal.css +129 -127
- package/dist/modal.js +160 -200
- package/dist/number-input.css +87 -85
- package/dist/number-input.js +61 -17
- package/dist/overlay.css +26 -24
- package/dist/overlay.js +17 -9
- package/dist/overlay2.js +4 -0
- package/dist/popover.css +140 -107
- package/dist/popover.js +295 -189
- package/dist/popover2.js +6 -1
- package/dist/progress.css +101 -99
- package/dist/progress.js +50 -28
- package/dist/radio.css +114 -105
- package/dist/radio.js +154 -56
- package/dist/select.css +244 -242
- package/dist/select.js +92 -47
- package/dist/slider.css +1109 -904
- package/dist/slider.js +1118 -923
- package/dist/styles-api.d.ts +22 -0
- package/dist/styles-api.js +49 -0
- package/dist/switch.css +120 -108
- package/dist/switch.js +89 -33
- package/dist/tabs.css +286 -278
- package/dist/tabs.js +60 -21
- package/dist/teleport-provider.js +15 -0
- package/dist/textarea.css +132 -130
- package/dist/textarea.js +77 -29
- package/dist/toast.css +236 -0
- package/dist/toast.js +739 -0
- package/dist/tooltip.css +137 -107
- package/dist/tooltip.js +182 -223
- package/dist/tooltip2.js +8 -0
- package/dist/useClickOutside.js +1 -1
- package/dist/useFloatingPosition.js +1284 -0
- package/dist/useFocusTrap.js +130 -0
- package/dist/useTeleportTarget.js +29 -0
- package/dist/utils/componentColors.d.ts +60 -0
- package/docs/public-styles-api.md +133 -0
- package/docs/public-tokens.md +545 -0
- package/package.json +44 -12
- package/src/styles/_tokens.scss +33 -28
- package/src/styles/_utilities.scss +11 -9
- package/src/styles/styles-manifest.json +4125 -0
- package/dist/components/slider/useRangeSliderTooltipTransition.d.ts +0 -4
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { TabsListProps } from './types';
|
|
1
|
+
import { TabsListProps } 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<TabsListProps> & (typeof globalThis extends {
|
|
4
4
|
__VLS_PROPS_FALLBACK: infer P;
|
|
@@ -8,9 +8,9 @@ declare const __VLS_export: (__VLS_props: NonNullable<Awaited<typeof __VLS_setup
|
|
|
8
8
|
slots: {
|
|
9
9
|
default?: (props: {
|
|
10
10
|
disabled: boolean;
|
|
11
|
-
variant: import('./types').TabsVariant;
|
|
12
|
-
orientation: import('./types').TabsOrientation;
|
|
13
|
-
placement: import('./types').TabsPlacement;
|
|
11
|
+
variant: import('./types.js').TabsVariant;
|
|
12
|
+
orientation: import('./types.js').TabsOrientation;
|
|
13
|
+
placement: import('./types.js').TabsPlacement;
|
|
14
14
|
}) => any;
|
|
15
15
|
};
|
|
16
16
|
emit: {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { TabsTriggerProps } from './types';
|
|
1
|
+
import { TabsTriggerProps } 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<TabsTriggerProps> & (typeof globalThis extends {
|
|
4
4
|
__VLS_PROPS_FALLBACK: infer P;
|
|
@@ -7,12 +7,12 @@ declare const __VLS_export: (__VLS_props: NonNullable<Awaited<typeof __VLS_setup
|
|
|
7
7
|
attrs: any;
|
|
8
8
|
slots: {
|
|
9
9
|
default?: (props: {
|
|
10
|
-
value: import('./types').TabsValue;
|
|
10
|
+
value: import('./types.js').TabsValue;
|
|
11
11
|
selected: boolean;
|
|
12
|
-
size: import('./types').TabsSize;
|
|
13
|
-
variant: import('./types').TabsVariant;
|
|
12
|
+
size: import('./types.js').TabsSize;
|
|
13
|
+
variant: import('./types.js').TabsVariant;
|
|
14
14
|
disabled: boolean;
|
|
15
|
-
align: import('./types').TabsTriggerAlign;
|
|
15
|
+
align: import('./types.js').TabsTriggerAlign;
|
|
16
16
|
select: () => void;
|
|
17
17
|
}) => any;
|
|
18
18
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { TabsProps, TabsValue } from './types';
|
|
1
|
+
import { TabsProps, TabsValue } 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<TabsProps & {
|
|
4
4
|
"onUpdate:modelValue"?: ((value: TabsValue) => any) | undefined;
|
|
@@ -10,11 +10,11 @@ declare const __VLS_export: (__VLS_props: NonNullable<Awaited<typeof __VLS_setup
|
|
|
10
10
|
slots: {
|
|
11
11
|
default?: (props: {
|
|
12
12
|
value: TabsValue | null;
|
|
13
|
-
size: import('./types').TabsSize;
|
|
14
|
-
variant: import('./types').TabsVariant;
|
|
13
|
+
size: import('./types.js').TabsSize;
|
|
14
|
+
variant: import('./types.js').TabsVariant;
|
|
15
15
|
disabled: boolean;
|
|
16
|
-
placement: import('./types').TabsPlacement;
|
|
17
|
-
align: import('./types').TabsTriggerAlign;
|
|
16
|
+
placement: import('./types.js').TabsPlacement;
|
|
17
|
+
align: import('./types.js').TabsTriggerAlign;
|
|
18
18
|
select: (value: TabsValue) => void;
|
|
19
19
|
}) => any;
|
|
20
20
|
};
|
|
@@ -1,4 +1,13 @@
|
|
|
1
1
|
import { ComputedRef } from 'vue';
|
|
2
|
+
import { StylesApiProps } from '../../styles-api.js';
|
|
3
|
+
export declare const tabsParts: readonly ["root"];
|
|
4
|
+
export declare const tabsListParts: readonly ["root"];
|
|
5
|
+
export declare const tabsTriggerParts: readonly ["root"];
|
|
6
|
+
export declare const tabsContentParts: readonly ["root"];
|
|
7
|
+
export type TabsPart = (typeof tabsParts)[number];
|
|
8
|
+
export type TabsListPart = (typeof tabsListParts)[number];
|
|
9
|
+
export type TabsTriggerPart = (typeof tabsTriggerParts)[number];
|
|
10
|
+
export type TabsContentPart = (typeof tabsContentParts)[number];
|
|
2
11
|
export type TabsValue = string | number;
|
|
3
12
|
export type TabsOrientation = 'horizontal' | 'vertical';
|
|
4
13
|
export type TabsPlacement = 'left' | 'right';
|
|
@@ -7,7 +16,7 @@ export type TabsActivationMode = 'automatic' | 'manual';
|
|
|
7
16
|
export type TabsState = 'active' | 'inactive';
|
|
8
17
|
export type TabsSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
9
18
|
export type TabsVariant = 'line' | 'pills' | 'outline';
|
|
10
|
-
export interface TabsProps {
|
|
19
|
+
export interface TabsProps extends StylesApiProps<TabsPart> {
|
|
11
20
|
id?: string;
|
|
12
21
|
modelValue?: TabsValue | null;
|
|
13
22
|
defaultValue?: TabsValue | null;
|
|
@@ -23,19 +32,19 @@ export interface TabsProps {
|
|
|
23
32
|
describedby?: string;
|
|
24
33
|
labelledby?: string;
|
|
25
34
|
}
|
|
26
|
-
export interface TabsListProps {
|
|
35
|
+
export interface TabsListProps extends StylesApiProps<TabsListPart> {
|
|
27
36
|
id?: string;
|
|
28
37
|
ariaLabel?: string;
|
|
29
38
|
ariaDescribedby?: string;
|
|
30
39
|
ariaLabelledby?: string;
|
|
31
40
|
}
|
|
32
|
-
export interface TabsTriggerProps {
|
|
41
|
+
export interface TabsTriggerProps extends StylesApiProps<TabsTriggerPart> {
|
|
33
42
|
id?: string;
|
|
34
43
|
value: TabsValue;
|
|
35
44
|
disabled?: boolean;
|
|
36
45
|
align?: TabsTriggerAlign;
|
|
37
46
|
}
|
|
38
|
-
export interface TabsContentProps {
|
|
47
|
+
export interface TabsContentProps extends StylesApiProps<TabsContentPart> {
|
|
39
48
|
id?: string;
|
|
40
49
|
value: TabsValue;
|
|
41
50
|
unmountOnExit?: boolean;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { TabsContentProps, TabsListProps, TabsProps, TabsTriggerProps, TabsValue, UseTabsContentReturn, UseTabsListReturn, UseTabsReturn, UseTabsTriggerReturn } from './types';
|
|
1
|
+
import { TabsContentProps, TabsListProps, TabsProps, TabsTriggerProps, TabsValue, UseTabsContentReturn, UseTabsListReturn, UseTabsReturn, UseTabsTriggerReturn } from './types.js';
|
|
2
2
|
export declare function useTabs(props: Readonly<TabsProps>, emitUpdate: (value: TabsValue) => void): UseTabsReturn;
|
|
3
3
|
export declare function useTabsList(props: Readonly<TabsListProps>): UseTabsListReturn;
|
|
4
4
|
export declare function useTabsTrigger(props: Readonly<TabsTriggerProps>): UseTabsTriggerReturn;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { TeleportProviderProps } 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<TeleportProviderProps> & (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
|
+
}) & {};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { ComputedRef } from 'vue';
|
|
2
|
+
import { TeleportTarget, TeleportTargetValue } from '../floating/types.js';
|
|
3
|
+
import { TeleportProviderProps } from './types.js';
|
|
4
|
+
export declare function provideTeleportTarget(props: Readonly<TeleportProviderProps>): ComputedRef<TeleportTargetValue>;
|
|
5
|
+
export declare function useTeleportTarget(getTarget: () => TeleportTarget | null | undefined): ComputedRef<TeleportTargetValue>;
|
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
export { default as Textarea } from './textarea';
|
|
2
|
-
export
|
|
1
|
+
export { default as Textarea } from './textarea.js';
|
|
2
|
+
export { textareaParts } from './types.js';
|
|
3
|
+
export type { TextareaPart, TextareaProps, TextareaRadius, TextareaResize, TextareaSize, } from './types.js';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export { textarea_default as Textarea };
|
|
1
|
+
import { n as textarea_default, t as textareaParts } from "../../textarea.js";
|
|
2
|
+
export { textarea_default as Textarea, textareaParts };
|
|
@@ -1,11 +1,14 @@
|
|
|
1
|
-
import { TextareaProps } from './types';
|
|
1
|
+
import { TextareaProps } 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<TextareaProps & {
|
|
4
4
|
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
5
5
|
}> & (typeof globalThis extends {
|
|
6
6
|
__VLS_PROPS_FALLBACK: infer P;
|
|
7
7
|
} ? P : {});
|
|
8
|
-
expose: (exposed: {
|
|
8
|
+
expose: (exposed: import('vue').ShallowUnwrapRef<{
|
|
9
|
+
nativeElement: import('vue').Ref<HTMLTextAreaElement | null, HTMLTextAreaElement | null>;
|
|
10
|
+
focus: (options?: FocusOptions) => void;
|
|
11
|
+
}>) => void;
|
|
9
12
|
attrs: any;
|
|
10
13
|
slots: {};
|
|
11
14
|
emit: (evt: "update:modelValue", value: string) => void;
|
|
@@ -1,7 +1,11 @@
|
|
|
1
|
+
import { TextareaHTMLAttributes } from 'vue';
|
|
2
|
+
import { StylesApiProps } from '../../styles-api.js';
|
|
3
|
+
export declare const textareaParts: readonly ["root", "input"];
|
|
4
|
+
export type TextareaPart = (typeof textareaParts)[number];
|
|
1
5
|
export type TextareaRadius = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
2
6
|
export type TextareaSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
3
7
|
export type TextareaResize = 'none' | 'vertical' | 'both';
|
|
4
|
-
export interface TextareaProps {
|
|
8
|
+
export interface TextareaProps extends StylesApiProps<TextareaPart> {
|
|
5
9
|
id?: string;
|
|
6
10
|
name?: string;
|
|
7
11
|
modelValue: string;
|
|
@@ -21,4 +25,5 @@ export interface TextareaProps {
|
|
|
21
25
|
ariaLabel?: string;
|
|
22
26
|
describedby?: string;
|
|
23
27
|
labelledby?: string;
|
|
28
|
+
inputAttrs?: TextareaHTMLAttributes;
|
|
24
29
|
}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { TextareaProps } from './types';
|
|
1
|
+
import { TextareaProps } from './types.js';
|
|
2
2
|
export declare function useTextarea(props: Readonly<TextareaProps>, emitUpdate: (value: string) => void): {
|
|
3
3
|
textareaRef: import('vue').Ref<HTMLTextAreaElement | null, HTMLTextAreaElement | null>;
|
|
4
|
-
control: import('../../composables/useControlState').ControlState;
|
|
4
|
+
control: import('../../composables/useControlState.js').ControlState;
|
|
5
5
|
rootClass: import('vue').ComputedRef<string[]>;
|
|
6
6
|
nativeRows: import('vue').ComputedRef<number | undefined>;
|
|
7
7
|
onInput: (e: Event) => void;
|
|
8
8
|
focusTextarea: (e: MouseEvent) => void;
|
|
9
|
+
focus: (options?: FocusOptions) => void;
|
|
9
10
|
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export declare const DEFAULT_TOAST_MAX = 5;
|
|
2
|
+
export declare const DEFAULT_TOAST_DURATION = 5000;
|
|
3
|
+
export declare const DEFAULT_TOAST_ROLE = "status";
|
|
4
|
+
export declare const DEFAULT_TOAST_PAUSE_ON_HOVER = true;
|
|
5
|
+
export declare const DEFAULT_TOAST_PAUSE_ON_FOCUS = true;
|
|
6
|
+
export declare const DEFAULT_TOAST_CLOSABLE = true;
|
|
7
|
+
export declare const DEFAULT_TOAST_CLOSE_LABEL = "Close toast";
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export { default as Toast } from './toast.js';
|
|
2
|
+
export { default as ToastProvider } from './toast-provider.js';
|
|
3
|
+
export { default as ToastViewport } from './toast-viewport.js';
|
|
4
|
+
export { toastColors, toastParts, toastPositions, toastRadiuses, toastTypes, toastVariants, toastViewportParts, } from './types.js';
|
|
5
|
+
export { useToast } from './useToast.js';
|
|
6
|
+
export { useToastState } from './useToastState.js';
|
|
7
|
+
export type { ToastCloseReason, ToastColor, ToastCreate, ToastId, ToastInput, ToastItem, ToastOptions, ToastPart, ToastPosition, ToastProps, ToastProviderContext, ToastProviderProps, ToastRadius, ToastRole, ToastStateBindingProps, ToastStateOption, ToastType, ToastUpdateOptions, ToastVariant, ToastViewportProps, ToastViewportPart, ToastViewportSlotProps, UseToastReturn, UseToastStateOptions, UseToastStateReturn, } from './types.js';
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { a as toastColors, c as toastRadiuses, d as toastViewportParts, f as toast_default, i as useToast, l as toastTypes, n as toast_viewport_default, o as toastParts, r as toast_provider_default, s as toastPositions, t as useToastState, u as toastVariants } from "../../toast.js";
|
|
2
|
+
export { toast_default as Toast, toast_provider_default as ToastProvider, toast_viewport_default as ToastViewport, toastColors, toastParts, toastPositions, toastRadiuses, toastTypes, toastVariants, toastViewportParts, useToast, useToastState };
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { ToastProviderProps } 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<ToastProviderProps> & (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
|
+
}) & {};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { ToastItem, ToastViewportProps } 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<ToastViewportProps> & (typeof globalThis extends {
|
|
4
|
+
__VLS_PROPS_FALLBACK: infer P;
|
|
5
|
+
} ? P : {});
|
|
6
|
+
expose: (exposed: {}) => void;
|
|
7
|
+
attrs: any;
|
|
8
|
+
slots: {
|
|
9
|
+
icon?: (props: {
|
|
10
|
+
toast: ToastItem;
|
|
11
|
+
dismiss: () => void;
|
|
12
|
+
}) => any;
|
|
13
|
+
} & {
|
|
14
|
+
default?: (props: {
|
|
15
|
+
toast: ToastItem;
|
|
16
|
+
dismiss: () => void;
|
|
17
|
+
}) => any;
|
|
18
|
+
} & {
|
|
19
|
+
action?: (props: {
|
|
20
|
+
toast: ToastItem;
|
|
21
|
+
dismiss: () => void;
|
|
22
|
+
}) => any;
|
|
23
|
+
};
|
|
24
|
+
emit: {};
|
|
25
|
+
}>) => import('vue').VNode & {
|
|
26
|
+
__ctx?: NonNullable<Awaited<typeof __VLS_setup>>;
|
|
27
|
+
};
|
|
28
|
+
declare const _default: typeof __VLS_export;
|
|
29
|
+
export default _default;
|
|
30
|
+
type __VLS_PrettifyLocal<T> = (T extends any ? {
|
|
31
|
+
[K in keyof T]: T[K];
|
|
32
|
+
} : {
|
|
33
|
+
[K in keyof T as K]: T[K];
|
|
34
|
+
}) & {};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { ToastCloseReason, ToastProps } 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<ToastProps & {
|
|
4
|
+
onClose?: ((reason: ToastCloseReason) => any) | undefined;
|
|
5
|
+
"onUpdate:open"?: ((value: boolean) => any) | undefined;
|
|
6
|
+
"onAfter-leave"?: (() => any) | undefined;
|
|
7
|
+
}> & (typeof globalThis extends {
|
|
8
|
+
__VLS_PROPS_FALLBACK: infer P;
|
|
9
|
+
} ? P : {});
|
|
10
|
+
expose: (exposed: {}) => void;
|
|
11
|
+
attrs: any;
|
|
12
|
+
slots: {
|
|
13
|
+
icon?: (props: {}) => any;
|
|
14
|
+
} & {
|
|
15
|
+
title?: (props: {}) => any;
|
|
16
|
+
} & {
|
|
17
|
+
default?: (props: {}) => any;
|
|
18
|
+
} & {
|
|
19
|
+
action?: (props: {}) => any;
|
|
20
|
+
};
|
|
21
|
+
emit: ((evt: "close", reason: ToastCloseReason) => void) & ((evt: "update:open", value: boolean) => void) & ((evt: "after-leave") => void);
|
|
22
|
+
}>) => import('vue').VNode & {
|
|
23
|
+
__ctx?: NonNullable<Awaited<typeof __VLS_setup>>;
|
|
24
|
+
};
|
|
25
|
+
declare const _default: typeof __VLS_export;
|
|
26
|
+
export default _default;
|
|
27
|
+
type __VLS_PrettifyLocal<T> = (T extends any ? {
|
|
28
|
+
[K in keyof T]: T[K];
|
|
29
|
+
} : {
|
|
30
|
+
[K in keyof T as K]: T[K];
|
|
31
|
+
}) & {};
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
import { ComputedRef, InjectionKey, MaybeRefOrGetter, Raw } from 'vue';
|
|
2
|
+
import { TeleportProps } from '../floating/types.js';
|
|
3
|
+
import { ComponentColorValue } from '../../utils/componentColors.js';
|
|
4
|
+
import { StylesApiProps } from '../../styles-api.js';
|
|
5
|
+
export declare const toastParts: readonly ["root", "icon", "title", "description", "body", "action", "close"];
|
|
6
|
+
export declare const toastViewportParts: readonly ["root", "item", "toast", "toastIcon", "toastTitle", "toastDescription", "toastBody", "toastAction", "toastClose"];
|
|
7
|
+
export type ToastPart = (typeof toastParts)[number];
|
|
8
|
+
export type ToastViewportPart = (typeof toastViewportParts)[number];
|
|
9
|
+
export declare const toastColors: readonly ["dark", "gray", "red", "pink", "grape", "violet", "indigo", "blue", "cyan", "teal", "green", "lime", "yellow", "orange"];
|
|
10
|
+
export declare const toastVariants: readonly ["subtle", "surface", "outline", "solid"];
|
|
11
|
+
export declare const toastRadiuses: readonly ["none", "xs", "sm", "md", "lg", "xl"];
|
|
12
|
+
export declare const toastPositions: readonly ["top-left", "top-center", "top-right", "bottom-left", "bottom-center", "bottom-right"];
|
|
13
|
+
export declare const toastTypes: readonly ["default", "success", "error", "warning", "info"];
|
|
14
|
+
export type ToastColor = ComponentColorValue;
|
|
15
|
+
export type ToastVariant = (typeof toastVariants)[number];
|
|
16
|
+
export type ToastRadius = (typeof toastRadiuses)[number];
|
|
17
|
+
export type ToastPosition = (typeof toastPositions)[number];
|
|
18
|
+
export type ToastType = (typeof toastTypes)[number];
|
|
19
|
+
export type ToastRole = 'alert' | 'status' | 'none';
|
|
20
|
+
export type ToastCloseReason = 'dismiss' | 'timeout';
|
|
21
|
+
export type ToastStateOption<T> = MaybeRefOrGetter<T>;
|
|
22
|
+
export type ToastId = string;
|
|
23
|
+
export interface ToastProps extends StylesApiProps<ToastPart> {
|
|
24
|
+
open?: boolean;
|
|
25
|
+
title?: string;
|
|
26
|
+
description?: string;
|
|
27
|
+
variant?: ToastVariant;
|
|
28
|
+
color?: ToastColor;
|
|
29
|
+
autoContrast?: boolean;
|
|
30
|
+
radius?: ToastRadius;
|
|
31
|
+
role?: ToastRole;
|
|
32
|
+
duration?: number;
|
|
33
|
+
pauseOnHover?: boolean;
|
|
34
|
+
pauseOnFocus?: boolean;
|
|
35
|
+
closable?: boolean;
|
|
36
|
+
closeLabel?: string;
|
|
37
|
+
}
|
|
38
|
+
export interface ToastStateBindingProps {
|
|
39
|
+
open: boolean;
|
|
40
|
+
'onUpdate:open': (open: boolean) => void;
|
|
41
|
+
onClose: (reason: ToastCloseReason) => void;
|
|
42
|
+
}
|
|
43
|
+
export interface UseToastStateOptions {
|
|
44
|
+
open?: ToastStateOption<boolean | undefined>;
|
|
45
|
+
defaultOpen?: boolean;
|
|
46
|
+
onOpenChange?: (open: boolean) => void;
|
|
47
|
+
onClose?: (reason: ToastCloseReason) => void;
|
|
48
|
+
}
|
|
49
|
+
export interface UseToastStateReturn {
|
|
50
|
+
isOpen: ComputedRef<boolean>;
|
|
51
|
+
lastCloseReason: ComputedRef<ToastCloseReason | null>;
|
|
52
|
+
toastProps: ComputedRef<ToastStateBindingProps>;
|
|
53
|
+
setOpen: (open: boolean) => void;
|
|
54
|
+
open: () => void;
|
|
55
|
+
close: (reason?: ToastCloseReason) => void;
|
|
56
|
+
toggle: () => void;
|
|
57
|
+
}
|
|
58
|
+
export interface ToastProviderProps {
|
|
59
|
+
max?: number;
|
|
60
|
+
duration?: number;
|
|
61
|
+
variant?: ToastVariant;
|
|
62
|
+
color?: ToastColor;
|
|
63
|
+
autoContrast?: boolean;
|
|
64
|
+
radius?: ToastRadius;
|
|
65
|
+
role?: ToastRole;
|
|
66
|
+
pauseOnHover?: boolean;
|
|
67
|
+
pauseOnFocus?: boolean;
|
|
68
|
+
closable?: boolean;
|
|
69
|
+
closeLabel?: string;
|
|
70
|
+
}
|
|
71
|
+
export interface ToastViewportProps extends TeleportProps, StylesApiProps<ToastViewportPart> {
|
|
72
|
+
position?: ToastPosition;
|
|
73
|
+
label?: string;
|
|
74
|
+
}
|
|
75
|
+
export interface ToastOptions extends Omit<ToastProps, 'open'> {
|
|
76
|
+
/** Replaces an active toast with the same id and starts a fresh lifecycle. */
|
|
77
|
+
id?: ToastId;
|
|
78
|
+
type?: ToastType;
|
|
79
|
+
onClose?: (reason: ToastCloseReason) => void;
|
|
80
|
+
}
|
|
81
|
+
export type ToastUpdateOptions = Partial<Omit<ToastOptions, 'id'>>;
|
|
82
|
+
export type ToastInput = string | ToastOptions;
|
|
83
|
+
export interface ToastItem {
|
|
84
|
+
readonly id: ToastId;
|
|
85
|
+
/** A unique key for this rendered instance, including replacements that reuse an id. */
|
|
86
|
+
readonly instanceId: string;
|
|
87
|
+
readonly type: ToastType;
|
|
88
|
+
readonly props: Readonly<Raw<Omit<ToastProps, 'open'>>>;
|
|
89
|
+
readonly onClose?: (reason: ToastCloseReason) => void;
|
|
90
|
+
}
|
|
91
|
+
export interface ToastViewportSlotProps {
|
|
92
|
+
toast: ToastItem;
|
|
93
|
+
dismiss: () => void;
|
|
94
|
+
}
|
|
95
|
+
export type ToastCreate = (input: ToastInput, options?: ToastOptions) => ToastId;
|
|
96
|
+
export interface UseToastReturn {
|
|
97
|
+
toasts: ComputedRef<readonly ToastItem[]>;
|
|
98
|
+
show: ToastCreate;
|
|
99
|
+
success: ToastCreate;
|
|
100
|
+
error: ToastCreate;
|
|
101
|
+
warning: ToastCreate;
|
|
102
|
+
info: ToastCreate;
|
|
103
|
+
update: (id: ToastId, options: ToastUpdateOptions) => void;
|
|
104
|
+
dismiss: (id: ToastId, reason?: ToastCloseReason) => void;
|
|
105
|
+
dismissAll: (reason?: ToastCloseReason) => void;
|
|
106
|
+
}
|
|
107
|
+
export interface ToastProviderContext extends UseToastReturn {
|
|
108
|
+
dismissInstance: (instanceId: string, reason?: ToastCloseReason) => void;
|
|
109
|
+
}
|
|
110
|
+
export declare const toastProviderKey: InjectionKey<ToastProviderContext>;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { ToastProviderContext, ToastProviderProps, UseToastReturn } from './types.js';
|
|
2
|
+
export declare function provideToast(props: Readonly<ToastProviderProps>): ToastProviderContext;
|
|
3
|
+
export declare function useToastContext(consumer: string): ToastProviderContext;
|
|
4
|
+
export declare function useToast(): UseToastReturn;
|
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
export { default as Tooltip } from './tooltip';
|
|
2
|
-
export
|
|
1
|
+
export { default as Tooltip } from './tooltip.js';
|
|
2
|
+
export { tooltipParts } from './types.js';
|
|
3
|
+
export type { TooltipColor, TooltipOffset, TooltipOffsetOptions, TooltipPart, TooltipPlacement, TooltipProps, TooltipSlotProps, TooltipTarget, TooltipTriggerProps, } from './types.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { TooltipProps } from './types';
|
|
1
|
+
import { TooltipProps, TooltipTriggerProps } 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<TooltipProps & {
|
|
4
4
|
"onUpdate:open"?: ((value: boolean) => any) | undefined;
|
|
@@ -9,7 +9,7 @@ declare const __VLS_export: (__VLS_props: NonNullable<Awaited<typeof __VLS_setup
|
|
|
9
9
|
attrs: any;
|
|
10
10
|
slots: {
|
|
11
11
|
default?: (props: {
|
|
12
|
-
triggerProps:
|
|
12
|
+
triggerProps: TooltipTriggerProps;
|
|
13
13
|
}) => any;
|
|
14
14
|
} & {
|
|
15
15
|
content?: (props: {}) => any;
|
|
@@ -1,30 +1,31 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { ComponentColorValue } from '../../utils/componentColors';
|
|
1
|
+
import { HTMLAttributes } from 'vue';
|
|
2
|
+
import { ComponentColorValue } from '../../utils/componentColors.js';
|
|
3
|
+
import { StylesApiProps } from '../../styles-api.js';
|
|
4
|
+
import { FloatingOffset, FloatingOffsetOptions, FloatingPositionProps, FloatingTarget } from '../floating/types.js';
|
|
5
|
+
export declare const tooltipParts: readonly ["root", "trigger", "content"];
|
|
6
|
+
export type TooltipPart = (typeof tooltipParts)[number];
|
|
3
7
|
export type TooltipPlacement = 'top' | 'right' | 'bottom' | 'left';
|
|
4
8
|
export type TooltipColor = ComponentColorValue;
|
|
5
|
-
export type TooltipTarget =
|
|
6
|
-
export
|
|
7
|
-
|
|
8
|
-
crossAxis?: number;
|
|
9
|
-
}
|
|
10
|
-
export type TooltipOffset = number | TooltipOffsetOptions;
|
|
9
|
+
export type TooltipTarget = FloatingTarget;
|
|
10
|
+
export type TooltipOffsetOptions = FloatingOffsetOptions;
|
|
11
|
+
export type TooltipOffset = FloatingOffset;
|
|
11
12
|
export interface TooltipTriggerProps {
|
|
12
13
|
'aria-describedby'?: string;
|
|
14
|
+
class?: HTMLAttributes['class'];
|
|
15
|
+
style?: HTMLAttributes['style'];
|
|
16
|
+
'data-state'?: 'open' | 'closed';
|
|
17
|
+
'data-disabled'?: '';
|
|
13
18
|
}
|
|
14
19
|
export interface TooltipSlotProps {
|
|
15
20
|
triggerProps: TooltipTriggerProps;
|
|
16
21
|
}
|
|
17
|
-
export interface TooltipProps {
|
|
22
|
+
export interface TooltipProps extends FloatingPositionProps<TooltipPlacement>, StylesApiProps<TooltipPart> {
|
|
18
23
|
id?: string;
|
|
19
24
|
content?: string;
|
|
20
|
-
target?: TooltipTarget | null;
|
|
21
|
-
placement?: TooltipPlacement;
|
|
22
25
|
color?: TooltipColor;
|
|
23
26
|
autoContrast?: boolean;
|
|
24
|
-
offset?: TooltipOffset;
|
|
25
27
|
open?: boolean;
|
|
26
28
|
openDelay?: number;
|
|
27
|
-
arrow?: boolean;
|
|
28
29
|
disabled?: boolean;
|
|
29
30
|
decorative?: boolean;
|
|
30
31
|
}
|
|
@@ -1,8 +1,15 @@
|
|
|
1
1
|
import { CSSProperties } from 'vue';
|
|
2
|
-
import { TooltipProps, TooltipTriggerProps } from './types';
|
|
3
|
-
|
|
2
|
+
import { TooltipOffset, TooltipPlacement, TooltipProps, TooltipTriggerProps } from './types.js';
|
|
3
|
+
type TooltipBehaviorProps = Omit<TooltipProps, 'classNames' | 'styles'>;
|
|
4
|
+
export declare function resolveTooltipOffsetStyle(offset: TooltipOffset | undefined): CSSProperties | undefined;
|
|
5
|
+
export declare function resolveTooltipColorStyleWithContrast(color: TooltipProps['color'], autoContrast: TooltipProps['autoContrast']): CSSProperties | undefined;
|
|
6
|
+
export declare function useTooltip(props: Readonly<TooltipBehaviorProps>, emitOpenChange?: (open: boolean) => void): {
|
|
7
|
+
rootRef: import('vue').Ref<HTMLElement | null, HTMLElement | null>;
|
|
8
|
+
contentRef: import('vue').Ref<HTMLElement | null, HTMLElement | null>;
|
|
9
|
+
arrowRef: import('vue').Ref<HTMLElement | null, HTMLElement | null>;
|
|
4
10
|
tooltipId: import('vue').ComputedRef<string>;
|
|
5
11
|
isOpen: import('vue').ComputedRef<boolean>;
|
|
12
|
+
isDisabled: import('vue').ComputedRef<boolean>;
|
|
6
13
|
isVisible: import('vue').ComputedRef<boolean>;
|
|
7
14
|
isTargetMode: import('vue').ComputedRef<boolean>;
|
|
8
15
|
shouldRenderContent: import('vue').ComputedRef<boolean>;
|
|
@@ -10,8 +17,13 @@ export declare function useTooltip(props: Readonly<TooltipProps>, emitOpenChange
|
|
|
10
17
|
triggerProps: import('vue').ComputedRef<TooltipTriggerProps>;
|
|
11
18
|
contentRole: import('vue').ComputedRef<"tooltip" | undefined>;
|
|
12
19
|
contentAriaHidden: import('vue').ComputedRef<"true" | undefined>;
|
|
13
|
-
contentStyle: import('vue').ComputedRef<CSSProperties
|
|
20
|
+
contentStyle: import('vue').ComputedRef<CSSProperties>;
|
|
21
|
+
actualPlacement: import('vue').Ref<TooltipPlacement, TooltipPlacement>;
|
|
22
|
+
placementSide: import('vue').ComputedRef<string>;
|
|
23
|
+
arrowStyle: import('vue').Ref<CSSProperties | undefined, CSSProperties | undefined>;
|
|
24
|
+
teleportTo: import('vue').ComputedRef<import('../floating/index.js').TeleportTargetValue>;
|
|
14
25
|
openTooltip: () => void;
|
|
15
26
|
closeTooltip: () => void;
|
|
16
27
|
onKeydown: (event: KeyboardEvent) => void;
|
|
17
28
|
};
|
|
29
|
+
export {};
|