zabi-components 1.0.9 → 1.0.11

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,6 +1,6 @@
1
- import { B as s, P as o, H as t, O as r, a as g, S as T, b as l, T as m } from "../Tooltip-gkAHhbjD.js";
2
- import { B as i, C as p, a as x, b as c, I as d, S, c as b, T as B, d as C } from "../Toggle-kQ6Z43Ep.js";
3
- import { T as f, a as k } from "../Toast-1EMgTOM4.js";
1
+ import { B as s, P as o, H as t, O as r, a as g, S as T, b as l, T as m } from "../Tooltip-BoApUzYg.js";
2
+ import { B as i, C as p, a as x, b as c, I as d, S, c as b, T as B, d as C } from "../Toggle-LURK-bI8.js";
3
+ import { T as f, a as k } from "../Toast-BTynzMV8.js";
4
4
  export {
5
5
  s as Badge,
6
6
  i as Button,
@@ -1,38 +1,38 @@
1
- import { B as H, P as N, H as S, O as z, a as K, S as M, b as B, T as $ } from "../Tooltip-gkAHhbjD.js";
2
- import { B as R, C as U, a as q, b as V, D as G, I as J, S as Q, e as W, c as X, T as Y, d as Z, m as _, k as ee, j as se, f as ae, l as ne, i as te, o as re, q as oe, p as ie, n as ce, g as ue, u as le, h as fe } from "../Toggle-kQ6Z43Ep.js";
3
- import { T as be, a as pe } from "../Toast-1EMgTOM4.js";
4
- import { A as me, C as ve, a as Ie, K as ye, I as he, H as Te, M as ke, S as Ce, T as xe, h as De, f as Ee, c as Oe, i as we, d as Ae, m as Fe, e as Le, l as Pe, g as He, j as Ne, k as Se, t as ze, b as Ke, u as Me } from "../Tabs-DTuXgJQh.js";
5
- import { N as $e, a as je, T as Re } from "../ToastManager-ZcovxilX.js";
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
6
  const b = (e, s) => {
7
- const { shouldFocus: a = !1, delay: n = 0 } = s || {};
7
+ const { shouldFocus: a = !1, delay: t = 0 } = s || {};
8
8
  function r() {
9
- a && (n > 0 ? setTimeout(() => e.focus(), n) : e.focus());
9
+ a && (t > 0 ? setTimeout(() => e.focus(), t) : e.focus());
10
10
  }
11
11
  return a && r(), {
12
- update(t) {
13
- const { shouldFocus: o = !1, delay: i = 0 } = t || {};
12
+ update(n) {
13
+ const { shouldFocus: o = !1, delay: i = 0 } = n || {};
14
14
  o && (i > 0 ? setTimeout(() => e.focus(), i) : e.focus());
15
15
  }
16
16
  };
17
- }, p = (e, s) => {
18
- function a(n) {
19
- e.contains(n.target) || s(n);
17
+ }, m = (e, s) => {
18
+ function a(t) {
19
+ e.contains(t.target) || s(t);
20
20
  }
21
21
  return document.addEventListener("click", a, !0), {
22
22
  destroy() {
23
23
  document.removeEventListener("click", a, !0);
24
24
  }
25
25
  };
26
- }, g = (e, s) => {
27
- function a(n) {
28
- n.key === "Escape" && s(n);
26
+ }, p = (e, s) => {
27
+ function a(t) {
28
+ t.key === "Escape" && s(t);
29
29
  }
30
30
  return e.addEventListener("keydown", a), {
31
31
  destroy() {
32
32
  e.removeEventListener("keydown", a);
33
33
  }
34
34
  };
35
- }, m = (e, s) => {
35
+ }, g = (e, s) => {
36
36
  const a = new ResizeObserver(s);
37
37
  return a.observe(e), {
38
38
  destroy() {
@@ -40,10 +40,10 @@ const b = (e, s) => {
40
40
  }
41
41
  };
42
42
  }, v = (e, { callback: s, options: a = {} }) => {
43
- const n = new IntersectionObserver(s, a);
44
- return n.observe(e), {
43
+ const t = new IntersectionObserver(s, a);
44
+ return t.observe(e), {
45
45
  destroy() {
46
- n.disconnect();
46
+ t.disconnect();
47
47
  }
48
48
  };
49
49
  }, I = (e) => {
@@ -55,15 +55,15 @@ const b = (e, s) => {
55
55
  e.removeEventListener("input", s);
56
56
  }
57
57
  };
58
- }, y = (e, { src: s, onLoad: a, onError: n }) => {
59
- const r = new IntersectionObserver((t) => {
60
- t.forEach((o) => {
61
- o.isIntersecting && (e instanceof HTMLImageElement && (e.src = s, e.onload = a, e.onerror = n), r.unobserve(e));
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
62
  });
63
63
  });
64
64
  return r.observe(e), {
65
- update(t) {
66
- t != null && t.src && e instanceof HTMLImageElement && (e.src = t.src);
65
+ update(n) {
66
+ n != null && n.src && e instanceof HTMLImageElement && (e.src = n.src);
67
67
  },
68
68
  destroy() {
69
69
  r.disconnect();
@@ -106,13 +106,13 @@ function k(e, s, a = "") {
106
106
  a
107
107
  ].filter(Boolean).join(" ");
108
108
  }
109
- function C(e, s, a, n) {
110
- return function(t) {
111
- if (!(!e.isOpen && t.key !== "Enter" && t.key !== " "))
112
- switch (s({ isKeyboardNavigation: !0 }), t.key) {
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
113
  case "Enter":
114
114
  case " ":
115
- t.preventDefault();
115
+ n.preventDefault();
116
116
  const o = document.activeElement;
117
117
  (o == null ? void 0 : o.getAttribute("role")) === "menuitem" && o.click();
118
118
  break;
@@ -120,51 +120,51 @@ function C(e, s, a, n) {
120
120
  e.isOpen && s({ isOpen: !1 });
121
121
  break;
122
122
  case "ArrowDown":
123
- t.preventDefault(), u(e, s, a);
123
+ n.preventDefault(), u(e, s, a);
124
124
  break;
125
125
  case "ArrowUp":
126
- t.preventDefault(), l(e, s, a);
126
+ n.preventDefault(), l(e, s, a);
127
127
  break;
128
128
  case "ArrowRight":
129
- t.preventDefault(), e.isOpen && u(e, s, a);
129
+ n.preventDefault(), e.isOpen && u(e, s, a);
130
130
  break;
131
131
  case "ArrowLeft":
132
- t.preventDefault(), l(e, s, a);
132
+ n.preventDefault(), l(e, s, a);
133
133
  break;
134
134
  case "Home":
135
- t.preventDefault(), f(e, s, a);
135
+ n.preventDefault(), f(e, s, a);
136
136
  break;
137
137
  case "End":
138
- t.preventDefault(), d(e, s, a);
138
+ n.preventDefault(), d(e, s, a);
139
139
  break;
140
140
  }
141
141
  };
142
142
  }
143
143
  function u(e, s, a) {
144
- var t;
145
- const n = a();
146
- if (n.length === 0) return;
147
- const r = (e.currentFocusIndex + 1) % n.length;
148
- s({ currentFocusIndex: r }), (t = n[r]) == null || t.focus();
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
149
  }
150
150
  function l(e, s, a) {
151
- var t;
152
- const n = a();
153
- if (n.length === 0) return;
154
- const r = e.currentFocusIndex <= 0 ? n.length - 1 : e.currentFocusIndex - 1;
155
- s({ currentFocusIndex: r }), (t = n[r]) == null || t.focus();
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
156
  }
157
157
  function f(e, s, a) {
158
158
  var r;
159
- const n = a();
160
- n.length !== 0 && (s({ currentFocusIndex: 0 }), (r = n[0]) == null || r.focus());
159
+ const t = a();
160
+ t.length !== 0 && (s({ currentFocusIndex: 0 }), (r = t[0]) == null || r.focus());
161
161
  }
162
162
  function d(e, s, a) {
163
- var t;
164
- const n = a();
165
- if (n.length === 0) return;
166
- const r = n.length - 1;
167
- s({ currentFocusIndex: r }), (t = n[r]) == null || t.focus();
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
168
  }
169
169
  function x(e) {
170
170
  return Array.from(
@@ -176,18 +176,18 @@ function x(e) {
176
176
  function D(e, s, a) {
177
177
  return {
178
178
  toggle: () => {
179
- const n = !e.isOpen;
180
- s({ isOpen: n }), n && setTimeout(() => {
181
- var t;
179
+ const t = !e.isOpen;
180
+ s({ isOpen: t }), t && setTimeout(() => {
181
+ var n;
182
182
  const r = a();
183
- r.length > 0 && (s({ currentFocusIndex: 0 }), (t = r[0]) == null || t.focus());
183
+ r.length > 0 && (s({ currentFocusIndex: 0 }), (n = r[0]) == null || n.focus());
184
184
  }, 100);
185
185
  },
186
186
  open: () => {
187
187
  s({ isOpen: !0 }), setTimeout(() => {
188
188
  var r;
189
- const n = a();
190
- n.length > 0 && (s({ currentFocusIndex: 0 }), (r = n[0]) == null || r.focus());
189
+ const t = a();
190
+ t.length > 0 && (s({ currentFocusIndex: 0 }), (r = t[0]) == null || r.focus());
191
191
  }, 100);
192
192
  },
193
193
  close: () => {
@@ -195,29 +195,29 @@ function D(e, s, a) {
195
195
  }
196
196
  };
197
197
  }
198
- function E(e, s, a) {
199
- return function(r, t) {
198
+ function w(e, s, a) {
199
+ return function(r, n) {
200
200
  if (r.disabled) {
201
- t.preventDefault();
201
+ n.preventDefault();
202
202
  return;
203
203
  }
204
- e({ activeItem: r.id }), a("item-click", { item: r, event: t }), s.collapsible && s.variant !== "tabs" && e({ isOpen: !1 });
204
+ e({ activeItem: r.id }), a("item-click", { item: r, event: n }), s.collapsible && s.variant !== "tabs" && e({ isOpen: !1 });
205
205
  };
206
206
  }
207
- const O = {
207
+ const E = {
208
208
  mobile: 768,
209
209
  tablet: 1024,
210
210
  desktop: 1280
211
211
  };
212
- function w(e, s, a, n = "navigation") {
212
+ function A(e, s, a, t = "navigation") {
213
213
  return {
214
214
  "aria-label": s || `${e} navigation`,
215
215
  "aria-describedby": a || void 0,
216
- role: n,
216
+ role: t,
217
217
  "data-variant": e
218
218
  };
219
219
  }
220
- function A(e) {
220
+ function F(e) {
221
221
  return {
222
222
  "aria-expanded": e,
223
223
  "aria-controls": "navigation-menu",
@@ -225,7 +225,7 @@ function A(e) {
225
225
  "aria-label": "Toggle navigation menu"
226
226
  };
227
227
  }
228
- function F(e, s) {
228
+ function O(e, s) {
229
229
  return {
230
230
  id: "navigation-menu",
231
231
  role: e === "horizontal" ? "menubar" : "menu",
@@ -234,83 +234,89 @@ function F(e, s) {
234
234
  };
235
235
  }
236
236
  export {
237
- me as Alert,
237
+ ke as Alert,
238
238
  H as Badge,
239
- R as Button,
240
- U as Card,
241
- ve as CardsGrid,
242
- q as Checkbox,
239
+ j as Button,
240
+ q as Card,
241
+ Ce as CardsGrid,
242
+ U as Checkbox,
243
243
  V as ColorPicker,
244
- Ie as ContactForm,
245
- N as DebugPanel,
244
+ xe as ContactForm,
245
+ S as DebugPanel,
246
246
  G as Dropdown,
247
- ye as DynamicForm,
248
- he as FileUpload,
249
- S as Heading,
250
- Te as Hero,
251
- J as Input,
252
- ke as Modal,
253
- $e as Navbar,
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
254
  z as OptimizedImage,
255
255
  K as Progress,
256
256
  M as ScaleDemo,
257
- Q as Select,
258
- Ce as SelectedCardInfo,
257
+ J as Select,
258
+ Fe as SelectedCardInfo,
259
259
  B as Skeleton,
260
- W as SlideUp,
261
- xe as Tabs,
260
+ Q as SlideUp,
261
+ Oe as Tabs,
262
262
  X as TextAlignment,
263
263
  Y as Textarea,
264
264
  be as ThemeToggle,
265
- pe as Toast,
266
- je as ToastContainer,
267
- Re as ToastManager,
265
+ me as Toast,
266
+ We as ToastContainer,
267
+ Je as ToastManager,
268
268
  Z as Toggle,
269
- $ as Tooltip,
269
+ R as Tooltip,
270
270
  I as autoResize,
271
271
  _ as baseInputClasses,
272
- O as breakpoints,
273
- p as clickOutside,
272
+ E as breakpoints,
273
+ m as clickOutside,
274
274
  ee as createChangeEventDetail,
275
275
  se as createInputEventDetail,
276
276
  ae as createInputState,
277
- E as createItemClickHandler,
277
+ w as createItemClickHandler,
278
278
  C as createKeyboardNavigation,
279
279
  D as createMenuState,
280
280
  h as createNavigationState,
281
- De as createTabClickHandler,
282
- Ee as createTabsKeyboardNavigation,
283
- Oe as createTabsState,
284
- g as escapeKey,
281
+ Le as createTabClickHandler,
282
+ Pe as createTabsKeyboardNavigation,
283
+ He as createTabsState,
284
+ p as escapeKey,
285
285
  b as focus,
286
- we as focusTab,
287
- ne as formSizeClasses,
288
- te as generateInputId,
289
- w as getAccessibilityProps,
290
- Ae as getContainerClasses,
286
+ Se as focusTab,
287
+ te as formSizeClasses,
288
+ ne as generateInputId,
289
+ A as getAccessibilityProps,
290
+ Ne as getContainerClasses,
291
291
  re as getDisabledClasses,
292
292
  x as getFocusableItems,
293
293
  oe as getHelperTextClasses,
294
294
  ie as getLabelClasses,
295
- A as getMenuButtonProps,
296
- F as getMenuListProps,
295
+ F as getMenuButtonProps,
296
+ O as getMenuListProps,
297
297
  k as getNavigationClasses,
298
- Fe as getPanelAccessibilityProps,
299
- Le as getPanelClasses,
298
+ ze as getPanelAccessibilityProps,
299
+ Ke as getPanelClasses,
300
300
  ce as getStateClasses,
301
- Pe as getTabAccessibilityProps,
302
- He as getTabClasses,
303
- Ne as getTabContent,
301
+ Me as getTabAccessibilityProps,
302
+ Be as getTabClasses,
303
+ Re as getTabContent,
304
304
  v as intersectionObserver,
305
- Se as isTabActive,
305
+ pe as isBrowser,
306
+ $e as isTabActive,
306
307
  y as lazyLoad,
307
308
  c as navigationClasses,
308
- m as resizeObserver,
309
- ze as tabsSizeClasses,
310
- Ke as tabsVariantClasses,
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,
311
317
  ue as updateFocusState,
312
318
  le as updateInputState,
313
319
  T as updateNavigationState,
314
- Me as updateTabsState,
320
+ Ue as updateTabsState,
315
321
  fe as updateValidationState
316
322
  };
@@ -1,5 +1,5 @@
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-DTuXgJQh.js";
2
- import { D as C, e as c } from "../Toggle-kQ6Z43Ep.js";
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";
3
3
  export {
4
4
  s as Alert,
5
5
  r as CardsGrid,
@@ -1,4 +1,4 @@
1
- import { N as r, a as s, T as t } from "../ToastManager-ZcovxilX.js";
1
+ import { N as r, a as s, T as t } from "../ToastManager-Bd5Slcp4.js";
2
2
  export {
3
3
  r as Navbar,
4
4
  s as ToastContainer,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zabi-components",
3
- "version": "1.0.9",
3
+ "version": "1.0.11",
4
4
  "description": "A modern SvelteKit component library with TypeScript and Tailwind CSS",
5
5
  "type": "module",
6
6
  "main": "dist/index/index.js",
@@ -9,24 +9,30 @@
9
9
  "exports": {
10
10
  ".": {
11
11
  "types": "./dist/index.d.ts",
12
- "import": "./dist/index/index.js"
12
+ "import": "./dist/index/index.js",
13
+ "svelte": "./dist/index/index.js"
13
14
  },
14
15
  "./atoms": {
15
16
  "types": "./dist/atoms/index.d.ts",
16
- "import": "./dist/atoms/index.js"
17
+ "import": "./dist/atoms/index.js",
18
+ "svelte": "./dist/atoms/index.js"
17
19
  },
18
20
  "./molecules": {
19
21
  "types": "./dist/molecules/index.d.ts",
20
- "import": "./dist/molecules/index.js"
22
+ "import": "./dist/molecules/index.js",
23
+ "svelte": "./dist/molecules/index.js"
21
24
  },
22
25
  "./organisms": {
23
26
  "types": "./dist/organisms/index.d.ts",
24
- "import": "./dist/organisms/index.js"
27
+ "import": "./dist/organisms/index.js",
28
+ "svelte": "./dist/organisms/index.js"
25
29
  },
26
30
  "./types": {
27
31
  "types": "./dist/types/index.d.ts",
28
32
  "import": "./dist/types/index.js"
29
- }
33
+ },
34
+ "./dist/zabi-components.css": "./dist/zabi-components.css",
35
+ "./package.json": "./package.json"
30
36
  },
31
37
  "files": [
32
38
  "dist",
@@ -55,8 +61,7 @@
55
61
  "check": "svelte-check --tsconfig ./tsconfig.json",
56
62
  "storybook": "storybook dev -p 6006",
57
63
  "build-storybook": "storybook build",
58
- "prepublishOnly": "npm run build:lib",
59
- "postinstall": "patch-package"
64
+ "prepublishOnly": "npm run build:lib"
60
65
  },
61
66
  "devDependencies": {
62
67
  "@storybook/addon-svelte-csf": "^5.0.8",
@@ -67,7 +72,6 @@
67
72
  "@tsconfig/svelte": "^5.0.2",
68
73
  "@types/node": "^24.5.2",
69
74
  "autoprefixer": "^10.4.17",
70
- "patch-package": "^8.0.1",
71
75
  "postcss": "^8.4.35",
72
76
  "storybook": "^9.1.7",
73
77
  "svelte": "^5.0.0",
@@ -81,7 +85,7 @@
81
85
  },
82
86
  "peerDependencies": {
83
87
  "@sveltejs/kit": "^2.0.0",
84
- "svelte": "^4.0.0 || ^5.0.0"
88
+ "svelte": "^5.0.0"
85
89
  },
86
90
  "peerDependenciesMeta": {
87
91
  "svelte": {
@@ -90,5 +94,6 @@
90
94
  "@sveltejs/kit": {
91
95
  "optional": true
92
96
  }
93
- }
97
+ },
98
+ "svelte": "./dist/index/index.js"
94
99
  }