@health-samurai/react-components 0.0.0-alpha.4 → 0.0.0-alpha.6

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 (304) hide show
  1. package/dist/bundle.css +1375 -484
  2. package/dist/src/components/code-editor/http/grammar/http.d.ts +3 -0
  3. package/dist/src/components/code-editor/http/grammar/http.d.ts.map +1 -0
  4. package/dist/src/components/code-editor/http/grammar/http.grammar +74 -0
  5. package/dist/src/components/code-editor/http/grammar/http.js +38 -0
  6. package/dist/src/components/code-editor/http/grammar/http.js.map +1 -0
  7. package/dist/src/components/code-editor/http/grammar/http.terms.d.ts +2 -0
  8. package/dist/src/components/code-editor/http/grammar/http.terms.d.ts.map +1 -0
  9. package/dist/src/components/code-editor/http/grammar/http.terms.js +4 -0
  10. package/dist/src/components/code-editor/http/grammar/http.terms.js.map +1 -0
  11. package/dist/src/components/code-editor/http/grammar/http.test.d.ts +2 -0
  12. package/dist/src/components/code-editor/http/grammar/http.test.d.ts.map +1 -0
  13. package/dist/src/components/code-editor/http/grammar/http.test.js +80 -0
  14. package/dist/src/components/code-editor/http/grammar/http.test.js.map +1 -0
  15. package/dist/src/components/code-editor/http/index.d.ts +4 -0
  16. package/dist/src/components/code-editor/http/index.d.ts.map +1 -0
  17. package/dist/src/components/code-editor/http/index.js +66 -0
  18. package/dist/src/components/code-editor/http/index.js.map +1 -0
  19. package/dist/src/components/code-editor/index.d.ts +14 -2
  20. package/dist/src/components/code-editor/index.d.ts.map +1 -1
  21. package/dist/src/components/code-editor/index.js +309 -20
  22. package/dist/src/components/code-editor/index.js.map +1 -1
  23. package/dist/src/components/code-editor.stories.d.ts +1 -0
  24. package/dist/src/components/code-editor.stories.d.ts.map +1 -1
  25. package/dist/src/components/code-editor.stories.js +255 -2
  26. package/dist/src/components/code-editor.stories.js.map +1 -1
  27. package/dist/src/components/copy-icon.d.ts +5 -1
  28. package/dist/src/components/copy-icon.d.ts.map +1 -1
  29. package/dist/src/components/copy-icon.js +41 -3
  30. package/dist/src/components/copy-icon.js.map +1 -1
  31. package/dist/src/components/data-table.d.ts +8 -0
  32. package/dist/src/components/data-table.d.ts.map +1 -0
  33. package/dist/src/components/data-table.js +65 -0
  34. package/dist/src/components/data-table.js.map +1 -0
  35. package/dist/src/components/data-table.stories.d.ts +7 -0
  36. package/dist/src/components/data-table.stories.d.ts.map +1 -0
  37. package/dist/src/components/data-table.stories.js +44 -0
  38. package/dist/src/components/data-table.stories.js.map +1 -0
  39. package/dist/src/components/fhir-structure-view.d.ts +34 -0
  40. package/dist/src/components/fhir-structure-view.d.ts.map +1 -0
  41. package/dist/src/components/fhir-structure-view.js +229 -0
  42. package/dist/src/components/fhir-structure-view.js.map +1 -0
  43. package/dist/src/components/fhir-structure-view.stories.d.ts +7 -0
  44. package/dist/src/components/fhir-structure-view.stories.d.ts.map +1 -0
  45. package/dist/src/components/fhir-structure-view.stories.js +447 -0
  46. package/dist/src/components/fhir-structure-view.stories.js.map +1 -0
  47. package/dist/src/components/patient-table.d.ts +73 -0
  48. package/dist/src/components/patient-table.d.ts.map +1 -0
  49. package/dist/src/components/patient-table.js +921 -0
  50. package/dist/src/components/patient-table.js.map +1 -0
  51. package/dist/src/components/patient-table.stories.d.ts +111 -0
  52. package/dist/src/components/patient-table.stories.d.ts.map +1 -0
  53. package/dist/src/components/patient-table.stories.js +172 -0
  54. package/dist/src/components/patient-table.stories.js.map +1 -0
  55. package/dist/src/components/request-line-editor.d.ts +13 -35
  56. package/dist/src/components/request-line-editor.d.ts.map +1 -1
  57. package/dist/src/components/request-line-editor.js +72 -49
  58. package/dist/src/components/request-line-editor.js.map +1 -1
  59. package/dist/src/components/request-line-editor.stories.d.ts.map +1 -1
  60. package/dist/src/components/request-line-editor.stories.js +17 -53
  61. package/dist/src/components/request-line-editor.stories.js.map +1 -1
  62. package/dist/src/components/segment-control.d.ts +16 -0
  63. package/dist/src/components/segment-control.d.ts.map +1 -0
  64. package/dist/src/components/segment-control.js +48 -0
  65. package/dist/src/components/segment-control.js.map +1 -0
  66. package/dist/src/components/segment-control.stories.d.ts +15 -0
  67. package/dist/src/components/segment-control.stories.d.ts.map +1 -0
  68. package/dist/src/components/segment-control.stories.js +33 -0
  69. package/dist/src/components/segment-control.stories.js.map +1 -0
  70. package/dist/src/components/split-button.d.ts +5 -0
  71. package/dist/src/components/split-button.d.ts.map +1 -0
  72. package/dist/src/components/split-button.js +12 -0
  73. package/dist/src/components/split-button.js.map +1 -0
  74. package/dist/src/components/split-button.stories.d.ts +7 -0
  75. package/dist/src/components/split-button.stories.d.ts.map +1 -0
  76. package/dist/src/components/split-button.stories.js +57 -0
  77. package/dist/src/components/split-button.stories.js.map +1 -0
  78. package/dist/src/components/tree-view.d.ts +22 -0
  79. package/dist/src/components/tree-view.d.ts.map +1 -0
  80. package/dist/src/components/tree-view.js +101 -0
  81. package/dist/src/components/tree-view.js.map +1 -0
  82. package/dist/src/components/tree-view.stories.d.ts +13 -0
  83. package/dist/src/components/tree-view.stories.d.ts.map +1 -0
  84. package/dist/src/components/tree-view.stories.js +274 -0
  85. package/dist/src/components/tree-view.stories.js.map +1 -0
  86. package/dist/src/icons.d.ts +9 -0
  87. package/dist/src/icons.d.ts.map +1 -0
  88. package/dist/src/icons.js +279 -0
  89. package/dist/src/icons.js.map +1 -0
  90. package/dist/src/index.css +42 -3
  91. package/dist/src/index.d.ts +9 -1
  92. package/dist/src/index.d.ts.map +1 -1
  93. package/dist/src/index.js +9 -1
  94. package/dist/src/index.js.map +1 -1
  95. package/dist/src/shadcn/components/ui/accordion.d.ts.map +1 -1
  96. package/dist/src/shadcn/components/ui/accordion.js +23 -5
  97. package/dist/src/shadcn/components/ui/accordion.js.map +1 -1
  98. package/dist/src/shadcn/components/ui/alert-dialog.d.ts +3 -1
  99. package/dist/src/shadcn/components/ui/alert-dialog.d.ts.map +1 -1
  100. package/dist/src/shadcn/components/ui/alert-dialog.js +5 -2
  101. package/dist/src/shadcn/components/ui/alert-dialog.js.map +1 -1
  102. package/dist/src/shadcn/components/ui/alert.d.ts.map +1 -1
  103. package/dist/src/shadcn/components/ui/alert.js +12 -5
  104. package/dist/src/shadcn/components/ui/alert.js.map +1 -1
  105. package/dist/src/shadcn/components/ui/avatar.d.ts.map +1 -1
  106. package/dist/src/shadcn/components/ui/avatar.js +4 -3
  107. package/dist/src/shadcn/components/ui/avatar.js.map +1 -1
  108. package/dist/src/shadcn/components/ui/badge.d.ts.map +1 -1
  109. package/dist/src/shadcn/components/ui/badge.js +16 -5
  110. package/dist/src/shadcn/components/ui/badge.js.map +1 -1
  111. package/dist/src/shadcn/components/ui/breadcrumb.d.ts.map +1 -1
  112. package/dist/src/shadcn/components/ui/breadcrumb.js +6 -6
  113. package/dist/src/shadcn/components/ui/breadcrumb.js.map +1 -1
  114. package/dist/src/shadcn/components/ui/button.d.ts.map +1 -1
  115. package/dist/src/shadcn/components/ui/button.js +19 -11
  116. package/dist/src/shadcn/components/ui/button.js.map +1 -1
  117. package/dist/src/shadcn/components/ui/card.d.ts.map +1 -1
  118. package/dist/src/shadcn/components/ui/card.js +14 -6
  119. package/dist/src/shadcn/components/ui/card.js.map +1 -1
  120. package/dist/src/shadcn/components/ui/checkbox.d.ts.map +1 -1
  121. package/dist/src/shadcn/components/ui/checkbox.js +20 -5
  122. package/dist/src/shadcn/components/ui/checkbox.js.map +1 -1
  123. package/dist/src/shadcn/components/ui/checkbox.stories.d.ts.map +1 -1
  124. package/dist/src/shadcn/components/ui/checkbox.stories.js +44 -35
  125. package/dist/src/shadcn/components/ui/checkbox.stories.js.map +1 -1
  126. package/dist/src/shadcn/components/ui/combobox.d.ts +18 -0
  127. package/dist/src/shadcn/components/ui/combobox.d.ts.map +1 -0
  128. package/dist/src/shadcn/components/ui/combobox.js +121 -0
  129. package/dist/src/shadcn/components/ui/combobox.js.map +1 -0
  130. package/dist/src/shadcn/components/ui/combobox.stories.d.ts +11 -0
  131. package/dist/src/shadcn/components/ui/combobox.stories.d.ts.map +1 -0
  132. package/dist/src/shadcn/components/ui/combobox.stories.js +16 -0
  133. package/dist/src/shadcn/components/ui/combobox.stories.js.map +1 -0
  134. package/dist/src/shadcn/components/ui/command.d.ts.map +1 -1
  135. package/dist/src/shadcn/components/ui/command.js +73 -12
  136. package/dist/src/shadcn/components/ui/command.js.map +1 -1
  137. package/dist/src/shadcn/components/ui/command.stories.js +0 -1
  138. package/dist/src/shadcn/components/ui/command.stories.js.map +1 -1
  139. package/dist/src/shadcn/components/ui/dialog.d.ts.map +1 -1
  140. package/dist/src/shadcn/components/ui/dialog.js +35 -7
  141. package/dist/src/shadcn/components/ui/dialog.js.map +1 -1
  142. package/dist/src/shadcn/components/ui/drawer.d.ts.map +1 -1
  143. package/dist/src/shadcn/components/ui/drawer.js +26 -5
  144. package/dist/src/shadcn/components/ui/drawer.js.map +1 -1
  145. package/dist/src/shadcn/components/ui/dropdown-menu.d.ts.map +1 -1
  146. package/dist/src/shadcn/components/ui/dropdown-menu.js +12 -1
  147. package/dist/src/shadcn/components/ui/dropdown-menu.js.map +1 -1
  148. package/dist/src/shadcn/components/ui/form.d.ts.map +1 -1
  149. package/dist/src/shadcn/components/ui/form.js +12 -4
  150. package/dist/src/shadcn/components/ui/form.js.map +1 -1
  151. package/dist/src/shadcn/components/ui/input.d.ts +3 -1
  152. package/dist/src/shadcn/components/ui/input.d.ts.map +1 -1
  153. package/dist/src/shadcn/components/ui/input.js +126 -17
  154. package/dist/src/shadcn/components/ui/input.js.map +1 -1
  155. package/dist/src/shadcn/components/ui/label.d.ts.map +1 -1
  156. package/dist/src/shadcn/components/ui/label.js +8 -1
  157. package/dist/src/shadcn/components/ui/label.js.map +1 -1
  158. package/dist/src/shadcn/components/ui/menubar.d.ts.map +1 -1
  159. package/dist/src/shadcn/components/ui/menubar.js +35 -13
  160. package/dist/src/shadcn/components/ui/menubar.js.map +1 -1
  161. package/dist/src/shadcn/components/ui/pagination.d.ts.map +1 -1
  162. package/dist/src/shadcn/components/ui/pagination.js +6 -6
  163. package/dist/src/shadcn/components/ui/pagination.js.map +1 -1
  164. package/dist/src/shadcn/components/ui/popover.d.ts.map +1 -1
  165. package/dist/src/shadcn/components/ui/popover.js +12 -1
  166. package/dist/src/shadcn/components/ui/popover.js.map +1 -1
  167. package/dist/src/shadcn/components/ui/progress.d.ts.map +1 -1
  168. package/dist/src/shadcn/components/ui/progress.js +6 -2
  169. package/dist/src/shadcn/components/ui/progress.js.map +1 -1
  170. package/dist/src/shadcn/components/ui/radio-group.d.ts.map +1 -1
  171. package/dist/src/shadcn/components/ui/radio-group.js +11 -6
  172. package/dist/src/shadcn/components/ui/radio-group.js.map +1 -1
  173. package/dist/src/shadcn/components/ui/radio-group.stories.d.ts.map +1 -1
  174. package/dist/src/shadcn/components/ui/radio-group.stories.js +57 -34
  175. package/dist/src/shadcn/components/ui/radio-group.stories.js.map +1 -1
  176. package/dist/src/shadcn/components/ui/scroll-area.d.ts.map +1 -1
  177. package/dist/src/shadcn/components/ui/scroll-area.js +9 -3
  178. package/dist/src/shadcn/components/ui/scroll-area.js.map +1 -1
  179. package/dist/src/shadcn/components/ui/select.d.ts.map +1 -1
  180. package/dist/src/shadcn/components/ui/select.js +49 -14
  181. package/dist/src/shadcn/components/ui/select.js.map +1 -1
  182. package/dist/src/shadcn/components/ui/select.stories.d.ts.map +1 -1
  183. package/dist/src/shadcn/components/ui/select.stories.js +1 -4
  184. package/dist/src/shadcn/components/ui/select.stories.js.map +1 -1
  185. package/dist/src/shadcn/components/ui/separator.d.ts.map +1 -1
  186. package/dist/src/shadcn/components/ui/separator.js +7 -1
  187. package/dist/src/shadcn/components/ui/separator.js.map +1 -1
  188. package/dist/src/shadcn/components/ui/sidebar.d.ts.map +1 -1
  189. package/dist/src/shadcn/components/ui/sidebar.js +20 -6
  190. package/dist/src/shadcn/components/ui/sidebar.js.map +1 -1
  191. package/dist/src/shadcn/components/ui/skeleton.d.ts.map +1 -1
  192. package/dist/src/shadcn/components/ui/skeleton.js +3 -1
  193. package/dist/src/shadcn/components/ui/skeleton.js.map +1 -1
  194. package/dist/src/shadcn/components/ui/slider.d.ts.map +1 -1
  195. package/dist/src/shadcn/components/ui/slider.js +34 -4
  196. package/dist/src/shadcn/components/ui/slider.js.map +1 -1
  197. package/dist/src/shadcn/components/ui/sonner.d.ts +16 -1
  198. package/dist/src/shadcn/components/ui/sonner.d.ts.map +1 -1
  199. package/dist/src/shadcn/components/ui/sonner.js +23 -3
  200. package/dist/src/shadcn/components/ui/sonner.js.map +1 -1
  201. package/dist/src/shadcn/components/ui/sonner.stories.d.ts.map +1 -1
  202. package/dist/src/shadcn/components/ui/sonner.stories.js +19 -11
  203. package/dist/src/shadcn/components/ui/sonner.stories.js.map +1 -1
  204. package/dist/src/shadcn/components/ui/switch.d.ts.map +1 -1
  205. package/dist/src/shadcn/components/ui/switch.js +18 -2
  206. package/dist/src/shadcn/components/ui/switch.js.map +1 -1
  207. package/dist/src/shadcn/components/ui/table.d.ts.map +1 -1
  208. package/dist/src/shadcn/components/ui/table.js +12 -8
  209. package/dist/src/shadcn/components/ui/table.js.map +1 -1
  210. package/dist/src/shadcn/components/ui/tabs.d.ts +21 -3
  211. package/dist/src/shadcn/components/ui/tabs.d.ts.map +1 -1
  212. package/dist/src/shadcn/components/ui/tabs.js +315 -9
  213. package/dist/src/shadcn/components/ui/tabs.js.map +1 -1
  214. package/dist/src/shadcn/components/ui/tabs.stories.d.ts.map +1 -1
  215. package/dist/src/shadcn/components/ui/tabs.stories.js +50 -1
  216. package/dist/src/shadcn/components/ui/tabs.stories.js.map +1 -1
  217. package/dist/src/shadcn/components/ui/textarea.d.ts.map +1 -1
  218. package/dist/src/shadcn/components/ui/textarea.js +15 -1
  219. package/dist/src/shadcn/components/ui/textarea.js.map +1 -1
  220. package/dist/src/shadcn/components/ui/toggle-group.d.ts.map +1 -1
  221. package/dist/src/shadcn/components/ui/toggle-group.js +6 -2
  222. package/dist/src/shadcn/components/ui/toggle-group.js.map +1 -1
  223. package/dist/src/shadcn/components/ui/toggle.d.ts.map +1 -1
  224. package/dist/src/shadcn/components/ui/toggle.js +18 -6
  225. package/dist/src/shadcn/components/ui/toggle.js.map +1 -1
  226. package/dist/src/shadcn/components/ui/tooltip.d.ts.map +1 -1
  227. package/dist/src/shadcn/components/ui/tooltip.js +11 -1
  228. package/dist/src/shadcn/components/ui/tooltip.js.map +1 -1
  229. package/dist/src/shadcn/components/ui/tree.d.ts +28 -0
  230. package/dist/src/shadcn/components/ui/tree.d.ts.map +1 -0
  231. package/dist/src/shadcn/components/ui/tree.js +122 -0
  232. package/dist/src/shadcn/components/ui/tree.js.map +1 -0
  233. package/dist/src/typography.css +12 -0
  234. package/package.json +13 -2
  235. package/src/components/code-editor/http/grammar/http.grammar +74 -0
  236. package/src/components/code-editor/http/grammar/http.terms.ts +9 -0
  237. package/src/components/code-editor/http/grammar/http.test.ts +110 -0
  238. package/src/components/code-editor/http/grammar/http.ts +21 -0
  239. package/src/components/code-editor/http/index.ts +87 -0
  240. package/src/components/code-editor/index.tsx +307 -21
  241. package/src/components/code-editor.stories.tsx +295 -1
  242. package/src/components/copy-icon.tsx +57 -3
  243. package/src/components/data-table.stories.tsx +38 -0
  244. package/src/components/data-table.tsx +117 -0
  245. package/src/components/fhir-structure-view.stories.tsx +439 -0
  246. package/src/components/fhir-structure-view.tsx +231 -0
  247. package/src/components/patient-table.stories.tsx +111 -0
  248. package/src/components/patient-table.tsx +1301 -0
  249. package/src/components/request-line-editor.stories.tsx +17 -27
  250. package/src/components/request-line-editor.tsx +98 -61
  251. package/src/components/segment-control.stories.tsx +29 -0
  252. package/src/components/segment-control.tsx +80 -0
  253. package/src/components/split-button.stories.tsx +49 -0
  254. package/src/components/split-button.tsx +17 -0
  255. package/src/components/tree-view.stories.tsx +259 -0
  256. package/src/components/tree-view.tsx +172 -0
  257. package/src/icons.tsx +287 -0
  258. package/src/index.css +42 -3
  259. package/src/index.tsx +9 -2
  260. package/src/shadcn/components/ui/accordion.tsx +66 -8
  261. package/src/shadcn/components/ui/alert-dialog.tsx +6 -2
  262. package/src/shadcn/components/ui/alert.tsx +53 -15
  263. package/src/shadcn/components/ui/avatar.tsx +17 -6
  264. package/src/shadcn/components/ui/badge.tsx +67 -18
  265. package/src/shadcn/components/ui/breadcrumb.tsx +35 -7
  266. package/src/shadcn/components/ui/button.tsx +118 -57
  267. package/src/shadcn/components/ui/card.tsx +44 -13
  268. package/src/shadcn/components/ui/checkbox.stories.tsx +20 -24
  269. package/src/shadcn/components/ui/checkbox.tsx +45 -4
  270. package/src/shadcn/components/ui/combobox.stories.tsx +19 -0
  271. package/src/shadcn/components/ui/combobox.tsx +142 -0
  272. package/src/shadcn/components/ui/command.stories.tsx +1 -1
  273. package/src/shadcn/components/ui/command.tsx +192 -36
  274. package/src/shadcn/components/ui/dialog.tsx +101 -13
  275. package/src/shadcn/components/ui/drawer.tsx +93 -18
  276. package/src/shadcn/components/ui/dropdown-menu.tsx +37 -9
  277. package/src/shadcn/components/ui/form.tsx +16 -4
  278. package/src/shadcn/components/ui/input.tsx +400 -29
  279. package/src/shadcn/components/ui/label.tsx +21 -4
  280. package/src/shadcn/components/ui/menubar.tsx +188 -43
  281. package/src/shadcn/components/ui/pagination.tsx +12 -6
  282. package/src/shadcn/components/ui/popover.tsx +35 -4
  283. package/src/shadcn/components/ui/progress.tsx +21 -5
  284. package/src/shadcn/components/ui/radio-group.stories.tsx +22 -14
  285. package/src/shadcn/components/ui/radio-group.tsx +42 -5
  286. package/src/shadcn/components/ui/scroll-area.tsx +33 -5
  287. package/src/shadcn/components/ui/select.stories.tsx +0 -2
  288. package/src/shadcn/components/ui/select.tsx +184 -33
  289. package/src/shadcn/components/ui/separator.tsx +15 -5
  290. package/src/shadcn/components/ui/sidebar.tsx +68 -26
  291. package/src/shadcn/components/ui/skeleton.tsx +4 -1
  292. package/src/shadcn/components/ui/slider.tsx +82 -11
  293. package/src/shadcn/components/ui/sonner.stories.tsx +19 -15
  294. package/src/shadcn/components/ui/sonner.tsx +53 -3
  295. package/src/shadcn/components/ui/switch.tsx +53 -7
  296. package/src/shadcn/components/ui/table.tsx +38 -11
  297. package/src/shadcn/components/ui/tabs.stories.tsx +32 -0
  298. package/src/shadcn/components/ui/tabs.tsx +456 -17
  299. package/src/shadcn/components/ui/textarea.tsx +42 -4
  300. package/src/shadcn/components/ui/toggle-group.tsx +27 -5
  301. package/src/shadcn/components/ui/toggle.tsx +59 -18
  302. package/src/shadcn/components/ui/tooltip.tsx +33 -8
  303. package/src/shadcn/components/ui/tree.tsx +233 -0
  304. package/src/typography.css +12 -0
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../src/shadcn/components/ui/tabs.tsx"],"sourcesContent":["\"use client\";\nimport * as TabsPrimitive from \"@radix-ui/react-tabs\";\nimport { cva, type VariantProps } from \"class-variance-authority\";\nimport { Plus, X } from \"lucide-react\";\nimport type * as React from \"react\";\nimport { cn } from \"#shadcn/lib/utils\";\nimport { Button } from \"./button\";\n\nconst tabsVariants = cva(\"\", {\n\tvariants: {\n\t\tvariant: {\n\t\t\tbrowser: cn(\n\t\t\t\t// Tabs\n\t\t\t\t`flex-row \n\t\t\t\t items-center\n\t\t\t\t h-10\n\t\t\t\t `,\n\t\t\t\t// TabsList\n\t\t\t\t`**:data-[slot=tabs-list]:overflow-x-auto\n\t\t\t\t **:data-[slot=tabs-list]:divide-x`,\n\t\t\t\t// TabsTrigger\n\t\t\t\t`**:data-[slot=tabs-trigger]:max-w-80 \n\t\t\t\t **:data-[slot=tabs-trigger]:min-w-40\n\t\t\t\t **:data-[slot=tabs-trigger]:data-[state=inactive]:border-b-1\n\t\t\t\t **:data-[slot=tabs-trigger]:data-[state=inactive]:border-b-border-secondary\n\t\t\t\t **:data-[slot=tabs-trigger]:data-[state=inactive]:pt-[9px]\n\t\t\t\t `, // TODO: Try to implement this without using pt-[9px].\n\t\t\t),\n\t\t},\n\t},\n});\n\nfunction Tabs({\n\tclassName,\n\tvariant,\n\t...props\n}: React.ComponentProps<typeof TabsPrimitive.Root> &\n\tVariantProps<typeof tabsVariants>) {\n\treturn (\n\t\t<TabsPrimitive.Root\n\t\t\tdata-slot=\"tabs\"\n\t\t\tclassName={cn(\"flex flex-col\", tabsVariants({ variant }), className)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nexport function TabsAddButton(props: React.ComponentProps<typeof Button>) {\n\treturn (\n\t\t<div className=\"grow h-full bg-bg-secondary border-l border-b\">\n\t\t\t<Button\n\t\t\t\tdata-slot=\"tabs-add-button\"\n\t\t\t\tvariant=\"link\"\n\t\t\t\tclassName=\"h-full\"\n\t\t\t\t{...props}\n\t\t\t>\n\t\t\t\t<Plus />\n\t\t\t</Button>\n\t\t</div>\n\t);\n}\n\nfunction TabsList({\n\tclassName,\n\t...props\n}: React.ComponentProps<typeof TabsPrimitive.List>) {\n\treturn (\n\t\t<TabsPrimitive.List\n\t\t\tdata-slot=\"tabs-list\"\n\t\t\tclassName={cn(\"inline-flex w-fit items-center\", className)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nfunction TabsTrigger({\n\tclassName,\n\tonClose,\n\t...props\n}: React.ComponentProps<typeof TabsPrimitive.Trigger> & {\n\tonClose?: (value: string) => void;\n}) {\n\treturn (\n\t\t<TabsPrimitive.Trigger\n\t\t\tdata-slot=\"tabs-trigger\"\n\t\t\tclassName={cn(\n\t\t\t\t\"group/tabs-trigger\",\n\t\t\t\t\"box-border h-10 typo-body px-3 pb-2 pt-2.5 cursor-pointer text-text-tertiary data-[state=active]:text-text-primary\",\n\t\t\t\t\"data-[state=active]:border-b-border-brand border-b-2 border-b-transparent hover:text-text-tertiary-hover focus-visible:border-ring\",\n\t\t\t\t\"focus-visible:ring-ring/50 focus-visible:outline-ring dark:data-[state=active]:border-input dark:text-muted-foreground\",\n\t\t\t\t\"inline-flex flex-1 items-center justify-center whitespace-nowrap transition-[color,box-shadow]\",\n\t\t\t\t\"focus-visible:ring-[3px] focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50\",\n\t\t\t\t\"[&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\",\n\t\t\t\t\"hover:bg-bg-secondary/60\",\n\t\t\t\tonClose ? \"justify-between\" : \"\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t>\n\t\t\t{props.children}\n\n\t\t\t{onClose && (\n\t\t\t\t<Button\n\t\t\t\t\tonClick={(event) => {\n\t\t\t\t\t\tevent.stopPropagation();\n\t\t\t\t\t\tonClose(props.value);\n\t\t\t\t\t}}\n\t\t\t\t\tvariant=\"link\"\n\t\t\t\t\tsize=\"small\"\n\t\t\t\t\tclassName=\"p-0 ml-2\"\n\t\t\t\t\tasChild\n\t\t\t\t>\n\t\t\t\t\t<span>\n\t\t\t\t\t\t<X />\n\t\t\t\t\t</span>\n\t\t\t\t</Button>\n\t\t\t)}\n\t\t</TabsPrimitive.Trigger>\n\t);\n}\n\nfunction TabsContent({\n\tclassName,\n\t...props\n}: React.ComponentProps<typeof TabsPrimitive.Content>) {\n\treturn (\n\t\t<TabsPrimitive.Content\n\t\t\tdata-slot=\"tabs-content\"\n\t\t\tclassName={cn(\"flex-1 outline-none\", className)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nexport { Tabs, TabsList, TabsTrigger, TabsContent };\n"],"names":["TabsPrimitive","cva","Plus","X","cn","Button","tabsVariants","variants","variant","browser","Tabs","className","props","Root","data-slot","TabsAddButton","div","TabsList","List","TabsTrigger","onClose","Trigger","children","onClick","event","stopPropagation","value","size","asChild","span","TabsContent","Content"],"mappings":"AAAA;;AACA,YAAYA,mBAAmB,uBAAuB;AACtD,SAASC,GAAG,QAA2B,2BAA2B;AAClE,SAASC,IAAI,EAAEC,CAAC,QAAQ,eAAe;AAEvC,SAASC,EAAE,QAAQ,qBAAoB;AACvC,SAASC,MAAM,QAAQ,cAAW;AAElC,MAAMC,eAAeL,IAAI,IAAI;IAC5BM,UAAU;QACTC,SAAS;YACRC,SAASL,GACR,OAAO;YACP,CAAC;;;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EAAEO,QAAQ,EAAEE,WAAW,EAAEW,WAAW,GAAG"}
1
+ {"version":3,"sources":["../../../../../src/shadcn/components/ui/tabs.tsx"],"sourcesContent":["\"use client\";\nimport * as TabsPrimitive from \"@radix-ui/react-tabs\";\nimport { cva, type VariantProps } from \"class-variance-authority\";\nimport {\n\tChevronDownIcon,\n\tChevronLeft,\n\tChevronRight,\n\tPlus,\n\tX,\n} from \"lucide-react\";\nimport * as React from \"react\";\nimport { cn } from \"#shadcn/lib/utils\";\nimport { Button } from \"./button\";\nimport {\n\tCommand,\n\tCommandEmpty,\n\tCommandInput,\n\tCommandItem,\n\tCommandList,\n} from \"./command\";\nimport { Popover, PopoverContent, PopoverTrigger } from \"./popover\";\n\n// Base tabs styles\nconst baseTabsStyles = cn(\"flex\", \"flex-col\", \"h-full\");\n\n// Tabs add button container styles\nconst tabsAddButtonContainerStyles = cn(\n\t\"grow\",\n\t\"h-full\",\n\t\"bg-bg-secondary\",\n\t\"border-l\",\n\t\"border-b\",\n);\n\n// Tabs list styles\nconst tabsListStyles = cn(\n\t\"inline-flex\",\n\t\"w-fit\",\n\t\"items-center\",\n\t\"no-scrollbar\",\n);\n\n// Base tabs trigger styles\nconst baseTabsTriggerStyles = cn(\n\t// Layout & Sizing\n\t\"box-border\",\n\t\"flex-1\",\n\t\"h-10\",\n\t\"inline-flex\",\n\t\"items-center\",\n\t\"justify-center\",\n\t\"px-3\",\n\t\"whitespace-nowrap\",\n\t// Spacing & Padding\n\t\"pb-2\",\n\t\"pt-2.5\",\n\t// Typography\n\t\"typo-body\",\n\t// Colors & States\n\t\"cursor-pointer\",\n\t\"text-text-tertiary\",\n\t\"hover:bg-bg-secondary/60\",\n\t\"hover:text-text-tertiary_hover\",\n\t\"data-[state=active]:text-text-primary\",\n\t\"data-[state=active]:border-b-border-brand\",\n\t\"disabled:opacity-50\",\n\t\"disabled:pointer-events-none\",\n\t// Borders\n\t\"border-b-2\",\n\t\"border-b-transparent\",\n\t// Focus & Accessibility\n\t\"focus-visible:ring-2\",\n\t\"focus-visible:ring-utility-blue/70\",\n\t\"focus-visible:outline-1\",\n\t// Transitions\n\t\"transition-[color,box-shadow]\",\n\t// Icons\n\t\"[&_svg]:pointer-events-none\",\n\t\"[&_svg]:shrink-0\",\n\t\"[&_svg:not([class*='size-'])]:size-4\",\n\t// Groups\n\t\"group/tabs-trigger\",\n);\n\n// Tabs content styles\nconst tabsContentStyles = cn(\"grow\", \"outline-none\", \"overflow-auto\");\n\nconst tabsVariants = cva(\"\", {\n\tvariants: {\n\t\tvariant: {\n\t\t\tbrowser: cn(\n\t\t\t\t// Tabs\n\t\t\t\t`flex-row \n\t\t\t\t items-center\n\t\t\t\t h-10\n\t\t\t\t `,\n\t\t\t\t// TabsList\n\t\t\t\t`**:data-[slot=tabs-list]:overflow-x-auto\n\t\t\t\t **:data-[slot=tabs-list]:divide-x`,\n\t\t\t\t// TabsTrigger\n\t\t\t\t`**:data-[slot=tabs-trigger]:max-w-80 \n\t\t\t\t **:data-[slot=tabs-trigger]:w-60\n\t\t\t\t **:data-[slot=tabs-trigger]:min-w-40\n\t\t\t\t **:data-[slot=tabs-trigger]:data-[state=inactive]:text-text-secondary\n\t\t\t\t **:data-[slot=tabs-trigger]:data-[state=inactive]:border-b-1\n\t\t\t\t **:data-[slot=tabs-trigger]:data-[state=inactive]:border-b-border-secondary\n\t\t\t\t **:data-[slot=tabs-trigger]:data-[state=inactive]:pt-[9px]\n\t\t\t\t `, // TODO: Try to implement this without using pt-[9px].\n\t\t\t),\n\t\t},\n\t},\n});\n\nfunction Tabs({\n\tclassName,\n\tvariant,\n\t...props\n}: React.ComponentProps<typeof TabsPrimitive.Root> &\n\tVariantProps<typeof tabsVariants>) {\n\treturn (\n\t\t<TabsPrimitive.Root\n\t\t\tdata-slot=\"tabs\"\n\t\t\tclassName={cn(baseTabsStyles, tabsVariants({ variant }), className)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nexport function TabsAddButton(props: React.ComponentProps<typeof Button>) {\n\treturn (\n\t\t<div className={tabsAddButtonContainerStyles}>\n\t\t\t<Button\n\t\t\t\tdata-slot=\"tabs-add-button\"\n\t\t\t\tvariant=\"link\"\n\t\t\t\tclassName=\"h-full\"\n\t\t\t\t{...props}\n\t\t\t>\n\t\t\t\t<Plus />\n\t\t\t</Button>\n\t\t</div>\n\t);\n}\n\nconst horizontalScroll = (event: React.WheelEvent) => {\n\tconst mode = event.deltaMode;\n\tlet deltaPx = 0;\n\n\tif (mode === 0) {\n\t\tdeltaPx = event.deltaY;\n\t} else if (mode === 1) {\n\t\tdeltaPx = event.deltaY * 160;\n\t} else if (mode === 2) {\n\t\tdeltaPx = event.currentTarget.clientWidth;\n\t}\n\n\tconst newScrollLeft = event.currentTarget.scrollLeft + deltaPx;\n\n\tevent.currentTarget.scrollTo({\n\t\tleft: newScrollLeft,\n\t\tbehavior: \"smooth\",\n\t});\n};\n\nconst performHorizontalScroll = (\n\ttabsListRef: React.RefObject<HTMLDivElement | null>,\n\tdirection: \"left\" | \"right\",\n) => {\n\tif (!tabsListRef.current) return;\n\tconst scrollAmount = 160;\n\tlet newScrollLeft = tabsListRef.current.scrollLeft;\n\n\tif (direction === \"left\") {\n\t\tnewScrollLeft -= scrollAmount;\n\t\tnewScrollLeft -= newScrollLeft % scrollAmount;\n\t} else {\n\t\tnewScrollLeft += scrollAmount;\n\n\t\tconst rightCoord = newScrollLeft + tabsListRef.current.clientWidth;\n\n\t\tif (rightCoord % scrollAmount !== 0) {\n\t\t\tnewScrollLeft += scrollAmount - (rightCoord % scrollAmount);\n\t\t}\n\t}\n\n\ttabsListRef.current.scrollTo({\n\t\tleft: newScrollLeft,\n\t\tbehavior: \"smooth\",\n\t});\n};\n\ntype EdgeScrollPosition = \"touch\" | \"depart\";\ntype FlowType = \"overflow\" | \"underflow\";\n\ntype TabsListProps = {\n\tonLeftEdge?: (position: EdgeScrollPosition) => void;\n\tonRightEdge?: (position: EdgeScrollPosition) => void;\n\tonFlow?: (flow: FlowType) => void;\n\tonResize?: (entries: ResizeObserverEntry[]) => void;\n\tonTabChange?: (mutationRecords: MutationRecord[]) => void;\n} & React.ComponentProps<typeof TabsPrimitive.List>;\n\nfunction TabsList({\n\tclassName,\n\tonLeftEdge,\n\tonRightEdge,\n\tonResize,\n\tonFlow,\n\tonTabChange,\n\t...props\n}: TabsListProps) {\n\tconst tabListRef = React.useRef<HTMLDivElement | null>(null);\n\n\tconst onLeftEdgeRef = React.useRef(onLeftEdge);\n\tReact.useEffect(() => {\n\t\tonLeftEdgeRef.current = onLeftEdge;\n\t}, [onLeftEdge]);\n\n\tconst onResizeRef = React.useRef(onResize);\n\tReact.useEffect(() => {\n\t\tonResizeRef.current = onResize;\n\t}, [onResize]);\n\n\tconst onRightEdgeRef = React.useRef(onRightEdge);\n\tReact.useEffect(() => {\n\t\tonRightEdgeRef.current = onRightEdge;\n\t}, [onRightEdge]);\n\n\tconst onFlowRef = React.useRef(onFlow);\n\tReact.useEffect(() => {\n\t\tonFlowRef.current = onFlow;\n\t}, [onFlow]);\n\n\tconst onTabChangeRef = React.useRef(onTabChange);\n\tReact.useEffect(() => {\n\t\tonTabChangeRef.current = onTabChange;\n\t}, [onTabChange]);\n\n\tReact.useEffect(() => {\n\t\tif (tabListRef.current === null) {\n\t\t\treturn;\n\t\t}\n\t\tconst tabList = tabListRef.current;\n\n\t\tlet last: {\n\t\t\tscrollLeft: number;\n\t\t\tscrollWidth: number;\n\t\t\tclientWidth: number;\n\t\t} | null = null;\n\n\t\tconst handleScroll = () => {\n\t\t\tif (onLeftEdgeRef.current) {\n\t\t\t\tconst newState: EdgeScrollPosition =\n\t\t\t\t\ttabList.scrollLeft < 1 ? \"touch\" : \"depart\";\n\n\t\t\t\tif (last === null) {\n\t\t\t\t\tonLeftEdgeRef.current(newState);\n\t\t\t\t} else {\n\t\t\t\t\tconst lastState: EdgeScrollPosition =\n\t\t\t\t\t\tlast.scrollLeft < 1 ? \"touch\" : \"depart\";\n\n\t\t\t\t\tif (lastState !== newState) {\n\t\t\t\t\t\tonLeftEdgeRef.current(newState);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (onRightEdgeRef.current) {\n\t\t\t\tconst newState: EdgeScrollPosition =\n\t\t\t\t\ttabList.scrollWidth - tabList.clientWidth - tabList.scrollLeft < 1\n\t\t\t\t\t\t? \"touch\"\n\t\t\t\t\t\t: \"depart\";\n\n\t\t\t\tif (last === null) {\n\t\t\t\t\tonRightEdgeRef.current(newState);\n\t\t\t\t} else {\n\t\t\t\t\tconst lastState: EdgeScrollPosition =\n\t\t\t\t\t\tlast.scrollWidth - last.clientWidth - last.scrollLeft < 1\n\t\t\t\t\t\t\t? \"touch\"\n\t\t\t\t\t\t\t: \"depart\";\n\n\t\t\t\t\tif (lastState !== newState) {\n\t\t\t\t\t\tonRightEdgeRef.current(newState);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (onFlowRef.current) {\n\t\t\t\tconst newState: FlowType =\n\t\t\t\t\ttabList.scrollWidth > tabList.clientWidth ? \"overflow\" : \"underflow\";\n\n\t\t\t\tif (last === null) {\n\t\t\t\t\tonFlowRef.current(newState);\n\t\t\t\t} else {\n\t\t\t\t\tconst lastState =\n\t\t\t\t\t\tlast.scrollWidth > last.clientWidth ? \"overflow\" : \"underflow\";\n\t\t\t\t\tif (lastState !== newState) {\n\t\t\t\t\t\tonFlowRef.current(newState);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tlast = {\n\t\t\t\tscrollLeft: tabList.scrollLeft,\n\t\t\t\tscrollWidth: tabList.scrollWidth,\n\t\t\t\tclientWidth: tabList.clientWidth,\n\t\t\t};\n\t\t};\n\n\t\tconst scrollCallback = (_ev: unknown) => handleScroll();\n\t\tconst resizeObserver = new ResizeObserver((entries) => {\n\t\t\thandleScroll();\n\t\t\tif (onResizeRef.current) {\n\t\t\t\tonResizeRef.current(entries);\n\t\t\t}\n\t\t});\n\t\tconst mutationObserver = new MutationObserver((mutationRecords) => {\n\t\t\thandleScroll();\n\t\t\tif (onTabChangeRef.current) {\n\t\t\t\tonTabChangeRef.current(mutationRecords);\n\t\t\t}\n\t\t});\n\n\t\ttabList.addEventListener(\"scroll\", scrollCallback, { passive: true });\n\t\tresizeObserver.observe(tabList);\n\t\tmutationObserver.observe(tabList, { childList: true });\n\n\t\treturn () => {\n\t\t\ttabList.removeEventListener(\"scroll\", scrollCallback);\n\t\t\tresizeObserver.disconnect();\n\t\t\tmutationObserver.disconnect();\n\t\t};\n\t}, []);\n\n\treturn (\n\t\t<TabsPrimitive.List\n\t\t\tdata-slot=\"tabs-list\"\n\t\t\tclassName={cn(\"inline-flex w-fit items-center\", className)}\n\t\t\t{...props}\n\t\t\tref={(element) => {\n\t\t\t\ttabListRef.current = element;\n\t\t\t\tif (props.ref !== undefined && props.ref !== null) {\n\t\t\t\t\tif (typeof props.ref === \"function\") {\n\t\t\t\t\t\tprops.ref(element);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tprops.ref.current = element;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}}\n\t\t/>\n\t);\n}\n\ntype TabScrollButtonProps = {\n\tdisabled: boolean;\n\tonClick: () => void;\n};\n\nfunction TabScrollLeftButton({\n\tdisabled,\n\tonClick,\n}: TabScrollButtonProps): React.ReactElement {\n\treturn (\n\t\t<Button\n\t\t\tvariant=\"link\"\n\t\t\tsize=\"small\"\n\t\t\tdisabled={disabled}\n\t\t\tclassName=\"h-full border-r border-b bg-bg-secondary\"\n\t\t\tonClick={onClick}\n\t\t>\n\t\t\t<ChevronLeft />\n\t\t</Button>\n\t);\n}\n\nfunction TabScrollRightButton({\n\tdisabled,\n\tonClick,\n}: TabScrollButtonProps): React.ReactElement {\n\treturn (\n\t\t<Button\n\t\t\tvariant=\"link\"\n\t\t\tsize=\"small\"\n\t\t\tdisabled={disabled}\n\t\t\tclassName=\"h-full border-l border-b bg-bg-secondary\"\n\t\t\tonClick={onClick}\n\t\t>\n\t\t\t<ChevronRight />\n\t\t</Button>\n\t);\n}\n\nfunction TabsBrowserList({\n\tclassName,\n\tchildren,\n\t...props\n}: React.ComponentProps<typeof TabsPrimitive.List>) {\n\tconst tabsListRef = React.useRef<HTMLDivElement | null>(null);\n\n\tconst [showScrollButtons, setShowScrollButtons] = React.useState(false);\n\tconst [canScrollLeft, setCanScrollLeft] = React.useState(false);\n\tconst [canScrollRight, setCanScrollRight] = React.useState(false);\n\n\treturn (\n\t\t<React.Fragment>\n\t\t\t{showScrollButtons && (\n\t\t\t\t<TabScrollLeftButton\n\t\t\t\t\tdisabled={!canScrollLeft}\n\t\t\t\t\tonClick={() => performHorizontalScroll(tabsListRef, \"left\")}\n\t\t\t\t/>\n\t\t\t)}\n\n\t\t\t<TabsList\n\t\t\t\tonLeftEdge={(edgeState) => {\n\t\t\t\t\tif (edgeState === \"touch\") {\n\t\t\t\t\t\tsetCanScrollLeft(false);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tsetCanScrollLeft(true);\n\t\t\t\t\t}\n\t\t\t\t}}\n\t\t\t\tonRightEdge={(edgeState) => {\n\t\t\t\t\tif (edgeState === \"touch\") {\n\t\t\t\t\t\tsetCanScrollRight(false);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tsetCanScrollRight(true);\n\t\t\t\t\t}\n\t\t\t\t}}\n\t\t\t\tonFlow={(flow) => {\n\t\t\t\t\tif (flow === \"overflow\") {\n\t\t\t\t\t\tsetShowScrollButtons(true);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tsetShowScrollButtons(false);\n\t\t\t\t\t}\n\t\t\t\t}}\n\t\t\t\tonResize={() => {\n\t\t\t\t\ttabsListRef.current\n\t\t\t\t\t\t?.querySelector<HTMLButtonElement>('button[data-state=\"active\"]')\n\t\t\t\t\t\t?.scrollIntoView();\n\t\t\t\t}}\n\t\t\t\tonTabChange={(entries) => {\n\t\t\t\t\tif (\n\t\t\t\t\t\tentries.filter((entry) => entry.addedNodes.length !== 0).length !==\n\t\t\t\t\t\t0\n\t\t\t\t\t) {\n\t\t\t\t\t\ttabsListRef.current\n\t\t\t\t\t\t\t?.querySelector<HTMLButtonElement>('button[data-state=\"active\"]')\n\t\t\t\t\t\t\t?.scrollIntoView();\n\t\t\t\t\t}\n\t\t\t\t}}\n\t\t\t\tdata-slot=\"tabs-list\"\n\t\t\t\tclassName={cn(tabsListStyles, className)}\n\t\t\t\tonWheel={(event) => horizontalScroll(event)}\n\t\t\t\t{...props}\n\t\t\t\tref={tabsListRef}\n\t\t\t>\n\t\t\t\t{children}\n\t\t\t</TabsList>\n\n\t\t\t{showScrollButtons && (\n\t\t\t\t<TabScrollRightButton\n\t\t\t\t\tdisabled={!canScrollRight}\n\t\t\t\t\tonClick={() => performHorizontalScroll(tabsListRef, \"right\")}\n\t\t\t\t/>\n\t\t\t)}\n\t\t</React.Fragment>\n\t);\n}\n\nexport function TabsListDropdown({\n\ttabs,\n\thandleTabSelect,\n\thandleCloseTab,\n}: {\n\ttabs: { id: string; content: React.ReactNode }[];\n\thandleTabSelect?: (tabId: string) => void;\n\thandleCloseTab?: (tabId: string) => void;\n}) {\n\tconst [isMenuOpen, setIsMenuOpen] = React.useState(false);\n\treturn (\n\t\t<Popover open={isMenuOpen} onOpenChange={setIsMenuOpen}>\n\t\t\t<PopoverTrigger asChild>\n\t\t\t\t<Button variant=\"link\" className=\"bg-bg-secondary h-full border-b pr-6\">\n\t\t\t\t\t<ChevronDownIcon className=\"size-4\" />\n\t\t\t\t</Button>\n\t\t\t</PopoverTrigger>\n\t\t\t<PopoverContent className=\"w-80 p-0 mr-3\" align=\"end\">\n\t\t\t\t<Command>\n\t\t\t\t\t<CommandInput placeholder=\"Search tabs...\" />\n\t\t\t\t\t<CommandList>\n\t\t\t\t\t\t<CommandEmpty>Not tabs found.</CommandEmpty>\n\t\t\t\t\t\t{tabs.map((tab) => (\n\t\t\t\t\t\t\t<CommandItem\n\t\t\t\t\t\t\t\tkey={tab.id}\n\t\t\t\t\t\t\t\tonSelect={() => {\n\t\t\t\t\t\t\t\t\thandleTabSelect?.(tab.id);\n\t\t\t\t\t\t\t\t\tsetIsMenuOpen(false);\n\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\tclassName=\"group flex items-center justify-between\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{tab.content}\n\t\t\t\t\t\t\t\t{tabs.length > 1 && (\n\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\tvariant=\"ghost\"\n\t\t\t\t\t\t\t\t\t\tsize=\"small\"\n\t\t\t\t\t\t\t\t\t\tclassName=\"opacity-0 group-hover:opacity-100 transition-opacity p-1 ml-2\"\n\t\t\t\t\t\t\t\t\t\tonClick={(e) => {\n\t\t\t\t\t\t\t\t\t\t\te.stopPropagation();\n\t\t\t\t\t\t\t\t\t\t\thandleCloseTab?.(tab.id);\n\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t<X className=\"size-3\" />\n\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t</CommandItem>\n\t\t\t\t\t\t))}\n\t\t\t\t\t</CommandList>\n\t\t\t\t</Command>\n\t\t\t</PopoverContent>\n\t\t</Popover>\n\t);\n}\n\nfunction TabsTrigger({\n\tclassName,\n\tonClose,\n\t...props\n}: React.ComponentProps<typeof TabsPrimitive.Trigger> & {\n\tonClose?: (value: string) => void;\n}) {\n\treturn (\n\t\t<TabsPrimitive.Trigger\n\t\t\tdata-slot=\"tabs-trigger\"\n\t\t\tclassName={cn(\n\t\t\t\tbaseTabsTriggerStyles,\n\t\t\t\tonClose ? \"justify-between\" : \"justify-start\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t>\n\t\t\t{props.children}\n\n\t\t\t{onClose && (\n\t\t\t\t<Button\n\t\t\t\t\tonClick={(event) => {\n\t\t\t\t\t\tevent.stopPropagation();\n\t\t\t\t\t\tonClose(props.value);\n\t\t\t\t\t}}\n\t\t\t\t\tvariant=\"link\"\n\t\t\t\t\tsize=\"small\"\n\t\t\t\t\tclassName=\"p-0 ml-2 opacity-0 group-hover/tabs-trigger:opacity-100 transition-opacity\"\n\t\t\t\t\tasChild\n\t\t\t\t>\n\t\t\t\t\t<span>\n\t\t\t\t\t\t<X />\n\t\t\t\t\t</span>\n\t\t\t\t</Button>\n\t\t\t)}\n\t\t</TabsPrimitive.Trigger>\n\t);\n}\n\nfunction TabsContent({\n\tclassName,\n\t...props\n}: React.ComponentProps<typeof TabsPrimitive.Content>) {\n\treturn (\n\t\t<TabsPrimitive.Content\n\t\t\tdata-slot=\"tabs-content\"\n\t\t\tclassName={cn(tabsContentStyles, className)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nexport { Tabs, TabsList, TabsTrigger, TabsContent, TabsBrowserList };\n"],"names":["TabsPrimitive","cva","ChevronDownIcon","ChevronLeft","ChevronRight","Plus","X","React","cn","Button","Command","CommandEmpty","CommandInput","CommandItem","CommandList","Popover","PopoverContent","PopoverTrigger","baseTabsStyles","tabsAddButtonContainerStyles","tabsListStyles","baseTabsTriggerStyles","tabsContentStyles","tabsVariants","variants","variant","browser","Tabs","className","props","Root","data-slot","TabsAddButton","div","horizontalScroll","event","mode","deltaMode","deltaPx","deltaY","currentTarget","clientWidth","newScrollLeft","scrollLeft","scrollTo","left","behavior","performHorizontalScroll","tabsListRef","direction","current","scrollAmount","rightCoord","TabsList","onLeftEdge","onRightEdge","onResize","onFlow","onTabChange","tabListRef","useRef","onLeftEdgeRef","useEffect","onResizeRef","onRightEdgeRef","onFlowRef","onTabChangeRef","tabList","last","handleScroll","newState","lastState","scrollWidth","scrollCallback","_ev","resizeObserver","ResizeObserver","entries","mutationObserver","MutationObserver","mutationRecords","addEventListener","passive","observe","childList","removeEventListener","disconnect","List","ref","element","undefined","TabScrollLeftButton","disabled","onClick","size","TabScrollRightButton","TabsBrowserList","children","showScrollButtons","setShowScrollButtons","useState","canScrollLeft","setCanScrollLeft","canScrollRight","setCanScrollRight","Fragment","edgeState","flow","querySelector","scrollIntoView","filter","entry","addedNodes","length","onWheel","TabsListDropdown","tabs","handleTabSelect","handleCloseTab","isMenuOpen","setIsMenuOpen","open","onOpenChange","asChild","align","placeholder","map","tab","onSelect","id","content","e","stopPropagation","TabsTrigger","onClose","Trigger","value","span","TabsContent","Content"],"mappings":"AAAA;;AACA,YAAYA,mBAAmB,uBAAuB;AACtD,SAASC,GAAG,QAA2B,2BAA2B;AAClE,SACCC,eAAe,EACfC,WAAW,EACXC,YAAY,EACZC,IAAI,EACJC,CAAC,QACK,eAAe;AACtB,YAAYC,WAAW,QAAQ;AAC/B,SAASC,EAAE,QAAQ,qBAAoB;AACvC,SAASC,MAAM,QAAQ,cAAW;AAClC,SACCC,OAAO,EACPC,YAAY,EACZC,YAAY,EACZC,WAAW,EACXC,WAAW,QACL,eAAY;AACnB,SAASC,OAAO,EAAEC,cAAc,EAAEC,cAAc,QAAQ,eAAY;AAEpE,mBAAmB;AACnB,MAAMC,iBAAiBV,GAAG,QAAQ,YAAY;AAE9C,mCAAmC;AACnC,MAAMW,+BAA+BX,GACpC,QACA,UACA,mBACA,YACA;AAGD,mBAAmB;AACnB,MAAMY,iBAAiBZ,GACtB,eACA,SACA,gBACA;AAGD,2BAA2B;AAC3B,MAAMa,wBAAwBb,GAC7B,kBAAkB;AAClB,cACA,UACA,QACA,eACA,gBACA,kBACA,QACA,qBACA,oBAAoB;AACpB,QACA,UACA,aAAa;AACb,aACA,kBAAkB;AAClB,kBACA,sBACA,4BACA,kCACA,yCACA,6CACA,uBACA,gCACA,UAAU;AACV,cACA,wBACA,wBAAwB;AACxB,wBACA,sCACA,2BACA,cAAc;AACd,iCACA,QAAQ;AACR,+BACA,oBACA,wCACA,SAAS;AACT;AAGD,sBAAsB;AACtB,MAAMc,oBAAoBd,GAAG,QAAQ,gBAAgB;AAErD,MAAMe,eAAetB,IA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AAQ,EAAEgF,WAAW,EAAEK,WAAW,EAAE1C,eAAe,GAAG"}
@@ -1 +1 @@
1
- {"version":3,"file":"tabs.stories.d.ts","sourceRoot":"","sources":["../../../../../src/shadcn/components/ui/tabs.stories.tsx"],"names":[],"mappings":"AAqBA,QAAA,MAAM,IAAI;;;;;;;;;;CAQM,CAAC;AACjB,eAAe,IAAI,CAAC;AAIpB,eAAO,MAAM,IAAI;;;;;;;;;;;;CA2DA,CAAC;AAclB,eAAO,MAAM,OAAO;;;;;CAyCH,CAAC"}
1
+ {"version":3,"file":"tabs.stories.d.ts","sourceRoot":"","sources":["../../../../../src/shadcn/components/ui/tabs.stories.tsx"],"names":[],"mappings":"AAsBA,QAAA,MAAM,IAAI;;;;;;;;;;CAQM,CAAC;AACjB,eAAe,IAAI,CAAC;AAIpB,eAAO,MAAM,IAAI;;;;;;;;;;;;CA2DA,CAAC;AAclB,eAAO,MAAM,OAAO;;;;;CAwEH,CAAC"}
@@ -4,7 +4,7 @@ import { Button } from "./button.js";
4
4
  import { Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle } from "./card.js";
