@exsto/ds 0.0.1-rc.2 → 0.0.1-rc.21

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 (342) hide show
  1. package/README.md +163 -28
  2. package/dist/date-picker.js +2 -0
  3. package/dist/ds/src/date-picker.d.ts +9 -0
  4. package/dist/ds/src/file-input.d.ts +9 -0
  5. package/dist/ds/src/index.d.ts +2 -3
  6. package/dist/ds/src/rich-text-editor.d.ts +8 -0
  7. package/dist/ds/src/time-field.d.ts +9 -0
  8. package/dist/file-input.js +2 -0
  9. package/dist/index.js +79 -2
  10. package/dist/rich-text-editor.js +4 -0
  11. package/dist/source-hash.txt +1 -0
  12. package/dist/styles.css +1185 -403
  13. package/dist/theme.css +122 -7
  14. package/dist/time-field.js +2 -0
  15. package/dist/ui/src/components/edyn/animated-number/animated-number.d.ts +30 -0
  16. package/dist/ui/src/components/edyn/animated-number/animated-number.js +108 -0
  17. package/dist/ui/src/components/edyn/animated-number/animated-number.js.map +1 -0
  18. package/dist/ui/src/components/edyn/animated-number/animated-number.test.d.ts +9 -0
  19. package/dist/ui/src/components/edyn/animated-number/index.d.ts +1 -0
  20. package/dist/ui/src/components/edyn/audio-player/audio-player.d.ts +3 -2
  21. package/dist/ui/src/components/edyn/audio-player/audio-player.js +86 -0
  22. package/dist/ui/src/components/edyn/audio-player/audio-player.js.map +1 -0
  23. package/dist/ui/src/components/edyn/date-picker/date-picker.d.ts +86 -0
  24. package/dist/ui/src/components/edyn/date-picker/date-picker.js +302 -0
  25. package/dist/ui/src/components/edyn/date-picker/date-picker.js.map +1 -0
  26. package/dist/ui/src/components/edyn/date-picker/date-picker.state.test.d.ts +9 -0
  27. package/dist/ui/src/components/edyn/date-picker/date-text.d.ts +40 -0
  28. package/dist/ui/src/components/edyn/date-picker/date-text.js +105 -0
  29. package/dist/ui/src/components/edyn/date-picker/date-text.js.map +1 -0
  30. package/dist/ui/src/components/edyn/date-picker/index.d.ts +2 -0
  31. package/dist/ui/src/components/edyn/date-range-picker/date-range-picker.d.ts +28 -0
  32. package/dist/ui/src/components/edyn/date-range-picker/date-range-picker.js +70 -0
  33. package/dist/ui/src/components/edyn/date-range-picker/date-range-picker.js.map +1 -0
  34. package/dist/ui/src/components/edyn/date-range-picker/date-range-picker.test.d.ts +9 -0
  35. package/dist/ui/src/components/edyn/date-range-picker/index.d.ts +1 -0
  36. package/dist/ui/src/components/edyn/file-input/file-input.d.ts +90 -0
  37. package/dist/ui/src/components/edyn/file-input/file-input.js +261 -0
  38. package/dist/ui/src/components/edyn/file-input/file-input.js.map +1 -0
  39. package/dist/ui/src/components/edyn/file-input/file-input.test.d.ts +8 -0
  40. package/dist/ui/src/components/edyn/file-input/index.d.ts +1 -0
  41. package/dist/ui/src/components/edyn/initials-avatar/index.d.ts +1 -0
  42. package/dist/ui/src/components/edyn/initials-avatar/initials-avatar.d.ts +54 -0
  43. package/dist/ui/src/components/edyn/initials-avatar/initials-avatar.js +86 -0
  44. package/dist/ui/src/components/edyn/initials-avatar/initials-avatar.js.map +1 -0
  45. package/dist/ui/src/components/edyn/initials-avatar/initials-avatar.test.d.ts +10 -0
  46. package/dist/ui/src/components/edyn/multi-select/index.d.ts +1 -0
  47. package/dist/ui/src/components/edyn/multi-select/multi-select.d.ts +117 -0
  48. package/dist/ui/src/components/edyn/multi-select/multi-select.js +342 -0
  49. package/dist/ui/src/components/edyn/multi-select/multi-select.js.map +1 -0
  50. package/dist/ui/src/components/edyn/multi-select/multi-select.test.d.ts +9 -0
  51. package/dist/ui/src/components/edyn/presence/index.d.ts +1 -0
  52. package/dist/ui/src/components/edyn/presence/presence.d.ts +15 -0
  53. package/dist/ui/src/components/edyn/presence/presence.js +58 -0
  54. package/dist/ui/src/components/edyn/presence/presence.js.map +1 -0
  55. package/dist/ui/src/components/edyn/presence/presence.test.d.ts +8 -0
  56. package/dist/ui/src/components/edyn/progress-line/index.d.ts +1 -0
  57. package/dist/ui/src/components/edyn/progress-line/progress-line.d.ts +23 -0
  58. package/dist/ui/src/components/edyn/progress-line/progress-line.js +100 -0
  59. package/dist/ui/src/components/edyn/progress-line/progress-line.js.map +1 -0
  60. package/dist/ui/src/components/edyn/progress-line/progress-line.test.d.ts +9 -0
  61. package/dist/ui/src/components/edyn/rich-text-content/allow-list.d.ts +11 -0
  62. package/dist/ui/src/components/edyn/rich-text-content/allow-list.js +37 -0
  63. package/dist/ui/src/components/edyn/rich-text-content/allow-list.js.map +1 -0
  64. package/dist/ui/src/components/edyn/rich-text-content/index.d.ts +2 -0
  65. package/dist/ui/src/components/edyn/rich-text-content/rich-text-content.d.ts +22 -0
  66. package/dist/ui/src/components/edyn/rich-text-content/rich-text-content.js +124 -0
  67. package/dist/ui/src/components/edyn/rich-text-content/rich-text-content.js.map +1 -0
  68. package/dist/ui/src/components/edyn/rich-text-content/rich-text-content.test.d.ts +8 -0
  69. package/dist/ui/src/components/edyn/rich-text-editor/extensions.d.ts +18 -0
  70. package/dist/ui/src/components/edyn/rich-text-editor/extensions.js +124 -0
  71. package/dist/ui/src/components/edyn/rich-text-editor/extensions.js.map +1 -0
  72. package/dist/ui/src/components/edyn/rich-text-editor/index.d.ts +3 -0
  73. package/dist/ui/src/components/edyn/rich-text-editor/mention-list.d.ts +17 -0
  74. package/dist/ui/src/components/edyn/rich-text-editor/mention-list.js +232 -0
  75. package/dist/ui/src/components/edyn/rich-text-editor/mention-list.js.map +1 -0
  76. package/dist/ui/src/components/edyn/rich-text-editor/rich-text-editor.d.ts +53 -0
  77. package/dist/ui/src/components/edyn/rich-text-editor/rich-text-editor.js +244 -0
  78. package/dist/ui/src/components/edyn/rich-text-editor/rich-text-editor.js.map +1 -0
  79. package/dist/ui/src/components/edyn/rich-text-editor/rich-text-editor.test.d.ts +6 -0
  80. package/dist/ui/src/components/edyn/rich-text-editor/serialize.d.ts +13 -0
  81. package/dist/ui/src/components/edyn/rich-text-editor/serialize.js +55 -0
  82. package/dist/ui/src/components/edyn/rich-text-editor/serialize.js.map +1 -0
  83. package/dist/ui/src/components/edyn/rich-text-editor/sync.d.ts +19 -0
  84. package/dist/ui/src/components/edyn/rich-text-editor/sync.js +34 -0
  85. package/dist/ui/src/components/edyn/rich-text-editor/sync.js.map +1 -0
  86. package/dist/ui/src/components/edyn/rich-text-editor/sync.test.d.ts +11 -0
  87. package/dist/ui/src/components/edyn/rich-text-editor/toolbar.d.ts +20 -0
  88. package/dist/ui/src/components/edyn/rich-text-editor/toolbar.js +235 -0
  89. package/dist/ui/src/components/edyn/rich-text-editor/toolbar.js.map +1 -0
  90. package/dist/ui/src/components/edyn/rich-text-editor/types.d.ts +68 -0
  91. package/dist/ui/src/components/edyn/rich-text-editor/types.js +26 -0
  92. package/dist/ui/src/components/edyn/rich-text-editor/types.js.map +1 -0
  93. package/dist/ui/src/components/edyn/time-field/index.d.ts +1 -0
  94. package/dist/ui/src/components/edyn/time-field/time-field.d.ts +85 -0
  95. package/dist/ui/src/components/edyn/time-field/time-field.js +337 -0
  96. package/dist/ui/src/components/edyn/time-field/time-field.js.map +1 -0
  97. package/dist/ui/src/components/edyn/time-field/time-field.test.d.ts +8 -0
  98. package/dist/ui/src/components/edyn/video-player/video-player.d.ts +2 -2
  99. package/dist/ui/src/components/edyn/video-player/video-player.js +132 -0
  100. package/dist/ui/src/components/edyn/video-player/video-player.js.map +1 -0
  101. package/dist/ui/src/components/forwarded-props.test.d.ts +8 -0
  102. package/dist/ui/src/components/ui/accordion/accordion.d.ts +9 -8
  103. package/dist/ui/src/components/ui/accordion/accordion.js +83 -0
  104. package/dist/ui/src/components/ui/accordion/accordion.js.map +1 -0
  105. package/dist/ui/src/components/ui/alert/alert.js +47 -0
  106. package/dist/ui/src/components/ui/alert/alert.js.map +1 -0
  107. package/dist/ui/src/components/ui/alert-dialog/alert-dialog.js +97 -0
  108. package/dist/ui/src/components/ui/alert-dialog/alert-dialog.js.map +1 -0
  109. package/dist/ui/src/components/ui/aspect-ratio/aspect-ratio.js +15 -0
  110. package/dist/ui/src/components/ui/aspect-ratio/aspect-ratio.js.map +1 -0
  111. package/dist/ui/src/components/ui/attachment/attachment.d.ts +1 -1
  112. package/dist/ui/src/components/ui/attachment/attachment.js +105 -0
  113. package/dist/ui/src/components/ui/attachment/attachment.js.map +1 -0
  114. package/dist/ui/src/components/ui/avatar/avatar.js +51 -0
  115. package/dist/ui/src/components/ui/avatar/avatar.js.map +1 -0
  116. package/dist/ui/src/components/ui/badge/badge.d.ts +1 -1
  117. package/dist/ui/src/components/ui/badge/badge.js +47 -0
  118. package/dist/ui/src/components/ui/badge/badge.js.map +1 -0
  119. package/dist/ui/src/components/ui/breadcrumb/breadcrumb.js +73 -0
  120. package/dist/ui/src/components/ui/breadcrumb/breadcrumb.js.map +1 -0
  121. package/dist/ui/src/components/ui/bubble/bubble.js +74 -0
  122. package/dist/ui/src/components/ui/bubble/bubble.js.map +1 -0
  123. package/dist/ui/src/components/ui/button/button.behavior.test.d.ts +8 -0
  124. package/dist/ui/src/components/ui/button/button.d.ts +1 -1
  125. package/dist/ui/src/components/ui/button/button.js +93 -0
  126. package/dist/ui/src/components/ui/button/button.js.map +1 -0
  127. package/dist/ui/src/components/ui/button-group/button-group.js +37 -0
  128. package/dist/ui/src/components/ui/button-group/button-group.js.map +1 -0
  129. package/dist/ui/src/components/ui/calendar/calendar.behavior.test.d.ts +9 -0
  130. package/dist/ui/src/components/ui/calendar/calendar.d.ts +1 -1
  131. package/dist/ui/src/components/ui/calendar/calendar.js +141 -0
  132. package/dist/ui/src/components/ui/calendar/calendar.js.map +1 -0
  133. package/dist/ui/src/components/ui/card/card.js +57 -0
  134. package/dist/ui/src/components/ui/card/card.js.map +1 -0
  135. package/dist/ui/src/components/ui/carousel/carousel.js +136 -0
  136. package/dist/ui/src/components/ui/carousel/carousel.js.map +1 -0
  137. package/dist/ui/src/components/ui/chart/chart.js +168 -0
  138. package/dist/ui/src/components/ui/chart/chart.js.map +1 -0
  139. package/dist/ui/src/components/ui/checkbox/checkbox.js +21 -0
  140. package/dist/ui/src/components/ui/checkbox/checkbox.js.map +1 -0
  141. package/dist/ui/src/components/ui/collapsible/collapsible.js +26 -0
  142. package/dist/ui/src/components/ui/collapsible/collapsible.js.map +1 -0
  143. package/dist/ui/src/components/ui/combobox/combobox.d.ts +15 -1
  144. package/dist/ui/src/components/ui/combobox/combobox.js +111 -0
  145. package/dist/ui/src/components/ui/combobox/combobox.js.map +1 -0
  146. package/dist/ui/src/components/ui/command/command.d.ts +17 -1
  147. package/dist/ui/src/components/ui/command/command.js +118 -0
  148. package/dist/ui/src/components/ui/command/command.js.map +1 -0
  149. package/dist/ui/src/components/ui/context-menu/context-menu.d.ts +1 -1
  150. package/dist/ui/src/components/ui/context-menu/context-menu.js +145 -0
  151. package/dist/ui/src/components/ui/context-menu/context-menu.js.map +1 -0
  152. package/dist/ui/src/components/ui/dialog/dialog.js +94 -0
  153. package/dist/ui/src/components/ui/dialog/dialog.js.map +1 -0
  154. package/dist/ui/src/components/ui/direction/direction.js +2 -0
  155. package/dist/ui/src/components/ui/drawer/drawer.js +88 -0
  156. package/dist/ui/src/components/ui/drawer/drawer.js.map +1 -0
  157. package/dist/ui/src/components/ui/dropdown-menu/dropdown-menu.d.ts +12 -1
  158. package/dist/ui/src/components/ui/dropdown-menu/dropdown-menu.js +159 -0
  159. package/dist/ui/src/components/ui/dropdown-menu/dropdown-menu.js.map +1 -0
  160. package/dist/ui/src/components/ui/empty/empty.js +61 -0
  161. package/dist/ui/src/components/ui/empty/empty.js.map +1 -0
  162. package/dist/ui/src/components/ui/field/field.js +36 -0
  163. package/dist/ui/src/components/ui/field/field.js.map +1 -0
  164. package/dist/ui/src/components/ui/hover-card/hover-card.js +39 -0
  165. package/dist/ui/src/components/ui/hover-card/hover-card.js.map +1 -0
  166. package/dist/ui/src/components/ui/indicator/indicator.js +79 -0
  167. package/dist/ui/src/components/ui/indicator/indicator.js.map +1 -0
  168. package/dist/ui/src/components/ui/input/input.js +16 -0
  169. package/dist/ui/src/components/ui/input/input.js.map +1 -0
  170. package/dist/ui/src/components/ui/input-group/input-group.d.ts +1 -1
  171. package/dist/ui/src/components/ui/input-group/input-group.js +77 -0
  172. package/dist/ui/src/components/ui/input-group/input-group.js.map +1 -0
  173. package/dist/ui/src/components/ui/input-otp/input-otp.js +48 -0
  174. package/dist/ui/src/components/ui/input-otp/input-otp.js.map +1 -0
  175. package/dist/ui/src/components/ui/item/item.d.ts +1 -1
  176. package/dist/ui/src/components/ui/item/item.js +122 -0
  177. package/dist/ui/src/components/ui/item/item.js.map +1 -0
  178. package/dist/ui/src/components/ui/kbd/kbd.js +21 -0
  179. package/dist/ui/src/components/ui/kbd/kbd.js.map +1 -0
  180. package/dist/ui/src/components/ui/label/label.js +14 -0
  181. package/dist/ui/src/components/ui/label/label.js.map +1 -0
  182. package/dist/ui/src/components/ui/marker/marker.js +44 -0
  183. package/dist/ui/src/components/ui/marker/marker.js.map +1 -0
  184. package/dist/ui/src/components/ui/menubar/menubar.js +140 -0
  185. package/dist/ui/src/components/ui/menubar/menubar.js.map +1 -0
  186. package/dist/ui/src/components/ui/message/message.js +50 -0
  187. package/dist/ui/src/components/ui/message/message.js.map +1 -0
  188. package/dist/ui/src/components/ui/message-scroller/message-scroller.js +61 -0
  189. package/dist/ui/src/components/ui/message-scroller/message-scroller.js.map +1 -0
  190. package/dist/ui/src/components/ui/native-select/native-select.js +39 -0
  191. package/dist/ui/src/components/ui/native-select/native-select.js.map +1 -0
  192. package/dist/ui/src/components/ui/navigation-menu/navigation-menu.js +87 -0
  193. package/dist/ui/src/components/ui/navigation-menu/navigation-menu.js.map +1 -0
  194. package/dist/ui/src/components/ui/pagination/pagination.d.ts +3 -2
  195. package/dist/ui/src/components/ui/pagination/pagination.js +104 -0
  196. package/dist/ui/src/components/ui/pagination/pagination.js.map +1 -0
  197. package/dist/ui/src/components/ui/popover/popover.d.ts +1 -1
  198. package/dist/ui/src/components/ui/popover/popover.js +59 -0
  199. package/dist/ui/src/components/ui/popover/popover.js.map +1 -0
  200. package/dist/ui/src/components/ui/progress/progress.behavior.test.d.ts +8 -0
  201. package/dist/ui/src/components/ui/progress/progress.d.ts +43 -1
  202. package/dist/ui/src/components/ui/progress/progress.js +70 -0
  203. package/dist/ui/src/components/ui/progress/progress.js.map +1 -0
  204. package/dist/ui/src/components/ui/questionnaire/questionnaire.js +171 -0
  205. package/dist/ui/src/components/ui/questionnaire/questionnaire.js.map +1 -0
  206. package/dist/ui/src/components/ui/radio-group/radio-group.js +29 -0
  207. package/dist/ui/src/components/ui/radio-group/radio-group.js.map +1 -0
  208. package/dist/ui/src/components/ui/resizable/resizable.js +29 -0
  209. package/dist/ui/src/components/ui/resizable/resizable.js.map +1 -0
  210. package/dist/ui/src/components/ui/scroll-area/index.d.ts +1 -0
  211. package/dist/ui/src/components/ui/scroll-area/popup-list-scroll.d.ts +13 -0
  212. package/dist/ui/src/components/ui/scroll-area/popup-list-scroll.js +69 -0
  213. package/dist/ui/src/components/ui/scroll-area/popup-list-scroll.js.map +1 -0
  214. package/dist/ui/src/components/ui/scroll-area/scroll-area.behavior.test.d.ts +12 -0
  215. package/dist/ui/src/components/ui/scroll-area/scroll-area.d.ts +57 -6
  216. package/dist/ui/src/components/ui/scroll-area/scroll-area.js +155 -0
  217. package/dist/ui/src/components/ui/scroll-area/scroll-area.js.map +1 -0
  218. package/dist/ui/src/components/ui/select/select.js +97 -0
  219. package/dist/ui/src/components/ui/select/select.js.map +1 -0
  220. package/dist/ui/src/components/ui/separator/separator.behavior.test.d.ts +14 -0
  221. package/dist/ui/src/components/ui/separator/separator.d.ts +14 -0
  222. package/dist/ui/src/components/ui/separator/separator.js +30 -0
  223. package/dist/ui/src/components/ui/separator/separator.js.map +1 -0
  224. package/dist/ui/src/components/ui/sheet/sheet.d.ts +8 -0
  225. package/dist/ui/src/components/ui/sheet/sheet.js +99 -0
  226. package/dist/ui/src/components/ui/sheet/sheet.js.map +1 -0
  227. package/dist/ui/src/components/ui/sidebar/sidebar.js +383 -0
  228. package/dist/ui/src/components/ui/sidebar/sidebar.js.map +1 -0
  229. package/dist/ui/src/components/ui/skeleton/skeleton.js +14 -0
  230. package/dist/ui/src/components/ui/skeleton/skeleton.js.map +1 -0
  231. package/dist/ui/src/components/ui/slider/slider.js +49 -0
  232. package/dist/ui/src/components/ui/slider/slider.js.map +1 -0
  233. package/dist/ui/src/components/ui/spinner/spinner.js +28 -0
  234. package/dist/ui/src/components/ui/spinner/spinner.js.map +1 -0
  235. package/dist/ui/src/components/ui/switch/switch.js +20 -0
  236. package/dist/ui/src/components/ui/switch/switch.js.map +1 -0
  237. package/dist/ui/src/components/ui/table/table.behavior.test.d.ts +4 -5
  238. package/dist/ui/src/components/ui/table/table.d.ts +15 -1
  239. package/dist/ui/src/components/ui/table/table.js +81 -0
  240. package/dist/ui/src/components/ui/table/table.js.map +1 -0
  241. package/dist/ui/src/components/ui/tabs/tabs.d.ts +9 -8
  242. package/dist/ui/src/components/ui/tabs/tabs.js +50 -0
  243. package/dist/ui/src/components/ui/tabs/tabs.js.map +1 -0
  244. package/dist/ui/src/components/ui/textarea/textarea.js +14 -0
  245. package/dist/ui/src/components/ui/textarea/textarea.js.map +1 -0
  246. package/dist/ui/src/components/ui/toast/toast.js +124 -0
  247. package/dist/ui/src/components/ui/toast/toast.js.map +1 -0
  248. package/dist/ui/src/components/ui/toggle/toggle.js +37 -0
  249. package/dist/ui/src/components/ui/toggle/toggle.js.map +1 -0
  250. package/dist/ui/src/components/ui/toggle-group/toggle-group.js +56 -0
  251. package/dist/ui/src/components/ui/toggle-group/toggle-group.js.map +1 -0
  252. package/dist/ui/src/components/ui/tooltip/tooltip.js +43 -0
  253. package/dist/ui/src/components/ui/tooltip/tooltip.js.map +1 -0
  254. package/dist/ui/src/hooks/use-media-player.js +140 -0
  255. package/dist/ui/src/hooks/use-media-player.js.map +1 -0
  256. package/dist/ui/src/hooks/use-merged-refs.js +18 -0
  257. package/dist/ui/src/hooks/use-merged-refs.js.map +1 -0
  258. package/dist/ui/src/hooks/use-mobile.js +20 -0
  259. package/dist/ui/src/hooks/use-mobile.js.map +1 -0
  260. package/dist/ui/src/index.d.ts +8 -0
  261. package/dist/ui/src/lib/first-weekday.d.ts +6 -0
  262. package/dist/ui/src/lib/first-weekday.js +34 -0
  263. package/dist/ui/src/lib/first-weekday.js.map +1 -0
  264. package/dist/ui/src/lib/focus-guards.d.ts +2 -0
  265. package/dist/ui/src/lib/focus-guards.js +52 -0
  266. package/dist/ui/src/lib/focus-guards.js.map +1 -0
  267. package/dist/ui/src/lib/focus-ring.test.d.ts +8 -0
  268. package/dist/ui/src/lib/popup-list.d.ts +75 -0
  269. package/dist/ui/src/lib/popup-list.js +48 -0
  270. package/dist/ui/src/lib/popup-list.js.map +1 -0
  271. package/dist/ui/src/lib/popup-list.test.d.ts +10 -0
  272. package/dist/ui/src/lib/utils.js +21 -0
  273. package/dist/ui/src/lib/utils.js.map +1 -0
  274. package/package.json +36 -8
  275. package/dist/chunks/toggle-group-ByNq8g7H.js +0 -4263
  276. package/dist/chunks/toggle-group-ByNq8g7H.js.map +0 -1
  277. package/dist/dom/src/context.d.ts +0 -34
  278. package/dist/dom/src/define-element.d.ts +0 -11
  279. package/dist/dom/src/field-control.d.ts +0 -5
  280. package/dist/dom/src/index.d.ts +0 -6
  281. package/dist/dom/src/mode.d.ts +0 -8
  282. package/dist/dom/src/styles.d.ts +0 -6
  283. package/dist/dom/src/theme-state.d.ts +0 -1
  284. package/dist/dom/src/types.d.ts +0 -65
  285. package/dist/ds/src/elements.d.ts +0 -12
  286. package/dist/elements/src/edx-accordion.d.ts +0 -14
  287. package/dist/elements/src/edx-accordion.test.d.ts +0 -1
  288. package/dist/elements/src/edx-alert.d.ts +0 -14
  289. package/dist/elements/src/edx-audio-player.d.ts +0 -11
  290. package/dist/elements/src/edx-avatar.d.ts +0 -10
  291. package/dist/elements/src/edx-badge.d.ts +0 -12
  292. package/dist/elements/src/edx-breadcrumb.d.ts +0 -11
  293. package/dist/elements/src/edx-button-group.d.ts +0 -7
  294. package/dist/elements/src/edx-button.d.ts +0 -20
  295. package/dist/elements/src/edx-calendar.d.ts +0 -21
  296. package/dist/elements/src/edx-card.d.ts +0 -8
  297. package/dist/elements/src/edx-checkbox.d.ts +0 -18
  298. package/dist/elements/src/edx-combobox.d.ts +0 -28
  299. package/dist/elements/src/edx-content-components.d.ts +0 -2
  300. package/dist/elements/src/edx-dialog.d.ts +0 -20
  301. package/dist/elements/src/edx-drawer.d.ts +0 -21
  302. package/dist/elements/src/edx-dropdown-menu.d.ts +0 -29
  303. package/dist/elements/src/edx-field.d.ts +0 -9
  304. package/dist/elements/src/edx-field.test.d.ts +0 -1
  305. package/dist/elements/src/edx-indicator.d.ts +0 -14
  306. package/dist/elements/src/edx-input-group.d.ts +0 -32
  307. package/dist/elements/src/edx-input-otp.d.ts +0 -19
  308. package/dist/elements/src/edx-input.d.ts +0 -31
  309. package/dist/elements/src/edx-interactive-components.d.ts +0 -2
  310. package/dist/elements/src/edx-label.d.ts +0 -6
  311. package/dist/elements/src/edx-pagination.d.ts +0 -8
  312. package/dist/elements/src/edx-popover.d.ts +0 -24
  313. package/dist/elements/src/edx-progress.d.ts +0 -10
  314. package/dist/elements/src/edx-radio-group.d.ts +0 -22
  315. package/dist/elements/src/edx-radio-group.test.d.ts +0 -1
  316. package/dist/elements/src/edx-scroll-area.d.ts +0 -15
  317. package/dist/elements/src/edx-scroll-area.test.d.ts +0 -1
  318. package/dist/elements/src/edx-select.d.ts +0 -34
  319. package/dist/elements/src/edx-separator.d.ts +0 -10
  320. package/dist/elements/src/edx-skeleton.d.ts +0 -8
  321. package/dist/elements/src/edx-slider.d.ts +0 -17
  322. package/dist/elements/src/edx-slider.test.d.ts +0 -1
  323. package/dist/elements/src/edx-switch.d.ts +0 -18
  324. package/dist/elements/src/edx-table.d.ts +0 -13
  325. package/dist/elements/src/edx-table.test.d.ts +0 -1
  326. package/dist/elements/src/edx-tabs.d.ts +0 -15
  327. package/dist/elements/src/edx-tabs.test.d.ts +0 -1
  328. package/dist/elements/src/edx-textarea.d.ts +0 -25
  329. package/dist/elements/src/edx-toggle-group.d.ts +0 -27
  330. package/dist/elements/src/edx-toggle-group.test.d.ts +0 -1
  331. package/dist/elements/src/edx-toggle.d.ts +0 -18
  332. package/dist/elements/src/edx-tooltip.d.ts +0 -28
  333. package/dist/elements/src/edx-video-player.d.ts +0 -16
  334. package/dist/elements/src/field-control-bridge.d.ts +0 -7
  335. package/dist/elements/src/index.d.ts +0 -14
  336. package/dist/elements/src/projected-content.test.d.ts +0 -1
  337. package/dist/elements/src/registry.d.ts +0 -39
  338. package/dist/elements/src/registry.test.d.ts +0 -1
  339. package/dist/elements.js +0 -4020
  340. package/dist/elements.js.map +0 -1
  341. /package/dist/{dom/src/define-element.test.d.ts → ui/src/components/edyn/date-picker/date-text.test.d.ts} +0 -0
  342. /package/dist/{dom/src/native-slot.test.d.ts → ui/src/lib/first-weekday.test.d.ts} +0 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"card.js","names":[],"sources":["../../../../../../../ui/src/components/ui/card/card.tsx"],"sourcesContent":["import { cn } from '@edyn/ui/lib/utils';\nimport type * as React from 'react';\n\nexport const Card = ({ className, size = 'default', ...props }: React.ComponentProps<'div'> & { size?: 'default' | 'sm' }) => {\n return (\n <div\n data-slot=\"card\"\n data-size={size}\n className={cn(\n 'group/card flex flex-col gap-4 overflow-hidden rounded-xl bg-card py-4 text-sm text-card-foreground ring-1 ring-foreground/10 has-data-[slot=card-footer]:pb-0 has-[>img:first-child]:pt-0 data-[size=sm]:gap-3 data-[size=sm]:py-3 data-[size=sm]:has-data-[slot=card-footer]:pb-0 *:[img:first-child]:rounded-t-xl *:[img:last-child]:rounded-b-xl',\n className,\n )}\n {...props}\n />\n );\n};\n\nexport const CardHeader = ({ className, ...props }: React.ComponentProps<'div'>) => {\n return (\n <div\n data-slot=\"card-header\"\n className={cn(\n 'group/card-header @container/card-header grid auto-rows-min items-start gap-1 rounded-t-xl px-4 group-data-[size=sm]/card:px-3 has-data-[slot=card-action]:grid-cols-[1fr_auto] has-data-[slot=card-description]:grid-rows-[auto_auto] [.border-b]:pb-4 group-data-[size=sm]/card:[.border-b]:pb-3',\n className,\n )}\n {...props}\n />\n );\n};\n\nexport const CardTitle = ({ className, ...props }: React.ComponentProps<'div'>) => {\n return (\n <div\n data-slot=\"card-title\"\n className={cn('text-base leading-6 font-medium group-data-[size=sm]/card:text-sm group-data-[size=sm]/card:leading-5', className)}\n {...props}\n />\n );\n};\n\nexport const CardDescription = ({ className, ...props }: React.ComponentProps<'div'>) => {\n return <div data-slot=\"card-description\" className={cn('text-sm text-muted-foreground', className)} {...props} />;\n};\n\nexport const CardAction = ({ className, ...props }: React.ComponentProps<'div'>) => {\n return <div data-slot=\"card-action\" className={cn('col-start-2 row-span-2 row-start-1 self-start justify-self-end', className)} {...props} />;\n};\n\nexport const CardContent = ({ className, ...props }: React.ComponentProps<'div'>) => {\n return <div data-slot=\"card-content\" className={cn('px-4 group-data-[size=sm]/card:px-3', className)} {...props} />;\n};\n\nexport const CardFooter = ({ className, ...props }: React.ComponentProps<'div'>) => {\n return (\n <div\n data-slot=\"card-footer\"\n className={cn('flex items-center rounded-b-xl border-t bg-muted/50 p-4 group-data-[size=sm]/card:p-3', className)}\n {...props}\n />\n );\n};\n"],"mappings":";;;AAGA,IAAa,QAAQ,EAAE,WAAW,OAAO,WAAW,GAAG,YAAuE;CAC5H,OACE,oBAAC,OAAD;EACE,aAAU;EACV,aAAW;EACX,WAAW,GACT,wVACA,SACF;EACA,GAAI;CACL,CAAA;AAEL;AAEA,IAAa,cAAc,EAAE,WAAW,GAAG,YAAyC;CAClF,OACE,oBAAC,OAAD;EACE,aAAU;EACV,WAAW,GACT,sSACA,SACF;EACA,GAAI;CACL,CAAA;AAEL;AAEA,IAAa,aAAa,EAAE,WAAW,GAAG,YAAyC;CACjF,OACE,oBAAC,OAAD;EACE,aAAU;EACV,WAAW,GAAG,yGAAyG,SAAS;EAChI,GAAI;CACL,CAAA;AAEL;AAEA,IAAa,mBAAmB,EAAE,WAAW,GAAG,YAAyC;CACvF,OAAO,oBAAC,OAAD;EAAK,aAAU;EAAmB,WAAW,GAAG,iCAAiC,SAAS;EAAG,GAAI;CAAQ,CAAA;AAClH;AAEA,IAAa,cAAc,EAAE,WAAW,GAAG,YAAyC;CAClF,OAAO,oBAAC,OAAD;EAAK,aAAU;EAAc,WAAW,GAAG,kEAAkE,SAAS;EAAG,GAAI;CAAQ,CAAA;AAC9I;AAEA,IAAa,eAAe,EAAE,WAAW,GAAG,YAAyC;CACnF,OAAO,oBAAC,OAAD;EAAK,aAAU;EAAe,WAAW,GAAG,uCAAuC,SAAS;EAAG,GAAI;CAAQ,CAAA;AACpH;AAEA,IAAa,cAAc,EAAE,WAAW,GAAG,YAAyC;CAClF,OACE,oBAAC,OAAD;EACE,aAAU;EACV,WAAW,GAAG,yFAAyF,SAAS;EAChH,GAAI;CACL,CAAA;AAEL"}
