welcome-ui 10.0.0 → 10.0.1

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/Alert.js CHANGED
@@ -1,15 +1,15 @@
1
1
  "use client";
2
2
  import './Alert.css';
3
3
  import { jsx as a, jsxs as l } from "react/jsx-runtime";
4
- import m, { forwardRef as E, Children as g, cloneElement as u } from "react";
5
- import { CloseButton as R } from "./CloseButton.js";
6
- import { Icon as V } from "./Icon.js";
4
+ import m, { forwardRef as R, Children as g, cloneElement as u } from "react";
5
+ import { CloseButton as V } from "./CloseButton.js";
6
+ import { Icon as I } from "./Icon.js";
7
7
  import { Text as A } from "./Text.js";
8
8
  import { c as b } from "./index-PAaZGbyz.js";
9
9
  import { Button as h } from "./Button.js";
10
10
  import { f as x } from "./forwardRefWithAs-8eP3ZN15.js";
11
- const I = "_root_3i41g_2", O = "_content_3i41g_21", B = {
12
- root: I,
11
+ const O = "_root_3i41g_2", z = "_content_3i41g_21", B = {
12
+ root: O,
13
13
  "size-md": "_size-md_3i41g_18",
14
14
  "content-actions": "_content-actions_3i41g_21",
15
15
  "without-title": "_without-title_3i41g_24",
@@ -21,7 +21,7 @@ const I = "_root_3i41g_2", O = "_content_3i41g_21", B = {
21
21
  "variant-success": "_variant-success_3i41g_49",
22
22
  "variant-warning": "_variant-warning_3i41g_54",
23
23
  "full-width": "_full-width_3i41g_59",
24
- content: O,
24
+ content: z,
25
25
  "content-text": "_content-text_3i41g_71",
26
26
  "title-close-button": "_title-close-button_3i41g_88",
27
27
  "title-with-icon": "_title-with-icon_3i41g_91",
@@ -32,49 +32,59 @@ const I = "_root_3i41g_2", O = "_content_3i41g_21", B = {
32
32
  "icon-wrapper-warning": "_icon-wrapper-warning_3i41g_125",
33
33
  "icon-wrapper-ai": "_icon-wrapper-ai_3i41g_129"
34
34
  }, f = x(
35
- ({ variant: n = "primary", ...r }, i) => /* @__PURE__ */ a(h, { className: "shrink-0 w-fit", ref: i, variant: n, ...r })
35
+ ({ variant: n = "primary", ...r }, e) => /* @__PURE__ */ a(h, { className: "shrink-0 w-fit", ref: e, variant: n, ...r })
36
36
  ), w = x(
37
- ({ variant: n = "secondary", ...r }, i) => /* @__PURE__ */ a(h, { className: "shrink-0 w-fit", ref: i, variant: n, ...r })
37
+ ({ variant: n = "secondary", ...r }, e) => /* @__PURE__ */ a(h, { className: "shrink-0 w-fit", ref: e, variant: n, ...r })
38
38
  );
39
39
  f.displayName = "Alert.Button";
40
40
  w.displayName = "Alert.SecondaryButton";
41
- const z = b(B), _ = ({ children: n, hasCloseButton: r, ...i }) => /* @__PURE__ */ a(A, { as: "span", className: z(r && "title-close-button"), ...i, children: n });
41
+ const F = b(B), _ = ({ children: n, hasCloseButton: r, ...e }) => /* @__PURE__ */ a(A, { as: "span", className: F(r && "title-close-button"), ...e, children: n });
42
42
  _.displayName = "Alert.Title";
43
- const o = b(B), F = {
43
+ const o = b(B), M = {
44
44
  ai: "sparkles",
45
45
  brand: "lightbulb-alt",
46
46
  danger: "exclamation-octagon",
47
47
  info: "info-circle",
48
48
  success: "check-circle",
49
49
  warning: "exclamation-triangle"
50
- }, $ = E(
51
- ({ children: n, className: r, cta: i, handleClose: p, isFullWidth: k, size: s = "md", variant: c = "brand", ...T }, C) => {
52
- const S = c === "ai", d = g.toArray(n).some((e) => m.isValidElement(e) ? e.type === _ : !1), y = /* @__PURE__ */ a("div", { className: o("icon-wrapper", `icon-wrapper-${c}`), children: /* @__PURE__ */ a(V, { name: F[c] }) }), j = g.toArray(n).map((e, t) => e.type === _ ? /* @__PURE__ */ l("div", { className: o("title-with-icon"), children: [
50
+ }, $ = R(
51
+ ({
52
+ children: n,
53
+ className: r,
54
+ cta: e,
55
+ handleClose: p,
56
+ icon: k,
57
+ isFullWidth: T,
58
+ size: s = "md",
59
+ variant: c = "brand",
60
+ ...C
61
+ }, E) => {
62
+ const S = c === "ai", d = g.toArray(n).some((i) => m.isValidElement(i) ? i.type === _ : !1), y = /* @__PURE__ */ a("div", { className: o("icon-wrapper", `icon-wrapper-${c}`), children: /* @__PURE__ */ a(I, { name: k || M[c] }) }), j = g.toArray(n).map((i, t) => i.type === _ ? /* @__PURE__ */ l("div", { className: o("title-with-icon"), children: [
53
63
  y,
54
- u(e, {
64
+ u(i, {
55
65
  hasCloseButton: !!p,
56
66
  variant: `body-${s}-strong`
57
67
  })
58
- ] }, `alert-title-${t}`) : e), v = (e) => g.toArray(e).flatMap((t) => m.isValidElement(t) && t.type === m.Fragment ? v(t.props.children) : t.type === f ? u(t, {
68
+ ] }, `alert-title-${t}`) : i), v = (i) => g.toArray(i).flatMap((t) => m.isValidElement(t) && t.type === m.Fragment ? v(t.props.children) : t.type === f ? u(t, {
59
69
  size: s,
60
70
  variant: S ? "primary-ai" : void 0
61
71
  }) : t.type === w ? u(t, {
62
72
  size: s
63
- }) : t), N = !!i && v(i);
73
+ }) : t), N = !!e && v(e);
64
74
  return /* @__PURE__ */ l(
65
75
  "div",
66
76
  {
67
77
  className: o(
68
78
  "root",
69
- k && "full-width",
79
+ T && "full-width",
70
80
  `size-${s}`,
71
81
  c && `variant-${c}`,
72
82
  r
73
83
  ),
74
- ref: C,
75
- ...T,
84
+ ref: E,
85
+ ...C,
76
86
  children: [
77
- !!p && /* @__PURE__ */ a(R, { className: o("close-button"), onClick: p }),
87
+ !!p && /* @__PURE__ */ a(V, { className: o("close-button"), onClick: p }),
78
88
  /* @__PURE__ */ l("div", { className: o("content"), children: [
79
89
  /* @__PURE__ */ l(
80
90
  A,
@@ -96,12 +106,12 @@ const o = b(B), F = {
96
106
  }
97
107
  );
98
108
  $.displayName = "Alert";
99
- const L = Object.assign($, {
109
+ const P = Object.assign($, {
100
110
  Button: f,
101
111
  SecondaryButton: w,
102
112
  Title: _
103
113
  });
104
114
  export {
105
- L as Alert,
106
- F as ICON
115
+ P as Alert,
116
+ M as ICON
107
117
  };