@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,171 @@
1
+ "use client";
2
+ import { cn } from "../../../lib/utils.js";
3
+ import { buttonVariants } from "../button/button.js";
4
+ import { jsx, jsxs } from "react/jsx-runtime";
5
+ import { IconCheck } from "@tabler/icons-react";
6
+ import { Questionnaire } from "@shadcn/react/questionnaire";
7
+ //#region ../ui/src/components/ui/questionnaire/questionnaire.tsx
8
+ var Questionnaire$1 = ({ className, ...props }) => {
9
+ return /* @__PURE__ */ jsx(Questionnaire.Root, {
10
+ "data-slot": "questionnaire",
11
+ className: cn("flex w-full min-w-0 flex-col gap-4", className),
12
+ ...props
13
+ });
14
+ };
15
+ var QuestionnaireProgress = ({ className, ...props }) => {
16
+ return /* @__PURE__ */ jsx(Questionnaire.Progress, {
17
+ "data-slot": "questionnaire-progress",
18
+ className: cn("min-h-[1lh] w-fit min-w-[14ch] text-xs font-medium text-muted-foreground tabular-nums", className),
19
+ ...props
20
+ });
21
+ };
22
+ var QuestionnaireItem = ({ className, ...props }) => {
23
+ return /* @__PURE__ */ jsx(Questionnaire.Item, {
24
+ "data-slot": "questionnaire-item",
25
+ className: cn("flex min-w-0 flex-col gap-4 border-0 p-0 outline-none", className),
26
+ ...props
27
+ });
28
+ };
29
+ var QuestionnaireTitle = ({ className, ...props }) => {
30
+ return /* @__PURE__ */ jsx(Questionnaire.Title, {
31
+ "data-slot": "questionnaire-title",
32
+ className: cn("font-heading text-base leading-snug font-medium text-pretty [&:not(:has(~[data-slot=questionnaire-description]))]:mb-4", className),
33
+ ...props
34
+ });
35
+ };
36
+ var QuestionnaireDescription = ({ className, ...props }) => {
37
+ return /* @__PURE__ */ jsx(Questionnaire.Description, {
38
+ "data-slot": "questionnaire-description",
39
+ className: cn("text-sm text-pretty text-muted-foreground", className),
40
+ ...props
41
+ });
42
+ };
43
+ var QuestionnaireChoices = ({ className, ...props }) => {
44
+ return /* @__PURE__ */ jsx(Questionnaire.Choices, {
45
+ "data-slot": "questionnaire-choices",
46
+ className: cn("group/questionnaire-choices grid min-w-0 gap-2", className),
47
+ ...props
48
+ });
49
+ };
50
+ var QuestionnaireChoice = ({ children, className, ...props }) => {
51
+ return /* @__PURE__ */ jsxs(Questionnaire.Choice, {
52
+ "data-slot": "questionnaire-choice",
53
+ className: cn("group/questionnaire-choice relative flex min-h-11 cursor-pointer items-start gap-2.5 rounded-lg border border-control bg-transparent px-3 py-2.5 text-start text-sm transition-colors outline-none select-none hover:bg-muted/50 has-[>input:focus-visible]:border-ring has-[>input:focus-visible]:ring-3 has-[>input:focus-visible]:ring-ring/50 data-invalid:border-destructive dark:bg-input/20 data-checked:border-primary/40 data-checked:bg-muted dark:data-checked:bg-muted", "data-disabled:pointer-events-none data-disabled:cursor-not-allowed data-disabled:opacity-50", className),
54
+ ...props,
55
+ children: [
56
+ /* @__PURE__ */ jsx(Questionnaire.ChoiceInput, {
57
+ "data-slot": "questionnaire-choice-input",
58
+ className: "absolute inset-0 z-10 size-full cursor-pointer opacity-0"
59
+ }),
60
+ /* @__PURE__ */ jsxs("span", {
61
+ "aria-hidden": "true",
62
+ "data-slot": "questionnaire-choice-indicator",
63
+ className: "pointer-events-none relative flex size-4 shrink-0 translate-y-[--spacing(0.45)] items-center justify-center rounded-[4px] border border-control group-has-data-[slot=questionnaire-choice-description]/questionnaire-choice:translate-y-0.5 group-data-[type=radio]/questionnaire-choice:rounded-full group-data-checked/questionnaire-choice:border-primary group-data-checked/questionnaire-choice:bg-primary group-data-checked/questionnaire-choice:text-primary-foreground dark:bg-input/30 dark:group-data-checked/questionnaire-choice:bg-primary",
64
+ children: [/* @__PURE__ */ jsx("span", {
65
+ "data-slot": "questionnaire-choice-indicator-dot",
66
+ className: "hidden size-2 rounded-full bg-primary-foreground group-data-[type=checkbox]/questionnaire-choice:hidden group-data-checked/questionnaire-choice:block"
67
+ }), /* @__PURE__ */ jsx(IconCheck, {
68
+ "data-slot": "questionnaire-choice-indicator-check",
69
+ className: "hidden size-3.5 group-data-[type=radio]/questionnaire-choice:hidden group-data-checked/questionnaire-choice:block"
70
+ })]
71
+ }),
72
+ /* @__PURE__ */ jsx(Questionnaire.ChoiceLabel, {
73
+ "data-slot": "questionnaire-choice-label",
74
+ className: "flex min-w-0 flex-1 flex-col gap-0.5 leading-snug",
75
+ children
76
+ }),
77
+ /* @__PURE__ */ jsx(Questionnaire.ChoiceShortcut, {
78
+ "data-slot": "questionnaire-choice-shortcut",
79
+ className: "pointer-events-none ms-auto hidden size-5 shrink-0 translate-y-[--spacing(0.45)] items-center justify-center rounded-md border border-control bg-background font-mono text-[0.625rem] leading-none font-medium text-muted-foreground group-has-data-[slot=questionnaire-choice-description]/questionnaire-choice:translate-y-0.5 group-data-[shortcut]/questionnaire-choice:inline-flex"
80
+ })
81
+ ]
82
+ });
83
+ };
84
+ var QuestionnaireChoiceDescription = ({ className, ...props }) => {
85
+ return /* @__PURE__ */ jsx("span", {
86
+ "data-slot": "questionnaire-choice-description",
87
+ className: cn("text-muted-foreground", className),
88
+ ...props
89
+ });
90
+ };
91
+ var QuestionnaireInput = ({ className, ...props }) => {
92
+ return /* @__PURE__ */ jsx("div", {
93
+ "data-slot": "questionnaire-input-wrapper",
94
+ className: "group/questionnaire-input relative w-full min-w-0",
95
+ children: /* @__PURE__ */ jsx(Questionnaire.Input, {
96
+ "data-slot": "questionnaire-input",
97
+ className: cn("h-8 min-h-11 w-full min-w-0 rounded-lg border border-control bg-transparent px-2.5 py-1 text-base transition-[color,box-shadow,background-color] outline-none 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 sm:min-h-0 md:text-sm dark:bg-input/30 dark:disabled:bg-input/80 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40", "selection:bg-primary selection:text-primary-foreground placeholder:text-muted-foreground", className),
98
+ ...props
99
+ })
100
+ });
101
+ };
102
+ var QuestionnaireError = ({ className, ...props }) => {
103
+ return /* @__PURE__ */ jsx(Questionnaire.Error, {
104
+ "data-slot": "questionnaire-error",
105
+ className: cn("mt-2 text-sm text-destructive", className),
106
+ ...props
107
+ });
108
+ };
109
+ var QuestionnaireActions = ({ className, ...props }) => {
110
+ return /* @__PURE__ */ jsx("div", {
111
+ "data-slot": "questionnaire-actions",
112
+ className: cn("grid min-h-11 w-full grid-cols-[minmax(0,1fr)_auto_auto] items-center gap-2 sm:min-h-8", className),
113
+ ...props
114
+ });
115
+ };
116
+ var QuestionnairePrevious = ({ children, className, size = "default", variant = "outline", ...props }) => {
117
+ return /* @__PURE__ */ jsx(Questionnaire.Previous, {
118
+ "data-slot": "questionnaire-previous",
119
+ "data-size": size,
120
+ "data-variant": variant,
121
+ className: cn(buttonVariants({
122
+ size,
123
+ variant
124
+ }), "col-start-1 row-start-1 min-h-11 justify-self-start sm:min-h-0", className),
125
+ ...props,
126
+ children: children ?? "Previous"
127
+ });
128
+ };
129
+ var QuestionnaireSkip = ({ children, className, size = "default", variant = "outline", ...props }) => {
130
+ return /* @__PURE__ */ jsx(Questionnaire.Skip, {
131
+ "data-slot": "questionnaire-skip",
132
+ "data-size": size,
133
+ "data-variant": variant,
134
+ className: cn(buttonVariants({
135
+ size,
136
+ variant
137
+ }), "col-start-2 row-start-1 min-h-11 justify-self-end sm:min-h-0", className),
138
+ ...props,
139
+ children: children ?? "Skip"
140
+ });
141
+ };
142
+ var QuestionnaireNext = ({ children, className, size = "default", variant = "default", ...props }) => {
143
+ return /* @__PURE__ */ jsx(Questionnaire.Next, {
144
+ "data-slot": "questionnaire-next",
145
+ "data-size": size,
146
+ "data-variant": variant,
147
+ className: cn(buttonVariants({
148
+ size,
149
+ variant
150
+ }), "col-start-3 row-start-1 min-h-11 justify-self-end sm:min-h-0", className),
151
+ ...props,
152
+ children: children ?? "Next"
153
+ });
154
+ };
155
+ var QuestionnaireSubmit = ({ children, className, size = "default", variant = "default", ...props }) => {
156
+ return /* @__PURE__ */ jsx(Questionnaire.Submit, {
157
+ "data-slot": "questionnaire-submit",
158
+ "data-size": size,
159
+ "data-variant": variant,
160
+ className: cn(buttonVariants({
161
+ size,
162
+ variant
163
+ }), "col-start-3 row-start-1 min-h-11 justify-self-end sm:min-h-0", className),
164
+ ...props,
165
+ children: children ?? "Submit"
166
+ });
167
+ };
168
+ //#endregion
169
+ export { Questionnaire$1 as Questionnaire, QuestionnaireActions, QuestionnaireChoice, QuestionnaireChoiceDescription, QuestionnaireChoices, QuestionnaireDescription, QuestionnaireError, QuestionnaireInput, QuestionnaireItem, QuestionnaireNext, QuestionnairePrevious, QuestionnaireProgress, QuestionnaireSkip, QuestionnaireSubmit, QuestionnaireTitle };
170
+
171
+ //# sourceMappingURL=questionnaire.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"questionnaire.js","names":[],"sources":["../../../../../../../ui/src/components/ui/questionnaire/questionnaire.tsx"],"sourcesContent":["'use client';\n\nimport { cn } from '@edyn/ui/lib/utils';\nimport { Questionnaire as QuestionnairePrimitive } from '@shadcn/react/questionnaire';\nimport { IconCheck } from '@tabler/icons-react';\nimport type * as React from 'react';\nimport { type Button, buttonVariants } from '../button';\n\nexport const Questionnaire = ({ className, ...props }: React.ComponentProps<typeof QuestionnairePrimitive.Root>) => {\n return <QuestionnairePrimitive.Root data-slot=\"questionnaire\" className={cn('flex w-full min-w-0 flex-col gap-4', className)} {...props} />;\n};\n\nexport const QuestionnaireProgress = ({ className, ...props }: React.ComponentProps<typeof QuestionnairePrimitive.Progress>) => {\n return (\n <QuestionnairePrimitive.Progress\n data-slot=\"questionnaire-progress\"\n className={cn('min-h-[1lh] w-fit min-w-[14ch] text-xs font-medium text-muted-foreground tabular-nums', className)}\n {...props}\n />\n );\n};\n\nexport const QuestionnaireItem = ({ className, ...props }: React.ComponentProps<typeof QuestionnairePrimitive.Item>) => {\n return (\n <QuestionnairePrimitive.Item\n data-slot=\"questionnaire-item\"\n className={cn('flex min-w-0 flex-col gap-4 border-0 p-0 outline-none', className)}\n {...props}\n />\n );\n};\n\nexport const QuestionnaireTitle = ({ className, ...props }: React.ComponentProps<typeof QuestionnairePrimitive.Title>) => {\n return (\n <QuestionnairePrimitive.Title\n data-slot=\"questionnaire-title\"\n className={cn(\n 'font-heading text-base leading-snug font-medium text-pretty [&:not(:has(~[data-slot=questionnaire-description]))]:mb-4',\n className,\n )}\n {...props}\n />\n );\n};\n\nexport const QuestionnaireDescription = ({ className, ...props }: React.ComponentProps<typeof QuestionnairePrimitive.Description>) => {\n return (\n <QuestionnairePrimitive.Description\n data-slot=\"questionnaire-description\"\n className={cn('text-sm text-pretty text-muted-foreground', className)}\n {...props}\n />\n );\n};\n\nexport const QuestionnaireChoices = ({ className, ...props }: React.ComponentProps<typeof QuestionnairePrimitive.Choices>) => {\n return (\n <QuestionnairePrimitive.Choices\n data-slot=\"questionnaire-choices\"\n className={cn('group/questionnaire-choices grid min-w-0 gap-2', className)}\n {...props}\n />\n );\n};\n\nexport const QuestionnaireChoice = ({ children, className, ...props }: React.ComponentProps<typeof QuestionnairePrimitive.Choice>) => {\n return (\n <QuestionnairePrimitive.Choice\n data-slot=\"questionnaire-choice\"\n className={cn(\n 'group/questionnaire-choice relative flex min-h-11 cursor-pointer items-start gap-2.5 rounded-lg border border-control bg-transparent px-3 py-2.5 text-start text-sm transition-colors outline-none select-none hover:bg-muted/50 has-[>input:focus-visible]:border-ring has-[>input:focus-visible]:ring-3 has-[>input:focus-visible]:ring-ring/50 data-invalid:border-destructive dark:bg-input/20 data-checked:border-primary/40 data-checked:bg-muted dark:data-checked:bg-muted',\n 'data-disabled:pointer-events-none data-disabled:cursor-not-allowed data-disabled:opacity-50',\n className,\n )}\n {...props}\n >\n <QuestionnairePrimitive.ChoiceInput\n data-slot=\"questionnaire-choice-input\"\n className=\"absolute inset-0 z-10 size-full cursor-pointer opacity-0\"\n />\n <span\n aria-hidden=\"true\"\n data-slot=\"questionnaire-choice-indicator\"\n className=\"pointer-events-none relative flex size-4 shrink-0 translate-y-[--spacing(0.45)] items-center justify-center rounded-[4px] border border-control group-has-data-[slot=questionnaire-choice-description]/questionnaire-choice:translate-y-0.5 group-data-[type=radio]/questionnaire-choice:rounded-full group-data-checked/questionnaire-choice:border-primary group-data-checked/questionnaire-choice:bg-primary group-data-checked/questionnaire-choice:text-primary-foreground dark:bg-input/30 dark:group-data-checked/questionnaire-choice:bg-primary\"\n >\n <span\n data-slot=\"questionnaire-choice-indicator-dot\"\n className=\"hidden size-2 rounded-full bg-primary-foreground group-data-[type=checkbox]/questionnaire-choice:hidden group-data-checked/questionnaire-choice:block\"\n />\n <IconCheck\n data-slot=\"questionnaire-choice-indicator-check\"\n className=\"hidden size-3.5 group-data-[type=radio]/questionnaire-choice:hidden group-data-checked/questionnaire-choice:block\"\n />\n </span>\n <QuestionnairePrimitive.ChoiceLabel data-slot=\"questionnaire-choice-label\" className=\"flex min-w-0 flex-1 flex-col gap-0.5 leading-snug\">\n {children}\n </QuestionnairePrimitive.ChoiceLabel>\n <QuestionnairePrimitive.ChoiceShortcut\n data-slot=\"questionnaire-choice-shortcut\"\n className=\"pointer-events-none ms-auto hidden size-5 shrink-0 translate-y-[--spacing(0.45)] items-center justify-center rounded-md border border-control bg-background font-mono text-[0.625rem] leading-none font-medium text-muted-foreground group-has-data-[slot=questionnaire-choice-description]/questionnaire-choice:translate-y-0.5 group-data-[shortcut]/questionnaire-choice:inline-flex\"\n />\n </QuestionnairePrimitive.Choice>\n );\n};\n\nexport const QuestionnaireChoiceDescription = ({ className, ...props }: React.ComponentProps<'span'>) => {\n return <span data-slot=\"questionnaire-choice-description\" className={cn('text-muted-foreground', className)} {...props} />;\n};\n\nexport const QuestionnaireInput = ({ className, ...props }: React.ComponentProps<typeof QuestionnairePrimitive.Input>) => {\n return (\n <div data-slot=\"questionnaire-input-wrapper\" className=\"group/questionnaire-input relative w-full min-w-0\">\n <QuestionnairePrimitive.Input\n data-slot=\"questionnaire-input\"\n className={cn(\n 'h-8 min-h-11 w-full min-w-0 rounded-lg border border-control bg-transparent px-2.5 py-1 text-base transition-[color,box-shadow,background-color] outline-none 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 sm:min-h-0 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 'selection:bg-primary selection:text-primary-foreground placeholder:text-muted-foreground',\n className,\n )}\n {...props}\n />\n </div>\n );\n};\n\nexport const QuestionnaireError = ({ className, ...props }: React.ComponentProps<typeof QuestionnairePrimitive.Error>) => {\n return <QuestionnairePrimitive.Error data-slot=\"questionnaire-error\" className={cn('mt-2 text-sm text-destructive', className)} {...props} />;\n};\n\nexport const QuestionnaireActions = ({ className, ...props }: React.ComponentProps<'div'>) => {\n return (\n <div\n data-slot=\"questionnaire-actions\"\n className={cn('grid min-h-11 w-full grid-cols-[minmax(0,1fr)_auto_auto] items-center gap-2 sm:min-h-8', className)}\n {...props}\n />\n );\n};\n\nexport const QuestionnairePrevious = ({\n children,\n className,\n size = 'default',\n variant = 'outline',\n ...props\n}: React.ComponentProps<typeof QuestionnairePrimitive.Previous> & Pick<React.ComponentProps<typeof Button>, 'size' | 'variant'>) => {\n return (\n <QuestionnairePrimitive.Previous\n data-slot=\"questionnaire-previous\"\n data-size={size}\n data-variant={variant}\n className={cn(buttonVariants({ size, variant }), 'col-start-1 row-start-1 min-h-11 justify-self-start sm:min-h-0', className)}\n {...props}\n >\n {children ?? 'Previous'}\n </QuestionnairePrimitive.Previous>\n );\n};\n\nexport const QuestionnaireSkip = ({\n children,\n className,\n size = 'default',\n variant = 'outline',\n ...props\n}: React.ComponentProps<typeof QuestionnairePrimitive.Skip> & Pick<React.ComponentProps<typeof Button>, 'size' | 'variant'>) => {\n return (\n <QuestionnairePrimitive.Skip\n data-slot=\"questionnaire-skip\"\n data-size={size}\n data-variant={variant}\n className={cn(buttonVariants({ size, variant }), 'col-start-2 row-start-1 min-h-11 justify-self-end sm:min-h-0', className)}\n {...props}\n >\n {children ?? 'Skip'}\n </QuestionnairePrimitive.Skip>\n );\n};\n\nexport const QuestionnaireNext = ({\n children,\n className,\n size = 'default',\n variant = 'default',\n ...props\n}: React.ComponentProps<typeof QuestionnairePrimitive.Next> & Pick<React.ComponentProps<typeof Button>, 'size' | 'variant'>) => {\n return (\n <QuestionnairePrimitive.Next\n data-slot=\"questionnaire-next\"\n data-size={size}\n data-variant={variant}\n className={cn(buttonVariants({ size, variant }), 'col-start-3 row-start-1 min-h-11 justify-self-end sm:min-h-0', className)}\n {...props}\n >\n {children ?? 'Next'}\n </QuestionnairePrimitive.Next>\n );\n};\n\nexport const QuestionnaireSubmit = ({\n children,\n className,\n size = 'default',\n variant = 'default',\n ...props\n}: React.ComponentProps<typeof QuestionnairePrimitive.Submit> & Pick<React.ComponentProps<typeof Button>, 'size' | 'variant'>) => {\n return (\n <QuestionnairePrimitive.Submit\n data-slot=\"questionnaire-submit\"\n data-size={size}\n data-variant={variant}\n className={cn(buttonVariants({ size, variant }), 'col-start-3 row-start-1 min-h-11 justify-self-end sm:min-h-0', className)}\n {...props}\n >\n {children ?? 'Submit'}\n </QuestionnairePrimitive.Submit>\n );\n};\n"],"mappings":";;;;;;;AAQA,IAAa,mBAAiB,EAAE,WAAW,GAAG,YAAsE;CAClH,OAAO,oBAAC,cAAuB,MAAxB;EAA6B,aAAU;EAAgB,WAAW,GAAG,sCAAsC,SAAS;EAAG,GAAI;CAAQ,CAAA;AAC5I;AAEA,IAAa,yBAAyB,EAAE,WAAW,GAAG,YAA0E;CAC9H,OACE,oBAAC,cAAuB,UAAxB;EACE,aAAU;EACV,WAAW,GAAG,yFAAyF,SAAS;EAChH,GAAI;CACL,CAAA;AAEL;AAEA,IAAa,qBAAqB,EAAE,WAAW,GAAG,YAAsE;CACtH,OACE,oBAAC,cAAuB,MAAxB;EACE,aAAU;EACV,WAAW,GAAG,yDAAyD,SAAS;EAChF,GAAI;CACL,CAAA;AAEL;AAEA,IAAa,sBAAsB,EAAE,WAAW,GAAG,YAAuE;CACxH,OACE,oBAAC,cAAuB,OAAxB;EACE,aAAU;EACV,WAAW,GACT,0HACA,SACF;EACA,GAAI;CACL,CAAA;AAEL;AAEA,IAAa,4BAA4B,EAAE,WAAW,GAAG,YAA6E;CACpI,OACE,oBAAC,cAAuB,aAAxB;EACE,aAAU;EACV,WAAW,GAAG,6CAA6C,SAAS;EACpE,GAAI;CACL,CAAA;AAEL;AAEA,IAAa,wBAAwB,EAAE,WAAW,GAAG,YAAyE;CAC5H,OACE,oBAAC,cAAuB,SAAxB;EACE,aAAU;EACV,WAAW,GAAG,kDAAkD,SAAS;EACzE,GAAI;CACL,CAAA;AAEL;AAEA,IAAa,uBAAuB,EAAE,UAAU,WAAW,GAAG,YAAwE;CACpI,OACE,qBAAC,cAAuB,QAAxB;EACE,aAAU;EACV,WAAW,GACT,sdACA,+FACA,SACF;EACA,GAAI;EAPN,UAAA;GASE,oBAAC,cAAuB,aAAxB;IACE,aAAU;IACV,WAAU;GACX,CAAA;GACD,qBAAC,QAAD;IACE,eAAY;IACZ,aAAU;IACV,WAAU;IAHZ,UAAA,CAKE,oBAAC,QAAD;KACE,aAAU;KACV,WAAU;IACX,CAAA,GACD,oBAAC,WAAD;KACE,aAAU;KACV,WAAU;IACX,CAAA,CACG;;GACN,oBAAC,cAAuB,aAAxB;IAAoC,aAAU;IAA6B,WAAU;IAClF;GACiC,CAAA;GACpC,oBAAC,cAAuB,gBAAxB;IACE,aAAU;IACV,WAAU;GACX,CAAA;EAC4B;;AAEnC;AAEA,IAAa,kCAAkC,EAAE,WAAW,GAAG,YAA0C;CACvG,OAAO,oBAAC,QAAD;EAAM,aAAU;EAAmC,WAAW,GAAG,yBAAyB,SAAS;EAAG,GAAI;CAAQ,CAAA;AAC3H;AAEA,IAAa,sBAAsB,EAAE,WAAW,GAAG,YAAuE;CACxH,OACE,oBAAC,OAAD;EAAK,aAAU;EAA8B,WAAU;EACrD,UAAA,oBAAC,cAAuB,OAAxB;GACE,aAAU;GACV,WAAW,GACT,ueACA,4FACA,SACF;GACA,GAAI;EACL,CAAA;CACE,CAAA;AAET;AAEA,IAAa,sBAAsB,EAAE,WAAW,GAAG,YAAuE;CACxH,OAAO,oBAAC,cAAuB,OAAxB;EAA8B,aAAU;EAAsB,WAAW,GAAG,iCAAiC,SAAS;EAAG,GAAI;CAAQ,CAAA;AAC9I;AAEA,IAAa,wBAAwB,EAAE,WAAW,GAAG,YAAyC;CAC5F,OACE,oBAAC,OAAD;EACE,aAAU;EACV,WAAW,GAAG,0FAA0F,SAAS;EACjH,GAAI;CACL,CAAA;AAEL;AAEA,IAAa,yBAAyB,EACpC,UACA,WACA,OAAO,WACP,UAAU,WACV,GAAG,YAC+H;CAClI,OACE,oBAAC,cAAuB,UAAxB;EACE,aAAU;EACV,aAAW;EACX,gBAAc;EACd,WAAW,GAAG,eAAe;GAAE;GAAM;EAAQ,CAAC,GAAG,kEAAkE,SAAS;EAC5H,GAAI;EAEH,UAAA,YAAY;CACkB,CAAA;AAErC;AAEA,IAAa,qBAAqB,EAChC,UACA,WACA,OAAO,WACP,UAAU,WACV,GAAG,YAC2H;CAC9H,OACE,oBAAC,cAAuB,MAAxB;EACE,aAAU;EACV,aAAW;EACX,gBAAc;EACd,WAAW,GAAG,eAAe;GAAE;GAAM;EAAQ,CAAC,GAAG,gEAAgE,SAAS;EAC1H,GAAI;EAEH,UAAA,YAAY;CACc,CAAA;AAEjC;AAEA,IAAa,qBAAqB,EAChC,UACA,WACA,OAAO,WACP,UAAU,WACV,GAAG,YAC2H;CAC9H,OACE,oBAAC,cAAuB,MAAxB;EACE,aAAU;EACV,aAAW;EACX,gBAAc;EACd,WAAW,GAAG,eAAe;GAAE;GAAM;EAAQ,CAAC,GAAG,gEAAgE,SAAS;EAC1H,GAAI;EAEH,UAAA,YAAY;CACc,CAAA;AAEjC;AAEA,IAAa,uBAAuB,EAClC,UACA,WACA,OAAO,WACP,UAAU,WACV,GAAG,YAC6H;CAChI,OACE,oBAAC,cAAuB,QAAxB;EACE,aAAU;EACV,aAAW;EACX,gBAAc;EACd,WAAW,GAAG,eAAe;GAAE;GAAM;EAAQ,CAAC,GAAG,gEAAgE,SAAS;EAC1H,GAAI;EAEH,UAAA,YAAY;CACgB,CAAA;AAEnC"}
@@ -0,0 +1,29 @@
1
+ import { cn } from "../../../lib/utils.js";
2
+ import { jsx } from "react/jsx-runtime";
3
+ import { Radio } from "@base-ui/react/radio";
4
+ import { RadioGroup } from "@base-ui/react/radio-group";
5
+ //#region ../ui/src/components/ui/radio-group/radio-group.tsx
6
+ var RadioGroup$1 = ({ className, orientation = "vertical", ...props }) => {
7
+ return /* @__PURE__ */ jsx(RadioGroup, {
8
+ "data-slot": "radio-group",
9
+ "data-orientation": orientation,
10
+ "aria-orientation": orientation,
11
+ className: cn("grid w-full gap-2 data-[orientation=horizontal]:flex data-[orientation=horizontal]:items-center", className),
12
+ ...props
13
+ });
14
+ };
15
+ var RadioGroupItem = ({ className, ...props }) => {
16
+ return /* @__PURE__ */ jsx(Radio.Root, {
17
+ "data-slot": "radio-group-item",
18
+ className: cn("peer relative flex size-4 shrink-0 items-center justify-center rounded-full 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 dark:bg-input/30 dark:aria-invalid:ring-destructive/40", className),
19
+ ...props,
20
+ children: /* @__PURE__ */ jsx(Radio.Indicator, {
21
+ "data-slot": "radio-group-item-indicator",
22
+ className: "flex size-2 shrink-0 rounded-full bg-primary transition-none"
23
+ })
24
+ });
25
+ };
26
+ //#endregion
27
+ export { RadioGroup$1 as RadioGroup, RadioGroupItem };
28
+
29
+ //# sourceMappingURL=radio-group.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"radio-group.js","names":[],"sources":["../../../../../../../ui/src/components/ui/radio-group/radio-group.tsx"],"sourcesContent":["import { Radio } from '@base-ui/react/radio';\nimport { RadioGroup as RadioGroupPrimitive } from '@base-ui/react/radio-group';\n\nimport { cn } from '@edyn/ui/lib/utils';\n\nexport interface IRadioGroupProps extends RadioGroupPrimitive.Props {\n orientation?: 'horizontal' | 'vertical';\n}\n\nexport const RadioGroup = ({ className, orientation = 'vertical', ...props }: IRadioGroupProps) => {\n return (\n <RadioGroupPrimitive\n data-slot=\"radio-group\"\n data-orientation={orientation}\n aria-orientation={orientation}\n className={cn('grid w-full gap-2 data-[orientation=horizontal]:flex data-[orientation=horizontal]:items-center', className)}\n {...props}\n />\n );\n};\n\nexport interface IRadioGroupItemProps extends Radio.Root.Props {\n className?: string;\n}\n\nexport const RadioGroupItem = ({ className, ...props }: IRadioGroupItemProps) => {\n return (\n <Radio.Root\n data-slot=\"radio-group-item\"\n className={cn(\n 'peer relative flex size-4 shrink-0 items-center justify-center rounded-full 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 dark:bg-input/30 dark:aria-invalid:ring-destructive/40',\n className,\n )}\n {...props}\n >\n <Radio.Indicator data-slot=\"radio-group-item-indicator\" className=\"flex size-2 shrink-0 rounded-full bg-primary transition-none\" />\n </Radio.Root>\n );\n};\n"],"mappings":";;;;;AASA,IAAa,gBAAc,EAAE,WAAW,cAAc,YAAY,GAAG,YAA8B;CACjG,OACE,oBAAC,YAAD;EACE,aAAU;EACV,oBAAkB;EAClB,oBAAkB;EAClB,WAAW,GAAG,mGAAmG,SAAS;EAC1H,GAAI;CACL,CAAA;AAEL;AAMA,IAAa,kBAAkB,EAAE,WAAW,GAAG,YAAkC;CAC/E,OACE,oBAAC,MAAM,MAAP;EACE,aAAU;EACV,WAAW,GACT,2XACA,SACF;EACA,GAAI;EAEJ,UAAA,oBAAC,MAAM,WAAP;GAAiB,aAAU;GAA6B,WAAU;EAAgE,CAAA;CACxH,CAAA;AAEhB"}
@@ -0,0 +1,29 @@
1
+ import { cn } from "../../../lib/utils.js";
2
+ import { jsx } from "react/jsx-runtime";
3
+ import * as ResizablePrimitive from "react-resizable-panels";
4
+ //#region ../ui/src/components/ui/resizable/resizable.tsx
5
+ var ResizablePanelGroup = ({ className, ...props }) => {
6
+ return /* @__PURE__ */ jsx(ResizablePrimitive.Group, {
7
+ "data-slot": "resizable-panel-group",
8
+ className: cn("flex h-full w-full aria-[orientation=vertical]:flex-col", className),
9
+ ...props
10
+ });
11
+ };
12
+ var ResizablePanel = ({ ...props }) => {
13
+ return /* @__PURE__ */ jsx(ResizablePrimitive.Panel, {
14
+ "data-slot": "resizable-panel",
15
+ ...props
16
+ });
17
+ };
18
+ var ResizableHandle = ({ withHandle, className, ...props }) => {
19
+ return /* @__PURE__ */ jsx(ResizablePrimitive.Separator, {
20
+ "data-slot": "resizable-handle",
21
+ className: cn("relative flex w-px items-center justify-center bg-border ring-offset-background after:absolute after:inset-y-0 after:left-1/2 after:w-1 after:-translate-x-1/2 focus-visible:ring-1 focus-visible:ring-ring focus-visible:outline-hidden aria-[orientation=horizontal]:h-px aria-[orientation=horizontal]:w-full aria-[orientation=horizontal]:after:left-0 aria-[orientation=horizontal]:after:h-1 aria-[orientation=horizontal]:after:w-full aria-[orientation=horizontal]:after:translate-x-0 aria-[orientation=horizontal]:after:-translate-y-1/2 [&[aria-orientation=horizontal]>div]:rotate-90", className),
22
+ ...props,
23
+ children: withHandle && /* @__PURE__ */ jsx("div", { className: "z-10 flex h-6 w-1 shrink-0 rounded-lg bg-border" })
24
+ });
25
+ };
26
+ //#endregion
27
+ export { ResizableHandle, ResizablePanel, ResizablePanelGroup };
28
+
29
+ //# sourceMappingURL=resizable.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"resizable.js","names":[],"sources":["../../../../../../../ui/src/components/ui/resizable/resizable.tsx"],"sourcesContent":["import { cn } from '@edyn/ui/lib/utils';\nimport * as ResizablePrimitive from 'react-resizable-panels';\n\nexport const ResizablePanelGroup = ({ className, ...props }: ResizablePrimitive.GroupProps) => {\n return (\n <ResizablePrimitive.Group\n data-slot=\"resizable-panel-group\"\n className={cn('flex h-full w-full aria-[orientation=vertical]:flex-col', className)}\n {...props}\n />\n );\n};\n\nexport const ResizablePanel = ({ ...props }: ResizablePrimitive.PanelProps) => {\n return <ResizablePrimitive.Panel data-slot=\"resizable-panel\" {...props} />;\n};\n\nexport const ResizableHandle = ({\n withHandle,\n className,\n ...props\n}: ResizablePrimitive.SeparatorProps & {\n withHandle?: boolean;\n}) => {\n return (\n <ResizablePrimitive.Separator\n data-slot=\"resizable-handle\"\n className={cn(\n 'relative flex w-px items-center justify-center bg-border ring-offset-background after:absolute after:inset-y-0 after:left-1/2 after:w-1 after:-translate-x-1/2 focus-visible:ring-1 focus-visible:ring-ring focus-visible:outline-hidden aria-[orientation=horizontal]:h-px aria-[orientation=horizontal]:w-full aria-[orientation=horizontal]:after:left-0 aria-[orientation=horizontal]:after:h-1 aria-[orientation=horizontal]:after:w-full aria-[orientation=horizontal]:after:translate-x-0 aria-[orientation=horizontal]:after:-translate-y-1/2 [&[aria-orientation=horizontal]>div]:rotate-90',\n className,\n )}\n {...props}\n >\n {withHandle && <div className=\"z-10 flex h-6 w-1 shrink-0 rounded-lg bg-border\" />}\n </ResizablePrimitive.Separator>\n );\n};\n"],"mappings":";;;;AAGA,IAAa,uBAAuB,EAAE,WAAW,GAAG,YAA2C;CAC7F,OACE,oBAAC,mBAAmB,OAApB;EACE,aAAU;EACV,WAAW,GAAG,2DAA2D,SAAS;EAClF,GAAI;CACL,CAAA;AAEL;AAEA,IAAa,kBAAkB,EAAE,GAAG,YAA2C;CAC7E,OAAO,oBAAC,mBAAmB,OAApB;EAA0B,aAAU;EAAkB,GAAI;CAAQ,CAAA;AAC3E;AAEA,IAAa,mBAAmB,EAC9B,YACA,WACA,GAAG,YAGC;CACJ,OACE,oBAAC,mBAAmB,WAApB;EACE,aAAU;EACV,WAAW,GACT,wkBACA,SACF;EACA,GAAI;EAEH,UAAA,cAAc,oBAAC,OAAD,EAAK,WAAU,kDAAmD,CAAA;CACrD,CAAA;AAElC"}
@@ -1 +1,2 @@
1
+ export * from './popup-list-scroll';
1
2
  export * from './scroll-area';
