@sproutsocial/seeds-react-peek-in 0.0.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/esm/index.js +30952 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/index.d.mts +79 -0
- package/dist/index.d.ts +79 -0
- package/dist/index.js +30964 -0
- package/dist/index.js.map +1 -0
- package/package.json +51 -0
package/dist/index.d.mts
ADDED
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import { TypeIconName } from '@sproutsocial/seeds-react-icon';
|
|
4
|
+
|
|
5
|
+
interface TypePeekInControlledProps {
|
|
6
|
+
/** Controlled open state */
|
|
7
|
+
open: boolean;
|
|
8
|
+
/** Called when the open state changes (close button, overlay click, escape) */
|
|
9
|
+
onOpenChange: (open: boolean) => void;
|
|
10
|
+
defaultOpen?: never;
|
|
11
|
+
}
|
|
12
|
+
interface TypePeekInUncontrolledProps {
|
|
13
|
+
open?: never;
|
|
14
|
+
onOpenChange?: (open: boolean) => void;
|
|
15
|
+
/** Initial open state for uncontrolled mode */
|
|
16
|
+
defaultOpen?: boolean;
|
|
17
|
+
}
|
|
18
|
+
type TypePeekInActionProps = {
|
|
19
|
+
/** Accessible label for the action button */
|
|
20
|
+
"aria-label": string;
|
|
21
|
+
/** Icon name from the Seeds icon set */
|
|
22
|
+
iconName?: TypeIconName;
|
|
23
|
+
/** Click handler */
|
|
24
|
+
onClick?: () => void;
|
|
25
|
+
/** Disable the action */
|
|
26
|
+
disabled?: boolean;
|
|
27
|
+
};
|
|
28
|
+
type TypePeekInRailToggleConfig = {
|
|
29
|
+
/** Icon name for the rail toggle button */
|
|
30
|
+
iconName: string;
|
|
31
|
+
/** Accessible label. Default: "Toggle panel" */
|
|
32
|
+
"aria-label"?: string;
|
|
33
|
+
};
|
|
34
|
+
type TypePeekInProps = (TypePeekInControlledProps | TypePeekInUncontrolledProps) & {
|
|
35
|
+
/** Aria label for the built-in close button */
|
|
36
|
+
closeButtonAriaLabel?: string;
|
|
37
|
+
/** Additional action buttons shown in the rail alongside the close button */
|
|
38
|
+
actions?: TypePeekInActionProps[];
|
|
39
|
+
/** Show a rail toggle button in the action rail. Requires PeekIn.Rail to be present. */
|
|
40
|
+
railToggle?: TypePeekInRailToggleConfig;
|
|
41
|
+
children: React.ReactNode;
|
|
42
|
+
};
|
|
43
|
+
interface TypePeekInHeaderProps {
|
|
44
|
+
/** Title displayed on the left side of the header */
|
|
45
|
+
title: React.ReactNode;
|
|
46
|
+
/** If provided, renders a back arrow button before the title */
|
|
47
|
+
onBack?: () => void;
|
|
48
|
+
/** Action buttons rendered on the right side of the header */
|
|
49
|
+
children?: React.ReactNode;
|
|
50
|
+
}
|
|
51
|
+
interface TypePeekInMainProps {
|
|
52
|
+
children: React.ReactNode;
|
|
53
|
+
}
|
|
54
|
+
interface TypePeekInRailProps {
|
|
55
|
+
/** Title for the rail header */
|
|
56
|
+
title?: React.ReactNode;
|
|
57
|
+
/** Whether the rail starts open or collapsed. Default: true */
|
|
58
|
+
defaultOpen?: boolean;
|
|
59
|
+
children: React.ReactNode;
|
|
60
|
+
}
|
|
61
|
+
interface TypePeekInTriggerProps {
|
|
62
|
+
/** Element that opens the PeekIn when clicked */
|
|
63
|
+
children: React.ReactNode;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
declare const PeekInHeader: React.FC<TypePeekInHeaderProps>;
|
|
67
|
+
|
|
68
|
+
declare const PeekInMain: React.FC<TypePeekInMainProps>;
|
|
69
|
+
|
|
70
|
+
declare const PeekInRail: React.FC<TypePeekInRailProps>;
|
|
71
|
+
|
|
72
|
+
declare const PeekInTrigger: React.FC<TypePeekInTriggerProps>;
|
|
73
|
+
|
|
74
|
+
declare const PeekIn: {
|
|
75
|
+
({ open, defaultOpen, onOpenChange, closeButtonAriaLabel, actions, railToggle, children, }: TypePeekInProps): react_jsx_runtime.JSX.Element;
|
|
76
|
+
displayName: string;
|
|
77
|
+
};
|
|
78
|
+
|
|
79
|
+
export { PeekIn, PeekInHeader, PeekInMain, PeekInRail, PeekInTrigger, type TypePeekInActionProps, type TypePeekInHeaderProps, type TypePeekInMainProps, type TypePeekInProps, type TypePeekInRailProps, type TypePeekInRailToggleConfig, type TypePeekInTriggerProps };
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import { TypeIconName } from '@sproutsocial/seeds-react-icon';
|
|
4
|
+
|
|
5
|
+
interface TypePeekInControlledProps {
|
|
6
|
+
/** Controlled open state */
|
|
7
|
+
open: boolean;
|
|
8
|
+
/** Called when the open state changes (close button, overlay click, escape) */
|
|
9
|
+
onOpenChange: (open: boolean) => void;
|
|
10
|
+
defaultOpen?: never;
|
|
11
|
+
}
|
|
12
|
+
interface TypePeekInUncontrolledProps {
|
|
13
|
+
open?: never;
|
|
14
|
+
onOpenChange?: (open: boolean) => void;
|
|
15
|
+
/** Initial open state for uncontrolled mode */
|
|
16
|
+
defaultOpen?: boolean;
|
|
17
|
+
}
|
|
18
|
+
type TypePeekInActionProps = {
|
|
19
|
+
/** Accessible label for the action button */
|
|
20
|
+
"aria-label": string;
|
|
21
|
+
/** Icon name from the Seeds icon set */
|
|
22
|
+
iconName?: TypeIconName;
|
|
23
|
+
/** Click handler */
|
|
24
|
+
onClick?: () => void;
|
|
25
|
+
/** Disable the action */
|
|
26
|
+
disabled?: boolean;
|
|
27
|
+
};
|
|
28
|
+
type TypePeekInRailToggleConfig = {
|
|
29
|
+
/** Icon name for the rail toggle button */
|
|
30
|
+
iconName: string;
|
|
31
|
+
/** Accessible label. Default: "Toggle panel" */
|
|
32
|
+
"aria-label"?: string;
|
|
33
|
+
};
|
|
34
|
+
type TypePeekInProps = (TypePeekInControlledProps | TypePeekInUncontrolledProps) & {
|
|
35
|
+
/** Aria label for the built-in close button */
|
|
36
|
+
closeButtonAriaLabel?: string;
|
|
37
|
+
/** Additional action buttons shown in the rail alongside the close button */
|
|
38
|
+
actions?: TypePeekInActionProps[];
|
|
39
|
+
/** Show a rail toggle button in the action rail. Requires PeekIn.Rail to be present. */
|
|
40
|
+
railToggle?: TypePeekInRailToggleConfig;
|
|
41
|
+
children: React.ReactNode;
|
|
42
|
+
};
|
|
43
|
+
interface TypePeekInHeaderProps {
|
|
44
|
+
/** Title displayed on the left side of the header */
|
|
45
|
+
title: React.ReactNode;
|
|
46
|
+
/** If provided, renders a back arrow button before the title */
|
|
47
|
+
onBack?: () => void;
|
|
48
|
+
/** Action buttons rendered on the right side of the header */
|
|
49
|
+
children?: React.ReactNode;
|
|
50
|
+
}
|
|
51
|
+
interface TypePeekInMainProps {
|
|
52
|
+
children: React.ReactNode;
|
|
53
|
+
}
|
|
54
|
+
interface TypePeekInRailProps {
|
|
55
|
+
/** Title for the rail header */
|
|
56
|
+
title?: React.ReactNode;
|
|
57
|
+
/** Whether the rail starts open or collapsed. Default: true */
|
|
58
|
+
defaultOpen?: boolean;
|
|
59
|
+
children: React.ReactNode;
|
|
60
|
+
}
|
|
61
|
+
interface TypePeekInTriggerProps {
|
|
62
|
+
/** Element that opens the PeekIn when clicked */
|
|
63
|
+
children: React.ReactNode;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
declare const PeekInHeader: React.FC<TypePeekInHeaderProps>;
|
|
67
|
+
|
|
68
|
+
declare const PeekInMain: React.FC<TypePeekInMainProps>;
|
|
69
|
+
|
|
70
|
+
declare const PeekInRail: React.FC<TypePeekInRailProps>;
|
|
71
|
+
|
|
72
|
+
declare const PeekInTrigger: React.FC<TypePeekInTriggerProps>;
|
|
73
|
+
|
|
74
|
+
declare const PeekIn: {
|
|
75
|
+
({ open, defaultOpen, onOpenChange, closeButtonAriaLabel, actions, railToggle, children, }: TypePeekInProps): react_jsx_runtime.JSX.Element;
|
|
76
|
+
displayName: string;
|
|
77
|
+
};
|
|
78
|
+
|
|
79
|
+
export { PeekIn, PeekInHeader, PeekInMain, PeekInRail, PeekInTrigger, type TypePeekInActionProps, type TypePeekInHeaderProps, type TypePeekInMainProps, type TypePeekInProps, type TypePeekInRailProps, type TypePeekInRailToggleConfig, type TypePeekInTriggerProps };
|