@spark-ui/components 12.1.2 → 13.0.1-beta.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/DialogTrigger-8oDlAJjU.d.mts +142 -0
- package/dist/DialogTrigger-8oDlAJjU.d.ts +142 -0
- package/dist/alert-dialog/index.d.mts +78 -38
- package/dist/alert-dialog/index.d.ts +78 -38
- package/dist/alert-dialog/index.js +187 -1341
- package/dist/alert-dialog/index.js.map +1 -1
- package/dist/alert-dialog/index.mjs +234 -89
- package/dist/alert-dialog/index.mjs.map +1 -1
- package/dist/avatar/index.d.mts +2 -2
- package/dist/avatar/index.d.ts +2 -2
- package/dist/chunk-2BSBKLHG.mjs +358 -0
- package/dist/chunk-2BSBKLHG.mjs.map +1 -0
- package/dist/chunk-D7YBYT5H.mjs +308 -0
- package/dist/chunk-D7YBYT5H.mjs.map +1 -0
- package/dist/chunk-HEKSVWYW.mjs +800 -0
- package/dist/chunk-HEKSVWYW.mjs.map +1 -0
- package/dist/chunk-TKAU6SMC.mjs +197 -0
- package/dist/chunk-TKAU6SMC.mjs.map +1 -0
- package/dist/chunk-WA56YHV3.mjs +358 -0
- package/dist/chunk-WA56YHV3.mjs.map +1 -0
- package/dist/chunk-XYK6V3JF.mjs +53 -0
- package/dist/chunk-XYK6V3JF.mjs.map +1 -0
- package/dist/chunk-XZ47F6TP.mjs +50 -0
- package/dist/chunk-XZ47F6TP.mjs.map +1 -0
- package/dist/dialog/index.d.mts +140 -7
- package/dist/dialog/index.d.ts +140 -7
- package/dist/dialog/index.mjs +308 -5
- package/dist/dialog/index.mjs.map +1 -1
- package/dist/docgen.json +3450 -3321
- package/dist/index-BRKaV3lI.d.mts +93 -0
- package/dist/index-BRKaV3lI.d.ts +93 -0
- package/dist/index-Cw_DIfiq.d.mts +93 -0
- package/dist/index-Cw_DIfiq.d.ts +93 -0
- package/dist/spinner/index.d.mts +2 -2
- package/dist/spinner/index.d.ts +2 -2
- package/dist/tabs/index.d.mts +3 -3
- package/dist/tabs/index.d.ts +3 -3
- package/dist/toast/index.d.mts +14 -10
- package/dist/toast/index.d.ts +14 -10
- package/dist/toast/index.js +26 -3
- package/dist/toast/index.js.map +1 -1
- package/dist/toast/index.mjs +26 -3
- package/dist/toast/index.mjs.map +1 -1
- package/package.json +5 -5
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import { Popover as Popover$2 } from 'radix-ui';
|
|
3
|
+
import { Ref, ReactNode, ReactElement } from 'react';
|
|
4
|
+
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
5
|
+
import { VariantProps } from 'class-variance-authority';
|
|
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 { type ContentProps as C, Popover as P };
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import { Popover as Popover$2 } from 'radix-ui';
|
|
3
|
+
import { Ref, ReactNode, ReactElement } from 'react';
|
|
4
|
+
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
5
|
+
import { VariantProps } from 'class-variance-authority';
|
|
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 { type ContentProps as C, Popover as P };
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import { Popover as Popover$2 } from 'radix-ui';
|
|
3
|
+
import { Ref, ReactNode, ReactElement } from 'react';
|
|
4
|
+
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
5
|
+
import { VariantProps } from 'class-variance-authority';
|
|
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?: "surface" | "main" | "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 { type ContentProps as C, type PopoverProps as P, type TriggerProps as T, Popover as a };
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import { Popover as Popover$2 } from 'radix-ui';
|
|
3
|
+
import { Ref, ReactNode, ReactElement } from 'react';
|
|
4
|
+
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
5
|
+
import { VariantProps } from 'class-variance-authority';
|
|
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?: "surface" | "main" | "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 { type ContentProps as C, type PopoverProps as P, type TriggerProps as T, Popover as a };
|
package/dist/spinner/index.d.mts
CHANGED
|
@@ -4,8 +4,8 @@ import * as class_variance_authority_types from 'class-variance-authority/types'
|
|
|
4
4
|
import { VariantProps } from 'class-variance-authority';
|
|
5
5
|
|
|
6
6
|
declare const spinnerStyles: (props?: ({
|
|
7
|
-
size?: "
|
|
8
|
-
intent?: "main" | "
|
|
7
|
+
size?: "current" | "sm" | "md" | "full" | null | undefined;
|
|
8
|
+
intent?: "main" | "current" | "alert" | "error" | "support" | "accent" | "basic" | "success" | "info" | "neutral" | null | undefined;
|
|
9
9
|
isBackgroundVisible?: boolean | null | undefined;
|
|
10
10
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
11
11
|
type SpinnerStylesProps = VariantProps<typeof spinnerStyles>;
|
package/dist/spinner/index.d.ts
CHANGED
|
@@ -4,8 +4,8 @@ import * as class_variance_authority_types from 'class-variance-authority/types'
|
|
|
4
4
|
import { VariantProps } from 'class-variance-authority';
|
|
5
5
|
|
|
6
6
|
declare const spinnerStyles: (props?: ({
|
|
7
|
-
size?: "
|
|
8
|
-
intent?: "main" | "
|
|
7
|
+
size?: "current" | "sm" | "md" | "full" | null | undefined;
|
|
8
|
+
intent?: "main" | "current" | "alert" | "error" | "support" | "accent" | "basic" | "success" | "info" | "neutral" | null | undefined;
|
|
9
9
|
isBackgroundVisible?: boolean | null | undefined;
|
|
10
10
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
11
11
|
type SpinnerStylesProps = VariantProps<typeof spinnerStyles>;
|
package/dist/tabs/index.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
import { Tabs as Tabs$2 } from 'radix-ui';
|
|
3
|
-
import * as
|
|
3
|
+
import * as React from 'react';
|
|
4
4
|
import { PropsWithChildren, Ref, ReactElement, ComponentType, ReactNode } from 'react';
|
|
5
5
|
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
6
6
|
import { VariantProps } from 'class-variance-authority';
|
|
@@ -80,8 +80,8 @@ interface TabsPopoverTriggerProps extends Omit<TriggerProps, 'asChild' | 'childr
|
|
|
80
80
|
'aria-label': string;
|
|
81
81
|
children?: ReactNode;
|
|
82
82
|
}
|
|
83
|
-
declare const TabsPopoverTrigger:
|
|
84
|
-
declare const TabsPopoverContent:
|
|
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
85
|
type TabsPopoverTriggerComponent = typeof TabsPopoverTrigger;
|
|
86
86
|
type TabsPopoverContentComponent = typeof TabsPopoverContent;
|
|
87
87
|
type ConfiguredPopoverComponent = ComponentType<PopoverProps> & Omit<typeof Popover, 'Content' | 'Trigger'> & {
|
package/dist/tabs/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
import { Tabs as Tabs$2 } from 'radix-ui';
|
|
3
|
-
import * as
|
|
3
|
+
import * as React from 'react';
|
|
4
4
|
import { PropsWithChildren, Ref, ReactElement, ComponentType, ReactNode } from 'react';
|
|
5
5
|
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
6
6
|
import { VariantProps } from 'class-variance-authority';
|
|
@@ -80,8 +80,8 @@ interface TabsPopoverTriggerProps extends Omit<TriggerProps, 'asChild' | 'childr
|
|
|
80
80
|
'aria-label': string;
|
|
81
81
|
children?: ReactNode;
|
|
82
82
|
}
|
|
83
|
-
declare const TabsPopoverTrigger:
|
|
84
|
-
declare const TabsPopoverContent:
|
|
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
85
|
type TabsPopoverTriggerComponent = typeof TabsPopoverTrigger;
|
|
86
86
|
type TabsPopoverContentComponent = typeof TabsPopoverContent;
|
|
87
87
|
type ConfiguredPopoverComponent = ComponentType<PopoverProps> & Omit<typeof Popover, 'Content' | 'Trigger'> & {
|
package/dist/toast/index.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
import { Toast } from '@base-ui-components/react/toast';
|
|
3
|
-
import * as
|
|
3
|
+
import * as React from 'react';
|
|
4
4
|
import { ButtonProps } from '../button/index.mjs';
|
|
5
5
|
import 'class-variance-authority/types';
|
|
6
6
|
import 'class-variance-authority';
|
|
@@ -8,12 +8,14 @@ import 'class-variance-authority';
|
|
|
8
8
|
type ToastIntent = 'main' | 'support' | 'accent' | 'basic' | 'success' | 'alert' | 'error' | 'info' | 'neutral' | 'surface' | 'surfaceInverse';
|
|
9
9
|
type ToastDesign = 'tinted' | 'filled';
|
|
10
10
|
interface ToastData {
|
|
11
|
-
icon?:
|
|
11
|
+
icon?: React.ReactNode;
|
|
12
12
|
design?: ToastDesign;
|
|
13
13
|
intent?: ToastIntent;
|
|
14
14
|
isClosable?: boolean;
|
|
15
15
|
closeLabel?: string;
|
|
16
16
|
compact?: boolean;
|
|
17
|
+
title?: React.ReactNode;
|
|
18
|
+
description?: React.ReactNode;
|
|
17
19
|
action?: {
|
|
18
20
|
close?: boolean;
|
|
19
21
|
label: string;
|
|
@@ -21,8 +23,10 @@ interface ToastData {
|
|
|
21
23
|
} & ButtonProps;
|
|
22
24
|
}
|
|
23
25
|
type ToastObject = Toast.Root.ToastObject<ToastData>;
|
|
24
|
-
interface AddOptions extends Omit<ToastObject, 'id' | 'animation' | 'height' | 'ref' | 'limited'> {
|
|
26
|
+
interface AddOptions extends Omit<ToastObject, 'id' | 'animation' | 'height' | 'ref' | 'limited' | 'title' | 'description'> {
|
|
25
27
|
id?: string;
|
|
28
|
+
title?: string | React.ReactNode;
|
|
29
|
+
description?: string | React.ReactNode;
|
|
26
30
|
}
|
|
27
31
|
type UpdateOptions = Partial<AddOptions>;
|
|
28
32
|
interface PromiseOptions<Value> {
|
|
@@ -41,19 +45,19 @@ interface UseToastManagerReturnValue {
|
|
|
41
45
|
|
|
42
46
|
declare function useToastManager(): UseToastManagerReturnValue;
|
|
43
47
|
|
|
44
|
-
interface ToastProviderProps extends
|
|
45
|
-
children:
|
|
48
|
+
interface ToastProviderProps extends React.ComponentProps<typeof Toast.Provider> {
|
|
49
|
+
children: React.ReactNode;
|
|
46
50
|
}
|
|
47
51
|
declare function ToastProvider({ children, limit, ...props }: ToastProviderProps): react_jsx_runtime.JSX.Element;
|
|
48
|
-
interface ToastTriggerProps extends
|
|
49
|
-
children:
|
|
52
|
+
interface ToastTriggerProps extends Omit<React.ComponentPropsWithRef<'button'>, 'title'>, Pick<ToastObject, 'priority'>, Pick<ToastData, 'design' | 'intent' | 'icon' | 'isClosable' | 'action' | 'compact'> {
|
|
53
|
+
children: React.ReactNode;
|
|
50
54
|
asChild?: boolean;
|
|
51
|
-
title: string;
|
|
52
|
-
description?: string;
|
|
55
|
+
title: string | React.ReactNode;
|
|
56
|
+
description?: string | React.ReactNode;
|
|
53
57
|
timeout?: number;
|
|
54
58
|
}
|
|
55
59
|
declare function ToastTrigger({ children, onClick, asChild, title, description, timeout, design, intent, isClosable, icon, action, compact, priority, }: ToastTriggerProps): react_jsx_runtime.JSX.Element;
|
|
56
60
|
type ToastManager = ReturnType<typeof Toast.createToastManager>;
|
|
57
61
|
declare const createToastManager: () => ToastManager;
|
|
58
62
|
|
|
59
|
-
export { type ToastData, type ToastDesign, type ToastIntent, type ToastManager, type ToastObject, ToastProvider, ToastTrigger, type UseToastManagerReturnValue, createToastManager, useToastManager };
|
|
63
|
+
export { type AddOptions, type ToastData, type ToastDesign, type ToastIntent, type ToastManager, type ToastObject, ToastProvider, ToastTrigger, type UseToastManagerReturnValue, createToastManager, useToastManager };
|
package/dist/toast/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
import { Toast } from '@base-ui-components/react/toast';
|
|
3
|
-
import * as
|
|
3
|
+
import * as React from 'react';
|
|
4
4
|
import { ButtonProps } from '../button/index.js';
|
|
5
5
|
import 'class-variance-authority/types';
|
|
6
6
|
import 'class-variance-authority';
|
|
@@ -8,12 +8,14 @@ import 'class-variance-authority';
|
|
|
8
8
|
type ToastIntent = 'main' | 'support' | 'accent' | 'basic' | 'success' | 'alert' | 'error' | 'info' | 'neutral' | 'surface' | 'surfaceInverse';
|
|
9
9
|
type ToastDesign = 'tinted' | 'filled';
|
|
10
10
|
interface ToastData {
|
|
11
|
-
icon?:
|
|
11
|
+
icon?: React.ReactNode;
|
|
12
12
|
design?: ToastDesign;
|
|
13
13
|
intent?: ToastIntent;
|
|
14
14
|
isClosable?: boolean;
|
|
15
15
|
closeLabel?: string;
|
|
16
16
|
compact?: boolean;
|
|
17
|
+
title?: React.ReactNode;
|
|
18
|
+
description?: React.ReactNode;
|
|
17
19
|
action?: {
|
|
18
20
|
close?: boolean;
|
|
19
21
|
label: string;
|
|
@@ -21,8 +23,10 @@ interface ToastData {
|
|
|
21
23
|
} & ButtonProps;
|
|
22
24
|
}
|
|
23
25
|
type ToastObject = Toast.Root.ToastObject<ToastData>;
|
|
24
|
-
interface AddOptions extends Omit<ToastObject, 'id' | 'animation' | 'height' | 'ref' | 'limited'> {
|
|
26
|
+
interface AddOptions extends Omit<ToastObject, 'id' | 'animation' | 'height' | 'ref' | 'limited' | 'title' | 'description'> {
|
|
25
27
|
id?: string;
|
|
28
|
+
title?: string | React.ReactNode;
|
|
29
|
+
description?: string | React.ReactNode;
|
|
26
30
|
}
|
|
27
31
|
type UpdateOptions = Partial<AddOptions>;
|
|
28
32
|
interface PromiseOptions<Value> {
|
|
@@ -41,19 +45,19 @@ interface UseToastManagerReturnValue {
|
|
|
41
45
|
|
|
42
46
|
declare function useToastManager(): UseToastManagerReturnValue;
|
|
43
47
|
|
|
44
|
-
interface ToastProviderProps extends
|
|
45
|
-
children:
|
|
48
|
+
interface ToastProviderProps extends React.ComponentProps<typeof Toast.Provider> {
|
|
49
|
+
children: React.ReactNode;
|
|
46
50
|
}
|
|
47
51
|
declare function ToastProvider({ children, limit, ...props }: ToastProviderProps): react_jsx_runtime.JSX.Element;
|
|
48
|
-
interface ToastTriggerProps extends
|
|
49
|
-
children:
|
|
52
|
+
interface ToastTriggerProps extends Omit<React.ComponentPropsWithRef<'button'>, 'title'>, Pick<ToastObject, 'priority'>, Pick<ToastData, 'design' | 'intent' | 'icon' | 'isClosable' | 'action' | 'compact'> {
|
|
53
|
+
children: React.ReactNode;
|
|
50
54
|
asChild?: boolean;
|
|
51
|
-
title: string;
|
|
52
|
-
description?: string;
|
|
55
|
+
title: string | React.ReactNode;
|
|
56
|
+
description?: string | React.ReactNode;
|
|
53
57
|
timeout?: number;
|
|
54
58
|
}
|
|
55
59
|
declare function ToastTrigger({ children, onClick, asChild, title, description, timeout, design, intent, isClosable, icon, action, compact, priority, }: ToastTriggerProps): react_jsx_runtime.JSX.Element;
|
|
56
60
|
type ToastManager = ReturnType<typeof Toast.createToastManager>;
|
|
57
61
|
declare const createToastManager: () => ToastManager;
|
|
58
62
|
|
|
59
|
-
export { type ToastData, type ToastDesign, type ToastIntent, type ToastManager, type ToastObject, ToastProvider, ToastTrigger, type UseToastManagerReturnValue, createToastManager, useToastManager };
|
|
63
|
+
export { type AddOptions, type ToastData, type ToastDesign, type ToastIntent, type ToastManager, type ToastObject, ToastProvider, ToastTrigger, type UseToastManagerReturnValue, createToastManager, useToastManager };
|
package/dist/toast/index.js
CHANGED
|
@@ -1324,6 +1324,29 @@ function Toast({ toast }) {
|
|
|
1324
1324
|
}
|
|
1325
1325
|
);
|
|
1326
1326
|
};
|
|
1327
|
+
const renderTitle = () => {
|
|
1328
|
+
const title = toast.data?.title ?? toast.title;
|
|
1329
|
+
const hasDescription = !!(toast.data?.description ?? toast.description);
|
|
1330
|
+
if (typeof title !== "string" && title !== void 0) {
|
|
1331
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
1332
|
+
import_toast.Toast.Title,
|
|
1333
|
+
{
|
|
1334
|
+
className: hasDescription ? "text-headline-2" : "text-body-1",
|
|
1335
|
+
render: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", {}),
|
|
1336
|
+
children: title
|
|
1337
|
+
}
|
|
1338
|
+
);
|
|
1339
|
+
}
|
|
1340
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_toast.Toast.Title, { className: hasDescription ? "text-headline-2" : "text-body-1" });
|
|
1341
|
+
};
|
|
1342
|
+
const renderDescription = () => {
|
|
1343
|
+
const description = toast.data?.description ?? toast.description;
|
|
1344
|
+
if (!description) return null;
|
|
1345
|
+
if (typeof description !== "string") {
|
|
1346
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_toast.Toast.Description, { className: "text-body-1 break-all", render: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", {}), children: description });
|
|
1347
|
+
}
|
|
1348
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_toast.Toast.Description, { className: "text-body-1 break-all" });
|
|
1349
|
+
};
|
|
1327
1350
|
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_toast.Toast.Root, { ...rootProps, children: /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: (0, import_class_variance_authority7.cx)("flex", compact ? "gap-lg items-center" : "gap-md flex-col"), children: [
|
|
1328
1351
|
/* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "gap-lg p-md flex grow items-center", children: [
|
|
1329
1352
|
ToastIcon && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(Icon, { size: "md", children: ToastIcon }),
|
|
@@ -1336,8 +1359,8 @@ function Toast({ toast }) {
|
|
|
1336
1359
|
!compact && isClosable && "pr-3xl"
|
|
1337
1360
|
),
|
|
1338
1361
|
children: [
|
|
1339
|
-
|
|
1340
|
-
|
|
1362
|
+
renderTitle(),
|
|
1363
|
+
renderDescription()
|
|
1341
1364
|
]
|
|
1342
1365
|
}
|
|
1343
1366
|
)
|
|
@@ -1399,7 +1422,7 @@ function ToastTrigger({
|
|
|
1399
1422
|
compact,
|
|
1400
1423
|
priority = "low"
|
|
1401
1424
|
}) {
|
|
1402
|
-
const toastManager =
|
|
1425
|
+
const toastManager = useToastManager();
|
|
1403
1426
|
const Component = asChild ? Slot : "button";
|
|
1404
1427
|
function createToast(e) {
|
|
1405
1428
|
onClick?.(e);
|