@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,87 @@
1
+ import { cn } from "../../../lib/utils.js";
2
+ import { useExposedFocusGuards } from "../../../lib/focus-guards.js";
3
+ import { POPUP_LAYER_CLASS } from "../../../lib/popup-list.js";
4
+ import { jsx, jsxs } from "react/jsx-runtime";
5
+ import { cva } from "class-variance-authority";
6
+ import { IconChevronDown } from "@tabler/icons-react";
7
+ import { NavigationMenu } from "@base-ui/react/navigation-menu";
8
+ //#region ../ui/src/components/ui/navigation-menu/navigation-menu.tsx
9
+ var NavigationMenu$1 = ({ align = "start", className, children, ...props }) => {
10
+ return /* @__PURE__ */ jsxs(NavigationMenu.Root, {
11
+ "data-slot": "navigation-menu",
12
+ className: cn("group/navigation-menu relative flex max-w-max flex-1 items-center justify-center", className),
13
+ ...props,
14
+ children: [children, /* @__PURE__ */ jsx(NavigationMenuPositioner, { align })]
15
+ });
16
+ };
17
+ var NavigationMenuList = ({ className, ...props }) => {
18
+ return /* @__PURE__ */ jsx(NavigationMenu.List, {
19
+ "data-slot": "navigation-menu-list",
20
+ className: cn("group flex flex-1 list-none items-center justify-center gap-0", className),
21
+ ...props
22
+ });
23
+ };
24
+ var NavigationMenuItem = ({ className, ...props }) => {
25
+ return /* @__PURE__ */ jsx(NavigationMenu.Item, {
26
+ "data-slot": "navigation-menu-item",
27
+ className: cn("relative", className),
28
+ ...props
29
+ });
30
+ };
31
+ var navigationMenuTriggerStyle = cva("group/navigation-menu-trigger inline-flex h-9 w-max items-center justify-center rounded-lg px-2.5 py-1.5 text-sm font-medium transition-all outline-none motion-reduce:transition-none hover:bg-muted focus:bg-muted focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50 data-popup-open:bg-muted/50 data-popup-open:hover:bg-muted data-open:bg-muted/50 data-open:hover:bg-muted data-open:focus:bg-muted");
32
+ var NavigationMenuTrigger = ({ className, children, ...props }) => {
33
+ return /* @__PURE__ */ jsxs(NavigationMenu.Trigger, {
34
+ "data-slot": "navigation-menu-trigger",
35
+ className: cn(navigationMenuTriggerStyle(), "group", className),
36
+ ...props,
37
+ children: [
38
+ children,
39
+ " ",
40
+ /* @__PURE__ */ jsx(IconChevronDown, {
41
+ className: "relative top-px ml-1 size-3 transition duration-300 motion-reduce:transition-none group-data-popup-open/navigation-menu-trigger:rotate-180 group-data-open/navigation-menu-trigger:rotate-180",
42
+ "aria-hidden": "true"
43
+ })
44
+ ]
45
+ });
46
+ };
47
+ var NavigationMenuContent = ({ className, ...props }) => {
48
+ useExposedFocusGuards();
49
+ return /* @__PURE__ */ jsx(NavigationMenu.Content, {
50
+ "data-slot": "navigation-menu-content",
51
+ className: cn("motion-reduce:animate-none motion-reduce:transition-none", "data-ending-style:data-[activation-direction=left]:translate-x-[50%] data-ending-style:data-[activation-direction=right]:translate-x-[-50%] data-starting-style:data-[activation-direction=left]:translate-x-[-50%] data-starting-style:data-[activation-direction=right]:translate-x-[50%] h-full w-auto p-1 transition-[opacity,transform,translate] duration-[0.35s] ease-[cubic-bezier(0.22,1,0.36,1)] group-data-[viewport=false]/navigation-menu:rounded-lg group-data-[viewport=false]/navigation-menu:bg-popover group-data-[viewport=false]/navigation-menu:text-popover-foreground group-data-[viewport=false]/navigation-menu:shadow group-data-[viewport=false]/navigation-menu:ring-1 group-data-[viewport=false]/navigation-menu:ring-foreground/10 group-data-[viewport=false]/navigation-menu:duration-300 data-ending-style:opacity-0 data-starting-style:opacity-0 data-[motion=from-end]:slide-in-from-right-52 data-[motion=from-start]:slide-in-from-left-52 data-[motion=to-end]:slide-out-to-right-52 data-[motion=to-start]:slide-out-to-left-52 data-[motion^=from-]:animate-in data-[motion^=from-]:fade-in data-[motion^=to-]:animate-out data-[motion^=to-]:fade-out **:data-[slot=navigation-menu-link]:focus:ring-0 **:data-[slot=navigation-menu-link]:focus:outline-none group-data-[viewport=false]/navigation-menu:data-open:animate-in group-data-[viewport=false]/navigation-menu:data-open:fade-in-0 group-data-[viewport=false]/navigation-menu:data-open:zoom-in-95 group-data-[viewport=false]/navigation-menu:data-closed:animate-out group-data-[viewport=false]/navigation-menu:data-closed:fade-out-0 group-data-[viewport=false]/navigation-menu:data-closed:zoom-out-95", className),
52
+ ...props
53
+ });
54
+ };
55
+ var NavigationMenuPositioner = ({ className, side = "bottom", sideOffset = 8, align = "start", alignOffset = 0, ...props }) => {
56
+ return /* @__PURE__ */ jsx(NavigationMenu.Portal, { children: /* @__PURE__ */ jsx(NavigationMenu.Positioner, {
57
+ side,
58
+ sideOffset,
59
+ align,
60
+ alignOffset,
61
+ className: cn(POPUP_LAYER_CLASS, "isolate h-(--positioner-height) w-(--positioner-width) max-w-(--available-width) transition-[top,left,right,bottom] duration-[0.35s] ease-[cubic-bezier(0.22,1,0.36,1)] motion-reduce:transition-none data-instant:transition-none data-[side=bottom]:before:top-[-10px] data-[side=bottom]:before:right-0 data-[side=bottom]:before:left-0", className),
62
+ ...props,
63
+ children: /* @__PURE__ */ jsx(NavigationMenu.Popup, {
64
+ className: "data-[ending-style]:easing-[ease] xs:w-(--popup-width) relative h-(--popup-height) w-(--popup-width) origin-(--transform-origin) rounded-lg bg-popover text-popover-foreground shadow ring-1 ring-foreground/10 transition-[opacity,transform,width,height,scale,translate] duration-[0.35s] ease-[cubic-bezier(0.22,1,0.36,1)] outline-none motion-reduce:transition-none data-ending-style:scale-90 data-ending-style:opacity-0 data-ending-style:duration-150 data-starting-style:scale-90 data-starting-style:opacity-0",
65
+ children: /* @__PURE__ */ jsx(NavigationMenu.Viewport, { className: "relative size-full overflow-hidden" })
66
+ })
67
+ }) });
68
+ };
69
+ var NavigationMenuLink = ({ className, ...props }) => {
70
+ return /* @__PURE__ */ jsx(NavigationMenu.Link, {
71
+ "data-slot": "navigation-menu-link",
72
+ className: cn("flex items-center gap-2 rounded-lg p-2 text-sm transition-all outline-none motion-reduce:transition-none hover:bg-muted focus:bg-muted focus-visible:outline-1 in-data-[slot=navigation-menu-content]:rounded-md data-active:bg-muted/50 data-active:hover:bg-muted data-active:focus:bg-muted [&_svg:not([class*='size-'])]:size-4", className),
73
+ ...props
74
+ });
75
+ };
76
+ var NavigationMenuIndicator = ({ className, ...props }) => {
77
+ return /* @__PURE__ */ jsx(NavigationMenu.Icon, {
78
+ "data-slot": "navigation-menu-indicator",
79
+ className: cn("motion-reduce:animate-none", "top-full z-1 flex h-1.5 items-end justify-center overflow-hidden data-[state=hidden]:animate-out data-[state=hidden]:fade-out data-[state=visible]:animate-in data-[state=visible]:fade-in", className),
80
+ ...props,
81
+ children: /* @__PURE__ */ jsx("div", { className: "relative top-[60%] h-2 w-2 rotate-45 rounded-tl-sm bg-border shadow-md" })
82
+ });
83
+ };
84
+ //#endregion
85
+ export { NavigationMenu$1 as NavigationMenu, NavigationMenuContent, NavigationMenuIndicator, NavigationMenuItem, NavigationMenuLink, NavigationMenuList, NavigationMenuPositioner, NavigationMenuTrigger, navigationMenuTriggerStyle };
86
+
87
+ //# sourceMappingURL=navigation-menu.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"navigation-menu.js","names":[],"sources":["../../../../../../../ui/src/components/ui/navigation-menu/navigation-menu.tsx"],"sourcesContent":["import { NavigationMenu as NavigationMenuPrimitive } from '@base-ui/react/navigation-menu';\nimport { useExposedFocusGuards } from '@edyn/ui/lib/focus-guards';\nimport { POPUP_LAYER_CLASS } from '@edyn/ui/lib/popup-list';\nimport { cn } from '@edyn/ui/lib/utils';\nimport { IconChevronDown } from '@tabler/icons-react';\nimport { cva } from 'class-variance-authority';\n\nexport const NavigationMenu = ({\n align = 'start',\n className,\n children,\n ...props\n}: NavigationMenuPrimitive.Root.Props & Pick<NavigationMenuPrimitive.Positioner.Props, 'align'>) => {\n return (\n <NavigationMenuPrimitive.Root\n data-slot=\"navigation-menu\"\n className={cn('group/navigation-menu relative flex max-w-max flex-1 items-center justify-center', className)}\n {...props}\n >\n {children}\n <NavigationMenuPositioner align={align} />\n </NavigationMenuPrimitive.Root>\n );\n};\n\nexport const NavigationMenuList = ({ className, ...props }: React.ComponentPropsWithRef<typeof NavigationMenuPrimitive.List>) => {\n return (\n <NavigationMenuPrimitive.List\n data-slot=\"navigation-menu-list\"\n className={cn('group flex flex-1 list-none items-center justify-center gap-0', className)}\n {...props}\n />\n );\n};\n\nexport const NavigationMenuItem = ({ className, ...props }: React.ComponentPropsWithRef<typeof NavigationMenuPrimitive.Item>) => {\n return <NavigationMenuPrimitive.Item data-slot=\"navigation-menu-item\" className={cn('relative', className)} {...props} />;\n};\n\nexport const navigationMenuTriggerStyle = cva(\n 'group/navigation-menu-trigger inline-flex h-9 w-max items-center justify-center rounded-lg px-2.5 py-1.5 text-sm font-medium transition-all outline-none motion-reduce:transition-none hover:bg-muted focus:bg-muted focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50 data-popup-open:bg-muted/50 data-popup-open:hover:bg-muted data-open:bg-muted/50 data-open:hover:bg-muted data-open:focus:bg-muted',\n);\n\nexport const NavigationMenuTrigger = ({ className, children, ...props }: NavigationMenuPrimitive.Trigger.Props) => {\n return (\n <NavigationMenuPrimitive.Trigger data-slot=\"navigation-menu-trigger\" className={cn(navigationMenuTriggerStyle(), 'group', className)} {...props}>\n {children}{' '}\n <IconChevronDown\n className=\"relative top-px ml-1 size-3 transition duration-300 motion-reduce:transition-none group-data-popup-open/navigation-menu-trigger:rotate-180 group-data-open/navigation-menu-trigger:rotate-180\"\n aria-hidden=\"true\"\n />\n </NavigationMenuPrimitive.Trigger>\n );\n};\n\nexport const NavigationMenuContent = ({ className, ...props }: NavigationMenuPrimitive.Content.Props) => {\n useExposedFocusGuards();\n return (\n <NavigationMenuPrimitive.Content\n data-slot=\"navigation-menu-content\"\n className={cn(\n 'motion-reduce:animate-none motion-reduce:transition-none',\n 'data-ending-style:data-[activation-direction=left]:translate-x-[50%] data-ending-style:data-[activation-direction=right]:translate-x-[-50%] data-starting-style:data-[activation-direction=left]:translate-x-[-50%] data-starting-style:data-[activation-direction=right]:translate-x-[50%] h-full w-auto p-1 transition-[opacity,transform,translate] duration-[0.35s] ease-[cubic-bezier(0.22,1,0.36,1)] group-data-[viewport=false]/navigation-menu:rounded-lg group-data-[viewport=false]/navigation-menu:bg-popover group-data-[viewport=false]/navigation-menu:text-popover-foreground group-data-[viewport=false]/navigation-menu:shadow group-data-[viewport=false]/navigation-menu:ring-1 group-data-[viewport=false]/navigation-menu:ring-foreground/10 group-data-[viewport=false]/navigation-menu:duration-300 data-ending-style:opacity-0 data-starting-style:opacity-0 data-[motion=from-end]:slide-in-from-right-52 data-[motion=from-start]:slide-in-from-left-52 data-[motion=to-end]:slide-out-to-right-52 data-[motion=to-start]:slide-out-to-left-52 data-[motion^=from-]:animate-in data-[motion^=from-]:fade-in data-[motion^=to-]:animate-out data-[motion^=to-]:fade-out **:data-[slot=navigation-menu-link]:focus:ring-0 **:data-[slot=navigation-menu-link]:focus:outline-none group-data-[viewport=false]/navigation-menu:data-open:animate-in group-data-[viewport=false]/navigation-menu:data-open:fade-in-0 group-data-[viewport=false]/navigation-menu:data-open:zoom-in-95 group-data-[viewport=false]/navigation-menu:data-closed:animate-out group-data-[viewport=false]/navigation-menu:data-closed:fade-out-0 group-data-[viewport=false]/navigation-menu:data-closed:zoom-out-95',\n className,\n )}\n {...props}\n />\n );\n};\n\nexport const NavigationMenuPositioner = ({\n className,\n side = 'bottom',\n sideOffset = 8,\n align = 'start',\n alignOffset = 0,\n ...props\n}: NavigationMenuPrimitive.Positioner.Props) => {\n return (\n <NavigationMenuPrimitive.Portal>\n <NavigationMenuPrimitive.Positioner\n side={side}\n sideOffset={sideOffset}\n align={align}\n alignOffset={alignOffset}\n className={cn(\n POPUP_LAYER_CLASS,\n 'isolate h-(--positioner-height) w-(--positioner-width) max-w-(--available-width) transition-[top,left,right,bottom] duration-[0.35s] ease-[cubic-bezier(0.22,1,0.36,1)] motion-reduce:transition-none data-instant:transition-none data-[side=bottom]:before:top-[-10px] data-[side=bottom]:before:right-0 data-[side=bottom]:before:left-0',\n className,\n )}\n {...props}\n >\n <NavigationMenuPrimitive.Popup className=\"data-[ending-style]:easing-[ease] xs:w-(--popup-width) relative h-(--popup-height) w-(--popup-width) origin-(--transform-origin) rounded-lg bg-popover text-popover-foreground shadow ring-1 ring-foreground/10 transition-[opacity,transform,width,height,scale,translate] duration-[0.35s] ease-[cubic-bezier(0.22,1,0.36,1)] outline-none motion-reduce:transition-none data-ending-style:scale-90 data-ending-style:opacity-0 data-ending-style:duration-150 data-starting-style:scale-90 data-starting-style:opacity-0\">\n <NavigationMenuPrimitive.Viewport className=\"relative size-full overflow-hidden\" />\n </NavigationMenuPrimitive.Popup>\n </NavigationMenuPrimitive.Positioner>\n </NavigationMenuPrimitive.Portal>\n );\n};\n\nexport const NavigationMenuLink = ({ className, ...props }: NavigationMenuPrimitive.Link.Props) => {\n return (\n <NavigationMenuPrimitive.Link\n data-slot=\"navigation-menu-link\"\n className={cn(\n \"flex items-center gap-2 rounded-lg p-2 text-sm transition-all outline-none motion-reduce:transition-none hover:bg-muted focus:bg-muted focus-visible:outline-1 in-data-[slot=navigation-menu-content]:rounded-md data-active:bg-muted/50 data-active:hover:bg-muted data-active:focus:bg-muted [&_svg:not([class*='size-'])]:size-4\",\n className,\n )}\n {...props}\n />\n );\n};\n\nexport const NavigationMenuIndicator = ({ className, ...props }: React.ComponentPropsWithRef<typeof NavigationMenuPrimitive.Icon>) => {\n return (\n <NavigationMenuPrimitive.Icon\n data-slot=\"navigation-menu-indicator\"\n className={cn(\n 'motion-reduce:animate-none',\n 'top-full z-1 flex h-1.5 items-end justify-center overflow-hidden data-[state=hidden]:animate-out data-[state=hidden]:fade-out data-[state=visible]:animate-in data-[state=visible]:fade-in',\n className,\n )}\n {...props}\n >\n <div className=\"relative top-[60%] h-2 w-2 rotate-45 rounded-tl-sm bg-border shadow-md\" />\n </NavigationMenuPrimitive.Icon>\n );\n};\n"],"mappings":";;;;;;;;AAOA,IAAa,oBAAkB,EAC7B,QAAQ,SACR,WACA,UACA,GAAG,YAC+F;CAClG,OACE,qBAAC,eAAwB,MAAzB;EACE,aAAU;EACV,WAAW,GAAG,oFAAoF,SAAS;EAC3G,GAAI;EAHN,UAAA,CAKG,UACD,oBAAC,0BAAD,EAAiC,MAAQ,CAAA,CACb;;AAElC;AAEA,IAAa,sBAAsB,EAAE,WAAW,GAAG,YAA8E;CAC/H,OACE,oBAAC,eAAwB,MAAzB;EACE,aAAU;EACV,WAAW,GAAG,iEAAiE,SAAS;EACxF,GAAI;CACL,CAAA;AAEL;AAEA,IAAa,sBAAsB,EAAE,WAAW,GAAG,YAA8E;CAC/H,OAAO,oBAAC,eAAwB,MAAzB;EAA8B,aAAU;EAAuB,WAAW,GAAG,YAAY,SAAS;EAAG,GAAI;CAAQ,CAAA;AAC1H;AAEA,IAAa,6BAA6B,IACxC,kaACF;AAEA,IAAa,yBAAyB,EAAE,WAAW,UAAU,GAAG,YAAmD;CACjH,OACE,qBAAC,eAAwB,SAAzB;EAAiC,aAAU;EAA0B,WAAW,GAAG,2BAA2B,GAAG,SAAS,SAAS;EAAG,GAAI;EAA1I,UAAA;GACG;GAAU;GACX,oBAAC,iBAAD;IACE,WAAU;IACV,eAAY;GACb,CAAA;EAC8B;;AAErC;AAEA,IAAa,yBAAyB,EAAE,WAAW,GAAG,YAAmD;CACvG,sBAAsB;CACtB,OACE,oBAAC,eAAwB,SAAzB;EACE,aAAU;EACV,WAAW,GACT,4DACA,ynDACA,SACF;EACA,GAAI;CACL,CAAA;AAEL;AAEA,IAAa,4BAA4B,EACvC,WACA,OAAO,UACP,aAAa,GACb,QAAQ,SACR,cAAc,GACd,GAAG,YAC2C;CAC9C,OACE,oBAAC,eAAwB,QAAzB,EAAA,UACE,oBAAC,eAAwB,YAAzB;EACQ;EACM;EACL;EACM;EACb,WAAW,GACT,mBACA,+UACA,SACF;EACA,GAAI;EAEJ,UAAA,oBAAC,eAAwB,OAAzB;GAA+B,WAAU;GACvC,UAAA,oBAAC,eAAwB,UAAzB,EAAkC,WAAU,qCAAsC,CAAA;EACrD,CAAA;CACG,CAAA,EACN,CAAA;AAEpC;AAEA,IAAa,sBAAsB,EAAE,WAAW,GAAG,YAAgD;CACjG,OACE,oBAAC,eAAwB,MAAzB;EACE,aAAU;EACV,WAAW,GACT,uUACA,SACF;EACA,GAAI;CACL,CAAA;AAEL;AAEA,IAAa,2BAA2B,EAAE,WAAW,GAAG,YAA8E;CACpI,OACE,oBAAC,eAAwB,MAAzB;EACE,aAAU;EACV,WAAW,GACT,8BACA,8LACA,SACF;EACA,GAAI;EAEJ,UAAA,oBAAC,OAAD,EAAK,WAAU,yEAA0E,CAAA;CAC7D,CAAA;AAElC"}
@@ -1,3 +1,4 @@
1
+ import type * as React from 'react';
1
2
  export type TPaginationRangeItem = number | 'ellipsis';
