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

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 (290) 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/dashboards/kinds/kpis/options.cjs.js +9 -6
  67. package/dist/domains/dashboards/kinds/kpis/options.cjs.js.map +1 -1
  68. package/dist/domains/dashboards/kinds/kpis/options.es.js +8 -7
  69. package/dist/domains/dashboards/kinds/kpis/options.es.js.map +1 -1
  70. package/dist/domains/dashboards/kinds/kpis.cjs.js +2 -0
  71. package/dist/domains/dashboards/kinds/kpis.cjs.js.map +1 -1
  72. package/dist/domains/dashboards/kinds/kpis.es.js +2 -2
  73. package/dist/domains/dashboards/kinds/kpis.es.js.map +1 -1
  74. package/dist/domains/dashboards/kinds/timeseries.cjs.js +2 -0
  75. package/dist/domains/dashboards/kinds/timeseries.cjs.js.map +1 -1
  76. package/dist/domains/dashboards/kinds/timeseries.es.js +2 -2
  77. package/dist/domains/dashboards/kinds/timeseries.es.js.map +1 -1
  78. package/dist/domains/dashboards/kinds.cjs.js +12 -0
  79. package/dist/domains/dashboards/kinds.cjs.js.map +1 -1
  80. package/dist/domains/dashboards/kinds.es.js +5 -1
  81. package/dist/domains/dashboards/kinds.es.js.map +1 -1
  82. package/dist/domains/dashboards.cjs.js +23 -2
  83. package/dist/domains/dashboards.es.js +8 -3
  84. package/dist/domains/knowledge/components/KnowledgePageExplorer.cjs.js +1 -1
  85. package/dist/domains/knowledge/components/KnowledgePageExplorer.es.js +1 -1
  86. package/dist/domains/logs/components/logs-error-content.cjs.js +1 -1
  87. package/dist/domains/logs/components/logs-error-content.es.js +1 -1
  88. package/dist/domains/logs/components/logs-list-view.cjs.js +2 -2
  89. package/dist/domains/logs/components/logs-list-view.es.js +2 -2
  90. package/dist/domains/logs/components/no-logs-info.cjs.js +1 -1
  91. package/dist/domains/logs/components/no-logs-info.es.js +1 -1
  92. package/dist/domains/mcps/components/mcp-app-viewer.cjs.js +1 -1
  93. package/dist/domains/mcps/components/mcp-app-viewer.es.js +1 -1
  94. package/dist/domains/mcps/hooks/use-mcp-app-tool-call.cjs.js +1 -1
  95. package/dist/domains/mcps/hooks/use-mcp-app-tool-call.es.js +1 -1
  96. package/dist/domains/memory/components/observation-detail-view.cjs.js +1 -1
  97. package/dist/domains/memory/components/observation-detail-view.es.js +1 -1
  98. package/dist/domains/metrics/components/metrics-time-range-chip.cjs.js +1 -1
  99. package/dist/domains/metrics/components/metrics-time-range-chip.es.js +1 -1
  100. package/dist/domains/observability/components/observability-capability-gate.cjs.js +1 -1
  101. package/dist/domains/observability/components/observability-capability-gate.es.js +1 -1
  102. package/dist/domains/observability/hooks/use-observability-list-filters.cjs.js +15 -2
  103. package/dist/domains/observability/hooks/use-observability-list-filters.cjs.js.map +1 -1
  104. package/dist/domains/observability/hooks/use-observability-list-filters.es.js +15 -2
  105. package/dist/domains/observability/hooks/use-observability-list-filters.es.js.map +1 -1
  106. package/dist/domains/observability/lib/text-search-filter.cjs.js +24 -0
  107. package/dist/domains/observability/lib/text-search-filter.cjs.js.map +1 -0
  108. package/dist/domains/observability/lib/text-search-filter.d.ts +1 -0
  109. package/dist/domains/observability/lib/text-search-filter.es.js +23 -0
  110. package/dist/domains/observability/lib/text-search-filter.es.js.map +1 -0
  111. package/dist/domains/observability/lib/text-search.cjs.js +12 -0
  112. package/dist/domains/observability/lib/text-search.cjs.js.map +1 -0
  113. package/dist/domains/observability/lib/text-search.d.ts +1 -0
  114. package/dist/domains/observability/lib/text-search.es.js +11 -0
  115. package/dist/domains/observability/lib/text-search.es.js.map +1 -0
  116. package/dist/domains/observability/saved-view-state.cjs.js +16 -2
  117. package/dist/domains/observability/saved-view-state.cjs.js.map +1 -1
  118. package/dist/domains/observability/saved-view-state.es.js +16 -2
  119. package/dist/domains/observability/saved-view-state.es.js.map +1 -1
  120. package/dist/domains/scores/components/trace-scores-list.cjs.js +1 -1
  121. package/dist/domains/scores/components/trace-scores-list.es.js +1 -1
  122. package/dist/domains/scores/components/trace-scores-tab.cjs.js +2 -2
  123. package/dist/domains/scores/components/trace-scores-tab.es.js +2 -2
  124. package/dist/domains/spans/components/spans-explorer-body.cjs.js +15 -4
  125. package/dist/domains/spans/components/spans-explorer-body.cjs.js.map +1 -1
  126. package/dist/domains/spans/components/spans-explorer-body.es.js +15 -4
  127. package/dist/domains/spans/components/spans-explorer-body.es.js.map +1 -1
  128. package/dist/domains/spans/components/spans-explorer-histogram.cjs.js +2 -2
  129. package/dist/domains/spans/components/spans-explorer-histogram.cjs.js.map +1 -1
  130. package/dist/domains/spans/components/spans-explorer-histogram.es.js +2 -2
  131. package/dist/domains/spans/components/spans-explorer-histogram.es.js.map +1 -1
  132. package/dist/domains/spans/components/spans-filter-bar.cjs.js +10 -5
  133. package/dist/domains/spans/components/spans-filter-bar.cjs.js.map +1 -1
  134. package/dist/domains/spans/components/spans-filter-bar.es.js +10 -5
  135. package/dist/domains/spans/components/spans-filter-bar.es.js.map +1 -1
  136. package/dist/domains/spans/hooks/use-spans-filter-bar.cjs.js +37 -17
  137. package/dist/domains/spans/hooks/use-spans-filter-bar.cjs.js.map +1 -1
  138. package/dist/domains/spans/hooks/use-spans-filter-bar.es.js +37 -17
  139. package/dist/domains/spans/hooks/use-spans-filter-bar.es.js.map +1 -1
  140. package/dist/domains/threads/components/threads-filter-bar.cjs.js +2 -2
  141. package/dist/domains/threads/components/threads-filter-bar.es.js +2 -2
  142. package/dist/domains/threads/hooks/use-threads-filter-bar.cjs.js +1 -1
  143. package/dist/domains/threads/hooks/use-threads-filter-bar.es.js +1 -1
  144. package/dist/domains/traces/components/feedback-thread.cjs.js +2 -2
  145. package/dist/domains/traces/components/feedback-thread.es.js +2 -2
  146. package/dist/domains/traces/components/no-traces-info.cjs.js +1 -1
  147. package/dist/domains/traces/components/no-traces-info.es.js +1 -1
  148. package/dist/domains/traces/components/trace-error-cell.cjs.js +1 -1
  149. package/dist/domains/traces/components/trace-error-cell.es.js +1 -1
  150. package/dist/domains/traces/components/traces-error-content.cjs.js +1 -1
  151. package/dist/domains/traces/components/traces-error-content.es.js +1 -1
  152. package/dist/domains/traces/components/traces-explorer/traces-explorer-actions.cjs.js +1 -0
  153. package/dist/domains/traces/components/traces-explorer/traces-explorer-actions.cjs.js.map +1 -1
  154. package/dist/domains/traces/components/traces-explorer/traces-explorer-actions.es.js +1 -0
  155. package/dist/domains/traces/components/traces-explorer/traces-explorer-actions.es.js.map +1 -1
  156. package/dist/domains/traces/components/traces-explorer/traces-explorer-context.cjs.js.map +1 -1
  157. package/dist/domains/traces/components/traces-explorer/traces-explorer-context.es.js.map +1 -1
  158. package/dist/domains/traces/components/traces-explorer/traces-explorer-filter-bar.cjs.js +2 -2
  159. package/dist/domains/traces/components/traces-explorer/traces-explorer-filter-bar.es.js +2 -2
  160. package/dist/domains/traces/components/traces-explorer/traces-explorer-histogram.cjs.js +2 -2
  161. package/dist/domains/traces/components/traces-explorer/traces-explorer-histogram.cjs.js.map +1 -1
  162. package/dist/domains/traces/components/traces-explorer/traces-explorer-histogram.es.js +2 -2
  163. package/dist/domains/traces/components/traces-explorer/traces-explorer-histogram.es.js.map +1 -1
  164. package/dist/domains/traces/components/traces-explorer/traces-explorer-list-provider.cjs.js +4 -3
  165. package/dist/domains/traces/components/traces-explorer/traces-explorer-list-provider.cjs.js.map +1 -1
  166. package/dist/domains/traces/components/traces-explorer/traces-explorer-list-provider.es.js +4 -3
  167. package/dist/domains/traces/components/traces-explorer/traces-explorer-list-provider.es.js.map +1 -1
  168. package/dist/domains/traces/components/traces-explorer/traces-explorer-root.cjs.js +31 -8
  169. package/dist/domains/traces/components/traces-explorer/traces-explorer-root.cjs.js.map +1 -1
  170. package/dist/domains/traces/components/traces-explorer/traces-explorer-root.es.js +31 -8
  171. package/dist/domains/traces/components/traces-explorer/traces-explorer-root.es.js.map +1 -1
  172. package/dist/domains/traces/components/traces-explorer/use-traces-filter-bar.cjs.js +28 -19
  173. package/dist/domains/traces/components/traces-explorer/use-traces-filter-bar.cjs.js.map +1 -1
  174. package/dist/domains/traces/components/traces-explorer/use-traces-filter-bar.es.js +28 -19
  175. package/dist/domains/traces/components/traces-explorer/use-traces-filter-bar.es.js.map +1 -1
  176. package/dist/domains/traces/components/traces-list-view.cjs.js +2 -2
  177. package/dist/domains/traces/components/traces-list-view.es.js +2 -2
  178. package/dist/domains/traces/components/traces-page-skeleton.cjs.js +1 -1
  179. package/dist/domains/traces/components/traces-page-skeleton.es.js +1 -1
  180. package/dist/domains/traces/hooks/use-traces-list-source.cjs.js +2 -2
  181. package/dist/domains/traces/hooks/use-traces-list-source.cjs.js.map +1 -1
  182. package/dist/domains/traces/hooks/use-traces-list-source.es.js +2 -2
  183. package/dist/domains/traces/hooks/use-traces-list-source.es.js.map +1 -1
  184. package/dist/domains/workflows/components/workflows-list/no-workflows-info.cjs.js +1 -1
  185. package/dist/domains/workflows/components/workflows-list/no-workflows-info.es.js +1 -1
  186. package/dist/domains/workflows/components/workflows-list/workflows-list.cjs.js +2 -2
  187. package/dist/domains/workflows/components/workflows-list/workflows-list.es.js +2 -2
  188. package/dist/domains/workspace/components/workspace-parts.cjs.js +1 -1
  189. package/dist/domains/workspace/components/workspace-parts.es.js +1 -1
  190. package/dist/domains/workspace/components/workspace-search.cjs.js +1 -1
  191. package/dist/domains/workspace/components/workspace-search.es.js +1 -1
  192. package/dist/ee/signals/components/entity-index-list.cjs.js +1 -1
  193. package/dist/ee/signals/components/entity-index-list.es.js +1 -1
  194. package/dist/ee/signals/components/trace-intelligence-entity-detail.cjs.js +1 -1
  195. package/dist/ee/signals/components/trace-intelligence-entity-detail.es.js +1 -1
  196. package/dist/ee/signals/components/trace-intelligence-entity-index.cjs.js +8 -7
  197. package/dist/ee/signals/components/trace-intelligence-entity-index.cjs.js.map +1 -1
  198. package/dist/ee/signals/components/trace-intelligence-entity-index.es.js +8 -7
  199. package/dist/ee/signals/components/trace-intelligence-entity-index.es.js.map +1 -1
  200. package/dist/ee/topics/components/topic-trace-summary-list.cjs.js +1 -1
  201. package/dist/ee/topics/components/topic-trace-summary-list.es.js +1 -1
  202. package/dist/{filter-bar-chip-jOPeM21t.js → filter-bar-chip-DBkPWlc-.js} +54 -32
  203. package/dist/filter-bar-chip-DBkPWlc-.js.map +1 -0
  204. package/dist/{filter-bar-chip-Bhn7lo4e.cjs → filter-bar-chip-DgdVLscK.cjs} +52 -30
  205. package/dist/filter-bar-chip-DgdVLscK.cjs.map +1 -0
  206. package/dist/{filter-bar-time-range-C099qEMm.cjs → filter-bar-time-range-BUmb3A1m.cjs} +2 -2
  207. package/dist/{filter-bar-time-range-C099qEMm.cjs.map → filter-bar-time-range-BUmb3A1m.cjs.map} +1 -1
  208. package/dist/{filter-bar-time-range-B1XhplO7.js → filter-bar-time-range-CtK8Dlp-.js} +2 -2
  209. package/dist/{filter-bar-time-range-B1XhplO7.js.map → filter-bar-time-range-CtK8Dlp-.js.map} +1 -1
  210. package/dist/icons/AgentIcon.cjs.js +3 -3
  211. package/dist/icons/AgentIcon.cjs.js.map +1 -1
  212. package/dist/icons/AgentIcon.es.js +3 -3
  213. package/dist/icons/AgentIcon.es.js.map +1 -1
  214. package/dist/icons/McpServerIcon.cjs.js +3 -3
  215. package/dist/icons/McpServerIcon.cjs.js.map +1 -1
  216. package/dist/icons/McpServerIcon.es.js +3 -3
  217. package/dist/icons/McpServerIcon.es.js.map +1 -1
  218. package/dist/icons/WorkflowIcon.cjs.js +2 -2
  219. package/dist/icons/WorkflowIcon.cjs.js.map +1 -1
  220. package/dist/icons/WorkflowIcon.es.js +2 -2
  221. package/dist/icons/WorkflowIcon.es.js.map +1 -1
  222. package/dist/{input-group-CCSyY4J5.js → input-group-1OAXTPnG.js} +7 -5
  223. package/dist/input-group-1OAXTPnG.js.map +1 -0
  224. package/dist/{input-group-Da8HBo30.cjs → input-group-BrBYp1gP.cjs} +6 -4
  225. package/dist/input-group-BrBYp1gP.cjs.map +1 -0
  226. package/dist/layout/tabbed-container.cjs.js +1 -1
  227. package/dist/layout/tabbed-container.es.js +1 -1
  228. package/dist/src/domains/dashboards/index.d.ts +2 -0
  229. package/dist/src/domains/dashboards/kinds/index.d.ts +8 -4
  230. package/dist/src/domains/dashboards/kinds/kpis/index.d.ts +3 -3
  231. package/dist/src/domains/dashboards/kinds/kpis/options.d.ts +22 -0
  232. package/dist/src/domains/dashboards/kinds/timeseries/index.d.ts +6 -4
  233. package/dist/src/domains/observability/hooks/use-observability-list-filters.d.ts +5 -1
  234. package/dist/src/domains/observability/lib/text-search-filter.d.ts +3 -0
  235. package/dist/src/domains/observability/lib/text-search.d.ts +2 -0
  236. package/dist/src/domains/spans/components/spans-explorer-histogram.d.ts +3 -1
  237. package/dist/src/domains/spans/components/spans-filter-bar.d.ts +4 -1
  238. package/dist/src/domains/spans/hooks/use-spans-filter-bar.d.ts +5 -2
  239. package/dist/src/domains/traces/components/traces-explorer/traces-explorer-actions.d.ts +1 -0
  240. package/dist/src/domains/traces/components/traces-explorer/traces-explorer-context.d.ts +4 -0
  241. package/dist/src/ds/components/EmptyState/empty-state-illustration.d.ts +1 -1
  242. package/dist/src/ds/components/EmptyState/illustrations/no-alerts-art.d.ts +1 -0
  243. package/dist/src/ds/components/EmptyState/illustrations/no-destinations-art.d.ts +3 -0
  244. package/dist/src/ds/components/FilterBar/types.d.ts +6 -0
  245. package/dist/src/ds/components/FilterBar/use-value-step.d.ts +1 -0
  246. package/dist/src/ds/components/FormFieldBlocks/index.d.ts +0 -1
  247. package/dist/src/ds/components/InputGroup/input-group.d.ts +1 -1
  248. package/dist/src/ds/components/SearchInput/index.d.ts +1 -0
  249. package/dist/src/ds/components/SearchInput/list-search-props.d.ts +6 -0
  250. package/dist/src/ds/components/SearchInput/search-input.d.ts +26 -3
  251. package/dist/src/ds/components/Sidebar/footer/sidebar-meter.d.ts +8 -0
  252. package/dist/src/ds/components/Sidebar/index.d.ts +1 -0
  253. package/dist/src/ds/components/Sidebar/root/sidebar-provider.d.ts +4 -4
  254. package/dist/src/ds/components/Sidebar/root/sidebar-widths.d.ts +7 -0
  255. package/dist/src/ds/layout/tabbed-container/tabbed-container-root.d.ts +5 -2
  256. package/dist/style.css +111 -41
  257. package/dist/{tabbed-container-yJX9GClR.js → tabbed-container-CZYkYekf.js} +11 -6
  258. package/dist/tabbed-container-CZYkYekf.js.map +1 -0
  259. package/dist/{tabbed-container--5P96PDX.cjs → tabbed-container-DHfamugk.cjs} +11 -6
  260. package/dist/tabbed-container-DHfamugk.cjs.map +1 -0
  261. package/dist/{types-BwdKiX24.js → types-CCm0-NSE.js} +2 -2
  262. package/dist/{types-BwdKiX24.js.map → types-CCm0-NSE.js.map} +1 -1
  263. package/dist/types-CP7wbYua.cjs.map +1 -1
  264. package/dist/{types-KjLUPShK.cjs → types-CqdYjhgk.cjs} +2 -2
  265. package/dist/{types-KjLUPShK.cjs.map → types-CqdYjhgk.cjs.map} +1 -1
  266. package/dist/types-DiiL5mTO.js.map +1 -1
  267. package/oxlint/index.js +1 -1
  268. package/package.json +7 -7
  269. package/dist/EmptyState-Dc-sP95H.cjs.map +0 -1
  270. package/dist/EmptyState-i88y1x75.js.map +0 -1
  271. package/dist/FilterBar-DY6aXUnv.cjs.map +0 -1
  272. package/dist/FilterBar-PhVKghDp.js.map +0 -1
  273. package/dist/components/ListSearch.cjs.js +0 -3
  274. package/dist/components/ListSearch.d.ts +0 -1
  275. package/dist/components/ListSearch.es.js +0 -1
  276. package/dist/data-list-1JOwQrF5.cjs.map +0 -1
  277. package/dist/data-list-DM8WpKCm.js.map +0 -1
  278. package/dist/filter-bar-chip-Bhn7lo4e.cjs.map +0 -1
  279. package/dist/filter-bar-chip-jOPeM21t.js.map +0 -1
  280. package/dist/input-group-CCSyY4J5.js.map +0 -1
  281. package/dist/input-group-Da8HBo30.cjs.map +0 -1
  282. package/dist/list-search-DUcIMJTk.js +0 -45
  283. package/dist/list-search-DUcIMJTk.js.map +0 -1
  284. package/dist/list-search-yF02rvZt.cjs +0 -50
  285. package/dist/list-search-yF02rvZt.cjs.map +0 -1
  286. package/dist/src/ds/components/FormFieldBlocks/fields/search-field-block.d.ts +0 -26
  287. package/dist/src/ds/components/ListSearch/index.d.ts +0 -1
  288. package/dist/src/ds/components/ListSearch/list-search.d.ts +0 -21
  289. package/dist/tabbed-container--5P96PDX.cjs.map +0 -1
  290. package/dist/tabbed-container-yJX9GClR.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"FormFieldBlocks.cjs.js","names":["cn","cn","fieldErrorId","FieldBlock","VisuallyHidden","Input","fieldErrorId","FieldBlock","VisuallyHidden","Textarea","useRef","Tooltip","TooltipTrigger","Button","SearchIcon","TooltipContent","FieldBlock","Input","fieldErrorId","cn","XIcon","FieldBlock","VisuallyHidden","Select","SelectTrigger","fieldErrorId","SelectValue","SelectContent","SelectItem"],"sources":["../../src/ds/components/FormFieldBlocks/layout/field-blocks-layout-column.tsx","../../src/ds/components/FormFieldBlocks/layout/field-blocks-layout-root.tsx","../../src/ds/components/FormFieldBlocks/layout/field-blocks-layout.tsx","../../src/ds/components/FormFieldBlocks/fields/text-field-block.tsx","../../src/ds/components/FormFieldBlocks/fields/textarea-field-block.tsx","../../src/ds/components/FormFieldBlocks/fields/search-field-block.tsx","../../src/ds/components/FormFieldBlocks/fields/select-field-block.tsx"],"sourcesContent":["import { cn } from '@/lib/utils';\n\nexport type FieldBlocksLayoutColumnProps = {\n children: React.ReactNode;\n className?: string;\n};\n\nexport function FieldBlocksLayoutColumn({ children, className }: FieldBlocksLayoutColumnProps) {\n return <div className={cn('grid content-start gap-6', className)}>{children}</div>;\n}\n","import { cn } from '@/lib/utils';\n\nexport type FieldBlocksLayoutRootProps = {\n children: React.ReactNode;\n className?: string;\n columns?: 1 | 2;\n gap?: string;\n};\n\nexport function FieldBlocksLayoutRoot({ children, className, columns = 1, gap }: FieldBlocksLayoutRootProps) {\n return (\n <div\n className={cn(\n 'grid',\n {\n 'grid-cols-1': columns === 1,\n 'grid-cols-2': columns === 2,\n },\n gap ?? 'gap-6',\n className,\n )}\n >\n {children}\n </div>\n );\n}\n","import { FieldBlocksLayoutColumn } from './field-blocks-layout-column';\nimport { FieldBlocksLayoutRoot } from './field-blocks-layout-root';\n\n/** @deprecated Lay fields out with plain grid or flex classes; `FieldGroup` stacks related fields. */\nexport const FieldBlocksLayout = Object.assign(FieldBlocksLayoutRoot, {\n Column: FieldBlocksLayoutColumn,\n});\n","import { Input } from '../../Input';\nimport type { InputProps } from '../../Input';\nimport { FieldBlock } from '../block/field-block';\nimport type { FieldBlockErrorMsgProps } from '../block/field-block-error-msg';\nimport type { FieldBlockHelpTextProps } from '../block/field-block-help-text';\nimport type { FieldBlockLabelProps } from '../block/field-block-label';\nimport type { FieldBlockLayoutProps } from '../block/field-block-layout';\nimport { fieldErrorId } from '../block/field-error-id';\nimport { VisuallyHidden } from '@/ds/primitives/visually-hidden';\n\nexport type TextFieldBlockProps = Pick<FieldBlockLayoutProps, 'layout' | 'labelColumnWidth'> &\n Omit<InputProps, 'name' | 'size'> & {\n name: string;\n labelIsHidden?: boolean;\n label?: FieldBlockLabelProps['children'];\n labelSize?: FieldBlockLabelProps['size'];\n helpText?: FieldBlockHelpTextProps['children'];\n errorMsg?: FieldBlockErrorMsgProps['children'];\n size?: InputProps['size'];\n };\n\n/** @deprecated Use `Field` + `FieldLabel` + `Input`. */\nexport function TextFieldBlock({\n name,\n value,\n label,\n labelIsHidden = false,\n labelColumnWidth,\n helpText,\n error,\n errorMsg,\n required = false,\n disabled = false,\n labelSize,\n layout = 'vertical',\n placeholder,\n size = 'md',\n testId,\n className,\n 'aria-describedby': ariaDescribedBy,\n ...props\n}: TextFieldBlockProps) {\n const describedBy =\n [ariaDescribedBy, errorMsg ? fieldErrorId(name) : undefined].filter(Boolean).join(' ') || undefined;\n\n return (\n <FieldBlock.Layout layout={layout} labelColumnWidth={labelColumnWidth} className={className}>\n {layout === 'horizontal' ? (\n <FieldBlock.Column>\n <FieldBlock.Label name={name} required={required} disabled={disabled} size={labelSize || 'bigger'}>\n {labelIsHidden ? <VisuallyHidden>{label}</VisuallyHidden> : label}\n </FieldBlock.Label>\n </FieldBlock.Column>\n ) : null}\n <FieldBlock.Column>\n {!labelIsHidden && layout === 'vertical' ? (\n <FieldBlock.Label name={name} required={required} disabled={disabled} size={labelSize || 'default'}>\n {label}\n </FieldBlock.Label>\n ) : null}\n <FieldBlock.Column className=\"gap-1\">\n <Input\n id={`input-${name}`}\n name={name}\n disabled={disabled}\n required={required}\n value={value}\n placeholder={placeholder}\n data-testid={testId}\n size={size}\n error={error || Boolean(errorMsg)}\n aria-describedby={describedBy}\n {...props}\n />\n {helpText || errorMsg ? <FieldBlock.Message name={name} helpText={helpText} errorMsg={errorMsg} /> : null}\n </FieldBlock.Column>\n </FieldBlock.Column>\n </FieldBlock.Layout>\n );\n}\n","import { Textarea } from '../../Textarea';\nimport type { TextareaProps } from '../../Textarea';\nimport { FieldBlock } from '../block/field-block';\nimport type { FieldBlockErrorMsgProps } from '../block/field-block-error-msg';\nimport type { FieldBlockHelpTextProps } from '../block/field-block-help-text';\nimport type { FieldBlockLabelProps } from '../block/field-block-label';\nimport type { FieldBlockLayoutProps } from '../block/field-block-layout';\nimport { fieldErrorId } from '../block/field-error-id';\nimport { VisuallyHidden } from '@/ds/primitives/visually-hidden';\n\nexport type TextareaFieldBlockProps = Pick<FieldBlockLayoutProps, 'layout' | 'labelColumnWidth'> &\n Omit<TextareaProps, 'name' | 'size'> & {\n name: string;\n labelIsHidden?: boolean;\n label?: FieldBlockLabelProps['children'];\n labelSize?: FieldBlockLabelProps['size'];\n helpText?: FieldBlockHelpTextProps['children'];\n errorMsg?: FieldBlockErrorMsgProps['children'];\n size?: TextareaProps['size'];\n };\n\n/** @deprecated Use `Field` + `FieldLabel` + `Textarea`. */\nexport function TextareaFieldBlock({\n name,\n label,\n labelIsHidden = false,\n labelColumnWidth,\n helpText,\n error,\n errorMsg,\n required = false,\n disabled = false,\n labelSize,\n layout = 'vertical',\n size = 'md',\n testId,\n className,\n 'aria-describedby': ariaDescribedBy,\n ...props\n}: TextareaFieldBlockProps) {\n const describedBy =\n [ariaDescribedBy, errorMsg ? fieldErrorId(name) : undefined].filter(Boolean).join(' ') || undefined;\n\n return (\n <FieldBlock.Layout layout={layout} labelColumnWidth={labelColumnWidth} className={className}>\n {layout === 'horizontal' ? (\n <FieldBlock.Column>\n <FieldBlock.Label name={name} required={required} disabled={disabled} size={labelSize || 'bigger'}>\n {labelIsHidden ? <VisuallyHidden>{label}</VisuallyHidden> : label}\n </FieldBlock.Label>\n </FieldBlock.Column>\n ) : null}\n <FieldBlock.Column>\n {!labelIsHidden && layout === 'vertical' ? (\n <FieldBlock.Label name={name} required={required} disabled={disabled} size={labelSize || 'default'}>\n {label}\n </FieldBlock.Label>\n ) : null}\n <FieldBlock.Column className=\"gap-1\">\n <Textarea\n id={`input-${name}`}\n name={name}\n disabled={disabled}\n required={required}\n size={size}\n data-testid={testId}\n error={error || Boolean(errorMsg)}\n aria-describedby={describedBy}\n {...props}\n />\n {helpText || errorMsg ? <FieldBlock.Message name={name} helpText={helpText} errorMsg={errorMsg} /> : null}\n </FieldBlock.Column>\n </FieldBlock.Column>\n </FieldBlock.Layout>\n );\n}\n","import { SearchIcon, XIcon } from 'lucide-react';\nimport { useEffect, useRef } from 'react';\nimport type { RefObject } from 'react';\nimport { Button } from '../../Button';\nimport { Input } from '../../Input';\nimport type { InputProps } from '../../Input';\nimport { Tooltip, TooltipContent, TooltipTrigger } from '../../Tooltip';\nimport { FieldBlock } from '../block/field-block';\nimport { fieldErrorId } from '../block/field-error-id';\nimport { cn } from '@/lib/utils';\n\nexport type SearchFieldBlockProps = {\n name: string;\n testId?: string;\n label?: string;\n labelIsHidden?: boolean;\n required?: boolean;\n disabled?: boolean;\n value?: string;\n placeholder?: string;\n onChange?: (e: React.ChangeEvent<HTMLInputElement>) => void;\n onReset?: () => void;\n helpText?: string;\n error?: boolean;\n errorMsg?: string;\n layout?: 'horizontal' | 'vertical';\n className?: string;\n size?: InputProps['size'];\n isMinimized?: boolean;\n onMinimizedChange?: (minimized: boolean) => void;\n /** Gives the caller access to the underlying input, e.g. to focus it from a keyboard shortcut. */\n inputRef?: RefObject<HTMLInputElement | null>;\n};\n\n/** @deprecated Use `SearchInput`. */\nexport function SearchFieldBlock({\n name,\n helpText,\n error,\n errorMsg,\n required = false,\n disabled = false,\n value,\n label,\n labelIsHidden = false,\n layout = 'vertical',\n placeholder = 'Search',\n onChange,\n onReset,\n className,\n size,\n isMinimized,\n onMinimizedChange,\n inputRef: externalInputRef,\n}: SearchFieldBlockProps) {\n const inputRef = useRef<HTMLInputElement>(null);\n\n const setInputRef = (element: HTMLInputElement | null) => {\n inputRef.current = element;\n if (externalInputRef) externalInputRef.current = element;\n };\n useEffect(() => {\n if (isMinimized === false) {\n inputRef.current?.focus();\n }\n }, [isMinimized]);\n\n if (isMinimized) {\n return (\n <Tooltip>\n <TooltipTrigger asChild>\n <Button\n size={`icon-${size || 'sm'}`}\n aria-label={label || 'Search'}\n disabled={disabled}\n onClick={() => onMinimizedChange?.(false)}\n >\n <SearchIcon />\n </Button>\n </TooltipTrigger>\n <TooltipContent>{label || 'Search'}</TooltipContent>\n </Tooltip>\n );\n }\n\n return (\n <FieldBlock.Layout layout={layout} className={className}>\n {layout === 'horizontal' ? (\n <FieldBlock.Column className={labelIsHidden ? 'sr-only' : undefined}>\n <FieldBlock.Label name={name} required={required} disabled={disabled}>\n {label}\n </FieldBlock.Label>\n </FieldBlock.Column>\n ) : null}\n <FieldBlock.Column className={layout === 'horizontal' && labelIsHidden ? 'col-span-full' : undefined}>\n {layout === 'vertical' && label ? (\n <FieldBlock.Label\n name={name}\n required={required}\n disabled={disabled}\n className={labelIsHidden ? 'sr-only' : undefined}\n >\n {label}\n </FieldBlock.Label>\n ) : null}\n <FieldBlock.Column className=\"gap-1\">\n <div className=\"group relative\">\n <Input\n ref={setInputRef}\n id={`input-${name}`}\n name={name}\n disabled={disabled}\n value={value}\n placeholder={placeholder}\n onChange={onChange}\n size={size}\n error={error || Boolean(errorMsg)}\n aria-describedby={errorMsg ? fieldErrorId(name) : undefined}\n className={cn(size === 'sm' && 'px-8', (!size || size === 'md') && 'px-9', size === 'lg' && 'px-10')}\n />\n <SearchIcon\n aria-hidden=\"true\"\n className={cn(\n 'absolute top-1/2 left-3 -translate-y-1/2 text-muted-foreground',\n size === 'sm' && 'size-3.5',\n (!size || size === 'md') && 'size-4',\n size === 'lg' && 'size-[1.125rem]',\n )}\n />\n {onReset && (value || isMinimized === false) && (\n <Button\n variant=\"ghost\"\n size={`icon-${size || 'md'}`}\n aria-label=\"Clear search\"\n onClick={() => {\n if (value) {\n onReset();\n }\n if (isMinimized === false) {\n onMinimizedChange?.(true);\n }\n }}\n className=\"absolute top-1/2 right-0 -translate-y-1/2\"\n >\n <XIcon />\n </Button>\n )}\n </div>\n {helpText || errorMsg ? <FieldBlock.Message name={name} helpText={helpText} errorMsg={errorMsg} /> : null}\n </FieldBlock.Column>\n </FieldBlock.Column>\n </FieldBlock.Layout>\n );\n}\n","import type { SelectTriggerProps } from '../../Select/select';\nimport { FieldBlock } from '../block/field-block';\nimport type { FieldBlockErrorMsgProps } from '../block/field-block-error-msg';\nimport type { FieldBlockHelpTextProps } from '../block/field-block-help-text';\nimport type { FieldBlockLabelProps } from '../block/field-block-label';\nimport type { FieldBlockLayoutProps } from '../block/field-block-layout';\nimport { fieldErrorId } from '../block/field-error-id';\nimport { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from '@/ds/components/Select';\nimport { VisuallyHidden } from '@/ds/primitives/visually-hidden';\n\nexport type SelectFieldBlockProps = Pick<FieldBlockLayoutProps, 'layout' | 'labelColumnWidth'> &\n Pick<FieldBlockLabelProps, 'name' | 'required'> & {\n testId?: string;\n label?: string | null;\n labelIsHidden?: boolean;\n labelSize?: FieldBlockLabelProps['size'];\n disabled?: boolean;\n value?: string;\n options: { value: string; label: string }[];\n placeholder?: string;\n onValueChange: (value: string) => void;\n helpText?: FieldBlockHelpTextProps['children'];\n errorMsg?: FieldBlockErrorMsgProps['children'];\n error?: boolean;\n className?: string;\n size?: SelectTriggerProps['size'];\n };\n\n/** @deprecated Use `Field` + `FieldLabel` + `Select`. */\nexport function SelectFieldBlock({\n name,\n helpText,\n errorMsg,\n required = false,\n disabled = false,\n size = 'md',\n value,\n label,\n labelIsHidden = false,\n layout = 'vertical',\n labelColumnWidth,\n options,\n placeholder = 'Select an option',\n onValueChange,\n className,\n}: SelectFieldBlockProps) {\n return (\n <FieldBlock.Layout layout={layout} labelColumnWidth={labelColumnWidth} className={className}>\n {layout === 'horizontal' ? (\n <FieldBlock.Column>\n <FieldBlock.Label name={name} required={required} disabled={disabled}>\n {labelIsHidden ? <VisuallyHidden>{label}</VisuallyHidden> : label}\n </FieldBlock.Label>\n </FieldBlock.Column>\n ) : null}\n <FieldBlock.Column>\n {layout === 'vertical' && label && !labelIsHidden ? (\n <FieldBlock.Label name={name} required={required} disabled={disabled}>\n {label}\n </FieldBlock.Label>\n ) : null}\n <FieldBlock.Column className=\"gap-1\">\n <Select\n aria-label={labelIsHidden ? label : undefined}\n name={name}\n value={value}\n onValueChange={onValueChange}\n disabled={disabled}\n >\n <SelectTrigger\n id={`input-${name}`}\n size={size}\n aria-invalid={errorMsg ? true : undefined}\n aria-describedby={errorMsg ? fieldErrorId(name) : undefined}\n >\n <SelectValue placeholder={placeholder} />\n </SelectTrigger>\n <SelectContent>\n {options.map(option => (\n <SelectItem key={option.value} value={option.value}>\n {option.label}\n </SelectItem>\n ))}\n </SelectContent>\n </Select>\n {helpText || errorMsg ? <FieldBlock.Message name={name} helpText={helpText} errorMsg={errorMsg} /> : null}\n </FieldBlock.Column>\n </FieldBlock.Column>\n </FieldBlock.Layout>\n );\n}\n"],"mappings":";;;;;;;;;;;;;AAOA,SAAgB,wBAAwB,EAAE,UAAU,aAA2C;CAC7F,OAAO,iBAAA,GAAA,kBAAA,IAAA,CAAC,OAAD;EAAK,WAAWA,cAAAA,GAAG,4BAA4B,SAAS;EAAI;CAAc,CAAA;AACnF;;ACAA,SAAgB,sBAAsB,EAAE,UAAU,WAAW,UAAU,GAAG,OAAmC;CAC3G,OACE,iBAAA,GAAA,kBAAA,IAAA,CAAC,OAAD;EACE,WAAWC,cAAAA,GACT,QACA;GACE,eAAe,YAAY;GAC3B,eAAe,YAAY;EAC7B,GACA,OAAO,SACP,SACF;EAEC;CACE,CAAA;AAET;;;ACrBA,IAAa,oBAAoB,OAAO,OAAO,uBAAuB,EACpE,QAAQ,wBACV,CAAC;;;ACgBD,SAAgB,eAAe,EAC7B,MACA,OACA,OACA,gBAAgB,OAChB,kBACA,UACA,OACA,UACA,WAAW,OACX,WAAW,OACX,WACA,SAAS,YACT,aACA,OAAO,MACP,QACA,WACA,oBAAoB,iBACpB,GAAG,SACmB;CACtB,MAAM,cACJ,CAAC,iBAAiB,WAAWC,uBAAAA,aAAa,IAAI,IAAI,KAAA,CAAS,CAAC,CAAC,OAAO,OAAO,CAAC,CAAC,KAAK,GAAG,KAAK,KAAA;CAE5F,OACE,iBAAA,GAAA,kBAAA,KAAA,CAACC,uBAAAA,WAAW,QAAZ;EAA2B;EAA0B;EAA6B;EAAlF,UAAA,CACG,WAAW,eACV,iBAAA,GAAA,kBAAA,IAAA,CAACA,uBAAAA,WAAW,QAAZ,EAAA,UACE,iBAAA,GAAA,kBAAA,IAAA,CAACA,uBAAAA,WAAW,OAAZ;GAAwB;GAAgB;GAAoB;GAAU,MAAM,aAAa;GACtF,UAAA,gBAAgB,iBAAA,GAAA,kBAAA,IAAA,CAACC,gCAAAA,gBAAD,EAAA,UAA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oB;GAAW,CAAA,IAAI,IACpF;EACF,CAAA,CAAA,EAAA,CAAA,CACF;;AAEvB"}
