@cognite/aura 0.3.4 → 1.46104.0

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 (446) hide show
  1. package/CHANGELOG.md +264 -0
  2. package/DESIGN.md +638 -281
  3. package/LICENSE +21 -0
  4. package/README.md +48 -13
  5. package/dist/colors-deprecated.css +587 -0
  6. package/dist/colors.css +803 -830
  7. package/dist/components/index.d.ts +63 -57
  8. package/dist/components/index.js +62 -59
  9. package/dist/components/index.js.map +1 -0
  10. package/dist/components/ui/core/accordion/accordion.d.ts +19 -18
  11. package/dist/components/ui/core/accordion/accordion.js +99 -78
  12. package/dist/components/ui/core/accordion/accordion.js.map +1 -0
  13. package/dist/components/ui/core/action-toolbar/action-toolbar-motion.d.ts +8 -0
  14. package/dist/components/ui/core/action-toolbar/action-toolbar-motion.js +125 -0
  15. package/dist/components/ui/core/action-toolbar/action-toolbar-motion.js.map +1 -0
  16. package/dist/components/ui/core/action-toolbar/action-toolbar.d.ts +31 -31
  17. package/dist/components/ui/core/action-toolbar/action-toolbar.js +156 -106
  18. package/dist/components/ui/core/action-toolbar/action-toolbar.js.map +1 -0
  19. package/dist/components/ui/core/alert/alert.d.ts +25 -25
  20. package/dist/components/ui/core/alert/alert.js +181 -152
  21. package/dist/components/ui/core/alert/alert.js.map +1 -0
  22. package/dist/components/ui/core/avatar/avatar.d.ts +10 -9
  23. package/dist/components/ui/core/avatar/avatar.js +75 -65
  24. package/dist/components/ui/core/avatar/avatar.js.map +1 -0
  25. package/dist/components/ui/core/badge/badge.d.ts +13 -12
  26. package/dist/components/ui/core/badge/badge.js +88 -72
  27. package/dist/components/ui/core/badge/badge.js.map +1 -0
  28. package/dist/components/ui/core/banner/banner.d.ts +18 -18
  29. package/dist/components/ui/core/banner/banner.js +179 -142
  30. package/dist/components/ui/core/banner/banner.js.map +1 -0
  31. package/dist/components/ui/core/breadcrumb/breadcrumb.d.ts +12 -12
  32. package/dist/components/ui/core/breadcrumb/breadcrumb.js +139 -104
  33. package/dist/components/ui/core/breadcrumb/breadcrumb.js.map +1 -0
  34. package/dist/components/ui/core/button/button.d.ts +7 -7
  35. package/dist/components/ui/core/button/button.gallery.d.ts +2 -0
  36. package/dist/components/ui/core/button/button.gallery.js +76 -0
  37. package/dist/components/ui/core/button/button.gallery.js.map +1 -0
  38. package/dist/components/ui/core/button/button.js +57 -47
  39. package/dist/components/ui/core/button/button.js.map +1 -0
  40. package/dist/components/ui/core/button-group/button-group.d.ts +9 -9
  41. package/dist/components/ui/core/button-group/button-group.js +50 -40
  42. package/dist/components/ui/core/button-group/button-group.js.map +1 -0
  43. package/dist/components/ui/core/calendar/calendar-header.d.ts +7 -7
  44. package/dist/components/ui/core/calendar/calendar-header.js +102 -63
  45. package/dist/components/ui/core/calendar/calendar-header.js.map +1 -0
  46. package/dist/components/ui/core/calendar/calendar-utils.d.ts +30 -30
  47. package/dist/components/ui/core/calendar/calendar-utils.js +116 -39
  48. package/dist/components/ui/core/calendar/calendar-utils.js.map +1 -0
  49. package/dist/components/ui/core/calendar/calendar.d.ts +10 -10
  50. package/dist/components/ui/core/calendar/calendar.js +95 -66
  51. package/dist/components/ui/core/calendar/calendar.js.map +1 -0
  52. package/dist/components/ui/core/calendar/constants.js +3 -0
  53. package/dist/components/ui/core/calendar/constants.js.map +1 -0
  54. package/dist/components/ui/core/card/card.d.ts +20 -20
  55. package/dist/components/ui/core/card/card.js +133 -104
  56. package/dist/components/ui/core/card/card.js.map +1 -0
  57. package/dist/components/ui/core/chart/chart.d.ts +55 -53
  58. package/dist/components/ui/core/chart/chart.js +196 -116
  59. package/dist/components/ui/core/chart/chart.js.map +1 -0
  60. package/dist/components/ui/core/chart/index.d.ts +2 -2
  61. package/dist/components/ui/core/chart/index.js +3 -2
  62. package/dist/components/ui/core/chart/index.js.map +1 -0
  63. package/dist/components/ui/core/checkbox/checkbox.d.ts +9 -9
  64. package/dist/components/ui/core/checkbox/checkbox.js +88 -68
  65. package/dist/components/ui/core/checkbox/checkbox.js.map +1 -0
  66. package/dist/components/ui/core/checkbox/checkbox.metadata.d.ts +1 -1
  67. package/dist/components/ui/core/checkbox/checkbox.metadata.js +6 -7
  68. package/dist/components/ui/core/checkbox/checkbox.metadata.js.map +1 -0
  69. package/dist/components/ui/core/code-block/code-block.d.ts +19 -19
  70. package/dist/components/ui/core/code-block/code-block.js +259 -175
  71. package/dist/components/ui/core/code-block/code-block.js.map +1 -0
  72. package/dist/components/ui/core/collapsible/collapsible.d.ts +5 -5
  73. package/dist/components/ui/core/collapsible/collapsible.js +36 -30
  74. package/dist/components/ui/core/collapsible/collapsible.js.map +1 -0
  75. package/dist/components/ui/core/combobox/combobox.d.ts +13 -13
  76. package/dist/components/ui/core/combobox/combobox.js +89 -40
  77. package/dist/components/ui/core/combobox/combobox.js.map +1 -0
  78. package/dist/components/ui/core/command/command.d.ts +20 -18
  79. package/dist/components/ui/core/command/command.js +137 -85
  80. package/dist/components/ui/core/command/command.js.map +1 -0
  81. package/dist/components/ui/core/conversation/conversation.d.ts +14 -0
  82. package/dist/components/ui/core/conversation/conversation.js +51 -0
  83. package/dist/components/ui/core/conversation/conversation.js.map +1 -0
  84. package/dist/components/ui/core/count/count.d.ts +8 -6
  85. package/dist/components/ui/core/count/count.js +51 -21
  86. package/dist/components/ui/core/count/count.js.map +1 -0
  87. package/dist/components/ui/core/data-grid/data-grid-cell.d.ts +7 -7
  88. package/dist/components/ui/core/data-grid/data-grid-cell.js +23 -0
  89. package/dist/components/ui/core/data-grid/data-grid-cell.js.map +1 -0
  90. package/dist/components/ui/core/data-grid/data-grid-filter-clauses.d.ts +14 -0
  91. package/dist/components/ui/core/data-grid/data-grid-filter-clauses.js +36 -0
  92. package/dist/components/ui/core/data-grid/data-grid-filter-clauses.js.map +1 -0
  93. package/dist/components/ui/core/data-grid/data-grid-filter-panel.d.ts +41 -0
  94. package/dist/components/ui/core/data-grid/data-grid-filter-panel.js +273 -0
  95. package/dist/components/ui/core/data-grid/data-grid-filter-panel.js.map +1 -0
  96. package/dist/components/ui/core/data-grid/data-grid-footer.d.ts +6 -0
  97. package/dist/components/ui/core/data-grid/data-grid-footer.js +34 -0
  98. package/dist/components/ui/core/data-grid/data-grid-footer.js.map +1 -0
  99. package/dist/components/ui/core/data-grid/data-grid-header-row.d.ts +10 -10
  100. package/dist/components/ui/core/data-grid/data-grid-header-row.js +70 -0
  101. package/dist/components/ui/core/data-grid/data-grid-header-row.js.map +1 -0
  102. package/dist/components/ui/core/data-grid/data-grid-header.d.ts +11 -0
  103. package/dist/components/ui/core/data-grid/data-grid-header.js +67 -0
  104. package/dist/components/ui/core/data-grid/data-grid-header.js.map +1 -0
  105. package/dist/components/ui/core/data-grid/data-grid-row.d.ts +15 -15
  106. package/dist/components/ui/core/data-grid/data-grid-row.js +105 -0
  107. package/dist/components/ui/core/data-grid/data-grid-row.js.map +1 -0
  108. package/dist/components/ui/core/data-grid/data-grid.d.ts +85 -35
  109. package/dist/components/ui/core/data-grid/data-grid.fixtures.d.ts +7 -7
  110. package/dist/components/ui/core/data-grid/data-grid.fixtures.js +139 -0
  111. package/dist/components/ui/core/data-grid/data-grid.fixtures.js.map +1 -0
  112. package/dist/components/ui/core/data-grid/data-grid.js +404 -0
  113. package/dist/components/ui/core/data-grid/data-grid.js.map +1 -0
  114. package/dist/components/ui/core/data-grid/data-grid.utils.d.ts +3 -3
  115. package/dist/components/ui/core/data-grid/data-grid.utils.js +51 -0
  116. package/dist/components/ui/core/data-grid/data-grid.utils.js.map +1 -0
  117. package/dist/components/ui/core/data-grid/index.d.ts +4 -0
  118. package/dist/components/ui/core/data-grid/index.js +5 -0
  119. package/dist/components/ui/core/data-grid/index.js.map +1 -0
  120. package/dist/components/ui/core/date-time-pickers/date-picker/date-picker.d.ts +11 -13
  121. package/dist/components/ui/core/date-time-pickers/date-picker/date-picker.js +85 -61
  122. package/dist/components/ui/core/date-time-pickers/date-picker/date-picker.js.map +1 -0
  123. package/dist/components/ui/core/date-time-pickers/date-picker/index.d.ts +3 -3
  124. package/dist/components/ui/core/date-time-pickers/date-picker/index.js +3 -0
  125. package/dist/components/ui/core/date-time-pickers/date-picker/index.js.map +1 -0
  126. package/dist/components/ui/core/date-time-pickers/date-picker/types.d.ts +14 -14
  127. package/dist/components/ui/core/date-time-pickers/date-picker/types.js +3 -0
  128. package/dist/components/ui/core/date-time-pickers/date-picker/types.js.map +1 -0
  129. package/dist/components/ui/core/date-time-pickers/date-picker/use-date-picker.d.ts +2 -2
  130. package/dist/components/ui/core/date-time-pickers/date-picker/use-date-picker.js +51 -36
  131. package/dist/components/ui/core/date-time-pickers/date-picker/use-date-picker.js.map +1 -0
  132. package/dist/components/ui/core/date-time-pickers/date-range-picker/date-range-picker.d.ts +11 -13
  133. package/dist/components/ui/core/date-time-pickers/date-range-picker/date-range-picker.js +89 -64
  134. package/dist/components/ui/core/date-time-pickers/date-range-picker/date-range-picker.js.map +1 -0
  135. package/dist/components/ui/core/date-time-pickers/date-range-picker/index.d.ts +3 -3
  136. package/dist/components/ui/core/date-time-pickers/date-range-picker/index.js +3 -0
  137. package/dist/components/ui/core/date-time-pickers/date-range-picker/index.js.map +1 -0
  138. package/dist/components/ui/core/date-time-pickers/date-range-picker/types.d.ts +20 -20
  139. package/dist/components/ui/core/date-time-pickers/date-range-picker/types.js +3 -0
  140. package/dist/components/ui/core/date-time-pickers/date-range-picker/types.js.map +1 -0
  141. package/dist/components/ui/core/date-time-pickers/date-range-picker/use-date-range-picker.d.ts +4 -4
  142. package/dist/components/ui/core/date-time-pickers/date-range-picker/use-date-range-picker.js +95 -60
  143. package/dist/components/ui/core/date-time-pickers/date-range-picker/use-date-range-picker.js.map +1 -0
  144. package/dist/components/ui/core/date-time-pickers/date-time-picker/date-time-picker.d.ts +15 -0
  145. package/dist/components/ui/core/date-time-pickers/date-time-picker/date-time-picker.js +120 -0
  146. package/dist/components/ui/core/date-time-pickers/date-time-picker/date-time-picker.js.map +1 -0
  147. package/dist/components/ui/core/date-time-pickers/date-time-picker/index.d.ts +3 -1
  148. package/dist/components/ui/core/date-time-pickers/date-time-picker/index.js +3 -0
  149. package/dist/components/ui/core/date-time-pickers/date-time-picker/index.js.map +1 -0
  150. package/dist/components/ui/core/date-time-pickers/date-time-picker/types.d.ts +25 -32
  151. package/dist/components/ui/core/date-time-pickers/date-time-picker/types.js +3 -0
  152. package/dist/components/ui/core/date-time-pickers/date-time-picker/types.js.map +1 -0
  153. package/dist/components/ui/core/date-time-pickers/date-time-picker/use-date-time-picker.d.ts +2 -2
  154. package/dist/components/ui/core/date-time-pickers/date-time-picker/use-date-time-picker.js +78 -0
  155. package/dist/components/ui/core/date-time-pickers/date-time-picker/use-date-time-picker.js.map +1 -0
  156. package/dist/components/ui/core/date-time-pickers/date-time-range-picker/date-time-range-picker.d.ts +13 -15
  157. package/dist/components/ui/core/date-time-pickers/date-time-range-picker/date-time-range-picker.js +165 -119
  158. package/dist/components/ui/core/date-time-pickers/date-time-range-picker/date-time-range-picker.js.map +1 -0
  159. package/dist/components/ui/core/date-time-pickers/date-time-range-picker/index.d.ts +3 -3
  160. package/dist/components/ui/core/date-time-pickers/date-time-range-picker/index.js +3 -0
  161. package/dist/components/ui/core/date-time-pickers/date-time-range-picker/index.js.map +1 -0
  162. package/dist/components/ui/core/date-time-pickers/date-time-range-picker/types.d.ts +37 -37
  163. package/dist/components/ui/core/date-time-pickers/date-time-range-picker/types.js +3 -0
  164. package/dist/components/ui/core/date-time-pickers/date-time-range-picker/types.js.map +1 -0
  165. package/dist/components/ui/core/date-time-pickers/date-time-range-picker/use-date-time-range-picker.d.ts +3 -3
  166. package/dist/components/ui/core/date-time-pickers/date-time-range-picker/use-date-time-range-picker.js +163 -104
  167. package/dist/components/ui/core/date-time-pickers/date-time-range-picker/use-date-time-range-picker.js.map +1 -0
  168. package/dist/components/ui/core/date-time-pickers/index.d.ts +17 -12
  169. package/dist/components/ui/core/date-time-pickers/index.js +10 -6
  170. package/dist/components/ui/core/date-time-pickers/index.js.map +1 -0
  171. package/dist/components/ui/core/date-time-pickers/shared/am-pm-scroll/am-pm-scroll.d.ts +5 -5
  172. package/dist/components/ui/core/date-time-pickers/shared/am-pm-scroll/am-pm-scroll.js +52 -42
  173. package/dist/components/ui/core/date-time-pickers/shared/am-pm-scroll/am-pm-scroll.js.map +1 -0
  174. package/dist/components/ui/core/date-time-pickers/shared/constants.d.ts +6 -1
  175. package/dist/components/ui/core/date-time-pickers/shared/constants.js +23 -0
  176. package/dist/components/ui/core/date-time-pickers/shared/constants.js.map +1 -0
  177. package/dist/components/ui/core/date-time-pickers/shared/date-time-input/date-time-input.d.ts +16 -15
  178. package/dist/components/ui/core/date-time-pickers/shared/date-time-input/date-time-input.js +87 -64
  179. package/dist/components/ui/core/date-time-pickers/shared/date-time-input/date-time-input.js.map +1 -0
  180. package/dist/components/ui/core/date-time-pickers/shared/date-time-input/range-input-display.d.ts +10 -9
  181. package/dist/components/ui/core/date-time-pickers/shared/date-time-input/range-input-display.js +89 -38
  182. package/dist/components/ui/core/date-time-pickers/shared/date-time-input/range-input-display.js.map +1 -0
  183. package/dist/components/ui/core/date-time-pickers/shared/hooks/use-popover-state.d.ts +5 -5
  184. package/dist/components/ui/core/date-time-pickers/shared/hooks/use-popover-state.js +34 -23
  185. package/dist/components/ui/core/date-time-pickers/shared/hooks/use-popover-state.js.map +1 -0
  186. package/dist/components/ui/core/date-time-pickers/shared/hooks/use-range-date-state.d.ts +23 -23
  187. package/dist/components/ui/core/date-time-pickers/shared/hooks/use-range-date-state.js +95 -52
  188. package/dist/components/ui/core/date-time-pickers/shared/hooks/use-range-date-state.js.map +1 -0
  189. package/dist/components/ui/core/date-time-pickers/shared/hooks/use-range-step-manager.d.ts +5 -5
  190. package/dist/components/ui/core/date-time-pickers/shared/hooks/use-range-step-manager.js +22 -18
  191. package/dist/components/ui/core/date-time-pickers/shared/hooks/use-range-step-manager.js.map +1 -0
  192. package/dist/components/ui/core/date-time-pickers/shared/hooks/use-single-date-state.d.ts +19 -19
  193. package/dist/components/ui/core/date-time-pickers/shared/hooks/use-single-date-state.js +41 -24
  194. package/dist/components/ui/core/date-time-pickers/shared/hooks/use-single-date-state.js.map +1 -0
  195. package/dist/components/ui/core/date-time-pickers/shared/hooks/use-time-state.d.ts +13 -13
  196. package/dist/components/ui/core/date-time-pickers/shared/hooks/use-time-state.js +33 -24
  197. package/dist/components/ui/core/date-time-pickers/shared/hooks/use-time-state.js.map +1 -0
  198. package/dist/components/ui/core/date-time-pickers/shared/scroll-cell-classes.d.ts +5 -5
  199. package/dist/components/ui/core/date-time-pickers/shared/scroll-cell-classes.js +9 -4
  200. package/dist/components/ui/core/date-time-pickers/shared/scroll-cell-classes.js.map +1 -0
  201. package/dist/components/ui/core/date-time-pickers/shared/shortcuts-panel/shortcuts-panel.d.ts +13 -9
  202. package/dist/components/ui/core/date-time-pickers/shared/shortcuts-panel/shortcuts-panel.js +22 -17
  203. package/dist/components/ui/core/date-time-pickers/shared/shortcuts-panel/shortcuts-panel.js.map +1 -0
  204. package/dist/components/ui/core/date-time-pickers/shared/time-picker-panel/index.d.ts +2 -2
  205. package/dist/components/ui/core/date-time-pickers/shared/time-picker-panel/index.js +3 -0
  206. package/dist/components/ui/core/date-time-pickers/shared/time-picker-panel/index.js.map +1 -0
  207. package/dist/components/ui/core/date-time-pickers/shared/time-picker-panel/time-picker-panel.d.ts +13 -13
  208. package/dist/components/ui/core/date-time-pickers/shared/time-picker-panel/time-picker-panel.js +49 -40
  209. package/dist/components/ui/core/date-time-pickers/shared/time-picker-panel/time-picker-panel.js.map +1 -0
  210. package/dist/components/ui/core/date-time-pickers/shared/time-picker-scroll/time-picker-scroll.d.ts +7 -7
  211. package/dist/components/ui/core/date-time-pickers/shared/time-picker-scroll/time-picker-scroll.js +41 -34
  212. package/dist/components/ui/core/date-time-pickers/shared/time-picker-scroll/time-picker-scroll.js.map +1 -0
  213. package/dist/components/ui/core/date-time-pickers/time-picker/index.d.ts +3 -3
  214. package/dist/components/ui/core/date-time-pickers/time-picker/index.js +3 -0
  215. package/dist/components/ui/core/date-time-pickers/time-picker/index.js.map +1 -0
  216. package/dist/components/ui/core/date-time-pickers/time-picker/time-picker.d.ts +12 -14
  217. package/dist/components/ui/core/date-time-pickers/time-picker/time-picker.js +99 -79
  218. package/dist/components/ui/core/date-time-pickers/time-picker/time-picker.js.map +1 -0
  219. package/dist/components/ui/core/date-time-pickers/time-picker/types.d.ts +20 -20
  220. package/dist/components/ui/core/date-time-pickers/time-picker/types.js +3 -0
  221. package/dist/components/ui/core/date-time-pickers/time-picker/types.js.map +1 -0
  222. package/dist/components/ui/core/date-time-pickers/time-picker/use-time-picker.d.ts +2 -2
  223. package/dist/components/ui/core/date-time-pickers/time-picker/use-time-picker.js +63 -41
  224. package/dist/components/ui/core/date-time-pickers/time-picker/use-time-picker.js.map +1 -0
  225. package/dist/components/ui/core/date-time-pickers/time-range-picker/index.d.ts +3 -1
  226. package/dist/components/ui/core/date-time-pickers/time-range-picker/index.js +3 -0
  227. package/dist/components/ui/core/date-time-pickers/time-range-picker/index.js.map +1 -0
  228. package/dist/components/ui/core/date-time-pickers/time-range-picker/time-range-picker.d.ts +14 -0
  229. package/dist/components/ui/core/date-time-pickers/time-range-picker/time-range-picker.js +115 -0
  230. package/dist/components/ui/core/date-time-pickers/time-range-picker/time-range-picker.js.map +1 -0
  231. package/dist/components/ui/core/date-time-pickers/time-range-picker/types.d.ts +30 -36
  232. package/dist/components/ui/core/date-time-pickers/time-range-picker/types.js +3 -0
  233. package/dist/components/ui/core/date-time-pickers/time-range-picker/types.js.map +1 -0
  234. package/dist/components/ui/core/date-time-pickers/time-range-picker/use-time-range-picker.d.ts +2 -2
  235. package/dist/components/ui/core/date-time-pickers/time-range-picker/use-time-range-picker.js +145 -0
  236. package/dist/components/ui/core/date-time-pickers/time-range-picker/use-time-range-picker.js.map +1 -0
  237. package/dist/components/ui/core/date-time-pickers/utils/date-input.d.ts +56 -0
  238. package/dist/components/ui/core/date-time-pickers/utils/date-input.js +67 -0
  239. package/dist/components/ui/core/date-time-pickers/utils/date-input.js.map +1 -0
  240. package/dist/components/ui/core/date-time-pickers/utils/date-range-utils.d.ts +18 -18
  241. package/dist/components/ui/core/date-time-pickers/utils/date-range-utils.js +42 -0
  242. package/dist/components/ui/core/date-time-pickers/utils/date-range-utils.js.map +1 -0
  243. package/dist/components/ui/core/date-time-pickers/utils/format-utils.d.ts +31 -29
  244. package/dist/components/ui/core/date-time-pickers/utils/format-utils.js +56 -0
  245. package/dist/components/ui/core/date-time-pickers/utils/format-utils.js.map +1 -0
  246. package/dist/components/ui/core/date-time-pickers/utils/segment-utils.d.ts +21 -21
  247. package/dist/components/ui/core/date-time-pickers/utils/segment-utils.js +170 -0
  248. package/dist/components/ui/core/date-time-pickers/utils/segment-utils.js.map +1 -0
  249. package/dist/components/ui/core/date-time-pickers/utils/time-utils.d.ts +28 -28
  250. package/dist/components/ui/core/date-time-pickers/utils/time-utils.js +88 -7
  251. package/dist/components/ui/core/date-time-pickers/utils/time-utils.js.map +1 -0
  252. package/dist/components/ui/core/date-time-pickers/utils/time-validation.d.ts +17 -17
  253. package/dist/components/ui/core/date-time-pickers/utils/time-validation.js +43 -0
  254. package/dist/components/ui/core/date-time-pickers/utils/time-validation.js.map +1 -0
  255. package/dist/components/ui/core/dialog/dialog.d.ts +12 -9
  256. package/dist/components/ui/core/dialog/dialog.js +90 -82
  257. package/dist/components/ui/core/dialog/dialog.js.map +1 -0
  258. package/dist/components/ui/core/dropdown-menu/dropdown-menu.d.ts +22 -19
  259. package/dist/components/ui/core/dropdown-menu/dropdown-menu.js +204 -149
  260. package/dist/components/ui/core/dropdown-menu/dropdown-menu.js.map +1 -0
  261. package/dist/components/ui/core/empty-state/empty-state.context.d.ts +4 -4
  262. package/dist/components/ui/core/empty-state/empty-state.context.js +8 -5
  263. package/dist/components/ui/core/empty-state/empty-state.context.js.map +1 -0
  264. package/dist/components/ui/core/empty-state/empty-state.d.ts +14 -14
  265. package/dist/components/ui/core/empty-state/empty-state.js +96 -82
  266. package/dist/components/ui/core/empty-state/empty-state.js.map +1 -0
  267. package/dist/components/ui/core/helper-text/helper-text.d.ts +7 -7
  268. package/dist/components/ui/core/helper-text/helper-text.js +55 -36
  269. package/dist/components/ui/core/helper-text/helper-text.js.map +1 -0
  270. package/dist/components/ui/core/hover-card/hover-card.d.ts +7 -6
  271. package/dist/components/ui/core/hover-card/hover-card.js +56 -52
  272. package/dist/components/ui/core/hover-card/hover-card.js.map +1 -0
  273. package/dist/components/ui/core/inline-citation/inline-citation.d.ts +26 -25
  274. package/dist/components/ui/core/inline-citation/inline-citation.js +121 -97
  275. package/dist/components/ui/core/inline-citation/inline-citation.js.map +1 -0
  276. package/dist/components/ui/core/input/input.d.ts +2 -2
  277. package/dist/components/ui/core/input/input.js +15 -13
  278. package/dist/components/ui/core/input/input.js.map +1 -0
  279. package/dist/components/ui/core/input-group/input-group.d.ts +25 -14
  280. package/dist/components/ui/core/input-group/input-group.js +149 -76
  281. package/dist/components/ui/core/input-group/input-group.js.map +1 -0
  282. package/dist/components/ui/core/item/item.d.ts +20 -0
  283. package/dist/components/ui/core/item/item.js +93 -0
  284. package/dist/components/ui/core/item/item.js.map +1 -0
  285. package/dist/components/ui/core/kbd/kbd.d.ts +3 -3
  286. package/dist/components/ui/core/kbd/kbd.js +24 -20
  287. package/dist/components/ui/core/kbd/kbd.js.map +1 -0
  288. package/dist/components/ui/core/label/label.d.ts +3 -3
  289. package/dist/components/ui/core/label/label.js +33 -26
  290. package/dist/components/ui/core/label/label.js.map +1 -0
  291. package/dist/components/ui/core/loader/loader.d.ts +6 -6
  292. package/dist/components/ui/core/loader/loader.js +97 -80
  293. package/dist/components/ui/core/loader/loader.js.map +1 -0
  294. package/dist/components/ui/core/message/message-response-default-streamdown-controls.d.ts +9 -9
  295. package/dist/components/ui/core/message/message-response-default-streamdown-controls.js +19 -12
  296. package/dist/components/ui/core/message/message-response-default-streamdown-controls.js.map +1 -0
  297. package/dist/components/ui/core/message/message-response-math-plugin.d.ts +3 -0
  298. package/dist/components/ui/core/message/message-response-math-plugin.js +6 -0
  299. package/dist/components/ui/core/message/message-response-math-plugin.js.map +1 -0
  300. package/dist/components/ui/core/message/message.d.ts +27 -23
  301. package/dist/components/ui/core/message/message.js +453 -316
  302. package/dist/components/ui/core/message/message.js.map +1 -0
  303. package/dist/components/ui/core/overflow-list/overflow-list.d.ts +21 -0
  304. package/dist/components/ui/core/overflow-list/overflow-list.js +197 -0
  305. package/dist/components/ui/core/overflow-list/overflow-list.js.map +1 -0
  306. package/dist/components/ui/core/overflow-list/overflow-list.utils.d.ts +37 -35
  307. package/dist/components/ui/core/overflow-list/overflow-list.utils.js +206 -0
  308. package/dist/components/ui/core/overflow-list/overflow-list.utils.js.map +1 -0
  309. package/dist/components/ui/core/pagination/pagination-size-context.d.ts +2 -2
  310. package/dist/components/ui/core/pagination/pagination-size-context.js +6 -5
  311. package/dist/components/ui/core/pagination/pagination-size-context.js.map +1 -0
  312. package/dist/components/ui/core/pagination/pagination-teleport.d.ts +9 -9
  313. package/dist/components/ui/core/pagination/pagination-teleport.js +127 -84
  314. package/dist/components/ui/core/pagination/pagination-teleport.js.map +1 -0
  315. package/dist/components/ui/core/pagination/pagination-teleport.utils.js +6 -6
  316. package/dist/components/ui/core/pagination/pagination-teleport.utils.js.map +1 -0
  317. package/dist/components/ui/core/pagination/pagination.d.ts +39 -39
  318. package/dist/components/ui/core/pagination/pagination.js +294 -234
  319. package/dist/components/ui/core/pagination/pagination.js.map +1 -0
  320. package/dist/components/ui/core/popover/popover.d.ts +12 -11
  321. package/dist/components/ui/core/popover/popover.js +104 -89
  322. package/dist/components/ui/core/popover/popover.js.map +1 -0
  323. package/dist/components/ui/core/progress/progress.d.ts +9 -8
  324. package/dist/components/ui/core/progress/progress.js +50 -35
  325. package/dist/components/ui/core/progress/progress.js.map +1 -0
  326. package/dist/components/ui/core/prompt-input/prompt-input.d.ts +27 -27
  327. package/dist/components/ui/core/prompt-input/prompt-input.js +342 -271
  328. package/dist/components/ui/core/prompt-input/prompt-input.js.map +1 -0
  329. package/dist/components/ui/core/radio-group/radio-group.d.ts +12 -12
  330. package/dist/components/ui/core/radio-group/radio-group.js +88 -58
  331. package/dist/components/ui/core/radio-group/radio-group.js.map +1 -0
  332. package/dist/components/ui/core/reasoning/reasoning.d.ts +7 -7
  333. package/dist/components/ui/core/reasoning/reasoning.js +68 -56
  334. package/dist/components/ui/core/reasoning/reasoning.js.map +1 -0
  335. package/dist/components/ui/core/scroll-area/scroll-area.d.ts +4 -4
  336. package/dist/components/ui/core/scroll-area/scroll-area.js +50 -40
  337. package/dist/components/ui/core/scroll-area/scroll-area.js.map +1 -0
  338. package/dist/components/ui/core/search/search.d.ts +8 -8
  339. package/dist/components/ui/core/search/search.js +122 -76
  340. package/dist/components/ui/core/search/search.js.map +1 -0
  341. package/dist/components/ui/core/segmented-control/segmented-control.d.ts +17 -11
  342. package/dist/components/ui/core/segmented-control/segmented-control.js +204 -108
  343. package/dist/components/ui/core/segmented-control/segmented-control.js.map +1 -0
  344. package/dist/components/ui/core/select/select.d.ts +27 -26
  345. package/dist/components/ui/core/select/select.js +213 -168
  346. package/dist/components/ui/core/select/select.js.map +1 -0
  347. package/dist/components/ui/core/separator/separator.d.ts +2 -2
  348. package/dist/components/ui/core/separator/separator.js +13 -13
  349. package/dist/components/ui/core/separator/separator.js.map +1 -0
  350. package/dist/components/ui/core/shimmer/shimmer.d.ts +8 -8
  351. package/dist/components/ui/core/shimmer/shimmer.js +64 -40
  352. package/dist/components/ui/core/shimmer/shimmer.js.map +1 -0
  353. package/dist/components/ui/core/skeleton/skeleton.d.ts +2 -2
  354. package/dist/components/ui/core/skeleton/skeleton.js +13 -13
  355. package/dist/components/ui/core/skeleton/skeleton.js.map +1 -0
  356. package/dist/components/ui/core/slider/slider.d.ts +7 -7
  357. package/dist/components/ui/core/slider/slider.js +51 -39
  358. package/dist/components/ui/core/slider/slider.js.map +1 -0
  359. package/dist/components/ui/core/sonner-toast/sonner-toast.d.ts +2 -2
  360. package/dist/components/ui/core/sonner-toast/sonner-toast.js +67 -54
  361. package/dist/components/ui/core/sonner-toast/sonner-toast.js.map +1 -0
  362. package/dist/components/ui/core/sources/sources.d.ts +12 -12
  363. package/dist/components/ui/core/sources/sources.js +87 -58
  364. package/dist/components/ui/core/sources/sources.js.map +1 -0
  365. package/dist/components/ui/core/switch/switch.d.ts +9 -9
  366. package/dist/components/ui/core/switch/switch.js +83 -61
  367. package/dist/components/ui/core/switch/switch.js.map +1 -0
  368. package/dist/components/ui/core/switch/switch.metadata.d.ts +1 -1
  369. package/dist/components/ui/core/switch/switch.metadata.js +8 -0
  370. package/dist/components/ui/core/switch/switch.metadata.js.map +1 -0
  371. package/dist/components/ui/core/tabs/tabs.d.ts +20 -18
  372. package/dist/components/ui/core/tabs/tabs.js +176 -147
  373. package/dist/components/ui/core/tabs/tabs.js.map +1 -0
  374. package/dist/components/ui/core/tabs/tabs.utils.d.ts +1 -1
  375. package/dist/components/ui/core/tabs/tabs.utils.js +10 -6
  376. package/dist/components/ui/core/tabs/tabs.utils.js.map +1 -0
  377. package/dist/components/ui/core/textarea/textarea.d.ts +2 -2
  378. package/dist/components/ui/core/textarea/textarea.js +13 -13
  379. package/dist/components/ui/core/textarea/textarea.js.map +1 -0
  380. package/dist/components/ui/core/toggle/toggle.d.ts +9 -9
  381. package/dist/components/ui/core/toggle/toggle.js +60 -54
  382. package/dist/components/ui/core/toggle/toggle.js.map +1 -0
  383. package/dist/components/ui/core/tool/tool.d.ts +18 -18
  384. package/dist/components/ui/core/tool/tool.js +167 -126
  385. package/dist/components/ui/core/tool/tool.js.map +1 -0
  386. package/dist/components/ui/core/toolbar/toolbar.d.ts +37 -0
  387. package/dist/components/ui/core/toolbar/toolbar.js +171 -0
  388. package/dist/components/ui/core/toolbar/toolbar.js.map +1 -0
  389. package/dist/components/ui/core/tooltip/tooltip.d.ts +8 -7
  390. package/dist/components/ui/core/tooltip/tooltip.js +53 -46
  391. package/dist/components/ui/core/tooltip/tooltip.js.map +1 -0
  392. package/dist/components/ui/core/topbar/topbar.d.ts +26 -26
  393. package/dist/components/ui/core/topbar/topbar.js +160 -105
  394. package/dist/components/ui/core/topbar/topbar.js.map +1 -0
  395. package/dist/components/ui/core/tree/tree.d.ts +20 -0
  396. package/dist/components/ui/core/tree/tree.js +100 -0
  397. package/dist/components/ui/core/tree/tree.js.map +1 -0
  398. package/dist/eslint/index.d.ts +5 -5
  399. package/dist/eslint/index.js +9 -5
  400. package/dist/eslint/index.js.map +1 -0
  401. package/dist/eslint/no-overriding-styles.d.ts +1 -1
  402. package/dist/eslint/no-overriding-styles.js +341 -201
  403. package/dist/eslint/no-overriding-styles.js.map +1 -0
  404. package/dist/icons/index.d.ts +1 -1
  405. package/dist/icons/index.js +2 -0
  406. package/dist/icons/index.js.map +1 -0
  407. package/dist/index.d.ts +1 -1
  408. package/dist/index.js +3 -0
  409. package/dist/index.js.map +1 -0
  410. package/dist/lib/ai/types.d.ts +43 -43
  411. package/dist/lib/ai/types.js +3 -0
  412. package/dist/lib/ai/types.js.map +1 -0
  413. package/dist/lib/decorative-variant-classes.d.ts +53 -0
  414. package/dist/lib/decorative-variant-classes.js +58 -0
  415. package/dist/lib/decorative-variant-classes.js.map +1 -0
  416. package/dist/lib/highlight-code.d.ts +11 -8
  417. package/dist/lib/highlight-code.js +58 -40
  418. package/dist/lib/highlight-code.js.map +1 -0
  419. package/dist/lib/portal-container-context.d.ts +1 -1
  420. package/dist/lib/portal-container-context.js +8 -8
  421. package/dist/lib/portal-container-context.js.map +1 -0
  422. package/dist/lib/shared-theme-from-url.d.ts +13 -0
  423. package/dist/lib/shared-theme-from-url.js +61 -0
  424. package/dist/lib/shared-theme-from-url.js.map +1 -0
  425. package/dist/lib/style-scope.d.ts +2 -2
  426. package/dist/lib/style-scope.js +6 -6
  427. package/dist/lib/style-scope.js.map +1 -0
  428. package/dist/lib/theme-share-url.d.ts +31 -0
  429. package/dist/lib/theme-share-url.js +116 -0
  430. package/dist/lib/theme-share-url.js.map +1 -0
  431. package/dist/lib/types.d.ts +39 -39
  432. package/dist/lib/types.js +3 -0
  433. package/dist/lib/types.js.map +1 -0
  434. package/dist/lib/use-controllable-state.d.ts +4 -7
  435. package/dist/lib/use-controllable-state.js +34 -21
  436. package/dist/lib/use-controllable-state.js.map +1 -0
  437. package/dist/lib/utils.d.ts +63 -34
  438. package/dist/lib/utils.js +134 -32
  439. package/dist/lib/utils.js.map +1 -0
  440. package/dist/styles.css +2 -1
  441. package/dist/styles.source.css +24 -12
  442. package/dist/utils/assign-ref.d.ts +3 -0
  443. package/dist/utils/assign-ref.js +13 -0
  444. package/dist/utils/assign-ref.js.map +1 -0
  445. package/package.json +50 -11
  446. package/src/components/ui/core/button/button.md +93 -0
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../../src/components/ui/core/pagination/pagination.tsx"],"sourcesContent":["import {\n type ForwardRefExoticComponent,\n type RefAttributes,\n type ComponentProps,\n type ComponentRef,\n type MouseEvent,\n type ReactNode,\n forwardRef,\n} from 'react';\n\nimport type { SelectTriggerProps } from '@base-ui/react';\nimport {\n IconChevronLeft,\n IconChevronRight,\n IconChevronsLeft,\n IconChevronsRight,\n IconDots,\n} from '@tabler/icons-react';\nimport { cva } from 'class-variance-authority';\n\nimport { cn } from '../../../../lib/utils';\nimport { Button } from '../button/button';\nimport { SelectTrigger } from '../select/select';\n\nimport {\n type PaginationSize,\n PaginationSizeContext,\n usePaginationSize,\n} from './pagination-size-context';\nimport { PaginationTeleport } from './pagination-teleport';\n\nconst paginationLinkVariants = cva(\n 'border border-transparent text-base font-normal leading-5 tracking-tightest focus-visible:shadow-focus-ring',\n {\n variants: {\n size: {\n default: '',\n small: 'text-sm leading-4.5 tracking-tight',\n },\n active: {\n true: '',\n false: '',\n },\n },\n compoundVariants: [\n {\n active: false,\n className:\n 'text-medium-foreground hover:bg-base-background-hover hover:text-base-foreground focus-visible:bg-medium-background focus-visible:text-base-foreground',\n },\n {\n active: true,\n className:\n 'border-emphasized bg-secondary-background text-secondary-foreground hover:bg-base-background-hover hover:text-secondary-foreground focus-visible:bg-secondary-background focus-visible:text-secondary-foreground',\n },\n ],\n defaultVariants: {\n size: 'default',\n active: false,\n },\n }\n);\n\nconst paginationEllipsisVariants = cva(\n 'flex items-center justify-center text-medium-foreground',\n {\n variants: {\n size: {\n default: 'h-9 w-9',\n small: 'h-7 w-7',\n },\n },\n defaultVariants: {\n size: 'default',\n },\n }\n);\n\nconst paginationSelectTriggerVariants = cva(\n 'w-auto whitespace-nowrap min-h-0',\n {\n variants: {\n size: {\n default: 'h-9 gap-2 rounded-lg px-3 min-w-19',\n sm: 'h-7 gap-1.5 rounded-md px-2 min-w-16',\n },\n },\n defaultVariants: {\n size: 'default',\n },\n }\n);\n\nconst ICON_BUTTON_WIDTH_BY_SIZE: Record<PaginationSize, string> = {\n small: 'max-w-7',\n default: 'max-w-9',\n};\n\nconst TEXT_LINK_WIDTH_BY_SIZE: Record<PaginationSize, string> = {\n small: 'min-w-7',\n default: 'min-w-9',\n};\n\ntype PaginationButtonSize = 'default' | 'sm';\ntype PaginationRadiusClass = 'rounded-md' | 'rounded-lg';\n\nconst getPaginationButtonStyles = (size: PaginationSize = 'default') => {\n const buttonSize: PaginationButtonSize = size === 'small' ? 'sm' : 'default';\n const radiusClass: PaginationRadiusClass =\n size === 'small' ? 'rounded-md' : 'rounded-lg';\n const iconButtonWidth = ICON_BUTTON_WIDTH_BY_SIZE[size];\n const textLinkWidth = TEXT_LINK_WIDTH_BY_SIZE[size];\n\n return {\n buttonSize,\n radiusClass,\n iconButtonWidth,\n textLinkWidth,\n };\n};\n\nconst Pagination: ForwardRefExoticComponent<\n Omit<\n ComponentProps<'nav'> & {\n size?: PaginationSize;\n },\n 'ref'\n > &\n RefAttributes<HTMLElement>\n> = forwardRef<\n ComponentRef<'nav'>,\n ComponentProps<'nav'> & { size?: PaginationSize }\n>(({ className, size = 'default', ...props }, ref) => {\n return (\n <PaginationSizeContext.Provider value={size}>\n <nav\n ref={ref}\n aria-label=\"pagination\"\n data-slot=\"pagination\"\n className={cn('mx-auto flex w-full justify-center gap-2', className)}\n {...props}\n />\n </PaginationSizeContext.Provider>\n );\n});\nPagination.displayName = 'Pagination';\n\nconst PaginationContent: ForwardRefExoticComponent<\n Omit<\n ComponentProps<'ul'> & {\n size?: PaginationSize;\n },\n 'ref'\n > &\n RefAttributes<HTMLUListElement>\n> = forwardRef<\n ComponentRef<'ul'>,\n ComponentProps<'ul'> & { size?: PaginationSize }\n>(({ className, size, ...props }, ref) => {\n const inheritedSize = usePaginationSize();\n const resolvedSize = size ?? inheritedSize;\n return (\n <PaginationSizeContext.Provider value={resolvedSize}>\n <ul\n ref={ref}\n data-slot=\"pagination-content\"\n data-size={resolvedSize}\n className={cn('flex flex-row items-center gap-1', className)}\n {...props}\n />\n </PaginationSizeContext.Provider>\n );\n});\nPaginationContent.displayName = 'PaginationContent';\n\nconst PaginationItem: ForwardRefExoticComponent<\n ComponentProps<'li'> & RefAttributes<HTMLLIElement>\n> = forwardRef<ComponentRef<'li'>, ComponentProps<'li'>>((props, ref) => {\n return <li ref={ref} data-slot=\"pagination-item\" {...props} />;\n});\nPaginationItem.displayName = 'PaginationItem';\n\nconst PaginationStatus: ForwardRefExoticComponent<\n ComponentProps<'output'> & RefAttributes<HTMLOutputElement>\n> = forwardRef<ComponentRef<'output'>, ComponentProps<'output'>>(\n ({ className, ...props }, ref) => {\n return (\n <output\n ref={ref}\n data-slot=\"pagination-status\"\n className={cn(\n 'flex items-center text-sm leading-4.5 tracking-tight font-normal text-muted-foreground',\n className\n )}\n {...props}\n />\n );\n }\n);\nPaginationStatus.displayName = 'PaginationStatus';\n\nconst PaginationSelectTrigger: ForwardRefExoticComponent<\n Omit<\n SelectTriggerProps & {\n size?: 'sm' | 'default';\n errorMessage?: string;\n },\n 'ref'\n > &\n RefAttributes<HTMLButtonElement>\n> = forwardRef<\n ComponentRef<typeof SelectTrigger>,\n ComponentProps<typeof SelectTrigger>\n>(({ className, size, style, ...props }, ref) => {\n const inheritedSize = usePaginationSize();\n const isPaginationSmall = inheritedSize === 'small' && size === undefined;\n const resolvedSize = size ?? (isPaginationSmall ? 'sm' : 'default');\n\n return (\n <SelectTrigger\n ref={ref}\n size={resolvedSize}\n data-slot=\"pagination-select-trigger\"\n style={style}\n className={cn(\n paginationSelectTriggerVariants({ size: resolvedSize }),\n className\n )}\n {...props}\n />\n );\n});\nPaginationSelectTrigger.displayName = 'PaginationSelectTrigger';\n\ntype PaginationLinkProps = {\n isActive?: boolean;\n isDisabled?: boolean;\n size?: PaginationSize;\n} & ComponentProps<'a'>;\n\nconst PaginationLink: ForwardRefExoticComponent<\n Omit<PaginationLinkProps, 'ref'> & RefAttributes<HTMLAnchorElement>\n> = forwardRef<ComponentRef<'a'>, PaginationLinkProps>(\n (\n { children, className, isActive, isDisabled, onClick, size, ...props },\n ref\n ) => {\n const inheritedSize = usePaginationSize();\n const resolvedSize = size ?? inheritedSize;\n const { buttonSize, radiusClass, textLinkWidth } =\n getPaginationButtonStyles(resolvedSize);\n const handleClick = (event: MouseEvent<HTMLAnchorElement>) => {\n if (isDisabled) {\n event.preventDefault();\n return;\n }\n\n onClick?.(event);\n };\n\n return (\n <Button\n variant=\"ghost\"\n size={buttonSize}\n data-slot=\"pagination-link\"\n data-active={isActive}\n className={cn(\n radiusClass,\n textLinkWidth,\n paginationLinkVariants({ size: resolvedSize, active: isActive }),\n isDisabled && 'pointer-events-none text-base-foreground-disabled',\n className\n )}\n render={\n <a\n ref={ref}\n aria-current={isActive ? 'page' : undefined}\n aria-disabled={isDisabled || undefined}\n onClick={handleClick}\n tabIndex={isDisabled ? -1 : undefined}\n {...props}\n >\n {children}\n </a>\n }\n />\n );\n }\n);\nPaginationLink.displayName = 'PaginationLink';\n\ntype PaginationIconLinkProps = {\n ariaLabel: string;\n dataSlot: string;\n icon: ReactNode;\n isDisabled?: boolean;\n size?: PaginationSize;\n} & Omit<ComponentProps<'a'>, 'children'>;\n\nconst PaginationIconLink = forwardRef<\n ComponentRef<'a'>,\n PaginationIconLinkProps\n>(\n (\n {\n ariaLabel,\n className,\n dataSlot,\n icon,\n isDisabled,\n onClick,\n size,\n ...linkProps\n },\n ref\n ) => {\n const inheritedSize = usePaginationSize();\n const resolvedSize = size ?? inheritedSize;\n const { buttonSize, radiusClass, iconButtonWidth } =\n getPaginationButtonStyles(resolvedSize);\n const handleClick = (event: MouseEvent<HTMLAnchorElement>) => {\n if (isDisabled) {\n event.preventDefault();\n return;\n }\n\n onClick?.(event);\n };\n\n return (\n <Button\n variant=\"ghost\"\n size={buttonSize}\n data-slot={dataSlot}\n className={cn(\n radiusClass,\n iconButtonWidth,\n paginationLinkVariants({ size: resolvedSize, active: false }),\n isDisabled && 'pointer-events-none text-base-foreground-disabled',\n className\n )}\n render={\n <a\n ref={ref}\n aria-label={ariaLabel}\n aria-disabled={isDisabled || undefined}\n onClick={handleClick}\n tabIndex={isDisabled ? -1 : undefined}\n {...linkProps}\n >\n {icon}\n </a>\n }\n />\n );\n }\n);\nPaginationIconLink.displayName = 'PaginationIconLink';\n\nconst PaginationFirst: ForwardRefExoticComponent<\n Omit<\n Omit<PaginationLinkProps, 'isActive'> & {\n label?: string;\n },\n 'ref'\n > &\n RefAttributes<HTMLAnchorElement>\n> = forwardRef<\n ComponentRef<'a'>,\n Omit<PaginationLinkProps, 'isActive'> & { label?: string }\n>(({ className, size, label = 'Go to first page', ...props }, ref) => {\n return (\n <PaginationIconLink\n ref={ref}\n dataSlot=\"pagination-first\"\n ariaLabel={label}\n icon={<IconChevronsLeft />}\n className={className}\n size={size}\n {...props}\n />\n );\n});\nPaginationFirst.displayName = 'PaginationFirst';\n\nconst PaginationPrevious: ForwardRefExoticComponent<\n Omit<\n Omit<PaginationLinkProps, 'isActive'> & {\n label?: string;\n },\n 'ref'\n > &\n RefAttributes<HTMLAnchorElement>\n> = forwardRef<\n ComponentRef<'a'>,\n Omit<PaginationLinkProps, 'isActive'> & { label?: string }\n>(({ className, size, label = 'Go to previous page', ...props }, ref) => {\n return (\n <PaginationIconLink\n ref={ref}\n dataSlot=\"pagination-previous\"\n ariaLabel={label}\n icon={<IconChevronLeft />}\n className={className}\n size={size}\n {...props}\n />\n );\n});\nPaginationPrevious.displayName = 'PaginationPrevious';\n\nconst PaginationNext: ForwardRefExoticComponent<\n Omit<\n Omit<PaginationLinkProps, 'isActive'> & {\n label?: string;\n },\n 'ref'\n > &\n RefAttributes<HTMLAnchorElement>\n> = forwardRef<\n ComponentRef<'a'>,\n Omit<PaginationLinkProps, 'isActive'> & { label?: string }\n>(({ className, size, label = 'Go to next page', ...props }, ref) => {\n return (\n <PaginationIconLink\n ref={ref}\n dataSlot=\"pagination-next\"\n ariaLabel={label}\n icon={<IconChevronRight />}\n className={className}\n size={size}\n {...props}\n />\n );\n});\nPaginationNext.displayName = 'PaginationNext';\n\nconst PaginationLast: ForwardRefExoticComponent<\n Omit<\n Omit<PaginationLinkProps, 'isActive'> & {\n label?: string;\n },\n 'ref'\n > &\n RefAttributes<HTMLAnchorElement>\n> = forwardRef<\n ComponentRef<'a'>,\n Omit<PaginationLinkProps, 'isActive'> & { label?: string }\n>(({ className, size, label = 'Go to last page', ...props }, ref) => {\n return (\n <PaginationIconLink\n ref={ref}\n dataSlot=\"pagination-last\"\n ariaLabel={label}\n icon={<IconChevronsRight />}\n className={className}\n size={size}\n {...props}\n />\n );\n});\nPaginationLast.displayName = 'PaginationLast';\n\nconst PaginationEllipsis: ForwardRefExoticComponent<\n Omit<\n ComponentProps<'span'> & {\n size?: PaginationSize;\n label?: string;\n },\n 'ref'\n > &\n RefAttributes<HTMLSpanElement>\n> = forwardRef<\n ComponentRef<'span'>,\n ComponentProps<'span'> & { size?: PaginationSize; label?: string }\n>(({ className, size, label = 'More pages', ...props }, ref) => {\n const inheritedSize = usePaginationSize();\n const resolvedSize = size ?? inheritedSize;\n const { iconButtonWidth } = getPaginationButtonStyles(resolvedSize);\n\n return (\n <span\n ref={ref}\n data-slot=\"pagination-ellipsis\"\n className={cn(\n iconButtonWidth,\n paginationEllipsisVariants({ size: resolvedSize }),\n className\n )}\n {...props}\n >\n <IconDots aria-hidden=\"true\" className=\"h-4 w-4\" />\n <span className=\"sr-only\">{label}</span>\n </span>\n );\n});\nPaginationEllipsis.displayName = 'PaginationEllipsis';\n\nconst PaginationResultsPerPage: ForwardRefExoticComponent<\n ComponentProps<'li'> & RefAttributes<HTMLLIElement>\n> = forwardRef<ComponentRef<'li'>, ComponentProps<'li'>>(\n ({ className, ...props }, ref) => {\n return (\n <li\n ref={ref}\n data-slot=\"pagination-results-per-page\"\n className={cn('flex items-center gap-2 pl-3', className)}\n {...props}\n />\n );\n }\n);\nPaginationResultsPerPage.displayName = 'PaginationResultsPerPage';\n\nconst PaginationResultsPerPageLabel: ForwardRefExoticComponent<\n ComponentProps<'span'> & RefAttributes<HTMLSpanElement>\n> = forwardRef<ComponentRef<'span'>, ComponentProps<'span'>>(\n ({ className, ...props }, ref) => {\n return (\n <span\n ref={ref}\n data-slot=\"pagination-results-per-page-label\"\n className={cn(\n 'text-sm leading-4.5 tracking-tight font-normal text-muted-foreground',\n className\n )}\n {...props}\n />\n );\n }\n);\nPaginationResultsPerPageLabel.displayName = 'PaginationResultsPerPageLabel';\n\nexport {\n Pagination,\n PaginationContent,\n PaginationEllipsis,\n PaginationFirst,\n PaginationItem,\n PaginationLast,\n PaginationLink,\n PaginationNext,\n PaginationPrevious,\n PaginationResultsPerPage,\n PaginationResultsPerPageLabel,\n PaginationSelectTrigger,\n PaginationStatus,\n PaginationTeleport,\n};\n"],"names":["forwardRef","IconChevronLeft","IconChevronRight","IconChevronsLeft","IconChevronsRight","IconDots","cva","cn","Button","SelectTrigger","PaginationSizeContext","usePaginationSize","PaginationTeleport","paginationLinkVariants","variants","size","default","small","active","true","false","compoundVariants","className","defaultVariants","paginationEllipsisVariants","paginationSelectTriggerVariants","sm","ICON_BUTTON_WIDTH_BY_SIZE","TEXT_LINK_WIDTH_BY_SIZE","getPaginationButtonStyles","buttonSize","radiusClass","iconButtonWidth","textLinkWidth","Pagination","props","ref","Provider","value","nav","aria-label","data-slot","displayName","PaginationContent","inheritedSize","resolvedSize","ul","data-size","PaginationItem","li","PaginationStatus","output","PaginationSelectTrigger","style","isPaginationSmall","undefined","PaginationLink","children","isActive","isDisabled","onClick","handleClick","event","preventDefault","variant","data-active","render","a","aria-current","aria-disabled","tabIndex","PaginationIconLink","ariaLabel","dataSlot","icon","linkProps","PaginationFirst","label","PaginationPrevious","PaginationNext","PaginationLast","PaginationEllipsis","span","aria-hidden","PaginationResultsPerPage","PaginationResultsPerPageLabel"],"mappings":";AAAA,SAOEA,UAAU,QACL,QAAQ;AAGf,SACEC,eAAe,EACfC,gBAAgB,EAChBC,gBAAgB,EAChBC,iBAAiB,EACjBC,QAAQ,QACH,sBAAsB;AAC7B,SAASC,GAAG,QAAQ,2BAA2B;AAE/C,SAASC,EAAE,QAAQ,2BAAwB;AAC3C,SAASC,MAAM,QAAQ,sBAAmB;AAC1C,SAASC,aAAa,QAAQ,sBAAmB;AAEjD,SAEEC,qBAAqB,EACrBC,iBAAiB,QACZ,+BAA4B;AACnC,SAASC,kBAAkB,QAAQ,2BAAwB;AAE3D,MAAMC,yBAAyBP,IAC7B,+GACA;IACEQ,UAAU;QACRC,MAAM;YACJC,SAAS;YACTC,OAAO;QACT;QACAC,QAAQ;YACNC,MAAM;YACNC,OAAO;QACT;IACF;IACAC,kBAAkB;QAChB;YACEH,QAAQ;YACRI,WACE;QACJ;QACA;YACEJ,QAAQ;YACRI,WACE;QACJ;KACD;IACDC,iBAAiB;QACfR,MAAM;QACNG,QAAQ;IACV;AACF;AAGF,MAAMM,6BAA6BlB,IACjC,2DACA;IACEQ,UAAU;QACRC,MAAM;YACJC,SAAS;YACTC,OAAO;QACT;IACF;IACAM,iBAAiB;QACfR,MAAM;IACR;AACF;AAGF,MAAMU,kCAAkCnB,IACtC,oCACA;IACEQ,UAAU;QACRC,MAAM;YACJC,SAAS;YACTU,IAAI;Q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W,GAAG;AAEjC,MAAM0C,yCAEFpF,WACF,CAAC,EAAEsB,SAAS,EAAE,GAAGa,OAAO,EAAEC;IACxB,qBACE,KAACa;QACCb,KAAKA;QACLK,aAAU;QACVnB,WAAWf,GAAG,gCAAgCe;QAC7C,GAAGa,KAAK;;AAGf;AAEFiD,yBAAyB1C,WAAW,GAAG;AAEvC,MAAM2C,8CAEFrF,WACF,CAAC,EAAEsB,SAAS,EAAE,GAAGa,OAAO,EAAEC;IACxB,qBACE,KAAC8C;QACC9C,KAAKA;QACLK,aAAU;QACVnB,WAAWf,GACT,wEACAe;QAED,GAAGa,KAAK;;AAGf;AAEFkD,8BAA8B3C,WAAW,GAAG;AAE5C,SACER,UAAU,EACVS,iBAAiB,EACjBsC,kBAAkB,EAClBL,eAAe,EACf5B,cAAc,EACdgC,cAAc,EACdxB,cAAc,EACduB,cAAc,EACdD,kBAAkB,EAClBM,wBAAwB,EACxBC,6BAA6B,EAC7BjC,uBAAuB,EACvBF,gBAAgB,EAChBtC,kBAAkB,GAClB"}
@@ -1,13 +1,14 @@
1
- import { ForwardRefExoticComponent, RefAttributes, ComponentProps, ReactNode } from 'react';
2
- import { PopoverPopupProps, PopoverPositionerProps, Popover as PopoverPrimitive } from '@base-ui/react/popover';
3
- import { Button } from '../button/button';
1
+ import { type ForwardRefExoticComponent, type RefAttributes, type ComponentProps, type ReactNode } from "react";
2
+ import type { PopoverPopupProps, PopoverPositionerProps } from "@base-ui/react/popover";
3
+ import { Popover as PopoverPrimitive } from "@base-ui/react/popover";
4
+ import { Button } from "../button/button";
4
5
  declare function Popover(props: PopoverPrimitive.Root.Props): ReactNode;
5
6
  declare function PopoverTrigger({ children, ...props }: PopoverPrimitive.Trigger.Props): ReactNode;
6
- declare const PopoverHeader: ForwardRefExoticComponent<ComponentProps<'div'> & RefAttributes<HTMLDivElement>>;
7
- declare const PopoverHeaderContent: ForwardRefExoticComponent<ComponentProps<'div'> & RefAttributes<HTMLDivElement>>;
8
- declare const PopoverTitle: ForwardRefExoticComponent<ComponentProps<'h3'> & RefAttributes<HTMLHeadingElement>>;
9
- declare const PopoverDescription: ForwardRefExoticComponent<ComponentProps<'p'> & RefAttributes<HTMLParagraphElement>>;
10
- declare const PopoverSlot: ForwardRefExoticComponent<ComponentProps<'div'> & RefAttributes<HTMLDivElement>>;
11
- declare const PopoverClose: ForwardRefExoticComponent<Omit<ComponentProps<typeof Button>, 'ref'> & RefAttributes<HTMLElement>>;
12
- declare const PopoverContent: ForwardRefExoticComponent<Omit<PopoverPopupProps & Pick<PopoverPositionerProps, 'align' | 'alignOffset' | 'side' | 'sideOffset'>, 'ref'> & RefAttributes<HTMLDivElement>>;
13
- export { Popover, PopoverClose, PopoverContent, PopoverDescription, PopoverHeader, PopoverHeaderContent, PopoverSlot, PopoverTitle, PopoverTrigger, };
7
+ declare const PopoverHeader: ForwardRefExoticComponent<ComponentProps<"div"> & RefAttributes<HTMLDivElement>>;
8
+ declare const PopoverHeaderContent: ForwardRefExoticComponent<ComponentProps<"div"> & RefAttributes<HTMLDivElement>>;
9
+ declare const PopoverTitle: ForwardRefExoticComponent<ComponentProps<"h3"> & RefAttributes<HTMLHeadingElement>>;
10
+ declare const PopoverDescription: ForwardRefExoticComponent<ComponentProps<"p"> & RefAttributes<HTMLParagraphElement>>;
11
+ declare const PopoverSlot: ForwardRefExoticComponent<ComponentProps<"div"> & RefAttributes<HTMLDivElement>>;
12
+ declare const PopoverClose: ForwardRefExoticComponent<Omit<ComponentProps<typeof Button>, "ref"> & RefAttributes<HTMLElement>>;
13
+ declare const PopoverContent: ForwardRefExoticComponent<Omit<PopoverPopupProps & Pick<PopoverPositionerProps, "align" | "alignOffset" | "anchor" | "side" | "sideOffset">, "ref"> & RefAttributes<HTMLDivElement>>;
14
+ export { Popover, PopoverClose, PopoverContent, PopoverDescription, PopoverHeader, PopoverHeaderContent, PopoverSlot, PopoverTitle, PopoverTrigger };
@@ -1,92 +1,107 @@
1
- import { cn as e } from "../../../../lib/utils.js";
2
- import { Button as t } from "../button/button.js";
3
- import { usePortalContainer as n } from "../../../../lib/portal-container-context.js";
4
- import { forwardRef as r } from "react";
5
- import { IconX as i } from "@tabler/icons-react";
6
- import { jsx as a } from "react/jsx-runtime";
7
- import { Popover as o } from "@base-ui/react/popover";
8
- //#region libs/aura/src/components/ui/core/popover/popover.tsx
9
- function s(e) {
10
- return /* @__PURE__ */ a(o.Root, {
11
- "data-slot": "popover",
12
- ...e
13
- });
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { forwardRef } from "react";
3
+ import { Popover as PopoverPrimitive } from "@base-ui/react/popover";
4
+ import { IconX } from "@tabler/icons-react";
5
+ import { usePortalContainer } from "../../../../lib/portal-container-context.js";
6
+ import { cn } from "../../../../lib/utils.js";
7
+ import { Button } from "../button/button.js";
8
+ function Popover(props) {
9
+ return /*#__PURE__*/ _jsx(PopoverPrimitive.Root, {
10
+ "data-slot": "popover",
11
+ ...props
12
+ });
14
13
  }
15
- function c({ children: e, ...t }) {
16
- return /* @__PURE__ */ a(o.Trigger, {
17
- "data-slot": "popover-trigger",
18
- ...t,
19
- children: e
20
- });
14
+ function PopoverTrigger({ children, ...props }) {
15
+ return /*#__PURE__*/ _jsx(PopoverPrimitive.Trigger, {
16
+ "data-slot": "popover-trigger",
17
+ ...props,
18
+ children: children
19
+ });
21
20
  }
22
- var l = r(({ className: t, ...n }, r) => /* @__PURE__ */ a("div", {
23
- ref: r,
24
- "data-slot": "popover-header",
25
- className: e("flex flex-col items-start gap-2 self-stretch", t),
26
- ...n
27
- }));
28
- l.displayName = "PopoverHeader";
29
- var u = r(({ className: t, ...n }, r) => /* @__PURE__ */ a("div", {
30
- ref: r,
31
- "data-slot": "popover-header-content",
32
- className: e("flex items-start justify-between self-stretch", t),
33
- ...n
34
- }));
35
- u.displayName = "PopoverHeaderContent";
36
- var d = r(({ className: t, children: n, ...r }, i) => /* @__PURE__ */ a("h3", {
37
- ref: i,
38
- "data-slot": "popover-title",
39
- className: e("flex h-7 flex-1 flex-col justify-center self-stretch overflow-hidden text-ellipsis whitespace-nowrap text-base font-medium text-foreground leading-5 tracking-tighter", t),
40
- ...r,
41
- children: n
42
- }));
43
- d.displayName = "PopoverTitle";
44
- var f = r(({ className: t, ...n }, r) => /* @__PURE__ */ a("p", {
45
- ref: r,
46
- "data-slot": "popover-description",
47
- className: e("self-stretch text-sm font-normal text-secondary-foreground leading-[18px] tracking-tight", t),
48
- ...n
49
- }));
50
- f.displayName = "PopoverDescription";
51
- var p = r(({ className: t, ...n }, r) => /* @__PURE__ */ a("div", {
52
- ref: r,
53
- "data-slot": "popover-slot",
54
- className: e("flex flex-col items-start gap-3 self-stretch", t),
55
- ...n
56
- }));
57
- p.displayName = "PopoverSlot";
58
- var m = r(({ className: n, children: r, "aria-label": s = "Close", ...c }, l) => /* @__PURE__ */ a(o.Close, {
59
- "data-slot": "popover-close",
60
- render: /* @__PURE__ */ a(t, {
61
- ref: l,
62
- variant: "ghost",
63
- size: "icon-sm",
64
- className: e("h-7 w-7 shrink-0", n),
65
- "aria-label": s,
66
- ...c,
67
- children: r ?? /* @__PURE__ */ a(i, { className: "h-4 w-4" })
68
- })
69
- }));
70
- m.displayName = "PopoverClose";
71
- var h = r(({ className: t, align: r = "center", alignOffset: i = 0, side: s = "bottom", sideOffset: c = 4, ...l }, u) => {
72
- let d = n();
73
- return /* @__PURE__ */ a(o.Portal, {
74
- container: d,
75
- children: /* @__PURE__ */ a(o.Positioner, {
76
- align: r,
77
- alignOffset: i,
78
- side: s,
79
- sideOffset: c,
80
- className: "isolate z-50",
81
- children: /* @__PURE__ */ a(o.Popup, {
82
- ref: u,
83
- "data-slot": "popover-content",
84
- className: e("bg-popover-background text-foreground data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0 data-closed:zoom-out-95 data-open:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 flex w-72 flex-col items-start origin-[var(--transform-origin)] rounded-xl border border-border p-4 gap-2 shadow-default outline-none", t),
85
- ...l
86
- })
87
- })
88
- });
21
+ const PopoverHeader = /*#__PURE__*/ forwardRef(({ className, ...props }, ref)=>{
22
+ return /*#__PURE__*/ _jsx("div", {
23
+ ref: ref,
24
+ "data-slot": "popover-header",
25
+ className: cn('flex flex-col items-start gap-2 self-stretch', className),
26
+ ...props
27
+ });
89
28
  });
90
- h.displayName = "PopoverContent";
91
- //#endregion
92
- export { s as Popover, m as PopoverClose, h as PopoverContent, f as PopoverDescription, l as PopoverHeader, u as PopoverHeaderContent, p as PopoverSlot, d as PopoverTitle, c as PopoverTrigger };
29
+ PopoverHeader.displayName = 'PopoverHeader';
30
+ const PopoverHeaderContent = /*#__PURE__*/ forwardRef(({ className, ...props }, ref)=>{
31
+ return /*#__PURE__*/ _jsx("div", {
32
+ ref: ref,
33
+ "data-slot": "popover-header-content",
34
+ className: cn('flex items-start justify-between self-stretch', className),
35
+ ...props
36
+ });
37
+ });
38
+ PopoverHeaderContent.displayName = 'PopoverHeaderContent';
39
+ const PopoverTitle = /*#__PURE__*/ forwardRef(({ className, children, ...props }, ref)=>{
40
+ return /*#__PURE__*/ _jsx("h3", {
41
+ ref: ref,
42
+ "data-slot": "popover-title",
43
+ className: cn('flex h-7 flex-1 flex-col justify-center self-stretch overflow-hidden text-ellipsis whitespace-nowrap text-base font-medium text-popover-foreground leading-5 tracking-tighter', className),
44
+ ...props,
45
+ children: children
46
+ });
47
+ });
48
+ PopoverTitle.displayName = 'PopoverTitle';
49
+ const PopoverDescription = /*#__PURE__*/ forwardRef(({ className, ...props }, ref)=>{
50
+ return /*#__PURE__*/ _jsx("p", {
51
+ ref: ref,
52
+ "data-slot": "popover-description",
53
+ className: cn('self-stretch text-sm font-normal text-muted-foreground leading-[18px] tracking-tight', className),
54
+ ...props
55
+ });
56
+ });
57
+ PopoverDescription.displayName = 'PopoverDescription';
58
+ const PopoverSlot = /*#__PURE__*/ forwardRef(({ className, ...props }, ref)=>{
59
+ return /*#__PURE__*/ _jsx("div", {
60
+ ref: ref,
61
+ "data-slot": "popover-slot",
62
+ className: cn('flex flex-col items-start gap-3 self-stretch', className),
63
+ ...props
64
+ });
65
+ });
66
+ PopoverSlot.displayName = 'PopoverSlot';
67
+ const PopoverClose = /*#__PURE__*/ forwardRef(({ className, children, 'aria-label': ariaLabel = 'Close', ...props }, ref)=>{
68
+ return /*#__PURE__*/ _jsx(PopoverPrimitive.Close, {
69
+ "data-slot": "popover-close",
70
+ render: /*#__PURE__*/ _jsx(Button, {
71
+ ref: ref,
72
+ variant: "ghost",
73
+ size: "icon-sm",
74
+ className: cn('h-7 w-7 shrink-0', className),
75
+ "aria-label": ariaLabel,
76
+ ...props,
77
+ children: children ?? /*#__PURE__*/ _jsx(IconX, {
78
+ className: "h-4 w-4"
79
+ })
80
+ })
81
+ });
82
+ });
83
+ PopoverClose.displayName = 'PopoverClose';
84
+ const PopoverContent = /*#__PURE__*/ forwardRef(({ className, align = 'center', alignOffset = 0, anchor, side = 'bottom', sideOffset = 4, ...props }, ref)=>{
85
+ const container = usePortalContainer();
86
+ return /*#__PURE__*/ _jsx(PopoverPrimitive.Portal, {
87
+ container: container,
88
+ children: /*#__PURE__*/ _jsx(PopoverPrimitive.Positioner, {
89
+ align: align,
90
+ alignOffset: alignOffset,
91
+ anchor: anchor,
92
+ side: side,
93
+ sideOffset: sideOffset,
94
+ className: "isolate z-50",
95
+ children: /*#__PURE__*/ _jsx(PopoverPrimitive.Popup, {
96
+ ref: ref,
97
+ "data-slot": "popover-content",
98
+ className: cn('bg-popover-background text-popover-foreground data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0 data-closed:zoom-out-95 data-open:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 flex w-72 flex-col items-start origin-[var(--transform-origin)] rounded-xl border border-default p-4 gap-2 shadow-default outline-none', className),
99
+ ...props
100
+ })
101
+ })
102
+ });
103
+ });
104
+ PopoverContent.displayName = 'PopoverContent';
105
+ export { Popover, PopoverClose, PopoverContent, PopoverDescription, PopoverHeader, PopoverHeaderContent, PopoverSlot, PopoverTitle, PopoverTrigger };
106
+
107
+ //# sourceMappingURL=popover.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../../src/components/ui/core/popover/popover.tsx"],"sourcesContent":["import {\n type ForwardRefExoticComponent,\n type RefAttributes,\n type ComponentProps,\n type ComponentRef,\n type ReactNode,\n forwardRef,\n} from 'react';\n\nimport type {\n PopoverPopupProps,\n PopoverPositionerProps,\n} from '@base-ui/react/popover';\nimport { Popover as PopoverPrimitive } from '@base-ui/react/popover';\nimport { IconX } from '@tabler/icons-react';\n\nimport { usePortalContainer } from '../../../../lib/portal-container-context';\nimport { cn } from '../../../../lib/utils';\nimport { Button } from '../button/button';\n\nfunction Popover(props: PopoverPrimitive.Root.Props): ReactNode {\n return <PopoverPrimitive.Root data-slot=\"popover\" {...props} />;\n}\n\nfunction PopoverTrigger({\n children,\n ...props\n}: PopoverPrimitive.Trigger.Props): ReactNode {\n return (\n <PopoverPrimitive.Trigger data-slot=\"popover-trigger\" {...props}>\n {children}\n </PopoverPrimitive.Trigger>\n );\n}\n\nconst PopoverHeader: ForwardRefExoticComponent<\n ComponentProps<'div'> & RefAttributes<HTMLDivElement>\n> = forwardRef<HTMLDivElement, ComponentProps<'div'>>(\n ({ className, ...props }, ref) => {\n return (\n <div\n ref={ref}\n data-slot=\"popover-header\"\n className={cn(\n 'flex flex-col items-start gap-2 self-stretch',\n className\n )}\n {...props}\n />\n );\n }\n);\nPopoverHeader.displayName = 'PopoverHeader';\n\nconst PopoverHeaderContent: ForwardRefExoticComponent<\n ComponentProps<'div'> & RefAttributes<HTMLDivElement>\n> = forwardRef<HTMLDivElement, ComponentProps<'div'>>(\n ({ className, ...props }, ref) => {\n return (\n <div\n ref={ref}\n data-slot=\"popover-header-content\"\n className={cn(\n 'flex items-start justify-between self-stretch',\n className\n )}\n {...props}\n />\n );\n }\n);\nPopoverHeaderContent.displayName = 'PopoverHeaderContent';\n\nconst PopoverTitle: ForwardRefExoticComponent<\n ComponentProps<'h3'> & RefAttributes<HTMLHeadingElement>\n> = forwardRef<HTMLHeadingElement, ComponentProps<'h3'>>(\n ({ className, children, ...props }, ref) => {\n return (\n <h3\n ref={ref}\n data-slot=\"popover-title\"\n className={cn(\n 'flex h-7 flex-1 flex-col justify-center self-stretch overflow-hidden text-ellipsis whitespace-nowrap text-base font-medium text-popover-foreground leading-5 tracking-tighter',\n className\n )}\n {...props}\n >\n {children}\n </h3>\n );\n }\n);\nPopoverTitle.displayName = 'PopoverTitle';\n\nconst PopoverDescription: ForwardRefExoticComponent<\n ComponentProps<'p'> & RefAttributes<HTMLParagraphElement>\n> = forwardRef<HTMLParagraphElement, ComponentProps<'p'>>(\n ({ className, ...props }, ref) => {\n return (\n <p\n ref={ref}\n data-slot=\"popover-description\"\n className={cn(\n 'self-stretch text-sm font-normal text-muted-foreground leading-[18px] tracking-tight',\n className\n )}\n {...props}\n />\n );\n }\n);\nPopoverDescription.displayName = 'PopoverDescription';\n\nconst PopoverSlot: ForwardRefExoticComponent<\n ComponentProps<'div'> & RefAttributes<HTMLDivElement>\n> = forwardRef<HTMLDivElement, ComponentProps<'div'>>(\n ({ className, ...props }, ref) => {\n return (\n <div\n ref={ref}\n data-slot=\"popover-slot\"\n className={cn(\n 'flex flex-col items-start gap-3 self-stretch',\n className\n )}\n {...props}\n />\n );\n }\n);\nPopoverSlot.displayName = 'PopoverSlot';\n\nconst PopoverClose: ForwardRefExoticComponent<\n Omit<ComponentProps<typeof Button>, 'ref'> & RefAttributes<HTMLElement>\n> = forwardRef<ComponentRef<typeof Button>, ComponentProps<typeof Button>>(\n (\n { className, children, 'aria-label': ariaLabel = 'Close', ...props },\n ref\n ) => {\n return (\n <PopoverPrimitive.Close\n data-slot=\"popover-close\"\n render={\n <Button\n ref={ref}\n variant=\"ghost\"\n size=\"icon-sm\"\n className={cn('h-7 w-7 shrink-0', className)}\n aria-label={ariaLabel}\n {...props}\n >\n {children ?? <IconX className=\"h-4 w-4\" />}\n </Button>\n }\n />\n );\n }\n);\nPopoverClose.displayName = 'PopoverClose';\n\nconst PopoverContent: ForwardRefExoticComponent<\n Omit<\n PopoverPopupProps &\n Pick<\n PopoverPositionerProps,\n 'align' | 'alignOffset' | 'anchor' | 'side' | 'sideOffset'\n >,\n 'ref'\n > &\n RefAttributes<HTMLDivElement>\n> = forwardRef<\n ComponentRef<typeof PopoverPrimitive.Popup>,\n PopoverPrimitive.Popup.Props &\n Pick<\n PopoverPrimitive.Positioner.Props,\n 'align' | 'alignOffset' | 'anchor' | 'side' | 'sideOffset'\n >\n>(\n (\n {\n className,\n align = 'center',\n alignOffset = 0,\n anchor,\n side = 'bottom',\n sideOffset = 4,\n ...props\n },\n ref\n ) => {\n const container = usePortalContainer();\n return (\n <PopoverPrimitive.Portal container={container}>\n <PopoverPrimitive.Positioner\n align={align}\n alignOffset={alignOffset}\n anchor={anchor}\n side={side}\n sideOffset={sideOffset}\n className=\"isolate z-50\"\n >\n <PopoverPrimitive.Popup\n ref={ref}\n data-slot=\"popover-content\"\n className={cn(\n 'bg-popover-background text-popover-foreground data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0 data-closed:zoom-out-95 data-open:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 flex w-72 flex-col items-start origin-[var(--transform-origin)] rounded-xl border border-default p-4 gap-2 shadow-default outline-none',\n className\n )}\n {...props}\n />\n </PopoverPrimitive.Positioner>\n </PopoverPrimitive.Portal>\n );\n }\n);\nPopoverContent.displayName = 'PopoverContent';\n\nexport {\n Popover,\n PopoverClose,\n PopoverContent,\n PopoverDescription,\n PopoverHeader,\n PopoverHeaderContent,\n PopoverSlot,\n PopoverTitle,\n PopoverTrigger,\n};\n"],"names":["forwardRef","Popover","PopoverPrimitive","IconX","usePortalContainer","cn","Button","props","Root","data-slot","PopoverTrigger","children","Trigger","PopoverHeader","className","ref","div","displayName","PopoverHeaderContent","PopoverTitle","h3","PopoverDescription","p","PopoverSlot","PopoverClose","ariaLabel","Close","render","variant","size","aria-label","PopoverContent","align","alignOffset","anchor","side","sideOffset","container","Portal","Positioner","Popup"],"mappings":";AAAA,SAMEA,UAAU,QACL,QAAQ;AAMf,SAASC,WAAWC,gBAAgB,QAAQ,yBAAyB;AACrE,SAASC,KAAK,QAAQ,sBAAsB;AAE5C,SAASC,kBAAkB,QAAQ,8CAA2C;AAC9E,SAASC,EAAE,QAAQ,2BAAwB;AAC3C,SAASC,MAAM,QAAQ,sBAAmB;AAE1C,SAASL,QAAQM,KAAkC;IACjD,qBAAO,KAACL,iBAAiBM,IAAI;QAACC,aAAU;QAAW,GAAGF,KAAK;;AAC7D;AAEA,SAASG,eAAe,EACtBC,QAAQ,EACR,GAAGJ,OAC4B;IAC/B,qBACE,KAACL,iBAAiBU,OAAO;QAACH,aAAU;QAAmB,GAAGF,KAAK;kBAC5DI;;AAGP;AAEA,MAAME,8BAEFb,WACF,CAAC,EAAEc,SAAS,EAAE,GAAGP,OAAO,EAAEQ;IACxB,qBACE,KAACC;QACCD,KAAKA;QACLN,aAAU;QACVK,WAAWT,GACT,gDACAS;QAED,GAAGP,KAAK;;AAGf;AAEFM,cAAcI,WAAW,GAAG;AAE5B,MAAMC,qCAEFlB,WACF,CAAC,EAAEc,SAAS,EAAE,GAAGP,OAAO,EAAEQ;IACxB,qBACE,KAACC;QACCD,KAAKA;QACLN,aAAU;QACVK,WAAWT,GACT,iDACAS;QAED,GAAGP,KAAK;;AAGf;AAEFW,qBAAqBD,WAAW,GAAG;AAEnC,MAAME,6BAEFnB,WACF,CAAC,EAAEc,SAAS,EAAEH,QAAQ,EAAE,GAAGJ,OAAO,E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;YACZtB,WAAU;sBAEV,cAAA,KAACZ,iBAAiBsC,KAAK;gBACrBzB,KAAKA;gBACLN,aAAU;gBACVK,WAAWT,GACT,8dACAS;gBAED,GAAGP,KAAK;;;;AAKnB;AAEFwB,eAAed,WAAW,GAAG;AAE7B,SACEhB,OAAO,EACPuB,YAAY,EACZO,cAAc,EACdV,kBAAkB,EAClBR,aAAa,EACbK,oBAAoB,EACpBK,WAAW,EACXJ,YAAY,EACZT,cAAc,GACd"}
@@ -1,13 +1,14 @@
1
- import { ForwardRefExoticComponent, RefAttributes } from 'react';
2
- import { Progress as ProgressPrimitive } from '@base-ui/react/progress';
3
- import { VariantProps } from 'class-variance-authority';
4
- import { ClassProp } from 'class-variance-authority/types';
1
+ import { type ForwardRefExoticComponent, type RefAttributes } from "react";
2
+ import { Progress as ProgressPrimitive } from "@base-ui/react/progress";
3
+ import { type VariantProps } from "class-variance-authority";
4
+ import type { ClassProp } from "class-variance-authority/types";
5
5
  interface ProgressTrackVariantProps {
6
- size?: 'default' | 'sm' | null;
6
+ size?: "default" | "sm" | null;
7
7
  }
8
8
  declare const progressTrackVariants: (props?: (ProgressTrackVariantProps & ClassProp) | undefined) => string;
9
+ declare const progressIndicatorClasses = "bg-primary-background h-full transition-[width]";
9
10
  type ProgressProps = ProgressPrimitive.Root.Props & VariantProps<typeof progressTrackVariants> & {
10
- max?: number;
11
+ max?: number;
11
12
  };
12
- declare const Progress: ForwardRefExoticComponent<Omit<ProgressProps, 'ref'> & RefAttributes<HTMLDivElement>>;
13
- export { Progress };
13
+ declare const Progress: ForwardRefExoticComponent<Omit<ProgressProps, "ref"> & RefAttributes<HTMLDivElement>>;
14
+ export { Progress, progressIndicatorClasses, progressTrackVariants };
@@ -1,36 +1,51 @@
1
- import { cn as e } from "../../../../lib/utils.js";
2
- import { forwardRef as t } from "react";
3
- import { jsx as n } from "react/jsx-runtime";
4
- import { cva as r } from "class-variance-authority";
5
- import { Progress as i } from "@base-ui/react/progress";
6
- //#region libs/aura/src/components/ui/core/progress/progress.tsx
7
- var a = r("relative w-full overflow-hidden rounded-full bg-muted-background", {
8
- variants: { size: {
9
- default: "h-2",
10
- sm: "h-1"
11
- } },
12
- defaultVariants: { size: "default" }
13
- }), o = t(({ className: t, value: r = 0, max: o = 100, size: s, "aria-label": c, ...l }, u) => {
14
- let d = r ?? 0, f = o > 0 ? o : 100, p = Math.max(0, Math.min(d, f)), m = p * 100 / f, h = { width: `${m}%` }, g = `Progress: ${Math.round(m)}%`;
15
- return /* @__PURE__ */ n(i.Root, {
16
- ref: u,
17
- "data-slot": "progress",
18
- className: e("block w-full", t),
19
- value: p,
20
- max: f,
21
- "aria-label": c ?? g,
22
- ...l,
23
- children: /* @__PURE__ */ n(i.Track, {
24
- "data-slot": "progress-track",
25
- className: e(a({ size: s })),
26
- children: /* @__PURE__ */ n(i.Indicator, {
27
- "data-slot": "progress-indicator",
28
- className: "bg-active-background h-full transition-[width]",
29
- style: h
30
- })
31
- })
32
- });
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { forwardRef } from "react";
3
+ import { Progress as ProgressPrimitive } from "@base-ui/react/progress";
4
+ import { cva } from "class-variance-authority";
5
+ import { cn } from "../../../../lib/utils.js";
6
+ const progressTrackVariants = cva('relative w-full overflow-hidden rounded-full bg-medium-background', {
7
+ variants: {
8
+ size: {
9
+ default: 'h-2',
10
+ sm: 'h-1'
11
+ }
12
+ },
13
+ defaultVariants: {
14
+ size: 'default'
15
+ }
33
16
  });
34
- o.displayName = "Progress";
35
- //#endregion
36
- export { o as Progress };
17
+ const progressIndicatorClasses = 'bg-primary-background h-full transition-[width]';
18
+ const Progress = /*#__PURE__*/ forwardRef(({ className, value = 0, max = 100, size, 'aria-label': ariaLabel, ...props }, ref)=>{
19
+ const safeValue = value ?? 0;
20
+ const safeMax = max > 0 ? max : 100;
21
+ const clampedValue = Math.max(0, Math.min(safeValue, safeMax));
22
+ const percentage = clampedValue * 100 / safeMax;
23
+ const indicatorStyle = {
24
+ width: `${percentage}%`
25
+ };
26
+ const defaultAriaLabel = `Progress: ${Math.round(percentage)}%`;
27
+ return /*#__PURE__*/ _jsx(ProgressPrimitive.Root, {
28
+ ref: ref,
29
+ "data-slot": "progress",
30
+ className: cn('block w-full', className),
31
+ value: clampedValue,
32
+ max: safeMax,
33
+ "aria-label": ariaLabel ?? defaultAriaLabel,
34
+ ...props,
35
+ children: /*#__PURE__*/ _jsx(ProgressPrimitive.Track, {
36
+ "data-slot": "progress-track",
37
+ className: cn(progressTrackVariants({
38
+ size
39
+ })),
40
+ children: /*#__PURE__*/ _jsx(ProgressPrimitive.Indicator, {
41
+ "data-slot": "progress-indicator",
42
+ className: progressIndicatorClasses,
43
+ style: indicatorStyle
44
+ })
45
+ })
46
+ });
47
+ });
48
+ Progress.displayName = 'Progress';
49
+ export { Progress, progressIndicatorClasses, progressTrackVariants };
50
+
51
+ //# sourceMappingURL=progress.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../../src/components/ui/core/progress/progress.tsx"],"sourcesContent":["import {\n type ForwardRefExoticComponent,\n type RefAttributes,\n type ComponentRef,\n forwardRef,\n} from 'react';\n\nimport { Progress as ProgressPrimitive } from '@base-ui/react/progress';\nimport { type VariantProps, cva } from 'class-variance-authority';\nimport type { ClassProp } from 'class-variance-authority/types';\n\nimport { cn } from '../../../../lib/utils';\n\ninterface ProgressTrackVariantProps {\n size?: 'default' | 'sm' | null;\n}\n\nconst progressTrackVariants: (\n props?: (ProgressTrackVariantProps & ClassProp) | undefined\n) => string = cva(\n 'relative w-full overflow-hidden rounded-full bg-medium-background',\n {\n variants: {\n size: {\n default: 'h-2',\n sm: 'h-1',\n },\n },\n defaultVariants: {\n size: 'default',\n },\n }\n);\n\nconst progressIndicatorClasses =\n 'bg-primary-background h-full transition-[width]';\n\ntype ProgressProps = ProgressPrimitive.Root.Props &\n VariantProps<typeof progressTrackVariants> & { max?: number };\n\nconst Progress: ForwardRefExoticComponent<\n Omit<ProgressProps, 'ref'> & RefAttributes<HTMLDivElement>\n> = forwardRef<ComponentRef<typeof ProgressPrimitive.Root>, ProgressProps>(\n (\n {\n className,\n value = 0,\n max = 100,\n size,\n 'aria-label': ariaLabel,\n ...props\n },\n ref\n ) => {\n const safeValue = value ?? 0;\n const safeMax = max > 0 ? max : 100;\n const clampedValue = Math.max(0, Math.min(safeValue, safeMax));\n const percentage = (clampedValue * 100) / safeMax;\n const indicatorStyle = { width: `${percentage}%` };\n const defaultAriaLabel = `Progress: ${Math.round(percentage)}%`;\n\n return (\n <ProgressPrimitive.Root\n ref={ref}\n data-slot=\"progress\"\n className={cn('block w-full', className)}\n value={clampedValue}\n max={safeMax}\n aria-label={ariaLabel ?? defaultAriaLabel}\n {...props}\n >\n <ProgressPrimitive.Track\n data-slot=\"progress-track\"\n className={cn(progressTrackVariants({ size }))}\n >\n <ProgressPrimitive.Indicator\n data-slot=\"progress-indicator\"\n className={progressIndicatorClasses}\n style={indicatorStyle}\n />\n </ProgressPrimitive.Track>\n </ProgressPrimitive.Root>\n );\n }\n);\n\nProgress.displayName = 'Progress';\n\nexport { Progress, progressIndicatorClasses, progressTrackVariants };\n"],"names":["forwardRef","Progress","ProgressPrimitive","cva","cn","progressTrackVariants","variants","size","default","sm","defaultVariants","progressIndicatorClasses","className","value","max","ariaLabel","props","ref","safeValue","safeMax","clampedValue","Math","min","percentage","indicatorStyle","width","defaultAriaLabel","round","Root","data-slot","aria-label","Track","Indicator","style","displayName"],"mappings":";AAAA,SAIEA,UAAU,QACL,QAAQ;AAEf,SAASC,YAAYC,iBAAiB,QAAQ,0BAA0B;AACxE,SAA4BC,GAAG,QAAQ,2BAA2B;AAGlE,SAASC,EAAE,QAAQ,2BAAwB;AAM3C,MAAMC,wBAEQF,IACZ,qEACA;IACEG,UAAU;QACRC,MAAM;YACJC,SAAS;YACTC,IAAI;QACN;IACF;IACAC,iBAAiB;QACfH,MAAM;IACR;AACF;AAGF,MAAMI,2BACJ;AAKF,MAAMV,yBAEFD,WACF,CACE,EACEY,SAAS,EACTC,QAAQ,CAAC,EACTC,MAAM,GAAG,EACTP,IAAI,EACJ,cAAcQ,SAAS,EACvB,GAAGC,OACJ,EACDC;IAEA,MAAMC,YAAYL,SAAS;IAC3B,MAAMM,UAAUL,MAAM,IAAIA,MAAM;IAChC,MAAMM,eAAeC,KAAKP,GAAG,CAAC,GAAGO,KAAKC,GAAG,CAACJ,WAAWC;IACrD,MAAMI,aAAa,AAACH,eAAe,MAAOD;IAC1C,MAAMK,iBAAiB;QAAEC,OAAO,GAAGF,WAAW,CAAC,CAAC;IAAC;IACjD,MAAMG,mBAAmB,CAAC,UAAU,EAAEL,KAAKM,KAAK,CAACJ,YAAY,CAAC,CAAC;IAE/D,qBACE,KAACrB,kBAAkB0B,IAAI;QACrBX,KAAKA;QACLY,aAAU;QACVjB,WAAWR,GAAG,gBAAgBQ;QAC9BC,OAAOO;QACPN,KAAKK;QACLW,cAAYf,aAAaW;QACxB,GAAGV,KAAK;kBAET,cAAA,KAACd,kBAAkB6B,KAAK;YACtBF,aAAU;YACVjB,WAAWR,GAAGC,sBAAsB;gBAAEE;YAAK;sBAE3C,cAAA,KAACL,kBAAkB8B,SAAS;gBAC1BH,aAAU;gBACVjB,WAAWD;gBACXsB,OAAOT;;;;AAKjB;AAGFvB,SAASiC,WAAW,GAAG;AAEvB,SAASjC,QAAQ,EAAEU,wBAAwB,EAAEN,qBAAqB,GAAG"}
@@ -1,44 +1,44 @@
1
- import { FC, ForwardRefExoticComponent, RefAttributes, ComponentProps, HTMLAttributes, PropsWithChildren, ReactNode, SyntheticEvent } from 'react';
2
- import { ChatStatus } from '../../../../lib/ai/types';
3
- import { Command, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator } from '../command/command';
4
- import { DropdownMenu, DropdownMenuContent, DropdownMenuItem } from '../dropdown-menu/dropdown-menu';
5
- import { HoverCard, HoverCardContent, HoverCardTrigger } from '../hover-card/hover-card';
6
- import { InputGroupAddon, InputGroupButton, InputGroupTextarea } from '../input-group/input-group';
7
- import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from '../select/select';
1
+ import { type FC, type ForwardRefExoticComponent, type RefAttributes, type ComponentProps, type HTMLAttributes, type PropsWithChildren, type ReactNode, type SyntheticEvent } from "react";
2
+ import type { ChatStatus } from "../../../../lib/ai/types";
3
+ import { Command, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator } from "../command/command";
4
+ import { DropdownMenu, DropdownMenuContent, DropdownMenuItem } from "../dropdown-menu/dropdown-menu";
5
+ import { HoverCard, HoverCardContent, HoverCardTrigger } from "../hover-card/hover-card";
6
+ import { InputGroupAddon, InputGroupButton, InputGroupTextarea } from "../input-group/input-group";
7
+ import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "../select/select";
8
8
  type TextInputContext = {
9
- value: string;
10
- setInput: (v: string) => void;
11
- clear: () => void;
9
+ value: string;
10
+ setInput: (v: string) => void;
11
+ clear: () => void;
12
12
  };
13
13
  type PromptInputControllerProps = {
14
- textInput: TextInputContext;
14
+ textInput: TextInputContext;
15
15
  };
16
16
  declare const usePromptInputController: () => PromptInputControllerProps;
17
17
  type PromptInputProviderProps = PropsWithChildren<{
18
- initialInput?: string;
18
+ initialInput?: string;
19
19
  }>;
20
- declare function PromptInputProvider({ initialInput: initialTextInput, children, }: PromptInputProviderProps): ReactNode;
20
+ declare function PromptInputProvider({ initialInput: initialTextInput, children }: PromptInputProviderProps): ReactNode;
21
21
  type PromptInputMessage = {
22
- text?: string;
22
+ text?: string;
23
23
  };
24
- type PromptInputProps = Omit<HTMLAttributes<HTMLFormElement>, 'onSubmit'> & {
25
- onSubmit: (message: PromptInputMessage, event: SyntheticEvent<HTMLFormElement>) => void | Promise<void>;
26
- helperText?: ReactNode | false;
27
- errorMessage?: string;
24
+ type PromptInputProps = Omit<HTMLAttributes<HTMLFormElement>, "onSubmit"> & {
25
+ onSubmit: (message: PromptInputMessage, event: SyntheticEvent<HTMLFormElement>) => void | Promise<void>;
26
+ helperText?: ReactNode | false;
27
+ errorMessage?: string;
28
28
  };
29
29
  declare const PromptInput: FC<PromptInputProps>;
30
30
  type PromptInputBodyProps = HTMLAttributes<HTMLDivElement>;
31
31
  declare const PromptInputBody: ForwardRefExoticComponent<PromptInputBodyProps & RefAttributes<HTMLDivElement>>;
32
32
  type PromptInputTextareaProps = ComponentProps<typeof InputGroupTextarea>;
33
- declare const PromptInputTextarea: ForwardRefExoticComponent<Omit<PromptInputTextareaProps, 'ref'> & RefAttributes<HTMLTextAreaElement>>;
34
- type PromptInputHeaderProps = Omit<ComponentProps<typeof InputGroupAddon>, 'align'>;
35
- declare const PromptInputHeader: ForwardRefExoticComponent<Omit<PromptInputHeaderProps, 'ref'> & RefAttributes<HTMLDivElement>>;
36
- type PromptInputFooterProps = Omit<ComponentProps<typeof InputGroupAddon>, 'align'>;
37
- declare const PromptInputFooter: ForwardRefExoticComponent<Omit<PromptInputFooterProps, 'ref'> & RefAttributes<HTMLDivElement>>;
33
+ declare const PromptInputTextarea: ForwardRefExoticComponent<Omit<PromptInputTextareaProps, "ref"> & RefAttributes<HTMLTextAreaElement>>;
34
+ type PromptInputHeaderProps = Omit<ComponentProps<typeof InputGroupAddon>, "align">;
35
+ declare const PromptInputHeader: ForwardRefExoticComponent<Omit<PromptInputHeaderProps, "ref"> & RefAttributes<HTMLDivElement>>;
36
+ type PromptInputFooterProps = Omit<ComponentProps<typeof InputGroupAddon>, "align">;
37
+ declare const PromptInputFooter: ForwardRefExoticComponent<Omit<PromptInputFooterProps, "ref"> & RefAttributes<HTMLDivElement>>;
38
38
  type PromptInputToolsProps = HTMLAttributes<HTMLDivElement>;
39
39
  declare const PromptInputTools: ForwardRefExoticComponent<PromptInputToolsProps & RefAttributes<HTMLDivElement>>;
40
40
  type PromptInputButtonProps = ComponentProps<typeof InputGroupButton>;
41
- declare const PromptInputButton: ForwardRefExoticComponent<Omit<PromptInputButtonProps, 'ref'> & RefAttributes<HTMLElement>>;
41
+ declare const PromptInputButton: ForwardRefExoticComponent<Omit<PromptInputButtonProps, "ref"> & RefAttributes<HTMLElement>>;
42
42
  type PromptInputActionMenuProps = ComponentProps<typeof DropdownMenu>;
43
43
  declare const PromptInputActionMenu: FC<PromptInputActionMenuProps>;
44
44
  type PromptInputActionMenuTriggerProps = PromptInputButtonProps;
@@ -48,9 +48,9 @@ declare const PromptInputActionMenuContent: FC<PromptInputActionMenuContentProps
48
48
  type PromptInputActionMenuItemProps = ComponentProps<typeof DropdownMenuItem>;
49
49
  declare const PromptInputActionMenuItem: FC<PromptInputActionMenuItemProps>;
50
50
  type PromptInputSubmitProps = ComponentProps<typeof InputGroupButton> & {
51
- status?: ChatStatus;
51
+ status?: ChatStatus;
52
52
  };
53
- declare const PromptInputSubmit: ForwardRefExoticComponent<Omit<PromptInputSubmitProps, 'ref'> & RefAttributes<HTMLElement>>;
53
+ declare const PromptInputSubmit: ForwardRefExoticComponent<Omit<PromptInputSubmitProps, "ref"> & RefAttributes<HTMLElement>>;
54
54
  type PromptInputModelSelectProps = ComponentProps<typeof Select>;
55
55
  declare const PromptInputModelSelect: FC<PromptInputModelSelectProps>;
56
56
  type PromptInputModelSelectTriggerProps = ComponentProps<typeof SelectTrigger>;
@@ -91,4 +91,4 @@ type PromptInputCommandItemProps = ComponentProps<typeof CommandItem>;
91
91
  declare const PromptInputCommandItem: FC<PromptInputCommandItemProps>;
92
92
  type PromptInputCommandSeparatorProps = ComponentProps<typeof CommandSeparator>;
93
93
  declare const PromptInputCommandSeparator: FC<PromptInputCommandSeparatorProps>;
94
- export { usePromptInputController, PromptInputProvider, PromptInput, PromptInputBody, PromptInputTextarea, PromptInputHeader, PromptInputFooter, PromptInputTools, PromptInputButton, PromptInputActionMenu, PromptInputActionMenuTrigger, PromptInputActionMenuContent, PromptInputActionMenuItem, PromptInputSubmit, PromptInputModelSelect, PromptInputModelSelectTrigger, PromptInputModelSelectContent, PromptInputModelSelectItem, PromptInputModelSelectValue, PromptInputHoverCard, PromptInputHoverCardTrigger, PromptInputHoverCardContent, PromptInputTabsList, PromptInputTab, PromptInputTabLabel, PromptInputTabBody, PromptInputTabItem, PromptInputCommand, PromptInputCommandInput, PromptInputCommandList, PromptInputCommandEmpty, PromptInputCommandGroup, PromptInputCommandItem, PromptInputCommandSeparator, };
94
+ export { usePromptInputController, PromptInputProvider, PromptInput, PromptInputBody, PromptInputTextarea, PromptInputHeader, PromptInputFooter, PromptInputTools, PromptInputButton, PromptInputActionMenu, PromptInputActionMenuTrigger, PromptInputActionMenuContent, PromptInputActionMenuItem, PromptInputSubmit, PromptInputModelSelect, PromptInputModelSelectTrigger, PromptInputModelSelectContent, PromptInputModelSelectItem, PromptInputModelSelectValue, PromptInputHoverCard, PromptInputHoverCardTrigger, PromptInputHoverCardContent, PromptInputTabsList, PromptInputTab, PromptInputTabLabel, PromptInputTabBody, PromptInputTabItem, PromptInputCommand, PromptInputCommandInput, PromptInputCommandList, PromptInputCommandEmpty, PromptInputCommandGroup, PromptInputCommandItem, PromptInputCommandSeparator };