@definable/ui 0.1.13 → 0.1.15

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 (300) hide show
  1. package/README.md +0 -7
  2. package/dist/components/alert-dialog.js +55 -2
  3. package/dist/components/alert.js +63 -2
  4. package/dist/components/avatar.js +41 -2
  5. package/dist/components/badge.js +26 -2
  6. package/dist/components/button.d.ts +2 -2
  7. package/dist/components/button.js +49 -2
  8. package/dist/components/calendar.js +86 -2
  9. package/dist/components/card.js +61 -2
  10. package/dist/components/carousel.js +100 -2
  11. package/dist/components/checkbox.js +31 -2
  12. package/dist/components/collapse.js +49 -2
  13. package/dist/components/command-menu.js +89 -2
  14. package/dist/components/command.js +115 -2
  15. package/dist/components/confirmation-modal.js +44 -2
  16. package/dist/components/context-menu.js +185 -2
  17. package/dist/components/dialog.js +121 -2
  18. package/dist/components/dropdown-menu.js +48 -2
  19. package/dist/components/dropzone.js +44 -2
  20. package/dist/components/image-cropper-modal.js +250 -2
  21. package/dist/components/image-cropper.js +130 -2
  22. package/dist/components/input.js +21 -2
  23. package/dist/components/label.js +19 -2
  24. package/dist/components/loader.js +69 -2
  25. package/dist/components/loading-placeholder.js +24 -2
  26. package/dist/components/mention.js +153 -2
  27. package/dist/components/modal.js +135 -2
  28. package/dist/components/notification.js +25 -2
  29. package/dist/components/popover.js +23 -2
  30. package/dist/components/progress.js +34 -2
  31. package/dist/components/radio-group.js +47 -2
  32. package/dist/components/scroll-area.js +46 -2
  33. package/dist/components/select.js +130 -2
  34. package/dist/components/selection-bar.js +53 -2
  35. package/dist/components/separator.js +24 -2
  36. package/dist/components/sheet.js +128 -2
  37. package/dist/components/skeleton.js +17 -2
  38. package/dist/components/slider.js +32 -2
  39. package/dist/components/stepper/index.d.ts +4 -0
  40. package/dist/components/stepper/step-layout.d.ts +8 -0
  41. package/dist/components/stepper/stepper-modal.d.ts +26 -0
  42. package/dist/components/stepper/stepper.d.ts +7 -0
  43. package/dist/components/stepper/types.d.ts +6 -0
  44. package/dist/components/stepper.js +6 -2
  45. package/dist/components/switch.js +35 -2
  46. package/dist/components/table-empty.js +22 -2
  47. package/dist/components/table-mobile.js +91 -2
  48. package/dist/components/table.js +156 -2
  49. package/dist/components/tabs.js +46 -2
  50. package/dist/components/terminal.js +49 -2
  51. package/dist/components/textarea.js +20 -2
  52. package/dist/components/tooltip.js +75 -2
  53. package/dist/components/use-toast.js +64 -2
  54. package/dist/icons/icons.d.ts +8 -0
  55. package/dist/icons/index.d.ts +1 -0
  56. package/dist/icons/providers/anthropic.d.ts +2 -0
  57. package/dist/icons/providers/claude.d.ts +2 -0
  58. package/dist/icons/providers/deepseek.d.ts +2 -0
  59. package/dist/icons/providers/gemini.d.ts +2 -0
  60. package/dist/icons/providers/grok.d.ts +2 -0
  61. package/dist/icons/providers/index.d.ts +6 -0
  62. package/dist/icons/providers/openai.d.ts +2 -0
  63. package/dist/icons/providers/types.d.ts +4 -0
  64. package/dist/index.d.ts +48 -962
  65. package/dist/index.js +444 -2
  66. package/dist/lib/icons.d.ts +14 -0
  67. package/dist/lib/index.d.ts +2 -0
  68. package/dist/lib/utils.js +8 -2
  69. package/dist/{stepper-modal-SYU9mbXs.js → stepper-modal-JXpOXOV2.js} +90 -91
  70. package/dist/styles.css +1 -1
  71. package/package.json +180 -134
  72. package/dist/MonacoEditor-COZcVMEj.cjs +0 -8
  73. package/dist/MonacoEditor-COZcVMEj.cjs.map +0 -1
  74. package/dist/MonacoEditor-D3QSSKa4.js +0 -295
  75. package/dist/MonacoEditor-D3QSSKa4.js.map +0 -1
  76. package/dist/alert-dialog.d.ts +0 -18
  77. package/dist/alert.d.ts +0 -25
  78. package/dist/avatar.d.ts +0 -9
  79. package/dist/badge.d.ts +0 -15
  80. package/dist/button.d.ts +0 -16
  81. package/dist/calendar.d.ts +0 -21
  82. package/dist/card.d.ts +0 -15
  83. package/dist/carousel.d.ts +0 -18
  84. package/dist/charts.d.ts +0 -26
  85. package/dist/checkbox.d.ts +0 -6
  86. package/dist/collapse.d.ts +0 -15
  87. package/dist/command-menu.d.ts +0 -12
  88. package/dist/command.d.ts +0 -89
  89. package/dist/components/alert-dialog.esm.js +0 -59
  90. package/dist/components/alert-dialog.esm.js.map +0 -1
  91. package/dist/components/alert-dialog.js.map +0 -1
  92. package/dist/components/alert.esm.js +0 -64
  93. package/dist/components/alert.esm.js.map +0 -1
  94. package/dist/components/alert.js.map +0 -1
  95. package/dist/components/avatar.esm.js +0 -42
  96. package/dist/components/avatar.esm.js.map +0 -1
  97. package/dist/components/avatar.js.map +0 -1
  98. package/dist/components/badge.esm.js +0 -27
  99. package/dist/components/badge.esm.js.map +0 -1
  100. package/dist/components/badge.js.map +0 -1
  101. package/dist/components/button.esm.js +0 -48
  102. package/dist/components/button.esm.js.map +0 -1
  103. package/dist/components/button.js.map +0 -1
  104. package/dist/components/calendar.esm.js +0 -5562
  105. package/dist/components/calendar.esm.js.map +0 -1
  106. package/dist/components/calendar.js.map +0 -1
  107. package/dist/components/card.esm.js +0 -62
  108. package/dist/components/card.esm.js.map +0 -1
  109. package/dist/components/card.js.map +0 -1
  110. package/dist/components/carousel.esm.js +0 -101
  111. package/dist/components/carousel.esm.js.map +0 -1
  112. package/dist/components/carousel.js.map +0 -1
  113. package/dist/components/charts.d.ts +0 -17
  114. package/dist/components/charts.esm.js +0 -48
  115. package/dist/components/charts.esm.js.map +0 -1
  116. package/dist/components/charts.js +0 -2
  117. package/dist/components/charts.js.map +0 -1
  118. package/dist/components/checkbox.esm.js +0 -32
  119. package/dist/components/checkbox.esm.js.map +0 -1
  120. package/dist/components/checkbox.js.map +0 -1
  121. package/dist/components/collapse.esm.js +0 -50
  122. package/dist/components/collapse.esm.js.map +0 -1
  123. package/dist/components/collapse.js.map +0 -1
  124. package/dist/components/command-menu.esm.js +0 -90
  125. package/dist/components/command-menu.esm.js.map +0 -1
  126. package/dist/components/command-menu.js.map +0 -1
  127. package/dist/components/command.esm.js +0 -425
  128. package/dist/components/command.esm.js.map +0 -1
  129. package/dist/components/command.js.map +0 -1
  130. package/dist/components/confirmation-modal.esm.js +0 -46
  131. package/dist/components/confirmation-modal.esm.js.map +0 -1
  132. package/dist/components/confirmation-modal.js.map +0 -1
  133. package/dist/components/context-menu.esm.js +0 -186
  134. package/dist/components/context-menu.esm.js.map +0 -1
  135. package/dist/components/context-menu.js.map +0 -1
  136. package/dist/components/dialog.esm.js +0 -122
  137. package/dist/components/dialog.esm.js.map +0 -1
  138. package/dist/components/dialog.js.map +0 -1
  139. package/dist/components/dropdown-menu.esm.js +0 -49
  140. package/dist/components/dropdown-menu.esm.js.map +0 -1
  141. package/dist/components/dropdown-menu.js.map +0 -1
  142. package/dist/components/dropzone.esm.js +0 -45
  143. package/dist/components/dropzone.esm.js.map +0 -1
  144. package/dist/components/dropzone.js.map +0 -1
  145. package/dist/components/image-cropper-modal.esm.js +0 -251
  146. package/dist/components/image-cropper-modal.esm.js.map +0 -1
  147. package/dist/components/image-cropper-modal.js.map +0 -1
  148. package/dist/components/image-cropper.esm.js +0 -131
  149. package/dist/components/image-cropper.esm.js.map +0 -1
  150. package/dist/components/image-cropper.js.map +0 -1
  151. package/dist/components/input.esm.js +0 -22
  152. package/dist/components/input.esm.js.map +0 -1
  153. package/dist/components/input.js.map +0 -1
  154. package/dist/components/label.esm.js +0 -20
  155. package/dist/components/label.esm.js.map +0 -1
  156. package/dist/components/label.js.map +0 -1
  157. package/dist/components/loader.esm.js +0 -70
  158. package/dist/components/loader.esm.js.map +0 -1
  159. package/dist/components/loader.js.map +0 -1
  160. package/dist/components/loading-placeholder.esm.js +0 -25
  161. package/dist/components/loading-placeholder.esm.js.map +0 -1
  162. package/dist/components/loading-placeholder.js.map +0 -1
  163. package/dist/components/markdown.d.ts +0 -2
  164. package/dist/components/markdown.esm.js +0 -12066
  165. package/dist/components/markdown.esm.js.map +0 -1
  166. package/dist/components/markdown.js +0 -18
  167. package/dist/components/markdown.js.map +0 -1
  168. package/dist/components/mention.esm.js +0 -154
  169. package/dist/components/mention.esm.js.map +0 -1
  170. package/dist/components/mention.js.map +0 -1
  171. package/dist/components/modal.esm.js +0 -136
  172. package/dist/components/modal.esm.js.map +0 -1
  173. package/dist/components/modal.js.map +0 -1
  174. package/dist/components/monaco-editor.d.ts +0 -2
  175. package/dist/components/monaco-editor.esm.js +0 -9
  176. package/dist/components/monaco-editor.esm.js.map +0 -1
  177. package/dist/components/monaco-editor.js +0 -2
  178. package/dist/components/monaco-editor.js.map +0 -1
  179. package/dist/components/notification.esm.js +0 -26
  180. package/dist/components/notification.esm.js.map +0 -1
  181. package/dist/components/notification.js.map +0 -1
  182. package/dist/components/popover.esm.js +0 -24
  183. package/dist/components/popover.esm.js.map +0 -1
  184. package/dist/components/popover.js.map +0 -1
  185. package/dist/components/progress.esm.js +0 -35
  186. package/dist/components/progress.esm.js.map +0 -1
  187. package/dist/components/progress.js.map +0 -1
  188. package/dist/components/radio-group.esm.js +0 -48
  189. package/dist/components/radio-group.esm.js.map +0 -1
  190. package/dist/components/radio-group.js.map +0 -1
  191. package/dist/components/scroll-area.esm.js +0 -47
  192. package/dist/components/scroll-area.esm.js.map +0 -1
  193. package/dist/components/scroll-area.js.map +0 -1
  194. package/dist/components/select.esm.js +0 -131
  195. package/dist/components/select.esm.js.map +0 -1
  196. package/dist/components/select.js.map +0 -1
  197. package/dist/components/selection-bar.esm.js +0 -54
  198. package/dist/components/selection-bar.esm.js.map +0 -1
  199. package/dist/components/selection-bar.js.map +0 -1
  200. package/dist/components/separator.esm.js +0 -25
  201. package/dist/components/separator.esm.js.map +0 -1
  202. package/dist/components/separator.js.map +0 -1
  203. package/dist/components/sheet.esm.js +0 -129
  204. package/dist/components/sheet.esm.js.map +0 -1
  205. package/dist/components/sheet.js.map +0 -1
  206. package/dist/components/skeleton.esm.js +0 -18
  207. package/dist/components/skeleton.esm.js.map +0 -1
  208. package/dist/components/skeleton.js.map +0 -1
  209. package/dist/components/slider.esm.js +0 -33
  210. package/dist/components/slider.esm.js.map +0 -1
  211. package/dist/components/slider.js.map +0 -1
  212. package/dist/components/stepper.d.ts +0 -2
  213. package/dist/components/stepper.esm.js +0 -7
  214. package/dist/components/stepper.esm.js.map +0 -1
  215. package/dist/components/stepper.js.map +0 -1
  216. package/dist/components/switch.esm.js +0 -36
  217. package/dist/components/switch.esm.js.map +0 -1
  218. package/dist/components/switch.js.map +0 -1
  219. package/dist/components/table-empty.esm.js +0 -23
  220. package/dist/components/table-empty.esm.js.map +0 -1
  221. package/dist/components/table-empty.js.map +0 -1
  222. package/dist/components/table-mobile.esm.js +0 -92
  223. package/dist/components/table-mobile.esm.js.map +0 -1
  224. package/dist/components/table-mobile.js.map +0 -1
  225. package/dist/components/table.esm.js +0 -157
  226. package/dist/components/table.esm.js.map +0 -1
  227. package/dist/components/table.js.map +0 -1
  228. package/dist/components/tabs.esm.js +0 -47
  229. package/dist/components/tabs.esm.js.map +0 -1
  230. package/dist/components/tabs.js.map +0 -1
  231. package/dist/components/terminal.esm.js +0 -50
  232. package/dist/components/terminal.esm.js.map +0 -1
  233. package/dist/components/terminal.js.map +0 -1
  234. package/dist/components/textarea.esm.js +0 -21
  235. package/dist/components/textarea.esm.js.map +0 -1
  236. package/dist/components/textarea.js.map +0 -1
  237. package/dist/components/tooltip.esm.js +0 -76
  238. package/dist/components/tooltip.esm.js.map +0 -1
  239. package/dist/components/tooltip.js.map +0 -1
  240. package/dist/components/use-toast.esm.js +0 -65
  241. package/dist/components/use-toast.esm.js.map +0 -1
  242. package/dist/components/use-toast.js.map +0 -1
  243. package/dist/confirmation-modal.d.ts +0 -16
  244. package/dist/context-menu.d.ts +0 -41
  245. package/dist/dialog.d.ts +0 -33
  246. package/dist/dropdown-menu.d.ts +0 -16
  247. package/dist/dropzone.d.ts +0 -16
  248. package/dist/image-cropper-modal.d.ts +0 -14
  249. package/dist/image-cropper.d.ts +0 -15
  250. package/dist/index-DACAHwoB.js +0 -35
  251. package/dist/index-DACAHwoB.js.map +0 -1
  252. package/dist/index-Deooizx8.cjs +0 -2
  253. package/dist/index-Deooizx8.cjs.map +0 -1
  254. package/dist/index.esm.js +0 -458
  255. package/dist/index.esm.js.map +0 -1
  256. package/dist/index.js.map +0 -1
  257. package/dist/input.d.ts +0 -8
  258. package/dist/jsx-runtime-BYECrxsp.cjs +0 -31
  259. package/dist/jsx-runtime-BYECrxsp.cjs.map +0 -1
  260. package/dist/jsx-runtime-DGlMoOmv.js +0 -631
  261. package/dist/jsx-runtime-DGlMoOmv.js.map +0 -1
  262. package/dist/label.d.ts +0 -6
  263. package/dist/lib/utils.esm.js +0 -5
  264. package/dist/lib/utils.esm.js.map +0 -1
  265. package/dist/lib/utils.js.map +0 -1
  266. package/dist/loader.d.ts +0 -14
  267. package/dist/loading-placeholder.d.ts +0 -12
  268. package/dist/markdown.d.ts +0 -122
  269. package/dist/mention.d.ts +0 -29
  270. package/dist/modal.d.ts +0 -28
  271. package/dist/monaco-editor.d.ts +0 -76
  272. package/dist/notification.d.ts +0 -9
  273. package/dist/popover.d.ts +0 -10
  274. package/dist/progress.d.ts +0 -6
  275. package/dist/radio-group.d.ts +0 -8
  276. package/dist/scroll-area.d.ts +0 -8
  277. package/dist/select.d.ts +0 -31
  278. package/dist/selection-bar.d.ts +0 -15
  279. package/dist/separator.d.ts +0 -6
  280. package/dist/sheet.d.ts +0 -17
  281. package/dist/skeleton.d.ts +0 -5
  282. package/dist/slider.d.ts +0 -6
  283. package/dist/stepper-modal-CPlBpxWy.cjs +0 -2
  284. package/dist/stepper-modal-CPlBpxWy.cjs.map +0 -1
  285. package/dist/stepper-modal-SYU9mbXs.js.map +0 -1
  286. package/dist/stepper.d.ts +0 -75
  287. package/dist/switch.d.ts +0 -6
  288. package/dist/table-empty.d.ts +0 -13
  289. package/dist/table-mobile.d.ts +0 -37
  290. package/dist/table.d.ts +0 -37
  291. package/dist/tabs.d.ts +0 -12
  292. package/dist/terminal.d.ts +0 -47
  293. package/dist/textarea.d.ts +0 -8
  294. package/dist/tooltip.d.ts +0 -12
  295. package/dist/use-toast.d.ts +0 -28
  296. package/dist/utils-DSKoFOjv.cjs +0 -2
  297. package/dist/utils-DSKoFOjv.cjs.map +0 -1
  298. package/dist/utils-qaFjX9_3.js +0 -2279
  299. package/dist/utils-qaFjX9_3.js.map +0 -1
  300. package/dist/utils.d.ts +0 -5