@@ -0,0 +1,136 @@
1
+ "use client";
2
+ import { cn } from "../../../lib/utils.js";
3
+ import { Button } from "../button/button.js";
4
+ import * as React from "react";
5
+ import { jsx, jsxs } from "react/jsx-runtime";
6
+ import { IconChevronLeft, IconChevronRight } from "@tabler/icons-react";
7
+ import useEmblaCarousel from "embla-carousel-react";
8
+ //#region ../ui/src/components/ui/carousel/carousel.tsx
9
+ var CarouselContext = React.createContext(null);
10
+ var useCarousel = () => {
11
+ const context = React.useContext(CarouselContext);
12
+ if (!context) throw new Error("useCarousel must be used within a <Carousel />");
13
+ return context;
14
+ };
15
+ var Carousel = ({ orientation = "horizontal", opts, setApi, plugins, className, children, ...props }) => {
16
+ const [carouselRef, api] = useEmblaCarousel({
17
+ ...opts,
18
+ axis: orientation === "horizontal" ? "x" : "y"
19
+ }, plugins);
20
+ const [canScrollPrev, setCanScrollPrev] = React.useState(false);
21
+ const [canScrollNext, setCanScrollNext] = React.useState(false);
22
+ const onSelect = React.useCallback((api) => {
23
+ if (!api) return;
24
+ setCanScrollPrev(api.canScrollPrev());
25
+ setCanScrollNext(api.canScrollNext());
26
+ }, []);
27
+ const scrollPrev = React.useCallback(() => {
28
+ api?.scrollPrev();
29
+ }, [api]);
30
+ const scrollNext = React.useCallback(() => {
31
+ api?.scrollNext();
32
+ }, [api]);
33
+ const handleKeyDown = React.useCallback((event) => {
34
+ if (event.key === "ArrowLeft") {
35
+ event.preventDefault();
36
+ scrollPrev();
37
+ } else if (event.key === "ArrowRight") {
38
+ event.preventDefault();
39
+ scrollNext();
40
+ }
41
+ }, [scrollPrev, scrollNext]);
42
+ React.useEffect(() => {
43
+ if (!api || !setApi) return;
44
+ setApi(api);
45
+ }, [api, setApi]);
46
+ React.useEffect(() => {
47
+ if (!api) return;
48
+ onSelect(api);
49
+ api.on("reInit", onSelect);
50
+ api.on("select", onSelect);
51
+ return () => {
52
+ api.off("reInit", onSelect);
53
+ api.off("select", onSelect);
54
+ };
55
+ }, [api, onSelect]);
56
+ return /* @__PURE__ */ jsx(CarouselContext.Provider, {
57
+ value: {
58
+ carouselRef,
59
+ api,
60
+ opts,
61
+ orientation: orientation || (opts?.axis === "y" ? "vertical" : "horizontal"),
62
+ scrollPrev,
63
+ scrollNext,
64
+ canScrollPrev,
65
+ canScrollNext
66
+ },
67
+ children: /* @__PURE__ */ jsx("div", {
68
+ onKeyDownCapture: handleKeyDown,
69
+ className: cn("relative", className),
70
+ role: "region",
71
+ "aria-roledescription": "carousel",
72
+ "data-slot": "carousel",
73
+ ...props,
74
+ children
75
+ })
76
+ });
77
+ };
78
+ var CarouselContent = ({ className, ...props }) => {
79
+ const { carouselRef, orientation } = useCarousel();
80
+ return /* @__PURE__ */ jsx("div", {
81
+ ref: carouselRef,
82
+ className: "overflow-hidden",
83
+ "data-slot": "carousel-content",
84
+ "data-focus": "inset",
85
+ children: /* @__PURE__ */ jsx("div", {
86
+ className: cn("flex", orientation === "horizontal" ? "-ml-4" : "-mt-4 flex-col", className),
87
+ ...props
88
+ })
89
+ });
90
+ };
91
+ var CarouselItem = ({ className, ...props }) => {
92
+ const { orientation } = useCarousel();
93
+ return /* @__PURE__ */ jsx("div", {
94
+ role: "group",
95
+ "aria-roledescription": "slide",
96
+ "data-slot": "carousel-item",
97
+ className: cn("min-w-0 shrink-0 grow-0 basis-full", orientation === "horizontal" ? "pl-4" : "pt-4", className),
98
+ ...props
99
+ });
100
+ };
101
+ var CarouselPrevious = ({ className, variant = "outline", size = "icon-sm", ...props }) => {
102
+ const { orientation, scrollPrev, canScrollPrev } = useCarousel();
103
+ return /* @__PURE__ */ jsxs(Button, {
104
+ "data-slot": "carousel-previous",
105
+ variant,
106
+ size,
107
+ className: cn("absolute touch-manipulation rounded-full", orientation === "horizontal" ? "inset-y-0 -left-12 my-auto" : "-top-12 left-1/2 -translate-x-1/2 rotate-90", className),
108
+ disabled: !canScrollPrev,
109
+ onClick: scrollPrev,
110
+ ...props,
111
+ children: [/* @__PURE__ */ jsx(IconChevronLeft, {}), /* @__PURE__ */ jsx("span", {
112
+ className: "sr-only",
113
+ children: "Previous slide"
114
+ })]
115
+ });
116
+ };
117
+ var CarouselNext = ({ className, variant = "outline", size = "icon-sm", ...props }) => {
118
+ const { orientation, scrollNext, canScrollNext } = useCarousel();
119
+ return /* @__PURE__ */ jsxs(Button, {
120
+ "data-slot": "carousel-next",
121
+ variant,
122
+ size,
123
+ className: cn("absolute touch-manipulation rounded-full", orientation === "horizontal" ? "inset-y-0 -right-12 my-auto" : "-bottom-12 left-1/2 -translate-x-1/2 rotate-90", className),
124
+ disabled: !canScrollNext,
125
+ onClick: scrollNext,
126
+ ...props,
127
+ children: [/* @__PURE__ */ jsx(IconChevronRight, {}), /* @__PURE__ */ jsx("span", {
128
+ className: "sr-only",
129
+ children: "Next slide"
130
+ })]
131
+ });
132
+ };
133
+ //#endregion
134
+ export { Carousel, CarouselContent, CarouselItem, CarouselNext, CarouselPrevious, useCarousel };
135
+
136
+ //# sourceMappingURL=carousel.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"carousel.js","names":[],"sources":["../../../../../../../ui/src/components/ui/carousel/carousel.tsx"],"sourcesContent":["'use client';\n\nimport { cn } from '@edyn/ui/lib/utils';\nimport { IconChevronLeft, IconChevronRight } from '@tabler/icons-react';\nimport useEmblaCarousel, { type UseEmblaCarouselType } from 'embla-carousel-react';\nimport * as React from 'react';\nimport { Button } from '../button';\n\nexport type TCarouselApi = UseEmblaCarouselType[1];\ntype TUseCarouselParameters = Parameters<typeof useEmblaCarousel>;\ntype TCarouselOptions = TUseCarouselParameters[0];\ntype TCarouselPlugin = TUseCarouselParameters[1];\n\ntype TCarouselProps = {\n opts?: TCarouselOptions;\n plugins?: TCarouselPlugin;\n orientation?: 'horizontal' | 'vertical';\n setApi?: (api: TCarouselApi) => void;\n};\n\ntype TCarouselContextProps = {\n carouselRef: ReturnType<typeof useEmblaCarousel>[0];\n api: ReturnType<typeof useEmblaCarousel>[1];\n scrollPrev: () => void;\n scrollNext: () => void;\n canScrollPrev: boolean;\n canScrollNext: boolean;\n} & TCarouselProps;\n\nconst CarouselContext = React.createContext<TCarouselContextProps | null>(null);\n\nexport const useCarousel = () => {\n const context = React.useContext(CarouselContext);\n\n if (!context) {\n throw new Error('useCarousel must be used within a <Carousel />');\n }\n\n return context;\n};\n\nexport const Carousel = ({\n orientation = 'horizontal',\n opts,\n setApi,\n plugins,\n className,\n children,\n ...props\n}: React.ComponentProps<'div'> & TCarouselProps) => {\n const [carouselRef, api] = useEmblaCarousel(\n {\n ...opts,\n axis: orientation === 'horizontal' ? 'x' : 'y',\n },\n plugins,\n );\n const [canScrollPrev, setCanScrollPrev] = React.useState(false);\n const [canScrollNext, setCanScrollNext] = React.useState(false);\n\n const onSelect = React.useCallback((api: TCarouselApi) => {\n if (!api) {\n return;\n }\n setCanScrollPrev(api.canScrollPrev());\n setCanScrollNext(api.canScrollNext());\n }, []);\n\n const scrollPrev = React.useCallback(() => {\n api?.scrollPrev();\n }, [api]);\n\n const scrollNext = React.useCallback(() => {\n api?.scrollNext();\n }, [api]);\n\n const handleKeyDown = React.useCallback(\n (event: React.KeyboardEvent<HTMLDivElement>) => {\n if (event.key === 'ArrowLeft') {\n event.preventDefault();\n scrollPrev();\n } else if (event.key === 'ArrowRight') {\n event.preventDefault();\n scrollNext();\n }\n },\n [scrollPrev, scrollNext],\n );\n\n React.useEffect(() => {\n if (!api || !setApi) {\n return;\n }\n setApi(api);\n }, [api, setApi]);\n\n React.useEffect(() => {\n if (!api) {\n return;\n }\n onSelect(api);\n api.on('reInit', onSelect);\n api.on('select', onSelect);\n\n return () => {\n api.off('reInit', onSelect);\n api.off('select', onSelect);\n };\n }, [api, onSelect]);\n\n return (\n <CarouselContext.Provider\n value={{\n carouselRef,\n api: api,\n opts,\n orientation: orientation || (opts?.axis === 'y' ? 'vertical' : 'horizontal'),\n scrollPrev,\n scrollNext,\n canScrollPrev,\n canScrollNext,\n }}\n >\n {/* The generated shadcn carousel deliberately uses ARIA carousel semantics on a div. */}\n {/* biome-ignore lint/a11y/useSemanticElements: section would change the public root element. */}\n <div\n onKeyDownCapture={handleKeyDown}\n className={cn('relative', className)}\n role=\"region\"\n aria-roledescription=\"carousel\"\n data-slot=\"carousel\"\n {...props}\n >\n {children}\n </div>\n </CarouselContext.Provider>\n );\n};\n\nexport const CarouselContent = ({ className, ...props }: React.ComponentProps<'div'>) => {\n const { carouselRef, orientation } = useCarousel();\n\n return (\n <div ref={carouselRef} className=\"overflow-hidden\" data-slot=\"carousel-content\" data-focus=\"inset\">\n <div className={cn('flex', orientation === 'horizontal' ? '-ml-4' : '-mt-4 flex-col', className)} {...props} />\n </div>\n );\n};\n\nexport const CarouselItem = ({ className, ...props }: React.ComponentProps<'div'>) => {\n const { orientation } = useCarousel();\n\n return (\n // The generated shadcn carousel deliberately uses the ARIA group role for each slide.\n // biome-ignore lint/a11y/useSemanticElements: fieldset is not an equivalent carousel slide element.\n <div\n role=\"group\"\n aria-roledescription=\"slide\"\n data-slot=\"carousel-item\"\n className={cn('min-w-0 shrink-0 grow-0 basis-full', orientation === 'horizontal' ? 'pl-4' : 'pt-4', className)}\n {...props}\n />\n );\n};\n\nexport const CarouselPrevious = ({ className, variant = 'outline', size = 'icon-sm', ...props }: React.ComponentProps<typeof Button>) => {\n const { orientation, scrollPrev, canScrollPrev } = useCarousel();\n\n return (\n <Button\n data-slot=\"carousel-previous\"\n variant={variant}\n size={size}\n className={cn(\n 'absolute touch-manipulation rounded-full',\n orientation === 'horizontal' ? 'inset-y-0 -left-12 my-auto' : '-top-12 left-1/2 -translate-x-1/2 rotate-90',\n className,\n )}\n disabled={!canScrollPrev}\n onClick={scrollPrev}\n {...props}\n >\n <IconChevronLeft />\n <span className=\"sr-only\">Previous slide</span>\n </Button>\n );\n};\n\nexport const CarouselNext = ({ className, variant = 'outline', size = 'icon-sm', ...props }: React.ComponentProps<typeof Button>) => {\n const { orientation, scrollNext, canScrollNext } = useCarousel();\n\n return (\n <Button\n data-slot=\"carousel-next\"\n variant={variant}\n size={size}\n className={cn(\n 'absolute touch-manipulation rounded-full',\n orientation === 'horizontal' ? 'inset-y-0 -right-12 my-auto' : '-bottom-12 left-1/2 -translate-x-1/2 rotate-90',\n className,\n )}\n disabled={!canScrollNext}\n onClick={scrollNext}\n {...props}\n >\n <IconChevronRight />\n <span className=\"sr-only\">Next slide</span>\n </Button>\n );\n};\n"],"mappings":";;;;;;;;AA6BA,IAAM,kBAAkB,MAAM,cAA4C,IAAI;AAE9E,IAAa,oBAAoB;CAC/B,MAAM,UAAU,MAAM,WAAW,eAAe;CAEhD,IAAI,CAAC,SACH,MAAM,IAAI,MAAM,gDAAgD;CAGlE,OAAO;AACT;AAEA,IAAa,YAAY,EACvB,cAAc,cACd,MACA,QACA,SACA,WACA,UACA,GAAG,YAC+C;CAClD,MAAM,CAAC,aAAa,OAAO,iBACzB;EACE,GAAG;EACH,MAAM,gBAAgB,eAAe,MAAM;CAC7C,GACA,OACF;CACA,MAAM,CAAC,eAAe,oBAAoB,MAAM,SAAS,KAAK;CAC9D,MAAM,CAAC,eAAe,o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1
+ "use client";
2
+ import { cn } from "../../../lib/utils.js";
3
+ import * as React from "react";
4
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
5
+ import * as RechartsPrimitive from "recharts";
6
+ //#region ../ui/src/components/ui/chart/chart.tsx
7
+ var THEMES = {
8
+ light: "",
9
+ dark: ".dark"
10
+ };
11
+ var INITIAL_DIMENSION = {
12
+ width: 320,
13
+ height: 200
14
+ };
15
+ var ChartContext = React.createContext(null);
16
+ var useChart = () => {
17
+ const context = React.useContext(ChartContext);
18
+ if (!context) throw new Error("useChart must be used within a <ChartContainer />");
19
+ return context;
20
+ };
21
+ var ChartContainer = ({ id, className, children, config, initialDimension = INITIAL_DIMENSION, ...props }) => {
22
+ const uniqueId = React.useId();
23
+ const chartId = `chart-${id ?? uniqueId.replace(/:/g, "")}`;
24
+ const refContainer = React.useRef(null);
25
+ const [hasSize, setHasSize] = React.useState(false);
26
+ React.useLayoutEffect(() => {
27
+ const element = refContainer.current;
28
+ if (!element) return;
29
+ const update = () => {
30
+ const { width, height } = element.getBoundingClientRect();
31
+ setHasSize(width > 0 && height > 0);
32
+ };
33
+ update();
34
+ const observer = new ResizeObserver(update);
35
+ observer.observe(element);
36
+ return () => observer.disconnect();
37
+ }, []);
38
+ return /* @__PURE__ */ jsx(ChartContext.Provider, {
39
+ value: { config },
40
+ children: /* @__PURE__ */ jsxs("div", {
41
+ ref: refContainer,
42
+ "data-slot": "chart",
43
+ id,
44
+ "data-chart": chartId,
45
+ className: cn("flex aspect-video justify-center text-xs [&_.recharts-cartesian-axis-tick_text]:fill-muted-foreground [&_.recharts-cartesian-grid_line[stroke='#ccc']]:stroke-border/50 [&_.recharts-curve.recharts-tooltip-cursor]:stroke-border [&_.recharts-dot[stroke='#fff']]:stroke-transparent [&_.recharts-layer]:outline-hidden [&_.recharts-polar-grid_[stroke='#ccc']]:stroke-border [&_.recharts-radial-bar-background-sector]:fill-muted [&_.recharts-rectangle.recharts-tooltip-cursor]:fill-muted [&_.recharts-reference-line_[stroke='#ccc']]:stroke-border [&_.recharts-sector]:outline-hidden [&_.recharts-sector[stroke='#fff']]:stroke-transparent [&_.recharts-surface]:outline-hidden", className),
46
+ ...props,
47
+ children: [/* @__PURE__ */ jsx(ChartStyle, {
48
+ id: chartId,
49
+ config
50
+ }), hasSize && /* @__PURE__ */ jsx(RechartsPrimitive.ResponsiveContainer, {
51
+ initialDimension,
52
+ children
53
+ })]
54
+ })
55
+ });
56
+ };
57
+ var ChartStyle = ({ id, config }) => {
58
+ const colorConfig = Object.entries(config).filter(([, config]) => config.theme ?? config.color);
59
+ if (!colorConfig.length) return null;
60
+ const css = Object.entries(THEMES).map(([theme, prefix]) => `
61
+ ${prefix} [data-chart=${id}] {
62
+ ${colorConfig.map(([key, itemConfig]) => {
63
+ const color = itemConfig.theme?.[theme] ?? itemConfig.color;
64
+ return color ? ` --color-${key}: ${color};` : null;
65
+ }).join("\n")}
66
+ }
67
+ `).join("\n");
68
+ return /* @__PURE__ */ jsx("style", { children: css });
69
+ };
70
+ var ChartTooltip = RechartsPrimitive.Tooltip;
71
+ var ChartTooltipContent = ({ active, payload, className, indicator = "dot", hideLabel = false, hideIndicator = false, label, labelFormatter, labelClassName, formatter, color, nameKey, labelKey }) => {
72
+ const { config } = useChart();
73
+ const tooltipLabel = React.useMemo(() => {
74
+ if (hideLabel || !payload?.length) return null;
75
+ const [item] = payload;
76
+ const key = `${labelKey ?? item?.dataKey ?? item?.name ?? "value"}`;
77
+ const itemConfig = getPayloadConfigFromPayload(config, item, key);
78
+ const value = !labelKey && typeof label === "string" ? config[label]?.label ?? label : itemConfig?.label;
79
+ if (labelFormatter) return /* @__PURE__ */ jsx("div", {
80
+ className: cn("font-medium", labelClassName),
81
+ children: labelFormatter(value, payload)
82
+ });
83
+ if (!value) return null;
84
+ return /* @__PURE__ */ jsx("div", {
85
+ className: cn("font-medium", labelClassName),
86
+ children: value
87
+ });
88
+ }, [
89
+ label,
90
+ labelFormatter,
91
+ payload,
92
+ hideLabel,
93
+ labelClassName,
94
+ config,
95
+ labelKey
96
+ ]);
97
+ if (!active || !payload?.length) return null;
98
+ const nestLabel = payload.length === 1 && indicator !== "dot";
99
+ return /* @__PURE__ */ jsxs("div", {
100
+ className: cn("grid min-w-32 items-start gap-1.5 rounded-lg border border-border/50 bg-background px-2.5 py-1.5 text-xs shadow-xl", className),
101
+ children: [!nestLabel ? tooltipLabel : null, /* @__PURE__ */ jsx("div", {
102
+ className: "grid gap-1.5",
103
+ children: payload.filter((item) => item.type !== "none").map((item, index) => {
104
+ const key = `${nameKey ?? item.name ?? item.dataKey ?? "value"}`;
105
+ const itemConfig = getPayloadConfigFromPayload(config, item, key);
106
+ const indicatorColor = color ?? item.payload?.fill ?? item.color;
107
+ return /* @__PURE__ */ jsx("div", {
108
+ className: cn("flex w-full flex-wrap items-stretch gap-2 [&>svg]:h-2.5 [&>svg]:w-2.5 [&>svg]:text-muted-foreground", indicator === "dot" && "items-center"),
109
+ children: formatter && item?.value !== void 0 && item.name ? formatter(item.value, item.name, item, index, item.payload) : /* @__PURE__ */ jsxs(Fragment, { children: [itemConfig?.icon ? /* @__PURE__ */ jsx(itemConfig.icon, {}) : !hideIndicator && /* @__PURE__ */ jsx("div", {
110
+ className: cn("shrink-0 rounded-[2px] border-(--color-border) bg-(--color-bg)", {
111
+ "h-2.5 w-2.5": indicator === "dot",
112
+ "w-1": indicator === "line",
113
+ "w-0 border-[1.5px] border-dashed bg-transparent": indicator === "dashed",
114
+ "my-0.5": nestLabel && indicator === "dashed"
115
+ }),
116
+ style: {
117
+ "--color-bg": indicatorColor,
118
+ "--color-border": indicatorColor
119
+ }
120
+ }), /* @__PURE__ */ jsxs("div", {
121
+ className: cn("flex flex-1 justify-between leading-none", nestLabel ? "items-end" : "items-center"),
122
+ children: [/* @__PURE__ */ jsxs("div", {
123
+ className: "grid gap-1.5",
124
+ children: [nestLabel ? tooltipLabel : null, /* @__PURE__ */ jsx("span", {
125
+ className: "text-muted-foreground",
126
+ children: itemConfig?.label ?? item.name
127
+ })]
128
+ }), item.value != null && /* @__PURE__ */ jsx("span", {
129
+ className: "font-mono font-medium text-foreground tabular-nums",
130
+ children: typeof item.value === "number" ? item.value.toLocaleString() : String(item.value)
131
+ })]
132
+ })] })
133
+ }, `${key}-${String(item.value ?? "")}`);
134
+ })
135
+ })]
136
+ });
137
+ };
138
+ var ChartLegend = RechartsPrimitive.Legend;
139
+ var ChartLegendContent = ({ className, hideIcon = false, payload, verticalAlign = "bottom", nameKey }) => {
140
+ const { config } = useChart();
141
+ if (!payload?.length) return null;
142
+ return /* @__PURE__ */ jsx("div", {
143
+ className: cn("flex items-center justify-center gap-4", verticalAlign === "top" ? "pb-3" : "pt-3", className),
144
+ children: payload.filter((item) => item.type !== "none").map((item) => {
145
+ const key = `${nameKey ?? item.dataKey ?? "value"}`;
146
+ const itemConfig = getPayloadConfigFromPayload(config, item, key);
147
+ return /* @__PURE__ */ jsxs("div", {
148
+ className: cn("flex items-center gap-1.5 [&>svg]:h-3 [&>svg]:w-3 [&>svg]:text-muted-foreground"),
149
+ children: [itemConfig?.icon && !hideIcon ? /* @__PURE__ */ jsx(itemConfig.icon, {}) : /* @__PURE__ */ jsx("div", {
150
+ className: "h-2 w-2 shrink-0 rounded-[2px]",
151
+ style: { backgroundColor: item.color }
152
+ }), itemConfig?.label]
153
+ }, `${key}-${String(item.value ?? "")}`);
154
+ })
155
+ });
156
+ };
157
+ var getPayloadConfigFromPayload = (config, payload, key) => {
158
+ if (typeof payload !== "object" || payload === null) return;
159
+ const payloadPayload = "payload" in payload && typeof payload.payload === "object" && payload.payload !== null ? payload.payload : void 0;
160
+ let configLabelKey = key;
161
+ if (key in payload && typeof payload[key] === "string") configLabelKey = payload[key];
162
+ else if (payloadPayload && key in payloadPayload && typeof payloadPayload[key] === "string") configLabelKey = payloadPayload[key];
163
+ return configLabelKey in config ? config[configLabelKey] : config[key];
164
+ };
165
+ //#endregion
166
+ export { ChartContainer, ChartLegend, ChartLegendContent, ChartStyle, ChartTooltip, ChartTooltipContent };
167
+
168
+ //# sourceMappingURL=chart.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"chart.js","names":[],"sources":["../../../../../../../ui/src/components/ui/chart/chart.tsx"],"sourcesContent":["'use client';\n\nimport { cn } from '@edyn/ui/lib/utils';\nimport * as React from 'react';\nimport type { TooltipValueType } from 'recharts';\nimport * as RechartsPrimitive from 'recharts';\n\n// Format: { THEME_NAME: CSS_SELECTOR }\nconst THEMES = { light: '', dark: '.dark' } as const;\n\nconst INITIAL_DIMENSION = { width: 320, height: 200 } as const;\ntype TTooltipName = number | string;\n\nexport type TChartConfig = Record<\n string,\n {\n label?: React.ReactNode;\n icon?: React.ComponentType;\n } & ({ color?: string; theme?: never } | { color?: never; theme: Record<keyof typeof THEMES, string> })\n>;\n\ntype TChartContextProps = {\n config: TChartConfig;\n};\n\nconst ChartContext = React.createContext<TChartContextProps | null>(null);\n\nconst useChart = () => {\n const context = React.useContext(ChartContext);\n\n if (!context) {\n throw new Error('useChart must be used within a <ChartContainer />');\n }\n\n return context;\n};\n\nexport const ChartContainer = ({\n id,\n className,\n children,\n config,\n initialDimension = INITIAL_DIMENSION,\n ...props\n}: React.ComponentProps<'div'> & {\n config: TChartConfig;\n children: React.ComponentProps<typeof RechartsPrimitive.ResponsiveContainer>['children'];\n initialDimension?: {\n width: number;\n height: number;\n };\n}) => {\n const uniqueId = React.useId();\n const chartId = `chart-${id ?? uniqueId.replace(/:/g, '')}`;\n const refContainer = React.useRef<HTMLDivElement>(null);\n const [hasSize, setHasSize] = React.useState(false);\n\n React.useLayoutEffect(() => {\n const element = refContainer.current;\n if (!element) {\n return;\n }\n\n const update = () => {\n const { width, height } = element.getBoundingClientRect();\n setHasSize(width > 0 && height > 0);\n };\n\n update();\n const observer = new ResizeObserver(update);\n observer.observe(element);\n return () => observer.disconnect();\n }, []);\n\n return (\n <ChartContext.Provider value={{ config }}>\n <div\n ref={refContainer}\n data-slot=\"chart\"\n id={id}\n data-chart={chartId}\n className={cn(\n \"flex aspect-video justify-center text-xs [&_.recharts-cartesian-axis-tick_text]:fill-muted-foreground [&_.recharts-cartesian-grid_line[stroke='#ccc']]:stroke-border/50 [&_.recharts-curve.recharts-tooltip-cursor]:stroke-border [&_.recharts-dot[stroke='#fff']]:stroke-transparent [&_.recharts-layer]:outline-hidden [&_.recharts-polar-grid_[stroke='#ccc']]:stroke-border [&_.recharts-radial-bar-background-sector]:fill-muted [&_.recharts-rectangle.recharts-tooltip-cursor]:fill-muted [&_.recharts-reference-line_[stroke='#ccc']]:stroke-border [&_.recharts-sector]:outline-hidden [&_.recharts-sector[stroke='#fff']]:stroke-transparent [&_.recharts-surface]:outline-hidden\",\n className,\n )}\n {...props}\n >\n <ChartStyle id={chartId} config={config} />\n {hasSize && <RechartsPrimitive.ResponsiveContainer initialDimension={initialDimension}>{children}</RechartsPrimitive.ResponsiveContainer>}\n </div>\n </ChartContext.Provider>\n );\n};\n\nexport const ChartStyle = ({ id, config }: { id: string; config: TChartConfig }) => {\n const colorConfig = Object.entries(config).filter(([, config]) => config.theme ?? config.color);\n\n if (!colorConfig.length) {\n return null;\n }\n\n const css = Object.entries(THEMES)\n .map(\n ([theme, prefix]) => `\n${prefix} [data-chart=${id}] {\n${colorConfig\n .map(([key, itemConfig]) => {\n const color = itemConfig.theme?.[theme as keyof typeof itemConfig.theme] ?? itemConfig.color;\n return color ? ` --color-${key}: ${color};` : null;\n })\n .join('\\n')}\n}\n`,\n )\n .join('\\n');\n\n return <style>{css}</style>;\n};\n\nexport const ChartTooltip = RechartsPrimitive.Tooltip;\n\nexport const ChartTooltipContent = ({\n active,\n payload,\n className,\n indicator = 'dot',\n hideLabel = false,\n hideIndicator = false,\n label,\n labelFormatter,\n labelClassName,\n formatter,\n color,\n nameKey,\n labelKey,\n}: React.ComponentProps<typeof RechartsPrimitive.Tooltip> &\n React.ComponentProps<'div'> & {\n hideLabel?: boolean;\n hideIndicator?: boolean;\n indicator?: 'line' | 'dot' | 'dashed';\n nameKey?: string;\n labelKey?: string;\n } & Omit<RechartsPrimitive.DefaultTooltipContentProps<TooltipValueType, TTooltipName>, 'accessibilityLayer'>) => {\n const { config } = useChart();\n\n const tooltipLabel = React.useMemo(() => {\n if (hideLabel || !payload?.length) {\n return null;\n }\n\n const [item] = payload;\n const key = `${labelKey ?? item?.dataKey ?? item?.name ?? 'value'}`;\n const itemConfig = getPayloadConfigFromPayload(config, item, key);\n const value = !labelKey && typeof label === 'string' ? (config[label]?.label ?? label) : itemConfig?.label;\n\n if (labelFormatter) {\n return <div className={cn('font-medium', labelClassName)}>{labelFormatter(value, payload)}</div>;\n }\n\n if (!value) {\n return null;\n }\n\n return <div className={cn('font-medium', labelClassName)}>{value}</div>;\n }, [label, labelFormatter, payload, hideLabel, labelClassName, config, labelKey]);\n\n if (!active || !payload?.length) {\n return null;\n }\n\n const nestLabel = payload.length === 1 && indicator !== 'dot';\n\n return (\n <div\n className={cn('grid min-w-32 items-start gap-1.5 rounded-lg border border-border/50 bg-background px-2.5 py-1.5 text-xs shadow-xl', className)}\n >\n {!nestLabel ? tooltipLabel : null}\n <div className=\"grid gap-1.5\">\n {payload\n .filter((item) => item.type !== 'none')\n .map((item, index) => {\n const key = `${nameKey ?? item.name ?? item.dataKey ?? 'value'}`;\n const itemConfig = getPayloadConfigFromPayload(config, item, key);\n const indicatorColor = color ?? item.payload?.fill ?? item.color;\n\n return (\n <div\n key={`${key}-${String(item.value ?? '')}`}\n className={cn(\n 'flex w-full flex-wrap items-stretch gap-2 [&>svg]:h-2.5 [&>svg]:w-2.5 [&>svg]:text-muted-foreground',\n indicator === 'dot' && 'items-center',\n )}\n >\n {formatter && item?.value !== undefined && item.name ? (\n formatter(item.value, item.name, item, index, item.payload)\n ) : (\n <>\n {itemConfig?.icon ? (\n <itemConfig.icon />\n ) : (\n !hideIndicator && (\n <div\n className={cn('shrink-0 rounded-[2px] border-(--color-border) bg-(--color-bg)', {\n 'h-2.5 w-2.5': indicator === 'dot',\n 'w-1': indicator === 'line',\n 'w-0 border-[1.5px] border-dashed bg-transparent': indicator === 'dashed',\n 'my-0.5': nestLabel && indicator === 'dashed',\n })}\n style={\n {\n '--color-bg': indicatorColor,\n '--color-border': indicatorColor,\n } as React.CSSProperties\n }\n />\n )\n )}\n <div className={cn('flex flex-1 justify-between leading-none', nestLabel ? 'items-end' : 'items-center')}>\n <div className=\"grid gap-1.5\">\n {nestLabel ? tooltipLabel : null}\n <span className=\"text-muted-foreground\">{itemConfig?.label ?? item.name}</span>\n </div>\n {item.value != null && (\n <span className=\"font-mono font-medium text-foreground tabular-nums\">\n {typeof item.value === 'number' ? item.value.toLocaleString() : String(item.value)}\n </span>\n )}\n </div>\n </>\n )}\n </div>\n );\n })}\n </div>\n </div>\n );\n};\n\nexport const ChartLegend = RechartsPrimitive.Legend;\n\nexport const ChartLegendContent = ({\n className,\n hideIcon = false,\n payload,\n verticalAlign = 'bottom',\n nameKey,\n}: React.ComponentProps<'div'> & {\n hideIcon?: boolean;\n nameKey?: string;\n} & RechartsPrimitive.DefaultLegendContentProps) => {\n const { config } = useChart();\n\n if (!payload?.length) {\n return null;\n }\n\n return (\n <div className={cn('flex items-center justify-center gap-4', verticalAlign === 'top' ? 'pb-3' : 'pt-3', className)}>\n {payload\n .filter((item) => item.type !== 'none')\n .map((item) => {\n const key = `${nameKey ?? item.dataKey ?? 'value'}`;\n const itemConfig = getPayloadConfigFromPayload(config, item, key);\n\n return (\n <div\n key={`${key}-${String(item.value ?? '')}`}\n className={cn('flex items-center gap-1.5 [&>svg]:h-3 [&>svg]:w-3 [&>svg]:text-muted-foreground')}\n >\n {itemConfig?.icon && !hideIcon ? (\n <itemConfig.icon />\n ) : (\n <div\n className=\"h-2 w-2 shrink-0 rounded-[2px]\"\n style={{\n backgroundColor: item.color,\n }}\n />\n )}\n {itemConfig?.label}\n </div>\n );\n })}\n </div>\n );\n};\n\nconst getPayloadConfigFromPayload = (config: TChartConfig, payload: unknown, key: string) => {\n if (typeof payload !== 'object' || payload === null) {\n return undefined;\n }\n\n const payloadPayload = 'payload' in payload && typeof payload.payload === 'object' && payload.payload !== null ? payload.payload : undefined;\n\n let configLabelKey: string = key;\n\n if (key in payload && typeof payload[key as keyof typeof payload] === 'string') {\n configLabelKey = payload[key as keyof typeof payload] as string;\n } else if (payloadPayload && key in payloadPayload && typeof payloadPayload[key as keyof typeof payloadPayload] === 'string') {\n configLabelKey = payloadPayload[key as keyof typeof payloadPayload] as string;\n }\n\n return configLabelKey in config ? config[configLabelKey] : config[key];\n};\n"],"mappings":";;;;;;AAQA,IAAM,SAAS;CAAE,OAAO;CAAI,MAAM;AAAQ;AAE1C,IAAM,oBAAoB;CAAE,OAAO;CAAK,QAAQ;AAAI;AAepD,IAAM,eAAe,MAAM,cAAyC,IAAI;AAExE,IAAM,iBAAiB;CACrB,MAAM,UAAU,MAAM,WAAW,YAAY;CAE7C,IAAI,CAAC,SACH,MAAM,IAAI,MAAM,mDAAmD;CAGrE,OAAO;AACT;AAEA,IAAa,kBAAkB,EAC7B,IACA,WACA,UACA,QACA,mBAAmB,mBACnB,GAAG,YAQC;CACJ,MAAM,WAAW,MAAM,MAAM;CAC7B,MAAM,UAAU,SAAS,MAAM,SAAS,QAAQ,MAAM,EAAE;CACxD,MAAM,eAAe,MAAM,OAAuB,IAAI;CACtD,MAAM,CAAC,SAAS,cAAc,MAAM,SAAS,KAAK;CAElD,MAAM,sBAAsB;EAC1B,MAAM,UAAU,aAAa;EAC7B,IAAI,CAAC,SACH;EAGF,MAAM,eAAe;GACnB,MAAM,EAAE,OAAO,WAAW,QAAQ,sBAAsB;GACxD,WAAW,QAAQ,KAAK,SAAS,CAAC;EACpC;EAEA,OAAO;EACP,MAAM,WAAW,IAAI,eAAe,MAAM;EAC1C,SAAS,QAAQ,OAAO;EACxB,aAAa,SAAS,WAAW;CACnC,GAAG,CAAC,CAAC;CAEL,OACE,oBAAC,aAAa,UAAd;EAAuB,OAAO,EAAE,OAAO;EACrC,UAAA,qBAAC,OAAD;GACE,K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AY,YAAY,YAAY,MAC7C;CAGF,MAAM,iBAAiB,aAAa,WAAW,OAAO,QAAQ,YAAY,YAAY,QAAQ,YAAY,OAAO,QAAQ,UAAU,KAAA;CAEnI,IAAI,iBAAyB;CAE7B,IAAI,OAAO,WAAW,OAAO,QAAQ,SAAiC,UACpE,iBAAiB,QAAQ;MACpB,IAAI,kBAAkB,OAAO,kBAAkB,OAAO,eAAe,SAAwC,UAClH,iBAAiB,eAAe;CAGlC,OAAO,kBAAkB,SAAS,OAAO,kBAAkB,OAAO;AACpE"}
@@ -0,0 +1,21 @@
1
+ import { cn } from "../../../lib/utils.js";
2
+ import { jsx, jsxs } from "react/jsx-runtime";
3
+ import { IconCheck, IconMinus } from "@tabler/icons-react";
4
+ import { Checkbox } from "@base-ui/react/checkbox";
5
+ //#region ../ui/src/components/ui/checkbox/checkbox.tsx
6
+ var Checkbox$1 = ({ className, ...props }) => {
7
+ return /* @__PURE__ */ jsx(Checkbox.Root, {
8
+ "data-slot": "checkbox",
9
+ className: cn("peer relative flex size-4 shrink-0 items-center justify-center rounded-sm border border-control transition-colors outline-none after:absolute after:-inset-x-3 after:-inset-y-2 data-disabled:cursor-not-allowed data-disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 aria-invalid:aria-checked:border-primary dark:bg-input/30 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 data-checked:border-primary data-checked:bg-primary data-checked:text-primary-foreground dark:data-checked:bg-primary", className),
10
+ ...props,
11
+ children: /* @__PURE__ */ jsxs(Checkbox.Indicator, {
12
+ "data-slot": "checkbox-indicator",
13
+ className: "group/checkbox-indicator grid place-content-center text-current transition-none [&>svg]:size-3.5",
14
+ children: [/* @__PURE__ */ jsx(IconCheck, { className: "group-data-indeterminate/checkbox-indicator:hidden" }), /* @__PURE__ */ jsx(IconMinus, { className: "hidden group-data-indeterminate/checkbox-indicator:block" })]
15
+ })
16
+ });
17
+ };
18
+ //#endregion
19
+ export { Checkbox$1 as Checkbox };
20
+
21
+ //# sourceMappingURL=checkbox.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"checkbox.js","names":[],"sources":["../../../../../../../ui/src/components/ui/checkbox/checkbox.tsx"],"sourcesContent":["import { Checkbox as CheckboxPrimitive } from '@base-ui/react/checkbox';\n\nimport { cn } from '@edyn/ui/lib/utils';\nimport { IconCheck, IconMinus } from '@tabler/icons-react';\n\nexport const Checkbox = ({ className, ...props }: CheckboxPrimitive.Root.Props) => {\n return (\n <CheckboxPrimitive.Root\n data-slot=\"checkbox\"\n className={cn(\n 'peer relative flex size-4 shrink-0 items-center justify-center rounded-sm border border-control transition-colors outline-none after:absolute after:-inset-x-3 after:-inset-y-2 data-disabled:cursor-not-allowed data-disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 aria-invalid:aria-checked:border-primary dark:bg-input/30 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 data-checked:border-primary data-checked:bg-primary data-checked:text-primary-foreground dark:data-checked:bg-primary',\n className,\n )}\n {...props}\n >\n <CheckboxPrimitive.Indicator\n data-slot=\"checkbox-indicator\"\n className=\"group/checkbox-indicator grid place-content-center text-current transition-none [&>svg]:size-3.5\"\n >\n <IconCheck className=\"group-data-indeterminate/checkbox-indicator:hidden\" />\n <IconMinus className=\"hidden group-data-indeterminate/checkbox-indicator:block\" />\n </CheckboxPrimitive.Indicator>\n </CheckboxPrimitive.Root>\n );\n};\n"],"mappings":";;;;;AAKA,IAAa,cAAY,EAAE,WAAW,GAAG,YAA0C;CACjF,OACE,oBAAC,SAAkB,MAAnB;EACE,aAAU;EACV,WAAW,GACT,gkBACA,SACF;EACA,GAAI;EAEJ,UAAA,qBAAC,SAAkB,WAAnB;GACE,aAAU;GACV,WAAU;GAFZ,UAAA,CAIE,oBAAC,WAAD,EAAW,WAAU,qDAAsD,CAAA,GAC3E,oBAAC,WAAD,EAAW,WAAU,2DAA4D,CAAA,CACtD;;CACP,CAAA;AAE5B"}
@@ -0,0 +1,26 @@
1
+ import { jsx } from "react/jsx-runtime";
2
+ import { Collapsible } from "@base-ui/react/collapsible";
3
+ //#region ../ui/src/components/ui/collapsible/collapsible.tsx
4
+ var Collapsible$1 = ({ ...props }) => {
5
+ return /* @__PURE__ */ jsx(Collapsible.Root, {
6
+ "data-slot": "collapsible",
7
+ ...props
8
+ });
9
+ };
10
+ var CollapsibleTrigger = ({ ...props }) => {
11
+ return /* @__PURE__ */ jsx(Collapsible.Trigger, {
12
+ "data-slot": "collapsible-trigger",
13
+ ...props
14
+ });
15
+ };
16
+ var CollapsibleContent = ({ ...props }) => {
17
+ return /* @__PURE__ */ jsx(Collapsible.Panel, {
18
+ "data-slot": "collapsible-content",
19
+ "data-focus": "inset",
20
+ ...props
21
+ });
22
+ };
23
+ //#endregion
24
+ export { Collapsible$1 as Collapsible, CollapsibleContent, CollapsibleTrigger };
25
+
26
+ //# sourceMappingURL=collapsible.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"collapsible.js","names":[],"sources":["../../../../../../../ui/src/components/ui/collapsible/collapsible.tsx"],"sourcesContent":["import { Collapsible as CollapsiblePrimitive } from '@base-ui/react/collapsible';\n\nexport const Collapsible = ({ ...props }: CollapsiblePrimitive.Root.Props) => {\n return <CollapsiblePrimitive.Root data-slot=\"collapsible\" {...props} />;\n};\n\nexport const CollapsibleTrigger = ({ ...props }: CollapsiblePrimitive.Trigger.Props) => {\n return <CollapsiblePrimitive.Trigger data-slot=\"collapsible-trigger\" {...props} />;\n};\n\nexport const CollapsibleContent = ({ ...props }: CollapsiblePrimitive.Panel.Props) => {\n return <CollapsiblePrimitive.Panel data-slot=\"collapsible-content\" data-focus=\"inset\" {...props} />;\n};\n"],"mappings":";;;AAEA,IAAa,iBAAe,EAAE,GAAG,YAA6C;CAC5E,OAAO,oBAAC,YAAqB,MAAtB;EAA2B,aAAU;EAAc,GAAI;CAAQ,CAAA;AACxE;AAEA,IAAa,sBAAsB,EAAE,GAAG,YAAgD;CACtF,OAAO,oBAAC,YAAqB,SAAtB;EAA8B,aAAU;EAAsB,GAAI;CAAQ,CAAA;AACnF;AAEA,IAAa,sBAAsB,EAAE,GAAG,YAA8C;CACpF,OAAO,oBAAC,YAAqB,OAAtB;EAA4B,aAAU;EAAsB,cAAW;EAAQ,GAAI;CAAQ,CAAA;AACpG"}
@@ -1,7 +1,11 @@
1
1
  import { Combobox as ComboboxPrimitive } from '@base-ui/react/combobox';
