@connectycube/react-ui-kit 0.0.17 → 0.0.19
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/configs/dependencies.json +27 -0
- package/configs/imports.json +9 -0
- package/dist/index.cjs +14 -5
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +14 -6
- package/dist/index.js.map +1 -1
- package/dist/types/components/attachment.d.ts +45 -0
- package/dist/types/components/attachment.d.ts.map +1 -0
- package/dist/types/components/avatar.d.ts +3 -3
- package/dist/types/components/avatar.d.ts.map +1 -1
- package/dist/types/components/badge.d.ts +3 -3
- package/dist/types/components/badge.d.ts.map +1 -1
- package/dist/types/components/button.d.ts +2 -2
- package/dist/types/components/dialog-item.d.ts +46 -0
- package/dist/types/components/dialog-item.d.ts.map +1 -0
- package/dist/types/components/file-picker.d.ts +22 -0
- package/dist/types/components/file-picker.d.ts.map +1 -0
- package/dist/types/components/formatted-date.d.ts +8 -0
- package/dist/types/components/formatted-date.d.ts.map +1 -0
- package/dist/types/components/input.d.ts.map +1 -1
- package/dist/types/components/label.d.ts +5 -0
- package/dist/types/components/label.d.ts.map +1 -0
- package/dist/types/components/link-preview.d.ts +21 -0
- package/dist/types/components/link-preview.d.ts.map +1 -0
- package/dist/types/components/linkify-text.d.ts +9 -0
- package/dist/types/components/linkify-text.d.ts.map +1 -0
- package/dist/types/components/spinner.d.ts +3 -1
- package/dist/types/components/spinner.d.ts.map +1 -1
- package/dist/types/components/status-sent.d.ts +7 -0
- package/dist/types/components/status-sent.d.ts.map +1 -0
- package/dist/types/components/switch.d.ts +6 -0
- package/dist/types/components/switch.d.ts.map +1 -0
- package/dist/types/components/utils.d.ts +0 -1
- package/dist/types/components/utils.d.ts.map +1 -1
- package/dist/types/index.d.ts +21 -4
- package/dist/types/index.d.ts.map +1 -1
- package/gen/components/attachment.jsx +214 -0
- package/gen/components/avatar.jsx +13 -3
- package/gen/components/badge.jsx +3 -3
- package/gen/components/button.jsx +2 -2
- package/gen/components/dialog-item.jsx +149 -0
- package/gen/components/dismiss-layer.jsx +1 -1
- package/gen/components/file-picker.jsx +200 -0
- package/gen/components/formatted-date.jsx +57 -0
- package/gen/components/label.jsx +22 -0
- package/gen/components/link-preview.jsx +131 -0
- package/gen/components/linkify-text.jsx +31 -0
- package/gen/components/spinner.jsx +29 -5
- package/gen/components/status-sent.jsx +21 -0
- package/gen/components/switch.jsx +25 -0
- package/gen/components/utils.js +0 -7
- package/gen/index.js +46 -0
- package/package.json +5 -1
- package/src/components/attachment.tsx +270 -0
- package/src/components/avatar.tsx +16 -6
- package/src/components/badge.tsx +6 -6
- package/src/components/button.tsx +2 -2
- package/src/components/connectycube-ui/avatar.jsx +54 -0
- package/src/components/connectycube-ui/avatar.tsx +77 -0
- package/src/components/connectycube-ui/badge.jsx +45 -0
- package/src/components/connectycube-ui/badge.tsx +42 -0
- package/src/components/connectycube-ui/dialog-item.jsx +149 -0
- package/src/components/connectycube-ui/dialog-item.tsx +188 -0
- package/src/components/connectycube-ui/file-picker.jsx +200 -0
- package/src/components/connectycube-ui/file-picker.tsx +231 -0
- package/src/components/connectycube-ui/formatted-date.jsx +57 -0
- package/src/components/connectycube-ui/formatted-date.tsx +57 -0
- package/src/components/connectycube-ui/label.jsx +22 -0
- package/src/components/connectycube-ui/label.tsx +23 -0
- package/src/components/connectycube-ui/linkify-text.tsx +40 -0
- package/src/components/connectycube-ui/presence.jsx +81 -0
- package/src/components/connectycube-ui/presence.tsx +96 -0
- package/src/components/connectycube-ui/status-sent.jsx +21 -0
- package/src/components/connectycube-ui/status-sent.tsx +25 -0
- package/src/components/connectycube-ui/utils.js +10 -0
- package/src/components/connectycube-ui/utils.ts +10 -0
- package/src/components/dialog-item.tsx +188 -0
- package/src/components/dismiss-layer.tsx +1 -1
- package/src/components/file-picker.tsx +231 -0
- package/src/components/formatted-date.tsx +57 -0
- package/src/components/input.tsx +1 -1
- package/src/components/label.tsx +23 -0
- package/src/components/link-preview.tsx +149 -0
- package/src/components/linkify-text.tsx +41 -0
- package/src/components/spinner.tsx +31 -5
- package/src/components/status-sent.tsx +25 -0
- package/src/components/switch.tsx +27 -0
- package/src/components/utils.ts +0 -7
- package/src/index.ts +72 -4
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import type React from 'react';
|
|
2
|
+
import { type LucideProps } from 'lucide-react';
|
|
3
|
+
interface AttachmentProps {
|
|
4
|
+
uid?: string;
|
|
5
|
+
url?: string;
|
|
6
|
+
mimeType?: string;
|
|
7
|
+
uploading?: boolean;
|
|
8
|
+
onReady?: (skipOnce?: boolean) => void;
|
|
9
|
+
linkProps?: AttachmentLinkProps;
|
|
10
|
+
containerProps?: React.ComponentProps<'div'>;
|
|
11
|
+
}
|
|
12
|
+
interface AttachmentLinkProps extends React.ComponentProps<'a'>, Omit<AttachmentProps, 'containerProps' & 'mimeType' & 'onReady'> {
|
|
13
|
+
children?: React.ReactNode;
|
|
14
|
+
}
|
|
15
|
+
interface AttachmentImageProps extends React.ComponentProps<'img'>, Omit<AttachmentProps, 'containerProps' & 'mimeType'> {
|
|
16
|
+
}
|
|
17
|
+
interface AttachmentAudioProps extends React.ComponentProps<'audio'>, Omit<AttachmentProps, 'linkProps' & 'mimeType' & 'onReady'> {
|
|
18
|
+
}
|
|
19
|
+
interface AttachmentVideoProps extends React.ComponentProps<'video'>, Omit<AttachmentProps, 'linkProps' & 'mimeType'> {
|
|
20
|
+
maxSize?: number;
|
|
21
|
+
}
|
|
22
|
+
interface AttachmentFileProps extends LucideProps, Omit<AttachmentProps, 'containerProps' & 'mimeType'> {
|
|
23
|
+
name?: string | undefined;
|
|
24
|
+
iconElement?: React.ReactNode;
|
|
25
|
+
}
|
|
26
|
+
interface AttachmentFailedProps extends LucideProps, Omit<AttachmentProps, 'linkProps' & 'mimeType'> {
|
|
27
|
+
name?: string | undefined;
|
|
28
|
+
iconElement?: React.ReactNode;
|
|
29
|
+
}
|
|
30
|
+
declare const AttachmentLink: React.ForwardRefExoticComponent<Omit<AttachmentLinkProps, "ref"> & React.RefAttributes<HTMLAnchorElement>>;
|
|
31
|
+
declare const AttachmentAudio: React.ForwardRefExoticComponent<Omit<AttachmentAudioProps, "ref"> & React.RefAttributes<HTMLAudioElement>>;
|
|
32
|
+
declare const AttachmentVideo: React.ForwardRefExoticComponent<Omit<AttachmentVideoProps, "ref"> & React.RefAttributes<HTMLVideoElement>>;
|
|
33
|
+
declare const AttachmentImage: React.ForwardRefExoticComponent<Omit<AttachmentImageProps, "ref"> & React.RefAttributes<HTMLImageElement>>;
|
|
34
|
+
declare function AttachmentFile({ url, name, uploading, iconElement, linkProps, ...props }: AttachmentFileProps): import("react/jsx-runtime").JSX.Element;
|
|
35
|
+
declare namespace AttachmentFile {
|
|
36
|
+
var displayName: string;
|
|
37
|
+
}
|
|
38
|
+
declare function AttachmentFailed({ name, uploading, iconElement, containerProps, ...props }: AttachmentFailedProps): import("react/jsx-runtime").JSX.Element;
|
|
39
|
+
declare namespace AttachmentFailed {
|
|
40
|
+
var displayName: string;
|
|
41
|
+
}
|
|
42
|
+
declare function AttachmentBase({ mimeType, ...props }: AttachmentProps): import("react/jsx-runtime").JSX.Element;
|
|
43
|
+
declare const Attachment: React.MemoExoticComponent<typeof AttachmentBase>;
|
|
44
|
+
export { Attachment, AttachmentLink, AttachmentImage, AttachmentAudio, AttachmentVideo, AttachmentFile, AttachmentFailed, type AttachmentLinkProps, type AttachmentImageProps, type AttachmentAudioProps, type AttachmentVideoProps, type AttachmentFileProps, type AttachmentFailedProps, type AttachmentProps, };
|
|
45
|
+
//# sourceMappingURL=attachment.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"attachment.d.ts","sourceRoot":"","sources":["../../../src/components/attachment.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAqB,KAAK,WAAW,EAAE,MAAM,cAAc,CAAC;AAInE,UAAU,eAAe;IACvB,GAAG,CAAC,EA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S,CAAC;IAC1B,WAAW,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC/B;AAwBD,QAAA,MAAM,cAAc,4GAAyE,CAAC;AAqB9F,QAAA,MAAM,eAAe,4GAA0E,CAAC;AAmDhG,QAAA,MAAM,eAAe,4GAA0E,CAAC;AAgChG,QAAA,MAAM,eAAe,4GAA0E,CAAC;AAIhG,iBAAS,cAAc,CAAC,EAAE,GAAG,EAAE,IAAI,EAAE,SAAiB,EAAE,WAAW,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,mBAAmB,2CA2B9G;kBA3BQ,cAAc;;;AA+BvB,iBAAS,gBAAgB,CAAC,EACxB,IAAqB,EACrB,SAAiB,EACjB,WAAW,EACX,cAAc,EACd,GAAG,KAAK,EACT,EAAE,qBAAqB,2CAkBvB;kBAxBQ,gBAAgB;;;AA4BzB,iBAAS,cAAc,CAAC,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAE,EAAE,eAAe,2CAiB9D;AAED,QAAA,MAAM,UAAU,kDAAuB,CAAC;AAExC,OAAO,EACL,UAAU,EACV,cAAc,EACd,eAAe,EACf,eAAe,EACf,eAAe,EACf,cAAc,EACd,gBAAgB,EAChB,KAAK,mBAAmB,EACxB,KAAK,oBAAoB,EACzB,KAAK,oBAAoB,EACzB,KAAK,oBAAoB,EACzB,KAAK,mBAAmB,EACxB,KAAK,qBAAqB,EAC1B,KAAK,eAAe,GACrB,CAAC"}
|
|
@@ -2,9 +2,9 @@ import type React from 'react';
|
|
|
2
2
|
import * as AvatarPrimitive from '@radix-ui/react-avatar';
|
|
3
3
|
import { type PresenceStatus, type PresenceBadgeProps } from './presence';
|
|
4
4
|
interface AvatarProps extends AvatarPrimitive.AvatarProps {
|
|
5
|
-
src?: string;
|
|
6
|
-
name?: string;
|
|
7
|
-
online?: boolean;
|
|
5
|
+
src?: string | undefined;
|
|
6
|
+
name?: string | undefined;
|
|
7
|
+
online?: boolean | undefined;
|
|
8
8
|
presence?: PresenceStatus;
|
|
9
9
|
onlineProps?: React.ComponentProps<'div'>;
|
|
10
10
|
presenceProps?: PresenceBadgeProps;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"avatar.d.ts","sourceRoot":"","sources":["../../../src/components/avatar.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,eAAe,MAAM,wBAAwB,CAAC;AAC1D,OAAO,EAAiB,KAAK,cAAc,EAAE,KAAK,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAGzF,UAAU,WAAY,SAAQ,eAAe,CAAC,WAAW;IACvD,GAAG,CAAC,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"avatar.d.ts","sourceRoot":"","sources":["../../../src/components/avatar.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,eAAe,MAAM,wBAAwB,CAAC;AAC1D,OAAO,EAAiB,KAAK,cAAc,EAAE,KAAK,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAGzF,UAAU,WAAY,SAAQ,eAAe,CAAC,WAAW;IACvD,GAAG,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACzB,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC1B,MAAM,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IAC7B,QAAQ,CAAC,EAAE,cAAc,CAAC;IAC1B,WAAW,CAAC,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC;IAC1C,aAAa,CAAC,EAAE,kBAAkB,CAAC;IACnC,UAAU,CAAC,EAAE,eAAe,CAAC,gBAAgB,CAAC;IAC9C,aAAa,CAAC,EAAE,eAAe,CAAC,mBAAmB,CAAC;CACrD;AAyDD,QAAA,MAAM,MAAM,+EAA4D,CAAC;AAIzE,OAAO,EAAE,MAAM,EAAE,KAAK,WAAW,EAAE,CAAC"}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import type React from 'react';
|
|
2
2
|
import { type VariantProps } from 'class-variance-authority';
|
|
3
|
-
interface BadgeProps extends React.HTMLAttributes<
|
|
3
|
+
interface BadgeProps extends React.HTMLAttributes<HTMLElement>, VariantProps<typeof badgeVariants> {
|
|
4
4
|
asChild?: boolean;
|
|
5
5
|
}
|
|
6
6
|
declare const badgeVariants: (props?: ({
|
|
7
|
-
variant?: "default" | "
|
|
7
|
+
variant?: "default" | "outline" | "secondary" | "destructive" | null | undefined;
|
|
8
8
|
} & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
|
|
9
|
-
declare const Badge: React.ForwardRefExoticComponent<BadgeProps & React.RefAttributes<
|
|
9
|
+
declare const Badge: React.ForwardRefExoticComponent<BadgeProps & React.RefAttributes<HTMLElement>>;
|
|
10
10
|
export { Badge, type BadgeProps };
|
|
11
11
|
//# sourceMappingURL=badge.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"badge.d.ts","sourceRoot":"","sources":["../../../src/components/badge.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAGlE,UAAU,UAAW,SAAQ,KAAK,CAAC,cAAc,CAAC,
|
|
1
|
+
{"version":3,"file":"badge.d.ts","sourceRoot":"","sources":["../../../src/components/badge.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAGlE,UAAU,UAAW,SAAQ,KAAK,CAAC,cAAc,CAAC,WAAW,CAAC,EAAE,YAAY,CAAC,OAAO,aAAa,CAAC;IAChG,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,QAAA,MAAM,aAAa;;mFAgBlB,CAAC;AAWF,QAAA,MAAM,KAAK,gFAAiD,CAAC;AAI7D,OAAO,EAAE,KAAK,EAAE,KAAK,UAAU,EAAE,CAAC"}
|
|
@@ -4,8 +4,8 @@ interface ButtonProps extends React.ComponentProps<'button'>, VariantProps<typeo
|
|
|
4
4
|
asChild?: boolean;
|
|
5
5
|
}
|
|
6
6
|
declare const buttonVariants: (props?: ({
|
|
7
|
-
variant?: "
|
|
8
|
-
size?: "default" | "
|
|
7
|
+
variant?: "default" | "link" | "outline" | "secondary" | "destructive" | "ghost" | null | undefined;
|
|
8
|
+
size?: "default" | "icon" | "sm" | "lg" | null | undefined;
|
|
9
9
|
} & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
|
|
10
10
|
declare const Button: React.ForwardRefExoticComponent<Omit<ButtonProps, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
11
11
|
export { Button, type ButtonProps };
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import type React from 'react';
|
|
2
|
+
import { type AvatarProps } from './avatar';
|
|
3
|
+
import { type LucideProps } from 'lucide-react';
|
|
4
|
+
import { type FormattedDateProps } from './formatted-date';
|
|
5
|
+
import { type StatusSentProps } from './status-sent';
|
|
6
|
+
import { type PresenceStatus } from './presence';
|
|
7
|
+
import { type BadgeProps } from './badge';
|
|
8
|
+
interface DialogItemProps extends React.ComponentProps<'div'> {
|
|
9
|
+
index?: number;
|
|
10
|
+
isPrivateDialog?: boolean;
|
|
11
|
+
selected?: boolean;
|
|
12
|
+
onSelect?: () => void;
|
|
13
|
+
name: string;
|
|
14
|
+
photo?: string;
|
|
15
|
+
userOnline?: boolean;
|
|
16
|
+
userPresence?: PresenceStatus;
|
|
17
|
+
hasGroupIcon?: boolean;
|
|
18
|
+
lastSentStatus?: StatusSentProps['status'];
|
|
19
|
+
lastSentDate?: FormattedDateProps['date'];
|
|
20
|
+
lastSenderName?: string;
|
|
21
|
+
lastMessage?: string;
|
|
22
|
+
typingStatusText?: string;
|
|
23
|
+
draft?: string;
|
|
24
|
+
draftLabel?: string;
|
|
25
|
+
unreadCount?: number;
|
|
26
|
+
language?: string;
|
|
27
|
+
divider?: 'top' | 'bottom' | 'both' | 'none';
|
|
28
|
+
avatarProps?: AvatarProps;
|
|
29
|
+
contentProps?: React.ComponentProps<'div'>;
|
|
30
|
+
headerProps?: React.ComponentProps<'div'>;
|
|
31
|
+
headerLeftProps?: React.ComponentProps<'div'>;
|
|
32
|
+
groupIconProps?: LucideProps;
|
|
33
|
+
nameProps?: React.ComponentProps<'span'>;
|
|
34
|
+
headerRightProps?: React.ComponentProps<'div'>;
|
|
35
|
+
statusSentIconProps?: StatusSentProps;
|
|
36
|
+
formattedDateProps?: FormattedDateProps;
|
|
37
|
+
footerProps?: React.ComponentProps<'div'>;
|
|
38
|
+
lastMessageProps?: React.ComponentProps<'span'>;
|
|
39
|
+
draftLabelProps?: React.ComponentProps<'span'>;
|
|
40
|
+
lastSenderNameProps?: React.ComponentProps<'span'>;
|
|
41
|
+
unreadBadgeProps?: BadgeProps;
|
|
42
|
+
dividerProps?: React.ComponentProps<'div'>;
|
|
43
|
+
}
|
|
44
|
+
declare const DialogItem: React.NamedExoticComponent<Omit<DialogItemProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
45
|
+
export { DialogItem, type DialogItemProps };
|
|
46
|
+
//# sourceMappingURL=dialog-item.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dialog-item.d.ts","sourceRoot":"","sources":["../../../src/components/dialog-item.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAU,KAAK,WAAW,EAAE,MAAM,UAAU,CAAC;AACpD,OAAO,EAAS,KAAK,WAAW,EAAE,MAAM,cAAc,CAAC;AAEvD,OAAO,EAAiB,KAAK,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAC1E,OAAO,EAAc,KAAK,eAAe,EAAE,MAAM,eAAe,CAAC;AACjE,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,YAAY,CAA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AAC;IACzC,gBAAgB,CAAC,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC;IAC/C,mBAAmB,CAAC,EAAE,eAAe,CAAC;IACtC,kBAAkB,CAAC,EAAE,kBAAkB,CAAC;IACxC,WAAW,CAAC,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC;IAC1C,gBAAgB,CAAC,EAAE,KAAK,CAAC,cAAc,CAAC,MAAM,CAAC,CAAC;IAChD,eAAe,CAAC,EAAE,KAAK,CAAC,cAAc,CAAC,MAAM,CAAC,CAAC;IAC/C,mBAAmB,CAAC,EAAE,KAAK,CAAC,cAAc,CAAC,MAAM,CAAC,CAAC;IACnD,gBAAgB,CAAC,EAAE,UAAU,CAAC;IAC9B,YAAY,CAAC,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC;CAC5C;AA0ID,QAAA,MAAM,UAAU,gGAAoE,CAAC;AAIrF,OAAO,EAAE,UAAU,EAAE,KAAK,eAAe,EAAE,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type React from 'react';
|
|
2
|
+
import { LucideProps } from 'lucide-react';
|
|
3
|
+
import { type LabelProps } from './label';
|
|
4
|
+
interface FilePickerInputProps extends React.ComponentProps<'input'> {
|
|
5
|
+
onSelectFile: (files: File[]) => void;
|
|
6
|
+
onInvalidFile?: () => void;
|
|
7
|
+
iconElement?: React.ReactNode;
|
|
8
|
+
labelProps?: LabelProps;
|
|
9
|
+
iconProps?: LucideProps;
|
|
10
|
+
}
|
|
11
|
+
interface FilePickerDropzoneProps extends FilePickerInputProps {
|
|
12
|
+
children?: React.ReactNode;
|
|
13
|
+
placeholder?: string;
|
|
14
|
+
dropZoneProps?: React.ComponentProps<'div'>;
|
|
15
|
+
placeholderContainerProps?: React.ComponentProps<'div'>;
|
|
16
|
+
iconProps?: LucideProps;
|
|
17
|
+
placeholderProps?: React.ComponentProps<'span'>;
|
|
18
|
+
}
|
|
19
|
+
declare const FilePickerInput: React.ForwardRefExoticComponent<Omit<FilePickerInputProps, "ref"> & React.RefAttributes<HTMLInputElement>>;
|
|
20
|
+
declare const FilePickerDropzone: React.ForwardRefExoticComponent<Omit<FilePickerDropzoneProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
21
|
+
export { FilePickerInput, FilePickerDropzone, FilePickerInput as Input, FilePickerDropzone as Dropzone, type FilePickerInputProps, type FilePickerDropzoneProps, };
|
|
22
|
+
//# sourceMappingURL=file-picker.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"file-picker.d.ts","sourceRoot":"","sources":["../../../src/components/file-picker.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAkB,WAAW,EAAa,MAAM,cAAc,CAAC;AACtE,OAAO,EAAS,KAAK,UAAU,EAAE,MAAM,SAAS,CAAC;AAwDjD,UAAU,oBAAqB,SAAQ,KAAK,CAAC,cAAc,CAAC,OAAO,CAAC;IAClE,YAAY,EAAE,CAAC,KAAK,EAAE,IAAI,EAAE,KAAK,IAAI,CAAC;IACtC,aAAa,CAAC,EAAE,MAAM,IAAI,CAAC;IAC3B,WAAW,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC9B,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB,SAAS,CAAC,EAAE,WAAW,CAAC;CACzB;AAED,UAAU,uBAAwB,SAAQ,oBAAoB;IAC5D,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,aAAa,CAAC,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC;IAC5C,yBAAyB,CAAC,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC;IACxD,SAAS,CAAC,EAAE,WAAW,CAAC;IACxB,gBAAgB,CAAC,EAAE,KAAK,CAAC,cAAc,CAAC,MAAM,CAAC,CAAC;CACjD;AAoDD,QAAA,MAAM,eAAe,4GAA0E,CAAC;AA6FhG,QAAA,MAAM,kBAAkB,6GAA8E,CAAC;AAIvG,OAAO,EACL,eAAe,EACf,kBAAkB,EAClB,eAAe,IAAI,KAAK,EACxB,kBAAkB,IAAI,QAAQ,EAC9B,KAAK,oBAAoB,EACzB,KAAK,uBAAuB,GAC7B,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
interface FormattedDateProps extends React.ComponentProps<'span'> {
|
|
2
|
+
date?: Date | string | number | null | undefined;
|
|
3
|
+
language?: string;
|
|
4
|
+
distanceToNow?: boolean;
|
|
5
|
+
}
|
|
6
|
+
declare const FormattedDate: import("react").NamedExoticComponent<Omit<FormattedDateProps, "ref"> & import("react").RefAttributes<HTMLSpanElement>>;
|
|
7
|
+
export { FormattedDate, type FormattedDateProps };
|
|
8
|
+
//# sourceMappingURL=formatted-date.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"formatted-date.d.ts","sourceRoot":"","sources":["../../../src/components/formatted-date.tsx"],"names":[],"mappings":"AAKA,UAAU,kBAAmB,SAAQ,KAAK,CAAC,cAAc,CAAC,MAAM,CAAC;IAC/D,IAAI,CAAC,EAAE,IAAI,GAAG,MAAM,GAAG,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IACjD,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,aAAa,CAAC,EAAE,OAAO,CAAC;CACzB;AA2CD,QAAA,MAAM,aAAa,wHAA2E,CAAC;AAI/F,OAAO,EAAE,aAAa,EAAE,KAAK,kBAAkB,EAAE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"input.d.ts","sourceRoot":"","sources":["../../../src/components/input.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,KAAK,UAAU,GAAG,KAAK,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC;AAiBhD,QAAA,MAAM,KAAK,
|
|
1
|
+
{"version":3,"file":"input.d.ts","sourceRoot":"","sources":["../../../src/components/input.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,KAAK,UAAU,GAAG,KAAK,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC;AAiBhD,QAAA,MAAM,KAAK,8KAAsD,CAAC;AAIlE,OAAO,EAAE,KAAK,EAAE,KAAK,UAAU,EAAE,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type React from 'react';
|
|
2
|
+
import { type LabelProps } from '@radix-ui/react-label';
|
|
3
|
+
declare const Label: React.ForwardRefExoticComponent<LabelProps & React.RefAttributes<HTMLLabelElement>>;
|
|
4
|
+
export { Label, type LabelProps };
|
|
5
|
+
//# sourceMappingURL=label.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"label.d.ts","sourceRoot":"","sources":["../../../src/components/label.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAqB,KAAK,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAgB3E,QAAA,MAAM,KAAK,qFAAsD,CAAC;AAIlE,OAAO,EAAE,KAAK,EAAE,KAAK,UAAU,EAAE,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type React from 'react';
|
|
2
|
+
import { type LucideProps } from 'lucide-react';
|
|
3
|
+
interface LinkPreviewProps extends React.ComponentProps<'a'> {
|
|
4
|
+
thin?: boolean;
|
|
5
|
+
title?: string;
|
|
6
|
+
description?: string;
|
|
7
|
+
icon?: React.ComponentProps<'img'>['src'];
|
|
8
|
+
image?: React.ComponentProps<'img'>['src'];
|
|
9
|
+
onReady?: () => void;
|
|
10
|
+
iconFallbackElement?: React.ReactElement;
|
|
11
|
+
titleContainerProps?: React.ComponentProps<'div'>;
|
|
12
|
+
iconProps?: React.ComponentProps<'img'>;
|
|
13
|
+
iconFallbackProps?: LucideProps;
|
|
14
|
+
titleProps?: React.ComponentProps<'span'>;
|
|
15
|
+
descriptionProps?: React.ComponentProps<'div'>;
|
|
16
|
+
imageContainerProps?: React.ComponentProps<'div'>;
|
|
17
|
+
imageProps?: React.ComponentProps<'img'>;
|
|
18
|
+
}
|
|
19
|
+
declare const LinkPreview: React.NamedExoticComponent<Omit<LinkPreviewProps, "ref"> & React.RefAttributes<HTMLAnchorElement>>;
|
|
20
|
+
export { LinkPreview, type LinkPreviewProps };
|
|
21
|
+
//# sourceMappingURL=link-preview.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"link-preview.d.ts","sourceRoot":"","sources":["../../../src/components/link-preview.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAS,KAAK,WAAW,EAAE,MAAM,cAAc,CAAC;AAevD,UAAU,gBAAiB,SAAQ,KAAK,CAAC,cAAc,CAAC,GAAG,CAAC;IAC1D,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,IAAI,CAAC,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC,KAAK,CAAC,CAAC;IAC1C,KAAK,CAAC,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC,KAAK,CAAC,CAAC;IAC3C,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,mBAAmB,CAAC,EAAE,KAAK,CAAC,YAAY,CAAC;IACzC,mBAAmB,CAAC,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC;IAClD,SAAS,CAAC,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC;IACxC,iBAAiB,CAAC,EAAE,WAAW,CAAC;IAChC,UAAU,CAAC,EAAE,KAAK,CAAC,cAAc,CAAC,MAAM,CAAC,CAAC;IAC1C,gBAAgB,CAAC,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC;IAC/C,mBAAmB,CAAC,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC;IAClD,UAAU,CAAC,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC;CAC1C;AAgHD,QAAA,MAAM,WAAW,oGAAyE,CAAC;AAI3F,OAAO,EAAE,WAAW,EAAE,KAAK,gBAAgB,EAAE,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type React from 'react';
|
|
2
|
+
import type { Opts } from 'linkifyjs';
|
|
3
|
+
interface LinkifyTextProps extends React.ComponentProps<'p'> {
|
|
4
|
+
text: string;
|
|
5
|
+
linkifyProps?: Opts;
|
|
6
|
+
}
|
|
7
|
+
declare const LinkifyText: React.NamedExoticComponent<Omit<LinkifyTextProps, "ref"> & React.RefAttributes<HTMLParagraphElement>>;
|
|
8
|
+
export { LinkifyText, type LinkifyTextProps };
|
|
9
|
+
//# sourceMappingURL=linkify-text.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"linkify-text.d.ts","sourceRoot":"","sources":["../../../src/components/linkify-text.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAUtC,UAAU,gBAAiB,SAAQ,KAAK,CAAC,cAAc,CAAC,GAAG,CAAC;IAC1D,IAAI,EAAE,MAAM,CAAC;IACb,YAAY,CAAC,EAAE,IAAI,CAAC;CACrB;AAsBD,QAAA,MAAM,WAAW,uGAA4E,CAAC;AAI9F,OAAO,EAAE,WAAW,EAAE,KAAK,gBAAgB,EAAE,CAAC"}
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import { type LucideProps } from 'lucide-react';
|
|
2
2
|
interface SpinnerProps extends LucideProps {
|
|
3
3
|
loading?: boolean;
|
|
4
|
+
type?: 'default' | 'circle';
|
|
5
|
+
layout?: 'absolute' | 'centered' | 'overlay' | 'flow';
|
|
4
6
|
}
|
|
5
|
-
declare function Spinner({ loading, ...props }: SpinnerProps): import("react/jsx-runtime").JSX.Element | null;
|
|
7
|
+
declare function Spinner({ loading, layout, type, ...props }: SpinnerProps): import("react/jsx-runtime").JSX.Element | null;
|
|
6
8
|
declare namespace Spinner {
|
|
7
9
|
var displayName: string;
|
|
8
10
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"spinner.d.ts","sourceRoot":"","sources":["../../../src/components/spinner.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"spinner.d.ts","sourceRoot":"","sources":["../../../src/components/spinner.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAwB,KAAK,WAAW,EAAE,MAAM,cAAc,CAAC;AAGtE,UAAU,YAAa,SAAQ,WAAW;IACxC,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,IAAI,CAAC,EAAE,SAAS,GAAG,QAAQ,CAAC;IAC5B,MAAM,CAAC,EAAE,UAAU,GAAG,UAAU,GAAG,SAAS,GAAG,MAAM,CAAC;CACvD;AAED,iBAAS,OAAO,CAAC,EAAE,OAAe,EAAE,MAAe,EAAE,IAAgB,EAAE,GAAG,KAAK,EAAE,EAAE,YAAY,kDA4B9F;kBA5BQ,OAAO;;;AAgChB,OAAO,EAAE,OAAO,EAAE,KAAK,YAAY,EAAE,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { type LucideProps } from 'lucide-react';
|
|
2
|
+
interface StatusSentProps extends LucideProps {
|
|
3
|
+
status?: 'wait' | 'sent' | 'read' | 'lost' | null | undefined;
|
|
4
|
+
}
|
|
5
|
+
declare const StatusSent: React.FC<StatusSentProps>;
|
|
6
|
+
export { StatusSent, type StatusSentProps };
|
|
7
|
+
//# sourceMappingURL=status-sent.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"status-sent.d.ts","sourceRoot":"","sources":["../../../src/components/status-sent.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAiC,KAAK,WAAW,EAAE,MAAM,cAAc,CAAC;AAG/E,UAAU,eAAgB,SAAQ,WAAW;IAC3C,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,GAAG,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;CAC/D;AAED,QAAA,MAAM,UAAU,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,CAazC,CAAC;AAIF,OAAO,EAAE,UAAU,EAAE,KAAK,eAAe,EAAE,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import * as SwitchPrimitive from '@radix-ui/react-switch';
|
|
3
|
+
type SwitchProps = React.ComponentProps<typeof SwitchPrimitive.Root>;
|
|
4
|
+
declare function Switch(props: SwitchProps): import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
export { Switch, type SwitchProps };
|
|
6
|
+
//# sourceMappingURL=switch.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"switch.d.ts","sourceRoot":"","sources":["../../../src/components/switch.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,eAAe,MAAM,wBAAwB,CAAC;AAG1D,KAAK,WAAW,GAAG,KAAK,CAAC,cAAc,CAAC,OAAO,eAAe,CAAC,IAAI,CAAC,CAAC;AAErE,iBAAS,MAAM,CAAC,KAAK,EAAE,WAAW,2CAgBjC;AAED,OAAO,EAAE,MAAM,EAAE,KAAK,WAAW,EAAE,CAAC"}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { type ClassValue } from 'clsx';
|
|
2
2
|
export declare function cn(...inputs: ClassValue[]): string;
|
|
3
3
|
export declare function getRandomString(length?: number): string;
|
|
4
|
-
export declare function getInitialsFromName(name?: string): string;
|
|
5
4
|
export declare function capitalize(str?: string): string;
|
|
6
5
|
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/components/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAQ,KAAK,UAAU,EAAE,MAAM,MAAM,CAAC;AAG7C,wBAAgB,EAAE,CAAC,GAAG,MAAM,EAAE,UAAU,EAAE,UAEzC;AAED,wBAAgB,eAAe,CAAC,MAAM,SAAI,GAAG,MAAM,CAElD;AAED,wBAAgB,
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/components/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAQ,KAAK,UAAU,EAAE,MAAM,MAAM,CAAC;AAG7C,wBAAgB,EAAE,CAAC,GAAG,MAAM,EAAE,UAAU,EAAE,UAEzC;AAED,wBAAgB,eAAe,CAAC,MAAM,SAAI,GAAG,MAAM,CAElD;AAED,wBAAgB,UAAU,CAAC,GAAG,CAAC,EAAE,MAAM,GAAG,MAAM,CAE/C"}
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,5 +1,22 @@
|
|
|
1
|
-
export {
|
|
2
|
-
export type
|
|
3
|
-
export {
|
|
4
|
-
export
|
|
1
|
+
export { Attachment, AttachmentLink, AttachmentImage, AttachmentAudio, AttachmentVideo, AttachmentFile, AttachmentFailed, type AttachmentProps, type AttachmentLinkProps, type AttachmentImageProps, type AttachmentAudioProps, type AttachmentVideoProps, type AttachmentFileProps, type AttachmentFailedProps, } from './components/attachment';
|
|
2
|
+
export { Avatar, type AvatarProps } from './components/avatar';
|
|
3
|
+
export { Badge, type BadgeProps } from './components/badge';
|
|
4
|
+
export { Button, type ButtonProps } from './components/button';
|
|
5
|
+
export { DialogItem, type DialogItemProps } from './components/dialog-item';
|
|
6
|
+
export { DismissLayer, type DismissLayerProps } from './components/dismiss-layer';
|
|
7
|
+
export { FilePickerInput, FilePickerDropzone, type FilePickerInputProps, type FilePickerDropzoneProps, } from './components/file-picker';
|
|
8
|
+
export { FormattedDate, type FormattedDateProps } from './components/formatted-date';
|
|
9
|
+
export { Input, type InputProps } from './components/input';
|
|
10
|
+
export { Label, type LabelProps } from './components/label';
|
|
11
|
+
export { LinkPreview, type LinkPreviewProps } from './components/link-preview';
|
|
12
|
+
export { LinkifyText, type LinkifyTextProps } from './components/linkify-text';
|
|
13
|
+
export { PlaceholderText, type PlaceholderTextProps } from './components/placeholder-text';
|
|
14
|
+
export { Presence, PresenceBadge, type PresenceStatus, type PresenceProps, type PresenceBadgeProps, } from './components/presence';
|
|
15
|
+
export { Search, type SearchProps } from './components/search';
|
|
16
|
+
export { Spinner, type SpinnerProps } from './components/spinner';
|
|
17
|
+
export { StatusIndicator, type StatusName, type StatusIndicatorProps } from './components/status-indicator';
|
|
18
|
+
export { StatusSent, type StatusSentProps } from './components/status-sent';
|
|
19
|
+
export { StreamView, LocalStreamView, RemoteStreamView, FullscreenStreamView, type StreamViewProps, type FullscreenStreamViewProps, type FullscreenStreamViewRef, } from './components/stream-view';
|
|
20
|
+
export { Switch, type SwitchProps } from './components/switch';
|
|
21
|
+
export * from './components/utils';
|
|
5
22
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,UAAU,EACV,cAAc,EACd,eAAe,EACf,eAAe,EACf,eAAe,EACf,cAAc,EACd,gBAAgB,EAChB,KAAK,eAAe,EACpB,KAAK,mBAAmB,EACxB,KAAK,oBAAoB,EACzB,KAAK,oBAAoB,EACzB,KAAK,oBAAoB,EACzB,KAAK,mBAAmB,EACxB,KAAK,qBAAqB,GAC3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AAM,+BAA+B,CAAC;AAE5G,OAAO,EAAE,UAAU,EAAE,KAAK,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAE5E,OAAO,EACL,UAAU,EACV,eAAe,EACf,gBAAgB,EAChB,oBAAoB,EACpB,KAAK,eAAe,EACpB,KAAK,yBAAyB,EAC9B,KAAK,uBAAuB,GAC7B,MAAM,0BAA0B,CAAC;AAElC,OAAO,EAAE,MAAM,EAAE,KAAK,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAE/D,cAAc,oBAAoB,CAAC"}
|
|
@@ -0,0 +1,214 @@
|
|
|
1
|
+
import { forwardRef, memo, useImperativeHandle, useRef, useState } from 'react';
|
|
2
|
+
import { File, FileXCorner } from 'lucide-react';
|
|
3
|
+
import { Spinner } from './spinner';
|
|
4
|
+
import { cn, getRandomString } from './utils';
|
|
5
|
+
|
|
6
|
+
function AttachmentLinkBase({ url, uploading = false, children, ...props }, ref) {
|
|
7
|
+
return (
|
|
8
|
+
<a
|
|
9
|
+
ref={ref}
|
|
10
|
+
target="_blank"
|
|
11
|
+
rel="noopener noreferrer"
|
|
12
|
+
{...props}
|
|
13
|
+
href={url}
|
|
14
|
+
className={cn(
|
|
15
|
+
'group relative min-h-12 min-w-12 w-full flex items-center justify-center rounded-md overflow-hidden bg-ring/10 hover:bg-ring/20 transition-color duration-300 ease-out cursor-pointer',
|
|
16
|
+
props?.className
|
|
17
|
+
)}
|
|
18
|
+
>
|
|
19
|
+
{children}
|
|
20
|
+
<Spinner loading={uploading} layout="overlay" />
|
|
21
|
+
</a>
|
|
22
|
+
);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
const AttachmentLink = forwardRef(AttachmentLinkBase);
|
|
26
|
+
|
|
27
|
+
AttachmentLink.displayName = 'AttachmentLink';
|
|
28
|
+
|
|
29
|
+
function AttachmentAudioBase({ uid, url, uploading = false, containerProps, ...props }, ref) {
|
|
30
|
+
const audioId = `attachment_audio_${uid || getRandomString()}`;
|
|
31
|
+
|
|
32
|
+
return (
|
|
33
|
+
<div
|
|
34
|
+
{...containerProps}
|
|
35
|
+
className={cn('relative min-h-12 min-w-12 w-full rounded-md overflow-hidden', containerProps?.className)}
|
|
36
|
+
>
|
|
37
|
+
<audio ref={ref} src={url} id={audioId} controls {...props} />
|
|
38
|
+
<Spinner loading={uploading} layout="overlay" />
|
|
39
|
+
</div>
|
|
40
|
+
);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
const AttachmentAudio = forwardRef(AttachmentAudioBase);
|
|
44
|
+
|
|
45
|
+
function AttachmentVideoBase(
|
|
46
|
+
{ uid, url, maxSize = 360, uploading = false, onReady = () => {}, containerProps, ...props },
|
|
47
|
+
ref
|
|
48
|
+
) {
|
|
49
|
+
const videoId = `attachment_video_${uid || getRandomString()}`;
|
|
50
|
+
const videoMaxSize = `${maxSize}px`;
|
|
51
|
+
const playerRef = useRef(null);
|
|
52
|
+
const [style, setStyle] = useState({
|
|
53
|
+
maxHeight: videoMaxSize,
|
|
54
|
+
maxWidth: videoMaxSize,
|
|
55
|
+
});
|
|
56
|
+
const handleCanPlay = (event) => {
|
|
57
|
+
const player = playerRef.current;
|
|
58
|
+
|
|
59
|
+
if (player) {
|
|
60
|
+
const { videoWidth, videoHeight } = player;
|
|
61
|
+
const ratio = videoWidth / videoHeight || 1;
|
|
62
|
+
const height = ratio < 1 ? videoMaxSize : `${Math.round(maxSize / ratio)}px`;
|
|
63
|
+
const width = ratio < 1 ? `${Math.round(maxSize * ratio)}px` : videoMaxSize;
|
|
64
|
+
|
|
65
|
+
setStyle({
|
|
66
|
+
height,
|
|
67
|
+
width,
|
|
68
|
+
maxHeight: height,
|
|
69
|
+
maxWidth: width,
|
|
70
|
+
});
|
|
71
|
+
props.onCanPlay?.(event);
|
|
72
|
+
onReady();
|
|
73
|
+
}
|
|
74
|
+
};
|
|
75
|
+
|
|
76
|
+
useImperativeHandle(ref, () => playerRef.current, []);
|
|
77
|
+
|
|
78
|
+
return (
|
|
79
|
+
<div
|
|
80
|
+
{...containerProps}
|
|
81
|
+
className={cn('relative min-h-20 w-full rounded-md overflow-hidden', containerProps?.className)}
|
|
82
|
+
>
|
|
83
|
+
<video
|
|
84
|
+
id={videoId}
|
|
85
|
+
ref={playerRef}
|
|
86
|
+
src={url}
|
|
87
|
+
controls
|
|
88
|
+
preload="metadata"
|
|
89
|
+
style={style}
|
|
90
|
+
{...props}
|
|
91
|
+
onCanPlay={handleCanPlay}
|
|
92
|
+
className={cn('size-full', props?.className)}
|
|
93
|
+
/>
|
|
94
|
+
<Spinner loading={uploading} layout="overlay" />
|
|
95
|
+
</div>
|
|
96
|
+
);
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
const AttachmentVideo = forwardRef(AttachmentVideoBase);
|
|
100
|
+
|
|
101
|
+
AttachmentVideo.displayName = 'AttachmentVideo';
|
|
102
|
+
|
|
103
|
+
function AttachmentImageBase({ uid, url, uploading = false, onReady = () => {}, linkProps, ...props }, ref) {
|
|
104
|
+
const imageId = `attachment_image_${uid || getRandomString()}`;
|
|
105
|
+
const handleLoad = (event) => {
|
|
106
|
+
props.onLoad?.(event);
|
|
107
|
+
onReady();
|
|
108
|
+
};
|
|
109
|
+
|
|
110
|
+
return (
|
|
111
|
+
<AttachmentLink href={url} uploading={uploading} {...linkProps}>
|
|
112
|
+
<img
|
|
113
|
+
ref={ref}
|
|
114
|
+
src={url}
|
|
115
|
+
id={imageId}
|
|
116
|
+
alt="attachment"
|
|
117
|
+
{...props}
|
|
118
|
+
className={cn(
|
|
119
|
+
'rounded-md object-cover min-h-12 min-w-12 max-h-[360px] group-hover:scale-103 transition-transform duration-300 ease-out',
|
|
120
|
+
props?.className
|
|
121
|
+
)}
|
|
122
|
+
onLoad={handleLoad}
|
|
123
|
+
/>
|
|
124
|
+
</AttachmentLink>
|
|
125
|
+
);
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
const AttachmentImage = forwardRef(AttachmentImageBase);
|
|
129
|
+
|
|
130
|
+
AttachmentImage.displayName = 'AttachmentImage';
|
|
131
|
+
|
|
132
|
+
function AttachmentFile({ url, name, uploading = false, iconElement, linkProps, ...props }) {
|
|
133
|
+
const fileId = `attachment_file_${props.id || getRandomString()}`;
|
|
134
|
+
|
|
135
|
+
return (
|
|
136
|
+
<AttachmentLink
|
|
137
|
+
href={url}
|
|
138
|
+
uploading={uploading}
|
|
139
|
+
{...linkProps}
|
|
140
|
+
className={cn('flex-row gap-2 px-2', linkProps?.className)}
|
|
141
|
+
>
|
|
142
|
+
{iconElement || (
|
|
143
|
+
<File
|
|
144
|
+
id={fileId}
|
|
145
|
+
{...props}
|
|
146
|
+
className={cn(
|
|
147
|
+
'size-6 shrink-0 text-foreground/85 group-hover:text-foreground duration-300 ease-out',
|
|
148
|
+
props?.className
|
|
149
|
+
)}
|
|
150
|
+
/>
|
|
151
|
+
)}
|
|
152
|
+
{name && (
|
|
153
|
+
<span className="font-medium line-clamp-1 break-all text-foreground/85 group-hover:text-foreground duration-300 ease-out">
|
|
154
|
+
{name}
|
|
155
|
+
</span>
|
|
156
|
+
)}
|
|
157
|
+
</AttachmentLink>
|
|
158
|
+
);
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
AttachmentFile.displayName = 'AttachmentFile';
|
|
162
|
+
|
|
163
|
+
function AttachmentFailed({ name = 'Unknown file', uploading = false, iconElement, containerProps, ...props }) {
|
|
164
|
+
const failedId = `attachment_failed_${props.id || getRandomString()}`;
|
|
165
|
+
|
|
166
|
+
return (
|
|
167
|
+
<div
|
|
168
|
+
{...containerProps}
|
|
169
|
+
className={cn(
|
|
170
|
+
'relative min-h-12 min-w-12 w-full flex flex-row items-center justify-center gap-2 px-2 bg-red-600/10 rounded-md overflow-hidden',
|
|
171
|
+
containerProps?.className
|
|
172
|
+
)}
|
|
173
|
+
>
|
|
174
|
+
{iconElement || (
|
|
175
|
+
<FileXCorner id={failedId} {...props} className={cn('size-6 shrink-0 text-red-600', props?.className)} />
|
|
176
|
+
)}
|
|
177
|
+
<span className="font-medium line-clamp-1 break-all text-red-600">{name}</span>
|
|
178
|
+
<Spinner loading={uploading} layout="overlay" />
|
|
179
|
+
</div>
|
|
180
|
+
);
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
AttachmentFailed.displayName = 'AttachmentFailed';
|
|
184
|
+
|
|
185
|
+
function AttachmentBase({ mimeType, ...props }) {
|
|
186
|
+
const [type = ''] = mimeType?.split('/') || [];
|
|
187
|
+
|
|
188
|
+
if (!props.url) {
|
|
189
|
+
return <AttachmentFailed {...props} />;
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
switch (type) {
|
|
193
|
+
case 'image':
|
|
194
|
+
return <AttachmentImage {...props} />;
|
|
195
|
+
case 'video':
|
|
196
|
+
return <AttachmentVideo {...props} />;
|
|
197
|
+
case 'audio':
|
|
198
|
+
return <AttachmentAudio {...props} />;
|
|
199
|
+
default:
|
|
200
|
+
return <AttachmentFile name={mimeType} {...props} />;
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
const Attachment = memo(AttachmentBase);
|
|
205
|
+
|
|
206
|
+
export {
|
|
207
|
+
Attachment,
|
|
208
|
+
AttachmentLink,
|
|
209
|
+
AttachmentImage,
|
|
210
|
+
AttachmentAudio,
|
|
211
|
+
AttachmentVideo,
|
|
212
|
+
AttachmentFile,
|
|
213
|
+
AttachmentFailed,
|
|
214
|
+
};
|
|
@@ -1,7 +1,14 @@
|
|
|
1
1
|
import { memo, forwardRef } from 'react';
|
|
2
2
|
import * as AvatarPrimitive from '@radix-ui/react-avatar';
|
|
3
3
|
import { PresenceBadge } from './presence';
|
|
4
|
-
import { cn
|
|
4
|
+
import { cn } from './utils';
|
|
5
|
+
|
|
6
|
+
function getInitialsFromName(name) {
|
|
7
|
+
const words = name?.trim().split(/\s+/).filter(Boolean) ?? [];
|
|
8
|
+
const result = words.length > 1 ? `${words[0]?.[0]}${words[1]?.[0]}` : (words[0]?.slice(0, 2) ?? 'NA');
|
|
9
|
+
|
|
10
|
+
return result.toUpperCase();
|
|
11
|
+
}
|
|
5
12
|
|
|
6
13
|
function AvatarBase(
|
|
7
14
|
{ src, name = 'NA', online, presence, className, onlineProps, presenceProps, imageProps, fallbackProps, ...props },
|
|
@@ -25,13 +32,16 @@ function AvatarBase(
|
|
|
25
32
|
{online && (
|
|
26
33
|
<div
|
|
27
34
|
{...onlineProps}
|
|
28
|
-
className={cn(
|
|
35
|
+
className={cn(
|
|
36
|
+
'absolute top-0 right-0 rounded-full border-2 bg-green-600 border-green-200 size-3.5',
|
|
37
|
+
onlineProps?.className
|
|
38
|
+
)}
|
|
29
39
|
/>
|
|
30
40
|
)}
|
|
31
41
|
<PresenceBadge
|
|
32
42
|
status={presence}
|
|
33
43
|
{...presenceProps}
|
|
34
|
-
className={cn('absolute
|
|
44
|
+
className={cn('absolute bottom-0 right-0', presenceProps?.className)}
|
|
35
45
|
/>
|
|
36
46
|
</AvatarPrimitive.Root>
|
|
37
47
|
);
|
package/gen/components/badge.jsx
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { forwardRef } from 'react';
|
|
2
|
-
import
|
|
2
|
+
import { Slot } from '@radix-ui/react-slot';
|
|
3
3
|
import { cva } from 'class-variance-authority';
|
|
4
4
|
import { cn } from './utils';
|
|
5
5
|
|
|
@@ -22,18 +22,18 @@ const badgeVariants = cva(
|
|
|
22
22
|
);
|
|
23
23
|
|
|
24
24
|
function BadgeBase({ className, variant, asChild = false, ...props }, ref) {
|
|
25
|
-
const Comp = asChild ?
|
|
25
|
+
const Comp = asChild ? Slot : 'span';
|
|
26
26
|
|
|
27
27
|
return (
|
|
28
28
|
<Comp
|
|
29
29
|
ref={ref}
|
|
30
|
+
{...props}
|
|
30
31
|
className={cn(
|
|
31
32
|
badgeVariants({
|
|
32
33
|
variant,
|
|
33
34
|
}),
|
|
34
35
|
className
|
|
35
36
|
)}
|
|
36
|
-
{...props}
|
|
37
37
|
/>
|
|
38
38
|
);
|
|
39
39
|
}
|