1
+ {"version":3,"file":"FormFieldBlocks.cjs.js","names":["cn","cn","fieldErrorId","FieldBlock","VisuallyHidden","Input","fieldErrorId","FieldBlock","VisuallyHidden","Textarea","FieldBlock","VisuallyHidden","Select","SelectTrigger","fieldErrorId","SelectValue","SelectContent","SelectItem"],"sources":["../../src/ds/components/FormFieldBlocks/layout/field-blocks-layout-column.tsx","../../src/ds/components/FormFieldBlocks/layout/field-blocks-layout-root.tsx","../../src/ds/components/FormFieldBlocks/layout/field-blocks-layout.tsx","../../src/ds/components/FormFieldBlocks/fields/text-field-block.tsx","../../src/ds/components/FormFieldBlocks/fields/textarea-field-block.tsx","../../src/ds/components/FormFieldBlocks/fields/select-field-block.tsx"],"sourcesContent":["import { cn } from '@/lib/utils';\n\nexport type FieldBlocksLayoutColumnProps = {\n children: React.ReactNode;\n className?: string;\n};\n\nexport function FieldBlocksLayoutColumn({ children, className }: FieldBlocksLayoutColumnProps) {\n return <div className={cn('grid content-start gap-6', className)}>{children}</div>;\n}\n","import { cn } from '@/lib/utils';\n\nexport type FieldBlocksLayoutRootProps = {\n children: React.ReactNode;\n className?: string;\n columns?: 1 | 2;\n gap?: string;\n};\n\nexport function FieldBlocksLayoutRoot({ children, className, columns = 1, gap }: FieldBlocksLayoutRootProps) {\n return (\n <div\n className={cn(\n 'grid',\n {\n 'grid-cols-1': columns === 1,\n 'grid-cols-2': columns === 2,\n },\n gap ?? 'gap-6',\n className,\n )}\n >\n {children}\n </div>\n );\n}\n","import { FieldBlocksLayoutColumn } from './field-blocks-layout-column';\nimport { FieldBlocksLayoutRoot } from './field-blocks-layout-root';\n\n/** @deprecated Lay fields out with plain grid or flex classes; `FieldGroup` stacks related fields. */\nexport const FieldBlocksLayout = Object.assign(FieldBlocksLayoutRoot, {\n Column: FieldBlocksLayoutColumn,\n});\n","import { Input } from '../../Input';\nimport type { InputProps } from '../../Input';\nimport { FieldBlock } from '../block/field-block';\nimport type { FieldBlockErrorMsgProps } from '../block/field-block-error-msg';\nimport type { FieldBlockHelpTextProps } from '../block/field-block-help-text';\nimport type { FieldBlockLabelProps } from '../block/field-block-label';\nimport type { FieldBlockLayoutProps } from '../block/field-block-layout';\nimport { fieldErrorId } from '../block/field-error-id';\nimport { VisuallyHidden } from '@/ds/primitives/visually-hidden';\n\nexport type TextFieldBlockProps = Pick<FieldBlockLayoutProps, 'layout' | 'labelColumnWidth'> &\n Omit<InputProps, 'name' | 'size'> & {\n name: string;\n labelIsHidden?: boolean;\n label?: FieldBlockLabelProps['children'];\n labelSize?: FieldBlockLabelProps['size'];\n helpText?: FieldBlockHelpTextProps['children'];\n errorMsg?: FieldBlockErrorMsgProps['children'];\n size?: InputProps['size'];\n };\n\n/** @deprecated Use `Field` + `FieldLabel` + `Input`. */\nexport function TextFieldBlock({\n name,\n value,\n label,\n labelIsHidden = false,\n labelColumnWidth,\n helpText,\n error,\n errorMsg,\n required = false,\n disabled = false,\n labelSize,\n layout = 'vertical',\n placeholder,\n size = 'md',\n testId,\n className,\n 'aria-describedby': ariaDescribedBy,\n ...props\n}: TextFieldBlockProps) {\n const describedBy =\n [ariaDescribedBy, errorMsg ? fieldErrorId(name) : undefined].filter(Boolean).join(' ') || undefined;\n\n return (\n <FieldBlock.Layout layout={layout} labelColumnWidth={labelColumnWidth} className={className}>\n {layout === 'horizontal' ? (\n <FieldBlock.Column>\n <FieldBlock.Label name={name} required={required} disabled={disabled} size={labelSize || 'bigger'}>\n {labelIsHidden ? <VisuallyHidden>{label}</VisuallyHidden> : label}\n </FieldBlock.Label>\n </FieldBlock.Column>\n ) : null}\n <FieldBlock.Column>\n {!labelIsHidden && layout === 'vertical' ? (\n <FieldBlock.Label name={name} required={required} disabled={disabled} size={labelSize || 'default'}>\n {label}\n </FieldBlock.Label>\n ) : null}\n <FieldBlock.Column className=\"gap-1\">\n <Input\n id={`input-${name}`}\n name={name}\n disabled={disabled}\n required={required}\n value={value}\n placeholder={placeholder}\n data-testid={testId}\n size={size}\n error={error || Boolean(errorMsg)}\n aria-describedby={describedBy}\n {...props}\n />\n {helpText || errorMsg ? <FieldBlock.Message name={name} helpText={helpText} errorMsg={errorMsg} /> : null}\n </FieldBlock.Column>\n </FieldBlock.Column>\n </FieldBlock.Layout>\n );\n}\n","import { Textarea } from '../../Textarea';\nimport type { TextareaProps } from '../../Textarea';\nimport { FieldBlock } from '../block/field-block';\nimport type { FieldBlockErrorMsgProps } from '../block/field-block-error-msg';\nimport type { FieldBlockHelpTextProps } from '../block/field-block-help-text';\nimport type { FieldBlockLabelProps } from '../block/field-block-label';\nimport type { FieldBlockLayoutProps } from '../block/field-block-layout';\nimport { fieldErrorId } from '../block/field-error-id';\nimport { VisuallyHidden } from '@/ds/primitives/visually-hidden';\n\nexport type TextareaFieldBlockProps = Pick<FieldBlockLayoutProps, 'layout' | 'labelColumnWidth'> &\n Omit<TextareaProps, 'name' | 'size'> & {\n name: string;\n labelIsHidden?: boolean;\n label?: FieldBlockLabelProps['children'];\n labelSize?: FieldBlockLabelProps['size'];\n helpText?: FieldBlockHelpTextProps['children'];\n errorMsg?: FieldBlockErrorMsgProps['children'];\n size?: TextareaProps['size'];\n };\n\n/** @deprecated Use `Field` + `FieldLabel` + `Textarea`. */\nexport function TextareaFieldBlock({\n name,\n label,\n labelIsHidden = false,\n labelColumnWidth,\n helpText,\n error,\n errorMsg,\n required = false,\n disabled = false,\n labelSize,\n layout = 'vertical',\n size = 'md',\n testId,\n className,\n 'aria-describedby': ariaDescribedBy,\n ...props\n}: TextareaFieldBlockProps) {\n const describedBy =\n [ariaDescribedBy, errorMsg ? fieldErrorId(name) : undefined].filter(Boolean).join(' ') || undefined;\n\n return (\n <FieldBlock.Layout layout={layout} labelColumnWidth={labelColumnWidth} className={className}>\n {layout === 'horizontal' ? (\n <FieldBlock.Column>\n <FieldBlock.Label name={name} required={required} disabled={disabled} size={labelSize || 'bigger'}>\n {labelIsHidden ? <VisuallyHidden>{label}</VisuallyHidden> : label}\n </FieldBlock.Label>\n </FieldBlock.Column>\n ) : null}\n <FieldBlock.Column>\n {!labelIsHidden && layout === 'vertical' ? (\n <FieldBlock.Label name={name} required={required} disabled={disabled} size={labelSize || 'default'}>\n {label}\n </FieldBlock.Label>\n ) : null}\n <FieldBlock.Column className=\"gap-1\">\n <Textarea\n id={`input-${name}`}\n name={name}\n disabled={disabled}\n required={required}\n size={size}\n data-testid={testId}\n error={error || Boolean(errorMsg)}\n aria-describedby={describedBy}\n {...props}\n />\n {helpText || errorMsg ? <FieldBlock.Message name={name} helpText={helpText} errorMsg={errorMsg} /> : null}\n </FieldBlock.Column>\n </FieldBlock.Column>\n </FieldBlock.Layout>\n );\n}\n","import type { SelectTriggerProps } from '../../Select/select';\nimport { FieldBlock } from '../block/field-block';\nimport type { FieldBlockErrorMsgProps } from '../block/field-block-error-msg';\nimport type { FieldBlockHelpTextProps } from '../block/field-block-help-text';\nimport type { FieldBlockLabelProps } from '../block/field-block-label';\nimport type { FieldBlockLayoutProps } from '../block/field-block-layout';\nimport { fieldErrorId } from '../block/field-error-id';\nimport { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from '@/ds/components/Select';\nimport { VisuallyHidden } from '@/ds/primitives/visually-hidden';\n\nexport type SelectFieldBlockProps = Pick<FieldBlockLayoutProps, 'layout' | 'labelColumnWidth'> &\n Pick<FieldBlockLabelProps, 'name' | 'required'> & {\n testId?: string;\n label?: string | null;\n labelIsHidden?: boolean;\n labelSize?: FieldBlockLabelProps['size'];\n disabled?: boolean;\n value?: string;\n options: { value: string; label: string }[];\n placeholder?: string;\n onValueChange: (value: string) => void;\n helpText?: FieldBlockHelpTextProps['children'];\n errorMsg?: FieldBlockErrorMsgProps['children'];\n error?: boolean;\n className?: string;\n size?: SelectTriggerProps['size'];\n };\n\n/** @deprecated Use `Field` + `FieldLabel` + `Select`. */\nexport function SelectFieldBlock({\n name,\n helpText,\n errorMsg,\n required = false,\n disabled = false,\n size = 'md',\n value,\n label,\n labelIsHidden = false,\n layout = 'vertical',\n labelColumnWidth,\n options,\n placeholder = 'Select an option',\n onValueChange,\n className,\n}: SelectFieldBlockProps) {\n return (\n <FieldBlock.Layout layout={layout} labelColumnWidth={labelColumnWidth} className={className}>\n {layout === 'horizontal' ? (\n <FieldBlock.Column>\n <FieldBlock.Label name={name} required={required} disabled={disabled}>\n {labelIsHidden ? <VisuallyHidden>{label}</VisuallyHidden> : label}\n </FieldBlock.Label>\n </FieldBlock.Column>\n ) : null}\n <FieldBlock.Column>\n {layout === 'vertical' && label && !labelIsHidden ? (\n <FieldBlock.Label name={name} required={required} disabled={disabled}>\n {label}\n </FieldBlock.Label>\n ) : null}\n <FieldBlock.Column className=\"gap-1\">\n <Select\n aria-label={labelIsHidden ? label : undefined}\n name={name}\n value={value}\n onValueChange={onValueChange}\n disabled={disabled}\n >\n <SelectTrigger\n id={`input-${name}`}\n size={size}\n aria-invalid={errorMsg ? true : undefined}\n aria-describedby={errorMsg ? fieldErrorId(name) : undefined}\n >\n <SelectValue placeholder={placeholder} />\n </SelectTrigger>\n <SelectContent>\n {options.map(option => (\n <SelectItem key={option.value} value={option.value}>\n {option.label}\n </SelectItem>\n ))}\n </SelectContent>\n </Select>\n {helpText || errorMsg ? <FieldBlock.Message name={name} helpText={helpText} errorMsg={errorMsg} /> : null}\n </FieldBlock.Column>\n </FieldBlock.Column>\n </FieldBlock.Layout>\n );\n}\n"],"mappings":";;;;;;;;;AAOA,SAAgB,wBAAwB,EAAE,UAAU,aAA2C;CAC7F,OAAO,iBAAA,GAAA,kBAAA,IAAA,CAAC,OAAD;EAAK,WAAWA,cAAAA,GAAG,4BAA4B,SAAS;EAAI;CAAc,CAAA;AACnF;;ACAA,SAAgB,sBAAsB,EAAE,UAAU,WAAW,UAAU,GAAG,OAAmC;CAC3G,OACE,iBAAA,GAAA,kBAAA,IAAA,CAAC,OAAD;EACE,WAAWC,cAAAA,GACT,QACA;GACE,eAAe,YAAY;GAC3B,e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BAAA,KAAA,CAACE,eAAAA,QAAD;IACE,cAAY,gBAAgB,QAAQ,KAAA;IAC9B;IACC;IACQ;IACL;IALZ,UAAA,CAOE,iBAAA,GAAA,kBAAA,IAAA,CAACC,eAAAA,eAAD;KACE,IAAI,SAAS;KACP;KACN,gBAAc,WAAW,OAAO,KAAA;KAChC,oBAAkB,WAAWC,uBAAAA,aAAa,IAAI,IAAI,KAAA;KAElD,UAAA,iBAAA,GAAA,kBAAA,IAAA,CAACC,eAAAA,aAAD,EAA0B,YAAc,CAAA;IAC3B,CAAA,GACf,iBAAA,GAAA,kBAAA,IAAA,CAACC,eAAAA,eAAD,EAAA,UACG,QAAQ,KAAI,WACX,iBAAA,GAAA,kBAAA,IAAA,CAACC,eAAAA,YAAD;KAA+B,OAAO,OAAO;KAC1C,UAAA,OAAO;IACE,GAFK,OAAO,KAEZ,CACb,EACY,CAAA,CACT;GACP,CAAA,GAAA,YAAY,WAAW,iBAAA,GAAA,kBAAA,IAAA,CAACP,uBAAAA,WAAW,SAAZ;IAA0B;IAAgB;IAAoB;GAAW,CAAA,IAAI,IACpF;EACF,CAAA,CAAA,EAAA,CAAA,CACF;;AAEvB"}
@@ -3,12 +3,8 @@ import { t as cn } from "../utils-DQx8TpNT.js";
3
3
  import { t as Input } from "../input-DqReKX0A.js";