@@ -0,0 +1,13 @@
1
+ import { ReactNode } from 'react';
2
+ export interface IPopupListScrollProps {
3
+ children: ReactNode;
4
+ className?: string;
5
+ /** See ScrollArea. A menu turns it off: its items are the tab stops. */
6
+ focusable?: boolean;
7
+ }
8
+ /**
9
+ * The scrolling part of a popup list: eight rows at most, or the whole rows the room allows. Only rows are counted; a label
10
+ * or separator among them adds its own height. POPUP_LIST_HEIGHT_CLASS holds the CSS cap until this has measured
11
+ * (`--popup-list-cap`). See docs/architecture.md.
12
+ */
13
+ export declare const PopupListScroll: ({ children, className, focusable }: IPopupListScrollProps) => import('react').JSX.Element;
@@ -0,0 +1,69 @@
1
+ import { cn } from "../../../lib/utils.js";
2
+ import { POPUP_LIST_HEIGHT_CLASS } from "../../../lib/popup-list.js";
3
+ import { ScrollArea } from "./scroll-area.js";
4
+ import { useLayoutEffect, useRef } from "react";
5
+ import { jsx } from "react/jsx-runtime";
6
+ //#region ../ui/src/components/ui/scroll-area/popup-list-scroll.tsx
7
+ var ROW = "[role=\"option\"], [role^=\"menuitem\"]";
8
+ var FULL_ROWS = 8;
9
+ /** POPUP_LIST_HEIGHT_CLASS's margin, above and below. */
10
+ var AIR = 8;
11
+ /**
12
+ * The scrolling part of a popup list: eight rows at most, or the whole rows the room allows. Only rows are counted; a label
13
+ * or separator among them adds its own height. POPUP_LIST_HEIGHT_CLASS holds the CSS cap until this has measured
14
+ * (`--popup-list-cap`). See docs/architecture.md.
15
+ */
16
+ var PopupListScroll = ({ children, className, focusable }) => {
17
+ const refRoot = useRef(null);
18
+ const refViewport = useRef(null);
19
+ useLayoutEffect(() => {
20
+ const root = refRoot.current;
21
+ const content = refViewport.current?.firstElementChild;
22
+ if (!root || !(content instanceof HTMLElement)) return;
23
+ const measure = () => {
24
+ const box = content.getBoundingClientRect();
25
+ const scale = content.offsetHeight > 0 ? box.height / content.offsetHeight : 1;
26
+ const bottoms = [...content.querySelectorAll(ROW)].map((row) => (row.getBoundingClientRect().bottom - box.top) / scale);
27
+ const available = Number.parseFloat(getComputedStyle(root).getPropertyValue("--available-height"));
28
+ const room = Number.isFinite(available) ? available - AIR : Number.POSITIVE_INFINITY;
29
+ let rows = Math.min(bottoms.length, FULL_ROWS);
30
+ while (rows > 0 && (bottoms[rows - 1] ?? 0) > room + .5) rows -= 1;
31
+ const cap = bottoms.length <= FULL_ROWS && content.offsetHeight <= room + .5 ? content.offsetHeight : rows > 0 ? bottoms[rows - 1] ?? 0 : void 0;
32
+ if (cap === void 0) root.style.removeProperty("--popup-list-cap");
33
+ else root.style.setProperty("--popup-list-cap", `${Math.ceil(cap)}px`);
34
+ };
35
+ measure();
36
+ const resized = new ResizeObserver(measure);
37
+ resized.observe(content);
38
+ const changed = new MutationObserver(measure);
39
+ changed.observe(content, {
40
+ childList: true,
41
+ subtree: true
42
+ });
43
+ let positioner = root.parentElement;
44
+ while (positioner && positioner.style.getPropertyValue("--available-height") === "") positioner = positioner.parentElement;
45
+ const moved = new MutationObserver(measure);
46
+ if (positioner) moved.observe(positioner, {
47
+ attributes: true,
48
+ attributeFilter: ["style"]
49
+ });
50
+ return () => {
51
+ resized.disconnect();
52
+ changed.disconnect();
53
+ moved.disconnect();
54
+ };
55
+ }, []);
56
+ return /* @__PURE__ */ jsx(ScrollArea, {
57
+ ref: refRoot,
58
+ viewportRef: refViewport,
59
+ type: "always",
60
+ fade: true,
61
+ focusable,
62
+ className: cn(POPUP_LIST_HEIGHT_CLASS, className),
63
+ children
64
+ });
65
+ };
66
+ //#endregion
67
+ export { PopupListScroll };
68
+
69
+ //# sourceMappingURL=popup-list-scroll.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"popup-list-scroll.js","names":[],"sources":["../../../../../../../ui/src/components/ui/scroll-area/popup-list-scroll.tsx"],"sourcesContent":["import { POPUP_LIST_HEIGHT_CLASS } from '@edyn/ui/lib/popup-list';\nimport { cn } from '@edyn/ui/lib/utils';\nimport { type ReactNode, useLayoutEffect, useRef } from 'react';\nimport { ScrollArea } from './scroll-area';\n\nconst ROW = '[role=\"option\"], [role^=\"menuitem\"]';\nconst FULL_ROWS = 8;\n/** POPUP_LIST_HEIGHT_CLASS's margin, above and below. */\nconst AIR = 8;\n\nexport interface IPopupListScrollProps {\n children: ReactNode;\n className?: string;\n /** See ScrollArea. A menu turns it off: its items are the tab stops. */\n focusable?: boolean;\n}\n\n/**\n * The scrolling part of a popup list: eight rows at most, or the whole rows the room allows. Only rows are counted; a label\n * or separator among them adds its own height. POPUP_LIST_HEIGHT_CLASS holds the CSS cap until this has measured\n * (`--popup-list-cap`). See docs/architecture.md.\n */\nexport const PopupListScroll = ({ children, className, focusable }: IPopupListScrollProps) => {\n const refRoot = useRef<HTMLDivElement | null>(null);\n const refViewport = useRef<HTMLDivElement | null>(null);\n\n useLayoutEffect(() => {\n const root = refRoot.current;\n const content = refViewport.current?.firstElementChild;\n if (!root || !(content instanceof HTMLElement)) {\n return;\n }\n const measure = () => {\n // In layout units, not the scale of the opening animation.\n const box = content.getBoundingClientRect();\n const scale = content.offsetHeight > 0 ? box.height / content.offsetHeight : 1;\n const bottoms = [...content.querySelectorAll<HTMLElement>(ROW)].map((row) => (row.getBoundingClientRect().bottom - box.top) / scale);\n const available = Number.parseFloat(getComputedStyle(root).getPropertyValue('--available-height'));\n const room = Number.isFinite(available) ? available - AIR : Number.POSITIVE_INFINITY;\n let rows = Math.min(bottoms.length, FULL_ROWS);\n while (rows > 0 && (bottoms[rows - 1] ?? 0) > room + 0.5) {\n rows -= 1;\n }\n const everything = bottoms.length <= FULL_ROWS && content.offsetHeight <= room + 0.5;\n const cap = everything ? content.offsetHeight : rows > 0 ? (bottoms[rows - 1] ?? 0) : undefined;\n if (cap === undefined) {\n root.style.removeProperty('--popup-list-cap');\n } else {\n root.style.setProperty('--popup-list-cap', `${Math.ceil(cap)}px`);\n }\n };\n measure();\n const resized = new ResizeObserver(measure);\n resized.observe(content);\n const changed = new MutationObserver(measure);\n changed.observe(content, { childList: true, subtree: true });\n // The room changes as the popup is placed and as the window moves.\n let positioner: HTMLElement | null = root.parentElement;\n while (positioner && positioner.style.getPropertyValue('--available-height') === '') {\n positioner = positioner.parentElement;\n }\n const moved = new MutationObserver(measure);\n if (positioner) {\n moved.observe(positioner, { attributes: true, attributeFilter: ['style'] });\n }\n return () => {\n resized.disconnect();\n changed.disconnect();\n moved.disconnect();\n };\n }, []);\n\n return (\n <ScrollArea ref={refRoot} viewportRef={refViewport} type=\"always\" fade focusable={focusable} className={cn(POPUP_LIST_HEIGHT_CLASS, className)}>\n {children}\n </ScrollArea>\n );\n};\n"],"mappings":";;;;;;AAKA,IAAM,MAAM;AACZ,IAAM,YAAY;;AAElB,IAAM,MAAM;;;;;;AAcZ,IAAa,mBAAmB,EAAE,UAAU,WAAW,gBAAuC;CAC5F,MAAM,UAAU,OAA8B,IAAI;CAClD,MAAM,cAAc,OAA8B,IAAI;CAEtD,sBAAsB;EACpB,MAAM,OAAO,QAAQ;EACrB,MAAM,UAAU,YAAY,SAAS;EACrC,IAAI,CAAC,QAAQ,EAAE,mBAAmB,cAChC;EAEF,MAAM,gBAAgB;GAEpB,MAAM,MAAM,QAAQ,sBAAsB;GAC1C,MAAM,QAAQ,QAAQ,eAAe,IAAI,IAAI,SAAS,QAAQ,eAAe;GAC7E,MAAM,UAAU,CAAC,GAAG,QAAQ,iBAA8B,GAAG,CAAC,CAAC,CAAC,KAAK,SAAS,IAAI,sBAAsB,CAAC,CAAC,SAAS,IAAI,OAAO,KAAK;GACnI,MAAM,YAAY,OAAO,WAAW,iBAAiB,IAAI,CAAC,CAAC,iBAAiB,oBAAoB,CAAC;GACjG,MAAM,OAAO,OAAO,SAAS,SAAS,IAAI,YAAY,MAAM,OAAO;GACnE,IAAI,OAAO,KAAK,IAAI,QAAQ,QAAQ,SAAS;GAC7C,OAAO,OAAO,MAAM,QAAQ,OAAO,MAAM,KAAK,OAAO,IACnD,QAAQ;GAGV,MAAM,MADa,QAAQ,UAAU,aAAa,QAAQ,gBAAgB,OAAO,KACxD,QAAQ,eAAe,OAAO,IAAK,QAAQ,OAAO,MAAM,IAAK,KAAA;GACtF,IAAI,QAAQ,KAAA,GACV,KAAK,MAAM,eAAe,kBAAkB;QAE5C,KAAK,MAAM,YAAY,oBAAoB,GAAG,KAAK,KAAK,GAAG,EAAE,GAAG;EAEpE;EACA,QAAQ;EACR,MAAM,UAAU,IAAI,eAAe,OAAO;EAC1C,QAAQ,QAAQ,OAAO;EACvB,MAAM,UAAU,IAAI,iBAAiB,OAAO;EAC5C,QAAQ,QAAQ,SAAS;GAAE,WAAW;GAAM,SAAS;EAAK,CAAC;EAE3D,IAAI,aAAiC,KAAK;EAC1C,OAAO,cAAc,WAAW,MAAM,iBAAiB,oBAAoB,MAAM,IAC/E,aAAa,WAAW;EAE1B,MAAM,QAAQ,IAAI,iBAAiB,OAAO;EAC1C,IAAI,YACF,MAAM,QAAQ,YAAY;GAAE,YAAY;GAAM,iBAAiB,CAAC,OAAO;EAAE,CAAC;EAE5E,aAAa;GACX,QAAQ,WAAW;GACnB,QAAQ,WAAW;GACnB,MAAM,WAAW;EACnB;CACF,GAAG,CAAC,CAAC;CAEL,OACE,oBAAC,YAAD;EAAY,KAAK;EAAS,aAAa;EAAa,MAAK;EAAS,MAAA;EAAgB;EAAW,WAAW,GAAG,yBAAyB,SAAS;EAC1I;CACS,CAAA;AAEhB"}
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Edge-fade wiring and the sizing contract for ScrollArea.
3
+ *
4
+ * PATH TAKEN: the fades are cut by a mask in scroll-fade.css, keyed off the
5
+ * overflow flags Base UI keeps on the root (data-overflow-y-start and friends).
6
+ * happy-dom has neither layout nor a stylesheet, so what is checked here is the
7
+ * contract the stylesheet reads: which axis the component declares, and that
8
+ * nothing of the painted version is left behind. The mask itself, and the flags
9
+ * flipping at the right moment, are measured in a real browser by
10
+ * e2e/scroll-area-fade.spec.ts.
11
+ */
12
+ export {};
@@ -1,7 +1,19 @@
1
1
  import { ScrollArea as BaseScrollArea } from '@base-ui/react/scroll-area';
