welcome-ui 9.0.8 → 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 +59 -50
- package/dist/types/components/Modal/Assets/AssetContent.d.ts +1 -1
- package/dist/types/components/Modal/Assets/AssetTitle.d.ts +1 -1
- package/dist/types/components/Modal/Assets/index.d.ts +2 -2
- package/dist/types/components/Modal/components/Content.d.ts +1 -1
- package/dist/types/components/Modal/index.d.ts +3 -3
- package/dist/types/components/Modal/types.d.ts +1 -1
- package/package.json +1 -1
package/dist/Modal.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsx as
|
|
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
|
|
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",
|
|
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(
|
|
27
|
-
({ hideOnInteractOutside: t, ...e },
|
|
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:
|
|
33
|
-
children: /* @__PURE__ */
|
|
32
|
+
ref: o,
|
|
33
|
+
children: /* @__PURE__ */ s(
|
|
34
34
|
v,
|
|
35
35
|
{
|
|
36
|
-
render: /* @__PURE__ */
|
|
36
|
+
render: /* @__PURE__ */ s(q, { children: /* @__PURE__ */ s(j, {}) })
|
|
37
37
|
}
|
|
38
38
|
)
|
|
39
39
|
}
|
|
40
40
|
)
|
|
41
|
-
), K = n(
|
|
41
|
+
), K = n(l), L = ({
|
|
42
42
|
children: t,
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
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 &&
|
|
50
|
-
!e && r ? /* @__PURE__ */
|
|
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(
|
|
54
|
+
), U = n(l), X = ({
|
|
54
55
|
children: t,
|
|
55
56
|
...e
|
|
56
|
-
}) => /* @__PURE__ */
|
|
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",
|
|
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(
|
|
85
|
-
({ backdrop: t, hideOnInteractOutside: e, ...
|
|
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
|
-
...
|
|
91
|
+
...o
|
|
91
92
|
}
|
|
92
|
-
) : B(t) ? S(t, { ref: r, ...
|
|
93
|
-
), ut = n(
|
|
94
|
-
({ children: t,
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
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(
|
|
107
|
-
({
|
|
108
|
-
/* @__PURE__ */
|
|
109
|
-
|
|
110
|
-
/* @__PURE__ */
|
|
111
|
-
|
|
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, ...
|
|
115
|
-
), Nt = n(
|
|
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:
|
|
126
|
+
const { onClose: e, setOpen: o, ...r } = t || {};
|
|
118
127
|
return y({
|
|
119
|
-
setOpen: (
|
|
120
|
-
!
|
|
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:
|
|
139
|
+
backdrop: o = !0,
|
|
131
140
|
children: r,
|
|
132
|
-
className:
|
|
133
|
-
hideOnInteractOutside:
|
|
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__ */
|
|
150
|
+
}, [f, b]), /* @__PURE__ */ s(
|
|
142
151
|
I,
|
|
143
152
|
{
|
|
144
|
-
backdrop: /* @__PURE__ */
|
|
145
|
-
hideOnInteractOutside:
|
|
153
|
+
backdrop: /* @__PURE__ */ s(mt, { backdrop: o, hideOnInteractOutside: c }),
|
|
154
|
+
hideOnInteractOutside: c,
|
|
146
155
|
ref: O,
|
|
147
|
-
render: e ? /* @__PURE__ */
|
|
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
|
*/
|