@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.
Files changed (138) hide show
  1. package/README.md +8 -10
  2. package/dist/chunks/dist-fahbq1psobj0ox6s.js.map +1 -1
  3. package/dist/chunks/dist-i6l6wqicjhnap81o.js +37 -0
  4. package/dist/chunks/{dist-o8x0ip0z71xkr2oh.js.map → dist-i6l6wqicjhnap81o.js.map} +1 -1
  5. package/dist/chunks/utils-chr77evsz8gs6wle.js +10 -0
  6. package/dist/chunks/{utils-kyb5nny4y41y7hd8.js.map → utils-chr77evsz8gs6wle.js.map} +1 -1
  7. package/dist/chunks/{vendor-styling-eeiy57tyznmxsfky.js → vendor-styling-bq164a52kub0yzw7.js} +84 -81
  8. package/dist/chunks/{vendor-styling-eeiy57tyznmxsfky.js.map → vendor-styling-bq164a52kub0yzw7.js.map} +1 -1
  9. package/dist/chunks/{vendor-utils-egkaeebaqpft6cxj.js → vendor-utils-dzqqqwem43r86lbz.js} +48 -48
  10. package/dist/chunks/{vendor-utils-egkaeebaqpft6cxj.js.map → vendor-utils-dzqqqwem43r86lbz.js.map} +1 -1
  11. package/dist/components/accordion.js +24 -21
  12. package/dist/components/accordion.js.map +1 -1
  13. package/dist/components/alert-dialog.js +3 -3
  14. package/dist/components/alert-dialog.js.map +1 -1
  15. package/dist/components/alert.js +2 -2
  16. package/dist/components/aspect-ratio.js +1 -1
  17. package/dist/components/avatar.js +24 -24
  18. package/dist/components/avatar.js.map +1 -1
  19. package/dist/components/badge.js +13 -13
  20. package/dist/components/badge.js.map +1 -1
  21. package/dist/components/box.js +16 -0
  22. package/dist/components/box.js.map +1 -0
  23. package/dist/components/breadcrumb.js +29 -25
  24. package/dist/components/breadcrumb.js.map +1 -1
  25. package/dist/components/button-group.js +4 -4
  26. package/dist/components/button-group.js.map +1 -1
  27. package/dist/components/button.js +12 -12
  28. package/dist/components/button.js.map +1 -1
  29. package/dist/components/calendar.js +540 -535
  30. package/dist/components/calendar.js.map +1 -1
  31. package/dist/components/card.js +1 -1
  32. package/dist/components/carousel.js +93 -85
  33. package/dist/components/carousel.js.map +1 -1
  34. package/dist/components/chart.js +1462 -1457
  35. package/dist/components/chart.js.map +1 -1
  36. package/dist/components/checkbox.js +7 -6
  37. package/dist/components/checkbox.js.map +1 -1
  38. package/dist/components/combobox.js +67 -54
  39. package/dist/components/combobox.js.map +1 -1
  40. package/dist/components/command.js +104 -97
  41. package/dist/components/command.js.map +1 -1
  42. package/dist/components/context-menu.js +41 -37
  43. package/dist/components/context-menu.js.map +1 -1
  44. package/dist/components/dialog.js +26 -25
  45. package/dist/components/dialog.js.map +1 -1
  46. package/dist/components/drawer.js +3 -3
  47. package/dist/components/drawer.js.map +1 -1
  48. package/dist/components/dropdown-menu.js +40 -36
  49. package/dist/components/dropdown-menu.js.map +1 -1
  50. package/dist/components/empty.js +3 -3
  51. package/dist/components/empty.js.map +1 -1
  52. package/dist/components/enya-logo.js +88 -78
  53. package/dist/components/enya-logo.js.map +1 -1
  54. package/dist/components/field.js +3 -3
  55. package/dist/components/field.js.map +1 -1
  56. package/dist/components/heading.js +39 -0
  57. package/dist/components/heading.js.map +1 -0
  58. package/dist/components/hover-card.js +1 -1
  59. package/dist/components/hover-card.js.map +1 -1
  60. package/dist/components/input-group.js +15 -15
  61. package/dist/components/input-group.js.map +1 -1
  62. package/dist/components/input-otp.js +81 -79
  63. package/dist/components/input-otp.js.map +1 -1
  64. package/dist/components/input.js +2 -2
  65. package/dist/components/input.js.map +1 -1
  66. package/dist/components/item.js +36 -36
  67. package/dist/components/item.js.map +1 -1
  68. package/dist/components/kbd.js +7 -7
  69. package/dist/components/kbd.js.map +1 -1
  70. package/dist/components/label.js +1 -1
  71. package/dist/components/menubar.js +53 -52
  72. package/dist/components/menubar.js.map +1 -1
  73. package/dist/components/native-select.js +21 -19
  74. package/dist/components/native-select.js.map +1 -1
  75. package/dist/components/navigation-menu.js +23 -21
  76. package/dist/components/navigation-menu.js.map +1 -1
  77. package/dist/components/pagination.js +33 -30
  78. package/dist/components/pagination.js.map +1 -1
  79. package/dist/components/popover.js +1 -1
  80. package/dist/components/popover.js.map +1 -1
  81. package/dist/components/progress.js +5 -5
  82. package/dist/components/progress.js.map +1 -1
  83. package/dist/components/radio-group.js +14 -14
  84. package/dist/components/radio-group.js.map +1 -1
  85. package/dist/components/resizable.js +120 -117
  86. package/dist/components/resizable.js.map +1 -1
  87. package/dist/components/scroll-area.js +1 -1
  88. package/dist/components/scroll-area.js.map +1 -1
  89. package/dist/components/select.js +65 -58
  90. package/dist/components/select.js.map +1 -1
  91. package/dist/components/separator.js +1 -1
  92. package/dist/components/sheet.js +23 -22
  93. package/dist/components/sheet.js.map +1 -1
  94. package/dist/components/sidebar.js +84 -80
  95. package/dist/components/sidebar.js.map +1 -1
  96. package/dist/components/skeleton.js +2 -2
  97. package/dist/components/skeleton.js.map +1 -1
  98. package/dist/components/slider.js +8 -8
  99. package/dist/components/slider.js.map +1 -1
  100. package/dist/components/sonner.js +229 -215
  101. package/dist/components/sonner.js.map +1 -1
  102. package/dist/components/spinner.js +10 -8
  103. package/dist/components/spinner.js.map +1 -1
  104. package/dist/components/switch.js +6 -6
  105. package/dist/components/switch.js.map +1 -1
  106. package/dist/components/table.js +15 -15
  107. package/dist/components/table.js.map +1 -1
  108. package/dist/components/tabs.js +16 -16
  109. package/dist/components/tabs.js.map +1 -1
  110. package/dist/components/text.js +47 -0
  111. package/dist/components/text.js.map +1 -0
  112. package/dist/components/textarea.js +5 -5
  113. package/dist/components/textarea.js.map +1 -1
  114. package/dist/components/toggle-group.js +2 -2
  115. package/dist/components/toggle-group.js.map +1 -1
  116. package/dist/components/toggle.js +8 -8
  117. package/dist/components/toggle.js.map +1 -1
  118. package/dist/components/tooltip.js +6 -6
  119. package/dist/components/tooltip.js.map +1 -1
  120. package/dist/index.js +31 -16
  121. package/dist/src/components/box/box.d.ts +7 -0
  122. package/dist/src/components/box/index.d.ts +1 -0
  123. package/dist/src/components/heading/heading.d.ts +15 -0
  124. package/dist/src/components/heading/index.d.ts +1 -0
  125. package/dist/src/components/spinner/spinner.d.ts +2 -1
  126. package/dist/src/components/text/index.d.ts +1 -0
  127. package/dist/src/components/text/text.d.ts +13 -0
  128. package/dist/src/index.d.ts +4 -0
  129. package/dist/styles/nova-binding.css +264 -266
  130. package/dist/styles/nova.css +158 -49
  131. package/dist/styles/typography.css +3 -123
  132. package/dist/utils.js +1 -1
  133. package/package.json +29 -12
  134. package/src/eslint/no-primitive-colors.js +2 -2
  135. package/src/eslint/no-primitive-colors.test.ts +1 -1
  136. package/dist/chunks/dist-o8x0ip0z71xkr2oh.js +0 -37
  137. package/dist/chunks/utils-kyb5nny4y41y7hd8.js +0 -10
  138. package/dist/styles/theme-nova.css +0 -197