2
2
  import { ComponentProps, RefObject } from 'react';
3
- /** When the bar shows: 'hover' on area hover or while scrolling (default), 'scroll' only while scrolling, 'always' permanent. */
3
+ /**
4
+ * When the bar shows: 'hover' on area hover or while scrolling (default),
5
+ * 'scroll' only while scrolling, 'always' permanent. In every mode the bar is
6
+ * mounted only while that axis actually overflows, so 'always' means "always
7
+ * when there is something to scroll", never a bar on a list that fits.
8
+ */
4
9
  export type TScrollbarVisibility = 'hover' | 'scroll' | 'always';
10
+ /**
11
+ * Surface the edge fades blended into, back when they were painted.
12
+ *
13
+ * @deprecated The fades are cut into the content by a mask, so they match any
14
+ * surface without being told which one. Still accepted, and ignored.
15
+ */
16
+ export type TScrollAreaFadeFrom = 'card' | 'background' | 'sidebar' | 'popover';
5
17
  export interface IScrollBarProps extends ComponentProps<typeof BaseScrollArea.Scrollbar> {
6
18
  visibility?: TScrollbarVisibility;
7
19
  }
@@ -11,11 +23,35 @@ export interface IScrollAreaProps extends ComponentProps<typeof BaseScrollArea.R
11
23
  orientation?: 'horizontal' | 'vertical' | 'both';
