@medway-ui/core 1.37.0 → 1.38.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (556) hide show
  1. package/COMPONENTS.md +168 -17
  2. package/COMPONENTS_SUMMARY.md +7 -5
  3. package/README.md +1 -1
  4. package/dist/COMPONENTS.md +168 -17
  5. package/dist/COMPONENTS_SUMMARY.md +7 -5
  6. package/dist/assets/css/tokens.css +167 -80
  7. package/dist/assets/js/tokens.d.ts +27 -1
  8. package/dist/assets/js/tokens.js +1 -2
  9. package/dist/assets/js/tokens.mjs +1 -2
  10. package/dist/assets/js/tokens.ts +30 -0
  11. package/dist/components/Alert.d.ts +1 -2
  12. package/dist/components/Alert.js +1 -2
  13. package/dist/components/Alert.mjs +1 -2
  14. package/dist/components/AlertDialog.d.ts +0 -1
  15. package/dist/components/AlertDialog.js +1 -2
  16. package/dist/components/AlertDialog.mjs +1 -2
  17. package/dist/components/Autocomplete.d.ts +5 -3
  18. package/dist/components/Autocomplete.js +1 -2
  19. package/dist/components/Autocomplete.mjs +1 -2
  20. package/dist/components/Avatar.d.ts +1 -1
  21. package/dist/components/Avatar.js +1 -2
  22. package/dist/components/Avatar.mjs +1 -2
  23. package/dist/components/Badge.d.ts +14 -5
  24. package/dist/components/Badge.js +1 -2
  25. package/dist/components/Badge.mjs +1 -2
  26. package/dist/components/Breadcrumb.d.ts +0 -1
  27. package/dist/components/Breadcrumb.js +1 -2
  28. package/dist/components/Breadcrumb.mjs +1 -2
  29. package/dist/components/Button.d.ts +0 -1
  30. package/dist/components/Button.js +1 -2
  31. package/dist/components/Button.mjs +1 -2
  32. package/dist/components/CardContinue.d.ts +0 -1
  33. package/dist/components/CardContinue.js +1 -2
  34. package/dist/components/CardContinue.mjs +1 -2
  35. package/dist/components/CardLesson.d.ts +0 -1
  36. package/dist/components/CardLesson.js +1 -2
  37. package/dist/components/CardLesson.mjs +1 -2
  38. package/dist/components/CardModule.d.ts +0 -1
  39. package/dist/components/CardModule.js +1 -2
  40. package/dist/components/CardModule.mjs +1 -2
  41. package/dist/components/CardNews.d.ts +6 -2
  42. package/dist/components/CardNews.js +1 -2
  43. package/dist/components/CardNews.mjs +1 -2
  44. package/dist/components/CardTopic.d.ts +0 -1
  45. package/dist/components/CardTopic.js +1 -2
  46. package/dist/components/CardTopic.mjs +1 -2
  47. package/dist/components/CardWeek.d.ts +0 -1
  48. package/dist/components/CardWeek.js +1 -2
  49. package/dist/components/CardWeek.mjs +1 -2
  50. package/dist/components/Carousel.d.ts +0 -1
  51. package/dist/components/Carousel.js +1 -2
  52. package/dist/components/Carousel.mjs +1 -2
  53. package/dist/components/Checkbox.d.ts +0 -1
  54. package/dist/components/Checkbox.js +1 -2
  55. package/dist/components/Checkbox.mjs +1 -2
  56. package/dist/components/Chip.d.ts +2 -3
  57. package/dist/components/Chip.js +1 -2
  58. package/dist/components/Chip.mjs +1 -2
  59. package/dist/components/Collapsible.d.ts +0 -1
  60. package/dist/components/Collapsible.js +1 -2
  61. package/dist/components/Collapsible.mjs +1 -2
  62. package/dist/components/Command.d.ts +1 -2
  63. package/dist/components/Command.js +1 -2
  64. package/dist/components/Command.mjs +1 -2
  65. package/dist/components/ConfirmDeleteButton.d.ts +0 -1
  66. package/dist/components/ConfirmDeleteButton.js +1 -2
  67. package/dist/components/ConfirmDeleteButton.mjs +1 -2
  68. package/dist/components/DatePicker.d.ts +2 -3
  69. package/dist/components/DatePicker.js +1 -2
  70. package/dist/components/DatePicker.mjs +1 -2
  71. package/dist/components/Dialog.d.ts +4 -6
  72. package/dist/components/Dialog.js +1 -2
  73. package/dist/components/Dialog.mjs +1 -2
  74. package/dist/components/Dismiss.d.ts +12 -0
  75. package/dist/components/Dismiss.js +3 -0
  76. package/dist/components/Dismiss.mjs +3 -0
  77. package/dist/components/DropdownMenu.d.ts +11 -5
  78. package/dist/components/DropdownMenu.js +1 -2
  79. package/dist/components/DropdownMenu.mjs +1 -2
  80. package/dist/components/FallbackImage.d.ts +0 -1
  81. package/dist/components/FallbackImage.js +0 -1
  82. package/dist/components/FallbackImage.mjs +0 -1
  83. package/dist/components/IndexLevel.d.ts +0 -1
  84. package/dist/components/IndexLevel.js +0 -1
  85. package/dist/components/IndexLevel.mjs +0 -1
  86. package/dist/components/IndexLevelAnimated.d.ts +0 -1
  87. package/dist/components/IndexLevelAnimated.js +0 -1
  88. package/dist/components/IndexLevelAnimated.mjs +0 -1
  89. package/dist/components/Input.d.ts +0 -1
  90. package/dist/components/Input.js +1 -2
  91. package/dist/components/Input.mjs +1 -2
  92. package/dist/components/Label.d.ts +0 -1
  93. package/dist/components/Label.js +1 -2
  94. package/dist/components/Label.mjs +1 -2
  95. package/dist/components/Loading.d.ts +3 -4
  96. package/dist/components/Loading.js +1 -2
  97. package/dist/components/Loading.mjs +1 -2
  98. package/dist/components/LoadingOverlay.d.ts +30 -0
  99. package/dist/components/LoadingOverlay.js +3 -0
  100. package/dist/components/LoadingOverlay.mjs +3 -0
  101. package/dist/components/Logo.d.ts +0 -1
  102. package/dist/components/Logo.js +0 -1
  103. package/dist/components/Logo.mjs +1 -2
  104. package/dist/components/NoteEditor.d.ts +22 -8
  105. package/dist/components/NoteEditor.js +1 -2
  106. package/dist/components/NoteEditor.mjs +1 -2
  107. package/dist/components/NoteEditorLinkDialog.d.ts +0 -8
  108. package/dist/components/NoteEditorLinkDialog.js +1 -2
  109. package/dist/components/NoteEditorLinkDialog.mjs +1 -2
  110. package/dist/components/Offcanvas.d.ts +0 -1
  111. package/dist/components/Offcanvas.js +1 -2
  112. package/dist/components/Offcanvas.mjs +1 -2
  113. package/dist/components/Pagination.d.ts +0 -1
  114. package/dist/components/Pagination.js +1 -2
  115. package/dist/components/Pagination.mjs +1 -2
  116. package/dist/components/Popover.d.ts +0 -1
  117. package/dist/components/Popover.js +1 -2
  118. package/dist/components/Popover.mjs +1 -2
  119. package/dist/components/Progress.d.ts +0 -1
  120. package/dist/components/Progress.js +1 -2
  121. package/dist/components/Progress.mjs +1 -2
  122. package/dist/components/ProgressCircle.d.ts +0 -1
  123. package/dist/components/ProgressCircle.js +1 -2
  124. package/dist/components/ProgressCircle.mjs +1 -2
  125. package/dist/components/RadioGroup.d.ts +0 -1
  126. package/dist/components/RadioGroup.js +1 -2
  127. package/dist/components/RadioGroup.mjs +1 -2
  128. package/dist/components/Ranking.d.ts +0 -1
  129. package/dist/components/Ranking.js +1 -2
  130. package/dist/components/Ranking.mjs +1 -2
  131. package/dist/components/Rating.d.ts +0 -1
  132. package/dist/components/Rating.js +1 -2
  133. package/dist/components/Rating.mjs +1 -2
  134. package/dist/components/ScrollArea.d.ts +0 -1
  135. package/dist/components/ScrollArea.js +0 -1
  136. package/dist/components/ScrollArea.mjs +0 -1
  137. package/dist/components/SegmentControl.d.ts +0 -1
  138. package/dist/components/SegmentControl.js +1 -2
  139. package/dist/components/SegmentControl.mjs +1 -2
  140. package/dist/components/Select.d.ts +0 -1
  141. package/dist/components/Select.js +1 -2
  142. package/dist/components/Select.mjs +1 -2
  143. package/dist/components/Separator.d.ts +0 -1
  144. package/dist/components/Separator.js +0 -1
  145. package/dist/components/Separator.mjs +0 -1
  146. package/dist/components/Sheet.d.ts +0 -1
  147. package/dist/components/Sheet.js +1 -2
  148. package/dist/components/Sheet.mjs +1 -2
  149. package/dist/components/Sidebar.d.ts +1 -2
  150. package/dist/components/Sidebar.js +1 -2
  151. package/dist/components/Sidebar.mjs +1 -2
  152. package/dist/components/Skeleton.d.ts +0 -1
  153. package/dist/components/Skeleton.js +0 -1
  154. package/dist/components/Skeleton.mjs +0 -1
  155. package/dist/components/Switch.d.ts +0 -1
  156. package/dist/components/Switch.js +1 -2
  157. package/dist/components/Switch.mjs +1 -2
  158. package/dist/components/Switcher.d.ts +3 -6
  159. package/dist/components/Switcher.js +1 -2
  160. package/dist/components/Switcher.mjs +1 -2
  161. package/dist/components/Tabs.d.ts +0 -1
  162. package/dist/components/Tabs.js +1 -2
  163. package/dist/components/Tabs.mjs +1 -2
  164. package/dist/components/Tag.d.ts +4 -3
  165. package/dist/components/Tag.js +1 -2
  166. package/dist/components/Tag.mjs +1 -2
  167. package/dist/components/TagPicker.d.ts +1 -2
  168. package/dist/components/TagPicker.js +1 -2
  169. package/dist/components/TagPicker.mjs +1 -2
  170. package/dist/components/Textarea.d.ts +0 -1
  171. package/dist/components/Textarea.js +1 -2
  172. package/dist/components/Textarea.mjs +1 -2
  173. package/dist/components/Tile.d.ts +0 -1
  174. package/dist/components/Tile.js +1 -2
  175. package/dist/components/Tile.mjs +1 -2
  176. package/dist/components/Toast.d.ts +5 -4
  177. package/dist/components/Toast.js +1 -2
  178. package/dist/components/Toast.mjs +1 -2
  179. package/dist/components/Tooltip.d.ts +0 -1
  180. package/dist/components/Tooltip.js +1 -2
  181. package/dist/components/Tooltip.mjs +1 -2
  182. package/dist/hooks/use-composed-refs.d.ts +0 -1
  183. package/dist/hooks/use-composed-refs.js +1 -2
  184. package/dist/hooks/use-composed-refs.mjs +0 -1
  185. package/dist/hooks/use-field-fill.d.ts +10 -0
  186. package/dist/hooks/use-field-fill.js +2 -0
  187. package/dist/hooks/use-field-fill.mjs +2 -0
  188. package/dist/hooks/use-id.d.ts +0 -1
  189. package/dist/hooks/use-id.js +0 -1
  190. package/dist/hooks/use-id.mjs +0 -1
  191. package/dist/hooks/use-mobile.d.ts +0 -1
  192. package/dist/hooks/use-mobile.js +0 -1
  193. package/dist/hooks/use-mobile.mjs +0 -1
  194. package/dist/hooks/use-prefers-reduced-motion.d.ts +0 -1
  195. package/dist/hooks/use-prefers-reduced-motion.js +1 -2
  196. package/dist/hooks/use-prefers-reduced-motion.mjs +0 -1
  197. package/dist/hooks/use-toast.d.ts +1 -2
  198. package/dist/hooks/use-toast.js +1 -2
  199. package/dist/hooks/use-toast.mjs +1 -2
  200. package/dist/index.d.ts +9 -6
  201. package/dist/index.js +1 -2
  202. package/dist/index.mjs +1 -2
  203. package/dist/lib/cmdk.d.ts +2 -3
  204. package/dist/lib/cmdk.js +1 -2
  205. package/dist/lib/cmdk.mjs +1 -2
  206. package/dist/lib/command-score.d.ts +0 -1
  207. package/dist/lib/command-score.js +0 -1
  208. package/dist/lib/command-score.mjs +0 -1
  209. package/dist/lib/floating-label.d.ts +2 -0
  210. package/dist/lib/floating-label.js +2 -0
  211. package/dist/lib/floating-label.mjs +2 -0
  212. package/dist/lib/image-toolbar-placement.d.ts +0 -1
  213. package/dist/lib/image-toolbar-placement.js +0 -1
  214. package/dist/lib/image-toolbar-placement.mjs +0 -1
  215. package/dist/lib/utils.d.ts +1 -1
  216. package/dist/lib/utils.js +1 -2
  217. package/dist/lib/utils.mjs +1 -2
  218. package/dist/note-editor.d.ts +0 -1
  219. package/dist/note-editor.js +0 -1
  220. package/dist/note-editor.mjs +0 -1
  221. package/package.json +7 -7
  222. package/dist/assets/js/tokens.d.mts +0 -794
  223. package/dist/assets/js/tokens.d.mts.map +0 -1
  224. package/dist/assets/js/tokens.d.ts.map +0 -1
  225. package/dist/assets/js/tokens.js.map +0 -1
  226. package/dist/assets/js/tokens.mjs.map +0 -1
  227. package/dist/components/Alert.d.mts +0 -29
  228. package/dist/components/Alert.d.mts.map +0 -1
  229. package/dist/components/Alert.d.ts.map +0 -1
  230. package/dist/components/Alert.js.map +0 -1
  231. package/dist/components/Alert.mjs.map +0 -1
  232. package/dist/components/AlertDialog.d.mts +0 -39
  233. package/dist/components/AlertDialog.d.mts.map +0 -1
  234. package/dist/components/AlertDialog.d.ts.map +0 -1
  235. package/dist/components/AlertDialog.js.map +0 -1
  236. package/dist/components/AlertDialog.mjs.map +0 -1
  237. package/dist/components/Autocomplete.d.mts +0 -57
  238. package/dist/components/Autocomplete.d.mts.map +0 -1
  239. package/dist/components/Autocomplete.d.ts.map +0 -1
  240. package/dist/components/Autocomplete.js.map +0 -1
  241. package/dist/components/Autocomplete.mjs.map +0 -1
  242. package/dist/components/Avatar.d.mts +0 -18
  243. package/dist/components/Avatar.d.mts.map +0 -1
  244. package/dist/components/Avatar.d.ts.map +0 -1
  245. package/dist/components/Avatar.js.map +0 -1
  246. package/dist/components/Avatar.mjs.map +0 -1
  247. package/dist/components/Badge.d.mts +0 -16
  248. package/dist/components/Badge.d.mts.map +0 -1
  249. package/dist/components/Badge.d.ts.map +0 -1
  250. package/dist/components/Badge.js.map +0 -1
  251. package/dist/components/Badge.mjs.map +0 -1
  252. package/dist/components/Breadcrumb.d.mts +0 -20
  253. package/dist/components/Breadcrumb.d.mts.map +0 -1
  254. package/dist/components/Breadcrumb.d.ts.map +0 -1
  255. package/dist/components/Breadcrumb.js.map +0 -1
  256. package/dist/components/Breadcrumb.mjs.map +0 -1
  257. package/dist/components/Button.d.mts +0 -21
  258. package/dist/components/Button.d.mts.map +0 -1
  259. package/dist/components/Button.d.ts.map +0 -1
  260. package/dist/components/Button.js.map +0 -1
  261. package/dist/components/Button.mjs.map +0 -1
  262. package/dist/components/CardContinue.d.mts +0 -20
  263. package/dist/components/CardContinue.d.mts.map +0 -1
  264. package/dist/components/CardContinue.d.ts.map +0 -1
  265. package/dist/components/CardContinue.js.map +0 -1
  266. package/dist/components/CardContinue.mjs.map +0 -1
  267. package/dist/components/CardLesson.d.mts +0 -45
  268. package/dist/components/CardLesson.d.mts.map +0 -1
  269. package/dist/components/CardLesson.d.ts.map +0 -1
  270. package/dist/components/CardLesson.js.map +0 -1
  271. package/dist/components/CardLesson.mjs.map +0 -1
  272. package/dist/components/CardModule.d.mts +0 -33
  273. package/dist/components/CardModule.d.mts.map +0 -1
  274. package/dist/components/CardModule.d.ts.map +0 -1
  275. package/dist/components/CardModule.js.map +0 -1
  276. package/dist/components/CardModule.mjs.map +0 -1
  277. package/dist/components/CardNews.d.mts +0 -42
  278. package/dist/components/CardNews.d.mts.map +0 -1
  279. package/dist/components/CardNews.d.ts.map +0 -1
  280. package/dist/components/CardNews.js.map +0 -1
  281. package/dist/components/CardNews.mjs.map +0 -1
  282. package/dist/components/CardTopic.d.mts +0 -27
  283. package/dist/components/CardTopic.d.mts.map +0 -1
  284. package/dist/components/CardTopic.d.ts.map +0 -1
  285. package/dist/components/CardTopic.js.map +0 -1
  286. package/dist/components/CardTopic.mjs.map +0 -1
  287. package/dist/components/CardWeek.d.mts +0 -32
  288. package/dist/components/CardWeek.d.mts.map +0 -1
  289. package/dist/components/CardWeek.d.ts.map +0 -1
  290. package/dist/components/CardWeek.js.map +0 -1
  291. package/dist/components/CardWeek.mjs.map +0 -1
  292. package/dist/components/Carousel.d.mts +0 -76
  293. package/dist/components/Carousel.d.mts.map +0 -1
  294. package/dist/components/Carousel.d.ts.map +0 -1
  295. package/dist/components/Carousel.js.map +0 -1
  296. package/dist/components/Carousel.mjs.map +0 -1
  297. package/dist/components/Checkbox.d.mts +0 -14
  298. package/dist/components/Checkbox.d.mts.map +0 -1
  299. package/dist/components/Checkbox.d.ts.map +0 -1
  300. package/dist/components/Checkbox.js.map +0 -1
  301. package/dist/components/Checkbox.mjs.map +0 -1
  302. package/dist/components/Chip.d.mts +0 -38
  303. package/dist/components/Chip.d.mts.map +0 -1
  304. package/dist/components/Chip.d.ts.map +0 -1
  305. package/dist/components/Chip.js.map +0 -1
  306. package/dist/components/Chip.mjs.map +0 -1
  307. package/dist/components/Collapsible.d.mts +0 -15
  308. package/dist/components/Collapsible.d.mts.map +0 -1
  309. package/dist/components/Collapsible.d.ts.map +0 -1
  310. package/dist/components/Collapsible.js.map +0 -1
  311. package/dist/components/Collapsible.mjs.map +0 -1
  312. package/dist/components/Command.d.mts +0 -20
  313. package/dist/components/Command.d.mts.map +0 -1
  314. package/dist/components/Command.d.ts.map +0 -1
  315. package/dist/components/Command.js.map +0 -1
  316. package/dist/components/Command.mjs.map +0 -1
  317. package/dist/components/ConfirmDeleteButton.d.mts +0 -26
  318. package/dist/components/ConfirmDeleteButton.d.mts.map +0 -1
  319. package/dist/components/ConfirmDeleteButton.d.ts.map +0 -1
  320. package/dist/components/ConfirmDeleteButton.js.map +0 -1
  321. package/dist/components/ConfirmDeleteButton.mjs.map +0 -1
  322. package/dist/components/DatePicker.d.mts +0 -57
  323. package/dist/components/DatePicker.d.mts.map +0 -1
  324. package/dist/components/DatePicker.d.ts.map +0 -1
  325. package/dist/components/DatePicker.js.map +0 -1
  326. package/dist/components/DatePicker.mjs.map +0 -1
  327. package/dist/components/Dialog.d.mts +0 -35
  328. package/dist/components/Dialog.d.mts.map +0 -1
  329. package/dist/components/Dialog.d.ts.map +0 -1
  330. package/dist/components/Dialog.js.map +0 -1
  331. package/dist/components/Dialog.mjs.map +0 -1
  332. package/dist/components/DropdownMenu.d.mts +0 -28
  333. package/dist/components/DropdownMenu.d.mts.map +0 -1
  334. package/dist/components/DropdownMenu.d.ts.map +0 -1
  335. package/dist/components/DropdownMenu.js.map +0 -1
  336. package/dist/components/DropdownMenu.mjs.map +0 -1
  337. package/dist/components/FallbackImage.d.mts +0 -8
  338. package/dist/components/FallbackImage.d.mts.map +0 -1
  339. package/dist/components/FallbackImage.d.ts.map +0 -1
  340. package/dist/components/FallbackImage.js.map +0 -1
  341. package/dist/components/FallbackImage.mjs.map +0 -1
  342. package/dist/components/IndexLevel.d.mts +0 -47
  343. package/dist/components/IndexLevel.d.mts.map +0 -1
  344. package/dist/components/IndexLevel.d.ts.map +0 -1
  345. package/dist/components/IndexLevel.js.map +0 -1
  346. package/dist/components/IndexLevel.mjs.map +0 -1
  347. package/dist/components/IndexLevelAnimated.d.mts +0 -34
  348. package/dist/components/IndexLevelAnimated.d.mts.map +0 -1
  349. package/dist/components/IndexLevelAnimated.d.ts.map +0 -1
  350. package/dist/components/IndexLevelAnimated.js.map +0 -1
  351. package/dist/components/IndexLevelAnimated.mjs.map +0 -1
  352. package/dist/components/Input.d.mts +0 -44
  353. package/dist/components/Input.d.mts.map +0 -1
  354. package/dist/components/Input.d.ts.map +0 -1
  355. package/dist/components/Input.js.map +0 -1
  356. package/dist/components/Input.mjs.map +0 -1
  357. package/dist/components/Label.d.mts +0 -14
  358. package/dist/components/Label.d.mts.map +0 -1
  359. package/dist/components/Label.d.ts.map +0 -1
  360. package/dist/components/Label.js.map +0 -1
  361. package/dist/components/Label.mjs.map +0 -1
  362. package/dist/components/Loading.d.mts +0 -8
  363. package/dist/components/Loading.d.mts.map +0 -1
  364. package/dist/components/Loading.d.ts.map +0 -1
  365. package/dist/components/Loading.js.map +0 -1
  366. package/dist/components/Loading.mjs.map +0 -1
  367. package/dist/components/Logo.d.mts +0 -9
  368. package/dist/components/Logo.d.mts.map +0 -1
  369. package/dist/components/Logo.d.ts.map +0 -1
  370. package/dist/components/Logo.js.map +0 -1
  371. package/dist/components/Logo.mjs.map +0 -1
  372. package/dist/components/NoteEditor.d.mts +0 -124
  373. package/dist/components/NoteEditor.d.mts.map +0 -1
  374. package/dist/components/NoteEditor.d.ts.map +0 -1
  375. package/dist/components/NoteEditor.js.map +0 -1
  376. package/dist/components/NoteEditor.mjs.map +0 -1
  377. package/dist/components/NoteEditorLinkDialog.d.mts +0 -36
  378. package/dist/components/NoteEditorLinkDialog.d.mts.map +0 -1
  379. package/dist/components/NoteEditorLinkDialog.d.ts.map +0 -1
  380. package/dist/components/NoteEditorLinkDialog.js.map +0 -1
  381. package/dist/components/NoteEditorLinkDialog.mjs.map +0 -1
  382. package/dist/components/Offcanvas.d.mts +0 -53
  383. package/dist/components/Offcanvas.d.mts.map +0 -1
  384. package/dist/components/Offcanvas.d.ts.map +0 -1
  385. package/dist/components/Offcanvas.js.map +0 -1
  386. package/dist/components/Offcanvas.mjs.map +0 -1
  387. package/dist/components/Pagination.d.mts +0 -43
  388. package/dist/components/Pagination.d.mts.map +0 -1
  389. package/dist/components/Pagination.d.ts.map +0 -1
  390. package/dist/components/Pagination.js.map +0 -1
  391. package/dist/components/Pagination.mjs.map +0 -1
  392. package/dist/components/Popover.d.mts +0 -10
  393. package/dist/components/Popover.d.mts.map +0 -1
  394. package/dist/components/Popover.d.ts.map +0 -1
  395. package/dist/components/Popover.js.map +0 -1
  396. package/dist/components/Popover.mjs.map +0 -1
  397. package/dist/components/Progress.d.mts +0 -9
  398. package/dist/components/Progress.d.mts.map +0 -1
  399. package/dist/components/Progress.d.ts.map +0 -1
  400. package/dist/components/Progress.js.map +0 -1
  401. package/dist/components/Progress.mjs.map +0 -1
  402. package/dist/components/ProgressCircle.d.mts +0 -14
  403. package/dist/components/ProgressCircle.d.mts.map +0 -1
  404. package/dist/components/ProgressCircle.d.ts.map +0 -1
  405. package/dist/components/ProgressCircle.js.map +0 -1
  406. package/dist/components/ProgressCircle.mjs.map +0 -1
  407. package/dist/components/RadioGroup.d.mts +0 -14
  408. package/dist/components/RadioGroup.d.mts.map +0 -1
  409. package/dist/components/RadioGroup.d.ts.map +0 -1
  410. package/dist/components/RadioGroup.js.map +0 -1
  411. package/dist/components/RadioGroup.mjs.map +0 -1
  412. package/dist/components/Ranking.d.mts +0 -95
  413. package/dist/components/Ranking.d.mts.map +0 -1
  414. package/dist/components/Ranking.d.ts.map +0 -1
  415. package/dist/components/Ranking.js.map +0 -1
  416. package/dist/components/Ranking.mjs.map +0 -1
  417. package/dist/components/Rating.d.mts +0 -29
  418. package/dist/components/Rating.d.mts.map +0 -1
  419. package/dist/components/Rating.d.ts.map +0 -1
  420. package/dist/components/Rating.js.map +0 -1
  421. package/dist/components/Rating.mjs.map +0 -1
  422. package/dist/components/ScrollArea.d.mts +0 -6
  423. package/dist/components/ScrollArea.d.mts.map +0 -1
  424. package/dist/components/ScrollArea.d.ts.map +0 -1
  425. package/dist/components/ScrollArea.js.map +0 -1
  426. package/dist/components/ScrollArea.mjs.map +0 -1
  427. package/dist/components/SegmentControl.d.mts +0 -27
  428. package/dist/components/SegmentControl.d.mts.map +0 -1
  429. package/dist/components/SegmentControl.d.ts.map +0 -1
  430. package/dist/components/SegmentControl.js.map +0 -1
  431. package/dist/components/SegmentControl.mjs.map +0 -1
  432. package/dist/components/Select.d.mts +0 -32
  433. package/dist/components/Select.d.mts.map +0 -1
  434. package/dist/components/Select.d.ts.map +0 -1
  435. package/dist/components/Select.js.map +0 -1
  436. package/dist/components/Select.mjs.map +0 -1
  437. package/dist/components/Separator.d.mts +0 -5
  438. package/dist/components/Separator.d.mts.map +0 -1
  439. package/dist/components/Separator.d.ts.map +0 -1
  440. package/dist/components/Separator.js.map +0 -1
  441. package/dist/components/Separator.mjs.map +0 -1
  442. package/dist/components/Sheet.d.mts +0 -17
  443. package/dist/components/Sheet.d.mts.map +0 -1
  444. package/dist/components/Sheet.d.ts.map +0 -1
  445. package/dist/components/Sheet.js.map +0 -1
  446. package/dist/components/Sheet.mjs.map +0 -1
  447. package/dist/components/Sidebar.d.mts +0 -90
  448. package/dist/components/Sidebar.d.mts.map +0 -1
  449. package/dist/components/Sidebar.d.ts.map +0 -1
  450. package/dist/components/Sidebar.js.map +0 -1
  451. package/dist/components/Sidebar.mjs.map +0 -1
  452. package/dist/components/Skeleton.d.mts +0 -4
  453. package/dist/components/Skeleton.d.mts.map +0 -1
  454. package/dist/components/Skeleton.d.ts.map +0 -1
  455. package/dist/components/Skeleton.js.map +0 -1
  456. package/dist/components/Skeleton.mjs.map +0 -1
  457. package/dist/components/Switch.d.mts +0 -15
  458. package/dist/components/Switch.d.mts.map +0 -1
  459. package/dist/components/Switch.d.ts.map +0 -1
  460. package/dist/components/Switch.js.map +0 -1
  461. package/dist/components/Switch.mjs.map +0 -1
  462. package/dist/components/Switcher.d.mts +0 -56
  463. package/dist/components/Switcher.d.mts.map +0 -1
  464. package/dist/components/Switcher.d.ts.map +0 -1
  465. package/dist/components/Switcher.js.map +0 -1
  466. package/dist/components/Switcher.mjs.map +0 -1
  467. package/dist/components/Tabs.d.mts +0 -39
  468. package/dist/components/Tabs.d.mts.map +0 -1
  469. package/dist/components/Tabs.d.ts.map +0 -1
  470. package/dist/components/Tabs.js.map +0 -1
  471. package/dist/components/Tabs.mjs.map +0 -1
  472. package/dist/components/Tag.d.mts +0 -14
  473. package/dist/components/Tag.d.mts.map +0 -1
  474. package/dist/components/Tag.d.ts.map +0 -1
  475. package/dist/components/Tag.js.map +0 -1
  476. package/dist/components/Tag.mjs.map +0 -1
  477. package/dist/components/TagPicker.d.mts +0 -91
  478. package/dist/components/TagPicker.d.mts.map +0 -1
  479. package/dist/components/TagPicker.d.ts.map +0 -1
  480. package/dist/components/TagPicker.js.map +0 -1
  481. package/dist/components/TagPicker.mjs.map +0 -1
  482. package/dist/components/Textarea.d.mts +0 -15
  483. package/dist/components/Textarea.d.mts.map +0 -1
  484. package/dist/components/Textarea.d.ts.map +0 -1
  485. package/dist/components/Textarea.js.map +0 -1
  486. package/dist/components/Textarea.mjs.map +0 -1
  487. package/dist/components/Tile.d.mts +0 -20
  488. package/dist/components/Tile.d.mts.map +0 -1
  489. package/dist/components/Tile.d.ts.map +0 -1
  490. package/dist/components/Tile.js.map +0 -1
  491. package/dist/components/Tile.mjs.map +0 -1
  492. package/dist/components/Toast.d.mts +0 -34
  493. package/dist/components/Toast.d.mts.map +0 -1
  494. package/dist/components/Toast.d.ts.map +0 -1
  495. package/dist/components/Toast.js.map +0 -1
  496. package/dist/components/Toast.mjs.map +0 -1
  497. package/dist/components/Tooltip.d.mts +0 -8
  498. package/dist/components/Tooltip.d.mts.map +0 -1
  499. package/dist/components/Tooltip.d.ts.map +0 -1
  500. package/dist/components/Tooltip.js.map +0 -1
  501. package/dist/components/Tooltip.mjs.map +0 -1
  502. package/dist/hooks/use-composed-refs.d.mts +0 -3
  503. package/dist/hooks/use-composed-refs.d.mts.map +0 -1
  504. package/dist/hooks/use-composed-refs.d.ts.map +0 -1
  505. package/dist/hooks/use-composed-refs.js.map +0 -1
  506. package/dist/hooks/use-composed-refs.mjs.map +0 -1
  507. package/dist/hooks/use-id.d.mts +0 -2
  508. package/dist/hooks/use-id.d.mts.map +0 -1
  509. package/dist/hooks/use-id.d.ts.map +0 -1
  510. package/dist/hooks/use-id.js.map +0 -1
  511. package/dist/hooks/use-id.mjs.map +0 -1
  512. package/dist/hooks/use-mobile.d.mts +0 -2
  513. package/dist/hooks/use-mobile.d.mts.map +0 -1
  514. package/dist/hooks/use-mobile.d.ts.map +0 -1
  515. package/dist/hooks/use-mobile.js.map +0 -1
  516. package/dist/hooks/use-mobile.mjs.map +0 -1
  517. package/dist/hooks/use-prefers-reduced-motion.d.mts +0 -2
  518. package/dist/hooks/use-prefers-reduced-motion.d.mts.map +0 -1
  519. package/dist/hooks/use-prefers-reduced-motion.d.ts.map +0 -1
  520. package/dist/hooks/use-prefers-reduced-motion.js.map +0 -1
  521. package/dist/hooks/use-prefers-reduced-motion.mjs.map +0 -1
  522. package/dist/hooks/use-toast.d.mts +0 -45
  523. package/dist/hooks/use-toast.d.mts.map +0 -1
  524. package/dist/hooks/use-toast.d.ts.map +0 -1
  525. package/dist/hooks/use-toast.js.map +0 -1
  526. package/dist/hooks/use-toast.mjs.map +0 -1
  527. package/dist/index.d.mts +0 -98
  528. package/dist/index.d.mts.map +0 -1
  529. package/dist/index.d.ts.map +0 -1
  530. package/dist/index.js.map +0 -1
  531. package/dist/index.mjs.map +0 -1
  532. package/dist/lib/cmdk.d.mts +0 -124
  533. package/dist/lib/cmdk.d.mts.map +0 -1
  534. package/dist/lib/cmdk.d.ts.map +0 -1
  535. package/dist/lib/cmdk.js.map +0 -1
  536. package/dist/lib/cmdk.mjs.map +0 -1
  537. package/dist/lib/command-score.d.mts +0 -2
  538. package/dist/lib/command-score.d.mts.map +0 -1
  539. package/dist/lib/command-score.d.ts.map +0 -1
  540. package/dist/lib/command-score.js.map +0 -1
  541. package/dist/lib/command-score.mjs.map +0 -1
  542. package/dist/lib/image-toolbar-placement.d.mts +0 -32
  543. package/dist/lib/image-toolbar-placement.d.mts.map +0 -1
  544. package/dist/lib/image-toolbar-placement.d.ts.map +0 -1
  545. package/dist/lib/image-toolbar-placement.js.map +0 -1
  546. package/dist/lib/image-toolbar-placement.mjs.map +0 -1
  547. package/dist/lib/utils.d.mts +0 -4
  548. package/dist/lib/utils.d.mts.map +0 -1
  549. package/dist/lib/utils.d.ts.map +0 -1
  550. package/dist/lib/utils.js.map +0 -1
  551. package/dist/lib/utils.mjs.map +0 -1
  552. package/dist/note-editor.d.mts +0 -14
  553. package/dist/note-editor.d.mts.map +0 -1
  554. package/dist/note-editor.d.ts.map +0 -1
  555. package/dist/note-editor.js.map +0 -1
  556. package/dist/note-editor.mjs.map +0 -1
