@connectycube/react-ui-kit 0.0.15 → 0.0.17

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.
Files changed (59) hide show
  1. package/configs/dependencies.json +17 -2
  2. package/configs/imports.json +9 -2
  3. package/dist/index.cjs +5 -5
  4. package/dist/index.cjs.map +1 -1
  5. package/dist/index.js +9 -9
  6. package/dist/index.js.map +1 -1
  7. package/dist/types/components/alert-dialog.d.ts +28 -0
  8. package/dist/types/components/alert-dialog.d.ts.map +1 -0
  9. package/dist/types/components/avatar.d.ts +2 -1
  10. package/dist/types/components/avatar.d.ts.map +1 -1
  11. package/dist/types/components/badge.d.ts +11 -0
  12. package/dist/types/components/badge.d.ts.map +1 -0
  13. package/dist/types/components/button.d.ts +12 -0
  14. package/dist/types/components/button.d.ts.map +1 -0
  15. package/dist/types/components/dismiss-layer.d.ts +2 -1
  16. package/dist/types/components/dismiss-layer.d.ts.map +1 -1
  17. package/dist/types/components/input.d.ts +5 -0
  18. package/dist/types/components/input.d.ts.map +1 -0
  19. package/dist/types/components/placeholder-text.d.ts +2 -1
  20. package/dist/types/components/placeholder-text.d.ts.map +1 -1
  21. package/dist/types/components/presence.d.ts +9 -4
  22. package/dist/types/components/presence.d.ts.map +1 -1
  23. package/dist/types/components/search.d.ts +15 -0
  24. package/dist/types/components/search.d.ts.map +1 -0
  25. package/dist/types/components/spinner.d.ts +10 -0
  26. package/dist/types/components/spinner.d.ts.map +1 -0
  27. package/dist/types/components/status-indicator.d.ts +2 -1
  28. package/dist/types/components/status-indicator.d.ts.map +1 -1
  29. package/dist/types/components/stream-view.d.ts +5 -4
  30. package/dist/types/components/stream-view.d.ts.map +1 -1
  31. package/gen/components/alert-dialog.jsx +94 -0
  32. package/gen/components/avatar.jsx +2 -2
  33. package/gen/components/badge.jsx +45 -0
  34. package/gen/components/button.jsx +57 -0
  35. package/gen/components/dismiss-layer.jsx +2 -2
  36. package/gen/components/input.jsx +23 -0
  37. package/gen/components/placeholder-text.jsx +3 -2
  38. package/gen/components/presence.jsx +2 -7
  39. package/gen/components/search.jsx +75 -0
  40. package/gen/components/spinner.jsx +12 -0
  41. package/gen/components/status-indicator.jsx +2 -2
  42. package/package.json +5 -2
  43. package/src/components/alert-dialog.tsx +118 -0
  44. package/src/components/avatar.tsx +4 -3
  45. package/src/components/badge.tsx +42 -0
  46. package/src/components/button.tsx +58 -0
  47. package/src/components/dismiss-layer.tsx +4 -3
  48. package/src/components/input.tsx +26 -0
  49. package/src/components/placeholder-text.tsx +4 -3
  50. package/src/components/presence.tsx +3 -7
  51. package/src/components/search.tsx +86 -0
  52. package/src/components/spinner.tsx +16 -0
  53. package/src/components/status-indicator.tsx +4 -3
  54. package/src/components/stream-view.tsx +5 -4
  55. package/dist/tsconfig.tsbuildinfo +0 -1
  56. package/dist/types/components/animated-loader.d.ts +0 -10
  57. package/dist/types/components/animated-loader.d.ts.map +0 -1
  58. package/gen/components/animated-loader.jsx +0 -12
  59. package/src/components/animated-loader.tsx +0 -16