12
24
  /** Scrollbar reveal behavior (mirrors the Radix ScrollArea `type` prop). */
13
25
  type?: TScrollbarVisibility;
14
- viewPortId?: string;
26
+ /** Edge fades hinting at clipped content; each one shows only while its own edge hides something. */
27
+ fade?: boolean;
28
+ /**
29
+ * @deprecated No longer read. The fades mask the content, so they sit correctly
30
+ * on any surface; passing this does nothing and is safe to delete.
31
+ */
32
+ fadeFrom?: TScrollAreaFadeFrom;
33
+ /** Places both bars, for a host that gives them a gutter of their own (a sidebar menu). */
34
+ scrollbarClassName?: string;
35
+ viewportId?: string;
15
36
  /** Access to the scrollable viewport (e.g. to reset scroll position on route changes). */
37
+ viewportRef?: RefObject<HTMLDivElement | null>;
38
+ viewportClassName?: string;
39
+ /** Published on the viewport as data-scroll-restoration-id, for a router that restores scroll position. */
40
+ scrollRestorationId?: string;
41
+ /**
42
+ * Whether the viewport may be a tab stop (default). It is one only while it overflows and nothing inside can take Tab
43
+ * (axe's scrollable-region-focusable), with a 1px keyboard-only line. Off inside a menu, whose items are the tab stops.
44
+ */
45
+ focusable?: boolean;
46
+ /** @deprecated Use `viewportId`. */
47
+ viewPortId?: string;
48
+ /** @deprecated Use `viewportRef`. */
16
49
  viewPortRef?: RefObject<HTMLDivElement | null>;
