@enya-learning/nova 0.6.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/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 +1 -1
- package/dist/components/accordion.js.map +1 -1
- package/dist/components/alert-dialog.js +1 -1
- package/dist/components/alert.js +2 -2
- package/dist/components/aspect-ratio.js +1 -1
- package/dist/components/avatar.js +1 -1
- package/dist/components/badge.js +2 -2
- package/dist/components/box.js +1 -1
- package/dist/components/breadcrumb.js +1 -1
- package/dist/components/breadcrumb.js.map +1 -1
- package/dist/components/button-group.js +2 -2
- package/dist/components/button.js +2 -2
- package/dist/components/calendar.js +59 -58
- package/dist/components/calendar.js.map +1 -1
- package/dist/components/card.js +1 -1
- package/dist/components/carousel.js +27 -26
- package/dist/components/carousel.js.map +1 -1
- package/dist/components/chart.js +1460 -1455
- package/dist/components/chart.js.map +1 -1
- package/dist/components/checkbox.js +1 -1
- package/dist/components/checkbox.js.map +1 -1
- package/dist/components/combobox.js +7 -7
- package/dist/components/combobox.js.map +1 -1
- package/dist/components/command.js +83 -83
- package/dist/components/command.js.map +1 -1
- package/dist/components/context-menu.js +1 -1
- package/dist/components/context-menu.js.map +1 -1
- package/dist/components/dialog.js +1 -1
- package/dist/components/dialog.js.map +1 -1
- package/dist/components/drawer.js +1 -1
- package/dist/components/drawer.js.map +1 -1
- package/dist/components/dropdown-menu.js +1 -1
- package/dist/components/dropdown-menu.js.map +1 -1
- package/dist/components/empty.js +2 -2
- package/dist/components/enya-logo.js +88 -78
- package/dist/components/enya-logo.js.map +1 -1
- package/dist/components/field.js +2 -2
- package/dist/components/field.js.map +1 -1
- package/dist/components/heading.js +2 -2
- package/dist/components/hover-card.js +1 -1
- package/dist/components/hover-card.js.map +1 -1
- package/dist/components/input-group.js +2 -2
- package/dist/components/input-otp.js +61 -60
- package/dist/components/input-otp.js.map +1 -1
- package/dist/components/input.js +1 -1
- package/dist/components/item.js +2 -2
- package/dist/components/kbd.js +1 -1
- package/dist/components/label.js +1 -1
- package/dist/components/menubar.js +1 -1
- package/dist/components/menubar.js.map +1 -1
- package/dist/components/native-select.js +1 -1
- package/dist/components/native-select.js.map +1 -1
- package/dist/components/navigation-menu.js +2 -2
- package/dist/components/navigation-menu.js.map +1 -1
- package/dist/components/pagination.js +1 -1
- 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 +1 -1
- package/dist/components/progress.js.map +1 -1
- package/dist/components/radio-group.js +1 -1
- package/dist/components/radio-group.js.map +1 -1
- package/dist/components/resizable.js +119 -116
- 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 +1 -1
- package/dist/components/select.js.map +1 -1
- package/dist/components/separator.js +1 -1
- package/dist/components/sheet.js +1 -1
- package/dist/components/sheet.js.map +1 -1
- package/dist/components/sidebar.js +10 -10
- package/dist/components/sidebar.js.map +1 -1
- package/dist/components/skeleton.js +1 -1
- package/dist/components/slider.js +1 -1
- package/dist/components/slider.js.map +1 -1
- package/dist/components/sonner.js +163 -165
- package/dist/components/sonner.js.map +1 -1
- package/dist/components/spinner.js +1 -1
- package/dist/components/switch.js +1 -1
- package/dist/components/switch.js.map +1 -1
- package/dist/components/table.js +1 -1
- package/dist/components/table.js.map +1 -1
- package/dist/components/tabs.js +2 -2
- package/dist/components/text.js +2 -2
- package/dist/components/textarea.js +1 -1
- package/dist/components/toggle-group.js +1 -1
- package/dist/components/toggle-group.js.map +1 -1
- package/dist/components/toggle.js +2 -2
- package/dist/components/tooltip.js +1 -1
- package/dist/components/tooltip.js.map +1 -1
- package/dist/index.js +28 -21
- package/dist/src/index.d.ts +1 -0
- package/dist/utils.js +1 -1
- package/package.json +15 -11
- 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/components/card.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
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
5
|
import { HugeiconsIcon as Yt } from "@hugeicons/react";
|
|
6
6
|
import { ChevronLeftIcon as dn, ChevronRightIcon as pn } from "@hugeicons/core-free-icons";
|
|
7
7
|
import * as H from "react";
|
|
8
|
-
import { useCallback as mn, useEffect as Ct, useRef as Gt, useState as
|
|
8
|
+
import { useCallback as mn, useEffect as Ct, useRef as Gt, useState as $t } from "react";
|
|
9
9
|
function gn(t) {
|
|
10
10
|
return Object.prototype.toString.call(t) === "[object Object]";
|
|
11
11
|
}
|
|
12
|
-
function
|
|
12
|
+
function qt(t) {
|
|
13
13
|
return gn(t) || Array.isArray(t);
|
|
14
14
|
}
|
|
15
15
|
function hn() {
|
|
@@ -19,7 +19,7 @@ function Dt(t, n) {
|
|
|
19
19
|
const e = Object.keys(t), s = Object.keys(n);
|
|
20
20
|
return e.length !== s.length || JSON.stringify(Object.keys(t.breakpoints || {})) !== JSON.stringify(Object.keys(n.breakpoints || {})) ? !1 : e.every((i) => {
|
|
21
21
|
const o = t[i], r = n[i];
|
|
22
|
-
return typeof o == "function" ? `${o}` == `${r}` :
|
|
22
|
+
return typeof o == "function" ? `${o}` == `${r}` : !qt(o) || !qt(r) ? o === r : Dt(o, r);
|
|
23
23
|
});
|
|
24
24
|
}
|
|
25
25
|
function Kt(t) {
|
|
@@ -255,7 +255,7 @@ function Ln(t, n, e, s, i, o, r, u, c, l, f, m, g, p, d, h, S, a, b) {
|
|
|
255
255
|
mouse: 500,
|
|
256
256
|
touch: 600
|
|
257
257
|
}, k = d ? 43 : 25;
|
|
258
|
-
let V = !1, B = 0, Y = 0, _ = !1, G = !1, J = !1,
|
|
258
|
+
let V = !1, B = 0, Y = 0, _ = !1, G = !1, J = !1, $ = !1;
|
|
259
259
|
function Z(y) {
|
|
260
260
|
if (!b) return;
|
|
261
261
|
function E(w) {
|
|
@@ -266,11 +266,11 @@ function Ln(t, n, e, s, i, o, r, u, c, l, f, m, g, p, d, h, S, a, b) {
|
|
|
266
266
|
}, x).add(L, "touchend", () => {
|
|
267
267
|
}).add(L, "touchstart", E).add(L, "mousedown", E).add(L, "touchcancel", M).add(L, "contextmenu", M).add(L, "click", et, !0);
|
|
268
268
|
}
|
|
269
|
-
function
|
|
269
|
+
function q() {
|
|
270
270
|
C.clear(), v.clear();
|
|
271
271
|
}
|
|
272
272
|
function nt() {
|
|
273
|
-
const y =
|
|
273
|
+
const y = $ ? e : n;
|
|
274
274
|
v.add(y, "touchmove", R, x).add(y, "touchend", M).add(y, "mousemove", R, x).add(y, "mouseup", M);
|
|
275
275
|
}
|
|
276
276
|
function K(y) {
|
|
@@ -278,7 +278,7 @@ function Ln(t, n, e, s, i, o, r, u, c, l, f, m, g, p, d, h, S, a, b) {
|
|
|
278
278
|
return T.includes(E);
|
|
279
279
|
}
|
|
280
280
|
function it() {
|
|
281
|
-
return (d ? O : N)[
|
|
281
|
+
return (d ? O : N)[$ ? "mouse" : "touch"];
|
|
282
282
|
}
|
|
283
283
|
function st(y, E) {
|
|
284
284
|
const L = m.add(Nt(y) * -1), w = f.byDistance(y, !d).distance;
|
|
@@ -286,19 +286,19 @@ function Ln(t, n, e, s, i, o, r, u, c, l, f, m, g, p, d, h, S, a, b) {
|
|
|
286
286
|
}
|
|
287
287
|
function F(y) {
|
|
288
288
|
const E = At(y, s);
|
|
289
|
-
|
|
289
|
+
$ = E, J = d && E && !y.buttons && V, V = lt(i.get(), r.get()) >= 2, !(E && y.button !== 0) && (K(y.target) || (_ = !0, o.pointerDown(y), l.useFriction(0).useDuration(0), i.set(r), nt(), B = o.readPoint(y), Y = o.readPoint(y, I), g.emit("pointerDown")));
|
|
290
290
|
}
|
|
291
291
|
function R(y) {
|
|
292
292
|
if (!At(y, s) && y.touches.length >= 2) return M(y);
|
|
293
293
|
const E = o.readPoint(y), L = o.readPoint(y, I), w = lt(E, B), U = lt(L, Y);
|
|
294
|
-
if (!G &&
|
|
294
|
+
if (!G && !$ && (!y.cancelable || (G = w > U, !G)))
|
|
295
295
|
return M(y);
|
|
296
296
|
const X = o.pointerMove(y);
|
|
297
297
|
w > h && (J = !0), l.useFriction(0.3).useDuration(0.75), u.start(), i.add(P(X)), y.preventDefault();
|
|
298
298
|
}
|
|
299
299
|
function M(y) {
|
|
300
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;
|
|
301
|
-
G = !1, _ = !1, v.clear(), l.useDuration(X).useFriction(ct), c.distance(w, !d),
|
|
301
|
+
G = !1, _ = !1, v.clear(), l.useDuration(X).useFriction(ct), c.distance(w, !d), $ = !1, g.emit("pointerUp");
|
|
302
302
|
}
|
|
303
303
|
function et(y) {
|
|
304
304
|
J && (y.stopPropagation(), y.preventDefault(), J = !1);
|
|
@@ -308,7 +308,7 @@ function Ln(t, n, e, s, i, o, r, u, c, l, f, m, g, p, d, h, S, a, b) {
|
|
|
308
308
|
}
|
|
309
309
|
return {
|
|
310
310
|
init: Z,
|
|
311
|
-
destroy:
|
|
311
|
+
destroy: q,
|
|
312
312
|
pointerDown: z
|
|
313
313
|
};
|
|
314
314
|
}
|
|
@@ -706,7 +706,8 @@ function Vn(t, n, e, s, i, o, r, u, c) {
|
|
|
706
706
|
return S(d(m, x), e, !1);
|
|
707
707
|
}
|
|
708
708
|
function b() {
|
|
709
|
-
|
|
709
|
+
const x = n - r[0] - 1;
|
|
710
|
+
return S(d(f, x), -e, !0);
|
|
710
711
|
}
|
|
711
712
|
function I() {
|
|
712
713
|
return g.every(({ index: x }) => p(f.filter((C) => C !== x), n) <= 0.1);
|
|
@@ -809,7 +810,7 @@ function Gn(t, n, e, s, i, o) {
|
|
|
809
810
|
endGap: m
|
|
810
811
|
};
|
|
811
812
|
}
|
|
812
|
-
function
|
|
813
|
+
function $n(t, n, e, s, i, o, r, u, c) {
|
|
813
814
|
const { startEdge: l, endEdge: f, direction: m } = t, g = Tt(e);
|
|
814
815
|
function p(S, a) {
|
|
815
816
|
return ft(S).filter((b) => b % a === 0).map((b) => S.slice(b, b + a));
|
|
@@ -828,8 +829,8 @@ function qn(t, n, e, s, i, o, r, u, c) {
|
|
|
828
829
|
}
|
|
829
830
|
return { groupSlides: h };
|
|
830
831
|
}
|
|
831
|
-
function
|
|
832
|
-
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:
|
|
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 } }) => {
|
|
833
834
|
ht || It.constrain(ot.pointerDown()), Lt.seek();
|
|
834
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) => {
|
|
835
836
|
const Vt = ot.settled(), ln = !an.shouldConstrain(), Rt = Bt ? Vt : Vt && ln, Ht = Rt && !cn.pointerDown();
|
|
@@ -868,7 +869,7 @@ function $n(t, n, e, s, i, o, r) {
|
|
|
868
869
|
scrollSnaps: F,
|
|
869
870
|
scrollTarget: xt,
|
|
870
871
|
scrollTo: vt,
|
|
871
|
-
slideLooper: Vn(O, k, K, _, G,
|
|
872
|
+
slideLooper: Vn(O, k, K, _, G, q, F, rt, e),
|
|
872
873
|
slideFocus: en,
|
|
873
874
|
slidesHandler: Rn(n, r, P),
|
|
874
875
|
slidesInView: nn,
|
|
@@ -971,14 +972,14 @@ function St(t, n, e) {
|
|
|
971
972
|
C = [].slice.call(L || x.children);
|
|
972
973
|
}
|
|
973
974
|
function D(y) {
|
|
974
|
-
const E =
|
|
975
|
+
const E = qn(t, x, C, s, i, y, c);
|
|
975
976
|
return y.loop && !E.slideLooper.canLoop() ? D(Object.assign({}, y, { loop: !1 })) : E;
|
|
976
977
|
}
|
|
977
978
|
function N(y, E) {
|
|
978
979
|
S || (b = l(b, y), I = f(b), P = E || P, v(), a = D(I), m([b, ...P.map(({ options: L }) => L)]).forEach((L) => u.add(L, "change", O)), I.active && (a.translate.to(a.location.get()), a.animation.init(), a.slidesInView.init(), a.slideFocus.init(z), a.eventHandler.init(z), a.resizeHandler.init(z), a.slidesHandler.init(z), a.options.loop && a.slideLooper.loop(), x.offsetParent && C.length && a.dragHandler.init(z), T = r.init(z, P)));
|
|
979
980
|
}
|
|
980
981
|
function O(y, E) {
|
|
981
|
-
const L =
|
|
982
|
+
const L = q();
|
|
982
983
|
k(), N(l({ startIndex: L }, y), E), c.emit("reInit");
|
|
983
984
|
}
|
|
984
985
|
function k() {
|
|
@@ -997,18 +998,18 @@ function St(t, n, e) {
|
|
|
997
998
|
B(a.index.add(-1).get(), y, 1);
|
|
998
999
|
}
|
|
999
1000
|
function G() {
|
|
1000
|
-
return a.index.add(1).get() !==
|
|
1001
|
+
return a.index.add(1).get() !== q();
|
|
1001
1002
|
}
|
|
1002
1003
|
function J() {
|
|
1003
|
-
return a.index.add(-1).get() !==
|
|
1004
|
+
return a.index.add(-1).get() !== q();
|
|
1004
1005
|
}
|
|
1005
|
-
function
|
|
1006
|
+
function $() {
|
|
1006
1007
|
return a.scrollSnapList;
|
|
1007
1008
|
}
|
|
1008
1009
|
function Z() {
|
|
1009
1010
|
return a.scrollProgress.get(a.offsetLocation.get());
|
|
1010
1011
|
}
|
|
1011
|
-
function
|
|
1012
|
+
function q() {
|
|
1012
1013
|
return a.index.get();
|
|
1013
1014
|
}
|
|
1014
1015
|
function nt() {
|
|
@@ -1051,9 +1052,9 @@ function St(t, n, e) {
|
|
|
1051
1052
|
scrollNext: Y,
|
|
1052
1053
|
scrollPrev: _,
|
|
1053
1054
|
scrollProgress: Z,
|
|
1054
|
-
scrollSnapList:
|
|
1055
|
+
scrollSnapList: $,
|
|
1055
1056
|
scrollTo: B,
|
|
1056
|
-
selectedScrollSnap:
|
|
1057
|
+
selectedScrollSnap: q,
|
|
1057
1058
|
slideNodes: et,
|
|
1058
1059
|
slidesInView: K,
|
|
1059
1060
|
slidesNotInView: it
|
|
@@ -1062,7 +1063,7 @@ function St(t, n, e) {
|
|
|
1062
1063
|
}
|
|
1063
1064
|
St.globalOptions = void 0;
|
|
1064
1065
|
function wt(t = {}, n = []) {
|
|
1065
|
-
const e = Gt(t), s = Gt(n), [i, o] =
|
|
1066
|
+
const e = Gt(t), s = Gt(n), [i, o] = $t(), [r, u] = $t(), c = mn(() => {
|
|
1066
1067
|
i && i.reInit(e.current, s.current);
|
|
1067
1068
|
}, [i]);
|
|
1068
1069
|
return Ct(() => {
|