4
4
  import { VisuallyHidden } from "../primitives/visually-hidden.es.js";
5
5
  import { Textarea } from "./Textarea.es.js";
6
- import { t as Button } from "../Button-Bi7aXd_G.js";
7
- import { i as TooltipTrigger, n as TooltipContent, t as Tooltip } from "../tooltip-DJcze2VZ.js";
8
6
  import { i as SelectItem, n as SelectContent, o as SelectTrigger, s as SelectValue, t as Select } from "../select-DkAAWqHI.js";
9
- import { useEffect, useRef } from "react";
10
7
  import { jsx, jsxs } from "react/jsx-runtime";
11
- import { SearchIcon, XIcon } from "lucide-react";
12
8
  // src/ds/components/FormFieldBlocks/layout/field-blocks-layout-column.tsx
13
9
  function FieldBlocksLayoutColumn({ children, className }) {
14
10
  return /* @__PURE__ */ jsx("div", {
@@ -111,89 +107,6 @@ function TextareaFieldBlock({ name, label, labelIsHidden = false, labelColumnWid
111
107
  })] })]
112
108
  });
113
109
  }
114
- // src/ds/components/FormFieldBlocks/fields/search-field-block.tsx
115
- /** @deprecated Use `SearchInput`. */
116
- function SearchFieldBlock({ name, helpText, error, errorMsg, required = false, disabled = false, value, label, labelIsHidden = false, layout = "vertical", placeholder = "Search", onChange, onReset, className, size, isMinimized, onMinimizedChange, inputRef: externalInputRef }) {
117
- const inputRef = useRef(null);
118
- const setInputRef = (element) => {
119
- inputRef.current = element;
120
- if (externalInputRef) externalInputRef.current = element;
121
- };
122
- useEffect(() => {
123
- if (isMinimized === false) inputRef.current?.focus();
124
- }, [isMinimized]);
125
- if (isMinimized) return /* @__PURE__ */ jsxs(Tooltip, { children: [/* @__PURE__ */ jsx(TooltipTrigger, {
126
- asChild: true,
127
- children: /* @__PURE__ */ jsx(Button, {
128
- size: `icon-${size || "sm"}`,
129
- "aria-label": label || "Search",
130
- disabled,
131
- onClick: () => onMinimizedChange?.(false),
132
- children: /* @__PURE__ */ jsx(SearchIcon, {})
133
- })
134
- }), /* @__PURE__ */ jsx(TooltipContent, { children: label || "Search" })] });
135
- return /* @__PURE__ */ jsxs(FieldBlock.Layout, {
136
- layout,
137
- className,
138
- children: [layout === "horizontal" ? /* @__PURE__ */ jsx(FieldBlock.Column, {
139
- className: labelIsHidden ? "sr-only" : void 0,
140
- children: /* @__PURE__ */ jsx(FieldBlock.Label, {
141
- name,
142
- required,
143
- disabled,
144
- children: label
145
- })
146
- }) : null, /* @__PURE__ */ jsxs(FieldBlock.Column, {
147
- className: layout === "horizontal" && labelIsHidden ? "col-span-full" : void 0,
148
- children: [layout === "vertical" && label ? /* @__PURE__ */ jsx(FieldBlock.Label, {
149
- name,
150
- required,
151
- disabled,
152
- className: labelIsHidden ? "sr-only" : void 0,
153
- children: label
154
- }) : null, /* @__PURE__ */ jsxs(FieldBlock.Column, {
155
- className: "gap-1",
156
- children: [/* @__PURE__ */ jsxs("div", {
157
- className: "group relative",
158
- children: [
159
- /* @__PURE__ */ jsx(Input, {
160
- ref: setInputRef,
161
- id: `input-${name}`,
162
- name,
163
- disabled,
164
- value,
165
- placeholder,
166
- onChange,
167
- size,
168
- error: error || Boolean(errorMsg),
169
- "aria-describedby": errorMsg ? fieldErrorId(name) : void 0,
170
- className: cn(size === "sm" && "px-8", (!size || size === "md") && "px-9", size === "lg" && "px-10")
171
- }),
172
- /* @__PURE__ */ jsx(SearchIcon, {
173
- "aria-hidden": "true",
174
- className: cn("absolute top-1/2 left-3 -translate-y-1/2 text-muted-foreground", size === "sm" && "size-3.5", (!size || size === "md") && "size-4", size === "lg" && "size-[1.125rem]")
175
- }),
176
- onReset && (value || isMinimized === false) && /* @__PURE__ */ jsx(Button, {
177
- variant: "ghost",
178
- size: `icon-${size || "md"}`,
179
- "aria-label": "Clear search",
180
- onClick: () => {
181
- if (value) onReset();
182
- if (isMinimized === false) onMinimizedChange?.(true);
183
- },
184
- className: "absolute top-1/2 right-0 -translate-y-1/2",
185
- children: /* @__PURE__ */ jsx(XIcon, {})
186
- })
187
- ]
188
- }), helpText || errorMsg ? /* @__PURE__ */ jsx(FieldBlock.Message, {
189
- name,
190
- helpText,
191
- errorMsg
192
- }) : null]
193
- })]
194
- })]
195
- });
196
- }
197
110
  // src/ds/components/FormFieldBlocks/fields/select-field-block.tsx
