zabi-components 1.0.11 → 2.0.3
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-YmnHW5Dv.js +106 -0
- package/dist/Navigation-DE8_K3bU.js +79 -0
- package/dist/PerformanceMonitor-CZWEjSY0.js +1230 -0
- package/dist/SelectedCardInfo-1FErRXDl.js +509 -0
- package/dist/ThemeToggle-Dt8hE3_o.js +35 -0
- package/dist/atoms/index.js +23 -21
- package/dist/index/index.js +94 -319
- package/dist/molecules/index.js +12 -12
- package/dist/organisms/index.js +2 -3
- package/dist/props-ChfwWtCN.js +2513 -0
- package/package.json +4 -4
- 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,322 +1,97 @@
|
|
|
1
|
-
import { B as
|
|
2
|
-
import { B as
|
|
3
|
-
import { T as
|
|
4
|
-
import { A as
|
|
5
|
-
import { N as
|
|
6
|
-
const
|
|
7
|
-
const
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
destroy() {
|
|
55
|
-
e.removeEventListener("input", s);
|
|
56
|
-
}
|
|
57
|
-
};
|
|
58
|
-
}, y = (e, { src: s, onLoad: a, onError: t }) => {
|
|
59
|
-
const r = new IntersectionObserver((n) => {
|
|
60
|
-
n.forEach((o) => {
|
|
61
|
-
o.isIntersecting && (e instanceof HTMLImageElement && (e.src = s, e.onload = a, e.onerror = t), r.unobserve(e));
|
|
62
|
-
});
|
|
63
|
-
});
|
|
64
|
-
return r.observe(e), {
|
|
65
|
-
update(n) {
|
|
66
|
-
n != null && n.src && e instanceof HTMLImageElement && (e.src = n.src);
|
|
67
|
-
},
|
|
68
|
-
destroy() {
|
|
69
|
-
r.disconnect();
|
|
70
|
-
}
|
|
71
|
-
};
|
|
1
|
+
import { B as m, C as g } from "../Card-YmnHW5Dv.js";
|
|
2
|
+
import { B as p, C as T, a as u, H as x, I as C, b as I, c as f, O as S, P as b, d as D, S as A, e as B, f as P, T as h, g as k, h as H, i as M, j as v } from "../PerformanceMonitor-CZWEjSY0.js";
|
|
3
|
+
import { T as N } from "../ThemeToggle-Dt8hE3_o.js";
|
|
4
|
+
import { A as U, C as j, a as w, D as L, F as R, H as $, I as y, L as z, M as E, S as G, b as V, T as q } from "../SelectedCardInfo-1FErRXDl.js";
|
|
5
|
+
import { N as K, a as Q } from "../Navigation-DE8_K3bU.js";
|
|
6
|
+
const o = (a = "id") => `${a}-${Math.random().toString(36).substr(2, 9)}`, t = (...a) => a.filter(Boolean).join(" "), r = (a) => {
|
|
7
|
+
const e = new FormData(a);
|
|
8
|
+
return Object.fromEntries(e.entries());
|
|
9
|
+
}, s = (a) => /^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(a), n = (a) => a != null && a !== "", i = {
|
|
10
|
+
// Atoms
|
|
11
|
+
Button,
|
|
12
|
+
Input,
|
|
13
|
+
Textarea,
|
|
14
|
+
Select,
|
|
15
|
+
Checkbox,
|
|
16
|
+
Toggle,
|
|
17
|
+
ColorPicker,
|
|
18
|
+
TextAlignment,
|
|
19
|
+
Card,
|
|
20
|
+
Badge,
|
|
21
|
+
Heading,
|
|
22
|
+
Progress,
|
|
23
|
+
Skeleton,
|
|
24
|
+
Toast,
|
|
25
|
+
Tooltip,
|
|
26
|
+
ThemeToggle,
|
|
27
|
+
OptimizedImage,
|
|
28
|
+
InputActions,
|
|
29
|
+
InputValidation,
|
|
30
|
+
ScaleDemo,
|
|
31
|
+
PerformanceMonitor,
|
|
32
|
+
// Molecules
|
|
33
|
+
Form,
|
|
34
|
+
Layout,
|
|
35
|
+
Modal,
|
|
36
|
+
SlideUp,
|
|
37
|
+
Dropdown,
|
|
38
|
+
Tabs,
|
|
39
|
+
Alert,
|
|
40
|
+
ImageUpload,
|
|
41
|
+
Hero,
|
|
42
|
+
CardsGrid,
|
|
43
|
+
ColorDemo,
|
|
44
|
+
SelectedCardInfo,
|
|
45
|
+
// Organisms
|
|
46
|
+
Navbar,
|
|
47
|
+
Navigation,
|
|
48
|
+
// Utilities
|
|
49
|
+
createId: o,
|
|
50
|
+
cn: t,
|
|
51
|
+
getFormData: r,
|
|
52
|
+
validateEmail: s,
|
|
53
|
+
validateRequired: n
|
|
72
54
|
};
|
|
73
|
-
function h(e = "") {
|
|
74
|
-
return {
|
|
75
|
-
isOpen: !1,
|
|
76
|
-
activeItem: e,
|
|
77
|
-
currentFocusIndex: -1,
|
|
78
|
-
isKeyboardNavigation: !1
|
|
79
|
-
};
|
|
80
|
-
}
|
|
81
|
-
function T(e, s) {
|
|
82
|
-
return { ...e, ...s };
|
|
83
|
-
}
|
|
84
|
-
const c = {
|
|
85
|
-
density: {
|
|
86
|
-
compact: "density-compact",
|
|
87
|
-
comfortable: "density-comfortable"
|
|
88
|
-
},
|
|
89
|
-
variant: {
|
|
90
|
-
header: "nav-header",
|
|
91
|
-
sidebar: "nav-sidebar",
|
|
92
|
-
breadcrumb: "nav-breadcrumb",
|
|
93
|
-
tabs: "nav-tabs",
|
|
94
|
-
pagination: "nav-pagination"
|
|
95
|
-
}
|
|
96
|
-
};
|
|
97
|
-
function k(e, s, a = "") {
|
|
98
|
-
return [
|
|
99
|
-
"modern-navigation",
|
|
100
|
-
c.variant[e.variant],
|
|
101
|
-
`nav-${e.orientation}`,
|
|
102
|
-
c.density[e.density],
|
|
103
|
-
e.responsive ? "responsive" : "",
|
|
104
|
-
e.collapsible ? "collapsible" : "",
|
|
105
|
-
s.isOpen ? "open" : "",
|
|
106
|
-
a
|
|
107
|
-
].filter(Boolean).join(" ");
|
|
108
|
-
}
|
|
109
|
-
function C(e, s, a, t) {
|
|
110
|
-
return function(n) {
|
|
111
|
-
if (!(!e.isOpen && n.key !== "Enter" && n.key !== " "))
|
|
112
|
-
switch (s({ isKeyboardNavigation: !0 }), n.key) {
|
|
113
|
-
case "Enter":
|
|
114
|
-
case " ":
|
|
115
|
-
n.preventDefault();
|
|
116
|
-
const o = document.activeElement;
|
|
117
|
-
(o == null ? void 0 : o.getAttribute("role")) === "menuitem" && o.click();
|
|
118
|
-
break;
|
|
119
|
-
case "Escape":
|
|
120
|
-
e.isOpen && s({ isOpen: !1 });
|
|
121
|
-
break;
|
|
122
|
-
case "ArrowDown":
|
|
123
|
-
n.preventDefault(), u(e, s, a);
|
|
124
|
-
break;
|
|
125
|
-
case "ArrowUp":
|
|
126
|
-
n.preventDefault(), l(e, s, a);
|
|
127
|
-
break;
|
|
128
|
-
case "ArrowRight":
|
|
129
|
-
n.preventDefault(), e.isOpen && u(e, s, a);
|
|
130
|
-
break;
|
|
131
|
-
case "ArrowLeft":
|
|
132
|
-
n.preventDefault(), l(e, s, a);
|
|
133
|
-
break;
|
|
134
|
-
case "Home":
|
|
135
|
-
n.preventDefault(), f(e, s, a);
|
|
136
|
-
break;
|
|
137
|
-
case "End":
|
|
138
|
-
n.preventDefault(), d(e, s, a);
|
|
139
|
-
break;
|
|
140
|
-
}
|
|
141
|
-
};
|
|
142
|
-
}
|
|
143
|
-
function u(e, s, a) {
|
|
144
|
-
var n;
|
|
145
|
-
const t = a();
|
|
146
|
-
if (t.length === 0) return;
|
|
147
|
-
const r = (e.currentFocusIndex + 1) % t.length;
|
|
148
|
-
s({ currentFocusIndex: r }), (n = t[r]) == null || n.focus();
|
|
149
|
-
}
|
|
150
|
-
function l(e, s, a) {
|
|
151
|
-
var n;
|
|
152
|
-
const t = a();
|
|
153
|
-
if (t.length === 0) return;
|
|
154
|
-
const r = e.currentFocusIndex <= 0 ? t.length - 1 : e.currentFocusIndex - 1;
|
|
155
|
-
s({ currentFocusIndex: r }), (n = t[r]) == null || n.focus();
|
|
156
|
-
}
|
|
157
|
-
function f(e, s, a) {
|
|
158
|
-
var r;
|
|
159
|
-
const t = a();
|
|
160
|
-
t.length !== 0 && (s({ currentFocusIndex: 0 }), (r = t[0]) == null || r.focus());
|
|
161
|
-
}
|
|
162
|
-
function d(e, s, a) {
|
|
163
|
-
var n;
|
|
164
|
-
const t = a();
|
|
165
|
-
if (t.length === 0) return;
|
|
166
|
-
const r = t.length - 1;
|
|
167
|
-
s({ currentFocusIndex: r }), (n = t[r]) == null || n.focus();
|
|
168
|
-
}
|
|
169
|
-
function x(e) {
|
|
170
|
-
return Array.from(
|
|
171
|
-
e.querySelectorAll(
|
|
172
|
-
'a[href], button:not([disabled]), [tabindex]:not([tabindex="-1"])'
|
|
173
|
-
)
|
|
174
|
-
);
|
|
175
|
-
}
|
|
176
|
-
function D(e, s, a) {
|
|
177
|
-
return {
|
|
178
|
-
toggle: () => {
|
|
179
|
-
const t = !e.isOpen;
|
|
180
|
-
s({ isOpen: t }), t && setTimeout(() => {
|
|
181
|
-
var n;
|
|
182
|
-
const r = a();
|
|
183
|
-
r.length > 0 && (s({ currentFocusIndex: 0 }), (n = r[0]) == null || n.focus());
|
|
184
|
-
}, 100);
|
|
185
|
-
},
|
|
186
|
-
open: () => {
|
|
187
|
-
s({ isOpen: !0 }), setTimeout(() => {
|
|
188
|
-
var r;
|
|
189
|
-
const t = a();
|
|
190
|
-
t.length > 0 && (s({ currentFocusIndex: 0 }), (r = t[0]) == null || r.focus());
|
|
191
|
-
}, 100);
|
|
192
|
-
},
|
|
193
|
-
close: () => {
|
|
194
|
-
s({ isOpen: !1 });
|
|
195
|
-
}
|
|
196
|
-
};
|
|
197
|
-
}
|
|
198
|
-
function w(e, s, a) {
|
|
199
|
-
return function(r, n) {
|
|
200
|
-
if (r.disabled) {
|
|
201
|
-
n.preventDefault();
|
|
202
|
-
return;
|
|
203
|
-
}
|
|
204
|
-
e({ activeItem: r.id }), a("item-click", { item: r, event: n }), s.collapsible && s.variant !== "tabs" && e({ isOpen: !1 });
|
|
205
|
-
};
|
|
206
|
-
}
|
|
207
|
-
const E = {
|
|
208
|
-
mobile: 768,
|
|
209
|
-
tablet: 1024,
|
|
210
|
-
desktop: 1280
|
|
211
|
-
};
|
|
212
|
-
function A(e, s, a, t = "navigation") {
|
|
213
|
-
return {
|
|
214
|
-
"aria-label": s || `${e} navigation`,
|
|
215
|
-
"aria-describedby": a || void 0,
|
|
216
|
-
role: t,
|
|
217
|
-
"data-variant": e
|
|
218
|
-
};
|
|
219
|
-
}
|
|
220
|
-
function F(e) {
|
|
221
|
-
return {
|
|
222
|
-
"aria-expanded": e,
|
|
223
|
-
"aria-controls": "navigation-menu",
|
|
224
|
-
"aria-haspopup": "menu",
|
|
225
|
-
"aria-label": "Toggle navigation menu"
|
|
226
|
-
};
|
|
227
|
-
}
|
|
228
|
-
function O(e, s) {
|
|
229
|
-
return {
|
|
230
|
-
id: "navigation-menu",
|
|
231
|
-
role: e === "horizontal" ? "menubar" : "menu",
|
|
232
|
-
"aria-orientation": e,
|
|
233
|
-
"aria-label": `${s} menu`
|
|
234
|
-
};
|
|
235
|
-
}
|
|
236
55
|
export {
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
K as
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
C as createKeyboardNavigation,
|
|
279
|
-
D as createMenuState,
|
|
280
|
-
h as createNavigationState,
|
|
281
|
-
Le as createTabClickHandler,
|
|
282
|
-
Pe as createTabsKeyboardNavigation,
|
|
283
|
-
He as createTabsState,
|
|
284
|
-
p as escapeKey,
|
|
285
|
-
b as focus,
|
|
286
|
-
Se as focusTab,
|
|
287
|
-
te as formSizeClasses,
|
|
288
|
-
ne as generateInputId,
|
|
289
|
-
A as getAccessibilityProps,
|
|
290
|
-
Ne as getContainerClasses,
|
|
291
|
-
re as getDisabledClasses,
|
|
292
|
-
x as getFocusableItems,
|
|
293
|
-
oe as getHelperTextClasses,
|
|
294
|
-
ie as getLabelClasses,
|
|
295
|
-
F as getMenuButtonProps,
|
|
296
|
-
O as getMenuListProps,
|
|
297
|
-
k as getNavigationClasses,
|
|
298
|
-
ze as getPanelAccessibilityProps,
|
|
299
|
-
Ke as getPanelClasses,
|
|
300
|
-
ce as getStateClasses,
|
|
301
|
-
Me as getTabAccessibilityProps,
|
|
302
|
-
Be as getTabClasses,
|
|
303
|
-
Re as getTabContent,
|
|
304
|
-
v as intersectionObserver,
|
|
305
|
-
pe as isBrowser,
|
|
306
|
-
$e as isTabActive,
|
|
307
|
-
y as lazyLoad,
|
|
308
|
-
c as navigationClasses,
|
|
309
|
-
g as resizeObserver,
|
|
310
|
-
ge as safeClearTimeout,
|
|
311
|
-
ve as safeDocument,
|
|
312
|
-
Ie as safeRequestAnimationFrame,
|
|
313
|
-
ye as safeSetTimeout,
|
|
314
|
-
he as safeWindow,
|
|
315
|
-
je as tabsSizeClasses,
|
|
316
|
-
qe as tabsVariantClasses,
|
|
317
|
-
ue as updateFocusState,
|
|
318
|
-
le as updateInputState,
|
|
319
|
-
T as updateNavigationState,
|
|
320
|
-
Ue as updateTabsState,
|
|
321
|
-
fe as updateValidationState
|
|
56
|
+
U as Alert,
|
|
57
|
+
p as Badge,
|
|
58
|
+
m as Button,
|
|
59
|
+
g as Card,
|
|
60
|
+
j as CardsGrid,
|
|
61
|
+
T as Checkbox,
|
|
62
|
+
w as ColorDemo,
|
|
63
|
+
u as ColorPicker,
|
|
64
|
+
L as Dropdown,
|
|
65
|
+
R as Form,
|
|
66
|
+
x as Heading,
|
|
67
|
+
$ as Hero,
|
|
68
|
+
y as ImageUpload,
|
|
69
|
+
C as Input,
|
|
70
|
+
I as InputActions,
|
|
71
|
+
f as InputValidation,
|
|
72
|
+
z as Layout,
|
|
73
|
+
E as Modal,
|
|
74
|
+
K as Navbar,
|
|
75
|
+
Q as Navigation,
|
|
76
|
+
S as OptimizedImage,
|
|
77
|
+
b as PerformanceMonitor,
|
|
78
|
+
D as Progress,
|
|
79
|
+
A as ScaleDemo,
|
|
80
|
+
B as Select,
|
|
81
|
+
G as SelectedCardInfo,
|
|
82
|
+
P as Skeleton,
|
|
83
|
+
V as SlideUp,
|
|
84
|
+
q as Tabs,
|
|
85
|
+
h as TextAlignment,
|
|
86
|
+
k as Textarea,
|
|
87
|
+
N as ThemeToggle,
|
|
88
|
+
H as Toast,
|
|
89
|
+
M as Toggle,
|
|
90
|
+
v as Tooltip,
|
|
91
|
+
t as cn,
|
|
92
|
+
o as createId,
|
|
93
|
+
i as default,
|
|
94
|
+
r as getFormData,
|
|
95
|
+
s as validateEmail,
|
|
96
|
+
n as validateRequired
|
|
322
97
|
};
|
package/dist/molecules/index.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { A as
|
|
2
|
-
import { D as C, e as c } from "../Toggle-LURK-bI8.js";
|
|
1
|
+
import { A as o, C as r, a as e, D as d, F as l, H as m, I as p, L as t, M as C, S as D, b as I, T as S } from "../SelectedCardInfo-1FErRXDl.js";
|
|
3
2
|
export {
|
|
4
|
-
|
|
3
|
+
o as Alert,
|
|
5
4
|
r as CardsGrid,
|
|
6
|
-
e as
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
5
|
+
e as ColorDemo,
|
|
6
|
+
d as Dropdown,
|
|
7
|
+
l as Form,
|
|
8
|
+
m as Hero,
|
|
9
|
+
p as ImageUpload,
|
|
10
|
+
t as Layout,
|
|
11
|
+
C as Modal,
|
|
12
|
+
D as SelectedCardInfo,
|
|
13
|
+
I as SlideUp,
|
|
14
|
+
S as Tabs
|
|
15
15
|
};
|
package/dist/organisms/index.js
CHANGED