zabi-components 1.0.11 → 2.0.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/README.md +38 -22
- package/dist/Card-BIAsG5HX.js +222 -0
- package/dist/Navigation-BoOnkbXw.js +81 -0
- package/dist/Tabs-DXN_BqPw.js +509 -0
- package/dist/ThemeToggle-CRI92cOb.js +35 -0
- package/dist/Tooltip-C9G35OZ6.js +1230 -0
- package/dist/atoms/index.js +23 -21
- package/dist/index/index.js +462 -202
- package/dist/molecules/index.js +12 -12
- package/dist/organisms/index.js +2 -3
- package/dist/store-ZmZCXeMy.js +2413 -0
- package/package.json +3 -3
- package/dist/Tabs-RCuPHjEL.js +0 -1105
- package/dist/Toast-BTynzMV8.js +0 -446
- package/dist/ToastManager-Bd5Slcp4.js +0 -359
- package/dist/Toggle-LURK-bI8.js +0 -2507
- package/dist/Tooltip-BoApUzYg.js +0 -1163
- package/dist/x-Dsi-CPO3.js +0 -3073
package/dist/index/index.js
CHANGED
|
@@ -1,76 +1,170 @@
|
|
|
1
|
-
import { B as
|
|
2
|
-
import { B as
|
|
3
|
-
import { T as
|
|
4
|
-
import { A as
|
|
5
|
-
import { N as
|
|
6
|
-
const
|
|
7
|
-
const { shouldFocus:
|
|
8
|
-
function
|
|
9
|
-
|
|
1
|
+
import { B as pe, C as me, a as xe, H as ve, I as ye, b as he, c as ge, O as Ie, P as Te, d as ke, S as Ce, e as we, f as De, T as Ae, g as Ee, h as Be, i as Fe, j as Le } from "../Tooltip-C9G35OZ6.js";
|
|
2
|
+
import { B as Oe, C as ze } from "../Card-BIAsG5HX.js";
|
|
3
|
+
import { T as Pe } from "../ThemeToggle-CRI92cOb.js";
|
|
4
|
+
import { A as $e, C as je, a as Me, D as Ke, F as qe, H as Re, I as Ve, L as Ue, M as We, S as Ge, b as Je, T as Qe } from "../Tabs-DXN_BqPw.js";
|
|
5
|
+
import { N as Ye, a as Ze } from "../Navigation-BoOnkbXw.js";
|
|
6
|
+
const h = (e, t) => {
|
|
7
|
+
const { shouldFocus: r = !1, delay: n = 0 } = t || {};
|
|
8
|
+
function o() {
|
|
9
|
+
r && (n > 0 ? setTimeout(() => e.focus(), n) : e.focus());
|
|
10
10
|
}
|
|
11
|
-
return
|
|
12
|
-
update(
|
|
13
|
-
const { shouldFocus:
|
|
14
|
-
|
|
11
|
+
return r && o(), {
|
|
12
|
+
update(a) {
|
|
13
|
+
const { shouldFocus: s = !1, delay: i = 0 } = a || {};
|
|
14
|
+
s && (i > 0 ? setTimeout(() => e.focus(), i) : e.focus());
|
|
15
15
|
}
|
|
16
16
|
};
|
|
17
|
-
},
|
|
18
|
-
function
|
|
19
|
-
e.contains(
|
|
17
|
+
}, g = (e, t) => {
|
|
18
|
+
function r(n) {
|
|
19
|
+
e.contains(n.target) || t(n);
|
|
20
20
|
}
|
|
21
|
-
return document.addEventListener("click",
|
|
21
|
+
return document.addEventListener("click", r, !0), {
|
|
22
22
|
destroy() {
|
|
23
|
-
document.removeEventListener("click",
|
|
23
|
+
document.removeEventListener("click", r, !0);
|
|
24
24
|
}
|
|
25
25
|
};
|
|
26
|
-
},
|
|
27
|
-
function
|
|
28
|
-
|
|
26
|
+
}, I = (e, t) => {
|
|
27
|
+
function r(n) {
|
|
28
|
+
n.key === "Escape" && t(n);
|
|
29
29
|
}
|
|
30
|
-
return e.addEventListener("keydown",
|
|
30
|
+
return e.addEventListener("keydown", r), {
|
|
31
31
|
destroy() {
|
|
32
|
-
e.removeEventListener("keydown",
|
|
32
|
+
e.removeEventListener("keydown", r);
|
|
33
33
|
}
|
|
34
34
|
};
|
|
35
|
-
},
|
|
36
|
-
const
|
|
37
|
-
return
|
|
35
|
+
}, T = (e, t) => {
|
|
36
|
+
const r = new ResizeObserver(t);
|
|
37
|
+
return r.observe(e), {
|
|
38
38
|
destroy() {
|
|
39
|
-
|
|
39
|
+
r.disconnect();
|
|
40
40
|
}
|
|
41
41
|
};
|
|
42
|
-
},
|
|
43
|
-
const
|
|
44
|
-
return
|
|
42
|
+
}, k = (e, { callback: t, options: r = {} }) => {
|
|
43
|
+
const n = new IntersectionObserver(t, r);
|
|
44
|
+
return n.observe(e), {
|
|
45
45
|
destroy() {
|
|
46
|
-
|
|
46
|
+
n.disconnect();
|
|
47
47
|
}
|
|
48
48
|
};
|
|
49
|
-
},
|
|
50
|
-
function
|
|
49
|
+
}, C = (e) => {
|
|
50
|
+
function t() {
|
|
51
51
|
e.style.height = "auto", e.style.height = `${e.scrollHeight}px`;
|
|
52
52
|
}
|
|
53
|
-
return
|
|
53
|
+
return t(), e.addEventListener("input", t), {
|
|
54
54
|
destroy() {
|
|
55
|
-
e.removeEventListener("input",
|
|
55
|
+
e.removeEventListener("input", t);
|
|
56
56
|
}
|
|
57
57
|
};
|
|
58
|
-
},
|
|
59
|
-
const
|
|
60
|
-
|
|
61
|
-
|
|
58
|
+
}, w = (e, { src: t, onLoad: r, onError: n }) => {
|
|
59
|
+
const o = new IntersectionObserver((a) => {
|
|
60
|
+
a.forEach((s) => {
|
|
61
|
+
s.isIntersecting && (e instanceof HTMLImageElement && (e.src = t, e.onload = r, e.onerror = n), o.unobserve(e));
|
|
62
62
|
});
|
|
63
63
|
});
|
|
64
|
-
return
|
|
65
|
-
update(
|
|
66
|
-
|
|
64
|
+
return o.observe(e), {
|
|
65
|
+
update(a) {
|
|
66
|
+
a != null && a.src && e instanceof HTMLImageElement && (e.src = a.src);
|
|
67
67
|
},
|
|
68
68
|
destroy() {
|
|
69
|
-
|
|
69
|
+
o.disconnect();
|
|
70
70
|
}
|
|
71
71
|
};
|
|
72
72
|
};
|
|
73
|
-
function
|
|
73
|
+
function D(e) {
|
|
74
|
+
return {
|
|
75
|
+
value: e.value,
|
|
76
|
+
hasValue: !!(e.value && e.value.trim()),
|
|
77
|
+
isFocused: !1,
|
|
78
|
+
hasError: !!e.error || e.variant === "error",
|
|
79
|
+
hasSuccess: !!e.success || e.variant === "success"
|
|
80
|
+
};
|
|
81
|
+
}
|
|
82
|
+
function A(e, t) {
|
|
83
|
+
return {
|
|
84
|
+
...e,
|
|
85
|
+
value: t,
|
|
86
|
+
hasValue: !!(t && t.trim())
|
|
87
|
+
};
|
|
88
|
+
}
|
|
89
|
+
function E(e, t) {
|
|
90
|
+
return {
|
|
91
|
+
...e,
|
|
92
|
+
isFocused: t
|
|
93
|
+
};
|
|
94
|
+
}
|
|
95
|
+
function B(e, t, r, n) {
|
|
96
|
+
return {
|
|
97
|
+
...e,
|
|
98
|
+
hasError: !!t || n === "error",
|
|
99
|
+
hasSuccess: !!r || n === "success"
|
|
100
|
+
};
|
|
101
|
+
}
|
|
102
|
+
function F(e) {
|
|
103
|
+
return e || `input-${Math.random().toString(36).substr(2, 9)}`;
|
|
104
|
+
}
|
|
105
|
+
function L(e, t, r) {
|
|
106
|
+
return { value: e, event: t, field: r };
|
|
107
|
+
}
|
|
108
|
+
function S(e, t, r, n) {
|
|
109
|
+
return { value: e, event: t, field: r, checked: n };
|
|
110
|
+
}
|
|
111
|
+
const m = {
|
|
112
|
+
sm: {
|
|
113
|
+
input: "px-3 py-1.5 text-sm",
|
|
114
|
+
label: "text-xs",
|
|
115
|
+
helper: "text-xs"
|
|
116
|
+
},
|
|
117
|
+
md: {
|
|
118
|
+
input: "px-4 py-2.5 text-sm",
|
|
119
|
+
label: "text-sm",
|
|
120
|
+
helper: "text-xs"
|
|
121
|
+
},
|
|
122
|
+
lg: {
|
|
123
|
+
input: "px-5 py-3 text-base",
|
|
124
|
+
label: "text-base",
|
|
125
|
+
helper: "text-sm"
|
|
126
|
+
}
|
|
127
|
+
}, O = [
|
|
128
|
+
"w-full",
|
|
129
|
+
"min-w-0",
|
|
130
|
+
"rounded-md",
|
|
131
|
+
"transition-all",
|
|
132
|
+
"duration-200",
|
|
133
|
+
"ease-in-out",
|
|
134
|
+
"focus:outline-none",
|
|
135
|
+
"focus:ring-2",
|
|
136
|
+
"focus:ring-focus-ring",
|
|
137
|
+
"focus:ring-offset-2",
|
|
138
|
+
"disabled:opacity-50",
|
|
139
|
+
"disabled:cursor-not-allowed",
|
|
140
|
+
"read-only:cursor-default",
|
|
141
|
+
"read-only:opacity-75"
|
|
142
|
+
].join(" ");
|
|
143
|
+
function z(e, t) {
|
|
144
|
+
return e ? "border-error text-text placeholder-text-placeholder focus:ring-error focus:border-error" : t ? "border-success text-text placeholder-text-placeholder focus:ring-success focus:border-success" : "border-border text-text placeholder-text-placeholder focus:ring-focus-ring focus:border-border-focus";
|
|
145
|
+
}
|
|
146
|
+
function H(e) {
|
|
147
|
+
return e ? "bg-surface-disabled text-text-disabled border-border-disabled cursor-not-allowed" : "";
|
|
148
|
+
}
|
|
149
|
+
function P(e, t, r) {
|
|
150
|
+
return [
|
|
151
|
+
"block",
|
|
152
|
+
m[r].label,
|
|
153
|
+
"font-medium",
|
|
154
|
+
"mb-2",
|
|
155
|
+
"transition-colors",
|
|
156
|
+
"duration-200",
|
|
157
|
+
e ? "text-error" : t ? "text-success" : "text-text"
|
|
158
|
+
].join(" ");
|
|
159
|
+
}
|
|
160
|
+
function N(e, t, r) {
|
|
161
|
+
return [
|
|
162
|
+
"mt-2",
|
|
163
|
+
m[r].helper,
|
|
164
|
+
e ? "text-error" : t ? "text-success" : "text-text-secondary"
|
|
165
|
+
].join(" ");
|
|
166
|
+
}
|
|
167
|
+
function $(e = "") {
|
|
74
168
|
return {
|
|
75
169
|
isOpen: !1,
|
|
76
170
|
activeItem: e,
|
|
@@ -78,10 +172,10 @@ function h(e = "") {
|
|
|
78
172
|
isKeyboardNavigation: !1
|
|
79
173
|
};
|
|
80
174
|
}
|
|
81
|
-
function
|
|
82
|
-
return { ...e, ...
|
|
175
|
+
function j(e, t) {
|
|
176
|
+
return { ...e, ...t };
|
|
83
177
|
}
|
|
84
|
-
const
|
|
178
|
+
const f = {
|
|
85
179
|
density: {
|
|
86
180
|
compact: "density-compact",
|
|
87
181
|
comfortable: "density-comfortable"
|
|
@@ -94,130 +188,130 @@ const c = {
|
|
|
94
188
|
pagination: "nav-pagination"
|
|
95
189
|
}
|
|
96
190
|
};
|
|
97
|
-
function
|
|
191
|
+
function M(e, t, r = "") {
|
|
98
192
|
return [
|
|
99
193
|
"modern-navigation",
|
|
100
|
-
|
|
194
|
+
f.variant[e.variant],
|
|
101
195
|
`nav-${e.orientation}`,
|
|
102
|
-
|
|
196
|
+
f.density[e.density],
|
|
103
197
|
e.responsive ? "responsive" : "",
|
|
104
198
|
e.collapsible ? "collapsible" : "",
|
|
105
|
-
|
|
106
|
-
|
|
199
|
+
t.isOpen ? "open" : "",
|
|
200
|
+
r
|
|
107
201
|
].filter(Boolean).join(" ");
|
|
108
202
|
}
|
|
109
|
-
function
|
|
110
|
-
return function(
|
|
111
|
-
if (!(!e.isOpen &&
|
|
112
|
-
switch (
|
|
203
|
+
function K(e, t, r, n) {
|
|
204
|
+
return function(a) {
|
|
205
|
+
if (!(!e.isOpen && a.key !== "Enter" && a.key !== " "))
|
|
206
|
+
switch (t({ isKeyboardNavigation: !0 }), a.key) {
|
|
113
207
|
case "Enter":
|
|
114
208
|
case " ":
|
|
115
|
-
|
|
116
|
-
const
|
|
117
|
-
(
|
|
209
|
+
a.preventDefault();
|
|
210
|
+
const s = document.activeElement;
|
|
211
|
+
(s == null ? void 0 : s.getAttribute("role")) === "menuitem" && s.click();
|
|
118
212
|
break;
|
|
119
213
|
case "Escape":
|
|
120
|
-
e.isOpen &&
|
|
214
|
+
e.isOpen && t({ isOpen: !1 });
|
|
121
215
|
break;
|
|
122
216
|
case "ArrowDown":
|
|
123
|
-
|
|
217
|
+
a.preventDefault(), b(e, t, r);
|
|
124
218
|
break;
|
|
125
219
|
case "ArrowUp":
|
|
126
|
-
|
|
220
|
+
a.preventDefault(), p(e, t, r);
|
|
127
221
|
break;
|
|
128
222
|
case "ArrowRight":
|
|
129
|
-
|
|
223
|
+
a.preventDefault(), e.isOpen && b(e, t, r);
|
|
130
224
|
break;
|
|
131
225
|
case "ArrowLeft":
|
|
132
|
-
|
|
226
|
+
a.preventDefault(), p(e, t, r);
|
|
133
227
|
break;
|
|
134
228
|
case "Home":
|
|
135
|
-
|
|
229
|
+
a.preventDefault(), v(e, t, r);
|
|
136
230
|
break;
|
|
137
231
|
case "End":
|
|
138
|
-
|
|
232
|
+
a.preventDefault(), y(e, t, r);
|
|
139
233
|
break;
|
|
140
234
|
}
|
|
141
235
|
};
|
|
142
236
|
}
|
|
143
|
-
function
|
|
144
|
-
var
|
|
145
|
-
const
|
|
146
|
-
if (
|
|
147
|
-
const
|
|
148
|
-
|
|
149
|
-
}
|
|
150
|
-
function
|
|
151
|
-
var
|
|
152
|
-
const
|
|
153
|
-
if (
|
|
154
|
-
const
|
|
155
|
-
|
|
156
|
-
}
|
|
157
|
-
function
|
|
158
|
-
var
|
|
159
|
-
const
|
|
160
|
-
|
|
161
|
-
}
|
|
162
|
-
function
|
|
163
|
-
var
|
|
164
|
-
const
|
|
165
|
-
if (
|
|
166
|
-
const
|
|
167
|
-
|
|
168
|
-
}
|
|
169
|
-
function
|
|
237
|
+
function b(e, t, r) {
|
|
238
|
+
var a;
|
|
239
|
+
const n = r();
|
|
240
|
+
if (n.length === 0) return;
|
|
241
|
+
const o = (e.currentFocusIndex + 1) % n.length;
|
|
242
|
+
t({ currentFocusIndex: o }), (a = n[o]) == null || a.focus();
|
|
243
|
+
}
|
|
244
|
+
function p(e, t, r) {
|
|
245
|
+
var a;
|
|
246
|
+
const n = r();
|
|
247
|
+
if (n.length === 0) return;
|
|
248
|
+
const o = e.currentFocusIndex <= 0 ? n.length - 1 : e.currentFocusIndex - 1;
|
|
249
|
+
t({ currentFocusIndex: o }), (a = n[o]) == null || a.focus();
|
|
250
|
+
}
|
|
251
|
+
function v(e, t, r) {
|
|
252
|
+
var o;
|
|
253
|
+
const n = r();
|
|
254
|
+
n.length !== 0 && (t({ currentFocusIndex: 0 }), (o = n[0]) == null || o.focus());
|
|
255
|
+
}
|
|
256
|
+
function y(e, t, r) {
|
|
257
|
+
var a;
|
|
258
|
+
const n = r();
|
|
259
|
+
if (n.length === 0) return;
|
|
260
|
+
const o = n.length - 1;
|
|
261
|
+
t({ currentFocusIndex: o }), (a = n[o]) == null || a.focus();
|
|
262
|
+
}
|
|
263
|
+
function q(e) {
|
|
170
264
|
return Array.from(
|
|
171
265
|
e.querySelectorAll(
|
|
172
266
|
'a[href], button:not([disabled]), [tabindex]:not([tabindex="-1"])'
|
|
173
267
|
)
|
|
174
268
|
);
|
|
175
269
|
}
|
|
176
|
-
function
|
|
270
|
+
function R(e, t, r) {
|
|
177
271
|
return {
|
|
178
272
|
toggle: () => {
|
|
179
|
-
const
|
|
180
|
-
|
|
181
|
-
var
|
|
182
|
-
const
|
|
183
|
-
|
|
273
|
+
const n = !e.isOpen;
|
|
274
|
+
t({ isOpen: n }), n && setTimeout(() => {
|
|
275
|
+
var a;
|
|
276
|
+
const o = r();
|
|
277
|
+
o.length > 0 && (t({ currentFocusIndex: 0 }), (a = o[0]) == null || a.focus());
|
|
184
278
|
}, 100);
|
|
185
279
|
},
|
|
186
280
|
open: () => {
|
|
187
|
-
|
|
188
|
-
var
|
|
189
|
-
const
|
|
190
|
-
|
|
281
|
+
t({ isOpen: !0 }), setTimeout(() => {
|
|
282
|
+
var o;
|
|
283
|
+
const n = r();
|
|
284
|
+
n.length > 0 && (t({ currentFocusIndex: 0 }), (o = n[0]) == null || o.focus());
|
|
191
285
|
}, 100);
|
|
192
286
|
},
|
|
193
287
|
close: () => {
|
|
194
|
-
|
|
288
|
+
t({ isOpen: !1 });
|
|
195
289
|
}
|
|
196
290
|
};
|
|
197
291
|
}
|
|
198
|
-
function
|
|
199
|
-
return function(
|
|
200
|
-
if (
|
|
201
|
-
|
|
292
|
+
function V(e, t, r) {
|
|
293
|
+
return function(o, a) {
|
|
294
|
+
if (o.disabled) {
|
|
295
|
+
a.preventDefault();
|
|
202
296
|
return;
|
|
203
297
|
}
|
|
204
|
-
e({ activeItem:
|
|
298
|
+
e({ activeItem: o.id }), r("item-click", { item: o, event: a }), t.collapsible && t.variant !== "tabs" && e({ isOpen: !1 });
|
|
205
299
|
};
|
|
206
300
|
}
|
|
207
|
-
const
|
|
301
|
+
const U = {
|
|
208
302
|
mobile: 768,
|
|
209
303
|
tablet: 1024,
|
|
210
304
|
desktop: 1280
|
|
211
305
|
};
|
|
212
|
-
function
|
|
306
|
+
function W(e, t, r, n = "navigation") {
|
|
213
307
|
return {
|
|
214
|
-
"aria-label":
|
|
215
|
-
"aria-describedby":
|
|
216
|
-
role:
|
|
308
|
+
"aria-label": t || `${e} navigation`,
|
|
309
|
+
"aria-describedby": r || void 0,
|
|
310
|
+
role: n,
|
|
217
311
|
"data-variant": e
|
|
218
312
|
};
|
|
219
313
|
}
|
|
220
|
-
function
|
|
314
|
+
function G(e) {
|
|
221
315
|
return {
|
|
222
316
|
"aria-expanded": e,
|
|
223
317
|
"aria-controls": "navigation-menu",
|
|
@@ -225,98 +319,264 @@ function F(e) {
|
|
|
225
319
|
"aria-label": "Toggle navigation menu"
|
|
226
320
|
};
|
|
227
321
|
}
|
|
228
|
-
function
|
|
322
|
+
function J(e, t) {
|
|
229
323
|
return {
|
|
230
324
|
id: "navigation-menu",
|
|
231
325
|
role: e === "horizontal" ? "menubar" : "menu",
|
|
232
326
|
"aria-orientation": e,
|
|
233
|
-
"aria-label": `${
|
|
327
|
+
"aria-label": `${t} menu`
|
|
328
|
+
};
|
|
329
|
+
}
|
|
330
|
+
function Q(e, t) {
|
|
331
|
+
const r = t || (e.length > 0 ? e[0].id : "");
|
|
332
|
+
return {
|
|
333
|
+
activeTab: r,
|
|
334
|
+
activeTabIndex: e.findIndex((n) => n.id === r)
|
|
335
|
+
};
|
|
336
|
+
}
|
|
337
|
+
function X(e, t, r) {
|
|
338
|
+
return {
|
|
339
|
+
activeTab: r,
|
|
340
|
+
activeTabIndex: t.findIndex((n) => n.id === r)
|
|
234
341
|
};
|
|
235
342
|
}
|
|
343
|
+
const x = {
|
|
344
|
+
sm: {
|
|
345
|
+
tab: "px-3 py-1.5 text-sm",
|
|
346
|
+
panel: "p-3",
|
|
347
|
+
icon: "w-4 h-4"
|
|
348
|
+
},
|
|
349
|
+
md: {
|
|
350
|
+
tab: "px-4 py-2 text-base",
|
|
351
|
+
panel: "p-4",
|
|
352
|
+
icon: "w-5 h-5"
|
|
353
|
+
},
|
|
354
|
+
lg: {
|
|
355
|
+
tab: "px-6 py-3 text-lg",
|
|
356
|
+
panel: "p-6",
|
|
357
|
+
icon: "w-6 h-6"
|
|
358
|
+
}
|
|
359
|
+
}, d = {
|
|
360
|
+
default: {
|
|
361
|
+
container: "border-b border-primary",
|
|
362
|
+
tab: "border-b-2 border-transparent text-secondary hover:text-primary hover:border-primary-hover transition-colors",
|
|
363
|
+
activeTab: "border-primary text-primary",
|
|
364
|
+
panel: "mt-4"
|
|
365
|
+
},
|
|
366
|
+
pills: {
|
|
367
|
+
container: "bg-surface-secondary p-1 rounded-lg",
|
|
368
|
+
tab: "rounded-md text-secondary hover:text-primary hover:bg-surface-tertiary transition-colors",
|
|
369
|
+
activeTab: "bg-surface text-primary shadow-adaptive-sm",
|
|
370
|
+
panel: "mt-4"
|
|
371
|
+
},
|
|
372
|
+
underline: {
|
|
373
|
+
container: "border-b border-primary",
|
|
374
|
+
tab: "relative text-secondary hover:text-primary transition-colors",
|
|
375
|
+
activeTab: "text-primary",
|
|
376
|
+
panel: "mt-4"
|
|
377
|
+
},
|
|
378
|
+
cards: {
|
|
379
|
+
container: "space-y-2",
|
|
380
|
+
tab: "border border-primary rounded-lg text-secondary hover:text-primary hover:bg-surface-secondary transition-colors",
|
|
381
|
+
activeTab: "bg-surface text-primary shadow-adaptive-sm border-primary",
|
|
382
|
+
panel: "mt-4"
|
|
383
|
+
}
|
|
384
|
+
};
|
|
385
|
+
function Y(e, t, r) {
|
|
386
|
+
const n = x[e.size], o = d[e.variant];
|
|
387
|
+
return [
|
|
388
|
+
n.tab,
|
|
389
|
+
o.tab,
|
|
390
|
+
r ? o.activeTab : "",
|
|
391
|
+
t.disabled ? "opacity-50 cursor-not-allowed" : "cursor-pointer",
|
|
392
|
+
e.fullWidth ? "flex-1" : "",
|
|
393
|
+
"flex items-center justify-center gap-2"
|
|
394
|
+
].filter(Boolean).join(" ");
|
|
395
|
+
}
|
|
396
|
+
function Z(e, t = []) {
|
|
397
|
+
return [
|
|
398
|
+
d[e.variant].container,
|
|
399
|
+
e.orientation === "vertical" ? "flex-col space-y-1 mr-4" : "",
|
|
400
|
+
e.fullWidth ? `grid grid-cols-${t.length || 1}` : "flex"
|
|
401
|
+
].filter(Boolean).join(" ");
|
|
402
|
+
}
|
|
403
|
+
function _(e, t) {
|
|
404
|
+
const r = x[e.size], n = d[e.variant];
|
|
405
|
+
return [
|
|
406
|
+
r.panel,
|
|
407
|
+
n.panel,
|
|
408
|
+
t ? "block" : "hidden"
|
|
409
|
+
].filter(Boolean).join(" ");
|
|
410
|
+
}
|
|
411
|
+
function ee(e, t, r, n) {
|
|
412
|
+
return function(a) {
|
|
413
|
+
const s = Array.from(
|
|
414
|
+
document.querySelectorAll('[role="tab"]')
|
|
415
|
+
), i = s.findIndex(
|
|
416
|
+
(l) => l === document.activeElement
|
|
417
|
+
);
|
|
418
|
+
let c = i;
|
|
419
|
+
switch (a.key) {
|
|
420
|
+
case "ArrowRight":
|
|
421
|
+
case "ArrowDown":
|
|
422
|
+
a.preventDefault(), c = (i + 1) % e.length;
|
|
423
|
+
break;
|
|
424
|
+
case "ArrowLeft":
|
|
425
|
+
case "ArrowUp":
|
|
426
|
+
a.preventDefault(), c = i === 0 ? e.length - 1 : i - 1;
|
|
427
|
+
break;
|
|
428
|
+
case "Home":
|
|
429
|
+
a.preventDefault(), c = 0;
|
|
430
|
+
break;
|
|
431
|
+
case "End":
|
|
432
|
+
a.preventDefault(), c = e.length - 1;
|
|
433
|
+
break;
|
|
434
|
+
case "Enter":
|
|
435
|
+
case " ":
|
|
436
|
+
a.preventDefault();
|
|
437
|
+
const l = s[i];
|
|
438
|
+
l && l.click();
|
|
439
|
+
return;
|
|
440
|
+
}
|
|
441
|
+
c !== i && s[c] && s[c].focus();
|
|
442
|
+
};
|
|
443
|
+
}
|
|
444
|
+
function te(e, t, r) {
|
|
445
|
+
return function(o, a) {
|
|
446
|
+
o.disabled || (t({ activeTab: o.id }), r("change", { activeTab: o.id, tab: o, event: a }), r("tabClick", { tab: o, event: a }));
|
|
447
|
+
};
|
|
448
|
+
}
|
|
449
|
+
function re(e, t) {
|
|
450
|
+
const r = t.querySelector(
|
|
451
|
+
`[data-tab-id="${e}"]`
|
|
452
|
+
);
|
|
453
|
+
r == null || r.focus();
|
|
454
|
+
}
|
|
455
|
+
function ne(e, t) {
|
|
456
|
+
return e.find((r) => r.id === t);
|
|
457
|
+
}
|
|
458
|
+
function ae(e, t) {
|
|
459
|
+
return e.id === t;
|
|
460
|
+
}
|
|
461
|
+
function oe(e, t, r) {
|
|
462
|
+
return {
|
|
463
|
+
"aria-selected": t,
|
|
464
|
+
"aria-controls": `tabpanel-${e.id}`,
|
|
465
|
+
"aria-disabled": e.disabled,
|
|
466
|
+
tabindex: t ? 0 : -1
|
|
467
|
+
};
|
|
468
|
+
}
|
|
469
|
+
function se(e) {
|
|
470
|
+
return {
|
|
471
|
+
id: `tabpanel-${e.id}`,
|
|
472
|
+
role: "tabpanel",
|
|
473
|
+
"aria-labelledby": `tab-${e.id}`
|
|
474
|
+
};
|
|
475
|
+
}
|
|
476
|
+
function u() {
|
|
477
|
+
return typeof window < "u" && typeof document < "u";
|
|
478
|
+
}
|
|
479
|
+
function ie() {
|
|
480
|
+
return u() ? window : void 0;
|
|
481
|
+
}
|
|
482
|
+
function ce() {
|
|
483
|
+
return u() ? document : void 0;
|
|
484
|
+
}
|
|
485
|
+
function ue(e) {
|
|
486
|
+
return u() ? requestAnimationFrame(e) : void 0;
|
|
487
|
+
}
|
|
488
|
+
function le(e, t) {
|
|
489
|
+
return u() ? setTimeout(e, t) : void 0;
|
|
490
|
+
}
|
|
491
|
+
function de(e) {
|
|
492
|
+
u() && e && clearTimeout(e);
|
|
493
|
+
}
|
|
236
494
|
export {
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
xe as
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
495
|
+
$e as Alert,
|
|
496
|
+
pe as Badge,
|
|
497
|
+
Oe as Button,
|
|
498
|
+
ze as Card,
|
|
499
|
+
je as CardsGrid,
|
|
500
|
+
me as Checkbox,
|
|
501
|
+
Me as ColorDemo,
|
|
502
|
+
xe as ColorPicker,
|
|
503
|
+
Ke as Dropdown,
|
|
504
|
+
qe as Form,
|
|
505
|
+
ve as Heading,
|
|
506
|
+
Re as Hero,
|
|
507
|
+
Ve as ImageUpload,
|
|
508
|
+
ye as Input,
|
|
509
|
+
he as InputActions,
|
|
510
|
+
ge as InputValidation,
|
|
511
|
+
Ue as Layout,
|
|
512
|
+
We as Modal,
|
|
513
|
+
Ye as Navbar,
|
|
514
|
+
Ze as Navigation,
|
|
515
|
+
Ie as OptimizedImage,
|
|
516
|
+
Te as PerformanceMonitor,
|
|
517
|
+
ke as Progress,
|
|
518
|
+
Ce as ScaleDemo,
|
|
519
|
+
we as Select,
|
|
520
|
+
Ge as SelectedCardInfo,
|
|
521
|
+
De as Skeleton,
|
|
522
|
+
Je as SlideUp,
|
|
523
|
+
Qe as Tabs,
|
|
524
|
+
Ae as TextAlignment,
|
|
525
|
+
Ee as Textarea,
|
|
526
|
+
Pe as ThemeToggle,
|
|
527
|
+
Be as Toast,
|
|
528
|
+
Fe as Toggle,
|
|
529
|
+
Le as Tooltip,
|
|
530
|
+
C as autoResize,
|
|
531
|
+
O as baseInputClasses,
|
|
532
|
+
U as breakpoints,
|
|
533
|
+
g as clickOutside,
|
|
534
|
+
S as createChangeEventDetail,
|
|
535
|
+
L as createInputEventDetail,
|
|
536
|
+
D as createInputState,
|
|
537
|
+
V as createItemClickHandler,
|
|
538
|
+
K as createKeyboardNavigation,
|
|
539
|
+
R as createMenuState,
|
|
540
|
+
$ as createNavigationState,
|
|
541
|
+
te as createTabClickHandler,
|
|
542
|
+
ee as createTabsKeyboardNavigation,
|
|
543
|
+
Q as createTabsState,
|
|
544
|
+
I as escapeKey,
|
|
545
|
+
h as focus,
|
|
546
|
+
re as focusTab,
|
|
547
|
+
m as formSizeClasses,
|
|
548
|
+
F as generateInputId,
|
|
549
|
+
W as getAccessibilityProps,
|
|
550
|
+
Z as getContainerClasses,
|
|
551
|
+
H as getDisabledClasses,
|
|
552
|
+
q as getFocusableItems,
|
|
553
|
+
N as getHelperTextClasses,
|
|
554
|
+
P as getLabelClasses,
|
|
555
|
+
G as getMenuButtonProps,
|
|
556
|
+
J as getMenuListProps,
|
|
557
|
+
M as getNavigationClasses,
|
|
558
|
+
se as getPanelAccessibilityProps,
|
|
559
|
+
_ as getPanelClasses,
|
|
560
|
+
z as getStateClasses,
|
|
561
|
+
oe as getTabAccessibilityProps,
|
|
562
|
+
Y as getTabClasses,
|
|
563
|
+
ne as getTabContent,
|
|
564
|
+
k as intersectionObserver,
|
|
565
|
+
u as isBrowser,
|
|
566
|
+
ae as isTabActive,
|
|
567
|
+
w as lazyLoad,
|
|
568
|
+
f as navigationClasses,
|
|
569
|
+
T as resizeObserver,
|
|
570
|
+
de as safeClearTimeout,
|
|
571
|
+
ce as safeDocument,
|
|
572
|
+
ue as safeRequestAnimationFrame,
|
|
573
|
+
le as safeSetTimeout,
|
|
574
|
+
ie as safeWindow,
|
|
575
|
+
x as tabsSizeClasses,
|
|
576
|
+
d as tabsVariantClasses,
|
|
577
|
+
E as updateFocusState,
|
|
578
|
+
A as updateInputState,
|
|
579
|
+
j as updateNavigationState,
|
|
580
|
+
X as updateTabsState,
|
|
581
|
+
B as updateValidationState
|
|
322
582
|
};
|