@gv-tech/ui-web 2.29.1 → 2.29.3

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 (273) hide show
  1. package/dist/accordion.cjs +1 -1
  2. package/dist/accordion.mjs +53 -2
  3. package/dist/alert-dialog.cjs +1 -1
  4. package/dist/alert-dialog.mjs +99 -2
  5. package/dist/alert.cjs +1 -1
  6. package/dist/alert.mjs +2 -3
  7. package/dist/aspect-ratio.cjs +1 -1
  8. package/dist/aspect-ratio.mjs +10 -2
  9. package/dist/attachment.cjs +1 -1
  10. package/dist/attachment.mjs +26 -26
  11. package/dist/avatar.cjs +1 -1
  12. package/dist/avatar.mjs +49 -2
  13. package/dist/badge.cjs +1 -1
  14. package/dist/badge.mjs +5 -5
  15. package/dist/breadcrumb.cjs +1 -1
  16. package/dist/breadcrumb.mjs +13 -13
  17. package/dist/bubble.cjs +1 -1
  18. package/dist/bubble.mjs +5 -5
  19. package/dist/button-group.cjs +1 -1
  20. package/dist/button-group.mjs +13 -13
  21. package/dist/button.cjs +1 -1
  22. package/dist/button.mjs +5 -5
  23. package/dist/calendar.cjs +1 -1
  24. package/dist/calendar.mjs +97 -2
  25. package/dist/card.cjs +1 -1
  26. package/dist/card.mjs +2 -3
  27. package/dist/carousel.cjs +1 -1
  28. package/dist/carousel.mjs +107 -2
  29. package/dist/chart.cjs +2 -2
  30. package/dist/chart.mjs +14 -15
  31. package/dist/checkbox.cjs +1 -1
  32. package/dist/checkbox.mjs +19 -2
  33. package/dist/collapsible.cjs +1 -1
  34. package/dist/collapsible.mjs +13 -14
  35. package/dist/combobox.cjs +1 -1
  36. package/dist/combobox.mjs +161 -2
  37. package/dist/command.cjs +1 -1
  38. package/dist/command.mjs +89 -2
  39. package/dist/context-menu.cjs +1 -1
  40. package/dist/context-menu.mjs +123 -2
  41. package/dist/dialog.cjs +1 -1
  42. package/dist/dialog.mjs +41 -42
  43. package/dist/direction.cjs +1 -1
  44. package/dist/direction.mjs +8 -9
  45. package/dist/drawer.cjs +1 -1
  46. package/dist/drawer.mjs +2 -3
  47. package/dist/dropdown-menu.cjs +1 -1
  48. package/dist/dropdown-menu.mjs +126 -2
  49. package/dist/empty.cjs +1 -1
  50. package/dist/empty.mjs +2 -3
  51. package/dist/field.cjs +1 -1
  52. package/dist/field.mjs +37 -38
  53. package/dist/form.cjs +1 -1
  54. package/dist/form.mjs +34 -35
  55. package/dist/hooks/use-theme.d.ts +52 -52
  56. package/dist/hover-card.cjs +1 -1
  57. package/dist/hover-card.mjs +30 -2
  58. package/dist/index.cjs +1 -1
  59. package/dist/index.mjs +66 -66
  60. package/dist/input-group.cjs +1 -1
  61. package/dist/input-group.mjs +27 -28
  62. package/dist/input-otp.cjs +1 -1
  63. package/dist/input-otp.mjs +45 -2
  64. package/dist/input.cjs +1 -1
  65. package/dist/input.mjs +2 -3
  66. package/dist/item.cjs +1 -1
  67. package/dist/item.mjs +29 -29
  68. package/dist/kbd.cjs +1 -1
  69. package/dist/kbd.mjs +2 -3
  70. package/dist/label.cjs +1 -1
  71. package/dist/label.mjs +13 -2
  72. package/dist/marker.cjs +1 -1
  73. package/dist/marker.mjs +5 -5
  74. package/dist/menubar.cjs +1 -1
  75. package/dist/menubar.mjs +133 -2
  76. package/dist/message-scroller.cjs +1 -1
  77. package/dist/message-scroller.mjs +59 -2
  78. package/dist/message.cjs +1 -1
  79. package/dist/message.mjs +2 -3
  80. package/dist/native-select.cjs +1 -1
  81. package/dist/native-select.mjs +2 -3
  82. package/dist/navigation-menu.cjs +1 -1
  83. package/dist/navigation-menu.mjs +79 -2
  84. package/dist/pagination.cjs +1 -1
  85. package/dist/pagination.mjs +15 -16
  86. package/dist/popover.cjs +1 -1
  87. package/dist/popover.mjs +54 -2
  88. package/dist/progress.cjs +1 -1
  89. package/dist/progress.mjs +19 -2
  90. package/dist/questionnaire.cjs +1 -1
  91. package/dist/questionnaire.mjs +168 -2
  92. package/dist/radio-group.cjs +1 -1
  93. package/dist/radio-group.mjs +25 -2
  94. package/dist/resizable.cjs +1 -1
  95. package/dist/resizable.mjs +26 -2
  96. package/dist/rolldown-runtime-BocRIvOZ.js +1 -0
  97. package/dist/scroll-area.cjs +1 -1
  98. package/dist/scroll-area.mjs +35 -2
  99. package/dist/scroll-to-top.cjs +1 -1
  100. package/dist/scroll-to-top.mjs +6 -11
  101. package/dist/search.cjs +1 -1
  102. package/dist/search.mjs +12 -13
  103. package/dist/select.cjs +1 -1
  104. package/dist/select.mjs +98 -2
  105. package/dist/separator.cjs +1 -1
  106. package/dist/separator.mjs +15 -2
  107. package/dist/sheet.cjs +1 -1
  108. package/dist/sheet.mjs +39 -40
  109. package/dist/{sidebar-DM9ee9wf.mjs → sidebar-DrU3nKaL.mjs} +137 -135
  110. package/dist/sidebar-uOtFHnBs.js +1 -0
  111. package/dist/sidebar.cjs +1 -1
  112. package/dist/sidebar.mjs +3 -2
  113. package/dist/skeleton.cjs +1 -1
  114. package/dist/skeleton.mjs +2 -3
  115. package/dist/slider.cjs +1 -1
  116. package/dist/slider.mjs +34 -2
  117. package/dist/sonner.mjs +1 -2
  118. package/dist/spinner.cjs +1 -1
  119. package/dist/spinner.mjs +2 -3
  120. package/dist/support-fab.cjs +1 -1
  121. package/dist/support-fab.mjs +21 -22
  122. package/dist/switch.cjs +1 -1
  123. package/dist/switch.mjs +18 -2
  124. package/dist/table-of-contents.cjs +1 -1
  125. package/dist/table-of-contents.mjs +5 -6
  126. package/dist/table.cjs +1 -1
  127. package/dist/table.mjs +2 -3
  128. package/dist/tabs.cjs +1 -1
  129. package/dist/tabs.mjs +44 -2
  130. package/dist/text.cjs +1 -1
  131. package/dist/text.mjs +14 -12
  132. package/dist/textarea.cjs +1 -1
  133. package/dist/textarea.mjs +2 -3
  134. package/dist/theme-provider.mjs +1 -2
  135. package/dist/{theme-toggle-3RStptYf.mjs → theme-toggle-9KtAIRxy.mjs} +18 -20
  136. package/dist/theme-toggle-DkNI3bfh.js +1 -0
  137. package/dist/theme-toggle.cjs +1 -1
  138. package/dist/theme-toggle.mjs +2 -2
  139. package/dist/toast.cjs +1 -1
  140. package/dist/toast.mjs +52 -2
  141. package/dist/{toaster-gT2b7mfE.mjs → toaster-8RrHPtlc.mjs} +10 -12
  142. package/dist/toaster-AFud4l6l.js +1 -0
  143. package/dist/toaster.cjs +1 -1
  144. package/dist/toaster.mjs +2 -2
  145. package/dist/toggle-group.cjs +1 -1
  146. package/dist/toggle-group.mjs +49 -2
  147. package/dist/toggle.cjs +1 -1
  148. package/dist/toggle.mjs +35 -2
  149. package/dist/tooltip.cjs +1 -1
  150. package/dist/tooltip.mjs +34 -2
  151. package/dist/{utils-A_oVsYw5.mjs → utils-DQKc9joa.mjs} +1 -2
  152. package/package.json +3 -3
  153. package/dist/accordion-D5QXSsCK.mjs +0 -248
  154. package/dist/accordion-DjyDOX-h.js +0 -1
  155. package/dist/alert-dialog-B-a0Wa1M.mjs +0 -182
  156. package/dist/alert-dialog-DYQAhGBC.js +0 -1
  157. package/dist/aspect-ratio-C-KOOyGP.js +0 -1
  158. package/dist/aspect-ratio-s7Ji1MSr.mjs +0 -40
  159. package/dist/avatar-4K3XjhP8.js +0 -1
  160. package/dist/avatar-d8Di248f.mjs +0 -138
  161. package/dist/calendar-DFj14O6r.js +0 -1
  162. package/dist/calendar-UW8h9dfh.mjs +0 -3182
  163. package/dist/carousel-CNGpg5df.js +0 -1
  164. package/dist/carousel-DG9xGJns.mjs +0 -1171
  165. package/dist/checkbox-BCgbTAdU.js +0 -1
  166. package/dist/checkbox-Dq8VHKDH.mjs +0 -186
  167. package/dist/chunk-BmowowmI.mjs +0 -14
  168. package/dist/chunk-HBS6WEDP-CQNaACTf.js +0 -1
  169. package/dist/chunk-HBS6WEDP-aK8IuEX9.mjs +0 -63
  170. package/dist/chunk-mLOUI7ql.js +0 -1
  171. package/dist/combobox-CpPIGtPJ.js +0 -4
  172. package/dist/combobox-b4OmCNw1.mjs +0 -5887
  173. package/dist/command-5hobOyGG.mjs +0 -545
  174. package/dist/command-Dbqnm9kI.js +0 -1
  175. package/dist/context-menu-DyTUismw.js +0 -1
  176. package/dist/context-menu-DzzU-_v8.mjs +0 -317
  177. package/dist/dist-1zUKVGvf.js +0 -1
  178. package/dist/dist-B057I8ju.mjs +0 -30
  179. package/dist/dist-BB78QQyQ.mjs +0 -41
  180. package/dist/dist-BBvidwzC.js +0 -1
  181. package/dist/dist-BEbV0Hal.mjs +0 -45
  182. package/dist/dist-BPL7gUpg.mjs +0 -18
  183. package/dist/dist-BTUvBzOm.js +0 -1
  184. package/dist/dist-BU-TFzJf.js +0 -1
  185. package/dist/dist-Bb5W_J2F.mjs +0 -39
  186. package/dist/dist-BbI6NHqR.mjs +0 -23
  187. package/dist/dist-BexAB6yo.mjs +0 -192
  188. package/dist/dist-BgXIqHHq.js +0 -1
  189. package/dist/dist-Bvfb4y_L.mjs +0 -100
  190. package/dist/dist-C8Pm6LRc.js +0 -1
  191. package/dist/dist-CGgemr2V.js +0 -1
  192. package/dist/dist-CPAF050o.mjs +0 -90
  193. package/dist/dist-CS572Be42.mjs +0 -11
  194. package/dist/dist-CUvxOuXM.mjs +0 -551
  195. package/dist/dist-C_iFkwIX.js +0 -1
  196. package/dist/dist-ClYM7l1t.js +0 -1
  197. package/dist/dist-CpKLY_uZ.mjs +0 -96
  198. package/dist/dist-D1qkELLT.js +0 -1
  199. package/dist/dist-D7-Fky36.js +0 -1
  200. package/dist/dist-DEpkkABT.js +0 -1
  201. package/dist/dist-DI1vapnL.mjs +0 -20
  202. package/dist/dist-DJqkhIXb2.js +0 -1
  203. package/dist/dist-DKXojpVG.js +0 -1
  204. package/dist/dist-DYUvPCPC.js +0 -1
  205. package/dist/dist-DZiOPWLp.js +0 -1
  206. package/dist/dist-DatgTWLz.mjs +0 -202
  207. package/dist/dist-Dm3IQk5b.mjs +0 -685
  208. package/dist/dist-DoivLw3t.js +0 -1
  209. package/dist/dist-Dq-h6VAy.mjs +0 -118
  210. package/dist/dist-Dt6m-kwU.mjs +0 -221
  211. package/dist/dist-E8ieJTBC.mjs +0 -190
  212. package/dist/dist-GazS1kfR.mjs +0 -5
  213. package/dist/dist-N97cIp0_.js +0 -1
  214. package/dist/dist-OqDzLHTa.mjs +0 -460
  215. package/dist/dist-Qm9hFvM1.js +0 -1
  216. package/dist/dist-UkWa-Arh.mjs +0 -16
  217. package/dist/dist-UnTrOmPV.js +0 -1
  218. package/dist/dist-YAADIsyo.js +0 -1
  219. package/dist/dist-Zs2sjYhL.js +0 -1
  220. package/dist/dist-hFLuJoMi.js +0 -1
  221. package/dist/dist-s7ibhASj.mjs +0 -181
  222. package/dist/dist-vu20fMUK.mjs +0 -93
  223. package/dist/dropdown-menu-BqAhn64y.mjs +0 -313
  224. package/dist/dropdown-menu-BtKOr--r.js +0 -1
  225. package/dist/es2015-DbAsWDbs.js +0 -41
  226. package/dist/es2015-DbsmTzuc.mjs +0 -571
  227. package/dist/floating-ui.react-dom-BwFRxNGc.js +0 -1
  228. package/dist/floating-ui.react-dom-CyupHsR6.mjs +0 -1062
  229. package/dist/hover-card-DMsxpR9G.mjs +0 -178
  230. package/dist/hover-card-DWXusgiI.js +0 -1
  231. package/dist/input-otp-D49Y9VcH.mjs +0 -409
  232. package/dist/input-otp-u3obpt-Q.js +0 -20
  233. package/dist/label-Dacwh21G.js +0 -1
  234. package/dist/label-DsSICLPc.mjs +0 -28
  235. package/dist/menubar-BYNeRuzx.js +0 -1
  236. package/dist/menubar-DZqEj6S1.mjs +0 -407
  237. package/dist/message-scroller-CS4t7Ypn.mjs +0 -824
  238. package/dist/message-scroller-DqLu0YI6.js +0 -1
  239. package/dist/navigation-menu-B36G3O83.js +0 -1
  240. package/dist/navigation-menu-RO6thDOF.mjs +0 -636
  241. package/dist/popover-DSBkc70V.mjs +0 -243
  242. package/dist/popover-DUHbvKB8.js +0 -1
  243. package/dist/progress-B9z08UXf.js +0 -6
  244. package/dist/progress-CQ4nQ85t.mjs +0 -92
  245. package/dist/questionnaire-CVED7G7R.mjs +0 -1159
  246. package/dist/questionnaire-PWClWvST.js +0 -1
  247. package/dist/radio-group-Bd3WbH5I.js +0 -1
  248. package/dist/radio-group-TRiAhMZB.mjs +0 -266
  249. package/dist/resizable-Cq60hEWB.js +0 -1
  250. package/dist/resizable-Qc8cVUKd.mjs +0 -2857
  251. package/dist/scroll-area-D6MiNHnJ.mjs +0 -564
  252. package/dist/scroll-area-DFUdJeSZ.js +0 -1
  253. package/dist/select-BFJUmjvX.mjs +0 -830
  254. package/dist/select-iQFoKU1s.js +0 -1
  255. package/dist/separator-2kr96SyF.mjs +0 -40
  256. package/dist/separator-Bo49G2aj.js +0 -1
  257. package/dist/sidebar-C6O8hLkz.js +0 -1
  258. package/dist/slider-CagVxozY.js +0 -1
  259. package/dist/slider-CdTCoQu1.mjs +0 -485
  260. package/dist/switch-CoeAC1Wk.js +0 -1
  261. package/dist/switch-zUBdj7jK.mjs +0 -174
  262. package/dist/tabs-DaE9pEbo.mjs +0 -160
  263. package/dist/tabs-TMhXe20x.js +0 -1
  264. package/dist/theme-toggle-DKh8WFLT.js +0 -1
  265. package/dist/toast-B0S3F09s.js +0 -1
  266. package/dist/toast-D0Yb-K84.mjs +0 -445
  267. package/dist/toaster-CX9im8R_.js +0 -1
  268. package/dist/toggle-B0hXPsi7.js +0 -1
  269. package/dist/toggle-BAeKd2N0.mjs +0 -59
  270. package/dist/toggle-group-CEKhUozD.mjs +0 -167
  271. package/dist/toggle-group-htyug3G7.js +0 -1
  272. package/dist/tooltip-BZazhXDZ.js +0 -1
  273. package/dist/tooltip-R_nK_Qh5.mjs +0 -390
