@mastra/playground-ui 69.0.1-alpha.0 → 69.1.0-alpha.2

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 (300) hide show
  1. package/dist/{Comment-D_gSx7oM.js → Comment-CEHnV3TI.js} +2 -2
  2. package/dist/{Comment-D_gSx7oM.js.map → Comment-CEHnV3TI.js.map} +1 -1
  3. package/dist/{Comment-A07IvOt2.cjs → Comment-D9Rw3sVA.cjs} +2 -2
  4. package/dist/{Comment-A07IvOt2.cjs.map → Comment-D9Rw3sVA.cjs.map} +1 -1
  5. package/dist/{DataList-2PEZd6GU.cjs → DataList-D6UDH7qT.cjs} +2 -2
  6. package/dist/{DataList-2PEZd6GU.cjs.map → DataList-D6UDH7qT.cjs.map} +1 -1
  7. package/dist/{DataList-DCaKvoCH.js → DataList-DIGkHZWZ.js} +2 -2
  8. package/dist/{DataList-DCaKvoCH.js.map → DataList-DIGkHZWZ.js.map} +1 -1
  9. package/dist/{EmptyState-Dc-sP95H.cjs → EmptyState-DDZM8XgE.cjs} +146 -7
  10. package/dist/EmptyState-DDZM8XgE.cjs.map +1 -0
  11. package/dist/{EmptyState-i88y1x75.js → EmptyState-sRS41Bzj.js} +146 -7
  12. package/dist/EmptyState-sRS41Bzj.js.map +1 -0
  13. package/dist/{FilterBar-PhVKghDp.js → FilterBar-C1L0opT3.js} +10 -6
  14. package/dist/FilterBar-C1L0opT3.js.map +1 -0
  15. package/dist/{FilterBar-DY6aXUnv.cjs → FilterBar-CCh4ZYuL.cjs} +10 -6
  16. package/dist/FilterBar-CCh4ZYuL.cjs.map +1 -0
  17. package/dist/{LogsDataList-Ca016D5o.js → LogsDataList-DUKQJ9e5.js} +2 -2
  18. package/dist/{LogsDataList-Ca016D5o.js.map → LogsDataList-DUKQJ9e5.js.map} +1 -1
  19. package/dist/{LogsDataList-DVXS1HN4.cjs → LogsDataList-Sgcx1aKA.cjs} +2 -2
  20. package/dist/{LogsDataList-DVXS1HN4.cjs.map → LogsDataList-Sgcx1aKA.cjs.map} +1 -1
  21. package/dist/Sidebar.css +60 -0
  22. package/dist/components/Comment.cjs.js +1 -1
  23. package/dist/components/Comment.es.js +1 -1
  24. package/dist/components/CopyInput.cjs.js +1 -1
  25. package/dist/components/CopyInput.es.js +1 -1
  26. package/dist/components/DataList.cjs.js +3 -3
  27. package/dist/components/DataList.es.js +3 -3
  28. package/dist/components/EmptyState.cjs.js +1 -1
  29. package/dist/components/EmptyState.es.js +1 -1
  30. package/dist/components/EnvironmentVariablesEditor.cjs.js +2 -2
  31. package/dist/components/EnvironmentVariablesEditor.es.js +2 -2
  32. package/dist/components/FileDropBackdrop.cjs.js +1 -1
  33. package/dist/components/FileDropBackdrop.es.js +1 -1
  34. package/dist/components/FilterBar.cjs.js +3 -3
  35. package/dist/components/FilterBar.es.js +3 -3
  36. package/dist/components/FormFieldBlocks.cjs.js +0 -88
  37. package/dist/components/FormFieldBlocks.cjs.js.map +1 -1
  38. package/dist/components/FormFieldBlocks.es.js +1 -88
  39. package/dist/components/FormFieldBlocks.es.js.map +1 -1
  40. package/dist/components/InputGroup.cjs.js +1 -1
  41. package/dist/components/InputGroup.es.js +1 -1
  42. package/dist/components/InputNumber.cjs.js +1 -1
  43. package/dist/components/InputNumber.es.js +1 -1
  44. package/dist/components/LogsDataList.cjs.js +2 -2
  45. package/dist/components/LogsDataList.es.js +2 -2
  46. package/dist/components/SavedViews.cjs.js +1 -1
  47. package/dist/components/SavedViews.es.js +1 -1
  48. package/dist/components/SearchInput.cjs.js +93 -37
  49. package/dist/components/SearchInput.cjs.js.map +1 -1
  50. package/dist/components/SearchInput.es.js +94 -39
  51. package/dist/components/SearchInput.es.js.map +1 -1
  52. package/dist/components/Sidebar.cjs.js +121 -76
  53. package/dist/components/Sidebar.cjs.js.map +1 -1
  54. package/dist/components/Sidebar.es.js +121 -77
  55. package/dist/components/Sidebar.es.js.map +1 -1
  56. package/dist/{data-list-DM8WpKCm.js → data-list-C04BQEv9.js} +2 -2
  57. package/dist/data-list-C04BQEv9.js.map +1 -0
  58. package/dist/{data-list-1JOwQrF5.cjs → data-list-Czhl2UBM.cjs} +2 -2
  59. package/dist/data-list-Czhl2UBM.cjs.map +1 -0
  60. package/dist/domains/auth/components/permission-denied.cjs.js +1 -1
  61. package/dist/domains/auth/components/permission-denied.es.js +1 -1
  62. package/dist/domains/auth/components/session-expired.cjs.js +1 -1
  63. package/dist/domains/auth/components/session-expired.es.js +1 -1
  64. package/dist/domains/chat/tools/connect-prompt-tool.cjs.js +1 -1
  65. package/dist/domains/chat/tools/connect-prompt-tool.es.js +1 -1
  66. package/dist/domains/connect/headless-connect.cjs.js +92 -46
  67. package/dist/domains/connect/headless-connect.cjs.js.map +1 -1
  68. package/dist/domains/connect/headless-connect.es.js +92 -47
  69. package/dist/domains/connect/headless-connect.es.js.map +1 -1
  70. package/dist/domains/connect/types.cjs.js.map +1 -1
  71. package/dist/domains/connect/types.es.js.map +1 -1
  72. package/dist/domains/connect.cjs.js +1 -0
  73. package/dist/domains/connect.es.js +2 -2
  74. package/dist/domains/dashboards/kinds/kpis/options.cjs.js +9 -6
  75. package/dist/domains/dashboards/kinds/kpis/options.cjs.js.map +1 -1
  76. package/dist/domains/dashboards/kinds/kpis/options.es.js +8 -7
  77. package/dist/domains/dashboards/kinds/kpis/options.es.js.map +1 -1
  78. package/dist/domains/dashboards/kinds/kpis.cjs.js +2 -0
  79. package/dist/domains/dashboards/kinds/kpis.cjs.js.map +1 -1
  80. package/dist/domains/dashboards/kinds/kpis.es.js +2 -2
  81. package/dist/domains/dashboards/kinds/kpis.es.js.map +1 -1
  82. package/dist/domains/dashboards/kinds/timeseries.cjs.js +2 -0
  83. package/dist/domains/dashboards/kinds/timeseries.cjs.js.map +1 -1
  84. package/dist/domains/dashboards/kinds/timeseries.es.js +2 -2
  85. package/dist/domains/dashboards/kinds/timeseries.es.js.map +1 -1
  86. package/dist/domains/dashboards/kinds.cjs.js +12 -0
  87. package/dist/domains/dashboards/kinds.cjs.js.map +1 -1
  88. package/dist/domains/dashboards/kinds.es.js +5 -1
  89. package/dist/domains/dashboards/kinds.es.js.map +1 -1
  90. package/dist/domains/dashboards.cjs.js +23 -2
  91. package/dist/domains/dashboards.es.js +8 -3
  92. package/dist/domains/knowledge/components/KnowledgePageExplorer.cjs.js +1 -1
  93. package/dist/domains/knowledge/components/KnowledgePageExplorer.es.js +1 -1
  94. package/dist/domains/logs/components/logs-error-content.cjs.js +1 -1
  95. package/dist/domains/logs/components/logs-error-content.es.js +1 -1
  96. package/dist/domains/logs/components/logs-list-view.cjs.js +2 -2
  97. package/dist/domains/logs/components/logs-list-view.es.js +2 -2
  98. package/dist/domains/logs/components/no-logs-info.cjs.js +1 -1
  99. package/dist/domains/logs/components/no-logs-info.es.js +1 -1
  100. package/dist/domains/mcps/components/mcp-app-viewer.cjs.js +1 -1
  101. package/dist/domains/mcps/components/mcp-app-viewer.es.js +1 -1
  102. package/dist/domains/mcps/hooks/use-mcp-app-tool-call.cjs.js +1 -1
  103. package/dist/domains/mcps/hooks/use-mcp-app-tool-call.es.js +1 -1
  104. package/dist/domains/memory/components/observation-detail-view.cjs.js +1 -1
  105. package/dist/domains/memory/components/observation-detail-view.es.js +1 -1
  106. package/dist/domains/metrics/components/metrics-time-range-chip.cjs.js +1 -1
  107. package/dist/domains/metrics/components/metrics-time-range-chip.es.js +1 -1
  108. package/dist/domains/observability/components/observability-capability-gate.cjs.js +1 -1
  109. package/dist/domains/observability/components/observability-capability-gate.es.js +1 -1
  110. package/dist/domains/observability/hooks/use-observability-list-filters.cjs.js +15 -2
  111. package/dist/domains/observability/hooks/use-observability-list-filters.cjs.js.map +1 -1
  112. package/dist/domains/observability/hooks/use-observability-list-filters.es.js +15 -2
  113. package/dist/domains/observability/hooks/use-observability-list-filters.es.js.map +1 -1
  114. package/dist/domains/observability/lib/text-search-filter.cjs.js +24 -0
  115. package/dist/domains/observability/lib/text-search-filter.cjs.js.map +1 -0
  116. package/dist/domains/observability/lib/text-search-filter.d.ts +1 -0
  117. package/dist/domains/observability/lib/text-search-filter.es.js +23 -0
  118. package/dist/domains/observability/lib/text-search-filter.es.js.map +1 -0
  119. package/dist/domains/observability/lib/text-search.cjs.js +12 -0
  120. package/dist/domains/observability/lib/text-search.cjs.js.map +1 -0
  121. package/dist/domains/observability/lib/text-search.d.ts +1 -0
  122. package/dist/domains/observability/lib/text-search.es.js +11 -0
  123. package/dist/domains/observability/lib/text-search.es.js.map +1 -0
  124. package/dist/domains/observability/saved-view-state.cjs.js +16 -2
  125. package/dist/domains/observability/saved-view-state.cjs.js.map +1 -1
  126. package/dist/domains/observability/saved-view-state.es.js +16 -2
  127. package/dist/domains/observability/saved-view-state.es.js.map +1 -1
  128. package/dist/domains/scores/components/trace-scores-list.cjs.js +1 -1
  129. package/dist/domains/scores/components/trace-scores-list.es.js +1 -1
  130. package/dist/domains/scores/components/trace-scores-tab.cjs.js +2 -2
  131. package/dist/domains/scores/components/trace-scores-tab.es.js +2 -2
  132. package/dist/domains/spans/components/spans-explorer-body.cjs.js +15 -4
  133. package/dist/domains/spans/components/spans-explorer-body.cjs.js.map +1 -1
  134. package/dist/domains/spans/components/spans-explorer-body.es.js +15 -4
  135. package/dist/domains/spans/components/spans-explorer-body.es.js.map +1 -1
  136. package/dist/domains/spans/components/spans-explorer-histogram.cjs.js +2 -2
  137. package/dist/domains/spans/components/spans-explorer-histogram.cjs.js.map +1 -1
  138. package/dist/domains/spans/components/spans-explorer-histogram.es.js +2 -2
  139. package/dist/domains/spans/components/spans-explorer-histogram.es.js.map +1 -1
  140. package/dist/domains/spans/components/spans-filter-bar.cjs.js +10 -5
  141. package/dist/domains/spans/components/spans-filter-bar.cjs.js.map +1 -1
  142. package/dist/domains/spans/components/spans-filter-bar.es.js +10 -5
  143. package/dist/domains/spans/components/spans-filter-bar.es.js.map +1 -1
  144. package/dist/domains/spans/hooks/use-spans-filter-bar.cjs.js +37 -17
  145. package/dist/domains/spans/hooks/use-spans-filter-bar.cjs.js.map +1 -1
  146. package/dist/domains/spans/hooks/use-spans-filter-bar.es.js +37 -17
  147. package/dist/domains/spans/hooks/use-spans-filter-bar.es.js.map +1 -1
  148. package/dist/domains/threads/components/threads-filter-bar.cjs.js +2 -2
  149. package/dist/domains/threads/components/threads-filter-bar.es.js +2 -2
  150. package/dist/domains/threads/hooks/use-threads-filter-bar.cjs.js +1 -1
  151. package/dist/domains/threads/hooks/use-threads-filter-bar.es.js +1 -1
  152. package/dist/domains/traces/components/feedback-thread.cjs.js +2 -2
  153. package/dist/domains/traces/components/feedback-thread.es.js +2 -2
  154. package/dist/domains/traces/components/no-traces-info.cjs.js +1 -1
  155. package/dist/domains/traces/components/no-traces-info.es.js +1 -1
  156. package/dist/domains/traces/components/trace-error-cell.cjs.js +1 -1
  157. package/dist/domains/traces/components/trace-error-cell.es.js +1 -1
  158. package/dist/domains/traces/components/traces-error-content.cjs.js +1 -1
  159. package/dist/domains/traces/components/traces-error-content.es.js +1 -1
  160. package/dist/domains/traces/components/traces-explorer/traces-explorer-actions.cjs.js +1 -0
  161. package/dist/domains/traces/components/traces-explorer/traces-explorer-actions.cjs.js.map +1 -1
  162. package/dist/domains/traces/components/traces-explorer/traces-explorer-actions.es.js +1 -0
  163. package/dist/domains/traces/components/traces-explorer/traces-explorer-actions.es.js.map +1 -1
  164. package/dist/domains/traces/components/traces-explorer/traces-explorer-context.cjs.js.map +1 -1
  165. package/dist/domains/traces/components/traces-explorer/traces-explorer-context.es.js.map +1 -1
  166. package/dist/domains/traces/components/traces-explorer/traces-explorer-filter-bar.cjs.js +2 -2
  167. package/dist/domains/traces/components/traces-explorer/traces-explorer-filter-bar.es.js +2 -2
  168. package/dist/domains/traces/components/traces-explorer/traces-explorer-histogram.cjs.js +2 -2
  169. package/dist/domains/traces/components/traces-explorer/traces-explorer-histogram.cjs.js.map +1 -1
  170. package/dist/domains/traces/components/traces-explorer/traces-explorer-histogram.es.js +2 -2
  171. package/dist/domains/traces/components/traces-explorer/traces-explorer-histogram.es.js.map +1 -1
  172. package/dist/domains/traces/components/traces-explorer/traces-explorer-list-provider.cjs.js +4 -3
  173. package/dist/domains/traces/components/traces-explorer/traces-explorer-list-provider.cjs.js.map +1 -1
  174. package/dist/domains/traces/components/traces-explorer/traces-explorer-list-provider.es.js +4 -3
  175. package/dist/domains/traces/components/traces-explorer/traces-explorer-list-provider.es.js.map +1 -1
  176. package/dist/domains/traces/components/traces-explorer/traces-explorer-root.cjs.js +31 -8
  177. package/dist/domains/traces/components/traces-explorer/traces-explorer-root.cjs.js.map +1 -1
  178. package/dist/domains/traces/components/traces-explorer/traces-explorer-root.es.js +31 -8
  179. package/dist/domains/traces/components/traces-explorer/traces-explorer-root.es.js.map +1 -1
  180. package/dist/domains/traces/components/traces-explorer/use-traces-filter-bar.cjs.js +28 -19
  181. package/dist/domains/traces/components/traces-explorer/use-traces-filter-bar.cjs.js.map +1 -1
  182. package/dist/domains/traces/components/traces-explorer/use-traces-filter-bar.es.js +28 -19
  183. package/dist/domains/traces/components/traces-explorer/use-traces-filter-bar.es.js.map +1 -1
  184. package/dist/domains/traces/components/traces-list-view.cjs.js +2 -2
  185. package/dist/domains/traces/components/traces-list-view.es.js +2 -2
  186. package/dist/domains/traces/components/traces-page-skeleton.cjs.js +1 -1
  187. package/dist/domains/traces/components/traces-page-skeleton.es.js +1 -1
  188. package/dist/domains/traces/hooks/use-traces-list-source.cjs.js +2 -2
  189. package/dist/domains/traces/hooks/use-traces-list-source.cjs.js.map +1 -1
  190. package/dist/domains/traces/hooks/use-traces-list-source.es.js +2 -2
  191. package/dist/domains/traces/hooks/use-traces-list-source.es.js.map +1 -1
  192. package/dist/domains/workflows/components/workflows-list/no-workflows-info.cjs.js +1 -1
  193. package/dist/domains/workflows/components/workflows-list/no-workflows-info.es.js +1 -1
  194. package/dist/domains/workflows/components/workflows-list/workflows-list.cjs.js +2 -2
  195. package/dist/domains/workflows/components/workflows-list/workflows-list.es.js +2 -2
  196. package/dist/domains/workspace/components/workspace-parts.cjs.js +1 -1
  197. package/dist/domains/workspace/components/workspace-parts.es.js +1 -1
  198. package/dist/domains/workspace/components/workspace-search.cjs.js +1 -1
  199. package/dist/domains/workspace/components/workspace-search.es.js +1 -1
  200. package/dist/ee/signals/components/entity-index-list.cjs.js +1 -1
  201. package/dist/ee/signals/components/entity-index-list.es.js +1 -1
  202. package/dist/ee/signals/components/trace-intelligence-entity-detail.cjs.js +1 -1
  203. package/dist/ee/signals/components/trace-intelligence-entity-detail.es.js +1 -1
  204. package/dist/ee/signals/components/trace-intelligence-entity-index.cjs.js +8 -7
  205. package/dist/ee/signals/components/trace-intelligence-entity-index.cjs.js.map +1 -1
  206. package/dist/ee/signals/components/trace-intelligence-entity-index.es.js +8 -7
  207. package/dist/ee/signals/components/trace-intelligence-entity-index.es.js.map +1 -1
  208. package/dist/ee/topics/components/topic-trace-summary-list.cjs.js +1 -1
  209. package/dist/ee/topics/components/topic-trace-summary-list.es.js +1 -1
  210. package/dist/{filter-bar-chip-jOPeM21t.js → filter-bar-chip-DBkPWlc-.js} +54 -32
  211. package/dist/filter-bar-chip-DBkPWlc-.js.map +1 -0
  212. package/dist/{filter-bar-chip-Bhn7lo4e.cjs → filter-bar-chip-DgdVLscK.cjs} +52 -30
  213. package/dist/filter-bar-chip-DgdVLscK.cjs.map +1 -0
  214. package/dist/{filter-bar-time-range-C099qEMm.cjs → filter-bar-time-range-BUmb3A1m.cjs} +2 -2
  215. package/dist/{filter-bar-time-range-C099qEMm.cjs.map → filter-bar-time-range-BUmb3A1m.cjs.map} +1 -1
  216. package/dist/{filter-bar-time-range-B1XhplO7.js → filter-bar-time-range-CtK8Dlp-.js} +2 -2
  217. package/dist/{filter-bar-time-range-B1XhplO7.js.map → filter-bar-time-range-CtK8Dlp-.js.map} +1 -1
  218. package/dist/icons/AgentIcon.cjs.js +3 -3
  219. package/dist/icons/AgentIcon.cjs.js.map +1 -1
  220. package/dist/icons/AgentIcon.es.js +3 -3
  221. package/dist/icons/AgentIcon.es.js.map +1 -1
  222. package/dist/icons/McpServerIcon.cjs.js +3 -3
  223. package/dist/icons/McpServerIcon.cjs.js.map +1 -1
  224. package/dist/icons/McpServerIcon.es.js +3 -3
  225. package/dist/icons/McpServerIcon.es.js.map +1 -1
  226. package/dist/icons/WorkflowIcon.cjs.js +2 -2
  227. package/dist/icons/WorkflowIcon.cjs.js.map +1 -1
  228. package/dist/icons/WorkflowIcon.es.js +2 -2
  229. package/dist/icons/WorkflowIcon.es.js.map +1 -1
  230. package/dist/{input-group-CCSyY4J5.js → input-group-1OAXTPnG.js} +7 -5
  231. package/dist/input-group-1OAXTPnG.js.map +1 -0
  232. package/dist/{input-group-Da8HBo30.cjs → input-group-BrBYp1gP.cjs} +6 -4
  233. package/dist/input-group-BrBYp1gP.cjs.map +1 -0
  234. package/dist/layout/tabbed-container.cjs.js +1 -1
  235. package/dist/layout/tabbed-container.es.js +1 -1
  236. package/dist/src/domains/connect/headless-connect.d.ts +54 -9
  237. package/dist/src/domains/connect/types.d.ts +16 -0
  238. package/dist/src/domains/dashboards/index.d.ts +2 -0
  239. package/dist/src/domains/dashboards/kinds/index.d.ts +8 -4
  240. package/dist/src/domains/dashboards/kinds/kpis/index.d.ts +3 -3
  241. package/dist/src/domains/dashboards/kinds/kpis/options.d.ts +22 -0
  242. package/dist/src/domains/dashboards/kinds/timeseries/index.d.ts +6 -4
  243. package/dist/src/domains/observability/hooks/use-observability-list-filters.d.ts +5 -1
  244. package/dist/src/domains/observability/lib/text-search-filter.d.ts +3 -0
  245. package/dist/src/domains/observability/lib/text-search.d.ts +2 -0
  246. package/dist/src/domains/spans/components/spans-explorer-histogram.d.ts +3 -1
  247. package/dist/src/domains/spans/components/spans-filter-bar.d.ts +4 -1
  248. package/dist/src/domains/spans/hooks/use-spans-filter-bar.d.ts +5 -2
  249. package/dist/src/domains/traces/components/traces-explorer/traces-explorer-actions.d.ts +1 -0
  250. package/dist/src/domains/traces/components/traces-explorer/traces-explorer-context.d.ts +4 -0
  251. package/dist/src/ds/components/EmptyState/empty-state-illustration.d.ts +1 -1
  252. package/dist/src/ds/components/EmptyState/illustrations/no-alerts-art.d.ts +1 -0
  253. package/dist/src/ds/components/EmptyState/illustrations/no-destinations-art.d.ts +3 -0
  254. package/dist/src/ds/components/FilterBar/types.d.ts +6 -0
  255. package/dist/src/ds/components/FilterBar/use-value-step.d.ts +1 -0
  256. package/dist/src/ds/components/FormFieldBlocks/index.d.ts +0 -1
  257. package/dist/src/ds/components/InputGroup/input-group.d.ts +1 -1
  258. package/dist/src/ds/components/SearchInput/index.d.ts +1 -0
  259. package/dist/src/ds/components/SearchInput/list-search-props.d.ts +6 -0
  260. package/dist/src/ds/components/SearchInput/search-input.d.ts +26 -3
  261. package/dist/src/ds/components/Sidebar/footer/sidebar-meter.d.ts +8 -0
  262. package/dist/src/ds/components/Sidebar/index.d.ts +1 -0
  263. package/dist/src/ds/components/Sidebar/root/sidebar-provider.d.ts +4 -4
  264. package/dist/src/ds/components/Sidebar/root/sidebar-widths.d.ts +7 -0
  265. package/dist/src/ds/layout/tabbed-container/tabbed-container-root.d.ts +5 -2
  266. package/dist/style.css +111 -41
  267. package/dist/{tabbed-container-yJX9GClR.js → tabbed-container-CZYkYekf.js} +11 -6
  268. package/dist/tabbed-container-CZYkYekf.js.map +1 -0
  269. package/dist/{tabbed-container--5P96PDX.cjs → tabbed-container-DHfamugk.cjs} +11 -6
  270. package/dist/tabbed-container-DHfamugk.cjs.map +1 -0
  271. package/dist/{types-BwdKiX24.js → types-CCm0-NSE.js} +2 -2
  272. package/dist/{types-BwdKiX24.js.map → types-CCm0-NSE.js.map} +1 -1
  273. package/dist/types-CP7wbYua.cjs.map +1 -1
  274. package/dist/{types-KjLUPShK.cjs → types-CqdYjhgk.cjs} +2 -2
  275. package/dist/{types-KjLUPShK.cjs.map → types-CqdYjhgk.cjs.map} +1 -1
  276. package/dist/types-DiiL5mTO.js.map +1 -1
  277. package/oxlint/index.js +1 -1
  278. package/package.json +7 -7
  279. package/dist/EmptyState-Dc-sP95H.cjs.map +0 -1
  280. package/dist/EmptyState-i88y1x75.js.map +0 -1
  281. package/dist/FilterBar-DY6aXUnv.cjs.map +0 -1
  282. package/dist/FilterBar-PhVKghDp.js.map +0 -1
  283. package/dist/components/ListSearch.cjs.js +0 -3
  284. package/dist/components/ListSearch.d.ts +0 -1
  285. package/dist/components/ListSearch.es.js +0 -1
  286. package/dist/data-list-1JOwQrF5.cjs.map +0 -1
  287. package/dist/data-list-DM8WpKCm.js.map +0 -1
  288. package/dist/filter-bar-chip-Bhn7lo4e.cjs.map +0 -1
  289. package/dist/filter-bar-chip-jOPeM21t.js.map +0 -1
  290. package/dist/input-group-CCSyY4J5.js.map +0 -1
  291. package/dist/input-group-Da8HBo30.cjs.map +0 -1
  292. package/dist/list-search-DUcIMJTk.js +0 -45
  293. package/dist/list-search-DUcIMJTk.js.map +0 -1
  294. package/dist/list-search-yF02rvZt.cjs +0 -50
  295. package/dist/list-search-yF02rvZt.cjs.map +0 -1
  296. package/dist/src/ds/components/FormFieldBlocks/fields/search-field-block.d.ts +0 -26
  297. package/dist/src/ds/components/ListSearch/index.d.ts +0 -1
  298. package/dist/src/ds/components/ListSearch/list-search.d.ts +0 -21
  299. package/dist/tabbed-container--5P96PDX.cjs.map +0 -1
  300. package/dist/tabbed-container-yJX9GClR.js.map +0 -1
