@spark-ui/components 12.0.1 → 12.1.1
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/alert-dialog/index.mjs +1 -1
- package/dist/avatar/index.mjs +2 -2
- package/dist/carousel/index.d.mts +3 -0
- package/dist/carousel/index.d.ts +3 -0
- package/dist/carousel/index.js +146 -65
- package/dist/carousel/index.js.map +1 -1
- package/dist/carousel/index.mjs +127 -46
- package/dist/carousel/index.mjs.map +1 -1
- package/dist/combobox/index.d.mts +1 -1
- package/dist/combobox/index.d.ts +1 -1
- package/dist/combobox/index.mjs +3 -3
- package/dist/dialog/index.mjs +1 -1
- package/dist/docgen.json +193 -104
- package/dist/drawer/index.mjs +2 -2
- package/dist/dropdown/index.d.mts +1 -1
- package/dist/dropdown/index.d.ts +1 -1
- package/dist/dropdown/index.mjs +2 -2
- package/dist/file-upload/index.mjs +3 -3
- package/dist/icon/index.d.mts +2 -2
- package/dist/icon/index.d.ts +2 -2
- package/dist/index-Cno_GFuW.d.mts +93 -0
- package/dist/index-Cno_GFuW.d.ts +93 -0
- package/dist/pagination/index.mjs +3 -3
- package/dist/popover/index.d.mts +6 -93
- package/dist/popover/index.d.ts +6 -93
- package/dist/popover/index.mjs +1 -1
- package/dist/scrolling-list/index.mjs +3 -3
- package/dist/snackbar/index.mjs +3 -3
- package/dist/stepper/index.mjs +2 -2
- package/dist/tabs/index.d.mts +37 -3
- package/dist/tabs/index.d.ts +37 -3
- package/dist/tabs/index.js +471 -17
- package/dist/tabs/index.js.map +1 -1
- package/dist/tabs/index.mjs +135 -14
- package/dist/tabs/index.mjs.map +1 -1
- package/dist/toast/index.mjs +3 -3
- package/package.json +5 -5
package/dist/popover/index.d.mts
CHANGED
|
@@ -1,93 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
|
|
7
|
-
type PopoverIntent = 'surface' | 'main' | 'support' | 'accent' | 'basic' | 'success' | 'alert' | 'danger' | 'info' | 'neutral';
|
|
8
|
-
|
|
9
|
-
type PopoverProps = Popover$2.PopoverProps & {
|
|
10
|
-
intent?: PopoverIntent;
|
|
11
|
-
};
|
|
12
|
-
declare const Popover$1: {
|
|
13
|
-
({ children, intent, modal, ...rest }: PopoverProps): react_jsx_runtime.JSX.Element;
|
|
14
|
-
displayName: string;
|
|
15
|
-
};
|
|
16
|
-
|
|
17
|
-
type AnchorProps = Popover$2.PopoverAnchorProps & {
|
|
18
|
-
ref?: Ref<HTMLDivElement>;
|
|
19
|
-
};
|
|
20
|
-
declare const Anchor: {
|
|
21
|
-
({ asChild, children, ref, ...rest }: AnchorProps): react_jsx_runtime.JSX.Element;
|
|
22
|
-
displayName: string;
|
|
23
|
-
};
|
|
24
|
-
|
|
25
|
-
type ArrowProps = Popover$2.PopoverArrowProps & {
|
|
26
|
-
ref?: Ref<SVGSVGElement>;
|
|
27
|
-
};
|
|
28
|
-
declare const Arrow: {
|
|
29
|
-
({ asChild, width, height, className, ref, ...rest }: ArrowProps): react_jsx_runtime.JSX.Element;
|
|
30
|
-
displayName: string;
|
|
31
|
-
};
|
|
32
|
-
|
|
33
|
-
type CloseButtonProps = Popover$2.PopoverCloseProps & {
|
|
34
|
-
'aria-label': string;
|
|
35
|
-
ref?: Ref<HTMLButtonElement>;
|
|
36
|
-
};
|
|
37
|
-
declare const CloseButton: {
|
|
38
|
-
({ "aria-label": ariaLabel, className, ref, ...rest }: CloseButtonProps): react_jsx_runtime.JSX.Element;
|
|
39
|
-
displayName: string;
|
|
40
|
-
};
|
|
41
|
-
|
|
42
|
-
declare const styles: (props?: ({
|
|
43
|
-
intent?: "main" | "surface" | "support" | "accent" | "basic" | "success" | "alert" | "danger" | "info" | "neutral" | null | undefined;
|
|
44
|
-
matchTriggerWidth?: boolean | null | undefined;
|
|
45
|
-
enforceBoundaries?: boolean | null | undefined;
|
|
46
|
-
inset?: boolean | null | undefined;
|
|
47
|
-
elevation?: "popover" | "dropdown" | null | undefined;
|
|
48
|
-
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
49
|
-
type StylesProps = VariantProps<typeof styles>;
|
|
50
|
-
|
|
51
|
-
type ContentProps = Popover$2.PopoverContentProps & StylesProps & {
|
|
52
|
-
ref?: Ref<HTMLDivElement>;
|
|
53
|
-
};
|
|
54
|
-
declare const Content: {
|
|
55
|
-
({ className, children, matchTriggerWidth, align, arrowPadding, asChild, avoidCollisions, "aria-labelledby": ariaLabelledBy, collisionBoundary, collisionPadding, hideWhenDetached, side, sideOffset, sticky, inset, elevation, ref, ...rest }: ContentProps): react_jsx_runtime.JSX.Element;
|
|
56
|
-
displayName: string;
|
|
57
|
-
};
|
|
58
|
-
|
|
59
|
-
interface HeaderProps {
|
|
60
|
-
children: ReactNode;
|
|
61
|
-
className?: string;
|
|
62
|
-
ref?: Ref<HTMLDivElement>;
|
|
63
|
-
}
|
|
64
|
-
declare const Header: {
|
|
65
|
-
({ children, className, ref, ...rest }: HeaderProps): react_jsx_runtime.JSX.Element;
|
|
66
|
-
displayName: string;
|
|
67
|
-
};
|
|
68
|
-
|
|
69
|
-
type PortalProps = Popover$2.PopoverPortalProps;
|
|
70
|
-
declare const Portal: {
|
|
71
|
-
({ children, ...rest }: PortalProps): ReactElement;
|
|
72
|
-
displayName: string;
|
|
73
|
-
};
|
|
74
|
-
|
|
75
|
-
type TriggerProps = Popover$2.PopoverTriggerProps & {
|
|
76
|
-
ref?: Ref<HTMLButtonElement>;
|
|
77
|
-
};
|
|
78
|
-
declare const Trigger: {
|
|
79
|
-
({ asChild, children, ref, ...rest }: TriggerProps): react_jsx_runtime.JSX.Element;
|
|
80
|
-
displayName: string;
|
|
81
|
-
};
|
|
82
|
-
|
|
83
|
-
declare const Popover: typeof Popover$1 & {
|
|
84
|
-
Anchor: typeof Anchor;
|
|
85
|
-
Arrow: typeof Arrow;
|
|
86
|
-
CloseButton: typeof CloseButton;
|
|
87
|
-
Content: typeof Content;
|
|
88
|
-
Header: typeof Header;
|
|
89
|
-
Portal: typeof Portal;
|
|
90
|
-
Trigger: typeof Trigger;
|
|
91
|
-
};
|
|
92
|
-
|
|
93
|
-
export { Popover };
|
|
1
|
+
export { a as Popover } from '../index-Cno_GFuW.mjs';
|
|
2
|
+
import 'react/jsx-runtime';
|
|
3
|
+
import 'radix-ui';
|
|
4
|
+
import 'react';
|
|
5
|
+
import 'class-variance-authority/types';
|
|
6
|
+
import 'class-variance-authority';
|
package/dist/popover/index.d.ts
CHANGED
|
@@ -1,93 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
|
|
7
|
-
type PopoverIntent = 'surface' | 'main' | 'support' | 'accent' | 'basic' | 'success' | 'alert' | 'danger' | 'info' | 'neutral';
|
|
8
|
-
|
|
9
|
-
type PopoverProps = Popover$2.PopoverProps & {
|
|
10
|
-
intent?: PopoverIntent;
|
|
11
|
-
};
|
|
12
|
-
declare const Popover$1: {
|
|
13
|
-
({ children, intent, modal, ...rest }: PopoverProps): react_jsx_runtime.JSX.Element;
|
|
14
|
-
displayName: string;
|
|
15
|
-
};
|
|
16
|
-
|
|
17
|
-
type AnchorProps = Popover$2.PopoverAnchorProps & {
|
|
18
|
-
ref?: Ref<HTMLDivElement>;
|
|
19
|
-
};
|
|
20
|
-
declare const Anchor: {
|
|
21
|
-
({ asChild, children, ref, ...rest }: AnchorProps): react_jsx_runtime.JSX.Element;
|
|
22
|
-
displayName: string;
|
|
23
|
-
};
|
|
24
|
-
|
|
25
|
-
type ArrowProps = Popover$2.PopoverArrowProps & {
|
|
26
|
-
ref?: Ref<SVGSVGElement>;
|
|
27
|
-
};
|
|
28
|
-
declare const Arrow: {
|
|
29
|
-
({ asChild, width, height, className, ref, ...rest }: ArrowProps): react_jsx_runtime.JSX.Element;
|
|
30
|
-
displayName: string;
|
|
31
|
-
};
|
|
32
|
-
|
|
33
|
-
type CloseButtonProps = Popover$2.PopoverCloseProps & {
|
|
34
|
-
'aria-label': string;
|
|
35
|
-
ref?: Ref<HTMLButtonElement>;
|
|
36
|
-
};
|
|
37
|
-
declare const CloseButton: {
|
|
38
|
-
({ "aria-label": ariaLabel, className, ref, ...rest }: CloseButtonProps): react_jsx_runtime.JSX.Element;
|
|
39
|
-
displayName: string;
|
|
40
|
-
};
|
|
41
|
-
|
|
42
|
-
declare const styles: (props?: ({
|
|
43
|
-
intent?: "main" | "surface" | "support" | "accent" | "basic" | "success" | "alert" | "danger" | "info" | "neutral" | null | undefined;
|
|
44
|
-
matchTriggerWidth?: boolean | null | undefined;
|
|
45
|
-
enforceBoundaries?: boolean | null | undefined;
|
|
46
|
-
inset?: boolean | null | undefined;
|
|
47
|
-
elevation?: "popover" | "dropdown" | null | undefined;
|
|
48
|
-
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
49
|
-
type StylesProps = VariantProps<typeof styles>;
|
|
50
|
-
|
|
51
|
-
type ContentProps = Popover$2.PopoverContentProps & StylesProps & {
|
|
52
|
-
ref?: Ref<HTMLDivElement>;
|
|
53
|
-
};
|
|
54
|
-
declare const Content: {
|
|
55
|
-
({ className, children, matchTriggerWidth, align, arrowPadding, asChild, avoidCollisions, "aria-labelledby": ariaLabelledBy, collisionBoundary, collisionPadding, hideWhenDetached, side, sideOffset, sticky, inset, elevation, ref, ...rest }: ContentProps): react_jsx_runtime.JSX.Element;
|
|
56
|
-
displayName: string;
|
|
57
|
-
};
|
|
58
|
-
|
|
59
|
-
interface HeaderProps {
|
|
60
|
-
children: ReactNode;
|
|
61
|
-
className?: string;
|
|
62
|
-
ref?: Ref<HTMLDivElement>;
|
|
63
|
-
}
|
|
64
|
-
declare const Header: {
|
|
65
|
-
({ children, className, ref, ...rest }: HeaderProps): react_jsx_runtime.JSX.Element;
|
|
66
|
-
displayName: string;
|
|
67
|
-
};
|
|
68
|
-
|
|
69
|
-
type PortalProps = Popover$2.PopoverPortalProps;
|
|
70
|
-
declare const Portal: {
|
|
71
|
-
({ children, ...rest }: PortalProps): ReactElement;
|
|
72
|
-
displayName: string;
|
|
73
|
-
};
|
|
74
|
-
|
|
75
|
-
type TriggerProps = Popover$2.PopoverTriggerProps & {
|
|
76
|
-
ref?: Ref<HTMLButtonElement>;
|
|
77
|
-
};
|
|
78
|
-
declare const Trigger: {
|
|
79
|
-
({ asChild, children, ref, ...rest }: TriggerProps): react_jsx_runtime.JSX.Element;
|
|
80
|
-
displayName: string;
|
|
81
|
-
};
|
|
82
|
-
|
|
83
|
-
declare const Popover: typeof Popover$1 & {
|
|
84
|
-
Anchor: typeof Anchor;
|
|
85
|
-
Arrow: typeof Arrow;
|
|
86
|
-
CloseButton: typeof CloseButton;
|
|
87
|
-
Content: typeof Content;
|
|
88
|
-
Header: typeof Header;
|
|
89
|
-
Portal: typeof Portal;
|
|
90
|
-
Trigger: typeof Trigger;
|
|
91
|
-
};
|
|
92
|
-
|
|
93
|
-
export { Popover };
|
|
1
|
+
export { a as Popover } from '../index-Cno_GFuW.js';
|
|
2
|
+
import 'react/jsx-runtime';
|
|
3
|
+
import 'radix-ui';
|
|
4
|
+
import 'react';
|
|
5
|
+
import 'class-variance-authority/types';
|
|
6
|
+
import 'class-variance-authority';
|
package/dist/popover/index.mjs
CHANGED
|
@@ -2,9 +2,9 @@ import {
|
|
|
2
2
|
Popover
|
|
3
3
|
} from "../chunk-GPJMLIHC.mjs";
|
|
4
4
|
import "../chunk-DCXWGQVZ.mjs";
|
|
5
|
-
import "../chunk-UMUMFMFB.mjs";
|
|
6
5
|
import "../chunk-2YM6GKWW.mjs";
|
|
7
6
|
import "../chunk-GAK4SC2F.mjs";
|
|
7
|
+
import "../chunk-UMUMFMFB.mjs";
|
|
8
8
|
import "../chunk-KEGAAGJW.mjs";
|
|
9
9
|
import "../chunk-6QCEPQ3U.mjs";
|
|
10
10
|
export {
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
IconButton
|
|
3
3
|
} from "../chunk-DCXWGQVZ.mjs";
|
|
4
|
-
import {
|
|
5
|
-
Icon
|
|
6
|
-
} from "../chunk-UMUMFMFB.mjs";
|
|
7
4
|
import {
|
|
8
5
|
Button
|
|
9
6
|
} from "../chunk-2YM6GKWW.mjs";
|
|
10
7
|
import "../chunk-GAK4SC2F.mjs";
|
|
8
|
+
import {
|
|
9
|
+
Icon
|
|
10
|
+
} from "../chunk-UMUMFMFB.mjs";
|
|
11
11
|
import "../chunk-KEGAAGJW.mjs";
|
|
12
12
|
import {
|
|
13
13
|
Slot
|
package/dist/snackbar/index.mjs
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
IconButton
|
|
3
3
|
} from "../chunk-DCXWGQVZ.mjs";
|
|
4
|
-
import {
|
|
5
|
-
Icon
|
|
6
|
-
} from "../chunk-UMUMFMFB.mjs";
|
|
7
4
|
import {
|
|
8
5
|
Button
|
|
9
6
|
} from "../chunk-2YM6GKWW.mjs";
|
|
10
7
|
import "../chunk-GAK4SC2F.mjs";
|
|
8
|
+
import {
|
|
9
|
+
Icon
|
|
10
|
+
} from "../chunk-UMUMFMFB.mjs";
|
|
11
11
|
import "../chunk-KEGAAGJW.mjs";
|
|
12
12
|
import "../chunk-6QCEPQ3U.mjs";
|
|
13
13
|
|
package/dist/stepper/index.mjs
CHANGED
|
@@ -5,11 +5,11 @@ import {
|
|
|
5
5
|
import {
|
|
6
6
|
IconButton
|
|
7
7
|
} from "../chunk-DCXWGQVZ.mjs";
|
|
8
|
+
import "../chunk-2YM6GKWW.mjs";
|
|
9
|
+
import "../chunk-GAK4SC2F.mjs";
|
|
8
10
|
import {
|
|
9
11
|
Icon
|
|
10
12
|
} from "../chunk-UMUMFMFB.mjs";
|
|
11
|
-
import "../chunk-2YM6GKWW.mjs";
|
|
12
|
-
import "../chunk-GAK4SC2F.mjs";
|
|
13
13
|
import "../chunk-KEGAAGJW.mjs";
|
|
14
14
|
import "../chunk-6QCEPQ3U.mjs";
|
|
15
15
|
|
package/dist/tabs/index.d.mts
CHANGED
|
@@ -1,16 +1,20 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
import { Tabs as Tabs$2 } from 'radix-ui';
|
|
3
|
-
import
|
|
3
|
+
import * as react from 'react';
|
|
4
|
+
import { PropsWithChildren, Ref, ReactElement, ComponentType, ReactNode } from 'react';
|
|
4
5
|
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
5
6
|
import { VariantProps } from 'class-variance-authority';
|
|
7
|
+
import { P as PopoverProps, a as Popover, C as ContentProps, T as TriggerProps } from '../index-Cno_GFuW.mjs';
|
|
6
8
|
|
|
7
9
|
declare const triggerVariants: (props?: ({
|
|
8
10
|
intent?: "main" | "support" | "basic" | null | undefined;
|
|
9
11
|
size?: "xs" | "sm" | "md" | null | undefined;
|
|
12
|
+
hasMenu?: boolean | null | undefined;
|
|
13
|
+
orientation?: "horizontal" | "vertical" | null | undefined;
|
|
10
14
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
11
15
|
type TabsTriggerVariantsProps = VariantProps<typeof triggerVariants>;
|
|
12
16
|
|
|
13
|
-
interface TabsProps extends Omit<Tabs$2.TabsProps, 'activationMode'>, PropsWithChildren<TabsTriggerVariantsProps
|
|
17
|
+
interface TabsProps extends Omit<Tabs$2.TabsProps, 'activationMode'>, PropsWithChildren<Omit<TabsTriggerVariantsProps, 'orientation'>> {
|
|
14
18
|
/**
|
|
15
19
|
* Change the component to the HTML tag or custom component of the only child. This will merge the original component props with the props of the supplied element/component and change the underlying DOM node.
|
|
16
20
|
* @default false
|
|
@@ -72,6 +76,19 @@ declare const TabsList: {
|
|
|
72
76
|
displayName: string;
|
|
73
77
|
};
|
|
74
78
|
|
|
79
|
+
interface TabsPopoverTriggerProps extends Omit<TriggerProps, 'asChild' | 'children'> {
|
|
80
|
+
'aria-label': string;
|
|
81
|
+
children?: ReactNode;
|
|
82
|
+
}
|
|
83
|
+
declare const TabsPopoverTrigger: react.ForwardRefExoticComponent<Omit<TabsPopoverTriggerProps, "ref"> & react.RefAttributes<HTMLButtonElement>>;
|
|
84
|
+
declare const TabsPopoverContent: react.ForwardRefExoticComponent<Omit<ContentProps, "ref"> & react.RefAttributes<HTMLDivElement>>;
|
|
85
|
+
type TabsPopoverTriggerComponent = typeof TabsPopoverTrigger;
|
|
86
|
+
type TabsPopoverContentComponent = typeof TabsPopoverContent;
|
|
87
|
+
type ConfiguredPopoverComponent = ComponentType<PopoverProps> & Omit<typeof Popover, 'Content' | 'Trigger'> & {
|
|
88
|
+
Content: TabsPopoverContentComponent;
|
|
89
|
+
Trigger: TabsPopoverTriggerComponent;
|
|
90
|
+
};
|
|
91
|
+
|
|
75
92
|
interface TabsTriggerProps extends Tabs$2.TabsTriggerProps {
|
|
76
93
|
/**
|
|
77
94
|
* A unique value that associates the trigger with a content.
|
|
@@ -87,10 +104,27 @@ interface TabsTriggerProps extends Tabs$2.TabsTriggerProps {
|
|
|
87
104
|
* @default false
|
|
88
105
|
*/
|
|
89
106
|
disabled?: boolean;
|
|
107
|
+
/**
|
|
108
|
+
* Function that receives a pre-configured Popover component and returns the popover structure.
|
|
109
|
+
* @example
|
|
110
|
+
* renderMenu={({ Popover }) => (
|
|
111
|
+
* <Popover>
|
|
112
|
+
* <Popover.Trigger aria-label="Options">
|
|
113
|
+
* <CustomIcon />
|
|
114
|
+
* </Popover.Trigger>
|
|
115
|
+
* <Popover.Content>
|
|
116
|
+
* <Button>Action</Button>
|
|
117
|
+
* </Popover.Content>
|
|
118
|
+
* </Popover>
|
|
119
|
+
* )}
|
|
120
|
+
*/
|
|
121
|
+
renderMenu?: (props: {
|
|
122
|
+
Popover: ConfiguredPopoverComponent;
|
|
123
|
+
}) => ReactNode;
|
|
90
124
|
ref?: Ref<HTMLButtonElement>;
|
|
91
125
|
}
|
|
92
126
|
declare const TabsTrigger: {
|
|
93
|
-
({ asChild, value, disabled, children, className, ref, ...rest }: TabsTriggerProps): react_jsx_runtime.JSX.Element;
|
|
127
|
+
({ asChild, value, disabled, children, className, ref, onKeyDown, renderMenu, ...rest }: TabsTriggerProps): react_jsx_runtime.JSX.Element;
|
|
94
128
|
displayName: string;
|
|
95
129
|
};
|
|
96
130
|
|
package/dist/tabs/index.d.ts
CHANGED
|
@@ -1,16 +1,20 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
import { Tabs as Tabs$2 } from 'radix-ui';
|
|
3
|
-
import
|
|
3
|
+
import * as react from 'react';
|
|
4
|
+
import { PropsWithChildren, Ref, ReactElement, ComponentType, ReactNode } from 'react';
|
|
4
5
|
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
5
6
|
import { VariantProps } from 'class-variance-authority';
|
|
7
|
+
import { P as PopoverProps, a as Popover, C as ContentProps, T as TriggerProps } from '../index-Cno_GFuW.js';
|
|
6
8
|
|
|
7
9
|
declare const triggerVariants: (props?: ({
|
|
8
10
|
intent?: "main" | "support" | "basic" | null | undefined;
|
|
9
11
|
size?: "xs" | "sm" | "md" | null | undefined;
|
|
12
|
+
hasMenu?: boolean | null | undefined;
|
|
13
|
+
orientation?: "horizontal" | "vertical" | null | undefined;
|
|
10
14
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
11
15
|
type TabsTriggerVariantsProps = VariantProps<typeof triggerVariants>;
|
|
12
16
|
|
|
13
|
-
interface TabsProps extends Omit<Tabs$2.TabsProps, 'activationMode'>, PropsWithChildren<TabsTriggerVariantsProps
|
|
17
|
+
interface TabsProps extends Omit<Tabs$2.TabsProps, 'activationMode'>, PropsWithChildren<Omit<TabsTriggerVariantsProps, 'orientation'>> {
|
|
14
18
|
/**
|
|
15
19
|
* Change the component to the HTML tag or custom component of the only child. This will merge the original component props with the props of the supplied element/component and change the underlying DOM node.
|
|
16
20
|
* @default false
|
|
@@ -72,6 +76,19 @@ declare const TabsList: {
|
|
|
72
76
|
displayName: string;
|
|
73
77
|
};
|
|
74
78
|
|
|
79
|
+
interface TabsPopoverTriggerProps extends Omit<TriggerProps, 'asChild' | 'children'> {
|
|
80
|
+
'aria-label': string;
|
|
81
|
+
children?: ReactNode;
|
|
82
|
+
}
|
|
83
|
+
declare const TabsPopoverTrigger: react.ForwardRefExoticComponent<Omit<TabsPopoverTriggerProps, "ref"> & react.RefAttributes<HTMLButtonElement>>;
|
|
84
|
+
declare const TabsPopoverContent: react.ForwardRefExoticComponent<Omit<ContentProps, "ref"> & react.RefAttributes<HTMLDivElement>>;
|
|
85
|
+
type TabsPopoverTriggerComponent = typeof TabsPopoverTrigger;
|
|
86
|
+
type TabsPopoverContentComponent = typeof TabsPopoverContent;
|
|
87
|
+
type ConfiguredPopoverComponent = ComponentType<PopoverProps> & Omit<typeof Popover, 'Content' | 'Trigger'> & {
|
|
88
|
+
Content: TabsPopoverContentComponent;
|
|
89
|
+
Trigger: TabsPopoverTriggerComponent;
|
|
90
|
+
};
|
|
91
|
+
|
|
75
92
|
interface TabsTriggerProps extends Tabs$2.TabsTriggerProps {
|
|
76
93
|
/**
|
|
77
94
|
* A unique value that associates the trigger with a content.
|
|
@@ -87,10 +104,27 @@ interface TabsTriggerProps extends Tabs$2.TabsTriggerProps {
|
|
|
87
104
|
* @default false
|
|
88
105
|
*/
|
|
89
106
|
disabled?: boolean;
|
|
107
|
+
/**
|
|
108
|
+
* Function that receives a pre-configured Popover component and returns the popover structure.
|
|
109
|
+
* @example
|
|
110
|
+
* renderMenu={({ Popover }) => (
|
|
111
|
+
* <Popover>
|
|
112
|
+
* <Popover.Trigger aria-label="Options">
|
|
113
|
+
* <CustomIcon />
|
|
114
|
+
* </Popover.Trigger>
|
|
115
|
+
* <Popover.Content>
|
|
116
|
+
* <Button>Action</Button>
|
|
117
|
+
* </Popover.Content>
|
|
118
|
+
* </Popover>
|
|
119
|
+
* )}
|
|
120
|
+
*/
|
|
121
|
+
renderMenu?: (props: {
|
|
122
|
+
Popover: ConfiguredPopoverComponent;
|
|
123
|
+
}) => ReactNode;
|
|
90
124
|
ref?: Ref<HTMLButtonElement>;
|
|
91
125
|
}
|
|
92
126
|
declare const TabsTrigger: {
|
|
93
|
-
({ asChild, value, disabled, children, className, ref, ...rest }: TabsTriggerProps): react_jsx_runtime.JSX.Element;
|
|
127
|
+
({ asChild, value, disabled, children, className, ref, onKeyDown, renderMenu, ...rest }: TabsTriggerProps): react_jsx_runtime.JSX.Element;
|
|
94
128
|
displayName: string;
|
|
95
129
|
};
|
|
96
130
|
|