198
111
  /** @deprecated Use `Field` + `FieldLabel` + `Select`. */
199
112
  function SelectFieldBlock({ name, helpText, errorMsg, required = false, disabled = false, size = "md", value, label, labelIsHidden = false, layout = "vertical", labelColumnWidth, options, placeholder = "Select an option", onValueChange, className }) {
@@ -237,6 +150,6 @@ function SelectFieldBlock({ name, helpText, errorMsg, required = false, disabled
237
150
  })] })]
238
151
  });
239
152
  }
240
- export { FieldBlock, FieldBlocksLayout, SearchFieldBlock, SelectFieldBlock, TextFieldBlock, TextareaFieldBlock, fieldErrorId };
153
+ export { FieldBlock, FieldBlocksLayout, SelectFieldBlock, TextFieldBlock, TextareaFieldBlock, fieldErrorId };
241
154
 
242
155
  //# sourceMappingURL=FormFieldBlocks.es.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"FormFieldBlocks.es.js","names":[],"sources":["../../src/ds/components/FormFieldBlocks/layout/field-blocks-layout-column.tsx","../../src/ds/components/FormFieldBlocks/layout/field-blocks-layout-root.tsx","../../src/ds/components/FormFieldBlocks/layout/field-blocks-layout.tsx","../../src/ds/components/FormFieldBlocks/fields/text-field-block.tsx","../../src/ds/components/FormFieldBlocks/fields/textarea-field-block.tsx","../../src/ds/components/FormFieldBlocks/fields/search-field-block.tsx","../../src/ds/components/FormFieldBlocks/fields/select-field-block.tsx"],"sourcesContent":["import { cn } from '@/lib/utils';\n\nexport type FieldBlocksLayoutColumnProps = {\n children: React.ReactNode;\n className?: string;\n};\n\nexport function FieldBlocksLayoutColumn({ children, className }: FieldBlocksLayoutColumnProps) {\n return <div className={cn('grid content-start gap-6', className)}>{children}</div>;\n}\n","import { cn } from '@/lib/utils';\n\nexport type FieldBlocksLayoutRootProps = {\n children: React.ReactNode;\n className?: string;\n columns?: 1 | 2;\n gap?: string;\n};\n\nexport function FieldBlocksLayoutRoot({ children, className, columns = 1, gap }: FieldBlocksLayoutRootProps) {\n return (\n <div\n className={cn(\n 'grid',\n {\n 'grid-cols-1': columns === 1,\n 'grid-cols-2': columns === 2,\n },\n gap ?? 'gap-6',\n className,\n )}\n >\n {children}\n </div>\n );\n}\n","import { FieldBlocksLayoutColumn } from './field-blocks-layout-column';\nimport { FieldBlocksLayoutRoot } from './field-blocks-layout-root';\n\n/** @deprecated Lay fields out with plain grid or flex classes; `FieldGroup` stacks related fields. */\nexport const FieldBlocksLayout = Object.assign(FieldBlocksLayoutRoot, {\n Column: FieldBlocksLayoutColumn,\n});\n","import { Input } from '../../Input';\nimport type { InputProps } from '../../Input';\nimport { FieldBlock } from '../block/field-block';\nimport type { FieldBlockErrorMsgProps } from '../block/field-block-error-msg';\nimport type { FieldBlockHelpTextProps } from '../block/field-block-help-text';\nimport type { FieldBlockLabelProps } from '../block/field-block-label';\nimport type { FieldBlockLayoutProps } from '../block/field-block-layout';\nimport { fieldErrorId } from '../block/field-error-id';\nimport { VisuallyHidden } from '@/ds/primitives/visually-hidden';\n\nexport type TextFieldBlockProps = Pick<FieldBlockLayoutProps, 'layout' | 'labelColumnWidth'> &\n Omit<InputProps, 'name' | 'size'> & {\n name: string;\n labelIsHidden?: boolean;\n label?: FieldBlockLabelProps['children'];\n labelSize?: FieldBlockLabelProps['size'];\n helpText?: FieldBlockHelpTextProps['children'];\n errorMsg?: FieldBlockErrorMsgProps['children'];\n size?: InputProps['size'];\n };\n\n/** @deprecated Use `Field` + `FieldLabel` + `Input`. */\nexport function TextFieldBlock({\n name,\n value,\n label,\n labelIsHidden = false,\n labelColumnWidth,\n helpText,\n error,\n errorMsg,\n required = false,\n disabled = false,\n labelSize,\n layout = 'vertical',\n placeholder,\n size = 'md',\n testId,\n className,\n 'aria-describedby': ariaDescribedBy,\n ...props\n}: TextFieldBlockProps) {\n const describedBy =\n [ariaDescribedBy, errorMsg ? fieldErrorId(name) : undefined].filter(Boolean).join(' ') || undefined;\n\n return (\n <FieldBlock.Layout layout={layout} labelColumnWidth={labelColumnWidth} className={className}>\n {layout === 'horizontal' ? (\n <FieldBlock.Column>\n <FieldBlock.Label name={name} required={required} disabled={disabled} size={labelSize || 'bigger'}>\n {labelIsHidden ? <VisuallyHidden>{label}</VisuallyHidden> : label}\n </FieldBlock.Label>\n </FieldBlock.Column>\n ) : null}\n <FieldBlock.Column>\n {!labelIsHidden && layout === 'vertical' ? (\n <FieldBlock.Label name={name} required={required} disabled={disabled} size={labelSize || 'default'}>\n {label}\n </FieldBlock.Label>\n ) : null}\n <FieldBlock.Column className=\"gap-1\">\n <Input\n id={`input-${name}`}\n name={name}\n disabled={disabled}\n required={required}\n value={value}\n placeholder={placeholder}\n data-testid={testId}\n size={size}\n error={error || Boolean(errorMsg)}\n aria-describedby={describedBy}\n {...props}\n />\n {helpText || errorMsg ? <FieldBlock.Message name={name} helpText={helpText} errorMsg={errorMsg} /> : null}\n </FieldBlock.Column>\n </FieldBlock.Column>\n </FieldBlock.Layout>\n );\n}\n","import { Textarea } from '../../Textarea';\nimport type { TextareaProps } from '../../Textarea';\nimport { FieldBlock } from '../block/field-block';\nimport type { FieldBlockErrorMsgProps } from '../block/field-block-error-msg';\nimport type { FieldBlockHelpTextProps } from '../block/field-block-help-text';\nimport type { FieldBlockLabelProps } from '../block/field-block-label';\nimport type { FieldBlockLayoutProps } from '../block/field-block-layout';\nimport { fieldErrorId } from '../block/field-error-id';\nimport { VisuallyHidden } from '@/ds/primitives/visually-hidden';\n\nexport type TextareaFieldBlockProps = Pick<FieldBlockLayoutProps, 'layout' | 'labelColumnWidth'> &\n Omit<TextareaProps, 'name' | 'size'> & {\n name: string;\n labelIsHidden?: boolean;\n label?: FieldBlockLabelProps['children'];\n labelSize?: FieldBlockLabelProps['size'];\n helpText?: FieldBlockHelpTextProps['children'];\n errorMsg?: FieldBlockErrorMsgProps['children'];\n size?: TextareaProps['size'];\n };\n\n/** @deprecated Use `Field` + `FieldLabel` + `Textarea`. */\nexport function TextareaFieldBlock({\n name,\n label,\n labelIsHidden = false,\n labelColumnWidth,\n helpText,\n error,\n errorMsg,\n required = false,\n disabled = false,\n labelSize,\n layout = 'vertical',\n size = 'md',\n testId,\n className,\n 'aria-describedby': ariaDescribedBy,\n ...props\n}: TextareaFieldBlockProps) {\n const describedBy =\n [ariaDescribedBy, errorMsg ? fieldErrorId(name) : undefined].filter(Boolean).join(' ') || undefined;\n\n return (\n <FieldBlock.Layout layout={layout} labelColumnWidth={labelColumnWidth} className={className}>\n {layout === 'horizontal' ? (\n <FieldBlock.Column>\n <FieldBlock.Label name={name} required={required} disabled={disabled} size={labelSize || 'bigger'}>\n {labelIsHidden ? <VisuallyHidden>{label}</VisuallyHidden> : label}\n </FieldBlock.Label>\n </FieldBlock.Column>\n ) : null}\n <FieldBlock.Column>\n {!labelIsHidden && layout === 'vertical' ? (\n <FieldBlock.Label name={name} required={required} disabled={disabled} size={labelSize || 'default'}>\n {label}\n </FieldBlock.Label>\n ) : null}\n <FieldBlock.Column className=\"gap-1\">\n <Textarea\n id={`input-${name}`}\n name={name}\n disabled={disabled}\n required={required}\n size={size}\n data-testid={testId}\n error={error || Boolean(errorMsg)}\n aria-describedby={describedBy}\n {...props}\n />\n {helpText || errorMsg ? <FieldBlock.Message name={name} helpText={helpText} errorMsg={errorMsg} /> : null}\n </FieldBlock.Column>\n </FieldBlock.Column>\n </FieldBlock.Layout>\n );\n}\n","import { SearchIcon, XIcon } from 'lucide-react';\nimport { useEffect, useRef } from 'react';\nimport type { RefObject } from 'react';\nimport { Button } from '../../Button';\nimport { Input } from '../../Input';\nimport type { InputProps } from '../../Input';\nimport { Tooltip, TooltipContent, TooltipTrigger } from '../../Tooltip';\nimport { FieldBlock } from '../block/field-block';\nimport { fieldErrorId } from '../block/field-error-id';\nimport { cn } from '@/lib/utils';\n\nexport type SearchFieldBlockProps = {\n name: string;\n testId?: string;\n label?: string;\n labelIsHidden?: boolean;\n required?: boolean;\n disabled?: boolean;\n value?: string;\n placeholder?: string;\n onChange?: (e: React.ChangeEvent<HTMLInputElement>) => void;\n onReset?: () => void;\n helpText?: string;\n error?: boolean;\n errorMsg?: string;\n layout?: 'horizontal' | 'vertical';\n className?: string;\n size?: InputProps['size'];\n isMinimized?: boolean;\n onMinimizedChange?: (minimized: boolean) => void;\n /** Gives the caller access to the underlying input, e.g. to focus it from a keyboard shortcut. */\n inputRef?: RefObject<HTMLInputElement | null>;\n};\n\n/** @deprecated Use `SearchInput`. */\nexport function SearchFieldBlock({\n name,\n helpText,\n error,\n errorMsg,\n required = false,\n disabled = false,\n value,\n label,\n labelIsHidden = false,\n layout = 'vertical',\n placeholder = 'Search',\n onChange,\n onReset,\n className,\n size,\n isMinimized,\n onMinimizedChange,\n inputRef: externalInputRef,\n}: SearchFieldBlockProps) {\n const inputRef = useRef<HTMLInputElement>(null);\n\n const setInputRef = (element: HTMLInputElement | null) => {\n inputRef.current = element;\n if (externalInputRef) externalInputRef.current = element;\n };\n useEffect(() => {\n if (isMinimized === false) {\n inputRef.current?.focus();\n }\n }, [isMinimized]);\n\n if (isMinimized) {\n return (\n <Tooltip>\n <TooltipTrigger asChild>\n <Button\n size={`icon-${size || 'sm'}`}\n aria-label={label || 'Search'}\n disabled={disabled}\n onClick={() => onMinimizedChange?.(false)}\n >\n <SearchIcon />\n </Button>\n </TooltipTrigger>\n <TooltipContent>{label || 'Search'}</TooltipContent>\n </Tooltip>\n );\n }\n\n return (\n <FieldBlock.Layout layout={layout} className={className}>\n {layout === 'horizontal' ? (\n <FieldBlock.Column className={labelIsHidden ? 'sr-only' : undefined}>\n <FieldBlock.Label name={name} required={required} disabled={disabled}>\n {label}\n </FieldBlock.Label>\n </FieldBlock.Column>\n ) : null}\n <FieldBlock.Column className={layout === 'horizontal' && labelIsHidden ? 'col-span-full' : undefined}>\n {layout === 'vertical' && label ? (\n <FieldBlock.Label\n name={name}\n required={required}\n disabled={disabled}\n className={labelIsHidden ? 'sr-only' : undefined}\n >\n {label}\n </FieldBlock.Label>\n ) : null}\n <FieldBlock.Column className=\"gap-1\">\n <div className=\"group relative\">\n <Input\n ref={setInputRef}\n id={`input-${name}`}\n name={name}\n disabled={disabled}\n value={value}\n placeholder={placeholder}\n onChange={onChange}\n size={size}\n error={error || Boolean(errorMsg)}\n aria-describedby={errorMsg ? fieldErrorId(name) : undefined}\n className={cn(size === 'sm' && 'px-8', (!size || size === 'md') && 'px-9', size === 'lg' && 'px-10')}\n />\n <SearchIcon\n aria-hidden=\"true\"\n className={cn(\n 'absolute top-1/2 left-3 -translate-y-1/2 text-muted-foreground',\n size === 'sm' && 'size-3.5',\n (!size || size === 'md') && 'size-4',\n size === 'lg' && 'size-[1.125rem]',\n )}\n />\n {onReset && (value || isMinimized === false) && (\n <Button\n variant=\"ghost\"\n size={`icon-${size || 'md'}`}\n aria-label=\"Clear search\"\n onClick={() => {\n if (value) {\n onReset();\n }\n if (isMinimized === false) {\n onMinimizedChange?.(true);\n }\n }}\n className=\"absolute top-1/2 right-0 -translate-y-1/2\"\n >\n <XIcon />\n </Button>\n )}\n </div>\n {helpText || errorMsg ? <FieldBlock.Message name={name} helpText={helpText} errorMsg={errorMsg} /> : null}\n </FieldBlock.Column>\n </FieldBlock.Column>\n </FieldBlock.Layout>\n );\n}\n","import type { SelectTriggerProps } from '../../Select/select';\nimport { FieldBlock } from '../block/field-block';\nimport type { FieldBlockErrorMsgProps } from '../block/field-block-error-msg';\nimport type { FieldBlockHelpTextProps } from '../block/field-block-help-text';\nimport type { FieldBlockLabelProps } from '../block/field-block-label';\nimport type { FieldBlockLayoutProps } from '../block/field-block-layout';\nimport { fieldErrorId } from '../block/field-error-id';\nimport { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from '@/ds/components/Select';\nimport { VisuallyHidden } from '@/ds/primitives/visually-hidden';\n\nexport type SelectFieldBlockProps = Pick<FieldBlockLayoutProps, 'layout' | 'labelColumnWidth'> &\n Pick<FieldBlockLabelProps, 'name' | 'required'> & {\n testId?: string;\n label?: string | null;\n labelIsHidden?: boolean;\n labelSize?: FieldBlockLabelProps['size'];\n disabled?: boolean;\n value?: string;\n options: { value: string; label: string }[];\n placeholder?: string;\n onValueChange: (value: string) => void;\n helpText?: FieldBlockHelpTextProps['children'];\n errorMsg?: FieldBlockErrorMsgProps['children'];\n error?: boolean;\n className?: string;\n size?: SelectTriggerProps['size'];\n };\n\n/** @deprecated Use `Field` + `FieldLabel` + `Select`. */\nexport function SelectFieldBlock({\n name,\n helpText,\n errorMsg,\n required = false,\n disabled = false,\n size = 'md',\n value,\n label,\n labelIsHidden = false,\n layout = 'vertical',\n labelColumnWidth,\n options,\n placeholder = 'Select an option',\n onValueChange,\n className,\n}: SelectFieldBlockProps) {\n return (\n <FieldBlock.Layout layout={layout} labelColumnWidth={labelColumnWidth} className={className}>\n {layout === 'horizontal' ? (\n <FieldBlock.Column>\n <FieldBlock.Label name={name} required={required} disabled={disabled}>\n {labelIsHidden ? <VisuallyHidden>{label}</VisuallyHidden> : label}\n </FieldBlock.Label>\n </FieldBlock.Column>\n ) : null}\n <FieldBlock.Column>\n {layout === 'vertical' && label && !labelIsHidden ? (\n <FieldBlock.Label name={name} required={required} disabled={disabled}>\n {label}\n </FieldBlock.Label>\n ) : null}\n <FieldBlock.Column className=\"gap-1\">\n <Select\n aria-label={labelIsHidden ? label : undefined}\n name={name}\n value={value}\n onValueChange={onValueChange}\n disabled={disabled}\n >\n <SelectTrigger\n id={`input-${name}`}\n size={size}\n aria-invalid={errorMsg ? true : undefined}\n aria-describedby={errorMsg ? fieldErrorId(name) : undefined}\n >\n <SelectValue placeholder={placeholder} />\n </SelectTrigger>\n <SelectContent>\n {options.map(option => (\n <SelectItem key={option.value} value={option.value}>\n {option.label}\n </SelectItem>\n ))}\n </SelectContent>\n </Select>\n {helpText || errorMsg ? <FieldBlock.Message name={name} helpText={helpText} errorMsg={errorMsg} /> : null}\n </FieldBlock.Column>\n </FieldBlock.Column>\n </FieldBlock.Layout>\n );\n}\n"],"mappings":";;;;;;;;;;;;AAOA,SAAgB,wBAAwB,EAAE,UAAU,aAA2C;CAC7F,OAAO,oBAAC,OAAD;EAAK,WAAW,GAAG,4BAA4B,SAAS;EAAI;CAAc,CAAA;AACnF;;ACAA,SAAgB,sBAAsB,EAAE,UAAU,WAAW,UAAU,GAAG,OAAmC;CAC3G,OACE,oBAAC,OAAD;EACE,WAAW,GACT,QACA;GACE,eAAe,YAAY;GAC3B,eAAe,YAAY;EAC7B,GACA,OAAO,SACP,SACF;EAEC;CACE,CAAA;AAET;;;ACrBA,IAAa,oBAAoB,OAAO,OAAO,uBAAuB,EACpE,QAAQ,wBACV,CAAC;;;ACgBD,SAAgB,eAAe,EAC7B,MACA,OACA,OACA,gBAAgB,OAChB,kBACA,UACA,OACA,UACA,WAAW,OACX,WAA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FK,OAAO,KAEZ,CACb,EACY,CAAA,CACT;GACP,CAAA,GAAA,YAAY,WAAW,oBAAC,WAAW,SAAZ;IAA0B;IAAgB;IAAoB;GAAW,CAAA,IAAI,IACpF;EACF,CAAA,CAAA,EAAA,CAAA,CACF;;AAEvB"}
