welcome-ui 9.0.7 → 9.0.9

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/Modal.js CHANGED
@@ -1,8 +1,8 @@
1
1
  "use client";
2
- import { jsx as o, jsxs as d } from "react/jsx-runtime";
2
+ import { jsx as s, jsxs as d } from "react/jsx-runtime";
3
3
  import { u as C } from "./RTNCFSKZ-P4icqVD0.js";
4
4
  import { D as I, u as y } from "./NI3IVY7K-DxnarnKs.js";
5
- import { forwardRef as c, isValidElement as B, cloneElement as S, useState as A, useEffect as T } from "react";
5
+ import { forwardRef as i, isValidElement as B, cloneElement as S, useState as A, useEffect as T } from "react";
6
6
  import { c as n } from "./index-PAaZGbyz.js";
7
7
  import { f as z } from "./forwardRefWithAs-8eP3ZN15.js";
8
8
  import { D as v } from "./DSAASPLT-COUlh0RL.js";
@@ -12,7 +12,7 @@ import { Button as E } from "./Button.js";
12
12
  import { Text as m } from "./Text.js";
13
13
  import { CloseButton as M } from "./CloseButton.js";
14
14
  import { D as H } from "./ZTXFEM5L-BEA_1pIo.js";
15
- const R = "_root_1vbnu_3", W = "_hideOnInteractOutside_1vbnu_19", F = "_dialog_1vbnu_117", i = {
15
+ const R = "_root_1vbnu_3", W = "_hideOnInteractOutside_1vbnu_19", F = "_dialog_1vbnu_117", l = {
16
16
  root: R,
17
17
  "asset-backdrop": "_asset-backdrop_1vbnu_8",
18
18
  hideOnInteractOutside: W,
@@ -23,43 +23,44 @@ const R = "_root_1vbnu_3", W = "_hideOnInteractOutside_1vbnu_19", F = "_dialog_1
23
23
  "asset-content": "_asset-content_1vbnu_96",
24
24
  dialog: F,
25
25
  "close-button": "_close-button_1vbnu_159"
26
- }, V = n(i), q = ({ children: t, ...e }) => /* @__PURE__ */ o(E, { className: V("close-button"), shape: "circle", variant: "secondary", ...e, children: t }), G = n(i), J = c(
27
- ({ hideOnInteractOutside: t, ...e }, s) => /* @__PURE__ */ o(
26
+ }, V = n(l), q = ({ children: t, ...e }) => /* @__PURE__ */ s(E, { className: V("close-button"), shape: "circle", variant: "secondary", ...e, children: t }), G = n(l), J = i(
27
+ ({ hideOnInteractOutside: t, ...e }, o) => /* @__PURE__ */ s(
28
28
  "div",
29
29
  {
30
30
  className: G("asset-backdrop", t && "hideOnInteractOutside"),
31
31
  ...e,
32
- ref: s,
33
- children: /* @__PURE__ */ o(
32
+ ref: o,
33
+ children: /* @__PURE__ */ s(
34
34
  v,
35
35
  {
36
- render: /* @__PURE__ */ o(q, { children: /* @__PURE__ */ o(j, {}) })
36
+ render: /* @__PURE__ */ s(q, { children: /* @__PURE__ */ s(j, {}) })
37
37
  }
38
38
  )
39
39
  }
40
40
  )
41
- ), K = n(i), L = ({
41
+ ), K = n(l), L = ({
42
42
  children: t,
43
- ...e
44
- }) => /* @__PURE__ */ o("div", { className: K("root", "asset-content"), ...e, children: t }), P = n(i), N = ({ children: t, ...e }) => /* @__PURE__ */ o(m, { as: "p", className: P("asset-title"), lines: 2, variant: "h4", ...e, children: t }), g = n(i), Q = c(
45
- ({ children: t, customContent: e, subtitle: s, title: r, ..._ }, a) => /* @__PURE__ */ d("div", { className: g("root", "asset-wrapper"), ref: a, ..._, children: [
43
+ className: e,
44
+ ...o
45
+ }) => /* @__PURE__ */ s("div", { className: K("root", "asset-content", e), ...o, children: t }), P = n(l), N = ({ children: t, className: e, ...o }) => /* @__PURE__ */ s(m, { as: "p", className: P("asset-title", e), lines: 2, variant: "h4", ...o, children: t }), g = n(l), Q = i(
46
+ ({ children: t, customContent: e, subtitle: o, title: r, ...a }, c) => /* @__PURE__ */ d("div", { className: g("root", "asset-wrapper"), ref: c, ...a, children: [
46
47
  t,
47
48
  /* @__PURE__ */ d("div", { className: g("root", "asset-title-wrapper"), children: [
48
49
  e,
49
- !e && s ? /* @__PURE__ */ o(m, { variant: "subtitle-sm", children: s }) : null,
50
- !e && r ? /* @__PURE__ */ o(N, { children: r }) : null
50
+ !e && o ? /* @__PURE__ */ s(m, { variant: "subtitle-sm", children: o }) : null,
51
+ !e && r ? /* @__PURE__ */ s(N, { children: r }) : null
51
52
  ] })
52
53
  ] })
53
- ), U = n(i), X = ({
54
+ ), U = n(l), X = ({
54
55
  children: t,
55
56
  ...e
56
- }) => /* @__PURE__ */ o("div", { className: U("root", "dialog"), ...e, children: t }), Y = n(i), Z = ({ children: t }) => /* @__PURE__ */ o("div", { className: Y("root", "iframe-wrapper"), children: t }), tt = Object.assign(X, {
57
+ }) => /* @__PURE__ */ s("div", { className: U("root", "dialog"), ...e, children: t }), Y = n(l), Z = ({ children: t }) => /* @__PURE__ */ s("div", { className: Y("root", "iframe-wrapper"), children: t }), tt = Object.assign(X, {
57
58
  AssetWithTitle: Q,
58
59
  Backdrop: J,
59
60
  Content: L,
60
61
  Iframe: Z,
61
62
  Title: N
62
- }), et = "_root_4g0z0_4", ot = "_body_4g0z0_48", st = "_footer_4g0z0_48", rt = "_header_4g0z0_48", nt = "_scrollable_4g0z0_60", at = "_content_4g0z0_66", ct = "_close_4g0z0_66", it = "_backdrop_4g0z0_85", lt = "_hideOnInteractOutside_4g0z0_96", _t = "_icon_4g0z0_127", l = {
63
+ }), et = "_root_4g0z0_4", ot = "_body_4g0z0_48", st = "_footer_4g0z0_48", rt = "_header_4g0z0_48", nt = "_scrollable_4g0z0_60", at = "_content_4g0z0_66", ct = "_close_4g0z0_66", it = "_backdrop_4g0z0_85", lt = "_hideOnInteractOutside_4g0z0_96", _t = "_icon_4g0z0_127", _ = {
63
64
  root: et,
64
65
  body: ot,
65
66
  footer: st,
@@ -81,43 +82,51 @@ const R = "_root_1vbnu_3", W = "_hideOnInteractOutside_1vbnu_19", F = "_dialog_1
81
82
  "footer-information": "_footer-information_4g0z0_163",
82
83
  "footer-information-title": "_footer-information-title_4g0z0_170",
83
84
  "footer-information-subtitle": "_footer-information-subtitle_4g0z0_174"
84
- }, dt = n(l), mt = c(
85
- ({ backdrop: t, hideOnInteractOutside: e, ...s }, r) => t === !0 ? /* @__PURE__ */ o(
85
+ }, dt = n(_), mt = i(
86
+ ({ backdrop: t, hideOnInteractOutside: e, ...o }, r) => t === !0 ? /* @__PURE__ */ s(
86
87
  "div",
87
88
  {
88
89
  className: dt("backdrop", e && "hideOnInteractOutside"),
89
90
  ref: r,
90
- ...s
91
+ ...o
91
92
  }
92
- ) : B(t) ? S(t, { ref: r, ...s }) : null
93
- ), ut = n(l), ft = c((t, e) => /* @__PURE__ */ o("section", { className: ut("body"), ref: e, ...t })), pt = n(l), x = (t) => /* @__PURE__ */ o(v, { render: /* @__PURE__ */ o(M, { className: pt("close"), ...t }) }), ht = n(l), bt = c(
94
- ({ children: t, withClosingButton: e = !0, ...s }, r) => /* @__PURE__ */ d("div", { className: ht("content", e && "with-close-button"), ref: r, ...s, children: [
95
- /* @__PURE__ */ o(x, {}),
96
- t
97
- ] })
98
- ), u = n(l), gt = c(
99
- ({ children: t, information: e, ...s }, r) => /* @__PURE__ */ d("footer", { className: u("footer"), ref: r, ...s, children: [
100
- t ? /* @__PURE__ */ o("div", { className: u("footer-children-wrapper"), children: t }) : null,
101
- e ? /* @__PURE__ */ d("div", { className: u("footer-information"), children: [
102
- /* @__PURE__ */ o(m, { className: u("footer-information-title"), variant: "subtitle-sm", children: e.title }),
103
- /* @__PURE__ */ o(m, { className: u("footer-information-subtitle"), variant: "sm", children: e.subtitle })
93
+ ) : B(t) ? S(t, { ref: r, ...o }) : null
94
+ ), ut = n(_), ft = i(({ className: t, ...e }, o) => /* @__PURE__ */ s("section", { className: ut("body", t), ref: o, ...e })), pt = n(_), x = (t) => /* @__PURE__ */ s(v, { render: /* @__PURE__ */ s(M, { className: pt("close"), ...t }) }), ht = n(_), bt = i(
95
+ ({ children: t, className: e, withClosingButton: o = !0, ...r }, a) => /* @__PURE__ */ d(
96
+ "div",
97
+ {
98
+ className: (ht("content", o && "with-close-button"), e),
99
+ ref: a,
100
+ ...r,
101
+ children: [
102
+ /* @__PURE__ */ s(x, {}),
103
+ t
104
+ ]
105
+ }
106
+ )
107
+ ), u = n(_), gt = i(
108
+ ({ children: t, className: e, information: o, ...r }, a) => /* @__PURE__ */ d("footer", { className: u("footer", e), ref: a, ...r, children: [
109
+ t ? /* @__PURE__ */ s("div", { className: u("footer-children-wrapper"), children: t }) : null,
110
+ o ? /* @__PURE__ */ d("div", { className: u("footer-information"), children: [
111
+ /* @__PURE__ */ s(m, { className: u("footer-information-title"), variant: "subtitle-sm", children: o.title }),
112
+ /* @__PURE__ */ s(m, { className: u("footer-information-subtitle"), variant: "sm", children: o.subtitle })
104
113
  ] }) : null
105
114
  ] })
106
- ), p = n(l), zt = c(
107
- ({ icon: t, subtitle: e, title: s, ...r }, _) => /* @__PURE__ */ d("header", { className: p("header", t && "icon"), ref: _, ...r, children: [
108
- /* @__PURE__ */ o(x, {}),
109
- t,
110
- /* @__PURE__ */ o(m, { className: p("header-title"), variant: "h4", children: s }),
111
- e ? /* @__PURE__ */ o(m, { className: p("header-subtitle"), children: e }) : null
115
+ ), p = n(_), zt = i(
116
+ ({ className: t, icon: e, subtitle: o, title: r, ...a }, c) => /* @__PURE__ */ d("header", { className: p("header", e && "icon", t), ref: c, ...a, children: [
117
+ /* @__PURE__ */ s(x, {}),
118
+ e,
119
+ /* @__PURE__ */ s(m, { className: p("header-title"), variant: "h4", children: r }),
120
+ o ? /* @__PURE__ */ s(m, { className: p("header-subtitle"), children: o }) : null
112
121
  ] })
113
122
  ), vt = z(
114
- ({ as: t, store: e, ...s }, r) => /* @__PURE__ */ o(H, { ref: r, render: t ? /* @__PURE__ */ o(t, {}) : void 0, store: e, ...s })
115
- ), Nt = n(l);
123
+ ({ as: t, store: e, ...o }, r) => /* @__PURE__ */ s(H, { ref: r, render: t ? /* @__PURE__ */ s(t, {}) : void 0, store: e, ...o })
124
+ ), Nt = n(_);
116
125
  function Et(t) {
117
- const { onClose: e, setOpen: s, ...r } = t || {};
126
+ const { onClose: e, setOpen: o, ...r } = t || {};
118
127
  return y({
119
- setOpen: (a) => {
120
- !a && e && e(), s == null || s(a);
128
+ setOpen: (c) => {
129
+ !c && e && e(), o == null || o(c);
121
130
  },
122
131
  ...r
123
132
  });
@@ -127,10 +136,10 @@ const xt = z(
127
136
  ariaLabel: t,
128
137
  /** for render property */
129
138
  as: e,
130
- backdrop: s = !0,
139
+ backdrop: o = !0,
131
140
  children: r,
132
- className: _,
133
- hideOnInteractOutside: a = !0,
141
+ className: a,
142
+ hideOnInteractOutside: c = !0,
134
143
  size: $ = "lg",
135
144
  store: h,
136
145
  ...w
@@ -138,13 +147,13 @@ const xt = z(
138
147
  const [D, k] = A(!1), { contentElement: f, open: b } = C(h);
139
148
  return T(() => {
140
149
  b && f && k(f.scrollHeight > f.offsetHeight);
141
- }, [f, b]), /* @__PURE__ */ o(
150
+ }, [f, b]), /* @__PURE__ */ s(
142
151
  I,
143
152
  {
144
- backdrop: /* @__PURE__ */ o(mt, { backdrop: s, hideOnInteractOutside: a }),
145
- hideOnInteractOutside: a,
153
+ backdrop: /* @__PURE__ */ s(mt, { backdrop: o, hideOnInteractOutside: c }),
154
+ hideOnInteractOutside: c,
146
155
  ref: O,
147
- render: e ? /* @__PURE__ */ o(e, {}) : /* @__PURE__ */ o("div", { className: Nt("root", `size-${$}`, D && "scrollable", _) }),
156
+ render: e ? /* @__PURE__ */ s(e, {}) : /* @__PURE__ */ s("div", { className: Nt("root", `size-${$}`, D && "scrollable", a) }),
148
157
  store: h,
149
158
  ...w,
150
159
  "aria-label": t,
@@ -1,2 +1,2 @@
1
1
  import { HTMLAttributes, default as React } from 'react';
2
- export declare const AssetContent: ({ children, ...rest }: React.PropsWithChildren<HTMLAttributes<HTMLDivElement>>) => import("react/jsx-runtime").JSX.Element;
2
+ export declare const AssetContent: ({ children, className, ...rest }: React.PropsWithChildren<HTMLAttributes<HTMLDivElement>>) => import("react/jsx-runtime").JSX.Element;
@@ -1,2 +1,2 @@
1
1
  import { TextProps } from '../../Text/types';
2
- export declare const AssetTitle: ({ children, ...rest }: TextProps) => import("react/jsx-runtime").JSX.Element;
2
+ export declare const AssetTitle: ({ children, className, ...rest }: TextProps) => import("react/jsx-runtime").JSX.Element;
@@ -1,7 +1,7 @@
1
1
  export declare const Assets: (({ children, ...rest }: React.PropsWithChildren<import('react').HTMLAttributes<HTMLDivElement>>) => import("react/jsx-runtime").JSX.Element) & {
2
2
  AssetWithTitle: import('react').ForwardRefExoticComponent<Omit<import('./types').AssetWithTitleProps, "ref"> & import('react').RefAttributes<HTMLDivElement>>;
3
3
  Backdrop: import('react').ForwardRefExoticComponent<import('../types').BackdropProps & import('react').RefAttributes<HTMLDivElement>>;
4
- Content: ({ children, ...rest }: React.PropsWithChildren<import('react').HTMLAttributes<HTMLDivElement>>) => import("react/jsx-runtime").JSX.Element;
4
+ Content: ({ children, className, ...rest }: React.PropsWithChildren<import('react').HTMLAttributes<HTMLDivElement>>) => import("react/jsx-runtime").JSX.Element;
5
5
  Iframe: ({ children }: React.PropsWithChildren) => import("react/jsx-runtime").JSX.Element;
6
- Title: ({ children, ...rest }: import('../../Text/types').TextProps) => import("react/jsx-runtime").JSX.Element;
6
+ Title: ({ children, className, ...rest }: import('../../Text/types').TextProps) => import("react/jsx-runtime").JSX.Element;
7
7
  };
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * @name Modal.Content
3
3
  */
4
- export declare const Content: import('react').ForwardRefExoticComponent<{
4
+ export declare const Content: import('react').ForwardRefExoticComponent<import('react').HTMLAttributes<HTMLDivElement> & {
5
5
  withClosingButton?: boolean;
6
6
  } & {
7
7
  children?: import('react').ReactNode | undefined;
@@ -4,7 +4,7 @@ export declare const Modal: import('../../utils').FunctionComponentWithAs<"div",
4
4
  Body: import('react').ForwardRefExoticComponent<import('react').HTMLAttributes<HTMLElement> & {
5
5
  children?: import('react').ReactNode | undefined;
6
6
  } & import('react').RefAttributes<HTMLElement>>;
7
- Content: import('react').ForwardRefExoticComponent<{
7
+ Content: import('react').ForwardRefExoticComponent<import('react').HTMLAttributes<HTMLDivElement> & {
8
8
  withClosingButton?: boolean;
9
9
  } & {
10
10
  children?: import('react').ReactNode | undefined;
@@ -16,7 +16,7 @@ export declare const Modal: import('../../utils').FunctionComponentWithAs<"div",
16
16
  export declare const AssetModal: (({ children, ...rest }: React.PropsWithChildren<import('react').HTMLAttributes<HTMLDivElement>>) => import("react/jsx-runtime").JSX.Element) & {
17
17
  AssetWithTitle: import('react').ForwardRefExoticComponent<Omit<import('./Assets/types').AssetWithTitleProps, "ref"> & import('react').RefAttributes<HTMLDivElement>>;
18
18
  Backdrop: import('react').ForwardRefExoticComponent<import('./types').BackdropProps & import('react').RefAttributes<HTMLDivElement>>;
19
- Content: ({ children, ...rest }: React.PropsWithChildren<import('react').HTMLAttributes<HTMLDivElement>>) => import("react/jsx-runtime").JSX.Element;
19
+ Content: ({ children, className, ...rest }: React.PropsWithChildren<import('react').HTMLAttributes<HTMLDivElement>>) => import("react/jsx-runtime").JSX.Element;
20
20
  Iframe: ({ children }: React.PropsWithChildren) => import("react/jsx-runtime").JSX.Element;
21
- Title: ({ children, ...rest }: import('../Text/types').TextProps) => import("react/jsx-runtime").JSX.Element;
21
+ Title: ({ children, className, ...rest }: import('../Text/types').TextProps) => import("react/jsx-runtime").JSX.Element;
22
22
  };
@@ -27,7 +27,7 @@ export interface HeaderOptions {
27
27
  }
28
28
  export type HeaderProps = MergeProps<HeaderOptions, HTMLAttributes<HTMLDivElement>>;
29
29
  export type BodyProps = PropsWithChildren<HTMLAttributes<HTMLElement>>;
30
- export type ContentProps = PropsWithChildren<{
30
+ export type ContentProps = PropsWithChildren<HTMLAttributes<HTMLDivElement> & {
31
31
  /**
32
32
  * show or hide the closing button
33
33
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "welcome-ui",
3
- "version": "9.0.7",
3
+ "version": "9.0.9",
4
4
  "description": "Customizable design system with react, typescript, tailwindcss and ariakit.",
5
5
  "files": [
6
6
  "dist"