@@ -1,445 +0,0 @@
1
- import { t as e } from "./utils-A_oVsYw5.mjs";
2
- import { a as t } from "./dist-Dq-h6VAy.mjs";
3
- import { n, t as r } from "./dist-BEbV0Hal.mjs";
4
- import { n as i } from "./dist-B057I8ju.mjs";
5
- import { t as a } from "./dist-CPAF050o.mjs";
6
- import { t as o } from "./dist-GazS1kfR.mjs";
7
- import { t as s } from "./dist-OqDzLHTa.mjs";
8
- import { t as c } from "./dist-BB78QQyQ.mjs";
9
- import { t as l } from "./dist-Bvfb4y_L.mjs";
10
- import { t as u } from "./dist-CpKLY_uZ.mjs";
11
- import { t as d } from "./dist-BPL7gUpg.mjs";
12
- import { n as f, t as p } from "./dist-s7ibhASj.mjs";
13
- import { t as m } from "./dist-DI1vapnL.mjs";
14
- import { X as h } from "lucide-react";
15
- import * as g from "react";
16
- import * as _ from "react-dom";
17
- import { Fragment as v, jsx as y, jsxs as b } from "react/jsx-runtime";
18
- import { cva as x } from "class-variance-authority";
19
- //#region ../../node_modules/.bun/@radix-ui+react-toast@1.3.1+b146eb580f4286be/node_modules/@radix-ui/react-toast/dist/index.mjs
20
- var S = Object.defineProperty, C = (e, t) => S(e, "name", {
21
- value: t,
22
- configurable: !0
23
- }), w = g.startTransition || (() => void 0), T = "ToastProvider", [E, D, O] = s("Toast"), k = {
24
- Up: "up",
25
- Down: "down",
26
- Left: "left",
27
- Right: "right"
28
- }, A = {
29
- Foreground: "foreground",
30
- Background: "background"
31
- }, [j, ee] = a("Toast", [O]), [M, N] = j(T);
32
- function P(e) {
33
- typeof w == "function" ? w(e) : e();
34
- }
35
- C(P, "scheduleUpdate");
36
- var F = /* @__PURE__ */ C((e) => {
37
- let { __scopeToast: t, label: n = "Notification", duration: r = 5e3, swipeDirection: i = k.Right, swipeThreshold: a = 50, announcerContainer: o, children: s } = e, [c, l] = g.useState(null), [u, d] = g.useState(0), f = g.useRef(!1), p = g.useCallback((e) => {
38
- P(() => l(e));
39
- }, []), m = g.useCallback(() => {
40
- P(() => d((e) => e + 1));
41
- }, []), h = g.useCallback(() => {
42
- P(() => d((e) => e - 1));
43
- }, []);
44
- return n.trim() || console.error(`Invalid prop \`label\` supplied to \`${T}\`. Expected non-empty \`string\`.`), /* @__PURE__ */ y(E.Provider, {
45
- scope: t,
46
- children: /* @__PURE__ */ y(M, {
47
- scope: t,
48
- label: n,
49
- duration: r,
50
- swipeDirection: i,
51
- swipeThreshold: a,
52
- toastCount: u,
53
- viewport: c,
54
- onViewportChange: p,
55
- onToastAdd: m,
56
- onToastRemove: h,
57
- isClosePausedRef: f,
58
- announcerContainer: o,
59
- children: s
60
- })
61
- });
62
- }, "ToastProvider"), I = "ToastViewport", L = ["F8"], R = "toast.viewportPause", z = "toast.viewportResume", B = /* @__PURE__ */ g.forwardRef(/* @__PURE__ */ C(function(e, n) {
63
- let { __scopeToast: i, hotkey: a = L, label: o = "Notifications ({hotkey})", ...s } = e, c = N(I, i), l = D(i), u = g.useRef(null), d = g.useRef(null), p = g.useRef(null), m = g.useRef(null), h = t(n, m, c.onViewportChange), _ = a.join("+").replace(/Key/g, "").replace(/Digit/g, ""), v = c.toastCount > 0;
64
- g.useEffect(() => {
65
- let e = /* @__PURE__ */ C((e) => {
66
- a.length !== 0 && a.every((t) => e[t] || e.code === t) && m.current?.focus();
67
- }, "handleKeyDown");
68
- return document.addEventListener("keydown", e), () => document.removeEventListener("keydown", e);
69
- }, [a]), g.useEffect(() => {
70
- let e = u.current, t = m.current;
71
- if (v && e && t) {
72
- let n = /* @__PURE__ */ C(() => {
73
- if (!c.isClosePausedRef.current) {
74
- let e = new CustomEvent(R);
75
- t.dispatchEvent(e), c.isClosePausedRef.current = !0;
76
- }
77
- }, "handlePause"), r = /* @__PURE__ */ C(() => {
78
- if (c.isClosePausedRef.current) {
79
- let e = new CustomEvent(z);
80
- t.dispatchEvent(e), c.isClosePausedRef.current = !1;
81
- }
82
- }, "handleResume"), i = /* @__PURE__ */ C((t) => {
83
- e.contains(t.relatedTarget) || r();
84
- }, "handleFocusOutResume"), a = /* @__PURE__ */ C(() => {
85
- e.contains(document.activeElement) || r();
86
- }, "handlePointerLeaveResume");
87
- return e.addEventListener("focusin", n), e.addEventListener("focusout", i), e.addEventListener("pointermove", n), e.addEventListener("pointerleave", a), window.addEventListener("blur", n), window.addEventListener("focus", r), () => {
88
- e.removeEventListener("focusin", n), e.removeEventListener("focusout", i), e.removeEventListener("pointermove", n), e.removeEventListener("pointerleave", a), window.removeEventListener("blur", n), window.removeEventListener("focus", r);
89
- };
90
- }
91
- }, [v, c.isClosePausedRef]);
92
- let x = g.useCallback(({ tabbingDirection: e }) => {
93
- let t = l().map((t) => {
94
- let n = t.ref.current, r = [n, ...pe(n)];
95
- return e === "forwards" ? r : r.reverse();
96
- });
97
- return (e === "forwards" ? t.reverse() : t).flat();
98
- }, [l]);
99
- return g.useEffect(() => {
100
- let e = m.current;
101
- if (e) {
102
- let t = /* @__PURE__ */ C((t) => {
103
- let n = t.altKey || t.ctrlKey || t.metaKey;
104
- if (t.key === "Tab" && !n) {
105
- let n = document.activeElement, r = t.shiftKey;
106
- if (t.target === e && r) {
107
- d.current?.focus();
108
- return;
109
- }
110
- let i = x({ tabbingDirection: r ? "backwards" : "forwards" }), a = i.findIndex((e) => e === n);
111
- $(i.slice(a + 1)) ? t.preventDefault() : r ? d.current?.focus() : p.current?.focus();
112
- }
113
- }, "handleKeyDown");
114
- return e.addEventListener("keydown", t), () => e.removeEventListener("keydown", t);
115
- }
116
- }, [l, x]), /* @__PURE__ */ b(f, {
117
- ref: u,
118
- role: "region",
119
- "aria-label": o.replace("{hotkey}", _),
120
- tabIndex: -1,
121
- style: { pointerEvents: v ? void 0 : "none" },
122
- children: [
123
- v && /* @__PURE__ */ y(H, {
124
- ref: d,
125
- onFocusFromOutsideViewport: () => {
126
- $(x({ tabbingDirection: "forwards" }));
127
- }
128
- }),
129
- /* @__PURE__ */ y(E.Slot, {
130
- scope: i,
131
- children: /* @__PURE__ */ y(r.ol, {
132
- tabIndex: -1,
133
- ...s,
134
- ref: h
135
- })
136
- }),
137
- v && /* @__PURE__ */ y(H, {
138
- ref: p,
139
- onFocusFromOutsideViewport: () => {
140
- $(x({ tabbingDirection: "backwards" }));
141
- }
142
- })
143
- ]
144
- });
145
- }, "ToastViewport")), V = "ToastFocusProxy", H = /* @__PURE__ */ g.forwardRef(/* @__PURE__ */ C(function(e, t) {
146
- let { __scopeToast: n, onFocusFromOutsideViewport: r, ...a } = e, o = N(V, n);
147
- return /* @__PURE__ */ y(i, {
148
- tabIndex: 0,
149
- ...a,
150
- ref: t,
151
- style: { position: "fixed" },
152
- onFocus: (e) => {
153
- let t = e.relatedTarget;
154
- o.viewport?.contains(t) || r();
155
- }
156
- });
157
- }, "ToastFocusProxy")), U = "Toast", te = "toast.swipeStart", ne = "toast.swipeMove", re = "toast.swipeCancel", ie = "toast.swipeEnd", W = /* @__PURE__ */ g.forwardRef(/* @__PURE__ */ C(function(e, t) {
158
- let { forceMount: n, open: r, defaultOpen: i, onOpenChange: a, ...o } = e, [s, f] = l({
159
- prop: r,
160
- defaultProp: i ?? !0,
161
- onChange: a,
162
- caller: U
163
- });
164
- return /* @__PURE__ */ y(u, {
165
- present: n || s,
166
- children: /* @__PURE__ */ y(K, {
167
- open: s,
168
- ...o,
169
- ref: t,
170
- onClose: () => f(!1),
171
- onPause: d(e.onPause),
172
- onResume: d(e.onResume),
173
- onSwipeStart: c(e.onSwipeStart, (e) => {
174
- e.currentTarget.setAttribute("data-swipe", "start");
175
- }),
176
- onSwipeMove: c(e.onSwipeMove, (e) => {
177
- let { x: t, y: n } = e.detail.delta;
178
- e.currentTarget.setAttribute("data-swipe", "move"), e.currentTarget.style.setProperty("--radix-toast-swipe-move-x", `${t}px`), e.currentTarget.style.setProperty("--radix-toast-swipe-move-y", `${n}px`);
179
- }),
180
- onSwipeCancel: c(e.onSwipeCancel, (e) => {
181
- e.currentTarget.setAttribute("data-swipe", "cancel"), e.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"), e.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"), e.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"), e.currentTarget.style.removeProperty("--radix-toast-swipe-end-y");
182
- }),
183
- onSwipeEnd: c(e.onSwipeEnd, (e) => {
184
- let { x: t, y: n } = e.detail.delta;
185
- e.currentTarget.setAttribute("data-swipe", "end"), e.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"), e.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"), e.currentTarget.style.setProperty("--radix-toast-swipe-end-x", `${t}px`), e.currentTarget.style.setProperty("--radix-toast-swipe-end-y", `${n}px`), f(!1);
186
- })
187
- })
188
- });
189
- }, "Toast")), [ae, G] = j(U, { onClose() {} }), K = /* @__PURE__ */ g.forwardRef(/* @__PURE__ */ C(function(e, n) {
190
- let { __scopeToast: i, type: a = A.Foreground, duration: o, open: s, onClose: l, onEscapeKeyDown: u, onPause: f, onResume: m, onSwipeStart: h, onSwipeMove: x, onSwipeCancel: S, onSwipeEnd: w, ...T } = e, O = N(U, i), k = D(i), [j, ee] = g.useState(null), M = t(n, ee), P = g.useRef(null), F = g.useRef(null), I = o || O.duration, L = g.useRef(0), B = g.useRef(I), V = g.useRef(0), { onToastAdd: H, onToastRemove: W } = O, G = d(() => {
191
- j?.contains(document.activeElement) && O.viewport?.focus(), l();
192
- }), K = g.useCallback((e) => {
193
- !e || e === Infinity || (window.clearTimeout(V.current), L.current = (/* @__PURE__ */ new Date()).getTime(), V.current = window.setTimeout(G, e));
194
- }, [G]);
195
- g.useEffect(() => {
196
- let e = O.viewport;
197
- if (e) {
198
- let t = /* @__PURE__ */ C(() => {
199
- K(B.current), m?.();
200
- }, "handleResume"), n = /* @__PURE__ */ C(() => {
201
- let e = (/* @__PURE__ */ new Date()).getTime() - L.current;
202
- B.current -= e, window.clearTimeout(V.current), f?.();
203
- }, "handlePause");
204
- return e.addEventListener(R, n), e.addEventListener(z, t), () => {
205
- e.removeEventListener(R, n), e.removeEventListener(z, t);
206
- };
207
- }
208
- }, [
209
- O.viewport,
210
- I,
211
- f,
212
- m,
213
- K
214
- ]), g.useEffect(() => {
215
- B.current = I, s && !O.isClosePausedRef.current && K(I);
216
- }, [
217
- s,
218
- I,
219
- O.isClosePausedRef,
220
- K
221
- ]), g.useEffect(() => () => {
222
- window.clearTimeout(V.current);
223
- }, []), g.useEffect(() => (H(), () => W()), [H, W]);
224
- let q = g.useMemo(() => j ? Z(j) : null, [j]);
225
- return O.viewport ? /* @__PURE__ */ b(v, { children: [q && /* @__PURE__ */ y(oe, {
226
- __scopeToast: i,
227
- role: "status",
228
- "aria-live": a === A.Foreground ? "assertive" : "polite",
229
- children: q
230
- }), /* @__PURE__ */ y(ae, {
231
- scope: i,
232
- onClose: G,
233
- children: _.createPortal(/* @__PURE__ */ y(E.ItemSlot, {
234
- scope: i,
235
- children: /* @__PURE__ */ y(p, {
236
- asChild: !0,
237
- onEscapeKeyDown: c(u, (e) => {
238
- k().some((t) => t.ref.current?.contains(e.target)) || G();
239
- }),
240
- children: /* @__PURE__ */ y(r.li, {
241
- tabIndex: 0,
242
- "data-state": s ? "open" : "closed",
243
- "data-swipe-direction": O.swipeDirection,
244
- ...T,
245
- ref: M,
246
- style: {
247
- userSelect: "none",
248
- touchAction: "none",
249
- ...e.style
250
- },
251
- onKeyDown: c(e.onKeyDown, (e) => {
252
- e.key === "Escape" && (u?.(e.nativeEvent), e.nativeEvent.defaultPrevented || G());
253
- }),
254
- onPointerDown: c(e.onPointerDown, (e) => {
255
- e.button === 0 && (P.current = {
256
- x: e.clientX,
257
- y: e.clientY
258
- });
259
- }),
260
- onPointerMove: c(e.onPointerMove, (e) => {
261
- if (!P.current) return;
262
- let t = e.clientX - P.current.x, n = e.clientY - P.current.y, r = !!F.current, i = ["left", "right"].includes(O.swipeDirection), a = ["left", "up"].includes(O.swipeDirection) ? Math.min : Math.max, o = i ? a(0, t) : 0, s = i ? 0 : a(0, n), c = e.pointerType === "touch" ? 10 : 2, l = {
263
- x: o,
264
- y: s
265
- }, u = {
266
- originalEvent: e,
267
- delta: l
268
- };
269
- r ? (F.current = l, Q(ne, x, u, { discrete: !1 })) : ue(l, O.swipeDirection, c) ? (F.current = l, Q(te, h, u, { discrete: !1 }), e.target.setPointerCapture(e.pointerId)) : (Math.abs(t) > c || Math.abs(n) > c) && (P.current = null);
270
- }),
271
- onPointerUp: c(e.onPointerUp, (e) => {
272
- let t = F.current, n = e.target;
273
- if (n.hasPointerCapture(e.pointerId) && n.releasePointerCapture(e.pointerId), F.current = null, P.current = null, t) {
274
- let n = e.currentTarget, r = {
275
- originalEvent: e,
276
- delta: t
277
- };
278
- ue(t, O.swipeDirection, O.swipeThreshold) ? Q(ie, w, r, { discrete: !0 }) : Q(re, S, r, { discrete: !0 }), n.addEventListener("click", (e) => e.preventDefault(), { once: !0 });
279
- }
280
- })
281
- })
282
- })
283
- }), O.viewport)
284
- })] }) : null;
285
- }, "ToastImpl")), oe = /* @__PURE__ */ C((e) => {
286
- let { __scopeToast: t, children: n, ...r } = e, a = N(U, t), [o, s] = g.useState(!1), [c, l] = g.useState(!1);
287
- return de(() => s(!0)), g.useEffect(() => {
288
- let e = window.setTimeout(() => l(!0), 1e3);
289
- return () => window.clearTimeout(e);
290
- }, []), c ? null : /* @__PURE__ */ y(m, {
291
- asChild: !0,
292
- container: a.announcerContainer || void 0,
293
- children: /* @__PURE__ */ y(i, {
294
- ...r,
295
- children: o && /* @__PURE__ */ b(v, { children: [
296
- a.label,
297
- " ",
298
- n
299
- ] })
300
- })
301
- });
302
- }, "ToastAnnounce"), q = /* @__PURE__ */ g.forwardRef(/* @__PURE__ */ C(function(e, t) {
303
- let { __scopeToast: n, ...i } = e;
304
- return /* @__PURE__ */ y(r.div, {
305
- ...i,
306
- ref: t
307
- });
308
- }, "ToastTitle")), J = /* @__PURE__ */ g.forwardRef(/* @__PURE__ */ C(function(e, t) {
309
- let { __scopeToast: n, ...i } = e;
310
- return /* @__PURE__ */ y(r.div, {
311
- ...i,
312
- ref: t
313
- });
314
- }, "ToastDescription")), se = "ToastAction", Y = /* @__PURE__ */ g.forwardRef(/* @__PURE__ */ C(function(e, t) {
315
- let { altText: n, ...r } = e;
316
- return n.trim() ? /* @__PURE__ */ y(le, {
317
- altText: n,
318
- asChild: !0,
319
- children: /* @__PURE__ */ y(X, {
320
- ...r,
321
- ref: t
322
- })
323
- }) : (console.error(`Invalid prop \`altText\` supplied to \`${se}\`. Expected non-empty \`string\`.`), null);
324
- }, "ToastAction")), ce = "ToastClose", X = /* @__PURE__ */ g.forwardRef(/* @__PURE__ */ C(function(e, t) {
325
- let { __scopeToast: n, ...i } = e, a = G(ce, n);
326
- return /* @__PURE__ */ y(le, {
327
- asChild: !0,
328
- children: /* @__PURE__ */ y(r.button, {
329
- type: "button",
330
- ...i,
331
- ref: t,
332
- onClick: c(e.onClick, a.onClose)
333
- })
334
- });
335
- }, "ToastClose")), le = /* @__PURE__ */ g.forwardRef(/* @__PURE__ */ C(function(e, t) {
336
- let { __scopeToast: n, altText: i, ...a } = e;
337
- return /* @__PURE__ */ y(r.div, {
338
- "data-radix-toast-announce-exclude": "",
339
- "data-radix-toast-announce-alt": i || void 0,
340
- ...a,
341
- ref: t
342
- });
343
- }, "ToastAnnounceExclude"));
344
- function Z(e) {
345
- let t = [];
346
- return Array.from(e.childNodes).forEach((e) => {
347
- if (e.nodeType === e.TEXT_NODE && e.textContent && t.push(e.textContent), fe(e)) {
348
- let n = e.ariaHidden || e.hidden || e.style.display === "none", r = e.dataset.radixToastAnnounceExclude === "";
349
- if (!n) if (r) {
350
- let n = e.dataset.radixToastAnnounceAlt;
351
- n && t.push(n);
352
- } else t.push(...Z(e));
353
- }
354
- }), t;
355
- }
356
- C(Z, "getAnnounceTextContent");
357
- function Q(e, t, r, { discrete: i }) {
358
- let a = r.originalEvent.currentTarget, o = new CustomEvent(e, {
359
- bubbles: !0,
360
- cancelable: !0,
361
- detail: r
362
- });
363
- t && a.addEventListener(e, t, { once: !0 }), i ? n(a, o) : a.dispatchEvent(o);
364
- }
365
- C(Q, "handleAndDispatchCustomEvent");
366
- var ue = /* @__PURE__ */ C((e, t, n = 0) => {
367
- let r = Math.abs(e.x), i = Math.abs(e.y), a = r > i;
368
- return t === k.Left || t === k.Right ? a && r > n : !a && i > n;
369
- }, "isDeltaInDirection");
370
- function de(e = () => {}) {
371
- let t = d(e);
372
- o(() => {
373
- let e = 0, n = 0;
374
- return e = window.requestAnimationFrame(() => n = window.requestAnimationFrame(t)), () => {
375
- window.cancelAnimationFrame(e), window.cancelAnimationFrame(n);
376
- };
377
- }, [t]);
378
- }
379
- C(de, "useNextFrame");
380
- function fe(e) {
381
- return e.nodeType === e.ELEMENT_NODE;
382
- }
383
- C(fe, "isHTMLElement");
384
- function pe(e) {
385
- let t = [], n = document.createTreeWalker(e, NodeFilter.SHOW_ELEMENT, { acceptNode: /* @__PURE__ */ C((e) => {
386
- let t = e.tagName === "INPUT" && e.type === "hidden";
387
- return e.disabled || e.hidden || t ? NodeFilter.FILTER_SKIP : e.tabIndex >= 0 ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP;
388
- }, "acceptNode") });
389
- for (; n.nextNode();) t.push(n.currentNode);
390
- return t;
391
- }
392
- C(pe, "getTabbableCandidates");
393
- function $(e) {
394
- let t = document.activeElement;
395
- return e.some((e) => e === t ? !0 : (e.focus(), document.activeElement !== t));
396
- }
397
- C($, "focusFirst");
398
- //#endregion
399
- //#region src/toast.tsx
400
- var me = F, he = g.forwardRef(({ className: t, ...n }, r) => /* @__PURE__ */ y(B, {
401
- ref: r,
402
- className: e("fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:top-auto sm:right-0 sm:bottom-0 sm:flex-col md:max-w-[420px]", t),
403
- ...n
404
- }));
405
- he.displayName = B?.displayName || "ToastViewport";
406
- var ge = x("group data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full pointer-events-auto relative flex w-full items-center justify-between space-x-2 overflow-hidden rounded-md border p-4 pr-6 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none", {
407
- variants: { variant: {
408
- default: "bg-background text-foreground border",
409
- destructive: "destructive group border-destructive bg-destructive text-destructive-foreground"
410
- } },
411
- defaultVariants: { variant: "default" }
412
- }), _e = g.forwardRef(({ className: t, variant: n, ...r }, i) => /* @__PURE__ */ y(W, {
413
- ref: i,
414
- className: e(ge({ variant: n }), t),
415
- ...r
416
- }));
417
- _e.displayName = W?.displayName || "Toast";
418
- var ve = g.forwardRef(({ className: t, ...n }, r) => /* @__PURE__ */ y(Y, {
419
- ref: r,
420
- className: e("hover:bg-secondary focus:ring-ring group-[.destructive]:border-muted/40 group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground group-[.destructive]:focus:ring-destructive inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium transition-colors focus:ring-1 focus:outline-none disabled:pointer-events-none disabled:opacity-50", t),
421
- ...n
422
- }));
423
- ve.displayName = Y?.displayName || "ToastAction";
424
- var ye = g.forwardRef(({ className: t, ...n }, r) => /* @__PURE__ */ y(X, {
425
- ref: r,
426
- className: e("text-foreground/50 hover:text-foreground absolute top-1 right-1 rounded-md p-1 opacity-0 transition-opacity group-hover:opacity-100 group-[.destructive]:text-red-300 group-[.destructive]:hover:text-red-50 focus:opacity-100 focus:ring-1 focus:outline-none group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600", t),
427
- "toast-close": "",
428
- ...n,
429
- children: /* @__PURE__ */ y(h, { className: "h-4 w-4" })
430
- }));
431
- ye.displayName = X?.displayName || "ToastClose";
432
- var be = g.forwardRef(({ className: t, ...n }, r) => /* @__PURE__ */ y(q, {
433
- ref: r,
434
- className: e("text-sm font-semibold [&+div]:text-xs", t),
435
- ...n
436
- }));
437
- be.displayName = q?.displayName || "ToastTitle";
438
- var xe = g.forwardRef(({ className: t, ...n }, r) => /* @__PURE__ */ y(J, {
439
- ref: r,
440
- className: e("text-sm opacity-90", t),
441
- ...n
442
- }));
443
- xe.displayName = J?.displayName || "ToastDescription";
444
- //#endregion
445
- export { me as a, xe as i, ve as n, be as o, ye as r, he as s, _e as t };
@@ -1 +0,0 @@
1
- const e=require("./chunk-mLOUI7ql.js"),t=require("./toast-B0S3F09s.js");let n=require("react");n=e.r(n);let r=require("react/jsx-runtime");var i=1,a=1e6,o={ADD_TOAST:`ADD_TOAST`,UPDATE_TOAST:`UPDATE_TOAST`,DISMISS_TOAST:`DISMISS_TOAST`,REMOVE_TOAST:`REMOVE_TOAST`},s=0;function c(){return s=(s+1)%(2**53-1),s.toString()}var l=new Map,u=e=>{if(l.has(e))return;let t=setTimeout(()=>{l.delete(e),m({type:`REMOVE_TOAST`,toastId:e})},a);l.set(e,t)},d=(e,t)=>{switch(t.type){case o.ADD_TOAST:return{...e,toasts:[t.toast,...e.toasts].slice(0,i)};case o.UPDATE_TOAST:return{...e,toasts:e.toasts.map(e=>e.id===t.toast.id?{...e,...t.toast}:e)};case o.DISMISS_TOAST:{let{toastId:n}=t;return n?u(n):e.toasts.forEach(e=>{u(e.id)}),{...e,toasts:e.toasts.map(e=>e.id===n||n===void 0?{...e,open:!1}:e)}}case o.REMOVE_TOAST:return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(e=>e.id!==t.toastId)}}},f=[],p={toasts:[]};function m(e){p=d(p,e),f.forEach(e=>{e(p)})}function h({...e}){let t=c(),n=e=>m({type:`UPDATE_TOAST`,toast:{...e,id:t}}),r=()=>m({type:`DISMISS_TOAST`,toastId:t});return m({type:`ADD_TOAST`,toast:{...e,id:t,open:!0,onOpenChange:e=>{e||r()}}}),{id:t,dismiss:r,update:n}}function g(){let[e,t]=n.useState(p);return n.useEffect(()=>(f.push(t),()=>{let e=f.indexOf(t);e>-1&&f.splice(e,1)}),[e]),{...e,toast:h,dismiss:e=>m({type:`DISMISS_TOAST`,toastId:e})}}function _({...e}){let{toasts:n}=g();return(0,r.jsxs)(t.a,{...e,children:[n.map(function({id:e,title:n,description:i,action:a,...o}){return(0,r.jsxs)(t.t,{...o,children:[(0,r.jsxs)(`div`,{className:`grid gap-1`,children:[n&&(0,r.jsx)(t.o,{children:n}),i&&(0,r.jsx)(t.i,{children:i})]}),a,(0,r.jsx)(t.r,{})]},e)}),(0,r.jsx)(t.s,{})]})}Object.defineProperty(exports,"n",{enumerable:!0,get:function(){return h}}),Object.defineProperty(exports,"r",{enumerable:!0,get:function(){return g}}),Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return _}});
@@ -1 +0,0 @@
1
- const e=require("./chunk-mLOUI7ql.js"),t=require("./dist-C_iFkwIX.js"),n=require("./dist-hFLuJoMi.js"),r=require("./dist-DZiOPWLp.js"),i=require("./dist-YAADIsyo.js");let a=require("react"),o=e.r(a,1);a=e.r(a);let s=require("react/jsx-runtime"),c=require("class-variance-authority");var l=Object.defineProperty,u=(e,t)=>l(e,`name`,{value:t,configurable:!0}),d=`Toggle`,f=o.forwardRef(u(function(e,t){let{pressed:a,defaultPressed:o,onPressedChange:c,...l}=e,[u,f]=i.t({prop:a,onChange:c,defaultProp:o??!1,caller:d});return(0,s.jsx)(n.t.button,{type:`button`,"aria-pressed":u,"data-state":u?`on`:`off`,"data-disabled":e.disabled?``:void 0,...l,ref:t,onClick:r.t(e.onClick,()=>{e.disabled||f(!u)})})},`Toggle`)),p=(0,c.cva)(`group/toggle hover:bg-muted hover:text-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 aria-pressed:bg-muted data-[state=on]:bg-muted dark:aria-invalid:ring-destructive/40 inline-flex items-center justify-center gap-1 rounded-lg text-sm font-medium whitespace-nowrap transition-all outline-none focus-visible:ring-[3px] disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,{variants:{variant:{default:`bg-transparent`,outline:`border-input hover:bg-muted border bg-transparent`},size:{default:`h-8 min-w-8 px-2.5 has-data-[icon=inline-end]:pe-2 has-data-[icon=inline-start]:ps-2`,sm:`h-7 min-w-7 rounded-[min(var(--radius-md),12px)] px-2.5 text-[0.8rem] has-data-[icon=inline-end]:pe-1.5 has-data-[icon=inline-start]:ps-1.5 [&_svg:not([class*='size-'])]:size-3.5`,lg:`h-9 min-w-9 px-2.5 has-data-[icon=inline-end]:pe-2 has-data-[icon=inline-start]:ps-2`}},defaultVariants:{variant:`default`,size:`default`}});function m({className:e,variant:n=`default`,size:r=`default`,...i}){return(0,s.jsx)(f,{"data-slot":`toggle`,className:t.t(p({variant:n,size:r,className:e})),...i})}Object.defineProperty(exports,"n",{enumerable:!0,get:function(){return p}}),Object.defineProperty(exports,"r",{enumerable:!0,get:function(){return f}}),Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return m}});
@@ -1,59 +0,0 @@
1
- import { t as e } from "./dist-Dm3IQk5b.mjs";
2
- import { t } from "./dist-BEbV0Hal.mjs";
3
- import { t as n } from "./dist-BB78QQyQ.mjs";
4
- import { t as r } from "./dist-Bvfb4y_L.mjs";
5
- import * as i from "react";
6
- import { jsx as a } from "react/jsx-runtime";
7
- import { cva as o } from "class-variance-authority";
8
- //#region ../../node_modules/.bun/@radix-ui+react-toggle@1.2.1+b146eb580f4286be/node_modules/@radix-ui/react-toggle/dist/index.mjs
9
- var s = Object.defineProperty, c = (e, t) => s(e, "name", {
10
- value: t,
11
- configurable: !0
12
- }), l = "Toggle", u = /* @__PURE__ */ i.forwardRef(/* @__PURE__ */ c(function(e, i) {
13
- let { pressed: o, defaultPressed: s, onPressedChange: c, ...u } = e, [d, f] = r({
14
- prop: o,
15
- onChange: c,
16
- defaultProp: s ?? !1,
17
- caller: l
18
- });
19
- return /* @__PURE__ */ a(t.button, {
20
- type: "button",
21
- "aria-pressed": d,
22
- "data-state": d ? "on" : "off",
23
- "data-disabled": e.disabled ? "" : void 0,
24
- ...u,
25
- ref: i,
26
- onClick: n(e.onClick, () => {
27
- e.disabled || f(!d);
28
- })
29
- });
30
- }, "Toggle")), d = o("group/toggle hover:bg-muted hover:text-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 aria-pressed:bg-muted data-[state=on]:bg-muted dark:aria-invalid:ring-destructive/40 inline-flex items-center justify-center gap-1 rounded-lg text-sm font-medium whitespace-nowrap transition-all outline-none focus-visible:ring-[3px] disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", {
31
- variants: {
32
- variant: {
33
- default: "bg-transparent",
34
- outline: "border-input hover:bg-muted border bg-transparent"
35
- },
36
- size: {
37
- default: "h-8 min-w-8 px-2.5 has-data-[icon=inline-end]:pe-2 has-data-[icon=inline-start]:ps-2",
38
- sm: "h-7 min-w-7 rounded-[min(var(--radius-md),12px)] px-2.5 text-[0.8rem] has-data-[icon=inline-end]:pe-1.5 has-data-[icon=inline-start]:ps-1.5 [&_svg:not([class*='size-'])]:size-3.5",
39
- lg: "h-9 min-w-9 px-2.5 has-data-[icon=inline-end]:pe-2 has-data-[icon=inline-start]:ps-2"
40
- }
41
- },
42
- defaultVariants: {
43
- variant: "default",
44
- size: "default"
45
- }
46
- });
47
- function f({ className: t, variant: n = "default", size: r = "default", ...i }) {
48
- return /* @__PURE__ */ a(u, {
49
- "data-slot": "toggle",
50
- className: e(d({
51
- variant: n,
52
- size: r,
53
- className: t
54
- })),
55
- ...i
56
- });
57
- }
58
- //#endregion
59
- export { d as n, u as r, f as t };
@@ -1,167 +0,0 @@
1
- import { t as e } from "./dist-Dm3IQk5b.mjs";
2
- import { t } from "./dist-BEbV0Hal.mjs";
3
- import { t as n } from "./dist-CPAF050o.mjs";
4
- import { t as r } from "./dist-Bvfb4y_L.mjs";
5
- import { n as i } from "./dist-BbI6NHqR.mjs";
6
- import { n as a, r as o, t as s } from "./dist-BexAB6yo.mjs";
7
- import { n as c, r as l } from "./toggle-BAeKd2N0.mjs";
8
- import * as u from "react";
9
- import { jsx as d } from "react/jsx-runtime";
10
- //#region ../../node_modules/.bun/@radix-ui+react-toggle-group@1.2.1+b146eb580f4286be/node_modules/@radix-ui/react-toggle-group/dist/index.mjs
11
- var f = Object.defineProperty, p = (e, t) => f(e, "name", {
12
- value: t,
13
- configurable: !0
14
- }), m = "ToggleGroup", h = {
15
- Single: "single",
16
- Multiple: "multiple"
17
- }, [g, _] = n(m, [o]), v = o(), y = /* @__PURE__ */ u.forwardRef(/* @__PURE__ */ p(function(e, t) {
18
- let { type: n, ...r } = e;
19
- if (n === h.Single) return /* @__PURE__ */ d(S, {
20
- role: "radiogroup",
21
- ...r,
22
- ref: t
23
- });
24
- if (n === h.Multiple) return /* @__PURE__ */ d(C, {
25
- role: "toolbar",
26
- ...r,
27
- ref: t
28
- });
29
- throw Error(`Missing prop \`type\` expected on \`${m}\``);
30
- }, "ToggleGroup")), [b, x] = g(m), S = /* @__PURE__ */ u.forwardRef(/* @__PURE__ */ p(function(e, t) {
31
- let { value: n, defaultValue: i, onValueChange: a = /* @__PURE__ */ p(() => {}, "onValueChange"), ...o } = e, [s, c] = r({
32
- prop: n,
33
- defaultProp: i ?? "",
34
- onChange: a,
35
- caller: m
36
- });
37
- return /* @__PURE__ */ d(b, {
38
- scope: e.__scopeToggleGroup,
39
- type: h.Single,
40
- value: u.useMemo(() => s ? [s] : [], [s]),
41
- onItemActivate: c,
42
- onItemDeactivate: u.useCallback(() => c(""), [c]),
43
- children: /* @__PURE__ */ d(E, {
44
- ...o,
45
- ref: t
46
- })
47
- });
48
- }, "ToggleGroupImplSingle")), C = /* @__PURE__ */ u.forwardRef(/* @__PURE__ */ p(function(e, t) {
49
- let { value: n, defaultValue: i, onValueChange: a = /* @__PURE__ */ p(() => {}, "onValueChange"), ...o } = e, [s, c] = r({
50
- prop: n,
51
- defaultProp: i ?? [],
52
- onChange: a,
53
- caller: m
54
- }), l = u.useCallback((e) => c((t = []) => [...t, e]), [c]), f = u.useCallback((e) => c((t = []) => t.filter((t) => t !== e)), [c]);
55
- return /* @__PURE__ */ d(b, {
56
- scope: e.__scopeToggleGroup,
57
- type: h.Multiple,
58
- value: s,
59
- onItemActivate: l,
60
- onItemDeactivate: f,
61
- children: /* @__PURE__ */ d(E, {
62
- ...o,
63
- ref: t
64
- })
65
- });
66
- }, "ToggleGroupImplMultiple")), [w, T] = g(m), E = /* @__PURE__ */ u.forwardRef(/* @__PURE__ */ p(function(e, n) {
67
- let { __scopeToggleGroup: r, disabled: a = !1, rovingFocus: o = !0, orientation: c, dir: l, loop: u = !0, ...f } = e, p = v(r), m = i(l), h = {
68
- dir: m,
69
- ...f
70
- };
71
- return /* @__PURE__ */ d(w, {
72
- scope: r,
73
- rovingFocus: o,
74
- disabled: a,
75
- children: o ? /* @__PURE__ */ d(s, {
76
- asChild: !0,
77
- ...p,
78
- orientation: c,
79
- dir: m,
80
- loop: u,
81
- children: /* @__PURE__ */ d(t.div, {
82
- ...h,
83
- ref: n
84
- })
85
- }) : /* @__PURE__ */ d(t.div, {
86
- ...h,
87
- ref: n
88
- })
89
- });
90
- }, "ToggleGroupImpl")), D = "ToggleGroupItem", O = /* @__PURE__ */ u.forwardRef(/* @__PURE__ */ p(function(e, t) {
91
- let n = x(D, e.__scopeToggleGroup), r = T(D, e.__scopeToggleGroup), i = v(e.__scopeToggleGroup), o = n.value.includes(e.value), s = r.disabled || e.disabled, c = {
92
- ...e,
93
- pressed: o,
94
- disabled: s
95
- }, l = u.useRef(null);
96
- return r.rovingFocus ? /* @__PURE__ */ d(a, {
97
- asChild: !0,
98
- ...i,
99
- focusable: !s,
100
- active: o,
101
- ref: l,
102
- children: /* @__PURE__ */ d(k, {
103
- ...c,
104
- ref: t
105
- })
106
- }) : /* @__PURE__ */ d(k, {
107
- ...c,
108
- ref: t
109
- });
110
- }, "ToggleGroupItem")), k = /* @__PURE__ */ u.forwardRef(/* @__PURE__ */ p(function(e, t) {
111
- let { __scopeToggleGroup: n, value: r, ...i } = e, a = x(D, n), o = {
112
- role: "radio",
113
- "aria-checked": e.pressed,
114
- "aria-pressed": void 0
115
- };
116
- return /* @__PURE__ */ d(l, {
117
- ...a.type === h.Single ? o : void 0,
118
- ...i,
119
- ref: t,
120
- onPressedChange: (e) => {
121
- e ? a.onItemActivate(r) : a.onItemDeactivate(r);
122
- }
123
- });
124
- }, "ToggleGroupItemImpl")), A = u.createContext({
125
- size: "default",
126
- variant: "default",
127
- spacing: 2,
128
- orientation: "horizontal"
129
- });
130
- function j({ className: t, variant: n, size: r, spacing: i = 2, orientation: a = "horizontal", children: o, ...s }) {
131
- return /* @__PURE__ */ d(y, {
132
- "data-slot": "toggle-group",
133
- "data-variant": n,
134
- "data-size": r,
135
- "data-spacing": i,
136
- "data-orientation": a,
137
- style: { "--gap": i },
138
- className: e("group/toggle-group flex w-fit flex-row items-center gap-[--spacing(var(--gap))] rounded-lg data-vertical:flex-col data-vertical:items-stretch data-[size=sm]:rounded-[min(var(--radius-md),10px)]", t),
139
- ...s,
140
- children: /* @__PURE__ */ d(A.Provider, {
141
- value: {
142
- variant: n,
143
- size: r,
144
- spacing: i,
145
- orientation: a
146
- },
147
- children: o
148
- })
149
- });
150
- }
151
- function M({ className: t, children: n, variant: r = "default", size: i = "default", ...a }) {
152
- let o = u.useContext(A);
153
- return /* @__PURE__ */ d(O, {
154
- "data-slot": "toggle-group-item",
155
- "data-variant": o.variant || r,
156
- "data-size": o.size || i,
157
- "data-spacing": o.spacing,
158
- className: e("shrink-0 group-data-[spacing=0]/toggle-group:rounded-none group-data-[spacing=0]/toggle-group:px-2 focus:z-10 focus-visible:z-10 group-data-[spacing=0]/toggle-group:has-data-[icon=inline-end]:pe-1.5 group-data-[spacing=0]/toggle-group:has-data-[icon=inline-start]:ps-1.5 group-data-horizontal/toggle-group:data-[spacing=0]:first:rounded-s-lg group-data-vertical/toggle-group:data-[spacing=0]:first:rounded-t-lg group-data-horizontal/toggle-group:data-[spacing=0]:last:rounded-e-lg group-data-vertical/toggle-group:data-[spacing=0]:last:rounded-b-lg group-data-horizontal/toggle-group:data-[spacing=0]:data-[variant=outline]:border-s-0 group-data-vertical/toggle-group:data-[spacing=0]:data-[variant=outline]:border-t-0 group-data-horizontal/toggle-group:data-[spacing=0]:data-[variant=outline]:first:border-s group-data-vertical/toggle-group:data-[spacing=0]:data-[variant=outline]:first:border-t", c({
159
- variant: o.variant || r,
160
- size: o.size || i
161
- }), t),
162
- ...a,
163
- children: n
164
- });
165
- }
166
- //#endregion
167
- export { M as n, j as t };