1
+ {"version":3,"file":"FormFieldBlocks.es.js","names":[],"sources":["../../src/ds/components/FormFieldBlocks/layout/field-blocks-layout-column.tsx","../../src/ds/components/FormFieldBlocks/layout/field-blocks-layout-root.tsx","../../src/ds/components/FormFieldBlocks/layout/field-blocks-layout.tsx","../../src/ds/components/FormFieldBlocks/fields/text-field-block.tsx","../../src/ds/components/FormFieldBlocks/fields/textarea-field-block.tsx","../../src/ds/components/FormFieldBlocks/fields/select-field-block.tsx"],"sourcesContent":["import { cn } from '@/lib/utils';\n\nexport type FieldBlocksLayoutColumnProps = {\n children: React.ReactNode;\n className?: string;\n};\n\nexport function FieldBlocksLayoutColumn({ children, className }: FieldBlocksLayoutColumnProps) {\n return <div className={cn('grid content-start gap-6', className)}>{children}</div>;\n}\n","import { cn } from '@/lib/utils';\n\nexport type FieldBlocksLayoutRootProps = {\n children: React.ReactNode;\n className?: string;\n columns?: 1 | 2;\n gap?: string;\n};\n\nexport function FieldBlocksLayoutRoot({ children, className, columns = 1, gap }: FieldBlocksLayoutRootProps) {\n return (\n <div\n className={cn(\n 'grid',\n {\n 'grid-cols-1': columns === 1,\n 'grid-cols-2': columns === 2,\n },\n gap ?? 'gap-6',\n className,\n )}\n >\n {children}\n </div>\n );\n}\n","import { FieldBlocksLayoutColumn } from './field-blocks-layout-column';\nimport { FieldBlocksLayoutRoot } from './field-blocks-layout-root';\n\n/** @deprecated Lay fields out with plain grid or flex classes; `FieldGroup` stacks related fields. */\nexport const FieldBlocksLayout = Object.assign(FieldBlocksLayoutRoot, {\n Column: FieldBlocksLayoutColumn,\n});\n","import { Input } from '../../Input';\nimport type { InputProps } from '../../Input';\nimport { FieldBlock } from '../block/field-block';\nimport type { FieldBlockErrorMsgProps } from '../block/field-block-error-msg';\nimport type { FieldBlockHelpTextProps } from '../block/field-block-help-text';\nimport type { FieldBlockLabelProps } from '../block/field-block-label';\nimport type { FieldBlockLayoutProps } from '../block/field-block-layout';\nimport { fieldErrorId } from '../block/field-error-id';\nimport { VisuallyHidden } from '@/ds/primitives/visually-hidden';\n\nexport type TextFieldBlockProps = Pick<FieldBlockLayoutProps, 'layout' | 'labelColumnWidth'> &\n Omit<InputProps, 'name' | 'size'> & {\n name: string;\n labelIsHidden?: boolean;\n label?: FieldBlockLabelProps['children'];\n labelSize?: FieldBlockLabelProps['size'];\n helpText?: FieldBlockHelpTextProps['children'];\n errorMsg?: FieldBlockErrorMsgProps['children'];\n size?: InputProps['size'];\n };\n\n/** @deprecated Use `Field` + `FieldLabel` + `Input`. */\nexport function TextFieldBlock({\n name,\n value,\n label,\n labelIsHidden = false,\n labelColumnWidth,\n helpText,\n error,\n errorMsg,\n required = false,\n disabled = false,\n labelSize,\n layout = 'vertical',\n placeholder,\n size = 'md',\n testId,\n className,\n 'aria-describedby': ariaDescribedBy,\n ...props\n}: TextFieldBlockProps) {\n const describedBy =\n [ariaDescribedBy, errorMsg ? fieldErrorId(name) : undefined].filter(Boolean).join(' ') || undefined;\n\n return (\n <FieldBlock.Layout layout={layout} labelColumnWidth={labelColumnWidth} className={className}>\n {layout === 'horizontal' ? (\n <FieldBlock.Column>\n <FieldBlock.Label name={name} required={required} disabled={disabled} size={labelSize || 'bigger'}>\n {labelIsHidden ? <VisuallyHidden>{label}</VisuallyHidden> : label}\n </FieldBlock.Label>\n </FieldBlock.Column>\n ) : null}\n <FieldBlock.Column>\n {!labelIsHidden && layout === 'vertical' ? (\n <FieldBlock.Label name={name} required={required} disabled={disabled} size={labelSize || 'default'}>\n {label}\n </FieldBlock.Label>\n ) : null}\n <FieldBlock.Column className=\"gap-1\">\n <Input\n id={`input-${name}`}\n name={name}\n disabled={disabled}\n required={required}\n value={value}\n placeholder={placeholder}\n data-testid={testId}\n size={size}\n error={error || Boolean(errorMsg)}\n aria-describedby={describedBy}\n {...props}\n />\n {helpText || errorMsg ? <FieldBlock.Message name={name} helpText={helpText} errorMsg={errorMsg} /> : null}\n </FieldBlock.Column>\n </FieldBlock.Column>\n </FieldBlock.Layout>\n );\n}\n","import { Textarea } from '../../Textarea';\nimport type { TextareaProps } from '../../Textarea';\nimport { FieldBlock } from '../block/field-block';\nimport type { FieldBlockErrorMsgProps } from '../block/field-block-error-msg';\nimport type { FieldBlockHelpTextProps } from '../block/field-block-help-text';\nimport type { FieldBlockLabelProps } from '../block/field-block-label';\nimport type { FieldBlockLayoutProps } from '../block/field-block-layout';\nimport { fieldErrorId } from '../block/field-error-id';\nimport { VisuallyHidden } from '@/ds/primitives/visually-hidden';\n\nexport type TextareaFieldBlockProps = Pick<FieldBlockLayoutProps, 'layout' | 'labelColumnWidth'> &\n Omit<TextareaProps, 'name' | 'size'> & {\n name: string;\n labelIsHidden?: boolean;\n label?: FieldBlockLabelProps['children'];\n labelSize?: FieldBlockLabelProps['size'];\n helpText?: FieldBlockHelpTextProps['children'];\n errorMsg?: FieldBlockErrorMsgProps['children'];\n size?: TextareaProps['size'];\n };\n\n/** @deprecated Use `Field` + `FieldLabel` + `Textarea`. */\nexport function TextareaFieldBlock({\n name,\n label,\n labelIsHidden = false,\n labelColumnWidth,\n helpText,\n error,\n errorMsg,\n required = false,\n disabled = false,\n labelSize,\n layout = 'vertical',\n size = 'md',\n testId,\n className,\n 'aria-describedby': ariaDescribedBy,\n ...props\n}: TextareaFieldBlockProps) {\n const describedBy =\n [ariaDescribedBy, errorMsg ? fieldErrorId(name) : undefined].filter(Boolean).join(' ') || undefined;\n\n return (\n <FieldBlock.Layout layout={layout} labelColumnWidth={labelColumnWidth} className={className}>\n {layout === 'horizontal' ? (\n <FieldBlock.Column>\n <FieldBlock.Label name={name} required={required} disabled={disabled} size={labelSize || 'bigger'}>\n {labelIsHidden ? <VisuallyHidden>{label}</VisuallyHidden> : label}\n </FieldBlock.Label>\n </FieldBlock.Column>\n ) : null}\n <FieldBlock.Column>\n {!labelIsHidden && layout === 'vertical' ? (\n <FieldBlock.Label name={name} required={required} disabled={disabled} size={labelSize || 'default'}>\n {label}\n </FieldBlock.Label>\n ) : null}\n <FieldBlock.Column className=\"gap-1\">\n <Textarea\n id={`input-${name}`}\n name={name}\n disabled={disabled}\n required={required}\n size={size}\n data-testid={testId}\n error={error || Boolean(errorMsg)}\n aria-describedby={describedBy}\n {...props}\n />\n {helpText || errorMsg ? <FieldBlock.Message name={name} helpText={helpText} errorMsg={errorMsg} /> : null}\n </FieldBlock.Column>\n </FieldBlock.Column>\n </FieldBlock.Layout>\n );\n}\n","import type { SelectTriggerProps } from '../../Select/select';\nimport { FieldBlock } from '../block/field-block';\nimport type { FieldBlockErrorMsgProps } from '../block/field-block-error-msg';\nimport type { FieldBlockHelpTextProps } from '../block/field-block-help-text';\nimport type { FieldBlockLabelProps } from '../block/field-block-label';\nimport type { FieldBlockLayoutProps } from '../block/field-block-layout';\nimport { fieldErrorId } from '../block/field-error-id';\nimport { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from '@/ds/components/Select';\nimport { VisuallyHidden } from '@/ds/primitives/visually-hidden';\n\nexport type SelectFieldBlockProps = Pick<FieldBlockLayoutProps, 'layout' | 'labelColumnWidth'> &\n Pick<FieldBlockLabelProps, 'name' | 'required'> & {\n testId?: string;\n label?: string | null;\n labelIsHidden?: boolean;\n labelSize?: FieldBlockLabelProps['size'];\n disabled?: boolean;\n value?: string;\n options: { value: string; label: string }[];\n placeholder?: string;\n onValueChange: (value: string) => void;\n helpText?: FieldBlockHelpTextProps['children'];\n errorMsg?: FieldBlockErrorMsgProps['children'];\n error?: boolean;\n className?: string;\n size?: SelectTriggerProps['size'];\n };\n\n/** @deprecated Use `Field` + `FieldLabel` + `Select`. */\nexport function SelectFieldBlock({\n name,\n helpText,\n errorMsg,\n required = false,\n disabled = false,\n size = 'md',\n value,\n label,\n labelIsHidden = false,\n layout = 'vertical',\n labelColumnWidth,\n options,\n placeholder = 'Select an option',\n onValueChange,\n className,\n}: SelectFieldBlockProps) {\n return (\n <FieldBlock.Layout layout={layout} labelColumnWidth={labelColumnWidth} className={className}>\n {layout === 'horizontal' ? (\n <FieldBlock.Column>\n <FieldBlock.Label name={name} required={required} disabled={disabled}>\n {labelIsHidden ? <VisuallyHidden>{label}</VisuallyHidden> : label}\n </FieldBlock.Label>\n </FieldBlock.Column>\n ) : null}\n <FieldBlock.Column>\n {layout === 'vertical' && label && !labelIsHidden ? (\n <FieldBlock.Label name={name} required={required} disabled={disabled}>\n {label}\n </FieldBlock.Label>\n ) : null}\n <FieldBlock.Column className=\"gap-1\">\n <Select\n aria-label={labelIsHidden ? label : undefined}\n name={name}\n value={value}\n onValueChange={onValueChange}\n disabled={disabled}\n >\n <SelectTrigger\n id={`input-${name}`}\n size={size}\n aria-invalid={errorMsg ? true : undefined}\n aria-describedby={errorMsg ? fieldErrorId(name) : undefined}\n >\n <SelectValue placeholder={placeholder} />\n </SelectTrigger>\n <SelectContent>\n {options.map(option => (\n <SelectItem key={option.value} value={option.value}>\n {option.label}\n </SelectItem>\n ))}\n </SelectContent>\n </Select>\n {helpText || errorMsg ? <FieldBlock.Message name={name} helpText={helpText} errorMsg={errorMsg} /> : null}\n </FieldBlock.Column>\n </FieldBlock.Column>\n </FieldBlock.Layout>\n );\n}\n"],"mappings":";;;;;;;;AAOA,SAAgB,wBAAwB,EAAE,UAAU,aAA2C;CAC7F,OAAO,oBAAC,OAAD;EAAK,WAAW,GAAG,4BAA4B,SAAS;EAAI;CAAc,CAAA;AACnF;;ACAA,SAAgB,sBAAsB,EAAE,UAAU,WAAW,UAAU,GAAG,OAAmC;CAC3G,OACE,oBAAC,OAAD;EACE,WAAW,GACT,QACA;GACE,eAAe,YAAY;GAC3B,eAAe,YAAY;EAC7B,GACA,OAAO,SACP,SACF;EAEC;CACE,CAAA;AAET;;;ACrBA,IAAa,oBAAoB,OAAO,OAAO,uBAAuB,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MAAsB,CAAA,IAAI;EAC5C,CAAA,EACD,CAAA,IACjB,MACJ,qBAAC,WAAW,QAAZ,EAAA,UAAA,CACG,WAAW,cAAc,SAAS,CAAC,gBAClC,oBAAC,WAAW,OAAZ;GAAwB;GAAgB;GAAoB;GACzD,UAAA;EACe,CAAA,IAChB,MACJ,qBAAC,WAAW,QAAZ;GAAmB,WAAU;GAA7B,UAAA,CACE,qBAAC,QAAD;IACE,cAAY,gBAAgB,QAAQ,KAAA;IAC9B;IACC;IACQ;IACL;IALZ,UAAA,CAOE,oBAAC,eAAD;KACE,IAAI,SAAS;KACP;KACN,gBAAc,WAAW,OAAO,KAAA;KAChC,oBAAkB,WAAW,aAAa,IAAI,IAAI,KAAA;KAElD,UAAA,oBAAC,aAAD,EAA0B,YAAc,CAAA;IAC3B,CAAA,GACf,oBAAC,eAAD,EAAA,UACG,QAAQ,KAAI,WACX,oBAAC,YAAD;KAA+B,OAAO,OAAO;KAC1C,UAAA,OAAO;IACE,GAFK,OAAO,KAEZ,CACb,EACY,CAAA,CACT;GACP,CAAA,GAAA,YAAY,WAAW,oBAAC,WAAW,SAAZ;IAA0B;IAAgB;IAAoB;GAAW,CAAA,IAAI,IACpF;EACF,CAAA,CAAA,EAAA,CAAA,CACF;;AAEvB"}
@@ -1,5 +1,5 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_input_group = require("../input-group-Da8HBo30.cjs");
2
+ const require_input_group = require("../input-group-BrBYp1gP.cjs");
3
3
  exports.InputGroup = require_input_group.InputGroup;
