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 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), o = ({ children: r, isExternal: e }) => /* @__PURE__ */ d("span", { className: i("wui-text"), children: [
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
- ] }), l = (r, e) => typeof r == "string" ? /* @__PURE__ */ t(o, { 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(o, { isExternal: e, children: r }) : (
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: p,
26
+ as: m,
27
27
  children: n,
28
- className: m,
29
- disabled: _,
28
+ className: _,
29
+ disabled: c,
30
30
  isExternal: s,
31
- multiline: c,
32
- target: u,
31
+ multiline: u,
32
+ target: o,
33
33
  variant: f = "primary",
34
34
  ...v
35
- } = r, x = p || "a", h = typeof n == "string" ? l(n, s) : a.Children.map(n, (y) => l(y, s));
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
- c && "isMultiline",
45
- m
44
+ u && "isMultiline",
45
+ _
46
46
  ),
47
47
  ref: e,
48
- rel: u === "_blank" ? "noopener noreferrer" : void 0,
48
+ rel: o === "_blank" ? "noopener noreferrer" : void 0,
49
+ target: o,
49
50
  ...v,
50
51
  children: h
51
52
  }
@@ -1,3 +1,3 @@
1
1
  import { Colors } from './types';
2
2
  export declare function getInitials(name?: string): string;
3
- export declare const getColorFromName: (name: string) => Colors;
3
+ export declare const getColorFromName: (name?: string) => Colors;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "welcome-ui",
3
- "version": "9.0.3",
3
+ "version": "9.0.5",
4
4
  "description": "Customizable design system with react, typescript, tailwindcss and ariakit.",
5
5
  "files": [
6
6
  "dist"