@@ -1,4 +1,3 @@
1
1
  "use strict";
2
2
  "use client";
3
- import{jsxs as n,jsx as c}from"react/jsx-runtime";import{cn as i,clampPercentage as $}from"../lib/utils.mjs";var D=Object.defineProperty,S=Object.defineProperties,W=Object.getOwnPropertyDescriptors,d=Object.getOwnPropertySymbols,b=Object.prototype.hasOwnProperty,g=Object.prototype.propertyIsEnumerable,N=(e,r,a)=>r in e?D(e,r,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[r]=a,k=(e,r)=>{for(var a in r||(r={}))b.call(r,a)&&N(e,a,r[a]);if(d)for(var a of d(r))g.call(r,a)&&N(e,a,r[a]);return e},I=(e,r)=>S(e,W(r)),E=(e,r)=>{var a={};for(var l in e)b.call(e,l)&&r.indexOf(l)<0&&(a[l]=e[l]);if(e!=null&&d)for(var l of d(e))r.indexOf(l)<0&&g.call(e,l)&&(a[l]=e[l]);return a};const L=18,B=32;function F(e){var r=e,{className:a,indicatorClassName:l,trackClassName:C,valueClassName:O,label:m,labelClassName:j,style:P,value:o=0,size:t=96,strokeWidth:u=2}=r,f=E(r,["className","indicatorClassName","trackClassName","valueClassName","label","labelClassName","style","value","size","strokeWidth"]),x,y;const s=typeof o=="string",v=s?0:Math.round($(o)),p=(t-u)/2,h=p*2*Math.PI,w=h-v/100*h,M=Math.max(L,Math.min(t/5,B)),z=Math.max(10,Math.min(t/9,16));return n("div",I(k({"data-slot":"progress-circle",className:i("relative inline-flex items-center justify-center",a),style:k({width:t,height:t},P),role:"progressbar","aria-label":f["aria-labelledby"]?void 0:(y=(x=f["aria-label"])!=null?x:m)!=null?y:"Progresso","aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":s?void 0:v,"aria-valuetext":s?o:void 0},f),{children:[n("svg",{className:"absolute inset-0 -rotate-90",width:t,height:t,viewBox:`0 0 ${t} ${t}`,children:[c("circle",{"data-slot":"progress-circle-track",cx:t/2,cy:t/2,r:p,stroke:"currentColor",strokeWidth:u,fill:"none",className:i("text-gray-stroke-muted",C)}),c("circle",{"data-slot":"progress-circle-indicator",cx:t/2,cy:t/2,r:p,stroke:"currentColor",strokeWidth:u,fill:"none",strokeDasharray:h,strokeDashoffset:w,strokeLinecap:"round",className:i("text-primary-stroke transition-all duration-300 ease-in-out",l)})]}),n("div",{"data-slot":"progress-circle-content",className:"relative z-10 flex flex-col items-center justify-center px-2 text-sm font-medium text-gray-foreground-muted",children:[n("div",{children:[c("span",{className:i("mr-px font-semibold",O),style:{fontSize:`${M}px`},children:s?o:v}),!s&&"%"]}),m&&c("div",{"data-slot":"progress-circle-label",className:i("text-center font-medium leading-tight text-gray-foreground-muted",j),style:{fontSize:`${z}px`},children:m})]})]}))}export{F as ProgressCircle};
4
- //# sourceMappingURL=ProgressCircle.mjs.map
3
+ import{jsxs as n,jsx as c}from"react/jsx-runtime";import{cn as o,clampPercentage as $}from"../lib/utils.mjs";var D=Object.defineProperty,S=Object.defineProperties,W=Object.getOwnPropertyDescriptors,d=Object.getOwnPropertySymbols,b=Object.prototype.hasOwnProperty,g=Object.prototype.propertyIsEnumerable,N=(e,r,a)=>r in e?D(e,r,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[r]=a,k=(e,r)=>{for(var a in r||(r={}))b.call(r,a)&&N(e,a,r[a]);if(d)for(var a of d(r))g.call(r,a)&&N(e,a,r[a]);return e},I=(e,r)=>S(e,W(r)),E=(e,r)=>{var a={};for(var l in e)b.call(e,l)&&r.indexOf(l)<0&&(a[l]=e[l]);if(e!=null&&d)for(var l of d(e))r.indexOf(l)<0&&g.call(e,l)&&(a[l]=e[l]);return a};const L=18,B=32;function F(e){var r=e,{className:a,indicatorClassName:l,trackClassName:C,valueClassName:O,label:m,labelClassName:j,style:P,value:i=0,size:t=96,strokeWidth:u=2}=r,f=E(r,["className","indicatorClassName","trackClassName","valueClassName","label","labelClassName","style","value","size","strokeWidth"]),x,y;const s=typeof i=="string",v=s?0:Math.round($(i)),p=(t-u)/2,h=p*2*Math.PI,w=h-v/100*h,M=Math.max(L,Math.min(t/5,B)),z=Math.max(10,Math.min(t/9,16));return n("div",I(k({"data-slot":"progress-circle",className:o("relative inline-flex items-center justify-center",a),style:k({width:t,height:t},P),role:"progressbar","aria-label":f["aria-labelledby"]?void 0:(y=(x=f["aria-label"])!=null?x:m)!=null?y:"Progresso","aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":s?void 0:v,"aria-valuetext":s?i:void 0},f),{children:[n("svg",{className:"absolute inset-0 -rotate-90",width:t,height:t,viewBox:`0 0 ${t} ${t}`,children:[c("circle",{"data-slot":"progress-circle-track",cx:t/2,cy:t/2,r:p,stroke:"currentColor",strokeWidth:u,fill:"none",className:o("text-gray-stroke-muted",C)}),c("circle",{"data-slot":"progress-circle-indicator",cx:t/2,cy:t/2,r:p,stroke:"currentColor",strokeWidth:u,fill:"none",strokeDasharray:h,strokeDashoffset:w,strokeLinecap:"round",className:o("text-primary-stroke transition-[stroke-dashoffset] duration-300 ease-in-out motion-reduce:transition-none",l)})]}),n("div",{"data-slot":"progress-circle-content",className:"relative z-10 flex flex-col items-center justify-center px-2 text-sm font-medium text-gray-foreground-muted",children:[n("div",{children:[c("span",{className:o("mr-px font-semibold",O),style:{fontSize:`${M}px`},children:s?i:v}),!s&&"%"]}),m&&c("div",{"data-slot":"progress-circle-label",className:o("text-center font-medium leading-tight text-gray-foreground-muted",j),style:{fontSize:`${z}px`},children:m})]})]}))}export{F as ProgressCircle};
@@ -11,4 +11,3 @@ interface RadioGroupItemProps extends ComponentProps<typeof RadioGroupPrimitive.
11
11
  declare const RadioGroupItem: import("react").ForwardRefExoticComponent<Omit<RadioGroupItemProps, "ref"> & import("react").RefAttributes<HTMLButtonElement>>;
12
12
  export { RadioGroup, RadioGroupItem, radioGroupVariants };
13
13
  export type { RadioGroupItemProps };
14
- //# sourceMappingURL=RadioGroup.d.ts.map
@@ -1,4 +1,3 @@
1
1
  "use strict";
2
2
  "use client";
3
- "use strict";var s=require("react/jsx-runtime"),m=require("react"),d=require("radix-ui"),h=require("@medway-ui/icons"),k=require("class-variance-authority"),o=require("../lib/utils.js"),y=Object.defineProperty,z=Object.defineProperties,x=Object.getOwnPropertyDescriptors,i=Object.getOwnPropertySymbols,n=Object.prototype.hasOwnProperty,l=Object.prototype.propertyIsEnumerable,u=(e,r,a)=>r in e?y(e,r,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[r]=a,b=(e,r)=>{for(var a in r||(r={}))n.call(r,a)&&u(e,a,r[a]);if(i)for(var a of i(r))l.call(r,a)&&u(e,a,r[a]);return e},j=(e,r)=>z(e,x(r)),g=(e,r)=>{var a={};for(var t in e)n.call(e,t)&&r.indexOf(t)<0&&(a[t]=e[t]);if(e!=null&&i)for(var t of i(e))r.indexOf(t)<0&&l.call(e,t)&&(a[t]=e[t]);return a};const O={sm:"size-2 group-data-[disabled]:group-data-[state=checked]:size-1.5",md:"size-2.5 group-data-[disabled]:group-data-[state=checked]:size-1.5",lg:"size-3.5 group-data-[disabled]:group-data-[state=checked]:size-2"},p=k.cva("inline-flex items-center justify-center place-items-center gap-2 rounded-pill whitespace-nowrap transition-all disabled:pointer-events-none shrink-0 [&_svg]:shrink-0 hover:cursor-pointer focus:outline-0 focus-visible:ring-[3px] focus-visible:ring-state-focus [grid-template-areas:'stack']",{variants:{variant:{regular:"bg-surface-card border-2 border-gray-stroke-muted enabled:hover:ring-4 data-[state=unchecked]:enabled:hover:ring-state-hover data-[state=unchecked]:enabled:hover:border-gray-stroke disabled:bg-gray-background-soft-muted data-[state=checked]:bg-primary-background-fill data-[state=checked]:border-primary-background-fill data-[state=checked]:enabled:hover:bg-primary-background-fill-emphasis data-[state=checked]:enabled:hover:border-primary-background-fill-emphasis data-[state=checked]:enabled:hover:ring-state-active disabled:data-[state=checked]:bg-gray-background-soft-muted disabled:data-[state=checked]:border-gray-stroke-muted data-[state=unchecked]:enabled:hover:border-gray-stroke data-[state=checked]:enabled:hover:bg-primary-background-fill-emphasis [&:disabled_svg]:fill-gray-background-fill-muted"},size:{sm:"size-4",md:"size-5",lg:"size-6"}},defaultVariants:{variant:"regular",size:"md"}});function w(e){var r=e,{className:a}=r,t=g(r,["className"]);return s.jsx(d.RadioGroup.Root,b({"data-slot":"radio-group",className:o.cn("grid gap-3",a)},t))}const N=m.forwardRef(function(e,r){var a=e,{className:t,size:c,variant:v}=a,f=g(a,["className","size","variant"]);return s.jsx(d.RadioGroup.Item,j(b({ref:r,"data-slot":"radio-group-item",className:o.cn("group peer aspect-square size-4 shrink-0 rounded-full outline-none transition-[color,box-shadow] disabled:cursor-not-allowed",p({size:c,variant:v}),t)},f),{children:s.jsx(d.RadioGroup.Indicator,{"data-slot":"radio-group-indicator",className:"relative flex items-center justify-center",children:s.jsx(h.Circle,{className:o.cn("absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 fill-surface-card",O[c||"md"])})})}))});exports.RadioGroup=w,exports.RadioGroupItem=N,exports.radioGroupVariants=p;
4
- //# sourceMappingURL=RadioGroup.js.map
3
+ "use strict";var i=require("react/jsx-runtime"),m=require("react"),s=require("radix-ui"),h=require("class-variance-authority"),d=require("../lib/utils.js"),k=Object.defineProperty,y=Object.defineProperties,j=Object.getOwnPropertyDescriptors,o=Object.getOwnPropertySymbols,c=Object.prototype.hasOwnProperty,l=Object.prototype.propertyIsEnumerable,u=(e,r,a)=>r in e?k(e,r,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[r]=a,b=(e,r)=>{for(var a in r||(r={}))c.call(r,a)&&u(e,a,r[a]);if(o)for(var a of o(r))l.call(r,a)&&u(e,a,r[a]);return e},z=(e,r)=>y(e,j(r)),g=(e,r)=>{var a={};for(var t in e)c.call(e,t)&&r.indexOf(t)<0&&(a[t]=e[t]);if(e!=null&&o)for(var t of o(e))r.indexOf(t)<0&&l.call(e,t)&&(a[t]=e[t]);return a};const x={sm:"size-1.5",md:"size-1.5",lg:"size-2"},p=h.cva("inline-flex items-center justify-center place-items-center gap-2 rounded-pill whitespace-nowrap transition-[background-color,border-color,box-shadow] disabled:pointer-events-none shrink-0 [&_svg]:shrink-0 hover:cursor-pointer focus:outline-0 focus-visible:ring-4 focus-visible:ring-state-focus [grid-template-areas:'stack']",{variants:{variant:{regular:"bg-surface-card border-2 border-gray-stroke-muted enabled:hover:ring-4 data-[state=unchecked]:enabled:hover:ring-state-hover data-[state=unchecked]:enabled:hover:border-gray-stroke disabled:bg-gray-background-soft-muted data-[state=checked]:bg-primary-background-fill data-[state=checked]:border-primary-background-fill data-[state=checked]:enabled:hover:bg-primary-background-fill-emphasis data-[state=checked]:enabled:hover:border-primary-background-fill-emphasis data-[state=checked]:enabled:hover:ring-state-active disabled:data-[state=checked]:bg-gray-background-soft-muted disabled:data-[state=checked]:border-gray-stroke-muted data-[state=unchecked]:enabled:hover:border-gray-stroke data-[state=checked]:enabled:hover:bg-primary-background-fill-emphasis"},size:{sm:"size-4",md:"size-5",lg:"size-6"}},defaultVariants:{variant:"regular",size:"md"}});function O(e){var r=e,{className:a}=r,t=g(r,["className"]);return i.jsx(s.RadioGroup.Root,b({"data-slot":"radio-group",className:d.cn("grid gap-3",a)},t))}const w=m.forwardRef(function(e,r){var a=e,{className:t,size:n,variant:v}=a,f=g(a,["className","size","variant"]);return i.jsx(s.RadioGroup.Item,z(b({ref:r,"data-slot":"radio-group-item",className:d.cn("group peer aspect-square size-4 shrink-0 rounded-full outline-none disabled:cursor-not-allowed",p({size:n,variant:v}),t)},f),{children:i.jsx(s.RadioGroup.Indicator,{"data-slot":"radio-group-indicator",className:"relative flex items-center justify-center",children:i.jsx("span",{className:d.cn("block rounded-full bg-primary-foreground-onfill group-data-[disabled]:bg-gray-background-fill-muted",x[n||"md"])})})}))});exports.RadioGroup=O,exports.RadioGroupItem=w,exports.radioGroupVariants=p;
@@ -1,4 +1,3 @@
1
1
  "use strict";
2
2
  "use client";
3
- import{jsx as o}from"react/jsx-runtime";import{forwardRef as v}from"react";import{RadioGroup as i}from"radix-ui";import{Circle as h}from"@medway-ui/icons";import{cva as k}from"class-variance-authority";import{cn as d}from"../lib/utils.mjs";var y=Object.defineProperty,z=Object.defineProperties,O=Object.getOwnPropertyDescriptors,s=Object.getOwnPropertySymbols,n=Object.prototype.hasOwnProperty,c=Object.prototype.propertyIsEnumerable,u=(e,a,r)=>a in e?y(e,a,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[a]=r,p=(e,a)=>{for(var r in a||(a={}))n.call(a,r)&&u(e,r,a[r]);if(s)for(var r of s(a))c.call(a,r)&&u(e,r,a[r]);return e},x=(e,a)=>z(e,O(a)),b=(e,a)=>{var r={};for(var t in e)n.call(e,t)&&a.indexOf(t)<0&&(r[t]=e[t]);if(e!=null&&s)for(var t of s(e))a.indexOf(t)<0&&c.call(e,t)&&(r[t]=e[t]);return r};const j={sm:"size-2 group-data-[disabled]:group-data-[state=checked]:size-1.5",md:"size-2.5 group-data-[disabled]:group-data-[state=checked]:size-1.5",lg:"size-3.5 group-data-[disabled]:group-data-[state=checked]:size-2"},g=k("inline-flex items-center justify-center place-items-center gap-2 rounded-pill whitespace-nowrap transition-all disabled:pointer-events-none shrink-0 [&_svg]:shrink-0 hover:cursor-pointer focus:outline-0 focus-visible:ring-[3px] focus-visible:ring-state-focus [grid-template-areas:'stack']",{variants:{variant:{regular:"bg-surface-card border-2 border-gray-stroke-muted enabled:hover:ring-4 data-[state=unchecked]:enabled:hover:ring-state-hover data-[state=unchecked]:enabled:hover:border-gray-stroke disabled:bg-gray-background-soft-muted data-[state=checked]:bg-primary-background-fill data-[state=checked]:border-primary-background-fill data-[state=checked]:enabled:hover:bg-primary-background-fill-emphasis data-[state=checked]:enabled:hover:border-primary-background-fill-emphasis data-[state=checked]:enabled:hover:ring-state-active disabled:data-[state=checked]:bg-gray-background-soft-muted disabled:data-[state=checked]:border-gray-stroke-muted data-[state=unchecked]:enabled:hover:border-gray-stroke data-[state=checked]:enabled:hover:bg-primary-background-fill-emphasis [&:disabled_svg]:fill-gray-background-fill-muted"},size:{sm:"size-4",md:"size-5",lg:"size-6"}},defaultVariants:{variant:"regular",size:"md"}});function w(e){var a=e,{className:r}=a,t=b(a,["className"]);return o(i.Root,p({"data-slot":"radio-group",className:d("grid gap-3",r)},t))}const N=v(function(e,a){var r=e,{className:t,size:l,variant:m}=r,f=b(r,["className","size","variant"]);return o(i.Item,x(p({ref:a,"data-slot":"radio-group-item",className:d("group peer aspect-square size-4 shrink-0 rounded-full outline-none transition-[color,box-shadow] disabled:cursor-not-allowed",g({size:l,variant:m}),t)},f),{children:o(i.Indicator,{"data-slot":"radio-group-indicator",className:"relative flex items-center justify-center",children:o(h,{className:d("absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 fill-surface-card",j[l||"md"])})})}))});export{w as RadioGroup,N as RadioGroupItem,g as radioGroupVariants};
4
- //# sourceMappingURL=RadioGroup.mjs.map
3
+ import{jsx as o}from"react/jsx-runtime";import{forwardRef as v}from"react";import{RadioGroup as i}from"radix-ui";import{cva as h}from"class-variance-authority";import{cn as d}from"../lib/utils.mjs";var k=Object.defineProperty,y=Object.defineProperties,z=Object.getOwnPropertyDescriptors,s=Object.getOwnPropertySymbols,l=Object.prototype.hasOwnProperty,c=Object.prototype.propertyIsEnumerable,u=(e,r,a)=>r in e?k(e,r,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[r]=a,b=(e,r)=>{for(var a in r||(r={}))l.call(r,a)&&u(e,a,r[a]);if(s)for(var a of s(r))c.call(r,a)&&u(e,a,r[a]);return e},O=(e,r)=>y(e,z(r)),m=(e,r)=>{var a={};for(var t in e)l.call(e,t)&&r.indexOf(t)<0&&(a[t]=e[t]);if(e!=null&&s)for(var t of s(e))r.indexOf(t)<0&&c.call(e,t)&&(a[t]=e[t]);return a};const j={sm:"size-1.5",md:"size-1.5",lg:"size-2"},p=h("inline-flex items-center justify-center place-items-center gap-2 rounded-pill whitespace-nowrap transition-[background-color,border-color,box-shadow] disabled:pointer-events-none shrink-0 [&_svg]:shrink-0 hover:cursor-pointer focus:outline-0 focus-visible:ring-4 focus-visible:ring-state-focus [grid-template-areas:'stack']",{variants:{variant:{regular:"bg-surface-card border-2 border-gray-stroke-muted enabled:hover:ring-4 data-[state=unchecked]:enabled:hover:ring-state-hover data-[state=unchecked]:enabled:hover:border-gray-stroke disabled:bg-gray-background-soft-muted data-[state=checked]:bg-primary-background-fill data-[state=checked]:border-primary-background-fill data-[state=checked]:enabled:hover:bg-primary-background-fill-emphasis data-[state=checked]:enabled:hover:border-primary-background-fill-emphasis data-[state=checked]:enabled:hover:ring-state-active disabled:data-[state=checked]:bg-gray-background-soft-muted disabled:data-[state=checked]:border-gray-stroke-muted data-[state=unchecked]:enabled:hover:border-gray-stroke data-[state=checked]:enabled:hover:bg-primary-background-fill-emphasis"},size:{sm:"size-4",md:"size-5",lg:"size-6"}},defaultVariants:{variant:"regular",size:"md"}});function w(e){var r=e,{className:a}=r,t=m(r,["className"]);return o(i.Root,b({"data-slot":"radio-group",className:d("grid gap-3",a)},t))}const N=v(function(e,r){var a=e,{className:t,size:n,variant:g}=a,f=m(a,["className","size","variant"]);return o(i.Item,O(b({ref:r,"data-slot":"radio-group-item",className:d("group peer aspect-square size-4 shrink-0 rounded-full outline-none disabled:cursor-not-allowed",p({size:n,variant:g}),t)},f),{children:o(i.Indicator,{"data-slot":"radio-group-indicator",className:"relative flex items-center justify-center",children:o("span",{className:d("block rounded-full bg-primary-foreground-onfill group-data-[disabled]:bg-gray-background-fill-muted",j[n||"md"])})})}))});export{w as RadioGroup,N as RadioGroupItem,p as radioGroupVariants};
@@ -92,4 +92,3 @@ declare function RankingPerformance({ answered, correct, minQuestions, className
92
92
  declare function RankingButton({ children, className, onClick, ...props }: RankingButtonProps): import("react/jsx-runtime").JSX.Element;
93
93
  export { Ranking, RankingHeader, RankingHeaderCell, RankingBody, RankingItem, RankingNumber, RankingTopicColumn, RankingTopicContent, RankingSpecialty, RankingTopic, RankingSuperFocus, RankingAssigneesColumn, RankingAssigneeLabel, RankingAssigneeGroup, RankingAssigneeItem, RankingPriority, RankingQuestions, RankingPerformance, RankingButton, };
94
94
  export type { RankingProps, RankingHeaderProps, RankingHeaderCellProps, RankingItemProps, RankingNumberProps, RankingTopicColumnProps, RankingTopicContentProps, RankingSpecialtyProps, RankingTopicProps, RankingSuperFocusProps, RankingAssigneesColumnProps, RankingAssigneeLabelProps, RankingAssigneeGroupProps, RankingAssigneeItemProps, RankingPriorityProps, RankingQuestionsProps, RankingPerformanceProps, RankingButtonProps, PerformanceData, ProgressStatusKey, };
95
- //# sourceMappingURL=Ranking.d.ts.map
@@ -1,4 +1,3 @@
1
1
  "use strict";
2
2
  "use client";
3
- "use strict";var n=require("react/jsx-runtime"),i=require("../lib/utils.js"),u=require("@medway-ui/icons"),b=require("./Button.js"),p=require("./Avatar.js"),v=require("./Tag.js"),x=require("./Tooltip.js"),F=Object.defineProperty,M=Object.defineProperties,E=Object.getOwnPropertyDescriptors,h=Object.getOwnPropertySymbols,y=Object.prototype.hasOwnProperty,k=Object.prototype.propertyIsEnumerable,w=(r,e,s)=>e in r?F(r,e,{enumerable:!0,configurable:!0,writable:!0,value:s}):r[e]=s,l=(r,e)=>{for(var s in e||(e={}))y.call(e,s)&&w(r,s,e[s]);if(h)for(var s of h(e))k.call(e,s)&&w(r,s,e[s]);return r},c=(r,e)=>M(r,E(e)),o=(r,e)=>{var s={};for(var a in r)y.call(r,a)&&e.indexOf(a)<0&&(s[a]=r[a]);if(r!=null&&h)for(var a of h(r))e.indexOf(a)<0&&k.call(r,a)&&(s[a]=r[a]);return s};function B(r){var e=r,{children:s,className:a}=e,t=o(e,["children","className"]);return n.jsx("div",{className:"w-full overflow-x-auto rounded-lg border border-gray-stroke-muted",children:n.jsx("table",c(l({className:i.cn("w-full border-collapse text-left",a)},t),{children:s}))})}function D(r){var e=r,{children:s,className:a}=e,t=o(e,["children","className"]);return n.jsx("thead",c(l({className:i.cn("h-11 border-b border-gray-stroke-muted bg-surface-card",a)},t),{children:n.jsx("tr",{children:s})}))}function I(r){var e=r,{children:s,className:a,tooltip:t,highlight:d}=e,m=o(e,["children","className","tooltip","highlight"]);return n.jsx("th",c(l({className:i.cn("text-ellipsis whitespace-nowrap px-5 text-sm font-semibold text-gray-foreground first:pr-0",a)},m),{children:n.jsxs("div",{className:"flex items-center gap-1.5",children:[n.jsx("span",{className:i.cn(d&&"flex size-7 shrink-0 items-center justify-center rounded-full bg-primary-foreground-onfill"),children:s}),t&&n.jsx(x.TooltipProvider,{children:n.jsxs(x.Tooltip,{children:[n.jsx(x.TooltipTrigger,{asChild:!0,children:n.jsx(b.Button,{type:"button",variant:"regular-basic",size:"sm","aria-label":t,className:"!h-6 !min-h-6 !w-6 !min-w-6 !p-0 text-gray-foreground",iconLeft:n.jsx(u.Info,{"aria-hidden":"true",className:"size-4"})})}),n.jsx(x.TooltipContent,{children:t})]})})]})}))}function S(r){var e=r,{children:s,className:a}=e,t=o(e,["children","className"]);return n.jsx("tbody",c(l({className:i.cn("bg-surface-card",a)},t),{children:s}))}function L(r){var e=r,{children:s,className:a}=e,t=o(e,["children","className"]);return n.jsx("tr",c(l({className:i.cn("w-full border-t border-solid border-gray-stroke-muted first:border-t-0",a)},t),{children:s}))}function Q(r){var e=r,{children:s,className:a}=e,t=o(e,["children","className"]);return n.jsx("td",{className:"py-4 pl-5 align-middle",children:n.jsx("div",c(l({className:i.cn("flex size-7 shrink-0 items-center justify-center overflow-hidden whitespace-nowrap rounded-full bg-primary-foreground text-sm font-semibold text-primary-foreground-onfill",a)},t),{children:s}))})}function W(r){var e=r,{children:s,className:a}=e,t=o(e,["children","className"]);return n.jsx("td",c(l({className:"px-5 py-4 align-middle"},t),{children:n.jsx("div",{className:i.cn("flex items-center gap-5",a),children:n.jsx("div",{className:"flex shrink-0 items-center gap-5 pr-8",children:s})})}))}function G(r){var e=r,{children:s,className:a}=e,t=o(e,["children","className"]);return n.jsx("div",c(l({className:i.cn("flex shrink-0 flex-col items-start whitespace-nowrap text-gray-foreground",a)},t),{children:s}))}function H(r){var e=r,{children:s,className:a}=e,t=o(e,["children","className"]);return n.jsx("span",c(l({className:i.cn("shrink-0 overflow-hidden text-ellipsis font-sans text-xxs font-medium leading-xxs",a)},t),{children:s}))}function X(r){var e=r,{children:s,className:a}=e,t=o(e,["children","className"]);return n.jsx("span",c(l({className:i.cn("shrink-0 overflow-hidden text-ellipsis font-sans text-sm font-semibold leading-5",a)},t),{children:s}))}function Y(r){var e=r,{children:s,className:a}=e,t=o(e,["children","className"]);return n.jsx(v.Tag,c(l({className:i.cn("bg-gradient-to-r from-cm-24 to-secondary-24 text-primary-foreground",a)},t),{icon:n.jsx(u.CheckboxFill,{className:"text-primary-foreground"}),children:s}))}function Z(r){var e=r,{children:s,className:a}=e,t=o(e,["children","className"]);return n.jsx("td",c(l({className:"px-5 py-4 align-middle"},t),{children:n.jsx("div",{className:i.cn("flex flex-col items-start gap-2",a),children:s})}))}function J(r){var e=r,{children:s,className:a}=e,t=o(e,["children","className"]);return n.jsx("p",c(l({className:i.cn("relative shrink-0 overflow-hidden text-ellipsis whitespace-nowrap text-xxs font-medium leading-xxs text-gray-foreground",a)},t),{children:s}))}function K(r){var e=r,{children:s,className:a}=e,t=o(e,["children","className"]);return n.jsx("div",c(l({className:i.cn("avatar-group flex shrink-0 items-center gap-2",a)},t),{children:s}))}function U(r){var e=r,{src:s,alt:a,fallback:t="?",className:d,tooltip:m}=e,g=o(e,["src","alt","fallback","className","tooltip"]);const f=n.jsxs(p.Avatar,c(l({size:"sm",className:i.cn("ring-2 ring-background",d)},g),{children:[n.jsx(p.AvatarImage,{src:s,alt:a}),n.jsx(p.AvatarFallback,{children:t})]}));return m?n.jsx(x.TooltipProvider,{children:n.jsxs(x.Tooltip,{children:[n.jsx(x.TooltipTrigger,{asChild:!0,children:f}),n.jsx(x.TooltipContent,{children:m})]})}):f}function V(r){var e=r,{children:s,className:a,icon:t}=e,d=o(e,["children","className","icon"]);return n.jsx("td",c(l({className:"px-5 py-4 align-middle"},d),{children:n.jsx(v.Tag,{variant:"regular-soft",className:a,icon:t,children:s})}))}function _({className:r,percentage:e,label:s}){return n.jsx("div",{role:"progressbar","aria-label":s,"aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":Math.round(i.clampPercentage(e)),className:i.cn("relative h-0.5 w-full overflow-hidden rounded-pill bg-gray-100",r),children:n.jsx("div",{className:i.cn("absolute inset-y-0 left-0 rounded-pill bg-primary-stroke transition-all duration-300"),style:{width:`${i.clampPercentage(e)}%`}})})}function ee(r){var e=r,{questions:s,answered:a,className:t}=e,d=o(e,["questions","answered","className"]);const m=a>0&&s>0?i.clampPercentage(a/s*100):0;return a===0?n.jsx("td",c(l({className:"px-5 py-4 align-middle"},d),{children:n.jsx("div",{className:i.cn("flex min-w-[140px] flex-col items-start justify-center gap-2",t),children:n.jsxs("div",{className:"flex shrink-0 items-center justify-center gap-2 text-xs font-medium text-gray-foreground-muted",children:[n.jsx("div",{className:"flex size-4 items-center justify-center rounded-full bg-gray-background-soft",children:n.jsx(u.RemoveMinus,{className:"size-3 text-gray-foreground",strokeWidth:2.6})}),n.jsx("span",{className:"whitespace-nowrap font-medium text-gray-foreground-muted",children:"N\xE3o iniciado"})]})})})):n.jsx("td",c(l({className:"px-5 py-4 align-middle"},d),{children:n.jsxs("div",{className:i.cn("flex min-w-[140px] flex-col items-start justify-center gap-2",t),children:[n.jsx("div",{className:"flex shrink-0 items-center gap-0.5 text-xs leading-4",children:n.jsxs("span",{className:"relative shrink-0 whitespace-nowrap font-medium text-gray-foreground-muted",children:[n.jsx("span",{className:"font-semibold text-gray-foreground",children:a})," ",a>1?"respondidas":"respondida"]})}),n.jsx(_,{percentage:m,label:`${a} ${a>1?"respondidas":"respondida"}`})]})}))}const re={notStarted:{icon:u.RemoveMinus,bgColor:"bg-gray-background-soft",iconColor:"text-gray-foreground",titleClassName:"font-medium text-gray-foreground-muted",title:()=>"N\xE3o iniciado",subtitle:()=>""},minNotReached:{icon:u.Warning,bgColor:"bg-feedback-warning-background-soft",iconColor:"text-feedback-warning-foreground",titleClassName:"font-medium text-gray-foreground-muted",title:()=>"M\xEDnimo n\xE3o atingido",subtitle:({remainingQuestions:r})=>r>1?`Faltam ${r} quest\xF5es`:`Falta ${r} quest\xE3o`},dominated:{icon:u.Check,statusLabel:"Dominado",bgColor:"bg-feedback-success-background-soft",iconColor:"text-feedback-success-foreground",titleClassName:"font-medium text-gray-foreground-muted",title:({progress:r})=>n.jsxs(n.Fragment,{children:[n.jsxs("span",{className:"font-semibold text-gray-foreground",children:[Math.round(r),"%"]})," ","de ",r>1?"acertos":"acerto"]}),subtitle:({correct:r,answered:e})=>`${r} de ${e} acertos`},notDominated:{icon:u.CloseMd,statusLabel:"N\xE3o dominado",bgColor:"bg-feedback-error-background-soft",iconColor:"text-feedback-error-foreground",titleClassName:"font-medium text-gray-foreground-muted",title:({progress:r})=>n.jsxs(n.Fragment,{children:[n.jsxs("span",{className:"font-semibold text-gray-foreground",children:[Math.round(r),"%"]})," ","de ",r>1?"acertos":"acerto"]}),subtitle:({correct:r,answered:e})=>`${r} de ${e} acertos`}};function ne(r,e,s){return[[r,"notStarted"],[e,"minNotReached"],[s>=80,"dominated"],[!0,"notDominated"]].find(([a])=>a)[1]}function se(r){var e=r,{answered:s,correct:a,minQuestions:t,className:d}=e,m=o(e,["answered","correct","minQuestions","className"]);const g=s>0?a/s*100:0,f=s===0,C=s<t,R=t-s,T=ne(f,C,g),{icon:z,bgColor:P,iconColor:q,titleClassName:O,statusLabel:N,title:$,subtitle:A}=re[T],j={progress:g,correct:a,answered:s,remainingQuestions:R};return n.jsx("td",c(l({className:"px-5 py-4 align-middle"},m),{children:n.jsx("div",{className:i.cn("flex min-w-[140px] flex-col items-start justify-center gap-2",d),children:n.jsxs("div",{className:"flex shrink-0 items-center justify-center gap-2 text-xs font-medium text-gray-foreground-muted",children:[n.jsx("div",{className:i.cn("flex size-4 items-center justify-center rounded-full",P),children:n.jsx(z,{"aria-hidden":"true",className:i.cn("size-3",q),strokeWidth:2.6})}),n.jsxs("div",{className:"flex flex-col items-start justify-center",children:[N&&n.jsxs("span",{className:"sr-only",children:[N,": "]}),n.jsx("span",{className:i.cn("whitespace-nowrap",O),children:$(j)}),n.jsx("span",{className:"whitespace-nowrap text-xxs font-semibold text-gray-foreground-muted",children:A(j)})]})]})})}))}function ae(r){var e=r,{children:s,className:a,onClick:t}=e,d=o(e,["children","className","onClick"]);return n.jsx("td",{className:"px-5 py-4 align-middle",children:n.jsx(b.Button,c(l({variant:"regular-soft",size:"sm",iconRight:n.jsx(u.ArrowRightMd,{className:"size-4"}),onClick:t,className:a},d),{children:s}))})}exports.Ranking=B,exports.RankingAssigneeGroup=K,exports.RankingAssigneeItem=U,exports.RankingAssigneeLabel=J,exports.RankingAssigneesColumn=Z,exports.RankingBody=S,exports.RankingButton=ae,exports.RankingHeader=D,exports.RankingHeaderCell=I,exports.RankingItem=L,exports.RankingNumber=Q,exports.RankingPerformance=se,exports.RankingPriority=V,exports.RankingQuestions=ee,exports.RankingSpecialty=H,exports.RankingSuperFocus=Y,exports.RankingTopic=X,exports.RankingTopicColumn=W,exports.RankingTopicContent=G;
4
- //# sourceMappingURL=Ranking.js.map
3
+ "use strict";var n=require("react/jsx-runtime"),i=require("../lib/utils.js"),u=require("@medway-ui/icons"),b=require("./Button.js"),p=require("./Avatar.js"),v=require("./Tag.js"),x=require("./Tooltip.js"),F=Object.defineProperty,M=Object.defineProperties,E=Object.getOwnPropertyDescriptors,h=Object.getOwnPropertySymbols,y=Object.prototype.hasOwnProperty,k=Object.prototype.propertyIsEnumerable,w=(r,e,s)=>e in r?F(r,e,{enumerable:!0,configurable:!0,writable:!0,value:s}):r[e]=s,l=(r,e)=>{for(var s in e||(e={}))y.call(e,s)&&w(r,s,e[s]);if(h)for(var s of h(e))k.call(e,s)&&w(r,s,e[s]);return r},c=(r,e)=>M(r,E(e)),o=(r,e)=>{var s={};for(var a in r)y.call(r,a)&&e.indexOf(a)<0&&(s[a]=r[a]);if(r!=null&&h)for(var a of h(r))e.indexOf(a)<0&&k.call(r,a)&&(s[a]=r[a]);return s};function I(r){var e=r,{children:s,className:a}=e,t=o(e,["children","className"]);return n.jsx("div",{className:"w-full overflow-x-auto rounded-lg border border-gray-stroke-muted",children:n.jsx("table",c(l({className:i.cn("w-full border-collapse text-left",a)},t),{children:s}))})}function B(r){var e=r,{children:s,className:a}=e,t=o(e,["children","className"]);return n.jsx("thead",c(l({className:i.cn("h-11 border-b border-gray-stroke-muted bg-surface-card",a)},t),{children:n.jsx("tr",{children:s})}))}function D(r){var e=r,{children:s,className:a,tooltip:t,highlight:d}=e,m=o(e,["children","className","tooltip","highlight"]);return n.jsx("th",c(l({className:i.cn("text-ellipsis whitespace-nowrap px-5 text-sm font-semibold text-gray-foreground first:pr-0",a)},m),{children:n.jsxs("div",{className:"flex items-center gap-1.5",children:[n.jsx("span",{className:i.cn(d&&"flex size-7 shrink-0 items-center justify-center rounded-full bg-primary-foreground-onfill"),children:s}),t&&n.jsx(x.TooltipProvider,{children:n.jsxs(x.Tooltip,{children:[n.jsx(x.TooltipTrigger,{asChild:!0,children:n.jsx(b.Button,{type:"button",variant:"regular-basic",size:"sm","aria-label":t,className:"!h-6 !min-h-6 !w-6 !min-w-6 !p-0 text-gray-foreground",iconLeft:n.jsx(u.Info,{"aria-hidden":"true",className:"size-4"})})}),n.jsx(x.TooltipContent,{children:t})]})})]})}))}function S(r){var e=r,{children:s,className:a}=e,t=o(e,["children","className"]);return n.jsx("tbody",c(l({className:i.cn("bg-surface-card",a)},t),{children:s}))}function L(r){var e=r,{children:s,className:a}=e,t=o(e,["children","className"]);return n.jsx("tr",c(l({className:i.cn("w-full border-t border-solid border-gray-stroke-muted first:border-t-0",a)},t),{children:s}))}function Q(r){var e=r,{children:s,className:a}=e,t=o(e,["children","className"]);return n.jsx("td",{className:"py-4 pl-5 align-middle",children:n.jsx("div",c(l({className:i.cn("flex size-7 shrink-0 items-center justify-center overflow-hidden whitespace-nowrap rounded-full bg-primary-foreground text-sm font-semibold text-primary-foreground-onfill",a)},t),{children:s}))})}function W(r){var e=r,{children:s,className:a}=e,t=o(e,["children","className"]);return n.jsx("td",c(l({className:"px-5 py-4 align-middle"},t),{children:n.jsx("div",{className:i.cn("flex items-center gap-5",a),children:n.jsx("div",{className:"flex shrink-0 items-center gap-5 pr-8",children:s})})}))}function G(r){var e=r,{children:s,className:a}=e,t=o(e,["children","className"]);return n.jsx("div",c(l({className:i.cn("flex shrink-0 flex-col items-start whitespace-nowrap text-gray-foreground",a)},t),{children:s}))}function H(r){var e=r,{children:s,className:a}=e,t=o(e,["children","className"]);return n.jsx("span",c(l({className:i.cn("shrink-0 overflow-hidden text-ellipsis font-sans text-xxs font-medium leading-xxs",a)},t),{children:s}))}function X(r){var e=r,{children:s,className:a}=e,t=o(e,["children","className"]);return n.jsx("span",c(l({className:i.cn("shrink-0 overflow-hidden text-ellipsis font-sans text-sm font-semibold leading-sm",a)},t),{children:s}))}function Y(r){var e=r,{children:s,className:a}=e,t=o(e,["children","className"]);return n.jsx(v.Tag,c(l({className:i.cn("bg-gradient-to-r from-cm-24 to-secondary-24 text-primary-foreground",a)},t),{icon:n.jsx(u.CheckboxFill,{className:"text-primary-foreground"}),children:s}))}function Z(r){var e=r,{children:s,className:a}=e,t=o(e,["children","className"]);return n.jsx("td",c(l({className:"px-5 py-4 align-middle"},t),{children:n.jsx("div",{className:i.cn("flex flex-col items-start gap-2",a),children:s})}))}function J(r){var e=r,{children:s,className:a}=e,t=o(e,["children","className"]);return n.jsx("p",c(l({className:i.cn("relative shrink-0 overflow-hidden text-ellipsis whitespace-nowrap text-xxs font-medium leading-xxs text-gray-foreground",a)},t),{children:s}))}function K(r){var e=r,{children:s,className:a}=e,t=o(e,["children","className"]);return n.jsx("div",c(l({className:i.cn("avatar-group flex shrink-0 items-center gap-2",a)},t),{children:s}))}function U(r){var e=r,{src:s,alt:a,fallback:t="?",className:d,tooltip:m}=e,g=o(e,["src","alt","fallback","className","tooltip"]);const f=n.jsxs(p.Avatar,c(l({size:"sm",tabIndex:m?0:void 0,className:i.cn("ring-2 ring-background",m&&"outline-none focus-visible:ring-4 focus-visible:ring-state-focus",d)},g),{children:[n.jsx(p.AvatarImage,{src:s,alt:a!=null?a:typeof m=="string"?m:""}),n.jsx(p.AvatarFallback,{children:t})]}));return m?n.jsx(x.TooltipProvider,{children:n.jsxs(x.Tooltip,{children:[n.jsx(x.TooltipTrigger,{asChild:!0,children:f}),n.jsx(x.TooltipContent,{children:m})]})}):f}function V(r){var e=r,{children:s,className:a,icon:t}=e,d=o(e,["children","className","icon"]);return n.jsx("td",c(l({className:"px-5 py-4 align-middle"},d),{children:n.jsx(v.Tag,{variant:"regular-soft",className:a,icon:t,children:s})}))}function _({className:r,percentage:e,label:s}){return n.jsx("div",{role:"progressbar","aria-label":s,"aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":Math.round(i.clampPercentage(e)),className:i.cn("relative h-0.5 w-full overflow-hidden rounded-pill bg-gray-stroke-muted",r),children:n.jsx("div",{className:i.cn("absolute inset-y-0 left-0 rounded-pill bg-primary-stroke transition-[width] duration-300 motion-reduce:transition-none"),style:{width:`${i.clampPercentage(e)}%`}})})}function ee(r){var e=r,{questions:s,answered:a,className:t}=e,d=o(e,["questions","answered","className"]);const m=a>0&&s>0?i.clampPercentage(a/s*100):0;return a===0?n.jsx("td",c(l({className:"px-5 py-4 align-middle"},d),{children:n.jsx("div",{className:i.cn("flex min-w-[140px] flex-col items-start justify-center gap-2",t),children:n.jsxs("div",{className:"flex shrink-0 items-center justify-center gap-2 text-xs font-medium text-gray-foreground-muted",children:[n.jsx("div",{className:"flex size-4 items-center justify-center rounded-full bg-gray-background-soft",children:n.jsx(u.RemoveMinus,{className:"size-3 text-gray-foreground",strokeWidth:2.6})}),n.jsx("span",{className:"whitespace-nowrap font-medium text-gray-foreground-muted",children:"N\xE3o iniciado"})]})})})):n.jsx("td",c(l({className:"px-5 py-4 align-middle"},d),{children:n.jsxs("div",{className:i.cn("flex min-w-[140px] flex-col items-start justify-center gap-2",t),children:[n.jsx("div",{className:"flex shrink-0 items-center gap-0.5 text-xs leading-xs",children:n.jsxs("span",{className:"relative shrink-0 whitespace-nowrap font-medium text-gray-foreground-muted",children:[n.jsx("span",{className:"font-semibold text-gray-foreground",children:a})," ",a>1?"respondidas":"respondida"]})}),n.jsx(_,{percentage:m,label:`${a} ${a>1?"respondidas":"respondida"}`})]})}))}const re={notStarted:{icon:u.RemoveMinus,bgColor:"bg-gray-background-soft",iconColor:"text-gray-foreground",titleClassName:"font-medium text-gray-foreground-muted",title:()=>"N\xE3o iniciado",subtitle:()=>""},minNotReached:{icon:u.Warning,bgColor:"bg-feedback-warning-background-soft",iconColor:"text-feedback-warning-foreground",titleClassName:"font-medium text-gray-foreground-muted",title:()=>"M\xEDnimo n\xE3o atingido",subtitle:({remainingQuestions:r})=>r>1?`Faltam ${r} quest\xF5es`:`Falta ${r} quest\xE3o`},dominated:{icon:u.Check,statusLabel:"Dominado",bgColor:"bg-feedback-success-background-soft",iconColor:"text-feedback-success-foreground",titleClassName:"font-medium text-gray-foreground-muted",title:({progress:r})=>n.jsxs(n.Fragment,{children:[n.jsxs("span",{className:"font-semibold text-gray-foreground",children:[Math.round(r),"%"]})," ","de ",r>1?"acertos":"acerto"]}),subtitle:({correct:r,answered:e})=>`${r} de ${e} acertos`},notDominated:{icon:u.CloseMd,statusLabel:"N\xE3o dominado",bgColor:"bg-feedback-error-background-soft",iconColor:"text-feedback-error-foreground",titleClassName:"font-medium text-gray-foreground-muted",title:({progress:r})=>n.jsxs(n.Fragment,{children:[n.jsxs("span",{className:"font-semibold text-gray-foreground",children:[Math.round(r),"%"]})," ","de ",r>1?"acertos":"acerto"]}),subtitle:({correct:r,answered:e})=>`${r} de ${e} acertos`}};function ne(r,e,s){return[[r,"notStarted"],[e,"minNotReached"],[s>=80,"dominated"],[!0,"notDominated"]].find(([a])=>a)[1]}function se(r){var e=r,{answered:s,correct:a,minQuestions:t,className:d}=e,m=o(e,["answered","correct","minQuestions","className"]);const g=s>0?a/s*100:0,f=s===0,C=s<t,R=t-s,T=ne(f,C,g),{icon:z,bgColor:P,iconColor:q,titleClassName:O,statusLabel:N,title:$,subtitle:A}=re[T],j={progress:g,correct:a,answered:s,remainingQuestions:R};return n.jsx("td",c(l({className:"px-5 py-4 align-middle"},m),{children:n.jsx("div",{className:i.cn("flex min-w-[140px] flex-col items-start justify-center gap-2",d),children:n.jsxs("div",{className:"flex shrink-0 items-center justify-center gap-2 text-xs font-medium text-gray-foreground-muted",children:[n.jsx("div",{className:i.cn("flex size-4 items-center justify-center rounded-full",P),children:n.jsx(z,{"aria-hidden":"true",className:i.cn("size-3",q),strokeWidth:2.6})}),n.jsxs("div",{className:"flex flex-col items-start justify-center",children:[N&&n.jsxs("span",{className:"sr-only",children:[N,": "]}),n.jsx("span",{className:i.cn("whitespace-nowrap",O),children:$(j)}),n.jsx("span",{className:"whitespace-nowrap text-xxs font-semibold text-gray-foreground-muted",children:A(j)})]})]})})}))}function ae(r){var e=r,{children:s,className:a,onClick:t}=e,d=o(e,["children","className","onClick"]);return n.jsx("td",{className:"px-5 py-4 align-middle",children:n.jsx(b.Button,c(l({variant:"regular-soft",size:"sm",iconRight:n.jsx(u.ArrowRightMd,{className:"size-4"}),onClick:t,className:a},d),{children:s}))})}exports.Ranking=I,exports.RankingAssigneeGroup=K,exports.RankingAssigneeItem=U,exports.RankingAssigneeLabel=J,exports.RankingAssigneesColumn=Z,exports.RankingBody=S,exports.RankingButton=ae,exports.RankingHeader=B,exports.RankingHeaderCell=D,exports.RankingItem=L,exports.RankingNumber=Q,exports.RankingPerformance=se,exports.RankingPriority=V,exports.RankingQuestions=ee,exports.RankingSpecialty=H,exports.RankingSuperFocus=Y,exports.RankingTopic=X,exports.RankingTopicColumn=W,exports.RankingTopicContent=G;
@@ -1,4 +1,3 @@
1
1
  "use strict";
2
2
  "use client";
3
- import{jsx as s,jsxs as d,Fragment as b}from"react/jsx-runtime";import{cn as i,clampPercentage as p}from"../lib/utils.mjs";import{ArrowRightMd as L,Info as Q,CloseMd as q,Check as B,Warning as W,RemoveMinus as v,CheckboxFill as G}from"@medway-ui/icons";import{Button as y}from"./Button.mjs";import{Avatar as H,AvatarImage as U,AvatarFallback as X}from"./Avatar.mjs";import{Tag as k}from"./Tag.mjs";import{TooltipProvider as w,Tooltip as C,TooltipTrigger as R,TooltipContent as j}from"./Tooltip.mjs";var Y=Object.defineProperty,Z=Object.defineProperties,J=Object.getOwnPropertyDescriptors,h=Object.getOwnPropertySymbols,z=Object.prototype.hasOwnProperty,$=Object.prototype.propertyIsEnumerable,O=(r,e,a)=>e in r?Y(r,e,{enumerable:!0,configurable:!0,writable:!0,value:a}):r[e]=a,l=(r,e)=>{for(var a in e||(e={}))z.call(e,a)&&O(r,a,e[a]);if(h)for(var a of h(e))$.call(e,a)&&O(r,a,e[a]);return r},o=(r,e)=>Z(r,J(e)),c=(r,e)=>{var a={};for(var n in r)z.call(r,n)&&e.indexOf(n)<0&&(a[n]=r[n]);if(r!=null&&h)for(var n of h(r))e.indexOf(n)<0&&$.call(r,n)&&(a[n]=r[n]);return a};function K(r){var e=r,{children:a,className:n}=e,t=c(e,["children","className"]);return s("div",{className:"w-full overflow-x-auto rounded-lg border border-gray-stroke-muted",children:s("table",o(l({className:i("w-full border-collapse text-left",n)},t),{children:a}))})}function V(r){var e=r,{children:a,className:n}=e,t=c(e,["children","className"]);return s("thead",o(l({className:i("h-11 border-b border-gray-stroke-muted bg-surface-card",n)},t),{children:s("tr",{children:a})}))}function _(r){var e=r,{children:a,className:n,tooltip:t,highlight:m}=e,u=c(e,["children","className","tooltip","highlight"]);return s("th",o(l({className:i("text-ellipsis whitespace-nowrap px-5 text-sm font-semibold text-gray-foreground first:pr-0",n)},u),{children:d("div",{className:"flex items-center gap-1.5",children:[s("span",{className:i(m&&"flex size-7 shrink-0 items-center justify-center rounded-full bg-primary-foreground-onfill"),children:a}),t&&s(w,{children:d(C,{children:[s(R,{asChild:!0,children:s(y,{type:"button",variant:"regular-basic",size:"sm","aria-label":t,className:"!h-6 !min-h-6 !w-6 !min-w-6 !p-0 text-gray-foreground",iconLeft:s(Q,{"aria-hidden":"true",className:"size-4"})})}),s(j,{children:t})]})})]})}))}function ee(r){var e=r,{children:a,className:n}=e,t=c(e,["children","className"]);return s("tbody",o(l({className:i("bg-surface-card",n)},t),{children:a}))}function re(r){var e=r,{children:a,className:n}=e,t=c(e,["children","className"]);return s("tr",o(l({className:i("w-full border-t border-solid border-gray-stroke-muted first:border-t-0",n)},t),{children:a}))}function ae(r){var e=r,{children:a,className:n}=e,t=c(e,["children","className"]);return s("td",{className:"py-4 pl-5 align-middle",children:s("div",o(l({className:i("flex size-7 shrink-0 items-center justify-center overflow-hidden whitespace-nowrap rounded-full bg-primary-foreground text-sm font-semibold text-primary-foreground-onfill",n)},t),{children:a}))})}function ne(r){var e=r,{children:a,className:n}=e,t=c(e,["children","className"]);return s("td",o(l({className:"px-5 py-4 align-middle"},t),{children:s("div",{className:i("flex items-center gap-5",n),children:s("div",{className:"flex shrink-0 items-center gap-5 pr-8",children:a})})}))}function se(r){var e=r,{children:a,className:n}=e,t=c(e,["children","className"]);return s("div",o(l({className:i("flex shrink-0 flex-col items-start whitespace-nowrap text-gray-foreground",n)},t),{children:a}))}function te(r){var e=r,{children:a,className:n}=e,t=c(e,["children","className"]);return s("span",o(l({className:i("shrink-0 overflow-hidden text-ellipsis font-sans text-xxs font-medium leading-xxs",n)},t),{children:a}))}function ie(r){var e=r,{children:a,className:n}=e,t=c(e,["children","className"]);return s("span",o(l({className:i("shrink-0 overflow-hidden text-ellipsis font-sans text-sm font-semibold leading-5",n)},t),{children:a}))}function le(r){var e=r,{children:a,className:n}=e,t=c(e,["children","className"]);return s(k,o(l({className:i("bg-gradient-to-r from-cm-24 to-secondary-24 text-primary-foreground",n)},t),{icon:s(G,{className:"text-primary-foreground"}),children:a}))}function oe(r){var e=r,{children:a,className:n}=e,t=c(e,["children","className"]);return s("td",o(l({className:"px-5 py-4 align-middle"},t),{children:s("div",{className:i("flex flex-col items-start gap-2",n),children:a})}))}function ce(r){var e=r,{children:a,className:n}=e,t=c(e,["children","className"]);return s("p",o(l({className:i("relative shrink-0 overflow-hidden text-ellipsis whitespace-nowrap text-xxs font-medium leading-xxs text-gray-foreground",n)},t),{children:a}))}function de(r){var e=r,{children:a,className:n}=e,t=c(e,["children","className"]);return s("div",o(l({className:i("avatar-group flex shrink-0 items-center gap-2",n)},t),{children:a}))}function me(r){var e=r,{src:a,alt:n,fallback:t="?",className:m,tooltip:u}=e,f=c(e,["src","alt","fallback","className","tooltip"]);const g=d(H,o(l({size:"sm",className:i("ring-2 ring-background",m)},f),{children:[s(U,{src:a,alt:n}),s(X,{children:t})]}));return u?s(w,{children:d(C,{children:[s(R,{asChild:!0,children:g}),s(j,{children:u})]})}):g}function ue(r){var e=r,{children:a,className:n,icon:t}=e,m=c(e,["children","className","icon"]);return s("td",o(l({className:"px-5 py-4 align-middle"},m),{children:s(k,{variant:"regular-soft",className:n,icon:t,children:a})}))}function fe({className:r,percentage:e,label:a}){return s("div",{role:"progressbar","aria-label":a,"aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":Math.round(p(e)),className:i("relative h-0.5 w-full overflow-hidden rounded-pill bg-gray-100",r),children:s("div",{className:i("absolute inset-y-0 left-0 rounded-pill bg-primary-stroke transition-all duration-300"),style:{width:`${p(e)}%`}})})}function ge(r){var e=r,{questions:a,answered:n,className:t}=e,m=c(e,["questions","answered","className"]);const u=n>0&&a>0?p(n/a*100):0;return n===0?s("td",o(l({className:"px-5 py-4 align-middle"},m),{children:s("div",{className:i("flex min-w-[140px] flex-col items-start justify-center gap-2",t),children:d("div",{className:"flex shrink-0 items-center justify-center gap-2 text-xs font-medium text-gray-foreground-muted",children:[s("div",{className:"flex size-4 items-center justify-center rounded-full bg-gray-background-soft",children:s(v,{className:"size-3 text-gray-foreground",strokeWidth:2.6})}),s("span",{className:"whitespace-nowrap font-medium text-gray-foreground-muted",children:"N\xE3o iniciado"})]})})})):s("td",o(l({className:"px-5 py-4 align-middle"},m),{children:d("div",{className:i("flex min-w-[140px] flex-col items-start justify-center gap-2",t),children:[s("div",{className:"flex shrink-0 items-center gap-0.5 text-xs leading-4",children:d("span",{className:"relative shrink-0 whitespace-nowrap font-medium text-gray-foreground-muted",children:[s("span",{className:"font-semibold text-gray-foreground",children:n})," ",n>1?"respondidas":"respondida"]})}),s(fe,{percentage:u,label:`${n} ${n>1?"respondidas":"respondida"}`})]})}))}const he={notStarted:{icon:v,bgColor:"bg-gray-background-soft",iconColor:"text-gray-foreground",titleClassName:"font-medium text-gray-foreground-muted",title:()=>"N\xE3o iniciado",subtitle:()=>""},minNotReached:{icon:W,bgColor:"bg-feedback-warning-background-soft",iconColor:"text-feedback-warning-foreground",titleClassName:"font-medium text-gray-foreground-muted",title:()=>"M\xEDnimo n\xE3o atingido",subtitle:({remainingQuestions:r})=>r>1?`Faltam ${r} quest\xF5es`:`Falta ${r} quest\xE3o`},dominated:{icon:B,statusLabel:"Dominado",bgColor:"bg-feedback-success-background-soft",iconColor:"text-feedback-success-foreground",titleClassName:"font-medium text-gray-foreground-muted",title:({progress:r})=>d(b,{children:[d("span",{className:"font-semibold text-gray-foreground",children:[Math.round(r),"%"]})," ","de ",r>1?"acertos":"acerto"]}),subtitle:({correct:r,answered:e})=>`${r} de ${e} acertos`},notDominated:{icon:q,statusLabel:"N\xE3o dominado",bgColor:"bg-feedback-error-background-soft",iconColor:"text-feedback-error-foreground",titleClassName:"font-medium text-gray-foreground-muted",title:({progress:r})=>d(b,{children:[d("span",{className:"font-semibold text-gray-foreground",children:[Math.round(r),"%"]})," ","de ",r>1?"acertos":"acerto"]}),subtitle:({correct:r,answered:e})=>`${r} de ${e} acertos`}};function pe(r,e,a){return[[r,"notStarted"],[e,"minNotReached"],[a>=80,"dominated"],[!0,"notDominated"]].find(([n])=>n)[1]}function Ne(r){var e=r,{answered:a,correct:n,minQuestions:t,className:m}=e,u=c(e,["answered","correct","minQuestions","className"]);const f=a>0?n/a*100:0,g=a===0,T=a<t,P=t-a,A=pe(g,T,f),{icon:E,bgColor:F,iconColor:M,titleClassName:S,statusLabel:N,title:D,subtitle:I}=he[A],x={progress:f,correct:n,answered:a,remainingQuestions:P};return s("td",o(l({className:"px-5 py-4 align-middle"},u),{children:s("div",{className:i("flex min-w-[140px] flex-col items-start justify-center gap-2",m),children:d("div",{className:"flex shrink-0 items-center justify-center gap-2 text-xs font-medium text-gray-foreground-muted",children:[s("div",{className:i("flex size-4 items-center justify-center rounded-full",F),children:s(E,{"aria-hidden":"true",className:i("size-3",M),strokeWidth:2.6})}),d("div",{className:"flex flex-col items-start justify-center",children:[N&&d("span",{className:"sr-only",children:[N,": "]}),s("span",{className:i("whitespace-nowrap",S),children:D(x)}),s("span",{className:"whitespace-nowrap text-xxs font-semibold text-gray-foreground-muted",children:I(x)})]})]})})}))}function xe(r){var e=r,{children:a,className:n,onClick:t}=e,m=c(e,["children","className","onClick"]);return s("td",{className:"px-5 py-4 align-middle",children:s(y,o(l({variant:"regular-soft",size:"sm",iconRight:s(L,{className:"size-4"}),onClick:t,className:n},m),{children:a}))})}export{K as Ranking,de as RankingAssigneeGroup,me as RankingAssigneeItem,ce as RankingAssigneeLabel,oe as RankingAssigneesColumn,ee as RankingBody,xe as RankingButton,V as RankingHeader,_ as RankingHeaderCell,re as RankingItem,ae as RankingNumber,Ne as RankingPerformance,ue as RankingPriority,ge as RankingQuestions,te as RankingSpecialty,le as RankingSuperFocus,ie as RankingTopic,ne as RankingTopicColumn,se as RankingTopicContent};
4
- //# sourceMappingURL=Ranking.mjs.map
3
+ import{jsx as s,jsxs as d,Fragment as b}from"react/jsx-runtime";import{cn as i,clampPercentage as p}from"../lib/utils.mjs";import{ArrowRightMd as q,Info as L,CloseMd as Q,Check as B,Warning as W,RemoveMinus as v,CheckboxFill as G}from"@medway-ui/icons";import{Button as y}from"./Button.mjs";import{Avatar as H,AvatarImage as X,AvatarFallback as Y}from"./Avatar.mjs";import{Tag as k}from"./Tag.mjs";import{TooltipProvider as w,Tooltip as C,TooltipTrigger as R,TooltipContent as j}from"./Tooltip.mjs";var Z=Object.defineProperty,J=Object.defineProperties,K=Object.getOwnPropertyDescriptors,h=Object.getOwnPropertySymbols,z=Object.prototype.hasOwnProperty,$=Object.prototype.propertyIsEnumerable,O=(r,e,a)=>e in r?Z(r,e,{enumerable:!0,configurable:!0,writable:!0,value:a}):r[e]=a,l=(r,e)=>{for(var a in e||(e={}))z.call(e,a)&&O(r,a,e[a]);if(h)for(var a of h(e))$.call(e,a)&&O(r,a,e[a]);return r},o=(r,e)=>J(r,K(e)),c=(r,e)=>{var a={};for(var n in r)z.call(r,n)&&e.indexOf(n)<0&&(a[n]=r[n]);if(r!=null&&h)for(var n of h(r))e.indexOf(n)<0&&$.call(r,n)&&(a[n]=r[n]);return a};function U(r){var e=r,{children:a,className:n}=e,t=c(e,["children","className"]);return s("div",{className:"w-full overflow-x-auto rounded-lg border border-gray-stroke-muted",children:s("table",o(l({className:i("w-full border-collapse text-left",n)},t),{children:a}))})}function V(r){var e=r,{children:a,className:n}=e,t=c(e,["children","className"]);return s("thead",o(l({className:i("h-11 border-b border-gray-stroke-muted bg-surface-card",n)},t),{children:s("tr",{children:a})}))}function _(r){var e=r,{children:a,className:n,tooltip:t,highlight:m}=e,u=c(e,["children","className","tooltip","highlight"]);return s("th",o(l({className:i("text-ellipsis whitespace-nowrap px-5 text-sm font-semibold text-gray-foreground first:pr-0",n)},u),{children:d("div",{className:"flex items-center gap-1.5",children:[s("span",{className:i(m&&"flex size-7 shrink-0 items-center justify-center rounded-full bg-primary-foreground-onfill"),children:a}),t&&s(w,{children:d(C,{children:[s(R,{asChild:!0,children:s(y,{type:"button",variant:"regular-basic",size:"sm","aria-label":t,className:"!h-6 !min-h-6 !w-6 !min-w-6 !p-0 text-gray-foreground",iconLeft:s(L,{"aria-hidden":"true",className:"size-4"})})}),s(j,{children:t})]})})]})}))}function ee(r){var e=r,{children:a,className:n}=e,t=c(e,["children","className"]);return s("tbody",o(l({className:i("bg-surface-card",n)},t),{children:a}))}function re(r){var e=r,{children:a,className:n}=e,t=c(e,["children","className"]);return s("tr",o(l({className:i("w-full border-t border-solid border-gray-stroke-muted first:border-t-0",n)},t),{children:a}))}function ae(r){var e=r,{children:a,className:n}=e,t=c(e,["children","className"]);return s("td",{className:"py-4 pl-5 align-middle",children:s("div",o(l({className:i("flex size-7 shrink-0 items-center justify-center overflow-hidden whitespace-nowrap rounded-full bg-primary-foreground text-sm font-semibold text-primary-foreground-onfill",n)},t),{children:a}))})}function ne(r){var e=r,{children:a,className:n}=e,t=c(e,["children","className"]);return s("td",o(l({className:"px-5 py-4 align-middle"},t),{children:s("div",{className:i("flex items-center gap-5",n),children:s("div",{className:"flex shrink-0 items-center gap-5 pr-8",children:a})})}))}function se(r){var e=r,{children:a,className:n}=e,t=c(e,["children","className"]);return s("div",o(l({className:i("flex shrink-0 flex-col items-start whitespace-nowrap text-gray-foreground",n)},t),{children:a}))}function te(r){var e=r,{children:a,className:n}=e,t=c(e,["children","className"]);return s("span",o(l({className:i("shrink-0 overflow-hidden text-ellipsis font-sans text-xxs font-medium leading-xxs",n)},t),{children:a}))}function ie(r){var e=r,{children:a,className:n}=e,t=c(e,["children","className"]);return s("span",o(l({className:i("shrink-0 overflow-hidden text-ellipsis font-sans text-sm font-semibold leading-sm",n)},t),{children:a}))}function le(r){var e=r,{children:a,className:n}=e,t=c(e,["children","className"]);return s(k,o(l({className:i("bg-gradient-to-r from-cm-24 to-secondary-24 text-primary-foreground",n)},t),{icon:s(G,{className:"text-primary-foreground"}),children:a}))}function oe(r){var e=r,{children:a,className:n}=e,t=c(e,["children","className"]);return s("td",o(l({className:"px-5 py-4 align-middle"},t),{children:s("div",{className:i("flex flex-col items-start gap-2",n),children:a})}))}function ce(r){var e=r,{children:a,className:n}=e,t=c(e,["children","className"]);return s("p",o(l({className:i("relative shrink-0 overflow-hidden text-ellipsis whitespace-nowrap text-xxs font-medium leading-xxs text-gray-foreground",n)},t),{children:a}))}function de(r){var e=r,{children:a,className:n}=e,t=c(e,["children","className"]);return s("div",o(l({className:i("avatar-group flex shrink-0 items-center gap-2",n)},t),{children:a}))}function me(r){var e=r,{src:a,alt:n,fallback:t="?",className:m,tooltip:u}=e,f=c(e,["src","alt","fallback","className","tooltip"]);const g=d(H,o(l({size:"sm",tabIndex:u?0:void 0,className:i("ring-2 ring-background",u&&"outline-none focus-visible:ring-4 focus-visible:ring-state-focus",m)},f),{children:[s(X,{src:a,alt:n!=null?n:typeof u=="string"?u:""}),s(Y,{children:t})]}));return u?s(w,{children:d(C,{children:[s(R,{asChild:!0,children:g}),s(j,{children:u})]})}):g}function ue(r){var e=r,{children:a,className:n,icon:t}=e,m=c(e,["children","className","icon"]);return s("td",o(l({className:"px-5 py-4 align-middle"},m),{children:s(k,{variant:"regular-soft",className:n,icon:t,children:a})}))}function fe({className:r,percentage:e,label:a}){return s("div",{role:"progressbar","aria-label":a,"aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":Math.round(p(e)),className:i("relative h-0.5 w-full overflow-hidden rounded-pill bg-gray-stroke-muted",r),children:s("div",{className:i("absolute inset-y-0 left-0 rounded-pill bg-primary-stroke transition-[width] duration-300 motion-reduce:transition-none"),style:{width:`${p(e)}%`}})})}function ge(r){var e=r,{questions:a,answered:n,className:t}=e,m=c(e,["questions","answered","className"]);const u=n>0&&a>0?p(n/a*100):0;return n===0?s("td",o(l({className:"px-5 py-4 align-middle"},m),{children:s("div",{className:i("flex min-w-[140px] flex-col items-start justify-center gap-2",t),children:d("div",{className:"flex shrink-0 items-center justify-center gap-2 text-xs font-medium text-gray-foreground-muted",children:[s("div",{className:"flex size-4 items-center justify-center rounded-full bg-gray-background-soft",children:s(v,{className:"size-3 text-gray-foreground",strokeWidth:2.6})}),s("span",{className:"whitespace-nowrap font-medium text-gray-foreground-muted",children:"N\xE3o iniciado"})]})})})):s("td",o(l({className:"px-5 py-4 align-middle"},m),{children:d("div",{className:i("flex min-w-[140px] flex-col items-start justify-center gap-2",t),children:[s("div",{className:"flex shrink-0 items-center gap-0.5 text-xs leading-xs",children:d("span",{className:"relative shrink-0 whitespace-nowrap font-medium text-gray-foreground-muted",children:[s("span",{className:"font-semibold text-gray-foreground",children:n})," ",n>1?"respondidas":"respondida"]})}),s(fe,{percentage:u,label:`${n} ${n>1?"respondidas":"respondida"}`})]})}))}const he={notStarted:{icon:v,bgColor:"bg-gray-background-soft",iconColor:"text-gray-foreground",titleClassName:"font-medium text-gray-foreground-muted",title:()=>"N\xE3o iniciado",subtitle:()=>""},minNotReached:{icon:W,bgColor:"bg-feedback-warning-background-soft",iconColor:"text-feedback-warning-foreground",titleClassName:"font-medium text-gray-foreground-muted",title:()=>"M\xEDnimo n\xE3o atingido",subtitle:({remainingQuestions:r})=>r>1?`Faltam ${r} quest\xF5es`:`Falta ${r} quest\xE3o`},dominated:{icon:B,statusLabel:"Dominado",bgColor:"bg-feedback-success-background-soft",iconColor:"text-feedback-success-foreground",titleClassName:"font-medium text-gray-foreground-muted",title:({progress:r})=>d(b,{children:[d("span",{className:"font-semibold text-gray-foreground",children:[Math.round(r),"%"]})," ","de ",r>1?"acertos":"acerto"]}),subtitle:({correct:r,answered:e})=>`${r} de ${e} acertos`},notDominated:{icon:Q,statusLabel:"N\xE3o dominado",bgColor:"bg-feedback-error-background-soft",iconColor:"text-feedback-error-foreground",titleClassName:"font-medium text-gray-foreground-muted",title:({progress:r})=>d(b,{children:[d("span",{className:"font-semibold text-gray-foreground",children:[Math.round(r),"%"]})," ","de ",r>1?"acertos":"acerto"]}),subtitle:({correct:r,answered:e})=>`${r} de ${e} acertos`}};function pe(r,e,a){return[[r,"notStarted"],[e,"minNotReached"],[a>=80,"dominated"],[!0,"notDominated"]].find(([n])=>n)[1]}function xe(r){var e=r,{answered:a,correct:n,minQuestions:t,className:m}=e,u=c(e,["answered","correct","minQuestions","className"]);const f=a>0?n/a*100:0,g=a===0,T=a<t,P=t-a,A=pe(g,T,f),{icon:E,bgColor:F,iconColor:M,titleClassName:I,statusLabel:x,title:D,subtitle:S}=he[A],N={progress:f,correct:n,answered:a,remainingQuestions:P};return s("td",o(l({className:"px-5 py-4 align-middle"},u),{children:s("div",{className:i("flex min-w-[140px] flex-col items-start justify-center gap-2",m),children:d("div",{className:"flex shrink-0 items-center justify-center gap-2 text-xs font-medium text-gray-foreground-muted",children:[s("div",{className:i("flex size-4 items-center justify-center rounded-full",F),children:s(E,{"aria-hidden":"true",className:i("size-3",M),strokeWidth:2.6})}),d("div",{className:"flex flex-col items-start justify-center",children:[x&&d("span",{className:"sr-only",children:[x,": "]}),s("span",{className:i("whitespace-nowrap",I),children:D(N)}),s("span",{className:"whitespace-nowrap text-xxs font-semibold text-gray-foreground-muted",children:S(N)})]})]})})}))}function Ne(r){var e=r,{children:a,className:n,onClick:t}=e,m=c(e,["children","className","onClick"]);return s("td",{className:"px-5 py-4 align-middle",children:s(y,o(l({variant:"regular-soft",size:"sm",iconRight:s(q,{className:"size-4"}),onClick:t,className:n},m),{children:a}))})}export{U as Ranking,de as RankingAssigneeGroup,me as RankingAssigneeItem,ce as RankingAssigneeLabel,oe as RankingAssigneesColumn,ee as RankingBody,Ne as RankingButton,V as RankingHeader,_ as RankingHeaderCell,re as RankingItem,ae as RankingNumber,xe as RankingPerformance,ue as RankingPriority,ge as RankingQuestions,te as RankingSpecialty,le as RankingSuperFocus,ie as RankingTopic,ne as RankingTopicColumn,se as RankingTopicContent};
@@ -26,4 +26,3 @@ declare const RatingLabelVariants: (props?: ({
26
26
  declare function Rating({ value, onChange, maxStars, readOnly, labels, size, className, classNameContainer, classNameLabels, label, getValueLabel, }: RatingProps): import("react/jsx-runtime").JSX.Element;
27
27
  export { Rating, RatingButtonVariants, RatingLabelVariants, RatingStarVariants, };
28
28
  export type { RatingProps, RatingSize, RatingStarState };
29
- //# sourceMappingURL=Rating.d.ts.map
@@ -1,4 +1,3 @@
1
1
  "use strict";
2
2
  "use client";
3
- "use strict";var s=require("react/jsx-runtime"),C=require("../lib/utils.js"),g=require("class-variance-authority"),u=require("react"),T=require("../hooks/use-id.js");const N=g.cva("transition-all duration-150",{variants:{size:{sm:"size-6",md:"size-7",lg:"size-8"}},defaultVariants:{size:"md"}}),F=g.cva("",{variants:{size:{sm:"size-7",md:"size-8",lg:"size-9"}},defaultVariants:{size:"md"}}),M=g.cva("inline-flex items-center justify-center rounded-sm outline-none focus-visible:ring-[3px] focus-visible:ring-state-focus",{variants:{size:{sm:"size-7",md:"size-8",lg:"size-9"},readOnly:{true:"cursor-default",false:"cursor-pointer"}},defaultVariants:{size:"md",readOnly:!1}}),V=g.cva("flex w-full min-w-0 justify-between text-gray-foreground font-medium gap-2",{variants:{size:{sm:"text-xs",md:"text-xs",lg:"text-sm"}},defaultVariants:{size:"md"}});function G({state:r,className:t}){const i=T.useId(),a=u.useRef(`rating-${Math.random().toString(36).slice(2)}`),o=i||a.current;return r==="full"?s.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 24",fill:"none",className:t,children:s.jsx("path",{d:"M0.888855 9.61676C0.523397 9.27879 0.721914 8.66782 1.21623 8.60921L8.2204 7.77843C8.42186 7.75455 8.59685 7.62803 8.68182 7.44381L11.6361 1.03906C11.8446 0.587053 12.4872 0.586967 12.6957 1.03898L15.6499 7.44368C15.7349 7.6279 15.9087 7.75475 16.1102 7.77864L23.1148 8.60921C23.6091 8.66782 23.807 9.27897 23.4416 9.61694L18.2638 14.4061C18.1148 14.5438 18.0485 14.7488 18.0881 14.9478L19.4622 21.8658C19.5593 22.354 19.0396 22.7323 18.6053 22.4892L12.4507 19.0432C12.2737 18.9441 12.0586 18.9446 11.8816 19.0437L5.72641 22.4883C5.29205 22.7314 4.7715 22.354 4.86851 21.8658L6.2429 14.9483C6.28244 14.7493 6.21629 14.5438 6.06735 14.406L0.888855 9.61676Z",className:"fill-feedback-warning-background-soft stroke-feedback-warning-stroke hover:stroke-feedback-warning-stroke-emphasis",strokeWidth:"1.4",strokeLinecap:"round",strokeLinejoin:"round"})}):r==="half"?s.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 24",fill:"none",className:t,children:[s.jsx("defs",{children:s.jsxs("linearGradient",{id:o,x1:"0%",y1:"0%",x2:"100%",y2:"0%",children:[s.jsx("stop",{offset:"50%",className:"[stop-color:var(--color-feedback-warning-background-soft)]",stopOpacity:"1"}),s.jsx("stop",{offset:"50%",stopColor:"transparent",stopOpacity:"0"})]})}),s.jsx("path",{d:"M0.888855 9.61676C0.523397 9.27879 0.721914 8.66782 1.21623 8.60921L8.2204 7.77843C8.42186 7.75455 8.59685 7.62803 8.68182 7.44381L11.6361 1.03906C11.8446 0.587053 12.4872 0.586967 12.6957 1.03898L15.6499 7.44368C15.7349 7.6279 15.9087 7.75475 16.1102 7.77864L23.1148 8.60921C23.6091 8.66782 23.807 9.27897 23.4416 9.61694L18.2638 14.4061C18.1148 14.5438 18.0485 14.7488 18.0881 14.9478L19.4622 21.8658C19.5593 22.354 19.0396 22.7323 18.6053 22.4892L12.4507 19.0432C12.2737 18.9441 12.0586 18.9446 11.8816 19.0437L5.72641 22.4883C5.29205 22.7314 4.7715 22.354 4.86851 21.8658L6.2429 14.9483C6.28244 14.7493 6.21629 14.5438 6.06735 14.406L0.888855 9.61676Z",fill:`url(#${o})`,className:"stroke-feedback-warning-stroke hover:stroke-feedback-warning-stroke-emphasis",strokeWidth:"1.4",strokeLinecap:"round",strokeLinejoin:"round"})]}):s.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 24",fill:"none",className:t,children:s.jsx("path",{d:"M0.888855 9.61676C0.523397 9.27879 0.721914 8.66782 1.21623 8.60921L8.2204 7.77843C8.42186 7.75455 8.59685 7.62803 8.68182 7.44381L11.6361 1.03906C11.8446 0.587053 12.4872 0.586967 12.6957 1.03898L15.6499 7.44368C15.7349 7.6279 15.9087 7.75475 16.1102 7.77864L23.1148 8.60921C23.6091 8.66782 23.807 9.27897 23.4416 9.61694L18.2638 14.4061C18.1148 14.5438 18.0485 14.7488 18.0881 14.9478L19.4622 21.8658C19.5593 22.354 19.0396 22.7323 18.6053 22.4892L12.4507 19.0432C12.2737 18.9441 12.0586 18.9446 11.8816 19.0437L5.72641 22.4883C5.29205 22.7314 4.7715 22.354 4.86851 21.8658L6.2429 14.9483C6.28244 14.7493 6.21629 14.5438 6.06735 14.406L0.888855 9.61676Z",fill:"transparent",className:"stroke-gray-stroke-emphasis",strokeWidth:"1.4",strokeLinecap:"round",strokeLinejoin:"round"})})}function K(r,t){const i=r+1;return t>=i?"full":t>=i-.5?"half":"empty"}function U(r,t){return`Nota ${r} de ${t}`}const H={ArrowRight:1,ArrowUp:1,ArrowLeft:-1,ArrowDown:-1};function P({value:r,onChange:t,maxStars:i=5,readOnly:a=!1,labels:o,size:d="md",className:A,classNameContainer:R,classNameLabels:S,label:q="Avalia\xE7\xE3o",getValueLabel:k=U}){const[O,B]=u.useState(r!=null?r:0),[v,w]=u.useState(null),[j,L]=u.useState(null),b=u.useRef([]),z=r!==void 0,f=z?r:O,h=Math.ceil(f)-1,E=j!=null?j:h>=0?h:0,y=n=>{if(a)return;const e=n+1;z||B(e),t==null||t(e)},D=(n,e)=>{var c;const m=H[n.key];let l;if(m!==void 0)l=Math.min(Math.max(e+m,0),i-1);else if(n.key==="Home")l=0;else if(n.key==="End")l=i-1;else return;n.preventDefault();const x=l+1===f;l===e&&x||(L(l),(c=b.current[l])==null||c.focus(),x||y(l))},W=n=>{n.currentTarget.contains(n.relatedTarget)||L(null)},Z=n=>{a||w(n)},I=()=>{a||w(null)};return s.jsxs("div",{"data-slot":"rating",className:C.cn("inline-flex w-fit flex-col gap-2",A),children:[s.jsx("div",{role:a?"img":"radiogroup","aria-label":a?k(f,i):q,className:C.cn("inline-flex flex-row flex-wrap gap-1",R),onMouseLeave:I,onBlur:W,children:Array.from({length:i},(n,e)=>{const c=v!==null,m=c&&e<=v,l=v===e,x=c?m?"full":"empty":K(e,f);return s.jsx("button",{ref:p=>{b.current[e]=p},type:"button",disabled:a,onClick:()=>y(e),onKeyDown:p=>D(p,e),onFocus:()=>L(e),onMouseEnter:()=>Z(e),className:M({size:d,readOnly:a}),role:a?void 0:"radio","aria-checked":a?void 0:e===h,"aria-hidden":a||void 0,tabIndex:a||e===E?void 0:-1,"aria-label":k(e+1,i),children:s.jsx(G,{state:x,className:l&&!a?F({size:d}):N({size:d})})},e)})}),o&&o.length===2&&s.jsxs("div",{className:C.cn(V({size:d}),S),children:[s.jsx("span",{className:"truncate",children:o[0]}),s.jsx("span",{className:"truncate text-right",children:o[1]})]})]})}exports.Rating=P,exports.RatingButtonVariants=M,exports.RatingLabelVariants=V,exports.RatingStarVariants=N;
4
- //# sourceMappingURL=Rating.js.map
3
+ "use strict";var s=require("react/jsx-runtime"),k=require("../lib/utils.js"),g=require("class-variance-authority"),h=require("react"),T=require("../hooks/use-id.js");const b="M0.888855 9.61676C0.523397 9.27879 0.721914 8.66782 1.21623 8.60921L8.2204 7.77843C8.42186 7.75455 8.59685 7.62803 8.68182 7.44381L11.6361 1.03906C11.8446 0.587053 12.4872 0.586967 12.6957 1.03898L15.6499 7.44368C15.7349 7.6279 15.9087 7.75475 16.1102 7.77864L23.1148 8.60921C23.6091 8.66782 23.807 9.27897 23.4416 9.61694L18.2638 14.4061C18.1148 14.5438 18.0485 14.7488 18.0881 14.9478L19.4622 21.8658C19.5593 22.354 19.0396 22.7323 18.6053 22.4892L12.4507 19.0432C12.2737 18.9441 12.0586 18.9446 11.8816 19.0437L5.72641 22.4883C5.29205 22.7314 4.7715 22.354 4.86851 21.8658L6.2429 14.9483C6.28244 14.7493 6.21629 14.5438 6.06735 14.406L0.888855 9.61676Z",V="transition-[width,height] duration-150 motion-reduce:transition-none",A=g.cva(V,{variants:{size:{sm:"size-6",md:"size-7",lg:"size-8"}},defaultVariants:{size:"md"}}),U=g.cva(V,{variants:{size:{sm:"size-7",md:"size-8",lg:"size-9"}},defaultVariants:{size:"md"}}),R=g.cva("inline-flex items-center justify-center rounded-sm outline-none focus-visible:ring-4 focus-visible:ring-state-focus",{variants:{size:{sm:"size-7",md:"size-8",lg:"size-9"},readOnly:{true:"cursor-default",false:"cursor-pointer"}},defaultVariants:{size:"md",readOnly:!1}}),q=g.cva("flex w-full min-w-0 justify-between text-gray-foreground font-medium gap-2",{variants:{size:{sm:"text-xs",md:"text-xs",lg:"text-sm"}},defaultVariants:{size:"md"}});function Z({state:r,highlighted:l=!1,className:n}){const a=T.useId();return r==="full"?s.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 24",fill:"none",className:n,children:s.jsx("path",{d:b,className:l?"fill-feedback-warning-background-soft-emphasis stroke-feedback-warning-stroke-emphasis":"fill-feedback-warning-background-soft stroke-feedback-warning-stroke",strokeWidth:"1.4",strokeLinecap:"round",strokeLinejoin:"round"})}):r==="half"?s.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 24",fill:"none",className:n,children:[s.jsx("defs",{children:s.jsxs("linearGradient",{id:a,x1:"0%",y1:"0%",x2:"100%",y2:"0%",children:[s.jsx("stop",{offset:"50%",className:"[stop-color:var(--color-feedback-warning-background-soft)]",stopOpacity:"1"}),s.jsx("stop",{offset:"50%",stopColor:"transparent",stopOpacity:"0"})]})}),s.jsx("path",{d:b,fill:`url(#${a})`,className:"stroke-feedback-warning-stroke",strokeWidth:"1.4",strokeLinecap:"round",strokeLinejoin:"round"})]}):s.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 24",fill:"none",className:n,children:s.jsx("path",{d:b,fill:"transparent",className:"stroke-gray-stroke-emphasis",strokeWidth:"1.4",strokeLinecap:"round",strokeLinejoin:"round"})})}function G(r,l){const n=r+1;return l>=n?"full":l>=n-.5?"half":"empty"}function H(r,l){return`Nota ${r} de ${l}`}const J={ArrowRight:1,ArrowUp:1,ArrowLeft:-1,ArrowDown:-1};function P({value:r,onChange:l,maxStars:n=5,readOnly:a=!1,labels:u,size:c="md",className:M,classNameContainer:O,classNameLabels:S,label:B="Avalia\xE7\xE3o",getValueLabel:j=H}){const[E,D]=h.useState(r!=null?r:0),[x,z]=h.useState(null),[y,v]=h.useState(null),L=h.useRef([]),N=r!==void 0,d=N?r:E,p=Math.ceil(d)-1,I=y!=null?y:p>=0?p:0,C=t=>{if(a)return;const e=t+1;N||D(e),l==null||l(e)},W=(t,e)=>{var o;const f=J[t.key];let i;if(f!==void 0)i=Math.min(Math.max(e+f,0),n-1);else if(t.key==="Home")i=0;else if(t.key==="End")i=n-1;else return;t.preventDefault();const m=i+1===d;i===e&&m||(v(i),(o=L.current[i])==null||o.focus(),m||C(i))},$=t=>{t.currentTarget.contains(t.relatedTarget)||v(null)},F=t=>{a||z(t)},K=()=>{a||z(null)};return s.jsxs("div",{"data-slot":"rating",className:k.cn("inline-flex w-fit flex-col gap-2",M),children:[s.jsx("div",{role:a?"img":"radiogroup","aria-label":a?j(d,n):B,className:k.cn("inline-flex flex-row flex-wrap gap-1",O),onMouseLeave:K,onBlur:$,children:Array.from({length:n},(t,e)=>{const o=x!==null,f=o&&e<=x,i=x===e&&!a,m=o?f?"full":"empty":G(e,d);return s.jsx("button",{ref:w=>{L.current[e]=w},type:"button",disabled:a,onClick:()=>C(e),onKeyDown:w=>W(w,e),onFocus:()=>v(e),onMouseEnter:()=>F(e),className:R({size:c,readOnly:a}),role:a?void 0:"radio","aria-checked":a?void 0:e===p,"aria-hidden":a||void 0,tabIndex:a||e===I?void 0:-1,"aria-label":j(e+1,n),children:s.jsx(Z,{state:m,highlighted:i,className:i?U({size:c}):A({size:c})})},e)})}),u&&u.length===2&&s.jsxs("div",{className:k.cn(q({size:c}),S),children:[s.jsx("span",{className:"truncate",children:u[0]}),s.jsx("span",{className:"truncate text-right",children:u[1]})]})]})}exports.Rating=P,exports.RatingButtonVariants=R,exports.RatingLabelVariants=q,exports.RatingStarVariants=A;
@@ -1,4 +1,3 @@
1
1
  "use strict";
2
2
  "use client";
3
- import{jsxs as g,jsx as s}from"react/jsx-runtime";import{cn as k}from"../lib/utils.mjs";import{cva as p}from"class-variance-authority";import{useState as w,useRef as V}from"react";import{useId as I}from"../hooks/use-id.mjs";const j=p("transition-all duration-150",{variants:{size:{sm:"size-6",md:"size-7",lg:"size-8"}},defaultVariants:{size:"md"}}),K=p("",{variants:{size:{sm:"size-7",md:"size-8",lg:"size-9"}},defaultVariants:{size:"md"}}),A=p("inline-flex items-center justify-center rounded-sm outline-none focus-visible:ring-[3px] focus-visible:ring-state-focus",{variants:{size:{sm:"size-7",md:"size-8",lg:"size-9"},readOnly:{true:"cursor-default",false:"cursor-pointer"}},defaultVariants:{size:"md",readOnly:!1}}),O=p("flex w-full min-w-0 justify-between text-gray-foreground font-medium gap-2",{variants:{size:{sm:"text-xs",md:"text-xs",lg:"text-sm"}},defaultVariants:{size:"md"}});function U({state:t,className:r}){const i=I(),a=V(`rating-${Math.random().toString(36).slice(2)}`),o=i||a.current;return t==="full"?s("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 24",fill:"none",className:r,children:s("path",{d:"M0.888855 9.61676C0.523397 9.27879 0.721914 8.66782 1.21623 8.60921L8.2204 7.77843C8.42186 7.75455 8.59685 7.62803 8.68182 7.44381L11.6361 1.03906C11.8446 0.587053 12.4872 0.586967 12.6957 1.03898L15.6499 7.44368C15.7349 7.6279 15.9087 7.75475 16.1102 7.77864L23.1148 8.60921C23.6091 8.66782 23.807 9.27897 23.4416 9.61694L18.2638 14.4061C18.1148 14.5438 18.0485 14.7488 18.0881 14.9478L19.4622 21.8658C19.5593 22.354 19.0396 22.7323 18.6053 22.4892L12.4507 19.0432C12.2737 18.9441 12.0586 18.9446 11.8816 19.0437L5.72641 22.4883C5.29205 22.7314 4.7715 22.354 4.86851 21.8658L6.2429 14.9483C6.28244 14.7493 6.21629 14.5438 6.06735 14.406L0.888855 9.61676Z",className:"fill-feedback-warning-background-soft stroke-feedback-warning-stroke hover:stroke-feedback-warning-stroke-emphasis",strokeWidth:"1.4",strokeLinecap:"round",strokeLinejoin:"round"})}):t==="half"?g("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 24",fill:"none",className:r,children:[s("defs",{children:g("linearGradient",{id:o,x1:"0%",y1:"0%",x2:"100%",y2:"0%",children:[s("stop",{offset:"50%",className:"[stop-color:var(--color-feedback-warning-background-soft)]",stopOpacity:"1"}),s("stop",{offset:"50%",stopColor:"transparent",stopOpacity:"0"})]})}),s("path",{d:"M0.888855 9.61676C0.523397 9.27879 0.721914 8.66782 1.21623 8.60921L8.2204 7.77843C8.42186 7.75455 8.59685 7.62803 8.68182 7.44381L11.6361 1.03906C11.8446 0.587053 12.4872 0.586967 12.6957 1.03898L15.6499 7.44368C15.7349 7.6279 15.9087 7.75475 16.1102 7.77864L23.1148 8.60921C23.6091 8.66782 23.807 9.27897 23.4416 9.61694L18.2638 14.4061C18.1148 14.5438 18.0485 14.7488 18.0881 14.9478L19.4622 21.8658C19.5593 22.354 19.0396 22.7323 18.6053 22.4892L12.4507 19.0432C12.2737 18.9441 12.0586 18.9446 11.8816 19.0437L5.72641 22.4883C5.29205 22.7314 4.7715 22.354 4.86851 21.8658L6.2429 14.9483C6.28244 14.7493 6.21629 14.5438 6.06735 14.406L0.888855 9.61676Z",fill:`url(#${o})`,className:"stroke-feedback-warning-stroke hover:stroke-feedback-warning-stroke-emphasis",strokeWidth:"1.4",strokeLinecap:"round",strokeLinejoin:"round"})]}):s("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 24",fill:"none",className:r,children:s("path",{d:"M0.888855 9.61676C0.523397 9.27879 0.721914 8.66782 1.21623 8.60921L8.2204 7.77843C8.42186 7.75455 8.59685 7.62803 8.68182 7.44381L11.6361 1.03906C11.8446 0.587053 12.4872 0.586967 12.6957 1.03898L15.6499 7.44368C15.7349 7.6279 15.9087 7.75475 16.1102 7.77864L23.1148 8.60921C23.6091 8.66782 23.807 9.27897 23.4416 9.61694L18.2638 14.4061C18.1148 14.5438 18.0485 14.7488 18.0881 14.9478L19.4622 21.8658C19.5593 22.354 19.0396 22.7323 18.6053 22.4892L12.4507 19.0432C12.2737 18.9441 12.0586 18.9446 11.8816 19.0437L5.72641 22.4883C5.29205 22.7314 4.7715 22.354 4.86851 21.8658L6.2429 14.9483C6.28244 14.7493 6.21629 14.5438 6.06735 14.406L0.888855 9.61676Z",fill:"transparent",className:"stroke-gray-stroke-emphasis",strokeWidth:"1.4",strokeLinecap:"round",strokeLinejoin:"round"})})}function q(t,r){const i=t+1;return r>=i?"full":r>=i-.5?"half":"empty"}function H(t,r){return`Nota ${t} de ${r}`}const P={ArrowRight:1,ArrowUp:1,ArrowLeft:-1,ArrowDown:-1};function Y({value:t,onChange:r,maxStars:i=5,readOnly:a=!1,labels:o,size:c="md",className:B,classNameContainer:E,classNameLabels:R,label:S="Avalia\xE7\xE3o",getValueLabel:x=H}){const[D,W]=w(t!=null?t:0),[L,b]=w(null),[z,h]=w(null),y=V([]),N=t!==void 0,u=N?t:D,v=Math.ceil(u)-1,Z=z!=null?z:v>=0?v:0,M=n=>{if(a)return;const e=n+1;N||W(e),r==null||r(e)},$=(n,e)=>{var d;const f=P[n.key];let l;if(f!==void 0)l=Math.min(Math.max(e+f,0),i-1);else if(n.key==="Home")l=0;else if(n.key==="End")l=i-1;else return;n.preventDefault();const m=l+1===u;l===e&&m||(h(l),(d=y.current[l])==null||d.focus(),m||M(l))},T=n=>{n.currentTarget.contains(n.relatedTarget)||h(null)},F=n=>{a||b(n)},G=()=>{a||b(null)};return g("div",{"data-slot":"rating",className:k("inline-flex w-fit flex-col gap-2",B),children:[s("div",{role:a?"img":"radiogroup","aria-label":a?x(u,i):S,className:k("inline-flex flex-row flex-wrap gap-1",E),onMouseLeave:G,onBlur:T,children:Array.from({length:i},(n,e)=>{const d=L!==null,f=d&&e<=L,l=L===e,m=d?f?"full":"empty":q(e,u);return s("button",{ref:C=>{y.current[e]=C},type:"button",disabled:a,onClick:()=>M(e),onKeyDown:C=>$(C,e),onFocus:()=>h(e),onMouseEnter:()=>F(e),className:A({size:c,readOnly:a}),role:a?void 0:"radio","aria-checked":a?void 0:e===v,"aria-hidden":a||void 0,tabIndex:a||e===Z?void 0:-1,"aria-label":x(e+1,i),children:s(U,{state:m,className:l&&!a?K({size:c}):j({size:c})})},e)})}),o&&o.length===2&&g("div",{className:k(O({size:c}),R),children:[s("span",{className:"truncate",children:o[0]}),s("span",{className:"truncate text-right",children:o[1]})]})]})}export{Y as Rating,A as RatingButtonVariants,O as RatingLabelVariants,j as RatingStarVariants};
4
- //# sourceMappingURL=Rating.mjs.map
3
+ import{jsxs as g,jsx as s}from"react/jsx-runtime";import{cn as x}from"../lib/utils.mjs";import{cva as h}from"class-variance-authority";import{useState as b,useRef as Z}from"react";import{useId as q}from"../hooks/use-id.mjs";const z="M0.888855 9.61676C0.523397 9.27879 0.721914 8.66782 1.21623 8.60921L8.2204 7.77843C8.42186 7.75455 8.59685 7.62803 8.68182 7.44381L11.6361 1.03906C11.8446 0.587053 12.4872 0.586967 12.6957 1.03898L15.6499 7.44368C15.7349 7.6279 15.9087 7.75475 16.1102 7.77864L23.1148 8.60921C23.6091 8.66782 23.807 9.27897 23.4416 9.61694L18.2638 14.4061C18.1148 14.5438 18.0485 14.7488 18.0881 14.9478L19.4622 21.8658C19.5593 22.354 19.0396 22.7323 18.6053 22.4892L12.4507 19.0432C12.2737 18.9441 12.0586 18.9446 11.8816 19.0437L5.72641 22.4883C5.29205 22.7314 4.7715 22.354 4.86851 21.8658L6.2429 14.9483C6.28244 14.7493 6.21629 14.5438 6.06735 14.406L0.888855 9.61676Z",A="transition-[width,height] duration-150 motion-reduce:transition-none",M=h(A,{variants:{size:{sm:"size-6",md:"size-7",lg:"size-8"}},defaultVariants:{size:"md"}}),G=h(A,{variants:{size:{sm:"size-7",md:"size-8",lg:"size-9"}},defaultVariants:{size:"md"}}),O=h("inline-flex items-center justify-center rounded-sm outline-none focus-visible:ring-4 focus-visible:ring-state-focus",{variants:{size:{sm:"size-7",md:"size-8",lg:"size-9"},readOnly:{true:"cursor-default",false:"cursor-pointer"}},defaultVariants:{size:"md",readOnly:!1}}),R=h("flex w-full min-w-0 justify-between text-gray-foreground font-medium gap-2",{variants:{size:{sm:"text-xs",md:"text-xs",lg:"text-sm"}},defaultVariants:{size:"md"}});function H({state:r,highlighted:l=!1,className:n}){const a=q();return r==="full"?s("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 24",fill:"none",className:n,children:s("path",{d:z,className:l?"fill-feedback-warning-background-soft-emphasis stroke-feedback-warning-stroke-emphasis":"fill-feedback-warning-background-soft stroke-feedback-warning-stroke",strokeWidth:"1.4",strokeLinecap:"round",strokeLinejoin:"round"})}):r==="half"?g("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 24",fill:"none",className:n,children:[s("defs",{children:g("linearGradient",{id:a,x1:"0%",y1:"0%",x2:"100%",y2:"0%",children:[s("stop",{offset:"50%",className:"[stop-color:var(--color-feedback-warning-background-soft)]",stopOpacity:"1"}),s("stop",{offset:"50%",stopColor:"transparent",stopOpacity:"0"})]})}),s("path",{d:z,fill:`url(#${a})`,className:"stroke-feedback-warning-stroke",strokeWidth:"1.4",strokeLinecap:"round",strokeLinejoin:"round"})]}):s("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 24",fill:"none",className:n,children:s("path",{d:z,fill:"transparent",className:"stroke-gray-stroke-emphasis",strokeWidth:"1.4",strokeLinecap:"round",strokeLinejoin:"round"})})}function J(r,l){const n=r+1;return l>=n?"full":l>=n-.5?"half":"empty"}function P(r,l){return`Nota ${r} de ${l}`}const Q={ArrowRight:1,ArrowUp:1,ArrowLeft:-1,ArrowDown:-1};function Y({value:r,onChange:l,maxStars:n=5,readOnly:a=!1,labels:d,size:c="md",className:B,classNameContainer:E,classNameLabels:D,label:S="Avalia\xE7\xE3o",getValueLabel:y=P}){const[W,I]=b(r!=null?r:0),[p,L]=b(null),[N,w]=b(null),C=Z([]),V=r!==void 0,u=V?r:W,k=Math.ceil(u)-1,$=N!=null?N:k>=0?k:0,j=t=>{if(a)return;const e=t+1;V||I(e),l==null||l(e)},F=(t,e)=>{var o;const f=Q[t.key];let i;if(f!==void 0)i=Math.min(Math.max(e+f,0),n-1);else if(t.key==="Home")i=0;else if(t.key==="End")i=n-1;else return;t.preventDefault();const m=i+1===u;i===e&&m||(w(i),(o=C.current[i])==null||o.focus(),m||j(i))},K=t=>{t.currentTarget.contains(t.relatedTarget)||w(null)},T=t=>{a||L(t)},U=()=>{a||L(null)};return g("div",{"data-slot":"rating",className:x("inline-flex w-fit flex-col gap-2",B),children:[s("div",{role:a?"img":"radiogroup","aria-label":a?y(u,n):S,className:x("inline-flex flex-row flex-wrap gap-1",E),onMouseLeave:U,onBlur:K,children:Array.from({length:n},(t,e)=>{const o=p!==null,f=o&&e<=p,i=p===e&&!a,m=o?f?"full":"empty":J(e,u);return s("button",{ref:v=>{C.current[e]=v},type:"button",disabled:a,onClick:()=>j(e),onKeyDown:v=>F(v,e),onFocus:()=>w(e),onMouseEnter:()=>T(e),className:O({size:c,readOnly:a}),role:a?void 0:"radio","aria-checked":a?void 0:e===k,"aria-hidden":a||void 0,tabIndex:a||e===$?void 0:-1,"aria-label":y(e+1,n),children:s(H,{state:m,highlighted:i,className:i?G({size:c}):M({size:c})})},e)})}),d&&d.length===2&&g("div",{className:x(R({size:c}),D),children:[s("span",{className:"truncate",children:d[0]}),s("span",{className:"truncate text-right",children:d[1]})]})]})}export{Y as Rating,O as RatingButtonVariants,R as RatingLabelVariants,M as RatingStarVariants};
@@ -3,4 +3,3 @@ import { ScrollArea as ScrollAreaPrimitive } from "radix-ui";
3
3
  declare function ScrollArea({ className, children, ...props }: ComponentProps<typeof ScrollAreaPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
4
4
  declare function ScrollBar({ className, orientation, ...props }: ComponentProps<typeof ScrollAreaPrimitive.ScrollAreaScrollbar>): import("react/jsx-runtime").JSX.Element;
5
5
  export { ScrollArea, ScrollBar };
6
- //# sourceMappingURL=ScrollArea.d.ts.map
@@ -1,4 +1,3 @@
1
1
  "use strict";
2
2
  "use client";
3
3
  "use strict";var t=require("react/jsx-runtime"),o=require("radix-ui"),i=require("../lib/utils.js"),m=Object.defineProperty,x=Object.defineProperties,h=Object.getOwnPropertyDescriptors,n=Object.getOwnPropertySymbols,u=Object.prototype.hasOwnProperty,d=Object.prototype.propertyIsEnumerable,v=(e,r,a)=>r in e?m(e,r,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[r]=a,f=(e,r)=>{for(var a in r||(r={}))u.call(r,a)&&v(e,a,r[a]);if(n)for(var a of n(r))d.call(r,a)&&v(e,a,r[a]);return e},b=(e,r)=>x(e,h(r)),p=(e,r)=>{var a={};for(var l in e)u.call(e,l)&&r.indexOf(l)<0&&(a[l]=e[l]);if(e!=null&&n)for(var l of n(e))r.indexOf(l)<0&&d.call(e,l)&&(a[l]=e[l]);return a};function j(e){var r=e,{className:a,children:l}=r,c=p(r,["className","children"]);return t.jsxs(o.ScrollArea.Root,b(f({"data-slot":"scroll-area",className:i.cn("relative",a)},c),{children:[t.jsx(o.ScrollArea.Viewport,{"data-slot":"scroll-area-viewport",className:"size-full rounded-[inherit]",children:l}),t.jsx(s,{}),t.jsx(s,{orientation:"horizontal"}),t.jsx(o.ScrollArea.Corner,{})]}))}function s(e){var r=e,{className:a,orientation:l="vertical"}=r,c=p(r,["className","orientation"]);return t.jsx(o.ScrollArea.ScrollAreaScrollbar,b(f({"data-slot":"scroll-area-scrollbar",orientation:l,className:i.cn("flex touch-none select-none",l==="vertical"&&"h-full w-2.5 border-l border-l-transparent p-px",l==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent p-px",a)},c),{children:t.jsx(o.ScrollArea.ScrollAreaThumb,{"data-slot":"scroll-area-thumb",className:"relative flex-1 rounded-full bg-gray-stroke-muted"})}))}exports.ScrollArea=j,exports.ScrollBar=s;
4
- //# sourceMappingURL=ScrollArea.js.map
@@ -1,4 +1,3 @@
1
1
  "use strict";
2
2
  "use client";
3
3
  import{jsxs as v,jsx as t}from"react/jsx-runtime";import{ScrollArea as l}from"radix-ui";import{cn as s}from"../lib/utils.mjs";var h=Object.defineProperty,O=Object.defineProperties,x=Object.getOwnPropertyDescriptors,n=Object.getOwnPropertySymbols,f=Object.prototype.hasOwnProperty,p=Object.prototype.propertyIsEnumerable,d=(e,r,a)=>r in e?h(e,r,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[r]=a,u=(e,r)=>{for(var a in r||(r={}))f.call(r,a)&&d(e,a,r[a]);if(n)for(var a of n(r))p.call(r,a)&&d(e,a,r[a]);return e},b=(e,r)=>O(e,x(r)),m=(e,r)=>{var a={};for(var o in e)f.call(e,o)&&r.indexOf(o)<0&&(a[o]=e[o]);if(e!=null&&n)for(var o of n(e))r.indexOf(o)<0&&p.call(e,o)&&(a[o]=e[o]);return a};function y(e){var r=e,{className:a,children:o}=r,c=m(r,["className","children"]);return v(l.Root,b(u({"data-slot":"scroll-area",className:s("relative",a)},c),{children:[t(l.Viewport,{"data-slot":"scroll-area-viewport",className:"size-full rounded-[inherit]",children:o}),t(i,{}),t(i,{orientation:"horizontal"}),t(l.Corner,{})]}))}function i(e){var r=e,{className:a,orientation:o="vertical"}=r,c=m(r,["className","orientation"]);return t(l.ScrollAreaScrollbar,b(u({"data-slot":"scroll-area-scrollbar",orientation:o,className:s("flex touch-none select-none",o==="vertical"&&"h-full w-2.5 border-l border-l-transparent p-px",o==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent p-px",a)},c),{children:t(l.ScrollAreaThumb,{"data-slot":"scroll-area-thumb",className:"relative flex-1 rounded-full bg-gray-stroke-muted"})}))}export{y as ScrollArea,i as ScrollBar};
4
- //# sourceMappingURL=ScrollArea.mjs.map
@@ -24,4 +24,3 @@ declare const SegmentControlTrigger: import("react").ForwardRefExoticComponent<O
24
24
  declare function SegmentControlContent({ className, ...props }: ComponentProps<typeof TabsPrimitive.Content>): import("react/jsx-runtime").JSX.Element;
25
25
  export { SegmentControl, SegmentControlContent, SegmentControlList, SegmentControlTrigger, segmentControlTriggerVariants, };
26
26
  export type { SegmentControlListProps, SegmentControlTriggerProps };
27
- //# sourceMappingURL=SegmentControl.d.ts.map
@@ -1,4 +1,3 @@
1
1
  "use strict";
2
2
  "use client";
3
- "use strict";var s=require("react/jsx-runtime"),V=require("class-variance-authority"),l=require("radix-ui"),u=require("react"),A=require("./Badge.js"),R=require("./ScrollArea.js"),g=require("./Tooltip.js"),I=require("../hooks/use-id.js"),o=require("../lib/utils.js"),L=Object.defineProperty,B=Object.defineProperties,U=Object.getOwnPropertyDescriptors,m=Object.getOwnPropertySymbols,C=Object.prototype.hasOwnProperty,T=Object.prototype.propertyIsEnumerable,z=(r,e,a)=>e in r?L(r,e,{enumerable:!0,configurable:!0,writable:!0,value:a}):r[e]=a,v=(r,e)=>{for(var a in e||(e={}))C.call(e,a)&&z(r,a,e[a]);if(m)for(var a of m(e))T.call(e,a)&&z(r,a,e[a]);return r},S=(r,e)=>B(r,U(e)),p=(r,e)=>{var a={};for(var t in r)C.call(r,t)&&e.indexOf(t)<0&&(a[t]=r[t]);if(r!=null&&m)for(var t of m(r))e.indexOf(t)<0&&T.call(r,t)&&(a[t]=r[t]);return a};const w=u.createContext(null);function D(r){var e=r,{className:a,size:t="md",children:n}=e,i=p(e,["className","size","children"]);return s.jsx(w.Provider,{value:u.useMemo(()=>({size:t}),[t]),children:s.jsx(l.Tabs.Root,S(v({"data-slot":"tabs",className:o.cn("flex flex-col gap-2",a)},i),{children:n}))})}function E(r){var e=r,{className:a,containerClassName:t}=e,n=p(e,["className","containerClassName"]);return s.jsx(R.ScrollArea,{className:o.cn("[&_[data-slot=scroll-area-scrollbar][data-orientation=horizontal]]:h-1",t),children:s.jsx(l.Tabs.List,v({"data-slot":"tabs-list",className:o.cn("inline-flex w-fit items-center justify-center rounded-md bg-gray-background-soft p-0.5",a)},n))})}const O=V.cva("shadow-transparent data-[state=active]:shadow-level-1 group inline-flex items-center justify-center gap-2.5 whitespace-nowrap rounded-[6px] font-medium text-gray-foreground outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-state-focus data-[state=active]:bg-surface-card data-[state=active]:text-primary-foreground [&_svg]:shrink-0 [&_svg]:text-inherit disabled:text-gray-foreground-muted disabled:pointer-events-none",{variants:{size:{sm:"max-h-7 px-3 py-1.5 text-xs [&_svg]:size-4",md:"max-h-9 px-4 py-2 text-sm [&_svg]:size-5",lg:"max-h-11 px-4 py-2.5 text-md [&_svg]:size-6"}},defaultVariants:{size:"md"}}),M=u.forwardRef(function(r,e){var a=r,{className:t,icon:n,tooltip:i,tooltipSide:q="top",badge:x,badgeVariant:P,children:c}=a,f=p(a,["className","icon","tooltip","tooltipSide","badge","badgeVariant","children"]),b;const _=d=>d!=null&&d!==0&&d!==""&&d!=="0"&&!f.disabled,h=u.useContext(w),j=I.useId(),N=(b=h==null?void 0:h.size)!=null?b:"md",k=()=>f.asChild?s.jsx(l.Slot.Slottable,{children:c}):c?s.jsxs("span",{className:"inline-grid [grid-template-areas:'stack']",children:[s.jsx("span",{"aria-hidden":"true",className:"invisible font-semibold [grid-area:stack]",children:c}),s.jsx("span",{className:"font-medium [grid-area:stack] group-data-[state=active]:font-semibold",children:c})]}):null,y=s.jsxs(l.Tabs.Trigger,S(v({ref:e,"data-slot":"tabs-trigger","aria-describedby":i?j:void 0,className:o.cn(O({size:N,className:t}))},f),{children:[n,k(),_(x)&&s.jsx(A.Badge,{size:N,variant:P,children:String(x)})]}));return i?s.jsx(g.TooltipProvider,{children:s.jsxs(g.Tooltip,{children:[s.jsx(g.TooltipTrigger,{asChild:!0,children:s.jsxs("span",{className:"inline-flex",children:[y,s.jsx("span",{id:j,hidden:!0,children:i})]})}),s.jsx(g.TooltipContent,{side:q,children:i})]})}):y});function W(r){var e=r,{className:a}=e,t=p(e,["className"]);return s.jsx(l.Tabs.Content,v({"data-slot":"tabs-content",className:o.cn("flex-1 rounded-md outline-none focus-visible:ring-[3px] focus-visible:ring-state-focus",a)},t))}exports.SegmentControl=D,exports.SegmentControlContent=W,exports.SegmentControlList=E,exports.SegmentControlTrigger=M,exports.segmentControlTriggerVariants=O;
4
- //# sourceMappingURL=SegmentControl.js.map
3
+ "use strict";var s=require("react/jsx-runtime"),V=require("class-variance-authority"),l=require("radix-ui"),u=require("react"),A=require("./Badge.js"),R=require("./ScrollArea.js"),g=require("./Tooltip.js"),I=require("../hooks/use-id.js"),o=require("../lib/utils.js"),L=Object.defineProperty,B=Object.defineProperties,U=Object.getOwnPropertyDescriptors,m=Object.getOwnPropertySymbols,C=Object.prototype.hasOwnProperty,T=Object.prototype.propertyIsEnumerable,z=(a,e,r)=>e in a?L(a,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):a[e]=r,v=(a,e)=>{for(var r in e||(e={}))C.call(e,r)&&z(a,r,e[r]);if(m)for(var r of m(e))T.call(e,r)&&z(a,r,e[r]);return a},S=(a,e)=>B(a,U(e)),p=(a,e)=>{var r={};for(var t in a)C.call(a,t)&&e.indexOf(t)<0&&(r[t]=a[t]);if(a!=null&&m)for(var t of m(a))e.indexOf(t)<0&&T.call(a,t)&&(r[t]=a[t]);return r};const w=u.createContext(null);function D(a){var e=a,{className:r,size:t="md",children:n}=e,i=p(e,["className","size","children"]);return s.jsx(w.Provider,{value:u.useMemo(()=>({size:t}),[t]),children:s.jsx(l.Tabs.Root,S(v({"data-slot":"tabs",className:o.cn("flex flex-col gap-2",r)},i),{children:n}))})}function E(a){var e=a,{className:r,containerClassName:t}=e,n=p(e,["className","containerClassName"]);return s.jsx(R.ScrollArea,{className:o.cn("[&_[data-slot=scroll-area-scrollbar][data-orientation=horizontal]]:h-1",t),children:s.jsx(l.Tabs.List,v({"data-slot":"tabs-list",className:o.cn("inline-flex w-fit items-center justify-center gap-0.5 rounded-md bg-gray-background-soft p-0.5",r)},n))})}const O=V.cva("shadow-transparent data-[state=active]:shadow-level-1 group inline-flex items-center justify-center whitespace-nowrap rounded-[6px] font-medium text-gray-foreground hover:text-gray-foreground-emphasis outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-state-focus data-[state=active]:bg-surface-card data-[state=active]:text-primary-foreground data-[state=active]:hover:text-primary-foreground-emphasis [&_svg]:shrink-0 [&_svg]:text-inherit disabled:text-gray-foreground-muted disabled:pointer-events-none",{variants:{size:{sm:"max-h-7 gap-2 px-3 py-1.5 text-xs [&_svg]:size-4",md:"max-h-9 gap-2.5 px-3.5 py-2 text-sm [&_svg]:size-5",lg:"max-h-11 gap-3 px-4 py-2.5 text-md [&_svg]:size-6"}},defaultVariants:{size:"md"}}),M=u.forwardRef(function(a,e){var r=a,{className:t,icon:n,tooltip:i,tooltipSide:q="top",badge:x,badgeVariant:P,children:c}=r,f=p(r,["className","icon","tooltip","tooltipSide","badge","badgeVariant","children"]),b;const _=d=>d!=null&&d!==0&&d!==""&&d!=="0"&&!f.disabled,h=u.useContext(w),j=I.useId(),y=(b=h==null?void 0:h.size)!=null?b:"md",k=()=>f.asChild?s.jsx(l.Slot.Slottable,{children:c}):c?s.jsxs("span",{className:"inline-grid [grid-template-areas:'stack']",children:[s.jsx("span",{"aria-hidden":"true",className:"invisible font-semibold [grid-area:stack]",children:c}),s.jsx("span",{className:"font-medium [grid-area:stack] group-data-[state=active]:font-semibold",children:c})]}):null,N=s.jsxs(l.Tabs.Trigger,S(v({ref:e,"data-slot":"tabs-trigger","aria-describedby":i?j:void 0,className:o.cn(O({size:y,className:t}))},f),{children:[n,k(),_(x)&&s.jsx(A.Badge,{size:y,variant:P,children:String(x)})]}));return i?s.jsx(g.TooltipProvider,{children:s.jsxs(g.Tooltip,{children:[s.jsx(g.TooltipTrigger,{asChild:!0,children:s.jsxs("span",{className:"inline-flex",children:[N,s.jsx("span",{id:j,hidden:!0,children:i})]})}),s.jsx(g.TooltipContent,{side:q,children:i})]})}):N});function W(a){var e=a,{className:r}=e,t=p(e,["className"]);return s.jsx(l.Tabs.Content,v({"data-slot":"tabs-content",className:o.cn("flex-1 rounded-md outline-none focus-visible:ring-4 focus-visible:ring-state-focus",r)},t))}exports.SegmentControl=D,exports.SegmentControlContent=W,exports.SegmentControlList=E,exports.SegmentControlTrigger=M,exports.segmentControlTriggerVariants=O;
@@ -1,4 +1,3 @@
1
1
  "use strict";
2
2
  "use client";
3
- import{jsxs as d,jsx as i}from"react/jsx-runtime";import{cva as V}from"class-variance-authority";import{Tabs as m,Slot as $}from"radix-ui";import{createContext as L,forwardRef as R,useContext as A,useMemo as D}from"react";import{Badge as I}from"./Badge.mjs";import{ScrollArea as B}from"./ScrollArea.mjs";import{TooltipProvider as E,Tooltip as M,TooltipTrigger as U,TooltipContent as W}from"./Tooltip.mjs";import{useId as X}from"../hooks/use-id.mjs";import{cn as o}from"../lib/utils.mjs";var Y=Object.defineProperty,q=Object.defineProperties,F=Object.getOwnPropertyDescriptors,p=Object.getOwnPropertySymbols,C=Object.prototype.hasOwnProperty,z=Object.prototype.propertyIsEnumerable,S=(a,e,r)=>e in a?Y(a,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):a[e]=r,u=(a,e)=>{for(var r in e||(e={}))C.call(e,r)&&S(a,r,e[r]);if(p)for(var r of p(e))z.call(e,r)&&S(a,r,e[r]);return a},w=(a,e)=>q(a,F(e)),f=(a,e)=>{var r={};for(var t in a)C.call(a,t)&&e.indexOf(t)<0&&(r[t]=a[t]);if(a!=null&&p)for(var t of p(a))e.indexOf(t)<0&&z.call(a,t)&&(r[t]=a[t]);return r};const O=L(null);function G(a){var e=a,{className:r,size:t="md",children:n}=e,s=f(e,["className","size","children"]);return i(O.Provider,{value:D(()=>({size:t}),[t]),children:i(m.Root,w(u({"data-slot":"tabs",className:o("flex flex-col gap-2",r)},s),{children:n}))})}function H(a){var e=a,{className:r,containerClassName:t}=e,n=f(e,["className","containerClassName"]);return i(B,{className:o("[&_[data-slot=scroll-area-scrollbar][data-orientation=horizontal]]:h-1",t),children:i(m.List,u({"data-slot":"tabs-list",className:o("inline-flex w-fit items-center justify-center rounded-md bg-gray-background-soft p-0.5",r)},n))})}const j=V("shadow-transparent data-[state=active]:shadow-level-1 group inline-flex items-center justify-center gap-2.5 whitespace-nowrap rounded-[6px] font-medium text-gray-foreground outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-state-focus data-[state=active]:bg-surface-card data-[state=active]:text-primary-foreground [&_svg]:shrink-0 [&_svg]:text-inherit disabled:text-gray-foreground-muted disabled:pointer-events-none",{variants:{size:{sm:"max-h-7 px-3 py-1.5 text-xs [&_svg]:size-4",md:"max-h-9 px-4 py-2 text-sm [&_svg]:size-5",lg:"max-h-11 px-4 py-2.5 text-md [&_svg]:size-6"}},defaultVariants:{size:"md"}}),J=R(function(a,e){var r=a,{className:t,icon:n,tooltip:s,tooltipSide:T="top",badge:v,badgeVariant:P,children:l}=r,g=f(r,["className","icon","tooltip","tooltipSide","badge","badgeVariant","children"]),b;const _=c=>c!=null&&c!==0&&c!==""&&c!=="0"&&!g.disabled,h=A(O),x=X(),N=(b=h==null?void 0:h.size)!=null?b:"md",k=()=>g.asChild?i($.Slottable,{children:l}):l?d("span",{className:"inline-grid [grid-template-areas:'stack']",children:[i("span",{"aria-hidden":"true",className:"invisible font-semibold [grid-area:stack]",children:l}),i("span",{className:"font-medium [grid-area:stack] group-data-[state=active]:font-semibold",children:l})]}):null,y=d(m.Trigger,w(u({ref:e,"data-slot":"tabs-trigger","aria-describedby":s?x:void 0,className:o(j({size:N,className:t}))},g),{children:[n,k(),_(v)&&i(I,{size:N,variant:P,children:String(v)})]}));return s?i(E,{children:d(M,{children:[i(U,{asChild:!0,children:d("span",{className:"inline-flex",children:[y,i("span",{id:x,hidden:!0,children:s})]})}),i(W,{side:T,children:s})]})}):y});function K(a){var e=a,{className:r}=e,t=f(e,["className"]);return i(m.Content,u({"data-slot":"tabs-content",className:o("flex-1 rounded-md outline-none focus-visible:ring-[3px] focus-visible:ring-state-focus",r)},t))}export{G as SegmentControl,K as SegmentControlContent,H as SegmentControlList,J as SegmentControlTrigger,j as segmentControlTriggerVariants};
4
- //# sourceMappingURL=SegmentControl.mjs.map
3
+ import{jsxs as d,jsx as i}from"react/jsx-runtime";import{cva as V}from"class-variance-authority";import{Tabs as m,Slot as $}from"radix-ui";import{createContext as I,forwardRef as L,useContext as R,useMemo as A}from"react";import{Badge as B}from"./Badge.mjs";import{ScrollArea as D}from"./ScrollArea.mjs";import{TooltipProvider as E,Tooltip as M,TooltipTrigger as U,TooltipContent as W}from"./Tooltip.mjs";import{useId as X}from"../hooks/use-id.mjs";import{cn as n}from"../lib/utils.mjs";var Y=Object.defineProperty,q=Object.defineProperties,F=Object.getOwnPropertyDescriptors,p=Object.getOwnPropertySymbols,C=Object.prototype.hasOwnProperty,z=Object.prototype.propertyIsEnumerable,S=(a,e,r)=>e in a?Y(a,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):a[e]=r,g=(a,e)=>{for(var r in e||(e={}))C.call(e,r)&&S(a,r,e[r]);if(p)for(var r of p(e))z.call(e,r)&&S(a,r,e[r]);return a},w=(a,e)=>q(a,F(e)),u=(a,e)=>{var r={};for(var t in a)C.call(a,t)&&e.indexOf(t)<0&&(r[t]=a[t]);if(a!=null&&p)for(var t of p(a))e.indexOf(t)<0&&z.call(a,t)&&(r[t]=a[t]);return r};const O=I(null);function G(a){var e=a,{className:r,size:t="md",children:o}=e,s=u(e,["className","size","children"]);return i(O.Provider,{value:A(()=>({size:t}),[t]),children:i(m.Root,w(g({"data-slot":"tabs",className:n("flex flex-col gap-2",r)},s),{children:o}))})}function H(a){var e=a,{className:r,containerClassName:t}=e,o=u(e,["className","containerClassName"]);return i(D,{className:n("[&_[data-slot=scroll-area-scrollbar][data-orientation=horizontal]]:h-1",t),children:i(m.List,g({"data-slot":"tabs-list",className:n("inline-flex w-fit items-center justify-center gap-0.5 rounded-md bg-gray-background-soft p-0.5",r)},o))})}const j=V("shadow-transparent data-[state=active]:shadow-level-1 group inline-flex items-center justify-center whitespace-nowrap rounded-[6px] font-medium text-gray-foreground hover:text-gray-foreground-emphasis outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-state-focus data-[state=active]:bg-surface-card data-[state=active]:text-primary-foreground data-[state=active]:hover:text-primary-foreground-emphasis [&_svg]:shrink-0 [&_svg]:text-inherit disabled:text-gray-foreground-muted disabled:pointer-events-none",{variants:{size:{sm:"max-h-7 gap-2 px-3 py-1.5 text-xs [&_svg]:size-4",md:"max-h-9 gap-2.5 px-3.5 py-2 text-sm [&_svg]:size-5",lg:"max-h-11 gap-3 px-4 py-2.5 text-md [&_svg]:size-6"}},defaultVariants:{size:"md"}}),J=L(function(a,e){var r=a,{className:t,icon:o,tooltip:s,tooltipSide:T="top",badge:v,badgeVariant:P,children:l}=r,f=u(r,["className","icon","tooltip","tooltipSide","badge","badgeVariant","children"]),h;const _=c=>c!=null&&c!==0&&c!==""&&c!=="0"&&!f.disabled,b=R(O),x=X(),y=(h=b==null?void 0:b.size)!=null?h:"md",k=()=>f.asChild?i($.Slottable,{children:l}):l?d("span",{className:"inline-grid [grid-template-areas:'stack']",children:[i("span",{"aria-hidden":"true",className:"invisible font-semibold [grid-area:stack]",children:l}),i("span",{className:"font-medium [grid-area:stack] group-data-[state=active]:font-semibold",children:l})]}):null,N=d(m.Trigger,w(g({ref:e,"data-slot":"tabs-trigger","aria-describedby":s?x:void 0,className:n(j({size:y,className:t}))},f),{children:[o,k(),_(v)&&i(B,{size:y,variant:P,children:String(v)})]}));return s?i(E,{children:d(M,{children:[i(U,{asChild:!0,children:d("span",{className:"inline-flex",children:[N,i("span",{id:x,hidden:!0,children:s})]})}),i(W,{side:T,children:s})]})}):N});function K(a){var e=a,{className:r}=e,t=u(e,["className"]);return i(m.Content,g({"data-slot":"tabs-content",className:n("flex-1 rounded-md outline-none focus-visible:ring-4 focus-visible:ring-state-focus",r)},t))}export{G as SegmentControl,K as SegmentControlContent,H as SegmentControlList,J as SegmentControlTrigger,j as segmentControlTriggerVariants};
@@ -29,4 +29,3 @@ declare function SelectScrollDownButton({ className, ...props }: ComponentProps<
29
29
  declare function SelectText({ className, ...props }: HTMLAttributes<HTMLSpanElement>): import("react/jsx-runtime").JSX.Element;
30
30
  export { Select, SelectContent, SelectGroup, SelectItem, SelectHeader, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectText, SelectTrigger, SelectValue, SelectWrapper, selectVariants, };
31
31
  export type { SelectProps, SelectItemProps };
32
- //# sourceMappingURL=Select.d.ts.map
@@ -1,4 +1,3 @@
1
1
  "use strict";
2
2
  "use client";
3
- "use strict";var s=require("react/jsx-runtime"),m=require("@medway-ui/icons"),o=require("radix-ui"),c=require("react"),i=require("../lib/utils.js"),v=require("class-variance-authority"),z=Object.defineProperty,k=Object.defineProperties,C=Object.getOwnPropertyDescriptors,h=Object.getOwnPropertySymbols,b=Object.prototype.hasOwnProperty,y=Object.prototype.propertyIsEnumerable,j=(t,e,a)=>e in t?z(t,e,{enumerable:!0,configurable:!0,writable:!0,value:a}):t[e]=a,n=(t,e)=>{for(var a in e||(e={}))b.call(e,a)&&j(t,a,e[a]);if(h)for(var a of h(e))y.call(e,a)&&j(t,a,e[a]);return t},u=(t,e)=>k(t,C(e)),d=(t,e)=>{var a={};for(var r in t)b.call(t,r)&&e.indexOf(r)<0&&(a[r]=t[r]);if(t!=null&&h)for(var r of h(t))e.indexOf(r)<0&&y.call(t,r)&&(a[r]=t[r]);return a};const x=c.createContext({invalid:!1,size:"lg"});function O(t){var e=t,{invalid:a=!1,size:r="lg"}=e,l=d(e,["invalid","size"]);return s.jsx(x.Provider,{value:c.useMemo(()=>({invalid:a,size:r}),[a,r]),children:s.jsx(o.Select.Root,n({},l))})}function I(t){var e=t,{className:a}=e,r=d(e,["className"]);return s.jsx("div",n({className:i.cn("group relative flex flex-col gap-2",a),"data-slot":"select-wrapper"},r))}function V(t){var e=t,{className:a,children:r}=e,l=d(e,["className","children"]);return s.jsx("label",u(n({className:i.cn("pointer-events-none absolute start-3 top-0 max-w-[calc(100%-1.5rem)] origin-left -translate-y-1/2 truncate bg-surface-card px-1 text-xs font-medium text-gray-foreground transition-all duration-200 ease-out","group-has-[[data-slot=select-trigger][data-placeholder]:not([data-state=open])]:start-4 group-has-[[data-slot=select-trigger][data-placeholder]:not([data-state=open])]:top-6 group-has-[[data-slot=select-trigger][data-placeholder]:not([data-state=open])]:max-w-[calc(100%-4rem)] group-has-[[data-slot=select-trigger][data-placeholder]:not([data-state=open])]:bg-transparent group-has-[[data-slot=select-trigger][data-placeholder]:not([data-state=open])]:px-0 group-has-[[data-slot=select-trigger][data-placeholder]:not([data-state=open])]:text-md group-has-[[data-slot=select-trigger][data-placeholder]:not([data-state=open])]:font-normal group-has-[[data-slot=select-trigger][data-placeholder]:not([data-state=open])]:text-gray-foreground","group-has-[[data-slot=select-trigger][data-size=md]]:group-has-[[data-slot=select-trigger][data-placeholder]:not([data-state=open])]:top-5 group-has-[[data-slot=select-trigger][data-size=md]]:group-has-[[data-slot=select-trigger][data-placeholder]:not([data-state=open])]:!text-sm",a),"data-slot":"select-label"},l),{children:r}))}function _(t){var e=d(t,[]);return s.jsx(o.Select.Group,n({"data-slot":"select-group"},e))}function q(t){var e=d(t,[]);return s.jsx(o.Select.Value,n({"data-slot":"select-value"},e))}const N=v.cva(["flex w-full items-center justify-between gap-2 rounded-md border-2 border-gray-stroke-muted bg-surface-card px-4 py-3 text-left text-gray-foreground outline-none transition-[color,box-shadow] hover:border-gray-stroke-emphasis hover:ring-[3px] hover:ring-state-focus disabled:cursor-default disabled:bg-gray-background-soft-muted disabled:hover:border-gray-stroke-muted disabled:hover:ring-0 aria-[invalid]:border-feedback-error-stroke aria-[invalid]:hover:ring-[3px] aria-[invalid]:hover:ring-state-error data-[placeholder]:text-gray-foreground-emphasis *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 disabled:data-[placeholder]:text-gray-foreground-muted [&>span]:line-clamp-1 [&_svg]:pointer-events-none [&_svg]:shrink-0"],{variants:{size:{lg:["h-12 max-h-12 text-md [&_svg]:size-6","group-has-[[data-slot=select-label]]:h-14"],md:["h-10 max-h-10 text-sm [&_svg]:size-5","group-has-[[data-slot=select-label]]:h-11"]}},defaultVariants:{size:"lg"}}),P=v.cva("data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[highlighted]:bg-secondary-background-soft-emphasis relative flex w-full cursor-default select-none items-center rounded pe-8 ps-2 font-medium text-gray-foreground outline-none hover:cursor-pointer hover:bg-secondary-background-soft-emphasis gap-3",{variants:{size:{lg:"py-2 text-sm [&_svg]:size-5",md:"py-2 text-sm [&_svg]:size-5"}},defaultVariants:{size:"lg"}}),D=c.forwardRef(function(t,e){var a=t,{className:r,children:l}=a,p=d(a,["className","children"]);const{invalid:g,size:f}=c.useContext(x);return s.jsxs(o.Select.Trigger,u(n({ref:e,className:i.cn(N({size:f}),!g&&"[&:not([data-placeholder]):not(:disabled)]:border-gray-stroke-emphasis","group-has-[[data-slot=select-label]]:py-3 group-has-[[data-slot=select-label]]:data-[placeholder]:text-transparent",r),"data-slot":"select-trigger","data-size":f,"aria-invalid":g?"true":void 0},p),{children:[l,s.jsx(o.Select.Icon,{asChild:!0,children:s.jsx(m.ChevronDown,{className:i.cn("flex-shrink-0 text-gray-foreground"),strokeWidth:1.6})})]}))});function W(t){var e=t,{className:a,children:r,position:l="popper"}=e,p=d(e,["className","children","position"]);return s.jsx(o.Select.Portal,{children:s.jsxs(o.Select.Content,u(n({className:i.cn("relative z-50 max-h-[min(24rem,var(--radix-select-content-available-height))] min-w-32 overflow-hidden rounded-md border border-gray-stroke-muted bg-surface-elevated text-gray-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 [&_[role=group]]:py-1",l==="popper"&&"w-full min-w-[var(--radix-select-trigger-width)] max-w-[var(--radix-select-content-available-width)] data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",a),"data-slot":"select-content",position:l},p),{children:[s.jsx(S,{}),s.jsx(o.Select.Viewport,{className:l==="popper"?"h-[var(--radix-select-trigger-height)] p-2":"p-2",children:r}),s.jsx(w,{})]}))})}function T(t){var e=t,{className:a}=e,r=d(e,["className"]);return s.jsx(o.Select.Label,n({className:i.cn("px-2 py-2 text-xs font-medium text-gray-foreground-muted",a),"data-slot":"select-header"},r))}function U(t){var e=t,{className:a,children:r,icon:l}=e,p=d(e,["className","children","icon"]);const{size:g}=c.useContext(x);return s.jsxs(o.Select.Item,u(n({className:i.cn(P({size:g}),a),"data-slot":"select-item"},p),{children:[l&&s.jsx("span",{className:"flex shrink-0 items-center justify-center text-gray-foreground",children:c.isValidElement(l)?c.cloneElement(l,{strokeWidth:1.6}):l}),s.jsx("span",{className:"min-w-0 flex-1 truncate",children:s.jsx(o.Select.ItemText,{children:r})}),s.jsx("span",{className:"absolute end-2 flex size-3.5 items-center justify-center",children:s.jsx(o.Select.ItemIndicator,{children:s.jsx(m.Check,{strokeWidth:1.6,className:"text-secondary-foreground"})})})]}))}function B(t){var e=t,{className:a}=e,r=d(e,["className"]);return s.jsx(o.Select.Separator,n({className:i.cn("-mx-1 my-1 h-px bg-gray-stroke-muted",a),"data-slot":"select-separator"},r))}function S(t){var e=t,{className:a}=e,r=d(e,["className"]);return s.jsx(o.Select.ScrollUpButton,u(n({className:i.cn("flex cursor-default items-center justify-center py-1",a),"data-slot":"select-scroll-up-button"},r),{children:s.jsx(m.ChevronUp,{size:16,strokeWidth:1.6,className:"text-gray-foreground"})}))}function w(t){var e=t,{className:a}=e,r=d(e,["className"]);return s.jsx(o.Select.ScrollDownButton,u(n({className:i.cn("flex cursor-default items-center justify-center py-1",a),"data-slot":"select-scroll-down-button"},r),{children:s.jsx(m.ChevronDown,{size:16,strokeWidth:1.6,className:"text-gray-foreground"})}))}function E(t){var e=t,{className:a}=e,r=d(e,["className"]);const{invalid:l}=c.useContext(x);return s.jsx("span",n({className:i.cn("-mt-1 text-xs",l?"text-feedback-error-foreground":"text-gray-foreground",a),"data-slot":"select-text"},r))}exports.Select=O,exports.SelectContent=W,exports.SelectGroup=_,exports.SelectHeader=T,exports.SelectItem=U,exports.SelectLabel=V,exports.SelectScrollDownButton=w,exports.SelectScrollUpButton=S,exports.SelectSeparator=B,exports.SelectText=E,exports.SelectTrigger=D,exports.SelectValue=q,exports.SelectWrapper=I,exports.selectVariants=N;
4
- //# sourceMappingURL=Select.js.map
3
+ "use strict";var s=require("react/jsx-runtime"),f=require("@medway-ui/icons"),l=require("radix-ui"),c=require("react"),x=require("../lib/floating-label.js"),i=require("../lib/utils.js"),b=require("class-variance-authority"),k=Object.defineProperty,O=Object.defineProperties,C=Object.getOwnPropertyDescriptors,h=Object.getOwnPropertySymbols,y=Object.prototype.hasOwnProperty,j=Object.prototype.propertyIsEnumerable,N=(t,e,a)=>e in t?k(t,e,{enumerable:!0,configurable:!0,writable:!0,value:a}):t[e]=a,n=(t,e)=>{for(var a in e||(e={}))y.call(e,a)&&N(t,a,e[a]);if(h)for(var a of h(e))j.call(e,a)&&N(t,a,e[a]);return t},g=(t,e)=>O(t,C(e)),d=(t,e)=>{var a={};for(var r in t)y.call(t,r)&&e.indexOf(r)<0&&(a[r]=t[r]);if(t!=null&&h)for(var r of h(t))e.indexOf(r)<0&&j.call(t,r)&&(a[r]=t[r]);return a};const m=c.createContext({invalid:!1,size:"lg"});function _(t){var e=t,{invalid:a=!1,size:r="lg"}=e,o=d(e,["invalid","size"]);return s.jsx(m.Provider,{value:c.useMemo(()=>({invalid:a,size:r}),[a,r]),children:s.jsx(l.Select.Root,n({},o))})}function I(t){var e=t,{className:a}=e,r=d(e,["className"]);return s.jsx("div",n({className:i.cn(x.FLOATING_LABEL_WRAPPER,a),"data-slot":"select-wrapper"},r))}function L(t){var e=t,{className:a,children:r}=e,o=d(e,["className","children"]);return s.jsx("label",g(n({className:i.cn(x.FLOATING_LABEL_BASE,"group-has-[[data-slot=select-trigger][data-size=md]]:start-2","group-has-[[data-slot=select-trigger]:disabled]:text-gray-foreground-muted group-has-[[data-slot=select-trigger]:focus-visible]:text-gray-foreground-emphasis group-has-[[data-slot=select-trigger]:hover:not(:focus-visible):not(:disabled):not([data-state=open])]:text-gray-foreground-emphasis group-has-[[data-slot=select-trigger][aria-invalid=true]:focus-visible]:text-feedback-error-foreground group-has-[[data-slot=select-trigger][aria-invalid=true][data-state=open]]:text-feedback-error-foreground group-has-[[data-slot=select-trigger][data-state=open]]:text-gray-foreground-emphasis","group-has-[[data-slot=select-trigger][data-placeholder]:not([data-state=open]):not(:focus-visible)]:start-4 group-has-[[data-slot=select-trigger][data-placeholder]:not([data-state=open]):not(:focus-visible)]:top-6 group-has-[[data-slot=select-trigger][data-placeholder]:not([data-state=open]):not(:focus-visible)]:max-w-[calc(100%-4rem)] group-has-[[data-slot=select-trigger][data-placeholder]:not([data-state=open]):not(:focus-visible)]:bg-transparent group-has-[[data-slot=select-trigger][data-placeholder]:not([data-state=open]):not(:focus-visible)]:px-0 group-has-[[data-slot=select-trigger][data-placeholder]:not([data-state=open]):not(:focus-visible)]:text-md group-has-[[data-slot=select-trigger][data-placeholder]:not([data-state=open]):not(:focus-visible)]:font-regular group-has-[[data-slot=select-trigger][data-placeholder]:not([data-state=open]):not(:focus-visible)]:leading-md","group-has-[[data-slot=select-trigger][data-size=md]]:group-has-[[data-slot=select-trigger][data-placeholder]:not([data-state=open]):not(:focus-visible)]:start-3.5 group-has-[[data-slot=select-trigger][data-size=md]]:group-has-[[data-slot=select-trigger][data-placeholder]:not([data-state=open]):not(:focus-visible)]:top-5 group-has-[[data-slot=select-trigger][data-size=md]]:group-has-[[data-slot=select-trigger][data-placeholder]:not([data-state=open]):not(:focus-visible)]:!text-sm group-has-[[data-slot=select-trigger][data-size=md]]:group-has-[[data-slot=select-trigger][data-placeholder]:not([data-state=open]):not(:focus-visible)]:leading-sm",a),"data-slot":"select-label"},o),{children:r}))}function P(t){var e=d(t,[]);return s.jsx(l.Select.Group,n({"data-slot":"select-group"},e))}function q(t){var e=d(t,[]);return s.jsx(l.Select.Value,n({"data-slot":"select-value"},e))}const S=b.cva(["flex w-full items-center justify-between rounded-md border-2 border-gray-stroke-muted bg-surface-card text-left text-gray-foreground outline-none transition-[color,box-shadow] hover:border-gray-stroke hover:ring-4 hover:ring-state-hover focus-visible:border-gray-stroke-emphasis focus-visible:ring-4 focus-visible:ring-state-focus disabled:cursor-default disabled:bg-gray-background-soft-muted disabled:hover:border-gray-stroke-muted disabled:hover:ring-0 aria-[invalid=true]:border-feedback-error-stroke aria-[invalid=true]:hover:ring-state-error aria-[invalid=true]:focus-visible:border-feedback-error-stroke aria-[invalid=true]:focus-visible:ring-state-error data-[placeholder]:text-gray-foreground-emphasis *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 disabled:data-[placeholder]:text-gray-foreground-muted [&>span]:line-clamp-1 [&_svg]:pointer-events-none [&_svg]:shrink-0"],{variants:{size:{lg:"h-12 max-h-12 gap-3 px-3.5 py-2.5 text-md [&_svg]:size-6",md:"h-10 max-h-10 gap-2.5 px-3 py-2 text-sm [&_svg]:size-5"}},defaultVariants:{size:"lg"}}),V=b.cva("data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[highlighted]:bg-primary-background-soft-muted data-[highlighted]:text-gray-foreground-emphasis relative flex w-full cursor-default select-none items-center rounded-md font-medium text-gray-foreground outline-none hover:cursor-pointer hover:bg-primary-background-soft-muted hover:text-gray-foreground-emphasis",{variants:{size:{lg:"gap-2.5 py-2.5 pe-11 ps-3.5 text-sm leading-sm [&_svg]:size-5",md:"gap-2 py-2 pe-9 ps-3 text-xs leading-xs [&_svg]:size-4"}},defaultVariants:{size:"lg"}}),A={lg:"end-3.5 size-5",md:"end-3 size-4"},B={lg:"p-1.5",md:"p-1"},E=c.forwardRef(function(t,e){var a=t,{className:r,children:o}=a,p=d(a,["className","children"]);const{invalid:u,size:v}=c.useContext(m);return s.jsxs(l.Select.Trigger,g(n({ref:e,className:i.cn(S({size:v}),!u&&"[&:not([data-placeholder]):not(:disabled)]:border-gray-stroke-emphasis","group-has-[[data-slot=select-label]]:data-[placeholder]:text-transparent",r),"data-slot":"select-trigger","data-size":v,"aria-invalid":u?"true":void 0},p),{children:[o,s.jsx(l.Select.Icon,{asChild:!0,children:s.jsx(f.ChevronDown,{className:i.cn("flex-shrink-0 text-gray-foreground"),strokeWidth:1.6})})]}))});function T(t){var e=t,{className:a,children:r,position:o="popper"}=e,p=d(e,["className","children","position"]);const{size:u}=c.useContext(m);return s.jsx(l.Select.Portal,{children:s.jsxs(l.Select.Content,g(n({className:i.cn("relative z-50 max-h-[min(24rem,var(--radix-select-content-available-height))] min-w-32 overflow-hidden rounded-md border border-gray-stroke-muted bg-surface-elevated text-gray-foreground shadow-level-3 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 motion-reduce:!animate-none [&_[role=group]]:py-1",o==="popper"&&"w-full min-w-[var(--radix-select-trigger-width)] max-w-[var(--radix-select-content-available-width)] data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",a),"data-slot":"select-content",position:o},p),{children:[s.jsx(z,{}),s.jsx(l.Select.Viewport,{className:i.cn(o==="popper"&&"h-[var(--radix-select-trigger-height)] w-full",B[u]),children:r}),s.jsx(w,{})]}))})}function W(t){var e=t,{className:a}=e,r=d(e,["className"]);return s.jsx(l.Select.Label,n({className:i.cn("px-2 py-2 text-xs font-medium text-gray-foreground-muted",a),"data-slot":"select-header"},r))}function D(t){var e=t,{className:a,children:r,icon:o}=e,p=d(e,["className","children","icon"]);const{size:u}=c.useContext(m);return s.jsxs(l.Select.Item,g(n({className:i.cn(V({size:u}),a),"data-slot":"select-item"},p),{children:[o&&s.jsx("span",{className:"flex shrink-0 items-center justify-center text-gray-foreground",children:c.isValidElement(o)?c.cloneElement(o,{strokeWidth:1.6}):o}),s.jsx("span",{className:"min-w-0 flex-1 truncate",children:s.jsx(l.Select.ItemText,{children:r})}),s.jsx("span",{className:i.cn("absolute flex items-center justify-center",A[u]),"data-slot":"select-item-indicator",children:s.jsx(l.Select.ItemIndicator,{children:s.jsx(f.Check,{className:"text-secondary-foreground-muted"})})})]}))}function G(t){var e=t,{className:a}=e,r=d(e,["className"]);return s.jsx(l.Select.Separator,n({className:i.cn("-mx-1 my-1 h-px bg-gray-stroke-muted",a),"data-slot":"select-separator"},r))}function z(t){var e=t,{className:a}=e,r=d(e,["className"]);return s.jsx(l.Select.ScrollUpButton,g(n({className:i.cn("flex cursor-default items-center justify-center py-1",a),"data-slot":"select-scroll-up-button"},r),{children:s.jsx(f.ChevronUp,{size:16,strokeWidth:1.6,className:"text-gray-foreground"})}))}function w(t){var e=t,{className:a}=e,r=d(e,["className"]);return s.jsx(l.Select.ScrollDownButton,g(n({className:i.cn("flex cursor-default items-center justify-center py-1",a),"data-slot":"select-scroll-down-button"},r),{children:s.jsx(f.ChevronDown,{size:16,strokeWidth:1.6,className:"text-gray-foreground"})}))}function R(t){var e=t,{className:a}=e,r=d(e,["className"]);const{invalid:o}=c.useContext(m);return s.jsx("span",n({className:i.cn("-mt-1 text-xs",o?"text-feedback-error-foreground":"text-gray-foreground",a),"data-slot":"select-text"},r))}exports.Select=_,exports.SelectContent=T,exports.SelectGroup=P,exports.SelectHeader=W,exports.SelectItem=D,exports.SelectLabel=L,exports.SelectScrollDownButton=w,exports.SelectScrollUpButton=z,exports.SelectSeparator=G,exports.SelectText=R,exports.SelectTrigger=E,exports.SelectValue=q,exports.SelectWrapper=I,exports.selectVariants=S;
@@ -1,4 +1,3 @@
1
1
  "use strict";
2
2
  "use client";
3
- import{jsxs as h,jsx as s}from"react/jsx-runtime";import{ChevronDown as x,Check as j,ChevronUp as O}from"@medway-ui/icons";import{Select as l}from"radix-ui";import{createContext as C,forwardRef as I,useContext as f,useMemo as _,isValidElement as P,cloneElement as V}from"react";import{cn as i}from"../lib/utils.mjs";import{cva as b}from"class-variance-authority";var W=Object.defineProperty,D=Object.defineProperties,T=Object.getOwnPropertyDescriptors,g=Object.getOwnPropertySymbols,y=Object.prototype.hasOwnProperty,N=Object.prototype.propertyIsEnumerable,w=(t,e,a)=>e in t?W(t,e,{enumerable:!0,configurable:!0,writable:!0,value:a}):t[e]=a,n=(t,e)=>{for(var a in e||(e={}))y.call(e,a)&&w(t,a,e[a]);if(g)for(var a of g(e))N.call(e,a)&&w(t,a,e[a]);return t},c=(t,e)=>D(t,T(e)),d=(t,e)=>{var a={};for(var r in t)y.call(t,r)&&e.indexOf(r)<0&&(a[r]=t[r]);if(t!=null&&g)for(var r of g(t))e.indexOf(r)<0&&N.call(t,r)&&(a[r]=t[r]);return a};const m=C({invalid:!1,size:"lg"});function B(t){var e=t,{invalid:a=!1,size:r="lg"}=e,o=d(e,["invalid","size"]);return s(m.Provider,{value:_(()=>({invalid:a,size:r}),[a,r]),children:s(l.Root,n({},o))})}function E(t){var e=t,{className:a}=e,r=d(e,["className"]);return s("div",n({className:i("group relative flex flex-col gap-2",a),"data-slot":"select-wrapper"},r))}function U(t){var e=t,{className:a,children:r}=e,o=d(e,["className","children"]);return s("label",c(n({className:i("pointer-events-none absolute start-3 top-0 max-w-[calc(100%-1.5rem)] origin-left -translate-y-1/2 truncate bg-surface-card px-1 text-xs font-medium text-gray-foreground transition-all duration-200 ease-out","group-has-[[data-slot=select-trigger][data-placeholder]:not([data-state=open])]:start-4 group-has-[[data-slot=select-trigger][data-placeholder]:not([data-state=open])]:top-6 group-has-[[data-slot=select-trigger][data-placeholder]:not([data-state=open])]:max-w-[calc(100%-4rem)] group-has-[[data-slot=select-trigger][data-placeholder]:not([data-state=open])]:bg-transparent group-has-[[data-slot=select-trigger][data-placeholder]:not([data-state=open])]:px-0 group-has-[[data-slot=select-trigger][data-placeholder]:not([data-state=open])]:text-md group-has-[[data-slot=select-trigger][data-placeholder]:not([data-state=open])]:font-normal group-has-[[data-slot=select-trigger][data-placeholder]:not([data-state=open])]:text-gray-foreground","group-has-[[data-slot=select-trigger][data-size=md]]:group-has-[[data-slot=select-trigger][data-placeholder]:not([data-state=open])]:top-5 group-has-[[data-slot=select-trigger][data-size=md]]:group-has-[[data-slot=select-trigger][data-placeholder]:not([data-state=open])]:!text-sm",a),"data-slot":"select-label"},o),{children:r}))}function G(t){var e=d(t,[]);return s(l.Group,n({"data-slot":"select-group"},e))}function L(t){var e=d(t,[]);return s(l.Value,n({"data-slot":"select-value"},e))}const z=b(["flex w-full items-center justify-between gap-2 rounded-md border-2 border-gray-stroke-muted bg-surface-card px-4 py-3 text-left text-gray-foreground outline-none transition-[color,box-shadow] hover:border-gray-stroke-emphasis hover:ring-[3px] hover:ring-state-focus disabled:cursor-default disabled:bg-gray-background-soft-muted disabled:hover:border-gray-stroke-muted disabled:hover:ring-0 aria-[invalid]:border-feedback-error-stroke aria-[invalid]:hover:ring-[3px] aria-[invalid]:hover:ring-state-error data-[placeholder]:text-gray-foreground-emphasis *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 disabled:data-[placeholder]:text-gray-foreground-muted [&>span]:line-clamp-1 [&_svg]:pointer-events-none [&_svg]:shrink-0"],{variants:{size:{lg:["h-12 max-h-12 text-md [&_svg]:size-6","group-has-[[data-slot=select-label]]:h-14"],md:["h-10 max-h-10 text-sm [&_svg]:size-5","group-has-[[data-slot=select-label]]:h-11"]}},defaultVariants:{size:"lg"}}),R=b("data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[highlighted]:bg-secondary-background-soft-emphasis relative flex w-full cursor-default select-none items-center rounded pe-8 ps-2 font-medium text-gray-foreground outline-none hover:cursor-pointer hover:bg-secondary-background-soft-emphasis gap-3",{variants:{size:{lg:"py-2 text-sm [&_svg]:size-5",md:"py-2 text-sm [&_svg]:size-5"}},defaultVariants:{size:"lg"}}),q=I(function(t,e){var a=t,{className:r,children:o}=a,u=d(a,["className","children"]);const{invalid:p,size:v}=f(m);return h(l.Trigger,c(n({ref:e,className:i(z({size:v}),!p&&"[&:not([data-placeholder]):not(:disabled)]:border-gray-stroke-emphasis","group-has-[[data-slot=select-label]]:py-3 group-has-[[data-slot=select-label]]:data-[placeholder]:text-transparent",r),"data-slot":"select-trigger","data-size":v,"aria-invalid":p?"true":void 0},u),{children:[o,s(l.Icon,{asChild:!0,children:s(x,{className:i("flex-shrink-0 text-gray-foreground"),strokeWidth:1.6})})]}))});function A(t){var e=t,{className:a,children:r,position:o="popper"}=e,u=d(e,["className","children","position"]);return s(l.Portal,{children:h(l.Content,c(n({className:i("relative z-50 max-h-[min(24rem,var(--radix-select-content-available-height))] min-w-32 overflow-hidden rounded-md border border-gray-stroke-muted bg-surface-elevated text-gray-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 [&_[role=group]]:py-1",o==="popper"&&"w-full min-w-[var(--radix-select-trigger-width)] max-w-[var(--radix-select-content-available-width)] data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",a),"data-slot":"select-content",position:o},u),{children:[s(k,{}),s(l.Viewport,{className:o==="popper"?"h-[var(--radix-select-trigger-height)] p-2":"p-2",children:r}),s(S,{})]}))})}function F(t){var e=t,{className:a}=e,r=d(e,["className"]);return s(l.Label,n({className:i("px-2 py-2 text-xs font-medium text-gray-foreground-muted",a),"data-slot":"select-header"},r))}function H(t){var e=t,{className:a,children:r,icon:o}=e,u=d(e,["className","children","icon"]);const{size:p}=f(m);return h(l.Item,c(n({className:i(R({size:p}),a),"data-slot":"select-item"},u),{children:[o&&s("span",{className:"flex shrink-0 items-center justify-center text-gray-foreground",children:P(o)?V(o,{strokeWidth:1.6}):o}),s("span",{className:"min-w-0 flex-1 truncate",children:s(l.ItemText,{children:r})}),s("span",{className:"absolute end-2 flex size-3.5 items-center justify-center",children:s(l.ItemIndicator,{children:s(j,{strokeWidth:1.6,className:"text-secondary-foreground"})})})]}))}function J(t){var e=t,{className:a}=e,r=d(e,["className"]);return s(l.Separator,n({className:i("-mx-1 my-1 h-px bg-gray-stroke-muted",a),"data-slot":"select-separator"},r))}function k(t){var e=t,{className:a}=e,r=d(e,["className"]);return s(l.ScrollUpButton,c(n({className:i("flex cursor-default items-center justify-center py-1",a),"data-slot":"select-scroll-up-button"},r),{children:s(O,{size:16,strokeWidth:1.6,className:"text-gray-foreground"})}))}function S(t){var e=t,{className:a}=e,r=d(e,["className"]);return s(l.ScrollDownButton,c(n({className:i("flex cursor-default items-center justify-center py-1",a),"data-slot":"select-scroll-down-button"},r),{children:s(x,{size:16,strokeWidth:1.6,className:"text-gray-foreground"})}))}function K(t){var e=t,{className:a}=e,r=d(e,["className"]);const{invalid:o}=f(m);return s("span",n({className:i("-mt-1 text-xs",o?"text-feedback-error-foreground":"text-gray-foreground",a),"data-slot":"select-text"},r))}export{B as Select,A as SelectContent,G as SelectGroup,F as SelectHeader,H as SelectItem,U as SelectLabel,S as SelectScrollDownButton,k as SelectScrollUpButton,J as SelectSeparator,K as SelectText,q as SelectTrigger,L as SelectValue,E as SelectWrapper,z as selectVariants};
4
- //# sourceMappingURL=Select.mjs.map
3
+ import{jsxs as h,jsx as s}from"react/jsx-runtime";import{ChevronDown as b,Check as j,ChevronUp as O}from"@medway-ui/icons";import{Select as l}from"radix-ui";import{createContext as _,forwardRef as I,useContext as m,useMemo as C,isValidElement as P,cloneElement as L}from"react";import{FLOATING_LABEL_BASE as B,FLOATING_LABEL_WRAPPER as E}from"../lib/floating-label.mjs";import{cn as i}from"../lib/utils.mjs";import{cva as x}from"class-variance-authority";var T=Object.defineProperty,V=Object.defineProperties,A=Object.getOwnPropertyDescriptors,f=Object.getOwnPropertySymbols,y=Object.prototype.hasOwnProperty,N=Object.prototype.propertyIsEnumerable,z=(t,e,a)=>e in t?T(t,e,{enumerable:!0,configurable:!0,writable:!0,value:a}):t[e]=a,d=(t,e)=>{for(var a in e||(e={}))y.call(e,a)&&z(t,a,e[a]);if(f)for(var a of f(e))N.call(e,a)&&z(t,a,e[a]);return t},g=(t,e)=>V(t,A(e)),n=(t,e)=>{var a={};for(var r in t)y.call(t,r)&&e.indexOf(r)<0&&(a[r]=t[r]);if(t!=null&&f)for(var r of f(t))e.indexOf(r)<0&&N.call(t,r)&&(a[r]=t[r]);return a};const p=_({invalid:!1,size:"lg"});function W(t){var e=t,{invalid:a=!1,size:r="lg"}=e,o=n(e,["invalid","size"]);return s(p.Provider,{value:C(()=>({invalid:a,size:r}),[a,r]),children:s(l.Root,d({},o))})}function G(t){var e=t,{className:a}=e,r=n(e,["className"]);return s("div",d({className:i(E,a),"data-slot":"select-wrapper"},r))}function D(t){var e=t,{className:a,children:r}=e,o=n(e,["className","children"]);return s("label",g(d({className:i(B,"group-has-[[data-slot=select-trigger][data-size=md]]:start-2","group-has-[[data-slot=select-trigger]:disabled]:text-gray-foreground-muted group-has-[[data-slot=select-trigger]:focus-visible]:text-gray-foreground-emphasis group-has-[[data-slot=select-trigger]:hover:not(:focus-visible):not(:disabled):not([data-state=open])]:text-gray-foreground-emphasis group-has-[[data-slot=select-trigger][aria-invalid=true]:focus-visible]:text-feedback-error-foreground group-has-[[data-slot=select-trigger][aria-invalid=true][data-state=open]]:text-feedback-error-foreground group-has-[[data-slot=select-trigger][data-state=open]]:text-gray-foreground-emphasis","group-has-[[data-slot=select-trigger][data-placeholder]:not([data-state=open]):not(:focus-visible)]:start-4 group-has-[[data-slot=select-trigger][data-placeholder]:not([data-state=open]):not(:focus-visible)]:top-6 group-has-[[data-slot=select-trigger][data-placeholder]:not([data-state=open]):not(:focus-visible)]:max-w-[calc(100%-4rem)] group-has-[[data-slot=select-trigger][data-placeholder]:not([data-state=open]):not(:focus-visible)]:bg-transparent group-has-[[data-slot=select-trigger][data-placeholder]:not([data-state=open]):not(:focus-visible)]:px-0 group-has-[[data-slot=select-trigger][data-placeholder]:not([data-state=open]):not(:focus-visible)]:text-md group-has-[[data-slot=select-trigger][data-placeholder]:not([data-state=open]):not(:focus-visible)]:font-regular group-has-[[data-slot=select-trigger][data-placeholder]:not([data-state=open]):not(:focus-visible)]:leading-md","group-has-[[data-slot=select-trigger][data-size=md]]:group-has-[[data-slot=select-trigger][data-placeholder]:not([data-state=open]):not(:focus-visible)]:start-3.5 group-has-[[data-slot=select-trigger][data-size=md]]:group-has-[[data-slot=select-trigger][data-placeholder]:not([data-state=open]):not(:focus-visible)]:top-5 group-has-[[data-slot=select-trigger][data-size=md]]:group-has-[[data-slot=select-trigger][data-placeholder]:not([data-state=open]):not(:focus-visible)]:!text-sm group-has-[[data-slot=select-trigger][data-size=md]]:group-has-[[data-slot=select-trigger][data-placeholder]:not([data-state=open]):not(:focus-visible)]:leading-sm",a),"data-slot":"select-label"},o),{children:r}))}function R(t){var e=n(t,[]);return s(l.Group,d({"data-slot":"select-group"},e))}function U(t){var e=n(t,[]);return s(l.Value,d({"data-slot":"select-value"},e))}const w=x(["flex w-full items-center justify-between rounded-md border-2 border-gray-stroke-muted bg-surface-card text-left text-gray-foreground outline-none transition-[color,box-shadow] hover:border-gray-stroke hover:ring-4 hover:ring-state-hover focus-visible:border-gray-stroke-emphasis focus-visible:ring-4 focus-visible:ring-state-focus disabled:cursor-default disabled:bg-gray-background-soft-muted disabled:hover:border-gray-stroke-muted disabled:hover:ring-0 aria-[invalid=true]:border-feedback-error-stroke aria-[invalid=true]:hover:ring-state-error aria-[invalid=true]:focus-visible:border-feedback-error-stroke aria-[invalid=true]:focus-visible:ring-state-error data-[placeholder]:text-gray-foreground-emphasis *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 disabled:data-[placeholder]:text-gray-foreground-muted [&>span]:line-clamp-1 [&_svg]:pointer-events-none [&_svg]:shrink-0"],{variants:{size:{lg:"h-12 max-h-12 gap-3 px-3.5 py-2.5 text-md [&_svg]:size-6",md:"h-10 max-h-10 gap-2.5 px-3 py-2 text-sm [&_svg]:size-5"}},defaultVariants:{size:"lg"}}),F=x("data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[highlighted]:bg-primary-background-soft-muted data-[highlighted]:text-gray-foreground-emphasis relative flex w-full cursor-default select-none items-center rounded-md font-medium text-gray-foreground outline-none hover:cursor-pointer hover:bg-primary-background-soft-muted hover:text-gray-foreground-emphasis",{variants:{size:{lg:"gap-2.5 py-2.5 pe-11 ps-3.5 text-sm leading-sm [&_svg]:size-5",md:"gap-2 py-2 pe-9 ps-3 text-xs leading-xs [&_svg]:size-4"}},defaultVariants:{size:"lg"}}),H={lg:"end-3.5 size-5",md:"end-3 size-4"},M={lg:"p-1.5",md:"p-1"},q=I(function(t,e){var a=t,{className:r,children:o}=a,u=n(a,["className","children"]);const{invalid:c,size:v}=m(p);return h(l.Trigger,g(d({ref:e,className:i(w({size:v}),!c&&"[&:not([data-placeholder]):not(:disabled)]:border-gray-stroke-emphasis","group-has-[[data-slot=select-label]]:data-[placeholder]:text-transparent",r),"data-slot":"select-trigger","data-size":v,"aria-invalid":c?"true":void 0},u),{children:[o,s(l.Icon,{asChild:!0,children:s(b,{className:i("flex-shrink-0 text-gray-foreground"),strokeWidth:1.6})})]}))});function J(t){var e=t,{className:a,children:r,position:o="popper"}=e,u=n(e,["className","children","position"]);const{size:c}=m(p);return s(l.Portal,{children:h(l.Content,g(d({className:i("relative z-50 max-h-[min(24rem,var(--radix-select-content-available-height))] min-w-32 overflow-hidden rounded-md border border-gray-stroke-muted bg-surface-elevated text-gray-foreground shadow-level-3 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 motion-reduce:!animate-none [&_[role=group]]:py-1",o==="popper"&&"w-full min-w-[var(--radix-select-trigger-width)] max-w-[var(--radix-select-content-available-width)] data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",a),"data-slot":"select-content",position:o},u),{children:[s(k,{}),s(l.Viewport,{className:i(o==="popper"&&"h-[var(--radix-select-trigger-height)] w-full",M[c]),children:r}),s(S,{})]}))})}function K(t){var e=t,{className:a}=e,r=n(e,["className"]);return s(l.Label,d({className:i("px-2 py-2 text-xs font-medium text-gray-foreground-muted",a),"data-slot":"select-header"},r))}function Q(t){var e=t,{className:a,children:r,icon:o}=e,u=n(e,["className","children","icon"]);const{size:c}=m(p);return h(l.Item,g(d({className:i(F({size:c}),a),"data-slot":"select-item"},u),{children:[o&&s("span",{className:"flex shrink-0 items-center justify-center text-gray-foreground",children:P(o)?L(o,{strokeWidth:1.6}):o}),s("span",{className:"min-w-0 flex-1 truncate",children:s(l.ItemText,{children:r})}),s("span",{className:i("absolute flex items-center justify-center",H[c]),"data-slot":"select-item-indicator",children:s(l.ItemIndicator,{children:s(j,{className:"text-secondary-foreground-muted"})})})]}))}function X(t){var e=t,{className:a}=e,r=n(e,["className"]);return s(l.Separator,d({className:i("-mx-1 my-1 h-px bg-gray-stroke-muted",a),"data-slot":"select-separator"},r))}function k(t){var e=t,{className:a}=e,r=n(e,["className"]);return s(l.ScrollUpButton,g(d({className:i("flex cursor-default items-center justify-center py-1",a),"data-slot":"select-scroll-up-button"},r),{children:s(O,{size:16,strokeWidth:1.6,className:"text-gray-foreground"})}))}function S(t){var e=t,{className:a}=e,r=n(e,["className"]);return s(l.ScrollDownButton,g(d({className:i("flex cursor-default items-center justify-center py-1",a),"data-slot":"select-scroll-down-button"},r),{children:s(b,{size:16,strokeWidth:1.6,className:"text-gray-foreground"})}))}function Y(t){var e=t,{className:a}=e,r=n(e,["className"]);const{invalid:o}=m(p);return s("span",d({className:i("-mt-1 text-xs",o?"text-feedback-error-foreground":"text-gray-foreground",a),"data-slot":"select-text"},r))}export{W as Select,J as SelectContent,R as SelectGroup,K as SelectHeader,Q as SelectItem,D as SelectLabel,S as SelectScrollDownButton,k as SelectScrollUpButton,X as SelectSeparator,Y as SelectText,q as SelectTrigger,U as SelectValue,G as SelectWrapper,w as selectVariants};
@@ -2,4 +2,3 @@ import { type ComponentProps } from "react";
2
2
  import { Separator as SeparatorPrimitive } from "radix-ui";
3
3
  declare function Separator({ className, orientation, decorative, ...props }: ComponentProps<typeof SeparatorPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
4
4
  export { Separator };
5
- //# sourceMappingURL=Separator.d.ts.map
@@ -1,4 +1,3 @@
1
1
  "use strict";
2
2
  "use client";
3
3
  "use strict";var v=require("react/jsx-runtime"),s=require("radix-ui"),f=require("../lib/utils.js"),p=Object.defineProperty,i=Object.getOwnPropertySymbols,o=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable,l=(r,a,e)=>a in r?p(r,a,{enumerable:!0,configurable:!0,writable:!0,value:e}):r[a]=e,d=(r,a)=>{for(var e in a||(a={}))o.call(a,e)&&l(r,e,a[e]);if(i)for(var e of i(a))n.call(a,e)&&l(r,e,a[e]);return r},b=(r,a)=>{var e={};for(var t in r)o.call(r,t)&&a.indexOf(t)<0&&(e[t]=r[t]);if(r!=null&&i)for(var t of i(r))a.indexOf(t)<0&&n.call(r,t)&&(e[t]=r[t]);return e};function m(r){var a=r,{className:e,orientation:t="horizontal",decorative:u=!0}=a,c=b(a,["className","orientation","decorative"]);return v.jsx(s.Separator.Root,d({"data-slot":"separator-root",decorative:u,orientation:t,className:f.cn("shrink-0 bg-gray-stroke-muted data-[orientation=horizontal]:h-px data-[orientation=vertical]:h-full data-[orientation=horizontal]:w-full data-[orientation=vertical]:w-px",e)},c))}exports.Separator=m;
4
- //# sourceMappingURL=Separator.js.map
@@ -1,4 +1,3 @@
1
1
  "use strict";
2
2
  "use client";
3
3
  import{jsx as f}from"react/jsx-runtime";import{Separator as v}from"radix-ui";import{cn as s}from"../lib/utils.mjs";var u=Object.defineProperty,o=Object.getOwnPropertySymbols,i=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable,l=(r,t,a)=>t in r?u(r,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):r[t]=a,m=(r,t)=>{for(var a in t||(t={}))i.call(t,a)&&l(r,a,t[a]);if(o)for(var a of o(t))n.call(t,a)&&l(r,a,t[a]);return r},d=(r,t)=>{var a={};for(var e in r)i.call(r,e)&&t.indexOf(e)<0&&(a[e]=r[e]);if(r!=null&&o)for(var e of o(r))t.indexOf(e)<0&&n.call(r,e)&&(a[e]=r[e]);return a};function b(r){var t=r,{className:a,orientation:e="horizontal",decorative:c=!0}=t,p=d(t,["className","orientation","decorative"]);return f(v.Root,m({"data-slot":"separator-root",decorative:c,orientation:e,className:s("shrink-0 bg-gray-stroke-muted data-[orientation=horizontal]:h-px data-[orientation=vertical]:h-full data-[orientation=horizontal]:w-full data-[orientation=vertical]:w-px",a)},p))}export{b as Separator};
4
- //# sourceMappingURL=Separator.mjs.map
@@ -14,4 +14,3 @@ declare function SheetTitle({ className, ...props }: ComponentProps<typeof Sheet
14
14
  declare function SheetDescription({ className, ...props }: ComponentProps<typeof SheetPrimitive.Description>): import("react/jsx-runtime").JSX.Element;
15
15
  export { Sheet, SheetTrigger, SheetClose, SheetContent, SheetHeader, SheetFooter, SheetTitle, SheetDescription, };
16
16
  export type { SheetContentProps };
17
- //# sourceMappingURL=Sheet.d.ts.map