4
4
  exports.InputGroupAddon = require_input_group.InputGroupAddon;
5
5
  exports.InputGroupButton = require_input_group.InputGroupButton;
@@ -1 +1 @@
1
- export { t as InputGroup, n as InputGroupAddon, r as InputGroupButton, i as InputGroupInput, a as InputGroupText, o as InputGroupTextarea, s as inputGroupClassName, c as inputGroupControlClassName } from "../input-group-CCSyY4J5.js";
1
+ export { t as InputGroup, n as InputGroupAddon, r as InputGroupButton, i as InputGroupInput, a as InputGroupText, o as InputGroupTextarea, s as inputGroupClassName, c as inputGroupControlClassName } from "../input-group-1OAXTPnG.js";
@@ -1,7 +1,7 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
2
  const require_rolldown_runtime = require("../rolldown-runtime-CmQyd0Gu.cjs");
3
3
  const require_Button = require("../Button-BfICfyxD.cjs");
4
- const require_input_group = require("../input-group-Da8HBo30.cjs");
4
+ const require_input_group = require("../input-group-BrBYp1gP.cjs");
5
5
  const require_icons_Icon = require("../icons/Icon.cjs.js");
6
6
  const require_primitives_control_size = require("../primitives/control-size.cjs.js");
7
7
  const require_primitives_password_manager_autofill = require("../primitives/password-manager-autofill.cjs.js");