@@ -1,39 +1,40 @@
1
1
  "use client";
2
- import { t as I } from "../chunks/utils-kyb5nny4y41y7hd8.js";
3
- import { InputGroup as Re, InputGroupAddon as Ae } from "./input-group.js";
4
- import { a as $e, i as De, l as F, n as Ne, o as Pe, u as O } from "../chunks/dist-fahbq1psobj0ox6s.js";
5
- import { Dialog as Me, DialogContent as je, DialogDescription as Le, DialogHeader as Ve, DialogTitle as Fe } from "./dialog.js";
2
+ import { t as I } from "../chunks/utils-chr77evsz8gs6wle.js";
3
+ import { InputGroup as Ae, InputGroupAddon as $e } from "./input-group.js";
4
+ import { a as De, i as Ne, l as F, n as Pe, o as Me, u as O } from "../chunks/dist-fahbq1psobj0ox6s.js";
5
+ import { Dialog as je, DialogContent as Le, DialogDescription as Ve, DialogHeader as Fe, DialogTitle as Oe } from "./dialog.js";
6
6
  import { jsx as w, jsxs as W } from "react/jsx-runtime";
7
- import { CheckIcon as Oe, SearchIcon as ze } from "lucide-react";
7
+ import { HugeiconsIcon as he } from "@hugeicons/react";
8
+ import { CheckIcon as ze, SearchIcon as Ke } from "@hugeicons/core-free-icons";
8
9
  import * as l from "react";
