@enya-learning/nova 0.6.0 → 0.7.1

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.
Files changed (110) hide show
  1. package/dist/chunks/dist-fahbq1psobj0ox6s.js.map +1 -1
  2. package/dist/chunks/dist-i6l6wqicjhnap81o.js +37 -0
  3. package/dist/chunks/{dist-o8x0ip0z71xkr2oh.js.map → dist-i6l6wqicjhnap81o.js.map} +1 -1
  4. package/dist/chunks/utils-chr77evsz8gs6wle.js +10 -0
  5. package/dist/chunks/{utils-kyb5nny4y41y7hd8.js.map → utils-chr77evsz8gs6wle.js.map} +1 -1
  6. package/dist/chunks/{vendor-styling-eeiy57tyznmxsfky.js → vendor-styling-bq164a52kub0yzw7.js} +84 -81
  7. package/dist/chunks/{vendor-styling-eeiy57tyznmxsfky.js.map → vendor-styling-bq164a52kub0yzw7.js.map} +1 -1
  8. package/dist/chunks/{vendor-utils-egkaeebaqpft6cxj.js → vendor-utils-dzqqqwem43r86lbz.js} +48 -48
  9. package/dist/chunks/{vendor-utils-egkaeebaqpft6cxj.js.map → vendor-utils-dzqqqwem43r86lbz.js.map} +1 -1
  10. package/dist/components/accordion.js +1 -1
  11. package/dist/components/accordion.js.map +1 -1
  12. package/dist/components/alert-dialog.js +1 -1
  13. package/dist/components/alert.js +2 -2
  14. package/dist/components/aspect-ratio.js +1 -1
  15. package/dist/components/avatar.js +1 -1
  16. package/dist/components/badge.js +2 -2
  17. package/dist/components/box.js +1 -1
  18. package/dist/components/breadcrumb.js +1 -1
  19. package/dist/components/breadcrumb.js.map +1 -1
  20. package/dist/components/button-group.js +2 -2
  21. package/dist/components/button.js +2 -2
  22. package/dist/components/calendar.js +59 -58
  23. package/dist/components/calendar.js.map +1 -1
  24. package/dist/components/card.js +1 -1
  25. package/dist/components/carousel.js +27 -26
  26. package/dist/components/carousel.js.map +1 -1
  27. package/dist/components/chart.js +1460 -1455
  28. package/dist/components/chart.js.map +1 -1
  29. package/dist/components/checkbox.js +1 -1
  30. package/dist/components/checkbox.js.map +1 -1
  31. package/dist/components/combobox.js +7 -7
  32. package/dist/components/combobox.js.map +1 -1
  33. package/dist/components/command.js +83 -83
  34. package/dist/components/command.js.map +1 -1
  35. package/dist/components/context-menu.js +1 -1
  36. package/dist/components/context-menu.js.map +1 -1
  37. package/dist/components/dialog.js +1 -1
  38. package/dist/components/dialog.js.map +1 -1
  39. package/dist/components/drawer.js +1 -1
  40. package/dist/components/drawer.js.map +1 -1
  41. package/dist/components/dropdown-menu.js +1 -1
  42. package/dist/components/dropdown-menu.js.map +1 -1
  43. package/dist/components/empty.js +2 -2
  44. package/dist/components/enya-logo.js +88 -78
  45. package/dist/components/enya-logo.js.map +1 -1
  46. package/dist/components/field.js +2 -2
  47. package/dist/components/field.js.map +1 -1
  48. package/dist/components/heading.js +11 -11
  49. package/dist/components/heading.js.map +1 -1
  50. package/dist/components/hover-card.js +1 -1
  51. package/dist/components/hover-card.js.map +1 -1
  52. package/dist/components/input-group.js +2 -2
  53. package/dist/components/input-otp.js +61 -60
  54. package/dist/components/input-otp.js.map +1 -1
  55. package/dist/components/input.js +1 -1
  56. package/dist/components/item.js +2 -2
  57. package/dist/components/kbd.js +1 -1
  58. package/dist/components/label.js +1 -1
  59. package/dist/components/menubar.js +1 -1
  60. package/dist/components/menubar.js.map +1 -1
  61. package/dist/components/native-select.js +1 -1
  62. package/dist/components/native-select.js.map +1 -1
  63. package/dist/components/navigation-menu.js +2 -2
  64. package/dist/components/navigation-menu.js.map +1 -1
  65. package/dist/components/pagination.js +1 -1
  66. package/dist/components/pagination.js.map +1 -1
  67. package/dist/components/popover.js +1 -1
  68. package/dist/components/popover.js.map +1 -1
  69. package/dist/components/progress.js +1 -1
  70. package/dist/components/progress.js.map +1 -1
  71. package/dist/components/radio-group.js +1 -1
  72. package/dist/components/radio-group.js.map +1 -1
  73. package/dist/components/resizable.js +119 -116
  74. package/dist/components/resizable.js.map +1 -1
  75. package/dist/components/scroll-area.js +1 -1
  76. package/dist/components/scroll-area.js.map +1 -1
  77. package/dist/components/select.js +1 -1
  78. package/dist/components/select.js.map +1 -1
  79. package/dist/components/separator.js +1 -1
  80. package/dist/components/sheet.js +1 -1
  81. package/dist/components/sheet.js.map +1 -1
  82. package/dist/components/sidebar.js +10 -10
  83. package/dist/components/sidebar.js.map +1 -1
  84. package/dist/components/skeleton.js +1 -1
  85. package/dist/components/slider.js +1 -1
  86. package/dist/components/slider.js.map +1 -1
  87. package/dist/components/sonner.js +163 -165
  88. package/dist/components/sonner.js.map +1 -1
  89. package/dist/components/spinner.js +1 -1
  90. package/dist/components/switch.js +1 -1
  91. package/dist/components/switch.js.map +1 -1
  92. package/dist/components/table.js +1 -1
  93. package/dist/components/table.js.map +1 -1
  94. package/dist/components/tabs.js +2 -2
  95. package/dist/components/text.js +2 -2
  96. package/dist/components/textarea.js +1 -1
  97. package/dist/components/toggle-group.js +1 -1
  98. package/dist/components/toggle-group.js.map +1 -1
  99. package/dist/components/toggle.js +2 -2
  100. package/dist/components/tooltip.js +1 -1
  101. package/dist/components/tooltip.js.map +1 -1
  102. package/dist/index.js +28 -21
  103. package/dist/src/index.d.ts +1 -0
  104. package/dist/styles/nova.css +1 -1
  105. package/dist/styles/shadcn-variants.css +98 -0
  106. package/dist/utils.js +1 -1
  107. package/package.json +15 -11
  108. package/src/eslint/no-primitive-colors.test.ts +1 -1
  109. package/dist/chunks/dist-o8x0ip0z71xkr2oh.js +0 -37
  110. package/dist/chunks/utils-kyb5nny4y41y7hd8.js +0 -10