50
+ /** @deprecated Use `viewportClassName`. */
17
51
  viewPortClassName?: string;
52
+ /** Places the vertical bar only; `scrollbarClassName` covers both. */
18
53
  scrollVerticalClassName?: string;
54
+ /** Places the horizontal bar only; `scrollbarClassName` covers both. */
19
55
  scrollHorizontalClassName?: string;
20
56
  }
21
57
  /**
@@ -24,9 +60,24 @@ export interface IScrollAreaProps extends ComponentProps<typeof BaseScrollArea.R
24
60
  * rule: wide/tall content (tables, lists, code) always goes through this, never a bare
25
61
  * overflow-* utility.
26
62
  *
63
+ * Cap the height with a plain class on the component itself, e.g.
64
+ * `<ScrollArea className="max-h-88">`. The viewport picks the cap up through
65
+ * `max-h-inherit`, which matters because the viewport is the element that actually
66
+ * scrolls: a cap that lands only on the root leaves tall content spilling out
67
+ * underneath with no scrollbar, and that reads as a working height right up until the
68
+ * content outgrows it.
69
+ *
70
+ * `fade` fades out each edge that is currently hiding content, rather than always
71
+ * fading one: a permanent fade is a lie half the time, dimming the last row that fits
72
+ * and promising more below when the reader is already at the end. It is cut into the
73
+ * content by a mask (@edyn/theme/scroll-fade.css), so it needs no surface colour and
74
+ * reads correctly over a tint, a gradient or a glow. A host that keeps something
75
+ * unscrolled at the top, such as a sticky table header, exempts that band by setting
76
+ * --scroll-fade-offset on the ScrollArea. The static faded-* utilities in
77
+ * @edyn/theme/utilities.css are the other tool, for DECORATIVE edges that do not
78
+ * track scroll position.
79
+ *
27
80
  * The viewport publishes its size as --scroll-area-width/--scroll-area-height CSS vars
28
- * so children can size against the visible area. Edge fades are NOT built in; apply
29
- * the faded-* utilities from @edyn/theme/utilities.css on the ScrollArea (it is the
30
- * positioning root) where a fade is wanted.
81
+ * so children can size against the visible area.
31
82
  */
