@dskripchenko/ui 1.6.2 → 1.8.0
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/components/Cascader/UidCascader.vue.d.ts +5 -0
- package/dist/components/Checkbox/UidCheckbox.vue.d.ts +1 -1
- package/dist/components/Checkbox/UidCheckboxGroup.vue.d.ts +1 -1
- package/dist/components/Code/UidCode.vue.d.ts +2 -2
- package/dist/components/ColorPicker/UidColorPicker.vue.d.ts +8 -0
- package/dist/components/Combobox/UidCombobox.vue.d.ts +1 -0
- package/dist/components/DatePicker/UidDatePicker.vue.d.ts +5 -0
- package/dist/components/DateRangePicker/UidDateRangePicker.vue.d.ts +8 -3
- package/dist/components/FormField/UidFormField.vue.d.ts +1 -1
- package/dist/components/Gauge/UidGauge.vue.d.ts +3 -0
- package/dist/components/Image/UidImage.vue.d.ts +1 -1
- package/dist/components/Mention/UidMention.vue.d.ts +1 -0
- package/dist/components/Radio/UidRadioGroup.vue.d.ts +1 -1
- package/dist/components/Rating/UidRating.vue.d.ts +3 -0
- package/dist/components/Stat/UidStat.vue.d.ts +7 -0
- package/dist/components/Switch/UidSwitch.vue.d.ts +1 -1
- package/dist/components/Table/UidTable.vue.d.ts +2 -2
- package/dist/components/Textarea/UidTextarea.vue.d.ts +1 -1
- package/dist/components/TimePicker/UidTimePicker.vue.d.ts +5 -0
- package/dist/components/TreeSelect/UidTreeSelect.vue.d.ts +5 -0
- package/dist/composables/useFloatingPanel.d.ts +31 -0
- package/dist/composables/useOverlayStack.d.ts +5 -0
- package/dist/index.cjs +2 -2
- package/dist/index.d.ts +1 -1
- package/dist/index.mjs +2823 -2452
- package/dist/locales/types.d.ts +103 -0
- package/dist/styles/all.css +32 -3
- package/dist/styles/global.css +10 -0
- package/dist/styles/index.css +1 -1
- package/dist/styles/themes.css +4 -0
- package/dist/styles/tokens.css +17 -2
- package/dist/utils/formatNumber.d.ts +14 -0
- package/dist/utils/validation/index.d.ts +1 -1
- package/dist/utils/validation/messages.d.ts +3 -0
- package/package.json +1 -1
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { Size } from '../../types/index.js';
|
|
1
2
|
export type CascaderValue = string | number;
|
|
2
3
|
export interface CascaderOption {
|
|
3
4
|
value: CascaderValue;
|
|
@@ -6,6 +7,8 @@ export interface CascaderOption {
|
|
|
6
7
|
disabled?: boolean;
|
|
7
8
|
}
|
|
8
9
|
export interface UidCascaderProps {
|
|
10
|
+
/** Control height of the shared size scale (`--uid-size-sm|md|lg`). */
|
|
11
|
+
size?: Size;
|
|
9
12
|
options: CascaderOption[];
|
|
10
13
|
placeholder?: string;
|
|
11
14
|
separator?: string;
|
|
@@ -29,6 +32,7 @@ declare const _default: import('vue').DefineComponent<__VLS_PublicProps, {}, {},
|
|
|
29
32
|
"onUpdate:modelValue"?: ((value: CascaderValue[]) => any) | undefined;
|
|
30
33
|
onChange?: ((value: CascaderValue[], path: CascaderOption[]) => any) | undefined;
|
|
31
34
|
}>, {
|
|
35
|
+
size: Size;
|
|
32
36
|
disabled: boolean;
|
|
33
37
|
separator: string;
|
|
34
38
|
searchable: boolean;
|
|
@@ -39,6 +43,7 @@ declare const _default: import('vue').DefineComponent<__VLS_PublicProps, {}, {},
|
|
|
39
43
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
40
44
|
containerRef: HTMLDivElement;
|
|
41
45
|
triggerRef: HTMLDivElement;
|
|
46
|
+
panelRef: HTMLDivElement;
|
|
42
47
|
searchRef: HTMLInputElement;
|
|
43
48
|
}, HTMLDivElement>;
|
|
44
49
|
export default _default;
|
|
@@ -28,8 +28,8 @@ declare const _default: import('vue').DefineComponent<__VLS_PublicProps, {}, {},
|
|
|
28
28
|
label: string;
|
|
29
29
|
required: boolean;
|
|
30
30
|
disabled: boolean;
|
|
31
|
-
hint: string;
|
|
32
31
|
error: string;
|
|
32
|
+
hint: string;
|
|
33
33
|
name: string;
|
|
34
34
|
direction: "horizontal" | "vertical";
|
|
35
35
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
@@ -21,12 +21,12 @@ declare function __VLS_template(): {
|
|
|
21
21
|
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
22
22
|
declare const __VLS_component: import('vue').DefineComponent<UidCodeProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<UidCodeProps> & Readonly<{}>, {
|
|
23
23
|
code: string;
|
|
24
|
-
inline: boolean;
|
|
25
24
|
copy: boolean;
|
|
25
|
+
inline: boolean;
|
|
26
26
|
wrap: boolean;
|
|
27
|
+
maxHeight: string;
|
|
27
28
|
language: string;
|
|
28
29
|
lineNumbers: boolean;
|
|
29
|
-
maxHeight: string;
|
|
30
30
|
highlight: boolean;
|
|
31
31
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
32
32
|
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
@@ -1,7 +1,11 @@
|
|
|
1
|
+
import { Size } from '../../types/index.js';
|
|
1
2
|
export interface UidColorPickerProps {
|
|
3
|
+
/** Control height of the shared size scale (`--uid-size-sm|md|lg`). */
|
|
4
|
+
size?: Size;
|
|
2
5
|
disabled?: boolean;
|
|
3
6
|
presets?: string[];
|
|
4
7
|
alpha?: boolean;
|
|
8
|
+
placeholder?: string;
|
|
5
9
|
}
|
|
6
10
|
type __VLS_Props = UidColorPickerProps;
|
|
7
11
|
type __VLS_PublicProps = {
|
|
@@ -14,11 +18,15 @@ declare const _default: import('vue').DefineComponent<__VLS_PublicProps, {}, {},
|
|
|
14
18
|
"onUpdate:modelValue"?: ((value: string | null) => any) | undefined;
|
|
15
19
|
onChange?: ((value: string | null) => any) | undefined;
|
|
16
20
|
}>, {
|
|
21
|
+
size: Size;
|
|
17
22
|
disabled: boolean;
|
|
23
|
+
placeholder: string;
|
|
18
24
|
alpha: boolean;
|
|
19
25
|
presets: string[];
|
|
20
26
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
21
27
|
containerRef: HTMLDivElement;
|
|
28
|
+
triggerRef: HTMLButtonElement;
|
|
29
|
+
panelRef: HTMLDivElement;
|
|
22
30
|
gradientRef: HTMLDivElement;
|
|
23
31
|
hueSliderRef: HTMLDivElement;
|
|
24
32
|
alphaSliderRef: HTMLDivElement;
|
|
@@ -41,6 +41,7 @@ declare const _default: import('vue').DefineComponent<__VLS_PublicProps, {}, {},
|
|
|
41
41
|
allowCreate: boolean;
|
|
42
42
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
43
43
|
containerRef: HTMLDivElement;
|
|
44
|
+
controlRef: HTMLDivElement;
|
|
44
45
|
inputRef: HTMLInputElement;
|
|
45
46
|
listRef: HTMLDivElement;
|
|
46
47
|
}, HTMLDivElement>;
|
|
@@ -1,4 +1,7 @@
|
|
|
1
|
+
import { Size } from '../../types/index.js';
|
|
1
2
|
export interface UidDatePickerProps {
|
|
3
|
+
/** Control height of the shared size scale (`--uid-size-sm|md|lg`). */
|
|
4
|
+
size?: Size;
|
|
2
5
|
min?: string;
|
|
3
6
|
max?: string;
|
|
4
7
|
disabled?: boolean;
|
|
@@ -14,6 +17,7 @@ declare const _default: import('vue').DefineComponent<__VLS_PublicProps, {}, {},
|
|
|
14
17
|
}, string, import('vue').PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
15
18
|
"onUpdate:modelValue"?: ((value: string | null) => any) | undefined;
|
|
16
19
|
}>, {
|
|
20
|
+
size: Size;
|
|
17
21
|
disabled: boolean;
|
|
18
22
|
min: string;
|
|
19
23
|
max: string;
|
|
@@ -21,6 +25,7 @@ declare const _default: import('vue').DefineComponent<__VLS_PublicProps, {}, {},
|
|
|
21
25
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
22
26
|
containerRef: HTMLDivElement;
|
|
23
27
|
triggerRef: HTMLDivElement;
|
|
28
|
+
panelRef: HTMLDivElement;
|
|
24
29
|
gridRef: HTMLDivElement;
|
|
25
30
|
}, HTMLDivElement>;
|
|
26
31
|
export default _default;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { Size } from '../../types/index.js';
|
|
1
2
|
export interface DateRange {
|
|
2
3
|
start: string | null;
|
|
3
4
|
end: string | null;
|
|
@@ -7,6 +8,8 @@ export interface DateRangePreset {
|
|
|
7
8
|
range: () => DateRange;
|
|
8
9
|
}
|
|
9
10
|
export interface UidDateRangePickerProps {
|
|
11
|
+
/** Control height of the shared size scale (`--uid-size-sm|md|lg`). */
|
|
12
|
+
size?: Size;
|
|
10
13
|
min?: string;
|
|
11
14
|
max?: string;
|
|
12
15
|
disabled?: boolean;
|
|
@@ -18,15 +21,16 @@ export interface UidDateRangePickerProps {
|
|
|
18
21
|
}
|
|
19
22
|
type __VLS_Props = UidDateRangePickerProps;
|
|
20
23
|
type __VLS_PublicProps = {
|
|
21
|
-
modelValue?: DateRange;
|
|
24
|
+
modelValue?: DateRange | null;
|
|
22
25
|
} & __VLS_Props;
|
|
23
26
|
declare const _default: import('vue').DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
24
|
-
"update:modelValue": (value: DateRange) => any;
|
|
27
|
+
"update:modelValue": (value: DateRange | null) => any;
|
|
25
28
|
change: (value: DateRange) => any;
|
|
26
29
|
}, string, import('vue').PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
27
|
-
"onUpdate:modelValue"?: ((value: DateRange) => any) | undefined;
|
|
30
|
+
"onUpdate:modelValue"?: ((value: DateRange | null) => any) | undefined;
|
|
28
31
|
onChange?: ((value: DateRange) => any) | undefined;
|
|
29
32
|
}>, {
|
|
33
|
+
size: Size;
|
|
30
34
|
disabled: boolean;
|
|
31
35
|
min: string;
|
|
32
36
|
max: string;
|
|
@@ -37,5 +41,6 @@ declare const _default: import('vue').DefineComponent<__VLS_PublicProps, {}, {},
|
|
|
37
41
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
38
42
|
containerRef: HTMLDivElement;
|
|
39
43
|
triggerRef: HTMLDivElement;
|
|
44
|
+
panelRef: HTMLDivElement;
|
|
40
45
|
}, HTMLDivElement>;
|
|
41
46
|
export default _default;
|
|
@@ -23,8 +23,8 @@ declare const __VLS_component: import('vue').DefineComponent<UidFormFieldProps,
|
|
|
23
23
|
label: string;
|
|
24
24
|
required: boolean;
|
|
25
25
|
disabled: boolean;
|
|
26
|
-
hint: string;
|
|
27
26
|
error: string;
|
|
27
|
+
hint: string;
|
|
28
28
|
labelFor: string;
|
|
29
29
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
30
30
|
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
@@ -20,6 +20,8 @@ export interface UidGaugeProps {
|
|
|
20
20
|
suffix?: string;
|
|
21
21
|
precision?: number;
|
|
22
22
|
formatValue?: (value: number) => string;
|
|
23
|
+
/** BCP 47 tag for number formatting; defaults to the active kit locale. */
|
|
24
|
+
locale?: string;
|
|
23
25
|
}
|
|
24
26
|
declare const _default: import('vue').DefineComponent<UidGaugeProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<UidGaugeProps> & Readonly<{}>, {
|
|
25
27
|
size: number;
|
|
@@ -27,6 +29,7 @@ declare const _default: import('vue').DefineComponent<UidGaugeProps, {}, {}, {},
|
|
|
27
29
|
min: number;
|
|
28
30
|
max: number;
|
|
29
31
|
value: number;
|
|
32
|
+
locale: string;
|
|
30
33
|
showValue: boolean;
|
|
31
34
|
precision: number;
|
|
32
35
|
tone: GaugeTone;
|
|
@@ -36,9 +36,9 @@ declare const __VLS_component: import('vue').DefineComponent<UidImageProps, {},
|
|
|
36
36
|
onError?: ((event: Event) => any) | undefined;
|
|
37
37
|
onLoad?: ((event: Event) => any) | undefined;
|
|
38
38
|
}>, {
|
|
39
|
+
preview: boolean;
|
|
39
40
|
width: number | string;
|
|
40
41
|
height: number | string;
|
|
41
|
-
preview: boolean;
|
|
42
42
|
radius: string;
|
|
43
43
|
fit: UidImageFit;
|
|
44
44
|
lazy: boolean;
|
|
@@ -29,5 +29,6 @@ declare const _default: import('vue').DefineComponent<__VLS_PublicProps, {}, {},
|
|
|
29
29
|
prefix: string | string[];
|
|
30
30
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
31
31
|
fieldRef: HTMLTextAreaElement;
|
|
32
|
+
panelRef: HTMLDivElement;
|
|
32
33
|
}, HTMLDivElement>;
|
|
33
34
|
export default _default;
|
|
@@ -31,8 +31,8 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_PublicProps,
|
|
|
31
31
|
label: string;
|
|
32
32
|
required: boolean;
|
|
33
33
|
disabled: boolean;
|
|
34
|
-
hint: string;
|
|
35
34
|
error: string;
|
|
35
|
+
hint: string;
|
|
36
36
|
name: string;
|
|
37
37
|
direction: "horizontal" | "vertical";
|
|
38
38
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
@@ -10,6 +10,8 @@ export interface UidRatingProps {
|
|
|
10
10
|
tone?: RatingTone;
|
|
11
11
|
icon?: unknown;
|
|
12
12
|
label?: string;
|
|
13
|
+
/** BCP 47 tag for number formatting; defaults to the active kit locale. */
|
|
14
|
+
locale?: string;
|
|
13
15
|
}
|
|
14
16
|
type __VLS_Props = UidRatingProps;
|
|
15
17
|
type __VLS_PublicProps = {
|
|
@@ -27,6 +29,7 @@ declare const _default: import('vue').DefineComponent<__VLS_PublicProps, {}, {},
|
|
|
27
29
|
disabled: boolean;
|
|
28
30
|
max: number;
|
|
29
31
|
readonly: boolean;
|
|
32
|
+
locale: string;
|
|
30
33
|
tone: RatingTone;
|
|
31
34
|
allowHalf: boolean;
|
|
32
35
|
showLabel: boolean;
|
|
@@ -17,6 +17,12 @@ export interface UidStatProps {
|
|
|
17
17
|
footer?: string;
|
|
18
18
|
/** BCP 47 tag for number formatting; defaults to the active kit locale. */
|
|
19
19
|
locale?: string;
|
|
20
|
+
/**
|
|
21
|
+
* Where the trend sits: next to the value, wrapping under it when there is
|
|
22
|
+
* no room (`inline`, default), or always on its own line under the value
|
|
23
|
+
* (`below`) — which keeps a row of cards uniform whatever the value length.
|
|
24
|
+
*/
|
|
25
|
+
trendPlacement?: 'inline' | 'below';
|
|
20
26
|
}
|
|
21
27
|
declare function __VLS_template(): {
|
|
22
28
|
attrs: Partial<{}>;
|
|
@@ -43,6 +49,7 @@ declare const __VLS_component: import('vue').DefineComponent<UidStatProps, {}, {
|
|
|
43
49
|
precision: number;
|
|
44
50
|
tone: StatTone;
|
|
45
51
|
trendSuffix: string;
|
|
52
|
+
trendPlacement: "inline" | "below";
|
|
46
53
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
47
54
|
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
48
55
|
export default _default;
|
|
@@ -24,8 +24,8 @@ declare const _default: import('vue').DefineComponent<__VLS_PublicProps, {}, {},
|
|
|
24
24
|
label: string;
|
|
25
25
|
required: boolean;
|
|
26
26
|
disabled: boolean;
|
|
27
|
-
hint: string;
|
|
28
27
|
error: string;
|
|
28
|
+
hint: string;
|
|
29
29
|
name: string;
|
|
30
30
|
id: string;
|
|
31
31
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
@@ -51,12 +51,12 @@ declare const __VLS_component: import('vue').DefineComponent<UidTableProps, {},
|
|
|
51
51
|
"update:sortKey": (key: string | null) => any;
|
|
52
52
|
"update:sortDirection": (dir: SortDirection) => any;
|
|
53
53
|
"update:selection": (selection: Set<string | number>) => any;
|
|
54
|
-
"row-click": (row: Record<string, unknown
|
|
54
|
+
"row-click": (row: Record<string, unknown>, event: MouseEvent) => any;
|
|
55
55
|
}, string, import('vue').PublicProps, Readonly<UidTableProps> & Readonly<{
|
|
56
56
|
"onUpdate:sortKey"?: ((key: string | null) => any) | undefined;
|
|
57
57
|
"onUpdate:sortDirection"?: ((dir: SortDirection) => any) | undefined;
|
|
58
58
|
"onUpdate:selection"?: ((selection: Set<string | number>) => any) | undefined;
|
|
59
|
-
"onRow-click"?: ((row: Record<string, unknown
|
|
59
|
+
"onRow-click"?: ((row: Record<string, unknown>, event: MouseEvent) => any) | undefined;
|
|
60
60
|
}>, {
|
|
61
61
|
loading: boolean;
|
|
62
62
|
sortKey: string | null;
|
|
@@ -36,10 +36,10 @@ declare const _default: import('vue').DefineComponent<__VLS_PublicProps, {
|
|
|
36
36
|
label: string;
|
|
37
37
|
required: boolean;
|
|
38
38
|
disabled: boolean;
|
|
39
|
+
error: string;
|
|
39
40
|
placeholder: string;
|
|
40
41
|
readonly: boolean;
|
|
41
42
|
hint: string;
|
|
42
|
-
error: string;
|
|
43
43
|
name: string;
|
|
44
44
|
rules: RuleInput;
|
|
45
45
|
id: string;
|
|
@@ -1,4 +1,7 @@
|
|
|
1
|
+
import { Size } from '../../types/index.js';
|
|
1
2
|
export interface UidTimePickerProps {
|
|
3
|
+
/** Control height of the shared size scale (`--uid-size-sm|md|lg`). */
|
|
4
|
+
size?: Size;
|
|
2
5
|
step?: number;
|
|
3
6
|
withSeconds?: boolean;
|
|
4
7
|
hour12?: boolean;
|
|
@@ -17,6 +20,7 @@ declare const _default: import('vue').DefineComponent<__VLS_PublicProps, {}, {},
|
|
|
17
20
|
"onUpdate:modelValue"?: ((value: string | null) => any) | undefined;
|
|
18
21
|
onChange?: ((value: string | null) => any) | undefined;
|
|
19
22
|
}>, {
|
|
23
|
+
size: Size;
|
|
20
24
|
disabled: boolean;
|
|
21
25
|
step: number;
|
|
22
26
|
clearable: boolean;
|
|
@@ -25,6 +29,7 @@ declare const _default: import('vue').DefineComponent<__VLS_PublicProps, {}, {},
|
|
|
25
29
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
26
30
|
containerRef: HTMLDivElement;
|
|
27
31
|
triggerRef: HTMLDivElement;
|
|
32
|
+
panelRef: HTMLDivElement;
|
|
28
33
|
hourColRef: HTMLDivElement;
|
|
29
34
|
minuteColRef: HTMLDivElement;
|
|
30
35
|
secondColRef: HTMLDivElement;
|
|
@@ -1,5 +1,8 @@
|
|
|
1
|
+
import { Size } from '../../types/index.js';
|
|
1
2
|
import { TreeNode, TreeKey } from '../TreeView/context.js';
|
|
2
3
|
export interface UidTreeSelectProps {
|
|
4
|
+
/** Control height of the shared size scale (`--uid-size-sm|md|lg`). */
|
|
5
|
+
size?: Size;
|
|
3
6
|
nodes: TreeNode[];
|
|
4
7
|
multiple?: boolean;
|
|
5
8
|
checkable?: boolean;
|
|
@@ -29,6 +32,7 @@ declare const _default: import('vue').DefineComponent<__VLS_PublicProps, {}, {},
|
|
|
29
32
|
onChange?: ((value: TreeKey | TreeKey[] | null) => any) | undefined;
|
|
30
33
|
"onUpdate:expandedKeys"?: ((value: TreeKey[]) => any) | undefined;
|
|
31
34
|
}>, {
|
|
35
|
+
size: Size;
|
|
32
36
|
required: boolean;
|
|
33
37
|
disabled: boolean;
|
|
34
38
|
multiple: boolean;
|
|
@@ -41,5 +45,6 @@ declare const _default: import('vue').DefineComponent<__VLS_PublicProps, {}, {},
|
|
|
41
45
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
42
46
|
containerRef: HTMLDivElement;
|
|
43
47
|
triggerRef: HTMLDivElement;
|
|
48
|
+
panelRef: HTMLDivElement;
|
|
44
49
|
}, HTMLDivElement>;
|
|
45
50
|
export default _default;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { MaybeRef, Ref } from 'vue';
|
|
2
|
+
import { Placement } from './usePopover.js';
|
|
3
|
+
export interface UseFloatingPanelOptions {
|
|
4
|
+
placement?: MaybeRef<Placement>;
|
|
5
|
+
offset?: number;
|
|
6
|
+
/**
|
|
7
|
+
* Give the panel at least the anchor's width (`'min'`) or exactly it
|
|
8
|
+
* (`'exact'`), as a select-like dropdown does.
|
|
9
|
+
*/
|
|
10
|
+
matchWidth?: false | 'min' | 'exact';
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* A dropdown panel that lives in `<Teleport to="body">` and is positioned
|
|
14
|
+
* `fixed` against its anchor.
|
|
15
|
+
*
|
|
16
|
+
* Rendered in place, a panel is clipped by any ancestor with `overflow` —
|
|
17
|
+
* a modal's body, a drawer, a card — and stacks inside that ancestor's
|
|
18
|
+
* stacking context, under a modal's footer. Teleported, it escapes both;
|
|
19
|
+
* `--uid-z-popover` puts it above modals and drawers.
|
|
20
|
+
*
|
|
21
|
+
* While open it follows the anchor on scroll (of any ancestor) and resize,
|
|
22
|
+
* re-measures when its own content changes size, and flips above the anchor
|
|
23
|
+
* when there is no room below. It stays transparent until the first measurement,
|
|
24
|
+
* so it never flashes in the corner of the viewport.
|
|
25
|
+
*/
|
|
26
|
+
export declare function useFloatingPanel(anchorRef: Ref<HTMLElement | null>, panelRef: Ref<HTMLElement | null>, isOpen: Ref<boolean>, options?: UseFloatingPanelOptions): {
|
|
27
|
+
panelStyle: import('vue').ComputedRef<Record<string, string>>;
|
|
28
|
+
actualPlacement: Ref<Placement, Placement>;
|
|
29
|
+
update: () => void;
|
|
30
|
+
containsTarget: (target: EventTarget | null) => boolean;
|
|
31
|
+
};
|