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.
@@ -1,322 +1,97 @@
1
- import { B as H, P as S, H as N, O as z, a as K, S as M, b as B, T as R } from "../Tooltip-BoApUzYg.js";
2
- import { B as j, C as q, a as U, b as V, D as G, I as W, S as J, e as Q, c as X, T as Y, d as Z, m as _, k as ee, j as se, f as ae, l as te, i as ne, o as re, q as oe, p as ie, n as ce, g as ue, u as le, h as fe } from "../Toggle-LURK-bI8.js";
3
- import { T as be, a as me, i as pe, e as ge, b as ve, c as Ie, d as ye, s as he } from "../Toast-BTynzMV8.js";
4
- import { A as ke, C as Ce, a as xe, K as De, I as we, H as Ee, M as Ae, S as Fe, T as Oe, h as Le, f as Pe, c as He, i as Se, d as Ne, m as ze, e as Ke, l as Me, g as Be, j as Re, k as $e, t as je, b as qe, u as Ue } from "../Tabs-RCuPHjEL.js";
5
- import { N as Ge, a as We, T as Je } from "../ToastManager-Bd5Slcp4.js";
6
- const b = (e, s) => {
7
- const { shouldFocus: a = !1, delay: t = 0 } = s || {};
8
- function r() {
9
- a && (t > 0 ? setTimeout(() => e.focus(), t) : e.focus());
10
- }
11
- return a && r(), {
12
- update(n) {
13
- const { shouldFocus: o = !1, delay: i = 0 } = n || {};
14
- o && (i > 0 ? setTimeout(() => e.focus(), i) : e.focus());
15
- }
16
- };
17
- }, m = (e, s) => {
18
- function a(t) {
19
- e.contains(t.target) || s(t);
20
- }
21
- return document.addEventListener("click", a, !0), {
22
- destroy() {
23
- document.removeEventListener("click", a, !0);
24
- }
25
- };
26
- }, p = (e, s) => {
27
- function a(t) {
28
- t.key === "Escape" && s(t);
29
- }
30
- return e.addEventListener("keydown", a), {
31
- destroy() {
32
- e.removeEventListener("keydown", a);
33
- }
34
- };
35
- }, g = (e, s) => {
36
- const a = new ResizeObserver(s);
37
- return a.observe(e), {
38
- destroy() {
39
- a.disconnect();
40
- }
41
- };
42
- }, v = (e, { callback: s, options: a = {} }) => {
43
- const t = new IntersectionObserver(s, a);
44
- return t.observe(e), {
45
- destroy() {
46
- t.disconnect();
47
- }
48
- };
49
- }, I = (e) => {
50
- function s() {
51
- e.style.height = "auto", e.style.height = `${e.scrollHeight}px`;
52
- }
53
- return s(), e.addEventListener("input", s), {
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
- ke as Alert,
238
- H as Badge,
239
- j as Button,
240
- q as Card,
241
- Ce as CardsGrid,
242
- U as Checkbox,
243
- V as ColorPicker,
244
- xe as ContactForm,
245
- S as DebugPanel,
246
- G as Dropdown,
247
- De as DynamicForm,
248
- we as FileUpload,
249
- N as Heading,
250
- Ee as Hero,
251
- W as Input,
252
- Ae as Modal,
253
- Ge as Navbar,
254
- z as OptimizedImage,
255
- K as Progress,
256
- M as ScaleDemo,
257
- J as Select,
258
- Fe as SelectedCardInfo,
259
- B as Skeleton,
260
- Q as SlideUp,
261
- Oe as Tabs,
262
- X as TextAlignment,
263
- Y as Textarea,
264
- be as ThemeToggle,
265
- me as Toast,
266
- We as ToastContainer,
267
- Je as ToastManager,
268
- Z as Toggle,
269
- R as Tooltip,
270
- I as autoResize,
271
- _ as baseInputClasses,
272
- E as breakpoints,
273
- m as clickOutside,
274
- ee as createChangeEventDetail,
275
- se as createInputEventDetail,
276
- ae as createInputState,
277
- w as createItemClickHandler,
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
  };
@@ -1,15 +1,15 @@
1
- import { A as s, C as r, a as e, K as d, I as l, H as t, M as m, S as p, T as i } from "../Tabs-RCuPHjEL.js";
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
- s as Alert,
3
+ o as Alert,
5
4
  r as CardsGrid,
6
- e as ContactForm,
7
- C as Dropdown,
8
- d as DynamicForm,
9
- l as FileUpload,
10
- t as Hero,
11
- m as Modal,
12
- p as SelectedCardInfo,
13
- c as SlideUp,
14
- i as Tabs
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
  };
@@ -1,6 +1,5 @@
1
- import { N as r, a as s, T as t } from "../ToastManager-Bd5Slcp4.js";
1
+ import { N as r, a as N } from "../Navigation-DE8_K3bU.js";
2
2
  export {
3
3
  r as Navbar,
4
- s as ToastContainer,
5
- t as ToastManager
4
+ N as Navigation
6
5
  };