@jamsrui/avatar 0.0.12 → 0.0.13

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 (56) hide show
  1. package/dist/avatar-config.d.mts +6 -6
  2. package/dist/avatar-config.mjs +1 -1
  3. package/dist/avatar-context.mjs +1 -0
  4. package/dist/{primitive/avatar-fallback.d.mts → avatar-fallback.d.mts} +1 -0
  5. package/dist/avatar-fallback.mjs +1 -0
  6. package/dist/avatar-image.mjs +1 -0
  7. package/dist/avatar-indicator.mjs +1 -0
  8. package/dist/{primitive/avatar-root.d.mts → avatar-root.d.mts} +1 -1
  9. package/dist/avatar-root.mjs +1 -0
  10. package/dist/avatar.d.mts +6 -8
  11. package/dist/avatar.mjs +1 -1
  12. package/dist/chunk-7LHVHVMT.mjs +1 -0
  13. package/dist/chunk-FL77FLGY.mjs +1 -0
  14. package/dist/chunk-NBSCA4JY.mjs +1 -0
  15. package/dist/chunk-NNG4ZIGT.mjs +1 -0
  16. package/dist/chunk-TFVXTTJW.mjs +1 -0
  17. package/dist/chunk-VC4JML7B.mjs +1 -0
  18. package/dist/chunk-WWG32IWR.mjs +1 -0
  19. package/dist/index.d.mts +28 -8
  20. package/dist/index.mjs +1 -1
  21. package/dist/{primitive/styles.d.mts → styles.d.mts} +15 -0
  22. package/dist/styles.mjs +1 -0
  23. package/dist/use-avatar.d.mts +21 -0
  24. package/dist/use-avatar.mjs +1 -0
  25. package/dist/{chunk-UN72ATNQ.mjs → utils.mjs} +1 -1
  26. package/package.json +6 -6
  27. package/dist/chunk-46DDRBZC.mjs +0 -1
  28. package/dist/chunk-5Q2ZPY6B.mjs +0 -1
  29. package/dist/chunk-67MYTGCN.mjs +0 -1
  30. package/dist/chunk-6ZPYWJDS.mjs +0 -1
  31. package/dist/chunk-7ZBPIMY4.mjs +0 -1
  32. package/dist/chunk-J3FSRIIV.mjs +0 -0
  33. package/dist/chunk-NNHCRYDX.mjs +0 -1
  34. package/dist/chunk-TJU5GERX.mjs +0 -1
  35. package/dist/chunk-XCPN2D5N.mjs +0 -1
  36. package/dist/chunk-ZRKDZ3US.mjs +0 -1
  37. package/dist/primitive/avatar-config.d.mts +0 -22
  38. package/dist/primitive/avatar-config.mjs +0 -1
  39. package/dist/primitive/avatar-context.mjs +0 -1
  40. package/dist/primitive/avatar-fallback.mjs +0 -1
  41. package/dist/primitive/avatar-image.mjs +0 -1
  42. package/dist/primitive/avatar-indicator.mjs +0 -1
  43. package/dist/primitive/avatar-root.mjs +0 -1
  44. package/dist/primitive/avatar.d.mts +0 -16
  45. package/dist/primitive/avatar.mjs +0 -1
  46. package/dist/primitive/index.d.mts +0 -13
  47. package/dist/primitive/index.mjs +0 -1
  48. package/dist/primitive/styles.mjs +0 -1
  49. package/dist/primitive/use-avatar.d.mts +0 -27
  50. package/dist/primitive/use-avatar.mjs +0 -1
  51. package/dist/primitive/utils.mjs +0 -1
  52. /package/dist/{primitive/avatar-context.d.mts → avatar-context.d.mts} +0 -0
  53. /package/dist/{primitive/avatar-image.d.mts → avatar-image.d.mts} +0 -0
  54. /package/dist/{primitive/avatar-indicator.d.mts → avatar-indicator.d.mts} +0 -0
  55. /package/dist/{chunk-UBGMEQ6Q.mjs → chunk-66YE63BY.mjs} +0 -0
  56. /package/dist/{primitive/utils.d.mts → utils.d.mts} +0 -0
@@ -1,13 +1,13 @@
1
- import { Avatar } from './avatar.mjs';
2
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
3
2
  import { GlobalConfigProps } from '@jamsrui/core';
4
- import './primitive/use-avatar.mjs';
3
+ import { Avatar } from './avatar.mjs';
4
+ import './use-avatar.mjs';
5
5
  import '@jamsrui/utils';
6
- import './primitive/avatar-fallback.mjs';
6
+ import './avatar-fallback.mjs';
7
7
  import 'react';
