@enya-learning/nova 0.5.0 → 0.7.0
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 +8 -10
- package/dist/chunks/dist-fahbq1psobj0ox6s.js.map +1 -1
- package/dist/chunks/dist-i6l6wqicjhnap81o.js +37 -0
- package/dist/chunks/{dist-o8x0ip0z71xkr2oh.js.map → dist-i6l6wqicjhnap81o.js.map} +1 -1
- package/dist/chunks/utils-chr77evsz8gs6wle.js +10 -0
- package/dist/chunks/{utils-kyb5nny4y41y7hd8.js.map → utils-chr77evsz8gs6wle.js.map} +1 -1
- package/dist/chunks/{vendor-styling-eeiy57tyznmxsfky.js → vendor-styling-bq164a52kub0yzw7.js} +84 -81
- package/dist/chunks/{vendor-styling-eeiy57tyznmxsfky.js.map → vendor-styling-bq164a52kub0yzw7.js.map} +1 -1
- package/dist/chunks/{vendor-utils-egkaeebaqpft6cxj.js → vendor-utils-dzqqqwem43r86lbz.js} +48 -48
- package/dist/chunks/{vendor-utils-egkaeebaqpft6cxj.js.map → vendor-utils-dzqqqwem43r86lbz.js.map} +1 -1
- package/dist/components/accordion.js +24 -21
- package/dist/components/accordion.js.map +1 -1
- package/dist/components/alert-dialog.js +3 -3
- package/dist/components/alert-dialog.js.map +1 -1
- package/dist/components/alert.js +2 -2
- package/dist/components/aspect-ratio.js +1 -1
- package/dist/components/avatar.js +24 -24
- package/dist/components/avatar.js.map +1 -1
- package/dist/components/badge.js +13 -13
- package/dist/components/badge.js.map +1 -1
- package/dist/components/box.js +16 -0
- package/dist/components/box.js.map +1 -0
- package/dist/components/breadcrumb.js +29 -25
- package/dist/components/breadcrumb.js.map +1 -1
- package/dist/components/button-group.js +4 -4
- package/dist/components/button-group.js.map +1 -1
- package/dist/components/button.js +12 -12
- package/dist/components/button.js.map +1 -1
- package/dist/components/calendar.js +540 -535
- package/dist/components/calendar.js.map +1 -1
- package/dist/components/card.js +1 -1
- package/dist/components/carousel.js +93 -85
- package/dist/components/carousel.js.map +1 -1
- package/dist/components/chart.js +1462 -1457
- package/dist/components/chart.js.map +1 -1
- package/dist/components/checkbox.js +7 -6
- package/dist/components/checkbox.js.map +1 -1
- package/dist/components/combobox.js +67 -54
- package/dist/components/combobox.js.map +1 -1
- package/dist/components/command.js +104 -97
- package/dist/components/command.js.map +1 -1
- package/dist/components/context-menu.js +41 -37
- package/dist/components/context-menu.js.map +1 -1
- package/dist/components/dialog.js +26 -25
- package/dist/components/dialog.js.map +1 -1
- package/dist/components/drawer.js +3 -3
- package/dist/components/drawer.js.map +1 -1
- package/dist/components/dropdown-menu.js +40 -36
- package/dist/components/dropdown-menu.js.map +1 -1
- package/dist/components/empty.js +3 -3
- package/dist/components/empty.js.map +1 -1
- package/dist/components/enya-logo.js +88 -78
- package/dist/components/enya-logo.js.map +1 -1
- package/dist/components/field.js +3 -3
- package/dist/components/field.js.map +1 -1
- package/dist/components/heading.js +39 -0
- package/dist/components/heading.js.map +1 -0
- package/dist/components/hover-card.js +1 -1
- package/dist/components/hover-card.js.map +1 -1
- package/dist/components/input-group.js +15 -15
- package/dist/components/input-group.js.map +1 -1
- package/dist/components/input-otp.js +81 -79
- package/dist/components/input-otp.js.map +1 -1
- package/dist/components/input.js +2 -2
- package/dist/components/input.js.map +1 -1
- package/dist/components/item.js +36 -36
- package/dist/components/item.js.map +1 -1
- package/dist/components/kbd.js +7 -7
- package/dist/components/kbd.js.map +1 -1
- package/dist/components/label.js +1 -1
- package/dist/components/menubar.js +53 -52
- package/dist/components/menubar.js.map +1 -1
- package/dist/components/native-select.js +21 -19
- package/dist/components/native-select.js.map +1 -1
- package/dist/components/navigation-menu.js +23 -21
- package/dist/components/navigation-menu.js.map +1 -1
- package/dist/components/pagination.js +33 -30
- package/dist/components/pagination.js.map +1 -1
- package/dist/components/popover.js +1 -1
- package/dist/components/popover.js.map +1 -1
- package/dist/components/progress.js +5 -5
- package/dist/components/progress.js.map +1 -1
- package/dist/components/radio-group.js +14 -14
- package/dist/components/radio-group.js.map +1 -1
- package/dist/components/resizable.js +120 -117
- package/dist/components/resizable.js.map +1 -1
- package/dist/components/scroll-area.js +1 -1
- package/dist/components/scroll-area.js.map +1 -1
- package/dist/components/select.js +65 -58
- package/dist/components/select.js.map +1 -1
- package/dist/components/separator.js +1 -1
- package/dist/components/sheet.js +23 -22
- package/dist/components/sheet.js.map +1 -1
- package/dist/components/sidebar.js +84 -80
- package/dist/components/sidebar.js.map +1 -1
- package/dist/components/skeleton.js +2 -2
- package/dist/components/skeleton.js.map +1 -1
- package/dist/components/slider.js +8 -8
- package/dist/components/slider.js.map +1 -1
- package/dist/components/sonner.js +229 -215
- package/dist/components/sonner.js.map +1 -1
- package/dist/components/spinner.js +10 -8
- package/dist/components/spinner.js.map +1 -1
- package/dist/components/switch.js +6 -6
- package/dist/components/switch.js.map +1 -1
- package/dist/components/table.js +15 -15
- package/dist/components/table.js.map +1 -1
- package/dist/components/tabs.js +16 -16
- package/dist/components/tabs.js.map +1 -1
- package/dist/components/text.js +47 -0
- package/dist/components/text.js.map +1 -0
- package/dist/components/textarea.js +5 -5
- package/dist/components/textarea.js.map +1 -1
- package/dist/components/toggle-group.js +2 -2
- package/dist/components/toggle-group.js.map +1 -1
- package/dist/components/toggle.js +8 -8
- package/dist/components/toggle.js.map +1 -1
- package/dist/components/tooltip.js +6 -6
- package/dist/components/tooltip.js.map +1 -1
- package/dist/index.js +31 -16
- package/dist/src/components/box/box.d.ts +7 -0
- package/dist/src/components/box/index.d.ts +1 -0
- package/dist/src/components/heading/heading.d.ts +15 -0
- package/dist/src/components/heading/index.d.ts +1 -0
- package/dist/src/components/spinner/spinner.d.ts +2 -1
- package/dist/src/components/text/index.d.ts +1 -0
- package/dist/src/components/text/text.d.ts +13 -0
- package/dist/src/index.d.ts +4 -0
- package/dist/styles/nova-binding.css +264 -266
- package/dist/styles/nova.css +158 -49
- package/dist/styles/typography.css +3 -123
- package/dist/utils.js +1 -1
- package/package.json +29 -12
- package/src/eslint/no-primitive-colors.js +2 -2
- package/src/eslint/no-primitive-colors.test.ts +1 -1
- package/dist/chunks/dist-o8x0ip0z71xkr2oh.js +0 -37
- package/dist/chunks/utils-kyb5nny4y41y7hd8.js +0 -10
- package/dist/styles/theme-nova.css +0 -197
package/dist/components/card.js
CHANGED
|
@@ -1,17 +1,18 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { t as mt } from "../chunks/utils-
|
|
2
|
+
import { t as mt } from "../chunks/utils-chr77evsz8gs6wle.js";
|
|
3
3
|
import { Button as Jt } from "./button.js";
|
|
4
4
|
import { jsx as Q, jsxs as Xt } from "react/jsx-runtime";
|
|
5
|
-
import {
|
|
5
|
+
import { HugeiconsIcon as Yt } from "@hugeicons/react";
|
|
6
|
+
import { ChevronLeftIcon as dn, ChevronRightIcon as pn } from "@hugeicons/core-free-icons";
|
|
6
7
|
import * as H from "react";
|
|
7
|
-
import { useCallback as
|
|
8
|
-
function
|
|
8
|
+
import { useCallback as mn, useEffect as Ct, useRef as Gt, useState as $t } from "react";
|
|
9
|
+
function gn(t) {
|
|
9
10
|
return Object.prototype.toString.call(t) === "[object Object]";
|
|
10
11
|
}
|
|
11
12
|
function qt(t) {
|
|
12
|
-
return
|
|
13
|
+
return gn(t) || Array.isArray(t);
|
|
13
14
|
}
|
|
14
|
-
function
|
|
15
|
+
function hn() {
|
|
15
16
|
return !!(typeof window < "u" && window.document && window.document.createElement);
|
|
16
17
|
}
|
|
17
18
|
function Dt(t, n) {
|
|
@@ -24,7 +25,7 @@ function Dt(t, n) {
|
|
|
24
25
|
function Kt(t) {
|
|
25
26
|
return t.concat().sort((n, e) => n.name > e.name ? 1 : -1).map((n) => n.options);
|
|
26
27
|
}
|
|
27
|
-
function
|
|
28
|
+
function Sn(t, n) {
|
|
28
29
|
if (t.length !== n.length) return !1;
|
|
29
30
|
const e = Kt(t), s = Kt(n);
|
|
30
31
|
return e.every((i, o) => {
|
|
@@ -53,10 +54,10 @@ function Nt(t) {
|
|
|
53
54
|
function lt(t, n) {
|
|
54
55
|
return A(t - n);
|
|
55
56
|
}
|
|
56
|
-
function
|
|
57
|
+
function yn(t, n) {
|
|
57
58
|
return t === 0 || n === 0 || A(t) <= A(n) ? 0 : A(lt(A(t), A(n)) / t);
|
|
58
59
|
}
|
|
59
|
-
function
|
|
60
|
+
function bn(t) {
|
|
60
61
|
return Math.round(t * 100) / 100;
|
|
61
62
|
}
|
|
62
63
|
function ft(t) {
|
|
@@ -77,16 +78,16 @@ function Qt(t, n = 0) {
|
|
|
77
78
|
function dt(t) {
|
|
78
79
|
return Object.keys(t);
|
|
79
80
|
}
|
|
80
|
-
function
|
|
81
|
+
function _t(t, n) {
|
|
81
82
|
return [t, n].reduce((e, s) => (dt(s).forEach((i) => {
|
|
82
83
|
const o = e[i], r = s[i];
|
|
83
|
-
e[i] = Ut(o) && Ut(r) ?
|
|
84
|
+
e[i] = Ut(o) && Ut(r) ? _t(o, r) : r;
|
|
84
85
|
}), e), {});
|
|
85
86
|
}
|
|
86
87
|
function At(t, n) {
|
|
87
88
|
return typeof n.MouseEvent < "u" && t instanceof n.MouseEvent;
|
|
88
89
|
}
|
|
89
|
-
function
|
|
90
|
+
function xn(t, n) {
|
|
90
91
|
const e = {
|
|
91
92
|
start: s,
|
|
92
93
|
center: i,
|
|
@@ -127,7 +128,7 @@ function pt() {
|
|
|
127
128
|
};
|
|
128
129
|
return s;
|
|
129
130
|
}
|
|
130
|
-
function
|
|
131
|
+
function vn(t, n, e, s) {
|
|
131
132
|
const i = pt(), o = 1e3 / 60;
|
|
132
133
|
let r = null, u = 0, c = 0;
|
|
133
134
|
function l() {
|
|
@@ -164,7 +165,7 @@ function xn(t, n, e, s) {
|
|
|
164
165
|
render: s
|
|
165
166
|
};
|
|
166
167
|
}
|
|
167
|
-
function
|
|
168
|
+
function En(t, n) {
|
|
168
169
|
const e = n === "rtl", s = t === "y", i = s ? "y" : "x", o = s ? "x" : "y", r = !s && e ? -1 : 1, u = f(), c = m();
|
|
169
170
|
function l(p) {
|
|
170
171
|
const { height: d, width: h } = p;
|
|
@@ -216,7 +217,7 @@ function tt(t = 0, n = 0) {
|
|
|
216
217
|
removeOffset: u
|
|
217
218
|
};
|
|
218
219
|
}
|
|
219
|
-
function
|
|
220
|
+
function Zt(t, n, e) {
|
|
220
221
|
const { constrain: s } = tt(0, t), i = t + 1;
|
|
221
222
|
let o = r(n);
|
|
222
223
|
function r(g) {
|
|
@@ -232,7 +233,7 @@ function _t(t, n, e) {
|
|
|
232
233
|
return f().set(u() + g);
|
|
233
234
|
}
|
|
234
235
|
function f() {
|
|
235
|
-
return
|
|
236
|
+
return Zt(t, u(), e);
|
|
236
237
|
}
|
|
237
238
|
const m = {
|
|
238
239
|
get: u,
|
|
@@ -242,7 +243,7 @@ function _t(t, n, e) {
|
|
|
242
243
|
};
|
|
243
244
|
return m;
|
|
244
245
|
}
|
|
245
|
-
function
|
|
246
|
+
function Ln(t, n, e, s, i, o, r, u, c, l, f, m, g, p, d, h, S, a, b) {
|
|
246
247
|
const { cross: I, direction: P } = t, T = [
|
|
247
248
|
"INPUT",
|
|
248
249
|
"SELECT",
|
|
@@ -296,7 +297,7 @@ function En(t, n, e, s, i, o, r, u, c, l, f, m, g, p, d, h, S, a, b) {
|
|
|
296
297
|
w > h && (J = !0), l.useFriction(0.3).useDuration(0.75), u.start(), i.add(P(X)), y.preventDefault();
|
|
297
298
|
}
|
|
298
299
|
function M(y) {
|
|
299
|
-
const E = f.byDistance(0, !1).index !== m.get(), L = o.pointerUp(y) * it(), w = st(P(L), E), U =
|
|
300
|
+
const E = f.byDistance(0, !1).index !== m.get(), L = o.pointerUp(y) * it(), w = st(P(L), E), U = yn(L, w), X = k - 10 * U, ct = a + U / 50;
|
|
300
301
|
G = !1, _ = !1, v.clear(), l.useDuration(X).useFriction(ct), c.distance(w, !d), $ = !1, g.emit("pointerUp");
|
|
301
302
|
}
|
|
302
303
|
function et(y) {
|
|
@@ -311,7 +312,7 @@ function En(t, n, e, s, i, o, r, u, c, l, f, m, g, p, d, h, S, a, b) {
|
|
|
311
312
|
pointerDown: z
|
|
312
313
|
};
|
|
313
314
|
}
|
|
314
|
-
function
|
|
315
|
+
function In(t, n) {
|
|
315
316
|
let s, i;
|
|
316
317
|
function o(f) {
|
|
317
318
|
return f.timeStamp;
|
|
@@ -339,7 +340,7 @@ function Ln(t, n) {
|
|
|
339
340
|
readPoint: r
|
|
340
341
|
};
|
|
341
342
|
}
|
|
342
|
-
function
|
|
343
|
+
function Cn() {
|
|
343
344
|
function t(n) {
|
|
344
345
|
const { offsetTop: e, offsetLeft: s, offsetWidth: i, offsetHeight: o } = n;
|
|
345
346
|
return {
|
|
@@ -353,13 +354,13 @@ function In() {
|
|
|
353
354
|
}
|
|
354
355
|
return { measure: t };
|
|
355
356
|
}
|
|
356
|
-
function
|
|
357
|
+
function Pn(t) {
|
|
357
358
|
function n(e) {
|
|
358
359
|
return t * (e / 100);
|
|
359
360
|
}
|
|
360
361
|
return { measure: n };
|
|
361
362
|
}
|
|
362
|
-
function
|
|
363
|
+
function An(t, n, e, s, i, o, r) {
|
|
363
364
|
const u = [t].concat(s);
|
|
364
365
|
let c, l, f = [], m = !1;
|
|
365
366
|
function g(h) {
|
|
@@ -392,7 +393,7 @@ function Pn(t, n, e, s, i, o, r) {
|
|
|
392
393
|
destroy: d
|
|
393
394
|
};
|
|
394
395
|
}
|
|
395
|
-
function
|
|
396
|
+
function Dn(t, n, e, s, i, o) {
|
|
396
397
|
let r = 0, u = 0, c = i, l = o, f = t.get(), m = 0;
|
|
397
398
|
function g() {
|
|
398
399
|
const x = s.get() - t.get(), C = !c;
|
|
@@ -436,7 +437,7 @@ function An(t, n, e, s, i, o) {
|
|
|
436
437
|
};
|
|
437
438
|
return T;
|
|
438
439
|
}
|
|
439
|
-
function
|
|
440
|
+
function Tn(t, n, e, s, i) {
|
|
440
441
|
const o = i.measure(10), r = i.measure(50), u = tt(0.1, 0.99);
|
|
441
442
|
let c = !1;
|
|
442
443
|
function l() {
|
|
@@ -456,7 +457,7 @@ function Dn(t, n, e, s, i) {
|
|
|
456
457
|
toggleActive: m
|
|
457
458
|
};
|
|
458
459
|
}
|
|
459
|
-
function
|
|
460
|
+
function Nn(t, n, e, s, i) {
|
|
460
461
|
const o = tt(-n + t, 0), r = m(), u = f(), c = g();
|
|
461
462
|
function l(p, d) {
|
|
462
463
|
return lt(p, d) <= 1;
|
|
@@ -482,11 +483,11 @@ function Tn(t, n, e, s, i) {
|
|
|
482
483
|
scrollContainLimit: u
|
|
483
484
|
};
|
|
484
485
|
}
|
|
485
|
-
function
|
|
486
|
+
function On(t, n, e) {
|
|
486
487
|
const s = n[0];
|
|
487
488
|
return { limit: tt(e ? s - t : j(n), s) };
|
|
488
489
|
}
|
|
489
|
-
function
|
|
490
|
+
function wn(t, n, e, s) {
|
|
490
491
|
const { reachedMin: o, reachedMax: r } = tt(n.min + 0.1, n.max + 0.1);
|
|
491
492
|
function u(l) {
|
|
492
493
|
return l === 1 ? r(e.get()) : l === -1 ? o(e.get()) : !1;
|
|
@@ -498,7 +499,7 @@ function On(t, n, e, s) {
|
|
|
498
499
|
}
|
|
499
500
|
return { loop: c };
|
|
500
501
|
}
|
|
501
|
-
function
|
|
502
|
+
function Mn(t) {
|
|
502
503
|
const { max: n, length: e } = t;
|
|
503
504
|
function s(i) {
|
|
504
505
|
const o = i - n;
|
|
@@ -506,7 +507,7 @@ function wn(t) {
|
|
|
506
507
|
}
|
|
507
508
|
return { get: s };
|
|
508
509
|
}
|
|
509
|
-
function
|
|
510
|
+
function kn(t, n, e, s, i) {
|
|
510
511
|
const { startEdge: o, endEdge: r } = t, { groupSlides: u } = i, c = m().map(n.measure), l = g(), f = p();
|
|
511
512
|
function m() {
|
|
512
513
|
return u(s).map((d) => j(d)[r] - d[0][o]).map(A);
|
|
@@ -522,7 +523,7 @@ function Mn(t, n, e, s, i) {
|
|
|
522
523
|
snapsAligned: f
|
|
523
524
|
};
|
|
524
525
|
}
|
|
525
|
-
function
|
|
526
|
+
function Fn(t, n, e, s, i, o) {
|
|
526
527
|
const { groupSlides: r } = i, { min: u, max: c } = s, l = f();
|
|
527
528
|
function f() {
|
|
528
529
|
const m = r(o), g = !t || n === "keepSnaps";
|
|
@@ -533,7 +534,7 @@ function kn(t, n, e, s, i, o) {
|
|
|
533
534
|
}
|
|
534
535
|
return { slideRegistry: l };
|
|
535
536
|
}
|
|
536
|
-
function
|
|
537
|
+
function zn(t, n, e, s, i) {
|
|
537
538
|
const { reachedAny: o, removeOffset: r, constrain: u } = s;
|
|
538
539
|
function c(p) {
|
|
539
540
|
return p.concat().sort((d, h) => A(d) - A(h))[0];
|
|
@@ -581,7 +582,7 @@ function Fn(t, n, e, s, i) {
|
|
|
581
582
|
shortcut: f
|
|
582
583
|
};
|
|
583
584
|
}
|
|
584
|
-
function
|
|
585
|
+
function Bn(t, n, e, s, i, o, r) {
|
|
585
586
|
function u(f) {
|
|
586
587
|
const m = f.distance, g = f.index !== n.get();
|
|
587
588
|
o.add(m), m && (s.duration() ? t.start() : (t.update(), t.render(1), t.update())), g && (e.set(n.get()), n.set(f.index), r.emit("select"));
|
|
@@ -598,7 +599,7 @@ function zn(t, n, e, s, i, o, r) {
|
|
|
598
599
|
index: l
|
|
599
600
|
};
|
|
600
601
|
}
|
|
601
|
-
function
|
|
602
|
+
function jn(t, n, e, s, i, o, r, u) {
|
|
602
603
|
const c = {
|
|
603
604
|
passive: !0,
|
|
604
605
|
capture: !0
|
|
@@ -647,7 +648,7 @@ function at(t) {
|
|
|
647
648
|
subtract: o
|
|
648
649
|
};
|
|
649
650
|
}
|
|
650
|
-
function
|
|
651
|
+
function Wt(t, n) {
|
|
651
652
|
const e = t.scroll === "x" ? r : u, s = n.style;
|
|
652
653
|
let i = null, o = !1;
|
|
653
654
|
function r(m) {
|
|
@@ -658,7 +659,7 @@ function Zt(t, n) {
|
|
|
658
659
|
}
|
|
659
660
|
function c(m) {
|
|
660
661
|
if (o) return;
|
|
661
|
-
const g =
|
|
662
|
+
const g = bn(t.direction(m));
|
|
662
663
|
g !== i && (s.transform = e(g), i = g);
|
|
663
664
|
}
|
|
664
665
|
function l(m) {
|
|
@@ -673,7 +674,7 @@ function Zt(t, n) {
|
|
|
673
674
|
toggleActive: l
|
|
674
675
|
};
|
|
675
676
|
}
|
|
676
|
-
function
|
|
677
|
+
function Vn(t, n, e, s, i, o, r, u, c) {
|
|
677
678
|
const f = ft(i), m = ft(i).reverse(), g = a().concat(b());
|
|
678
679
|
function p(x, C) {
|
|
679
680
|
return x.reduce((v, D) => v - i[D], C);
|
|
@@ -695,7 +696,7 @@ function jn(t, n, e, s, i, o, r, u, c) {
|
|
|
695
696
|
index: N,
|
|
696
697
|
loopPoint: B,
|
|
697
698
|
slideLocation: at(-1),
|
|
698
|
-
translate:
|
|
699
|
+
translate: Wt(t, c[N]),
|
|
699
700
|
target: () => u.get() > B ? O : k
|
|
700
701
|
};
|
|
701
702
|
});
|
|
@@ -705,7 +706,8 @@ function jn(t, n, e, s, i, o, r, u, c) {
|
|
|
705
706
|
return S(d(m, x), e, !1);
|
|
706
707
|
}
|
|
707
708
|
function b() {
|
|
708
|
-
|
|
709
|
+
const x = n - r[0] - 1;
|
|
710
|
+
return S(d(f, x), -e, !0);
|
|
709
711
|
}
|
|
710
712
|
function I() {
|
|
711
713
|
return g.every(({ index: x }) => p(f.filter((C) => C !== x), n) <= 0.1);
|
|
@@ -726,7 +728,7 @@ function jn(t, n, e, s, i, o, r, u, c) {
|
|
|
726
728
|
loopPoints: g
|
|
727
729
|
};
|
|
728
730
|
}
|
|
729
|
-
function
|
|
731
|
+
function Rn(t, n, e) {
|
|
730
732
|
let s, i = !1;
|
|
731
733
|
function o(u) {
|
|
732
734
|
if (!e) return;
|
|
@@ -748,7 +750,7 @@ function Vn(t, n, e) {
|
|
|
748
750
|
destroy: r
|
|
749
751
|
};
|
|
750
752
|
}
|
|
751
|
-
function
|
|
753
|
+
function Hn(t, n, e, s) {
|
|
752
754
|
const i = {};
|
|
753
755
|
let o = null, r = null, u, c = !1;
|
|
754
756
|
function l() {
|
|
@@ -783,7 +785,7 @@ function Rn(t, n, e, s) {
|
|
|
783
785
|
get: g
|
|
784
786
|
};
|
|
785
787
|
}
|
|
786
|
-
function
|
|
788
|
+
function Gn(t, n, e, s, i, o) {
|
|
787
789
|
const { measureSize: r, startEdge: u, endEdge: c } = t, l = e[0] && i, f = d(), m = h(), g = e.map(r), p = S();
|
|
788
790
|
function d() {
|
|
789
791
|
if (!l) return 0;
|
|
@@ -808,7 +810,7 @@ function Hn(t, n, e, s, i, o) {
|
|
|
808
810
|
endGap: m
|
|
809
811
|
};
|
|
810
812
|
}
|
|
811
|
-
function
|
|
813
|
+
function $n(t, n, e, s, i, o, r, u, c) {
|
|
812
814
|
const { startEdge: l, endEdge: f, direction: m } = t, g = Tt(e);
|
|
813
815
|
function p(S, a) {
|
|
814
816
|
return ft(S).filter((b) => b % a === 0).map((b) => S.slice(b, b + a));
|
|
@@ -827,15 +829,15 @@ function Gn(t, n, e, s, i, o, r, u, c) {
|
|
|
827
829
|
}
|
|
828
830
|
return { groupSlides: h };
|
|
829
831
|
}
|
|
830
|
-
function
|
|
831
|
-
const { align: u, axis: c, direction: l, startIndex: f, loop: m, duration: g, dragFree: p, dragThreshold: d, inViewThreshold: h, slidesToScroll: S, skipSnaps: a, containScroll: b, watchResize: I, watchSlides: P, watchDrag: T, watchFocus: x } = o, C = 2, v =
|
|
832
|
+
function qn(t, n, e, s, i, o, r) {
|
|
833
|
+
const { align: u, axis: c, direction: l, startIndex: f, loop: m, duration: g, dragFree: p, dragThreshold: d, inViewThreshold: h, slidesToScroll: S, skipSnaps: a, containScroll: b, watchResize: I, watchSlides: P, watchDrag: T, watchFocus: x } = o, C = 2, v = Cn(), D = v.measure(n), N = e.map(v.measure), O = En(c, l), k = O.measureSize(D), V = Pn(k), B = xn(u, k), Y = !m && !!b, { slideSizes: _, slideSizesWithGaps: G, startGap: J, endGap: $ } = Gn(O, D, N, e, m || !!b, i), Z = $n(O, k, S, m, D, N, J, $, C), { snaps: q, snapsAligned: nt } = kn(O, B, D, N, Z), K = -j(q) + j(G), { snapsContained: it, scrollContainLimit: st } = Nn(k, K, nt, b, C), F = Y ? it : nt, { limit: R } = On(K, F, m), M = Zt(gt(F), f, m), et = M.clone(), z = ft(e), y = ({ dragHandler: ot, scrollBody: Lt, scrollBounds: It, options: { loop: ht } }) => {
|
|
832
834
|
ht || It.constrain(ot.pointerDown()), Lt.seek();
|
|
833
|
-
}, E = ({ scrollBody: ot, translate: Lt, location: It, offsetLocation: ht, previousLocation:
|
|
834
|
-
const Vt = ot.settled(),
|
|
835
|
-
Ht &&
|
|
836
|
-
const
|
|
837
|
-
ht.set(
|
|
838
|
-
}, L =
|
|
835
|
+
}, E = ({ scrollBody: ot, translate: Lt, location: It, offsetLocation: ht, previousLocation: rn, scrollLooper: on, slideLooper: sn, dragHandler: cn, animation: un, eventHandler: zt, scrollBounds: an, options: { loop: Bt } }, jt) => {
|
|
836
|
+
const Vt = ot.settled(), ln = !an.shouldConstrain(), Rt = Bt ? Vt : Vt && ln, Ht = Rt && !cn.pointerDown();
|
|
837
|
+
Ht && un.stop();
|
|
838
|
+
const fn = It.get() * jt + rn.get() * (1 - jt);
|
|
839
|
+
ht.set(fn), Bt && (on.loop(ot.direction()), sn.loop()), Lt.to(ht.get()), Ht && zt.emit("settle"), Rt || zt.emit("scroll");
|
|
840
|
+
}, L = vn(s, i, () => y(Et), (ot) => E(Et, ot)), w = 0.68, U = F[M.get()], X = at(U), ct = at(U), rt = at(U), W = at(U), ut = Dn(X, rt, ct, W, g, w), xt = zn(m, F, K, R, W), vt = Bn(L, M, et, ut, xt, W, r), Mt = Mn(R), kt = pt(), nn = Hn(n, e, r, h), { slideRegistry: Ft } = Fn(Y, b, F, st, Z, z), en = jn(t, e, Ft, vt, ut, kt, r, x), Et = {
|
|
839
841
|
ownerDocument: s,
|
|
840
842
|
ownerWindow: i,
|
|
841
843
|
eventHandler: r,
|
|
@@ -843,7 +845,7 @@ function $n(t, n, e, s, i, o, r) {
|
|
|
843
845
|
slideRects: N,
|
|
844
846
|
animation: L,
|
|
845
847
|
axis: O,
|
|
846
|
-
dragHandler:
|
|
848
|
+
dragHandler: Ln(O, t, s, i, W, In(O, i), X, L, vt, ut, xt, M, r, V, p, d, a, w, T),
|
|
847
849
|
eventStore: kt,
|
|
848
850
|
percentOfView: V,
|
|
849
851
|
index: M,
|
|
@@ -853,10 +855,10 @@ function $n(t, n, e, s, i, o, r) {
|
|
|
853
855
|
offsetLocation: rt,
|
|
854
856
|
previousLocation: ct,
|
|
855
857
|
options: o,
|
|
856
|
-
resizeHandler:
|
|
858
|
+
resizeHandler: An(n, r, i, e, O, I, v),
|
|
857
859
|
scrollBody: ut,
|
|
858
|
-
scrollBounds:
|
|
859
|
-
scrollLooper:
|
|
860
|
+
scrollBounds: Tn(R, rt, W, ut, V),
|
|
861
|
+
scrollLooper: wn(K, R, rt, [
|
|
860
862
|
X,
|
|
861
863
|
rt,
|
|
862
864
|
ct,
|
|
@@ -867,19 +869,19 @@ function $n(t, n, e, s, i, o, r) {
|
|
|
867
869
|
scrollSnaps: F,
|
|
868
870
|
scrollTarget: xt,
|
|
869
871
|
scrollTo: vt,
|
|
870
|
-
slideLooper:
|
|
871
|
-
slideFocus:
|
|
872
|
-
slidesHandler:
|
|
873
|
-
slidesInView:
|
|
872
|
+
slideLooper: Vn(O, k, K, _, G, q, F, rt, e),
|
|
873
|
+
slideFocus: en,
|
|
874
|
+
slidesHandler: Rn(n, r, P),
|
|
875
|
+
slidesInView: nn,
|
|
874
876
|
slideIndexes: z,
|
|
875
877
|
slideRegistry: Ft,
|
|
876
878
|
slidesToScroll: Z,
|
|
877
879
|
target: W,
|
|
878
|
-
translate:
|
|
880
|
+
translate: Wt(O, n)
|
|
879
881
|
};
|
|
880
882
|
return Et;
|
|
881
883
|
}
|
|
882
|
-
function
|
|
884
|
+
function Kn() {
|
|
883
885
|
let t = {}, n;
|
|
884
886
|
function e(l) {
|
|
885
887
|
n = l;
|
|
@@ -908,7 +910,7 @@ function qn() {
|
|
|
908
910
|
};
|
|
909
911
|
return c;
|
|
910
912
|
}
|
|
911
|
-
var
|
|
913
|
+
var Un = {
|
|
912
914
|
align: "center",
|
|
913
915
|
axis: "x",
|
|
914
916
|
container: null,
|
|
@@ -930,9 +932,9 @@ var Kn = {
|
|
|
930
932
|
watchSlides: !0,
|
|
931
933
|
watchFocus: !0
|
|
932
934
|
};
|
|
933
|
-
function
|
|
935
|
+
function Qn(t) {
|
|
934
936
|
function n(i, o) {
|
|
935
|
-
return
|
|
937
|
+
return _t(i, o || {});
|
|
936
938
|
}
|
|
937
939
|
function e(i) {
|
|
938
940
|
const o = i.breakpoints || {};
|
|
@@ -947,7 +949,7 @@ function Un(t) {
|
|
|
947
949
|
optionsMediaQueries: s
|
|
948
950
|
};
|
|
949
951
|
}
|
|
950
|
-
function
|
|
952
|
+
function Jn(t) {
|
|
951
953
|
let n = [];
|
|
952
954
|
function e(i, o) {
|
|
953
955
|
return n = o.filter(({ options: r }) => t.optionsAtMedia(r).active !== !1), n.forEach((r) => r.init(i, t)), o.reduce((r, u) => Object.assign(r, { [u.name]: u }), {});
|
|
@@ -961,8 +963,8 @@ function Qn(t) {
|
|
|
961
963
|
};
|
|
962
964
|
}
|
|
963
965
|
function St(t, n, e) {
|
|
964
|
-
const s = t.ownerDocument, i = s.defaultView, o =
|
|
965
|
-
let S = !1, a, b = l(
|
|
966
|
+
const s = t.ownerDocument, i = s.defaultView, o = Qn(i), r = Jn(o), u = pt(), c = Kn(), { mergeOptions: l, optionsAtMedia: f, optionsMediaQueries: m } = o, { on: g, off: p, emit: d } = c, h = O;
|
|
967
|
+
let S = !1, a, b = l(Un, St.globalOptions), I = l(b), P = [], T, x, C;
|
|
966
968
|
function v() {
|
|
967
969
|
const { container: y, slides: E } = I;
|
|
968
970
|
x = (Pt(y) ? t.querySelector(y) : y) || t.children[0];
|
|
@@ -970,7 +972,7 @@ function St(t, n, e) {
|
|
|
970
972
|
C = [].slice.call(L || x.children);
|
|
971
973
|
}
|
|
972
974
|
function D(y) {
|
|
973
|
-
const E =
|
|
975
|
+
const E = qn(t, x, C, s, i, y, c);
|
|
974
976
|
return y.loop && !E.slideLooper.canLoop() ? D(Object.assign({}, y, { loop: !1 })) : E;
|
|
975
977
|
}
|
|
976
978
|
function N(y, E) {
|
|
@@ -1061,15 +1063,15 @@ function St(t, n, e) {
|
|
|
1061
1063
|
}
|
|
1062
1064
|
St.globalOptions = void 0;
|
|
1063
1065
|
function wt(t = {}, n = []) {
|
|
1064
|
-
const e = Gt(t), s = Gt(n), [i, o] = $t(), [r, u] = $t(), c =
|
|
1066
|
+
const e = Gt(t), s = Gt(n), [i, o] = $t(), [r, u] = $t(), c = mn(() => {
|
|
1065
1067
|
i && i.reInit(e.current, s.current);
|
|
1066
1068
|
}, [i]);
|
|
1067
1069
|
return Ct(() => {
|
|
1068
1070
|
Dt(e.current, t) || (e.current = t, c());
|
|
1069
1071
|
}, [t, c]), Ct(() => {
|
|
1070
|
-
|
|
1072
|
+
Sn(s.current, n) || (s.current = n, c());
|
|
1071
1073
|
}, [n, c]), Ct(() => {
|
|
1072
|
-
if (
|
|
1074
|
+
if (hn() && r) {
|
|
1073
1075
|
St.globalOptions = wt.globalOptions;
|
|
1074
1076
|
const l = St(r, e.current, s.current);
|
|
1075
1077
|
return o(l), () => l.destroy();
|
|
@@ -1077,13 +1079,13 @@ function wt(t = {}, n = []) {
|
|
|
1077
1079
|
}, [r, o]), [u, i];
|
|
1078
1080
|
}
|
|
1079
1081
|
wt.globalOptions = void 0;
|
|
1080
|
-
var
|
|
1082
|
+
var tn = H.createContext(null);
|
|
1081
1083
|
function bt() {
|
|
1082
|
-
const t = H.useContext(
|
|
1084
|
+
const t = H.useContext(tn);
|
|
1083
1085
|
if (!t) throw new Error("useCarousel must be used within a <Carousel />");
|
|
1084
1086
|
return t;
|
|
1085
1087
|
}
|
|
1086
|
-
function
|
|
1088
|
+
function ne({ orientation: t = "horizontal", opts: n, setApi: e, plugins: s, className: i, children: o, ...r }) {
|
|
1087
1089
|
const [u, c] = wt({
|
|
1088
1090
|
...n,
|
|
1089
1091
|
axis: t === "horizontal" ? "x" : "y"
|
|
@@ -1103,7 +1105,7 @@ function Wn({ orientation: t = "horizontal", opts: n, setApi: e, plugins: s, cla
|
|
|
1103
1105
|
return p(c), c.on("reInit", p), c.on("select", p), () => {
|
|
1104
1106
|
c?.off("select", p);
|
|
1105
1107
|
};
|
|
1106
|
-
}, [c, p]), /* @__PURE__ */ Q(
|
|
1108
|
+
}, [c, p]), /* @__PURE__ */ Q(tn.Provider, {
|
|
1107
1109
|
value: {
|
|
1108
1110
|
carouselRef: u,
|
|
1109
1111
|
api: c,
|
|
@@ -1125,7 +1127,7 @@ function Wn({ orientation: t = "horizontal", opts: n, setApi: e, plugins: s, cla
|
|
|
1125
1127
|
})
|
|
1126
1128
|
});
|
|
1127
1129
|
}
|
|
1128
|
-
function
|
|
1130
|
+
function ee({ className: t, ...n }) {
|
|
1129
1131
|
const { carouselRef: e, orientation: s } = bt();
|
|
1130
1132
|
return /* @__PURE__ */ Q("div", {
|
|
1131
1133
|
ref: e,
|
|
@@ -1137,7 +1139,7 @@ function te({ className: t, ...n }) {
|
|
|
1137
1139
|
})
|
|
1138
1140
|
});
|
|
1139
1141
|
}
|
|
1140
|
-
function
|
|
1142
|
+
function re({ className: t, ...n }) {
|
|
1141
1143
|
const { orientation: e } = bt();
|
|
1142
1144
|
return /* @__PURE__ */ Q("div", {
|
|
1143
1145
|
role: "group",
|
|
@@ -1147,7 +1149,7 @@ function ne({ className: t, ...n }) {
|
|
|
1147
1149
|
...n
|
|
1148
1150
|
});
|
|
1149
1151
|
}
|
|
1150
|
-
function
|
|
1152
|
+
function oe({ className: t, variant: n = "outline", size: e = "icon-sm", ...s }) {
|
|
1151
1153
|
const { orientation: i, scrollPrev: o, canScrollPrev: r } = bt();
|
|
1152
1154
|
return /* @__PURE__ */ Xt(Jt, {
|
|
1153
1155
|
"data-slot": "carousel-previous",
|
|
@@ -1157,13 +1159,16 @@ function ee({ className: t, variant: n = "outline", size: e = "icon-sm", ...s })
|
|
|
1157
1159
|
disabled: !r,
|
|
1158
1160
|
onClick: o,
|
|
1159
1161
|
...s,
|
|
1160
|
-
children: [/* @__PURE__ */ Q(
|
|
1162
|
+
children: [/* @__PURE__ */ Q(Yt, {
|
|
1163
|
+
icon: dn,
|
|
1164
|
+
className: "rtl:rotate-180"
|
|
1165
|
+
}), /* @__PURE__ */ Q("span", {
|
|
1161
1166
|
className: "sr-only",
|
|
1162
1167
|
children: "Previous slide"
|
|
1163
1168
|
})]
|
|
1164
1169
|
});
|
|
1165
1170
|
}
|
|
1166
|
-
function
|
|
1171
|
+
function ie({ className: t, variant: n = "outline", size: e = "icon-sm", ...s }) {
|
|
1167
1172
|
const { orientation: i, scrollNext: o, canScrollNext: r } = bt();
|
|
1168
1173
|
return /* @__PURE__ */ Xt(Jt, {
|
|
1169
1174
|
"data-slot": "carousel-next",
|
|
@@ -1173,18 +1178,21 @@ function re({ className: t, variant: n = "outline", size: e = "icon-sm", ...s })
|
|
|
1173
1178
|
disabled: !r,
|
|
1174
1179
|
onClick: o,
|
|
1175
1180
|
...s,
|
|
1176
|
-
children: [/* @__PURE__ */ Q(
|
|
1181
|
+
children: [/* @__PURE__ */ Q(Yt, {
|
|
1182
|
+
icon: pn,
|
|
1183
|
+
className: "rtl:rotate-180"
|
|
1184
|
+
}), /* @__PURE__ */ Q("span", {
|
|
1177
1185
|
className: "sr-only",
|
|
1178
1186
|
children: "Next slide"
|
|
1179
1187
|
})]
|
|
1180
1188
|
});
|
|
1181
1189
|
}
|
|
1182
1190
|
export {
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1191
|
+
ne as Carousel,
|
|
1192
|
+
ee as CarouselContent,
|
|
1193
|
+
re as CarouselItem,
|
|
1194
|
+
ie as CarouselNext,
|
|
1195
|
+
oe as CarouselPrevious,
|
|
1188
1196
|
bt as useCarousel
|
|
1189
1197
|
};
|
|
1190
1198
|
|