@@ -1,5 +1,5 @@
1
1
  import { o as buttonVariants } from "../Button-Bi7aXd_G.js";
2
- import { c as inputGroupControlClassName, s as inputGroupClassName } from "../input-group-CCSyY4J5.js";
2
+ import { c as inputGroupControlClassName, s as inputGroupClassName } from "../input-group-1OAXTPnG.js";
3
3
  import { Icon } from "../icons/Icon.es.js";
4
4
  import { ControlSizeContext, controlHeight } from "../primitives/control-size.es.js";
5
5
  import { textFieldAutofillProps } from "../primitives/password-manager-autofill.es.js";
@@ -1,5 +1,5 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_DataList = require("../DataList-2PEZd6GU.cjs");
3
- const require_LogsDataList = require("../LogsDataList-DVXS1HN4.cjs");
2
+ const require_DataList = require("../DataList-D6UDH7qT.cjs");
3
+ const require_LogsDataList = require("../LogsDataList-Sgcx1aKA.cjs");
4
4
  exports.LogsDataList = require_LogsDataList.LogsDataList;
5
5
  exports.LogsDataListSkeleton = require_DataList.DataListSkeleton;
@@ -1,3 +1,3 @@
1
- import { r as DataListSkeleton } from "../DataList-DCaKvoCH.js";
2
- import { t as LogsDataList } from "../LogsDataList-Ca016D5o.js";
1
+ import { r as DataListSkeleton } from "../DataList-DIGkHZWZ.js";
2
+ import { t as LogsDataList } from "../LogsDataList-DUKQJ9e5.js";
3
3
  export { LogsDataList, DataListSkeleton as LogsDataListSkeleton };
@@ -1,7 +1,7 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
2
  const require_saved_view_schema = require("../saved-view-schema-DRJYELfK.cjs");
3
3
  const require_primitives_password_manager_autofill = require("../primitives/password-manager-autofill.cjs.js");
4
- const require_filter_bar_chip = require("../filter-bar-chip-Bhn7lo4e.cjs");
4
+ const require_filter_bar_chip = require("../filter-bar-chip-DgdVLscK.cjs");
5
5
  const require_Txt = require("../Txt-_00wWxTd.cjs");
6
6
  const require_icons_icon_size_classes = require("../icons/icon-size-classes.cjs.js");
7
7
  const require_utils = require("../utils-uDc1ofX1.cjs");
@@ -1,6 +1,6 @@
1
1
  import { n as savedViewNameSchema, r as serializeSavedViews, t as parseSavedViews } from "../saved-view-schema-eJXlRRel.js";
2
2
  import { passwordManagerOptOutProps } from "../primitives/password-manager-autofill.es.js";
3
- import { o as FilterBarFieldLabel, u as formatValue } from "../filter-bar-chip-jOPeM21t.js";
3
+ import { o as FilterBarFieldLabel, u as formatValue } from "../filter-bar-chip-DBkPWlc-.js";
4
4
  import { t as Txt } from "../Txt-5efBsb2p.js";
5
5
  import { iconSizeClasses } from "../icons/icon-size-classes.es.js";
6
6
  import { t as cn } from "../utils-DQx8TpNT.js";
@@ -1,53 +1,109 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_components_Field = require("./Field.cjs.js");
3
- const require_input_group = require("../input-group-Da8HBo30.cjs");
2
+ const require_input_group = require("../input-group-BrBYp1gP.cjs");
3
+ const require_keyboard_use_keydown = require("../keyboard/use-keydown.cjs.js");
4
4
  const require_merge_refs = require("../merge-refs-C0BDbPAW.cjs");
5
5
  let react = require("react");
6
6
  let react_jsx_runtime = require("react/jsx-runtime");
7
7
  let lucide_react = require("lucide-react");
8
+ let use_debounce = require("use-debounce");
8
9
  // src/ds/components/SearchInput/search-input.tsx
9
- function SearchInput({ label, value, onValueChange, onClose, size, className, ref, ...inputProps }) {
10
+ /** What the field shows: its own text, or the parent's value unless a draft was typed over it. */
11
+ function shownText({ value, ownText, draft }) {
12
+ if (value === void 0) return ownText;
13
+ if (draft && (draft.over === value || draft.sent === value)) return draft.text;
14
+ return value;
15
+ }
16
+ /**
17
+ * A search field: an `InputGroup` with a search icon and a clear button, nothing styled of its
18
+ * own. Compose `InputGroup` directly for anything this doesn't cover.
19
+ */
20
+ function SearchInput({ label, value, defaultValue = "", onValueChange, debounceMs = 0, shortcut = false, onClose, size, className, ref, ...inputProps }) {
21
+ const [ownText, setOwnText] = (0, react.useState)(defaultValue);
22
+ const [draft, setDraft] = (0, react.useState)();
23
+ const sentRef = (0, react.useRef)(void 0);
24
+ const report = (next) => {
25
+ sentRef.current = next;
26
+ onValueChange(next);
27
+ };
28
+ const debouncedChange = (0, use_debounce.useDebouncedCallback)((next) => {
29
+ setDraft(void 0);
30
+ report(next);
31
+ }, debounceMs);
32
+ const text = shownText({
33
+ value,
34
+ ownText,
35
+ draft: debouncedChange.isPending() ? draft : void 0
36
+ });
37
+ const editable = !inputProps.disabled && !inputProps.readOnly;
38
+ const hasButton = Boolean(onClose || text && editable);
10
39
  const inputRef = (0, react.useRef)(null);
11
- const clear = () => {
12
- onValueChange("");
40
+ require_keyboard_use_keydown.useKeydown({ "mod+shift+f": () => {
13
41
  inputRef.current?.focus();
42
+ inputRef.current?.select();
43
+ } }, { enabled: shortcut });
44
+ (0, react.useEffect)(() => () => debouncedChange.cancel(), [debouncedChange]);
45
+ (0, react.useEffect)(() => {
46
+ if (value !== void 0 && value === sentRef.current) {
47
+ sentRef.current = void 0;
48
+ return;
49
+ }
50
+ sentRef.current = void 0;
51
+ debouncedChange.cancel();
52
+ }, [value, debouncedChange]);
53
+ const change = (next) => {
54
+ setOwnText(next);
55
+ if (next && debounceMs > 0) {
56
+ if (value !== void 0) setDraft({
57
+ text: next,
58
+ over: value,
59
+ sent: sentRef.current
60
+ });
61
+ debouncedChange(next);
62
+ return;
63
+ }
64
+ setDraft(void 0);
65
+ debouncedChange.cancel();
66
+ report(next);
14
67
  };
15
- const close = () => {
16
- onValueChange("");
17
- onClose?.();
18
- };
19
- return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(require_components_Field.Field, {
68
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(require_input_group.InputGroup, {
69
+ size,
20
70
  className,
21
- children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_components_Field.FieldLabel, {
22
- className: "sr-only",
23
- children: label
24
- }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(require_input_group.InputGroup, {
25
- size,
26
- className: "min-w-0",
27
- children: [
28
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_input_group.InputGroupAddon, {
29
- className: "pr-(--control-gap) pl-[calc(var(--control-px)-2px)]",
30
- children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.SearchIcon, {})
31
- }),
32
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_input_group.InputGroupInput, {
33
- ref: require_merge_refs.mergeRefs(inputRef, ref),
34
- value,
35
- onChange: (event) => onValueChange(event.target.value),
36
- ...inputProps,
37
- type: "search"
38
- }),
39
- (onClose || value) && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_input_group.InputGroupAddon, {
40
- align: "inline-end",
41
- children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_input_group.InputGroupButton, {
42
- "aria-label": onClose ? "Close search" : "Clear search",
43
- onClick: onClose ? close : clear,
44
- children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.XIcon, {})
45
- })
71
+ children: [
72
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_input_group.InputGroupAddon, { children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.SearchIcon, {}) }),
73
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_input_group.InputGroupInput, {
74
+ ...inputProps,
75
+ ref: require_merge_refs.mergeRefs(inputRef, ref),
76
+ type: "search",
77
+ "aria-label": label,
78
+ value: text,
79
+ onChange: (event) => change(event.target.value)
80
+ }),
81
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_input_group.InputGroupAddon, {
82
+ align: "inline-end",
83
+ "aria-hidden": !hasButton,
84
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_input_group.InputGroupButton, {
85
+ "aria-label": onClose ? "Close search" : "Clear search",
86
+ className: hasButton ? void 0 : "invisible",
87
+ inert: !hasButton,
88
+ onClick: () => {
89
+ if (editable) change("");
90
+ if (onClose) onClose();
91
+ else inputRef.current?.focus();
92
+ },
93
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.XIcon, {})
46
94
  })
47
- ]
48
- })]
95
+ })
96
+ ]
49
97
  });
