welcome-ui 9.0.10 → 9.0.12

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,12 +1,13 @@
1
1
  "use client";
2
- import { jsxs as q, jsx as c } from "react/jsx-runtime";
3
- import C, { forwardRef as l, Children as d, cloneElement as _ } from "react";
4
- import { Button as y } from "./Button.js";
5
- import { CloseButton as I } from "./CloseButton.js";
6
- import { Text as b } from "./Text.js";
2
+ import { jsxs as v, jsx as r } from "react/jsx-runtime";
3
+ import C, { forwardRef as I, Children as q, cloneElement as _ } from "react";
4
+ import { Button as d } from "./Button.js";
5
+ import { CloseButton as R } from "./CloseButton.js";
6
+ import { Text as w } from "./Text.js";
7
7
  import { VariantIcon as S } from "./VariantIcon.js";
8
8
  import { c as T } from "./index-PAaZGbyz.js";
9
- const V = "_root_1c0qe_2", $ = "_icon_1c0qe_55", E = "_content_1c0qe_58", R = "_title_1c0qe_88", O = {
9
+ import { f as y } from "./forwardRefWithAs-8eP3ZN15.js";
10
+ const V = "_root_1c0qe_2", $ = "_icon_1c0qe_55", E = "_content_1c0qe_58", O = "_title_1c0qe_88", W = {
10
11
  root: V,
11
12
  "size-sm": "_size-sm_1c0qe_16",
12
13
  "size-md": "_size-md_1c0qe_19",
@@ -22,80 +23,80 @@ const V = "_root_1c0qe_2", $ = "_icon_1c0qe_55", E = "_content_1c0qe_58", R = "_
22
23
  "content-text": "_content-text_1c0qe_76",
23
24
  "content-actions": "_content-actions_1c0qe_79",
24
25
  "variant-icon": "_variant-icon_1c0qe_84",
25
- title: R,
26
+ title: O,
26
27
  "title-size-sm": "_title-size-sm_1c0qe_93",
27
28
  "title-size-md": "_title-size-md_1c0qe_96",
28
29
  "title-close-button": "_title-close-button_1c0qe_99",
29
30
  "close-button": "_close-button_1c0qe_103"
30
- }, i = T(O), D = l(
31
- ({ children: n, className: o, cta: e, handleClose: s, hideIcon: g, isFullWidth: A, size: r = "sm", variant: a, ...B }, z) => {
32
- const h = a === "beige" ? void 0 : a, m = a === "ai", u = !g, j = d.toArray(n).map((t) => t.type === x ? _(t, { hasCloseButton: !!s, variant: r }) : t), f = (t) => {
33
- var v;
31
+ }, i = T(W), D = I(
32
+ ({ children: n, className: o, cta: e, handleClose: c, hideIcon: A, isFullWidth: g, size: s = "sm", variant: a, ...B }, z) => {
33
+ const h = a === "beige" ? void 0 : a, l = a === "ai", m = !A, j = q.toArray(n).map((t) => t.type === x ? _(t, { hasCloseButton: !!c, variant: s }) : t), u = (t) => {
34
+ var p;
34
35
  if (t) {
35
- if (t.type === w)
36
+ if (t.type === b)
36
37
  return _(t, {
37
- size: r,
38
- variant: m ? "primary-ai" : void 0
38
+ size: s,
39
+ variant: l ? "primary-ai" : void 0
39
40
  });
40
41
  if (t.type === N)
41
42
  return _(t, {
42
- size: r,
43
- variant: m ? "tertiary-ai" : void 0
43
+ size: s,
44
+ variant: l ? "tertiary-ai" : void 0
44
45
  });
45
- if ((v = t.props) != null && v.children)
46
+ if ((p = t.props) != null && p.children)
46
47
  return _(t, {
47
48
  ...t.props,
48
- children: d.map(
49
+ children: q.map(
49
50
  t.props.children,
50
- (k) => f(k)
51
+ (k) => u(k)
51
52
  )
52
53
  });
53
54
  }
54
55
  return t;
55
- }, p = C.isValidElement(e) ? f(e) : e;
56
- return /* @__PURE__ */ q(
56
+ }, f = C.isValidElement(e) ? u(e) : e;
57
+ return /* @__PURE__ */ v(
57
58
  "div",
58
59
  {
59
60
  className: i(
60
61
  "root",
61
- A && "full-width",
62
- r && `size-${r}`,
62
+ g && "full-width",
63
+ s && `size-${s}`,
63
64
  a && `variant-${a}`,
64
- u && "icon",
65
+ m && "icon",
65
66
  o
66
67
  ),
67
68
  ref: z,
68
69
  ...B,
69
70
  children: [
70
- !!s && /* @__PURE__ */ c(I, { className: i("close-button"), onClick: s, size: "xs" }),
71
- u ? /* @__PURE__ */ c(S, { className: i("variant-icon"), size: r, variant: h }) : null,
72
- /* @__PURE__ */ q("div", { className: i("content"), children: [
73
- /* @__PURE__ */ c(b, { as: "div", className: i("content-text"), children: j }),
74
- !!p && /* @__PURE__ */ c("div", { className: i("content-actions"), children: p })
71
+ !!c && /* @__PURE__ */ r(R, { className: i("close-button"), onClick: c, size: "xs" }),
72
+ m ? /* @__PURE__ */ r(S, { className: i("variant-icon"), size: s, variant: h }) : null,
73
+ /* @__PURE__ */ v("div", { className: i("content"), children: [
74
+ /* @__PURE__ */ r(w, { as: "div", className: i("content-text"), children: j }),
75
+ !!f && /* @__PURE__ */ r("div", { className: i("content-actions"), children: f })
75
76
  ] })
76
77
  ]
77
78
  }
78
79
  );
79
80
  }
80
- ), w = l(
81
- ({ variant: n = "secondary", ...o }, e) => /* @__PURE__ */ c(y, { className: "shrink-0 w-fit", ref: e, ...o, variant: n })
82
- ), N = l(
83
- ({ variant: n = "tertiary", ...o }, e) => /* @__PURE__ */ c(y, { className: "shrink-0 w-fit", ref: e, ...o, variant: n })
84
- ), x = ({ children: n, hasCloseButton: o, variant: e, ...s }) => /* @__PURE__ */ c(
85
- b,
81
+ ), b = y(
82
+ ({ variant: n = "secondary", ...o }, e) => /* @__PURE__ */ r(d, { className: "shrink-0 w-fit", ref: e, ...o, variant: n })
83
+ ), N = y(
84
+ ({ variant: n = "tertiary", ...o }, e) => /* @__PURE__ */ r(d, { className: "shrink-0 w-fit", ref: e, ...o, variant: n })
85
+ ), x = ({ children: n, hasCloseButton: o, variant: e, ...c }) => /* @__PURE__ */ r(
86
+ w,
86
87
  {
87
88
  as: "span",
88
89
  className: i("title", `title-size-${e}`, o && "title-close-button"),
89
90
  variant: e,
90
- ...s,
91
+ ...c,
91
92
  children: n
92
93
  }
93
- ), P = Object.assign(D, {
94
- Button: w,
94
+ ), Q = Object.assign(D, {
95
+ Button: b,
95
96
  SecondaryButton: N,
96
97
  Title: x
97
98
  });
98
99
  export {
99
- P as Alert,
100
+ Q as Alert,
100
101
  x as AlertTitle
101
102
  };
package/dist/Card.js CHANGED
@@ -2,18 +2,19 @@
2
2
  import { jsx as c } from "react/jsx-runtime";
3
3
  import { forwardRef as n } from "react";
4
4
  import { c as d } from "./index-PAaZGbyz.js";
5
- const a = "_root_10ds1_2", m = "_body_10ds1_13", e = {
6
- root: a,
7
- body: m
8
- }, i = d(e), l = n(
9
- ({ children: o, className: r, ...s }, t) => /* @__PURE__ */ c("div", { className: i("body", r), ref: t, ...s, children: o })
10
- ), y = n(({ alt: o, src: r, ...s }, t) => /* @__PURE__ */ c("div", { ref: t, ...s, children: /* @__PURE__ */ c("img", { alt: o, src: r }) })), _ = d(e), b = n(
11
- ({ children: o, className: r, ...s }, t) => /* @__PURE__ */ c("div", { className: _("root", r), ref: t, ...s, children: o })
12
- ), v = Object.assign(b, {
13
- Body: l,
5
+ import { f as m } from "./forwardRefWithAs-8eP3ZN15.js";
6
+ const i = "_root_10ds1_2", f = "_body_10ds1_13", e = {
7
+ root: i,
8
+ body: f
9
+ }, l = d(e), p = n(
10
+ ({ children: o, className: r, ...s }, t) => /* @__PURE__ */ c("div", { className: l("body", r), ref: t, ...s, children: o })
11
+ ), y = n(({ alt: o, src: r, ...s }, t) => /* @__PURE__ */ c("div", { ref: t, ...s, children: /* @__PURE__ */ c("img", { alt: o, src: r }) })), _ = d(e), b = m(
12
+ ({ as: o = "div", children: r, className: s, ...t }, a) => /* @__PURE__ */ c(o, { className: _("root", s), ref: a, ...t, children: r })
13
+ ), N = Object.assign(b, {
14
+ Body: p,
14
15
  Cover: y
15
16
  });
16
17
  export {
17
- v as Card,
18
+ N as Card,
18
19
  b as CardComponent
19
20
  };
package/dist/Field.js CHANGED
@@ -1,5 +1,5 @@
1
1
  "use client";
2
- import { jsx as r, jsxs as L } from "react/jsx-runtime";
2
+ import { jsxs as L, jsx as r } from "react/jsx-runtime";
3
3
  import { createContext as q, useMemo as w, useId as A, useContext as M } from "react";
4
4
  import { Hint as R } from "./Hint.js";
5
5
  import { Label as S } from "./Label.js";
@@ -62,7 +62,7 @@ const Q = W((e, d) => {
62
62
  }),
63
63
  [s, a, i, l, c, m, u]
64
64
  );
65
- return /* @__PURE__ */ r(p.Provider, { value: j, children: /* @__PURE__ */ L("div", { ref: d, ...H, className: o("root", N && "inline", I), children: [
65
+ return /* @__PURE__ */ L("div", { ref: d, ...H, className: o("root", N && "inline", I), children: [
66
66
  /* @__PURE__ */ r(
67
67
  S,
68
68
  {
@@ -76,9 +76,9 @@ const Q = W((e, d) => {
76
76
  children: F
77
77
  }
78
78
  ),
79
- /* @__PURE__ */ r("div", { className: o("input"), children: y }),
79
+ /* @__PURE__ */ r(p.Provider, { value: j, children: /* @__PURE__ */ r("div", { className: o("input"), children: y }) }),
80
80
  l ? /* @__PURE__ */ r(R, { className: o("hint"), id: s, variant: i, ...t, children: l }) : null
81
- ] }) });
81
+ ] });
82
82
  });
83
83
  Q.displayName = "Field";
84
84
  export {
package/dist/Modal.js CHANGED
@@ -95,7 +95,7 @@ const R = "_root_1vbnu_3", W = "_hideOnInteractOutside_1vbnu_19", F = "_dialog_1
95
95
  ({ children: t, className: e, withClosingButton: o = !0, ...r }, a) => /* @__PURE__ */ d(
96
96
  "div",
97
97
  {
98
- className: (ht("content", o && "with-close-button"), e),
98
+ className: ht("content", o && "with-close-button", e),
99
99
  ref: a,
100
100
  ...r,
101
101
  children: [
@@ -3,7 +3,7 @@ import { ButtonProps } from '../Button/types';
3
3
  import { AlertProps, AlertTitleProps } from './types';
4
4
  export declare const AlertTitle: ({ children, hasCloseButton, variant, ...rest }: AlertTitleProps) => import("react/jsx-runtime").JSX.Element;
5
5
  export declare const Alert: React.ForwardRefExoticComponent<Omit<AlertProps, "ref"> & React.RefAttributes<HTMLDivElement>> & {
6
- Button: React.ForwardRefExoticComponent<Omit<Omit<ButtonProps, "size">, "ref"> & React.RefAttributes<HTMLButtonElement>>;
7
- SecondaryButton: React.ForwardRefExoticComponent<Omit<Omit<ButtonProps, "size">, "ref"> & React.RefAttributes<HTMLButtonElement>>;
6
+ Button: import('../../utils').FunctionComponentWithAs<"button", Omit<ButtonProps, "size">>;
7
+ SecondaryButton: import('../../utils').FunctionComponentWithAs<"button", Omit<ButtonProps, "size">>;
8
8
  Title: ({ children, hasCloseButton, variant, ...rest }: AlertTitleProps) => import("react/jsx-runtime").JSX.Element;
9
9
  };
@@ -1,9 +1,9 @@
1
- export declare const CardComponent: import('react').ForwardRefExoticComponent<Omit<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
1
+ export declare const CardComponent: import('../../utils').FunctionComponentWithAs<"div", Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
2
2
  ref?: import('react').Ref<HTMLDivElement>;
3
- }, "ref"> & import('react').RefAttributes<HTMLDivElement>>;
4
- export declare const Card: import('react').ForwardRefExoticComponent<Omit<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
3
+ }>;
4
+ export declare const Card: import('../../utils').FunctionComponentWithAs<"div", Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
5
5
  ref?: import('react').Ref<HTMLDivElement>;
6
- }, "ref"> & import('react').RefAttributes<HTMLDivElement>> & {
6
+ }> & {
7
7
  Body: import('react').ForwardRefExoticComponent<Omit<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
8
8
  ref?: import('react').Ref<HTMLDivElement>;
9
9
  }, "ref"> & import('react').RefAttributes<HTMLDivElement>>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "welcome-ui",
3
- "version": "9.0.10",
3
+ "version": "9.0.12",
4
4
  "description": "Customizable design system with react, typescript, tailwindcss and ariakit.",
5
5
  "files": [
6
6
  "dist"