2
3
  /**
3
4
  * Compute the ordered list of page numbers and ellipsis markers to render.
@@ -7,11 +8,11 @@ export type TPaginationRangeItem = number | 'ellipsis';
7
8
  export declare const getPaginationRange: (page: number, count: number, siblingCount?: number) => TPaginationRangeItem[];
8
9
  /** Clamp a page number to the valid [1, count] range (count <= 0 yields 1). */
9
10
  export declare const clampPage: (page: number, count: number) => number;
10
- export interface IPaginationProps {
11
+ export interface IPaginationProps extends Omit<React.ComponentPropsWithoutRef<'nav'>, 'className' | 'children'> {
11
12
  page: number;
12
13
  count: number;
13
14
  onPageChange: (page: number) => void;
14
15
  siblingCount?: number;
15
16
  className?: string;
16
17
  }
17
- export declare const Pagination: ({ page, count, onPageChange, siblingCount, className }: IPaginationProps) => import('react').JSX.Element;
18
+ export declare const Pagination: ({ page, count, onPageChange, siblingCount, className, ...props }: IPaginationProps) => React.JSX.Element;
@@ -0,0 +1,104 @@
1
+ import { cn } from "../../../lib/utils.js";
2
+ import { buttonVariants } from "../button/button.js";
3
+ import { jsx, jsxs } from "react/jsx-runtime";
4
+ import { IconChevronLeft, IconChevronRight, IconDots } from "@tabler/icons-react";
5
+ //#region ../ui/src/components/ui/pagination/pagination.tsx
6
+ /**
7
+ * Compute the ordered list of page numbers and ellipsis markers to render.
8
+ * First and last pages are always included. `siblingCount` controls how many
9
+ * page numbers appear on each side of the current page.
10
+ */
11
+ var getPaginationRange = (page, count, siblingCount = 1) => {
12
+ if (count <= 0) return [];
13
+ const currentPage = Math.min(Math.max(page, 1), count);
14
+ if (count <= 2 * siblingCount + 5) return Array.from({ length: count }, (_, i) => i + 1);
15
+ const leftSiblingStart = Math.max(currentPage - siblingCount, 2);
16
+ const rightSiblingEnd = Math.min(currentPage + siblingCount, count - 1);
17
+ const showLeftEllipsis = leftSiblingStart > 2;
18
+ const showRightEllipsis = rightSiblingEnd < count - 1;
19
+ const range = [1];
20
+ if (showLeftEllipsis) range.push("ellipsis");
21
+ else for (let i = 2; i < leftSiblingStart; i++) range.push(i);
22
+ for (let i = leftSiblingStart; i <= rightSiblingEnd; i++) range.push(i);
23
+ if (showRightEllipsis) range.push("ellipsis");
24
+ else for (let i = rightSiblingEnd + 1; i < count; i++) range.push(i);
25
+ range.push(count);
26
+ return range;
27
+ };
28
+ /** Clamp a page number to the valid [1, count] range (count <= 0 yields 1). */
29
+ var clampPage = (page, count) => Math.min(Math.max(page, 1), Math.max(count, 1));
30
+ var Pagination = ({ page, count, onPageChange, siblingCount = 1, className, ...props }) => {
31
+ const currentPage = clampPage(page, count);
32
+ const range = getPaginationRange(currentPage, count, siblingCount);
33
+ let ellipsisCount = 0;
34
+ const handlePrev = () => {
35
+ if (currentPage > 1) onPageChange(currentPage - 1);
36
+ };
37
+ const handleNext = () => {
38
+ if (currentPage < count) onPageChange(currentPage + 1);
39
+ };
40
+ return /* @__PURE__ */ jsx("nav", {
41
+ "aria-label": "pagination",
42
+ ...props,
43
+ className: cn("mx-auto flex w-full justify-center", className),
44
+ children: /* @__PURE__ */ jsxs("ul", {
45
+ className: "flex flex-row items-center gap-1",
46
+ children: [
47
+ /* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsx("button", {
48
+ type: "button",
49
+ "aria-label": "Go to previous page",
50
+ disabled: currentPage <= 1,
51
+ onClick: handlePrev,
52
+ className: cn(buttonVariants({
53
+ variant: "ghost",
54
+ size: "icon"
55
+ }), "size-8"),
56
+ children: /* @__PURE__ */ jsx(IconChevronLeft, { size: 16 })
57
+ }) }),
58
+ range.map((item) => {
59
+ if (item === "ellipsis") {
60
+ ellipsisCount += 1;
61
+ const ellipsisKey = `ellipsis-${ellipsisCount}`;
62
+ return /* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsx("span", {
63
+ "aria-hidden": "true",
64
+ className: cn(buttonVariants({
65
+ variant: "ghost",
66
+ size: "icon"
67
+ }), "size-8 cursor-default pointer-events-none"),
68
+ children: /* @__PURE__ */ jsx(IconDots, { size: 16 })
69
+ }) }, ellipsisKey);
70
+ }
71
+ const isActive = item === currentPage;
72
+ return /* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsx("button", {
73
+ type: "button",
74
+ "aria-label": `Go to page ${item}`,
75
+ "aria-current": isActive ? "page" : void 0,
76
+ onClick: () => {
77
+ if (!isActive) onPageChange(item);
78
+ },
79
+ className: cn(buttonVariants({
80
+ variant: isActive ? "outline" : "ghost",
81
+ size: "icon"
82
+ }), "size-8", isActive && "pointer-events-none font-semibold"),
83
+ children: item
84
+ }) }, item);
85
+ }),
86
+ /* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsx("button", {
87
+ type: "button",
88
+ "aria-label": "Go to next page",
89
+ disabled: currentPage >= count,
90
+ onClick: handleNext,
91
+ className: cn(buttonVariants({
92
+ variant: "ghost",
93
+ size: "icon"
94
+ }), "size-8"),
95
+ children: /* @__PURE__ */ jsx(IconChevronRight, { size: 16 })
96
+ }) })
97
+ ]
98
+ })
99
+ });
100
+ };
101
+ //#endregion
102
+ export { Pagination, clampPage, getPaginationRange };
103
+
104
+ //# sourceMappingURL=pagination.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pagination.js","names":[],"sources":["../../../../../../../ui/src/components/ui/pagination/pagination.tsx"],"sourcesContent":["import { cn } from '@edyn/ui/lib/utils';\nimport { IconChevronLeft, IconChevronRight, IconDots } from '@tabler/icons-react';\nimport type * as React from 'react';\nimport { buttonVariants } from '../button/button';\n\nexport type TPaginationRangeItem = number | 'ellipsis';\n\n/**\n * Compute the ordered list of page numbers and ellipsis markers to render.\n * First and last pages are always included. `siblingCount` controls how many\n * page numbers appear on each side of the current page.\n */\nexport const getPaginationRange = (page: number, count: number, siblingCount = 1): TPaginationRangeItem[] => {\n if (count <= 0) {\n return [];\n }\n\n // Clamp the current page to [1, count].\n const currentPage = Math.min(Math.max(page, 1), count);\n\n // When count is small enough to show every page, return all pages without ellipsis.\n // Threshold: first + (siblingCount pages each side of page) + last + 2 gap pages = 2*siblingCount + 5.\n // E.g. siblingCount=1 -> threshold 7; siblingCount=2 -> threshold 9.\n if (count <= 2 * siblingCount + 5) {\n return Array.from({ length: count }, (_, i) => i + 1);\n }\n\n const leftSiblingStart = Math.max(currentPage - siblingCount, 2);\n const rightSiblingEnd = Math.min(currentPage + siblingCount, count - 1);\n\n const showLeftEllipsis = leftSiblingStart > 2;\n const showRightEllipsis = rightSiblingEnd < count - 1;\n\n const range: TPaginationRangeItem[] = [1];\n\n if (showLeftEllipsis) {\n range.push('ellipsis');\n } else {\n // Fill pages between 1 and leftSiblingStart (exclusive) if the gap is small.\n for (let i = 2; i < leftSiblingStart; i++) {\n range.push(i);\n }\n }\n\n for (let i = leftSiblingStart; i <= rightSiblingEnd; i++) {\n range.push(i);\n }\n\n if (showRightEllipsis) {\n range.push('ellipsis');\n } else {\n // Fill pages between rightSiblingEnd (exclusive) and last.\n for (let i = rightSiblingEnd + 1; i < count; i++) {\n range.push(i);\n }\n }\n\n range.push(count);\n\n return range;\n};\n\n/** Clamp a page number to the valid [1, count] range (count <= 0 yields 1). */\nexport const clampPage = (page: number, count: number): number => Math.min(Math.max(page, 1), Math.max(count, 1));\n\nexport interface IPaginationProps extends Omit<React.ComponentPropsWithoutRef<'nav'>, 'className' | 'children'> {\n page: number;\n count: number;\n onPageChange: (page: number) => void;\n siblingCount?: number;\n className?: string;\n}\n\nexport const Pagination = ({ page, count, onPageChange, siblingCount = 1, className, ...props }: IPaginationProps) => {\n // Clamp once and use the clamped value everywhere (active marker, prev/next\n // steps, disabled checks). getPaginationRange clamps internally too; the\n // component must agree with it, or an out-of-range `page` leaves no page marked\n // current and steps prev/next from the wrong base.\n const currentPage = clampPage(page, count);\n const range = getPaginationRange(currentPage, count, siblingCount);\n // Track how many ellipsis items we've seen to give each a stable unique key.\n let ellipsisCount = 0;\n\n const handlePrev = () => {\n if (currentPage > 1) {\n onPageChange(currentPage - 1);\n }\n };\n\n const handleNext = () => {\n if (currentPage < count) {\n onPageChange(currentPage + 1);\n }\n };\n\n return (\n <nav aria-label=\"pagination\" {...props} className={cn('mx-auto flex w-full justify-center', className)}>\n <ul className=\"flex flex-row items-center gap-1\">\n <li>\n <button\n type=\"button\"\n aria-label=\"Go to previous page\"\n disabled={currentPage <= 1}\n onClick={handlePrev}\n className={cn(buttonVariants({ variant: 'ghost', size: 'icon' }), 'size-8')}\n >\n <IconChevronLeft size={16} />\n </button>\n </li>\n\n {range.map((item) => {\n if (item === 'ellipsis') {\n ellipsisCount += 1;\n const ellipsisKey = `ellipsis-${ellipsisCount}`;\n return (\n <li key={ellipsisKey}>\n <span\n aria-hidden=\"true\"\n className={cn(buttonVariants({ variant: 'ghost', size: 'icon' }), 'size-8 cursor-default pointer-events-none')}\n >\n <IconDots size={16} />\n </span>\n </li>\n );\n }\n\n const isActive = item === currentPage;\n return (\n <li key={item}>\n <button\n type=\"button\"\n aria-label={`Go to page ${item}`}\n aria-current={isActive ? 'page' : undefined}\n onClick={() => {\n if (!isActive) {\n onPageChange(item);\n }\n }}\n className={cn(\n buttonVariants({ variant: isActive ? 'outline' : 'ghost', size: 'icon' }),\n 'size-8',\n isActive && 'pointer-events-none font-semibold',\n )}\n >\n {item}\n </button>\n </li>\n );\n })}\n\n <li>\n <button\n type=\"button\"\n aria-label=\"Go to next page\"\n disabled={currentPage >= count}\n onClick={handleNext}\n className={cn(buttonVariants({ variant: 'ghost', size: 'icon' }), 'size-8')}\n >\n <IconChevronRight size={16} />\n </button>\n </li>\n </ul>\n </nav>\n );\n};\n"],"mappings":";;;;;;;;;;AAYA,IAAa,sBAAsB,MAAc,OAAe,eAAe,MAA8B;CAC3G,IAAI,SAAS,GACX,OAAO,CAAC;CAIV,MAAM,cAAc,KAAK,IAAI,KAAK,IAAI,MAAM,CAAC,GAAG,KAAK;CAKrD,IAAI,SAAS,IAAI,eAAe,GAC9B,OAAO,MAAM,KAAK,EAAE,QAAQ,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC;CAGtD,MAAM,mBAAmB,KAAK,IAAI,cAAc,cAAc,CAAC;CAC/D,MAAM,kBAAkB,KAAK,IAAI,cAAc,cAAc,QAAQ,CAAC;CAEtE,MAAM,mBAAmB,mBAAmB;CAC5C,MAAM,oBAAoB,kBAAkB,QAAQ;CAEpD,MAAM,QAAgC,CAAC,CAAC;CAExC,IAAI,kBACF,MAAM,KAAK,UAAU;MAGrB,KAAK,IAAI,IAAI,GAAG,IAAI,kBAAkB,KACpC,MAAM,KAAK,CAAC;CAIhB,KAAK,IAAI,IAAI,kBAAkB,KAAK,iBAAiB,KACnD,MAAM,KAAK,CAAC;CAGd,IAAI,mBACF,MAAM,KAAK,UAAU;MAGrB,KAAK,IAAI,IAAI,kBAAkB,GAAG,IAAI,OAAO,KAC3C,MAAM,KAAK,CAAC;CAIhB,MAAM,KAAK,KAAK;CAEhB,OAAO;AACT;;AAGA,IAAa,aAAa,MAAc,UAA0B,KAAK,IAAI,KAAK,IAAI,MAAM,CAAC,GAAG,KAAK,IAAI,OAAO,CAAC,CAAC;AAUhH,IAAa,cAAc,EAAE,MAAM,OAAO,cAAc,eAAe,GAAG,WAAW,GAAG,YAA8B;CAKpH,MAAM,cAAc,UAAU,MAAM,KAAK;CACzC,MAAM,QAAQ,mBAAmB,aAAa,OAAO,YAAY;CAEjE,IAAI,gBAAgB;CAEpB,MAAM,mBAAmB;EACvB,IAAI,cAAc,GAChB,aAAa,cAAc,CAAC;CAEhC;CAEA,MAAM,mBAAmB;EACvB,IAAI,cAAc,OAChB,aAAa,cAAc,CAAC;CAEhC;CAEA,OACE,oBAAC,OAAD;EAAK,cAAW;EAAa,GAAI;EAAO,WAAW,GAAG,sCAAsC,SAAS;EACnG,UAAA,qBAAC,MAAD;GAAI,WAAU;GAAd,UAAA;IACE,oBAAC,MAAD,EAAA,UACE,oBAAC,UAAD;KACE,MAAK;KACL,cAAW;KACX,UAAU,eAAe;KACzB,SAAS;KACT,WAAW,GAAG,eAAe;MAAE,SAAS;MAAS,MAAM;KAAO,CAAC,GAAG,QAAQ;KAE1E,UAAA,oBAAC,iBAAD,EAAiB,MAAM,GAAK,CAAA;IACtB,CAAA,EACN,CAAA;IAEH,MAAM,KAAK,SAAS;KACnB,IAAI,SAAS,YAAY;MACvB,iBAAiB;MACjB,MAAM,cAAc,YAAY;MAChC,OACE,oBAAC,MAAD,EAAA,UACE,oBAAC,QAAD;OACE,eAAY;OACZ,WAAW,GAAG,eAAe;QAAE,SAAS;QAAS,MAAM;OAAO,CAAC,GAAG,2CAA2C;OAE7G,UAAA,oBAAC,UAAD,EAAU,MAAM,GAAK,CAAA;MACjB,CAAA,EACJ,GAPK,WAOL;KAER;KAEA,MAAM,WAAW,SAAS;KAC1B,OACE,oBAAC,MAAD,EAAA,UACE,oBAAC,UAAD;MACE,MAAK;MACL,cAAY,cAAc;MAC1B,gBAAc,WAAW,SAAS,KAAA;MAClC,eAAe;OACb,IAAI,CAAC,UACH,aAAa,IAAI;MAErB;MACA,WAAW,GACT,eAAe;OAAE,SAAS,WAAW,YAAY;OAAS,MAAM;MAAO,CAAC,GACxE,UACA,YAAY,mCACd;MAEC,UAAA;KACK,CAAA,EACN,GAlBK,IAkBL;IAER,CAAC;IAED,oBAAC,MAAD,EAAA,UACE,oBAAC,UAAD;KACE,MAAK;KACL,cAAW;KACX,UAAU,eAAe;KACzB,SAAS;KACT,WAAW,GAAG,eAAe;MAAE,SAAS;MAAS,MAAM;KAAO,CAAC,GAAG,QAAQ;KAE1E,UAAA,oBAAC,kBAAD,EAAkB,MAAM,GAAK,CAAA;IACvB,CAAA,EACN,CAAA;GACF;;CACD,CAAA;AAET"}
@@ -2,7 +2,7 @@ import { Popover as PopoverPrimitive } from '@base-ui/react/popover';
2
2
  import type * as React from 'react';