50
98
  }
99
+ // src/ds/components/SearchInput/list-search-props.ts
100
+ /** A list page's search: the toolbar size, typing reported after a pause, and Cmd/Ctrl+Shift+F. */
101
+ var listSearchProps = {
102
+ size: "sm",
103
+ debounceMs: 300,
104
+ shortcut: true
105
+ };
51
106
  exports.SearchInput = SearchInput;
107
+ exports.listSearchProps = listSearchProps;
52
108
 
53
109
  //# sourceMappingURL=SearchInput.cjs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"SearchInput.cjs.js","names":["useRef","Field","FieldLabel","InputGroup","InputGroupAddon","SearchIcon","InputGroupInput","mergeRefs","InputGroupButton","XIcon"],"sources":["../../src/ds/components/SearchInput/search-input.tsx"],"sourcesContent":["import { SearchIcon, XIcon } from 'lucide-react';\nimport { useRef } from 'react';\nimport type { Ref } from 'react';\nimport { Field, FieldLabel } from '@/ds/components/Field';\nimport { InputGroup, InputGroupAddon, InputGroupButton, InputGroupInput } from '@/ds/components/InputGroup';\nimport type { InputGroupInputProps, InputGroupProps } from '@/ds/components/InputGroup';\nimport { mergeRefs } from '@/lib/merge-refs';\n\nexport type SearchInputProps = Omit<InputGroupInputProps, 'value' | 'onChange' | 'type' | 'ref' | 'error'> & {\n label: string;\n value: string;\n onValueChange: (value: string) => void;\n onClose?: () => void;\n size?: InputGroupProps['size'];\n className?: string;\n ref?: Ref<HTMLInputElement>;\n};\n\nexport function SearchInput({\n label,\n value,\n onValueChange,\n onClose,\n size,\n className,\n ref,\n ...inputProps\n}: SearchInputProps) {\n const inputRef = useRef<HTMLInputElement>(null);\n\n const clear = () => {\n onValueChange('');\n inputRef.current?.focus();\n };\n\n const close = () => {\n onValueChange('');\n onClose?.();\n };\n\n return (\n <Field className={className}>\n <FieldLabel className=\"sr-only\">{label}</FieldLabel>\n <InputGroup size={size} className=\"min-w-0\">\n {/* Spaced like a Button's leading icon (the group's `--control-px` and `--control-gap`) so\n a search field sits in a toolbar row with the same insets as the pills next to it. */}\n <InputGroupAddon className=\"pr-(--control-gap) pl-[calc(var(--control-px)-2px)]\">\n <SearchIcon />\n </InputGroupAddon>\n <InputGroupInput\n ref={mergeRefs(inputRef, ref)}\n value={value}\n onChange={event => onValueChange(event.target.value)}\n {...inputProps}\n type=\"search\"\n />\n {(onClose || value) && (\n <InputGroupAddon align=\"inline-end\">\n <InputGroupButton aria-label={onClose ? 'Close search' : 'Clear search'} onClick={onClose ? close : clear}>\n <XIcon />\n </InputGroupButton>\n </InputGroupAddon>\n )}\n </InputGroup>\n </Field>\n );\n}\n"],"mappings":";;;;;;;;AAkBA,SAAgB,YAAY,EAC1B,OACA,OACA,eACA,SACA,MACA,WACA,KACA,GAAG,cACgB;CACnB,MAAM,YAAA,GAAWA,MAAAA,OAAAA,CAAyB,IAAI;CAE9C,MAAM,cAAc;EAClB,cAAc,EAAE;EAChB,SAAS,SAAS,MAAM;CAC1B;CAEA,MAAM,cAAc;EAClB,cAAc,EAAE;EAChB,UAAU;CACZ;CAEA,OACE,iBAAA,GAAA,kBAAA,KAAA,CAACC,yBAAAA,OAAD;EAAkB;EAAlB,UAAA,CACE,iBAAA,GAAA,kBAAA,IAAA,CAACC,yBAAAA,YAAD;GAAY,WAAU;GAAW,UAAA;EAAkB,CAAA,GACnD,iBAAA,GAAA,kBAAA,KAAA,CAACC,oBAAAA,YAAD;GAAkB;GAAM,WAAU;GAAlC,UAAA;IAGE,iBAAA,GAAA,kBAAA,IAAA,CAACC,oBAAAA,iBAAD;KAAiB,WAAU;KACzB,UAAA,iBAAA,GAAA,kBAAA,IAAA,CAACC,aAAAA,YAAD,CAAa,CAAA;IACE,CAAA;IACjB,iBAAA,GAAA,kBAAA,IAAA,CAACC,oBAAAA,iBAAD;KACE,KAAKC,mBAAAA,UAAU,UAAU,GAAG;KACrB;KACP,WAAU,UAAS,cAAc,MAAM,OAAO,KAAK;KACnD,GAAI;KACJ,MAAK;IACN,CAAA;KACC,WAAW,UACX,iBAAA,GAAA,kBAAA,IAAA,CAACH,oBAAAA,iBAAD;KAAiB,OAAM;KACrB,UAAA,iBAAA,GAAA,kBAAA,IAAA,CAACI,oBAAAA,kBAAD;MAAkB,cAAY,UAAU,iBAAiB;MAAgB,SAAS,UAAU,QAAQ;MAClG,UAAA,iBAAA,GAAA,kBAAA,IAAA,CAACC,aAAAA,OAAD,CAAQ,CAAA;KACQ,CAAA;IACH,CAAA;GAET;EACP,CAAA,CAAA;;AAEX"}
1
+ {"version":3,"file":"SearchInput.cjs.js","names":["useState","useRef","useDebouncedCallback","InputGroup","InputGroupAddon","SearchIcon","InputGroupInput","mergeRefs","InputGroupButton","XIcon"],"sources":["../../src/ds/components/SearchInput/search-input.tsx","../../src/ds/components/SearchInput/list-search-props.ts"],"sourcesContent":["import { SearchIcon, XIcon } from 'lucide-react';\nimport { useEffect, useRef, useState } from 'react';\nimport type { Ref } from 'react';\nimport { useDebouncedCallback } from 'use-debounce';\nimport { InputGroup, InputGroupAddon, InputGroupButton, InputGroupInput } from '@/ds/components/InputGroup';\nimport type { InputGroupInputProps, InputGroupProps } from '@/ds/components/InputGroup';\nimport { useKeydown } from '@/lib/keyboard';\nimport { mergeRefs } from '@/lib/merge-refs';\n\ntype SearchInputBaseProps = Omit<\n InputGroupInputProps,\n 'value' | 'defaultValue' | 'onChange' | 'type' | 'ref' | 'error'\n> & {\n /** The field's accessible name. */\n label: string;\n /** Called with the text as it changes; with `debounceMs`, after the pause and right away when cleared. */\n onValueChange: (value: string) => void;\n /** Cmd/Ctrl+Shift+F focuses the field. Give it to the one main search of a page. */\n shortcut?: boolean;\n /** Shows a Close button that clears the text and calls this, e.g. to collapse the search. */\n onClose?: () => void;\n size?: InputGroupProps['size'];\n className?: string;\n ref?: Ref<HTMLInputElement>;\n};\n\n/**\n * Controlled by `value` (it follows every change the parent makes, e.g. a URL change or a Reset)\n * or keeping its own text from `defaultValue`. Either way `debounceMs` delays `onValueChange`\n * while typing; a controlled field shows what was typed until the parent's value moves.\n */\nexport type SearchInputProps = SearchInputBaseProps &\n ({ value: string; defaultValue?: never } | { value?: never; defaultValue?: string }) & {\n debounceMs?: number;\n };\n\n/**\n * Typed text waiting on the debounce, the parent's value it was typed over, and the search this\n * field had already sent then (the parent may still be applying it, e.g. through the URL).\n */\ntype Draft = { text: string; over: string; sent?: string };\n\n/** What the field shows: its own text, or the parent's value unless a draft was typed over it. */\nfunction shownText({ value, ownText, draft }: { value?: string; ownText: string; draft?: Draft }) {\n if (value === undefined) return ownText;\n if (draft && (draft.over === value || draft.sent === value)) return draft.text;\n return value;\n}\n\n/**\n * A search field: an `InputGroup` with a search icon and a clear button, nothing styled of its\n * own. Compose `InputGroup` directly for anything this doesn't cover.\n */\nexport function SearchInput({\n label,\n value,\n defaultValue = '',\n onValueChange,\n debounceMs = 0,\n shortcut = false,\n onClose,\n size,\n className,\n ref,\n ...inputProps\n}: SearchInputProps) {\n const [ownText, setOwnText] = useState(defaultValue);\n // Typed text waiting on the debounce, and the parent's value it was typed over. It shows only\n // while its search is still pending and that value hasn't moved: once the search is applied,\n // cancelled, or the parent changes the value some other way, the field follows the parent.\n const [draft, setDraft] = useState<Draft>();\n // The last search this field sent and the parent hasn't applied yet.\n const sentRef = useRef<string>(undefined);\n const report = (next: string) => {\n sentRef.current = next;\n onValueChange(next);\n };\n const debouncedChange = useDebouncedCallback((next: string) => {\n setDraft(undefined);\n report(next);\n }, debounceMs);\n const text = shownText({ value, ownText, draft: debouncedChange.isPending() ? draft : undefined });\n const editable = !inputProps.disabled && !inputProps.readOnly;\n const hasButton = Boolean(onClose || (text && editable));\n const inputRef = useRef<HTMLInputElement>(null);\n\n useKeydown(\n {\n 'mod+shift+f': () => {\n inputRef.current?.focus();\n inputRef.current?.select();\n },\n },\n { enabled: shortcut },\n );\n\n useEffect(() => () => debouncedChange.cancel(), [debouncedChange]);\n\n // When the parent's value moves, a search still waiting on the debounce is stale (a Reset or URL\n // change replaced the text) unless the parent is only applying what this field already sent.\n useEffect(() => {\n if (value !== undefined && value === sentRef.current) {\n sentRef.current = undefined;\n return;\n }\n sentRef.current = undefined;\n debouncedChange.cancel();\n }, [value, debouncedChange]);\n\n const change = (next: string) => {\n setOwnText(next);\n if (next && debounceMs > 0) {\n if (value !== undefined) setDraft({ text: next, over: value, sent: sentRef.current });\n debouncedChange(next);\n return;\n }\n setDraft(undefined);\n debouncedChange.cancel();\n report(next);\n };\n\n return (\n <InputGroup size={size} className={className}>\n <InputGroupAddon>\n <SearchIcon />\n </InputGroupAddon>\n <InputGroupInput\n {...inputProps}\n ref={mergeRefs(inputRef, ref)}\n type=\"search\"\n aria-label={label}\n value={text}\n onChange={event => change(event.target.value)}\n />\n {/* Always rendered so the field keeps its width when text appears (it can be sized by its\n content, e.g. joined in a ButtonsGroup). While empty only the button hides, so a click on\n its spot still lands on the addon, which focuses the input. */}\n <InputGroupAddon align=\"inline-end\" aria-hidden={!hasButton}>\n <InputGroupButton\n aria-label={onClose ? 'Close search' : 'Clear search'}\n className={hasButton ? undefined : 'invisible'}\n inert={!hasButton}\n onClick={() => {\n if (editable) change('');\n if (onClose) onClose();\n else inputRef.current?.focus();\n }}\n >\n <XIcon />\n </InputGroupButton>\n </InputGroupAddon>\n </InputGroup>\n );\n}\n","import type { SearchInputProps } from './search-input';\n\n/** A list page's search: the toolbar size, typing reported after a pause, and Cmd/Ctrl+Shift+F. */\nexport const listSearchProps = {\n size: 'sm',\n debounceMs: 300,\n shortcut: true,\n} as const satisfies Pick<SearchInputProps, 'size' | 'debounceMs' | 'shortcut'>;\n"],"mappings":";;;;;;;;;;AA2CA,SAAS,UAAU,EAAE,OAAO,SAAS,SAA6D;CAChG,IAAI,UAAU,KAAA,GAAW,OAAO;CAChC,IAAI,UAAU,MAAM,SAAS,SAAS,MAAM,SAAS,QAAQ,OAAO,MAAM;CAC1E,OAAO;AACT;;;;;AAMA,SAAgB,YAAY,EAC1B,OACA,OACA,eAAe,IACf,eACA,aAAa,GACb,WAAW,OACX,SACA,MACA,WACA,KACA,GAAG,cACgB;CACnB,MAAM,CAAC,SAAS,eAAA,GAAcA,MAAAA,SAAAA,CAAS,YAAY;CAInD,MAAM,CAAC,OAAO,aAAA,GAAYA,MAAAA,SAAAA,CAAgB;CAE1C,MAAM,WAAA,GAAUC,MAAAA,OAAAA,CAAe,KAAA,CAAS;CACxC,MAAM,UAAU,SAAiB;EAC/B,QAAQ,UAAU;EAClB,cAAc,IAAI;CACpB;CACA,MAAM,mBAAA,GAAkBC,aAAAA,qBAAAA,EAAsB,SAAiB;EAC7D,SAAS,KAAA,CAAS;EAClB,OAAO,IAAI;CACb,GAAG,UAAU;CACb,MAAM,OAAO,UAAU;EAAE;EAAO;EAAS,OAAO,gBAAgB,UAAU,IAAI,QAAQ,KAAA;CAAU,CAAC;CACjG,MAAM,WAAW,CAAC,WAAW,YAAY,CAAC,WAAW;CACrD,MAAM,YAAY,QAAQ,WAAY,QAAQ,QAAS;CACvD,MAAM,YAAA,GAAWD,MAAAA,OAAAA,CAAyB,IAAI;CAE9C,6BAAA,WACE,EACE,qBAAqB;EACnB,SAAS,SAAS,MAAM;EACxB,SAAS,SAAS,OAAO;CAC3B,EACF,GACA,EAAE,SAAS,SAAS,CACtB;CAEA,CAAA,GAAA,MAAA,UAAA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