2
2
  import { ReactNode } from 'react';
3
3
  export declare const Combobox: <TValue>({ ...props }: ComboboxPrimitive.Root.Props<TValue>) => import('react').JSX.Element;
4
- export declare const ComboboxInput: ({ className, ...props }: ComboboxPrimitive.Input.Props) => import('react').JSX.Element;
4
+ export interface IComboboxInputProps extends ComboboxPrimitive.Input.Props {
5
+ /** The name of the chevron button that opens the list, for a screen reader and a voice command. Translate it with the rest of the page. */
6
+ triggerLabel?: string;
7
+ }
8
+ export declare const ComboboxInput: ({ className, triggerLabel, ...props }: IComboboxInputProps) => import('react').JSX.Element;
5
9
  export interface IComboboxContentProps extends Omit<ComboboxPrimitive.Popup.Props, 'children'> {
6
10
  /** Item nodes, or the Base UI function form `(item, index) => node` (requires `items` on the root). */
7
11
  children?: ComboboxPrimitive.List.Props['children'];
@@ -13,3 +17,13 @@ export interface IComboboxContentProps extends Omit<ComboboxPrimitive.Popup.Prop
13
17
  export declare const ComboboxContent: ({ className, children, empty, portalContainer, ...props }: IComboboxContentProps) => import('react').JSX.Element;
14
18
  export declare const ComboboxItem: ({ className, children, ...props }: ComboboxPrimitive.Item.Props) => import('react').JSX.Element;
15
19
  export declare const ComboboxEmpty: ({ className, children, ...props }: ComboboxPrimitive.Empty.Props) => import('react').JSX.Element;
20
+ /**
21
+ * A titled run of items. Put a `ComboboxLabel` first in it; with grouped `items` on the root, render the group's own items
22
+ * through `ComboboxCollection` (Base UI's grouped-items pattern), so a filter hides a group whose items all drop out.
23
+ */
24
+ export declare const ComboboxGroup: ({ ...props }: ComboboxPrimitive.Group.Props) => import('react').JSX.Element;
25
+ /** A group's heading, the same one Select and the menus draw. */
26
+ export declare const ComboboxLabel: ({ className, ...props }: ComboboxPrimitive.GroupLabel.Props) => import('react').JSX.Element;
27
+ /** The items of one group, for grouped `items` on the root. */
28
+ export declare const ComboboxCollection: ({ ...props }: ComboboxPrimitive.Collection.Props) => import('react').JSX.Element;
29
+ export declare const ComboboxSeparator: ({ className, ...props }: ComboboxPrimitive.Separator.Props) => import('react').JSX.Element;
@@ -0,0 +1,111 @@
1
+ import { cn } from "../../../lib/utils.js";
2
+ import { POPUP_FRAME_CLASS, POPUP_GROUP_LABEL_CLASS, POPUP_ITEM_INDICATOR_CLASS, POPUP_LAYER_CLASS, POPUP_LIST_WIDTH_CLASS, popupItemClass } from "../../../lib/popup-list.js";
3
+ import { PopupListScroll } from "../scroll-area/popup-list-scroll.js";
4
+ import { jsx, jsxs } from "react/jsx-runtime";
5
+ import { IconCheck, IconChevronDown } from "@tabler/icons-react";
6
+ import { Combobox } from "@base-ui/react/combobox";
7
+ //#region ../ui/src/components/ui/combobox/combobox.tsx
8
+ var Combobox$1 = ({ ...props }) => {
9
+ return /* @__PURE__ */ jsx(Combobox.Root, {
10
+ "data-slot": "combobox",
11
+ ...props
12
+ });
13
+ };
14
+ var ComboboxInput = ({ className, triggerLabel = "Show options", ...props }) => {
15
+ return /* @__PURE__ */ jsxs(Combobox.InputGroup, {
16
+ "data-slot": "combobox-input-group",
17
+ className: "relative flex w-full items-center",
18
+ children: [/* @__PURE__ */ jsx(Combobox.Input, {
19
+ "data-slot": "combobox-input",
20
+ className: cn("h-8 w-full min-w-0 rounded-lg border border-control bg-transparent px-2.5 py-1 pr-8 text-base transition-colors outline-none placeholder:text-muted-foreground disabled:pointer-events-none disabled:cursor-not-allowed disabled:bg-input/50 disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:disabled:bg-input/80 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40", className),
21
+ ...props
22
+ }), /* @__PURE__ */ jsx(Combobox.Trigger, {
23
+ "data-slot": "combobox-trigger",
24
+ className: "absolute right-1.75 flex size-6 items-center justify-center text-muted-foreground disabled:pointer-events-none disabled:opacity-50",
25
+ tabIndex: -1,
26
+ "aria-label": triggerLabel,
27
+ children: /* @__PURE__ */ jsx(IconChevronDown, { className: "size-4" })
28
+ })]
29
+ });
30
+ };
31
+ var ComboboxContent = ({ className, children, empty, portalContainer, ...props }) => {
32
+ return /* @__PURE__ */ jsx(Combobox.Portal, {
33
+ "data-slot": "combobox-portal",
34
+ container: portalContainer,
35
+ children: /* @__PURE__ */ jsx(Combobox.Positioner, {
36
+ "data-slot": "combobox-positioner",
37
+ sideOffset: 4,
38
+ align: "start",
39
+ className: POPUP_LAYER_CLASS,
40
+ children: /* @__PURE__ */ jsxs(Combobox.Popup, {
41
+ "data-slot": "combobox-content",
42
+ className: cn("flex max-h-(--available-height) flex-col overflow-hidden", POPUP_FRAME_CLASS, POPUP_LIST_WIDTH_CLASS, "motion-reduce:animate-none data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95", className),
43
+ ...props,
44
+ children: [/* @__PURE__ */ jsx(ComboboxEmpty, { children: empty }), /* @__PURE__ */ jsx(PopupListScroll, { children: /* @__PURE__ */ jsx(Combobox.List, {
45
+ "data-slot": "combobox-list",
46
+ className: "px-1",
47
+ children
48
+ }) })]
49
+ })
50
+ })
51
+ });
52
+ };
53
+ var ComboboxItem = ({ className, children, ...props }) => {
54
+ return /* @__PURE__ */ jsxs(Combobox.Item, {
55
+ "data-slot": "combobox-item",
56
+ className: cn(popupItemClass("base-ui", true), className),
57
+ ...props,
58
+ children: [/* @__PURE__ */ jsx("span", {
59
+ className: "flex-1",
60
+ children
61
+ }), /* @__PURE__ */ jsx(Combobox.ItemIndicator, {
62
+ "data-slot": "combobox-item-indicator",
63
+ className: POPUP_ITEM_INDICATOR_CLASS,
64
+ children: /* @__PURE__ */ jsx(IconCheck, { className: "size-3.5" })
65
+ })]
66
+ });
67
+ };
68
+ var ComboboxEmpty = ({ className, children, ...props }) => {
69
+ return /* @__PURE__ */ jsx(Combobox.Empty, {
70
+ "data-slot": "combobox-empty",
71
+ className: cn("py-4 text-center text-sm text-muted-foreground empty:py-0", className),
72
+ ...props,
73
+ children: children ?? "No results found."
74
+ });
75
+ };
76
+ /**
77
+ * A titled run of items. Put a `ComboboxLabel` first in it; with grouped `items` on the root, render the group's own items
78
+ * through `ComboboxCollection` (Base UI's grouped-items pattern), so a filter hides a group whose items all drop out.
79
+ */
80
+ var ComboboxGroup = ({ ...props }) => {
81
+ return /* @__PURE__ */ jsx(Combobox.Group, {
82
+ "data-slot": "combobox-group",
83
+ ...props
84
+ });
85
+ };
86
+ /** A group's heading, the same one Select and the menus draw. */
87
+ var ComboboxLabel = ({ className, ...props }) => {
88
+ return /* @__PURE__ */ jsx(Combobox.GroupLabel, {
89
+ "data-slot": "combobox-label",
90
+ className: cn(POPUP_GROUP_LABEL_CLASS, className),
91
+ ...props
92
+ });
93
+ };
94
+ /** The items of one group, for grouped `items` on the root. */
95
+ var ComboboxCollection = ({ ...props }) => {
96
+ return /* @__PURE__ */ jsx(Combobox.Collection, {
97
+ "data-slot": "combobox-collection",
98
+ ...props
99
+ });
100
+ };
101
+ var ComboboxSeparator = ({ className, ...props }) => {
102
+ return /* @__PURE__ */ jsx(Combobox.Separator, {
103
+ "data-slot": "combobox-separator",
104
+ className: cn("-mx-1 my-1 h-px bg-border", className),
105
+ ...props
106
+ });
107
+ };
108
+ //#endregion
109
+ export { Combobox$1 as Combobox, ComboboxCollection, ComboboxContent, ComboboxEmpty, ComboboxGroup, ComboboxInput, ComboboxItem, ComboboxLabel, ComboboxSeparator };
110
+
111
+ //# sourceMappingURL=combobox.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"combobox.js","names":[],"sources":["../../../../../../../ui/src/components/ui/combobox/combobox.tsx"],"sourcesContent":["import { Combobox as ComboboxPrimitive } from '@base-ui/react/combobox';\nimport {\n POPUP_FRAME_CLASS,\n POPUP_GROUP_LABEL_CLASS,\n POPUP_ITEM_INDICATOR_CLASS,\n POPUP_LAYER_CLASS,\n POPUP_LIST_WIDTH_CLASS,\n popupItemClass,\n} from '@edyn/ui/lib/popup-list';\nimport { cn } from '@edyn/ui/lib/utils';\nimport { IconCheck, IconChevronDown } from '@tabler/icons-react';\nimport type { ReactNode } from 'react';\nimport { PopupListScroll } from '../scroll-area';\n\nexport const Combobox = <TValue,>({ ...props }: ComboboxPrimitive.Root.Props<TValue>) => {\n return <ComboboxPrimitive.Root data-slot=\"combobox\" {...props} />;\n};\n\nexport interface IComboboxInputProps extends ComboboxPrimitive.Input.Props {\n /** The name of the chevron button that opens the list, for a screen reader and a voice command. Translate it with the rest of the page. */\n triggerLabel?: string;\n}\n\nexport const ComboboxInput = ({ className, triggerLabel = 'Show options', ...props }: IComboboxInputProps) => {\n return (\n <ComboboxPrimitive.InputGroup data-slot=\"combobox-input-group\" className=\"relative flex w-full items-center\">\n <ComboboxPrimitive.Input\n data-slot=\"combobox-input\"\n className={cn(\n 'h-8 w-full min-w-0 rounded-lg border border-control bg-transparent px-2.5 py-1 pr-8 text-base transition-colors outline-none placeholder:text-muted-foreground disabled:pointer-events-none disabled:cursor-not-allowed disabled:bg-input/50 disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:disabled:bg-input/80 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40',\n className,\n )}\n {...props}\n />\n <ComboboxPrimitive.Trigger\n data-slot=\"combobox-trigger\"\n // A 24px target (WCAG 2.5.8) around the 16px chevron, which stays 11px from the end of the field: 7px and the 4px each side.\n className=\"absolute right-1.75 flex size-6 items-center justify-center text-muted-foreground disabled:pointer-events-none disabled:opacity-50\"\n tabIndex={-1}\n aria-label={triggerLabel}\n >\n <IconChevronDown className=\"size-4\" />\n </ComboboxPrimitive.Trigger>\n </ComboboxPrimitive.InputGroup>\n );\n};\n\nexport interface IComboboxContentProps extends Omit<ComboboxPrimitive.Popup.Props, 'children'> {\n /** Item nodes, or the Base UI function form `(item, index) => node` (requires `items` on the root). */\n children?: ComboboxPrimitive.List.Props['children'];\n /** Empty-state content; rendered (with the default text) only when the filtered list is empty. */\n empty?: ReactNode;\n /** Optional portal destination, used by shadow-DOM element wrappers. */\n portalContainer?: ComboboxPrimitive.Portal.Props['container'];\n}\n\nexport const ComboboxContent = ({ className, children, empty, portalContainer, ...props }: IComboboxContentProps) => {\n return (\n <ComboboxPrimitive.Portal data-slot=\"combobox-portal\" container={portalContainer}>\n <ComboboxPrimitive.Positioner data-slot=\"combobox-positioner\" sideOffset={4} align=\"start\" className={POPUP_LAYER_CLASS}>\n <ComboboxPrimitive.Popup\n data-slot=\"combobox-content\"\n className={cn(\n 'flex max-h-(--available-height) flex-col overflow-hidden',\n POPUP_FRAME_CLASS,\n POPUP_LIST_WIDTH_CLASS,\n 'motion-reduce:animate-none data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95',\n className,\n )}\n {...props}\n >\n <ComboboxEmpty>{empty}</ComboboxEmpty>\n {/* The ScrollArea, not the List, is the scroll container: a filtered list\n that runs past the fold needs a bar and a fade to say so. Base UI\n keeps the highlighted item in view through the nearest scrollable\n ancestor, which is now the viewport. POPUP_LIST_HEIGHT_CLASS ends\n the list on a whole row. */}\n <PopupListScroll>\n <ComboboxPrimitive.List data-slot=\"combobox-list\" className=\"px-1\">\n {children}\n </ComboboxPrimitive.List>\n </PopupListScroll>\n </ComboboxPrimitive.Popup>\n </ComboboxPrimitive.Positioner>\n </ComboboxPrimitive.Portal>\n );\n};\n\nexport const ComboboxItem = ({ className, children, ...props }: ComboboxPrimitive.Item.Props) => {\n return (\n <ComboboxPrimitive.Item data-slot=\"combobox-item\" className={cn(popupItemClass('base-ui', true), className)} {...props}>\n <span className=\"flex-1\">{children}</span>\n <ComboboxPrimitive.ItemIndicator data-slot=\"combobox-item-indicator\" className={POPUP_ITEM_INDICATOR_CLASS}>\n <IconCheck className=\"size-3.5\" />\n </ComboboxPrimitive.ItemIndicator>\n </ComboboxPrimitive.Item>\n );\n};\n\nexport const ComboboxEmpty = ({ className, children, ...props }: ComboboxPrimitive.Empty.Props) => {\n return (\n <ComboboxPrimitive.Empty\n data-slot=\"combobox-empty\"\n // empty:py-0 collapses the padding while the list has results: Base UI\n // keeps this status element mounted and only fills it when the list is\n // empty (and only when the root has `items` to derive emptiness from).\n className={cn('py-4 text-center text-sm text-muted-foreground empty:py-0', className)}\n {...props}\n >\n {children ?? 'No results found.'}\n </ComboboxPrimitive.Empty>\n );\n};\n\n/**\n * A titled run of items. Put a `ComboboxLabel` first in it; with grouped `items` on the root, render the group's own items\n * through `ComboboxCollection` (Base UI's grouped-items pattern), so a filter hides a group whose items all drop out.\n */\nexport const ComboboxGroup = ({ ...props }: ComboboxPrimitive.Group.Props) => {\n return <ComboboxPrimitive.Group data-slot=\"combobox-group\" {...props} />;\n};\n\n/** A group's heading, the same one Select and the menus draw. */\nexport const ComboboxLabel = ({ className, ...props }: ComboboxPrimitive.GroupLabel.Props) => {\n return <ComboboxPrimitive.GroupLabel data-slot=\"combobox-label\" className={cn(POPUP_GROUP_LABEL_CLASS, className)} {...props} />;\n};\n\n/** The items of one group, for grouped `items` on the root. */\nexport const ComboboxCollection = ({ ...props }: ComboboxPrimitive.Collection.Props) => {\n return <ComboboxPrimitive.Collection data-slot=\"combobox-collection\" {...props} />;\n};\n\nexport const ComboboxSeparator = ({ className, ...props }: ComboboxPrimitive.Separator.Props) => {\n return <ComboboxPrimitive.Separator data-slot=\"combobox-separator\" className={cn('-mx-1 my-1 h-px bg-border', className)} {...props} />;\n};\n"],"mappings":";;;;;;;AAcA,IAAa,cAAqB,EAAE,GAAG,YAAkD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W;GAC9E,UAAA,oBAAC,WAAD,EAAW,WAAU,WAAY,CAAA;EACF,CAAA,CACX;;AAE5B;AAEA,IAAa,iBAAiB,EAAE,WAAW,UAAU,GAAG,YAA2C;CACjG,OACE,oBAAC,SAAkB,OAAnB;EACE,aAAU;EAIV,WAAW,GAAG,6DAA6D,SAAS;EACpF,GAAI;EAEH,UAAA,YAAY;CACU,CAAA;AAE7B;;;;;AAMA,IAAa,iBAAiB,EAAE,GAAG,YAA2C;CAC5E,OAAO,oBAAC,SAAkB,OAAnB;EAAyB,aAAU;EAAiB,GAAI;CAAQ,CAAA;AACzE;;AAGA,IAAa,iBAAiB,EAAE,WAAW,GAAG,YAAgD;CAC5F,OAAO,oBAAC,SAAkB,YAAnB;EAA8B,aAAU;EAAiB,WAAW,GAAG,yBAAyB,SAAS;EAAG,GAAI;CAAQ,CAAA;AACjI;;AAGA,IAAa,sBAAsB,EAAE,GAAG,YAAgD;CACtF,OAAO,oBAAC,SAAkB,YAAnB;EAA8B,aAAU;EAAsB,GAAI;CAAQ,CAAA;AACnF;AAEA,IAAa,qBAAqB,EAAE,WAAW,GAAG,YAA+C;CAC/F,OAAO,oBAAC,SAAkB,WAAnB;EAA6B,aAAU;EAAqB,WAAW,GAAG,6BAA6B,SAAS;EAAG,GAAI;CAAQ,CAAA;AACxI"}
@@ -10,7 +10,23 @@ export declare const CommandDialog: ({ title, description, children, className,
10
10
  children: React.ReactNode;
11
11
  }) => React.JSX.Element;
12
12
  export declare const CommandInput: ({ className, ...props }: React.ComponentProps<typeof CommandPrimitive.Input>) => React.JSX.Element;
13
- export declare const CommandList: ({ className, ...props }: React.ComponentProps<typeof CommandPrimitive.List>) => React.JSX.Element;
13
+ /**
14
+ * The palette's results list. The scroll container is the DS ScrollArea rather
15
+ * than the primitive's own `overflow-y-auto`, because a list of results that
16
+ * continues past the fold with no bar and no fade reads as a complete list. The
17
+ * cap stays overridable: `cn` lets a caller's own `max-h-*` replace the default.
18
+ *
19
+ * The ScrollArea wraps the list from OUTSIDE rather than lining it: cmdk's list
20
+ * carries `role="listbox"`, and a listbox may not contain presentation wrappers
21
+ * (axe flags that as a critical aria-required-children violation). The options
22
+ * have to stay direct children of the element that holds the role.
23
+ *
24
+ * cmdk keeps the active item in view with `scrollIntoView({ block: 'nearest' })`
25
+ * on the item, which acts on the nearest scrollable ancestor, so that keeps
26
+ * working now that the viewport is the one that scrolls. `scroll-py-1` goes on
27
+ * the viewport for the same reason: it is what pads that scroll.
28
+ */
29
+ export declare const CommandList: ({ className, children, ...props }: React.ComponentProps<typeof CommandPrimitive.List>) => React.JSX.Element;
14
30
  export declare const CommandEmpty: ({ className, ...props }: React.ComponentProps<typeof CommandPrimitive.Empty>) => React.JSX.Element;
15
31
  export declare const CommandGroup: ({ className, ...props }: React.ComponentProps<typeof CommandPrimitive.Group>) => React.JSX.Element;
16
32
  export declare const CommandSeparator: ({ className, ...props }: React.ComponentProps<typeof CommandPrimitive.Separator>) => React.JSX.Element;