orion-kit
Advanced tools
Comparing version 1.0.0 to 1.0.1
import "../../assets/components/Avatar/index.css"; | ||
import { jsxs as d, jsx as o } from "react/jsx-runtime"; | ||
import { c as v } from "../../index-rhGCKkpR.js"; | ||
const x = "_avatar_dko4v_1", g = "_xsmall_dko4v_10", u = "_small_dko4v_18", F = "_medium_dko4v_26", k = "_large_dko4v_34", p = "_xlarge_dko4v_42", l = { | ||
avatar: x, | ||
xsmall: g, | ||
small: u, | ||
medium: F, | ||
large: k, | ||
xlarge: p | ||
import { jsxs as g, jsx as m } from "react/jsx-runtime"; | ||
import { c as d } from "../../index-rhGCKkpR.js"; | ||
const u = "_avatar_1wz9x_1", v = "_xsmall_1wz9x_11", F = "_small_1wz9x_19", p = "_medium_1wz9x_27", w = "_large_1wz9x_35", f = "_xlarge_1wz9x_43", a = { | ||
avatar: u, | ||
xsmall: v, | ||
small: F, | ||
medium: p, | ||
large: w, | ||
xlarge: f | ||
}, A = ({ | ||
backgroundColor: m = "#339AF0", | ||
className: n, | ||
fontColor: e = "#FFFFFF", | ||
backgroundColor: n = "#339AF0", | ||
className: e, | ||
fontColor: i = "#FFFFFF", | ||
image: s, | ||
name: r, | ||
size: a = "md", | ||
withTitle: i = !0, | ||
...c | ||
size: t = "md", | ||
withTitle: o = !0, | ||
doubleInitials: c = !1, | ||
...x | ||
}) => { | ||
const _ = (() => { | ||
const t = r.split(" "); | ||
return (t[0] ? t[0][0] : "") + (t.length > 1 ? t[t.length - 1][0] : ""); | ||
const l = r.split(" "); | ||
return c ? (l[0] ? l[0][0] : "") + (l.length > 1 ? l[l.length - 1][0] : "") : l[0] ? l[0][0] : ""; | ||
})(); | ||
return /* @__PURE__ */ d( | ||
return /* @__PURE__ */ g( | ||
"div", | ||
{ | ||
className: v(n, l.avatar, { | ||
[l.xsmall]: a === "xs", | ||
[l.small]: a === "sm", | ||
[l.medium]: a === "md", | ||
[l.large]: a === "lg", | ||
[l.xlarge]: a === "xl" | ||
className: d(e, a.avatar, { | ||
[a.xsmall]: t === "xs", | ||
[a.small]: t === "sm", | ||
[a.medium]: t === "md", | ||
[a.large]: t === "lg", | ||
[a.xlarge]: t === "xl" | ||
}), | ||
title: i ? r : void 0, | ||
title: o ? r : void 0, | ||
style: { | ||
backgroundColor: m | ||
backgroundColor: n | ||
}, | ||
...c, | ||
...x, | ||
children: [ | ||
s && /* @__PURE__ */ o("img", { src: s, alt: r }), | ||
!s && /* @__PURE__ */ o("span", { style: { color: e }, children: _ }) | ||
s && /* @__PURE__ */ m("img", { src: s, alt: r }), | ||
!s && /* @__PURE__ */ m("span", { style: { color: i }, children: _ }) | ||
] | ||
@@ -44,0 +45,0 @@ } |
@@ -10,3 +10,4 @@ import { HTMLAttributes } from 'react'; | ||
withTitle?: boolean; | ||
doubleInitials?: boolean; | ||
} | ||
export {}; |
{ | ||
"name": "orion-kit", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"author": "Claudanilo Xavier <claudaniloxavier@gmail.com>", | ||
@@ -77,2 +77,2 @@ "type": "module", | ||
} | ||
} | ||
} |
Sorry, the diff of this file is not supported yet
16661
320