@jamsrui/avatar 0.0.16 → 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.
@@ -1,5 +1,5 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import { GlobalConfigProps } from '@jamsrui/core';
2
+ import { WithGlobalConfig } from '@jamsrui/core';
3
3
  import { Avatar } from './avatar.mjs';
4
4
  import './use-avatar.mjs';
5
5
  import '@jamsrui/utils';
@@ -15,7 +15,7 @@ declare const AvatarConfig: (props: Omit<Partial<AvatarConfig.Props>, "children"
15
15
  children: React.ReactNode;
16
16
  }) => react_jsx_runtime.JSX.Element;
17
17
  declare namespace AvatarConfig {
18
- interface Props extends Avatar.Props, GlobalConfigProps<Avatar.Props> {
18
+ interface Props extends WithGlobalConfig<Avatar.Props> {
19
19
  }
20
20
  }
21
21
 
@@ -1 +1 @@
1
- "use client";import{createConfigContext as a}from"@jamsrui/utils";const[r,t]=a({displayName:"AvatarConfig"});export{r as AvatarConfig,t as useAvatarConfig};
1
+ "use client";import{createConfigContext as a}from"@jamsrui/utils";const[t,r]=a({displayName:"AvatarConfig"});export{t as AvatarConfig,r as useAvatarConfig};
package/dist/index.d.mts CHANGED
@@ -1,18 +1,19 @@
1
1
  import * as react from 'react';
2
2
  import * as react_jsx_runtime from 'react/jsx-runtime';
3
3
  import { Avatar as Avatar$1 } from './avatar.mjs';
4
+ import { AvatarConfig } from './avatar-config.mjs';
5
+ export { useAvatarConfig } from './avatar-config.mjs';
6
+ export { AvatarContext, useAvatarContext } from './avatar-context.mjs';
4
7
  import { AvatarFallback } from './avatar-fallback.mjs';
5
8
  import { AvatarImage } from './avatar-image.mjs';
6
9
  import { AvatarIndicator } from './avatar-indicator.mjs';
7
- export { AvatarConfig, useAvatarConfig } from './avatar-config.mjs';
8
- import './use-avatar.mjs';
10
+ export { AvatarSlots, AvatarVariants, avatarVariants } from './styles.mjs';
11
+ export { useAvatar } from './use-avatar.mjs';
12
+ import '@jamsrui/core';
9
13
  import '@jamsrui/utils';
10
14
  import './avatar-root.mjs';
11
- import './styles.mjs';
12
- import '@jamsrui/core';
13
15
 
14
16
  declare const Avatar: ((props: Avatar$1.Props) => react_jsx_runtime.JSX.Element) & {
15
- Root: (props: Avatar$1.Props) => react_jsx_runtime.JSX.Element;
16
17
  Image: (props: AvatarImage.Props) => react.ReactElement<unknown, string | react.JSXElementConstructor<any>> | null;
17
18
  Fallback: (props: AvatarFallback.Props) => react.ReactElement<unknown, string | react.JSXElementConstructor<any>> | null;
18
19
  Indicator: (props: AvatarIndicator.Props) => react.ReactElement<unknown, string | react.JSXElementConstructor<any>>;
@@ -20,6 +21,8 @@ declare const Avatar: ((props: Avatar$1.Props) => react_jsx_runtime.JSX.Element)
20
21
  declare namespace Avatar {
21
22
  interface Props extends Avatar$1.Props {
22
23
  }
24
+ interface Config extends AvatarConfig.Props {
25
+ }
23
26
  interface Image extends AvatarImage.Props {
24
27
  }
25
28
  interface Fallback extends AvatarFallback.Props {
@@ -28,4 +31,4 @@ declare namespace Avatar {
28
31
  }
29
32
  }
30
33
 
31
- export { Avatar };
34
+ export { Avatar, AvatarConfig, AvatarFallback, AvatarImage, AvatarIndicator };
package/dist/index.mjs CHANGED
@@ -1 +1 @@
1
- import{Avatar as a}from"./avatar.mjs";import{AvatarFallback as r}from"./avatar-fallback.mjs";import{AvatarImage as t}from"./avatar-image.mjs";import{AvatarIndicator as o}from"./avatar-indicator.mjs";import{AvatarConfig as v,useAvatarConfig as A}from"./avatar-config.mjs";const i=Object.assign(a,{Root:a,Image:t,Fallback:r,Indicator:o});export{i as Avatar,v as AvatarConfig,A as useAvatarConfig};
1
+ import{Avatar as o}from"./avatar.mjs";import{AvatarConfig as e,useAvatarConfig as n}from"./avatar-config.mjs";import{AvatarContext as i,useAvatarContext as p}from"./avatar-context.mjs";import{AvatarFallback as a}from"./avatar-fallback.mjs";import{AvatarImage as t}from"./avatar-image.mjs";import{AvatarIndicator as r}from"./avatar-indicator.mjs";import{avatarVariants as s}from"./styles.mjs";import{useAvatar as v}from"./use-avatar.mjs";const P=Object.assign(o,{Image:t,Fallback:a,Indicator:r});export{P as Avatar,e as AvatarConfig,i as AvatarContext,a as AvatarFallback,t as AvatarImage,r as AvatarIndicator,s as avatarVariants,v as useAvatar,n as useAvatarConfig,p as useAvatarContext};
package/dist/utils.mjs CHANGED
@@ -1 +1 @@
1
- const 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};
1
+ "use client";const 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.16",
3
+ "version": "0.0.17",
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/core": "^0.0.13",
19
- "@jamsrui/hooks": "^0.0.16",
20
- "@jamsrui/slot": "^0.0.14",
21
- "@jamsrui/icons": "^0.0.13",
22
- "@jamsrui/utils": "^0.0.16"
18
+ "@jamsrui/core": "^0.0.14",
19
+ "@jamsrui/icons": "^0.0.14",
20
+ "@jamsrui/hooks": "^0.0.17",
21
+ "@jamsrui/slot": "^0.0.15",
22
+ "@jamsrui/utils": "^0.0.17"
23
23
  },
24
24
  "description": "A modern and beautiful Next.js UI components library.",
25
25
  "keywords": [