9
10
  import "react-dom";
10
- var pe = 1, Ke = 0.9, Te = 0.8, qe = 0.17, te = 0.1, re = 0.999, We = 0.9999, _e = 0.99, Be = /[\\\/_+.#"@\[\(\{&]/, Ge = /[\\\/_+.#"@\[\(\{&]/g, He = /[\s-]/, he = /[\s-]/g;
11
+ var pe = 1, Te = 0.9, qe = 0.8, We = 0.17, te = 0.1, re = 0.999, _e = 0.9999, Be = 0.99, Ge = /[\\\/_+.#"@\[\(\{&]/, He = /[\\\/_+.#"@\[\(\{&]/g, Ue = /[\s-]/, be = /[\s-]/g;
11
12
  function le(e, t, r, i, a, o, d) {
12
- if (o === t.length) return a === e.length ? pe : _e;
13
+ if (o === t.length) return a === e.length ? pe : Be;
13
14
  var m = `${a},${o}`;
14
15
  if (d[m] !== void 0) return d[m];
15
- for (var g = i.charAt(o), c = r.indexOf(g, a), p = 0, h, S, x, R; c >= 0; ) h = le(e, t, r, i, c + 1, o + 1, d), h > p && (c === a ? h *= pe : Be.test(e.charAt(c - 1)) ? (h *= Te, x = e.slice(a, c - 1).match(Ge), x && a > 0 && (h *= Math.pow(re, x.length))) : He.test(e.charAt(c - 1)) ? (h *= Ke, R = e.slice(a, c - 1).match(he), R && a > 0 && (h *= Math.pow(re, R.length))) : (h *= qe, a > 0 && (h *= Math.pow(re, c - a))), e.charAt(c) !== t.charAt(o) && (h *= We)), (h < te && r.charAt(c - 1) === i.charAt(o + 1) || i.charAt(o + 1) === i.charAt(o) && r.charAt(c - 1) !== i.charAt(o)) && (S = le(e, t, r, i, c + 1, o + 2, d), S * te > h && (h = S * te)), h > p && (p = h), c = r.indexOf(g, c + 1);
16
+ for (var g = i.charAt(o), c = r.indexOf(g, a), p = 0, h, S, x, R; c >= 0; ) h = le(e, t, r, i, c + 1, o + 1, d), h > p && (c === a ? h *= pe : Ge.test(e.charAt(c - 1)) ? (h *= qe, x = e.slice(a, c - 1).match(He), x && a > 0 && (h *= Math.pow(re, x.length))) : Ue.test(e.charAt(c - 1)) ? (h *= Te, R = e.slice(a, c - 1).match(be), R && a > 0 && (h *= Math.pow(re, R.length))) : (h *= We, a > 0 && (h *= Math.pow(re, c - a))), e.charAt(c) !== t.charAt(o) && (h *= _e)), (h < te && r.charAt(c - 1) === i.charAt(o + 1) || i.charAt(o + 1) === i.charAt(o) && r.charAt(c - 1) !== i.charAt(o)) && (S = le(e, t, r, i, c + 1, o + 2, d), S * te > h && (h = S * te)), h > p && (p = h), c = r.indexOf(g, c + 1);
16
17
  return d[m] = p, p;
17
18
  }
18
19
  function ve(e) {
19
- return e.toLowerCase().replace(he, " ");
20
+ return e.toLowerCase().replace(be, " ");
20
21
  }
21
- function Ue(e, t, r) {
22
+ function Ye(e, t, r) {
22
23
  return e = r && r.length > 0 ? `${e + " " + r.join(" ")}` : e, le(e, t, ve(e), ve(t), 0, 0, {});
23
24
  }
24
- var Ye = /* @__PURE__ */ Symbol.for("react.lazy"), _ = l[" use ".trim().toString()];
25
- function Ze(e) {
25
+ var Ze = /* @__PURE__ */ Symbol.for("react.lazy"), _ = l[" use ".trim().toString()];
26
+ function Je(e) {
26
27
  return typeof e == "object" && e !== null && "then" in e;
27
28
  }
28
- function be(e) {
29
- return e != null && typeof e == "object" && "$$typeof" in e && e.$$typeof === Ye && "_payload" in e && Ze(e._payload);
29
+ function ye(e) {
30
+ return e != null && typeof e == "object" && "$$typeof" in e && e.$$typeof === Ze && "_payload" in e && Je(e._payload);
30
31
  }
31
32
  // @__NO_SIDE_EFFECTS__
32
- function Je(e) {
33
- const t = /* @__PURE__ */ Xe(e), r = l.forwardRef((i, a) => {
33
+ function Xe(e) {
34
+ const t = /* @__PURE__ */ Qe(e), r = l.forwardRef((i, a) => {
34
35
  let { children: o, ...d } = i;
35
- be(o) && typeof _ == "function" && (o = _(o._payload));
36
- const m = l.Children.toArray(o), g = m.find(et);
36
+ ye(o) && typeof _ == "function" && (o = _(o._payload));
37
+ const m = l.Children.toArray(o), g = m.find(tt);
37
38
  if (g) {
38
39
  const c = g.props.children, p = m.map((h) => h === g ? l.Children.count(c) > 1 ? l.Children.only(null) : l.isValidElement(c) ? c.props.children : null : h);
39
40
  return /* @__PURE__ */ w(t, {
@@ -51,22 +52,22 @@ function Je(e) {
51
52
  return r.displayName = `${e}.Slot`, r;
52
53
  }
53
54
  // @__NO_SIDE_EFFECTS__
54
- function Xe(e) {
55
+ function Qe(e) {
55
56
  const t = l.forwardRef((r, i) => {
56
57
  let { children: a, ...o } = r;
57
- if (be(a) && typeof _ == "function" && (a = _(a._payload)), l.isValidElement(a)) {
58
- const d = rt(a), m = tt(o, a.props);
58
+ if (ye(a) && typeof _ == "function" && (a = _(a._payload)), l.isValidElement(a)) {
59
+ const d = nt(a), m = rt(o, a.props);
59
60
  return a.type !== l.Fragment && (m.ref = i ? O(i, d) : d), l.cloneElement(a, m);
60
61
  }
61
62
  return l.Children.count(a) > 1 ? l.Children.only(null) : null;
62
63
  });
63
64
  return t.displayName = `${e}.SlotClone`, t;
64
65
  }
65
- var Qe = /* @__PURE__ */ Symbol("radix.slottable");
66
- function et(e) {
67
- return l.isValidElement(e) && typeof e.type == "function" && "__radixId" in e.type && e.type.__radixId === Qe;
66
+ var et = /* @__PURE__ */ Symbol("radix.slottable");
67
+ function tt(e) {
68
+ return l.isValidElement(e) && typeof e.type == "function" && "__radixId" in e.type && e.type.__radixId === et;
68
69
  }
69
- function tt(e, t) {
70
+ function rt(e, t) {
70
71
  const r = { ...t };
71
72
  for (const i in t) {
72
73
  const a = e[i], o = t[i];
@@ -83,7 +84,7 @@ function tt(e, t) {
83
84
  ...r
84
85
  };
85
86
  }
86
- function rt(e) {
87
+ function nt(e) {
87
88
  let t = Object.getOwnPropertyDescriptor(e.props, "ref")?.get, r = t && "isReactWarning" in t && t.isReactWarning;
88
89
  return r ? e.ref : (t = Object.getOwnPropertyDescriptor(e, "ref")?.get, r = t && "isReactWarning" in t && t.isReactWarning, r ? e.props.ref : e.props.ref || e.ref);
89
90
  }
@@ -106,7 +107,7 @@ var $ = [
106
107
  "svg",
107
108
  "ul"
108
109
  ].reduce((e, t) => {
109
- const r = /* @__PURE__ */ Je(`Primitive.${t}`), i = l.forwardRef((a, o) => {
110
+ const r = /* @__PURE__ */ Xe(`Primitive.${t}`), i = l.forwardRef((a, o) => {
110
111
  const { asChild: d, ...m } = a, g = d ? r : t;
111
112
  return typeof window < "u" && (window[/* @__PURE__ */ Symbol.for("radix-ui")] = !0), /* @__PURE__ */ w(g, {
112
113
  ...m,
@@ -117,7 +118,7 @@ var $ = [
117
118
  ...e,
118
119
  [t]: i
119
120
  };
120
- }, {}), K = '[cmdk-group=""]', ne = '[cmdk-group-items=""]', nt = '[cmdk-group-heading=""]', ye = '[cmdk-item=""]', ge = `${ye}:not([aria-disabled="true"])`, ae = "cmdk-item-select", L = "data-value", lt = (e, t, r) => Ue(e, t, r), we = l.createContext(void 0), T = () => l.useContext(we), xe = l.createContext(void 0), oe = () => l.useContext(xe), Ee = l.createContext(void 0), Ce = l.forwardRef((e, t) => {
121
+ }, {}), K = '[cmdk-group=""]', ne = '[cmdk-group-items=""]', lt = '[cmdk-group-heading=""]', we = '[cmdk-item=""]', ge = `${we}:not([aria-disabled="true"])`, ae = "cmdk-item-select", L = "data-value", at = (e, t, r) => Ye(e, t, r), xe = l.createContext(void 0), T = () => l.useContext(xe), Ee = l.createContext(void 0), oe = () => l.useContext(Ee), Ce = l.createContext(void 0), ke = l.forwardRef((e, t) => {
121
122
  let r = V(() => {
122
123
  var n, s;
123
124
  return {
@@ -130,7 +131,7 @@ var $ = [
130
131
  groups: /* @__PURE__ */ new Set()
131
132
  }
132
133
  };
133
- }), i = V(() => /* @__PURE__ */ new Set()), a = V(() => /* @__PURE__ */ new Map()), o = V(() => /* @__PURE__ */ new Map()), d = V(() => /* @__PURE__ */ new Set()), m = ke(e), { label: g, children: c, value: p, onValueChange: h, filter: S, shouldFilter: x, loop: R, disablePointerSelection: G = !1, vimBindings: D = !0, ...q } = e, H = F(), ie = F(), U = F(), N = l.useRef(null), y = vt();
134
+ }), i = V(() => /* @__PURE__ */ new Set()), a = V(() => /* @__PURE__ */ new Map()), o = V(() => /* @__PURE__ */ new Map()), d = V(() => /* @__PURE__ */ new Set()), m = Se(e), { label: g, children: c, value: p, onValueChange: h, filter: S, shouldFilter: x, loop: R, disablePointerSelection: G = !1, vimBindings: D = !0, ...q } = e, H = F(), ie = F(), U = F(), N = l.useRef(null), y = gt();
134
135
  P(() => {
135
136
  if (p !== void 0) {
136
137
  let n = p.trim();
@@ -198,7 +199,7 @@ var $ = [
198
199
  }), []);
199
200
  function ue(n, s) {
200
201
  var f, u;
201
- let v = (u = (f = m.current) == null ? void 0 : f.filter) != null ? u : lt;
202
+ let v = (u = (f = m.current) == null ? void 0 : f.filter) != null ? u : at;
202
203
  return n ? v(n, r.current.search, s) : 0;
203
204
  }
204
205
  function Z() {
@@ -214,8 +215,8 @@ var $ = [
214
215
  let f = N.current;
215
216
  z().sort((u, v) => {
216
217
  var b, C;
217
- let k = u.getAttribute("id"), Ie = v.getAttribute("id");
218
- return ((b = n.get(Ie)) != null ? b : 0) - ((C = n.get(k)) != null ? C : 0);
218
+ let k = u.getAttribute("id"), Re = v.getAttribute("id");
219
+ return ((b = n.get(Re)) != null ? b : 0) - ((C = n.get(k)) != null ? C : 0);
219
220
  }).forEach((u) => {
220
221
  let v = u.closest(ne);
221
222
  v ? v.appendChild(u.parentElement === v ? u : u.closest(`${ne} > *`)) : f.appendChild(u.parentElement === f ? u : u.closest(`${ne} > *`));
@@ -250,11 +251,11 @@ var $ = [
250
251
  function ce() {
251
252
  var n, s, f;
252
253
  let u = j();
253
- u && (((n = u.parentElement) == null ? void 0 : n.firstChild) === u && ((f = (s = u.closest(K)) == null ? void 0 : s.querySelector(nt)) == null || f.scrollIntoView({ block: "nearest" })), u.scrollIntoView({ block: "nearest" }));
254
+ u && (((n = u.parentElement) == null ? void 0 : n.firstChild) === u && ((f = (s = u.closest(K)) == null ? void 0 : s.querySelector(lt)) == null || f.scrollIntoView({ block: "nearest" })), u.scrollIntoView({ block: "nearest" }));
254
255
  }
255
256
  function j() {
256
257
  var n;
257
- return (n = N.current) == null ? void 0 : n.querySelector(`${ye}[aria-selected="true"]`);
258
+ return (n = N.current) == null ? void 0 : n.querySelector(`${we}[aria-selected="true"]`);
258
259
  }
259
260
  function z() {
260
261
  var n;
@@ -271,7 +272,7 @@ var $ = [
271
272
  }
272
273
  function de(n) {
273
274
  let s = j(), f = s?.closest(K), u;
274
- for (; f && !u; ) f = n > 0 ? ft(f, K) : pt(f, K), u = f?.querySelector(ge);
275
+ for (; f && !u; ) f = n > 0 ? pt(f, K) : vt(f, K), u = f?.querySelector(ge);
275
276
  u ? E.setState("value", u.getAttribute(L)) : ee(n);
276
277
  }
277
278
  let se = () => Q(z().length - 1), me = (n) => {
@@ -323,15 +324,15 @@ var $ = [
323
324
  "cmdk-label": "",
324
325
  htmlFor: Y.inputId,
325
326
  id: Y.labelId,
326
- style: ht
327
- }, g), B(e, (n) => l.createElement(xe.Provider, { value: E }, l.createElement(we.Provider, { value: Y }, n))));
328
- }), at = l.forwardRef((e, t) => {
327
+ style: bt
328
+ }, g), B(e, (n) => l.createElement(Ee.Provider, { value: E }, l.createElement(xe.Provider, { value: Y }, n))));
329
+ }), ot = l.forwardRef((e, t) => {
329
330
  var r, i;
330
- let a = F(), o = l.useRef(null), d = l.useContext(Ee), m = T(), g = ke(e), c = (i = (r = g.current) == null ? void 0 : r.forceMount) != null ? i : d?.forceMount;
331
+ let a = F(), o = l.useRef(null), d = l.useContext(Ce), m = T(), g = Se(e), c = (i = (r = g.current) == null ? void 0 : r.forceMount) != null ? i : d?.forceMount;
331
332
  P(() => {
332
333
  if (!c) return m.item(a, d?.id);
333
334
  }, [c]);
334
- let p = Se(a, o, [
335
+ let p = Ie(a, o, [
335
336
  e.value,
336
337
  e.children,
337
338
  o
@@ -366,9 +367,9 @@ var $ = [
366
367
  onPointerMove: D || m.getDisablePointerSelection() ? void 0 : G,
367
368
  onClick: D ? void 0 : R
368
369
  }, e.children);
369
- }), ot = l.forwardRef((e, t) => {
370
+ }), it = l.forwardRef((e, t) => {
370
371
  let { heading: r, children: i, forceMount: a, ...o } = e, d = F(), m = l.useRef(null), g = l.useRef(null), c = F(), p = T(), h = A((x) => a || p.filter() === !1 ? !0 : x.search ? x.filtered.groups.has(d) : !0);
371
- P(() => p.group(d), []), Se(d, m, [
372
+ P(() => p.group(d), []), Ie(d, m, [
372
373
  e.value,
373
374
  e.heading,
374
375
  g
@@ -392,8 +393,8 @@ var $ = [
392
393
  "cmdk-group-items": "",
393
394
  role: "group",
394
395
  "aria-labelledby": r ? c : void 0
395
- }, l.createElement(Ee.Provider, { value: S }, x))));
396
- }), it = l.forwardRef((e, t) => {
396
+ }, l.createElement(Ce.Provider, { value: S }, x))));
397
+ }), ut = l.forwardRef((e, t) => {
397
398
  let { alwaysRender: r, ...i } = e, a = l.useRef(null), o = A((d) => !d.search);
398
399
  return !r && !o ? null : l.createElement($.div, {
399
400
  ref: O(a, t),
@@ -401,7 +402,7 @@ var $ = [
401
402
  "cmdk-separator": "",
402
403
  role: "separator"
403
404
  });
404
- }), ut = l.forwardRef((e, t) => {
405
+ }), ct = l.forwardRef((e, t) => {
405
406
  let { onValueChange: r, ...i } = e, a = e.value != null, o = oe(), d = A((c) => c.search), m = A((c) => c.selectedItemId), g = T();
406
407
  return l.useEffect(() => {
407
408
  e.value != null && o.setState("search", e.value);
@@ -425,7 +426,7 @@ var $ = [
425
426
  a || o.setState("search", c.target.value), r?.(c.target.value);
426
427
  }
427
428
  });
428
- }), ct = l.forwardRef((e, t) => {
429
+ }), dt = l.forwardRef((e, t) => {
429
430
  let { children: r, label: i = "Suggestions", ...a } = e, o = l.useRef(null), d = l.useRef(null), m = A((c) => c.selectedItemId), g = T();
430
431
  return l.useEffect(() => {
431
432
  if (d.current && o.current) {
@@ -452,28 +453,28 @@ var $ = [
452
453
  ref: O(d, g.listInnerRef),
453
454
  "cmdk-list-sizer": ""
454
455
  }, c)));
455
- }), dt = l.forwardRef((e, t) => {
456
+ }), st = l.forwardRef((e, t) => {
456
457
  let { open: r, onOpenChange: i, overlayClassName: a, contentClassName: o, container: d, ...m } = e;
457
- return l.createElement(Pe, {
458
+ return l.createElement(Me, {
458
459
  open: r,
459
460
  onOpenChange: i
460
- }, l.createElement($e, { container: d }, l.createElement(De, {
461
+ }, l.createElement(De, { container: d }, l.createElement(Ne, {
461
462
  "cmdk-overlay": "",
462
463
  className: a
463
- }), l.createElement(Ne, {
464
+ }), l.createElement(Pe, {
464
465
  "aria-label": e.label,
465
466
  "cmdk-dialog": "",
466
467
  className: o
467
- }, l.createElement(Ce, {
468
+ }, l.createElement(ke, {
468
469
  ref: t,
469
470
  ...m
470
471
  }))));
471
- }), st = l.forwardRef((e, t) => A((r) => r.filtered.count === 0) ? l.createElement($.div, {
472
+ }), mt = l.forwardRef((e, t) => A((r) => r.filtered.count === 0) ? l.createElement($.div, {
472
473
  ref: t,
473
474
  ...e,
474
475
  "cmdk-empty": "",
475
476
  role: "presentation"
476
- }) : null), mt = l.forwardRef((e, t) => {
477
+ }) : null), ft = l.forwardRef((e, t) => {
477
478
  let { progress: r, children: i, label: a = "Loading...", ...o } = e;
478
479
  return l.createElement($.div, {
479
480
  ref: t,
@@ -485,31 +486,31 @@ var $ = [
485
486
  "aria-valuemax": 100,
486
487
  "aria-label": a
487
488
  }, B(e, (d) => l.createElement("div", { "aria-hidden": !0 }, d)));
488
- }), M = Object.assign(Ce, {
489
- List: ct,
490
- Item: at,
491
- Input: ut,
492
- Group: ot,
493
- Separator: it,
494
- Dialog: dt,
495
- Empty: st,
496
- Loading: mt
489
+ }), M = Object.assign(ke, {
490
+ List: dt,
491
+ Item: ot,
492
+ Input: ct,
493
+ Group: it,
494
+ Separator: ut,
495
+ Dialog: st,
496
+ Empty: mt,
497
+ Loading: ft
497
498
  });
498
- function ft(e, t) {
499
+ function pt(e, t) {
499
500
  let r = e.nextElementSibling;
500
501
  for (; r; ) {
501
502
  if (r.matches(t)) return r;
502
503
  r = r.nextElementSibling;
503
504
  }
504
505
  }
505
- function pt(e, t) {
506
+ function vt(e, t) {
506
507
  let r = e.previousElementSibling;
507
508
  for (; r; ) {
508
509
  if (r.matches(t)) return r;
509
510
  r = r.previousElementSibling;
510
511
  }
511
512
  }
512
- function ke(e) {
513
+ function Se(e) {
513
514
  let t = l.useRef(e);
514
515
  return P(() => {
515
516
  t.current = e;
@@ -524,7 +525,7 @@ function A(e) {
524
525
  let t = oe(), r = () => e(t.snapshot());
525
526
  return l.useSyncExternalStore(t.subscribe, r, r);
526
527
  }
527
- function Se(e, t, r, i = []) {
528
+ function Ie(e, t, r, i = []) {
528
529
  let a = l.useRef(), o = T();
529
530
  return P(() => {
530
531
  var d;
@@ -538,7 +539,7 @@ function Se(e, t, r, i = []) {
538
539
  o.value(e, m, g), (d = t.current) == null || d.setAttribute(L, m), a.current = m;
539
540
  }), a;
540
541
  }
541
- var vt = () => {
542
+ var gt = () => {
542
543
  let [e, t] = l.useState(), r = V(() => /* @__PURE__ */ new Map());
543
544
  return P(() => {
544
545
  r.current.forEach((i) => i()), r.current = /* @__PURE__ */ new Map();
@@ -546,14 +547,14 @@ var vt = () => {
546
547
  r.current.set(i, a), t({});
547
548
  };
548
549
  };
549
- function gt(e) {
550
+ function ht(e) {
550
551
  let t = e.type;
551
552
  return typeof t == "function" ? t(e.props) : "render" in t ? t.render(e.props) : e;
552
553
  }
553
554
  function B({ asChild: e, children: t }, r) {
554
- return e && l.isValidElement(t) ? l.cloneElement(gt(t), { ref: t.ref }, r(t.props.children)) : r(t);
555
+ return e && l.isValidElement(t) ? l.cloneElement(ht(t), { ref: t.ref }, r(t.props.children)) : r(t);
555
556
  }
556
- var ht = {
557
+ var bt = {
557
558
  position: "absolute",
558
559
  width: "1px",
559
560
  height: "1px",
@@ -564,77 +565,83 @@ var ht = {
564
565
  whiteSpace: "nowrap",
565
566
  borderWidth: "0"
566
567
  };
567
- function It({ className: e, ...t }) {
568
+ function At({ className: e, ...t }) {
568
569
  return /* @__PURE__ */ w(M, {
569
570
  "data-slot": "command",
570
571
  className: I("flex size-full flex-col overflow-hidden rounded-4xl bg-popover p-1 text-popover-foreground", e),
571
572
  ...t
572
573
  });
573
574
  }
574
- function Rt({ title: e = "Command Palette", description: t = "Search for a command to run...", children: r, className: i, showCloseButton: a = !1, ...o }) {
575
- return /* @__PURE__ */ W(Me, {
575
+ function $t({ title: e = "Command Palette", description: t = "Search for a command to run...", children: r, className: i, showCloseButton: a = !1, ...o }) {
576
+ return /* @__PURE__ */ W(je, {
576
577
  ...o,
577
- children: [/* @__PURE__ */ W(Ve, {
578
+ children: [/* @__PURE__ */ W(Fe, {
578
579
  className: "sr-only",
579
- children: [/* @__PURE__ */ w(Fe, { children: e }), /* @__PURE__ */ w(Le, { children: t })]
580
- }), /* @__PURE__ */ w(je, {
580
+ children: [/* @__PURE__ */ w(Oe, { children: e }), /* @__PURE__ */ w(Ve, { children: t })]
581
+ }), /* @__PURE__ */ w(Le, {
581
582
  className: I("top-1/3 translate-y-0 overflow-hidden rounded-4xl! p-0", i),
582
583
  showCloseButton: a,
583
584
  children: r
584
585
  })]
585
586
  });
586
587
  }
587
- function At({ className: e, ...t }) {
588
+ function Dt({ className: e, ...t }) {
588
589
  return /* @__PURE__ */ w("div", {
589
590
  "data-slot": "command-input-wrapper",
590
591
  className: "p-1 pb-0",
591
- children: /* @__PURE__ */ W(Re, {
592
- className: "h-9 bg-input/30",
592
+ children: /* @__PURE__ */ W(Ae, {
593
+ className: "h-9 bg-border/30",
593
594
  children: [/* @__PURE__ */ w(M.Input, {
594
595
  "data-slot": "command-input",
595
596
  className: I("w-full text-sm outline-hidden disabled:cursor-not-allowed disabled:opacity-50", e),
596
597
  ...t
597
- }), /* @__PURE__ */ w(Ae, { children: /* @__PURE__ */ w(ze, { className: "size-4 shrink-0 opacity-50" }) })]
598
+ }), /* @__PURE__ */ w($e, { children: /* @__PURE__ */ w(he, {
599
+ icon: Ke,
600
+ className: "size-4 shrink-0 opacity-50"
601
+ }) })]
598
602
  })
599
603
  });
600
604
  }
601
- function $t({ className: e, ...t }) {
605
+ function Nt({ className: e, ...t }) {
602
606
  return /* @__PURE__ */ w(M.List, {
603
607
  "data-slot": "command-list",
604
608
  className: I("no-scrollbar max-h-72 scroll-py-1 overflow-x-hidden overflow-y-auto outline-none", e),
605
609
  ...t
606
610
  });
607
611
  }
608
- function Dt({ className: e, ...t }) {
612
+ function Pt({ className: e, ...t }) {
609
613
  return /* @__PURE__ */ w(M.Empty, {
610
614
  "data-slot": "command-empty",
611
615
  className: I("py-6 text-center text-sm", e),
612
616
  ...t
613
617
  });
614
618
  }
615
- function Nt({ className: e, ...t }) {
619
+ function Mt({ className: e, ...t }) {
616
620
  return /* @__PURE__ */ w(M.Group, {
617
621
  "data-slot": "command-group",
618
622
  className: I("overflow-hidden p-1 text-foreground **:[[cmdk-group-heading]]:px-3 **:[[cmdk-group-heading]]:py-2 **:[[cmdk-group-heading]]:text-xs **:[[cmdk-group-heading]]:font-medium **:[[cmdk-group-heading]]:text-muted-foreground", e),
619
623
  ...t
620
624
  });
621
625
  }
622
- function Pt({ className: e, ...t }) {
626
+ function jt({ className: e, ...t }) {
623
627
  return /* @__PURE__ */ w(M.Separator, {
624
628
  "data-slot": "command-separator",
625
629
  className: I("my-1 h-px bg-border/50", e),
626
630
  ...t
627
631
  });
628
632
  }
629
- function Mt({ className: e, children: t, ...r }) {
633
+ function Lt({ className: e, children: t, ...r }) {
630
634
  return /* @__PURE__ */ W(M.Item, {
631
635
  "data-slot": "command-item",
632
- className: I("group/command-item relative flex cursor-default items-center gap-2 rounded-lg px-3 py-2 text-sm outline-hidden select-none in-data-[slot=dialog-content]:rounded-2xl data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 data-selected:bg-muted data-selected:text-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 data-selected:*:[svg]:text-foreground", e),
636
+ className: I("group/command-item relative flex cursor-default items-center gap-2 rounded-lg px-3 py-2 text-sm outline-hidden select-none in-data-[slot=dialog-content]:rounded-2xl data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 data-selected:bg-surface-muted data-selected:text-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 data-selected:*:[svg]:text-foreground", e),
633
637
  ...r,
634
- children: [t, /* @__PURE__ */ w(Oe, { className: "ms-auto opacity-0 group-has-data-[slot=command-shortcut]/command-item:hidden group-data-[checked=true]/command-item:opacity-100" })]
638
+ children: [t, /* @__PURE__ */ w(he, {
639
+ icon: ze,
640
+ className: "ms-auto opacity-0 group-has-data-[slot=command-shortcut]/command-item:hidden group-data-[checked=true]/command-item:opacity-100"
641
+ })]
635
642
  });
636
643
  }
637
- function jt({ className: e, ...t }) {
644
+ function Vt({ className: e, ...t }) {
638
645
  return /* @__PURE__ */ w("span", {
639
646
  "data-slot": "command-shortcut",
640
647
  className: I("ms-auto text-xs tracking-widest text-muted-foreground group-data-selected/command-item:text-foreground", e),
@@ -642,15 +649,15 @@ function jt({ className: e, ...t }) {
642
649
  });
643
650
  }
644
651
  export {
645
- It as Command,
646
- Rt as CommandDialog,
647
- Dt as CommandEmpty,
648
- Nt as CommandGroup,
649
- At as CommandInput,
650
- Mt as CommandItem,
651
- $t as CommandList,
652
- Pt as CommandSeparator,
653
- jt as CommandShortcut
652
+ At as Command,
653
+ $t as CommandDialog,
654
+ Pt as CommandEmpty,
655
+ Mt as CommandGroup,
656
+ Dt as CommandInput,
657
+ Lt as CommandItem,
658
+ Nt as CommandList,
659
+ jt as CommandSeparator,
660
+ Vt as CommandShortcut
654
661
  };
655
662
 
656
663
  //# sourceMappingURL=command.js.map