@@ -0,0 +1,28 @@
1
+ import type React from 'react';
2
+ import * as AlertDialogPrimitive from '@radix-ui/react-alert-dialog';
3
+ import { type ButtonProps } from './button';
4
+ interface AlertDialogProps extends AlertDialogPrimitive.AlertDialogProps {
5
+ title?: string;
6
+ description?: string;
7
+ cancelTitle?: string;
8
+ actionTitle?: string;
9
+ onCancel?: () => void;
10
+ onConfirm?: () => void;
11
+ rootProps?: AlertDialogPrimitive.AlertDialogProps;
12
+ triggerElement: React.ReactElement;
13
+ triggerProps?: AlertDialogPrimitive.AlertDialogTriggerProps;
14
+ portalProps?: AlertDialogPrimitive.AlertDialogPortalProps;
15
+ overlayProps?: AlertDialogPrimitive.AlertDialogOverlayProps;
16
+ contentProps?: AlertDialogPrimitive.AlertDialogContentProps;
17
+ headerProps?: React.ComponentProps<'div'>;
18
+ titleProps?: AlertDialogPrimitive.AlertDialogTitleProps;
19
+ descriptionProps?: AlertDialogPrimitive.AlertDialogDescriptionProps;
20
+ footerProps?: React.ComponentProps<'div'>;
21
+ cancelProps?: AlertDialogPrimitive.AlertDialogCancelProps;
22
+ cancelButtonProps?: ButtonProps;
23
+ actionProps?: AlertDialogPrimitive.AlertDialogActionProps;
24
+ actionButtonProps?: ButtonProps;
25
+ }
26
+ declare const AlertDialog: React.ForwardRefExoticComponent<AlertDialogProps & React.RefAttributes<HTMLDivElement>>;
27
+ export { AlertDialog, type AlertDialogProps };
28
+ //# sourceMappingURL=alert-dialog.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"alert-dialog.d.ts","sourceRoot":"","sources":["../../../src/components/alert-dialog.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,oBAAoB,MAAM,8BAA8B,CAAC;AACrE,OAAO,EAAU,KAAK,WAAW,EAAE,MAAM,UAAU,CAAC;AAGpD,UAAU,gBAAiB,SAAQ,oBAAoB,CAAC,gBAAgB;IACtE,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;IACtB,SAAS,CAAC,EAAE,MAAM,IAAI,CAAC;IACvB,SAAS,CAAC,EAAE,oBAAoB,CAAC,gBAAgB,CAAC;IAClD,cAAc,EAAE,KAAK,CAAC,YAAY,CAAC;IACnC,YAAY,CAAC,EAAE,oBAAoB,CAAC,uBAAuB,CAAC;IAC5D,WAAW,CAAC,EAAE,oBAAoB,CAAC,sBAAsB,CAAC;IAC1D,YAAY,CAAC,EAAE,oBAAoB,CAAC,uBAAuB,CAAC;IAC5D,YAAY,CAAC,EAAE,oBAAoB,CAAC,uBAAuB,CAAC;IAC5D,WAAW,CAAC,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC;IAC1C,UAAU,CAAC,EAAE,oBAAoB,CAAC,qBAAqB,CAAC;IACxD,gBAAgB,CAAC,EAAE,oBAAoB,CAAC,2BAA2B,CAAC;IACpE,WAAW,CAAC,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC;IAC1C,WAAW,CAAC,EAAE,oBAAoB,CAAC,sBAAsB,CAAC;IAC1D,iBAAiB,CAAC,EAAE,WAAW,CAAC;IAChC,WAAW,CAAC,EAAE,oBAAoB,CAAC,sBAAsB,CAAC;IAC1D,iBAAiB,CAAC,EAAE,WAAW,CAAC;CACjC;AAsFD,QAAA,MAAM,WAAW,yFAAgE,CAAC;AAIlF,OAAO,EAAE,WAAW,EAAE,KAAK,gBAAgB,EAAE,CAAC"}
@@ -1,3 +1,4 @@
1
+ import type React from 'react';
1
2
  import * as AvatarPrimitive from '@radix-ui/react-avatar';
2
3
  import { type PresenceStatus, type PresenceBadgeProps } from './presence';