5
5
  import { Input } from "./input.js";
6
6
  import { Label } from "./label.js";
7
- import { Tabs, TabsAddButton, TabsContent, TabsList, TabsTrigger } from "./tabs.js";
7
+ import { Tabs, TabsAddButton, TabsContent, TabsList, TabsListDropdown, TabsTrigger } from "./tabs.js";
8
8
  const meta = {
9
9
  title: "Component/Tabs",
10
10
  argTypes: {
@@ -223,6 +223,55 @@ export const Browser = {
223
223
  }),
224
224
  /*#__PURE__*/ _jsx(TabsAddButton, {
225
225
  onClick: BrowserTabOnAdd
226
+ }),
227
+ /*#__PURE__*/ _jsx(TabsListDropdown, {
228
+ tabs: [
229
+ {
230
+ id: "first",
231
+ content: /*#__PURE__*/ _jsxs("span", {
232
+ className: "flex items-center gap-1",
233
+ children: [
234
+ /*#__PURE__*/ _jsx("span", {
235
+ className: "text-utility-green",
236
+ children: "GET"
237
+ }),
238
+ /*#__PURE__*/ _jsx("span", {
239
+ children: "/fhir/Patient"
240
+ })
241
+ ]
242
+ })
243
+ },
244
+ {
245
+ id: "second",
246
+ content: /*#__PURE__*/ _jsxs("span", {
247
+ className: "flex items-center gap-1",
248
+ children: [
249
+ /*#__PURE__*/ _jsx("span", {
250
+ className: "text-utility-yellow",
251
+ children: "POST"
252
+ }),
253
+ /*#__PURE__*/ _jsx("span", {
254
+ children: "/fhir"
255
+ })
256
+ ]
257
+ })
258
+ },
259
+ {
260
+ id: "third",
261
+ content: /*#__PURE__*/ _jsxs("span", {
262
+ className: "flex items-center gap-1",
263
+ children: [
264
+ /*#__PURE__*/ _jsx("span", {
265
+ className: "text-utility-yellow",
266
+ children: "POST"
267
+ }),
268
+ /*#__PURE__*/ _jsx("span", {
269
+ children: "/$graphql"
270
+ })
271
+ ]
272
+ })
273
+ }
274
+ ]
226
275
  })
227
276
  ]