3
3
  export declare const Popover: ({ ...props }: PopoverPrimitive.Root.Props) => React.JSX.Element;
4
4
  export declare const PopoverTrigger: ({ ...props }: PopoverPrimitive.Trigger.Props) => React.JSX.Element;
5
- export declare const PopoverContent: ({ className, align, alignOffset, side, sideOffset, ...props }: PopoverPrimitive.Popup.Props & Pick<PopoverPrimitive.Positioner.Props, "align" | "alignOffset" | "side" | "sideOffset">) => React.JSX.Element;
5
+ export declare const PopoverContent: ({ className, align, alignOffset, side, sideOffset, anchor, ...props }: PopoverPrimitive.Popup.Props & Pick<PopoverPrimitive.Positioner.Props, "align" | "alignOffset" | "anchor" | "side" | "sideOffset">) => React.JSX.Element;
6
6
  export declare const PopoverHeader: ({ className, ...props }: React.ComponentProps<"div">) => React.JSX.Element;
7
7
  export declare const PopoverTitle: ({ className, ...props }: PopoverPrimitive.Title.Props) => React.JSX.Element;
8
8
  export declare const PopoverDescription: ({ className, ...props }: PopoverPrimitive.Description.Props) => React.JSX.Element;
@@ -0,0 +1,59 @@
1
+ import { cn } from "../../../lib/utils.js";
2
+ import { useExposedFocusGuards } from "../../../lib/focus-guards.js";
3
+ import { POPUP_LAYER_CLASS } from "../../../lib/popup-list.js";
4
+ import { jsx } from "react/jsx-runtime";
5
+ import { Popover } from "@base-ui/react/popover";
6
+ //#region ../ui/src/components/ui/popover/popover.tsx
7
+ var Popover$1 = ({ ...props }) => {
8
+ return /* @__PURE__ */ jsx(Popover.Root, {
9
+ "data-slot": "popover",
10
+ ...props
11
+ });
12
+ };
13
+ var PopoverTrigger = ({ ...props }) => {
14
+ return /* @__PURE__ */ jsx(Popover.Trigger, {
15
+ "data-slot": "popover-trigger",
16
+ ...props
17
+ });
18
+ };
19
+ var PopoverContent = ({ className, align = "center", alignOffset = 0, side = "bottom", sideOffset = 4, anchor, ...props }) => {
20
+ useExposedFocusGuards();
21
+ return /* @__PURE__ */ jsx(Popover.Portal, { children: /* @__PURE__ */ jsx(Popover.Positioner, {
22
+ align,
23
+ alignOffset,
24
+ anchor,
25
+ side,
26
+ sideOffset,
27
+ className: cn(POPUP_LAYER_CLASS, "isolate"),
28
+ children: /* @__PURE__ */ jsx(Popover.Popup, {
29
+ "data-slot": "popover-content",
30
+ className: cn("z-50 flex w-72 origin-(--transform-origin) flex-col gap-2.5 rounded-lg bg-popover p-2.5 text-sm text-popover-foreground shadow-md ring-1 ring-foreground/10 outline-hidden duration-100 motion-reduce:animate-none data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 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),
31
+ ...props
32
+ })
33
+ }) });
34
+ };
35
+ var PopoverHeader = ({ className, ...props }) => {
36
+ return /* @__PURE__ */ jsx("div", {
37
+ "data-slot": "popover-header",
38
+ className: cn("flex flex-col gap-0.5 text-sm", className),
39
+ ...props
40
+ });
41
+ };
42
+ var PopoverTitle = ({ className, ...props }) => {
43
+ return /* @__PURE__ */ jsx(Popover.Title, {
44
+ "data-slot": "popover-title",
45
+ className: cn("font-medium", className),
46
+ ...props
47
+ });
48
+ };
49
+ var PopoverDescription = ({ className, ...props }) => {
50
+ return /* @__PURE__ */ jsx(Popover.Description, {
51
+ "data-slot": "popover-description",
52
+ className: cn("text-muted-foreground", className),
53
+ ...props
54
+ });
55
+ };
56
+ //#endregion
57
+ export { Popover$1 as Popover, PopoverContent, PopoverDescription, PopoverHeader, PopoverTitle, PopoverTrigger };
58
+
59
+ //# sourceMappingURL=popover.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"popover.js","names":[],"sources":["../../../../../../../ui/src/components/ui/popover/popover.tsx"],"sourcesContent":["import { Popover as PopoverPrimitive } from '@base-ui/react/popover';\nimport { useExposedFocusGuards } from '@edyn/ui/lib/focus-guards';\nimport { POPUP_LAYER_CLASS } from '@edyn/ui/lib/popup-list';\nimport { cn } from '@edyn/ui/lib/utils';\nimport type * as React from 'react';\n\nexport const Popover = ({ ...props }: PopoverPrimitive.Root.Props) => {\n return <PopoverPrimitive.Root data-slot=\"popover\" {...props} />;\n};\n\nexport const PopoverTrigger = ({ ...props }: PopoverPrimitive.Trigger.Props) => {\n return <PopoverPrimitive.Trigger data-slot=\"popover-trigger\" {...props} />;\n};\n\nexport const PopoverContent = ({\n className,\n align = 'center',\n alignOffset = 0,\n side = 'bottom',\n sideOffset = 4,\n anchor,\n ...props\n}: PopoverPrimitive.Popup.Props & Pick<PopoverPrimitive.Positioner.Props, 'align' | 'alignOffset' | 'anchor' | 'side' | 'sideOffset'>) => {\n useExposedFocusGuards();\n return (\n <PopoverPrimitive.Portal>\n <PopoverPrimitive.Positioner\n align={align}\n alignOffset={alignOffset}\n anchor={anchor}\n side={side}\n sideOffset={sideOffset}\n className={cn(POPUP_LAYER_CLASS, 'isolate')}\n >\n <PopoverPrimitive.Popup\n data-slot=\"popover-content\"\n className={cn(\n 'z-50 flex w-72 origin-(--transform-origin) flex-col gap-2.5 rounded-lg bg-popover p-2.5 text-sm text-popover-foreground shadow-md ring-1 ring-foreground/10 outline-hidden duration-100 motion-reduce:animate-none data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 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 </PopoverPrimitive.Positioner>\n </PopoverPrimitive.Portal>\n );\n};\n\nexport const PopoverHeader = ({ className, ...props }: React.ComponentProps<'div'>) => {\n return <div data-slot=\"popover-header\" className={cn('flex flex-col gap-0.5 text-sm', className)} {...props} />;\n};\n\nexport const PopoverTitle = ({ className, ...props }: PopoverPrimitive.Title.Props) => {\n return <PopoverPrimitive.Title data-slot=\"popover-title\" className={cn('font-medium', className)} {...props} />;\n};\n\nexport const PopoverDescription = ({ className, ...props }: PopoverPrimitive.Description.Props) => {\n return <PopoverPrimitive.Description data-slot=\"popover-description\" className={cn('text-muted-foreground', className)} {...props} />;\n};\n"],"mappings":";;;;;;AAMA,IAAa,aAAW,EAAE,GAAG,YAAyC;CACpE,OAAO,oBAAC,QAAiB,MAAlB;EAAuB,aAAU;EAAU,GAAI;CAAQ,CAAA;AAChE;AAEA,IAAa,kBAAkB,EAAE,GAAG,YAA4C;CAC9E,OAAO,oBAAC,QAAiB,SAAlB;EAA0B,aAAU;EAAkB,GAAI;CAAQ,CAAA;AAC3E;AAEA,IAAa,kBAAkB,EAC7B,WACA,QAAQ,UACR,cAAc,GACd,OAAO,UACP,aAAa,GACb,QACA,GAAG,YACqI;CACxI,sBAAsB;CACtB,OACE,oBAAC,QAAiB,QAAlB,EAAA,UACE,oBAAC,QAAiB,YAAlB;EACS;EACM;EACL;EACF;EACM;EACZ,WAAW,GAAG,mBAAmB,SAAS;EAE1C,UAAA,oBAAC,QAAiB,OAAlB;GACE,aAAU;GACV,WAAW,GACT,klBACA,SACF;GACA,GAAI;EACL,CAAA;CAC0B,CAAA,EACN,CAAA;AAE7B;AAEA,IAAa,iBAAiB,EAAE,WAAW,GAAG,YAAyC;CACrF,OAAO,oBAAC,OAAD;EAAK,aAAU;EAAiB,WAAW,GAAG,iCAAiC,SAAS;EAAG,GAAI;CAAQ,CAAA;AAChH;AAEA,IAAa,gBAAgB,EAAE,WAAW,GAAG,YAA0C;CACrF,OAAO,oBAAC,QAAiB,OAAlB;EAAwB,aAAU;EAAgB,WAAW,GAAG,eAAe,SAAS;EAAG,GAAI;CAAQ,CAAA;AAChH;AAEA,IAAa,sBAAsB,EAAE,WAAW,GAAG,YAAgD;CACjG,OAAO,oBAAC,QAAiB,aAAlB;EAA8B,aAAU;EAAsB,WAAW,GAAG,yBAAyB,SAAS;EAAG,GAAI;CAAQ,CAAA;AACtI"}
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Progress tones: a closed set of theme tokens, never a free class string.
3
+ *
4
+ * PATH TAKEN: classes and attributes do not depend on layout, so happy-dom is enough. The
5
+ * tokens' contrast is measured from the real tokens.css below, and the rendered colours in
6
+ * the browser by e2e/progress-tone.spec.ts.
7
+ */
8
+ export {};
@@ -1,5 +1,47 @@
1
1
  import { Progress as ProgressPrimitive } from '@base-ui/react/progress';
2
+ import { VariantProps } from 'class-variance-authority';
3
+ /**
4
+ * The tones: a closed set of semantic colours rather than a class string, so a bar cannot carry a
5
+ * colour the theme does not define and dark mode and a re-theme keep working. Each is the theme token
6
+ * the fill uses; the track is a 20% tint of the same token.
7
+ */
8
+ declare const TONE_TOKEN: {
9
+ readonly default: "var(--primary)";
10
+ readonly info: "var(--info)";
11
+ readonly success: "var(--success)";
12
+ readonly warning: "var(--warning)";
13
+ readonly destructive: "var(--destructive)";
14
+ };
15
+ export type TProgressTone = keyof typeof TONE_TOKEN;
16
+ /**
17
+ * Colours an app can set without a class string. --progress-color replaces the fill (any colour, such as an
18
+ * app's own status tokens); --progress-track replaces the track, which does not follow the fill: an app
19
+ * that wants a neutral track sets it to var(--muted). Both are read where the bar is, so they follow the
20
+ * theme and can be set on :root or on any ancestor.
21
+ */
22
+ export declare const progressFill: (tone: TProgressTone) => string;
23
+ export declare const progressTrack: (tone: TProgressTone) => string;
24
+ /**
25
+ * How the fill eases its width. The defaults are the 300ms ease-in-out it always had; an app retunes them
26
+ * with --progress-duration and --progress-ease, or turns the easing off with `animated={false}` when the
27
+ * number it shows is itself animated and the bar is driven from the same clock.
28
+ */
29
+ export declare const PROGRESS_DURATION = "var(--progress-duration, 300ms)";
30
+ export declare const PROGRESS_EASE = "var(--progress-ease, cubic-bezier(0.4, 0, 0.2, 1))";
31
+ declare const progressTrackVariants: (props?: ({
32
+ size?: "default" | "sm" | null | undefined;
33
+ } & import('class-variance-authority/types').ClassProp) | undefined) => string;
2
34
  export interface IProgressProps extends Omit<ProgressPrimitive.Root.Props, 'value'> {
3
35
  value?: number | null;
36
+ /** The bar's colour: a share of a total reads as `warning` when nearly used up, `success` when done. */
37
+ tone?: TProgressTone;
38
+ /** 4px (`sm`) or 8px (default) tall. */
39
+ size?: VariantProps<typeof progressTrackVariants>['size'];
40
+ /**
41
+ * Whether the fill eases when `value` changes. Turn it off when the value already moves smoothly
42
+ * (driven from an animated number's clock), or the bar eases a second time behind it.
43
+ */
44
+ animated?: boolean;
4
45
  }
5
- export declare const Progress: ({ value, className, ...props }: IProgressProps) => import('react').JSX.Element;
46
+ export declare const Progress: ({ value, tone, size, animated, className, ...props }: IProgressProps) => import('react').JSX.Element;
47
+ export {};
@@ -0,0 +1,70 @@
1
+ import { cn } from "../../../lib/utils.js";
2
+ import { jsx } from "react/jsx-runtime";
3
+ import { cva } from "class-variance-authority";
4
+ import { Progress } from "@base-ui/react/progress";
5
+ //#region ../ui/src/components/ui/progress/progress.tsx
6
+ /**
7
+ * The tones: a closed set of semantic colours rather than a class string, so a bar cannot carry a
8
+ * colour the theme does not define and dark mode and a re-theme keep working. Each is the theme token
9
+ * the fill uses; the track is a 20% tint of the same token.
10
+ */
11
+ var TONE_TOKEN = {
12
+ default: "var(--primary)",
13
+ info: "var(--info)",
14
+ success: "var(--success)",
15
+ warning: "var(--warning)",
16
+ destructive: "var(--destructive)"
17
+ };
18
+ /**
19
+ * Colours an app can set without a class string. --progress-color replaces the fill (any colour, such as an
20
+ * app's own status tokens); --progress-track replaces the track, which does not follow the fill: an app
21
+ * that wants a neutral track sets it to var(--muted). Both are read where the bar is, so they follow the
22
+ * theme and can be set on :root or on any ancestor.
23
+ */
24
+ var progressFill = (tone) => `var(--progress-color, ${TONE_TOKEN[tone]})`;
25
+ var progressTrack = (tone) => `var(--progress-track, color-mix(in oklab, ${TONE_TOKEN[tone]} 20%, transparent))`;
26
+ /**
27
+ * How the fill eases its width. The defaults are the 300ms ease-in-out it always had; an app retunes them
28
+ * with --progress-duration and --progress-ease, or turns the easing off with `animated={false}` when the
29
+ * number it shows is itself animated and the bar is driven from the same clock.
30
+ */
31
+ var PROGRESS_DURATION = "var(--progress-duration, 300ms)";
32
+ var PROGRESS_EASE = "var(--progress-ease, cubic-bezier(0.4, 0, 0.2, 1))";
33
+ var progressTrackVariants = cva("relative w-full overflow-hidden rounded-full", {
34
+ variants: { size: {
35
+ sm: "h-1",
36
+ default: "h-2"
37
+ } },
38
+ defaultVariants: { size: "default" }
39
+ });
40
+ var Progress$1 = ({ value = null, tone = "default", size, animated = true, className, ...props }) => {
41
+ const fillStyle = {
42
+ backgroundColor: progressFill(tone),
43
+ ...value != null ? { width: `${value}%` } : null,
44
+ ...animated ? {
45
+ transitionDuration: PROGRESS_DURATION,
46
+ transitionTimingFunction: PROGRESS_EASE
47
+ } : null
48
+ };
49
+ return /* @__PURE__ */ jsx(Progress.Root, {
50
+ "data-slot": "progress",
51
+ value: value ?? null,
52
+ className: cn("w-full", className),
53
+ ...props,
54
+ children: /* @__PURE__ */ jsx(Progress.Track, {
55
+ "data-slot": "progress-track",
56
+ className: progressTrackVariants({ size }),
57
+ style: { backgroundColor: progressTrack(tone) },
58
+ children: /* @__PURE__ */ jsx(Progress.Indicator, {
59
+ "data-slot": "progress-indicator",
60
+ "data-tone": tone,
61
+ className: cn("h-full rounded-full motion-reduce:transition-none motion-reduce:animate-none data-indeterminate:w-1/3 data-indeterminate:animate-[progress-indeterminate_1.5s_ease-in-out_infinite]", animated ? "transition-[width] duration-300 ease-in-out" : "transition-none"),
62
+ style: fillStyle
63
+ })
64
+ })
65
+ });
66
+ };
67
+ //#endregion
68
+ export { PROGRESS_DURATION, PROGRESS_EASE, Progress$1 as Progress, progressFill, progressTrack };
69
+
70
+ //# sourceMappingURL=progress.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"progress.js","names":[],"sources":["../../../../../../../ui/src/components/ui/progress/progress.tsx"],"sourcesContent":["import { Progress as ProgressPrimitive } from '@base-ui/react/progress';\nimport { cn } from '@edyn/ui/lib/utils';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport type { CSSProperties } from 'react';\n\n/**\n * The tones: a closed set of semantic colours rather than a class string, so a bar cannot carry a\n * colour the theme does not define and dark mode and a re-theme keep working. Each is the theme token\n * the fill uses; the track is a 20% tint of the same token.\n */\nconst TONE_TOKEN = {\n default: 'var(--primary)',\n info: 'var(--info)',\n success: 'var(--success)',\n warning: 'var(--warning)',\n destructive: 'var(--destructive)',\n} as const;\n\nexport type TProgressTone = keyof typeof TONE_TOKEN;\n\n/**\n * Colours an app can set without a class string. --progress-color replaces the fill (any colour, such as an\n * app's own status tokens); --progress-track replaces the track, which does not follow the fill: an app\n * that wants a neutral track sets it to var(--muted). Both are read where the bar is, so they follow the\n * theme and can be set on :root or on any ancestor.\n */\nexport const progressFill = (tone: TProgressTone): string => `var(--progress-color, ${TONE_TOKEN[tone]})`;\n\nexport const progressTrack = (tone: TProgressTone): string => `var(--progress-track, color-mix(in oklab, ${TONE_TOKEN[tone]} 20%, transparent))`;\n\n/**\n * How the fill eases its width. The defaults are the 300ms ease-in-out it always had; an app retunes them\n * with --progress-duration and --progress-ease, or turns the easing off with `animated={false}` when the\n * number it shows is itself animated and the bar is driven from the same clock.\n */\nexport const PROGRESS_DURATION = 'var(--progress-duration, 300ms)';\nexport const PROGRESS_EASE = 'var(--progress-ease, cubic-bezier(0.4, 0, 0.2, 1))';\n\nconst progressTrackVariants = cva('relative w-full overflow-hidden rounded-full', {\n variants: {\n size: {\n sm: 'h-1',\n default: 'h-2',\n },\n },\n defaultVariants: { size: 'default' },\n});\n\nexport interface IProgressProps extends Omit<ProgressPrimitive.Root.Props, 'value'> {\n value?: number | null;\n /** The bar's colour: a share of a total reads as `warning` when nearly used up, `success` when done. */\n tone?: TProgressTone;\n /** 4px (`sm`) or 8px (default) tall. */\n size?: VariantProps<typeof progressTrackVariants>['size'];\n /**\n * Whether the fill eases when `value` changes. Turn it off when the value already moves smoothly\n * (driven from an animated number's clock), or the bar eases a second time behind it.\n */\n animated?: boolean;\n}\n\nexport const Progress = ({ value = null, tone = 'default', size, animated = true, className, ...props }: IProgressProps) => {\n const fillStyle: CSSProperties = {\n backgroundColor: progressFill(tone),\n ...(value != null ? { width: `${value}%` } : null),\n ...(animated ? { transitionDuration: PROGRESS_DURATION, transitionTimingFunction: PROGRESS_EASE } : null),\n };\n return (\n <ProgressPrimitive.Root data-slot=\"progress\" value={value ?? null} className={cn('w-full', className)} {...props}>\n <ProgressPrimitive.Track\n data-slot=\"progress-track\"\n className={progressTrackVariants({ size })}\n style={{ backgroundColor: progressTrack(tone) }}\n >\n <ProgressPrimitive.Indicator\n data-slot=\"progress-indicator\"\n data-tone={tone}\n className={cn(\n 'h-full rounded-full motion-reduce:transition-none motion-reduce:animate-none data-indeterminate:w-1/3 data-indeterminate:animate-[progress-indeterminate_1.5s_ease-in-out_infinite]',\n animated ? 'transition-[width] duration-300 ease-in-out' : 'transition-none',\n )}\n style={fillStyle}\n />\n </ProgressPrimitive.Track>\n </ProgressPrimitive.Root>\n );\n};\n"],"mappings":";;;;;;;;;;AAUA,IAAM,aAAa;CACjB,SAAS;CACT,MAAM;CACN,SAAS;CACT,SAAS;CACT,aAAa;AACf;;;;;;;AAUA,IAAa,gBAAgB,SAAgC,yBAAyB,WAAW,MAAM;AAEvG,IAAa,iBAAiB,SAAgC,6CAA6C,WAAW,MAAM;;;;;;AAO5H,IAAa,oBAAoB;AACjC,IAAa,gBAAgB;AAE7B,IAAM,wBAAwB,IAAI,gDAAgD;CAChF,UAAU,EACR,MAAM;EACJ,IAAI;EACJ,SAAS;CACX,EACF;CACA,iBAAiB,EAAE,MAAM,UAAU;AACrC,CAAC;AAeD,IAAa,cAAY,EAAE,QAAQ,MAAM,OAAO,WAAW,MAAM,WAAW,MAAM,WAAW,GAAG,YAA4B;CAC1H,MAAM,YAA2B;EAC/B,iBAAiB,aAAa,IAAI;EAClC,GAAI,SAAS,OAAO,EAAE,OAAO,GAAG,MAAM,GAAG,IAAI;EAC7C,GAAI,WAAW;GAAE,oBAAoB;GAAmB,0BAA0B;EAAc,IAAI;CACtG;CACA,OACE,oBAAC,SAAkB,MAAnB;EAAwB,aAAU;EAAW,OAAO,SAAS;EAAM,WAAW,GAAG,UAAU,SAAS;EAAG,GAAI;EACzG,UAAA,oBAAC,SAAkB,OAAnB;GACE,aAAU;GACV,WAAW,sBAAsB,EAAE,KAAK,CAAC;GACzC,OAAO,EAAE,iBAAiB,cAAc,IAAI,EAAE;GAE9C,UAAA,oBAAC,SAAkB,WAAnB;IACE,aAAU;IACV,aAAW;IACX,WAAW,GACT,uLACA,WAAW,gDAAgD,iBAC7D;IACA,OAAO;GACR,CAAA;EACsB,CAAA;CACH,CAAA;AAE5B"}