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