@@ -1,5 +1,5 @@
1
1
  "use client";
2
- import { t as r } from "../chunks/utils-kyb5nny4y41y7hd8.js";
2
+ import { t as r } from "../chunks/utils-chr77evsz8gs6wle.js";
3
3
  import { jsx as d } from "react/jsx-runtime";
4
4
  import "react";
5
5
  function n({ className: t, size: a = "default", ...e }) {
@@ -1,15 +1,15 @@
1
1
  "use client";
2
- import { t as mt } from "../chunks/utils-kyb5nny4y41y7hd8.js";
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 qt } from "react";
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 $t(t) {
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}` : !$t(o) || !$t(r) ? o === r : Dt(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, q = !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 = q ? e : n;
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)[q ? "mouse" : "touch"];
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
- q = 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")));
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 && !q && (!y.cancelable || (G = w > U, !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), q = !1, g.emit("pointerUp");
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
- return S(d(f, n - r[0] - 1), -e, !0);
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 qn(t, n, e, s, i, o, r, u, c) {
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 $n(t, n, e, s, i, o, r) {
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: q } = Gn(O, D, N, e, m || !!b, i), Z = qn(O, k, S, m, D, N, J, q, C), { snaps: $, snapsAligned: nt } = kn(O, B, D, N, Z), K = -j($) + 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
+ 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, $, F, rt, e),
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 = $n(t, x, C, s, i, y, c);
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 q() {
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: q,
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] = qt(), [r, u] = qt(), c = mn(() => {
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(() => {