welcome-ui 9.0.3 → 9.0.5
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.js +1 -1
- package/dist/Link.js +14 -13
- package/dist/types/components/Avatar/utils.d.ts +1 -1
- package/package.json +1 -1
package/dist/Avatar.js
CHANGED
|
@@ -20,7 +20,7 @@ function g(e = "") {
|
|
|
20
20
|
const [o, r] = e.split(" ");
|
|
21
21
|
return o && r ? `${o.charAt(0).toUpperCase()}${r.charAt(0).toUpperCase()}` : o.substring(0, 2).toUpperCase();
|
|
22
22
|
}
|
|
23
|
-
const m = (e) => {
|
|
23
|
+
const m = (e = "") => {
|
|
24
24
|
const o = e.length % t.length;
|
|
25
25
|
return t[o];
|
|
26
26
|
}, z = _(u), t = [
|
package/dist/Link.js
CHANGED
|
@@ -12,40 +12,41 @@ const g = "_root_vehh7_2", k = "_isExternal_vehh7_13", M = "_isMultiline_vehh7_5
|
|
|
12
12
|
"variant-primary": "_variant-primary_vehh7_38",
|
|
13
13
|
"variant-secondary": "_variant-secondary_vehh7_42",
|
|
14
14
|
isMultiline: M
|
|
15
|
-
}, i = N(b),
|
|
15
|
+
}, i = N(b), l = ({ children: r, isExternal: e }) => /* @__PURE__ */ d("span", { className: i("wui-text"), children: [
|
|
16
16
|
r,
|
|
17
17
|
e ? /* @__PURE__ */ t(E, { size: "sm" }) : null
|
|
18
|
-
] }),
|
|
19
|
-
r.props.tagName === "span" || r.props["data-wui-link"] === !0 || typeof r.props.children == "string") ? e ? /* @__PURE__ */ t(
|
|
18
|
+
] }), p = (r, e) => typeof r == "string" ? /* @__PURE__ */ t(l, { isExternal: e, children: r }) : a.isValidElement(r) && (r.type === "span" || r.props.as === "span" || // FormattedMessage from react-intl has a span tag by default
|
|
19
|
+
r.props.tagName === "span" || r.props["data-wui-link"] === !0 || typeof r.props.children == "string") ? e ? /* @__PURE__ */ t(l, { isExternal: e, children: r }) : (
|
|
20
20
|
// If it is not external, we just need to add wui-text className to the child as we don't need to wrap it to display the icon
|
|
21
21
|
a.cloneElement(r, {
|
|
22
22
|
className: i("wui-text", r.props.className)
|
|
23
23
|
})
|
|
24
24
|
) : r, C = w((r, e) => {
|
|
25
25
|
const {
|
|
26
|
-
as:
|
|
26
|
+
as: m,
|
|
27
27
|
children: n,
|
|
28
|
-
className:
|
|
29
|
-
disabled:
|
|
28
|
+
className: _,
|
|
29
|
+
disabled: c,
|
|
30
30
|
isExternal: s,
|
|
31
|
-
multiline:
|
|
32
|
-
target:
|
|
31
|
+
multiline: u,
|
|
32
|
+
target: o,
|
|
33
33
|
variant: f = "primary",
|
|
34
34
|
...v
|
|
35
|
-
} = r, x =
|
|
35
|
+
} = r, x = m || "a", h = typeof n == "string" ? p(n, s) : a.Children.map(n, (y) => p(y, s));
|
|
36
36
|
return /* @__PURE__ */ t(
|
|
37
37
|
x,
|
|
38
38
|
{
|
|
39
|
-
"aria-disabled":
|
|
39
|
+
"aria-disabled": c,
|
|
40
40
|
className: i(
|
|
41
41
|
"root",
|
|
42
42
|
`variant-${f}`,
|
|
43
43
|
s && "isExternal",
|
|
44
|
-
|
|
45
|
-
|
|
44
|
+
u && "isMultiline",
|
|
45
|
+
_
|
|
46
46
|
),
|
|
47
47
|
ref: e,
|
|
48
|
-
rel:
|
|
48
|
+
rel: o === "_blank" ? "noopener noreferrer" : void 0,
|
|
49
|
+
target: o,
|
|
49
50
|
...v,
|
|
50
51
|
children: h
|
|
51
52
|
}
|