@@ -1 +0,0 @@
1
- {"version":3,"file":"FilterBar-DY6aXUnv.cjs","names":["BracesIcon","useFilterBarContext","usePortalContainer","useRef","useState","useIsApplePlatform","useMemo","findGroup","useCallback","parseFieldValue","useValueStep","matchesQueryFilter","_Fragment","ComboboxPrimitive","alwaysHighlightProps","cn","comboboxTriggerClass","inputFocusBorderWithin","ListFilterIcon","passwordManagerOptOutProps","unstyledFormElementStyle","FLOATING_POSITION_METHOD","comboboxStyles","FilterBarOptionList","FilterBarFieldLabel","FilterBarOptionLabel","Txt","Button","Kbd","useFilterBarContext","useFilterBarContext","cn","useRef","Fragment","isFilterBarGroup","FilterBarChip","Button","PlusIcon","FolderPlusIcon","Trash2Icon","countLeaves","FolderIcon","Txt","useFilterBarContext","useState","useRef","countLeaves","Popover","cn","chipClass","PopoverTrigger","editableSegmentClass","BracesIcon","Txt","removeSegmentClass","XIcon","PopoverContent","FILTER_BAR_SCOPE_ATTR","Button","useFilterBarContext","ClearFiltersButton","useFilterBarContext","FILTER_BAR_SCOPE_ATTR","cn","VisuallyHidden","FilterBarProvider","isFilterBarGroup","Fragment","FilterBarChip","_Fragment","FilterBarTimeRange"],"sources":["../src/ds/components/FilterBar/filter-bar-input.tsx","../src/ds/components/FilterBar/use-settle-on-leave.ts","../src/ds/components/FilterBar/filter-bar-group-editor.tsx","../src/ds/components/FilterBar/filter-bar-advanced-chip.tsx","../src/ds/components/FilterBar/filter-bar-clear.tsx","../src/ds/components/FilterBar/filter-bar.tsx","../src/ds/components/FilterBar/default-operators.ts"],"sourcesContent":["import type { BaseUIEvent } from '@base-ui/react/types';\nimport { BracesIcon, ListFilterIcon } from 'lucide-react';\nimport { useCallback, useEffect, useMemo, useRef, useState } from 'react';\nimport type { KeyboardEvent } from 'react';\nimport { flushSync } from 'react-dom';\nimport { FILTER_BAR_CONTROL_SIZE, FilterBarFieldLabel, alwaysHighlightProps } from './filter-bar-chip';\nimport { useFilterBarContext } from './filter-bar-context';\nimport { FilterBarOptionLabel, FilterBarOptionList } from './filter-bar-option-list';\nimport { findGroup } from './filter-bar-tree';\nimport { matchesQueryFilter } from './match-query';\nimport type { FilterBarDraft, FilterBarField, FilterBarOperator, FilterBarOption, FilterBarValue } from './types';\nimport { parseFieldValue } from './types';\nimport { useValueStep } from './use-value-step';\nimport { Button } from '@/ds/components/Button/Button';\nimport { ComboboxPrimitive, comboboxStyles } from '@/ds/components/Combobox';\nimport { comboboxTriggerClass } from '@/ds/components/Combobox/combobox-styles';\nimport { Kbd } from '@/ds/components/Kbd/kbd';\nimport { Txt } from '@/ds/components/Txt';\nimport { FLOATING_POSITION_METHOD } from '@/ds/primitives/floating';\nimport { inputFocusBorderWithin, unstyledFormElementStyle } from '@/ds/primitives/form-element';\nimport { MENU_SIDE_OFFSET } from '@/ds/primitives/menu-item';\nimport { passwordManagerOptOutProps } from '@/ds/primitives/password-manager-autofill';\nimport { usePortalContainer } from '@/ds/primitives/portal-container';\nimport { useIsApplePlatform } from '@/hooks/use-keyboard-shortcut-label';\nimport { cn } from '@/lib/utils';\n\ntype Step = 'field' | 'operator' | 'value';\n\ntype Item = FilterBarField | FilterBarOperator | FilterBarOption;\n\nconst getItemLabel = (item: Item) => ('label' in item && item.label ? item.label : 'value' in item ? item.value : '');\n\nconst EMPTY_ITEMS: readonly Item[] = [];\n/** Pinned last entry of the field list that spawns an advanced filter (an `or` group) instead of a filter. */\nconst ADVANCED_FIELD_ID = '__filter-bar-advanced__';\nconst ADVANCED_FIELD: FilterBarField = {\n id: ADVANCED_FIELD_ID,\n label: 'Advanced filter…',\n icon: BracesIcon,\n operators: [],\n};\n\nexport type FilterBarInputProps = {\n placeholder?: string;\n className?: string;\n 'aria-label'?: string;\n /**\n * Group this instance commits into; omit for the bar's own input. Only the instance whose\n * `groupId` matches the provider's `inputTarget` renders, so a single input is ever mounted.\n */\n groupId?: string;\n /** Called when Escape is pressed on an empty query inside a group, after the input hands back to the bar. */\n onLeave?: () => void;\n};\n\n/**\n * Typeahead entry point: type to pick a field, then an operator, then a value.\n * Focus never leaves the input; the popup is driven with the arrow keys.\n */\nexport function FilterBarInput(props: FilterBarInputProps) {\n const ctx = useFilterBarContext();\n if (ctx.inputTarget !== props.groupId) return null;\n return <FilterBarInputImpl {...props} />;\n}\n\nfunction FilterBarInputImpl({\n placeholder = 'Filter',\n className,\n 'aria-label': ariaLabel = 'Add filter',\n groupId,\n onLeave,\n}: FilterBarInputProps) {\n const ctx = useFilterBarContext();\n const container = usePortalContainer();\n const inputRef = useRef<HTMLInputElement | null>(null);\n const anchorRef = useRef<HTMLDivElement>(null);\n const [open, setOpen] = useState(false);\n const [query, setQuery] = useState('');\n const [highlighted, setHighlighted] = useState<Item | null>(null);\n const [emptyForStepChange, setEmptyForStepChange] = useState(false);\n const modEnterLabel = useIsApplePlatform() ? '⌘↵' : 'Ctrl ↵';\n\n // The draft lives in the provider so the chip list can render it; the step follows from it.\n const { draft, setDraft: setDraftState, commitDraft } = ctx;\n const step: Step = !draft ? 'field' : !draft.operatorId ? 'operator' : 'value';\n const field = draft ? ctx.getField(draft.fieldId) : undefined;\n const fieldOperators = useMemo(() => (field ? ctx.getFieldOperators(field) : []), [ctx, field]);\n const operator = draft?.operatorId\n ? (fieldOperators.find(o => o.id === draft.operatorId) ?? ctx.getOperator(draft.operatorId))\n : undefined;\n // The advanced option lives in the bar only; inside a popover, nesting is the editor's `+ Group`.\n const offerAdvanced = ctx.groupsEnabled && groupId === undefined;\n const visibleFields = useMemo(() => {\n const fields = ctx.fields.filter(f => !f.hidden);\n return offerAdvanced ? [...fields, ADVANCED_FIELD] : fields;\n }, [ctx.fields, offerAdvanced]);\n const targetGroup = groupId ? findGroup(ctx.expression, groupId) : undefined;\n\n // A group's input mounts on demand (see `openGroupInput`) and takes focus itself.\n useEffect(() => {\n if (groupId) inputRef.current?.focus();\n }, [groupId]);\n\n // Base UI owns the highlight index and keeps it when the list content changes, so a row\n // reached with ArrowDown would carry over into the step that follows. An empty list committed\n // first drops that index, and `autoHighlight` re-anchors on the first row of the new step.\n const withHighlightReset = useCallback((change: () => void) => {\n flushSync(() => setEmptyForStepChange(true));\n change();\n setEmptyForStepChange(false);\n }, []);\n\n const setDraft = useCallback(\n (next: Omit<FilterBarDraft, 'id' | 'from'> | null) => withHighlightReset(() => setDraftState(next)),\n [withHighlightReset, setDraftState],\n );\n\n const reset = useCallback(() => {\n setDraftState(null);\n setQuery('');\n }, [setDraftState]);\n\n const close = useCallback(() => {\n setOpen(false);\n reset();\n }, [reset]);\n\n const commit = useCallback(\n (fieldId: string, operatorId: string, value: FilterBarValue) => {\n withHighlightReset(() => commitDraft({ fieldId, operatorId }, value));\n setQuery('');\n inputRef.current?.focus();\n },\n [withHighlightReset, commitDraft],\n );\n\n const selectOperator = useCallback(\n (fieldId: string, next: FilterBarOperator) => {\n if (next.arity === 'none') {\n commit(fieldId, next.id, '');\n return;\n }\n setDraft({ fieldId, operatorId: next.id });\n setQuery('');\n },\n [commit, setDraft],\n );\n\n const selectField = useCallback(\n (next: FilterBarField) => {\n if (next.id === ADVANCED_FIELD_ID) {\n // `or` is the useful default: an `and` group is indistinguishable from the root.\n const id = ctx.addGroup(undefined, 'or');\n ctx.setOpenGroup(id);\n ctx.openGroupInput(id);\n setQuery('');\n setOpen(false);\n return;\n }\n const [only, ...rest] = ctx.getFieldOperators(next);\n // Free-text entry with text already typed: that text is the value, so neither the\n // operator nor the value step has anything left to ask.\n if (next.search && only && query.trim() !== '') {\n commit(next.id, only.id, parseFieldValue(next.type, query));\n return;\n }\n // A single allowed operator is implied: skip straight to the value step.\n if (only && rest.length === 0) {\n selectOperator(next.id, only);\n return;\n }\n setDraft({ fieldId: next.id });\n setQuery('');\n },\n [ctx, commit, query, selectOperator, setDraft],\n );\n\n const valueStep = useValueStep({\n field,\n operator,\n query,\n enabled: open && step === 'value',\n setQuery,\n onCommit: value => {\n if (draft?.operatorId) commit(draft.fieldId, draft.operatorId, value);\n },\n });\n\n // Leaving a group's input hands the target back to the bar; empty groups are pruned when the\n // popover closes, never here.\n const leaveGroup = useCallback(() => {\n if (!groupId) return false;\n ctx.openGroupInput(undefined);\n onLeave?.();\n return true;\n }, [ctx, groupId, onLeave]);\n\n const stepBack = useCallback(() => {\n if (step === 'value' && draft) {\n // Back to the field step when the operator was implied (single operator).\n const skipOperator = field ? fieldOperators.length === 1 : false;\n setDraft(skipOperator ? null : { fieldId: draft.fieldId });\n } else if (step === 'operator') setDraft(null);\n else if (!leaveGroup()) setOpen(false);\n setQuery('');\n }, [step, draft, field, fieldOperators, setDraft, leaveGroup]);\n\n // Selection is routed per step and never kept by Base UI (`value` stays null).\n const handleSelect = (item: Item) => {\n if (step === 'field') selectField(item as FilterBarField);\n else if (step === 'operator' && draft) selectOperator(draft.fieldId, item as FilterBarOperator);\n else valueStep.handleSelect(item as FilterBarOption);\n };\n\n // App-level keys run before Base UI's own input handling.\n const handleKeyDown = (event: BaseUIEvent<KeyboardEvent<HTMLInputElement>>) => {\n if (event.key === 'Escape') {\n event.preventDefault();\n // Consumed here: an enclosing popover (advanced filter) must not close on it.\n event.stopPropagation();\n event.preventBaseUIHandler();\n stepBack();\n return;\n }\n if (!open && (event.key === 'ArrowDown' || event.key === 'Enter')) {\n event.preventDefault();\n event.preventBaseUIHandler();\n setOpen(true);\n return;\n }\n if (query === '') {\n if (event.key === 'Backspace') {\n event.preventDefault();\n event.preventBaseUIHandler();\n if (step !== 'field') stepBack();\n else if (targetGroup) {\n // Inside a group: eat its last chip, or drop the group once it is empty.\n const last = targetGroup.nodes.findLast(node => !ctx.leaving.has(node.id));\n if (last) ctx.removeItem(last.id);\n else leaveGroup();\n } else {\n // Chips still animating out are already gone from the value: skip them.\n const last = ctx.items.findLast(item => !ctx.leaving.has(item.id));\n if (last) ctx.removeItem(last.id);\n }\n return;\n }\n if (event.key === 'ArrowLeft' && step === 'field') {\n if (ctx.focusChip(ctx.items.length - 1, -1, 'remove')) event.preventDefault();\n return;\n }\n }\n if (!open) return;\n\n if (event.key === 'Tab' && highlighted && step !== 'value' && (step === 'operator' || query !== '')) {\n event.preventDefault();\n event.preventBaseUIHandler();\n handleSelect(highlighted);\n return;\n }\n if (step === 'value') {\n const highlightedOption = valueStep.hasSuggestions ? (highlighted as FilterBarOption | null) : null;\n const handled = valueStep.handleKeyDown(event, highlightedOption);\n // Base UI closes on Enter when nothing is highlighted (form submission); the draft must stay open.\n if (handled || (event.key === 'Enter' && highlightedOption === null)) event.preventBaseUIHandler();\n }\n };\n\n const optionsForStep: Record<Step, readonly Item[]> = {\n field: visibleFields,\n operator: fieldOperators,\n value: valueStep.options,\n };\n const items: readonly Item[] = emptyForStepChange ? EMPTY_ITEMS : optionsForStep[step];\n\n // A search field is the way out for text that names no field, so it survives the field\n // step's own filtering whatever was typed; every other item matches on its label.\n const filterItem = useCallback(\n (item: Item, text: string, itemToString?: (item: Item) => string) =>\n ('search' in item && item.search === true) || matchesQueryFilter(item, text, itemToString),\n [],\n );\n\n const inputPlaceholder =\n step === 'field'\n ? placeholder\n : step === 'operator'\n ? 'Operator'\n : valueStep.hasSuggestions && valueStep.allowFreeText\n ? 'Search or type a value'\n : field?.type === 'number'\n ? 'Number'\n : 'Value';\n\n return (\n <>\n <ComboboxPrimitive.Root<Item>\n items={items}\n itemToStringLabel={getItemLabel}\n // The value step is already filtered (locally or server-side) by useValueSuggestions.\n filter={step === 'value' ? null : filterItem}\n value={null}\n onValueChange={(item, details) => {\n // Never let Base UI keep the selection, fill the input or close: each step routes it.\n details.cancel();\n if (item) handleSelect(item);\n }}\n inputValue={query}\n onInputValueChange={(next, details) => {\n if (details.reason !== 'input-change') return;\n setQuery(next);\n if (!open) setOpen(true);\n }}\n onItemHighlighted={item => setHighlighted(item ?? null)}\n open={open}\n onOpenChange={(next, details) => {\n // Escape is handled by the input (it steps back rather than closing).\n if (!next && details.reason === 'escape-key') return;\n // The input is the anchor, not a trigger: clicking it must keep the draft open.\n if (\n !next &&\n details.reason === 'outside-press' &&\n details.event.target instanceof Node &&\n inputRef.current?.contains(details.event.target)\n ) {\n return;\n }\n if (next) setOpen(true);\n else close();\n }}\n {...alwaysHighlightProps}\n modal={false}\n >\n <div\n ref={anchorRef}\n data-slot=\"filter-bar-input-trigger\"\n className={cn(\n // Same trigger recipe as every other DS Combobox (fill, radius, `[&>svg]` icon sizing\n // and the Button icon offset); the bar itself has no chrome. Focus lives on the\n // nested input, so the recipe's `focus-visible` border becomes `focus-within`.\n comboboxTriggerClass({ variant: 'default', size: FILTER_BAR_CONTROL_SIZE }),\n 'w-auto cursor-text',\n groupId === undefined && 'max-w-80 grow basis-32',\n 'focus-within:bg-fill-hover',\n inputFocusBorderWithin,\n step === 'field' ? 'min-w-32' : 'min-w-24',\n className,\n )}\n >\n <ListFilterIcon aria-hidden className=\"shrink-0\" />\n <ComboboxPrimitive.Input\n ref={el => {\n inputRef.current = el;\n ctx.registerInput(el);\n }}\n aria-label={ariaLabel}\n spellCheck={false}\n {...passwordManagerOptOutProps}\n data-slot=\"filter-bar-input\"\n data-step={step}\n data-target={targetGroup?.id}\n inputMode={step === 'value' && field?.type === 'number' ? 'decimal' : undefined}\n placeholder={inputPlaceholder}\n className={cn(\n unstyledFormElementStyle,\n 'min-w-0 flex-1 bg-transparent zoom-safe-text',\n 'placeholder:text-muted-foreground placeholder:transition-opacity placeholder:duration-normal focus:placeholder:opacity-70',\n )}\n onFocus={() => setOpen(true)}\n onKeyDown={handleKeyDown}\n />\n </div>\n <ComboboxPrimitive.Portal container={container}>\n <ComboboxPrimitive.Positioner\n // Base UI anchors to the input, which starts after the filter icon; align with the pill instead.\n anchor={anchorRef}\n align=\"start\"\n sideOffset={MENU_SIDE_OFFSET}\n positionMethod={FLOATING_POSITION_METHOD}\n className={comboboxStyles.positioner}\n >\n <ComboboxPrimitive.Popup // Match the pill, with the DS Combobox's 11rem floor (replaces the menu's anchor-width minimum).\n className={cn(comboboxStyles.popup, 'w-(--anchor-width) min-w-44')}\n data-slot=\"filter-bar-editor\"\n >\n {step === 'field' && (\n <FilterBarOptionList<FilterBarField>\n aria-label=\"Fields\"\n getKey={f => f.id}\n renderOption={f => (\n <>\n <FilterBarFieldLabel field={f} />\n {f.search && query !== '' && (\n <span className=\"min-w-0 truncate text-muted-foreground\">\n {ctx.getFieldOperators(f)[0]?.label} \"{query}\"\n </span>\n )}\n </>\n )}\n emptyText=\"No matching field.\"\n />\n )}\n {step === 'operator' && (\n <FilterBarOptionList<FilterBarOperator>\n aria-label=\"Operators\"\n getKey={o => o.id}\n renderOption={o => o.label}\n emptyText=\"No matching operator.\"\n />\n )}\n {step === 'value' && valueStep.hasOptions && (\n <FilterBarOptionList<FilterBarOption>\n aria-label=\"Values\"\n aria-multiselectable={valueStep.isMany || undefined}\n getKey={o => o.value}\n renderOption={option => <FilterBarOptionLabel option={option} />}\n isSelected={o => valueStep.isMany && valueStep.selected.includes(o.value)}\n isLoading={valueStep.isLoading}\n error={valueStep.error}\n emptyText={\n valueStep.allowFreeText ? 'No suggestions. Press Enter to use your text.' : 'No matching value.'\n }\n />\n )}\n {step === 'value' && !valueStep.hasSuggestions && (\n <div className=\"flex items-center justify-between gap-2 py-1 pr-1 pl-[.9em]\">\n <Txt variant=\"caption\" tone=\"muted\">\n Type a value\n </Txt>\n <Button\n size=\"sm\"\n variant=\"default\"\n disabled={!valueStep.canCommitQuery}\n onMouseDown={e => e.preventDefault()}\n onClick={() => valueStep.submitFreeText()}\n >\n Apply\n <Kbd size=\"xs\">↵</Kbd>\n </Button>\n </div>\n )}\n {step === 'value' && valueStep.isMany && (\n <div className=\"flex items-center justify-end gap-1 border-t border-border p-1\">\n <Button\n size=\"sm\"\n variant=\"default\"\n onMouseDown={e => e.preventDefault()}\n onClick={() => valueStep.commitDone()}\n >\n Done\n <Kbd size=\"xs\">{modEnterLabel}</Kbd>\n </Button>\n </div>\n )}\n </ComboboxPrimitive.Popup>\n </ComboboxPrimitive.Positioner>\n </ComboboxPrimitive.Portal>\n </ComboboxPrimitive.Root>\n </>\n );\n}\n","import { useEffect } from 'react';\nimport { useFilterBarContext } from './filter-bar-context';\n\n/** Keeps a leaving node in the DOM until its exit animation has played, then releases it. */\nexport function useSettleOnLeave(id: string, leaving: boolean, rootRef: React.RefObject<HTMLElement | null>) {\n const { settleRemove } = useFilterBarContext();\n useEffect(() => {\n const root = rootRef.current;\n if (!leaving || !root) return;\n const animations = typeof root.getAnimations === 'function' ? root.getAnimations({ subtree: true }) : [];\n if (animations.length === 0) {\n settleRemove(id);\n return;\n }\n let cancelled = false;\n Promise.all(animations.map(animation => animation.finished))\n .then(() => {\n if (!cancelled) settleRemove(id);\n })\n .catch(() => {});\n return () => {\n cancelled = true;\n };\n }, [leaving, id, settleRemove, rootRef]);\n}\n","import { FolderIcon, FolderPlusIcon, PlusIcon, Trash2Icon } from 'lucide-react';\nimport { Fragment, useEffect, useRef } from 'react';\nimport type { ReactNode } from 'react';\nimport { FilterBarChip } from './filter-bar-chip';\nimport { useFilterBarContext } from './filter-bar-context';\nimport { FilterBarInput } from './filter-bar-input';\nimport { countLeaves } from './filter-bar-tree';\nimport type { FilterBarGroup, FilterBarLogic } from './types';\nimport { isFilterBarGroup } from './types';\nimport { useSettleOnLeave } from './use-settle-on-leave';\nimport { Button } from '@/ds/components/Button/Button';\nimport { Txt } from '@/ds/components/Txt';\nimport { cn } from '@/lib/utils';\n\nconst connectorClass =\n 'flex h-control-sm w-14 shrink-0 items-center justify-center rounded-md text-column tracking-wide text-muted-foreground uppercase';\n\nexport type FilterBarLogicToggleProps = {\n groupId: string;\n logic: FilterBarLogic;\n className?: string;\n};\n\n/** `and` / `or` connector in front of a row; every connector of a group shares its logic. */\nexport function FilterBarLogicToggle({ groupId, logic, className }: FilterBarLogicToggleProps) {\n const ctx = useFilterBarContext();\n const next: FilterBarLogic = logic === 'and' ? 'or' : 'and';\n return (\n <button\n type=\"button\"\n data-slot=\"filter-bar-logic\"\n data-logic={logic}\n aria-label={`Joined with ${logic}, switch to ${next}`}\n title={`Switch to ${next}`}\n className={cn(\n connectorClass,\n 'filter-bar-logic cursor-pointer border border-border bg-fill-subtle outline-none',\n 'hover:bg-fill-hover hover:text-foreground focus-visible:bg-fill-hover focus-visible:text-foreground',\n className,\n )}\n onClick={() => ctx.setLogic(groupId, next)}\n >\n {logic}\n </button>\n );\n}\n\n/** Segmented `and | or` control shown in a nested group's header. */\nfunction FilterBarLogicSwitch({ groupId, logic }: { groupId: string; logic: FilterBarLogic }) {\n const ctx = useFilterBarContext();\n return (\n <div\n role=\"radiogroup\"\n aria-label=\"Group logic\"\n className=\"flex h-control-sm items-center gap-0.5 rounded-md border border-border bg-fill-subtle p-0.5\"\n >\n {(['and', 'or'] as const).map(value => (\n <button\n key={value}\n type=\"button\"\n role=\"radio\"\n aria-checked={logic === value}\n aria-label={`Join with ${value}`}\n className={cn(\n 'h-full cursor-pointer rounded-sm px-1.5 text-column tracking-wide uppercase outline-none',\n 'focus-visible:bg-fill-hover',\n logic === value ? 'bg-fill-hover text-foreground' : 'text-muted-foreground hover:text-foreground',\n )}\n onClick={() => logic !== value && ctx.setLogic(groupId, value)}\n >\n {value}\n </button>\n ))}\n </div>\n );\n}\n\nexport type FilterBarGroupEditorProps = {\n group: FilterBarGroup;\n /** Nesting level of `group` (root-level group = 1). */\n depth: number;\n /** Drops this group; rendered as a trailing `Clear all` in the footer. */\n onRemove?: () => void;\n removeLabel?: string;\n className?: string;\n};\n\n/**\n * Recursive rule builder shown in an advanced-filter popover. Rows are laid out as\n * `connector | condition`: the first row reads `where`, the following ones carry the\n * group's `and` / `or` toggle. Nested groups render as bordered cards with their own\n * header (logic switch + remove) and footer. The shared typeahead input renders as the\n * last row of the group it is pointed at.\n */\nexport function FilterBarGroupEditor({\n group,\n depth,\n onRemove,\n removeLabel = 'Remove group',\n className,\n}: FilterBarGroupEditorProps) {\n const ctx = useFilterBarContext();\n const addFilterRef = useRef<HTMLButtonElement>(null);\n const focusAddFilter = useRef(false);\n const targeted = ctx.inputTarget === group.id;\n const canNest = depth < ctx.maxDepth;\n\n // `+ Condition` is hidden while the input is open; focus it once it remounts.\n useEffect(() => {\n if (targeted || !focusAddFilter.current) return;\n focusAddFilter.current = false;\n addFilterRef.current?.focus();\n }, [targeted]);\n\n const rows: ReactNode[] = [];\n const connector = (key: string) =>\n rows.length === 0 ? (\n <span key={`${key}:where`} className={connectorClass}>\n where\n </span>\n ) : (\n <FilterBarLogicToggle key={`${key}:logic`} groupId={group.id} logic={group.logic} />\n );\n for (const node of group.nodes) {\n rows.push(\n <Fragment key={node.id}>\n {connector(node.id)}\n {isFilterBarGroup(node) ? (\n <NestedGroupCard group={node} depth={depth + 1} />\n ) : (\n <FilterBarChip item={node} className=\"w-fit\" />\n )}\n </Fragment>,\n );\n }\n if (ctx.draft && ctx.draft.groupId === group.id) {\n const { id, fieldId, operatorId = '' } = ctx.draft;\n rows.push(\n <Fragment key={id}>\n {connector(id)}\n <FilterBarChip draft item={{ id, fieldId, operatorId, value: '' }} className=\"w-fit\" />\n </Fragment>,\n );\n }\n if (targeted) {\n rows.push(\n <Fragment key=\"input\">\n {connector('input')}\n <FilterBarInput\n groupId={group.id}\n placeholder=\"Add condition\"\n onLeave={() => {\n focusAddFilter.current = true;\n }}\n />\n </Fragment>,\n );\n }\n\n return (\n <div\n data-slot=\"filter-bar-group-editor\"\n data-depth={depth}\n role=\"group\"\n aria-label={`Conditions joined with ${group.logic}`}\n className={cn('flex min-w-0 flex-col', className)}\n >\n {rows.length > 0 && (\n <div className=\"grid grid-cols-[auto_minmax(0,1fr)] items-start gap-x-2 gap-y-1.5 p-2\">{rows}</div>\n )}\n <div\n data-slot=\"filter-bar-editor-actions\"\n className={cn('flex w-full items-center gap-1 p-1', rows.length > 0 && 'border-t border-border')}\n >\n {!targeted && (\n <Button\n ref={addFilterRef}\n variant=\"ghost\"\n size=\"sm\"\n icon={<PlusIcon />}\n onClick={() => ctx.openGroupInput(group.id)}\n >\n Condition\n </Button>\n )}\n <Button\n variant=\"ghost\"\n size=\"sm\"\n icon={<FolderPlusIcon />}\n className=\"text-muted-foreground\"\n tooltip={canNest ? undefined : `Groups can nest ${ctx.maxDepth} levels deep`}\n disabled={!canNest}\n onClick={() => ctx.addGroup(group.id, group.logic === 'and' ? 'or' : 'and')}\n >\n Group\n </Button>\n {onRemove && (\n <Button\n variant=\"ghost\"\n size=\"sm\"\n icon={<Trash2Icon />}\n className=\"ml-auto text-muted-foreground\"\n aria-label={removeLabel}\n onClick={onRemove}\n >\n Clear all\n </Button>\n )}\n </div>\n </div>\n );\n}\n\nfunction NestedGroupCard({ group, depth }: { group: FilterBarGroup; depth: number }) {\n const ctx = useFilterBarContext();\n const rootRef = useRef<HTMLDivElement>(null);\n const leaving = ctx.leaving.has(group.id);\n useSettleOnLeave(group.id, leaving, rootRef);\n const count = countLeaves(group);\n\n return (\n <div\n ref={rootRef}\n data-slot=\"filter-bar-editor-nested\"\n data-leaving={leaving || undefined}\n aria-hidden={leaving || undefined}\n className={cn(\n 'filter-bar-editor-nested w-full overflow-hidden rounded-lg border border-border',\n leaving && 'pointer-events-none',\n )}\n >\n <div className=\"flex items-center gap-2 border-b border-border px-2 py-1\">\n <FolderIcon className=\"size-3.5 text-muted-foreground\" />\n <Txt as=\"span\" variant=\"label\" tone=\"ink\">\n Group\n </Txt>\n <Txt as=\"span\" variant=\"label\" tone=\"muted\">\n {count} {count === 1 ? 'condition' : 'conditions'}\n </Txt>\n <div className=\"ml-auto flex items-center gap-1\">\n <FilterBarLogicSwitch groupId={group.id} logic={group.logic} />\n <Button\n variant=\"ghost\"\n size=\"icon-sm\"\n tooltip=\"Remove group\"\n disabled={leaving}\n onClick={() => ctx.removeGroup(group.id)}\n >\n <Trash2Icon />\n </Button>\n </div>\n </div>\n <FilterBarGroupEditor group={group} depth={depth} />\n </div>\n );\n}\n","import { BracesIcon, XIcon } from 'lucide-react';\nimport { useRef, useState } from 'react';\nimport type { KeyboardEvent } from 'react';\nimport { chipClass, editableSegmentClass, removeSegmentClass } from './filter-bar-chip';\nimport { FILTER_BAR_SCOPE_ATTR, useFilterBarContext } from './filter-bar-context';\nimport { FilterBarGroupEditor } from './filter-bar-group-editor';\nimport { countLeaves } from './filter-bar-tree';\nimport type { FilterBarGroup } from './types';\nimport { useSettleOnLeave } from './use-settle-on-leave';\nimport { Button } from '@/ds/components/Button/Button';\nimport { Popover, PopoverContent, PopoverTrigger } from '@/ds/components/Popover';\nimport { Txt } from '@/ds/components/Txt';\nimport { cn } from '@/lib/utils';\n\nexport type FilterBarAdvancedChipProps = {\n group: FilterBarGroup;\n className?: string;\n};\n\n/**\n * A root-level group rendered as one \"Advanced filter\" chip. Its popover hosts the\n * recursive rule builder; the chip's remove button drops the whole subtree.\n */\nexport function FilterBarAdvancedChip({ group, className }: FilterBarAdvancedChipProps) {\n const ctx = useFilterBarContext();\n const [initial] = useState(() => !ctx.mounted);\n const rootRef = useRef<HTMLDivElement>(null);\n const triggerRef = useRef<HTMLButtonElement>(null);\n const leaving = ctx.leaving.has(group.id);\n const open = ctx.openGroupId === group.id;\n const count = countLeaves(group);\n // Position in the flattened item list: navigation from the chip continues from its first leaf.\n const firstLeafIndex = ctx.items.findIndex(item => isUnder(group, item.id));\n const index = firstLeafIndex === -1 ? ctx.items.length : firstLeafIndex;\n useSettleOnLeave(group.id, leaving, rootRef);\n\n const handleKeyDown = (event: KeyboardEvent<HTMLDivElement>) => {\n if (leaving) return;\n const segments = Array.from(rootRef.current?.querySelectorAll<HTMLElement>('[data-filter-bar-segment]') ?? []);\n const current = segments.findIndex(el => el === event.target);\n if (current === -1) return;\n switch (event.key) {\n case 'ArrowRight': {\n event.preventDefault();\n const next = segments[current + 1];\n if (next) next.focus();\n else if (!ctx.focusChip(index + count, 1, 'field')) ctx.focusInput();\n return;\n }\n case 'ArrowLeft': {\n event.preventDefault();\n const prev = segments[current - 1];\n if (prev) prev.focus();\n else ctx.focusChip(index - 1, -1, 'remove');\n return;\n }\n case 'Delete':\n case 'Backspace':\n event.preventDefault();\n remove();\n break;\n default:\n }\n };\n\n const remove = () => {\n ctx.removeGroup(group.id);\n ctx.focusAfterRemove(index);\n };\n\n return (\n <Popover open={open} onOpenChange={next => ctx.setOpenGroup(next ? group.id : null)}>\n <div\n ref={rootRef}\n role=\"group\"\n aria-label={`Advanced filter, ${count} ${count === 1 ? 'condition' : 'conditions'}`}\n aria-hidden={leaving || undefined}\n data-slot=\"filter-bar-advanced\"\n data-initial={initial || undefined}\n data-leaving={leaving || undefined}\n className={cn('filter-bar-advanced', chipClass, leaving && 'pointer-events-none', className)}\n onKeyDown={handleKeyDown}\n >\n <PopoverTrigger\n ref={el => {\n triggerRef.current = el;\n ctx.registerSegment(group.id, 'field', leaving ? null : el);\n }}\n render={<button type=\"button\" />}\n data-filter-bar-segment=\"field\"\n className={editableSegmentClass}\n title=\"Edit advanced filter\"\n >\n <BracesIcon aria-hidden />\n <span className=\"truncate\">Advanced filter</span>\n {count > 0 && (\n <Txt as=\"span\" variant=\"column\" tone=\"muted\" aria-hidden>\n {count}\n </Txt>\n )}\n </PopoverTrigger>\n {leaving ? (\n <span aria-hidden className={removeSegmentClass}>\n <XIcon />\n </span>\n ) : (\n <button\n type=\"button\"\n ref={el => ctx.registerSegment(group.id, 'remove', el)}\n data-filter-bar-segment=\"remove\"\n aria-label=\"Remove advanced filter\"\n title=\"Remove advanced filter\"\n className={removeSegmentClass}\n onClick={remove}\n >\n <XIcon />\n </button>\n )}\n </div>\n <PopoverContent\n align=\"start\"\n className=\"w-[min(92vw,44rem)] p-0\"\n {...{ [FILTER_BAR_SCOPE_ATTR]: 'advanced' }}\n finalFocus={triggerRef}\n >\n <div className=\"flex items-center gap-2 border-b border-border px-3 py-2\">\n <BracesIcon className=\"size-3.5 text-muted-foreground\" />\n <Txt as=\"span\" variant=\"label\" tone=\"ink\">\n Advanced filter\n </Txt>\n <Txt as=\"span\" variant=\"column\" tone=\"muted\" className=\"rounded-md bg-fill-subtle px-1.5\">\n {count}\n </Txt>\n <Button\n variant=\"ghost\"\n size=\"icon-sm\"\n className=\"ml-auto\"\n tooltip=\"Close\"\n onClick={() => ctx.setOpenGroup(null)}\n >\n <XIcon />\n </Button>\n </div>\n <FilterBarGroupEditor\n group={group}\n depth={1}\n removeLabel=\"Remove advanced filter\"\n onRemove={() => {\n ctx.setOpenGroup(null);\n remove();\n }}\n />\n </PopoverContent>\n </Popover>\n );\n}\n\nconst isUnder = (group: FilterBarGroup, itemId: string): boolean =>\n group.nodes.some(node => (node.id === itemId ? true : 'kind' in node && isUnder(node, itemId)));\n","import { useFilterBarContext } from './filter-bar-context';\nimport { ClearFiltersButton } from '@/ds/components/ClearFiltersButton/clear-filters-button';\n\n/** Removes every removable filter. Rendered by FilterBar at its trailing edge; hidden while nothing can be removed. */\nexport function FilterBarClear({ label }: { label: string }) {\n const ctx = useFilterBarContext();\n if (!ctx.hasRemovableItems) return null;\n return (\n <ClearFiltersButton\n label={label}\n onClick={event => {\n event.stopPropagation();\n ctx.clear();\n ctx.focusInput();\n }}\n />\n );\n}\n","import { Fragment } from 'react';\nimport type { ReactNode } from 'react';\nimport { FilterBarAdvancedChip } from './filter-bar-advanced-chip';\nimport { FilterBarChip } from './filter-bar-chip';\nimport { FilterBarClear } from './filter-bar-clear';\nimport { FILTER_BAR_SCOPE_ATTR, FilterBarProvider, useFilterBarContext } from './filter-bar-context';\nimport { FilterBarInput } from './filter-bar-input';\nimport { FilterBarTimeRange } from './filter-bar-time-range';\nimport { isFilterBarGroup } from './types';\nimport type { FilterBarExpression, FilterBarField, FilterBarItem, FilterBarOperator } from './types';\nimport { VisuallyHidden } from '@/ds/primitives/visually-hidden';\nimport { cn } from '@/lib/utils';\n\ntype FilterBarValueProps =\n | {\n /** Flat list of filters, implicitly joined with `and`. Advanced filters are never offered. */\n value: FilterBarItem[];\n onValueChange: (items: FilterBarItem[]) => void;\n }\n | {\n /**\n * Tree of filters and groups. Root nodes are joined with `and`; each root group renders\n * as one \"Advanced filter\" chip whose popover edits the nested `and` / `or` logic.\n */\n value: FilterBarExpression;\n onValueChange: (expression: FilterBarExpression) => void;\n };\n\nexport type FilterBarProps = FilterBarValueProps & {\n fields: FilterBarField[];\n operators: FilterBarOperator[];\n /**\n * Id given to a newly added item. Defaults to a random id. Consumers that rebuild `value` from\n * their own store (URL, query params…) should return the id they will rebuild it with, so the\n * draft chip and the committed chip are the same element.\n */\n createItemId?: (fieldId: string) => string;\n /** How deep advanced-filter groups may nest (root-level group = 1). Defaults to 3. */\n maxDepth?: number;\n 'aria-label'?: string;\n /**\n * Text shown in a value list when the field's `suggestions` resolver rejects, for example\n * to explain a server limit. Return `undefined` to keep the default \"Couldn't load values.\".\n */\n describeSuggestionsError?: (error: unknown) => string | undefined;\n /** Accessible label of the trailing \"remove every filter\" button. */\n clearLabel?: string;\n className?: string;\n children: ReactNode;\n};\n\nfunction FilterBarSurface({\n className,\n clearLabel,\n children,\n}: {\n className?: string;\n clearLabel: string;\n children: ReactNode;\n}) {\n const ctx = useFilterBarContext();\n return (\n <div\n role=\"group\"\n aria-label={ctx.ariaLabel}\n data-slot=\"filter-bar\"\n {...{ [FILTER_BAR_SCOPE_ATTR]: 'bar' }}\n className={cn(\n // No chrome of its own: chips and the typeahead input sit directly on the parent surface.\n // Layout: chips, input, then Clear right beside the input — all in one wrapping row so\n // Clear never drifts to the far edge of a wide container.\n 'flex w-full flex-wrap items-center gap-1.5',\n className,\n )}\n >\n {children}\n <span className=\"flex shrink-0 items-center empty:hidden\">\n <FilterBarClear label={clearLabel} />\n </span>\n <VisuallyHidden aria-live=\"polite\">{ctx.announcement}</VisuallyHidden>\n </div>\n );\n}\n\n/**\n * Braintrust-style filter bar: `field → operator → value` filters built from a\n * single typeahead input, rendered as inline editable chips. Domain-agnostic —\n * fields, operators and values are plain strings supplied by the consumer.\n *\n * Pass a `FilterBarExpression` as `value` to enable Linear-style advanced filters:\n * the input offers \"Advanced filter…\", which adds one chip whose popover hosts a\n * recursive rule builder (`and` / `or` connectors, nested groups). The bar itself\n * stays flat. A flat `FilterBarItem[]` stays flat.\n *\n * @example\n * <FilterBar value={items} onValueChange={setItems} fields={fields} operators={DEFAULT_FILTER_OPERATORS}>\n * <FilterBar.Chips />\n * <FilterBar.Input />\n * </FilterBar>\n */\nexport function FilterBar({\n fields,\n operators,\n value,\n onValueChange,\n createItemId,\n maxDepth,\n 'aria-label': ariaLabel = 'Filters',\n describeSuggestionsError,\n clearLabel = 'Clear filters',\n className,\n children,\n}: FilterBarProps) {\n return (\n <FilterBarProvider\n fields={fields}\n operators={operators}\n value={value}\n onValueChange={onValueChange}\n createItemId={createItemId}\n maxDepth={maxDepth}\n ariaLabel={ariaLabel}\n describeSuggestionsError={describeSuggestionsError}\n >\n <FilterBarSurface className={className} clearLabel={clearLabel}>\n {children}\n </FilterBarSurface>\n </FilterBarProvider>\n );\n}\n\n/**\n * Default layout: one editable chip per root item, one \"Advanced filter\" chip per root\n * group, in order, then the chip of the filter being built in the bar's input (which\n * becomes the last item's chip once committed).\n */\nexport function FilterBarChips({ renderChip = defaultRenderChip }: FilterBarChipsProps) {\n const ctx = useFilterBarContext();\n // One keyed array: the draft chip and the item it becomes share a key, so React\n // keeps the element across the commit instead of mounting a new chip.\n const chips: ReactNode[] = [];\n for (const node of ctx.expression.nodes) {\n const chip = isFilterBarGroup(node) ? <FilterBarAdvancedChip group={node} /> : renderChip(node);\n if (chip !== null) chips.push(<Fragment key={node.id}>{chip}</Fragment>);\n }\n if (ctx.draft && !ctx.draft.groupId) {\n // `FilterBarChip` needs a full item; the draft's missing parts are blank until picked.\n const { id, fieldId, operatorId = '' } = ctx.draft;\n chips.push(\n <Fragment key={id}>\n <FilterBarChip draft item={{ id, fieldId, operatorId, value: '' }} />\n </Fragment>,\n );\n }\n return <>{chips}</>;\n}\n\nexport type FilterBarChipsProps = {\n /**\n * Chip for an item; return `null` to render none (e.g. an item only held in the\n * value for scoping). Defaults to a plain editable `FilterBar.Chip`.\n */\n renderChip?: (item: FilterBarItem) => ReactNode;\n};\n\nconst defaultRenderChip = (item: FilterBarItem) => <FilterBarChip item={item} />;\n\nFilterBar.Chips = FilterBarChips;\nFilterBar.Chip = FilterBarChip;\nFilterBar.AdvancedChip = FilterBarAdvancedChip;\nFilterBar.Input = FilterBarInput;\nFilterBar.TimeRange = FilterBarTimeRange;\n","import type { FilterBarOperator } from './types';\n\n/** Opt-in starter set. Pure data: the component attaches no semantics to ids. */\nexport const DEFAULT_FILTER_OPERATORS: FilterBarOperator[] = [\n { id: 'is', label: 'is', widensTo: 'in' },\n { id: 'is-not', label: 'is not' },\n { id: 'contains', label: 'contains' },\n { id: 'not-contains', label: 'does not contain' },\n { id: 'starts-with', label: 'starts with' },\n { id: 'gt', label: '>' },\n { id: 'lt', label: '<' },\n { id: 'gte', label: '>=' },\n { id: 'lte', label: '<=' },\n { id: 'is-empty', label: 'is empty', arity: 'none' },\n { id: 'is-not-empty', label: 'is not empty', arity: 'none' },\n { id: 'in', label: 'in', arity: 'many' },\n];\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AA8BA,IAAM,gBAAgB,SAAgB,WAAW,QAAQ,KAAK,QAAQ,KAAK,QAAQ,WAAW,OAAO,KAAK,QAAQ;AAElH,IAAM,cAA+B,CAAC;;AAEtC,IAAM,oBAAoB;AAC1B,IAAM,iBAAiC;CACrC,IAAI;CACJ,OAAO;CACP,MAAMA,aAAAA;CACN,WAAW,CAAC;AACd;;;;;AAmBA,SAAgB,eAAe,OAA4B;CAEzD,IADYC,wBAAAA,oBACR,CAAA,CAAI,gBAAgB,MAAM,SAAS,OAAO;CAC9C,OAAO,iBAAA,GAAA,kBAAA,IAAA,CAAC,oBAAD,EAAoB,GAAI,MAAQ,CAAA;AACzC;AAEA,SAAS,mBAAmB,EAC1B,cAAc,UACd,WACA,cAAc,YAAY,cAC1B,SACA,WACsB;CACtB,MAAM,MAAMA,wBAAAA,oBAAoB;CAChC,MAAM,YAAYC,oCAAAA,mBAAmB;CACrC,MAAM,YAAA,GAAWC,MAAAA,OAAAA,CAAgC,IAAI;CACrD,MAAM,aAAA,GAAYA,MAAAA,OAAAA,CAAuB,IAAI;CAC7C,MAAM,CAAC,MAAM,YAAA,GAAWC,MAAAA,SAAAA,CAAS,KAAK;CACtC,MAAM,CAAC,OAAO,aAAA,GAAYA,MAAAA,SAAAA,CAAS,EAAE;CACrC,MAAM,CAAC,aAAa,mBAAA,GAAkBA,MAAAA,SAAAA,CAAsB,IAAI;CAChE,MAAM,CAAC,oBAAoB,0BAAA,GAAyBA,MAAAA,SAAAA,CAAS,KAAK;CAClE,MAAM,gBAAgBC,0CAAAA,mBAAmB,IAAI,OAAO;CAGpD,MAAM,EAAE,OAAO,UAAU,eAAe,gBAAgB;CACxD,MAAM,OAAa,CAAC,QAAQ,UAAU,CAAC,MAAM,aAAa,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,kBAAAA,UAAA,EAAA,UAAG,MAAQ,CAAA;AACpB;AAUA,IAAM,qBAAqB,SAAwB,iBAAA,GAAA,kBAAA,IAAA,CAACD,wBAAAA,eAAD,EAAqB,KAAO,CAAA;AAE/E,UAAU,QAAQ;AAClB,UAAU,OAAOA,wBAAAA;AACjB,UAAU,eAAe;AACzB,UAAU,QAAQ;AAClB,UAAU,YAAYE,8BAAAA;;;ACxKtB,IAAa,2BAAgD;CAC3D;EAAE,IAAI;EAAM,OAAO;EAAM,UAAU;CAAK;CACxC;EAAE,IAAI;EAAU,OAAO;CAAS;CAChC;EAAE,IAAI;EAAY,OAAO;CAAW;CACpC;EAAE,IAAI;EAAgB,OAAO;CAAmB;CAChD;EAAE,IAAI;EAAe,OAAO;CAAc;CAC1C;EAAE,IAAI;EAAM,OAAO;CAAI;CACvB;EAAE,IAAI;EAAM,OAAO;CAAI;CACvB;EAAE,IAAI;EAAO,OAAO;CAAK;CACzB;EAAE,IAAI;EAAO,OAAO;CAAK;CACzB;EAAE,IAAI;EAAY,OAAO;EAAY,OAAO;CAAO;CACnD;EAAE,IAAI;EAAgB,OAAO;EAAgB,OAAO;CAAO;CAC3D;EAAE,IAAI;EAAM,OAAO;EAAM,OAAO;CAAO;AACzC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"FilterBar-PhVKghDp.js","names":["_Fragment","_Fragment"],"sources":["../src/ds/components/FilterBar/filter-bar-input.tsx","../src/ds/components/FilterBar/use-settle-on-leave.ts","../src/ds/components/FilterBar/filter-bar-group-editor.tsx","../src/ds/components/FilterBar/filter-bar-advanced-chip.tsx","../src/ds/components/FilterBar/filter-bar-clear.tsx","../src/ds/components/FilterBar/filter-bar.tsx","../src/ds/components/FilterBar/default-operators.ts"],"sourcesContent":["import type { BaseUIEvent } from '@base-ui/react/types';\nimport { BracesIcon, ListFilterIcon } from 'lucide-react';\nimport { useCallback, useEffect, useMemo, useRef, useState } from 'react';\nimport type { KeyboardEvent } from 'react';\nimport { flushSync } from 'react-dom';\nimport { FILTER_BAR_CONTROL_SIZE, FilterBarFieldLabel, alwaysHighlightProps } from './filter-bar-chip';\nimport { useFilterBarContext } from './filter-bar-context';\nimport { FilterBarOptionLabel, FilterBarOptionList } from './filter-bar-option-list';\nimport { findGroup } from './filter-bar-tree';\nimport { matchesQueryFilter } from './match-query';\nimport type { FilterBarDraft, FilterBarField, FilterBarOperator, FilterBarOption, FilterBarValue } from './types';\nimport { parseFieldValue } from './types';\nimport { useValueStep } from './use-value-step';\nimport { Button } from '@/ds/components/Button/Button';\nimport { ComboboxPrimitive, comboboxStyles } from '@/ds/components/Combobox';\nimport { comboboxTriggerClass } from '@/ds/components/Combobox/combobox-styles';\nimport { Kbd } from '@/ds/components/Kbd/kbd';\nimport { Txt } from '@/ds/components/Txt';\nimport { FLOATING_POSITION_METHOD } from '@/ds/primitives/floating';\nimport { inputFocusBorderWithin, unstyledFormElementStyle } from '@/ds/primitives/form-element';\nimport { MENU_SIDE_OFFSET } from '@/ds/primitives/menu-item';\nimport { passwordManagerOptOutProps } from '@/ds/primitives/password-manager-autofill';\nimport { usePortalContainer } from '@/ds/primitives/portal-container';\nimport { useIsApplePlatform } from '@/hooks/use-keyboard-shortcut-label';\nimport { cn } from '@/lib/utils';\n\ntype Step = 'field' | 'operator' | 'value';\n\ntype Item = FilterBarField | FilterBarOperator | FilterBarOption;\n\nconst getItemLabel = (item: Item) => ('label' in item && item.label ? item.label : 'value' in item ? item.value : '');\n\nconst EMPTY_ITEMS: readonly Item[] = [];\n/** Pinned last entry of the field list that spawns an advanced filter (an `or` group) instead of a filter. */\nconst ADVANCED_FIELD_ID = '__filter-bar-advanced__';\nconst ADVANCED_FIELD: FilterBarField = {\n id: ADVANCED_FIELD_ID,\n label: 'Advanced filter…',\n icon: BracesIcon,\n operators: [],\n};\n\nexport type FilterBarInputProps = {\n placeholder?: string;\n className?: string;\n 'aria-label'?: string;\n /**\n * Group this instance commits into; omit for the bar's own input. Only the instance whose\n * `groupId` matches the provider's `inputTarget` renders, so a single input is ever mounted.\n */\n groupId?: string;\n /** Called when Escape is pressed on an empty query inside a group, after the input hands back to the bar. */\n onLeave?: () => void;\n};\n\n/**\n * Typeahead entry point: type to pick a field, then an operator, then a value.\n * Focus never leaves the input; the popup is driven with the arrow keys.\n */\nexport function FilterBarInput(props: FilterBarInputProps) {\n const ctx = useFilterBarContext();\n if (ctx.inputTarget !== props.groupId) return null;\n return <FilterBarInputImpl {...props} />;\n}\n\nfunction FilterBarInputImpl({\n placeholder = 'Filter',\n className,\n 'aria-label': ariaLabel = 'Add filter',\n groupId,\n onLeave,\n}: FilterBarInputProps) {\n const ctx = useFilterBarContext();\n const container = usePortalContainer();\n const inputRef = useRef<HTMLInputElement | null>(null);\n const anchorRef = useRef<HTMLDivElement>(null);\n const [open, setOpen] = useState(false);\n const [query, setQuery] = useState('');\n const [highlighted, setHighlighted] = useState<Item | null>(null);\n const [emptyForStepChange, setEmptyForStepChange] = useState(false);\n const modEnterLabel = useIsApplePlatform() ? '⌘↵' : 'Ctrl ↵';\n\n // The draft lives in the provider so the chip list can render it; the step follows from it.\n const { draft, setDraft: setDraftState, commitDraft } = ctx;\n const step: Step = !draft ? 'field' : !draft.operatorId ? 'operator' : 'value';\n const field = draft ? ctx.getField(draft.fieldId) : undefined;\n const fieldOperators = useMemo(() => (field ? ctx.getFieldOperators(field) : []), [ctx, field]);\n const operator = draft?.operatorId\n ? (fieldOperators.find(o => o.id === draft.operatorId) ?? ctx.getOperator(draft.operatorId))\n : undefined;\n // The advanced option lives in the bar only; inside a popover, nesting is the editor's `+ Group`.\n const offerAdvanced = ctx.groupsEnabled && groupId === undefined;\n const visibleFields = useMemo(() => {\n const fields = ctx.fields.filter(f => !f.hidden);\n return offerAdvanced ? [...fields, ADVANCED_FIELD] : fields;\n }, [ctx.fields, offerAdvanced]);\n const targetGroup = groupId ? findGroup(ctx.expression, groupId) : undefined;\n\n // A group's input mounts on demand (see `openGroupInput`) and takes focus itself.\n useEffect(() => {\n if (groupId) inputRef.current?.focus();\n }, [groupId]);\n\n // Base UI owns the highlight index and keeps it when the list content changes, so a row\n // reached with ArrowDown would carry over into the step that follows. An empty list committed\n // first drops that index, and `autoHighlight` re-anchors on the first row of the new step.\n const withHighlightReset = useCallback((change: () => void) => {\n flushSync(() => setEmptyForStepChange(true));\n change();\n setEmptyForStepChange(false);\n }, []);\n\n const setDraft = useCallback(\n (next: Omit<FilterBarDraft, 'id' | 'from'> | null) => withHighlightReset(() => setDraftState(next)),\n [withHighlightReset, setDraftState],\n );\n\n const reset = useCallback(() => {\n setDraftState(null);\n setQuery('');\n }, [setDraftState]);\n\n const close = useCallback(() => {\n setOpen(false);\n reset();\n }, [reset]);\n\n const commit = useCallback(\n (fieldId: string, operatorId: string, value: FilterBarValue) => {\n withHighlightReset(() => commitDraft({ fieldId, operatorId }, value));\n setQuery('');\n inputRef.current?.focus();\n },\n [withHighlightReset, commitDraft],\n );\n\n const selectOperator = useCallback(\n (fieldId: string, next: FilterBarOperator) => {\n if (next.arity === 'none') {\n commit(fieldId, next.id, '');\n return;\n }\n setDraft({ fieldId, operatorId: next.id });\n setQuery('');\n },\n [commit, setDraft],\n );\n\n const selectField = useCallback(\n (next: FilterBarField) => {\n if (next.id === ADVANCED_FIELD_ID) {\n // `or` is the useful default: an `and` group is indistinguishable from the root.\n const id = ctx.addGroup(undefined, 'or');\n ctx.setOpenGroup(id);\n ctx.openGroupInput(id);\n setQuery('');\n setOpen(false);\n return;\n }\n const [only, ...rest] = ctx.getFieldOperators(next);\n // Free-text entry with text already typed: that text is the value, so neither the\n // operator nor the value step has anything left to ask.\n if (next.search && only && query.trim() !== '') {\n commit(next.id, only.id, parseFieldValue(next.type, query));\n return;\n }\n // A single allowed operator is implied: skip straight to the value step.\n if (only && rest.length === 0) {\n selectOperator(next.id, only);\n return;\n }\n setDraft({ fieldId: next.id });\n setQuery('');\n },\n [ctx, commit, query, selectOperator, setDraft],\n );\n\n const valueStep = useValueStep({\n field,\n operator,\n query,\n enabled: open && step === 'value',\n setQuery,\n onCommit: value => {\n if (draft?.operatorId) commit(draft.fieldId, draft.operatorId, value);\n },\n });\n\n // Leaving a group's input hands the target back to the bar; empty groups are pruned when the\n // popover closes, never here.\n const leaveGroup = useCallback(() => {\n if (!groupId) return false;\n ctx.openGroupInput(undefined);\n onLeave?.();\n return true;\n }, [ctx, groupId, onLeave]);\n\n const stepBack = useCallback(() => {\n if (step === 'value' && draft) {\n // Back to the field step when the operator was implied (single operator).\n const skipOperator = field ? fieldOperators.length === 1 : false;\n setDraft(skipOperator ? null : { fieldId: draft.fieldId });\n } else if (step === 'operator') setDraft(null);\n else if (!leaveGroup()) setOpen(false);\n setQuery('');\n }, [step, draft, field, fieldOperators, setDraft, leaveGroup]);\n\n // Selection is routed per step and never kept by Base UI (`value` stays null).\n const handleSelect = (item: Item) => {\n if (step === 'field') selectField(item as FilterBarField);\n else if (step === 'operator' && draft) selectOperator(draft.fieldId, item as FilterBarOperator);\n else valueStep.handleSelect(item as FilterBarOption);\n };\n\n // App-level keys run before Base UI's own input handling.\n const handleKeyDown = (event: BaseUIEvent<KeyboardEvent<HTMLInputElement>>) => {\n if (event.key === 'Escape') {\n event.preventDefault();\n // Consumed here: an enclosing popover (advanced filter) must not close on it.\n event.stopPropagation();\n event.preventBaseUIHandler();\n stepBack();\n return;\n }\n if (!open && (event.key === 'ArrowDown' || event.key === 'Enter')) {\n event.preventDefault();\n event.preventBaseUIHandler();\n setOpen(true);\n return;\n }\n if (query === '') {\n if (event.key === 'Backspace') {\n event.preventDefault();\n event.preventBaseUIHandler();\n if (step !== 'field') stepBack();\n else if (targetGroup) {\n // Inside a group: eat its last chip, or drop the group once it is empty.\n const last = targetGroup.nodes.findLast(node => !ctx.leaving.has(node.id));\n if (last) ctx.removeItem(last.id);\n else leaveGroup();\n } else {\n // Chips still animating out are already gone from the value: skip them.\n const last = ctx.items.findLast(item => !ctx.leaving.has(item.id));\n if (last) ctx.removeItem(last.id);\n }\n return;\n }\n if (event.key === 'ArrowLeft' && step === 'field') {\n if (ctx.focusChip(ctx.items.length - 1, -1, 'remove')) event.preventDefault();\n return;\n }\n }\n if (!open) return;\n\n if (event.key === 'Tab' && highlighted && step !== 'value' && (step === 'operator' || query !== '')) {\n event.preventDefault();\n event.preventBaseUIHandler();\n handleSelect(highlighted);\n return;\n }\n if (step === 'value') {\n const highlightedOption = valueStep.hasSuggestions ? (highlighted as FilterBarOption | null) : null;\n const handled = valueStep.handleKeyDown(event, highlightedOption);\n // Base UI closes on Enter when nothing is highlighted (form submission); the draft must stay open.\n if (handled || (event.key === 'Enter' && highlightedOption === null)) event.preventBaseUIHandler();\n }\n };\n\n const optionsForStep: Record<Step, readonly Item[]> = {\n field: visibleFields,\n operator: fieldOperators,\n value: valueStep.options,\n };\n const items: readonly Item[] = emptyForStepChange ? EMPTY_ITEMS : optionsForStep[step];\n\n // A search field is the way out for text that names no field, so it survives the field\n // step's own filtering whatever was typed; every other item matches on its label.\n const filterItem = useCallback(\n (item: Item, text: string, itemToString?: (item: Item) => string) =>\n ('search' in item && item.search === true) || matchesQueryFilter(item, text, itemToString),\n [],\n );\n\n const inputPlaceholder =\n step === 'field'\n ? placeholder\n : step === 'operator'\n ? 'Operator'\n : valueStep.hasSuggestions && valueStep.allowFreeText\n ? 'Search or type a value'\n : field?.type === 'number'\n ? 'Number'\n : 'Value';\n\n return (\n <>\n <ComboboxPrimitive.Root<Item>\n items={items}\n itemToStringLabel={getItemLabel}\n // The value step is already filtered (locally or server-side) by useValueSuggestions.\n filter={step === 'value' ? null : filterItem}\n value={null}\n onValueChange={(item, details) => {\n // Never let Base UI keep the selection, fill the input or close: each step routes it.\n details.cancel();\n if (item) handleSelect(item);\n }}\n inputValue={query}\n onInputValueChange={(next, details) => {\n if (details.reason !== 'input-change') return;\n setQuery(next);\n if (!open) setOpen(true);\n }}\n onItemHighlighted={item => setHighlighted(item ?? null)}\n open={open}\n onOpenChange={(next, details) => {\n // Escape is handled by the input (it steps back rather than closing).\n if (!next && details.reason === 'escape-key') return;\n // The input is the anchor, not a trigger: clicking it must keep the draft open.\n if (\n !next &&\n details.reason === 'outside-press' &&\n details.event.target instanceof Node &&\n inputRef.current?.contains(details.event.target)\n ) {\n return;\n }\n if (next) setOpen(true);\n else close();\n }}\n {...alwaysHighlightProps}\n modal={false}\n >\n <div\n ref={anchorRef}\n data-slot=\"filter-bar-input-trigger\"\n className={cn(\n // Same trigger recipe as every other DS Combobox (fill, radius, `[&>svg]` icon sizing\n // and the Button icon offset); the bar itself has no chrome. Focus lives on the\n // nested input, so the recipe's `focus-visible` border becomes `focus-within`.\n comboboxTriggerClass({ variant: 'default', size: FILTER_BAR_CONTROL_SIZE }),\n 'w-auto cursor-text',\n groupId === undefined && 'max-w-80 grow basis-32',\n 'focus-within:bg-fill-hover',\n inputFocusBorderWithin,\n step === 'field' ? 'min-w-32' : 'min-w-24',\n className,\n )}\n >\n <ListFilterIcon aria-hidden className=\"shrink-0\" />\n <ComboboxPrimitive.Input\n ref={el => {\n inputRef.current = el;\n ctx.registerInput(el);\n }}\n aria-label={ariaLabel}\n spellCheck={false}\n {...passwordManagerOptOutProps}\n data-slot=\"filter-bar-input\"\n data-step={step}\n data-target={targetGroup?.id}\n inputMode={step === 'value' && field?.type === 'number' ? 'decimal' : undefined}\n placeholder={inputPlaceholder}\n className={cn(\n unstyledFormElementStyle,\n 'min-w-0 flex-1 bg-transparent zoom-safe-text',\n 'placeholder:text-muted-foreground placeholder:transition-opacity placeholder:duration-normal focus:placeholder:opacity-70',\n )}\n onFocus={() => setOpen(true)}\n onKeyDown={handleKeyDown}\n />\n </div>\n <ComboboxPrimitive.Portal container={container}>\n <ComboboxPrimitive.Positioner\n // Base UI anchors to the input, which starts after the filter icon; align with the pill instead.\n anchor={anchorRef}\n align=\"start\"\n sideOffset={MENU_SIDE_OFFSET}\n positionMethod={FLOATING_POSITION_METHOD}\n className={comboboxStyles.positioner}\n >\n <ComboboxPrimitive.Popup // Match the pill, with the DS Combobox's 11rem floor (replaces the menu's anchor-width minimum).\n className={cn(comboboxStyles.popup, 'w-(--anchor-width) min-w-44')}\n data-slot=\"filter-bar-editor\"\n >\n {step === 'field' && (\n <FilterBarOptionList<FilterBarField>\n aria-label=\"Fields\"\n getKey={f => f.id}\n renderOption={f => (\n <>\n <FilterBarFieldLabel field={f} />\n {f.search && query !== '' && (\n <span className=\"min-w-0 truncate text-muted-foreground\">\n {ctx.getFieldOperators(f)[0]?.label} \"{query}\"\n </span>\n )}\n </>\n )}\n emptyText=\"No matching field.\"\n />\n )}\n {step === 'operator' && (\n <FilterBarOptionList<FilterBarOperator>\n aria-label=\"Operators\"\n getKey={o => o.id}\n renderOption={o => o.label}\n emptyText=\"No matching operator.\"\n />\n )}\n {step === 'value' && valueStep.hasOptions && (\n <FilterBarOptionList<FilterBarOption>\n aria-label=\"Values\"\n aria-multiselectable={valueStep.isMany || undefined}\n getKey={o => o.value}\n renderOption={option => <FilterBarOptionLabel option={option} />}\n isSelected={o => valueStep.isMany && valueStep.selected.includes(o.value)}\n isLoading={valueStep.isLoading}\n error={valueStep.error}\n emptyText={\n valueStep.allowFreeText ? 'No suggestions. Press Enter to use your text.' : 'No matching value.'\n }\n />\n )}\n {step === 'value' && !valueStep.hasSuggestions && (\n <div className=\"flex items-center justify-between gap-2 py-1 pr-1 pl-[.9em]\">\n <Txt variant=\"caption\" tone=\"muted\">\n Type a value\n </Txt>\n <Button\n size=\"sm\"\n variant=\"default\"\n disabled={!valueStep.canCommitQuery}\n onMouseDown={e => e.preventDefault()}\n onClick={() => valueStep.submitFreeText()}\n >\n Apply\n <Kbd size=\"xs\">↵</Kbd>\n </Button>\n </div>\n )}\n {step === 'value' && valueStep.isMany && (\n <div className=\"flex items-center justify-end gap-1 border-t border-border p-1\">\n <Button\n size=\"sm\"\n variant=\"default\"\n onMouseDown={e => e.preventDefault()}\n onClick={() => valueStep.commitDone()}\n >\n Done\n <Kbd size=\"xs\">{modEnterLabel}</Kbd>\n </Button>\n </div>\n )}\n </ComboboxPrimitive.Popup>\n </ComboboxPrimitive.Positioner>\n </ComboboxPrimitive.Portal>\n </ComboboxPrimitive.Root>\n </>\n );\n}\n","import { useEffect } from 'react';\nimport { useFilterBarContext } from './filter-bar-context';\n\n/** Keeps a leaving node in the DOM until its exit animation has played, then releases it. */\nexport function useSettleOnLeave(id: string, leaving: boolean, rootRef: React.RefObject<HTMLElement | null>) {\n const { settleRemove } = useFilterBarContext();\n useEffect(() => {\n const root = rootRef.current;\n if (!leaving || !root) return;\n const animations = typeof root.getAnimations === 'function' ? root.getAnimations({ subtree: true }) : [];\n if (animations.length === 0) {\n settleRemove(id);\n return;\n }\n let cancelled = false;\n Promise.all(animations.map(animation => animation.finished))\n .then(() => {\n if (!cancelled) settleRemove(id);\n })\n .catch(() => {});\n return () => {\n cancelled = true;\n };\n }, [leaving, id, settleRemove, rootRef]);\n}\n","import { FolderIcon, FolderPlusIcon, PlusIcon, Trash2Icon } from 'lucide-react';\nimport { Fragment, useEffect, useRef } from 'react';\nimport type { ReactNode } from 'react';\nimport { FilterBarChip } from './filter-bar-chip';\nimport { useFilterBarContext } from './filter-bar-context';\nimport { FilterBarInput } from './filter-bar-input';\nimport { countLeaves } from './filter-bar-tree';\nimport type { FilterBarGroup, FilterBarLogic } from './types';\nimport { isFilterBarGroup } from './types';\nimport { useSettleOnLeave } from './use-settle-on-leave';\nimport { Button } from '@/ds/components/Button/Button';\nimport { Txt } from '@/ds/components/Txt';\nimport { cn } from '@/lib/utils';\n\nconst connectorClass =\n 'flex h-control-sm w-14 shrink-0 items-center justify-center rounded-md text-column tracking-wide text-muted-foreground uppercase';\n\nexport type FilterBarLogicToggleProps = {\n groupId: string;\n logic: FilterBarLogic;\n className?: string;\n};\n\n/** `and` / `or` connector in front of a row; every connector of a group shares its logic. */\nexport function FilterBarLogicToggle({ groupId, logic, className }: FilterBarLogicToggleProps) {\n const ctx = useFilterBarContext();\n const next: FilterBarLogic = logic === 'and' ? 'or' : 'and';\n return (\n <button\n type=\"button\"\n data-slot=\"filter-bar-logic\"\n data-logic={logic}\n aria-label={`Joined with ${logic}, switch to ${next}`}\n title={`Switch to ${next}`}\n className={cn(\n connectorClass,\n 'filter-bar-logic cursor-pointer border border-border bg-fill-subtle outline-none',\n 'hover:bg-fill-hover hover:text-foreground focus-visible:bg-fill-hover focus-visible:text-foreground',\n className,\n )}\n onClick={() => ctx.setLogic(groupId, next)}\n >\n {logic}\n </button>\n );\n}\n\n/** Segmented `and | or` control shown in a nested group's header. */\nfunction FilterBarLogicSwitch({ groupId, logic }: { groupId: string; logic: FilterBarLogic }) {\n const ctx = useFilterBarContext();\n return (\n <div\n role=\"radiogroup\"\n aria-label=\"Group logic\"\n className=\"flex h-control-sm items-center gap-0.5 rounded-md border border-border bg-fill-subtle p-0.5\"\n >\n {(['and', 'or'] as const).map(value => (\n <button\n key={value}\n type=\"button\"\n role=\"radio\"\n aria-checked={logic === value}\n aria-label={`Join with ${value}`}\n className={cn(\n 'h-full cursor-pointer rounded-sm px-1.5 text-column tracking-wide uppercase outline-none',\n 'focus-visible:bg-fill-hover',\n logic === value ? 'bg-fill-hover text-foreground' : 'text-muted-foreground hover:text-foreground',\n )}\n onClick={() => logic !== value && ctx.setLogic(groupId, value)}\n >\n {value}\n </button>\n ))}\n </div>\n );\n}\n\nexport type FilterBarGroupEditorProps = {\n group: FilterBarGroup;\n /** Nesting level of `group` (root-level group = 1). */\n depth: number;\n /** Drops this group; rendered as a trailing `Clear all` in the footer. */\n onRemove?: () => void;\n removeLabel?: string;\n className?: string;\n};\n\n/**\n * Recursive rule builder shown in an advanced-filter popover. Rows are laid out as\n * `connector | condition`: the first row reads `where`, the following ones carry the\n * group's `and` / `or` toggle. Nested groups render as bordered cards with their own\n * header (logic switch + remove) and footer. The shared typeahead input renders as the\n * last row of the group it is pointed at.\n */\nexport function FilterBarGroupEditor({\n group,\n depth,\n onRemove,\n removeLabel = 'Remove group',\n className,\n}: FilterBarGroupEditorProps) {\n const ctx = useFilterBarContext();\n const addFilterRef = useRef<HTMLButtonElement>(null);\n const focusAddFilter = useRef(false);\n const targeted = ctx.inputTarget === group.id;\n const canNest = depth < ctx.maxDepth;\n\n // `+ Condition` is hidden while the input is open; focus it once it remounts.\n useEffect(() => {\n if (targeted || !focusAddFilter.current) return;\n focusAddFilter.current = false;\n addFilterRef.current?.focus();\n }, [targeted]);\n\n const rows: ReactNode[] = [];\n const connector = (key: string) =>\n rows.length === 0 ? (\n <span key={`${key}:where`} className={connectorClass}>\n where\n </span>\n ) : (\n <FilterBarLogicToggle key={`${key}:logic`} groupId={group.id} logic={group.logic} />\n );\n for (const node of group.nodes) {\n rows.push(\n <Fragment key={node.id}>\n {connector(node.id)}\n {isFilterBarGroup(node) ? (\n <NestedGroupCard group={node} depth={depth + 1} />\n ) : (\n <FilterBarChip item={node} className=\"w-fit\" />\n )}\n </Fragment>,\n );\n }\n if (ctx.draft && ctx.draft.groupId === group.id) {\n const { id, fieldId, operatorId = '' } = ctx.draft;\n rows.push(\n <Fragment key={id}>\n {connector(id)}\n <FilterBarChip draft item={{ id, fieldId, operatorId, value: '' }} className=\"w-fit\" />\n </Fragment>,\n );\n }\n if (targeted) {\n rows.push(\n <Fragment key=\"input\">\n {connector('input')}\n <FilterBarInput\n groupId={group.id}\n placeholder=\"Add condition\"\n onLeave={() => {\n focusAddFilter.current = true;\n }}\n />\n </Fragment>,\n );\n }\n\n return (\n <div\n data-slot=\"filter-bar-group-editor\"\n data-depth={depth}\n role=\"group\"\n aria-label={`Conditions joined with ${group.logic}`}\n className={cn('flex min-w-0 flex-col', className)}\n >\n {rows.length > 0 && (\n <div className=\"grid grid-cols-[auto_minmax(0,1fr)] items-start gap-x-2 gap-y-1.5 p-2\">{rows}</div>\n )}\n <div\n data-slot=\"filter-bar-editor-actions\"\n className={cn('flex w-full items-center gap-1 p-1', rows.length > 0 && 'border-t border-border')}\n >\n {!targeted && (\n <Button\n ref={addFilterRef}\n variant=\"ghost\"\n size=\"sm\"\n icon={<PlusIcon />}\n onClick={() => ctx.openGroupInput(group.id)}\n >\n Condition\n </Button>\n )}\n <Button\n variant=\"ghost\"\n size=\"sm\"\n icon={<FolderPlusIcon />}\n className=\"text-muted-foreground\"\n tooltip={canNest ? undefined : `Groups can nest ${ctx.maxDepth} levels deep`}\n disabled={!canNest}\n onClick={() => ctx.addGroup(group.id, group.logic === 'and' ? 'or' : 'and')}\n >\n Group\n </Button>\n {onRemove && (\n <Button\n variant=\"ghost\"\n size=\"sm\"\n icon={<Trash2Icon />}\n className=\"ml-auto text-muted-foreground\"\n aria-label={removeLabel}\n onClick={onRemove}\n >\n Clear all\n </Button>\n )}\n </div>\n </div>\n );\n}\n\nfunction NestedGroupCard({ group, depth }: { group: FilterBarGroup; depth: number }) {\n const ctx = useFilterBarContext();\n const rootRef = useRef<HTMLDivElement>(null);\n const leaving = ctx.leaving.has(group.id);\n useSettleOnLeave(group.id, leaving, rootRef);\n const count = countLeaves(group);\n\n return (\n <div\n ref={rootRef}\n data-slot=\"filter-bar-editor-nested\"\n data-leaving={leaving || undefined}\n aria-hidden={leaving || undefined}\n className={cn(\n 'filter-bar-editor-nested w-full overflow-hidden rounded-lg border border-border',\n leaving && 'pointer-events-none',\n )}\n >\n <div className=\"flex items-center gap-2 border-b border-border px-2 py-1\">\n <FolderIcon className=\"size-3.5 text-muted-foreground\" />\n <Txt as=\"span\" variant=\"label\" tone=\"ink\">\n Group\n </Txt>\n <Txt as=\"span\" variant=\"label\" tone=\"muted\">\n {count} {count === 1 ? 'condition' : 'conditions'}\n </Txt>\n <div className=\"ml-auto flex items-center gap-1\">\n <FilterBarLogicSwitch groupId={group.id} logic={group.logic} />\n <Button\n variant=\"ghost\"\n size=\"icon-sm\"\n tooltip=\"Remove group\"\n disabled={leaving}\n onClick={() => ctx.removeGroup(group.id)}\n >\n <Trash2Icon />\n </Button>\n </div>\n </div>\n <FilterBarGroupEditor group={group} depth={depth} />\n </div>\n );\n}\n","import { BracesIcon, XIcon } from 'lucide-react';\nimport { useRef, useState } from 'react';\nimport type { KeyboardEvent } from 'react';\nimport { chipClass, editableSegmentClass, removeSegmentClass } from './filter-bar-chip';\nimport { FILTER_BAR_SCOPE_ATTR, useFilterBarContext } from './filter-bar-context';\nimport { FilterBarGroupEditor } from './filter-bar-group-editor';\nimport { countLeaves } from './filter-bar-tree';\nimport type { FilterBarGroup } from './types';\nimport { useSettleOnLeave } from './use-settle-on-leave';\nimport { Button } from '@/ds/components/Button/Button';\nimport { Popover, PopoverContent, PopoverTrigger } from '@/ds/components/Popover';\nimport { Txt } from '@/ds/components/Txt';\nimport { cn } from '@/lib/utils';\n\nexport type FilterBarAdvancedChipProps = {\n group: FilterBarGroup;\n className?: string;\n};\n\n/**\n * A root-level group rendered as one \"Advanced filter\" chip. Its popover hosts the\n * recursive rule builder; the chip's remove button drops the whole subtree.\n */\nexport function FilterBarAdvancedChip({ group, className }: FilterBarAdvancedChipProps) {\n const ctx = useFilterBarContext();\n const [initial] = useState(() => !ctx.mounted);\n const rootRef = useRef<HTMLDivElement>(null);\n const triggerRef = useRef<HTMLButtonElement>(null);\n const leaving = ctx.leaving.has(group.id);\n const open = ctx.openGroupId === group.id;\n const count = countLeaves(group);\n // Position in the flattened item list: navigation from the chip continues from its first leaf.\n const firstLeafIndex = ctx.items.findIndex(item => isUnder(group, item.id));\n const index = firstLeafIndex === -1 ? ctx.items.length : firstLeafIndex;\n useSettleOnLeave(group.id, leaving, rootRef);\n\n const handleKeyDown = (event: KeyboardEvent<HTMLDivElement>) => {\n if (leaving) return;\n const segments = Array.from(rootRef.current?.querySelectorAll<HTMLElement>('[data-filter-bar-segment]') ?? []);\n const current = segments.findIndex(el => el === event.target);\n if (current === -1) return;\n switch (event.key) {\n case 'ArrowRight': {\n event.preventDefault();\n const next = segments[current + 1];\n if (next) next.focus();\n else if (!ctx.focusChip(index + count, 1, 'field')) ctx.focusInput();\n return;\n }\n case 'ArrowLeft': {\n event.preventDefault();\n const prev = segments[current - 1];\n if (prev) prev.focus();\n else ctx.focusChip(index - 1, -1, 'remove');\n return;\n }\n case 'Delete':\n case 'Backspace':\n event.preventDefault();\n remove();\n break;\n default:\n }\n };\n\n const remove = () => {\n ctx.removeGroup(group.id);\n ctx.focusAfterRemove(index);\n };\n\n return (\n <Popover open={open} onOpenChange={next => ctx.setOpenGroup(next ? group.id : null)}>\n <div\n ref={rootRef}\n role=\"group\"\n aria-label={`Advanced filter, ${count} ${count === 1 ? 'condition' : 'conditions'}`}\n aria-hidden={leaving || undefined}\n data-slot=\"filter-bar-advanced\"\n data-initial={initial || undefined}\n data-leaving={leaving || undefined}\n className={cn('filter-bar-advanced', chipClass, leaving && 'pointer-events-none', className)}\n onKeyDown={handleKeyDown}\n >\n <PopoverTrigger\n ref={el => {\n triggerRef.current = el;\n ctx.registerSegment(group.id, 'field', leaving ? null : el);\n }}\n render={<button type=\"button\" />}\n data-filter-bar-segment=\"field\"\n className={editableSegmentClass}\n title=\"Edit advanced filter\"\n >\n <BracesIcon aria-hidden />\n <span className=\"truncate\">Advanced filter</span>\n {count > 0 && (\n <Txt as=\"span\" variant=\"column\" tone=\"muted\" aria-hidden>\n {count}\n </Txt>\n )}\n </PopoverTrigger>\n {leaving ? (\n <span aria-hidden className={removeSegmentClass}>\n <XIcon />\n </span>\n ) : (\n <button\n type=\"button\"\n ref={el => ctx.registerSegment(group.id, 'remove', el)}\n data-filter-bar-segment=\"remove\"\n aria-label=\"Remove advanced filter\"\n title=\"Remove advanced filter\"\n className={removeSegmentClass}\n onClick={remove}\n >\n <XIcon />\n </button>\n )}\n </div>\n <PopoverContent\n align=\"start\"\n className=\"w-[min(92vw,44rem)] p-0\"\n {...{ [FILTER_BAR_SCOPE_ATTR]: 'advanced' }}\n finalFocus={triggerRef}\n >\n <div className=\"flex items-center gap-2 border-b border-border px-3 py-2\">\n <BracesIcon className=\"size-3.5 text-muted-foreground\" />\n <Txt as=\"span\" variant=\"label\" tone=\"ink\">\n Advanced filter\n </Txt>\n <Txt as=\"span\" variant=\"column\" tone=\"muted\" className=\"rounded-md bg-fill-subtle px-1.5\">\n {count}\n </Txt>\n <Button\n variant=\"ghost\"\n size=\"icon-sm\"\n className=\"ml-auto\"\n tooltip=\"Close\"\n onClick={() => ctx.setOpenGroup(null)}\n >\n <XIcon />\n </Button>\n </div>\n <FilterBarGroupEditor\n group={group}\n depth={1}\n removeLabel=\"Remove advanced filter\"\n onRemove={() => {\n ctx.setOpenGroup(null);\n remove();\n }}\n />\n </PopoverContent>\n </Popover>\n );\n}\n\nconst isUnder = (group: FilterBarGroup, itemId: string): boolean =>\n group.nodes.some(node => (node.id === itemId ? true : 'kind' in node && isUnder(node, itemId)));\n","import { useFilterBarContext } from './filter-bar-context';\nimport { ClearFiltersButton } from '@/ds/components/ClearFiltersButton/clear-filters-button';\n\n/** Removes every removable filter. Rendered by FilterBar at its trailing edge; hidden while nothing can be removed. */\nexport function FilterBarClear({ label }: { label: string }) {\n const ctx = useFilterBarContext();\n if (!ctx.hasRemovableItems) return null;\n return (\n <ClearFiltersButton\n label={label}\n onClick={event => {\n event.stopPropagation();\n ctx.clear();\n ctx.focusInput();\n }}\n />\n );\n}\n","import { Fragment } from 'react';\nimport type { ReactNode } from 'react';\nimport { FilterBarAdvancedChip } from './filter-bar-advanced-chip';\nimport { FilterBarChip } from './filter-bar-chip';\nimport { FilterBarClear } from './filter-bar-clear';\nimport { FILTER_BAR_SCOPE_ATTR, FilterBarProvider, useFilterBarContext } from './filter-bar-context';\nimport { FilterBarInput } from './filter-bar-input';\nimport { FilterBarTimeRange } from './filter-bar-time-range';\nimport { isFilterBarGroup } from './types';\nimport type { FilterBarExpression, FilterBarField, FilterBarItem, FilterBarOperator } from './types';\nimport { VisuallyHidden } from '@/ds/primitives/visually-hidden';\nimport { cn } from '@/lib/utils';\n\ntype FilterBarValueProps =\n | {\n /** Flat list of filters, implicitly joined with `and`. Advanced filters are never offered. */\n value: FilterBarItem[];\n onValueChange: (items: FilterBarItem[]) => void;\n }\n | {\n /**\n * Tree of filters and groups. Root nodes are joined with `and`; each root group renders\n * as one \"Advanced filter\" chip whose popover edits the nested `and` / `or` logic.\n */\n value: FilterBarExpression;\n onValueChange: (expression: FilterBarExpression) => void;\n };\n\nexport type FilterBarProps = FilterBarValueProps & {\n fields: FilterBarField[];\n operators: FilterBarOperator[];\n /**\n * Id given to a newly added item. Defaults to a random id. Consumers that rebuild `value` from\n * their own store (URL, query params…) should return the id they will rebuild it with, so the\n * draft chip and the committed chip are the same element.\n */\n createItemId?: (fieldId: string) => string;\n /** How deep advanced-filter groups may nest (root-level group = 1). Defaults to 3. */\n maxDepth?: number;\n 'aria-label'?: string;\n /**\n * Text shown in a value list when the field's `suggestions` resolver rejects, for example\n * to explain a server limit. Return `undefined` to keep the default \"Couldn't load values.\".\n */\n describeSuggestionsError?: (error: unknown) => string | undefined;\n /** Accessible label of the trailing \"remove every filter\" button. */\n clearLabel?: string;\n className?: string;\n children: ReactNode;\n};\n\nfunction FilterBarSurface({\n className,\n clearLabel,\n children,\n}: {\n className?: string;\n clearLabel: string;\n children: ReactNode;\n}) {\n const ctx = useFilterBarContext();\n return (\n <div\n role=\"group\"\n aria-label={ctx.ariaLabel}\n data-slot=\"filter-bar\"\n {...{ [FILTER_BAR_SCOPE_ATTR]: 'bar' }}\n className={cn(\n // No chrome of its own: chips and the typeahead input sit directly on the parent surface.\n // Layout: chips, input, then Clear right beside the input — all in one wrapping row so\n // Clear never drifts to the far edge of a wide container.\n 'flex w-full flex-wrap items-center gap-1.5',\n className,\n )}\n >\n {children}\n <span className=\"flex shrink-0 items-center empty:hidden\">\n <FilterBarClear label={clearLabel} />\n </span>\n <VisuallyHidden aria-live=\"polite\">{ctx.announcement}</VisuallyHidden>\n </div>\n );\n}\n\n/**\n * Braintrust-style filter bar: `field → operator → value` filters built from a\n * single typeahead input, rendered as inline editable chips. Domain-agnostic —\n * fields, operators and values are plain strings supplied by the consumer.\n *\n * Pass a `FilterBarExpression` as `value` to enable Linear-style advanced filters:\n * the input offers \"Advanced filter…\", which adds one chip whose popover hosts a\n * recursive rule builder (`and` / `or` connectors, nested groups). The bar itself\n * stays flat. A flat `FilterBarItem[]` stays flat.\n *\n * @example\n * <FilterBar value={items} onValueChange={setItems} fields={fields} operators={DEFAULT_FILTER_OPERATORS}>\n * <FilterBar.Chips />\n * <FilterBar.Input />\n * </FilterBar>\n */\nexport function FilterBar({\n fields,\n operators,\n value,\n onValueChange,\n createItemId,\n maxDepth,\n 'aria-label': ariaLabel = 'Filters',\n describeSuggestionsError,\n clearLabel = 'Clear filters',\n className,\n children,\n}: FilterBarProps) {\n return (\n <FilterBarProvider\n fields={fields}\n operators={operators}\n value={value}\n onValueChange={onValueChange}\n createItemId={createItemId}\n maxDepth={maxDepth}\n ariaLabel={ariaLabel}\n describeSuggestionsError={describeSuggestionsError}\n >\n <FilterBarSurface className={className} clearLabel={clearLabel}>\n {children}\n </FilterBarSurface>\n </FilterBarProvider>\n );\n}\n\n/**\n * Default layout: one editable chip per root item, one \"Advanced filter\" chip per root\n * group, in order, then the chip of the filter being built in the bar's input (which\n * becomes the last item's chip once committed).\n */\nexport function FilterBarChips({ renderChip = defaultRenderChip }: FilterBarChipsProps) {\n const ctx = useFilterBarContext();\n // One keyed array: the draft chip and the item it becomes share a key, so React\n // keeps the element across the commit instead of mounting a new chip.\n const chips: ReactNode[] = [];\n for (const node of ctx.expression.nodes) {\n const chip = isFilterBarGroup(node) ? <FilterBarAdvancedChip group={node} /> : renderChip(node);\n if (chip !== null) chips.push(<Fragment key={node.id}>{chip}</Fragment>);\n }\n if (ctx.draft && !ctx.draft.groupId) {\n // `FilterBarChip` needs a full item; the draft's missing parts are blank until picked.\n const { id, fieldId, operatorId = '' } = ctx.draft;\n chips.push(\n <Fragment key={id}>\n <FilterBarChip draft item={{ id, fieldId, operatorId, value: '' }} />\n </Fragment>,\n );\n }\n return <>{chips}</>;\n}\n\nexport type FilterBarChipsProps = {\n /**\n * Chip for an item; return `null` to render none (e.g. an item only held in the\n * value for scoping). Defaults to a plain editable `FilterBar.Chip`.\n */\n renderChip?: (item: FilterBarItem) => ReactNode;\n};\n\nconst defaultRenderChip = (item: FilterBarItem) => <FilterBarChip item={item} />;\n\nFilterBar.Chips = FilterBarChips;\nFilterBar.Chip = FilterBarChip;\nFilterBar.AdvancedChip = FilterBarAdvancedChip;\nFilterBar.Input = FilterBarInput;\nFilterBar.TimeRange = FilterBarTimeRange;\n","import type { FilterBarOperator } from './types';\n\n/** Opt-in starter set. Pure data: the component attaches no semantics to ids. */\nexport const DEFAULT_FILTER_OPERATORS: FilterBarOperator[] = [\n { id: 'is', label: 'is', widensTo: 'in' },\n { id: 'is-not', label: 'is not' },\n { id: 'contains', label: 'contains' },\n { id: 'not-contains', label: 'does not contain' },\n { id: 'starts-with', label: 'starts with' },\n { id: 'gt', label: '>' },\n { id: 'lt', label: '<' },\n { id: 'gte', label: '>=' },\n { id: 'lte', label: '<=' },\n { id: 'is-empty', label: 'is empty', arity: 'none' },\n { id: 'is-not-empty', label: 'is not empty', arity: 'none' },\n { id: 'in', label: 'in', arity: 'many' },\n];\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AA8BA,IAAM,gBAAgB,SAAgB,WAAW,QAAQ,KAAK,QAAQ,KAAK,QAAQ,WAAW,OAAO,KAAK,QAAQ;AAElH,IAAM,cAA+B,CAAC;;AAEtC,IAAM,oBAAoB;AAC1B,IAAM,iBAAiC;CACrC,IAAI;CACJ,OAAO;CACP,MAAM;CACN,WAAW,CAAC;AACd;;;;;AAmBA,SAAgB,eAAe,OAA4B;CAEzD,IADY,oBACR,CAAA,CAAI,gBAAgB,MAAM,SAAS,OAAO;CAC9C,OAAO,oBAAC,oBAAD,EAAoB,GAAI,MAAQ,CAAA;AACzC;AAEA,SAAS,mBAAmB,EAC1B,cAAc,UACd,WACA,cAAc,YAAY,cAC1B,SACA,WACsB;CACtB,MAAM,MAAM,oBAAoB;CAChC,MAAM,YAAY,mBAAmB;CACrC,MAAM,WAAW,OAAgC,IAAI;CACrD,MAAM,YAAY,OAA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AAY,OAAO;EAAY,OAAO;CAAO;CACnD;EAAE,IAAI;EAAgB,OAAO;EAAgB,OAAO;CAAO;CAC3D;EAAE,IAAI;EAAM,OAAO;EAAM,OAAO;CAAO;AACzC"}
@@ -1,3 +0,0 @@
1
- Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_list_search = require("../list-search-yF02rvZt.cjs");
3
- exports.ListSearch = require_list_search.ListSearch;
@@ -1 +0,0 @@
1
- export * from '../src/ds/components/ListSearch/index';
@@ -1 +0,0 @@
1
- export { t as ListSearch } from "../list-search-DUcIMJTk.js";
@@ -1 +0,0 @@
1
- {"version":3,"file":"data-list-1JOwQrF5.cjs","names":["focusRingInset","cn","Children","isValidElement","cloneElement","getShortId","Checkbox","formatDate","formatTimestampPrecise","forwardRef","cn","cn","cn","Txt","Button","ArrowLeftIcon","ArrowRightIcon","z","createContext","useContext","raisedSurfaceStyle","useLocalStorageState","useMemo","useId","cn","ScrollAreaPrimitive","ScrollArea","ScrollAreaViewport","createContext","useContext","forwardRef","cn","forwardRef","cn","forwardRef","cn","forwardRef","cn","forwardRef","useState","cn","Tooltip","TooltipTrigger","TooltipContent","_Fragment","Checkbox","ArrowUp","ArrowDown","ArrowUpDown","cn","Button","forwardRef","cn","Txt","cn","forwardRef","cn"],"sources":["../src/ds/components/DataList/shared.ts","../src/ds/components/DataList/data-list-cells.tsx","../src/ds/components/DataList/data-list-group.tsx","../src/ds/components/DataList/data-list-next-page-loading.tsx","../src/ds/components/DataList/data-list-no-match.tsx","../src/ds/components/DataList/data-list-pagination.tsx","../src/ds/components/DataList/data-list-column-order.ts","../src/ds/components/DataList/data-list-reorder-context.ts","../src/ds/components/DataList/data-list-root.tsx","../src/ds/components/DataList/data-list-row-wrapper-context.ts","../src/ds/components/DataList/data-list-row-button.tsx","../src/ds/components/DataList/data-list-row-link.tsx","../src/ds/components/DataList/data-list-row-static.tsx","../src/ds/components/DataList/data-list-row-wrapper.tsx","../src/ds/components/DataList/data-list-top-cell.tsx","../src/ds/components/DataList/data-list-sortable-top-cell.tsx","../src/ds/components/DataList/data-list-spacer.tsx","../src/ds/components/DataList/data-list-subheader.tsx","../src/ds/components/DataList/data-list-subheading.tsx","../src/ds/components/DataList/data-list-top.tsx","../src/ds/components/DataList/data-list-top-cells.tsx","../src/ds/components/DataList/data-list.tsx"],"sourcesContent":["import { focusRingInset } from '@/ds/primitives/transitions';\n\n/**\n * Row-level styling for the element that participates in the row sibling\n * chain — applied to `DataList.RowButton` / `DataList.RowLink` when used\n * standalone, and to `DataList.RowWrapper` when used as a shell around them.\n *\n * Carries the `.data-list-row` marker class the root styles target.\n */\nexport const dataListRowOuterStyles = [\n 'group/data-list-row data-list-row col-span-full relative min-h-9',\n // The row surface is a `before` pseudo at `-z-2`, under the hover layer\n // (`after`, `-z-1`) and the row content. The row element itself stays\n // transparent so tones (error, info) tint on top of both.\n \"before:absolute before:inset-0 before:-z-2 before:rounded-[inherit] before:bg-background before:content-['']\",\n] as const;\n\n/**\n * Interactive state fills for the outer row element. Applied to standalone\n * `RowButton` / `RowLink` and to `RowWrapper`. The `has-*` forms let a wrapper\n * mirror the tone of the interactive row nested inside it.\n *\n * Hover lights an `after` layer between the row surface and its content, and\n * switches instantly. Rows are sunken wells (`--background`) inside\n * the card panel, whose material also shows through the 1px gaps between them,\n * so a resting tone steps to `--surface-panel` — the opaque twin of a `--fill`\n * rung over the well — rather than to `--card`, which would make a selected row\n * the exact colour of the separators around it. Pressed rises a full `--fill`\n * rung, the same rung a resting control carries, and error sits on the row\n * element itself so it reads on top of the hover layer.\n */\nexport const dataListRowStateStyles = [\n // `data-list-row-interactive` lets the root light a hovered row's opaque sticky cell.\n \"data-list-row-interactive after:pointer-events-none after:absolute after:inset-0 after:-z-1 after:rounded-[inherit] after:content-['']\",\n 'not-disabled:hover:after:bg-fill-subtle',\n 'active:bg-fill',\n 'focus-visible:bg-surface-panel has-focus-visible:bg-surface-panel',\n 'data-featured:before:bg-surface-panel has-data-featured:before:bg-surface-panel has-data-selected:before:bg-surface-panel',\n 'data-[variant=error]:bg-destructive-subtle has-data-[variant=error]:bg-destructive-subtle data-[variant=error]:active:bg-destructive-subtle-active has-data-[variant=error]:active:bg-destructive-subtle-active',\n // Info is a faint translucent tint on the row element, so the surface below it (resting or selected) and the\n // hover layer still read through.\n 'data-[variant=info]:bg-info-subtle/50 has-data-[variant=info]:bg-info-subtle/50',\n] as const;\n\n/**\n * Layout and focus for the interactive element. The background lives on the\n * outer row element so it sits inside the root surface.\n */\nexport const dataListRowInteractiveStyles = [\n 'grid grid-cols-subgrid gap-4 px-3 cursor-pointer',\n focusRingInset,\n] as const;\n\nexport const dataListRowStyles = [\n ...dataListRowInteractiveStyles,\n ...dataListRowOuterStyles,\n ...dataListRowStateStyles,\n] as const;\n\nexport const dataListRowStaticStyles = ['grid grid-cols-subgrid gap-4 px-3', ...dataListRowOuterStyles] as const;\n\n/**\n * Row actions that stay out of the way until the row is hovered or focused.\n * Opacity, not display, so the column keeps its width and nothing shifts. A\n * coarse pointer never hovers, so there they stay visible — hidden controls\n * that still take taps would be worse than no reveal at all.\n */\nexport const dataListRowActionRevealStyles =\n 'opacity-0 pointer-coarse:opacity-100 group-focus-within/data-list-row:opacity-100 group-hover/data-list-row:opacity-100';\n\nexport type DataListSticky = 'start';\n\nexport const dataListStickyStartStyles = [\n 'data-list-sticky-start sticky left-0 z-10 isolate self-stretch overflow-visible',\n] as const;\n\n/** Tone for a single row. Exposed as `data-variant`; `error` tints the row red, `info` tints it blue to set it apart. */\nexport type DataListRowVariant = 'default' | 'error' | 'info';\n\n/**\n * Layout/state modifiers shared by interactive row primitives\n * (`DataList.RowButton`, `DataList.RowLink`).\n */\nexport type DataListRowSharedProps = {\n /** Row tone — exposed on the element as `data-variant`. */\n variant?: DataListRowVariant;\n /**\n * Place the row starting at this column line. Defaults to column 1. Use\n * when the row sits beside a leading cell that owns column 1.\n */\n colStart?: number;\n /**\n * Place the row ending at this column line (use negative values to count\n * from the end, e.g. `-2`). Defaults to `-1` (the last line). Use when the\n * row sits beside a trailing cell that owns the last column.\n */\n colEnd?: number;\n /**\n * Mark the row as featured (e.g. the row whose detail is open in a side\n * panel). Exposed on the element as `data-featured` and tints the row.\n */\n featured?: boolean;\n};\n\n/** Split a grid-template-columns string on top-level whitespace only, so `minmax(0, 10rem)` stays one track. */\nexport function splitColumns(columns: string): string[] {\n const parts: string[] = [];\n let depth = 0;\n let current = '';\n for (const char of columns) {\n if (char === '(') depth++;\n if (char === ')') depth--;\n if (/\\s/.test(char) && depth === 0) {\n if (current) parts.push(current);\n current = '';\n } else {\n current += char;\n }\n }\n if (current) parts.push(current);\n return parts;\n}\n","import { Children, cloneElement, isValidElement } from 'react';\nimport type { ComponentPropsWithoutRef, ElementType, ReactNode } from 'react';\nimport { dataListRowActionRevealStyles, dataListStickyStartStyles } from './shared';\nimport type { DataListSticky } from './shared';\nimport { Checkbox } from '@/ds/components/Checkbox';\nimport { cn } from '@/lib/utils';\nimport { formatDate, formatTimestampPrecise } from '@/utils/date-format';\nimport type { DatePreset } from '@/utils/date-format';\nimport { getShortId } from '@/utils/id';\n\nexport type DataListCellProps = {\n children?: ReactNode;\n className?: string;\n /**\n * HTML element rendered for the cell. Defaults to `span`. Use `'label'` when\n * the cell wraps a labelable control (e.g. a Checkbox), so the whole cell\n * area acts as the click/hover target.\n */\n as?: ElementType;\n /**\n * Pins the cell to the horizontal start edge of the list while the list\n * scrolls sideways.\n */\n sticky?: DataListSticky;\n} & Omit<ComponentPropsWithoutRef<'div'>, 'children' | 'className'>;\n\nexport function DataListCell({ children, className, as, sticky, ...rest }: DataListCellProps) {\n const Component = as || 'span';\n return (\n <Component\n className={cn(\n 'relative grid max-w-full min-w-0 items-center overflow-hidden text-body-sm whitespace-nowrap text-muted-foreground empty:before:text-placeholder empty:before:content-[\"—\"]',\n sticky === 'start' && dataListStickyStartStyles,\n className,\n )}\n {...rest}\n >\n {children}\n </Component>\n );\n}\n\n/**\n * Trailing cell for row actions, revealed on row hover or keyboard focus.\n * Sits beside a `DataList.RowButton` inside a `DataList.RowWrapper`.\n */\nexport function DataListActionsCell({ children, className, ...rest }: DataListCellProps) {\n return (\n <DataListCell className={className} {...rest}>\n <span\n className={cn(\n 'flex w-full items-center justify-end gap-1 pr-3 transition-opacity duration-200',\n dataListRowActionRevealStyles,\n )}\n >\n {children}\n </span>\n </DataListCell>\n );\n}\n\nconst dataListTruncateContentStyles =\n 'block min-w-0 max-w-full truncate empty:before:content-[\"—\"] empty:before:text-placeholder [&>*]:min-w-0 [&>*]:max-w-full [&>*]:overflow-hidden [&>*]:text-ellipsis [&>*]:whitespace-nowrap';\nconst dataListInlineTextTruncateStyles = 'min-w-0 flex-1 truncate';\n\nfunction DataListInlineText({ children }: { children: string | number }) {\n return <span className={dataListInlineTextTruncateStyles}>{children}</span>;\n}\n\nfunction DataListTruncatedTextNodes({ children }: { children: ReactNode }) {\n return Children.map(children, child => {\n if (typeof child === 'string' || typeof child === 'number') {\n return <DataListInlineText>{child}</DataListInlineText>;\n }\n\n return child;\n });\n}\n\nfunction DataListTruncatedCellContent({ children }: { children: ReactNode }) {\n return Children.map(children, child => {\n if (!isValidElement<{ children?: ReactNode; className?: string }>(child) || typeof child.type !== 'string') {\n return child;\n }\n\n return cloneElement(child, {\n className: cn('max-w-full min-w-0 overflow-hidden', child.props.className),\n children: <DataListTruncatedTextNodes>{child.props.children}</DataListTruncatedTextNodes>,\n });\n });\n}\n\nexport type DataListTextCellProps = DataListCellProps & {\n /**\n * Typeface for the cell text. `mono` is for genuine code — paths, env values,\n * serialized JSON — and drops a size step to match the sans columns optically.\n */\n font?: 'sans' | 'mono';\n};\n\nexport function DataListTextCell({ children, className, font = 'sans', ...rest }: DataListTextCellProps) {\n return (\n <DataListCell className={cn(font === 'mono' && 'font-mono text-body-sm', className)} {...rest}>\n <span className={dataListTruncateContentStyles}>\n <DataListTruncatedCellContent>{children}</DataListTruncatedCellContent>\n </span>\n </DataListCell>\n );\n}\n\nexport function DataListNameCell({ children, className }: DataListCellProps) {\n return (\n <DataListCell className={cn('text-left text-label text-foreground', className)}>\n <span className={dataListTruncateContentStyles}>\n <DataListTruncatedCellContent>{children}</DataListTruncatedCellContent>\n </span>\n </DataListCell>\n );\n}\n\nexport function DataListDescriptionCell({ children, className }: DataListCellProps) {\n return (\n <DataListCell className={cn('text-muted-foreground', className)}>\n <span className={dataListTruncateContentStyles}>\n <DataListTruncatedCellContent>{children}</DataListTruncatedCellContent>\n </span>\n </DataListCell>\n );\n}\n\nexport type DataListRowHeaderCellProps = Omit<DataListCellProps, 'sticky'>;\n\nexport function DataListRowHeaderCell({ children, className, ...rest }: DataListRowHeaderCellProps) {\n return (\n <DataListCell\n sticky=\"start\"\n className={cn(\n 'data-list-row-header -ml-3 w-auto max-w-none px-3 text-left text-label text-foreground',\n className,\n )}\n {...rest}\n >\n <span className={cn(dataListTruncateContentStyles, 'relative z-10 w-full')}>\n <DataListTruncatedCellContent>{children}</DataListTruncatedCellContent>\n </span>\n </DataListCell>\n );\n}\n\nexport type DataListNumberCellProps = DataListCellProps & {\n /**\n * Emphasizes the value with the ink tone and the label role — use for the\n * primary metric in a row (e.g. a total or headline number).\n */\n highlight?: boolean;\n font?: 'sans' | 'mono';\n};\n\n/**\n * Right-aligned numeric cell with tabular figures, for metric and summary\n * tables. Pass `highlight` for the emphasized column.\n */\nexport function DataListNumberCell({\n children,\n className,\n highlight,\n font = 'sans',\n ...rest\n}: DataListNumberCellProps) {\n return (\n <DataListCell\n className={cn(\n 'justify-items-end text-right text-muted-foreground tabular-nums',\n highlight && 'text-label text-foreground',\n font === 'mono' && 'font-mono',\n className,\n )}\n {...rest}\n >\n {children}\n </DataListCell>\n );\n}\n\nexport interface DataListIdCellProps {\n id: string;\n}\n\nexport function DataListIdCell({ id }: DataListIdCellProps) {\n return <DataListCell className=\"tracking-wide text-muted-foreground\">{getShortId(id)}</DataListCell>;\n}\n\nexport interface DataListSelectCellProps {\n checked: boolean;\n /**\n * Called when the checkbox is clicked. Receives the click event's `shiftKey`\n * so callers can implement range-select. The cell stops the click from\n * reaching the host row, so the row's `onClick` doesn't fire.\n */\n onToggle: (shiftKey: boolean) => void;\n /** Disable the checkbox, e.g. while a selection mutation is in flight. */\n disabled?: boolean;\n 'aria-label'?: string;\n}\n\nexport function DataListSelectCell({ checked, onToggle, disabled, ...rest }: DataListSelectCellProps) {\n return (\n <DataListCell\n as=\"label\"\n className={cn(\n 'size-8 justify-items-center self-center overflow-visible px-0',\n disabled ? 'cursor-not-allowed' : 'cursor-pointer',\n )}\n onClick={e => e.stopPropagation()}\n data-selected={checked || undefined}\n >\n <Checkbox\n checked={checked}\n disabled={disabled}\n onCheckedChange={() => {}} // no-op: selection handled by onClick to capture shiftKey\n // The click still has to bubble to the cell above, which is what keeps it\n // off the host row. Base UI withholds this handler while disabled.\n onClick={e => onToggle(e.shiftKey)}\n aria-label={rest['aria-label']}\n />\n </DataListCell>\n );\n}\n\nexport interface DataListDateCellProps {\n timestamp: Date | string;\n}\n\n/** Compact date cell — `Today`, `May 19` or `May 19, 2025`. */\nexport function DataListDateCell({ timestamp }: DataListDateCellProps) {\n return <DataListCell className=\"text-muted-foreground\">{formatDate(timestamp, 'date')}</DataListCell>;\n}\n\nexport interface DataListCreatedCellProps {\n timestamp: Date | string;\n /** Visible format. The hover title always shows the full date and time. */\n preset?: Extract<DatePreset, 'date-time-seconds' | 'day-time-seconds'>;\n}\n\n/** Locale-aware date and time cell with second precision. */\nexport function DataListCreatedCell({ timestamp, preset = 'date-time-seconds' }: DataListCreatedCellProps) {\n return (\n <DataListCell className=\"text-muted-foreground tabular-nums\" title={formatDate(timestamp, 'date-time-seconds')}>\n {formatDate(timestamp, preset)}\n </DataListCell>\n );\n}\n\nexport interface DataListTimeCellProps {\n timestamp: Date | string;\n}\n\nexport function DataListTimeCell({ timestamp }: DataListTimeCellProps) {\n return (\n <DataListCell className=\"flex text-muted-foreground tabular-nums\">\n {formatTimestampPrecise(timestamp, { withDate: false })}\n </DataListCell>\n );\n}\n","import { forwardRef } from 'react';\nimport type { ComponentPropsWithoutRef } from 'react';\nimport { cn } from '@/lib/utils';\n\nexport type DataListGroupProps = ComponentPropsWithoutRef<'section'>;\n\n/** Rows sharing the list's columns. */\nexport const DataListGroup = forwardRef<HTMLElement, DataListGroupProps>(({ className, ...rest }, ref) => {\n return (\n <section\n ref={ref}\n className={cn('col-span-full grid grid-cols-subgrid gap-y-px [&>:not(.data-list-row)]:col-span-full', className)}\n {...rest}\n />\n );\n});\n\nDataListGroup.displayName = 'DataListGroup';\n","import { cn } from '@/lib/utils';\n\nexport type DataListNextPageLoadingProps = {\n isLoading?: boolean;\n hasMore?: boolean;\n setEndOfListElement?: (element: HTMLDivElement | null) => void;\n loadingText?: string;\n};\n\nexport function DataListNextPageLoading({\n isLoading,\n setEndOfListElement,\n hasMore,\n loadingText = 'Loading more data...',\n}: DataListNextPageLoadingProps) {\n if (!setEndOfListElement) {\n return null;\n }\n\n return (\n <div\n ref={setEndOfListElement}\n // Zero-height when idle so it adds no trailing space below the last row;\n // IntersectionObserver still fires for a zero-area target at the viewport edge.\n className={cn('col-span-full -mt-px flex justify-center text-body text-muted-foreground opacity-50', {\n 'py-4': isLoading,\n })}\n >\n {isLoading && loadingText}\n </div>\n );\n}\n","import type { ComponentPropsWithoutRef } from 'react';\nimport { Txt } from '@/ds/components/Txt';\nimport { cn } from '@/lib/utils';\n\nexport type DataListNoMatchProps = ComponentPropsWithoutRef<'div'> & {\n message?: string;\n};\n\nexport function DataListNoMatch({\n message = 'Nothing matches your search',\n className,\n ...props\n}: DataListNoMatchProps) {\n return (\n <div\n className={cn(\n 'col-span-full flex flex-col items-center justify-center gap-2 rounded-lg bg-background py-8 text-muted-foreground',\n className,\n )}\n {...props}\n >\n <Txt>{message}</Txt>\n </div>\n );\n}\n","import { ArrowLeftIcon, ArrowRightIcon } from 'lucide-react';\nimport { Button } from '@/ds/components/Button';\n\nexport type DataListPaginationProps = {\n currentPage?: number;\n hasMore?: boolean;\n onNextPage?: () => void;\n onPrevPage?: () => void;\n};\n\nexport function DataListPagination({ currentPage, hasMore, onNextPage, onPrevPage }: DataListPaginationProps) {\n const showNavigation = (typeof currentPage === 'number' && currentPage > 0) || hasMore;\n\n return (\n <div className=\"col-span-full flex items-center justify-center gap-4 py-3 text-body text-muted-foreground\">\n <span>\n Page <b>{currentPage ? currentPage + 1 : '1'}</b>\n </span>\n {showNavigation && (\n <div className=\"flex gap-4\">\n {typeof currentPage === 'number' && currentPage > 0 && (\n <Button type=\"button\" size=\"sm\" onClick={onPrevPage} icon={<ArrowLeftIcon />}>\n Previous\n </Button>\n )}\n {hasMore && (\n <Button type=\"button\" size=\"sm\" onClick={onNextPage} icon={<ArrowRightIcon />}>\n Next\n </Button>\n )}\n </div>\n )}\n </div>\n );\n}\n","import { z } from 'zod/v4';\nimport { splitColumns } from './shared';\n\nexport const columnOrderSchema = z.array(z.number().int().nonnegative());\n\nexport const getColumnOrderStorageKey = (id: string) => `mastra:data-list:column-order:${id}`;\n\n/** Tracks of a grid template, or `null` when it uses `repeat()` (track count unknown). */\nexport function splitGridTracks(columns: string): string[] | null {\n const tracks = splitColumns(columns);\n return tracks.some(track => track.startsWith('repeat(')) ? null : tracks;\n}\n\nexport const identityOrder = (count: number) => Array.from({ length: count }, (_, i) => i);\n\n/** Returns `stored` when it is a permutation of `0..count-1`, otherwise the identity order. */\nexport function normalizeOrder(stored: number[] | undefined, count: number): number[] {\n if (!stored || stored.length !== count) return identityOrder(count);\n const seen = new Set(stored);\n if (seen.size !== count || stored.some(i => i >= count)) return identityOrder(count);\n return stored;\n}\n\nexport const keyedColumnOrderSchema = z.array(z.string());\n\n/**\n * Maps a stored key order onto the current columns. Stored keys that are not\n * rendered are skipped; columns missing from the stored order (newly added)\n * are inserted at their default position. Returns column indexes in visual order.\n */\nexport function resolveKeyedOrder(stored: string[] | undefined, keys: string[]): number[] {\n const current = new Set(keys);\n const visual = (stored ?? []).filter((key, i, all) => current.has(key) && all.indexOf(key) === i);\n const placed = new Set(visual);\n keys.forEach((key, index) => {\n if (!placed.has(key)) visual.splice(Math.min(index, visual.length), 0, key);\n });\n return visual.map(key => keys.indexOf(key));\n}\n\n/**\n * Moves a visible column and returns the next stored key order. Keys of columns\n * that are not rendered right now are kept at the end so they are not forgotten.\n */\nexport function moveKeyedOrder(stored: string[] | undefined, keys: string[], from: number, to: number): string[] {\n const visual = moveIndex(resolveKeyedOrder(stored, keys), from, to).map(i => keys[i] ?? '');\n const visible = new Set(keys);\n return [...visual, ...(stored ?? []).filter(key => !visible.has(key))];\n}\n\n/** Moves the item at visual position `from` to visual position `to`. */\nexport function moveIndex(order: number[], from: number, to: number): number[] {\n if (from === to || from < 0 || to < 0 || from >= order.length || to >= order.length) return order;\n const next = [...order];\n next.splice(to, 0, ...next.splice(from, 1));\n return next;\n}\n","import { createContext, useContext } from 'react';\n\nexport type DataListReorderContextValue = {\n reorderable: boolean;\n /** `order[visualPosition] = originalColumnIndex`. */\n order: number[];\n /** Moves the column at visual position `from` to visual position `to`. */\n move: (from: number, to: number) => void;\n};\n\nexport const DataListReorderContext = createContext<DataListReorderContextValue>({\n reorderable: false,\n order: [],\n move: () => {},\n});\n\nexport const useDataListReorder = () => useContext(DataListReorderContext);\n","import { ScrollArea as ScrollAreaPrimitive } from '@base-ui/react/scroll-area';\nimport type { CSSProperties, ReactNode, RefObject } from 'react';\nimport { useId, useMemo } from 'react';\nimport {\n columnOrderSchema,\n getColumnOrderStorageKey,\n identityOrder,\n keyedColumnOrderSchema,\n moveIndex,\n moveKeyedOrder,\n normalizeOrder,\n resolveKeyedOrder,\n splitGridTracks,\n} from './data-list-column-order';\nimport { DataListReorderContext } from './data-list-reorder-context';\nimport type { DataListReorderContextValue } from './data-list-reorder-context';\nimport { ScrollArea, ScrollAreaViewport } from '@/ds/components/ScrollArea/scroll-area';\nimport type { ScrollAreaMask, ScrollAreaProps } from '@/ds/components/ScrollArea/scroll-area';\nimport { raisedSurfaceStyle } from '@/ds/primitives/raised-surface';\nimport { useLocalStorageState } from '@/hooks/use-local-storage-state';\nimport { cn } from '@/lib/utils';\n\n/**\n * Horizontal sizing of the list grid.\n *\n * - `content`: the grid is as wide as its widest content (`w-max`) and the\n * ScrollArea scrolls horizontally when it exceeds the container.\n * - `container`: the grid fills the container width and never exceeds it;\n * flexible tracks (`minmax(0, 1fr)`) shrink so truncating cells ellipsize\n * instead of widening the table.\n */\nexport type DataListFit = 'content' | 'container';\n\n/**\n * Surface treatment of the list.\n *\n * - `default`: rows sit as wells inside a raised card panel — the same material\n * and elevation as a card, a popover or a settings container.\n * - `light`: no panel behind the rows; rows sit directly on the page.\n */\nexport type DataListVariant = 'default' | 'light';\n\nexport type DataListRootProps = Omit<ScrollAreaProps, 'children' | 'orientation' | 'mask'> & {\n children: ReactNode;\n columns: string;\n /** Grid width behavior; defaults to `content` (existing horizontal-scroll sizing). */\n fit?: DataListFit;\n /** Surface treatment; defaults to `default` (rows on a raised card panel). */\n variant?: DataListVariant;\n /** Disable the internal scroll area when a parent owns scrolling, allowing row effects to extend outside the list. */\n scrollable?: boolean;\n /**\n * Edge fades where content is scrolled out of view, 1.25rem deep by default. The sticky\n * header never fades: the top edge fades the rows just below it instead.\n */\n mask?: ScrollAreaMask;\n /**\n * Ref to the scroll container — pass this to TanStack Virtual's\n * `getScrollElement` when virtualizing. Without it, the ScrollArea viewport\n * scrolls normally.\n */\n scrollRef?: RefObject<HTMLDivElement | null>;\n /**\n * Lets users drag header cells (or press Alt+Arrow on a focused header cell)\n * to reorder columns. Requires `id`: the order is persisted in localStorage\n * under that id. Sticky cells stay pinned. Supported for flat lists whose\n * header and rows span the full grid; `repeat()` templates are not supported.\n */\n reorderable?: boolean;\n /** Stable identifier of the list, used to persist the column order when `reorderable`. */\n id?: string;\n /**\n * Stable key per column, in `columns` order. With `reorderable`, the order is\n * persisted by key, so it survives columns being shown, hidden or added.\n * Without it, the order is persisted by index and resets when the column count changes.\n */\n columnKeys?: string[];\n};\n\ntype DataListRootStyle = CSSProperties & {\n '--data-list-background'?: string;\n '--data-list-fade-top'?: string;\n};\n\ntype MaskSide = NonNullable<Exclude<ScrollAreaMask, boolean>['top']>;\n\nconst DATA_LIST_FADE_DEPTH = '1.25rem';\n\nconst fadeSide = (side: MaskSide | undefined): MaskSide | undefined => (side === true ? DATA_LIST_FADE_DEPTH : side);\n\n/** The top fade's depth, or `false` for none. Omitted means on, at the default depth. */\nconst topFadeDepth = (side: MaskSide = true): Exclude<MaskSide, true> => (side === true ? DATA_LIST_FADE_DEPTH : side);\n\n/**\n * Splits the caller's `mask` into the ScrollArea's fades (bottom, left, right) and the top fade.\n * The ScrollArea's own top fade stays off, since it would fade the sticky header with the rows;\n * the top edge is a gradient under the header instead (see `dataListTopFadeStyles`).\n */\nfunction resolveDataListMask(mask: ScrollAreaMask | undefined): {\n area: ScrollAreaMask;\n top: Exclude<MaskSide, true>;\n} {\n if (mask === false) return { area: false, top: false };\n const sides = mask === true || mask === undefined ? {} : mask;\n return {\n area: {\n x: DATA_LIST_FADE_DEPTH,\n y: DATA_LIST_FADE_DEPTH,\n ...Object.fromEntries(Object.entries(sides).map(([key, side]) => [key, fadeSide(side)])),\n top: false,\n },\n top: topFadeDepth(sides.top ?? sides.y),\n };\n}\n\n/**\n * The root owns the unified table treatment so standalone and wrapped rows look\n * identical without requiring a per-row index. The ScrollArea provides the\n * fixed frame; this grid paints the sticky header and separators. The root is\n * the only element that defines a color: sticky parts read the background\n * through `--data-list-background` so they stay opaque while scrolling, and\n * rows/header draw no separators, borders or rings of their own.\n */\nconst dataListGridStyles = [\n 'gap-y-px',\n // Rows are siblings of the header, so first/last are found via sibling combinators.\n '[&_.data-list-row:not(.data-list-row~.data-list-row)]:rounded-t-lg',\n '[&_.data-list-row:not(:has(~.data-list-row))]:rounded-b-lg',\n '[&_.data-list-row:not(.data-list-row~.data-list-row)>.data-list-sticky-start]:rounded-tl-lg',\n '[&_.data-list-row:not(:has(~.data-list-row))>.data-list-sticky-start]:rounded-bl-lg',\n // Subheaders split the rows into sections; each section gets its own rounded ends.\n '[&_.data-list-subheader+.data-list-row]:rounded-t-lg',\n '[&_.data-list-row:has(+.data-list-subheader)]:rounded-b-lg',\n '[&_.data-list-subheader+.data-list-row>.data-list-sticky-start]:rounded-tl-lg',\n '[&_.data-list-row:has(+.data-list-subheader)>.data-list-sticky-start]:rounded-bl-lg',\n // The grid paints the root's colour so the 1px gaps between rows read as separators, also over the\n // well (below) that the fades reveal.\n 'bg-(--data-list-background)',\n '[&_.data-list-top]:bg-(--data-list-background)',\n // Sticky cells stay opaque over horizontally scrolled cells, the header's included.\n '[&_.data-list-top>.data-list-sticky-start]:bg-(--data-list-background)',\n '[&_.data-list-row>.data-list-sticky-start]:bg-background',\n // A sticky cell cannot show the hover layer through; it takes the opaque twin\n // of a fill rung over the row well instead, the same level a selected row rests on.\n '[&_.data-list-row-interactive:not(:disabled):hover>.data-list-sticky-start]:bg-surface-panel',\n // The pinned column's edge: one 1px divider, drawn per cell (bridging the 1px row gaps), shown once\n // cells are scrolled under it.\n \"[&_.data-list-sticky-start]:after:pointer-events-none [&_.data-list-sticky-start]:after:absolute [&_.data-list-sticky-start]:after:-top-px [&_.data-list-sticky-start]:after:right-0 [&_.data-list-sticky-start]:after:bottom-0 [&_.data-list-sticky-start]:after:w-px [&_.data-list-sticky-start]:after:bg-border [&_.data-list-sticky-start]:after:opacity-0 [&_.data-list-sticky-start]:after:transition-opacity [&_.data-list-sticky-start]:after:duration-fast [&_.data-list-sticky-start]:after:content-['']\",\n 'group-data-overflow-x-start/scroll-area:[&_.data-list-sticky-start]:after:opacity-100',\n] as const;\n\n/**\n * The top fade: a gradient hanging under the sticky header, into the row well, so rows fade as they\n * pass under the header while the header itself stays solid. Shown once rows are scrolled under it.\n */\nconst dataListTopFadeStyles = [\n \"[&_.data-list-top]:after:pointer-events-none [&_.data-list-top]:after:absolute [&_.data-list-top]:after:inset-x-0 [&_.data-list-top]:after:top-full [&_.data-list-top]:after:h-(--data-list-fade-top) [&_.data-list-top]:after:bg-linear-to-b [&_.data-list-top]:after:from-background [&_.data-list-top]:after:to-transparent [&_.data-list-top]:after:opacity-0 [&_.data-list-top]:after:transition-opacity [&_.data-list-top]:after:duration-fast [&_.data-list-top]:after:content-['']\",\n 'group-data-overflow-y-start/scroll-area:[&_.data-list-top]:after:opacity-100',\n] as const;\n\n/**\n * The row well: the dark surface behind the rows, below the header. Rows cover it; the edge fades\n * reveal it, so rows fade into the well rather than into the lighter panel. Painted on the root, so\n * it never scrolls. `top-11` clears the root's inset plus the `h-10` header.\n */\nconst dataListWellStyles =\n \"before:pointer-events-none before:absolute before:inset-1 before:rounded-lg before:bg-background before:content-[''] has-[.data-list-top]:before:top-11\";\n\n/**\n * Scrollbars sit beside the rows: below the header and clear of the rounded corners, instead of\n * along the panel's edge. Base UI positions them inline, hence `!`.\n */\nconst dataListScrollbarStyles = [\n '[&>[data-slot=scroll-area-scrollbar][data-orientation=vertical]]:top-2! has-[.data-list-top]:[&>[data-slot=scroll-area-scrollbar][data-orientation=vertical]]:top-12! [&>[data-slot=scroll-area-scrollbar][data-orientation=vertical]]:right-1.5! [&>[data-slot=scroll-area-scrollbar][data-orientation=vertical]]:bottom-2!',\n '[&>[data-slot=scroll-area-scrollbar][data-orientation=horizontal]]:right-2! [&>[data-slot=scroll-area-scrollbar][data-orientation=horizontal]]:bottom-1.5! [&>[data-slot=scroll-area-scrollbar][data-orientation=horizontal]]:left-2!',\n] as const;\n\nconst dataListVariantClasses: Record<DataListVariant, string> = {\n default: raisedSurfaceStyle,\n light: '',\n};\n\n// The sticky header reads this so it stays opaque while scrolling: the panel\n// material by default, the page surface when there is no panel.\nconst dataListVariantBackground: Record<DataListVariant, string> = {\n default: 'var(--card)',\n light: 'var(--background)',\n};\n\nconst dataListFitClasses: Record<DataListFit, string> = {\n content: 'w-max max-w-none min-w-full',\n container: 'w-full max-w-full',\n};\n\nconst disabledReorder: DataListReorderContextValue = { reorderable: false, order: [], move: () => {} };\n\nexport function DataListRoot({ reorderable, id, columns, columnKeys, ...props }: DataListRootProps) {\n const tracks = reorderable && id ? splitGridTracks(columns) : null;\n if (id && tracks && columnKeys && columnKeys.length === tracks.length) {\n return (\n <DataListKeyedReorderableRoot\n key={id}\n storageId={id}\n tracks={tracks}\n columnKeys={columnKeys}\n id={id}\n columns={columns}\n {...props}\n />\n );\n }\n if (id && tracks) {\n return <DataListReorderableRoot key={id} storageId={id} tracks={tracks} id={id} columns={columns} {...props} />;\n }\n return <DataListBase id={id} columns={columns} reorder={disabledReorder} {...props} />;\n}\n\nfunction DataListKeyedReorderableRoot({\n storageId,\n tracks,\n columnKeys,\n ...props\n}: DataListReorderableRootProps & { columnKeys: string[] }) {\n const [stored, setStored] = useLocalStorageState({\n initialKey: getColumnOrderStorageKey(storageId),\n defaultValue: columnKeys,\n schema: keyedColumnOrderSchema,\n });\n const keysSignature = columnKeys.join('\\u0000');\n // eslint-disable-next-line react-hooks/exhaustive-deps -- keyed by content, not array identity\n const order = useMemo(() => resolveKeyedOrder(stored, columnKeys), [stored, keysSignature]);\n\n const reorder = useMemo<DataListReorderContextValue>(\n () => ({\n reorderable: true,\n order,\n move: (from, to) => setStored(current => moveKeyedOrder(current, columnKeys, from, to)),\n }),\n // eslint-disable-next-line react-hooks/exhaustive-deps -- keyed by content, not array identity\n [order, keysSignature, setStored],\n );\n\n return <DataListBase {...props} columns={order.map(i => tracks[i]).join(' ')} reorder={reorder} />;\n}\n\ntype DataListReorderableRootProps = Omit<DataListRootProps, 'reorderable' | 'columnKeys'> & {\n storageId: string;\n tracks: string[];\n};\n\nfunction DataListReorderableRoot({ storageId, tracks, ...props }: DataListReorderableRootProps) {\n const count = tracks.length;\n const [stored, setStored] = useLocalStorageState({\n initialKey: getColumnOrderStorageKey(storageId),\n defaultValue: identityOrder(count),\n schema: columnOrderSchema,\n });\n const order = normalizeOrder(stored, count);\n\n const reorder = useMemo<DataListReorderContextValue>(\n () => ({\n reorderable: true,\n order,\n move: (from, to) => setStored(current => moveIndex(normalizeOrder(current, count), from, to)),\n }),\n [order, count, setStored],\n );\n\n return <DataListBase {...props} columns={order.map(i => tracks[i]).join(' ')} reorder={reorder} />;\n}\n\ntype DataListBaseProps = Omit<DataListRootProps, 'reorderable' | 'columnKeys'> & {\n reorder: DataListReorderContextValue;\n};\n\nfunction DataListBase({\n children,\n columns,\n className,\n fit = 'content',\n variant = 'default',\n scrollable = true,\n mask,\n scrollRef,\n reorder,\n maxHeight,\n autoScroll,\n scrollButtons,\n revealScrollbarOnHover,\n ...props\n}: DataListBaseProps) {\n const scopeId = useId();\n const fades = resolveDataListMask(mask);\n const gridStyle: DataListRootStyle = {\n '--data-list-background': dataListVariantBackground[variant],\n ...(fades.top && { '--data-list-fade-top': fades.top }),\n gridTemplateColumns: columns,\n };\n // Cells keep their DOM order; CSS `order` places each one in its moved track.\n const orderRules = reorder.reorderable\n ? reorder.order\n .map(\n (original, visual) =>\n `[data-data-list=\"${scopeId}\"] .data-list-cells > :nth-child(${original + 1}) { order: ${visual}; }`,\n )\n .join('\\n')\n : null;\n\n const grid = (\n <div\n // Lists scroll inside the ScrollArea viewport (below); the grid just lays out.\n // `isolate` keeps each row's negative-z surface and hover layers above the list's own background.\n className={cn(\n 'relative isolate grid content-start',\n ...dataListGridStyles,\n scrollable && fades.top && dataListTopFadeStyles,\n dataListFitClasses[fit],\n )}\n style={gridStyle}\n data-data-list={reorder.reorderable ? scopeId : undefined}\n >\n {orderRules && <style>{orderRules}</style>}\n {children}\n </div>\n );\n\n if (!scrollable) {\n return (\n // Preserve Base UI's render/style/ref contract without adding a clipping viewport.\n <ScrollAreaPrimitive.Root\n {...props}\n className={cn('w-full rounded-xl p-1', dataListVariantClasses[variant], className)}\n >\n <DataListReorderContext.Provider value={reorder}>{grid}</DataListReorderContext.Provider>\n </ScrollAreaPrimitive.Root>\n );\n }\n\n // DataList uses the DS ScrollArea: an overlay scrollbar, so the sticky header\n // spans the full width, and the header scrolls sideways with the rows for free.\n // Overscroll is off: a bounce would drag the sticky header along and expose the\n // panel behind the content.\n return (\n <ScrollArea\n {...props}\n maxHeight={maxHeight}\n autoScroll={autoScroll}\n scrollButtons={scrollButtons}\n revealScrollbarOnHover={revealScrollbarOnHover}\n orientation=\"both\"\n mask={fades.area}\n // Outer radius = row radius (8px) + 4px inset so the corners stay concentric.\n // Size to content but never exceed the parent. Flex (unlike grid `1fr`) lays\n // items out against the max-height-clamped container, so short lists stay\n // compact and long ones shrink the viewport and scroll. `self-start` stops\n // a grid/flex parent from stretching the root to the full row height.\n className={cn(\n 'flex max-h-full w-full flex-col self-start rounded-xl p-1',\n dataListVariantClasses[variant],\n variant === 'default' && dataListWellStyles,\n dataListScrollbarStyles,\n className,\n )}\n >\n <ScrollAreaViewport\n ref={scrollRef}\n className={cn(\n // `relative` lifts the content above the well. `rounded-lg` (the root's 12px less its 4px\n // inset) clips the square header corners that otherwise cut into the panel's rim.\n 'relative min-h-0 flex-1 basis-auto overscroll-none rounded-lg',\n // A pinned column draws its own edge (the divider), so nothing fades on the left.\n 'has-[.data-list-sticky-start]:[--scroll-area-fade-left:0px]!',\n )}\n >\n <DataListReorderContext.Provider value={reorder}>{grid}</DataListReorderContext.Provider>\n </ScrollAreaViewport>\n </ScrollArea>\n );\n}\n","import { createContext, useContext } from 'react';\n\nexport const DataListRowWrapperContext = createContext(false);\n\nexport function useDataListRowWrapperContext() {\n return useContext(DataListRowWrapperContext);\n}\n","import { forwardRef } from 'react';\nimport type { ComponentPropsWithoutRef } from 'react';\nimport { useDataListRowWrapperContext } from './data-list-row-wrapper-context';\nimport { dataListRowInteractiveStyles, dataListRowStyles } from './shared';\nimport type { DataListRowSharedProps } from './shared';\nimport { cn } from '@/lib/utils';\n\nexport type DataListRowButtonProps = ComponentPropsWithoutRef<'button'> & DataListRowSharedProps;\n\n/**\n * Forwarded ref + spread props so virtualizers (`useVirtualizer.measureElement`)\n * can attach a ref and `data-index` to each rendered row.\n */\nexport const DataListRowButton = forwardRef<HTMLButtonElement, DataListRowButtonProps>(\n ({ children, className, type = 'button', colStart, colEnd, featured, variant, style, ...rest }, ref) => {\n const isWrapped = useDataListRowWrapperContext();\n const hasColumnOverride = colStart !== undefined || colEnd !== undefined;\n const cellsClass = hasColumnOverride ? undefined : 'data-list-cells';\n const resolvedStyle = hasColumnOverride ? { ...style, gridColumn: `${colStart ?? 1} / ${colEnd ?? -1}` } : style;\n return (\n <button\n ref={ref}\n type={type}\n className={cn(\n ...(isWrapped ? dataListRowInteractiveStyles : dataListRowStyles),\n cellsClass,\n 'text-left',\n className,\n )}\n style={resolvedStyle}\n data-featured={featured || undefined}\n data-variant={variant ?? 'default'}\n {...rest}\n >\n {children}\n </button>\n );\n },\n);\n\nDataListRowButton.displayName = 'DataListRowButton';\n","import { forwardRef } from 'react';\nimport type { CSSProperties, ComponentPropsWithoutRef, ReactNode } from 'react';\nimport { useDataListRowWrapperContext } from './data-list-row-wrapper-context';\nimport { dataListRowInteractiveStyles, dataListRowStyles } from './shared';\nimport type { DataListRowSharedProps } from './shared';\nimport type { LinkComponent } from '@/ds/types/link-component';\nimport { cn } from '@/lib/utils';\n\nexport type DataListRowLinkProps = DataListRowSharedProps & {\n children: ReactNode;\n to: string;\n className?: string;\n style?: CSSProperties;\n LinkComponent?: LinkComponent;\n} & Omit<ComponentPropsWithoutRef<'a'>, 'href' | 'children' | 'className' | 'style'>;\n\nexport const DataListRowLink = forwardRef<HTMLAnchorElement, DataListRowLinkProps>(\n (\n { children, to, className, style, LinkComponent: Link = 'a', colStart, colEnd, featured, variant, ...rest },\n ref,\n ) => {\n const isWrapped = useDataListRowWrapperContext();\n const hasColumnOverride = colStart !== undefined || colEnd !== undefined;\n const cellsClass = hasColumnOverride ? undefined : 'data-list-cells';\n const resolvedStyle = hasColumnOverride ? { ...style, gridColumn: `${colStart ?? 1} / ${colEnd ?? -1}` } : style;\n return (\n <Link\n ref={ref}\n href={to}\n className={cn(...(isWrapped ? dataListRowInteractiveStyles : dataListRowStyles), cellsClass, className)}\n style={resolvedStyle}\n data-featured={featured || undefined}\n data-variant={variant ?? 'default'}\n {...rest}\n >\n {children}\n </Link>\n );\n },\n);\n\nDataListRowLink.displayName = 'DataListRowLink';\n","import { forwardRef } from 'react';\nimport type { ComponentPropsWithoutRef } from 'react';\nimport { useDataListRowWrapperContext } from './data-list-row-wrapper-context';\nimport { dataListRowStaticStyles } from './shared';\nimport type { DataListRowSharedProps } from './shared';\nimport { cn } from '@/lib/utils';\n\nexport type DataListRowStaticProps = ComponentPropsWithoutRef<'div'> & DataListRowSharedProps;\n\n/**\n * Non-interactive row. Use when a row should *display* like a regular row but\n * has no link target or click handler\n */\nexport const DataListRowStatic = forwardRef<HTMLDivElement, DataListRowStaticProps>(\n ({ children, className, colStart, colEnd, featured, variant, style, ...rest }, ref) => {\n const isWrapped = useDataListRowWrapperContext();\n const hasColumnOverride = colStart !== undefined || colEnd !== undefined;\n const cellsClass = hasColumnOverride ? undefined : 'data-list-cells';\n const resolvedStyle = hasColumnOverride ? { ...style, gridColumn: `${colStart ?? 1} / ${colEnd ?? -1}` } : style;\n return (\n <div\n ref={ref}\n className={cn(isWrapped ? 'grid grid-cols-subgrid gap-4 px-3' : dataListRowStaticStyles, cellsClass, className)}\n style={resolvedStyle}\n data-featured={featured || undefined}\n data-variant={variant ?? 'default'}\n {...rest}\n >\n {children}\n </div>\n );\n },\n);\n\nDataListRowStatic.displayName = 'DataListRowStatic';\n","import { forwardRef } from 'react';\nimport type { ComponentPropsWithoutRef, KeyboardEvent, MouseEvent } from 'react';\nimport { DataListRowWrapperContext } from './data-list-row-wrapper-context';\nimport { dataListRowOuterStyles, dataListRowStateStyles } from './shared';\nimport { focusRingInset } from '@/ds/primitives/transitions';\nimport { cn } from '@/lib/utils';\n\nexport type DataListRowWrapperProps = ComponentPropsWithoutRef<'div'> & {\n /**\n * Makes the whole wrapper the row's activation target: it becomes focusable\n * (`tabIndex=0` unless overridden, e.g. by `getRowProps`), and a click or\n * Enter on the wrapper itself calls this. Descendants that must not activate\n * the row (the inner link, popover triggers, action buttons) should call\n * `event.stopPropagation()` on their click.\n */\n onSelectRow?: () => void;\n};\n\n/**\n * Grid wrapper used to host a leading or trailing cell (e.g. a selection\n * checkbox or row actions) alongside a `DataList.RowButton` / `RowLink`.\n *\n * Without `onSelectRow` it is non-interactive: hover/focus/click only apply to\n * the nested row primitive. With `onSelectRow` the wrapper itself becomes the\n * click / Enter target so the entire row (including trailing cells) activates.\n * For standalone interactive rows, use `DataList.RowButton` directly.\n *\n * Carries the `.data-list-row` marker so root-level row styling behaves the\n * same in wrapped and standalone rows.\n */\nexport const DataListRowWrapper = forwardRef<HTMLDivElement, DataListRowWrapperProps>(\n ({ children, className, onSelectRow, onClick, onKeyDown, tabIndex, ...rest }, ref) => {\n const isSelectable = onSelectRow !== undefined;\n\n const handleClick = (event: MouseEvent<HTMLDivElement>) => {\n onClick?.(event);\n if (!isSelectable || event.defaultPrevented) return;\n onSelectRow();\n };\n\n const handleKeyDown = (event: KeyboardEvent<HTMLDivElement>) => {\n onKeyDown?.(event);\n if (!isSelectable || event.defaultPrevented) return;\n // Only when the wrapper itself is focused. A focused descendant (the\n // link) receiving Enter fires its own native click; handling it here too\n // would activate the row twice.\n if (event.key === 'Enter' && event.target === event.currentTarget) {\n event.preventDefault();\n onSelectRow();\n }\n };\n\n return (\n <DataListRowWrapperContext.Provider value>\n <div\n ref={ref}\n tabIndex={tabIndex ?? (isSelectable ? 0 : undefined)}\n className={cn(\n 'grid grid-cols-subgrid gap-0',\n ...dataListRowOuterStyles,\n ...dataListRowStateStyles,\n isSelectable && cn('cursor-pointer', focusRingInset),\n className,\n )}\n onClick={handleClick}\n onKeyDown={handleKeyDown}\n {...rest}\n >\n {children}\n </div>\n </DataListRowWrapperContext.Provider>\n );\n },\n);\n\nDataListRowWrapper.displayName = 'DataListRowWrapper';\n","import type { ComponentPropsWithoutRef, DragEvent, ElementType, KeyboardEvent, ReactNode } from 'react';\nimport { forwardRef, useState } from 'react';\nimport { useDataListReorder } from './data-list-reorder-context';\nimport { dataListStickyStartStyles } from './shared';\nimport type { DataListSticky } from './shared';\nimport { Checkbox } from '@/ds/components/Checkbox';\nimport { Tooltip, TooltipTrigger, TooltipContent } from '@/ds/components/Tooltip';\nimport { focusRingInset } from '@/ds/primitives/transitions';\nimport { cn } from '@/lib/utils';\n\nexport type DataListTopCellProps = {\n children: ReactNode;\n className?: string;\n /**\n * HTML element rendered for the top cell. Defaults to `span`. Use `'label'`\n * when the cell wraps a labelable control (e.g. a select-all Checkbox).\n */\n as?: ElementType;\n /** Pins the top cell to the horizontal start edge while the list scrolls sideways. */\n sticky?: DataListSticky;\n} & Omit<ComponentPropsWithoutRef<'div'>, 'children' | 'className' | 'ref'>;\n\nexport const DataListTopCell = forwardRef<HTMLSpanElement, DataListTopCellProps>(\n ({ children, className, as, sticky, ...rest }, ref) => {\n const Component = as || 'span';\n const isText = typeof children === 'string' || typeof children === 'number';\n const { reorderable, order, move } = useDataListReorder();\n const [isDropTarget, setIsDropTarget] = useState(false);\n const canReorder = reorderable && !sticky;\n\n const reorderProps = canReorder\n ? {\n draggable: true,\n tabIndex: 0,\n 'aria-roledescription': 'draggable column',\n 'data-drop-target': isDropTarget || undefined,\n onDragStart: (event: DragEvent<HTMLElement>) => {\n const from = getVisualPosition(event.currentTarget, order);\n if (from === null) return event.preventDefault();\n event.dataTransfer.effectAllowed = 'move';\n event.dataTransfer.setData(DRAG_TYPE, String(from));\n },\n onDragOver: (event: DragEvent<HTMLElement>) => {\n if (!event.dataTransfer.types.includes(DRAG_TYPE)) return;\n event.preventDefault();\n event.dataTransfer.dropEffect = 'move';\n setIsDropTarget(true);\n },\n onDragLeave: () => setIsDropTarget(false),\n onDrop: (event: DragEvent<HTMLElement>) => {\n setIsDropTarget(false);\n const from = Number(event.dataTransfer.getData(DRAG_TYPE));\n const to = getVisualPosition(event.currentTarget, order);\n if (to === null || Number.isNaN(from)) return;\n event.preventDefault();\n move(from, to);\n },\n onKeyDown: (event: KeyboardEvent<HTMLElement>) => {\n if (!event.altKey || (event.key !== 'ArrowLeft' && event.key !== 'ArrowRight')) return;\n const from = getVisualPosition(event.currentTarget, order);\n if (from === null) return;\n const to = from + (event.key === 'ArrowLeft' ? -1 : 1);\n if (isStickyAt(event.currentTarget, order, to)) return;\n event.preventDefault();\n move(from, to);\n },\n }\n : undefined;\n\n return (\n <Component\n ref={ref}\n className={cn(\n 'flex h-10 max-w-full min-w-0 items-center overflow-hidden py-1 text-column whitespace-nowrap text-muted-foreground',\n sticky === 'start' && dataListStickyStartStyles,\n sticky === 'start' && '-ml-3 w-auto max-w-none px-3',\n sticky === 'start' && 'z-20',\n canReorder &&\n 'cursor-grab active:cursor-grabbing data-drop-target:shadow-[inset_2px_0_0_var(--border-focus)]',\n canReorder && focusRingInset,\n className,\n )}\n {...reorderProps}\n {...rest}\n >\n {/* Plain string/number titles truncate with an ellipsis; element children\n (icons, smart long/short labels, checkboxes) render as-is. */}\n {isText ? <span className=\"min-w-0 truncate\">{children}</span> : children}\n </Component>\n );\n },\n);\n\nconst DRAG_TYPE = 'application/x-mastra-data-list-column';\n\n/** Visual position of a header cell, or `null` when it is not in a full-width cells container. */\nfunction getVisualPosition(cell: HTMLElement, order: number[]): number | null {\n const parent = cell.parentElement;\n if (!parent?.classList.contains('data-list-cells')) return null;\n const visual = order.indexOf(Array.from(parent.children).indexOf(cell));\n return visual === -1 ? null : visual;\n}\n\n/** Whether the header cell at `visual` is pinned (so nothing may move into its slot). */\nfunction isStickyAt(cell: HTMLElement, order: number[], visual: number): boolean {\n const original = order[visual];\n if (original === undefined) return true;\n return cell.parentElement?.children[original]?.classList.contains('data-list-sticky-start') ?? true;\n}\n\nexport type DataListTopCellWithTooltipProps = {\n children: ReactNode;\n tooltip: ReactNode;\n className?: string;\n};\n\nexport function DataListTopCellWithTooltip({ children, tooltip, className }: DataListTopCellWithTooltipProps) {\n return (\n <Tooltip>\n <TooltipTrigger>\n <DataListTopCell className={className}>{children}</DataListTopCell>\n </TooltipTrigger>\n <TooltipContent>{tooltip}</TooltipContent>\n </Tooltip>\n );\n}\n\nexport type DataListTopCellSmartProps = {\n long: ReactNode;\n short: ReactNode;\n tooltip?: string;\n breakpoint?: 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n className?: string;\n};\n\nconst breakpointClasses: Record<'sm' | 'md' | 'lg' | 'xl' | '2xl', { show: string; hide: string }> = {\n sm: { show: 'hidden sm:inline-flex', hide: 'inline-flex sm:hidden' },\n md: { show: 'hidden md:inline-flex', hide: 'inline-flex md:hidden' },\n lg: { show: 'hidden lg:inline-flex', hide: 'inline-flex lg:hidden' },\n xl: { show: 'hidden xl:inline-flex', hide: 'inline-flex xl:hidden' },\n '2xl': { show: 'hidden 2xl:inline-flex', hide: 'inline-flex 2xl:hidden' },\n};\n\nexport function DataListTopCellSmart({\n long,\n short,\n tooltip,\n breakpoint = '2xl',\n className,\n}: DataListTopCellSmartProps) {\n const tooltipText = tooltip ?? (typeof long === 'string' ? long : undefined);\n const bp = breakpointClasses[breakpoint];\n\n const content = (\n <>\n <span className={cn('items-center gap-1', bp.show)}>{long}</span>\n <span className={cn('items-center gap-1', bp.hide)}>{short}</span>\n </>\n );\n\n if (tooltipText) {\n return (\n <DataListTopCellWithTooltip tooltip={tooltipText} className={cn('flex [&_svg]:size-[1.3em]', className)}>\n {content}\n </DataListTopCellWithTooltip>\n );\n }\n\n return <DataListTopCell className={cn('flex [&_svg]:size-[1.3em]', className)}>{content}</DataListTopCell>;\n}\n\nexport interface DataListTopSelectCellProps {\n /** Pass `'indeterminate'` when some — but not all — rows are selected. */\n checked: boolean | 'indeterminate';\n /** Toggles the global selection. Typically clears when fully selected, otherwise selects all. */\n onToggle: () => void;\n 'aria-label'?: string;\n}\n\nexport function DataListTopSelectCell({ checked, onToggle, ...rest }: DataListTopSelectCellProps) {\n return (\n <DataListTopCell\n as=\"label\"\n className=\"w-8 cursor-pointer justify-center overflow-visible px-0 py-0!\"\n onClick={e => e.stopPropagation()}\n >\n <Checkbox checked={checked} onCheckedChange={() => onToggle()} aria-label={rest['aria-label']} />\n </DataListTopCell>\n );\n}\n","import { ArrowDown, ArrowUp, ArrowUpDown } from 'lucide-react';\nimport type { ReactNode } from 'react';\nimport { DataListTopCell } from './data-list-top-cell';\nimport type { DataListTopCellProps } from './data-list-top-cell';\nimport { Button } from '@/ds/components/Button';\nimport { cn } from '@/lib/utils';\n\nexport type DataListSort = 'asc' | 'desc';\n\nconst sortIcons = {\n asc: ArrowUp,\n desc: ArrowDown,\n none: ArrowUpDown,\n};\n\nconst sortLabels = {\n asc: 'ascending',\n desc: 'descending',\n};\n\nconst sortAnimations = {\n asc: 'animate-sort-arrow-up',\n desc: 'animate-sort-arrow-down',\n};\n\nconst sortTooltips = {\n asc: 'Asc',\n desc: 'Desc',\n none: 'Sort',\n};\n\nexport type DataListSortableTopCellProps<K extends string = string> = Omit<\n DataListTopCellProps,\n 'aria-sort' | 'as' | 'children' | 'onClick'\n> & {\n children: ReactNode;\n sortKey: K;\n sort?: DataListSort;\n onSortChange: (sort: DataListSort, key: K) => void;\n align?: 'start' | 'end';\n /** Names the column in the sort button's accessible label. Defaults to `children` when it is a string, else `sortKey`. */\n label?: string;\n};\n\nexport function DataListSortableTopCell<K extends string = string>({\n children,\n sortKey,\n sort,\n onSortChange,\n align = 'start',\n label = typeof children === 'string' ? children : sortKey,\n className,\n ...props\n}: DataListSortableTopCellProps<K>) {\n const next: DataListSort = sort === 'asc' ? 'desc' : 'asc';\n const SortIcon = sortIcons[sort ?? 'none'];\n const current = sort ? `sorted ${sortLabels[sort]}` : 'not sorted';\n\n return (\n <DataListTopCell\n data-sort={sort ?? 'none'}\n className={cn('gap-1 overflow-visible', align === 'end' && 'justify-end', className)}\n {...props}\n >\n <span className=\"min-w-0 truncate\">{children}</span>\n <Button\n variant=\"ghost\"\n size=\"icon-sm\"\n aria-label={`${label}, ${current}, sort ${sortLabels[next]}`}\n tooltip={sortTooltips[sort ?? 'none']}\n onClick={() => onSortChange(next, sortKey)}\n className={cn('shrink-0', sort ? 'text-foreground' : 'text-muted-foreground')}\n >\n <SortIcon key={sort ?? 'none'} className={sort && sortAnimations[sort]} />\n </Button>\n </DataListTopCell>\n );\n}\n","export type DataListSpacerProps = {\n /** Pixel height of the spacer. Pass 0 to render nothing. */\n height: number;\n};\n\n/**\n * Pads top/bottom of the visible window when virtualizing — preserves the\n * grid's total scroll height for the rows that aren't currently rendered.\n * Spans the full grid width so it doesn't disturb column layout.\n */\nexport function DataListSpacer({ height }: DataListSpacerProps) {\n if (height <= 0) return null;\n return <div className=\"col-span-full\" style={{ height }} />;\n}\n","import { forwardRef } from 'react';\nimport type { ComponentPropsWithoutRef } from 'react';\nimport { cn } from '@/lib/utils';\n\nexport type DataListSubheaderProps = ComponentPropsWithoutRef<'div'>;\n\nexport const DataListSubheader = forwardRef<HTMLDivElement, DataListSubheaderProps>(\n ({ children, className, ...rest }, ref) => {\n return (\n <div\n ref={ref}\n className={cn(\n 'data-list-subheader relative isolate col-span-full px-3 py-2 text-subheading text-muted-foreground',\n 'bg-(--data-list-background)',\n className,\n )}\n {...rest}\n >\n {children}\n </div>\n );\n },\n);\n\nDataListSubheader.displayName = 'DataListSubheader';\n","import type { ReactNode } from 'react';\nimport { Txt } from '@/ds/components/Txt';\n\nexport type DataListSubHeadingProps = {\n children: ReactNode;\n className?: string;\n};\n\nexport function DataListSubHeading({ children, className }: DataListSubHeadingProps) {\n return (\n <Txt as=\"span\" variant=\"caption\" tone=\"faint\" className={className}>\n {children}\n </Txt>\n );\n}\n","import type { ComponentPropsWithoutRef } from 'react';\nimport { cn } from '@/lib/utils';\n\nexport type DataListTopProps = ComponentPropsWithoutRef<'div'> & {\n /**\n * Switch to a \"leading cell\" layout: drops the default gap between children\n * and the default left padding, so a leading cell (e.g. `TopSelectCell`)\n * sits flush against the grid edge and an inner `TopCells` group owns the\n * remaining column spacing. Mirrors how `Row` + `RowButton` compose.\n */\n hasLeadingCell?: boolean;\n};\n\nexport function DataListTop({ children, className, hasLeadingCell, ...props }: DataListTopProps) {\n return (\n <div\n className={cn(\n 'group/data-list-top data-list-top sticky top-0 z-20 col-span-full grid grid-cols-subgrid gap-4 px-3',\n hasLeadingCell ? 'gap-0 pl-0!' : 'data-list-cells',\n className,\n )}\n {...props}\n >\n {children}\n </div>\n );\n}\n","import { forwardRef } from 'react';\nimport type { ComponentPropsWithoutRef } from 'react';\nimport { cn } from '@/lib/utils';\n\nexport type DataListTopCellsProps = ComponentPropsWithoutRef<'div'> & {\n /**\n * Drop the group's default left margin. Use when this sits as the second\n * child of a gap-0 `DataList.Top`, beside a `DataList.TopSelectCell` that\n * owns the leading column.\n */\n flushLeft?: boolean;\n /**\n * Place the group starting at this column line, spanning through to the\n * last column. Defaults to the full grid (`col-span-full`). Use when this\n * sits beside a leading cell that owns column 1.\n */\n colStart?: number;\n};\n\n/**\n * Non-interactive header equivalent of `DataList.RowButton`. Groups a set of\n * `DataList.TopCell`s with the same horizontal layout (gap, mx, px) as\n * `RowButton`, so columns inside a wrapped `Top` line up cell-for-cell with the\n * columns inside a wrapped `Row`.\n */\nexport const DataListTopCells = forwardRef<HTMLDivElement, DataListTopCellsProps>(\n ({ children, className, flushLeft, colStart, style, ...rest }, ref) => {\n return (\n <div\n ref={ref}\n className={cn(\n 'pointer-events-none grid grid-cols-subgrid gap-4 px-3 [&>*]:pointer-events-auto',\n !colStart && 'data-list-cells col-span-full',\n flushLeft && 'pl-0!',\n className,\n )}\n style={colStart ? { ...style, gridColumn: `${colStart} / -1` } : style}\n {...rest}\n >\n {children}\n </div>\n );\n },\n);\n\nDataListTopCells.displayName = 'DataListTopCells';\n","import {\n DataListActionsCell,\n DataListCell,\n DataListTextCell,\n DataListNameCell,\n DataListDescriptionCell,\n DataListIdCell,\n DataListRowHeaderCell,\n DataListNumberCell,\n DataListSelectCell,\n DataListDateCell,\n DataListCreatedCell,\n DataListTimeCell,\n} from './data-list-cells';\nimport { DataListGroup } from './data-list-group';\nimport { DataListNextPageLoading } from './data-list-next-page-loading';\nimport { DataListNoMatch } from './data-list-no-match';\nimport { DataListPagination } from './data-list-pagination';\nimport { DataListRoot } from './data-list-root';\nimport { DataListRowButton } from './data-list-row-button';\nimport { DataListRowLink } from './data-list-row-link';\nimport { DataListRowStatic } from './data-list-row-static';\nimport { DataListRowWrapper } from './data-list-row-wrapper';\nimport { DataListSortableTopCell } from './data-list-sortable-top-cell';\nimport { DataListSpacer } from './data-list-spacer';\nimport { DataListSubheader } from './data-list-subheader';\nimport { DataListSubHeading } from './data-list-subheading';\nimport { DataListTop } from './data-list-top';\nimport {\n DataListTopCell,\n DataListTopCellWithTooltip,\n DataListTopCellSmart,\n DataListTopSelectCell,\n} from './data-list-top-cell';\nimport { DataListTopCells } from './data-list-top-cells';\n\nexport type { DataListRootProps, DataListVariant } from './data-list-root';\nexport type { DataListSortableTopCellProps, DataListSort } from './data-list-sortable-top-cell';\n\nexport const DataList = Object.assign(DataListRoot, {\n Top: DataListTop,\n TopCells: DataListTopCells,\n TopCell: DataListTopCell,\n SortableTopCell: DataListSortableTopCell,\n TopCellWithTooltip: DataListTopCellWithTooltip,\n TopCellSmart: DataListTopCellSmart,\n RowWrapper: DataListRowWrapper,\n RowButton: DataListRowButton,\n RowLink: DataListRowLink,\n RowStatic: DataListRowStatic,\n Cell: DataListCell,\n ActionsCell: DataListActionsCell,\n TextCell: DataListTextCell,\n NameCell: DataListNameCell,\n DescriptionCell: DataListDescriptionCell,\n IdCell: DataListIdCell,\n RowHeaderCell: DataListRowHeaderCell,\n NumberCell: DataListNumberCell,\n DateCell: DataListDateCell,\n CreatedCell: DataListCreatedCell,\n TimeCell: DataListTimeCell,\n SelectCell: DataListSelectCell,\n TopSelectCell: DataListTopSelectCell,\n NoMatch: DataListNoMatch,\n Group: DataListGroup,\n Subheader: DataListSubheader,\n SubHeading: DataListSubHeading,\n Spacer: DataListSpacer,\n NextPageLoading: DataListNextPageLoading,\n Pagination: DataListPagination,\n});\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AASA,IAAa,yB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