@internxt/ui 0.1.9 → 0.1.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/dist/components/index.d.ts +1 -0
- package/dist/components/mail/cheaps/MessageCheap.d.ts +18 -0
- package/dist/components/mail/cheaps/MessageCheapSkeleton.d.ts +2 -0
- package/dist/components/mail/cheaps/user/UserCheap.d.ts +15 -0
- package/dist/components/mail/index.d.ts +6 -0
- package/dist/components/mail/tray/TrayList.d.ts +47 -0
- package/dist/components/sidenav/Sidenav.d.ts +4 -4
- package/dist/components/sidenav/index.d.ts +4 -1
- package/dist/index.cjs.js +44 -44
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +2461 -2383
- package/dist/index.es.js.map +1 -1
- package/dist/stories/components/mail/cheaps/user/UserCheap.stories.d.ts +9 -0
- package/dist/stories/components/mail/tray/Tray.stories.d.ts +12 -0
- package/dist/stories/components/mail/tray/message/MessageCheap.stories.d.ts +11 -0
- package/dist/stories/components/mail/tray/message/MessageCheapSkeleton.stories.d.ts +7 -0
- package/package.json +1 -1
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export interface MessageCheapProps {
|
|
2
|
+
email: {
|
|
3
|
+
id: string;
|
|
4
|
+
from: {
|
|
5
|
+
name: string;
|
|
6
|
+
avatar: string;
|
|
7
|
+
};
|
|
8
|
+
subject: string;
|
|
9
|
+
createdAt: string;
|
|
10
|
+
body: string;
|
|
11
|
+
read: boolean;
|
|
12
|
+
};
|
|
13
|
+
active?: boolean;
|
|
14
|
+
selected?: boolean;
|
|
15
|
+
onClick: (id: string) => void;
|
|
16
|
+
}
|
|
17
|
+
declare const MessageCheap: ({ email, active, selected, onClick }: MessageCheapProps) => import("react/jsx-runtime").JSX.Element;
|
|
18
|
+
export default MessageCheap;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
interface UserCheapProps {
|
|
2
|
+
fullName: string;
|
|
3
|
+
email: string;
|
|
4
|
+
avatar?: string;
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* A cheap user component to render a user's information.
|
|
8
|
+
*
|
|
9
|
+
* @param {UserCheapProps} props - The props object.
|
|
10
|
+
* @param {string} props.fullName - The user's full name.
|
|
11
|
+
* @param {string} props.email - The user's email address.
|
|
12
|
+
* @param {string} [props.avatar] - The user's avatar URL. If not provided, the avatar will be generated from the user's name.
|
|
13
|
+
*/
|
|
14
|
+
declare const UserCheap: ({ fullName, email, avatar }: UserCheapProps) => import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
export default UserCheap;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { default as Tray } from './tray/TrayList';
|
|
2
|
+
export { default as MessageCheap } from './cheaps/MessageCheap';
|
|
3
|
+
export { default as MessageCheapSkeleton } from './cheaps/MessageCheapSkeleton';
|
|
4
|
+
export type { TrayListProps } from './tray/TrayList';
|
|
5
|
+
export type { MessageCheapProps } from './cheaps/MessageCheap';
|
|
6
|
+
export { default as UserCheap } from './cheaps/user/UserCheap';
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
export interface TrayListProps {
|
|
3
|
+
mails: {
|
|
4
|
+
id: string;
|
|
5
|
+
from: {
|
|
6
|
+
name: string;
|
|
7
|
+
avatar: string;
|
|
8
|
+
};
|
|
9
|
+
subject: string;
|
|
10
|
+
createdAt: string;
|
|
11
|
+
body: string;
|
|
12
|
+
read: boolean;
|
|
13
|
+
}[];
|
|
14
|
+
selectedEmails?: string[];
|
|
15
|
+
loading: boolean;
|
|
16
|
+
checked?: boolean;
|
|
17
|
+
activeEmail?: string;
|
|
18
|
+
hasMoreItems?: boolean;
|
|
19
|
+
emptyState?: ReactNode;
|
|
20
|
+
onMailSelected?: (id: string) => void;
|
|
21
|
+
onLoadMore?: () => void;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
*
|
|
25
|
+
* @param {TrayListProps} TrayListProps - Props for the TrayList component
|
|
26
|
+
* @prop {Array} TrayListProps.mails - An array of email objects
|
|
27
|
+
*
|
|
28
|
+
* @prop {string[]} TrayListProps.selectedEmails - An array of selected email IDs
|
|
29
|
+
*
|
|
30
|
+
* @prop {boolean} TrayListProps.loading - A boolean indicating loading state
|
|
31
|
+
*
|
|
32
|
+
* @prop {boolean} TrayListProps.checked - A boolean indicating whether all emails are checked
|
|
33
|
+
*
|
|
34
|
+
* @prop {string} TrayListProps.activeEmail - The ID of the currently active email
|
|
35
|
+
*
|
|
36
|
+
* @prop {boolean} TrayListProps.hasMoreItems - A boolean indicating whether there are more items to load
|
|
37
|
+
*
|
|
38
|
+
* @prop {ReactNode} TrayListProps.emptyState - A JSX element to display when there are no emails
|
|
39
|
+
*
|
|
40
|
+
* @prop {(id: string) => void} TrayListProps.onMailSelected - A function to handle email selection
|
|
41
|
+
*
|
|
42
|
+
* @prop {() => void} TrayListProps.onLoadMore - A function to load more emails
|
|
43
|
+
*
|
|
44
|
+
* @returns {JSX.Element} The rendered TrayList component
|
|
45
|
+
*/
|
|
46
|
+
declare const TrayList: ({ mails, selectedEmails, loading, checked, activeEmail, hasMoreItems, emptyState, onMailSelected, onLoadMore, }: TrayListProps) => import("react/jsx-runtime").JSX.Element;
|
|
47
|
+
export default TrayList;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
2
|
import { SidenavOption } from './SidenavOptions';
|
|
3
|
-
export interface
|
|
3
|
+
export interface SidenavHeaderProps {
|
|
4
4
|
logo: string;
|
|
5
5
|
title: string;
|
|
6
6
|
onClick: () => void;
|
|
7
7
|
className?: string;
|
|
8
8
|
}
|
|
9
|
-
export interface
|
|
9
|
+
export interface SidenavStorageProps {
|
|
10
10
|
usage: string;
|
|
11
11
|
limit: string;
|
|
12
12
|
percentage: number;
|
|
@@ -15,7 +15,7 @@ export interface SidenavStorage {
|
|
|
15
15
|
isLoading?: boolean;
|
|
16
16
|
}
|
|
17
17
|
export interface SidenavProps {
|
|
18
|
-
header:
|
|
18
|
+
header: SidenavHeaderProps;
|
|
19
19
|
primaryAction?: ReactNode;
|
|
20
20
|
suiteLauncher?: {
|
|
21
21
|
className?: string;
|
|
@@ -33,7 +33,7 @@ export interface SidenavProps {
|
|
|
33
33
|
options: SidenavOption[];
|
|
34
34
|
showSubsections?: boolean;
|
|
35
35
|
isCollapsed?: boolean;
|
|
36
|
-
storage?:
|
|
36
|
+
storage?: SidenavStorageProps;
|
|
37
37
|
onToggleCollapse?: () => void;
|
|
38
38
|
}
|
|
39
39
|
/**
|
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
export { default as Sidenav } from './Sidenav';
|
|
2
2
|
export { default as SidenavItem } from './SidenavItem';
|
|
3
|
+
export { default as SidenavOptions } from './SidenavOptions';
|
|
4
|
+
export { default as SidenavHeader } from './SidenavHeader';
|
|
5
|
+
export { default as SidenavStorage } from './SidenavStorage';
|
|
3
6
|
export type { SidenavOption } from './SidenavOptions';
|
|
4
|
-
export type {
|
|
7
|
+
export type { SidenavHeaderProps, SidenavProps, SidenavStorageProps } from './Sidenav';
|