32
- export declare const ScrollArea: ({ className, children, orientation, type, viewPortId, viewPortRef, viewPortClassName, scrollVerticalClassName, scrollHorizontalClassName, ...props }: IScrollAreaProps) => import('react').JSX.Element;
83
+ export declare const ScrollArea: ({ className, children, orientation, type, fade, fadeFrom, scrollbarClassName, viewportId, viewportRef, viewportClassName, scrollRestorationId, focusable, viewPortId, viewPortRef, viewPortClassName, scrollVerticalClassName, scrollHorizontalClassName, ...props }: IScrollAreaProps) => import('react').JSX.Element;
@@ -0,0 +1,155 @@
1
+ import { cn } from "../../../lib/utils.js";
2
+ import { useMergedRefs } from "../../../hooks/use-merged-refs.js";
3
+ import { useEffect, useRef, useState } from "react";
4
+ import { jsx, jsxs } from "react/jsx-runtime";
5
+ import { ScrollArea } from "@base-ui/react/scroll-area";
6
+ //#region ../ui/src/components/ui/scroll-area/scroll-area.tsx
7
+ var ScrollBar = ({ className, orientation = "vertical", visibility = "hover", ...props }) => {
8
+ return /* @__PURE__ */ jsx(ScrollArea.Scrollbar, {
9
+ "data-slot": "scroll-area-scrollbar",
10
+ orientation,
11
+ className: cn("peer/scrollbar z-100 flex touch-none select-none motion-safe:transition-opacity motion-safe:duration-150", orientation === "vertical" && "h-(--scroll-bar-length) w-(--scroll-bar-size) me-(--scroll-bar-gap) mt-(--scroll-bar-offset-top) border-l border-l-transparent p-px", orientation === "horizontal" && "h-(--scroll-bar-size) ms-(--scroll-bar-gap) me-(--scroll-bar-gap) mb-(--scroll-bar-gap) flex-col border-t border-t-transparent p-px", visibility !== "always" && "opacity-0 data-scrolling:opacity-100", visibility === "hover" && "data-hovering:opacity-100 group-hover/scroll-area:opacity-100", className),
12
+ ...props,
13
+ children: /* @__PURE__ */ jsx(ScrollArea.Thumb, { className: "relative flex-1 rounded-full bg-muted-foreground/50 transition-colors hover:bg-muted-foreground/70 data-scrolling:bg-muted-foreground/70" })
14
+ });
15
+ };
16
+ /**
17
+ * Which axes fade, published for scroll-fade.css to key its mask off. The
18
+ * stylesheet reaches this element's own viewport through a child combinator, so a
19
+ * ScrollArea nested in another one cannot pick up its ancestor's edges.
20
+ */
21
+ /**
22
+ * Base UI gives the root, the viewport and the content `role="presentation"`. On
23
+ * a div that changes nothing for a screen reader, but it is an EXPLICIT role, and
24
+ * axe treats explicit presentation children as foreign to a parent that owns
25
+ * required children. A ScrollArea inside `role="menu"` or `role="listbox"` then
26
+ * fails as a critical aria-required-children violation, while the same div with
27
+ * no role passes straight through. Clearing it is what makes a ScrollArea legal
28
+ * in a popup list. A spread because the literal `role={undefined}` is flagged by
29
+ * the a11y lint rule, which cannot tell it from an invalid role.
30
+ */
31
+ var NO_ROLE = { role: void 0 };
32
+ /** What takes Tab inside a region: if any is there, the region is not a stop of its own. */
33
+ var FOCUSABLE_INSIDE = "a[href], button:not(:disabled), input:not([type=\"hidden\"]):not(:disabled), select:not(:disabled), textarea:not(:disabled), summary, [contenteditable], [tabindex]:not([tabindex=\"-1\"])";
34
+ /** Base UI makes the viewport a tab stop (0, or -1 with nothing to scroll); undefined takes that away. */
35
+ var NO_TAB_STOP = { tabIndex: void 0 };
36
+ var FADE_AXIS = {
37
+ vertical: "block",
38
+ horizontal: "inline",
39
+ both: "both"
40
+ };
41
+ /**
42
+ * Themed scroll container (Base UI): overflowing content scrolls INSIDE the component
43
+ * with a slim overlay scrollbar instead of exposing a native browser scrollbar. House
44
+ * rule: wide/tall content (tables, lists, code) always goes through this, never a bare
45
+ * overflow-* utility.
46
+ *
47
+ * Cap the height with a plain class on the component itself, e.g.
48
+ * `<ScrollArea className="max-h-88">`. The viewport picks the cap up through
49
+ * `max-h-inherit`, which matters because the viewport is the element that actually
50
+ * scrolls: a cap that lands only on the root leaves tall content spilling out
51
+ * underneath with no scrollbar, and that reads as a working height right up until the
52
+ * content outgrows it.
53
+ *
54
+ * `fade` fades out each edge that is currently hiding content, rather than always
55
+ * fading one: a permanent fade is a lie half the time, dimming the last row that fits
56
+ * and promising more below when the reader is already at the end. It is cut into the
57
+ * content by a mask (@edyn/theme/scroll-fade.css), so it needs no surface colour and
58
+ * reads correctly over a tint, a gradient or a glow. A host that keeps something
59
+ * unscrolled at the top, such as a sticky table header, exempts that band by setting
60
+ * --scroll-fade-offset on the ScrollArea. The static faded-* utilities in
61
+ * @edyn/theme/utilities.css are the other tool, for DECORATIVE edges that do not
62
+ * track scroll position.
63
+ *
64
+ * The viewport publishes its size as --scroll-area-width/--scroll-area-height CSS vars
65
+ * so children can size against the visible area.
66
+ */
67
+ var ScrollArea$1 = ({ className, children, orientation = "vertical", type = "hover", fade = false, fadeFrom = "card", scrollbarClassName, viewportId, viewportRef, viewportClassName, scrollRestorationId, focusable = true, viewPortId, viewPortRef, viewPortClassName, scrollVerticalClassName, scrollHorizontalClassName, ...props }) => {
68
+ const refInner = useRef(null);
69
+ const refsViewport = useMergedRefs(refInner, viewportRef ?? viewPortRef);
70
+ const [holdsFocusable, setHoldsFocusable] = useState(false);
71
+ useEffect(() => {
72
+ const el = refInner.current;
73
+ if (!el || !focusable) return;
74
+ const read = () => setHoldsFocusable(el.querySelector(FOCUSABLE_INSIDE) !== null);
75
+ read();
76
+ const observer = new MutationObserver(read);
77
+ observer.observe(el, {
78
+ childList: true,
79
+ subtree: true,
80
+ attributes: true,
81
+ attributeFilter: [
82
+ "tabindex",
83
+ "disabled",
84
+ "href"
85
+ ]
86
+ });
87
+ return () => {
88
+ observer.disconnect();
89
+ };
90
+ }, [focusable]);
91
+ useEffect(() => {
92
+ const el = refInner.current;
93
+ if (!el) return;
94
+ const root = el.parentElement;
95
+ const content = el.firstElementChild;
96
+ const observer = new ResizeObserver(() => {
97
+ el.style.setProperty("--scroll-area-width", `${el.clientWidth}px`);
98
+ el.style.setProperty("--scroll-area-height", `${el.clientHeight}px`);
99
+ if (orientation !== "vertical" && root && content instanceof HTMLElement) {
100
+ root.removeAttribute("data-bar-over");
101
+ const style = getComputedStyle(root);
102
+ const room = root.offsetHeight - content.offsetHeight;
103
+ const bar = Number.parseFloat(style.getPropertyValue("--scroll-bar-size")) + Number.parseFloat(style.getPropertyValue("--scroll-bar-gap"));
104
+ if (root.hasAttribute("data-has-overflow-x") && room >= 0 && room < bar) root.setAttribute("data-bar-over", "");
105
+ }
106
+ });
107
+ observer.observe(el);
108
+ if (orientation !== "vertical" && root && content) {
109
+ observer.observe(root);
110
+ observer.observe(content);
111
+ }
112
+ return () => {
113
+ observer.disconnect();
114
+ };
115
+ }, [orientation]);
116
+ return /* @__PURE__ */ jsxs(ScrollArea.Root, {
117
+ "data-slot": "scroll-area",
118
+ "data-focus": "inset",
119
+ className: cn("group/scroll-area relative grid min-w-0 grid-rows-1 overflow-hidden", orientation !== "vertical" && "data-has-overflow-x:not-data-bar-over:pb-(--scroll-bar-reserve)", className),
120
+ "data-fade": fade ? FADE_AXIS[orientation] : void 0,
121
+ ...NO_ROLE,
122
+ ...props,
123
+ children: [
124
+ (orientation === "vertical" || orientation === "both") && /* @__PURE__ */ jsx(ScrollBar, {
125
+ orientation: "vertical",
126
+ visibility: type,
127
+ className: cn(scrollbarClassName, scrollVerticalClassName)
128
+ }),
129
+ (orientation === "horizontal" || orientation === "both") && /* @__PURE__ */ jsx(ScrollBar, {
130
+ orientation: "horizontal",
131
+ visibility: type,
132
+ className: cn(scrollbarClassName, scrollHorizontalClassName)
133
+ }),
134
+ /* @__PURE__ */ jsx(ScrollArea.Corner, {}),
135
+ /* @__PURE__ */ jsx(ScrollArea.Viewport, {
136
+ "data-slot": "scroll-area-viewport",
137
+ id: viewportId ?? viewPortId,
138
+ ref: refsViewport,
139
+ "data-scroll-restoration-id": scrollRestorationId,
140
+ ...NO_ROLE,
141
+ ...focusable && !holdsFocusable ? null : NO_TAB_STOP,
142
+ className: cn("max-h-inherit w-full rounded-[inherit]", orientation === "vertical" && "overflow-x-hidden!", orientation === "horizontal" && "overflow-y-hidden!", viewportClassName ?? viewPortClassName),
143
+ children: /* @__PURE__ */ jsx(ScrollArea.Content, {
144
+ ...NO_ROLE,
145
+ style: orientation === "vertical" ? { minWidth: 0 } : void 0,
146
+ children
147
+ })
148
+ })
149
+ ]
150
+ });
151
+ };
152
+ //#endregion
153
+ export { ScrollArea$1 as ScrollArea, ScrollBar };
154
+
155
+ //# sourceMappingURL=scroll-area.js.map