228
277
  })
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../src/shadcn/components/ui/tabs.stories.tsx"],"sourcesContent":["import type { Meta, StoryObj } from \"@storybook/react-vite\";\nimport { action } from \"storybook/internal/actions\";\nimport { Button } from \"#shadcn/components/ui/button\";\nimport {\n\tCard,\n\tCardContent,\n\tCardDescription,\n\tCardFooter,\n\tCardHeader,\n\tCardTitle,\n} from \"#shadcn/components/ui/card\";\nimport { Input } from \"#shadcn/components/ui/input\";\nimport { Label } from \"#shadcn/components/ui/label\";\nimport {\n\tTabs,\n\tTabsAddButton,\n\tTabsContent,\n\tTabsList,\n\tTabsTrigger,\n} from \"#shadcn/components/ui/tabs\";\n\nconst meta = {\n\ttitle: \"Component/Tabs\",\n\targTypes: {\n\t\tvariant: {\n\t\t\toptions: [\"button\", \"dashed\"],\n\t\t\tcontrol: { type: \"select\" },\n\t\t},\n\t},\n} satisfies Meta;\nexport default meta;\n\ntype Story = StoryObj<typeof meta>;\n\nexport const Demo = {\n\trender: (props) => (\n\t\t<div className=\"flex w-full max-w-sm flex-col gap-6\">\n\t\t\t<Tabs defaultValue=\"account\" {...props}>\n\t\t\t\t<TabsList>\n\t\t\t\t\t<TabsTrigger value=\"account\">Account</TabsTrigger>\n\t\t\t\t\t<TabsTrigger value=\"password\">Password</TabsTrigger>\n\t\t\t\t</TabsList>\n\t\t\t\t<TabsContent value=\"account\">\n\t\t\t\t\t<Card>\n\t\t\t\t\t\t<CardHeader>\n\t\t\t\t\t\t\t<CardTitle>Account</CardTitle>\n\t\t\t\t\t\t\t<CardDescription>\n\t\t\t\t\t\t\t\tMake changes to your account here. Click save when you&apos;re\n\t\t\t\t\t\t\t\tdone.\n\t\t\t\t\t\t\t</CardDescription>\n\t\t\t\t\t\t</CardHeader>\n\t\t\t\t\t\t<CardContent className=\"grid gap-6\">\n\t\t\t\t\t\t\t<div className=\"grid gap-3\">\n\t\t\t\t\t\t\t\t<Label htmlFor=\"tabs-demo-name\">Name</Label>\n\t\t\t\t\t\t\t\t<Input id=\"tabs-demo-name\" defaultValue=\"Pedro Duarte\" />\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div className=\"grid gap-3\">\n\t\t\t\t\t\t\t\t<Label htmlFor=\"tabs-demo-username\">Username</Label>\n\t\t\t\t\t\t\t\t<Input id=\"tabs-demo-username\" defaultValue=\"@peduarte\" />\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</CardContent>\n\t\t\t\t\t\t<CardFooter>\n\t\t\t\t\t\t\t<Button>Save changes</Button>\n\t\t\t\t\t\t</CardFooter>\n\t\t\t\t\t</Card>\n\t\t\t\t</TabsContent>\n\t\t\t\t<TabsContent value=\"password\">\n\t\t\t\t\t<Card>\n\t\t\t\t\t\t<CardHeader>\n\t\t\t\t\t\t\t<CardTitle>Password</CardTitle>\n\t\t\t\t\t\t\t<CardDescription>\n\t\t\t\t\t\t\t\tChange your password here. After saving, you&apos;ll be logged\n\t\t\t\t\t\t\t\tout.\n\t\t\t\t\t\t\t</CardDescription>\n\t\t\t\t\t\t</CardHeader>\n\t\t\t\t\t\t<CardContent className=\"grid gap-6\">\n\t\t\t\t\t\t\t<div className=\"grid gap-3\">\n\t\t\t\t\t\t\t\t<Label htmlFor=\"tabs-demo-current\">Current password</Label>\n\t\t\t\t\t\t\t\t<Input id=\"tabs-demo-current\" type=\"password\" />\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div className=\"grid gap-3\">\n\t\t\t\t\t\t\t\t<Label htmlFor=\"tabs-demo-new\">New password</Label>\n\t\t\t\t\t\t\t\t<Input id=\"tabs-demo-new\" type=\"password\" />\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</CardContent>\n\t\t\t\t\t\t<CardFooter>\n\t\t\t\t\t\t\t<Button>Save password</Button>\n\t\t\t\t\t\t</CardFooter>\n\t\t\t\t\t</Card>\n\t\t\t\t</TabsContent>\n\t\t\t</Tabs>\n\t\t</div>\n\t),\n} satisfies Story;\n\nfunction BrowserTabOnClose(value: string) {\n\taction(\"onClose\")(value);\n}\n\nfunction BrowserTabOnClick() {\n\taction(\"onClick\")();\n}\n\nfunction BrowserTabOnAdd() {\n\taction(\"onAdd\")();\n}\n\nexport const Browser = {\n\tparameters: {\n\t\tlayout: \"fullscreen\",\n\t},\n\trender: () => (\n\t\t<Tabs defaultValue=\"first\" variant=\"browser\">\n\t\t\t<TabsList>\n\t\t\t\t<TabsTrigger\n\t\t\t\t\tvalue=\"first\"\n\t\t\t\t\tonClick={BrowserTabOnClick}\n\t\t\t\t\tonClose={BrowserTabOnClose}\n\t\t\t\t>\n\t\t\t\t\t<span className=\"flex items-center gap-1\">\n\t\t\t\t\t\t<span className=\"text-utility-green\">GET</span>\n\t\t\t\t\t\t<span>/fhir/Patient</span>\n\t\t\t\t\t</span>\n\t\t\t\t</TabsTrigger>\n\t\t\t\t<TabsTrigger\n\t\t\t\t\tvalue=\"second\"\n\t\t\t\t\tonClick={BrowserTabOnClick}\n\t\t\t\t\tonClose={BrowserTabOnClose}\n\t\t\t\t>\n\t\t\t\t\t<span className=\"flex items-center gap-1\">\n\t\t\t\t\t\t<span className=\"text-utility-yellow\">POST</span>\n\t\t\t\t\t\t<span>/fhir</span>\n\t\t\t\t\t</span>\n\t\t\t\t</TabsTrigger>\n\t\t\t\t<TabsTrigger\n\t\t\t\t\tvalue=\"third\"\n\t\t\t\t\tonClick={BrowserTabOnClick}\n\t\t\t\t\tonClose={BrowserTabOnClose}\n\t\t\t\t>\n\t\t\t\t\t<span className=\"flex items-center gap-1\">\n\t\t\t\t\t\t<span className=\"text-utility-yellow\">POST</span>\n\t\t\t\t\t\t<span>/$graphql</span>\n\t\t\t\t\t</span>\n\t\t\t\t</TabsTrigger>\n\t\t\t</TabsList>\n\t\t\t<TabsAddButton onClick={BrowserTabOnAdd} />\n\t\t</Tabs>\n\t),\n} satisfies Story;\n"],"names":["action","Button","Card","CardContent","CardDescription","CardFooter","CardHeader","CardTitle","Input","Label","Tabs","TabsAddButton","TabsContent","TabsList","TabsTrigger","meta","title","argTypes","variant","options","control","type","Demo","render","props","div","className","defaultValue","value","htmlFor","id","BrowserTabOnClose","BrowserTabOnClick","BrowserTabOnAdd","Browser","parameters","layout","onClick","onClose","span"],"mappings":";AACA,SAASA,MAAM,QAAQ,6BAA6B;AACpD,SAASC,MAAM,QAAQ,cAA+B;AACtD,SACCC,IAAI,EACJC,WAAW,EACXC,eAAe,EACfC,UAAU,EACVC,UAAU,EACVC,SAAS,QACH,YAA6B;AACpC,SAASC,KAAK,QAAQ,aAA8B;AACpD,SAASC,KAAK,QAAQ,aAA8B;AACpD,SACCC,IAAI,EACJC,aAAa,EACbC,WAAW,EACXC,QAAQ,EACRC,WAAW,QACL,YAA6B;AAEpC,MAAMC,OAAO;IACZC,OAAO;IACPC,UAAU;QACTC,SAAS;YACRC,SAAS;gBAAC;gBAAU;aAAS;YAC7BC,SAAS;gBAAEC,MAAM;YAAS;QAC3B;IACD;AACD;AACA,eAAeN,KAAK;AAIpB,OAAO,MAAMO,OAAO;IACnBC,QAAQ,CAACC,sBACR,KAACC;YAAIC,W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AAKiB,cAAa;YAAQT,SAAQ;;8BAClC,MAACL;;sCACA,KAACC;4BACAc,OAAM;4BACNS,SAASL;4BACTM,SAASP;sCAET,cAAA,MAACQ;gCAAKb,WAAU;;kDACf,KAACa;wCAAKb,WAAU;kDAAqB;;kDACrC,KAACa;kDAAK;;;;;sCAGR,KAACzB;4BACAc,OAAM;4BACNS,SAASL;4BACTM,SAASP;sCAET,cAAA,MAACQ;gCAAKb,WAAU;;kDACf,KAACa;wCAAKb,WAAU;kDAAsB;;kDACtC,KAACa;kDAAK;;;;;sCAGR,KAACzB;4BACAc,OAAM;4BACNS,SAASL;4BACTM,SAASP;sCAET,cAAA,MAACQ;gCAAKb,WAAU;;kDACf,KAACa;wCAAKb,WAAU;kDAAsB;;kDACtC,KAACa;kDAAK;;;;;;;8BAIT,KAAC5B;oBAAc0B,SAASJ;;;;AAG3B,EAAkB"}
1
+ {"version":3,"sources":["../../../../../src/shadcn/components/ui/tabs.stories.tsx"],"sourcesContent":["import type { Meta, StoryObj } from \"@storybook/react-vite\";\nimport { action } from \"storybook/internal/actions\";\nimport { Button } from \"#shadcn/components/ui/button\";\nimport {\n\tCard,\n\tCardContent,\n\tCardDescription,\n\tCardFooter,\n\tCardHeader,\n\tCardTitle,\n} from \"#shadcn/components/ui/card\";\nimport { Input } from \"#shadcn/components/ui/input\";\nimport { Label } from \"#shadcn/components/ui/label\";\nimport {\n\tTabs,\n\tTabsAddButton,\n\tTabsContent,\n\tTabsList,\n\tTabsListDropdown,\n\tTabsTrigger,\n} from \"#shadcn/components/ui/tabs\";\n\nconst meta = {\n\ttitle: \"Component/Tabs\",\n\targTypes: {\n\t\tvariant: {\n\t\t\toptions: [\"button\", \"dashed\"],\n\t\t\tcontrol: { type: \"select\" },\n\t\t},\n\t},\n} satisfies Meta;\nexport default meta;\n\ntype Story = StoryObj<typeof meta>;\n\nexport const Demo = {\n\trender: (props) => (\n\t\t<div className=\"flex w-full max-w-sm flex-col gap-6\">\n\t\t\t<Tabs defaultValue=\"account\" {...props}>\n\t\t\t\t<TabsList>\n\t\t\t\t\t<TabsTrigger value=\"account\">Account</TabsTrigger>\n\t\t\t\t\t<TabsTrigger value=\"password\">Password</TabsTrigger>\n\t\t\t\t</TabsList>\n\t\t\t\t<TabsContent value=\"account\">\n\t\t\t\t\t<Card>\n\t\t\t\t\t\t<CardHeader>\n\t\t\t\t\t\t\t<CardTitle>Account</CardTitle>\n\t\t\t\t\t\t\t<CardDescription>\n\t\t\t\t\t\t\t\tMake changes to your account here. Click save when you&apos;re\n\t\t\t\t\t\t\t\tdone.\n\t\t\t\t\t\t\t</CardDescription>\n\t\t\t\t\t\t</CardHeader>\n\t\t\t\t\t\t<CardContent className=\"grid gap-6\">\n\t\t\t\t\t\t\t<div className=\"grid gap-3\">\n\t\t\t\t\t\t\t\t<Label htmlFor=\"tabs-demo-name\">Name</Label>\n\t\t\t\t\t\t\t\t<Input id=\"tabs-demo-name\" defaultValue=\"Pedro Duarte\" />\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div className=\"grid gap-3\">\n\t\t\t\t\t\t\t\t<Label htmlFor=\"tabs-demo-username\">Username</Label>\n\t\t\t\t\t\t\t\t<Input id=\"tabs-demo-username\" defaultValue=\"@peduarte\" />\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</CardContent>\n\t\t\t\t\t\t<CardFooter>\n\t\t\t\t\t\t\t<Button>Save changes</Button>\n\t\t\t\t\t\t</CardFooter>\n\t\t\t\t\t</Card>\n\t\t\t\t</TabsContent>\n\t\t\t\t<TabsContent value=\"password\">\n\t\t\t\t\t<Card>\n\t\t\t\t\t\t<CardHeader>\n\t\t\t\t\t\t\t<CardTitle>Password</CardTitle>\n\t\t\t\t\t\t\t<CardDescription>\n\t\t\t\t\t\t\t\tChange your password here. After saving, you&apos;ll be logged\n\t\t\t\t\t\t\t\tout.\n\t\t\t\t\t\t\t</CardDescription>\n\t\t\t\t\t\t</CardHeader>\n\t\t\t\t\t\t<CardContent className=\"grid gap-6\">\n\t\t\t\t\t\t\t<div className=\"grid gap-3\">\n\t\t\t\t\t\t\t\t<Label htmlFor=\"tabs-demo-current\">Current password</Label>\n\t\t\t\t\t\t\t\t<Input id=\"tabs-demo-current\" type=\"password\" />\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div className=\"grid gap-3\">\n\t\t\t\t\t\t\t\t<Label htmlFor=\"tabs-demo-new\">New password</Label>\n\t\t\t\t\t\t\t\t<Input id=\"tabs-demo-new\" type=\"password\" />\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</CardContent>\n\t\t\t\t\t\t<CardFooter>\n\t\t\t\t\t\t\t<Button>Save password</Button>\n\t\t\t\t\t\t</CardFooter>\n\t\t\t\t\t</Card>\n\t\t\t\t</TabsContent>\n\t\t\t</Tabs>\n\t\t</div>\n\t),\n} satisfies Story;\n\nfunction BrowserTabOnClose(value: string) {\n\taction(\"onClose\")(value);\n}\n\nfunction BrowserTabOnClick() {\n\taction(\"onClick\")();\n}\n\nfunction BrowserTabOnAdd() {\n\taction(\"onAdd\")();\n}\n\nexport const Browser = {\n\tparameters: {\n\t\tlayout: \"fullscreen\",\n\t},\n\trender: () => (\n\t\t<Tabs defaultValue=\"first\" variant=\"browser\">\n\t\t\t<TabsList>\n\t\t\t\t<TabsTrigger\n\t\t\t\t\tvalue=\"first\"\n\t\t\t\t\tonClick={BrowserTabOnClick}\n\t\t\t\t\tonClose={BrowserTabOnClose}\n\t\t\t\t>\n\t\t\t\t\t<span className=\"flex items-center gap-1\">\n\t\t\t\t\t\t<span className=\"text-utility-green\">GET</span>\n\t\t\t\t\t\t<span>/fhir/Patient</span>\n\t\t\t\t\t</span>\n\t\t\t\t</TabsTrigger>\n\t\t\t\t<TabsTrigger\n\t\t\t\t\tvalue=\"second\"\n\t\t\t\t\tonClick={BrowserTabOnClick}\n\t\t\t\t\tonClose={BrowserTabOnClose}\n\t\t\t\t>\n\t\t\t\t\t<span className=\"flex items-center gap-1\">\n\t\t\t\t\t\t<span className=\"text-utility-yellow\">POST</span>\n\t\t\t\t\t\t<span>/fhir</span>\n\t\t\t\t\t</span>\n\t\t\t\t</TabsTrigger>\n\t\t\t\t<TabsTrigger\n\t\t\t\t\tvalue=\"third\"\n\t\t\t\t\tonClick={BrowserTabOnClick}\n\t\t\t\t\tonClose={BrowserTabOnClose}\n\t\t\t\t>\n\t\t\t\t\t<span className=\"flex items-center gap-1\">\n\t\t\t\t\t\t<span className=\"text-utility-yellow\">POST</span>\n\t\t\t\t\t\t<span>/$graphql</span>\n\t\t\t\t\t</span>\n\t\t\t\t</TabsTrigger>\n\t\t\t</TabsList>\n\t\t\t<TabsAddButton onClick={BrowserTabOnAdd} />\n\t\t\t<TabsListDropdown\n\t\t\t\ttabs={[\n\t\t\t\t\t{\n\t\t\t\t\t\tid: \"first\",\n\t\t\t\t\t\tcontent: (\n\t\t\t\t\t\t\t<span className=\"flex items-center gap-1\">\n\t\t\t\t\t\t\t\t<span className=\"text-utility-green\">GET</span>\n\t\t\t\t\t\t\t\t<span>/fhir/Patient</span>\n\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t),\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tid: \"second\",\n\t\t\t\t\t\tcontent: (\n\t\t\t\t\t\t\t<span className=\"flex items-center gap-1\">\n\t\t\t\t\t\t\t\t<span className=\"text-utility-yellow\">POST</span>\n\t\t\t\t\t\t\t\t<span>/fhir</span>\n\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t),\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tid: \"third\",\n\t\t\t\t\t\tcontent: (\n\t\t\t\t\t\t\t<span className=\"flex items-center gap-1\">\n\t\t\t\t\t\t\t\t<span className=\"text-utility-yellow\">POST</span>\n\t\t\t\t\t\t\t\t<span>/$graphql</span>\n\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t),\n\t\t\t\t\t},\n\t\t\t\t]}\n\t\t\t/>\n\t\t</Tabs>\n\t),\n} satisfies Story;\n"],"names":["action","Button","Card","CardContent","CardDescription","CardFooter","CardHeader","CardTitle","Input","Label","Tabs","TabsAddButton","TabsContent","TabsList","TabsListDropdown","TabsTrigger","meta","title","argTypes","variant","options","control","type","Demo","render","props","div","className","defaultValue","value","htmlFor","id","BrowserTabOnClose","BrowserTabOnClick","BrowserTabOnAdd","Browser","parameters","layout","onClick","onClose","span","tabs","content"],"mappings":";AACA,SAASA,MAAM,QAAQ,6BAA6B;AACpD,SAASC,MAAM,QAAQ,cAA+B;AACtD,SACCC,IAAI,EACJC,WAAW,EACXC,eAAe,EACfC,UAAU,EACVC,UAAU,EACVC,SAAS,QACH,YAA6B;AACpC,SAASC,KAAK,QAAQ,aAA8B;AACpD,SAASC,KAAK,QAAQ,aAA8B;AACpD,SACCC,IAAI,EACJC,aAAa,EACbC,WAAW,EACXC,QAAQ,EACRC,gBAAgB,EAChBC,WAAW,QACL,YAA6B;AAEpC,MAAMC,OAAO;IACZC,OAAO;IACPC,UAAU;QACTC,SAAS;YACRC,SAAS;gBAAC;gBAAU;aAAS;YAC7BC,SAAS;gBAAEC,MAAM;YAAS;QAC3B;IACD;AACD;AACA,eAAeN,KAAK;AAIpB,OAAO,MAAMO,OAAO;IACnBC,QAAQ,CAACC,sBACR,KAACC;YAAIC,WAAU;sBACd,cAAA,MAACjB;gBAAKkB,cAAa;gBAAW,GAAGH,KAAK;;kCACrC,MAACZ;;0CACA,KAACE;gCAAYc,OAAM;0CAAU;;0CAC7B,KAACd;gCAAYc,OAAM;0CAAW;;;;kCAE/B,KAACjB;wBAAYiB,OAAM;kCAClB,cAAA,MAAC3B;;8CACA,MAACI;;sDACA,KAACC;sDAAU;;sDACX,KAACH;sDAAgB;;;;8CAKlB,MAACD;oCAAYwB,WAAU;;sDACtB,MAACD;4CAAIC,WAAU;;8DACd,KAAClB;oDAAMqB,SAAQ;8DAAiB;;8DAChC,KAACtB;oDAAMuB,IAAG;oDAAiBH,cAAa;;;;s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;gCAAKb,WAAU;;kDACf,KAACa;wCAAKb,WAAU;kDAAsB;;kDACtC,KAACa;kDAAK;;;;;;;8BAIT,KAAC7B;oBAAc2B,SAASJ;;8BACxB,KAACpB;oBACA2B,MAAM;wBACL;4BACCV,IAAI;4BACJW,uBACC,MAACF;gCAAKb,WAAU;;kDACf,KAACa;wCAAKb,WAAU;kDAAqB;;kDACrC,KAACa;kDAAK;;;;wBAGT;wBACA;4BACCT,IAAI;4BACJW,uBACC,MAACF;gCAAKb,WAAU;;kDACf,KAACa;wCAAKb,WAAU;kDAAsB;;kDACtC,KAACa;kDAAK;;;;wBAGT;wBACA;4BACCT,IAAI;4BACJW,uBACC,MAACF;gCAAKb,WAAU;;kDACf,KAACa;wCAAKb,WAAU;kDAAsB;;kDACtC,KAACa;kDAAK;;;;wBAGT;qBACA;;;;AAIL,EAAkB"}
@@ -1 +1 @@
1
- {"version":3,"file":"textarea.d.ts","sourceRoot":"","sources":["../../../../../src/shadcn/components/ui/textarea.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAC;AAIpC,iBAAS,QAAQ,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,UAAU,CAAC,2CAW1E;AAED,OAAO,EAAE,QAAQ,EAAE,CAAC"}
1
+ {"version":3,"file":"textarea.d.ts","sourceRoot":"","sources":["../../../../../src/shadcn/components/ui/textarea.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAC;AA6CpC,iBAAS,QAAQ,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,UAAU,CAAC,2CAQ1E;AAED,OAAO,EAAE,QAAQ,EAAE,CAAC"}
@@ -1,9 +1,23 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { cn } from "../../lib/utils.js";
3
+ // Textarea styles
4
+ const textareaStyles = cn(// Layout
5
+ "flex", "w-full", "min-h-16", "field-sizing-content", // Shape
6
+ "rounded-md", // Borders
7
+ "border", "border-border-primary", // Background & Colors
8
+ "bg-transparent", "text-base", // Spacing
9
+ "px-3", "py-2", // Typography
10
+ "md:text-sm", // Placeholder
11
+ "placeholder:text-text-tertiary", // Transitions
12
+ "transition-[color,box-shadow]", "outline-none", // Hover
13
+ "hover:border-border-primary_hover", // Focus
14
+ "focus-visible:border-border-link", "focus-visible:ring-2", "focus-visible:ring-utility-blue/70", // Invalid
15
+ "aria-invalid:border-border-error", "aria-invalid:ring-2", "aria-invalid:ring-utility-red/70", // Disabled
16
+ "disabled:cursor-not-allowed", "disabled:opacity-50", "disabled:border-border-disabled");
3
17
  function Textarea({ className, ...props }) {
4
18
  return /*#__PURE__*/ _jsx("textarea", {
5
19
  "data-slot": "textarea",
6
- className: cn("border-input placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 flex field-sizing-content min-h-16 w-full rounded-md border bg-transparent px-3 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 md:text-sm", className),
20
+ className: cn(textareaStyles, className),
7
21
  ...props
8
22
  });
9
23
  }
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../src/shadcn/components/ui/textarea.tsx"],"sourcesContent":["import type * as React from \"react\";\n\nimport { cn } from \"#shadcn/lib/utils\";\n\nfunction Textarea({ className, ...props }: React.ComponentProps<\"textarea\">) {\n\treturn (\n\t\t<textarea\n\t\t\tdata-slot=\"textarea\"\n\t\t\tclassName={cn(\n\t\t\t\t\"border-input placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 flex field-sizing-content min-h-16 w-full rounded-md border bg-transparent px-3 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 md:text-sm\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nexport { Textarea };\n"],"names":["cn","Textarea","className","props","textarea","data-slot"],"mappings":";AAEA,SAASA,EAAE,QAAQ,qBAAoB;AAEvC,SAASC,SAAS,EAAEC,SAAS,EAAE,GAAGC,OAAyC;IAC1E,qBACC,KAACC;QACAC,aAAU;QACVH,WAAWF,GACV,ucACAE;QAEA,GAAGC,KAAK;;AAGZ;AAEA,SAASF,QAAQ,GAAG"}
1
+ {"version":3,"sources":["../../../../../src/shadcn/components/ui/textarea.tsx"],"sourcesContent":["import type * as React from \"react\";\n\nimport { cn } from \"#shadcn/lib/utils\";\n\n// Textarea styles\nconst textareaStyles = cn(\n\t// Layout\n\t\"flex\",\n\t\"w-full\",\n\t\"min-h-16\",\n\t\"field-sizing-content\",\n\t// Shape\n\t\"rounded-md\",\n\t// Borders\n\t\"border\",\n\t\"border-border-primary\",\n\t// Background & Colors\n\t\"bg-transparent\",\n\t\"text-base\",\n\t// Spacing\n\t\"px-3\",\n\t\"py-2\",\n\t// Typography\n\t\"md:text-sm\",\n\t// Placeholder\n\t\"placeholder:text-text-tertiary\",\n\t// Transitions\n\t\"transition-[color,box-shadow]\",\n\t\"outline-none\",\n\t// Hover\n\t\"hover:border-border-primary_hover\",\n\t// Focus\n\t\"focus-visible:border-border-link\",\n\t\"focus-visible:ring-2\",\n\t\"focus-visible:ring-utility-blue/70\",\n\t// Invalid\n\t\"aria-invalid:border-border-error\",\n\t\"aria-invalid:ring-2\",\n\t\"aria-invalid:ring-utility-red/70\",\n\t// Disabled\n\t\"disabled:cursor-not-allowed\",\n\t\"disabled:opacity-50\",\n\t\"disabled:border-border-disabled\",\n);\n\nfunction Textarea({ className, ...props }: React.ComponentProps<\"textarea\">) {\n\treturn (\n\t\t<textarea\n\t\t\tdata-slot=\"textarea\"\n\t\t\tclassName={cn(textareaStyles, className)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nexport { Textarea };\n"],"names":["cn","textareaStyles","Textarea","className","props","textarea","data-slot"],"mappings":";AAEA,SAASA,EAAE,QAAQ,qBAAoB;AAEvC,kBAAkB;AAClB,MAAMC,iBAAiBD,GACtB,SAAS;AACT,QACA,UACA,YACA,wBACA,QAAQ;AACR,cACA,UAAU;AACV,UACA,yBACA,sBAAsB;AACtB,kBACA,aACA,UAAU;AACV,QACA,QACA,aAAa;AACb,cACA,cAAc;AACd,kCACA,cAAc;AACd,iCACA,gBACA,QAAQ;AACR,qCACA,QAAQ;AACR,oCACA,wBACA,sCACA,UAAU;AACV,oCACA,uBACA,oCACA,WAAW;AACX,+BACA,uBACA;AAGD,SAASE,SAAS,EAAEC,SAAS,EAAE,GAAGC,OAAyC;IAC1E,qBACC,KAACC;QACAC,aAAU;QACVH,WAAWH,GAAGC,gBAAgBE;QAC7B,GAAGC,KAAK;;AAGZ;AAEA,SAASF,QAAQ,GAAG"}
@@ -1 +1 @@
1
- {"version":3,"file":"toggle-group.d.ts","sourceRoot":"","sources":["../../../../../src/shadcn/components/ui/toggle-group.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,oBAAoB,MAAM,8BAA8B,CAAC;AACrE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAC7D,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAU9D,iBAAS,WAAW,CAAC,EACpB,SAAS,EACT,OAAO,EACP,IAAI,EACJ,QAAQ,EACR,GAAG,KAAK,EACR,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,oBAAoB,CAAC,IAAI,CAAC,GACxD,YAAY,CAAC,OAAO,cAAc,CAAC,2CAiBnC;AAED,iBAAS,eAAe,CAAC,EACxB,SAAS,EACT,QAAQ,EACR,OAAO,EACP,IAAI,EACJ,GAAG,KAAK,EACR,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,oBAAoB,CAAC,IAAI,CAAC,GACxD,YAAY,CAAC,OAAO,cAAc,CAAC,2CAqBnC;AAED,OAAO,EAAE,WAAW,EAAE,eAAe,EAAE,CAAC"}
1
+ {"version":3,"file":"toggle-group.d.ts","sourceRoot":"","sources":["../../../../../src/shadcn/components/ui/toggle-group.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,oBAAoB,MAAM,8BAA8B,CAAC;AACrE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAC7D,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAmC9D,iBAAS,WAAW,CAAC,EACpB,SAAS,EACT,OAAO,EACP,IAAI,EACJ,QAAQ,EACR,GAAG,KAAK,EACR,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,oBAAoB,CAAC,IAAI,CAAC,GACxD,YAAY,CAAC,OAAO,cAAc,CAAC,2CAcnC;AAED,iBAAS,eAAe,CAAC,EACxB,SAAS,EACT,QAAQ,EACR,OAAO,EACP,IAAI,EACJ,GAAG,KAAK,EACR,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,oBAAoB,CAAC,IAAI,CAAC,GACxD,YAAY,CAAC,OAAO,cAAc,CAAC,2CAqBnC;AAED,OAAO,EAAE,WAAW,EAAE,eAAe,EAAE,CAAC"}
@@ -4,6 +4,10 @@ import * as ToggleGroupPrimitive from "@radix-ui/react-toggle-group";
4
4
  import * as React from "react";
5
5
  import { toggleVariants } from "./toggle.js";
6
6
  import { cn } from "../../lib/utils.js";
7
+ // Toggle group styles
8
+ const toggleGroupStyles = cn("group/toggle-group", "flex", "w-fit", "items-center", "rounded-md", "data-[variant=outline]:shadow-xs");
9
+ // Toggle group item styles
10
+ const toggleGroupItemStyles = cn("min-w-0", "flex-1", "shrink-0", "rounded-none", "shadow-none", "first:rounded-l-md", "last:rounded-r-md", "focus:z-10", "focus-visible:z-10", "data-[variant=outline]:border-l-0", "data-[variant=outline]:first:border-l");
7
11
  const ToggleGroupContext = /*#__PURE__*/ React.createContext({
8
12
  size: "default",
9
13
  variant: "default"
@@ -13,7 +17,7 @@ function ToggleGroup({ className, variant, size, children, ...props }) {
13
17
  "data-slot": "toggle-group",
14
18
  "data-variant": variant,
15
19
  "data-size": size,
16
- className: cn("group/toggle-group flex w-fit items-center rounded-md data-[variant=outline]:shadow-xs", className),
20
+ className: cn(toggleGroupStyles, className),
17
21
  ...props,
18
22
  children: /*#__PURE__*/ _jsx(ToggleGroupContext.Provider, {
19
23
  value: {
@@ -33,7 +37,7 @@ function ToggleGroupItem({ className, children, variant, size, ...props }) {
33
37
  className: cn(toggleVariants({
34
38
  variant: context.variant || variant,
35
39
  size: context.size || size
36
- }), "min-w-0 flex-1 shrink-0 rounded-none shadow-none first:rounded-l-md last:rounded-r-md focus:z-10 focus-visible:z-10 data-[variant=outline]:border-l-0 data-[variant=outline]:first:border-l", className),
40
+ }), toggleGroupItemStyles, className),
37
41
  ...props,
38
42
  children: children
39
43
  });
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../src/shadcn/components/ui/toggle-group.tsx"],"sourcesContent":["\"use client\";\nimport * as ToggleGroupPrimitive from \"@radix-ui/react-toggle-group\";\nimport type { VariantProps } from \"class-variance-authority\";\nimport * as React from \"react\";\nimport { toggleVariants } from \"#shadcn/components/ui/toggle\";\nimport { cn } from \"#shadcn/lib/utils\";\n\nconst ToggleGroupContext = React.createContext<\n\tVariantProps<typeof toggleVariants>\n>({\n\tsize: \"default\",\n\tvariant: \"default\",\n});\n\nfunction ToggleGroup({\n\tclassName,\n\tvariant,\n\tsize,\n\tchildren,\n\t...props\n}: React.ComponentProps<typeof ToggleGroupPrimitive.Root> &\n\tVariantProps<typeof toggleVariants>) {\n\treturn (\n\t\t<ToggleGroupPrimitive.Root\n\t\t\tdata-slot=\"toggle-group\"\n\t\t\tdata-variant={variant}\n\t\t\tdata-size={size}\n\t\t\tclassName={cn(\n\t\t\t\t\"group/toggle-group flex w-fit items-center rounded-md data-[variant=outline]:shadow-xs\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t>\n\t\t\t<ToggleGroupContext.Provider value={{ variant, size }}>\n\t\t\t\t{children}\n\t\t\t</ToggleGroupContext.Provider>\n\t\t</ToggleGroupPrimitive.Root>\n\t);\n}\n\nfunction ToggleGroupItem({\n\tclassName,\n\tchildren,\n\tvariant,\n\tsize,\n\t...props\n}: React.ComponentProps<typeof ToggleGroupPrimitive.Item> &\n\tVariantProps<typeof toggleVariants>) {\n\tconst context = React.useContext(ToggleGroupContext);\n\n\treturn (\n\t\t<ToggleGroupPrimitive.Item\n\t\t\tdata-slot=\"toggle-group-item\"\n\t\t\tdata-variant={context.variant || variant}\n\t\t\tdata-size={context.size || size}\n\t\t\tclassName={cn(\n\t\t\t\ttoggleVariants({\n\t\t\t\t\tvariant: context.variant || variant,\n\t\t\t\t\tsize: context.size || size,\n\t\t\t\t}),\n\t\t\t\t\"min-w-0 flex-1 shrink-0 rounded-none shadow-none first:rounded-l-md last:rounded-r-md focus:z-10 focus-visible:z-10 data-[variant=outline]:border-l-0 data-[variant=outline]:first:border-l\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t>\n\t\t\t{children}\n\t\t</ToggleGroupPrimitive.Item>\n\t);\n}\n\nexport { ToggleGroup, ToggleGroupItem };\n"],"names":["ToggleGroupPrimitive","React","toggleVariants","cn","ToggleGroupContext","createContext","size","variant","ToggleGroup","className","children","props","Root","data-slot","data-variant","data-size","Provider","value","ToggleGroupItem","context","useContext","Item"],"mappings":"AAAA;;AACA,YAAYA,0BAA0B,+BAA+B;AAErE,YAAYC,WAAW,QAAQ;AAC/B,SAASC,cAAc,QAAQ,cAA+B;AAC9D,SAASC,EAAE,QAAQ,qBAAoB;AAEvC,MAAMC,mCAAqBH,MAAMI,aAAa,CAE5C;IACDC,MAAM;IACNC,SAAS;AACV;AAEA,SAASC,YAAY,EACpBC,SAAS,EACTF,OAAO,EACPD,IAAI,EACJI,QAAQ,EACR,GAAGC,OAEgC;IACnC,qBACC,KAACX,qBAAqBY,IAAI;QACzBC,aAAU;QACVC,gBAAcP;QACdQ,aAAWT;QACXG,WAAWN,GACV,0FACAM;QAEA,GAAGE,KAAK;kBAET,cAAA,KAACP,mBAAmBY,QAAQ;YAACC,OAAO;gBAAEV;gBAASD;YAAK;sBAClDI;;;AAIL;AAEA,SAASQ,gBAAgB,EACxBT,SAAS,EACTC,QAAQ,EACRH,OAAO,EACPD,IAAI,EACJ,GAAGK,OAEgC;IACnC,MAAMQ,UAAUlB,MAAMmB,UAAU,CAAChB;IAEjC,qBACC,KAACJ,qBAAqBqB,IAAI;QACzBR,aAAU;QACVC,gBAAcK,QAAQZ,OAAO,IAAIA;QACjCQ,aAAWI,QAAQb,IAAI,IAAIA;QAC3BG,WAAWN,GACVD,eAAe;YACdK,SAASY,QAAQZ,OAAO,IAAIA;YAC5BD,MAAMa,QAAQb,IAAI,IAAIA;QACvB,IACA,+LACAG;QAEA,GAAGE,KAAK;kBAERD;;AAGJ;AAEA,SAASF,WAAW,EAAEU,eAAe,GAAG"}
1
+ {"version":3,"sources":["../../../../../src/shadcn/components/ui/toggle-group.tsx"],"sourcesContent":["\"use client\";\nimport * as ToggleGroupPrimitive from \"@radix-ui/react-toggle-group\";\nimport type { VariantProps } from \"class-variance-authority\";\nimport * as React from \"react\";\nimport { toggleVariants } from \"#shadcn/components/ui/toggle\";\nimport { cn } from \"#shadcn/lib/utils\";\n\n// Toggle group styles\nconst toggleGroupStyles = cn(\n\t\"group/toggle-group\",\n\t\"flex\",\n\t\"w-fit\",\n\t\"items-center\",\n\t\"rounded-md\",\n\t\"data-[variant=outline]:shadow-xs\",\n);\n\n// Toggle group item styles\nconst toggleGroupItemStyles = cn(\n\t\"min-w-0\",\n\t\"flex-1\",\n\t\"shrink-0\",\n\t\"rounded-none\",\n\t\"shadow-none\",\n\t\"first:rounded-l-md\",\n\t\"last:rounded-r-md\",\n\t\"focus:z-10\",\n\t\"focus-visible:z-10\",\n\t\"data-[variant=outline]:border-l-0\",\n\t\"data-[variant=outline]:first:border-l\",\n);\n\nconst ToggleGroupContext = React.createContext<\n\tVariantProps<typeof toggleVariants>\n>({\n\tsize: \"default\",\n\tvariant: \"default\",\n});\n\nfunction ToggleGroup({\n\tclassName,\n\tvariant,\n\tsize,\n\tchildren,\n\t...props\n}: React.ComponentProps<typeof ToggleGroupPrimitive.Root> &\n\tVariantProps<typeof toggleVariants>) {\n\treturn (\n\t\t<ToggleGroupPrimitive.Root\n\t\t\tdata-slot=\"toggle-group\"\n\t\t\tdata-variant={variant}\n\t\t\tdata-size={size}\n\t\t\tclassName={cn(toggleGroupStyles, className)}\n\t\t\t{...props}\n\t\t>\n\t\t\t<ToggleGroupContext.Provider value={{ variant, size }}>\n\t\t\t\t{children}\n\t\t\t</ToggleGroupContext.Provider>\n\t\t</ToggleGroupPrimitive.Root>\n\t);\n}\n\nfunction ToggleGroupItem({\n\tclassName,\n\tchildren,\n\tvariant,\n\tsize,\n\t...props\n}: React.ComponentProps<typeof ToggleGroupPrimitive.Item> &\n\tVariantProps<typeof toggleVariants>) {\n\tconst context = React.useContext(ToggleGroupContext);\n\n\treturn (\n\t\t<ToggleGroupPrimitive.Item\n\t\t\tdata-slot=\"toggle-group-item\"\n\t\t\tdata-variant={context.variant || variant}\n\t\t\tdata-size={context.size || size}\n\t\t\tclassName={cn(\n\t\t\t\ttoggleVariants({\n\t\t\t\t\tvariant: context.variant || variant,\n\t\t\t\t\tsize: context.size || size,\n\t\t\t\t}),\n\t\t\t\ttoggleGroupItemStyles,\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t>\n\t\t\t{children}\n\t\t</ToggleGroupPrimitive.Item>\n\t);\n}\n\nexport { ToggleGroup, ToggleGroupItem };\n"],"names":["ToggleGroupPrimitive","React","toggleVariants","cn","toggleGroupStyles","toggleGroupItemStyles","ToggleGroupContext","createContext","size","variant","ToggleGroup","className","children","props","Root","data-slot","data-variant","data-size","Provider","value","ToggleGroupItem","context","useContext","Item"],"mappings":"AAAA;;AACA,YAAYA,0BAA0B,+BAA+B;AAErE,YAAYC,WAAW,QAAQ;AAC/B,SAASC,cAAc,QAAQ,cAA+B;AAC9D,SAASC,EAAE,QAAQ,qBAAoB;AAEvC,sBAAsB;AACtB,MAAMC,oBAAoBD,GACzB,sBACA,QACA,SACA,gBACA,cACA;AAGD,2BAA2B;AAC3B,MAAME,wBAAwBF,GAC7B,WACA,UACA,YACA,gBACA,eACA,sBACA,qBACA,cACA,sBACA,qCACA;AAGD,MAAMG,mCAAqBL,MAAMM,aAAa,CAE5C;IACDC,MAAM;IACNC,SAAS;AACV;AAEA,SAASC,YAAY,EACpBC,SAAS,EACTF,OAAO,EACPD,IAAI,EACJI,QAAQ,EACR,GAAGC,OAEgC;IACnC,qBACC,KAACb,qBAAqBc,IAAI;QACzBC,aAAU;QACVC,gBAAcP;QACdQ,aAAWT;QACXG,WAAWR,GAAGC,mBAAmBO;QAChC,GAAGE,KAAK;kBAET,cAAA,KAACP,mBAAmBY,QAAQ;YAACC,OAAO;gBAAEV;gBAASD;YAAK;sBAClDI;;;AAIL;AAEA,SAASQ,gBAAgB,EACxBT,SAAS,EACTC,QAAQ,EACRH,OAAO,EACPD,IAAI,EACJ,GAAGK,OAEgC;IACnC,MAAMQ,UAAUpB,MAAMqB,UAAU,CAAChB;IAEjC,qBACC,KAACN,qBAAqBuB,IAAI;QACzBR,aAAU;QACVC,gBAAcK,QAAQZ,OAAO,IAAIA;QACjCQ,aAAWI,QAAQb,IAAI,IAAIA;QAC3BG,WAAWR,GACVD,eAAe;YACdO,SAASY,QAAQZ,OAAO,IAAIA;YAC5BD,MAAMa,QAAQb,IAAI,IAAIA;QACvB,IACAH,uBACAM;QAEA,GAAGE,KAAK;kBAERD;;AAGJ;AAEA,SAASF,WAAW,EAAEU,eAAe,GAAG"}
@@ -1 +1 @@
1
- {"version":3,"file":"toggle.d.ts","sourceRoot":"","sources":["../../../../../src/shadcn/components/ui/toggle.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,eAAe,MAAM,wBAAwB,CAAC;AAC1D,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAC;AAIpC,QAAA,MAAM,cAAc;;;8EAoBnB,CAAC;AAEF,iBAAS,MAAM,CAAC,EACf,SAAS,EACT,OAAO,EACP,IAAI,EACJ,GAAG,KAAK,EACR,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,eAAe,CAAC,IAAI,CAAC,GACnD,YAAY,CAAC,OAAO,cAAc,CAAC,2CAQnC;AAED,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,CAAC"}
1
+ {"version":3,"file":"toggle.d.ts","sourceRoot":"","sources":["../../../../../src/shadcn/components/ui/toggle.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,eAAe,MAAM,wBAAwB,CAAC;AAC1D,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAC;AA0CpC,QAAA,MAAM,cAAc;;;8EAuBlB,CAAC;AAEH,iBAAS,MAAM,CAAC,EACf,SAAS,EACT,OAAO,EACP,IAAI,EACJ,GAAG,KAAK,EACR,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,eAAe,CAAC,IAAI,CAAC,GACnD,YAAY,CAAC,OAAO,cAAc,CAAC,2CAQnC;AAED,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,CAAC"}
@@ -2,16 +2,28 @@ import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import * as TogglePrimitive from "@radix-ui/react-toggle";
3
3
  import { cva } from "class-variance-authority";
4
4
  import { cn } from "../../lib/utils.js";
5
- const toggleVariants = cva("inline-flex items-center justify-center gap-2 rounded-md text-sm font-medium hover:bg-muted hover:text-muted-foreground disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 [&_svg]:shrink-0 focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] outline-none transition-[color,box-shadow] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive whitespace-nowrap", {
5
+ // Base toggle styles
6
+ const baseToggleStyles = cn(// Layout
7
+ "inline-flex", "items-center", "justify-center", "gap-2", "whitespace-nowrap", // Shape
8
+ "rounded-md", // Typography
9
+ "text-sm", "font-medium", // Interaction
10
+ "outline-none", "transition-[color,box-shadow]", // Hover
11
+ "hover:bg-bg-tertiary", "hover:text-text-secondary", // Pressed/On state
12
+ "data-[state=on]:bg-bg-secondary", "data-[state=on]:text-text-primary", // Disabled
13
+ "disabled:pointer-events-none", "disabled:opacity-50", // SVG icons
14
+ "[&_svg]:pointer-events-none", "[&_svg:not([class*='size-'])]:size-4", "[&_svg]:shrink-0", // Focus
15
+ "focus-visible:ring-2", "focus-visible:ring-utility-blue/70", // Invalid
16
+ "aria-invalid:ring-2", "aria-invalid:ring-utility-red/70", "aria-invalid:border-border-error");
17
+ const toggleVariants = cva(baseToggleStyles, {
6
18
  variants: {
7
19
  variant: {
8
- default: "bg-transparent",
9
- outline: "border border-input bg-transparent shadow-xs hover:bg-accent hover:text-accent-foreground"
20
+ default: cn("bg-transparent"),
21
+ outline: cn("border", "border-border-primary", "bg-transparent", "shadow-xs", "hover:bg-bg-secondary", "hover:text-text-primary")
10
22
  },
11
23
  size: {
12
- default: "h-9 px-2 min-w-9",
13
- sm: "h-8 px-1.5 min-w-8",
14
- lg: "h-10 px-2.5 min-w-10"
24
+ default: cn("h-9", "px-2", "min-w-9"),
25
+ sm: cn("h-8", "px-1.5", "min-w-8"),
26
+ lg: cn("h-10", "px-2.5", "min-w-10")
15
27
  }
16
28
  },
17
29
  defaultVariants: {
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../src/shadcn/components/ui/toggle.tsx"],"sourcesContent":["import * as TogglePrimitive from \"@radix-ui/react-toggle\";\nimport { cva, type VariantProps } from \"class-variance-authority\";\nimport type * as React from \"react\";\n\nimport { cn } from \"#shadcn/lib/utils\";\n\nconst toggleVariants = cva(\n\t\"inline-flex items-center justify-center gap-2 rounded-md text-sm font-medium hover:bg-muted hover:text-muted-foreground disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 [&_svg]:shrink-0 focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] outline-none transition-[color,box-shadow] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive whitespace-nowrap\",\n\t{\n\t\tvariants: {\n\t\t\tvariant: {\n\t\t\t\tdefault: \"bg-transparent\",\n\t\t\t\toutline:\n\t\t\t\t\t\"border border-input bg-transparent shadow-xs hover:bg-accent hover:text-accent-foreground\",\n\t\t\t},\n\t\t\tsize: {\n\t\t\t\tdefault: \"h-9 px-2 min-w-9\",\n\t\t\t\tsm: \"h-8 px-1.5 min-w-8\",\n\t\t\t\tlg: \"h-10 px-2.5 min-w-10\",\n\t\t\t},\n\t\t},\n\t\tdefaultVariants: {\n\t\t\tvariant: \"default\",\n\t\t\tsize: \"default\",\n\t\t},\n\t},\n);\n\nfunction Toggle({\n\tclassName,\n\tvariant,\n\tsize,\n\t...props\n}: React.ComponentProps<typeof TogglePrimitive.Root> &\n\tVariantProps<typeof toggleVariants>) {\n\treturn (\n\t\t<TogglePrimitive.Root\n\t\t\tdata-slot=\"toggle\"\n\t\t\tclassName={cn(toggleVariants({ variant, size, className }))}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nexport { Toggle, toggleVariants };\n"],"names":["TogglePrimitive","cva","cn","toggleVariants","variants","variant","default","outline","size","sm","lg","defaultVariants","Toggle","className","props","Root","data-slot"],"mappings":";AAAA,YAAYA,qBAAqB,yBAAyB;AAC1D,SAASC,GAAG,QAA2B,2BAA2B;AAGlE,SAASC,EAAE,QAAQ,qBAAoB;AAEvC,MAAMC,iBAAiBF,IACtB,ijBACA;IACCG,UAAU;QACTC,SAAS;YACRC,SAAS;YACTC,SACC;QACF;QACAC,MAAM;YACLF,SAAS;YACTG,IAAI;YACJC,IAAI;QACL;IACD;IACAC,iBAAiB;QAChBN,SAAS;QACTG,MAAM;IACP;AACD;AAGD,SAASI,OAAO,EACfC,SAAS,EACTR,OAAO,EACPG,IAAI,EACJ,GAAGM,OAEgC;IACnC,qBACC,KAACd,gBAAgBe,IAAI;QACpBC,aAAU;QACVH,WAAWX,GAAGC,eAAe;YAAEE;YAASG;YAAMK;QAAU;QACvD,GAAGC,KAAK;;AAGZ;AAEA,SAASF,MAAM,EAAET,cAAc,GAAG"}
1
+ {"version":3,"sources":["../../../../../src/shadcn/components/ui/toggle.tsx"],"sourcesContent":["import * as TogglePrimitive from \"@radix-ui/react-toggle\";\nimport { cva, type VariantProps } from \"class-variance-authority\";\nimport type * as React from \"react\";\n\nimport { cn } from \"#shadcn/lib/utils\";\n\n// Base toggle styles\nconst baseToggleStyles = cn(\n\t// Layout\n\t\"inline-flex\",\n\t\"items-center\",\n\t\"justify-center\",\n\t\"gap-2\",\n\t\"whitespace-nowrap\",\n\t// Shape\n\t\"rounded-md\",\n\t// Typography\n\t\"text-sm\",\n\t\"font-medium\",\n\t// Interaction\n\t\"outline-none\",\n\t\"transition-[color,box-shadow]\",\n\t// Hover\n\t\"hover:bg-bg-tertiary\",\n\t\"hover:text-text-secondary\",\n\t// Pressed/On state\n\t\"data-[state=on]:bg-bg-secondary\",\n\t\"data-[state=on]:text-text-primary\",\n\t// Disabled\n\t\"disabled:pointer-events-none\",\n\t\"disabled:opacity-50\",\n\t// SVG icons\n\t\"[&_svg]:pointer-events-none\",\n\t\"[&_svg:not([class*='size-'])]:size-4\",\n\t\"[&_svg]:shrink-0\",\n\t// Focus\n\t\"focus-visible:ring-2\",\n\t\"focus-visible:ring-utility-blue/70\",\n\t// Invalid\n\t\"aria-invalid:ring-2\",\n\t\"aria-invalid:ring-utility-red/70\",\n\t\"aria-invalid:border-border-error\",\n);\n\nconst toggleVariants = cva(baseToggleStyles, {\n\tvariants: {\n\t\tvariant: {\n\t\t\tdefault: cn(\"bg-transparent\"),\n\t\t\toutline: cn(\n\t\t\t\t\"border\",\n\t\t\t\t\"border-border-primary\",\n\t\t\t\t\"bg-transparent\",\n\t\t\t\t\"shadow-xs\",\n\t\t\t\t\"hover:bg-bg-secondary\",\n\t\t\t\t\"hover:text-text-primary\",\n\t\t\t),\n\t\t},\n\t\tsize: {\n\t\t\tdefault: cn(\"h-9\", \"px-2\", \"min-w-9\"),\n\t\t\tsm: cn(\"h-8\", \"px-1.5\", \"min-w-8\"),\n\t\t\tlg: cn(\"h-10\", \"px-2.5\", \"min-w-10\"),\n\t\t},\n\t},\n\tdefaultVariants: {\n\t\tvariant: \"default\",\n\t\tsize: \"default\",\n\t},\n});\n\nfunction Toggle({\n\tclassName,\n\tvariant,\n\tsize,\n\t...props\n}: React.ComponentProps<typeof TogglePrimitive.Root> &\n\tVariantProps<typeof toggleVariants>) {\n\treturn (\n\t\t<TogglePrimitive.Root\n\t\t\tdata-slot=\"toggle\"\n\t\t\tclassName={cn(toggleVariants({ variant, size, className }))}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nexport { Toggle, toggleVariants };\n"],"names":["TogglePrimitive","cva","cn","baseToggleStyles","toggleVariants","variants","variant","default","outline","size","sm","lg","defaultVariants","Toggle","className","props","Root","data-slot"],"mappings":";AAAA,YAAYA,qBAAqB,yBAAyB;AAC1D,SAASC,GAAG,QAA2B,2BAA2B;AAGlE,SAASC,EAAE,QAAQ,qBAAoB;AAEvC,qBAAqB;AACrB,MAAMC,mBAAmBD,GACxB,SAAS;AACT,eACA,gBACA,kBACA,SACA,qBACA,QAAQ;AACR,cACA,aAAa;AACb,WACA,eACA,cAAc;AACd,gBACA,iCACA,QAAQ;AACR,wBACA,6BACA,mBAAmB;AACnB,mCACA,qCACA,WAAW;AACX,gCACA,uBACA,YAAY;AACZ,+BACA,wCACA,oBACA,QAAQ;AACR,wBACA,sCACA,UAAU;AACV,uBACA,oCACA;AAGD,MAAME,iBAAiBH,IAAIE,kBAAkB;IAC5CE,UAAU;QACTC,SAAS;YACRC,SAASL,GAAG;YACZM,SAASN,GACR,UACA,yBACA,kBACA,aACA,yBACA;QAEF;QACAO,MAAM;YACLF,SAASL,GAAG,OAAO,QAAQ;YAC3BQ,IAAIR,GAAG,OAAO,UAAU;YACxBS,IAAIT,GAAG,QAAQ,UAAU;QAC1B;IACD;IACAU,iBAAiB;QAChBN,SAAS;QACTG,MAAM;IACP;AACD;AAEA,SAASI,OAAO,EACfC,SAAS,EACTR,OAAO,EACPG,IAAI,EACJ,GAAGM,OAEgC;IACnC,qBACC,KAACf,gBAAgBgB,IAAI;QACpBC,aAAU;QACVH,WAAWZ,GAAGE,eAAe;YAAEE;YAASG;YAAMK;QAAU;QACvD,GAAGC,KAAK;;AAGZ;AAEA,SAASF,MAAM,EAAET,cAAc,GAAG"}
@@ -1 +1 @@
1
- {"version":3,"file":"tooltip.d.ts","sourceRoot":"","sources":["../../../../../src/shadcn/components/ui/tooltip.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,gBAAgB,MAAM,yBAAyB,CAAC;AAC5D,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAC;AAIpC,iBAAS,eAAe,CAAC,EACxB,aAAiB,EACjB,GAAG,KAAK,EACR,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,gBAAgB,CAAC,QAAQ,CAAC,2CAQxD;AAED,iBAAS,OAAO,CAAC,EAChB,GAAG,KAAK,EACR,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,gBAAgB,CAAC,IAAI,CAAC,2CAMpD;AAED,iBAAS,cAAc,CAAC,EACvB,GAAG,KAAK,EACR,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,gBAAgB,CAAC,OAAO,CAAC,2CAEvD;AAED,iBAAS,cAAc,CAAC,EACvB,SAAS,EACT,UAAc,EACd,QAAQ,EACR,GAAG,KAAK,EACR,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,gBAAgB,CAAC,OAAO,CAAC,2CAoBvD;AAED,OAAO,EAAE,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,eAAe,EAAE,CAAC"}
1
+ {"version":3,"file":"tooltip.d.ts","sourceRoot":"","sources":["../../../../../src/shadcn/components/ui/tooltip.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,gBAAgB,MAAM,yBAAyB,CAAC;AAC5D,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAC;AAoCpC,iBAAS,eAAe,CAAC,EACxB,aAAiB,EACjB,GAAG,KAAK,EACR,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,gBAAgB,CAAC,QAAQ,CAAC,2CAQxD;AAED,iBAAS,OAAO,CAAC,EAChB,GAAG,KAAK,EACR,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,gBAAgB,CAAC,IAAI,CAAC,2CAMpD;AAED,iBAAS,cAAc,CAAC,EACvB,GAAG,KAAK,EACR,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,gBAAgB,CAAC,OAAO,CAAC,2CAEvD;AAED,iBAAS,cAAc,CAAC,EACvB,SAAS,EACT,UAAc,EACd,QAAQ,EACR,GAAG,KAAK,EACR,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,gBAAgB,CAAC,OAAO,CAAC,2CAavD;AAED,OAAO,EAAE,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,eAAe,EAAE,CAAC"}
@@ -2,6 +2,16 @@
2
2
  import { jsx as _jsx } from "react/jsx-runtime";
3
3
  import * as TooltipPrimitive from "@radix-ui/react-tooltip";
4
4
  import { cn } from "../../lib/utils.js";
5
+ // Tooltip content styles
6
+ const tooltipContentStyles = cn(// Layout
7
+ "z-50", "w-fit", "origin-(--radix-tooltip-content-transform-origin)", // Shape
8
+ "rounded-md", // Background & Colors
9
+ "bg-bg-overlay", "text-text-primary_on-brand", // Spacing
10
+ "px-3", "py-1.5", // Typography
11
+ "text-xs", "text-balance", // Animations - open
12
+ "animate-in", "fade-in-0", "zoom-in-95", // Animations - closed
13
+ "data-[state=closed]:animate-out", "data-[state=closed]:fade-out-0", "data-[state=closed]:zoom-out-95", // Slide animations
14
+ "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");
5
15
  function TooltipProvider({ delayDuration = 0, ...props }) {
6
16
  return /*#__PURE__*/ _jsx(TooltipPrimitive.Provider, {
7
17
  "data-slot": "tooltip-provider",
@@ -28,7 +38,7 @@ function TooltipContent({ className, sideOffset = 0, children, ...props }) {
28
38
  children: /*#__PURE__*/ _jsx(TooltipPrimitive.Content, {
29
39
  "data-slot": "tooltip-content",
30
40
  sideOffset: sideOffset,
31
- className: cn("bg-(--color-elements-assistive) text-(--color-elements-readable-inv) animate-in fade-in-0 zoom-in-95", "data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-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 z-50 w-fit origin-(--radix-tooltip-content-transform-origin) rounded-md", "px-3 py-1.5 text-xs text-balance", className),
41
+ className: cn(tooltipContentStyles, className),
32
42
  ...props,
33
43
  children: children
34
44
  })
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../src/shadcn/components/ui/tooltip.tsx"],"sourcesContent":["\"use client\";\nimport * as TooltipPrimitive from \"@radix-ui/react-tooltip\";\nimport type * as React from \"react\";\n\nimport { cn } from \"#shadcn/lib/utils\";\n\nfunction TooltipProvider({\n\tdelayDuration = 0,\n\t...props\n}: React.ComponentProps<typeof TooltipPrimitive.Provider>) {\n\treturn (\n\t\t<TooltipPrimitive.Provider\n\t\t\tdata-slot=\"tooltip-provider\"\n\t\t\tdelayDuration={delayDuration}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nfunction Tooltip({\n\t...props\n}: React.ComponentProps<typeof TooltipPrimitive.Root>) {\n\treturn (\n\t\t<TooltipProvider>\n\t\t\t<TooltipPrimitive.Root data-slot=\"tooltip\" {...props} />\n\t\t</TooltipProvider>\n\t);\n}\n\nfunction TooltipTrigger({\n\t...props\n}: React.ComponentProps<typeof TooltipPrimitive.Trigger>) {\n\treturn <TooltipPrimitive.Trigger data-slot=\"tooltip-trigger\" {...props} />;\n}\n\nfunction TooltipContent({\n\tclassName,\n\tsideOffset = 0,\n\tchildren,\n\t...props\n}: React.ComponentProps<typeof TooltipPrimitive.Content>) {\n\treturn (\n\t\t<TooltipPrimitive.Portal>\n\t\t\t<TooltipPrimitive.Content\n\t\t\t\tdata-slot=\"tooltip-content\"\n\t\t\t\tsideOffset={sideOffset}\n\t\t\t\tclassName={cn(\n\t\t\t\t\t\"bg-(--color-elements-assistive) text-(--color-elements-readable-inv) animate-in fade-in-0 zoom-in-95\",\n\t\t\t\t\t\"data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95\",\n\t\t\t\t\t\"data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2\",\n\t\t\t\t\t\"data-[side=top]:slide-in-from-bottom-2 z-50 w-fit origin-(--radix-tooltip-content-transform-origin) rounded-md\",\n\t\t\t\t\t\"px-3 py-1.5 text-xs text-balance\",\n\t\t\t\t\tclassName,\n\t\t\t\t)}\n\t\t\t\t{...props}\n\t\t\t>\n\t\t\t\t{children}\n\t\t\t</TooltipPrimitive.Content>\n\t\t</TooltipPrimitive.Portal>\n\t);\n}\n\nexport { Tooltip, TooltipTrigger, TooltipContent, TooltipProvider };\n"],"names":["TooltipPrimitive","cn","TooltipProvider","delayDuration","props","Provider","data-slot","Tooltip","Root","TooltipTrigger","Trigger","TooltipContent","className","sideOffset","children","Portal","Content"],"mappings":"AAAA;;AACA,YAAYA,sBAAsB,0BAA0B;AAG5D,SAASC,EAAE,QAAQ,qBAAoB;AAEvC,SAASC,gBAAgB,EACxBC,gBAAgB,CAAC,EACjB,GAAGC,OACqD;IACxD,qBACC,KAACJ,iBAAiBK,QAAQ;QACzBC,aAAU;QACVH,eAAeA;QACd,GAAGC,KAAK;;AAGZ;AAEA,SAASG,QAAQ,EAChB,GAAGH,OACiD;IACpD,qBACC,KAACF;kBACA,cAAA,KAACF,iBAAiBQ,IAAI;YAACF,aAAU;YAAW,GAAGF,KAAK;;;AAGvD;AAEA,SAASK,eAAe,EACvB,GAAGL,OACoD;IACvD,qBAAO,KAACJ,iBAAiBU,OAAO;QAACJ,aAAU;QAAmB,GAAGF,KAAK;;AACvE;AAEA,SAASO,eAAe,EACvBC,SAAS,EACTC,aAAa,CAAC,EACdC,QAAQ,EACR,GAAGV,OACoD;IACvD,qBACC,KAACJ,iBAAiBe,MAAM;kBACvB,cAAA,KAACf,iBAAiBgB,OAAO;YACxBV,aAAU;YACVO,YAAYA;YACZD,WAAWX,GACV,wGACA,kGACA,wHACA,kHACA,oCACAW;YAEA,GAAGR,KAAK;sBAERU;;;AAIL;AAEA,SAASP,OAAO,EAAEE,cAAc,EAAEE,cAAc,EAAET,eAAe,GAAG"}
1
+ {"version":3,"sources":["../../../../../src/shadcn/components/ui/tooltip.tsx"],"sourcesContent":["\"use client\";\nimport * as TooltipPrimitive from \"@radix-ui/react-tooltip\";\nimport type * as React from \"react\";\n\nimport { cn } from \"#shadcn/lib/utils\";\n\n// Tooltip content styles\nconst tooltipContentStyles = cn(\n\t// Layout\n\t\"z-50\",\n\t\"w-fit\",\n\t\"origin-(--radix-tooltip-content-transform-origin)\",\n\t// Shape\n\t\"rounded-md\",\n\t// Background & Colors\n\t\"bg-bg-overlay\",\n\t\"text-text-primary_on-brand\",\n\t// Spacing\n\t\"px-3\",\n\t\"py-1.5\",\n\t// Typography\n\t\"text-xs\",\n\t\"text-balance\",\n\t// Animations - open\n\t\"animate-in\",\n\t\"fade-in-0\",\n\t\"zoom-in-95\",\n\t// Animations - closed\n\t\"data-[state=closed]:animate-out\",\n\t\"data-[state=closed]:fade-out-0\",\n\t\"data-[state=closed]:zoom-out-95\",\n\t// Slide animations\n\t\"data-[side=bottom]:slide-in-from-top-2\",\n\t\"data-[side=left]:slide-in-from-right-2\",\n\t\"data-[side=right]:slide-in-from-left-2\",\n\t\"data-[side=top]:slide-in-from-bottom-2\",\n);\n\nfunction TooltipProvider({\n\tdelayDuration = 0,\n\t...props\n}: React.ComponentProps<typeof TooltipPrimitive.Provider>) {\n\treturn (\n\t\t<TooltipPrimitive.Provider\n\t\t\tdata-slot=\"tooltip-provider\"\n\t\t\tdelayDuration={delayDuration}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nfunction Tooltip({\n\t...props\n}: React.ComponentProps<typeof TooltipPrimitive.Root>) {\n\treturn (\n\t\t<TooltipProvider>\n\t\t\t<TooltipPrimitive.Root data-slot=\"tooltip\" {...props} />\n\t\t</TooltipProvider>\n\t);\n}\n\nfunction TooltipTrigger({\n\t...props\n}: React.ComponentProps<typeof TooltipPrimitive.Trigger>) {\n\treturn <TooltipPrimitive.Trigger data-slot=\"tooltip-trigger\" {...props} />;\n}\n\nfunction TooltipContent({\n\tclassName,\n\tsideOffset = 0,\n\tchildren,\n\t...props\n}: React.ComponentProps<typeof TooltipPrimitive.Content>) {\n\treturn (\n\t\t<TooltipPrimitive.Portal>\n\t\t\t<TooltipPrimitive.Content\n\t\t\t\tdata-slot=\"tooltip-content\"\n\t\t\t\tsideOffset={sideOffset}\n\t\t\t\tclassName={cn(tooltipContentStyles, className)}\n\t\t\t\t{...props}\n\t\t\t>\n\t\t\t\t{children}\n\t\t\t</TooltipPrimitive.Content>\n\t\t</TooltipPrimitive.Portal>\n\t);\n}\n\nexport { Tooltip, TooltipTrigger, TooltipContent, TooltipProvider };\n"],"names":["TooltipPrimitive","cn","tooltipContentStyles","TooltipProvider","delayDuration","props","Provider","data-slot","Tooltip","Root","TooltipTrigger","Trigger","TooltipContent","className","sideOffset","children","Portal","Content"],"mappings":"AAAA;;AACA,YAAYA,sBAAsB,0BAA0B;AAG5D,SAASC,EAAE,QAAQ,qBAAoB;AAEvC,yBAAyB;AACzB,MAAMC,uBAAuBD,GAC5B,SAAS;AACT,QACA,SACA,qDACA,QAAQ;AACR,cACA,sBAAsB;AACtB,iBACA,8BACA,UAAU;AACV,QACA,UACA,aAAa;AACb,WACA,gBACA,oBAAoB;AACpB,cACA,aACA,cACA,sBAAsB;AACtB,mCACA,kCACA,mCACA,mBAAmB;AACnB,0CACA,0CACA,0CACA;AAGD,SAASE,gBAAgB,EACxBC,gBAAgB,CAAC,EACjB,GAAGC,OACqD;IACxD,qBACC,KAACL,iBAAiBM,QAAQ;QACzBC,aAAU;QACVH,eAAeA;QACd,GAAGC,KAAK;;AAGZ;AAEA,SAASG,QAAQ,EAChB,GAAGH,OACiD;IACpD,qBACC,KAACF;kBACA,cAAA,KAACH,iBAAiBS,IAAI;YAACF,aAAU;YAAW,GAAGF,KAAK;;;AAGvD;AAEA,SAASK,eAAe,EACvB,GAAGL,OACoD;IACvD,qBAAO,KAACL,iBAAiBW,OAAO;QAACJ,aAAU;QAAmB,GAAGF,KAAK;;AACvE;AAEA,SAASO,eAAe,EACvBC,SAAS,EACTC,aAAa,CAAC,EACdC,QAAQ,EACR,GAAGV,OACoD;IACvD,qBACC,KAACL,iBAAiBgB,MAAM;kBACvB,cAAA,KAAChB,iBAAiBiB,OAAO;YACxBV,aAAU;YACVO,YAAYA;YACZD,WAAWZ,GAAGC,sBAAsBW;YACnC,GAAGR,KAAK;sBAERU;;;AAIL;AAEA,SAASP,OAAO,EAAEE,cAAc,EAAEE,cAAc,EAAET,eAAe,GAAG"}
@@ -0,0 +1,28 @@
1
+ import type { ItemInstance } from "@headless-tree/core";
2
+ import * as React from "react";
3
+ type WithMeta = {
4
+ meta?: {
5
+ lastNode?: boolean;
6
+ };
7
+ };
8
+ interface TreeProps extends React.HTMLAttributes<HTMLDivElement> {
9
+ indent?: number;
10
+ tree?: any;
11
+ }
12
+ declare function Tree({ indent, tree, className, ...props }: TreeProps): import("react/jsx-runtime").JSX.Element;
13
+ interface TreeItemProps<T = any> extends React.HTMLAttributes<HTMLButtonElement> {
14
+ item: ItemInstance<T>;
15
+ indent?: number;
16
+ asChild?: boolean;
17
+ }
18
+ declare function TreeItem<T = any>({ item, className, asChild, children, ...props }: Omit<TreeItemProps<T>, "indent">): import("react/jsx-runtime").JSX.Element;
19
+ interface TreeItemLabelProps<T = any> extends React.HTMLAttributes<HTMLSpanElement> {
20
+ hideChevron?: boolean;
21
+ disableHover?: boolean;
22
+ item?: ItemInstance<T>;
23
+ horizontalLines?: boolean;
24
+ }
25
+ declare function TreeItemLabel<T>({ item: propItem, children, className, disableHover, horizontalLines, hideChevron, ...props }: TreeItemLabelProps<T & WithMeta>): import("react/jsx-runtime").JSX.Element | null;
26
+ declare function TreeDragLine({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): import("react/jsx-runtime").JSX.Element | null;
27
+ export { Tree, TreeItem, TreeItemLabel, TreeDragLine, type ItemInstance };
28
+ //# sourceMappingURL=tree.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tree.d.ts","sourceRoot":"","sources":["../../../../../src/shadcn/components/ui/tree.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAGxD,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,KAAK,QAAQ,GAAG;IACf,IAAI,CAAC,EAAE;QACN,QAAQ,CAAC,EAAE,OAAO,CAAC;KACnB,CAAC;CACF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qBtC;AAED,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,aAAa,EAAE,YAAY,EAAE,KAAK,YAAY,EAAE,CAAC"}
@@ -0,0 +1,122 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { ChevronDownIcon } from "lucide-react";
3
+ import { Slot } from "radix-ui";
4
+ import * as React from "react";
5
+ import { cn } from "../../lib/utils.js";
6
+ const TreeContext = /*#__PURE__*/ React.createContext({
7
+ indent: 20
8
+ });
9
+ // biome-ignore lint/suspicious/noExplicitAny: FIXME Origin UI as-is
10
+ function useTreeContext() {
11
+ return React.useContext(TreeContext);
12
+ }
13
+ function Tree({ indent = 20, tree, className, ...props }) {
14
+ const containerProps = tree && typeof tree.getContainerProps === "function" ? tree.getContainerProps() : {};
15
+ const mergedProps = {
16
+ ...props,
17
+ ...containerProps
18
+ };
19
+ // Extract style from mergedProps to merge with our custom styles
20
+ const { style: propStyle, ...otherProps } = mergedProps;
21
+ // Merge styles
22
+ const mergedStyle = {
23
+ ...propStyle,
24
+ "--tree-indent": `${indent}px`,
25
+ "--border": `var(--color-fg-disabled)`
26
+ };
27
+ return /*#__PURE__*/ _jsx(TreeContext.Provider, {
28
+ value: {
29
+ indent,
30
+ tree
31
+ },
32
+ children: /*#__PURE__*/ _jsx("div", {
33
+ "data-slot": "tree",
34
+ style: mergedStyle,
35
+ className: cn("flex flex-col", className),
36
+ ...otherProps
37
+ })
38
+ });
39
+ }
40
+ // biome-ignore lint/suspicious/noExplicitAny: FIXME Origin UI as-is
41
+ function TreeItem({ item, className, asChild, children, ...props }) {
42
+ const { indent } = useTreeContext();
43
+ const itemProps = typeof item.getProps === "function" ? item.getProps() : {};
44
+ const mergedProps = {
45
+ ...props,
46
+ ...itemProps
47
+ };
48
+ // Extract style from mergedProps to merge with our custom styles
49
+ const { style: propStyle, ...otherProps } = mergedProps;
50
+ // Merge styles
51
+ const mergedStyle = {
52
+ ...propStyle,
53
+ "--tree-padding": `${item.getItemMeta().level * indent}px`
54
+ };
55
+ const Comp = asChild ? Slot.Root : "button";
56
+ return /*#__PURE__*/ _jsx(TreeContext.Provider, {
57
+ value: {
58
+ indent,
59
+ currentItem: item
60
+ },
61
+ children: /*#__PURE__*/ _jsx(Comp, {
62
+ "data-slot": "tree-item",
63
+ style: mergedStyle,
64
+ className: cn("z-10 ps-(--tree-padding) outline-hidden select-none focus:z-20 data-[disabled]:pointer-events-none data-[disabled]:opacity-50", className),
65
+ "data-focus": typeof item.isFocused === "function" ? item.isFocused() || false : undefined,
66
+ "data-folder": typeof item.isFolder === "function" ? item.isFolder() || false : undefined,
67
+ "data-selected": typeof item.isSelected === "function" ? item.isSelected() || false : undefined,
68
+ "data-drag-target": typeof item.isDragTarget === "function" ? item.isDragTarget() || false : undefined,
69
+ "data-search-match": typeof item.isMatchingSearch === "function" ? item.isMatchingSearch() || false : undefined,
70
+ "aria-expanded": item.isExpanded(),
71
+ ...otherProps,
72
+ children: children
73
+ })
74
+ });
75
+ }
76
+ function TreeItemLabel({ item: propItem, children, className, disableHover, horizontalLines, hideChevron, ...props }) {
77
+ const { currentItem } = useTreeContext();
78
+ const item = propItem || currentItem;
79
+ if (!item) {
80
+ console.warn("TreeItemLabel: No item provided via props or context");
81
+ return null;
82
+ }
83
+ const data = item.getItemData?.();
84
+ const isLastNode = data?.meta?.lastNode;
85
+ const itemMeta = item.getItemMeta();
86
+ return /*#__PURE__*/ _jsxs("span", {
87
+ "data-slot": "tree-item-label",
88
+ className: cn("group/tree-item-label relative select-text cursor-pointer border-l-2 border-l-transparent in-focus-visible:ring-ring/50 bg-background text-text-secondary in-data-[drag-target=true]:bg-accent flex items-center gap-2 pr-2 pl-2.5 py-1.5 text-sm transition-colors not-in-data-[folder=true]:ps-2.5 in-focus-visible:ring-[3px] in-data-[search-match=true]:bg-blue-400/20! [&_svg]:pointer-events-none [&_svg]:shrink-0", !disableHover && "in-data-[selected=true]:bg-bg-secondary hover:bg-bg-secondary hover:text-text-primary in-data-[selected=true]:text-text-primary", disableHover && "text-text-primary", className),
89
+ ...props,
90
+ children: [
91
+ item.isFolder() && /*#__PURE__*/ _jsx(ChevronDownIcon, {
92
+ className: "text-muted-foreground size-4 in-aria-[expanded=false]:-rotate-90 self-start mt-0.5"
93
+ }),
94
+ !item.isFolder() && horizontalLines && /*#__PURE__*/ _jsx("div", {
95
+ className: `w-5 min-w-5 h-px border-t mt-2.25 -ml-1 self-start`
96
+ }),
97
+ item.isFolder() && item.isExpanded() && horizontalLines && /*#__PURE__*/ _jsx("div", {
98
+ className: `absolute left-4.25 top-4 w-px min-h-full h-full border-l mt-2.25 self-start `
99
+ }),
100
+ horizontalLines && /*#__PURE__*/ _jsx("div", {
101
+ className: `absolute left-0 top-5.5 -m-1.75 border-t w-4 ${isLastNode ? "h-full bg-inherit " : ""} ${itemMeta.level === 0 ? "hidden" : ""}`
102
+ }),
103
+ children || (typeof item.getItemName === "function" ? item.getItemName() : null)
104
+ ]
105
+ });
106
+ }
107
+ function TreeDragLine({ className, ...props }) {
108
+ const { tree } = useTreeContext();
109
+ if (!tree || typeof tree.getDragLineStyle !== "function") {
110
+ console.warn("TreeDragLine: No tree provided via context or tree does not have getDragLineStyle method");
111
+ return null;
112
+ }
113
+ const dragLine = tree.getDragLineStyle();
114
+ return /*#__PURE__*/ _jsx("div", {
115
+ style: dragLine,
116
+ className: cn("bg-primary before:bg-background before:border-primary absolute z-30 -mt-px h-0.5 w-[unset] before:absolute before:-top-[3px] before:left-0 before:size-2 before:rounded-full before:border-2", className),
117
+ ...props
118
+ });
119
+ }
120
+ export { Tree, TreeItem, TreeItemLabel, TreeDragLine };
121
+
122
+ //# sourceMappingURL=tree.js.map