welcome-ui 10.6.1 → 10.6.2
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/Window.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import './Window.css';
|
|
3
|
-
import { jsx as o, jsxs as
|
|
3
|
+
import { jsx as o, jsxs as _ } from "react/jsx-runtime";
|
|
4
4
|
import { c as d } from "./index-B6iGEm-i.js";
|
|
5
5
|
import { f as b } from "./forwardRefWithAs-8eP3ZN15.js";
|
|
6
|
-
import { forwardRef as
|
|
6
|
+
import { forwardRef as m, useState as B } from "react";
|
|
7
7
|
import { T as I, a as g, b as j } from "./tab-panel-Cc3MfOBM.js";
|
|
8
8
|
import { b as A } from "./Q5W46E73-5xQblshY.js";
|
|
9
9
|
import { Badge as S } from "./Badge.js";
|
|
10
|
-
import { Icon as
|
|
10
|
+
import { Icon as x } from "./Icon.js";
|
|
11
11
|
import { Text as u } from "./Text.js";
|
|
12
12
|
const H = "_root_17x8z_2", P = "_header_17x8z_11", R = "_media_17x8z_125", c = {
|
|
13
13
|
root: H,
|
|
@@ -26,17 +26,17 @@ const H = "_root_17x8z_2", P = "_header_17x8z_11", R = "_media_17x8z_125", c = {
|
|
|
26
26
|
"size-md": "_size-md_17x8z_149",
|
|
27
27
|
"size-sm": "_size-sm_17x8z_153",
|
|
28
28
|
"size-xs": "_size-xs_17x8z_157"
|
|
29
|
-
}, k = d(c), h =
|
|
30
|
-
({ children:
|
|
29
|
+
}, k = d(c), h = m(
|
|
30
|
+
({ children: a, className: t, size: e = "md", ...s }, n) => /* @__PURE__ */ o("div", { className: k("body", `size-${e}`, t), ref: n, ...s, children: a })
|
|
31
31
|
);
|
|
32
32
|
h.displayName = "Window.Body";
|
|
33
|
-
const L = d(c), z =
|
|
34
|
-
({ children:
|
|
33
|
+
const L = d(c), z = m(
|
|
34
|
+
({ children: a, className: t, ...e }, s) => /* @__PURE__ */ o("div", { className: L("box-text", t), ref: s, ...e, children: a })
|
|
35
35
|
);
|
|
36
36
|
z.displayName = "Window.BoxText";
|
|
37
37
|
const i = d(c), p = ({
|
|
38
|
-
"aria-label":
|
|
39
|
-
className:
|
|
38
|
+
"aria-label": a,
|
|
39
|
+
className: t,
|
|
40
40
|
icon: e,
|
|
41
41
|
isActive: s,
|
|
42
42
|
onClick: n,
|
|
@@ -44,74 +44,81 @@ const i = d(c), p = ({
|
|
|
44
44
|
}) => /* @__PURE__ */ o(
|
|
45
45
|
"button",
|
|
46
46
|
{
|
|
47
|
-
"aria-label":
|
|
47
|
+
"aria-label": a,
|
|
48
48
|
"aria-pressed": s,
|
|
49
|
-
className: i("header-action-button",
|
|
49
|
+
className: i("header-action-button", t),
|
|
50
50
|
onClick: n,
|
|
51
51
|
type: "button",
|
|
52
52
|
...r,
|
|
53
|
-
children: /* @__PURE__ */ o(
|
|
53
|
+
children: /* @__PURE__ */ o(x, { name: e })
|
|
54
54
|
}
|
|
55
55
|
), w = ({
|
|
56
|
-
as:
|
|
57
|
-
className:
|
|
56
|
+
as: a,
|
|
57
|
+
className: t,
|
|
58
58
|
onClick: e
|
|
59
59
|
}) => /* @__PURE__ */ o(
|
|
60
60
|
p,
|
|
61
61
|
{
|
|
62
62
|
"aria-label": "Close window",
|
|
63
|
-
as:
|
|
64
|
-
className: i("header-close-button",
|
|
63
|
+
as: a,
|
|
64
|
+
className: i("header-close-button", t),
|
|
65
65
|
icon: "times",
|
|
66
66
|
onClick: e
|
|
67
67
|
}
|
|
68
|
-
), M = ({ children:
|
|
69
|
-
({ as:
|
|
70
|
-
const $ = A(
|
|
71
|
-
return /* @__PURE__ */
|
|
68
|
+
), M = ({ children: a, className: t, store: e, ...s }) => /* @__PURE__ */ o(g, { className: i("header-tabs", t), store: e, ...s, children: a }), O = b(
|
|
69
|
+
({ as: a, badge: t, children: e, className: s, icon: n, id: r, store: l, ...v }, W) => {
|
|
70
|
+
const $ = A(l, "selectedId") === r;
|
|
71
|
+
return /* @__PURE__ */ _(
|
|
72
72
|
I,
|
|
73
73
|
{
|
|
74
74
|
className: i("header-tab-item", s),
|
|
75
75
|
id: r,
|
|
76
76
|
ref: W,
|
|
77
|
-
render:
|
|
78
|
-
store:
|
|
77
|
+
render: a ? /* @__PURE__ */ o(a, {}) : void 0,
|
|
78
|
+
store: l,
|
|
79
79
|
...v,
|
|
80
80
|
children: [
|
|
81
|
-
n ? /* @__PURE__ */ o(
|
|
81
|
+
n ? /* @__PURE__ */ o(x, { name: n }) : null,
|
|
82
82
|
/* @__PURE__ */ o(u, { variant: "label-sm", children: e }),
|
|
83
|
-
|
|
83
|
+
t ? /* @__PURE__ */ o(S, { variant: $ ? "neutral" : "warm", children: t }) : null
|
|
84
84
|
]
|
|
85
85
|
},
|
|
86
86
|
r
|
|
87
87
|
);
|
|
88
88
|
}
|
|
89
|
-
), E = ({ children:
|
|
89
|
+
), E = ({ children: a, isClosable: t = !1, onClose: e }) => {
|
|
90
90
|
const s = () => {
|
|
91
91
|
e == null || e();
|
|
92
92
|
};
|
|
93
|
-
return /* @__PURE__ */
|
|
94
|
-
|
|
95
|
-
|
|
93
|
+
return /* @__PURE__ */ _("div", { className: i("header-actions"), children: [
|
|
94
|
+
a,
|
|
95
|
+
t ? /* @__PURE__ */ o(w, { onClick: s }) : null
|
|
96
96
|
] });
|
|
97
|
-
}, q = ({
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
97
|
+
}, q = ({
|
|
98
|
+
children: a,
|
|
99
|
+
isExpandable: t = !1,
|
|
100
|
+
onExpandChange: e
|
|
101
|
+
}) => {
|
|
102
|
+
const [s, n] = B(!1), r = () => {
|
|
103
|
+
const l = !s;
|
|
104
|
+
n(l), e == null || e(l);
|
|
101
105
|
};
|
|
102
|
-
return /* @__PURE__ */
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
106
|
+
return /* @__PURE__ */ _("div", { className: i("header-actions"), children: [
|
|
107
|
+
t ? /* @__PURE__ */ o(
|
|
108
|
+
"button",
|
|
109
|
+
{
|
|
110
|
+
"aria-expanded": s,
|
|
111
|
+
"aria-label": s ? "Collapse window" : "Expand window",
|
|
112
|
+
className: i("header-action-button"),
|
|
113
|
+
onClick: r,
|
|
114
|
+
type: "button",
|
|
115
|
+
children: /* @__PURE__ */ o(x, { name: s ? "compress-alt" : "arrow-resize-diagonal" })
|
|
116
|
+
}
|
|
117
|
+
) : null,
|
|
118
|
+
a
|
|
119
|
+
] });
|
|
120
|
+
}, C = ({ as: a, className: t, title: e }) => /* @__PURE__ */ o(u, { as: a, className: i("header-title", t), variant: "body-md-strong", children: e }), N = m(
|
|
121
|
+
({ children: a, className: t, ...e }, s) => /* @__PURE__ */ o("header", { className: i("header", t), ref: s, ...e, children: a })
|
|
115
122
|
);
|
|
116
123
|
N.displayName = "Window.Header";
|
|
117
124
|
const D = Object.assign(N, {
|
|
@@ -122,16 +129,16 @@ const D = Object.assign(N, {
|
|
|
122
129
|
Tab: O,
|
|
123
130
|
Tabs: M,
|
|
124
131
|
Title: C
|
|
125
|
-
}), F = d(c), f =
|
|
126
|
-
({ children:
|
|
132
|
+
}), F = d(c), f = m(
|
|
133
|
+
({ children: a, className: t, ...e }, s) => /* @__PURE__ */ o("div", { className: F("media", t), ref: s, ...e, children: a })
|
|
127
134
|
);
|
|
128
135
|
f.displayName = "Window.Media";
|
|
129
|
-
const G = d(c), y =
|
|
130
|
-
({ children:
|
|
136
|
+
const G = d(c), y = m(
|
|
137
|
+
({ children: a, store: t, tabId: e, ...s }, n) => /* @__PURE__ */ o(j, { className: G("tab-panel"), ref: n, store: t, tabId: e, ...s, children: a })
|
|
131
138
|
);
|
|
132
139
|
y.displayName = "Window.TabPanel";
|
|
133
140
|
const J = d(c), T = b(
|
|
134
|
-
({ as:
|
|
141
|
+
({ as: a = "div", children: t, className: e, role: s = "region", ...n }, r) => /* @__PURE__ */ o(a, { className: J("root", e), ref: r, role: s, ...n, children: t })
|
|
135
142
|
);
|
|
136
143
|
T.displayName = "Window";
|
|
137
144
|
const se = Object.assign(T, {
|
|
@@ -20,7 +20,7 @@ export declare const Drawer: import('react').ForwardRefExoticComponent<Omit<Draw
|
|
|
20
20
|
} & import('react').RefAttributes<HTMLDivElement>> & {
|
|
21
21
|
Button: ({ "aria-label": ariaLabel, className, icon, isActive, onClick, ...rest }: import('../../utils').PropsWithAs<import('../../utils').As, import('../Window/types').ActionButtonProps>) => import("react/jsx-runtime").JSX.Element;
|
|
22
22
|
CloseButton: ({ as, className, onClick, }: import('../../utils').PropsWithAs<import('../../utils').As, Omit<import('../Window/types').ActionButtonProps, "icon">>) => import("react/jsx-runtime").JSX.Element;
|
|
23
|
-
LeftActions: ({ isExpandable, onExpandChange }: import('../Window/types').HeaderLeftActionsProps) => import("react/jsx-runtime").JSX.Element;
|
|
23
|
+
LeftActions: ({ children, isExpandable, onExpandChange, }: import('../Window/types').HeaderLeftActionsProps) => import("react/jsx-runtime").JSX.Element;
|
|
24
24
|
RightActions: ({ children, isClosable, onClose }: import('../Window/types').HeaderRightActionsProps) => import("react/jsx-runtime").JSX.Element;
|
|
25
25
|
Tab: import('../../utils').FunctionComponentWithAs<"button", import('../Window/types').HeaderTabItem>;
|
|
26
26
|
Tabs: ({ children, className, store, ...rest }: import('../Window/types').HeaderTabsProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -35,7 +35,7 @@ export declare const Modal: import('../../utils').FunctionComponentWithAs<"div",
|
|
|
35
35
|
} & import('react').RefAttributes<HTMLDivElement>> & {
|
|
36
36
|
Button: ({ "aria-label": ariaLabel, className, icon, isActive, onClick, ...rest }: import('../../utils').PropsWithAs<import('../../utils').As, import('../Window/types').ActionButtonProps>) => import("react/jsx-runtime").JSX.Element;
|
|
37
37
|
CloseButton: ({ as, className, onClick, }: import('../../utils').PropsWithAs<import('../../utils').As, Omit<import('../Window/types').ActionButtonProps, "icon">>) => import("react/jsx-runtime").JSX.Element;
|
|
38
|
-
LeftActions: ({ isExpandable, onExpandChange }: import('../Window/types').HeaderLeftActionsProps) => import("react/jsx-runtime").JSX.Element;
|
|
38
|
+
LeftActions: ({ children, isExpandable, onExpandChange, }: import('../Window/types').HeaderLeftActionsProps) => import("react/jsx-runtime").JSX.Element;
|
|
39
39
|
RightActions: ({ children, isClosable, onClose }: import('../Window/types').HeaderRightActionsProps) => import("react/jsx-runtime").JSX.Element;
|
|
40
40
|
Tab: import('../../utils').FunctionComponentWithAs<"button", import('../Window/types').HeaderTabItem>;
|
|
41
41
|
Tabs: ({ children, className, store, ...rest }: import('../Window/types').HeaderTabsProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -8,7 +8,7 @@ export declare const Header: import('react').ForwardRefExoticComponent<import('r
|
|
|
8
8
|
} & import('react').RefAttributes<HTMLDivElement>> & {
|
|
9
9
|
Button: ({ "aria-label": ariaLabel, className, icon, isActive, onClick, ...rest }: PropsWithAs<As, ActionButtonProps>) => import("react/jsx-runtime").JSX.Element;
|
|
10
10
|
CloseButton: ({ as, className, onClick, }: PropsWithAs<As, Omit<ActionButtonProps, "icon">>) => import("react/jsx-runtime").JSX.Element;
|
|
11
|
-
LeftActions: ({ isExpandable, onExpandChange }: HeaderLeftActionsProps) => import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
LeftActions: ({ children, isExpandable, onExpandChange, }: HeaderLeftActionsProps) => import("react/jsx-runtime").JSX.Element;
|
|
12
12
|
RightActions: ({ children, isClosable, onClose }: HeaderRightActionsProps) => import("react/jsx-runtime").JSX.Element;
|
|
13
13
|
Tab: import('../../../utils').FunctionComponentWithAs<"button", HeaderTabItem>;
|
|
14
14
|
Tabs: ({ children, className, store, ...rest }: HeaderTabsProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -13,7 +13,7 @@ export declare const Window: import('../../utils').FunctionComponentWithAs<"div"
|
|
|
13
13
|
} & import('react').RefAttributes<HTMLDivElement>> & {
|
|
14
14
|
Button: ({ "aria-label": ariaLabel, className, icon, isActive, onClick, ...rest }: import('../../utils').PropsWithAs<import('../../utils').As, import('./types').ActionButtonProps>) => import("react/jsx-runtime").JSX.Element;
|
|
15
15
|
CloseButton: ({ as, className, onClick, }: import('../../utils').PropsWithAs<import('../../utils').As, Omit<import('./types').ActionButtonProps, "icon">>) => import("react/jsx-runtime").JSX.Element;
|
|
16
|
-
LeftActions: ({ isExpandable, onExpandChange }: import('./types').HeaderLeftActionsProps) => import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
LeftActions: ({ children, isExpandable, onExpandChange, }: import('./types').HeaderLeftActionsProps) => import("react/jsx-runtime").JSX.Element;
|
|
17
17
|
RightActions: ({ children, isClosable, onClose }: import('./types').HeaderRightActionsProps) => import("react/jsx-runtime").JSX.Element;
|
|
18
18
|
Tab: import('../../utils').FunctionComponentWithAs<"button", import('./types').HeaderTabItem>;
|
|
19
19
|
Tabs: ({ children, className, store, ...rest }: import('./types').HeaderTabsProps) => import("react/jsx-runtime").JSX.Element;
|