8
- import './primitive/avatar-image.mjs';
9
- import './primitive/avatar-root.mjs';
10
- import './primitive/styles.mjs';
8
+ import './avatar-image.mjs';
9
+ import './avatar-root.mjs';
10
+ import './styles.mjs';
11
11
 
12
12
  declare const useAvatarConfig: () => AvatarConfig.Props;
13
13
  declare const AvatarConfig: (props: Omit<Partial<AvatarConfig.Props>, "children"> & {
@@ -1 +1 @@
1
- import{a,b}from"./chunk-GXVNM3CJ.mjs";export{a as AvatarConfig,b as useAvatarConfig};
1
+ "use client";import{a,b}from"./chunk-GXVNM3CJ.mjs";export{a as AvatarConfig,b as useAvatarConfig};
@@ -0,0 +1 @@
1
+ "use client";import{a,b}from"./chunk-66YE63BY.mjs";export{a as AvatarContext,b as useAvatarContext};
@@ -4,6 +4,7 @@ import { UIProps } from '@jamsrui/utils';
4
4
  declare const AvatarFallback: (props: AvatarFallback.Props) => react.ReactElement<unknown, string | react.JSXElementConstructor<any>> | null;
5
5
  declare namespace AvatarFallback {
6
6
  interface Props extends UIProps<"div"> {
7
+ delayMs?: number;
7
8
  }
8
9
  }
9
10
 
@@ -0,0 +1 @@
1
+ "use client";import{a}from"./chunk-VC4JML7B.mjs";import"./chunk-66YE63BY.mjs";export{a as AvatarFallback};
@@ -0,0 +1 @@
1
+ "use client";import{a}from"./chunk-NNG4ZIGT.mjs";import"./chunk-66YE63BY.mjs";export{a as AvatarImage};
@@ -0,0 +1 @@
1
+ "use client";import{a}from"./chunk-FL77FLGY.mjs";import"./chunk-66YE63BY.mjs";export{a as AvatarIndicator};
@@ -1,7 +1,7 @@
1
1
  import * as react from 'react';
2
2
  import { UIProps } from '@jamsrui/utils';
3
3
 
4
- declare const AvatarRoot: (props: AvatarRoot.Props) => react.ReactElement<unknown, string | react.JSXElementConstructor<any>>;
4
+ declare const AvatarRoot: (_props: AvatarRoot.Props) => react.ReactElement<unknown, string | react.JSXElementConstructor<any>>;
5
5
  declare namespace AvatarRoot {
6
6
  interface Props extends UIProps<"div"> {
7
7
  }
@@ -0,0 +1 @@
1
+ "use client";import{a}from"./chunk-TFVXTTJW.mjs";import"./chunk-66YE63BY.mjs";export{a as AvatarRoot};
package/dist/avatar.d.mts CHANGED
@@ -1,17 +1,15 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import { useAvatar } from './primitive/use-avatar.mjs';
3
- import { SlotsToReactNode } from '@jamsrui/utils';
4
- import { AvatarSlots } from './primitive/styles.mjs';
5
- import './primitive/avatar-fallback.mjs';
2
+ import { useAvatar } from './use-avatar.mjs';
3
+ import '@jamsrui/utils';
4
+ import './avatar-fallback.mjs';
6
5
  import 'react';
7
- import './primitive/avatar-image.mjs';
8
- import './primitive/avatar-root.mjs';
6
+ import './avatar-image.mjs';
7
+ import './avatar-root.mjs';
8
+ import './styles.mjs';
9
9
 
10
10
  declare const Avatar: (props: Avatar.Props) => react_jsx_runtime.JSX.Element;
11
11
  declare namespace Avatar {
12
12
  interface Props extends useAvatar.Props {
13
- slots?: SlotsToReactNode<AvatarSlots>;
14
- indicator?: React.ReactNode;
15
13
  }
16
14
  }
17
15
 
package/dist/avatar.mjs CHANGED
@@ -1 +1 @@
1
- import{a}from"./chunk-7ZBPIMY4.mjs";import"./chunk-J3FSRIIV.mjs";import"./chunk-6ZPYWJDS.mjs";import"./chunk-ZRKDZ3US.mjs";import"./chunk-5Q2ZPY6B.mjs";import"./chunk-TJU5GERX.mjs";import"./chunk-UN72ATNQ.mjs";import"./chunk-GXVNM3CJ.mjs";import"./chunk-XCPN2D5N.mjs";import"./chunk-NNHCRYDX.mjs";import"./chunk-46DDRBZC.mjs";import"./chunk-67MYTGCN.mjs";import"./chunk-UBGMEQ6Q.mjs";export{a as Avatar};
1
+ "use client";import{a}from"./chunk-WWG32IWR.mjs";import"./chunk-NBSCA4JY.mjs";import"./chunk-7LHVHVMT.mjs";import"./chunk-GXVNM3CJ.mjs";import"./chunk-TFVXTTJW.mjs";import"./chunk-66YE63BY.mjs";export{a as Avatar};
@@ -0,0 +1 @@
1
+ import{radiusVariant as r,tv as t}from"@jamsrui/utils";var a=t({slots:{root:"relative cursor-default group shrink-0 rounded-full bg-surface object-cover [&>img]:size-full [&>img]:object-cover",img:"select-none group-data-[status=idle]:hidden group-data-[status=loading]:hidden rounded-inherit",fallback:"absolute inset-0 flex items-center justify-center font-medium",indicator:"absolute -bottom-2 -right-1 size-6 flex justify-center items-center"},variants:{size:{xs:{root:"size-6",fallback:"text-xs"},sm:{root:"size-8",fallback:"text-sm"},md:{root:"size-10",fallback:"text-base"},lg:{root:"size-12",fallback:"text-lg"},xl:{root:"size-16",fallback:"text-xl"}},color:{default:{root:"bg-default text-default-foreground ring-default"},primary:{root:"bg-primary text-primary-foreground ring-primary"},secondary:{root:"bg-secondary text-secondary-foreground ring-secondary"},success:{root:"bg-success text-success-foreground ring-success"},warning:{root:"bg-warning text-warning-foreground ring-warning"},danger:{root:"bg-danger text-danger-foreground ring-danger"}},isBordered:{true:{root:"ring-2"},false:{root:"border-transparent"}},radius:r("root")},defaultVariants:{bordered:!1,size:"md",color:"default",radius:"full"}});export{a};
@@ -0,0 +1 @@
1
+ import{b as r}from"./chunk-66YE63BY.mjs";import{useRenderElement as o}from"@jamsrui/hooks";var p=e=>{let{getIndicatorProps:t}=r();return o("div",{props:[t(e)]})};export{p as a};
@@ -0,0 +1 @@
1
+ import{a as m}from"./chunk-7LHVHVMT.mjs";import{useCallback as o,useLayoutEffect as N,useMemo as y,useRef as b,useState as k}from"react";import{dataAttrDev as r,mapPropsVariants as I}from"@jamsrui/utils";var E=l=>{let[P,c]=I(l,m.variantKeys),{...n}=P,[s,e]=k("idle"),A=c.color??"default",i=b(null),t=m({...c,color:A}),p=o(()=>{e("error")},[e]),d=o(()=>{e("loaded")},[e]),u=o(()=>({...n,"data-slot":r("root"),"data-component":r("avatar"),"data-status":r(s),className:t.root({className:l.className})}),[n,l.className,s,t]);N(()=>{let a=i.current;a?.complete?a.naturalWidth===0?e("error"):e("loaded"):e("loading")},[]);let v=o(a=>({...a,ref:i,"data-slot":r("img"),onError:p,onLoad:d,className:t.img({className:a.className})}),[p,d,t]),f=o(a=>({...a,"data-slot":r("fallback"),className:t.fallback({className:a.className})}),[t]),g=o(a=>({...a,"data-slot":r("indicator"),className:t.indicator({className:a.className})}),[t]);return y(()=>({getRootProps:u,getImgProps:v,getFallbackProps:f,getIndicatorProps:g,status:s}),[f,v,g,u,s])};export{E as a};
@@ -0,0 +1 @@
1
+ import{b as r}from"./chunk-66YE63BY.mjs";import{useRenderElement as a}from"@jamsrui/hooks";var p=e=>{let{getImgProps:t,status:o}=r(),s=a("img",{props:[t(e)]});return o==="error"?null:s};export{p as a};
@@ -0,0 +1 @@
1
+ import{b as e}from"./chunk-66YE63BY.mjs";import{useRenderElement as t}from"@jamsrui/hooks";var a=o=>{let{getRootProps:r}=e();return t("div",{props:[r()]})};export{a};
@@ -0,0 +1 @@
1
+ import{b as e}from"./chunk-66YE63BY.mjs";import{useRenderElement as u}from"@jamsrui/hooks";import{AvatarIcon as i}from"@jamsrui/icons";import{useEffect as d,useState as f}from"react";import{jsx as b}from"react/jsx-runtime";var A=r=>{let{delayMs:t=0,children:o=b(i,{}),...a}=r,{getFallbackProps:s,status:l}=e(),[n,c]=f(t===0);d(()=>{let m=setTimeout(()=>{c(!0)},t);return()=>clearTimeout(m)},[t]);let p=u("div",{props:[s(a),{children:o}]});return l==="loaded"||!n?null:p};export{A as a};
@@ -0,0 +1 @@
1
+ import{a as n}from"./chunk-NBSCA4JY.mjs";import{b as r}from"./chunk-GXVNM3CJ.mjs";import{a as e}from"./chunk-TFVXTTJW.mjs";import{a}from"./chunk-66YE63BY.mjs";import{mergeConfigProps as c}from"@jamsrui/utils";import{jsx as s}from"react/jsx-runtime";var u=t=>{let{children:m}=t,o=r(),p=c(o,o,t),v=n(p);return s(a,{value:v,children:s(e,{children:m})})};export{u as a};
package/dist/index.d.mts CHANGED
@@ -1,11 +1,31 @@
1
- export { Avatar } from './avatar.mjs';
1
+ import * as react from 'react';
2
+ import * as react_jsx_runtime from 'react/jsx-runtime';
3
+ import { Avatar as Avatar$1 } from './avatar.mjs';
4
+ import { AvatarFallback } from './avatar-fallback.mjs';
5
+ import { AvatarImage } from './avatar-image.mjs';
6
+ import { AvatarIndicator } from './avatar-indicator.mjs';
2
7
  export { AvatarConfig, useAvatarConfig } from './avatar-config.mjs';
3
- import 'react/jsx-runtime';
4
- import './primitive/use-avatar.mjs';
8
+ import './use-avatar.mjs';
5
9
  import '@jamsrui/utils';
6
- import './primitive/avatar-fallback.mjs';
7
- import 'react';
8
- import './primitive/avatar-image.mjs';
9
- import './primitive/avatar-root.mjs';
10
- import './primitive/styles.mjs';
10
+ import './avatar-root.mjs';
11
+ import './styles.mjs';
11
12
  import '@jamsrui/core';
13
+
14
+ declare const Avatar: ((props: Avatar$1.Props) => react_jsx_runtime.JSX.Element) & {
15
+ Root: (props: Avatar$1.Props) => react_jsx_runtime.JSX.Element;
16
+ Image: (props: AvatarImage.Props) => react.ReactElement<unknown, string | react.JSXElementConstructor<any>> | null;
17
+ Fallback: (props: AvatarFallback.Props) => react.ReactElement<unknown, string | react.JSXElementConstructor<any>> | null;
18
+ Indicator: (props: AvatarIndicator.Props) => react.ReactElement<unknown, string | react.JSXElementConstructor<any>>;
19
+ };
20
+ declare namespace Avatar {
21
+ interface Props extends Avatar$1.Props {
22
+ }
23
+ interface Image extends AvatarImage.Props {
24
+ }
25
+ interface Fallback extends AvatarFallback.Props {
26
+ }
27
+ interface Indicator extends AvatarIndicator.Props {
28
+ }
29
+ }
30
+
31
+ export { Avatar };
package/dist/index.mjs CHANGED
@@ -1 +1 @@
1
- "use client";import{a as o}from"./chunk-7ZBPIMY4.mjs";import"./chunk-J3FSRIIV.mjs";import"./chunk-6ZPYWJDS.mjs";import"./chunk-ZRKDZ3US.mjs";import"./chunk-5Q2ZPY6B.mjs";import"./chunk-TJU5GERX.mjs";import"./chunk-UN72ATNQ.mjs";import{a as r,b as a}from"./chunk-GXVNM3CJ.mjs";import"./chunk-XCPN2D5N.mjs";import"./chunk-NNHCRYDX.mjs";import"./chunk-46DDRBZC.mjs";import"./chunk-67MYTGCN.mjs";import"./chunk-UBGMEQ6Q.mjs";export{o as Avatar,r as AvatarConfig,a as useAvatarConfig};
1
+ import{a as r}from"./chunk-VC4JML7B.mjs";import{a as t}from"./chunk-NNG4ZIGT.mjs";import{a as o}from"./chunk-FL77FLGY.mjs";import{a}from"./chunk-WWG32IWR.mjs";import"./chunk-NBSCA4JY.mjs";import"./chunk-7LHVHVMT.mjs";import{a as e,b as n}from"./chunk-GXVNM3CJ.mjs";import"./chunk-TFVXTTJW.mjs";import"./chunk-66YE63BY.mjs";var m=Object.assign(a,{Root:a,Image:t,Fallback:r,Indicator:o});export{m as Avatar,e as AvatarConfig,n as useAvatarConfig};
@@ -5,18 +5,23 @@ declare const avatarVariants: _jamsrui_utils.TVReturnType<{
5
5
  size: {
6
6
  xs: {
7
7
  root: string;
8
+ fallback: string;
8
9
  };
9
10
  sm: {
10
11
  root: string;
12
+ fallback: string;
11
13
  };
12
14
  md: {
13
15
  root: string;
16
+ fallback: string;
14
17
  };
15
18
  lg: {
16
19
  root: string;
20
+ fallback: string;
17
21
  };
18
22
  xl: {
19
23
  root: string;
24
+ fallback: string;
20
25
  };
21
26
  };
22
27
  color: {
@@ -66,18 +71,23 @@ declare const avatarVariants: _jamsrui_utils.TVReturnType<{
66
71
  size: {
67
72
  xs: {
68
73
  root: string;
74
+ fallback: string;
69
75
  };
70
76
  sm: {
71
77
  root: string;
78
+ fallback: string;
72
79
  };
73
80
  md: {
74
81
  root: string;
82
+ fallback: string;
75
83
  };
76
84
  lg: {
77
85
  root: string;
86
+ fallback: string;
78
87
  };
79
88
  xl: {
80
89
  root: string;
90
+ fallback: string;
81
91
  };
82
92
  };
83
93
  color: {
@@ -127,18 +137,23 @@ declare const avatarVariants: _jamsrui_utils.TVReturnType<{
127
137
  size: {
128
138
  xs: {
129
139
  root: string;
140
+ fallback: string;
130
141
  };
131
142
  sm: {
132
143
  root: string;
144
+ fallback: string;
133
145
  };
134
146
  md: {
135
147
  root: string;
148
+ fallback: string;
136
149
  };
137
150
  lg: {
138
151
  root: string;
152
+ fallback: string;
139
153
  };
140
154
  xl: {
141
155
  root: string;
156
+ fallback: string;
142
157
  };
143
158
  };
144
159
  color: {
@@ -0,0 +1 @@
1
+ import{a}from"./chunk-7LHVHVMT.mjs";export{a as avatarVariants};
@@ -0,0 +1,21 @@
1
+ import { PropGetter } from '@jamsrui/utils';
2
+ import { AvatarFallback } from './avatar-fallback.mjs';
3
+ import { AvatarImage } from './avatar-image.mjs';
4
+ import { AvatarRoot } from './avatar-root.mjs';
5
+ import { AvatarVariants } from './styles.mjs';
6
+ import 'react';
7
+
8
+ type ImageLoadingStatus = "idle" | "loading" | "loaded" | "error";
9
+ declare const useAvatar: (props: useAvatar.Props) => {
10
+ getRootProps: () => AvatarRoot.Props;
11
+ getImgProps: PropGetter<AvatarImage.Props>;
12
+ getFallbackProps: PropGetter<AvatarFallback.Props>;
13
+ getIndicatorProps: PropGetter<AvatarFallback.Props>;
14
+ status: ImageLoadingStatus;
15
+ };
16
+ declare namespace useAvatar {
17
+ interface Props extends AvatarVariants, AvatarRoot.Props {
18
+ }
19
+ }
20
+
21
+ export { useAvatar };
@@ -0,0 +1 @@
1
+ "use client";import{a}from"./chunk-NBSCA4JY.mjs";import"./chunk-7LHVHVMT.mjs";export{a as useAvatar};
@@ -1 +1 @@
1
- var t=r=>r.charAt(0).toUpperCase(),e=r=>["A","N","H","L","Q"].includes(r)?"primary":["F","G","T","I","J"].includes(r)?"secondary":["K","D","Y","B","O"].includes(r)?"success":["P","E","R","S","U"].includes(r)?"warning":["V","W","X","M","Z"].includes(r)?"danger":"default";export{t as a,e as b};
1
+ var t=r=>r.charAt(0).toUpperCase(),e=r=>["A","N","H","L","Q"].includes(r)?"primary":["F","G","T","I","J"].includes(r)?"secondary":["K","D","Y","B","O"].includes(r)?"success":["P","E","R","S","U"].includes(r)?"warning":["V","W","X","M","Z"].includes(r)?"danger":"default";export{e as getColorByName,t as getFirstChar};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jamsrui/avatar",
3
- "version": "0.0.12",
3
+ "version": "0.0.13",
4
4
  "exports": {
5
5
  ".": {
6
6
  "types": "./dist/index.d.ts",
@@ -15,11 +15,11 @@
15
15
  "react": ">=19"
16
16
  },
17
17
  "dependencies": {
18
- "@jamsrui/hooks": "^0.0.12",
19
- "@jamsrui/icons": "^0.0.10",
20
- "@jamsrui/core": "^0.0.10",
21
- "@jamsrui/slot": "^0.0.11",
22
- "@jamsrui/utils": "^0.0.12"
18
+ "@jamsrui/core": "^0.0.11",
19
+ "@jamsrui/icons": "^0.0.11",
20
+ "@jamsrui/hooks": "^0.0.13",
21
+ "@jamsrui/slot": "^0.0.12",
22
+ "@jamsrui/utils": "^0.0.13"
23
23
  },
24
24
  "description": "A modern and beautiful Next.js UI components library.",
25
25
  "keywords": [
@@ -1 +0,0 @@
1
- import{b as e}from"./chunk-UBGMEQ6Q.mjs";import{useRenderElement as m}from"@jamsrui/hooks";var n=r=>{let{getImgProps:t,hasImage:o}=e(),a=m("img",{props:[t(r)]});return o?a:null};export{n as a};
@@ -1 +0,0 @@
1
- import{a as g}from"./chunk-TJU5GERX.mjs";import{a as f}from"./chunk-UN72ATNQ.mjs";import{useCallback as o,useEffect as x,useMemo as C,useState as R}from"react";import{cn as c,dataAttrDev as e,mapPropsVariants as V}from"@jamsrui/utils";var B=E=>{let[F,v]=V(E,g.variantKeys),{classNames:t,children:d,alt:s="",fallback:l,onError:P,name:N,src:n,...m}=F,u=typeof d=="string"&&f(d)||s.length>0&&f(s)||"",G=v.color??"default",r=g({...v,color:G}),[i,p]=R(n),A=i?.length??!1;x(()=>{p(n)},[n]);let b=o(a=>{P?.(a);let h=typeof l=="function"?l({alt:s,name:N}):l;p(h||void 0)},[s,l,N,P]),k=o(a=>({...a,"data-slot":e("root"),"data-component":e("avatar"),className:r.root({className:c(t?.root,a.className)})}),[t?.root,r]),y=o(()=>({draggable:"false",...m,"data-slot":e("img"),onError:b,src:i,alt:s,className:r.img({className:c(t?.img,m.className)})}),[s,t?.img,b,m,i,r]),I=o(a=>({...a,"data-slot":e("fallback"),className:r.fallback({className:c(t?.fallback,a.className)})}),[t?.fallback,r]),S=o(a=>({...a,"data-slot":e("indicator"),className:r.indicator({className:c(t?.indicator,a.className)})}),[t?.indicator,r]);return C(()=>({getRootProps:k,getImgProps:y,getFallbackProps:I,getIndicatorProps:S,fallBackString:u,hasImage:A}),[u,I,y,S,k,A])};export{B as a};
@@ -1 +0,0 @@
1
- import{b as r}from"./chunk-UBGMEQ6Q.mjs";import{useRenderElement as o}from"@jamsrui/hooks";var s=t=>{let{getIndicatorProps:e}=r();return o("div",{props:[e(t)]})};export{s as a};
@@ -1 +0,0 @@
1
- import{a as p}from"./chunk-ZRKDZ3US.mjs";import{a as v}from"./chunk-5Q2ZPY6B.mjs";import{b as a}from"./chunk-XCPN2D5N.mjs";import{a as m}from"./chunk-NNHCRYDX.mjs";import{a as n}from"./chunk-46DDRBZC.mjs";import{a as e}from"./chunk-UBGMEQ6Q.mjs";import{mergeConfigProps as f}from"@jamsrui/utils";import{jsx as r,jsxs as i}from"react/jsx-runtime";var b=t=>{let{children:s}=t,o=a(),A=f(o,o,t),c=v(A);return r(e,{value:c,children:i(p,{children:[r(n,{}),r(m,{children:s})]})})};export{b as a};
@@ -1 +0,0 @@
1
- import{a as n}from"./chunk-ZRKDZ3US.mjs";import{a as v}from"./chunk-5Q2ZPY6B.mjs";import{b as s}from"./chunk-GXVNM3CJ.mjs";import{a as i}from"./chunk-NNHCRYDX.mjs";import{a as c}from"./chunk-46DDRBZC.mjs";import{a as m}from"./chunk-67MYTGCN.mjs";import{a as l}from"./chunk-UBGMEQ6Q.mjs";import{Slot as a}from"@jamsrui/slot";import{mergeConfigProps as g}from"@jamsrui/utils";import{jsx as t,jsxs as u}from"react/jsx-runtime";var b=r=>{let p=s(),A=g(p,r,r),{children:d,slots:o,indicator:e,...f}=A,S=v(f);return t(l,{value:S,children:t(a,{slot:o?.root,children:u(n,{children:[t(a,{slot:o?.img,children:t(c,{})}),t(a,{slot:o?.fallback,children:t(i,{children:d})}),!!e&&t(a,{slot:o?.indicator,children:t(m,{children:e})})]})})})};export{b as a};
File without changes
@@ -1 +0,0 @@
1
- import{b as r}from"./chunk-UBGMEQ6Q.mjs";import{useRenderElement as p}from"@jamsrui/hooks";import{AvatarIcon as s}from"@jamsrui/icons";import{jsx as c}from"react/jsx-runtime";var v=a=>{let{getFallbackProps:t,fallBackString:e,hasImage:o}=r(),l=e||c(s,{}),n=p("div",{props:[t(a),{children:l}]});return o?null:n};export{v as a};
@@ -1 +0,0 @@
1
- import{radiusVariant as r,tv as e}from"@jamsrui/utils";var o=e({slots:{root:"relative shrink-0 rounded-full bg-surface object-cover text-md font-medium [&>img]:size-full [&>img]:object-cover",img:"select-none rounded-inherit",fallback:"absolute inset-0 flex items-center justify-center",indicator:"absolute -bottom-2 -right-1 size-6 flex justify-center items-center"},variants:{size:{xs:{root:"size-6"},sm:{root:"size-8"},md:{root:"size-10"},lg:{root:"size-12"},xl:{root:"size-16"}},color:{default:{root:"bg-default text-default-foreground ring-default"},primary:{root:"bg-primary text-primary-foreground ring-primary"},secondary:{root:"bg-secondary text-secondary-foreground ring-secondary"},success:{root:"bg-success text-success-foreground ring-success"},warning:{root:"bg-warning text-warning-foreground ring-warning"},danger:{root:"bg-danger text-danger-foreground ring-danger"}},isBordered:{true:{root:"ring-2"},false:{root:"border-transparent"}},radius:r("root")},defaultVariants:{bordered:!1,size:"md",color:"default",radius:"full"}});export{o as a};
@@ -1 +0,0 @@
1
- import{createConfigContext as a}from"@jamsrui/utils";var[r,t]=a({displayName:"AvatarConfig"});export{r as a,t as b};
@@ -1 +0,0 @@
1
- import{b as r}from"./chunk-UBGMEQ6Q.mjs";import{useRenderElement as o}from"@jamsrui/hooks";var a=t=>{let{getRootProps:e}=r();return o("div",{props:[e(t)]})};export{a};
@@ -1,22 +0,0 @@
1
- import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import { GlobalConfigProps } from '@jamsrui/core';
3
- import { Avatar } from './avatar.mjs';
4
- import './use-avatar.mjs';
5
- import '@jamsrui/utils';
6
- import './avatar-fallback.mjs';
7
- import 'react';
8
- import './avatar-image.mjs';
9
- import './avatar-root.mjs';
10
- import './styles.mjs';
11
-
12
- declare const useAvatarConfig: () => AvatarConfig.Props;
13
- declare const AvatarConfig: (props: Omit<Partial<AvatarConfig.Props>, "children"> & {
14
- merge?: boolean;
15
- children: React.ReactNode;
16
- }) => react_jsx_runtime.JSX.Element;
17
- declare namespace AvatarConfig {
18
- interface Props extends Avatar.Props, GlobalConfigProps<Avatar.Props> {
19
- }
20
- }
21
-
22
- export { AvatarConfig, useAvatarConfig };
@@ -1 +0,0 @@
1
- import{a,b}from"../chunk-XCPN2D5N.mjs";export{a as AvatarConfig,b as useAvatarConfig};
@@ -1 +0,0 @@
1
- import{a,b}from"../chunk-UBGMEQ6Q.mjs";export{a as AvatarContext,b as useAvatarContext};
@@ -1 +0,0 @@
1
- import{a}from"../chunk-NNHCRYDX.mjs";import"../chunk-UBGMEQ6Q.mjs";export{a as AvatarFallback};
@@ -1 +0,0 @@
1
- import{a}from"../chunk-46DDRBZC.mjs";import"../chunk-UBGMEQ6Q.mjs";export{a as AvatarImage};
@@ -1 +0,0 @@
1
- import{a}from"../chunk-67MYTGCN.mjs";import"../chunk-UBGMEQ6Q.mjs";export{a as AvatarIndicator};
@@ -1 +0,0 @@
1
- import{a}from"../chunk-ZRKDZ3US.mjs";import"../chunk-UBGMEQ6Q.mjs";export{a as AvatarRoot};
@@ -1,16 +0,0 @@
1
- import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import { useAvatar } from './use-avatar.mjs';
3
- import '@jamsrui/utils';
4
- import './avatar-fallback.mjs';
5
- import 'react';
6
- import './avatar-image.mjs';
7
- import './avatar-root.mjs';
8
- import './styles.mjs';
9
-
10
- declare const Avatar: (props: Avatar.Props) => react_jsx_runtime.JSX.Element;
11
- declare namespace Avatar {
12
- interface Props extends useAvatar.Props {
13
- }
14
- }
15
-
16
- export { Avatar };
@@ -1 +0,0 @@
1
- import{a}from"../chunk-6ZPYWJDS.mjs";import"../chunk-ZRKDZ3US.mjs";import"../chunk-5Q2ZPY6B.mjs";import"../chunk-TJU5GERX.mjs";import"../chunk-UN72ATNQ.mjs";import"../chunk-XCPN2D5N.mjs";import"../chunk-NNHCRYDX.mjs";import"../chunk-46DDRBZC.mjs";import"../chunk-UBGMEQ6Q.mjs";export{a as Avatar};
@@ -1,13 +0,0 @@
1
- export { Avatar } from './avatar.mjs';
2
- export { AvatarConfig, useAvatarConfig } from './avatar-config.mjs';
3
- export { AvatarContext, useAvatarContext } from './avatar-context.mjs';
4
- export { AvatarFallback } from './avatar-fallback.mjs';
5
- export { AvatarImage } from './avatar-image.mjs';
6
- export { AvatarIndicator } from './avatar-indicator.mjs';
7
- export { AvatarRoot } from './avatar-root.mjs';
8
- export { useAvatar } from './use-avatar.mjs';
9
- import 'react/jsx-runtime';
10
- import '@jamsrui/core';
11
- import 'react';
12
- import '@jamsrui/utils';
13
- import './styles.mjs';
@@ -1 +0,0 @@
1
- "use client";import"../chunk-J3FSRIIV.mjs";import{a as i}from"../chunk-6ZPYWJDS.mjs";import{a as g}from"../chunk-ZRKDZ3US.mjs";import{a as h}from"../chunk-5Q2ZPY6B.mjs";import"../chunk-TJU5GERX.mjs";import"../chunk-UN72ATNQ.mjs";import{a,b}from"../chunk-XCPN2D5N.mjs";import{a as e}from"../chunk-NNHCRYDX.mjs";import{a as f}from"../chunk-46DDRBZC.mjs";import{a as j}from"../chunk-67MYTGCN.mjs";import{a as c,b as d}from"../chunk-UBGMEQ6Q.mjs";export{i as Avatar,a as AvatarConfig,c as AvatarContext,e as AvatarFallback,f as AvatarImage,j as AvatarIndicator,g as AvatarRoot,h as useAvatar,b as useAvatarConfig,d as useAvatarContext};
@@ -1 +0,0 @@
1
- import{a}from"../chunk-TJU5GERX.mjs";export{a as avatarVariants};
@@ -1,27 +0,0 @@
1
- import { PropGetter, UIProps, SlotsToClassNames } from '@jamsrui/utils';
2
- import { AvatarFallback } from './avatar-fallback.mjs';
3
- import { AvatarImage } from './avatar-image.mjs';
4
- import { AvatarRoot } from './avatar-root.mjs';
5
- import { AvatarVariants, AvatarSlots } from './styles.mjs';
6
- import 'react';
7
-
8
- declare const useAvatar: (props: useAvatar.Props) => {
9
- getRootProps: PropGetter<AvatarRoot.Props>;
10
- getImgProps: PropGetter<AvatarImage.Props>;
11
- getFallbackProps: PropGetter<AvatarFallback.Props>;
12
- getIndicatorProps: PropGetter<AvatarFallback.Props>;
13
- fallBackString: string;
14
- hasImage: number | boolean;
15
- };
16
- declare namespace useAvatar {
17
- interface Props extends AvatarVariants, UIProps<"img"> {
18
- fallback?: string | ((_: {
19
- alt: string;
20
- name?: string;
21
- }) => string);
22
- classNames?: SlotsToClassNames<AvatarSlots>;
23
- name?: string;
24
- }
25
- }
26
-
27
- export { useAvatar };
@@ -1 +0,0 @@
1
- import{a}from"../chunk-5Q2ZPY6B.mjs";import"../chunk-TJU5GERX.mjs";import"../chunk-UN72ATNQ.mjs";export{a as useAvatar};
@@ -1 +0,0 @@
1
- import{a,b}from"../chunk-UN72ATNQ.mjs";export{b as getColorByName,a as getFirstChar};
File without changes
File without changes