welcome-ui 10.0.0-alpha.13 → 10.0.0-alpha.15
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/7PRQYBBV-D9IY4qtU.js +14 -0
- package/dist/Alert.js +34 -34
- package/dist/{B7UTNDHN-BghjolIs.js → B7UTNDHN-DDN2hpM5.js} +18 -28
- package/dist/DropdownMenu.js +17 -16
- package/dist/Field.js +7 -7
- package/dist/FileDrop.css +1 -1
- package/dist/FileDrop.js +310 -295
- package/dist/Icon.js +6 -4
- package/dist/Modal.js +1 -1
- package/dist/NSTBQJLB-C_1-awKs.js +173 -0
- package/dist/OLVWQA7U-UYYsJnlv.js +20 -0
- package/dist/RadioGroup.js +1 -1
- package/dist/Tabs.js +167 -367
- package/dist/Window.css +1 -0
- package/dist/Window.js +106 -0
- package/dist/tab-panel-B8NigruF.js +216 -0
- package/dist/types/components/Alert/components/Buttons.d.ts +2 -2
- package/dist/types/components/Alert/index.d.ts +2 -2
- package/dist/types/components/FileDrop/components/Message.d.ts +1 -1
- package/dist/types/components/FileDrop/types.d.ts +5 -0
- package/dist/types/components/Icon/icons.d.ts +2 -2
- package/dist/types/components/Tabs/utils.d.ts +1 -1
- package/dist/types/components/Window/components/Body.d.ts +3 -0
- package/dist/types/components/Window/components/BoxText.d.ts +3 -0
- package/dist/types/components/Window/components/Header.d.ts +13 -0
- package/dist/types/components/Window/components/Media.d.ts +3 -0
- package/dist/types/components/Window/components/TabPanel.d.ts +1 -0
- package/dist/types/components/Window/index.d.ts +22 -0
- package/dist/types/components/Window/index.test.d.ts +1 -0
- package/dist/types/components/Window/types.d.ts +48 -0
- package/package.json +1 -1
- package/dist/OLVWQA7U-Dia3UUnG.js +0 -187
package/dist/Tabs.js
CHANGED
|
@@ -1,235 +1,33 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import './Tabs.css';
|
|
3
|
-
import { jsx as
|
|
4
|
-
import {
|
|
5
|
-
import
|
|
6
|
-
import {
|
|
7
|
-
import
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
var
|
|
17
|
-
[
|
|
18
|
-
[
|
|
19
|
-
),
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
"store",
|
|
25
|
-
"getItem"
|
|
26
|
-
]), b;
|
|
27
|
-
const c = He();
|
|
28
|
-
e = e || c, H(
|
|
29
|
-
e,
|
|
30
|
-
process.env.NODE_ENV !== "production" && "Tab must be wrapped in a TabList component."
|
|
31
|
-
);
|
|
32
|
-
const u = te(), s = a.id || u, _ = ge(a), i = ne(
|
|
33
|
-
(m) => {
|
|
34
|
-
const y = S(f({}, m), { dimmed: _ });
|
|
35
|
-
return n ? n(y) : y;
|
|
36
|
-
},
|
|
37
|
-
[_, n]
|
|
38
|
-
), v = a.onClick, I = F((m) => {
|
|
39
|
-
v == null || v(m), !m.defaultPrevented && (e == null || e.setSelectedId(s));
|
|
40
|
-
}), d = e.panels.useState(
|
|
41
|
-
(m) => {
|
|
42
|
-
var y;
|
|
43
|
-
return (y = m.items.find((l) => l.tabId === s)) == null ? void 0 : y.id;
|
|
44
|
-
}
|
|
45
|
-
), p = u ? a.shouldRegisterItem : !1, g = e.useState((m) => !!s && m.activeId === s), x = e.useState((m) => !!s && m.selectedId === s), h = e.useState((m) => !!e.item(m.activeId)), P = g || x && !h, w = x || ((b = a.accessibleWhenDisabled) != null ? b : !0);
|
|
46
|
-
if (M(
|
|
47
|
-
e.combobox || e.composite,
|
|
48
|
-
"virtualFocus"
|
|
49
|
-
) && (a = S(f({}, a), {
|
|
50
|
-
tabIndex: -1
|
|
51
|
-
})), a = S(f({
|
|
52
|
-
id: s,
|
|
53
|
-
role: "tab",
|
|
54
|
-
"aria-selected": x,
|
|
55
|
-
"aria-controls": d || void 0
|
|
56
|
-
}, a), {
|
|
57
|
-
onClick: I
|
|
58
|
-
}), e.composite) {
|
|
59
|
-
const m = {
|
|
60
|
-
id: s,
|
|
61
|
-
accessibleWhenDisabled: w,
|
|
62
|
-
store: e.composite,
|
|
63
|
-
shouldRegisterItem: P && p,
|
|
64
|
-
rowId: a.rowId,
|
|
65
|
-
render: a.render
|
|
66
|
-
};
|
|
67
|
-
a = S(f({}, a), {
|
|
68
|
-
render: /* @__PURE__ */ T(
|
|
69
|
-
A,
|
|
70
|
-
S(f({}, m), {
|
|
71
|
-
render: e.combobox && e.composite !== e.combobox ? /* @__PURE__ */ T(A, S(f({}, m), { store: e.combobox })) : m.render
|
|
72
|
-
})
|
|
73
|
-
)
|
|
74
|
-
});
|
|
75
|
-
}
|
|
76
|
-
return a = fe(S(f({
|
|
77
|
-
store: e
|
|
78
|
-
}, a), {
|
|
79
|
-
accessibleWhenDisabled: w,
|
|
80
|
-
getItem: i,
|
|
81
|
-
shouldRegisterItem: p
|
|
82
|
-
})), a;
|
|
83
|
-
}), Ue = Ie(
|
|
84
|
-
W(function(r) {
|
|
85
|
-
const t = Ae(r);
|
|
86
|
-
return z(Ke, t);
|
|
87
|
-
})
|
|
88
|
-
), Ze = "div", qe = j(
|
|
89
|
-
function(r) {
|
|
90
|
-
var t = r, { store: e } = t, n = B(t, ["store"]);
|
|
91
|
-
const a = ie();
|
|
92
|
-
e = e || a, H(
|
|
93
|
-
e,
|
|
94
|
-
process.env.NODE_ENV !== "production" && "TabList must receive a `store` prop or be wrapped in a TabProvider component."
|
|
95
|
-
);
|
|
96
|
-
const b = e.useState(
|
|
97
|
-
(c) => c.orientation === "both" ? void 0 : c.orientation
|
|
98
|
-
);
|
|
99
|
-
return n = oe(
|
|
100
|
-
n,
|
|
101
|
-
(c) => /* @__PURE__ */ T(le, { value: e, children: c }),
|
|
102
|
-
[e]
|
|
103
|
-
), e.composite && (n = f({
|
|
104
|
-
focusable: !1
|
|
105
|
-
}, n)), n = f({
|
|
106
|
-
role: "tablist",
|
|
107
|
-
"aria-orientation": b
|
|
108
|
-
}, n), n = Te(f({ store: e }, n)), n;
|
|
109
|
-
}
|
|
110
|
-
), Ge = W(function(r) {
|
|
111
|
-
const t = qe(r);
|
|
112
|
-
return z(Ze, t);
|
|
113
|
-
}), Je = "div", Qe = j(
|
|
114
|
-
function(r) {
|
|
115
|
-
var t = r, {
|
|
116
|
-
store: e,
|
|
117
|
-
unmountOnHide: n,
|
|
118
|
-
tabId: a,
|
|
119
|
-
getItem: b,
|
|
120
|
-
scrollRestoration: c,
|
|
121
|
-
scrollElement: u
|
|
122
|
-
} = t, s = B(t, [
|
|
123
|
-
"store",
|
|
124
|
-
"unmountOnHide",
|
|
125
|
-
"tabId",
|
|
126
|
-
"getItem",
|
|
127
|
-
"scrollRestoration",
|
|
128
|
-
"scrollElement"
|
|
129
|
-
]);
|
|
130
|
-
const _ = ie();
|
|
131
|
-
e = e || _, H(
|
|
132
|
-
e,
|
|
133
|
-
process.env.NODE_ENV !== "production" && "TabPanel must receive a `store` prop or be wrapped in a TabProvider component."
|
|
134
|
-
);
|
|
135
|
-
const i = q(null), v = te(s.id), I = M(
|
|
136
|
-
e.panels,
|
|
137
|
-
() => {
|
|
138
|
-
var l;
|
|
139
|
-
return a || ((l = e == null ? void 0 : e.panels.item(v)) == null ? void 0 : l.tabId);
|
|
140
|
-
}
|
|
141
|
-
), d = M(
|
|
142
|
-
e,
|
|
143
|
-
(l) => !!I && l.selectedId === I
|
|
144
|
-
), p = Me({ open: d }), g = M(p, "mounted"), x = q(
|
|
145
|
-
/* @__PURE__ */ new Map()
|
|
146
|
-
), h = F(() => {
|
|
147
|
-
const l = i.current;
|
|
148
|
-
return l ? u ? typeof u == "function" ? u(l) : "current" in u ? u.current : u : l : null;
|
|
149
|
-
});
|
|
150
|
-
G(() => {
|
|
151
|
-
var l, E;
|
|
152
|
-
if (!c || !g) return;
|
|
153
|
-
const C = h();
|
|
154
|
-
if (!C) return;
|
|
155
|
-
if (c === "reset") {
|
|
156
|
-
C.scroll(0, 0);
|
|
157
|
-
return;
|
|
158
|
-
}
|
|
159
|
-
if (!I) return;
|
|
160
|
-
const N = x.current.get(I);
|
|
161
|
-
C.scroll((l = N == null ? void 0 : N.x) != null ? l : 0, (E = N == null ? void 0 : N.y) != null ? E : 0);
|
|
162
|
-
const L = () => {
|
|
163
|
-
x.current.set(I, {
|
|
164
|
-
x: C.scrollLeft,
|
|
165
|
-
y: C.scrollTop
|
|
166
|
-
});
|
|
167
|
-
};
|
|
168
|
-
return C.addEventListener("scroll", L), () => {
|
|
169
|
-
C.removeEventListener("scroll", L);
|
|
170
|
-
};
|
|
171
|
-
}, [c, g, I, h, e]);
|
|
172
|
-
const [P, w] = Ee(!1);
|
|
173
|
-
G(() => {
|
|
174
|
-
const l = i.current;
|
|
175
|
-
if (!l) return;
|
|
176
|
-
const E = xe(l);
|
|
177
|
-
w(!!E.length);
|
|
178
|
-
}, []);
|
|
179
|
-
const R = ne(
|
|
180
|
-
(l) => {
|
|
181
|
-
const E = S(f({}, l), { id: v || l.id, tabId: a });
|
|
182
|
-
return b ? b(E) : E;
|
|
183
|
-
},
|
|
184
|
-
[v, a, b]
|
|
185
|
-
), m = s.onKeyDown, y = F((l) => {
|
|
186
|
-
if (m == null || m(l), l.defaultPrevented || !(e != null && e.composite)) return;
|
|
187
|
-
const C = {
|
|
188
|
-
ArrowLeft: e.previous,
|
|
189
|
-
ArrowRight: e.next,
|
|
190
|
-
Home: e.first,
|
|
191
|
-
End: e.last
|
|
192
|
-
}[l.key];
|
|
193
|
-
if (!C) return;
|
|
194
|
-
const { selectedId: N } = e.getState(), L = C({ activeId: N });
|
|
195
|
-
L && (l.preventDefault(), e.move(L));
|
|
196
|
-
});
|
|
197
|
-
return s = oe(
|
|
198
|
-
s,
|
|
199
|
-
(l) => /* @__PURE__ */ T(le, { value: e, children: l }),
|
|
200
|
-
[e]
|
|
201
|
-
), s = S(f({
|
|
202
|
-
id: v,
|
|
203
|
-
role: "tabpanel",
|
|
204
|
-
"aria-labelledby": I || void 0
|
|
205
|
-
}, s), {
|
|
206
|
-
children: n && !g ? null : s.children,
|
|
207
|
-
ref: Se(i, s.ref),
|
|
208
|
-
onKeyDown: y
|
|
209
|
-
}), s = Pe(f({
|
|
210
|
-
// If the tab panel is rendered as part of another composite widget such
|
|
211
|
-
// as combobox, it should not be focusable.
|
|
212
|
-
focusable: !e.composite && !P
|
|
213
|
-
}, s)), s = $e(f({ store: p }, s)), s = ve(S(f({ store: e.panels }, s), { getItem: R })), s;
|
|
214
|
-
}
|
|
215
|
-
), Xe = W(function(r) {
|
|
216
|
-
const t = Qe(r);
|
|
217
|
-
return z(Je, t);
|
|
218
|
-
}), Ye = ee(
|
|
219
|
-
[We, Y],
|
|
220
|
-
[Fe, X]
|
|
221
|
-
), et = Ye.useContext;
|
|
222
|
-
se(!1);
|
|
223
|
-
se(null);
|
|
224
|
-
function tt(o = {}) {
|
|
225
|
-
var r = o, {
|
|
3
|
+
import { jsx as _, jsxs as K } from "react/jsx-runtime";
|
|
4
|
+
import { T as U, a as q, b as D } from "./tab-panel-B8NigruF.js";
|
|
5
|
+
import G, { createContext as V, useMemo as H, forwardRef as M, cloneElement as J, isValidElement as Q } from "react";
|
|
6
|
+
import { c as $ } from "./index-PAaZGbyz.js";
|
|
7
|
+
import { m as X, o as y, c as Y, s as x, d as m, f as Z, u as w, a as E, b as A } from "./RTNCFSKZ-BywELldk.js";
|
|
8
|
+
import { Badge as ee } from "./Badge.js";
|
|
9
|
+
import { f as te } from "./forwardRefWithAs-8eP3ZN15.js";
|
|
10
|
+
import { Icon as oe } from "./Icon.js";
|
|
11
|
+
import { P as se, b as ae } from "./Y67KZUMI-BwLWwpNF.js";
|
|
12
|
+
import { C as ne, a as re } from "./SBSPVDDI-CmtnvvUX.js";
|
|
13
|
+
import { e as ce, M as de, A as P, z as S, B as v, V as O, d as z, a as B, C as N } from "./OE2EFRVA-Dg1R6gaC.js";
|
|
14
|
+
import { c as le, a as ie, u as ue } from "./B7UTNDHN-DDN2hpM5.js";
|
|
15
|
+
import { a as me } from "./OLVWQA7U-UYYsJnlv.js";
|
|
16
|
+
var be = ce(
|
|
17
|
+
[ae, re],
|
|
18
|
+
[se, ne]
|
|
19
|
+
), fe = be.useContext;
|
|
20
|
+
V(!1);
|
|
21
|
+
V(null);
|
|
22
|
+
function pe(e = {}) {
|
|
23
|
+
var r = e, {
|
|
226
24
|
composite: t,
|
|
227
|
-
combobox:
|
|
228
|
-
} = r,
|
|
25
|
+
combobox: c
|
|
26
|
+
} = r, s = de(r, [
|
|
229
27
|
"composite",
|
|
230
28
|
"combobox"
|
|
231
29
|
]);
|
|
232
|
-
const
|
|
30
|
+
const p = [
|
|
233
31
|
"items",
|
|
234
32
|
"renderedItems",
|
|
235
33
|
"moves",
|
|
@@ -240,143 +38,144 @@ function tt(o = {}) {
|
|
|
240
38
|
"focusLoop",
|
|
241
39
|
"focusShift",
|
|
242
40
|
"focusWrap"
|
|
243
|
-
],
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
),
|
|
248
|
-
store:
|
|
41
|
+
], l = X(
|
|
42
|
+
s.store,
|
|
43
|
+
y(t, p),
|
|
44
|
+
y(c, p)
|
|
45
|
+
), n = l == null ? void 0 : l.getState(), i = le(P(v({}, s), {
|
|
46
|
+
store: l,
|
|
249
47
|
// We need to explicitly set the default value of `includesBaseElement` to
|
|
250
48
|
// `false` since we don't want the composite store to default it to `true`
|
|
251
49
|
// when the activeId state is null, which could be the case when rendering
|
|
252
50
|
// combobox with tab.
|
|
253
|
-
includesBaseElement:
|
|
254
|
-
|
|
255
|
-
|
|
51
|
+
includesBaseElement: S(
|
|
52
|
+
s.includesBaseElement,
|
|
53
|
+
n == null ? void 0 : n.includesBaseElement,
|
|
256
54
|
!1
|
|
257
55
|
),
|
|
258
|
-
orientation:
|
|
259
|
-
|
|
260
|
-
|
|
56
|
+
orientation: S(
|
|
57
|
+
s.orientation,
|
|
58
|
+
n == null ? void 0 : n.orientation,
|
|
261
59
|
"horizontal"
|
|
262
60
|
),
|
|
263
|
-
focusLoop:
|
|
264
|
-
})),
|
|
265
|
-
selectedId:
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
61
|
+
focusLoop: S(s.focusLoop, n == null ? void 0 : n.focusLoop, !0)
|
|
62
|
+
})), g = ie(), k = P(v({}, i.getState()), {
|
|
63
|
+
selectedId: S(
|
|
64
|
+
s.selectedId,
|
|
65
|
+
n == null ? void 0 : n.selectedId,
|
|
66
|
+
s.defaultSelectedId
|
|
269
67
|
),
|
|
270
|
-
selectOnMove:
|
|
271
|
-
|
|
272
|
-
|
|
68
|
+
selectOnMove: S(
|
|
69
|
+
s.selectOnMove,
|
|
70
|
+
n == null ? void 0 : n.selectOnMove,
|
|
273
71
|
!0
|
|
274
72
|
)
|
|
275
|
-
}),
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
() =>
|
|
279
|
-
const { activeId:
|
|
280
|
-
if (!
|
|
281
|
-
const
|
|
282
|
-
|
|
73
|
+
}), o = Y(k, i, l);
|
|
74
|
+
x(
|
|
75
|
+
o,
|
|
76
|
+
() => m(o, ["moves"], () => {
|
|
77
|
+
const { activeId: a, selectOnMove: d } = o.getState();
|
|
78
|
+
if (!d || !a) return;
|
|
79
|
+
const u = i.item(a);
|
|
80
|
+
u && (u.dimmed || u.disabled || o.setState("selectedId", u.id));
|
|
283
81
|
})
|
|
284
82
|
);
|
|
285
|
-
let
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
() =>
|
|
289
|
-
if (!
|
|
290
|
-
|
|
83
|
+
let I = !0;
|
|
84
|
+
x(
|
|
85
|
+
o,
|
|
86
|
+
() => Z(o, ["selectedId"], (a, d) => {
|
|
87
|
+
if (!I) {
|
|
88
|
+
I = !0;
|
|
291
89
|
return;
|
|
292
90
|
}
|
|
293
|
-
t &&
|
|
91
|
+
t && a.selectedId === d.selectedId || o.setState("activeId", a.selectedId);
|
|
294
92
|
})
|
|
295
|
-
),
|
|
296
|
-
|
|
297
|
-
() =>
|
|
298
|
-
if (
|
|
299
|
-
const { activeId:
|
|
300
|
-
if (
|
|
301
|
-
|
|
93
|
+
), x(
|
|
94
|
+
o,
|
|
95
|
+
() => m(o, ["selectedId", "renderedItems"], (a) => {
|
|
96
|
+
if (a.selectedId !== void 0) return;
|
|
97
|
+
const { activeId: d, renderedItems: u } = o.getState(), b = i.item(d);
|
|
98
|
+
if (b && !b.disabled && !b.dimmed)
|
|
99
|
+
o.setState("selectedId", b.id);
|
|
302
100
|
else {
|
|
303
|
-
const h =
|
|
304
|
-
(
|
|
101
|
+
const h = u.find(
|
|
102
|
+
(f) => !f.disabled && !f.dimmed
|
|
305
103
|
);
|
|
306
|
-
|
|
104
|
+
o.setState("selectedId", h == null ? void 0 : h.id);
|
|
307
105
|
}
|
|
308
106
|
})
|
|
309
|
-
),
|
|
310
|
-
|
|
311
|
-
() =>
|
|
312
|
-
const
|
|
313
|
-
if (
|
|
314
|
-
return
|
|
315
|
-
const
|
|
316
|
-
|
|
317
|
-
if (
|
|
318
|
-
const
|
|
319
|
-
|
|
107
|
+
), x(
|
|
108
|
+
o,
|
|
109
|
+
() => m(o, ["renderedItems"], (a) => {
|
|
110
|
+
const d = a.renderedItems;
|
|
111
|
+
if (d.length)
|
|
112
|
+
return m(g, ["renderedItems"], (u) => {
|
|
113
|
+
const b = u.renderedItems;
|
|
114
|
+
b.some((f) => !f.tabId) && b.forEach((f, F) => {
|
|
115
|
+
if (f.tabId) return;
|
|
116
|
+
const T = d[F];
|
|
117
|
+
T && g.renderItem(P(v({}, f), { tabId: T.id }));
|
|
320
118
|
});
|
|
321
119
|
});
|
|
322
120
|
})
|
|
323
121
|
);
|
|
324
|
-
let
|
|
325
|
-
return
|
|
326
|
-
const
|
|
327
|
-
|
|
328
|
-
},
|
|
329
|
-
|
|
122
|
+
let C = null;
|
|
123
|
+
return x(o, () => {
|
|
124
|
+
const a = () => {
|
|
125
|
+
C = o.getState().selectedId;
|
|
126
|
+
}, d = () => {
|
|
127
|
+
I = !1, o.setState("selectedId", C);
|
|
330
128
|
};
|
|
331
129
|
if (t && "setSelectElement" in t)
|
|
332
|
-
return
|
|
333
|
-
|
|
334
|
-
|
|
130
|
+
return O(
|
|
131
|
+
m(t, ["value"], a),
|
|
132
|
+
m(t, ["mounted"], d)
|
|
335
133
|
);
|
|
336
|
-
if (
|
|
337
|
-
return
|
|
338
|
-
|
|
339
|
-
|
|
134
|
+
if (c)
|
|
135
|
+
return O(
|
|
136
|
+
m(c, ["selectedValue"], a),
|
|
137
|
+
m(c, ["mounted"], d)
|
|
340
138
|
);
|
|
341
|
-
}),
|
|
342
|
-
panels:
|
|
343
|
-
setSelectedId: (
|
|
344
|
-
select: (
|
|
345
|
-
|
|
139
|
+
}), P(v(v({}, i), o), {
|
|
140
|
+
panels: g,
|
|
141
|
+
setSelectedId: (a) => o.setState("selectedId", a),
|
|
142
|
+
select: (a) => {
|
|
143
|
+
o.setState("selectedId", a), i.move(a);
|
|
346
144
|
}
|
|
347
145
|
});
|
|
348
146
|
}
|
|
349
|
-
function
|
|
350
|
-
|
|
351
|
-
const [
|
|
352
|
-
return
|
|
353
|
-
|
|
147
|
+
function Ie(e, r, t) {
|
|
148
|
+
N(r, [t.composite, t.combobox]), e = ue(e, r, t), E(e, t, "selectedId", "setSelectedId"), E(e, t, "selectOnMove");
|
|
149
|
+
const [c, s] = w(() => e.panels, {});
|
|
150
|
+
return N(s, [e, s]), Object.assign(
|
|
151
|
+
H(() => z(B({}, e), { panels: c }), [e, c]),
|
|
354
152
|
{ composite: t.composite, combobox: t.combobox }
|
|
355
153
|
);
|
|
356
154
|
}
|
|
357
|
-
function
|
|
358
|
-
const r =
|
|
359
|
-
|
|
360
|
-
composite:
|
|
361
|
-
combobox:
|
|
155
|
+
function we(e = {}) {
|
|
156
|
+
const r = me(), t = fe() || r;
|
|
157
|
+
e = z(B({}, e), {
|
|
158
|
+
composite: e.composite !== void 0 ? e.composite : t,
|
|
159
|
+
combobox: e.combobox !== void 0 ? e.combobox : r
|
|
362
160
|
});
|
|
363
|
-
const [
|
|
364
|
-
return
|
|
161
|
+
const [c, s] = w(pe, e);
|
|
162
|
+
return Ie(c, s, e);
|
|
365
163
|
}
|
|
366
|
-
const
|
|
367
|
-
root:
|
|
164
|
+
const ge = "_root_peui8_2", j = {
|
|
165
|
+
root: ge,
|
|
368
166
|
"size-lg": "_size-lg_peui8_56",
|
|
369
167
|
"size-md": "_size-md_peui8_63",
|
|
370
168
|
"tab-list": "_tab-list_peui8_73"
|
|
371
169
|
};
|
|
372
|
-
function
|
|
373
|
-
icon:
|
|
170
|
+
function xe({
|
|
171
|
+
icon: e,
|
|
374
172
|
iconColor: r,
|
|
375
|
-
isActive: t
|
|
173
|
+
isActive: t,
|
|
174
|
+
size: c
|
|
376
175
|
}) {
|
|
377
|
-
if (!
|
|
378
|
-
if (typeof
|
|
379
|
-
const
|
|
176
|
+
if (!e) return null;
|
|
177
|
+
if (typeof e != "string") return e;
|
|
178
|
+
const s = (() => {
|
|
380
179
|
switch (r) {
|
|
381
180
|
case "blue":
|
|
382
181
|
return t ? "text-background-accent-blue-strong" : "text-background-accent-blue-primary";
|
|
@@ -396,69 +195,70 @@ function st({
|
|
|
396
195
|
return "";
|
|
397
196
|
}
|
|
398
197
|
})();
|
|
399
|
-
return /* @__PURE__ */
|
|
198
|
+
return /* @__PURE__ */ _(oe, { className: s, name: e, size: c });
|
|
400
199
|
}
|
|
401
|
-
const
|
|
200
|
+
const Se = $(j), L = te(
|
|
402
201
|
({
|
|
403
|
-
as:
|
|
202
|
+
as: e,
|
|
404
203
|
badge: r,
|
|
405
204
|
children: t,
|
|
406
|
-
className:
|
|
407
|
-
icon:
|
|
408
|
-
iconColor:
|
|
409
|
-
id:
|
|
410
|
-
size:
|
|
411
|
-
store:
|
|
412
|
-
...
|
|
413
|
-
},
|
|
414
|
-
const { selectedId:
|
|
415
|
-
icon:
|
|
416
|
-
iconColor:
|
|
417
|
-
isActive:
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
205
|
+
className: c,
|
|
206
|
+
icon: s,
|
|
207
|
+
iconColor: p = "violet",
|
|
208
|
+
id: l,
|
|
209
|
+
size: n = "lg",
|
|
210
|
+
store: i,
|
|
211
|
+
...g
|
|
212
|
+
}, k) => {
|
|
213
|
+
const { selectedId: o } = A(i), I = o === l, C = xe({
|
|
214
|
+
icon: s,
|
|
215
|
+
iconColor: p,
|
|
216
|
+
isActive: I,
|
|
217
|
+
size: n
|
|
218
|
+
}), a = I ? "neutral" : "warm";
|
|
219
|
+
return /* @__PURE__ */ K(
|
|
220
|
+
U,
|
|
421
221
|
{
|
|
422
|
-
className:
|
|
423
|
-
id:
|
|
424
|
-
ref:
|
|
425
|
-
render:
|
|
426
|
-
store:
|
|
427
|
-
...
|
|
222
|
+
className: Se("root", `size-${n}`, c),
|
|
223
|
+
id: l,
|
|
224
|
+
ref: k,
|
|
225
|
+
render: e ? /* @__PURE__ */ _(e, {}) : void 0,
|
|
226
|
+
store: i,
|
|
227
|
+
...g,
|
|
428
228
|
children: [
|
|
429
|
-
|
|
229
|
+
C,
|
|
430
230
|
t,
|
|
431
|
-
r ? /* @__PURE__ */
|
|
231
|
+
r ? /* @__PURE__ */ _(ee, { size: n, variant: a, children: r }) : null
|
|
432
232
|
]
|
|
433
233
|
}
|
|
434
234
|
);
|
|
435
235
|
}
|
|
436
236
|
);
|
|
437
|
-
|
|
438
|
-
const
|
|
439
|
-
|
|
440
|
-
const
|
|
441
|
-
({ children:
|
|
442
|
-
const
|
|
443
|
-
|
|
444
|
-
(
|
|
237
|
+
L.displayName = "Tabs.Tab";
|
|
238
|
+
const R = M(({ children: e, ...r }, t) => /* @__PURE__ */ _(q, { ref: t, ...r, children: e }));
|
|
239
|
+
R.displayName = "Tabs.Panel";
|
|
240
|
+
const ve = $(j), W = M(
|
|
241
|
+
({ children: e, className: r, size: t = "lg", store: c, ...s }, p) => {
|
|
242
|
+
const l = G.Children.map(
|
|
243
|
+
e,
|
|
244
|
+
(n) => Q(n) ? J(n, { size: t }) : n
|
|
445
245
|
);
|
|
446
|
-
return /* @__PURE__ */
|
|
447
|
-
|
|
246
|
+
return /* @__PURE__ */ _(
|
|
247
|
+
D,
|
|
448
248
|
{
|
|
449
|
-
className:
|
|
450
|
-
ref:
|
|
451
|
-
store:
|
|
452
|
-
...
|
|
453
|
-
children:
|
|
249
|
+
className: ve("tab-list", `size-${t}`, r),
|
|
250
|
+
ref: p,
|
|
251
|
+
store: c,
|
|
252
|
+
...s,
|
|
253
|
+
children: l
|
|
454
254
|
}
|
|
455
255
|
);
|
|
456
256
|
}
|
|
457
257
|
);
|
|
458
|
-
|
|
459
|
-
const
|
|
258
|
+
W.displayName = "Tabs";
|
|
259
|
+
const ze = Object.assign(W, { Panel: R, Tab: L });
|
|
460
260
|
export {
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
261
|
+
ze as Tabs,
|
|
262
|
+
W as TabsComponent,
|
|
263
|
+
we as useTab
|
|
464
264
|
};
|
package/dist/Window.css
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@layer components{._root_j3c87_2{border-style:solid;background-color:var(--components-colors-window-body-color-background-default);border-width:var(--components-dimensions-window-border-width);border-color:var(--components-colors-window-color-border-default);border-radius:var(--radius-lg);box-shadow:var(--elevation-10)}._header_j3c87_10{display:flex;align-items:center;justify-content:space-between;min-height:var(--components-dimensions-window-header-size-min-height);border-bottom:var(--components-dimensions-window-border-width) solid;border-color:var(--components-colors-window-color-border-default);padding-inline:var(--components-dimensions-window-header-padding-inline-xs);padding-block:var(--components-dimensions-window-header-padding-block-xs);gap:var(--components-dimensions-window-header-gap-content)}._header-title_j3c87_21{display:flex;flex:1;justify-content:center}._header-tabs_j3c87_26{display:flex;gap:var(--spacing-sm)}._header-tab-item_j3c87_30{cursor:pointer;display:flex;align-items:center;justify-content:center;transition-property:border-color,background-color,box-shadow;transition-timing-function:ease-in-out;border-radius:var(--radius-md);border-width:var(--components-dimensions-window-header-tab-border-width-active);gap:var(--spacing-xs);padding-block:var(--spacing-xs);padding-inline:var(--spacing-sm);transition-duration:var(--duration-fast);border-color:var(--windowTabItemBorderColor, transparent);background-color:var(--windowTabItemBackgroundColor, transparent);color:var(--windowTabItemColor, var(--components-colors-window-header-tab-color-text-default))}._header-tab-item_j3c87_30:hover{--windowTabItemBackgroundColor: var( --components-colors-window-header-tab-color-background-hover );--windowTabItemColor: var(--components-colors-window-header-tab-color-text-hover)}._header-tab-item_j3c87_30[aria-selected=true]{--windowTabItemBorderColor: var(--color-border-brand-primary);--windowTabItemBackgroundColor: var( --components-colors-window-header-tab-color-background-active );--windowTabItemColor: var(--components-colors-window-header-tab-color-text-active)}._header-action-button_j3c87_62{cursor:pointer;display:flex;justify-content:center;align-items:center;transition-property:border-color,background-color,box-shadow;transition-timing-function:ease-in-out;transition-duration:var(--duration-fast);width:var(--components-dimensions-window-header-action-size-container);height:var(--components-dimensions-window-header-action-size-container);border-radius:var(--components-dimensions-window-header-action-border-radius);outline:transparent solid var(--border-width-md);background-color:var(--windowButtonBackgroundColor, transparent)}._header-action-button_j3c87_62 svg{color:var(--windowButtonIconColor, var(--components-colors-window-header-action-color-icon-common-default))}._header-action-button_j3c87_62[data-focus-visible],._header-action-button_j3c87_62:focus-visible{outline-width:var(--components-dimensions-button-border-width-focused);outline-color:var(--components-colors-button-color-border-focused)}._header-action-button_j3c87_62:hover{--windowButtonBackgroundColor: var( --components-colors-window-header-action-color-background-common-hover );--windowButtonIconColor: var( --components-colors-window-header-action-color-icon-common-hover )}._header-action-button_j3c87_62:active{--windowButtonBackgroundColor: var( --components-colors-window-header-action-color-background-common-pressed );--windowButtonIconColor: var( --components-colors-window-header-action-color-icon-common-pressed )}._header-close-button_j3c87_101{border:1px solid var(--components-colors-window-header-action-color-border-close-default);--windowButtonIconColor: var(--components-colors-window-header-action-color-icon-close-default)}._header-close-button_j3c87_101:hover{--windowButtonBackgroundColor: var( --components-colors-window-header-action-color-background-close-hover );--windowButtonIconColor: var(--components-colors-window-header-action-color-icon-close-hover)}._header-close-button_j3c87_101:active{--windowButtonBackgroundColor: var( --components-colors-window-header-action-color-background-close-pressed );--windowButtonIconColor: var( --components-colors-window-header-action-color-icon-close-pressed )}._header-actions_j3c87_119{display:flex;gap:var(--components-dimensions-window-header-gap-content)}._tab-panel_j3c87_123[hidden]{display:none}._media_j3c87_126,._box-text_j3c87_127{margin-block:var(--components-dimensions-window-body-padding-block-xs);margin-inline:var(--components-dimensions-window-body-padding-inline-xs)}._media_j3c87_126 :first-child{border-radius:var(--components-dimensions-window-border-radius);max-width:100%;height:auto}._box-text_j3c87_127{border-radius:var(--components-dimensions-window-border-radius);background-color:var(--color-background-warm-primary);padding-block:var(--components-dimensions-window-body-padding-block-sm);padding-inline:var(--components-dimensions-window-body-padding-inline-sm)}._size-xl_j3c87_142{padding-block:var(--components-dimensions-window-body-padding-block-xl);padding-inline:var(--components-dimensions-window-body-padding-inline-xl)}._size-lg_j3c87_146{padding-block:var(--components-dimensions-window-body-padding-block-lg);padding-inline:var(--components-dimensions-window-body-padding-inline-lg)}._size-md_j3c87_150{padding-block:var(--components-dimensions-window-body-padding-block-md);padding-inline:var(--components-dimensions-window-body-padding-inline-md)}._size-sm_j3c87_154{padding-block:var(--components-dimensions-window-body-padding-block-sm);padding-inline:var(--components-dimensions-window-body-padding-inline-sm)}._size-xs_j3c87_158{padding-block:var(--components-dimensions-window-body-padding-block-xs);padding-inline:var(--components-dimensions-window-body-padding-inline-xs)}}
|