@schemavaults/ui 0.14.8 → 0.14.10

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.
@@ -0,0 +1,38 @@
1
+ import * as AvatarPrimitive from "@radix-ui/react-avatar";
2
+ import { type VariantProps } from "class-variance-authority";
3
+ import type { ComponentProps, ReactElement } from "react";
4
+ export declare const avatarSizeIds: ["xs", "sm", "default", "lg", "xl"];
5
+ export type AvatarSizeId = (typeof avatarSizeIds)[number];
6
+ export declare const avatarShapeIds: ["circle", "square"];
7
+ export type AvatarShapeId = (typeof avatarShapeIds)[number];
8
+ export declare const avatarVariants: (props?: ({
9
+ size?: "xs" | "sm" | "default" | "lg" | "xl" | null | undefined;
10
+ shape?: "circle" | "square" | null | undefined;
11
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
12
+ export interface AvatarProps extends ComponentProps<typeof AvatarPrimitive.Root>, VariantProps<typeof avatarVariants> {
13
+ }
14
+ declare function Avatar({ className, size, shape, ...props }: AvatarProps): ReactElement;
15
+ declare namespace Avatar {
16
+ var displayName: string;
17
+ }
18
+ export interface AvatarImageProps extends ComponentProps<typeof AvatarPrimitive.Image> {
19
+ }
20
+ declare function AvatarImage({ className, ...props }: AvatarImageProps): ReactElement;
21
+ declare namespace AvatarImage {
22
+ var displayName: string;
23
+ }
24
+ export interface AvatarFallbackProps extends ComponentProps<typeof AvatarPrimitive.Fallback> {
25
+ }
26
+ declare function AvatarFallback({ className, ...props }: AvatarFallbackProps): ReactElement;
27
+ declare namespace AvatarFallback {
28
+ var displayName: string;
29
+ }
30
+ export interface AvatarGroupProps extends ComponentProps<"div"> {
31
+ /** Maximum number of avatars to show before the +N overflow */
32
+ max?: number;
33
+ }
34
+ declare function AvatarGroup({ className, max, children, ...props }: AvatarGroupProps): ReactElement;
35
+ declare namespace AvatarGroup {
36
+ var displayName: string;
37
+ }
38
+ export { Avatar, AvatarImage, AvatarFallback, AvatarGroup };
@@ -0,0 +1,47 @@
1
+ "use client";
2
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import * as AvatarPrimitive from "@radix-ui/react-avatar";
4
+ import { cva } from "class-variance-authority";
5
+ import { cn } from "../../../lib/utils";
6
+ export const avatarSizeIds = ["xs", "sm", "default", "lg", "xl"];
7
+ export const avatarShapeIds = ["circle", "square"];
8
+ export const avatarVariants = cva("relative flex shrink-0 overflow-hidden", {
9
+ variants: {
10
+ size: {
11
+ xs: "h-6 w-6 text-xs",
12
+ sm: "h-8 w-8 text-xs",
13
+ default: "h-10 w-10 text-sm",
14
+ lg: "h-12 w-12 text-base",
15
+ xl: "h-16 w-16 text-lg",
16
+ },
17
+ shape: {
18
+ circle: "rounded-full",
19
+ square: "rounded-md",
20
+ },
21
+ },
22
+ defaultVariants: {
23
+ size: "default",
24
+ shape: "circle",
25
+ },
26
+ });
27
+ function Avatar({ className, size, shape, ...props }) {
28
+ return (_jsx(AvatarPrimitive.Root, { className: cn(avatarVariants({ size, shape, className })), ...props }));
29
+ }
30
+ Avatar.displayName = "Avatar";
31
+ function AvatarImage({ className, ...props }) {
32
+ return (_jsx(AvatarPrimitive.Image, { className: cn("aspect-square h-full w-full object-cover", className), ...props }));
33
+ }
34
+ AvatarImage.displayName = "AvatarImage";
35
+ function AvatarFallback({ className, ...props }) {
36
+ return (_jsx(AvatarPrimitive.Fallback, { className: cn("flex h-full w-full items-center justify-center bg-muted font-medium text-muted-foreground", className), ...props }));
37
+ }
38
+ AvatarFallback.displayName = "AvatarFallback";
39
+ function AvatarGroup({ className, max, children, ...props }) {
40
+ const childArray = Array.isArray(children) ? children : [children];
41
+ const visibleChildren = max ? childArray.slice(0, max) : childArray;
42
+ const overflowCount = max ? childArray.length - max : 0;
43
+ return (_jsxs("div", { className: cn("flex -space-x-3", className), ...props, children: [visibleChildren.map((child, index) => (_jsx("div", { className: "ring-2 ring-background rounded-full", children: child }, index))), overflowCount > 0 && (_jsx("div", { className: "ring-2 ring-background rounded-full", children: _jsxs("div", { className: "flex h-10 w-10 items-center justify-center rounded-full bg-muted text-sm font-medium text-muted-foreground", children: ["+", overflowCount] }) }))] }));
44
+ }
45
+ AvatarGroup.displayName = "AvatarGroup";
46
+ export { Avatar, AvatarImage, AvatarFallback, AvatarGroup };
47
+ //# sourceMappingURL=avatar.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"avatar.js","sourceRoot":"","sources":["../../../../src/components/ui/avatar/avatar.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,KAAK,eAAe,MAAM,wBAAwB,CAAC;AAC1D,OAAO,EAAE,GAAG,EAAqB,MAAM,0BAA0B,CAAC;AAElE,OAAO,EAAE,EAAE,EAAE,MAAM,aAAa,CAAC;AAGjC,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,IAAI,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,IAAI,CAA6B,CAAC;AAG7F,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,QAAQ,EAAE,QAAQ,CAA6B,CAAC;AAG/E,MAAM,CAAC,MAAM,cAAc,GAAG,GAAG,CAC/B,wCAAwC,EACxC;IACE,QAAQ,EAAE;QACR,IAAI,EAAE;YACJ,EAAE,EAAE,iBAAiB;YACrB,EAAE,EAAE,iBAAiB;YACrB,OAAO,EAAE,mBAAmB;YAC5B,EAAE,EAAE,qBAAqB;YACzB,EAAE,EAAE,mBAAmB;SACe;QACxC,KAAK,EAAE;YACL,MAAM,EAAE,cAAc;YACtB,MAAM,EAAE,YAAY;SACmB;KAC1C;IACD,eAAe,EAAE;QACf,IAAI,EAAE,SAAS;QACf,KAAK,EAAE,QAAQ;KAChB;CACF,CACF,CAAC;AAMF,SAAS,MAAM,CAAC,EACd,SAAS,EACT,IAAI,EACJ,KAAK,EACL,GAAG,KAAK,EACI;IACZ,OAAO,CACL,KAAC,eAAe,CAAC,IAAI,IACnB,SAAS,EAAE,EAAE,CAAC,cAAc,CAAC,EAAE,IAAI,EAAE,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,YAC7D,KAAK,IADE,KAAK,CAET,CACP,CAAC,EACD,aAAa,GAAG,CAAC,IAAI,CACpB,cAAK,SAAS,EAAC,qCAAqC,YAClD,eAAK,SAAS,EAAC,4GAA4G,kBACvH,aAAa,IACX,GACF,CACP,IACG,CACP,CAAC;AACJ,CAAC;AACD,WAAW,CAAC,WAAW,GAAG,aAAa,CAAC;AAExC,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,cAAc,EAAE,WAAW,EAAE,CAAC"}
@@ -0,0 +1,3 @@
1
+ export { Avatar, AvatarImage, AvatarFallback, AvatarGroup, avatarVariants } from "./avatar";
2
+ export type * from "./avatar";
3
+ export { Avatar as default } from "./avatar";
@@ -0,0 +1,3 @@
1
+ export { Avatar, AvatarImage, AvatarFallback, AvatarGroup, avatarVariants } from "./avatar";
2
+ export { Avatar as default } from "./avatar";
3
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/ui/avatar/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,cAAc,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAE5F,OAAO,EAAE,MAAM,IAAI,OAAO,EAAE,MAAM,UAAU,CAAC"}
@@ -3,8 +3,8 @@ import type { ReactElement, ButtonHTMLAttributes } from "react";
3
3
  export declare const buttonVariantIds: ["default", "destructive", "outline", "secondary", "ghost", "link"];
4
4
  export type ButtonVariantId = (typeof buttonVariantIds)[number];
5
5
  export declare const buttonVariants: (props?: ({
6
- variant?: "default" | "ghost" | "link" | "destructive" | "secondary" | "outline" | null | undefined;
7
- size?: "default" | "sm" | "lg" | "icon" | null | undefined;
6
+ variant?: "default" | "link" | "ghost" | "destructive" | "secondary" | "outline" | null | undefined;
7
+ size?: "sm" | "default" | "lg" | "icon" | null | undefined;
8
8
  } & import("class-variance-authority/types").ClassProp) | undefined) => string;
9
9
  export interface ButtonProps extends ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {
10
10
  asChild?: boolean;
@@ -1,3 +1,5 @@
1
+ export * from "./avatar";
2
+ export type * from "./avatar";
1
3
  export * from "./accordion";
2
4
  export type * from "./accordion";
3
5
  export * from "./alert";
@@ -1,3 +1,4 @@
1
+ export * from "./avatar";
1
2
  export * from "./accordion";
2
3
  export * from "./alert";
3
4
  export * from "./badge";
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/ui/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAG5B,cAAc,SAAS,CAAC;AAGxB,cAAc,SAAS,CAAC;AAGxB,cAAc,mBAAmB,CAAC;AAGlC,cAAc,0BAA0B,CAAC;AAGzC,cAAc,UAAU,CAAC;AAGzB,cAAc,SAAS,CAAC;AAGxB,cAAc,kBAAkB,CAAC;AAGjC,cAAc,cAAc,CAAC;AAG7B,cAAc,SAAS,CAAC;AAGxB,cAAc,SAAS,CAAC;AAExB,cAAc,WAAW,CAAC;AAG1B,cAAc,YAAY,CAAC;AAG3B,cAAc,QAAQ,CAAC;AAGvB,cAAc,QAAQ,CAAC;AAGvB,cAAc,aAAa,CAAC;AAG5B,cAAc,iBAAiB,CAAC;AAGhC,cAAc,WAAW,CAAC;AAG1B,cAAc,mBAAmB,CAAC;AAGlC,cAAc,UAAU,CAAC;AAGzB,cAAc,WAAW,CAAC;AAG1B,cAAc,WAAW,CAAC;AAG1B,cAAc,SAAS,CAAC;AAGxB,cAAc,aAAa,CAAC;AAG5B,cAAc,YAAY,CAAC;AAG3B,cAAc,YAAY,CAAC;AAG3B,cAAc,cAAc,CAAC;AAG7B,cAAc,eAAe,CAAC;AAG9B,cAAc,YAAY,CAAC;AAG3B,cAAc,2BAA2B,CAAC;AAG1C,cAAc,kBAAkB,CAAC;AAGjC,cAAc,gBAAgB,CAAC;AAG/B,cAAc,eAAe,CAAC;AAG9B,cAAc,WAAW,CAAC;AAG1B,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;AAGjC,cAAc,gBAAgB,CAAC;AAG/B,cAAc,eAAe,CAAC;AAG9B,cAAc,WAAW,CAAC;AAG1B,cAAc,gBAAgB,CAAC;AAG/B,cAAc,cAAc,CAAC;AAG7B,cAAc,SAAS,CAAC;AAGxB,cAAc,UAAU,CAAC;AAGzB,cAAc,eAAe,CAAC;AAG9B,cAAc,qBAAqB,CAAC;AAGpC,cAAc,oBAAoB,CAAC;AAGnC,cAAc,mBAAmB,CAAC;AAGlC,cAAc,QAAQ,CAAC;AAGvB,cAAc,QAAQ,CAAC;AAGvB,cAAc,UAAU,CAAC;AAGzB,cAAc,UAAU,CAAC;AAGzB,cAAc,gBAAgB,CAAC"}
@@ -1,7 +1,7 @@
1
1
  import { type VariantProps } from "class-variance-authority";
2
2
  import type { ReactElement, HTMLAttributes } from "react";
3
3
  export declare const progressBarVariants: (props?: ({
4
- size?: "default" | "sm" | "lg" | null | undefined;
4
+ size?: "sm" | "default" | "lg" | null | undefined;
5
5
  } & import("class-variance-authority/types").ClassProp) | undefined) => string;
6
6
  export declare const progressBarSizeIds: readonly ["sm", "default", "lg"];
7
7
  export type ProgressBarSizeId = (typeof progressBarSizeIds)[number];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@schemavaults/ui",
3
- "version": "0.14.8",
3
+ "version": "0.14.10",
4
4
  "private": false,
5
5
  "license": "UNLICENSED",
6
6
  "description": "React.js UI components for SchemaVaults frontend applications",
@@ -12,6 +12,7 @@
12
12
  "@emotion/is-prop-valid": "1.4.0",
13
13
  "@hookform/resolvers": "3.9.0",
14
14
  "@radix-ui/react-accordion": "1.2.12",
15
+ "@radix-ui/react-avatar": "^1.1.11",
15
16
  "@radix-ui/react-checkbox": "1.3.2",
16
17
  "@radix-ui/react-context-menu": "2.2.15",
17
18
  "@radix-ui/react-dialog": "1.1.14",