@jamsrui/avatar 0.0.16 → 0.0.18
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/dist/avatar-config.d.mts +2 -2
- package/dist/avatar-config.mjs +1 -1
- package/dist/index.d.mts +9 -6
- package/dist/index.mjs +1 -1
- package/dist/utils.mjs +1 -1
- package/package.json +6 -6
package/dist/avatar-config.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import {
|
|
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
|
|
18
|
+
interface Props extends WithGlobalConfig<Avatar.Props> {
|
|
19
19
|
}
|
|
20
20
|
}
|
|
21
21
|
|
package/dist/avatar-config.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{createConfigContext as a}from"@jamsrui/utils";const[r
|
|
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 {
|
|
8
|
-
|
|
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
|
|
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.
|
|
3
|
+
"version": "0.0.18",
|
|
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/
|
|
19
|
-
"@jamsrui/
|
|
20
|
-
"@jamsrui/
|
|
21
|
-
"@jamsrui/
|
|
22
|
-
"@jamsrui/
|
|
18
|
+
"@jamsrui/hooks": "^0.0.18",
|
|
19
|
+
"@jamsrui/icons": "^0.0.14",
|
|
20
|
+
"@jamsrui/utils": "^0.0.18",
|
|
21
|
+
"@jamsrui/core": "^0.0.14",
|
|
22
|
+
"@jamsrui/slot": "^0.0.15"
|
|
23
23
|
},
|
|
24
24
|
"description": "A modern and beautiful Next.js UI components library.",
|
|
25
25
|
"keywords": [
|