@@ -1,2 +1,153 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("../jsx-runtime-BYECrxsp.cjs"),a=require("react"),l=require("react-mentions"),o=require("../utils-DSKoFOjv.cjs"),v=(e,n,i,s,r)=>t.jsxRuntimeExports.jsxs("div",{className:o.cn("flex items-center gap-2 p-2 text-sm",r?"bg-primary/10 text-primary":"bg-transparent"),children:[e.avatar&&t.jsxRuntimeExports.jsx("div",{className:"flex-shrink-0 h-6 w-6 rounded-full overflow-hidden",children:t.jsxRuntimeExports.jsx("img",{src:e.avatar,alt:e.display,className:"h-full w-full object-cover"})}),t.jsxRuntimeExports.jsxs("div",{className:"flex flex-col",children:[t.jsxRuntimeExports.jsx("span",{className:"font-medium",children:e.display}),e.subtitle&&t.jsxRuntimeExports.jsx("span",{className:"text-xs text-muted-foreground",children:e.subtitle})]})]}),y=(e,n)=>`@${n}`,d=a.forwardRef(({value:e,onChange:n,placeholder:i="Type @ to mention someone",data:s,disabled:r=!1,className:u,inputClassName:m,suggestionItemClassName:x,trigger:c="@",displayTransform:p=y,onKeyDown:g},h)=>{const f={control:{fontSize:14,fontWeight:"normal",lineHeight:"1.5",minHeight:"60px"},highlighter:{border:"0",boxSizing:"border-box",overflow:"hidden",minHeight:"60px"},input:{padding:"12px 12px",border:"0",overflow:"auto",fontSize:"14px",outline:"none",backgroundColor:"transparent",fontFamily:"inherit",lineHeight:"1.5",minHeight:"60px",margin:0},suggestions:{marginTop:"0px",list:{backgroundColor:"var(--suggestion-background, hsl(var(--background)))",border:"1px solid hsl(var(--border))",boxShadow:"0 4px 12px rgba(0, 0, 0, 0.1)",overflow:"hidden",zIndex:100,maxHeight:"250px",overflowY:"auto",color:"hsl(var(--foreground))",minWidth:"280px",width:"auto"},item:{padding:"0",borderBottom:"1px solid hsl(var(--border))"}}},b={mentions:{normal:{color:"inherit",fontWeight:"normal"},highlight:{color:"hsl(var(--primary))",fontWeight:"500",backgroundColor:"transparent",padding:"0",margin:"0",boxShadow:"none",borderRadius:"0",textDecoration:"none"}}};return a.useEffect(()=>{typeof window<"u"&&document.documentElement.style.setProperty("--suggestion-background","hsl(var(--background))")},[]),t.jsxRuntimeExports.jsx("div",{ref:h,className:o.cn("relative w-full",u),children:t.jsxRuntimeExports.jsx(l.MentionsInput,{value:e,onChange:n,style:{...f,...b},placeholder:i,disabled:r,a11ySuggestionsListLabel:"Suggested mentions",className:o.cn("w-full rounded-md bg-transparent text-sm placeholder:text-muted-foreground resize-none font-normal",m),suggestionsPortalHost:typeof document<"u"?document.body:void 0,allowSuggestionsAboveCursor:!0,onKeyDown:g,children:t.jsxRuntimeExports.jsx(l.Mention,{trigger:c,data:s,renderSuggestion:v,displayTransform:p,appendSpaceOnAdd:!0,className:o.cn("text-primary font-medium",x),markup:"@[__display__](__id__)"})})})});d.displayName="Mention";exports.Mention=d;
2
- //# sourceMappingURL=mention.js.map
1
+ import { jsx as o, jsxs as d } from "react/jsx-runtime";
2
+ import x, { forwardRef as b } from "react";
3
+ import { MentionsInput as v, Mention as y } from "react-mentions";
4
+ import { cn as n } from "../lib/utils.js";
5
+ const w = (e, t, i, a, r) => /* @__PURE__ */ d(
6
+ "div",
7
+ {
8
+ className: n(
9
+ "flex items-center gap-2 p-2 text-sm",
10
+ r ? "bg-primary/10 text-primary" : "bg-transparent"
11
+ ),
12
+ children: [
13
+ e.avatar && /* @__PURE__ */ o("div", { className: "flex-shrink-0 h-6 w-6 rounded-full overflow-hidden", children: /* @__PURE__ */ o(
14
+ "img",
15
+ {
16
+ src: e.avatar,
17
+ alt: e.display,
18
+ className: "h-full w-full object-cover"
19
+ }
20
+ ) }),
21
+ /* @__PURE__ */ d("div", { className: "flex flex-col", children: [
22
+ /* @__PURE__ */ o("span", { className: "font-medium", children: e.display }),
23
+ e.subtitle && /* @__PURE__ */ o("span", { className: "text-xs text-muted-foreground", children: e.subtitle })
24
+ ] })
25
+ ]
26
+ }
27
+ ), _ = (e, t) => `@${t}`, S = b(
28
+ ({
29
+ value: e,
30
+ onChange: t,
31
+ placeholder: i = "Type @ to mention someone",
32
+ data: a,
33
+ disabled: r = !1,
34
+ className: l,
35
+ inputClassName: s,
36
+ suggestionItemClassName: m,
37
+ trigger: p = "@",
38
+ displayTransform: u = _,
39
+ onKeyDown: c
40
+ }, g) => {
41
+ const h = {
42
+ control: {
43
+ fontSize: 14,
44
+ fontWeight: "normal",
45
+ lineHeight: "1.5",
46
+ minHeight: "60px"
47
+ },
48
+ highlighter: {
49
+ border: "0",
50
+ boxSizing: "border-box",
51
+ overflow: "hidden",
52
+ minHeight: "60px"
53
+ },
54
+ input: {
55
+ padding: "12px 12px",
56
+ border: "0",
57
+ overflow: "auto",
58
+ fontSize: "14px",
59
+ outline: "none",
60
+ backgroundColor: "transparent",
61
+ fontFamily: "inherit",
62
+ lineHeight: "1.5",
63
+ minHeight: "60px",
64
+ margin: 0
65
+ },
66
+ suggestions: {
67
+ marginTop: "0px",
68
+ list: {
69
+ backgroundColor: "var(--suggestion-background, hsl(var(--background)))",
70
+ border: "1px solid hsl(var(--border))",
71
+ boxShadow: "0 4px 12px rgba(0, 0, 0, 0.1)",
72
+ overflow: "hidden",
73
+ zIndex: 100,
74
+ maxHeight: "250px",
75
+ overflowY: "auto",
76
+ color: "hsl(var(--foreground))",
77
+ minWidth: "280px",
78
+ width: "auto"
79
+ },
80
+ item: {
81
+ padding: "0",
82
+ borderBottom: "1px solid hsl(var(--border))"
83
+ }
84
+ }
85
+ }, f = {
86
+ mentions: {
87
+ normal: {
88
+ color: "inherit",
89
+ fontWeight: "normal"
90
+ },
91
+ highlight: {
92
+ color: "hsl(var(--primary))",
93
+ fontWeight: "500",
94
+ backgroundColor: "transparent",
95
+ padding: "0",
96
+ margin: "0",
97
+ boxShadow: "none",
98
+ borderRadius: "0",
99
+ textDecoration: "none"
100
+ }
101
+ }
102
+ };
103
+ return x.useEffect(() => {
104
+ typeof window < "u" && document.documentElement.style.setProperty(
105
+ "--suggestion-background",
106
+ "hsl(var(--background))"
107
+ );
108
+ }, []), /* @__PURE__ */ o(
109
+ "div",
110
+ {
111
+ ref: g,
112
+ className: n("relative w-full", l),
113
+ children: /* @__PURE__ */ o(
114
+ v,
115
+ {
116
+ value: e,
117
+ onChange: t,
118
+ style: { ...h, ...f },
119
+ placeholder: i,
120
+ disabled: r,
121
+ a11ySuggestionsListLabel: "Suggested mentions",
122
+ className: n(
123
+ "w-full rounded-md bg-transparent text-sm placeholder:text-muted-foreground resize-none font-normal",
124
+ s
125
+ ),
126
+ suggestionsPortalHost: typeof document < "u" ? document.body : void 0,
127
+ allowSuggestionsAboveCursor: !0,
128
+ onKeyDown: c,
129
+ children: /* @__PURE__ */ o(
130
+ y,
131
+ {
132
+ trigger: p,
133
+ data: a,
134
+ renderSuggestion: w,
135
+ displayTransform: u,
136
+ appendSpaceOnAdd: !0,
137
+ className: n(
138
+ "text-primary font-medium",
139
+ m
140
+ ),
141
+ markup: "@[__display__](__id__)"
142
+ }
143
+ )
144
+ }
145
+ )
146
+ }
147
+ );
148
+ }
149
+ );
150
+ S.displayName = "Mention";
151
+ export {
152
+ S as Mention
153
+ };
@@ -1,2 +1,135 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../jsx-runtime-BYECrxsp.cjs"),W=require("react-dom"),m=require("framer-motion"),q=require("lucide-react"),x=require("../utils-DSKoFOjv.cjs"),p=require("react"),M=require("./sheet.js"),z=t=>{switch(t){case"sm":return{width:"100%",maxWidth:"384px"};case"md":return{width:"100%",maxWidth:"448px"};case"lg":return{width:"100%",maxWidth:"512px"};case"xl":return{width:"100%",maxWidth:"70%"};case"2xl":return{width:"80%",maxWidth:"1200px"};case"3xl":return{width:"90%",maxWidth:"1600px"};case"full":return{width:"100%"};default:return{width:"100%",maxWidth:"448px"}}};function P({isOpen:t,onClose:d,title:s,description:r,icon:n,children:j,footer:i,size:f="md",showClose:E=!0,className:h,isContentScrollable:b=!0,mainClassName:g,contentClassName:R,header:a,headerClassName:v,zIndexClassName:w="z-[50]",mobileSheet:c}){if(c!=null&&c.enable&&t&&window.innerWidth<768){const{position:o}=c,N=a||(s||r||n?e.jsxRuntimeExports.jsxs("div",{className:"flex items-center gap-3",children:[n&&e.jsxRuntimeExports.jsx("div",{className:"h-8 w-8 rounded-lg flex items-center justify-center",children:n}),e.jsxRuntimeExports.jsxs("div",{children:[s&&e.jsxRuntimeExports.jsx("h2",{className:"text-sm font-medium",children:s}),r&&e.jsxRuntimeExports.jsx("p",{className:"text-sm text-muted-foreground",children:r})]})]}):void 0),k=e.jsxRuntimeExports.jsx("div",{className:"flex gap-2 justify-end",children:i});return e.jsxRuntimeExports.jsx(M.Sheet,{isOpen:t,onClose:d,header:N,footer:k,className:x.cn(h,"w-full max-w-full"),position:o||"bottom",headerClassName:x.cn(v,"w-full max-w-full"),enableFullscreen:!1,children:j})}const u=p.useCallback(o=>{o.key==="Escape"&&t&&d()},[t,d]);p.useEffect(()=>(document.addEventListener("keydown",u),()=>document.removeEventListener("keydown",u)),[u]);const l=s||r||n||a,y=e.jsxRuntimeExports.jsx(m.AnimatePresence,{children:t&&e.jsxRuntimeExports.jsx("div",{className:x.cn("fixed inset-0 z-50 overflow-hidden",w),children:e.jsxRuntimeExports.jsxs("div",{className:x.cn("min-h-full flex items-center justify-center p-4",g),children:[e.jsxRuntimeExports.jsx(m.motion.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},className:"fixed inset-0 bg-background/80 backdrop-blur-sm",onClick:d}),e.jsxRuntimeExports.jsxs(m.motion.div,{initial:{opacity:0,scale:.95},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.95},transition:{duration:.1,ease:"easeOut"},className:x.cn("relative transform rounded-lg bg-background shadow-xl border border-border/50 flex flex-col max-h-[85vh] overflow-hidden",h),style:z(f),children:[l&&e.jsxRuntimeExports.jsxs("div",{className:"flex-shrink-0 rounded-t-lg bg-card flex items-center justify-between p-2 border-b border-border/50",children:[a||e.jsxRuntimeExports.jsxs("div",{className:"flex items-center gap-3",children:[n&&e.jsxRuntimeExports.jsx("div",{className:"h-8 w-8 rounded-lg flex items-center justify-center",children:n}),e.jsxRuntimeExports.jsxs("div",{children:[s&&e.jsxRuntimeExports.jsx("h2",{className:"text-sm font-small",children:s}),r&&e.jsxRuntimeExports.jsx("p",{className:"text-sm text-muted-foreground",children:r})]})]}),E&&e.jsxRuntimeExports.jsx("button",{onClick:d,className:"p-1.5 rounded-md hover:bg-muted text-muted-foreground",children:e.jsxRuntimeExports.jsxs("div",{className:"flex justify-center items-center",children:[e.jsxRuntimeExports.jsx(q.X,{className:"h-4 w-4"}),e.jsxRuntimeExports.jsx("kbd",{className:"ml-2 text-[10px] text-muted-foreground bg-muted px-1.5 py-0.5 rounded",children:"ESC"})]})})]}),e.jsxRuntimeExports.jsx("div",{className:x.cn("flex-1 min-h-0",b?"overflow-y-auto":"",!i&&!l?"rounded-lg":"",!i&&l?"rounded-b-lg":"",i&&!l?"rounded-t-lg":"",R),children:j}),i&&e.jsxRuntimeExports.jsx("div",{className:"flex-shrink-0 flex items-center justify-end gap-2 px-4 py-3 border-t border-border/50 bg-card rounded-b-lg",children:i})]})]})})});return W.createPortal(y,document.body)}exports.Modal=P;
2
- //# sourceMappingURL=modal.js.map
1
+ import { jsx as e, jsxs as t } from "react/jsx-runtime";
2
+ import { createPortal as W } from "react-dom";
3
+ import { AnimatePresence as E, motion as p } from "framer-motion";
4
+ import { X as z } from "lucide-react";
5
+ import { cn as l } from "../lib/utils.js";
6
+ import { useCallback as F, useEffect as H } from "react";
7
+ import { Sheet as L } from "./sheet.js";
8
+ const P = (r) => {
9
+ switch (r) {
10
+ case "sm":
11
+ return { width: "100%", maxWidth: "384px" };
12
+ case "md":
13
+ return { width: "100%", maxWidth: "448px" };
14
+ case "lg":
15
+ return { width: "100%", maxWidth: "512px" };
16
+ case "xl":
17
+ return { width: "100%", maxWidth: "70%" };
18
+ case "2xl":
19
+ return { width: "80%", maxWidth: "1200px" };
20
+ case "3xl":
21
+ return { width: "90%", maxWidth: "1600px" };
22
+ case "full":
23
+ return { width: "100%" };
24
+ default:
25
+ return { width: "100%", maxWidth: "448px" };
26
+ }
27
+ };
28
+ function I({
29
+ isOpen: r,
30
+ onClose: i,
31
+ title: d,
32
+ description: a,
33
+ icon: n,
34
+ children: h,
35
+ footer: s,
36
+ size: g = "md",
37
+ showClose: w = !0,
38
+ className: f,
39
+ isContentScrollable: b = !0,
40
+ mainClassName: v,
41
+ contentClassName: y,
42
+ header: c,
43
+ headerClassName: N,
44
+ zIndexClassName: k = "z-[50]",
45
+ mobileSheet: m
46
+ }) {
47
+ if (m != null && m.enable && r && window.innerWidth < 768) {
48
+ const { position: x } = m;
49
+ return /* @__PURE__ */ e(
50
+ L,
51
+ {
52
+ isOpen: r,
53
+ onClose: i,
54
+ header: c || (d || a || n ? /* @__PURE__ */ t("div", { className: "flex items-center gap-3", children: [
55
+ n && /* @__PURE__ */ e("div", { className: "h-8 w-8 rounded-lg flex items-center justify-center", children: n }),
56
+ /* @__PURE__ */ t("div", { children: [
57
+ d && /* @__PURE__ */ e("h2", { className: "text-sm font-medium", children: d }),
58
+ a && /* @__PURE__ */ e("p", { className: "text-sm text-muted-foreground", children: a })
59
+ ] })
60
+ ] }) : void 0),
61
+ footer: /* @__PURE__ */ e("div", { className: "flex gap-2 justify-end", children: s }),
62
+ className: l(f, "w-full max-w-full"),
63
+ position: x || "bottom",
64
+ headerClassName: l(N, "w-full max-w-full"),
65
+ enableFullscreen: !1,
66
+ children: h
67
+ }
68
+ );
69
+ }
70
+ const u = F((x) => {
71
+ x.key === "Escape" && r && i();
72
+ }, [r, i]);
73
+ H(() => (document.addEventListener("keydown", u), () => document.removeEventListener("keydown", u)), [u]);
74
+ const o = d || a || n || c, j = /* @__PURE__ */ e(E, { children: r && /* @__PURE__ */ e("div", { className: l("fixed inset-0 z-50 overflow-hidden", k), children: /* @__PURE__ */ t("div", { className: l("min-h-full flex items-center justify-center p-4", v), children: [
75
+ /* @__PURE__ */ e(
76
+ p.div,
77
+ {
78
+ initial: { opacity: 0 },
79
+ animate: { opacity: 1 },
80
+ exit: { opacity: 0 },
81
+ className: "fixed inset-0 bg-background/80 backdrop-blur-sm",
82
+ onClick: i
83
+ }
84
+ ),
85
+ /* @__PURE__ */ t(
86
+ p.div,
87
+ {
88
+ initial: { opacity: 0, scale: 0.95 },
89
+ animate: { opacity: 1, scale: 1 },
90
+ exit: { opacity: 0, scale: 0.95 },
91
+ transition: { duration: 0.1, ease: "easeOut" },
92
+ className: l(
93
+ "relative transform rounded-lg bg-background shadow-xl border border-border/50 flex flex-col max-h-[85vh] overflow-hidden",
94
+ f
95
+ ),
96
+ style: P(g),
97
+ children: [
98
+ o && /* @__PURE__ */ t("div", { className: "flex-shrink-0 rounded-t-lg bg-card flex items-center justify-between p-2 border-b border-border/50", children: [
99
+ c || /* @__PURE__ */ t("div", { className: "flex items-center gap-3", children: [
100
+ n && /* @__PURE__ */ e("div", { className: "h-8 w-8 rounded-lg flex items-center justify-center", children: n }),
101
+ /* @__PURE__ */ t("div", { children: [
102
+ d && /* @__PURE__ */ e("h2", { className: "text-sm font-small", children: d }),
103
+ a && /* @__PURE__ */ e("p", { className: "text-sm text-muted-foreground", children: a })
104
+ ] })
105
+ ] }),
106
+ w && /* @__PURE__ */ e(
107
+ "button",
108
+ {
109
+ onClick: i,
110
+ className: "p-1.5 rounded-md hover:bg-muted text-muted-foreground",
111
+ children: /* @__PURE__ */ t("div", { className: "flex justify-center items-center", children: [
112
+ /* @__PURE__ */ e(z, { className: "h-4 w-4" }),
113
+ /* @__PURE__ */ e("kbd", { className: "ml-2 text-[10px] text-muted-foreground bg-muted px-1.5 py-0.5 rounded", children: "ESC" })
114
+ ] })
115
+ }
116
+ )
117
+ ] }),
118
+ /* @__PURE__ */ e("div", { className: l(
119
+ "flex-1 min-h-0",
120
+ b ? "overflow-y-auto" : "",
121
+ !s && !o ? "rounded-lg" : "",
122
+ !s && o ? "rounded-b-lg" : "",
123
+ s && !o ? "rounded-t-lg" : "",
124
+ y
125
+ ), children: h }),
126
+ s && /* @__PURE__ */ e("div", { className: "flex-shrink-0 flex items-center justify-end gap-2 px-4 py-3 border-t border-border/50 bg-card rounded-b-lg", children: s })
127
+ ]
128
+ }
129
+ )
130
+ ] }) }) });
131
+ return W(j, document.body);
132
+ }
133
+ export {
134
+ I as Modal
135
+ };
@@ -1,2 +1,25 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("../jsx-runtime-BYECrxsp.cjs"),e=require("sonner");function s({isDark:t}={isDark:!1}){return o.jsxRuntimeExports.jsx(e.Toaster,{position:"top-right",expand:!1,richColors:!0,closeButton:!0,theme:t?"dark":"light",toastOptions:{style:{background:t?"hsl(0 0% 10%)":"hsl(0 0% 100%)",color:t?"hsl(0 0% 98%)":"hsl(0 0% 10%)",border:t?"1px solid hsl(0 0% 15%)":"1px solid hsl(0 0% 90%)"},className:t?"dark":"light"}})}exports.NotificationContainer=s;
2
- //# sourceMappingURL=notification.js.map
1
+ import { jsx as t } from "react/jsx-runtime";
2
+ import { Toaster as l } from "sonner";
3
+ function e({ isDark: o } = { isDark: !1 }) {
4
+ return /* @__PURE__ */ t(
5
+ l,
6
+ {
7
+ position: "top-right",
8
+ expand: !1,
9
+ richColors: !0,
10
+ closeButton: !0,
11
+ theme: o ? "dark" : "light",
12
+ toastOptions: {
13
+ style: {
14
+ background: o ? "hsl(0 0% 10%)" : "hsl(0 0% 100%)",
15
+ color: o ? "hsl(0 0% 98%)" : "hsl(0 0% 10%)",
16
+ border: o ? "1px solid hsl(0 0% 15%)" : "1px solid hsl(0 0% 90%)"
17
+ },
18
+ className: o ? "dark" : "light"
19
+ }
20
+ }
21
+ );
22
+ }
23
+ export {
24
+ e as NotificationContainer
25
+ };
@@ -1,2 +1,23 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("../jsx-runtime-BYECrxsp.cjs"),c=require("react"),p=require("@radix-ui/react-popover"),l=require("../utils-DSKoFOjv.cjs");function i(e){const o=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const a=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(o,t,a.get?a:{enumerable:!0,get:()=>e[t]})}}return o.default=e,Object.freeze(o)}const u=i(c),r=i(p),m=r.Root,f=r.Trigger,s=u.forwardRef(({className:e,align:o="center",sideOffset:t=4,...a},d)=>n.jsxRuntimeExports.jsx(r.Portal,{children:n.jsxRuntimeExports.jsx(r.Content,{ref:d,align:o,sideOffset:t,className:l.cn("z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...a})}));s.displayName=r.Content.displayName;exports.Popover=m;exports.PopoverContent=s;exports.PopoverTrigger=f;
2
- //# sourceMappingURL=popover.js.map
1
+ import { jsx as t } from "react/jsx-runtime";
2
+ import * as n from "react";
3
+ import * as o from "@radix-ui/react-popover";
4
+ import { cn as s } from "../lib/utils.js";
5
+ const l = o.Root, c = o.Trigger, m = n.forwardRef(({ className: e, align: a = "center", sideOffset: r = 4, ...d }, i) => /* @__PURE__ */ t(o.Portal, { children: /* @__PURE__ */ t(
6
+ o.Content,
7
+ {
8
+ ref: i,
9
+ align: a,
10
+ sideOffset: r,
11
+ className: s(
12
+ "z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
13
+ e
14
+ ),
15
+ ...d
16
+ }
17
+ ) }));
18
+ m.displayName = o.Content.displayName;
19
+ export {
20
+ l as Popover,
21
+ m as PopoverContent,
22
+ c as PopoverTrigger
23
+ };
@@ -1,2 +1,34 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("../jsx-runtime-BYECrxsp.cjs"),c=require("react"),l=require("@radix-ui/react-progress"),u=require("framer-motion"),m=require("../utils-DSKoFOjv.cjs");function o(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const s=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,s.get?s:{enumerable:!0,get:()=>e[r]})}}return t.default=e,Object.freeze(t)}const f=o(c),n=o(l),a=f.forwardRef(({className:e,value:t,...r},s)=>i.jsxRuntimeExports.jsx(n.Root,{ref:s,className:m.cn("relative h-2 w-full overflow-hidden rounded-full bg-muted",e),...r,children:i.jsxRuntimeExports.jsx(u.motion.div,{className:"h-full w-full bg-primary",initial:{x:"-100%"},animate:{x:`${t?t-100:-100}%`},transition:{type:"spring",stiffness:100,damping:30,mass:.5}})}));a.displayName=n.Root.displayName;exports.Progress=a;
2
- //# sourceMappingURL=progress.js.map
1
+ import { jsx as i } from "react/jsx-runtime";
2
+ import * as a from "react";
3
+ import * as o from "@radix-ui/react-progress";
4
+ import { motion as e } from "framer-motion";
5
+ import { cn as l } from "../lib/utils.js";
6
+ const f = a.forwardRef(({ className: m, value: r, ...s }, t) => /* @__PURE__ */ i(
7
+ o.Root,
8
+ {
9
+ ref: t,
10
+ className: l(
11
+ "relative h-2 w-full overflow-hidden rounded-full bg-muted",
12
+ m
13
+ ),
14
+ ...s,
15
+ children: /* @__PURE__ */ i(
16
+ e.div,
17
+ {
18
+ className: "h-full w-full bg-primary",
19
+ initial: { x: "-100%" },
20
+ animate: { x: `${r ? r - 100 : -100}%` },
21
+ transition: {
22
+ type: "spring",
23
+ stiffness: 100,
24
+ damping: 30,
25
+ mass: 0.5
26
+ }
27
+ }
28
+ )
29
+ }
30
+ ));
31
+ f.displayName = o.Root.displayName;
32
+ export {
33
+ f as Progress
34
+ };
@@ -1,2 +1,47 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("../jsx-runtime-BYECrxsp.cjs"),m=require("react"),p=require("@radix-ui/react-radio-group"),a=require("../utils-DSKoFOjv.cjs"),f=require("lucide-react"),n=require("framer-motion");function c(e){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const o=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,o.get?o:{enumerable:!0,get:()=>e[t]})}}return r.default=e,Object.freeze(r)}const l=c(m),s=c(p),u=l.forwardRef(({className:e,...r},t)=>i.jsxRuntimeExports.jsx(s.Root,{className:a.cn("grid gap-2",e),...r,ref:t}));u.displayName=s.Root.displayName;const d=l.forwardRef(({className:e,...r},t)=>i.jsxRuntimeExports.jsx(n.motion.div,{whileHover:{scale:1.05},whileTap:{scale:.95},children:i.jsxRuntimeExports.jsx(s.Item,{ref:t,className:a.cn("aspect-square h-4 w-4 rounded-full border border-primary text-primary shadow focus:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",e),...r,children:i.jsxRuntimeExports.jsx(s.Indicator,{className:"flex items-center justify-center",children:i.jsxRuntimeExports.jsx(n.motion.div,{initial:{scale:0},animate:{scale:1},transition:{type:"spring",stiffness:300,damping:20},children:i.jsxRuntimeExports.jsx(f.Circle,{className:"h-2.5 w-2.5 fill-current text-current"})})})})}));d.displayName=s.Item.displayName;exports.RadioGroup=u;exports.RadioGroupItem=d;
2
- //# sourceMappingURL=radio-group.js.map
1
+ import { jsx as r } from "react/jsx-runtime";
2
+ import * as s from "react";
3
+ import * as e from "@radix-ui/react-radio-group";
4
+ import { cn as l } from "../lib/utils.js";
5
+ import { Circle as m } from "lucide-react";
6
+ import { motion as t } from "framer-motion";
7
+ const n = s.forwardRef(({ className: i, ...a }, o) => /* @__PURE__ */ r(
8
+ e.Root,
9
+ {
10
+ className: l("grid gap-2", i),
11
+ ...a,
12
+ ref: o
13
+ }
14
+ ));
15
+ n.displayName = e.Root.displayName;
16
+ const c = s.forwardRef(({ className: i, ...a }, o) => /* @__PURE__ */ r(
17
+ t.div,
18
+ {
19
+ whileHover: { scale: 1.05 },
20
+ whileTap: { scale: 0.95 },
21
+ children: /* @__PURE__ */ r(
22
+ e.Item,
23
+ {
24
+ ref: o,
25
+ className: l(
26
+ "aspect-square h-4 w-4 rounded-full border border-primary text-primary shadow focus:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",
27
+ i
28
+ ),
29
+ ...a,
30
+ children: /* @__PURE__ */ r(e.Indicator, { className: "flex items-center justify-center", children: /* @__PURE__ */ r(
31
+ t.div,
32
+ {
33
+ initial: { scale: 0 },
34
+ animate: { scale: 1 },
35
+ transition: { type: "spring", stiffness: 300, damping: 20 },
36
+ children: /* @__PURE__ */ r(m, { className: "h-2.5 w-2.5 fill-current text-current" })
37
+ }
38
+ ) })
39
+ }
40
+ )
41
+ }
42
+ ));
43
+ c.displayName = e.Item.displayName;
44
+ export {
45
+ n as RadioGroup,
46
+ c as RadioGroupItem
47
+ };
@@ -1,2 +1,46 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("../jsx-runtime-BYECrxsp.cjs"),d=require("react"),p=require("@radix-ui/react-scroll-area"),s=require("../utils-DSKoFOjv.cjs");function c(e){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const o=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,o.get?o:{enumerable:!0,get:()=>e[t]})}}return r.default=e,Object.freeze(r)}const i=c(d),l=c(p),u=i.forwardRef(({className:e,children:r,...t},o)=>a.jsxRuntimeExports.jsxs(l.Root,{ref:o,className:s.cn("relative overflow-hidden",e),...t,children:[a.jsxRuntimeExports.jsx(l.Viewport,{className:"h-full w-full rounded-[inherit]",children:r}),a.jsxRuntimeExports.jsx(n,{}),a.jsxRuntimeExports.jsx(l.Corner,{})]}));u.displayName=l.Root.displayName;const n=i.forwardRef(({className:e,orientation:r="vertical",...t},o)=>a.jsxRuntimeExports.jsx(l.ScrollAreaScrollbar,{ref:o,orientation:r,className:s.cn("flex touch-none select-none transition-colors",r==="vertical"&&"h-full w-1.5 border-l border-l-transparent p-[1px] hover:w-2",r==="horizontal"&&"h-1.5 flex-col border-t border-t-transparent p-[1px] hover:h-2",e),...t,children:a.jsxRuntimeExports.jsx(l.ScrollAreaThumb,{className:s.cn("relative flex-1 rounded-full bg-border/40 hover:bg-border/70 transition-all duration-150","data-[state=dragging]:bg-border/70")})}));n.displayName=l.ScrollAreaScrollbar.displayName;exports.ScrollArea=u;exports.ScrollBar=n;
2
- //# sourceMappingURL=scroll-area.js.map
1
+ import { jsxs as i, jsx as l } from "react/jsx-runtime";
2
+ import * as c from "react";
3
+ import * as r from "@radix-ui/react-scroll-area";
4
+ import { cn as s } from "../lib/utils.js";
5
+ const n = c.forwardRef(({ className: o, children: e, ...a }, t) => /* @__PURE__ */ i(
6
+ r.Root,
7
+ {
8
+ ref: t,
9
+ className: s("relative overflow-hidden", o),
10
+ ...a,
11
+ children: [
12
+ /* @__PURE__ */ l(r.Viewport, { className: "h-full w-full rounded-[inherit]", children: e }),
13
+ /* @__PURE__ */ l(d, {}),
14
+ /* @__PURE__ */ l(r.Corner, {})
15
+ ]
16
+ }
17
+ ));
18
+ n.displayName = r.Root.displayName;
19
+ const d = c.forwardRef(({ className: o, orientation: e = "vertical", ...a }, t) => /* @__PURE__ */ l(
20
+ r.ScrollAreaScrollbar,
21
+ {
22
+ ref: t,
23
+ orientation: e,
24
+ className: s(
25
+ "flex touch-none select-none transition-colors",
26
+ e === "vertical" && "h-full w-1.5 border-l border-l-transparent p-[1px] hover:w-2",
27
+ e === "horizontal" && "h-1.5 flex-col border-t border-t-transparent p-[1px] hover:h-2",
28
+ o
29
+ ),
30
+ ...a,
31
+ children: /* @__PURE__ */ l(
32
+ r.ScrollAreaThumb,
33
+ {
34
+ className: s(
35
+ "relative flex-1 rounded-full bg-border/40 hover:bg-border/70 transition-all duration-150",
36
+ "data-[state=dragging]:bg-border/70"
37
+ )
38
+ }
39
+ )
40
+ }
41
+ ));
42
+ d.displayName = r.ScrollAreaScrollbar.displayName;
43
+ export {
44
+ n as ScrollArea,
45
+ d as ScrollBar
46
+ };
@@ -1,2 +1,130 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../jsx-runtime-BYECrxsp.cjs"),C=require("react"),I=require("@radix-ui/react-select"),x=require("lucide-react"),i=require("../utils-DSKoFOjv.cjs"),V=require("./input.js");function g(a){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(a){for(const t in a)if(t!=="default"){const n=Object.getOwnPropertyDescriptor(a,t);Object.defineProperty(r,t,n.get?n:{enumerable:!0,get:()=>a[t]})}}return r.default=a,Object.freeze(r)}const o=g(C),s=g(I),j=s.Root,k=s.Group,P=s.Value,b=o.forwardRef(({className:a,children:r,...t},n)=>e.jsxRuntimeExports.jsxs(s.Trigger,{ref:n,className:i.cn("flex h-10 w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",a),...t,children:[r,e.jsxRuntimeExports.jsx(s.Icon,{asChild:!0,children:e.jsxRuntimeExports.jsx(x.ChevronDown,{className:"h-4 w-4 opacity-50"})})]}));b.displayName=s.Trigger.displayName;const f=o.forwardRef(({className:a,children:r,position:t="popper",searchable:n,onSearch:d,searchPlaceholder:u="Search...",...p},c)=>{const[w,N]=o.useState(""),m=o.useRef(null);o.useEffect(()=>{n&&m.current&&setTimeout(()=>{var l;(l=m.current)==null||l.focus()},50)},[n]);const v=l=>{N(l.target.value),d&&d(l.target.value)},h=l=>{l.stopPropagation()},E=l=>{l.stopPropagation()};return e.jsxRuntimeExports.jsx(s.Portal,{children:e.jsxRuntimeExports.jsxs(s.Content,{ref:c,className:i.cn("relative z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",t==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",a),position:t,...p,children:[n&&e.jsxRuntimeExports.jsx("div",{className:"px-2 py-1.5 sticky top-0 bg-popover z-10 border-b",onClick:h,children:e.jsxRuntimeExports.jsxs("div",{className:"relative",children:[e.jsxRuntimeExports.jsx(x.Search,{className:"absolute left-2 top-1/2 transform -translate-y-1/2 h-3.5 w-3.5 text-muted-foreground"}),e.jsxRuntimeExports.jsx(V.Input,{ref:m,value:w,onChange:v,onClick:h,onKeyDown:E,placeholder:u,className:"h-7 text-xs pl-7"})]})}),e.jsxRuntimeExports.jsx(s.Viewport,{className:i.cn("p-1",t==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:r})]})})});f.displayName=s.Content.displayName;const S=o.forwardRef(({className:a,...r},t)=>e.jsxRuntimeExports.jsx(s.Label,{ref:t,className:i.cn("py-1.5 pl-8 pr-2 text-sm font-semibold",a),...r}));S.displayName=s.Label.displayName;const y=o.forwardRef(({className:a,children:r,...t},n)=>e.jsxRuntimeExports.jsxs(s.Item,{ref:n,className:i.cn("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",a),...t,children:[e.jsxRuntimeExports.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:e.jsxRuntimeExports.jsx(s.ItemIndicator,{children:e.jsxRuntimeExports.jsx(x.Check,{className:"h-4 w-4"})})}),e.jsxRuntimeExports.jsx(s.ItemText,{children:r})]}));y.displayName=s.Item.displayName;const R=o.forwardRef(({children:a,searchPlaceholder:r,...t},n)=>{const[d,u]=o.useState(""),p=o.Children.map(a,c=>o.isValidElement(c)&&c.type===f?o.cloneElement(c,{searchable:!0,onSearch:u,searchPlaceholder:r}):c);return e.jsxRuntimeExports.jsx(j,{...t,children:p})});R.displayName="SearchableSelect";exports.SearchableSelect=R;exports.Select=j;exports.SelectContent=f;exports.SelectGroup=k;exports.SelectItem=y;exports.SelectLabel=S;exports.SelectTrigger=b;exports.SelectValue=P;
2
- //# sourceMappingURL=select.js.map
1
+ import { jsxs as c, jsx as t } from "react/jsx-runtime";
2
+ import * as a from "react";
3
+ import * as e from "@radix-ui/react-select";
4
+ import { ChevronDown as N, Search as S, Check as v } from "lucide-react";
5
+ import { cn as i } from "../lib/utils.js";
6
+ import { Input as C } from "./input.js";
7
+ const I = e.Root, E = e.Group, L = e.Value, R = a.forwardRef(({ className: o, children: s, ...r }, n) => /* @__PURE__ */ c(
8
+ e.Trigger,
9
+ {
10
+ ref: n,
11
+ className: i(
12
+ "flex h-10 w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",
13
+ o
14
+ ),
15
+ ...r,
16
+ children: [
17
+ s,
18
+ /* @__PURE__ */ t(e.Icon, { asChild: !0, children: /* @__PURE__ */ t(N, { className: "h-4 w-4 opacity-50" }) })
19
+ ]
20
+ }
21
+ ));
22
+ R.displayName = e.Trigger.displayName;
23
+ const g = a.forwardRef(({ className: o, children: s, position: r = "popper", searchable: n, onSearch: m, searchPlaceholder: p = "Search...", ...f }, d) => {
24
+ const [b, y] = a.useState(""), u = a.useRef(null);
25
+ a.useEffect(() => {
26
+ n && u.current && setTimeout(() => {
27
+ var l;
28
+ (l = u.current) == null || l.focus();
29
+ }, 50);
30
+ }, [n]);
31
+ const w = (l) => {
32
+ y(l.target.value), m && m(l.target.value);
33
+ }, h = (l) => {
34
+ l.stopPropagation();
35
+ }, x = (l) => {
36
+ l.stopPropagation();
37
+ };
38
+ return /* @__PURE__ */ t(e.Portal, { children: /* @__PURE__ */ c(
39
+ e.Content,
40
+ {
41
+ ref: d,
42
+ className: i(
43
+ "relative z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
44
+ r === "popper" && "data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",
45
+ o
46
+ ),
47
+ position: r,
48
+ ...f,
49
+ children: [
50
+ n && /* @__PURE__ */ t(
51
+ "div",
52
+ {
53
+ className: "px-2 py-1.5 sticky top-0 bg-popover z-10 border-b",
54
+ onClick: h,
55
+ children: /* @__PURE__ */ c("div", { className: "relative", children: [
56
+ /* @__PURE__ */ t(S, { className: "absolute left-2 top-1/2 transform -translate-y-1/2 h-3.5 w-3.5 text-muted-foreground" }),
57
+ /* @__PURE__ */ t(
58
+ C,
59
+ {
60
+ ref: u,
61
+ value: b,
62
+ onChange: w,
63
+ onClick: h,
64
+ onKeyDown: x,
65
+ placeholder: p,
66
+ className: "h-7 text-xs pl-7"
67
+ }
68
+ )
69
+ ] })
70
+ }
71
+ ),
72
+ /* @__PURE__ */ t(
73
+ e.Viewport,
74
+ {
75
+ className: i(
76
+ "p-1",
77
+ r === "popper" && "h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"
78
+ ),
79
+ children: s
80
+ }
81
+ )
82
+ ]
83
+ }
84
+ ) });
85
+ });
86
+ g.displayName = e.Content.displayName;
87
+ const V = a.forwardRef(({ className: o, ...s }, r) => /* @__PURE__ */ t(
88
+ e.Label,
89
+ {
90
+ ref: r,
91
+ className: i("py-1.5 pl-8 pr-2 text-sm font-semibold", o),
92
+ ...s
93
+ }
94
+ ));
95
+ V.displayName = e.Label.displayName;
96
+ const k = a.forwardRef(({ className: o, children: s, ...r }, n) => /* @__PURE__ */ c(
97
+ e.Item,
98
+ {
99
+ ref: n,
100
+ className: i(
101
+ "relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
102
+ o
103
+ ),
104
+ ...r,
105
+ children: [
106
+ /* @__PURE__ */ t("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ t(e.ItemIndicator, { children: /* @__PURE__ */ t(v, { className: "h-4 w-4" }) }) }),
107
+ /* @__PURE__ */ t(e.ItemText, { children: s })
108
+ ]
109
+ }
110
+ ));
111
+ k.displayName = e.Item.displayName;
112
+ const T = a.forwardRef(({ children: o, searchPlaceholder: s, ...r }, n) => {
113
+ const [m, p] = a.useState(""), f = a.Children.map(o, (d) => a.isValidElement(d) && d.type === g ? a.cloneElement(d, {
114
+ searchable: !0,
115
+ onSearch: p,
116
+ searchPlaceholder: s
117
+ }) : d);
118
+ return /* @__PURE__ */ t(I, { ...r, children: f });
119
+ });
120
+ T.displayName = "SearchableSelect";
121
+ export {
122
+ T as SearchableSelect,
123
+ I as Select,
124
+ g as SelectContent,
125
+ E as SelectGroup,
126
+ k as SelectItem,
127
+ V as SelectLabel,
128
+ R as SelectTrigger,
129
+ L as SelectValue
130
+ };