3
4
  interface AvatarProps extends AvatarPrimitive.AvatarProps {
@@ -10,6 +11,6 @@ interface AvatarProps extends AvatarPrimitive.AvatarProps {
10
11
  imageProps?: AvatarPrimitive.AvatarImageProps;
11
12
  fallbackProps?: AvatarPrimitive.AvatarFallbackProps;
12
13
  }
13
- declare const Avatar: import("react").NamedExoticComponent<AvatarProps & import("react").RefAttributes<HTMLDivElement>>;
14
+ declare const Avatar: React.NamedExoticComponent<AvatarProps & React.RefAttributes<HTMLDivElement>>;
14
15
  export { Avatar, type AvatarProps };
15
16
  //# sourceMappingURL=avatar.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"avatar.d.ts","sourceRoot":"","sources":["../../../src/components/avatar.tsx"],"names":[],"mappings":"AACA,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;IACb,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,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;AA+CD,QAAA,MAAM,MAAM,mGAA4D,CAAC;AAIzE,OAAO,EAAE,MAAM,EAAE,KAAK,WAAW,EAAE,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,CAAC;IACb,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,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;AA+CD,QAAA,MAAM,MAAM,+EAA4D,CAAC;AAIzE,OAAO,EAAE,MAAM,EAAE,KAAK,WAAW,EAAE,CAAC"}
@@ -0,0 +1,11 @@
1
+ import type React from 'react';
2
+ import { type VariantProps } from 'class-variance-authority';
3
+ interface BadgeProps extends React.HTMLAttributes<HTMLDivElement>, VariantProps<typeof badgeVariants> {
4
+ asChild?: boolean;
5
+ }
6
+ declare const badgeVariants: (props?: ({
7
+ variant?: "default" | "destructive" | "outline" | "secondary" | null | undefined;
8
+ } & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
9
+ declare const Badge: React.ForwardRefExoticComponent<BadgeProps & React.RefAttributes<HTMLSpanElement>>;
10
+ export { Badge, type BadgeProps };
11
+ //# sourceMappingURL=badge.d.ts.map
@@ -0,0 +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,cAAc,CAAC,EAAE,YAAY,CAAC,OAAO,aAAa,CAAC;IACnG,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,QAAA,MAAM,aAAa;;mFAgBlB,CAAC;AAWF,QAAA,MAAM,KAAK,oFAAqD,CAAC;AAIjE,OAAO,EAAE,KAAK,EAAE,KAAK,UAAU,EAAE,CAAC"}
@@ -0,0 +1,12 @@
1
+ import type React from 'react';
2
+ import { type VariantProps } from 'class-variance-authority';
3
+ interface ButtonProps extends React.ComponentProps<'button'>, VariantProps<typeof buttonVariants> {
4
+ asChild?: boolean;
5
+ }
6
+ declare const buttonVariants: (props?: ({
7
+ variant?: "link" | "default" | "destructive" | "outline" | "secondary" | "ghost" | null | undefined;
8
+ size?: "default" | "sm" | "lg" | "icon" | null | undefined;
9
+ } & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
10
+ declare const Button: React.ForwardRefExoticComponent<Omit<ButtonProps, "ref"> & React.RefAttributes<HTMLButtonElement>>;
11
+ export { Button, type ButtonProps };
12
+ //# sourceMappingURL=button.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"button.d.ts","sourceRoot":"","sources":["../../../src/components/button.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAGlE,UAAU,WAAY,SAAQ,KAAK,CAAC,cAAc,CAAC,QAAQ,CAAC,EAAE,YAAY,CAAC,OAAO,cAAc,CAAC;IAC/F,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,QAAA,MAAM,cAAc;;;mFA0BnB,CAAC;AAiBF,QAAA,MAAM,MAAM,oGAAyD,CAAC;AAItE,OAAO,EAAE,MAAM,EAAE,KAAK,WAAW,EAAE,CAAC"}
@@ -1,3 +1,4 @@
1
+ import type React from 'react';
1
2
  interface DismissLayerProps extends React.ComponentProps<'div'> {
2
3
  active: boolean;
3
4
  onDismiss: () => void;
@@ -5,6 +6,6 @@ interface DismissLayerProps extends React.ComponentProps<'div'> {
5
6
  disableEscKeyPress?: boolean;
6
7
  disabled?: boolean;
7
8
  }
8
- declare const DismissLayer: import("react").NamedExoticComponent<Omit<DismissLayerProps, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
9
+ declare const DismissLayer: React.ForwardRefExoticComponent<Omit<DismissLayerProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
9
10
  export { DismissLayer, type DismissLayerProps };
10
11
  //# sourceMappingURL=dismiss-layer.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"dismiss-layer.d.ts","sourceRoot":"","sources":["../../../src/components/dismiss-layer.tsx"],"names":[],"mappings":"AAGA,UAAU,iBAAkB,SAAQ,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC;IAC7D,MAAM,EAAE,OAAO,CAAC;IAChB,SAAS,EAAE,MAAM,IAAI,CAAC;IACtB,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAmDD,QAAA,MAAM,YAAY,sHAAwE,CAAC;AAI3F,OAAO,EAAE,YAAY,EAAE,KAAK,iBAAiB,EAAE,CAAC"}
1
+ {"version":3,"file":"dismiss-layer.d.ts","sourceRoot":"","sources":["../../../src/components/dismiss-layer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,UAAU,iBAAkB,SAAQ,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC;IAC7D,MAAM,EAAE,OAAO,CAAC;IAChB,SAAS,EAAE,MAAM,IAAI,CAAC;IACtB,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAmDD,QAAA,MAAM,YAAY,uGAAkE,CAAC;AAIrF,OAAO,EAAE,YAAY,EAAE,KAAK,iBAAiB,EAAE,CAAC"}
@@ -0,0 +1,5 @@
1
+ import type React from 'react';
2
+ type InputProps = React.ComponentProps<'input'>;
3
+ declare const Input: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "ref"> & React.RefAttributes<HTMLInputElement>>;
4
+ export { Input, type InputProps };
5
+ //# sourceMappingURL=input.d.ts.map
@@ -0,0 +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,8KAAwB,CAAC;AAIpC,OAAO,EAAE,KAAK,EAAE,KAAK,UAAU,EAAE,CAAC"}
@@ -1,8 +1,9 @@
1
+ import * as React from 'react';
1
2
  interface PlaceholderTextProps extends React.ComponentProps<'div'> {
2
3
  title?: string;
3
4
  titles?: string[];
4
5
  rowProps?: React.ComponentProps<'div'>;
5
6
  }
6
- declare const PlaceholderText: import("react").NamedExoticComponent<Omit<PlaceholderTextProps, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
7
+ declare const PlaceholderText: React.ForwardRefExoticComponent<Omit<PlaceholderTextProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
7
8
  export { PlaceholderText, type PlaceholderTextProps };
8
9
  //# sourceMappingURL=placeholder-text.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"placeholder-text.d.ts","sourceRoot":"","sources":["../../../src/components/placeholder-text.tsx"],"names":[],"mappings":"AAGA,UAAU,oBAAqB,SAAQ,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC;IAChE,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;IAClB,QAAQ,CAAC,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC;CACxC;AAuBD,QAAA,MAAM,eAAe,yHAAwC,CAAC;AAI9D,OAAO,EAAE,eAAe,EAAE,KAAK,oBAAoB,EAAE,CAAC"}
1
+ {"version":3,"file":"placeholder-text.d.ts","sourceRoot":"","sources":["../../../src/components/placeholder-text.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,UAAU,oBAAqB,SAAQ,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC;IAChE,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;IAClB,QAAQ,CAAC,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC;CACxC;AAuBD,QAAA,MAAM,eAAe,0GAAkC,CAAC;AAIxD,OAAO,EAAE,eAAe,EAAE,KAAK,oBAAoB,EAAE,CAAC"}
@@ -1,3 +1,4 @@
1
+ import type React from 'react';
1
2
  type PresenceStatus = 'available' | 'busy' | 'away' | 'unknown' | undefined;
2
3
  interface PresenceProps extends React.ComponentProps<'div'> {
3
4
  badge?: boolean;
@@ -9,9 +10,13 @@ interface PresenceProps extends React.ComponentProps<'div'> {
9
10
  interface PresenceBadgeProps extends React.ComponentProps<'svg'> {
10
11
  status?: PresenceStatus;
11
12
  }
12
- declare function PresenceBadgeBase({ status, ...props }: PresenceBadgeProps): import("react/jsx-runtime").JSX.Element | null;
13
- declare const PresenceBadge: import("react").MemoExoticComponent<typeof PresenceBadgeBase>;
14
- declare function PresenceBase({ badge, status, label, badgeProps, labelProps, ...props }: PresenceProps): import("react/jsx-runtime").JSX.Element;
15
- declare const Presence: import("react").MemoExoticComponent<typeof PresenceBase>;
13
+ declare function PresenceBadge({ status, ...props }: PresenceBadgeProps): import("react/jsx-runtime").JSX.Element | null;
14
+ declare namespace PresenceBadge {
15
+ var displayName: string;
16
+ }
17
+ declare function Presence({ badge, status, label, badgeProps, labelProps, ...props }: PresenceProps): import("react/jsx-runtime").JSX.Element;
18
+ declare namespace Presence {
19
+ var displayName: string;
20
+ }
16
21
  export { Presence, PresenceBadge, type PresenceStatus, type PresenceProps, type PresenceBadgeProps };
17
22
  //# sourceMappingURL=presence.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"presence.d.ts","sourceRoot":"","sources":["../../../src/components/presence.tsx"],"names":[],"mappings":"AAGA,KAAK,cAAc,GAAG,WAAW,GAAG,MAAM,GAAG,MAAM,GAAG,SAAS,GAAG,SAAS,CAAC;AAE5E,UAAU,aAAc,SAAQ,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC;IACzD,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,MAAM,EAAE,cAAc,CAAC;IACvB,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,CAAC,EAAE,kBAAkB,CAAC;IAChC,UAAU,CAAC,EAAE,KAAK,CAAC,cAAc,CAAC,MAAM,CAAC,CAAC;CAC3C;AAED,UAAU,kBAAmB,SAAQ,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC;IAC9D,MAAM,CAAC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CASjG;kBATQ,QAAQ;;;AAajB,OAAO,EAAE,QAAQ,EAAE,aAAa,EAAE,KAAK,cAAc,EAAE,KAAK,aAAa,EAAE,KAAK,kBAAkB,EAAE,CAAC"}
@@ -0,0 +1,15 @@
1
+ import type React from 'react';
2
+ import { type InputProps } from './input';
3
+ import { type LucideProps } from 'lucide-react';
4
+ interface SearchProps extends InputProps {
5
+ onSearch?: (value: string) => void;
6
+ onCancel?: () => void;
7
+ hasSearchIcon?: boolean;
8
+ hasCancelIcon?: boolean;
9
+ searchIconProps?: LucideProps;
10
+ cancelIconProps?: LucideProps;
11
+ containerProps?: React.ComponentProps<'div'>;
12
+ }
13
+ declare const Search: React.ForwardRefExoticComponent<Omit<SearchProps, "ref"> & React.RefAttributes<HTMLInputElement>>;
14
+ export { Search, type SearchProps };
15
+ //# sourceMappingURL=search.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"search.d.ts","sourceRoot":"","sources":["../../../src/components/search.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,EAAS,KAAK,UAAU,EAAE,MAAM,SAAS,CAAC;AACjD,OAAO,EAAwC,KAAK,WAAW,EAAE,MAAM,cAAc,CAAC;AAEtF,UAAU,WAAY,SAAQ,UAAU;IACtC,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACnC,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;IACtB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,eAAe,CAAC,EAAE,WAAW,CAAC;IAC9B,eAAe,CAAC,EAAE,WAAW,CAAC;IAC9B,cAAc,CAAC,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC;CAC9C;AAmED,QAAA,MAAM,MAAM,mGAAwD,CAAC;AAIrE,OAAO,EAAE,MAAM,EAAE,KAAK,WAAW,EAAE,CAAC"}
@@ -0,0 +1,10 @@
1
+ import { type LucideProps } from 'lucide-react';
2
+ interface SpinnerProps extends LucideProps {
3
+ loading?: boolean;
4
+ }
5
+ declare function Spinner({ loading, ...props }: SpinnerProps): import("react/jsx-runtime").JSX.Element | null;
6
+ declare namespace Spinner {
7
+ var displayName: string;
8
+ }
9
+ export { Spinner, type SpinnerProps };
10
+ //# sourceMappingURL=spinner.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"spinner.d.ts","sourceRoot":"","sources":["../../../src/components/spinner.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAgB,KAAK,WAAW,EAAE,MAAM,cAAc,CAAC;AAG9D,UAAU,YAAa,SAAQ,WAAW;IACxC,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,iBAAS,OAAO,CAAC,EAAE,OAAc,EAAE,GAAG,KAAK,EAAE,EAAE,YAAY,kDAI1D;kBAJQ,OAAO;;;AAQhB,OAAO,EAAE,OAAO,EAAE,KAAK,YAAY,EAAE,CAAC"}
@@ -1,3 +1,4 @@
1
+ import type React from 'react';
1
2
  import * as TooltipPrimitive from '@radix-ui/react-tooltip';
2
3
  type StatusName = string | 'unknown';
3
4
  interface StatusIndicatorProps extends React.ComponentProps<'div'> {
@@ -14,6 +15,6 @@ interface StatusIndicatorProps extends React.ComponentProps<'div'> {
14
15
  disabled?: boolean;
15
16
  className?: string;
16
17
  }
17
- declare const StatusIndicator: import("react").NamedExoticComponent<Omit<StatusIndicatorProps, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
18
+ declare const StatusIndicator: React.ForwardRefExoticComponent<Omit<StatusIndicatorProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
18
19
  export { StatusIndicator, type StatusName, type StatusIndicatorProps };
19
20
  //# sourceMappingURL=status-indicator.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"status-indicator.d.ts","sourceRoot":"","sources":["../../../src/components/status-indicator.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,gBAAg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,UAAU,EAAE,MAAM,CAAC,CAAC;IAC/C,WAAW,CAAC,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC;IAC1C,oBAAoB,CAAC,EAAE,gBAAgB,CAAC,oBAAoB,CAAC;IAC7D,YAAY,CAAC,EAAE,gBAAgB,CAAC,YAAY,CAAC;IAC7C,mBAAmB,CAAC,EAAE,gBAAgB,CAAC,mBAAmB,CAAC;IAC3D,kBAAkB,CAAC,EAAE,gBAAgB,CAAC,kBAAkB,CAAC;IACzD,mBAAmB,CAAC,EAAE,gBAAgB,CAAC,mBAAmB,CAAC;IAC3D,iBAAiB,CAAC,EAAE,gBAAgB,CAAC,iBAAiB,CAAC;IACvD,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AA4DD,QAAA,MAAM,eAAe,0GAAkC,CAAC;AAIxD,OAAO,EAAE,eAAe,EAAE,KAAK,UAAU,EAAE,KAAK,oBAAoB,EAAE,CAAC"}
@@ -1,11 +1,12 @@
1
+ import type React from 'react';
1
2
  import { type LucideProps } from 'lucide-react';
2
3
  interface StreamViewProps extends React.ComponentProps<'video'> {
3
4
  stream?: MediaStream | null;
4
5
  mirror?: boolean;
5
6
  }
6
- declare const StreamView: import("react").ForwardRefExoticComponent<Omit<StreamViewProps, "ref"> & import("react").RefAttributes<HTMLVideoElement>>;
7
- declare const LocalStreamView: import("react").ForwardRefExoticComponent<Omit<StreamViewProps, "ref"> & import("react").RefAttributes<HTMLVideoElement>>;
8
- declare const RemoteStreamView: import("react").ForwardRefExoticComponent<Omit<StreamViewProps, "ref"> & import("react").RefAttributes<HTMLVideoElement>>;
7
+ declare const StreamView: React.ForwardRefExoticComponent<Omit<StreamViewProps, "ref"> & React.RefAttributes<HTMLVideoElement>>;
8
+ declare const LocalStreamView: React.ForwardRefExoticComponent<Omit<StreamViewProps, "ref"> & React.RefAttributes<HTMLVideoElement>>;
9
+ declare const RemoteStreamView: React.ForwardRefExoticComponent<Omit<StreamViewProps, "ref"> & React.RefAttributes<HTMLVideoElement>>;
9
10
  interface FullscreenStreamViewProps extends React.ComponentProps<'div'> {
10
11
  element: React.ReactElement<StreamViewProps>;
11
12
  pipElement?: React.ReactElement<StreamViewProps>;
@@ -25,6 +26,6 @@ interface FullscreenStreamViewRef extends React.ComponentRef<'div'> {
25
26
  toggleFullscreen: () => Promise<void>;
26
27
  togglePictureInPicture: () => void;
27
28
  }
28
- declare const FullscreenStreamView: import("react").ForwardRefExoticComponent<Omit<FullscreenStreamViewProps, "ref"> & import("react").RefAttributes<FullscreenStreamViewRef>>;
29
+ declare const FullscreenStreamView: React.ForwardRefExoticComponent<Omit<FullscreenStreamViewProps, "ref"> & React.RefAttributes<FullscreenStreamViewRef>>;
29
30
  export { StreamView, LocalStreamView, RemoteStreamView, FullscreenStreamView, type StreamViewProps, type FullscreenStreamViewProps, type FullscreenStreamViewRef, };
30
31
  //# sourceMappingURL=stream-view.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"stream-view.d.ts","sourceRoot":"","sources":["../../../src/components/stream-view.tsx"],"names":[],"mappings":"AACA,OAAO,EAAyC,KAAK,WAAW,EAAE,MAAM,cAAc,CAAC;AAGvF,UAAU,eAAgB,SAAQ,KAAK,CAAC,cAAc,CAAC,OAAO,CAAC;IAC7D,MAAM,CAAC,EAAE,WAAW,GAAG,IAAI,CAAC;IAC5B,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB;AA+CD,QAAA,MAAM,UAAU,2HAAgE,CAAC;AAWjF,QAAA,MAAM,eAAe,2HAAqE,CAAC;AAW3F,QAAA,MAAM,gBAAgB,2HAAsE,CAAC;AAI7F,UAAU,yBAA0B,SAAQ,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC;IACrE,OAAO,EAAE,KAAK,CAAC,YAAY,CAAC,eAAe,CAAC,CAAC;IAC7C,UAAU,CAAC,EAAE,KAAK,CAAC,YA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Ae,EACpB,KAAK,yBAAyB,EAC9B,KAAK,uBAAuB,GAC7B,CAAC"}
@@ -0,0 +1,94 @@
1
+ import { forwardRef } from 'react';
2
+ import * as AlertDialogPrimitive from '@radix-ui/react-alert-dialog';
3
+ import { Button } from './button';
4
+ import { cn } from './utils';
5
+
6
+ function AlertDialogBase(
7
+ {
8
+ title = '',
9
+ description = '',
10
+ cancelTitle = 'Cancel',
11
+ actionTitle = 'Confirm',
12
+ onCancel = () => {},
13
+ onConfirm = () => {},
14
+ rootProps,
15
+ triggerElement,
16
+ triggerProps,
17
+ portalProps,
18
+ overlayProps,
19
+ contentProps,
20
+ headerProps,
21
+ titleProps,
22
+ descriptionProps,
23
+ footerProps,
24
+ cancelProps,
25
+ cancelButtonProps,
26
+ actionProps,
27
+ actionButtonProps,
28
+ ...props
29
+ },
30
+ ref
31
+ ) {
32
+ return (
33
+ <div ref={ref} {...props}>
34
+ <AlertDialogPrimitive.Root {...rootProps}>
35
+ <AlertDialogPrimitive.Trigger asChild {...triggerProps}>
36
+ {triggerElement}
37
+ </AlertDialogPrimitive.Trigger>
38
+ <AlertDialogPrimitive.Portal {...portalProps}>
39
+ <AlertDialogPrimitive.Overlay
40
+ {...overlayProps}
41
+ className={cn(
42
+ 'data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50',
43
+ overlayProps?.className
44
+ )}
45
+ />
46
+ <AlertDialogPrimitive.Content
47
+ {...contentProps}
48
+ className={cn(
49
+ 'bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2em)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 sm:max-w-lg',
50
+ contentProps?.className
51
+ )}
52
+ >
53
+ <div
54
+ {...headerProps}
55
+ className={cn('flex flex-col gap-2 text-center sm:text-left', headerProps?.className)}
56
+ >
57
+ <AlertDialogPrimitive.Title
58
+ {...titleProps}
59
+ className={cn('text-lg font-semibold', titleProps?.className)}
60
+ >
61
+ {title}
62
+ </AlertDialogPrimitive.Title>
63
+ <AlertDialogPrimitive.Description
64
+ {...descriptionProps}
65
+ className={cn('text-muted-foreground text-sm', descriptionProps?.className)}
66
+ >
67
+ {description}
68
+ </AlertDialogPrimitive.Description>
69
+ </div>
70
+ <div
71
+ {...footerProps}
72
+ className={cn('flex flex-col-reverse gap-2 sm:flex-row sm:justify-end', footerProps?.className)}
73
+ >
74
+ <AlertDialogPrimitive.Cancel {...cancelProps} onClick={onCancel}>
75
+ <Button variant="outline" {...cancelButtonProps}>
76
+ {cancelTitle}
77
+ </Button>
78
+ </AlertDialogPrimitive.Cancel>
79
+ <AlertDialogPrimitive.Action {...actionProps} onClick={onConfirm}>
80
+ <Button {...actionButtonProps}>{actionTitle}</Button>
81
+ </AlertDialogPrimitive.Action>
82
+ </div>
83
+ </AlertDialogPrimitive.Content>
84
+ </AlertDialogPrimitive.Portal>
85
+ </AlertDialogPrimitive.Root>
86
+ </div>
87
+ );
88
+ }
89
+
90
+ const AlertDialog = forwardRef(AlertDialogBase);
91
+
92
+ AlertDialog.displayName = 'AlertDialog';
93
+
94
+ export { AlertDialog };
@@ -1,4 +1,4 @@
1
- import { forwardRef, memo } from 'react';
1
+ import { memo, forwardRef } from 'react';
2
2
  import * as AvatarPrimitive from '@radix-ui/react-avatar';
3
3
  import { PresenceBadge } from './presence';
4
4
  import { cn, getInitialsFromName } from './utils';
@@ -18,7 +18,7 @@ function AvatarBase(
18
18
  />
19
19
  <AvatarPrimitive.Fallback
20
20
  {...fallbackProps}
21
- className={cn('bg-muted flex size-full items-center justify-center', fallbackProps?.className)}
21
+ className={cn('bg-muted size-full rounded-full flex items-center justify-center', fallbackProps?.className)}
22
22
  >
23
23
  {initials}
24
24
  </AvatarPrimitive.Fallback>
@@ -0,0 +1,45 @@
1
+ import { forwardRef } from 'react';
2
+ import * as SlotPrimitive from '@radix-ui/react-slot';
3
+ import { cva } from 'class-variance-authority';
4
+ import { cn } from './utils';
5
+
6
+ const badgeVariants = cva(
7
+ 'inline-flex items-center justify-center rounded-md border px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden',
8
+ {
9
+ variants: {
10
+ variant: {
11
+ default: 'border-transparent bg-primary text-primary-foreground [a&]:hover:bg-primary/90',
12
+ secondary: 'border-transparent bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90',
13
+ destructive:
14
+ 'border-transparent bg-destructive text-white [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60',
15
+ outline: 'text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground',
16
+ },
17
+ },
18
+ defaultVariants: {
19
+ variant: 'default',
20
+ },
21
+ }
22
+ );
23
+
24
+ function BadgeBase({ className, variant, asChild = false, ...props }, ref) {
25
+ const Comp = asChild ? SlotPrimitive.Root : 'span';
26
+
27
+ return (
28
+ <Comp
29
+ ref={ref}
30
+ className={cn(
31
+ badgeVariants({
32
+ variant,
33
+ }),
34
+ className
35
+ )}
36
+ {...props}
37
+ />
38
+ );
39
+ }
40
+
41
+ const Badge = forwardRef(BadgeBase);
42
+
43
+ Badge.displayName = 'Badge';
44
+
45
+ export { Badge };
@@ -0,0 +1,57 @@
1
+ import { forwardRef } from 'react';
2
+ import * as SlotPrimitive from '@radix-ui/react-slot';
3
+ import { cva } from 'class-variance-authority';
4
+ import { cn } from './utils';
5
+
6
+ const buttonVariants = cva(
7
+ 'inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*=size-])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive',
8
+ {
9
+ variants: {
10
+ variant: {
11
+ default: 'bg-primary text-primary-foreground shadow-xs hover:bg-primary/90',
12
+ destructive:
13
+ 'bg-destructive text-white shadow-xs hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60',
14
+ outline:
15
+ 'border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50',
16
+ secondary: 'bg-secondary text-secondary-foreground shadow-xs hover:bg-secondary/80',
17
+ ghost: 'hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50',
18
+ link: 'text-primary underline-offset-4 hover:underline',
19
+ },
20
+ size: {
21
+ default: 'h-9 px-4 py-2 has-[>svg]:px-3',
22
+ sm: 'h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5',
23
+ lg: 'h-10 rounded-md px-6 has-[>svg]:px-4',
24
+ icon: 'size-9',
25
+ },
26
+ },
27
+ defaultVariants: {
28
+ variant: 'default',
29
+ size: 'default',
30
+ },
31
+ }
32
+ );
33
+
34
+ function ButtonBase({ asChild = false, variant, size, className, ...props }, ref) {
35
+ const Comp = asChild ? SlotPrimitive.Root : 'button';
36
+
37
+ return (
38
+ <Comp
39
+ ref={ref}
40
+ {...props}
41
+ className={cn(
42
+ buttonVariants({
43
+ variant,
44
+ size,
45
+ className,
46
+ }),
47
+ 'transition-all ease-in-out duration-300'
48
+ )}
49
+ />
50
+ );
51
+ }
52
+
53
+ const Button = forwardRef(ButtonBase);
54
+
55
+ Button.displayName = 'Button';
56
+
57
+ export { Button };
@@ -1,4 +1,4 @@
1
- import { useCallback, useEffect, useRef, useImperativeHandle, memo, forwardRef } from 'react';
1
+ import { useCallback, useEffect, useRef, useImperativeHandle, forwardRef } from 'react';
2
2
  import { cn } from './utils';
3
3
 
4
4
  function DismissLayerBase(
@@ -50,7 +50,7 @@ function DismissLayerBase(
50
50
  );
51
51
  }
52
52
 
53
- const DismissLayer = memo(forwardRef(DismissLayerBase));
53
+ const DismissLayer = forwardRef(DismissLayerBase);
54
54
 
55
55
  DismissLayer.displayName = 'DismissLayer';
56
56
 
@@ -0,0 +1,23 @@
1
+ import { forwardRef } from 'react';
2
+ import { cn } from './utils';
3
+
4
+ function InputBase(props, ref) {
5
+ return (
6
+ <input
7
+ ref={ref}
8
+ {...props}
9
+ className={cn(
10
+ 'file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input flex h-10 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm',
11
+ 'focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring',
12
+ 'aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive',
13
+ props?.className
14
+ )}
15
+ />
16
+ );
17
+ }
18
+
19
+ const Input = forwardRef(InputBase);
20
+
21
+ Input.displayName = 'Input';
22
+
23
+ export { Input };
@@ -1,4 +1,5 @@
1
- import { forwardRef, memo } from 'react';
1
+ import * as React from 'react';
2
+ import { forwardRef } from 'react';
2
3
  import { cn } from './utils';
3
4
 
4
5
  function PlaceholderTextBase({ title, titles = [], rowProps, ...props }, ref) {
@@ -19,7 +20,7 @@ function PlaceholderTextBase({ title, titles = [], rowProps, ...props }, ref) {
19
20
  );
20
21
  }
21
22
 
22
- const PlaceholderText = memo(forwardRef(PlaceholderTextBase));
23
+ const PlaceholderText = forwardRef(PlaceholderTextBase);
23
24
 
24
25
  PlaceholderText.displayName = 'PlaceholderText';
25
26
 
@@ -1,7 +1,6 @@
1
- import { memo } from 'react';
2
1
  import { capitalize, cn } from './utils';
3
2
 
4
- function PresenceBadgeBase({ status, ...props }) {
3
+ function PresenceBadge({ status, ...props }) {
5
4
  switch (status) {
6
5
  case 'available':
7
6
  return (
@@ -64,11 +63,9 @@ function PresenceBadgeBase({ status, ...props }) {
64
63
  }
65
64
  }
66
65
 
67
- const PresenceBadge = memo(PresenceBadgeBase);
68
-
69
66
  PresenceBadge.displayName = 'PresenceBadge';
70
67
 
71
- function PresenceBase({ badge = true, status, label, badgeProps, labelProps, ...props }) {
68
+ function Presence({ badge = true, status, label, badgeProps, labelProps, ...props }) {
72
69
  const presence = capitalize(label || status);
73
70
 
74
71
  return (
@@ -79,8 +76,6 @@ function PresenceBase({ badge = true, status, label, badgeProps, labelProps, ...
79
76
  );
80
77
  }
81
78
 
82
- const Presence = memo(PresenceBase);
83
-
84
79
  Presence.displayName = 'Presence';
85
80
 
86
81
  export { Presence, PresenceBadge };