@cognite/aura 0.3.5 → 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 +21 -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 +22 -22
  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 +69 -55
  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 +104 -76
  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 +402 -132
  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 +44 -33
  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 -1
  118. package/dist/components/ui/core/data-grid/index.js +5 -2
  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 +10 -10
  342. package/dist/components/ui/core/segmented-control/segmented-control.js +203 -149
  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 +46 -11
  446. package/src/components/ui/core/button/button.md +93 -0
@@ -1,15 +1,15 @@
1
- import { ForwardRefExoticComponent, RefAttributes, ComponentProps } from 'react';
2
- import { Button } from '../button/button';
3
- type ComboboxProps = Omit<ComponentProps<typeof Button>, 'value' | 'onChange'> & {
4
- options: Array<{
5
- value: string;
6
- label: string;
7
- }>;
8
- value?: string;
9
- onValueChange?: (value: string) => void;
10
- placeholder?: string;
11
- searchPlaceholder?: string;
12
- emptyText?: string;
1
+ import { type ForwardRefExoticComponent, type RefAttributes, type ComponentProps } from "react";
2
+ import { Button } from "../button/button";
3
+ type ComboboxProps = Omit<ComponentProps<typeof Button>, "value" | "onChange" | "variant" | "size" | "render" | "nativeButton"> & {
4
+ options: Array<{
5
+ value: string;
6
+ label: string;
7
+ }>;
8
+ value?: string;
9
+ onValueChange?: (value: string) => void;
10
+ placeholder?: string;
11
+ searchPlaceholder?: string;
12
+ emptyText?: string;
13
13
  };
14
- declare const Combobox: ForwardRefExoticComponent<Omit<ComboboxProps, 'ref'> & RefAttributes<HTMLElement>>;
14
+ declare const Combobox: ForwardRefExoticComponent<Omit<ComboboxProps, "ref"> & RefAttributes<HTMLElement>>;
15
15
  export { Combobox };
@@ -1,41 +1,90 @@
1
- import { cn as e } from "../../../../lib/utils.js";
2
- import { Button as t } from "../button/button.js";
3
- import { Command as n, CommandEmpty as r, CommandGroup as i, CommandInput as a, CommandItem as o, CommandList as s } from "../command/command.js";
4
- import { Popover as c, PopoverContent as l, PopoverTrigger as u } from "../popover/popover.js";
5
- import { forwardRef as d, useState as f } from "react";
6
- import { IconCaretUpDown as p, IconCheck as m } from "@tabler/icons-react";
7
- import { jsx as h, jsxs as g } from "react/jsx-runtime";
8
- //#region libs/aura/src/components/ui/core/combobox/combobox.tsx
9
- var _ = d(({ options: d, value: _, onValueChange: v, placeholder: y = "Select option...", searchPlaceholder: b = "Search...", emptyText: x = "No option found.", className: S, ...C }, w) => {
10
- let [T, E] = f(!1), [D, O] = f(_ ?? ""), k = _ !== void 0, A = k ? _ : D, j = (e) => {
11
- let t = e === A ? "" : e;
12
- k || O(t), v?.(t), E(!1);
13
- };
14
- return /* @__PURE__ */ h("div", {
15
- "data-slot": "combobox",
16
- children: /* @__PURE__ */ g(c, {
17
- open: T,
18
- onOpenChange: E,
19
- children: [/* @__PURE__ */ h(u, { render: /* @__PURE__ */ g(t, {
20
- ref: w,
21
- "data-slot": "combobox-trigger",
22
- variant: "outline",
23
- role: "combobox",
24
- "aria-expanded": T,
25
- className: e("w-50 justify-between", S),
26
- ...C,
27
- children: [A ? d.find((e) => e.value === A)?.label : y, /* @__PURE__ */ h(p, { className: "ml-2 h-4 w-4 shrink-0 opacity-50" })]
28
- }) }), /* @__PURE__ */ h(l, {
29
- className: e("w-50 p-0", S),
30
- children: /* @__PURE__ */ g(n, { children: [/* @__PURE__ */ h(a, { placeholder: b }), /* @__PURE__ */ g(s, { children: [/* @__PURE__ */ h(r, { children: x }), /* @__PURE__ */ h(i, { children: d.map((t) => /* @__PURE__ */ g(o, {
31
- value: t.value,
32
- onSelect: j,
33
- children: [/* @__PURE__ */ h(m, { className: e("mr-2 h-4 w-4", A === t.value ? "opacity-100" : "opacity-0") }), t.label]
34
- }, t.value)) })] })] })
35
- })]
36
- })
37
- });
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { forwardRef, useId, useState } from "react";
3
+ import { IconCaretUpDown, IconCheck } from "@tabler/icons-react";
4
+ import { cn, formFieldOpenState, formFieldTriggerClasses } from "../../../../lib/utils.js";
5
+ import { Button } from "../button/button.js";
6
+ import { Command, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList } from "../command/command.js";
7
+ import { Popover, PopoverContent, PopoverTrigger } from "../popover/popover.js";
8
+ const Combobox = /*#__PURE__*/ forwardRef(({ options, value, onValueChange, placeholder = 'Select option...', searchPlaceholder = 'Search...', emptyText = 'No option found.', className, type = 'button', ...props }, ref)=>{
9
+ const [open, setOpen] = useState(false);
10
+ const listboxId = useId();
11
+ const [internalValue, setInternalValue] = useState(value ?? '');
12
+ const isControlled = value !== undefined;
13
+ const selectedValue = isControlled ? value : internalValue;
14
+ const selectedLabel = selectedValue ? options.find((option)=>option.value === selectedValue)?.label : undefined;
15
+ const handleValueChange = (newValue)=>{
16
+ const finalValue = newValue === selectedValue ? '' : newValue;
17
+ if (!isControlled) {
18
+ setInternalValue(finalValue);
19
+ }
20
+ onValueChange?.(finalValue);
21
+ setOpen(false);
22
+ };
23
+ return /*#__PURE__*/ _jsx("div", {
24
+ "data-slot": "combobox",
25
+ children: /*#__PURE__*/ _jsxs(Popover, {
26
+ open: open,
27
+ onOpenChange: setOpen,
28
+ children: [
29
+ /*#__PURE__*/ _jsx(PopoverTrigger, {
30
+ render: /*#__PURE__*/ _jsxs(Button, {
31
+ ref: ref,
32
+ type: type,
33
+ nativeButton: true,
34
+ variant: null,
35
+ size: null,
36
+ "data-slot": "combobox-trigger",
37
+ role: "combobox",
38
+ "aria-expanded": open,
39
+ "aria-controls": listboxId,
40
+ className: cn(formFieldTriggerClasses, open && formFieldOpenState, className),
41
+ ...props,
42
+ children: [
43
+ /*#__PURE__*/ _jsx("span", {
44
+ className: cn('flex-1 truncate text-left', selectedLabel ? 'text-base-foreground disabled:text-base-foreground-disabled' : 'text-muted-foreground disabled:text-base-foreground-disabled'),
45
+ children: selectedLabel ?? placeholder
46
+ }),
47
+ /*#__PURE__*/ _jsx(IconCaretUpDown, {
48
+ className: "size-4 opacity-50"
49
+ })
50
+ ]
51
+ })
52
+ }),
53
+ /*#__PURE__*/ _jsx(PopoverContent, {
54
+ id: listboxId,
55
+ className: cn('w-50 p-0', className),
56
+ children: /*#__PURE__*/ _jsxs(Command, {
57
+ children: [
58
+ /*#__PURE__*/ _jsx(CommandInput, {
59
+ placeholder: searchPlaceholder
60
+ }),
61
+ /*#__PURE__*/ _jsxs(CommandList, {
62
+ children: [
63
+ /*#__PURE__*/ _jsx(CommandEmpty, {
64
+ children: emptyText
65
+ }),
66
+ /*#__PURE__*/ _jsx(CommandGroup, {
67
+ children: options.map((option)=>/*#__PURE__*/ _jsxs(CommandItem, {
68
+ value: option.value,
69
+ onSelect: handleValueChange,
70
+ children: [
71
+ /*#__PURE__*/ _jsx(IconCheck, {
72
+ className: cn('mr-2 size-4', selectedValue === option.value ? 'opacity-100' : 'opacity-0')
73
+ }),
74
+ option.label
75
+ ]
76
+ }, option.value))
77
+ })
78
+ ]
79
+ })
80
+ ]
81
+ })
82
+ })
83
+ ]
84
+ })
85
+ });
38
86
  });
39
- _.displayName = "Combobox";
40
- //#endregion
41
- export { _ as Combobox };
87
+ Combobox.displayName = 'Combobox';
88
+ export { Combobox };
89
+
90
+ //# sourceMappingURL=combobox.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../../src/components/ui/core/combobox/combobox.tsx"],"sourcesContent":["import {\n type ForwardRefExoticComponent,\n type RefAttributes,\n type ComponentProps,\n type ComponentRef,\n forwardRef,\n useId,\n useState,\n} from 'react';\n\nimport { IconCaretUpDown, IconCheck } from '@tabler/icons-react';\n\nimport {\n cn,\n formFieldOpenState,\n formFieldTriggerClasses,\n} from '../../../../lib/utils';\nimport { Button } from '../button/button';\nimport {\n Command,\n CommandEmpty,\n CommandGroup,\n CommandInput,\n CommandItem,\n CommandList,\n} from '../command/command';\nimport { Popover, PopoverContent, PopoverTrigger } from '../popover/popover';\n\ntype ComboboxProps = Omit<\n ComponentProps<typeof Button>,\n 'value' | 'onChange' | 'variant' | 'size' | 'render' | 'nativeButton'\n> & {\n options: Array<{ value: string; label: string }>;\n value?: string;\n onValueChange?: (value: string) => void;\n placeholder?: string;\n searchPlaceholder?: string;\n emptyText?: string;\n};\n\nconst Combobox: ForwardRefExoticComponent<\n Omit<ComboboxProps, 'ref'> & RefAttributes<HTMLElement>\n> = forwardRef<ComponentRef<typeof Button>, ComboboxProps>(\n (\n {\n options,\n value,\n onValueChange,\n placeholder = 'Select option...',\n searchPlaceholder = 'Search...',\n emptyText = 'No option found.',\n className,\n type = 'button',\n ...props\n },\n ref\n ) => {\n const [open, setOpen] = useState(false);\n const listboxId = useId();\n const [internalValue, setInternalValue] = useState(value ?? '');\n const isControlled = value !== undefined;\n const selectedValue = isControlled ? value : internalValue;\n const selectedLabel = selectedValue\n ? options.find((option) => option.value === selectedValue)?.label\n : undefined;\n\n const handleValueChange = (newValue: string) => {\n const finalValue = newValue === selectedValue ? '' : newValue;\n if (!isControlled) {\n setInternalValue(finalValue);\n }\n onValueChange?.(finalValue);\n setOpen(false);\n };\n\n return (\n <div data-slot=\"combobox\">\n <Popover open={open} onOpenChange={setOpen}>\n <PopoverTrigger\n render={\n <Button\n ref={ref}\n type={type}\n nativeButton\n variant={null}\n size={null}\n data-slot=\"combobox-trigger\"\n role=\"combobox\"\n aria-expanded={open}\n aria-controls={listboxId}\n className={cn(\n formFieldTriggerClasses,\n open && formFieldOpenState,\n className\n )}\n {...props}\n >\n <span\n className={cn(\n 'flex-1 truncate text-left',\n selectedLabel\n ? 'text-base-foreground disabled:text-base-foreground-disabled'\n : 'text-muted-foreground disabled:text-base-foreground-disabled'\n )}\n >\n {selectedLabel ?? placeholder}\n </span>\n <IconCaretUpDown className=\"size-4 opacity-50\" />\n </Button>\n }\n />\n <PopoverContent id={listboxId} className={cn('w-50 p-0', className)}>\n <Command>\n <CommandInput placeholder={searchPlaceholder} />\n <CommandList>\n <CommandEmpty>{emptyText}</CommandEmpty>\n <CommandGroup>\n {options.map((option) => (\n <CommandItem\n key={option.value}\n value={option.value}\n onSelect={handleValueChange}\n >\n <IconCheck\n className={cn(\n 'mr-2 size-4',\n selectedValue === option.value\n ? 'opacity-100'\n : 'opacity-0'\n )}\n />\n {option.label}\n </CommandItem>\n ))}\n </CommandGroup>\n </CommandList>\n </Command>\n </PopoverContent>\n </Popover>\n </div>\n );\n }\n);\n\nCombobox.displayName = 'Combobox';\n\nexport { Combobox };\n"],"names":["forwardRef","useId","useState","IconCaretUpDown","IconCheck","cn","formFieldOpenState","formFieldTriggerClasses","Button","Command","CommandEmpty","CommandGroup","CommandInput","CommandItem","CommandList","Popover","PopoverContent","PopoverTrigger","Combobox","options","value","onValueChange","placeholder","searchPlaceholder","emptyText","className","type","props","ref","open","setOpen","listboxId","internalValue","setInternalValue","isControlled","undefined","selectedValue","selectedLabel","find","option","label","handleValueChange","newValue","finalValue","div","data-slot","onOpenChange","render","nativeButton","variant","size","role","aria-expanded","aria-controls","span","id","map","onSelect","displayName"],"mappings":";AAAA,SAKEA,UAAU,EACVC,KAAK,EACLC,QAAQ,QACH,QAAQ;AAEf,SAASC,eAAe,EAAEC,SAAS,QAAQ,sBAAsB;AAEjE,SACEC,EAAE,EACFC,kBAAkB,EAClBC,uBAAuB,QAClB,2BAAwB;AAC/B,SAASC,MAAM,QAAQ,sBAAmB;AAC1C,SACEC,OAAO,EACPC,YAAY,EACZC,YAAY,EACZC,YAAY,EACZC,WAAW,EACXC,WAAW,QACN,wBAAqB;AAC5B,SAASC,OAAO,EAAEC,cAAc,EAAEC,cAAc,QAAQ,wBAAqB;AAc7E,MAAMC,yBAEFlB,WACF,CACE,EACEmB,OAAO,EACPC,KAAK,EACLC,aAAa,EACbC,cAAc,kBAAkB,EAChCC,oBAAoB,WAAW,EAC/BC,YAAY,kBAAkB,EAC9BC,SAAS,EACTC,OAAO,QAAQ,EACf,GAAGC,OACJ,EACDC;IAEA,MAAM,CAACC,MAAMC,QAAQ,GAAG5B,SAAS;IACjC,MAAM6B,YAAY9B;IAClB,MAAM,CAAC+B,eAAeC,iBAAiB,GAAG/B,SAASkB,SAAS;IAC5D,MAAMc,eAAed,UAAUe;IAC/B,MAAMC,gBAAgBF,eAAed,QAAQY;IAC7C,MAAMK,gBAAgBD,gBAClBjB,QAAQmB,IAAI,CAAC,CAACC,SAAWA,OAAOnB,KAAK,KAAKgB,gBAAgBI,QAC1DL;IAEJ,MAAMM,oBAAoB,CAACC;QACzB,MAAMC,aAAaD,aAAaN,gBAAgB,KAAKM;QACrD,IAAI,CAACR,cAAc;YACjBD,iBAAiBU;QACnB;QACAtB,gBAAgBsB;QAChBb,QAAQ;IACV;IAEA,qBACE,KAACc;QAAIC,aAAU;kBACb,cAAA,MAAC9B;YAAQc,MAAMA;YAAMiB,cAAchB;;8BACjC,KAACb;oBACC8B,sBACE,MAACvC;wBACCoB,KAAKA;wBACLF,MAAMA;wBACNsB,YAAY;wBACZC,SAAS;wBACTC,MAAM;wBACNL,aAAU;wBACVM,MAAK;wBACLC,iBAAevB;wBACfwB,iBAAetB;wBACfN,WAAWpB,GACTE,yBACAsB,QAAQvB,oBACRmB;wBAED,GAAGE,KAAK;;0CAET,KAAC2B;gCACC7B,WAAWpB,GACT,6BACAgC,gBACI,gEACA;0CAGLA,iBAAiBf;;0CAEpB,KAACnB;gCAAgBsB,WAAU;;;;;8BAIjC,KAACT;oBAAeuC,IAAIxB;oBAAWN,WAAWpB,GAAG,YAAYoB;8BACvD,cAAA,MAAChB;;0CACC,KAACG;gCAAaU,aAAaC;;0CAC3B,MAACT;;kDACC,KAACJ;kDAAcc;;kDACf,KAACb;kDACEQ,QAAQqC,GAAG,CAAC,CAACjB,uBACZ,MAAC1B;gDAECO,OAAOmB,OAAOnB,KAAK;gDACnBqC,UAAUhB;;kEAEV,KAACrC;wDACCqB,WAAWpB,GACT,eACA+B,kBAAkBG,OAAOnB,KAAK,GAC1B,gBACA;;oDAGPmB,OAAOC,KAAK;;+CAZRD,OAAOnB,KAAK;;;;;;;;;;AAsBrC;AAGFF,SAASwC,WAAW,GAAG;AAEvB,SAASxC,QAAQ,GAAG"}
@@ -1,19 +1,21 @@
1
- import { ForwardRefExoticComponent, RefAttributes, ComponentProps, ReactNode } from 'react';
2
- import { Command as CommandPrimitive } from 'cmdk';
3
- import { Dialog } from '../dialog/dialog';
4
- declare const Command: ForwardRefExoticComponent<Omit<ComponentProps<typeof CommandPrimitive>, 'ref'> & RefAttributes<HTMLDivElement>>;
5
- declare function CommandDialog({ title, description, children, className, showCloseButton, ...props }: Omit<ComponentProps<typeof Dialog>, 'children'> & {
6
- children?: ReactNode;
7
- title?: string;
8
- description?: string;
9
- className?: string;
10
- showCloseButton?: boolean;
1
+ import { type ForwardRefExoticComponent, type RefAttributes, type ComponentProps, type ReactNode } from "react";
2
+ import { Command as CommandPrimitive } from "cmdk";
3
+ import { Dialog } from "../dialog/dialog";
4
+ declare const Command: ForwardRefExoticComponent<Omit<ComponentProps<typeof CommandPrimitive>, "ref"> & RefAttributes<HTMLDivElement>>;
5
+ declare function CommandDialog({ title, description, children, className, showCloseButton, ...props }: Omit<ComponentProps<typeof Dialog>, "children"> & {
6
+ children?: ReactNode;
7
+ title?: string;
8
+ description?: string;
9
+ className?: string;
10
+ showCloseButton?: boolean;
11
11
  }): ReactNode;
12
- declare const CommandInput: ForwardRefExoticComponent<Omit<ComponentProps<typeof CommandPrimitive.Input>, 'ref'> & RefAttributes<HTMLInputElement>>;
13
- declare const CommandList: ForwardRefExoticComponent<Omit<ComponentProps<typeof CommandPrimitive.List>, 'ref'> & RefAttributes<HTMLDivElement>>;
14
- declare const CommandEmpty: ForwardRefExoticComponent<Omit<ComponentProps<typeof CommandPrimitive.Empty>, 'ref'> & RefAttributes<HTMLDivElement>>;
15
- declare const CommandGroup: ForwardRefExoticComponent<Omit<ComponentProps<typeof CommandPrimitive.Group>, 'ref'> & RefAttributes<HTMLDivElement>>;
16
- declare const CommandSeparator: ForwardRefExoticComponent<Omit<ComponentProps<typeof CommandPrimitive.Separator>, 'ref'> & RefAttributes<HTMLDivElement>>;
17
- declare const CommandItem: ForwardRefExoticComponent<Omit<ComponentProps<typeof CommandPrimitive.Item>, 'ref'> & RefAttributes<HTMLDivElement>>;
18
- declare const CommandShortcut: ForwardRefExoticComponent<ComponentProps<'span'> & RefAttributes<HTMLSpanElement>>;
19
- export { Command, CommandDialog, CommandInput, CommandList, CommandEmpty, CommandGroup, CommandItem, CommandShortcut, CommandSeparator, };
12
+ declare const CommandInput: ForwardRefExoticComponent<Omit<ComponentProps<typeof CommandPrimitive.Input>, "ref"> & RefAttributes<HTMLInputElement>>;
13
+ declare const CommandList: ForwardRefExoticComponent<Omit<ComponentProps<typeof CommandPrimitive.List>, "ref"> & RefAttributes<HTMLDivElement>>;
14
+ declare const CommandEmpty: ForwardRefExoticComponent<Omit<ComponentProps<typeof CommandPrimitive.Empty>, "ref"> & RefAttributes<HTMLDivElement>>;
15
+ declare const CommandGroup: ForwardRefExoticComponent<Omit<ComponentProps<typeof CommandPrimitive.Group>, "ref"> & {
16
+ inset?: boolean;
17
+ } & RefAttributes<HTMLDivElement>>;
18
+ declare const CommandSeparator: ForwardRefExoticComponent<Omit<ComponentProps<typeof CommandPrimitive.Separator>, "ref"> & RefAttributes<HTMLDivElement>>;
19
+ declare const CommandItem: ForwardRefExoticComponent<Omit<ComponentProps<typeof CommandPrimitive.Item>, "ref"> & RefAttributes<HTMLDivElement>>;
20
+ declare const CommandShortcut: ForwardRefExoticComponent<ComponentProps<"span"> & RefAttributes<HTMLSpanElement>>;
21
+ export { Command, CommandDialog, CommandInput, CommandList, CommandEmpty, CommandGroup, CommandItem, CommandShortcut, CommandSeparator };
@@ -1,86 +1,138 @@
1
- import { cn as e } from "../../../../lib/utils.js";
2
- import { Dialog as t, DialogContent as n, DialogDescription as r, DialogHeader as i, DialogTitle as a } from "../dialog/dialog.js";
3
- import { forwardRef as o } from "react";
4
- import { IconSearch as s } from "@tabler/icons-react";
5
- import { jsx as c, jsxs as l } from "react/jsx-runtime";
6
- import { Command as u } from "cmdk";
7
- //#region libs/aura/src/components/ui/core/command/command.tsx
8
- var d = o(({ className: t, ...n }, r) => /* @__PURE__ */ c(u, {
9
- ref: r,
10
- "data-slot": "command",
11
- className: e("rounded-xl bg-background text-muted-foreground flex h-full w-full flex-col overflow-hidden", t),
12
- ...n
13
- }));
14
- d.displayName = "Command";
15
- function f({ title: o = "Command Palette", description: s = "Search for a command to run...", children: u, className: f, showCloseButton: p = !0, ...m }) {
16
- return /* @__PURE__ */ l(t, {
17
- ...m,
18
- children: [/* @__PURE__ */ l(i, {
19
- className: "sr-only rounded-lg",
20
- children: [/* @__PURE__ */ c(a, { children: o }), /* @__PURE__ */ c(r, { children: s })]
21
- }), /* @__PURE__ */ c(n, {
22
- "data-slot": "command-dialog",
23
- className: e("overflow-hidden p-0", f),
24
- showCloseButton: p,
25
- children: /* @__PURE__ */ c(d, {
26
- className: "**:[[cmdk-group-heading]]:text-muted-foreground **:data-[slot=command-input-wrapper]:h-12 **:[[cmdk-group-heading]]:px-2 **:[[cmdk-group-heading]]:font-medium **:[[cmdk-group]]:px-2 [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 **:[[cmdk-input]]:h-12 **:[[cmdk-item]]:px-2 **:[[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5",
27
- children: u
28
- })
29
- })]
30
- });
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { forwardRef, useRef } from "react";
3
+ import { IconSearch } from "@tabler/icons-react";
4
+ import { Command as CommandPrimitive } from "cmdk";
5
+ import { cn, menuContainerPadding, menuItemPadding, menuSectionLabelCmdkHeadingClasses, menuSectionLabelCmdkHeadingInsetClasses, menuSectionSeparatorClasses } from "../../../../lib/utils.js";
6
+ import { assignRef } from "../../../../utils/assign-ref.js";
7
+ import { Dialog, DialogContent, DialogDescription, DialogHeader, DialogTitle } from "../dialog/dialog.js";
8
+ import { InputGroup, InputGroupAddon, inputGroupInputControlClasses } from "../input-group/input-group.js";
9
+ const Command = /*#__PURE__*/ forwardRef(({ className, ...props }, ref)=>{
10
+ return /*#__PURE__*/ _jsx(CommandPrimitive, {
11
+ ref: ref,
12
+ "data-slot": "command",
13
+ className: cn('rounded-xl bg-popover-background text-popover-foreground flex h-full w-full flex-col overflow-hidden', menuSectionLabelCmdkHeadingClasses, menuSectionLabelCmdkHeadingInsetClasses, className),
14
+ ...props
15
+ });
16
+ });
17
+ Command.displayName = 'Command';
18
+ function CommandDialog({ title = 'Command Palette', description = 'Search for a command to run...', children, className, showCloseButton = true, ...props }) {
19
+ return /*#__PURE__*/ _jsxs(Dialog, {
20
+ ...props,
21
+ children: [
22
+ /*#__PURE__*/ _jsxs(DialogHeader, {
23
+ className: "sr-only rounded-lg",
24
+ children: [
25
+ /*#__PURE__*/ _jsx(DialogTitle, {
26
+ children: title
27
+ }),
28
+ /*#__PURE__*/ _jsx(DialogDescription, {
29
+ children: description
30
+ })
31
+ ]
32
+ }),
33
+ /*#__PURE__*/ _jsx(DialogContent, {
34
+ "data-slot": "command-dialog",
35
+ className: cn('overflow-hidden p-0 **:data-[slot=command-input-wrapper]:pr-12', className),
36
+ closeButtonClassName: "top-[calc(0.5rem+1.125rem)] right-2 -translate-y-1/2",
37
+ closeButtonSize: "icon",
38
+ showCloseButton: showCloseButton,
39
+ children: /*#__PURE__*/ _jsx(Command, {
40
+ className: cn('[&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5', menuSectionLabelCmdkHeadingInsetClasses),
41
+ children: children
42
+ })
43
+ })
44
+ ]
45
+ });
31
46
  }
32
- var p = o(({ className: t, ...n }, r) => /* @__PURE__ */ l("div", {
33
- "data-slot": "command-input-wrapper",
34
- className: "flex h-10 items-center gap-2 border-b px-2",
35
- children: [/* @__PURE__ */ c(s, { className: "size-4 shrink-0 opacity-50" }), /* @__PURE__ */ c(u.Input, {
36
- ref: r,
37
- "data-slot": "command-input",
38
- className: e("placeholder:text-muted-foreground flex h-10 w-full rounded-lg bg-transparent py-3 text-sm outline-hidden disabled:cursor-not-allowed disabled:opacity-50", t),
39
- ...n
40
- })]
41
- }));
42
- p.displayName = "CommandInput";
43
- var m = o(({ className: t, ...n }, r) => /* @__PURE__ */ c(u.List, {
44
- ref: r,
45
- "data-slot": "command-list",
46
- className: e("max-h-75 scroll-py-1 overflow-x-hidden overflow-y-auto", t),
47
- ...n
48
- }));
49
- m.displayName = "CommandList";
50
- var h = o(({ className: t, ...n }, r) => /* @__PURE__ */ c(u.Empty, {
51
- ref: r,
52
- "data-slot": "command-empty",
53
- className: e("py-6 text-center text-sm", t),
54
- ...n
55
- }));
56
- h.displayName = "CommandEmpty";
57
- var g = o(({ className: t, ...n }, r) => /* @__PURE__ */ c(u.Group, {
58
- ref: r,
59
- "data-slot": "command-group",
60
- className: e("text-foreground font-normal **:[[cmdk-group-heading]]:text-muted-foreground overflow-hidden p-1 **:[[cmdk-group-heading]]:px-2 **:[[cmdk-group-heading]]:py-1.5 **:[[cmdk-group-heading]]:text-sm **:[[cmdk-group-heading]]:font-medium", t),
61
- ...n
62
- }));
63
- g.displayName = "CommandGroup";
64
- var _ = o(({ className: t, ...n }, r) => /* @__PURE__ */ c(u.Separator, {
65
- ref: r,
66
- "data-slot": "command-separator",
67
- className: e("bg-border -mx-1 h-px", t),
68
- ...n
69
- }));
70
- _.displayName = "CommandSeparator";
71
- var v = o(({ className: t, ...n }, r) => /* @__PURE__ */ c(u.Item, {
72
- ref: r,
73
- "data-slot": "command-item",
74
- className: e("data-[selected=true]:bg-accent-background data-[selected=true]:text-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", t),
75
- ...n
76
- }));
77
- v.displayName = "CommandItem";
78
- var y = o(({ className: t, ...n }, r) => /* @__PURE__ */ c("span", {
79
- ref: r,
80
- "data-slot": "command-shortcut",
81
- className: e("text-muted-foreground ml-auto text-xs tracking-widest", t),
82
- ...n
83
- }));
84
- y.displayName = "CommandShortcut";
85
- //#endregion
86
- export { d as Command, f as CommandDialog, h as CommandEmpty, g as CommandGroup, p as CommandInput, v as CommandItem, m as CommandList, _ as CommandSeparator, y as CommandShortcut };
47
+ const CommandInput = /*#__PURE__*/ forwardRef(({ className, ...props }, ref)=>{
48
+ const inputRef = useRef(null);
49
+ const setInputRef = (node)=>{
50
+ inputRef.current = node;
51
+ assignRef(ref, node);
52
+ };
53
+ return /*#__PURE__*/ _jsx("div", {
54
+ "data-slot": "command-input-wrapper",
55
+ className: "border-b border-default p-2",
56
+ onClick: ()=>{
57
+ inputRef.current?.focus();
58
+ },
59
+ children: /*#__PURE__*/ _jsxs(InputGroup, {
60
+ className: cn('w-full', '**:[[cmdk-input-wrapper]]:flex **:[[cmdk-input-wrapper]]:h-full **:[[cmdk-input-wrapper]]:min-w-0 **:[[cmdk-input-wrapper]]:flex-1 **:[[cmdk-input-wrapper]]:items-center'),
61
+ children: [
62
+ /*#__PURE__*/ _jsx(InputGroupAddon, {
63
+ align: "inline-start",
64
+ className: "[&_svg]:text-muted-foreground group-hover/input-group:[&_svg]:text-muted-foreground group-has-[[data-slot=input-group-control]:enabled:focus-visible:not(:read-only)]/input-group:[&_svg]:text-muted-foreground group-has-[[data-slot=input-group-control]:enabled:not(:placeholder-shown):not(:read-only)]/input-group:[&_svg]:text-muted-foreground",
65
+ children: /*#__PURE__*/ _jsx(IconSearch, {
66
+ className: "size-4",
67
+ "aria-hidden": true
68
+ })
69
+ }),
70
+ /*#__PURE__*/ _jsx(CommandPrimitive.Input, {
71
+ ref: setInputRef,
72
+ "data-slot": "input-group-control",
73
+ className: cn(inputGroupInputControlClasses, 'text-popover-foreground w-full text-sm leading-5 tracking-tight outline-hidden placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:text-base-foreground-disabled disabled:placeholder:text-base-foreground-disabled [&:not(:placeholder-shown):not(:read-only)]:text-base-foreground [&:not(:placeholder-shown):not(:read-only)]:hover:text-base-foreground', className),
74
+ ...props
75
+ })
76
+ ]
77
+ })
78
+ });
79
+ });
80
+ CommandInput.displayName = 'CommandInput';
81
+ const CommandList = /*#__PURE__*/ forwardRef(({ className, ...props }, ref)=>{
82
+ return /*#__PURE__*/ _jsx(CommandPrimitive.List, {
83
+ ref: ref,
84
+ "data-slot": "command-list",
85
+ className: cn(menuContainerPadding, 'max-h-75 scroll-py-1 overflow-x-hidden overflow-y-auto', className),
86
+ ...props
87
+ });
88
+ });
89
+ CommandList.displayName = 'CommandList';
90
+ const CommandEmpty = /*#__PURE__*/ forwardRef(({ className, ...props }, ref)=>{
91
+ return /*#__PURE__*/ _jsx(CommandPrimitive.Empty, {
92
+ ref: ref,
93
+ "data-slot": "command-empty",
94
+ className: cn('py-6 text-center text-sm text-muted-foreground', className),
95
+ ...props
96
+ });
97
+ });
98
+ CommandEmpty.displayName = 'CommandEmpty';
99
+ const CommandGroup = /*#__PURE__*/ forwardRef(({ className, inset, ...props }, ref)=>{
100
+ return /*#__PURE__*/ _jsx(CommandPrimitive.Group, {
101
+ ref: ref,
102
+ "data-slot": "command-group",
103
+ "data-inset": inset ? true : undefined,
104
+ className: cn('text-popover-foreground overflow-hidden font-normal', className),
105
+ ...props
106
+ });
107
+ });
108
+ CommandGroup.displayName = 'CommandGroup';
109
+ const CommandSeparator = /*#__PURE__*/ forwardRef(({ className, ...props }, ref)=>{
110
+ return /*#__PURE__*/ _jsx(CommandPrimitive.Separator, {
111
+ ref: ref,
112
+ "data-slot": "command-separator",
113
+ className: cn(menuSectionSeparatorClasses, className),
114
+ ...props
115
+ });
116
+ });
117
+ CommandSeparator.displayName = 'CommandSeparator';
118
+ const CommandItem = /*#__PURE__*/ forwardRef(({ className, ...props }, ref)=>{
119
+ return /*#__PURE__*/ _jsx(CommandPrimitive.Item, {
120
+ ref: ref,
121
+ "data-slot": "command-item",
122
+ className: cn("text-popover-foreground data-[selected=true]:bg-popover-background-hover data-[selected=true]:text-popover-foreground [&>svg]:pointer-events-none [&>svg]:shrink-0 [&>svg]:text-popover-foreground [&>svg:not([class*='size-'])]:size-4 data-[disabled=true]:pointer-events-none data-[disabled=true]:text-base-foreground-disabled data-[disabled=true]:opacity-100 data-[disabled=true]:[&>svg]:text-base-foreground-disabled relative flex min-h-9 cursor-default items-center gap-2 rounded-lg text-sm outline-hidden select-none", menuItemPadding, className),
123
+ ...props
124
+ });
125
+ });
126
+ CommandItem.displayName = 'CommandItem';
127
+ const CommandShortcut = /*#__PURE__*/ forwardRef(({ className, ...props }, ref)=>{
128
+ return /*#__PURE__*/ _jsx("span", {
129
+ ref: ref,
130
+ "data-slot": "command-shortcut",
131
+ className: cn('text-muted-foreground ml-auto text-xs tracking-widest', className),
132
+ ...props
133
+ });
134
+ });
135
+ CommandShortcut.displayName = 'CommandShortcut';
136
+ export { Command, CommandDialog, CommandInput, CommandList, CommandEmpty, CommandGroup, CommandItem, CommandShortcut, CommandSeparator };
137
+
138
+ //# sourceMappingURL=command.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../../src/components/ui/core/command/command.tsx"],"sourcesContent":["import {\n type ForwardRefExoticComponent,\n type RefAttributes,\n type ComponentProps,\n type ComponentRef,\n type ReactNode,\n forwardRef,\n useRef,\n} from 'react';\n\nimport { IconSearch } from '@tabler/icons-react';\nimport { Command as CommandPrimitive } from 'cmdk';\n\nimport {\n cn,\n menuContainerPadding,\n menuItemPadding,\n menuSectionLabelCmdkHeadingClasses,\n menuSectionLabelCmdkHeadingInsetClasses,\n menuSectionSeparatorClasses,\n} from '../../../../lib/utils';\nimport { assignRef } from '../../../../utils/assign-ref';\nimport {\n Dialog,\n DialogContent,\n DialogDescription,\n DialogHeader,\n DialogTitle,\n} from '../dialog/dialog';\nimport {\n InputGroup,\n InputGroupAddon,\n inputGroupInputControlClasses,\n} from '../input-group/input-group';\n\nconst Command: ForwardRefExoticComponent<\n Omit<ComponentProps<typeof CommandPrimitive>, 'ref'> &\n RefAttributes<HTMLDivElement>\n> = forwardRef<\n ComponentRef<typeof CommandPrimitive>,\n ComponentProps<typeof CommandPrimitive>\n>(({ className, ...props }, ref) => {\n return (\n <CommandPrimitive\n ref={ref}\n data-slot=\"command\"\n className={cn(\n 'rounded-xl bg-popover-background text-popover-foreground flex h-full w-full flex-col overflow-hidden',\n menuSectionLabelCmdkHeadingClasses,\n menuSectionLabelCmdkHeadingInsetClasses,\n className\n )}\n {...props}\n />\n );\n});\nCommand.displayName = 'Command';\n\nfunction CommandDialog({\n title = 'Command Palette',\n description = 'Search for a command to run...',\n children,\n className,\n showCloseButton = true,\n ...props\n}: Omit<ComponentProps<typeof Dialog>, 'children'> & {\n children?: ReactNode;\n title?: string;\n description?: string;\n className?: string;\n showCloseButton?: boolean;\n}): ReactNode {\n return (\n <Dialog {...props}>\n <DialogHeader className=\"sr-only rounded-lg\">\n <DialogTitle>{title}</DialogTitle>\n <DialogDescription>{description}</DialogDescription>\n </DialogHeader>\n <DialogContent\n data-slot=\"command-dialog\"\n className={cn(\n 'overflow-hidden p-0 **:data-[slot=command-input-wrapper]:pr-12',\n className\n )}\n closeButtonClassName=\"top-[calc(0.5rem+1.125rem)] right-2 -translate-y-1/2\"\n closeButtonSize=\"icon\"\n showCloseButton={showCloseButton}\n >\n <Command\n className={cn(\n '[&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5',\n menuSectionLabelCmdkHeadingInsetClasses\n )}\n >\n {children}\n </Command>\n </DialogContent>\n </Dialog>\n );\n}\n\nconst CommandInput: ForwardRefExoticComponent<\n Omit<ComponentProps<typeof CommandPrimitive.Input>, 'ref'> &\n RefAttributes<HTMLInputElement>\n> = forwardRef<\n ComponentRef<typeof CommandPrimitive.Input>,\n ComponentProps<typeof CommandPrimitive.Input>\n>(({ className, ...props }, ref) => {\n const inputRef = useRef<HTMLInputElement | null>(null);\n\n const setInputRef = (node: HTMLInputElement | null) => {\n inputRef.current = node;\n assignRef(ref, node);\n };\n\n return (\n <div\n data-slot=\"command-input-wrapper\"\n className=\"border-b border-default p-2\"\n onClick={() => {\n inputRef.current?.focus();\n }}\n >\n <InputGroup\n className={cn(\n 'w-full',\n '**:[[cmdk-input-wrapper]]:flex **:[[cmdk-input-wrapper]]:h-full **:[[cmdk-input-wrapper]]:min-w-0 **:[[cmdk-input-wrapper]]:flex-1 **:[[cmdk-input-wrapper]]:items-center'\n )}\n >\n <InputGroupAddon\n align=\"inline-start\"\n className=\"[&_svg]:text-muted-foreground group-hover/input-group:[&_svg]:text-muted-foreground group-has-[[data-slot=input-group-control]:enabled:focus-visible:not(:read-only)]/input-group:[&_svg]:text-muted-foreground group-has-[[data-slot=input-group-control]:enabled:not(:placeholder-shown):not(:read-only)]/input-group:[&_svg]:text-muted-foreground\"\n >\n <IconSearch className=\"size-4\" aria-hidden />\n </InputGroupAddon>\n <CommandPrimitive.Input\n ref={setInputRef}\n data-slot=\"input-group-control\"\n className={cn(\n inputGroupInputControlClasses,\n 'text-popover-foreground w-full text-sm leading-5 tracking-tight outline-hidden placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:text-base-foreground-disabled disabled:placeholder:text-base-foreground-disabled [&:not(:placeholder-shown):not(:read-only)]:text-base-foreground [&:not(:placeholder-shown):not(:read-only)]:hover:text-base-foreground',\n className\n )}\n {...props}\n />\n </InputGroup>\n </div>\n );\n});\nCommandInput.displayName = 'CommandInput';\n\nconst CommandList: ForwardRefExoticComponent<\n Omit<ComponentProps<typeof CommandPrimitive.List>, 'ref'> &\n RefAttributes<HTMLDivElement>\n> = forwardRef<\n ComponentRef<typeof CommandPrimitive.List>,\n ComponentProps<typeof CommandPrimitive.List>\n>(({ className, ...props }, ref) => {\n return (\n <CommandPrimitive.List\n ref={ref}\n data-slot=\"command-list\"\n className={cn(\n menuContainerPadding,\n 'max-h-75 scroll-py-1 overflow-x-hidden overflow-y-auto',\n className\n )}\n {...props}\n />\n );\n});\nCommandList.displayName = 'CommandList';\n\nconst CommandEmpty: ForwardRefExoticComponent<\n Omit<ComponentProps<typeof CommandPrimitive.Empty>, 'ref'> &\n RefAttributes<HTMLDivElement>\n> = forwardRef<\n ComponentRef<typeof CommandPrimitive.Empty>,\n ComponentProps<typeof CommandPrimitive.Empty>\n>(({ className, ...props }, ref) => {\n return (\n <CommandPrimitive.Empty\n ref={ref}\n data-slot=\"command-empty\"\n className={cn(\n 'py-6 text-center text-sm text-muted-foreground',\n className\n )}\n {...props}\n />\n );\n});\nCommandEmpty.displayName = 'CommandEmpty';\n\nconst CommandGroup: ForwardRefExoticComponent<\n Omit<ComponentProps<typeof CommandPrimitive.Group>, 'ref'> & {\n inset?: boolean;\n } & RefAttributes<HTMLDivElement>\n> = forwardRef<\n ComponentRef<typeof CommandPrimitive.Group>,\n ComponentProps<typeof CommandPrimitive.Group> & { inset?: boolean }\n>(({ className, inset, ...props }, ref) => {\n return (\n <CommandPrimitive.Group\n ref={ref}\n data-slot=\"command-group\"\n data-inset={inset ? true : undefined}\n className={cn(\n 'text-popover-foreground overflow-hidden font-normal',\n className\n )}\n {...props}\n />\n );\n});\nCommandGroup.displayName = 'CommandGroup';\n\nconst CommandSeparator: ForwardRefExoticComponent<\n Omit<ComponentProps<typeof CommandPrimitive.Separator>, 'ref'> &\n RefAttributes<HTMLDivElement>\n> = forwardRef<\n ComponentRef<typeof CommandPrimitive.Separator>,\n ComponentProps<typeof CommandPrimitive.Separator>\n>(({ className, ...props }, ref) => {\n return (\n <CommandPrimitive.Separator\n ref={ref}\n data-slot=\"command-separator\"\n className={cn(menuSectionSeparatorClasses, className)}\n {...props}\n />\n );\n});\nCommandSeparator.displayName = 'CommandSeparator';\n\nconst CommandItem: ForwardRefExoticComponent<\n Omit<ComponentProps<typeof CommandPrimitive.Item>, 'ref'> &\n RefAttributes<HTMLDivElement>\n> = forwardRef<\n ComponentRef<typeof CommandPrimitive.Item>,\n ComponentProps<typeof CommandPrimitive.Item>\n>(({ className, ...props }, ref) => {\n return (\n <CommandPrimitive.Item\n ref={ref}\n data-slot=\"command-item\"\n className={cn(\n \"text-popover-foreground data-[selected=true]:bg-popover-background-hover data-[selected=true]:text-popover-foreground [&>svg]:pointer-events-none [&>svg]:shrink-0 [&>svg]:text-popover-foreground [&>svg:not([class*='size-'])]:size-4 data-[disabled=true]:pointer-events-none data-[disabled=true]:text-base-foreground-disabled data-[disabled=true]:opacity-100 data-[disabled=true]:[&>svg]:text-base-foreground-disabled relative flex min-h-9 cursor-default items-center gap-2 rounded-lg text-sm outline-hidden select-none\",\n menuItemPadding,\n className\n )}\n {...props}\n />\n );\n});\nCommandItem.displayName = 'CommandItem';\n\nconst CommandShortcut: 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=\"command-shortcut\"\n className={cn(\n 'text-muted-foreground ml-auto text-xs tracking-widest',\n className\n )}\n {...props}\n />\n );\n }\n);\nCommandShortcut.displayName = 'CommandShortcut';\n\nexport {\n Command,\n CommandDialog,\n CommandInput,\n CommandList,\n CommandEmpty,\n CommandGroup,\n CommandItem,\n CommandShortcut,\n CommandSeparator,\n};\n"],"names":["forwardRef","useRef","IconSearch","Command","CommandPrimitive","cn","menuContainerPadding","menuItemPadding","menuSectionLabelCmdkHeadingClasses","menuSectionLabelCmdkHeadingInsetClasses","menuSectionSeparatorClasses","assignRef","Dialog","DialogContent","DialogDescription","DialogHeader","DialogTitle","InputGroup","InputGroupAddon","inputGroupInputControlClasses","className","props","ref","data-slot","displayName","CommandDialog","title","description","children","showCloseButton","closeButtonClassName","closeButtonSize","CommandInput","inputRef","setInputRef","node","current","div","onClick","focus","align","aria-hidden","Input","CommandList","List","CommandEmpty","Empty","CommandGroup","inset","Group","data-inset","undefined","CommandSeparator","Separator","CommandItem","Item","CommandShortcut","span"],"mappings":";AAAA,SAMEA,UAAU,EACVC,MAAM,QACD,QAAQ;AAEf,SAASC,UAAU,QAAQ,sBAAsB;AACjD,SAASC,WAAWC,gBAAgB,QAAQ,OAAO;AAEnD,SACEC,EAAE,EACFC,oBAAoB,EACpBC,eAAe,EACfC,kCAAkC,EAClCC,uCAAuC,EACvCC,2BAA2B,QACtB,2BAAwB;AAC/B,SAASC,SAAS,QAAQ,kCAA+B;AACzD,SACEC,MAAM,EACNC,aAAa,EACbC,iBAAiB,EACjBC,YAAY,EACZC,WAAW,QACN,sBAAmB;AAC1B,SACEC,UAAU,EACVC,eAAe,EACfC,6BAA6B,QACxB,gCAA6B;AAEpC,MAAMhB,wBAGFH,WAGF,CAAC,EAAEoB,SAAS,EAAE,GAAGC,OAAO,EAAEC;IAC1B,qBACE,KAAClB;QACCkB,KAAKA;QACLC,aAAU;QACVH,WAAWf,GACT,wGACAG,oCACAC,yCACAW;QAED,GAAGC,KAAK;;AAGf;AACAlB,QAAQqB,WAAW,GAAG;AAEtB,SAASC,cAAc,EACrBC,QAAQ,iBAAiB,EACzBC,cAAc,gCAAgC,EAC9CC,QAAQ,EACRR,SAAS,EACTS,kBAAkB,IAAI,EACtB,GAAGR,OAOJ;IACC,qBACE,MAACT;QAAQ,GAAGS,KAAK;;0BACf,MAACN;gBAAaK,WAAU;;kCACtB,KAACJ;kCAAaU;;kCACd,KAACZ;kCAAmBa;;;;0BAEtB,KAACd;gBACCU,aAAU;gBACVH,WAAWf,GACT,kEACAe;gBAEFU,sBAAqB;gBACrBC,iBAAgB;gBAChBF,iBAAiBA;0BAEjB,cAAA,KAAC1B;oBACCiB,WAAWf,GACT,qGACAI;8BAGDmB;;;;;AAKX;AAEA,MAAMI,6BAGFhC,WAGF,CAAC,EAAEoB,SAAS,EAAE,GAAGC,OAAO,EAAEC;IAC1B,MAAMW,WAAWhC,OAAgC;IAEjD,MAAMiC,cAAc,CAACC;QACnBF,SAASG,OAAO,GAAGD;QACnBxB,UAAUW,KAAKa;IACjB;IAEA,qBACE,KAACE;QACCd,aAAU;QACVH,WAAU;QACVkB,SAAS;YACPL,SAASG,OAAO,EAAEG;QACpB;kBAEA,cAAA,MAACtB;YACCG,WAAWf,GACT,UACA;;8BAGF,KAACa;oBACCsB,OAAM;oBACNpB,WAAU;8BAEV,cAAA,KAAClB;wBAAWkB,WAAU;wBAASqB,aAAW;;;8BAE5C,KAACrC,iBAAiBsC,KAAK;oBACrBpB,KAAKY;oBACLX,aAAU;oBACVH,WAAWf,GACTc,+BACA,kXACAC;oBAED,GAAGC,KAAK;;;;;AAKnB;AACAW,aAAaR,WAAW,GAAG;AAE3B,MAAMmB,4BAGF3C,WAGF,CAAC,EAAEoB,SAAS,EAAE,GAAGC,OAAO,EAAEC;IAC1B,qBACE,KAAClB,iBAAiBwC,IAAI;QACpBtB,KAAKA;QACLC,aAAU;QACVH,WAAWf,GACTC,sBACA,0DACAc;QAED,GAAGC,KAAK;;AAGf;AACAsB,YAAYnB,WAAW,GAAG;AAE1B,MAAMqB,6BAGF7C,WAGF,CAAC,EAAEoB,SAAS,EAAE,GAAGC,OAAO,EAAEC;IAC1B,qBACE,KAAClB,iBAAiB0C,KAAK;QACrBxB,KAAKA;QACLC,aAAU;QACVH,WAAWf,GACT,kDACAe;QAED,GAAGC,KAAK;;AAGf;AACAwB,aAAarB,WAAW,GAAG;AAE3B,MAAMuB,6BAIF/C,WAGF,CAAC,EAAEoB,SAAS,EAAE4B,KAAK,EAAE,GAAG3B,OAAO,EAAEC;IACjC,qBACE,KAAClB,iBAAiB6C,KAAK;QACrB3B,KAAKA;QACLC,aAAU;QACV2B,cAAYF,QAAQ,OAAOG;QAC3B/B,WAAWf,GACT,uDACAe;QAED,GAAGC,KAAK;;AAGf;AACA0B,aAAavB,WAAW,GAAG;AAE3B,MAAM4B,iCAGFpD,WAGF,CAAC,EAAEoB,SAAS,EAAE,GAAGC,OAAO,EAAEC;IAC1B,qBACE,KAAClB,iBAAiBiD,SAAS;QACzB/B,KAAKA;QACLC,aAAU;QACVH,WAAWf,GAAGK,6BAA6BU;QAC1C,GAAGC,KAAK;;AAGf;AACA+B,iBAAiB5B,WAAW,GAAG;AAE/B,MAAM8B,4BAGFtD,WAGF,CAAC,EAAEoB,SAAS,EAAE,GAAGC,OAAO,EAAEC;IAC1B,qBACE,KAAClB,iBAAiBmD,IAAI;QACpBjC,KAAKA;QACLC,aAAU;QACVH,WAAWf,GACT,ygBACAE,iBACAa;QAED,GAAGC,KAAK;;AAGf;AACAiC,YAAY9B,WAAW,GAAG;AAE1B,MAAMgC,gCAEFxD,WACF,CAAC,EAAEoB,SAAS,EAAE,GAAGC,OAAO,EAAEC;IACxB,qBACE,KAACmC;QACCnC,KAAKA;QACLC,aAAU;QACVH,WAAWf,GACT,yDACAe;QAED,GAAGC,KAAK;;AAGf;AAEFmC,gBAAgBhC,WAAW,GAAG;AAE9B,SACErB,OAAO,EACPsB,aAAa,EACbO,YAAY,EACZW,WAAW,EACXE,YAAY,EACZE,YAAY,EACZO,WAAW,EACXE,eAAe,EACfJ,gBAAgB,GAChB"}
@@ -0,0 +1,14 @@
1
+ import type { ComponentProps, ReactNode } from "react";
2
+ import { StickToBottom, useStickToBottomContext } from "use-stick-to-bottom";
3
+ import { Button } from "../button/button";
4
+ type ConversationProps = ComponentProps<typeof StickToBottom>;
5
+ declare const Conversation: ({ className, ...props }: ConversationProps) => ReactNode;
6
+ type ConversationContentProps = Omit<ComponentProps<typeof StickToBottom.Content>, "scrollClassName">;
7
+ declare const ConversationContent: ({ className, ...props }: ConversationContentProps) => ReactNode;
8
+ type ConversationScrollButtonProps = ComponentProps<typeof Button>;
9
+ declare const ConversationScrollButton: ({ className, "aria-label": ariaLabel, onClick, ...props }: ConversationScrollButtonProps) => ReactNode;
10
+ type ConversationTurnProps = ComponentProps<"div"> & {
11
+ reserveViewport?: boolean;
12
+ };
13
+ declare const ConversationTurn: ({ reserveViewport, className, ...props }: ConversationTurnProps) => ReactNode;
14
+ export { Conversation, ConversationContent, ConversationScrollButton, ConversationTurn, useStickToBottomContext };
@@ -0,0 +1,51 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { IconArrowDown } from "@tabler/icons-react";
3
+ import { StickToBottom, useStickToBottomContext } from "use-stick-to-bottom";
4
+ import { cn } from "../../../../lib/utils.js";
5
+ import { Button } from "../button/button.js";
6
+ const Conversation = ({ className, ...props })=>/*#__PURE__*/ _jsx(StickToBottom, {
7
+ "data-slot": "conversation",
8
+ className: cn('relative flex min-h-0 flex-1 flex-col overflow-y-hidden', className),
9
+ initial: "smooth",
10
+ resize: "smooth",
11
+ role: "log",
12
+ ...props
13
+ });
14
+ const ConversationContent = ({ className, ...props })=>/*#__PURE__*/ _jsx(StickToBottom.Content, {
15
+ "data-slot": "conversation-content",
16
+ scrollClassName: cn('min-h-0 flex-1 overflow-y-auto [container-type:size]', '[scrollbar-color:theme(colors.border)_transparent]'),
17
+ className: cn('flex min-h-full flex-col', className),
18
+ ...props
19
+ });
20
+ const ConversationScrollButton = ({ className, 'aria-label': ariaLabel = 'Scroll to bottom', onClick, ...props })=>{
21
+ const { isAtBottom, scrollToBottom } = useStickToBottomContext();
22
+ if (isAtBottom) {
23
+ return null;
24
+ }
25
+ const handleClick = (event)=>{
26
+ void scrollToBottom();
27
+ onClick?.(event);
28
+ };
29
+ return /*#__PURE__*/ _jsx(Button, {
30
+ "data-slot": "conversation-scroll-button",
31
+ type: "button",
32
+ variant: "outline",
33
+ size: "icon",
34
+ "aria-label": ariaLabel,
35
+ className: cn('rounded-full shadow-lg', className),
36
+ onClick: handleClick,
37
+ ...props,
38
+ children: /*#__PURE__*/ _jsx(IconArrowDown, {
39
+ className: "size-5",
40
+ stroke: 2
41
+ })
42
+ });
43
+ };
44
+ const ConversationTurn = ({ reserveViewport = false, className, ...props })=>/*#__PURE__*/ _jsx("div", {
45
+ "data-slot": "conversation-turn",
46
+ className: cn('flex w-full flex-col gap-6', reserveViewport && 'min-h-[100cqh]', className),
47
+ ...props
48
+ });
49
+ export { Conversation, ConversationContent, ConversationScrollButton, ConversationTurn, useStickToBottomContext };
50
+
51
+ //# sourceMappingURL=conversation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../../src/components/ui/core/conversation/conversation.tsx"],"sourcesContent":["import type { ComponentProps, ReactNode } from 'react';\n\nimport { IconArrowDown } from '@tabler/icons-react';\nimport { StickToBottom, useStickToBottomContext } from 'use-stick-to-bottom';\n\nimport { cn } from '../../../../lib/utils';\nimport { Button } from '../button/button';\n\ntype ConversationProps = ComponentProps<typeof StickToBottom>;\n\nconst Conversation = ({\n className,\n ...props\n}: ConversationProps): ReactNode => (\n <StickToBottom\n data-slot=\"conversation\"\n className={cn(\n 'relative flex min-h-0 flex-1 flex-col overflow-y-hidden',\n className\n )}\n initial=\"smooth\"\n resize=\"smooth\"\n role=\"log\"\n {...props}\n />\n);\n\ntype ConversationContentProps = Omit<\n ComponentProps<typeof StickToBottom.Content>,\n 'scrollClassName'\n>;\n\nconst ConversationContent = ({\n className,\n ...props\n}: ConversationContentProps): ReactNode => (\n <StickToBottom.Content\n data-slot=\"conversation-content\"\n scrollClassName={cn(\n 'min-h-0 flex-1 overflow-y-auto [container-type:size]',\n '[scrollbar-color:theme(colors.border)_transparent]'\n )}\n className={cn('flex min-h-full flex-col', className)}\n {...props}\n />\n);\n\ntype ConversationScrollButtonProps = ComponentProps<typeof Button>;\n\nconst ConversationScrollButton = ({\n className,\n 'aria-label': ariaLabel = 'Scroll to bottom',\n onClick,\n ...props\n}: ConversationScrollButtonProps): ReactNode => {\n const { isAtBottom, scrollToBottom } = useStickToBottomContext();\n\n if (isAtBottom) {\n return null;\n }\n\n const handleClick: ConversationScrollButtonProps['onClick'] = (event) => {\n void scrollToBottom();\n onClick?.(event);\n };\n\n return (\n <Button\n data-slot=\"conversation-scroll-button\"\n type=\"button\"\n variant=\"outline\"\n size=\"icon\"\n aria-label={ariaLabel}\n className={cn('rounded-full shadow-lg', className)}\n onClick={handleClick}\n {...props}\n >\n <IconArrowDown className=\"size-5\" stroke={2} />\n </Button>\n );\n};\n\ntype ConversationTurnProps = ComponentProps<'div'> & {\n reserveViewport?: boolean;\n};\n\nconst ConversationTurn = ({\n reserveViewport = false,\n className,\n ...props\n}: ConversationTurnProps): ReactNode => (\n <div\n data-slot=\"conversation-turn\"\n className={cn(\n 'flex w-full flex-col gap-6',\n reserveViewport && 'min-h-[100cqh]',\n className\n )}\n {...props}\n />\n);\n\nexport {\n Conversation,\n ConversationContent,\n ConversationScrollButton,\n ConversationTurn,\n useStickToBottomContext,\n};\n"],"names":["IconArrowDown","StickToBottom","useStickToBottomContext","cn","Button","Conversation","className","props","data-slot","initial","resize","role","ConversationContent","Content","scrollClassName","ConversationScrollButton","ariaLabel","onClick","isAtBottom","scrollToBottom","handleClick","event","type","variant","size","aria-label","stroke","ConversationTurn","reserveViewport","div"],"mappings":";AAEA,SAASA,aAAa,QAAQ,sBAAsB;AACpD,SAASC,aAAa,EAAEC,uBAAuB,QAAQ,sBAAsB;AAE7E,SAASC,EAAE,QAAQ,2BAAwB;AAC3C,SAASC,MAAM,QAAQ,sBAAmB;AAI1C,MAAMC,eAAe,CAAC,EACpBC,SAAS,EACT,GAAGC,OACe,iBAClB,KAACN;QACCO,aAAU;QACVF,WAAWH,GACT,2DACAG;QAEFG,SAAQ;QACRC,QAAO;QACPC,MAAK;QACJ,GAAGJ,KAAK;;AASb,MAAMK,sBAAsB,CAAC,EAC3BN,SAAS,EACT,GAAGC,OACsB,iBACzB,KAACN,cAAcY,OAAO;QACpBL,aAAU;QACVM,iBAAiBX,GACf,wDACA;QAEFG,WAAWH,GAAG,4BAA4BG;QACzC,GAAGC,KAAK;;AAMb,MAAMQ,2BAA2B,CAAC,EAChCT,SAAS,EACT,cAAcU,YAAY,kBAAkB,EAC5CC,OAAO,EACP,GAAGV,OAC2B;IAC9B,MAAM,EAAEW,UAAU,EAAEC,cAAc,EAAE,GAAGjB;IAEvC,IAAIgB,YAAY;QACd,OAAO;IACT;IAEA,MAAME,cAAwD,CAACC;QAC7D,KAAKF;QACLF,UAAUI;IACZ;IAEA,qBACE,KAACjB;QACCI,aAAU;QACVc,MAAK;QACLC,SAAQ;QACRC,MAAK;QACLC,cAAYT;QACZV,WAAWH,GAAG,0BAA0BG;QACxCW,SAASG;QACR,GAAGb,KAAK;kBAET,cAAA,KAACP;YAAcM,WAAU;YAASoB,QAAQ;;;AAGhD;AAMA,MAAMC,mBAAmB,CAAC,EACxBC,kBAAkB,KAAK,EACvBtB,SAAS,EACT,GAAGC,OACmB,iBACtB,KAACsB;QACCrB,aAAU;QACVF,WAAWH,GACT,8BACAyB,mBAAmB,kBACnBtB;QAED,GAAGC,KAAK;;AAIb,SACEF,YAAY,EACZO,mBAAmB,EACnBG,wBAAwB,EACxBY,gBAAgB,EAChBzB,uBAAuB,GACvB"}
@@ -1,9 +1,11 @@
1
- import { ForwardRefExoticComponent, RefAttributes, ComponentProps } from 'react';
2
- import { VariantProps } from 'class-variance-authority';
3
- import { ClassProp } from 'class-variance-authority/types';
1
+ import { type ForwardRefExoticComponent, type RefAttributes, type ComponentProps } from "react";
2
+ import { type VariantProps } from "class-variance-authority";
3
+ import type { ClassProp } from "class-variance-authority/types";
4
4
  interface CountVariantProps {
5
- variant?: 'default' | 'warning' | 'critical' | null;
5
+ variant?: "default" | "success" | "warning" | "critical" | null;
6
6
  }
7
7
  declare const countVariants: (props?: (CountVariantProps & ClassProp) | undefined) => string;
8
- declare const Count: ForwardRefExoticComponent<ComponentProps<'output'> & VariantProps<typeof countVariants> & RefAttributes<HTMLOutputElement>>;
9
- export { Count, countVariants };
8
+ declare const Count: ForwardRefExoticComponent<ComponentProps<"output"> & VariantProps<typeof countVariants> & RefAttributes<HTMLOutputElement>>;
9
+ declare const CountValue: ForwardRefExoticComponent<ComponentProps<"span"> & RefAttributes<HTMLSpanElement>>;
10
+ declare const CountUnit: ForwardRefExoticComponent<ComponentProps<"span"> & RefAttributes<HTMLSpanElement>>;
11
+ export { Count, CountUnit, CountValue, countVariants };