@pipe0/react 0.0.5 → 0.0.7

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 (307) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/README.md +69 -2
  3. package/dist/components/compound/pipe-catalog/active-filters.d.mts +7 -10
  4. package/dist/components/compound/pipe-catalog/active-filters.d.mts.map +1 -1
  5. package/dist/components/compound/pipe-catalog/active-filters.mjs +22 -18
  6. package/dist/components/compound/pipe-catalog/active-filters.mjs.map +1 -1
  7. package/dist/components/compound/pipe-catalog/card.d.mts +3 -11
  8. package/dist/components/compound/pipe-catalog/card.d.mts.map +1 -1
  9. package/dist/components/compound/pipe-catalog/card.mjs +30 -25
  10. package/dist/components/compound/pipe-catalog/card.mjs.map +1 -1
  11. package/dist/components/compound/pipe-catalog/category-filter.d.mts +7 -10
  12. package/dist/components/compound/pipe-catalog/category-filter.d.mts.map +1 -1
  13. package/dist/components/compound/pipe-catalog/category-filter.mjs +18 -9
  14. package/dist/components/compound/pipe-catalog/category-filter.mjs.map +1 -1
  15. package/dist/components/compound/pipe-catalog/column-filter.d.mts +7 -13
  16. package/dist/components/compound/pipe-catalog/column-filter.d.mts.map +1 -1
  17. package/dist/components/compound/pipe-catalog/column-filter.mjs +13 -7
  18. package/dist/components/compound/pipe-catalog/column-filter.mjs.map +1 -1
  19. package/dist/components/compound/pipe-catalog/empty.d.mts +5 -10
  20. package/dist/components/compound/pipe-catalog/empty.d.mts.map +1 -1
  21. package/dist/components/compound/pipe-catalog/empty.mjs +12 -14
  22. package/dist/components/compound/pipe-catalog/empty.mjs.map +1 -1
  23. package/dist/components/compound/pipe-catalog/index.d.mts +1 -1
  24. package/dist/components/compound/pipe-catalog/input-field-filter.d.mts +3 -3
  25. package/dist/components/compound/pipe-catalog/input-field-filter.d.mts.map +1 -1
  26. package/dist/components/compound/pipe-catalog/input-field-filter.mjs.map +1 -1
  27. package/dist/components/compound/pipe-catalog/list.d.mts +9 -24
  28. package/dist/components/compound/pipe-catalog/list.d.mts.map +1 -1
  29. package/dist/components/compound/pipe-catalog/list.mjs +18 -14
  30. package/dist/components/compound/pipe-catalog/list.mjs.map +1 -1
  31. package/dist/components/compound/pipe-catalog/output-field-filter.d.mts +3 -3
  32. package/dist/components/compound/pipe-catalog/output-field-filter.d.mts.map +1 -1
  33. package/dist/components/compound/pipe-catalog/output-field-filter.mjs.map +1 -1
  34. package/dist/components/compound/pipe-catalog/provider-filter.d.mts +3 -3
  35. package/dist/components/compound/pipe-catalog/provider-filter.d.mts.map +1 -1
  36. package/dist/components/compound/pipe-catalog/provider-filter.mjs.map +1 -1
  37. package/dist/components/compound/pipe-catalog/root.d.mts +6 -6
  38. package/dist/components/compound/pipe-catalog/root.d.mts.map +1 -1
  39. package/dist/components/compound/pipe-catalog/root.mjs +2 -2
  40. package/dist/components/compound/pipe-catalog/root.mjs.map +1 -1
  41. package/dist/components/compound/pipe-catalog/search-filter.d.mts +6 -9
  42. package/dist/components/compound/pipe-catalog/search-filter.d.mts.map +1 -1
  43. package/dist/components/compound/pipe-catalog/search-filter.mjs +10 -9
  44. package/dist/components/compound/pipe-catalog/search-filter.mjs.map +1 -1
  45. package/dist/components/compound/pipe-catalog/tag-filter.d.mts +3 -3
  46. package/dist/components/compound/pipe-catalog/tag-filter.d.mts.map +1 -1
  47. package/dist/components/compound/pipe-catalog/tag-filter.mjs.map +1 -1
  48. package/dist/components/compound/pipe-form/content.d.mts +7 -2
  49. package/dist/components/compound/pipe-form/content.d.mts.map +1 -1
  50. package/dist/components/compound/pipe-form/content.mjs +23 -25
  51. package/dist/components/compound/pipe-form/content.mjs.map +1 -1
  52. package/dist/components/compound/pipe-form/errors.d.mts +27 -0
  53. package/dist/components/compound/pipe-form/errors.d.mts.map +1 -0
  54. package/dist/components/compound/pipe-form/errors.mjs +48 -0
  55. package/dist/components/compound/pipe-form/errors.mjs.map +1 -0
  56. package/dist/components/compound/pipe-form/footer.d.mts +7 -7
  57. package/dist/components/compound/pipe-form/footer.d.mts.map +1 -1
  58. package/dist/components/compound/pipe-form/footer.mjs +11 -6
  59. package/dist/components/compound/pipe-form/footer.mjs.map +1 -1
  60. package/dist/components/compound/pipe-form/header.d.mts +7 -7
  61. package/dist/components/compound/pipe-form/header.d.mts.map +1 -1
  62. package/dist/components/compound/pipe-form/header.mjs +11 -6
  63. package/dist/components/compound/pipe-form/header.mjs.map +1 -1
  64. package/dist/components/compound/pipe-form/index.d.mts +2 -1
  65. package/dist/components/compound/pipe-form/root.d.mts +18 -11
  66. package/dist/components/compound/pipe-form/root.d.mts.map +1 -1
  67. package/dist/components/compound/pipe-form/root.mjs +21 -27
  68. package/dist/components/compound/pipe-form/root.mjs.map +1 -1
  69. package/dist/components/compound/pipe-form/submit-button.d.mts +15 -4
  70. package/dist/components/compound/pipe-form/submit-button.d.mts.map +1 -1
  71. package/dist/components/compound/pipe-form/submit-button.mjs +23 -8
  72. package/dist/components/compound/pipe-form/submit-button.mjs.map +1 -1
  73. package/dist/components/compound/pipe-form/title.d.mts +9 -8
  74. package/dist/components/compound/pipe-form/title.d.mts.map +1 -1
  75. package/dist/components/compound/pipe-form/title.mjs +11 -6
  76. package/dist/components/compound/pipe-form/title.mjs.map +1 -1
  77. package/dist/components/compound/search-catalog/active-filters.d.mts +7 -10
  78. package/dist/components/compound/search-catalog/active-filters.d.mts.map +1 -1
  79. package/dist/components/compound/search-catalog/active-filters.mjs +22 -18
  80. package/dist/components/compound/search-catalog/active-filters.mjs.map +1 -1
  81. package/dist/components/compound/search-catalog/card.d.mts +4 -12
  82. package/dist/components/compound/search-catalog/card.d.mts.map +1 -1
  83. package/dist/components/compound/search-catalog/card.mjs +33 -28
  84. package/dist/components/compound/search-catalog/card.mjs.map +1 -1
  85. package/dist/components/compound/search-catalog/category-filter.d.mts +8 -10
  86. package/dist/components/compound/search-catalog/category-filter.d.mts.map +1 -1
  87. package/dist/components/compound/search-catalog/category-filter.mjs +18 -9
  88. package/dist/components/compound/search-catalog/category-filter.mjs.map +1 -1
  89. package/dist/components/compound/search-catalog/column-filter.d.mts +7 -9
  90. package/dist/components/compound/search-catalog/column-filter.d.mts.map +1 -1
  91. package/dist/components/compound/search-catalog/column-filter.mjs +13 -7
  92. package/dist/components/compound/search-catalog/column-filter.mjs.map +1 -1
  93. package/dist/components/compound/search-catalog/empty.d.mts +5 -10
  94. package/dist/components/compound/search-catalog/empty.d.mts.map +1 -1
  95. package/dist/components/compound/search-catalog/empty.mjs +12 -14
  96. package/dist/components/compound/search-catalog/empty.mjs.map +1 -1
  97. package/dist/components/compound/search-catalog/index.d.mts +1 -1
  98. package/dist/components/compound/search-catalog/list.d.mts +9 -9
  99. package/dist/components/compound/search-catalog/list.d.mts.map +1 -1
  100. package/dist/components/compound/search-catalog/list.mjs +18 -14
  101. package/dist/components/compound/search-catalog/list.mjs.map +1 -1
  102. package/dist/components/compound/search-catalog/output-field-filter.d.mts +3 -3
  103. package/dist/components/compound/search-catalog/output-field-filter.d.mts.map +1 -1
  104. package/dist/components/compound/search-catalog/output-field-filter.mjs.map +1 -1
  105. package/dist/components/compound/search-catalog/provider-filter.d.mts +3 -3
  106. package/dist/components/compound/search-catalog/provider-filter.d.mts.map +1 -1
  107. package/dist/components/compound/search-catalog/provider-filter.mjs.map +1 -1
  108. package/dist/components/compound/search-catalog/root.d.mts +6 -6
  109. package/dist/components/compound/search-catalog/root.d.mts.map +1 -1
  110. package/dist/components/compound/search-catalog/root.mjs +2 -2
  111. package/dist/components/compound/search-catalog/root.mjs.map +1 -1
  112. package/dist/components/compound/search-catalog/search-filter.d.mts +6 -9
  113. package/dist/components/compound/search-catalog/search-filter.d.mts.map +1 -1
  114. package/dist/components/compound/search-catalog/search-filter.mjs +10 -9
  115. package/dist/components/compound/search-catalog/search-filter.mjs.map +1 -1
  116. package/dist/components/compound/search-catalog/tag-filter.d.mts +3 -3
  117. package/dist/components/compound/search-catalog/tag-filter.d.mts.map +1 -1
  118. package/dist/components/compound/search-catalog/tag-filter.mjs.map +1 -1
  119. package/dist/components/compound/search-form/content.d.mts +7 -2
  120. package/dist/components/compound/search-form/content.d.mts.map +1 -1
  121. package/dist/components/compound/search-form/content.mjs +23 -25
  122. package/dist/components/compound/search-form/content.mjs.map +1 -1
  123. package/dist/components/compound/search-form/errors.d.mts +27 -0
  124. package/dist/components/compound/search-form/errors.d.mts.map +1 -0
  125. package/dist/components/compound/search-form/errors.mjs +48 -0
  126. package/dist/components/compound/search-form/errors.mjs.map +1 -0
  127. package/dist/components/compound/search-form/footer.d.mts +7 -7
  128. package/dist/components/compound/search-form/footer.d.mts.map +1 -1
  129. package/dist/components/compound/search-form/footer.mjs +11 -6
  130. package/dist/components/compound/search-form/footer.mjs.map +1 -1
  131. package/dist/components/compound/search-form/header.d.mts +7 -7
  132. package/dist/components/compound/search-form/header.d.mts.map +1 -1
  133. package/dist/components/compound/search-form/header.mjs +11 -6
  134. package/dist/components/compound/search-form/header.mjs.map +1 -1
  135. package/dist/components/compound/search-form/index.d.mts +2 -1
  136. package/dist/components/compound/search-form/root.d.mts +19 -12
  137. package/dist/components/compound/search-form/root.d.mts.map +1 -1
  138. package/dist/components/compound/search-form/root.mjs +21 -27
  139. package/dist/components/compound/search-form/root.mjs.map +1 -1
  140. package/dist/components/compound/search-form/submit-button.d.mts +15 -4
  141. package/dist/components/compound/search-form/submit-button.d.mts.map +1 -1
  142. package/dist/components/compound/search-form/submit-button.mjs +23 -8
  143. package/dist/components/compound/search-form/submit-button.mjs.map +1 -1
  144. package/dist/components/compound/search-form/title.d.mts +9 -8
  145. package/dist/components/compound/search-form/title.d.mts.map +1 -1
  146. package/dist/components/compound/search-form/title.mjs +11 -6
  147. package/dist/components/compound/search-form/title.mjs.map +1 -1
  148. package/dist/components/compound/searches-catalog/active-filters.d.mts +7 -10
  149. package/dist/components/compound/searches-catalog/active-filters.d.mts.map +1 -1
  150. package/dist/components/compound/searches-catalog/active-filters.mjs +22 -18
  151. package/dist/components/compound/searches-catalog/active-filters.mjs.map +1 -1
  152. package/dist/components/compound/searches-catalog/card.d.mts +6 -6
  153. package/dist/components/compound/searches-catalog/card.d.mts.map +1 -1
  154. package/dist/components/compound/searches-catalog/card.mjs +40 -28
  155. package/dist/components/compound/searches-catalog/card.mjs.map +1 -1
  156. package/dist/components/compound/searches-catalog/category-filter.d.mts +8 -10
  157. package/dist/components/compound/searches-catalog/category-filter.d.mts.map +1 -1
  158. package/dist/components/compound/searches-catalog/category-filter.mjs +18 -9
  159. package/dist/components/compound/searches-catalog/category-filter.mjs.map +1 -1
  160. package/dist/components/compound/searches-catalog/column-filter.d.mts +7 -9
  161. package/dist/components/compound/searches-catalog/column-filter.d.mts.map +1 -1
  162. package/dist/components/compound/searches-catalog/column-filter.mjs +13 -7
  163. package/dist/components/compound/searches-catalog/column-filter.mjs.map +1 -1
  164. package/dist/components/compound/searches-catalog/empty.d.mts +5 -10
  165. package/dist/components/compound/searches-catalog/empty.d.mts.map +1 -1
  166. package/dist/components/compound/searches-catalog/empty.mjs +12 -14
  167. package/dist/components/compound/searches-catalog/empty.mjs.map +1 -1
  168. package/dist/components/compound/searches-catalog/index.d.mts +1 -1
  169. package/dist/components/compound/searches-catalog/list.d.mts +9 -9
  170. package/dist/components/compound/searches-catalog/list.d.mts.map +1 -1
  171. package/dist/components/compound/searches-catalog/list.mjs +18 -14
  172. package/dist/components/compound/searches-catalog/list.mjs.map +1 -1
  173. package/dist/components/compound/searches-catalog/output-field-filter.d.mts +3 -3
  174. package/dist/components/compound/searches-catalog/output-field-filter.d.mts.map +1 -1
  175. package/dist/components/compound/searches-catalog/output-field-filter.mjs.map +1 -1
  176. package/dist/components/compound/searches-catalog/provider-filter.d.mts +3 -3
  177. package/dist/components/compound/searches-catalog/provider-filter.d.mts.map +1 -1
  178. package/dist/components/compound/searches-catalog/provider-filter.mjs.map +1 -1
  179. package/dist/components/compound/searches-catalog/root.d.mts +6 -6
  180. package/dist/components/compound/searches-catalog/root.d.mts.map +1 -1
  181. package/dist/components/compound/searches-catalog/root.mjs +2 -2
  182. package/dist/components/compound/searches-catalog/root.mjs.map +1 -1
  183. package/dist/components/compound/searches-catalog/search-filter.d.mts +6 -9
  184. package/dist/components/compound/searches-catalog/search-filter.d.mts.map +1 -1
  185. package/dist/components/compound/searches-catalog/search-filter.mjs +10 -9
  186. package/dist/components/compound/searches-catalog/search-filter.mjs.map +1 -1
  187. package/dist/components/compound/searches-catalog/tag-filter.d.mts +3 -3
  188. package/dist/components/compound/searches-catalog/tag-filter.d.mts.map +1 -1
  189. package/dist/components/compound/searches-catalog/tag-filter.mjs.map +1 -1
  190. package/dist/components/defaults/adapters/index.mjs +2 -2
  191. package/dist/components/defaults/adapters/index.mjs.map +1 -1
  192. package/dist/components/defaults/adapters/json-extraction-input.mjs +291 -199
  193. package/dist/components/defaults/adapters/json-extraction-input.mjs.map +1 -1
  194. package/dist/components/defaults/adapters/{pipes-trigger-input.mjs → pipes-run-if-input.mjs} +32 -32
  195. package/dist/components/defaults/adapters/pipes-run-if-input.mjs.map +1 -0
  196. package/dist/components/defaults/adapters/providers-input.mjs +221 -13
  197. package/dist/components/defaults/adapters/providers-input.mjs.map +1 -1
  198. package/dist/components/defaults/catalog/card-primitives.d.mts +14 -24
  199. package/dist/components/defaults/catalog/card-primitives.d.mts.map +1 -1
  200. package/dist/components/defaults/catalog/card-primitives.mjs +19 -19
  201. package/dist/components/defaults/catalog/card-primitives.mjs.map +1 -1
  202. package/dist/components/defaults/catalog/layout.mjs +7 -10
  203. package/dist/components/defaults/catalog/layout.mjs.map +1 -1
  204. package/dist/components/defaults/layout/field-wrapper.d.mts +2 -1
  205. package/dist/components/defaults/layout/field-wrapper.d.mts.map +1 -1
  206. package/dist/components/defaults/layout/field-wrapper.mjs +7 -2
  207. package/dist/components/defaults/layout/field-wrapper.mjs.map +1 -1
  208. package/dist/components/defaults/layout/group.d.mts +6 -3
  209. package/dist/components/defaults/layout/group.d.mts.map +1 -1
  210. package/dist/components/defaults/layout/group.mjs +74 -53
  211. package/dist/components/defaults/layout/group.mjs.map +1 -1
  212. package/dist/components/defaults/layout/section.d.mts +9 -3
  213. package/dist/components/defaults/layout/section.d.mts.map +1 -1
  214. package/dist/components/defaults/layout/section.mjs +13 -11
  215. package/dist/components/defaults/layout/section.mjs.map +1 -1
  216. package/dist/components/field-renderer.d.mts.map +1 -1
  217. package/dist/components/field-renderer.mjs +1 -1
  218. package/dist/components/field-renderer.mjs.map +1 -1
  219. package/dist/components/internal/LiquidEditor/ChipEditPopover.mjs +30 -15
  220. package/dist/components/internal/LiquidEditor/ChipEditPopover.mjs.map +1 -1
  221. package/dist/components/internal/icons.mjs +36 -1
  222. package/dist/components/internal/icons.mjs.map +1 -1
  223. package/dist/components/internal/multi-select-popover-trigger.mjs +0 -1
  224. package/dist/components/internal/multi-select-popover-trigger.mjs.map +1 -1
  225. package/dist/components/internal/tag-chip-decoration.mjs +15 -0
  226. package/dist/components/internal/tag-chip-decoration.mjs.map +1 -1
  227. package/dist/components/ui/badge.mjs +1 -1
  228. package/dist/components/ui/button.d.mts +1 -1
  229. package/dist/components/ui/combobox.mjs +0 -1
  230. package/dist/components/ui/combobox.mjs.map +1 -1
  231. package/dist/context/pipe-catalog-card-context.d.mts +7 -0
  232. package/dist/context/pipe-catalog-card-context.d.mts.map +1 -1
  233. package/dist/context/pipe-catalog-card-context.mjs.map +1 -1
  234. package/dist/context/pipe-form-context.d.mts +17 -3
  235. package/dist/context/pipe-form-context.d.mts.map +1 -1
  236. package/dist/context/pipe-form-context.mjs.map +1 -1
  237. package/dist/context/search-catalog-card-context.d.mts +8 -0
  238. package/dist/context/search-catalog-card-context.d.mts.map +1 -1
  239. package/dist/context/search-catalog-card-context.mjs.map +1 -1
  240. package/dist/context/search-form-context.d.mts +17 -3
  241. package/dist/context/search-form-context.d.mts.map +1 -1
  242. package/dist/context/search-form-context.mjs.map +1 -1
  243. package/dist/context/searches-catalog-card-context.d.mts +8 -0
  244. package/dist/context/searches-catalog-card-context.d.mts.map +1 -1
  245. package/dist/context/searches-catalog-card-context.mjs.map +1 -1
  246. package/dist/hooks/use-field-error.d.mts +2 -2
  247. package/dist/hooks/use-field-error.d.mts.map +1 -1
  248. package/dist/hooks/use-field-error.mjs +7 -3
  249. package/dist/hooks/use-field-error.mjs.map +1 -1
  250. package/dist/hooks/use-form-core.d.mts +0 -3
  251. package/dist/hooks/use-form-core.d.mts.map +1 -1
  252. package/dist/hooks/use-form-core.mjs +36 -2
  253. package/dist/hooks/use-form-core.mjs.map +1 -1
  254. package/dist/hooks/use-pipe-catalog-table.d.mts +8 -8
  255. package/dist/hooks/use-pipe-form.d.mts +11 -0
  256. package/dist/hooks/use-pipe-form.d.mts.map +1 -1
  257. package/dist/hooks/use-pipe-form.mjs +35 -6
  258. package/dist/hooks/use-pipe-form.mjs.map +1 -1
  259. package/dist/hooks/use-search-catalog-table.d.mts +6 -6
  260. package/dist/hooks/use-search-form.d.mts +11 -0
  261. package/dist/hooks/use-search-form.d.mts.map +1 -1
  262. package/dist/hooks/use-search-form.mjs +35 -6
  263. package/dist/hooks/use-search-form.mjs.map +1 -1
  264. package/dist/index.d.mts +9 -8
  265. package/dist/index.mjs +3 -9
  266. package/dist/styles/pipe0-form.css +4116 -1
  267. package/dist/types/adapters.d.mts +6 -5
  268. package/dist/types/adapters.d.mts.map +1 -1
  269. package/dist/types/catalog-adapters.d.mts +2 -2
  270. package/dist/types/field-props.d.mts +4 -16
  271. package/dist/types/field-props.d.mts.map +1 -1
  272. package/dist/types/form-handle.d.mts +81 -1
  273. package/dist/types/form-handle.d.mts.map +1 -1
  274. package/dist/utils/build-section-handlers.mjs +6 -2
  275. package/dist/utils/build-section-handlers.mjs.map +1 -1
  276. package/dist/utils/internal-form.mjs +28 -0
  277. package/dist/utils/internal-form.mjs.map +1 -0
  278. package/dist/widgets/avatar-group.d.mts +4 -7
  279. package/dist/widgets/avatar-group.d.mts.map +1 -1
  280. package/dist/widgets/avatar-group.mjs +13 -12
  281. package/dist/widgets/avatar-group.mjs.map +1 -1
  282. package/package.json +70 -18
  283. package/dist/components/compound/pipe-catalog/index.mjs +0 -15
  284. package/dist/components/compound/pipe-form/index.mjs +0 -11
  285. package/dist/components/compound/search-catalog/index.mjs +0 -14
  286. package/dist/components/compound/search-form/index.mjs +0 -11
  287. package/dist/components/compound/searches-catalog/index.mjs +0 -14
  288. package/dist/components/defaults/adapters/pipes-trigger-input.mjs.map +0 -1
  289. package/dist/components/defaults/layout/submit-button.d.mts +0 -9
  290. package/dist/components/defaults/layout/submit-button.d.mts.map +0 -1
  291. package/dist/components/defaults/layout/submit-button.mjs +0 -23
  292. package/dist/components/defaults/layout/submit-button.mjs.map +0 -1
  293. package/dist/components/defaults/toggle-advanced-button.mjs +0 -29
  294. package/dist/components/defaults/toggle-advanced-button.mjs.map +0 -1
  295. package/dist/components/ui/input-group.mjs +0 -30
  296. package/dist/components/ui/input-group.mjs.map +0 -1
  297. package/dist/context/form-customization-context.d.mts +0 -71
  298. package/dist/context/form-customization-context.d.mts.map +0 -1
  299. package/dist/context/form-customization-context.mjs +0 -114
  300. package/dist/context/form-customization-context.mjs.map +0 -1
  301. package/dist/hooks/use-disclosure.mjs +0 -35
  302. package/dist/hooks/use-disclosure.mjs.map +0 -1
  303. package/dist/utils/render-slot.d.mts +0 -44
  304. package/dist/utils/render-slot.d.mts.map +0 -1
  305. package/dist/utils/render-slot.mjs +0 -30
  306. package/dist/utils/render-slot.mjs.map +0 -1
  307. package/dist/widgets/index.mjs +0 -11
@@ -1 +1 @@
1
- {"version":3,"file":"column-filter.mjs","names":[],"sources":["../../../../src/components/compound/search-catalog/column-filter.tsx"],"sourcesContent":["import type { ComponentProps, ReactNode } from \"react\";\nimport { useSearchCatalogContext } from \"../../../context/search-catalog-context.js\";\nimport { type RenderProp, renderSlot } from \"../../../utils/render-slot.js\";\nimport {\n DefaultFilterSelect,\n type FilterSelectOption,\n} from \"../../defaults/catalog/filter-select.js\";\n\nexport type SearchColumnFilterId = \"outputFields\" | \"providers\" | \"tags\";\n\n/**\n * Render-prop state shared by every specific column filter component\n * (output/provider/tag) and the generic `<SearchCatalogColumnFilter>`.\n */\nexport interface ColumnFilterState {\n value: string;\n setValue: (v: string | null) => void;\n options: ReadonlyArray<FilterSelectOption>;\n isActive: boolean;\n}\n\nexport interface SearchCatalogColumnFilterProps {\n id: SearchColumnFilterId;\n placeholder?: ReactNode;\n options?: ReadonlyArray<FilterSelectOption>;\n className?: string;\n render?: RenderProp<ComponentProps<\"div\">, ColumnFilterState>;\n}\n\nfunction getDefaultOptions(\n id: SearchColumnFilterId,\n ctx: ReturnType<typeof useSearchCatalogContext>,\n): FilterSelectOption[] {\n let entries: ReadonlyArray<readonly [string, unknown]> = [];\n switch (id) {\n case \"outputFields\":\n entries = ctx.sortedOutputFieldEntries;\n break;\n case \"providers\":\n entries = ctx.sortedProviderEntries;\n break;\n case \"tags\":\n entries = ctx.sortedTagEntries;\n break;\n }\n return entries.map(([name]) => ({ label: name, value: name }));\n}\n\n/**\n * Generic column-filter escape hatch. For built-in filters prefer the specific\n * components: `<SearchCatalogOutputFieldFilter>`, `<SearchCatalogProviderFilter>`,\n * `<SearchCatalogTagFilter>`.\n */\nexport function SearchCatalogColumnFilter({\n id,\n placeholder,\n options,\n className,\n render,\n}: SearchCatalogColumnFilterProps) {\n const ctx = useSearchCatalogContext();\n const value = ctx.getColumnFilterValue(id) || \"\";\n const resolvedOptions = options ?? getDefaultOptions(id, ctx);\n const setValue = (v: string | null) => {\n if (v == null) ctx.removeColumnFilter(id);\n else ctx.addColumnFilter(id, v);\n };\n\n if (render) {\n return renderSlot({\n defaultTagName: \"div\",\n render,\n state: {\n value,\n setValue,\n options: resolvedOptions,\n isActive: !!value,\n },\n props: {\n \"data-p0\": `catalog-column-filter-${id}`,\n className,\n } as ComponentProps<\"div\">,\n });\n }\n\n return (\n <DefaultFilterSelect\n placeholder={placeholder}\n value={value}\n onChange={setValue}\n options={resolvedOptions}\n className={className}\n />\n );\n}\n"],"mappings":";;;;;;AA6BA,SAAS,kBACP,IACA,KACsB;CACtB,IAAI,UAAqD,EAAE;AAC3D,SAAQ,IAAR;EACE,KAAK;AACH,aAAU,IAAI;AACd;EACF,KAAK;AACH,aAAU,IAAI;AACd;EACF,KAAK;AACH,aAAU,IAAI;AACd;;AAEJ,QAAO,QAAQ,KAAK,CAAC,WAAW;EAAE,OAAO;EAAM,OAAO;EAAM,EAAE;;;;;;;AAQhE,SAAgB,0BAA0B,EACxC,IACA,aACA,SACA,WACA,UACiC;CACjC,MAAM,MAAM,yBAAyB;CACrC,MAAM,QAAQ,IAAI,qBAAqB,GAAG,IAAI;CAC9C,MAAM,kBAAkB,WAAW,kBAAkB,IAAI,IAAI;CAC7D,MAAM,YAAY,MAAqB;AACrC,MAAI,KAAK,KAAM,KAAI,mBAAmB,GAAG;MACpC,KAAI,gBAAgB,IAAI,EAAE;;AAGjC,KAAI,OACF,QAAO,WAAW;EAChB,gBAAgB;EAChB;EACA,OAAO;GACL;GACA;GACA,SAAS;GACT,UAAU,CAAC,CAAC;GACb;EACD,OAAO;GACL,WAAW,yBAAyB;GACpC;GACD;EACF,CAAC;AAGJ,QACE,oBAAC,qBAAD;EACe;EACN;EACP,UAAU;EACV,SAAS;EACE;EACX"}
1
+ {"version":3,"file":"column-filter.mjs","names":[],"sources":["../../../../src/components/compound/search-catalog/column-filter.tsx"],"sourcesContent":["import { mergeProps } from \"@base-ui/react/merge-props\";\nimport { useRender } from \"@base-ui/react/use-render\";\nimport type { ReactNode } from \"react\";\nimport { useSearchCatalogContext } from \"../../../context/search-catalog-context.js\";\nimport {\n DefaultFilterSelect,\n type FilterSelectOption,\n} from \"../../defaults/catalog/filter-select.js\";\n\nexport type SearchColumnFilterId = \"outputFields\" | \"providers\" | \"tags\";\n\n/**\n * Render-prop state shared by every specific column filter component\n * (output/provider/tag) and the generic `<SearchCatalogColumnFilter>`.\n */\nexport interface ColumnFilterState {\n value: string;\n setValue: (value: string | null) => void;\n options: ReadonlyArray<FilterSelectOption>;\n isActive: boolean;\n}\n\nexport interface SearchCatalogColumnFilterProps\n extends useRender.ComponentProps<\"div\", ColumnFilterState> {\n id: SearchColumnFilterId;\n placeholder?: ReactNode;\n options?: ReadonlyArray<FilterSelectOption>;\n}\n\nfunction getDefaultOptions(\n id: SearchColumnFilterId,\n ctx: ReturnType<typeof useSearchCatalogContext>,\n): FilterSelectOption[] {\n let entries: ReadonlyArray<readonly [string, unknown]> = [];\n switch (id) {\n case \"outputFields\":\n entries = ctx.sortedOutputFieldEntries;\n break;\n case \"providers\":\n entries = ctx.sortedProviderEntries;\n break;\n case \"tags\":\n entries = ctx.sortedTagEntries;\n break;\n }\n return entries.map(([name]) => ({ label: name, value: name }));\n}\n\n/**\n * Generic column-filter escape hatch. For built-in filters prefer the specific\n * components: `<SearchCatalogOutputFieldFilter>`, `<SearchCatalogProviderFilter>`,\n * `<SearchCatalogTagFilter>`.\n */\nexport function SearchCatalogColumnFilter({\n id,\n placeholder,\n options,\n className,\n render,\n ...props\n}: SearchCatalogColumnFilterProps) {\n const ctx = useSearchCatalogContext();\n const value = ctx.getColumnFilterValue(id) || \"\";\n const resolvedOptions = options ?? getDefaultOptions(id, ctx);\n const setValue = (v: string | null) => {\n if (v == null) ctx.removeColumnFilter(id);\n else ctx.addColumnFilter(id, v);\n };\n\n const element = useRender({\n defaultTagName: \"div\",\n render,\n state: { value, setValue, options: resolvedOptions, isActive: !!value },\n stateAttributesMapping: {\n setValue: () => null,\n options: () => null,\n },\n props: mergeProps<\"div\">(\n {\n className,\n ...({ \"data-p0\": `catalog-column-filter-${id}` } as Record<string, string>),\n },\n props,\n ),\n });\n\n if (render) return element;\n\n return (\n <DefaultFilterSelect\n placeholder={placeholder}\n value={value}\n onChange={setValue}\n options={resolvedOptions}\n className={className}\n />\n );\n}\n"],"mappings":";;;;;;;AA6BA,SAAS,kBACP,IACA,KACsB;CACtB,IAAI,UAAqD,EAAE;AAC3D,SAAQ,IAAR;EACE,KAAK;AACH,aAAU,IAAI;AACd;EACF,KAAK;AACH,aAAU,IAAI;AACd;EACF,KAAK;AACH,aAAU,IAAI;AACd;;AAEJ,QAAO,QAAQ,KAAK,CAAC,WAAW;EAAE,OAAO;EAAM,OAAO;EAAM,EAAE;;;;;;;AAQhE,SAAgB,0BAA0B,EACxC,IACA,aACA,SACA,WACA,QACA,GAAG,SAC8B;CACjC,MAAM,MAAM,yBAAyB;CACrC,MAAM,QAAQ,IAAI,qBAAqB,GAAG,IAAI;CAC9C,MAAM,kBAAkB,WAAW,kBAAkB,IAAI,IAAI;CAC7D,MAAM,YAAY,MAAqB;AACrC,MAAI,KAAK,KAAM,KAAI,mBAAmB,GAAG;MACpC,KAAI,gBAAgB,IAAI,EAAE;;CAGjC,MAAM,UAAU,UAAU;EACxB,gBAAgB;EAChB;EACA,OAAO;GAAE;GAAO;GAAU,SAAS;GAAiB,UAAU,CAAC,CAAC;GAAO;EACvE,wBAAwB;GACtB,gBAAgB;GAChB,eAAe;GAChB;EACD,OAAO,WACL;GACE;GACM,WAAW,yBAAyB;GAC3C,EACD,MACD;EACF,CAAC;AAEF,KAAI,OAAQ,QAAO;AAEnB,QACE,oBAAC,qBAAD;EACe;EACN;EACP,UAAU;EACV,SAAS;EACE;EACX"}
@@ -1,22 +1,17 @@
1
- import { RenderProp } from "../../../utils/render-slot.mjs";
1
+ import { useRender } from "@base-ui/react/use-render";
2
2
  import * as _$react from "react";
3
- import { ComponentProps, ReactNode } from "react";
4
- import * as _$react_jsx_runtime0 from "react/jsx-runtime";
5
3
 
6
4
  //#region src/components/compound/search-catalog/empty.d.ts
7
5
  interface SearchCatalogEmptyState {
8
6
  visible: boolean;
9
7
  }
10
- interface SearchCatalogEmptyProps {
11
- children?: ReactNode;
12
- className?: string;
13
- render?: RenderProp<ComponentProps<"div">, SearchCatalogEmptyState>;
14
- }
8
+ interface SearchCatalogEmptyProps extends useRender.ComponentProps<"div", SearchCatalogEmptyState> {}
15
9
  declare function SearchCatalogEmpty({
16
10
  children,
17
11
  className,
18
- render
19
- }: SearchCatalogEmptyProps): string | number | bigint | boolean | _$react_jsx_runtime0.JSX.Element | Iterable<ReactNode> | Promise<string | number | bigint | boolean | _$react.ReactPortal | _$react.ReactElement<unknown, string | _$react.JSXElementConstructor<any>> | Iterable<ReactNode> | null | undefined> | null | undefined;
12
+ render,
13
+ ...props
14
+ }: SearchCatalogEmptyProps): _$react.ReactElement<unknown, string | _$react.JSXElementConstructor<any>> | null;
20
15
  //#endregion
21
16
  export { SearchCatalogEmpty, SearchCatalogEmptyProps, SearchCatalogEmptyState };
22
17
  //# sourceMappingURL=empty.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"empty.d.mts","names":[],"sources":["../../../../src/components/compound/search-catalog/empty.tsx"],"mappings":";;;;;;UAMiB,uBAAA;EACf,OAAA;AAAA;AAAA,UAGe,uBAAA;EACf,QAAA,GAAW,SAAA;EACX,SAAA;EACA,MAAA,GAAS,UAAA,CAAW,cAAA,SAAuB,uBAAA;AAAA;AAAA,iBAG7B,kBAAA,CAAA;EAAqB,QAAA;EAAU,SAAA;EAAW;AAAA,GAAU,uBAAA,wCAAuB,oBAAA,CAAA,GAAA,CAAA,OAAA,GAAA,QAAA,CAAA,SAAA,IAAA,OAAA,sCAAA,OAAA,CAAA,WAAA,GAAA,OAAA,CAAA,YAAA,mBAAA,OAAA,CAAA,qBAAA,SAAA,QAAA,CAAA,SAAA"}
1
+ {"version":3,"file":"empty.d.mts","names":[],"sources":["../../../../src/components/compound/search-catalog/empty.tsx"],"mappings":";;;;UAMiB,uBAAA;EACf,OAAA;AAAA;AAAA,UAGe,uBAAA,SACP,SAAA,CAAU,cAAA,QAAsB,uBAAA;AAAA,iBAE1B,kBAAA,CAAA;EACd,QAAA;EACA,SAAA;EACA,MAAA;EAAA,GACG;AAAA,GACF,uBAAA,GAAuB,OAAA,CAAA,YAAA,mBAAA,OAAA,CAAA,qBAAA"}
@@ -1,29 +1,27 @@
1
1
  import { useCatalogConfig } from "../../../context/catalog-config-context.mjs";
2
- import { renderSlot } from "../../../utils/render-slot.mjs";
3
2
  import { useSearchCatalogContext } from "../../../context/search-catalog-context.mjs";
4
3
  import { DefaultEmptyState } from "../../defaults/catalog/empty-state.mjs";
4
+ import { mergeProps } from "@base-ui/react/merge-props";
5
+ import { useRender } from "@base-ui/react/use-render";
5
6
  import { jsx } from "react/jsx-runtime";
6
7
 
7
8
  //#region src/components/compound/search-catalog/empty.tsx
8
- function SearchCatalogEmpty({ children, className, render }) {
9
+ function SearchCatalogEmpty({ children, className, render, ...props }) {
9
10
  const { components } = useCatalogConfig();
10
11
  const visible = useSearchCatalogContext().table.getRowModel().rows.length === 0;
11
- if (!visible) return null;
12
- if (render) return renderSlot({
12
+ const EmptyState = components?.EmptyState;
13
+ const element = useRender({
13
14
  defaultTagName: "div",
14
15
  render,
15
16
  state: { visible },
16
- props: {
17
- "data-p0": "catalog-empty",
18
- className
19
- }
20
- });
21
- const EmptyState = components?.EmptyState;
22
- if (EmptyState) return /* @__PURE__ */ jsx(EmptyState, { children });
23
- return /* @__PURE__ */ jsx(DefaultEmptyState, {
24
- className,
25
- children: children ?? "No searches found. Try adjusting your filters."
17
+ props: mergeProps({
18
+ className,
19
+ children: EmptyState ? /* @__PURE__ */ jsx(EmptyState, { children }) : /* @__PURE__ */ jsx(DefaultEmptyState, { children: children ?? "No searches found. Try adjusting your filters." }),
20
+ "data-p0": "catalog-empty"
21
+ }, props)
26
22
  });
23
+ if (!visible) return null;
24
+ return element;
27
25
  }
28
26
 
29
27
  //#endregion
@@ -1 +1 @@
1
- {"version":3,"file":"empty.mjs","names":[],"sources":["../../../../src/components/compound/search-catalog/empty.tsx"],"sourcesContent":["import type { ComponentProps, ReactNode } from \"react\";\nimport { useCatalogConfig } from \"../../../context/catalog-config-context.js\";\nimport { useSearchCatalogContext } from \"../../../context/search-catalog-context.js\";\nimport { type RenderProp, renderSlot } from \"../../../utils/render-slot.js\";\nimport { DefaultEmptyState } from \"../../defaults/catalog/empty-state.js\";\n\nexport interface SearchCatalogEmptyState {\n visible: boolean;\n}\n\nexport interface SearchCatalogEmptyProps {\n children?: ReactNode;\n className?: string;\n render?: RenderProp<ComponentProps<\"div\">, SearchCatalogEmptyState>;\n}\n\nexport function SearchCatalogEmpty({ children, className, render }: SearchCatalogEmptyProps) {\n const { components } = useCatalogConfig();\n const ctx = useSearchCatalogContext();\n const visible = ctx.table.getRowModel().rows.length === 0;\n if (!visible) return null;\n\n if (render) {\n return renderSlot({\n defaultTagName: \"div\",\n render,\n state: { visible },\n props: {\n \"data-p0\": \"catalog-empty\",\n className,\n } as ComponentProps<\"div\">,\n });\n }\n\n const EmptyState = components?.EmptyState;\n if (EmptyState) return <EmptyState>{children}</EmptyState>;\n\n return (\n <DefaultEmptyState className={className}>\n {children ?? \"No searches found. Try adjusting your filters.\"}\n </DefaultEmptyState>\n );\n}\n"],"mappings":";;;;;;;AAgBA,SAAgB,mBAAmB,EAAE,UAAU,WAAW,UAAmC;CAC3F,MAAM,EAAE,eAAe,kBAAkB;CAEzC,MAAM,UADM,yBAAyB,CACjB,MAAM,aAAa,CAAC,KAAK,WAAW;AACxD,KAAI,CAAC,QAAS,QAAO;AAErB,KAAI,OACF,QAAO,WAAW;EAChB,gBAAgB;EAChB;EACA,OAAO,EAAE,SAAS;EAClB,OAAO;GACL,WAAW;GACX;GACD;EACF,CAAC;CAGJ,MAAM,aAAa,YAAY;AAC/B,KAAI,WAAY,QAAO,oBAAC,YAAD,EAAa,UAAsB;AAE1D,QACE,oBAAC,mBAAD;EAA8B;YAC3B,YAAY;EACK"}
1
+ {"version":3,"file":"empty.mjs","names":[],"sources":["../../../../src/components/compound/search-catalog/empty.tsx"],"sourcesContent":["import { mergeProps } from \"@base-ui/react/merge-props\";\nimport { useRender } from \"@base-ui/react/use-render\";\nimport { useCatalogConfig } from \"../../../context/catalog-config-context.js\";\nimport { useSearchCatalogContext } from \"../../../context/search-catalog-context.js\";\nimport { DefaultEmptyState } from \"../../defaults/catalog/empty-state.js\";\n\nexport interface SearchCatalogEmptyState {\n visible: boolean;\n}\n\nexport interface SearchCatalogEmptyProps\n extends useRender.ComponentProps<\"div\", SearchCatalogEmptyState> {}\n\nexport function SearchCatalogEmpty({\n children,\n className,\n render,\n ...props\n}: SearchCatalogEmptyProps) {\n const { components } = useCatalogConfig();\n const ctx = useSearchCatalogContext();\n const visible = ctx.table.getRowModel().rows.length === 0;\n\n const EmptyState = components?.EmptyState;\n const defaultBody = EmptyState ? (\n <EmptyState>{children}</EmptyState>\n ) : (\n <DefaultEmptyState>\n {children ?? \"No searches found. Try adjusting your filters.\"}\n </DefaultEmptyState>\n );\n\n const element = useRender({\n defaultTagName: \"div\",\n render,\n state: { visible },\n props: mergeProps<\"div\">(\n {\n className,\n children: defaultBody,\n ...({ \"data-p0\": \"catalog-empty\" } as Record<string, string>),\n },\n props,\n ),\n });\n\n if (!visible) return null;\n return element;\n}\n"],"mappings":";;;;;;;;AAaA,SAAgB,mBAAmB,EACjC,UACA,WACA,QACA,GAAG,SACuB;CAC1B,MAAM,EAAE,eAAe,kBAAkB;CAEzC,MAAM,UADM,yBAAyB,CACjB,MAAM,aAAa,CAAC,KAAK,WAAW;CAExD,MAAM,aAAa,YAAY;CAS/B,MAAM,UAAU,UAAU;EACxB,gBAAgB;EAChB;EACA,OAAO,EAAE,SAAS;EAClB,OAAO,WACL;GACE;GACA,UAfc,aAClB,oBAAC,YAAD,EAAa,UAAsB,IAEnC,oBAAC,mBAAD,YACG,YAAY,kDACK;GAWV,WAAW;GAClB,EACD,MACD;EACF,CAAC;AAEF,KAAI,CAAC,QAAS,QAAO;AACrB,QAAO"}
@@ -7,6 +7,6 @@ import { SearchCatalogEmpty, SearchCatalogEmptyProps, SearchCatalogEmptyState }
7
7
  import { SearchCatalogList, SearchCatalogListProps, SearchCatalogListState } from "./list.mjs";
8
8
  import { SearchCatalogOutputFieldFilter, SearchCatalogOutputFieldFilterProps } from "./output-field-filter.mjs";
9
9
  import { SearchCatalogProviderFilter, SearchCatalogProviderFilterProps } from "./provider-filter.mjs";
10
- import { SearchCatalog, SearchCatalogInstanceProps, SearchCatalogLegacyProps, SearchCatalogProps } from "./root.mjs";
10
+ import { SearchCatalog, SearchCatalogInstanceProps, SearchCatalogProps, SearchCatalogZeroConfigProps } from "./root.mjs";
11
11
  import { SearchCatalogSearchFilter, SearchCatalogSearchFilterProps, SearchCatalogSearchFilterState } from "./search-filter.mjs";
12
12
  import { SearchCatalogTagFilter, SearchCatalogTagFilterProps } from "./tag-filter.mjs";
@@ -1,19 +1,19 @@
1
- import { RenderProp } from "../../../utils/render-slot.mjs";
2
1
  import { SearchCardData } from "../../../types/catalog-adapters.mjs";
3
- import { ComponentProps, ReactNode } from "react";
2
+ import { useRender } from "@base-ui/react/use-render";
3
+ import * as _$react from "react";
4
4
 
5
5
  //#region src/components/compound/search-catalog/list.d.ts
6
6
  interface SearchCatalogListState {
7
- cards: SearchCardData[];
8
- }
9
- interface SearchCatalogListProps {
10
- render?: RenderProp<ComponentProps<"div">, SearchCatalogListState>;
11
- className?: string;
7
+ cards: ReadonlyArray<SearchCardData>;
8
+ isEmpty: boolean;
12
9
  }
10
+ interface SearchCatalogListProps extends useRender.ComponentProps<"div", SearchCatalogListState> {}
13
11
  declare function SearchCatalogList({
14
12
  render,
15
- className
16
- }: SearchCatalogListProps): ReactNode;
13
+ className,
14
+ children,
15
+ ...props
16
+ }: SearchCatalogListProps): _$react.ReactElement<unknown, string | _$react.JSXElementConstructor<any>> | null;
17
17
  //#endregion
18
18
  export { SearchCatalogList, SearchCatalogListProps, SearchCatalogListState };
19
19
  //# sourceMappingURL=list.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"list.d.mts","names":[],"sources":["../../../../src/components/compound/search-catalog/list.tsx"],"mappings":";;;;;UAOiB,sBAAA;EACf,KAAA,EAAO,cAAA;AAAA;AAAA,UAGQ,sBAAA;EACf,MAAA,GAAS,UAAA,CAAW,cAAA,SAAuB,sBAAA;EAC3C,SAAA;AAAA;AAAA,iBAGc,iBAAA,CAAA;EAAoB,MAAA;EAAQ;AAAA,GAAa,sBAAA,GAAyB,SAAA"}
1
+ {"version":3,"file":"list.d.mts","names":[],"sources":["../../../../src/components/compound/search-catalog/list.tsx"],"mappings":";;;;;UAOiB,sBAAA;EACf,KAAA,EAAO,aAAA,CAAc,cAAA;EACrB,OAAA;AAAA;AAAA,UAGe,sBAAA,SACP,SAAA,CAAU,cAAA,QAAsB,sBAAA;AAAA,iBAE1B,iBAAA,CAAA;EACd,MAAA;EACA,SAAA;EACA,QAAA;EAAA,GACG;AAAA,GACF,sBAAA,GAAsB,OAAA,CAAA,YAAA,mBAAA,OAAA,CAAA,qBAAA"}
@@ -1,27 +1,31 @@
1
1
  import { cn } from "../../../lib/utils.mjs";
2
- import { renderSlot } from "../../../utils/render-slot.mjs";
3
2
  import { useSearchCatalogContext } from "../../../context/search-catalog-context.mjs";
4
3
  import { SearchCatalogCard } from "./card.mjs";
4
+ import { mergeProps } from "@base-ui/react/merge-props";
5
+ import { useRender } from "@base-ui/react/use-render";
5
6
  import { jsx } from "react/jsx-runtime";
6
7
 
7
8
  //#region src/components/compound/search-catalog/list.tsx
8
- function SearchCatalogList({ render, className }) {
9
+ function SearchCatalogList({ render, className, children, ...props }) {
9
10
  const { cards } = useSearchCatalogContext();
10
- if (cards.length === 0) return null;
11
- if (render) return renderSlot({
11
+ const isEmpty = cards.length === 0;
12
+ const defaultBody = cards.map((card, idx) => /* @__PURE__ */ jsx(SearchCatalogCard, { card }, `${card.searchId}-${idx}`));
13
+ const element = useRender({
12
14
  defaultTagName: "div",
13
15
  render,
14
- state: { cards },
15
- props: {
16
- "data-p0": "catalog-list",
17
- className: cn("pz:flex pz:flex-col pz:gap-2", className)
18
- }
19
- });
20
- return /* @__PURE__ */ jsx("div", {
21
- "data-p0": "catalog-list",
22
- className: cn("pz:flex pz:flex-col pz:gap-2", className),
23
- children: cards.map((card, idx) => /* @__PURE__ */ jsx(SearchCatalogCard, { card }, `${card.searchId}-${idx}`))
16
+ state: {
17
+ cards,
18
+ isEmpty
19
+ },
20
+ stateAttributesMapping: { cards: () => null },
21
+ props: mergeProps({
22
+ className: cn("pz:flex pz:flex-col pz:gap-2", className),
23
+ children: children ?? defaultBody,
24
+ "data-p0": "catalog-list"
25
+ }, props)
24
26
  });
27
+ if (isEmpty) return null;
28
+ return element;
25
29
  }
26
30
 
27
31
  //#endregion
@@ -1 +1 @@
1
- {"version":3,"file":"list.mjs","names":[],"sources":["../../../../src/components/compound/search-catalog/list.tsx"],"sourcesContent":["import type { ComponentProps, ReactNode } from \"react\";\nimport { useSearchCatalogContext } from \"../../../context/search-catalog-context.js\";\nimport { cn } from \"../../../lib/utils.js\";\nimport type { SearchCardData } from \"../../../types/catalog-adapters.js\";\nimport { type RenderProp, renderSlot } from \"../../../utils/render-slot.js\";\nimport { SearchCatalogCard } from \"./card.js\";\n\nexport interface SearchCatalogListState {\n cards: SearchCardData[];\n}\n\nexport interface SearchCatalogListProps {\n render?: RenderProp<ComponentProps<\"div\">, SearchCatalogListState>;\n className?: string;\n}\n\nexport function SearchCatalogList({ render, className }: SearchCatalogListProps): ReactNode {\n const ctx = useSearchCatalogContext();\n const { cards } = ctx;\n if (cards.length === 0) return null;\n\n if (render) {\n return renderSlot({\n defaultTagName: \"div\",\n render,\n state: { cards },\n props: {\n \"data-p0\": \"catalog-list\",\n className: cn(\"pz:flex pz:flex-col pz:gap-2\", className),\n } as ComponentProps<\"div\">,\n });\n }\n\n return (\n <div data-p0=\"catalog-list\" className={cn(\"pz:flex pz:flex-col pz:gap-2\", className)}>\n {cards.map((card, idx) => (\n <SearchCatalogCard key={`${card.searchId}-${idx}`} card={card} />\n ))}\n </div>\n );\n}\n"],"mappings":";;;;;;;AAgBA,SAAgB,kBAAkB,EAAE,QAAQ,aAAgD;CAE1F,MAAM,EAAE,UADI,yBAAyB;AAErC,KAAI,MAAM,WAAW,EAAG,QAAO;AAE/B,KAAI,OACF,QAAO,WAAW;EAChB,gBAAgB;EAChB;EACA,OAAO,EAAE,OAAO;EAChB,OAAO;GACL,WAAW;GACX,WAAW,GAAG,gCAAgC,UAAU;GACzD;EACF,CAAC;AAGJ,QACE,oBAAC,OAAD;EAAK,WAAQ;EAAe,WAAW,GAAG,gCAAgC,UAAU;YACjF,MAAM,KAAK,MAAM,QAChB,oBAAC,mBAAD,EAAyD,MAAQ,EAAzC,GAAG,KAAK,SAAS,GAAG,MAAqB,CACjE;EACE"}
1
+ {"version":3,"file":"list.mjs","names":[],"sources":["../../../../src/components/compound/search-catalog/list.tsx"],"sourcesContent":["import { mergeProps } from \"@base-ui/react/merge-props\";\nimport { useRender } from \"@base-ui/react/use-render\";\nimport { useSearchCatalogContext } from \"../../../context/search-catalog-context.js\";\nimport { cn } from \"../../../lib/utils.js\";\nimport type { SearchCardData } from \"../../../types/catalog-adapters.js\";\nimport { SearchCatalogCard } from \"./card.js\";\n\nexport interface SearchCatalogListState {\n cards: ReadonlyArray<SearchCardData>;\n isEmpty: boolean;\n}\n\nexport interface SearchCatalogListProps\n extends useRender.ComponentProps<\"div\", SearchCatalogListState> {}\n\nexport function SearchCatalogList({\n render,\n className,\n children,\n ...props\n}: SearchCatalogListProps) {\n const { cards } = useSearchCatalogContext();\n const isEmpty = cards.length === 0;\n\n const defaultBody = cards.map((card, idx) => (\n <SearchCatalogCard key={`${card.searchId}-${idx}`} card={card} />\n ));\n\n const element = useRender({\n defaultTagName: \"div\",\n render,\n state: { cards, isEmpty },\n stateAttributesMapping: {\n cards: () => null,\n },\n props: mergeProps<\"div\">(\n {\n className: cn(\"pz:flex pz:flex-col pz:gap-2\", className),\n children: children ?? defaultBody,\n ...({ \"data-p0\": \"catalog-list\" } as Record<string, string>),\n },\n props,\n ),\n });\n\n if (isEmpty) return null;\n return element;\n}\n"],"mappings":";;;;;;;;AAeA,SAAgB,kBAAkB,EAChC,QACA,WACA,UACA,GAAG,SACsB;CACzB,MAAM,EAAE,UAAU,yBAAyB;CAC3C,MAAM,UAAU,MAAM,WAAW;CAEjC,MAAM,cAAc,MAAM,KAAK,MAAM,QACnC,oBAAC,mBAAD,EAAyD,MAAQ,EAAzC,GAAG,KAAK,SAAS,GAAG,MAAqB,CACjE;CAEF,MAAM,UAAU,UAAU;EACxB,gBAAgB;EAChB;EACA,OAAO;GAAE;GAAO;GAAS;EACzB,wBAAwB,EACtB,aAAa,MACd;EACD,OAAO,WACL;GACE,WAAW,GAAG,gCAAgC,UAAU;GACxD,UAAU,YAAY;GAChB,WAAW;GAClB,EACD,MACD;EACF,CAAC;AAEF,KAAI,QAAS,QAAO;AACpB,QAAO"}
@@ -1,7 +1,7 @@
1
- import { RenderProp } from "../../../utils/render-slot.mjs";
2
1
  import { FilterSelectOption } from "../../defaults/catalog/filter-select.mjs";
3
2
  import { ColumnFilterState } from "./column-filter.mjs";
4
- import { ComponentProps, ReactNode } from "react";
3
+ import { useRender } from "@base-ui/react/use-render";
4
+ import { ReactNode } from "react";
5
5
  import * as _$react_jsx_runtime0 from "react/jsx-runtime";
6
6
 
7
7
  //#region src/components/compound/search-catalog/output-field-filter.d.ts
@@ -9,7 +9,7 @@ interface SearchCatalogOutputFieldFilterProps {
9
9
  options?: ReadonlyArray<FilterSelectOption>;
10
10
  placeholder?: ReactNode;
11
11
  className?: string;
12
- render?: RenderProp<ComponentProps<"div">, ColumnFilterState>;
12
+ render?: useRender.ComponentProps<"div", ColumnFilterState>["render"];
13
13
  }
14
14
  declare function SearchCatalogOutputFieldFilter({
15
15
  options,
@@ -1 +1 @@
1
- {"version":3,"file":"output-field-filter.d.mts","names":[],"sources":["../../../../src/components/compound/search-catalog/output-field-filter.tsx"],"mappings":";;;;;;;UAMiB,mCAAA;EACf,OAAA,GAAU,aAAA,CAAc,kBAAA;EACxB,WAAA,GAAc,SAAA;EACd,SAAA;EACA,MAAA,GAAS,UAAA,CAAW,cAAA,SAAuB,iBAAA;AAAA;AAAA,iBAS7B,8BAAA,CAAA;EACd,OAAA;EACA,WAAA;EACA,SAAA;EACA;AAAA,GACC,mCAAA,GAAmC,oBAAA,CAAA,GAAA,CAAA,OAAA"}
1
+ {"version":3,"file":"output-field-filter.d.mts","names":[],"sources":["../../../../src/components/compound/search-catalog/output-field-filter.tsx"],"mappings":";;;;;;;UAMiB,mCAAA;EACf,OAAA,GAAU,aAAA,CAAc,kBAAA;EACxB,WAAA,GAAc,SAAA;EACd,SAAA;EACA,MAAA,GAAS,SAAA,CAAU,cAAA,QAAsB,iBAAA;AAAA;AAAA,iBAS3B,8BAAA,CAAA;EACd,OAAA;EACA,WAAA;EACA,SAAA;EACA;AAAA,GACC,mCAAA,GAAmC,oBAAA,CAAA,GAAA,CAAA,OAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"output-field-filter.mjs","names":[],"sources":["../../../../src/components/compound/search-catalog/output-field-filter.tsx"],"sourcesContent":["import { ArrowDown } from \"lucide-react\";\nimport type { ComponentProps, ReactNode } from \"react\";\nimport type { RenderProp } from \"../../../utils/render-slot.js\";\nimport type { FilterSelectOption } from \"../../defaults/catalog/filter-select.js\";\nimport { type ColumnFilterState, SearchCatalogColumnFilter } from \"./column-filter.js\";\n\nexport interface SearchCatalogOutputFieldFilterProps {\n options?: ReadonlyArray<FilterSelectOption>;\n placeholder?: ReactNode;\n className?: string;\n render?: RenderProp<ComponentProps<\"div\">, ColumnFilterState>;\n}\n\nconst DEFAULT_PLACEHOLDER = (\n <span className=\"pz:inline-flex pz:items-center pz:gap-1.5\">\n <ArrowDown className=\"pz:size-4\" /> Output fields\n </span>\n);\n\nexport function SearchCatalogOutputFieldFilter({\n options,\n placeholder = DEFAULT_PLACEHOLDER,\n className,\n render,\n}: SearchCatalogOutputFieldFilterProps) {\n return (\n <SearchCatalogColumnFilter\n id=\"outputFields\"\n placeholder={placeholder}\n options={options}\n className={className}\n render={render}\n />\n );\n}\n"],"mappings":";;;;;AAaA,MAAM,sBACJ,qBAAC,QAAD;CAAM,WAAU;WAAhB,CACE,oBAAC,WAAD,EAAW,WAAU,aAAc,oBAC9B;;AAGT,SAAgB,+BAA+B,EAC7C,SACA,cAAc,qBACd,WACA,UACsC;AACtC,QACE,oBAAC,2BAAD;EACE,IAAG;EACU;EACJ;EACE;EACH;EACR"}
1
+ {"version":3,"file":"output-field-filter.mjs","names":[],"sources":["../../../../src/components/compound/search-catalog/output-field-filter.tsx"],"sourcesContent":["import { useRender } from \"@base-ui/react/use-render\";\nimport { ArrowDown } from \"lucide-react\";\nimport type { ReactNode } from \"react\";\nimport type { FilterSelectOption } from \"../../defaults/catalog/filter-select.js\";\nimport { type ColumnFilterState, SearchCatalogColumnFilter } from \"./column-filter.js\";\n\nexport interface SearchCatalogOutputFieldFilterProps {\n options?: ReadonlyArray<FilterSelectOption>;\n placeholder?: ReactNode;\n className?: string;\n render?: useRender.ComponentProps<\"div\", ColumnFilterState>[\"render\"];\n}\n\nconst DEFAULT_PLACEHOLDER = (\n <span className=\"pz:inline-flex pz:items-center pz:gap-1.5\">\n <ArrowDown className=\"pz:size-4\" /> Output fields\n </span>\n);\n\nexport function SearchCatalogOutputFieldFilter({\n options,\n placeholder = DEFAULT_PLACEHOLDER,\n className,\n render,\n}: SearchCatalogOutputFieldFilterProps) {\n return (\n <SearchCatalogColumnFilter\n id=\"outputFields\"\n placeholder={placeholder}\n options={options}\n className={className}\n render={render}\n />\n );\n}\n"],"mappings":";;;;;AAaA,MAAM,sBACJ,qBAAC,QAAD;CAAM,WAAU;WAAhB,CACE,oBAAC,WAAD,EAAW,WAAU,aAAc,oBAC9B;;AAGT,SAAgB,+BAA+B,EAC7C,SACA,cAAc,qBACd,WACA,UACsC;AACtC,QACE,oBAAC,2BAAD;EACE,IAAG;EACU;EACJ;EACE;EACH;EACR"}
@@ -1,7 +1,7 @@
1
- import { RenderProp } from "../../../utils/render-slot.mjs";
2
1
  import { FilterSelectOption } from "../../defaults/catalog/filter-select.mjs";
3
2
  import { ColumnFilterState } from "./column-filter.mjs";
4
- import { ComponentProps, ReactNode } from "react";
3
+ import { useRender } from "@base-ui/react/use-render";
4
+ import { ReactNode } from "react";
5
5
  import * as _$react_jsx_runtime0 from "react/jsx-runtime";
6
6
 
7
7
  //#region src/components/compound/search-catalog/provider-filter.d.ts
@@ -9,7 +9,7 @@ interface SearchCatalogProviderFilterProps {
9
9
  options?: ReadonlyArray<FilterSelectOption>;
10
10
  placeholder?: ReactNode;
11
11
  className?: string;
12
- render?: RenderProp<ComponentProps<"div">, ColumnFilterState>;
12
+ render?: useRender.ComponentProps<"div", ColumnFilterState>["render"];
13
13
  }
14
14
  declare function SearchCatalogProviderFilter({
15
15
  options,
@@ -1 +1 @@
1
- {"version":3,"file":"provider-filter.d.mts","names":[],"sources":["../../../../src/components/compound/search-catalog/provider-filter.tsx"],"mappings":";;;;;;;UAQiB,gCAAA;EACf,OAAA,GAAU,aAAA,CAAc,kBAAA;EACxB,WAAA,GAAc,SAAA;EACd,SAAA;EACA,MAAA,GAAS,UAAA,CAAW,cAAA,SAAuB,iBAAA;AAAA;AAAA,iBAS7B,2BAAA,CAAA;EACd,OAAA;EACA,WAAA;EACA,SAAA;EACA;AAAA,GACC,gCAAA,GAAgC,oBAAA,CAAA,GAAA,CAAA,OAAA"}
1
+ {"version":3,"file":"provider-filter.d.mts","names":[],"sources":["../../../../src/components/compound/search-catalog/provider-filter.tsx"],"mappings":";;;;;;;UAQiB,gCAAA;EACf,OAAA,GAAU,aAAA,CAAc,kBAAA;EACxB,WAAA,GAAc,SAAA;EACd,SAAA;EACA,MAAA,GAAS,SAAA,CAAU,cAAA,QAAsB,iBAAA;AAAA;AAAA,iBAS3B,2BAAA,CAAA;EACd,OAAA;EACA,WAAA;EACA,SAAA;EACA;AAAA,GACC,gCAAA,GAAgC,oBAAA,CAAA,GAAA,CAAA,OAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"provider-filter.mjs","names":[],"sources":["../../../../src/components/compound/search-catalog/provider-filter.tsx"],"sourcesContent":["import { getProviderEntry, type ProviderName } from \"@pipe0/base\";\nimport { Building2 } from \"lucide-react\";\nimport type { ComponentProps, ReactNode } from \"react\";\nimport { useSearchCatalogContext } from \"../../../context/search-catalog-context.js\";\nimport type { RenderProp } from \"../../../utils/render-slot.js\";\nimport type { FilterSelectOption } from \"../../defaults/catalog/filter-select.js\";\nimport { type ColumnFilterState, SearchCatalogColumnFilter } from \"./column-filter.js\";\n\nexport interface SearchCatalogProviderFilterProps {\n options?: ReadonlyArray<FilterSelectOption>;\n placeholder?: ReactNode;\n className?: string;\n render?: RenderProp<ComponentProps<\"div\">, ColumnFilterState>;\n}\n\nconst DEFAULT_PLACEHOLDER = (\n <span className=\"pz:inline-flex pz:items-center pz:gap-1.5\">\n <Building2 className=\"pz:size-4\" /> Provider\n </span>\n);\n\nexport function SearchCatalogProviderFilter({\n options,\n placeholder = DEFAULT_PLACEHOLDER,\n className,\n render,\n}: SearchCatalogProviderFilterProps) {\n const ctx = useSearchCatalogContext();\n const resolvedOptions =\n options ??\n ctx.sortedProviderEntries.map(([name]) => ({\n label: name,\n value: name,\n imageSrc: getProviderEntry(name as ProviderName)?.logoUrl,\n }));\n\n return (\n <SearchCatalogColumnFilter\n id=\"providers\"\n placeholder={placeholder}\n options={resolvedOptions}\n className={className}\n render={render}\n />\n );\n}\n"],"mappings":";;;;;;;AAeA,MAAM,sBACJ,qBAAC,QAAD;CAAM,WAAU;WAAhB,CACE,oBAAC,WAAD,EAAW,WAAU,aAAc,eAC9B;;AAGT,SAAgB,4BAA4B,EAC1C,SACA,cAAc,qBACd,WACA,UACmC;CACnC,MAAM,MAAM,yBAAyB;AASrC,QACE,oBAAC,2BAAD;EACE,IAAG;EACU;EACb,SAXF,WACA,IAAI,sBAAsB,KAAK,CAAC,WAAW;GACzC,OAAO;GACP,OAAO;GACP,UAAU,iBAAiB,KAAqB,EAAE;GACnD,EAAE;EAOU;EACH;EACR"}
1
+ {"version":3,"file":"provider-filter.mjs","names":[],"sources":["../../../../src/components/compound/search-catalog/provider-filter.tsx"],"sourcesContent":["import { useRender } from \"@base-ui/react/use-render\";\nimport { getProviderEntry, type ProviderName } from \"@pipe0/base\";\nimport { Building2 } from \"lucide-react\";\nimport type { ReactNode } from \"react\";\nimport { useSearchCatalogContext } from \"../../../context/search-catalog-context.js\";\nimport type { FilterSelectOption } from \"../../defaults/catalog/filter-select.js\";\nimport { type ColumnFilterState, SearchCatalogColumnFilter } from \"./column-filter.js\";\n\nexport interface SearchCatalogProviderFilterProps {\n options?: ReadonlyArray<FilterSelectOption>;\n placeholder?: ReactNode;\n className?: string;\n render?: useRender.ComponentProps<\"div\", ColumnFilterState>[\"render\"];\n}\n\nconst DEFAULT_PLACEHOLDER = (\n <span className=\"pz:inline-flex pz:items-center pz:gap-1.5\">\n <Building2 className=\"pz:size-4\" /> Provider\n </span>\n);\n\nexport function SearchCatalogProviderFilter({\n options,\n placeholder = DEFAULT_PLACEHOLDER,\n className,\n render,\n}: SearchCatalogProviderFilterProps) {\n const ctx = useSearchCatalogContext();\n const resolvedOptions =\n options ??\n ctx.sortedProviderEntries.map(([name]) => ({\n label: name,\n value: name,\n imageSrc: getProviderEntry(name as ProviderName)?.logoUrl,\n }));\n\n return (\n <SearchCatalogColumnFilter\n id=\"providers\"\n placeholder={placeholder}\n options={resolvedOptions}\n className={className}\n render={render}\n />\n );\n}\n"],"mappings":";;;;;;;AAeA,MAAM,sBACJ,qBAAC,QAAD;CAAM,WAAU;WAAhB,CACE,oBAAC,WAAD,EAAW,WAAU,aAAc,eAC9B;;AAGT,SAAgB,4BAA4B,EAC1C,SACA,cAAc,qBACd,WACA,UACmC;CACnC,MAAM,MAAM,yBAAyB;AASrC,QACE,oBAAC,2BAAD;EACE,IAAG;EACU;EACb,SAXF,WACA,IAAI,sBAAsB,KAAK,CAAC,WAAW;GACzC,OAAO;GACP,OAAO;GACP,UAAU,iBAAiB,KAAqB,EAAE;GACnD,EAAE;EAOU;EACH;EACR"}
@@ -1,7 +1,7 @@
1
- import { RenderProp } from "../../../utils/render-slot.mjs";
2
1
  import { CatalogClassNames, CatalogComponentOverrides, SearchCardData } from "../../../types/catalog-adapters.mjs";
3
2
  import { UseSearchCatalogTableReturn } from "../../../hooks/use-search-catalog-table.mjs";
4
- import { ComponentProps, ReactNode, SyntheticEvent } from "react";
3
+ import { useRender } from "@base-ui/react/use-render";
4
+ import { ReactNode, SyntheticEvent } from "react";
5
5
  import * as _$react_jsx_runtime0 from "react/jsx-runtime";
6
6
  import { CatalogFilter } from "@pipe0/base";
7
7
  import { ColumnFilter } from "@tanstack/react-table";
@@ -11,7 +11,7 @@ interface CustomizationProps {
11
11
  classNames?: CatalogClassNames;
12
12
  components?: CatalogComponentOverrides;
13
13
  className?: string;
14
- render?: RenderProp<ComponentProps<"div">, Record<never, never>>;
14
+ render?: useRender.ComponentProps<"div">["render"];
15
15
  }
16
16
  interface SelectionProps {
17
17
  /** Fires on click / keyboard activation of any `<SearchCatalogCard>`. */
@@ -21,13 +21,13 @@ interface SearchCatalogInstanceProps extends CustomizationProps, SelectionProps
21
21
  context: UseSearchCatalogTableReturn;
22
22
  children?: ReactNode;
23
23
  }
24
- interface SearchCatalogLegacyProps extends CustomizationProps, SelectionProps {
24
+ interface SearchCatalogZeroConfigProps extends CustomizationProps, SelectionProps {
25
25
  filter?: CatalogFilter;
26
26
  initialColumnFilters?: ColumnFilter[];
27
27
  children?: ReactNode;
28
28
  }
29
- type SearchCatalogProps = SearchCatalogInstanceProps | SearchCatalogLegacyProps;
29
+ type SearchCatalogProps = SearchCatalogInstanceProps | SearchCatalogZeroConfigProps;
30
30
  declare function SearchCatalog(props: SearchCatalogProps): _$react_jsx_runtime0.JSX.Element;
31
31
  //#endregion
32
- export { SearchCatalog, SearchCatalogInstanceProps, SearchCatalogLegacyProps, SearchCatalogProps };
32
+ export { SearchCatalog, SearchCatalogInstanceProps, SearchCatalogProps, SearchCatalogZeroConfigProps };
33
33
  //# sourceMappingURL=root.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"root.d.mts","names":[],"sources":["../../../../src/components/compound/search-catalog/root.tsx"],"mappings":";;;;;;;;;UA+BU,kBAAA;EACR,UAAA,GAAa,iBAAA;EACb,UAAA,GAAa,yBAAA;EACb,SAAA;EACA,MAAA,GAAS,UAAA,CAAW,cAAA,SAAuB,MAAA;AAAA;AAAA,UAGnC,cAAA;EALK;EAOb,cAAA,IAAkB,MAAA,EAAQ,cAAA,EAAgB,CAAA,EAAG,cAAA;AAAA;AAAA,UAG9B,0BAAA,SAAmC,kBAAA,EAAoB,cAAA;EACtE,OAAA,EAAS,2BAAA;EACT,QAAA,GAAW,SAAA;AAAA;AAAA,UAGI,wBAAA,SAAiC,kBAAA,EAAoB,cAAA;EACpE,MAAA,GAAS,aAAA;EACT,oBAAA,GAAuB,YAAA;EACvB,QAAA,GAAW,SAAA;AAAA;AAAA,KAGD,kBAAA,GAAqB,0BAAA,GAA6B,wBAAA;AAAA,iBAE9C,aAAA,CAAc,KAAA,EAAO,kBAAA,GAAkB,oBAAA,CAAA,GAAA,CAAA,OAAA"}
1
+ {"version":3,"file":"root.d.mts","names":[],"sources":["../../../../src/components/compound/search-catalog/root.tsx"],"mappings":";;;;;;;;;UA+BU,kBAAA;EACR,UAAA,GAAa,iBAAA;EACb,UAAA,GAAa,yBAAA;EACb,SAAA;EACA,MAAA,GAAS,SAAA,CAAU,cAAA;AAAA;AAAA,UAGX,cAAA;EALK;EAOb,cAAA,IAAkB,MAAA,EAAQ,cAAA,EAAgB,CAAA,EAAG,cAAA;AAAA;AAAA,UAG9B,0BAAA,SAAmC,kBAAA,EAAoB,cAAA;EACtE,OAAA,EAAS,2BAAA;EACT,QAAA,GAAW,SAAA;AAAA;AAAA,UAGI,4BAAA,SAAqC,kBAAA,EAAoB,cAAA;EACxE,MAAA,GAAS,aAAA;EACT,oBAAA,GAAuB,YAAA;EACvB,QAAA,GAAW,SAAA;AAAA;AAAA,KAGD,kBAAA,GAAqB,0BAAA,GAA6B,4BAAA;AAAA,iBAE9C,aAAA,CAAc,KAAA,EAAO,kBAAA,GAAkB,oBAAA,CAAA,GAAA,CAAA,OAAA"}
@@ -14,9 +14,9 @@ import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
14
14
  //#region src/components/compound/search-catalog/root.tsx
15
15
  function SearchCatalog(props) {
16
16
  if ("context" in props) return /* @__PURE__ */ jsx(SearchCatalogWithContext, { ...props });
17
- return /* @__PURE__ */ jsx(SearchCatalogLegacy, { ...props });
17
+ return /* @__PURE__ */ jsx(SearchCatalogZeroConfig, { ...props });
18
18
  }
19
- function SearchCatalogLegacy({ filter, initialColumnFilters, ...rest }) {
19
+ function SearchCatalogZeroConfig({ filter, initialColumnFilters, ...rest }) {
20
20
  return /* @__PURE__ */ jsx(SearchCatalogWithContext, {
21
21
  context: useSearchCatalogTable({
22
22
  filter,
@@ -1 +1 @@
1
- {"version":3,"file":"root.mjs","names":[],"sources":["../../../../src/components/compound/search-catalog/root.tsx"],"sourcesContent":["import type { CatalogFilter } from \"@pipe0/base\";\nimport type { ColumnFilter } from \"@tanstack/react-table\";\nimport type { ComponentProps, ReactNode, SyntheticEvent } from \"react\";\nimport { useMemo, useState } from \"react\";\nimport {\n CatalogProvider,\n CatalogRoot,\n useCatalogConfig,\n} from \"../../../context/catalog-config-context.js\";\nimport {\n SearchCatalogContext,\n type SearchCatalogContextValue,\n} from \"../../../context/search-catalog-context.js\";\nimport {\n type UseSearchCatalogTableReturn,\n useSearchCatalogTable,\n} from \"../../../hooks/use-search-catalog-table.js\";\nimport type {\n CatalogClassNames,\n CatalogComponentOverrides,\n SearchCardData,\n} from \"../../../types/catalog-adapters.js\";\nimport { type RenderProp, renderSlot } from \"../../../utils/render-slot.js\";\nimport { DefaultCatalogRoot } from \"../../defaults/catalog/layout.js\";\nimport { SearchCatalogActiveFilters } from \"./active-filters.js\";\nimport { SearchCatalogCategoryFilter } from \"./category-filter.js\";\nimport { SearchCatalogColumnFilters } from \"./column-filters.js\";\nimport { SearchCatalogEmpty } from \"./empty.js\";\nimport { SearchCatalogList } from \"./list.js\";\nimport { SearchCatalogSearchFilter } from \"./search-filter.js\";\n\ninterface CustomizationProps {\n classNames?: CatalogClassNames;\n components?: CatalogComponentOverrides;\n className?: string;\n render?: RenderProp<ComponentProps<\"div\">, Record<never, never>>;\n}\n\ninterface SelectionProps {\n /** Fires on click / keyboard activation of any `<SearchCatalogCard>`. */\n onSelectSearch?: (search: SearchCardData, e: SyntheticEvent) => void;\n}\n\nexport interface SearchCatalogInstanceProps extends CustomizationProps, SelectionProps {\n context: UseSearchCatalogTableReturn;\n children?: ReactNode;\n}\n\nexport interface SearchCatalogLegacyProps extends CustomizationProps, SelectionProps {\n filter?: CatalogFilter;\n initialColumnFilters?: ColumnFilter[];\n children?: ReactNode;\n}\n\nexport type SearchCatalogProps = SearchCatalogInstanceProps | SearchCatalogLegacyProps;\n\nexport function SearchCatalog(props: SearchCatalogProps) {\n if (\"context\" in props) {\n return <SearchCatalogWithContext {...props} />;\n }\n return <SearchCatalogLegacy {...props} />;\n}\n\nfunction SearchCatalogLegacy({ filter, initialColumnFilters, ...rest }: SearchCatalogLegacyProps) {\n const context = useSearchCatalogTable({ filter, initialColumnFilters });\n return <SearchCatalogWithContext context={context} {...rest} />;\n}\n\nfunction SearchCatalogWithContext({\n context,\n children,\n className,\n classNames,\n components,\n onSelectSearch,\n render,\n}: SearchCatalogInstanceProps) {\n const hasLocalOverrides = classNames || components;\n const [expandedCardId, setExpandedCardId] = useState<string | null>(null);\n\n const value = useMemo<SearchCatalogContextValue>(\n () => ({\n ...context,\n onSelectCard: onSelectSearch,\n expandedCardId,\n setExpandedCardId,\n }),\n [context, onSelectSearch, expandedCardId],\n );\n\n const inner = (\n <SearchCatalogContext.Provider value={value}>\n <SearchCatalogShell className={className} render={render}>\n {children}\n </SearchCatalogShell>\n </SearchCatalogContext.Provider>\n );\n if (hasLocalOverrides) {\n return (\n <CatalogRoot>\n <CatalogProvider classNames={classNames} components={components}>\n {inner}\n </CatalogProvider>\n </CatalogRoot>\n );\n }\n return <CatalogRoot>{inner}</CatalogRoot>;\n}\n\nfunction SearchCatalogShell({\n children,\n className,\n render,\n}: {\n children?: ReactNode;\n className?: string;\n render?: RenderProp<ComponentProps<\"div\">, Record<never, never>>;\n}) {\n useCatalogConfig();\n const body =\n children !== undefined ? (\n children\n ) : (\n <>\n <SearchCatalogSearchFilter />\n <SearchCatalogCategoryFilter />\n <SearchCatalogColumnFilters />\n <SearchCatalogActiveFilters />\n <SearchCatalogList />\n <SearchCatalogEmpty />\n </>\n );\n return (\n <DefaultCatalogRoot className={className} render={render}>\n {body}\n </DefaultCatalogRoot>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;AAwDA,SAAgB,cAAc,OAA2B;AACvD,KAAI,aAAa,MACf,QAAO,oBAAC,0BAAD,EAA0B,GAAI,OAAS;AAEhD,QAAO,oBAAC,qBAAD,EAAqB,GAAI,OAAS;;AAG3C,SAAS,oBAAoB,EAAE,QAAQ,sBAAsB,GAAG,QAAkC;AAEhG,QAAO,oBAAC,0BAAD;EAA0B,SADjB,sBAAsB;GAAE;GAAQ;GAAsB,CAAC;EACpB,GAAI;EAAQ;;AAGjE,SAAS,yBAAyB,EAChC,SACA,UACA,WACA,YACA,YACA,gBACA,UAC6B;CAC7B,MAAM,oBAAoB,cAAc;CACxC,MAAM,CAAC,gBAAgB,qBAAqB,SAAwB,KAAK;CAEzE,MAAM,QAAQ,eACL;EACL,GAAG;EACH,cAAc;EACd;EACA;EACD,GACD;EAAC;EAAS;EAAgB;EAAe,CAC1C;CAED,MAAM,QACJ,oBAAC,qBAAqB,UAAtB;EAAsC;YACpC,oBAAC,oBAAD;GAA+B;GAAmB;GAC/C;GACkB;EACS;AAElC,KAAI,kBACF,QACE,oBAAC,aAAD,YACE,oBAAC,iBAAD;EAA6B;EAAwB;YAClD;EACe,GACN;AAGlB,QAAO,oBAAC,aAAD,YAAc,OAAoB;;AAG3C,SAAS,mBAAmB,EAC1B,UACA,WACA,UAKC;AACD,mBAAkB;AAclB,QACE,oBAAC,oBAAD;EAA+B;EAAmB;YAblD,aAAa,SACX,WAEA;GACE,oBAAC,2BAAD,EAA6B;GAC7B,oBAAC,6BAAD,EAA+B;GAC/B,oBAAC,4BAAD,EAA8B;GAC9B,oBAAC,4BAAD,EAA8B;GAC9B,oBAAC,mBAAD,EAAqB;GACrB,oBAAC,oBAAD,EAAsB;GACrB;EAKgB"}
1
+ {"version":3,"file":"root.mjs","names":[],"sources":["../../../../src/components/compound/search-catalog/root.tsx"],"sourcesContent":["import { useRender } from \"@base-ui/react/use-render\";\nimport type { CatalogFilter } from \"@pipe0/base\";\nimport type { ColumnFilter } from \"@tanstack/react-table\";\nimport type { ReactNode, SyntheticEvent } from \"react\";\nimport { useMemo, useState } from \"react\";\nimport {\n CatalogProvider,\n CatalogRoot,\n useCatalogConfig,\n} from \"../../../context/catalog-config-context.js\";\nimport {\n SearchCatalogContext,\n type SearchCatalogContextValue,\n} from \"../../../context/search-catalog-context.js\";\nimport {\n type UseSearchCatalogTableReturn,\n useSearchCatalogTable,\n} from \"../../../hooks/use-search-catalog-table.js\";\nimport type {\n CatalogClassNames,\n CatalogComponentOverrides,\n SearchCardData,\n} from \"../../../types/catalog-adapters.js\";\nimport { DefaultCatalogRoot } from \"../../defaults/catalog/layout.js\";\nimport { SearchCatalogActiveFilters } from \"./active-filters.js\";\nimport { SearchCatalogCategoryFilter } from \"./category-filter.js\";\nimport { SearchCatalogColumnFilters } from \"./column-filters.js\";\nimport { SearchCatalogEmpty } from \"./empty.js\";\nimport { SearchCatalogList } from \"./list.js\";\nimport { SearchCatalogSearchFilter } from \"./search-filter.js\";\n\ninterface CustomizationProps {\n classNames?: CatalogClassNames;\n components?: CatalogComponentOverrides;\n className?: string;\n render?: useRender.ComponentProps<\"div\">[\"render\"];\n}\n\ninterface SelectionProps {\n /** Fires on click / keyboard activation of any `<SearchCatalogCard>`. */\n onSelectSearch?: (search: SearchCardData, e: SyntheticEvent) => void;\n}\n\nexport interface SearchCatalogInstanceProps extends CustomizationProps, SelectionProps {\n context: UseSearchCatalogTableReturn;\n children?: ReactNode;\n}\n\nexport interface SearchCatalogZeroConfigProps extends CustomizationProps, SelectionProps {\n filter?: CatalogFilter;\n initialColumnFilters?: ColumnFilter[];\n children?: ReactNode;\n}\n\nexport type SearchCatalogProps = SearchCatalogInstanceProps | SearchCatalogZeroConfigProps;\n\nexport function SearchCatalog(props: SearchCatalogProps) {\n if (\"context\" in props) {\n return <SearchCatalogWithContext {...props} />;\n }\n return <SearchCatalogZeroConfig {...props} />;\n}\n\nfunction SearchCatalogZeroConfig({ filter, initialColumnFilters, ...rest }: SearchCatalogZeroConfigProps) {\n const context = useSearchCatalogTable({ filter, initialColumnFilters });\n return <SearchCatalogWithContext context={context} {...rest} />;\n}\n\nfunction SearchCatalogWithContext({\n context,\n children,\n className,\n classNames,\n components,\n onSelectSearch,\n render,\n}: SearchCatalogInstanceProps) {\n const hasLocalOverrides = classNames || components;\n const [expandedCardId, setExpandedCardId] = useState<string | null>(null);\n\n const value = useMemo<SearchCatalogContextValue>(\n () => ({\n ...context,\n onSelectCard: onSelectSearch,\n expandedCardId,\n setExpandedCardId,\n }),\n [context, onSelectSearch, expandedCardId],\n );\n\n const inner = (\n <SearchCatalogContext.Provider value={value}>\n <SearchCatalogShell className={className} render={render}>\n {children}\n </SearchCatalogShell>\n </SearchCatalogContext.Provider>\n );\n if (hasLocalOverrides) {\n return (\n <CatalogRoot>\n <CatalogProvider classNames={classNames} components={components}>\n {inner}\n </CatalogProvider>\n </CatalogRoot>\n );\n }\n return <CatalogRoot>{inner}</CatalogRoot>;\n}\n\nfunction SearchCatalogShell({\n children,\n className,\n render,\n}: {\n children?: ReactNode;\n className?: string;\n render?: useRender.ComponentProps<\"div\">[\"render\"];\n}) {\n useCatalogConfig();\n const body =\n children !== undefined ? (\n children\n ) : (\n <>\n <SearchCatalogSearchFilter />\n <SearchCatalogCategoryFilter />\n <SearchCatalogColumnFilters />\n <SearchCatalogActiveFilters />\n <SearchCatalogList />\n <SearchCatalogEmpty />\n </>\n );\n return (\n <DefaultCatalogRoot className={className} render={render}>\n {body}\n </DefaultCatalogRoot>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;AAwDA,SAAgB,cAAc,OAA2B;AACvD,KAAI,aAAa,MACf,QAAO,oBAAC,0BAAD,EAA0B,GAAI,OAAS;AAEhD,QAAO,oBAAC,yBAAD,EAAyB,GAAI,OAAS;;AAG/C,SAAS,wBAAwB,EAAE,QAAQ,sBAAsB,GAAG,QAAsC;AAExG,QAAO,oBAAC,0BAAD;EAA0B,SADjB,sBAAsB;GAAE;GAAQ;GAAsB,CAAC;EACpB,GAAI;EAAQ;;AAGjE,SAAS,yBAAyB,EAChC,SACA,UACA,WACA,YACA,YACA,gBACA,UAC6B;CAC7B,MAAM,oBAAoB,cAAc;CACxC,MAAM,CAAC,gBAAgB,qBAAqB,SAAwB,KAAK;CAEzE,MAAM,QAAQ,eACL;EACL,GAAG;EACH,cAAc;EACd;EACA;EACD,GACD;EAAC;EAAS;EAAgB;EAAe,CAC1C;CAED,MAAM,QACJ,oBAAC,qBAAqB,UAAtB;EAAsC;YACpC,oBAAC,oBAAD;GAA+B;GAAmB;GAC/C;GACkB;EACS;AAElC,KAAI,kBACF,QACE,oBAAC,aAAD,YACE,oBAAC,iBAAD;EAA6B;EAAwB;YAClD;EACe,GACN;AAGlB,QAAO,oBAAC,aAAD,YAAc,OAAoB;;AAG3C,SAAS,mBAAmB,EAC1B,UACA,WACA,UAKC;AACD,mBAAkB;AAclB,QACE,oBAAC,oBAAD;EAA+B;EAAmB;YAblD,aAAa,SACX,WAEA;GACE,oBAAC,2BAAD,EAA6B;GAC7B,oBAAC,6BAAD,EAA+B;GAC/B,oBAAC,4BAAD,EAA8B;GAC9B,oBAAC,4BAAD,EAA8B;GAC9B,oBAAC,mBAAD,EAAqB;GACrB,oBAAC,oBAAD,EAAsB;GACrB;EAKgB"}
@@ -1,24 +1,21 @@
1
- import { RenderProp } from "../../../utils/render-slot.mjs";
2
- import * as _$react from "react";
3
- import { ComponentProps } from "react";
1
+ import { useRender } from "@base-ui/react/use-render";
4
2
  import * as _$react_jsx_runtime0 from "react/jsx-runtime";
5
3
 
6
4
  //#region src/components/compound/search-catalog/search-filter.d.ts
7
5
  interface SearchCatalogSearchFilterState {
8
6
  value: string;
9
- setValue: (v: string) => void;
7
+ setValue: (value: string) => void;
10
8
  isActive: boolean;
11
9
  }
12
- interface SearchCatalogSearchFilterProps {
10
+ interface SearchCatalogSearchFilterProps extends useRender.ComponentProps<"input", SearchCatalogSearchFilterState> {
13
11
  placeholder?: string;
14
- className?: string;
15
- render?: RenderProp<ComponentProps<"input">, SearchCatalogSearchFilterState>;
16
12
  }
17
13
  declare function SearchCatalogSearchFilter({
18
14
  placeholder,
19
15
  className,
20
- render
21
- }: SearchCatalogSearchFilterProps): string | number | bigint | boolean | _$react_jsx_runtime0.JSX.Element | Iterable<_$react.ReactNode> | Promise<string | number | bigint | boolean | _$react.ReactPortal | _$react.ReactElement<unknown, string | _$react.JSXElementConstructor<any>> | Iterable<_$react.ReactNode> | null | undefined> | null | undefined;
16
+ render,
17
+ ...props
18
+ }: SearchCatalogSearchFilterProps): _$react_jsx_runtime0.JSX.Element;
22
19
  //#endregion
23
20
  export { SearchCatalogSearchFilter, SearchCatalogSearchFilterProps, SearchCatalogSearchFilterState };
24
21
  //# sourceMappingURL=search-filter.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"search-filter.d.mts","names":[],"sources":["../../../../src/components/compound/search-catalog/search-filter.tsx"],"mappings":";;;;;;UAQiB,8BAAA;EACf,KAAA;EACA,QAAA,GAAW,CAAA;EACX,QAAA;AAAA;AAAA,UAGe,8BAAA;EACf,WAAA;EACA,SAAA;EACA,MAAA,GAAS,UAAA,CAAW,cAAA,WAAyB,8BAAA;AAAA;AAAA,iBAG/B,yBAAA,CAAA;EACd,WAAA;EACA,SAAA;EACA;AAAA,GACC,8BAAA,wCAA8B,oBAAA,CAAA,GAAA,CAAA,OAAA,GAAA,QAAA,CAAA,OAAA,CAAA,SAAA,IAAA,OAAA,sCAAA,OAAA,CAAA,WAAA,GAAA,OAAA,CAAA,YAAA,mBAAA,OAAA,CAAA,qBAAA,SAAA,QAAA,CAAA,OAAA,CAAA,SAAA"}
1
+ {"version":3,"file":"search-filter.d.mts","names":[],"sources":["../../../../src/components/compound/search-catalog/search-filter.tsx"],"mappings":";;;;UASiB,8BAAA;EACf,KAAA;EACA,QAAA,GAAW,KAAA;EACX,QAAA;AAAA;AAAA,UAGe,8BAAA,SACP,SAAA,CAAU,cAAA,UAAwB,8BAAA;EAC1C,WAAA;AAAA;AAAA,iBAGc,yBAAA,CAAA;EACd,WAAA;EACA,SAAA;EACA,MAAA;EAAA,GACG;AAAA,GACF,8BAAA,GAA8B,oBAAA,CAAA,GAAA,CAAA,OAAA"}
@@ -1,33 +1,34 @@
1
1
  import { cn } from "../../../lib/utils.mjs";
2
2
  import { useCatalogConfig } from "../../../context/catalog-config-context.mjs";
3
- import { renderSlot } from "../../../utils/render-slot.mjs";
4
3
  import { useSearchCatalogContext } from "../../../context/search-catalog-context.mjs";
5
4
  import { Input } from "../../ui/input.mjs";
5
+ import { mergeProps } from "@base-ui/react/merge-props";
6
+ import { useRender } from "@base-ui/react/use-render";
6
7
  import { jsx, jsxs } from "react/jsx-runtime";
7
8
  import { Search } from "lucide-react";
8
9
 
9
10
  //#region src/components/compound/search-catalog/search-filter.tsx
10
- function SearchCatalogSearchFilter({ placeholder = "Search searches...", className, render }) {
11
+ function SearchCatalogSearchFilter({ placeholder = "Search searches...", className, render, ...props }) {
11
12
  const { globalFilterInput, setGlobalFilterInput } = useSearchCatalogContext();
12
13
  const { classNames } = useCatalogConfig();
13
- const isActive = !!globalFilterInput;
14
- if (render) return renderSlot({
14
+ const inputElement = useRender({
15
15
  defaultTagName: "input",
16
16
  render,
17
17
  state: {
18
18
  value: globalFilterInput,
19
19
  setValue: setGlobalFilterInput,
20
- isActive
20
+ isActive: !!globalFilterInput
21
21
  },
22
- props: {
22
+ stateAttributesMapping: { setValue: () => null },
23
+ props: mergeProps({
23
24
  type: "search",
24
25
  placeholder,
25
26
  value: globalFilterInput,
26
27
  onChange: (e) => setGlobalFilterInput(e.target.value),
27
- "data-active": isActive ? "" : void 0,
28
- className: cn(classNames?.searchInput, className)
29
- }
28
+ className: render ? cn(classNames?.searchInput, className) : void 0
29
+ }, props)
30
30
  });
31
+ if (render) return inputElement;
31
32
  return /* @__PURE__ */ jsxs("div", {
32
33
  "data-p0": "catalog-search",
33
34
  className: cn("pz:relative", classNames?.searchInputContainer),
@@ -1 +1 @@
1
- {"version":3,"file":"search-filter.mjs","names":["SearchIcon"],"sources":["../../../../src/components/compound/search-catalog/search-filter.tsx"],"sourcesContent":["import { Search as SearchIcon } from \"lucide-react\";\nimport type { ChangeEvent, ComponentProps } from \"react\";\nimport { useCatalogConfig } from \"../../../context/catalog-config-context.js\";\nimport { useSearchCatalogContext } from \"../../../context/search-catalog-context.js\";\nimport { cn } from \"../../../lib/utils.js\";\nimport { type RenderProp, renderSlot } from \"../../../utils/render-slot.js\";\nimport { Input } from \"../../ui/input.js\";\n\nexport interface SearchCatalogSearchFilterState {\n value: string;\n setValue: (v: string) => void;\n isActive: boolean;\n}\n\nexport interface SearchCatalogSearchFilterProps {\n placeholder?: string;\n className?: string;\n render?: RenderProp<ComponentProps<\"input\">, SearchCatalogSearchFilterState>;\n}\n\nexport function SearchCatalogSearchFilter({\n placeholder = \"Search searches...\",\n className,\n render,\n}: SearchCatalogSearchFilterProps) {\n const { globalFilterInput, setGlobalFilterInput } = useSearchCatalogContext();\n const { classNames } = useCatalogConfig();\n const isActive = !!globalFilterInput;\n\n if (render) {\n return renderSlot({\n defaultTagName: \"input\",\n render,\n state: {\n value: globalFilterInput,\n setValue: setGlobalFilterInput,\n isActive,\n },\n props: {\n type: \"search\",\n placeholder,\n value: globalFilterInput,\n onChange: (e: ChangeEvent<HTMLInputElement>) => setGlobalFilterInput(e.target.value),\n \"data-active\": isActive ? \"\" : undefined,\n className: cn(classNames?.searchInput, className),\n } as ComponentProps<\"input\">,\n });\n }\n\n return (\n <div data-p0=\"catalog-search\" className={cn(\"pz:relative\", classNames?.searchInputContainer)}>\n <SearchIcon className=\"pz:absolute pz:left-2.5 pz:top-1/2 pz:-translate-y-1/2 pz:size-4 pz:text-muted-foreground pz:pointer-events-none\" />\n <Input\n type=\"search\"\n placeholder={placeholder}\n value={globalFilterInput}\n onChange={(e) => setGlobalFilterInput(e.target.value)}\n className={cn(\"pz:pl-8\", classNames?.searchInput, className)}\n />\n </div>\n );\n}\n"],"mappings":";;;;;;;;;AAoBA,SAAgB,0BAA0B,EACxC,cAAc,sBACd,WACA,UACiC;CACjC,MAAM,EAAE,mBAAmB,yBAAyB,yBAAyB;CAC7E,MAAM,EAAE,eAAe,kBAAkB;CACzC,MAAM,WAAW,CAAC,CAAC;AAEnB,KAAI,OACF,QAAO,WAAW;EAChB,gBAAgB;EAChB;EACA,OAAO;GACL,OAAO;GACP,UAAU;GACV;GACD;EACD,OAAO;GACL,MAAM;GACN;GACA,OAAO;GACP,WAAW,MAAqC,qBAAqB,EAAE,OAAO,MAAM;GACpF,eAAe,WAAW,KAAK;GAC/B,WAAW,GAAG,YAAY,aAAa,UAAU;GAClD;EACF,CAAC;AAGJ,QACE,qBAAC,OAAD;EAAK,WAAQ;EAAiB,WAAW,GAAG,eAAe,YAAY,qBAAqB;YAA5F,CACE,oBAACA,QAAD,EAAY,WAAU,oHAAqH,GAC3I,oBAAC,OAAD;GACE,MAAK;GACQ;GACb,OAAO;GACP,WAAW,MAAM,qBAAqB,EAAE,OAAO,MAAM;GACrD,WAAW,GAAG,WAAW,YAAY,aAAa,UAAU;GAC5D,EACE"}
1
+ {"version":3,"file":"search-filter.mjs","names":["SearchIcon"],"sources":["../../../../src/components/compound/search-catalog/search-filter.tsx"],"sourcesContent":["import { mergeProps } from \"@base-ui/react/merge-props\";\nimport { useRender } from \"@base-ui/react/use-render\";\nimport { Search as SearchIcon } from \"lucide-react\";\nimport type { ChangeEvent } from \"react\";\nimport { useCatalogConfig } from \"../../../context/catalog-config-context.js\";\nimport { useSearchCatalogContext } from \"../../../context/search-catalog-context.js\";\nimport { cn } from \"../../../lib/utils.js\";\nimport { Input } from \"../../ui/input.js\";\n\nexport interface SearchCatalogSearchFilterState {\n value: string;\n setValue: (value: string) => void;\n isActive: boolean;\n}\n\nexport interface SearchCatalogSearchFilterProps\n extends useRender.ComponentProps<\"input\", SearchCatalogSearchFilterState> {\n placeholder?: string;\n}\n\nexport function SearchCatalogSearchFilter({\n placeholder = \"Search searches...\",\n className,\n render,\n ...props\n}: SearchCatalogSearchFilterProps) {\n const { globalFilterInput, setGlobalFilterInput } = useSearchCatalogContext();\n const { classNames } = useCatalogConfig();\n const isActive = !!globalFilterInput;\n\n const inputElement = useRender({\n defaultTagName: \"input\",\n render,\n state: { value: globalFilterInput, setValue: setGlobalFilterInput, isActive },\n stateAttributesMapping: {\n setValue: () => null,\n },\n props: mergeProps<\"input\">(\n {\n type: \"search\",\n placeholder,\n value: globalFilterInput,\n onChange: (e: ChangeEvent<HTMLInputElement>) => setGlobalFilterInput(e.target.value),\n className: render ? cn(classNames?.searchInput, className) : undefined,\n },\n props,\n ),\n });\n\n if (render) return inputElement;\n\n return (\n <div data-p0=\"catalog-search\" className={cn(\"pz:relative\", classNames?.searchInputContainer)}>\n <SearchIcon className=\"pz:absolute pz:left-2.5 pz:top-1/2 pz:-translate-y-1/2 pz:size-4 pz:text-muted-foreground pz:pointer-events-none\" />\n <Input\n type=\"search\"\n placeholder={placeholder}\n value={globalFilterInput}\n onChange={(e) => setGlobalFilterInput(e.target.value)}\n className={cn(\"pz:pl-8\", classNames?.searchInput, className)}\n />\n </div>\n );\n}\n"],"mappings":";;;;;;;;;;AAoBA,SAAgB,0BAA0B,EACxC,cAAc,sBACd,WACA,QACA,GAAG,SAC8B;CACjC,MAAM,EAAE,mBAAmB,yBAAyB,yBAAyB;CAC7E,MAAM,EAAE,eAAe,kBAAkB;CAGzC,MAAM,eAAe,UAAU;EAC7B,gBAAgB;EAChB;EACA,OAAO;GAAE,OAAO;GAAmB,UAAU;GAAsB,UALpD,CAAC,CAAC;GAK4D;EAC7E,wBAAwB,EACtB,gBAAgB,MACjB;EACD,OAAO,WACL;GACE,MAAM;GACN;GACA,OAAO;GACP,WAAW,MAAqC,qBAAqB,EAAE,OAAO,MAAM;GACpF,WAAW,SAAS,GAAG,YAAY,aAAa,UAAU,GAAG;GAC9D,EACD,MACD;EACF,CAAC;AAEF,KAAI,OAAQ,QAAO;AAEnB,QACE,qBAAC,OAAD;EAAK,WAAQ;EAAiB,WAAW,GAAG,eAAe,YAAY,qBAAqB;YAA5F,CACE,oBAACA,QAAD,EAAY,WAAU,oHAAqH,GAC3I,oBAAC,OAAD;GACE,MAAK;GACQ;GACb,OAAO;GACP,WAAW,MAAM,qBAAqB,EAAE,OAAO,MAAM;GACrD,WAAW,GAAG,WAAW,YAAY,aAAa,UAAU;GAC5D,EACE"}
@@ -1,7 +1,7 @@
1
- import { RenderProp } from "../../../utils/render-slot.mjs";
2
1
  import { FilterSelectOption } from "../../defaults/catalog/filter-select.mjs";
3
2
  import { ColumnFilterState } from "./column-filter.mjs";
4
- import { ComponentProps, ReactNode } from "react";
3
+ import { useRender } from "@base-ui/react/use-render";
4
+ import { ReactNode } from "react";
5
5
  import * as _$react_jsx_runtime0 from "react/jsx-runtime";
6
6
 
7
7
  //#region src/components/compound/search-catalog/tag-filter.d.ts
@@ -9,7 +9,7 @@ interface SearchCatalogTagFilterProps {
9
9
  options?: ReadonlyArray<FilterSelectOption>;
10
10
  placeholder?: ReactNode;
11
11
  className?: string;
12
- render?: RenderProp<ComponentProps<"div">, ColumnFilterState>;
12
+ render?: useRender.ComponentProps<"div", ColumnFilterState>["render"];
13
13
  }
14
14
  declare function SearchCatalogTagFilter({
15
15
  options,
@@ -1 +1 @@
1
- {"version":3,"file":"tag-filter.d.mts","names":[],"sources":["../../../../src/components/compound/search-catalog/tag-filter.tsx"],"mappings":";;;;;;;UAMiB,2BAAA;EACf,OAAA,GAAU,aAAA,CAAc,kBAAA;EACxB,WAAA,GAAc,SAAA;EACd,SAAA;EACA,MAAA,GAAS,UAAA,CAAW,cAAA,SAAuB,iBAAA;AAAA;AAAA,iBAS7B,sBAAA,CAAA;EACd,OAAA;EACA,WAAA;EACA,SAAA;EACA;AAAA,GACC,2BAAA,GAA2B,oBAAA,CAAA,GAAA,CAAA,OAAA"}
1
+ {"version":3,"file":"tag-filter.d.mts","names":[],"sources":["../../../../src/components/compound/search-catalog/tag-filter.tsx"],"mappings":";;;;;;;UAMiB,2BAAA;EACf,OAAA,GAAU,aAAA,CAAc,kBAAA;EACxB,WAAA,GAAc,SAAA;EACd,SAAA;EACA,MAAA,GAAS,SAAA,CAAU,cAAA,QAAsB,iBAAA;AAAA;AAAA,iBAS3B,sBAAA,CAAA;EACd,OAAA;EACA,WAAA;EACA,SAAA;EACA;AAAA,GACC,2BAAA,GAA2B,oBAAA,CAAA,GAAA,CAAA,OAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"tag-filter.mjs","names":[],"sources":["../../../../src/components/compound/search-catalog/tag-filter.tsx"],"sourcesContent":["import { Tag } from \"lucide-react\";\nimport type { ComponentProps, ReactNode } from \"react\";\nimport type { RenderProp } from \"../../../utils/render-slot.js\";\nimport type { FilterSelectOption } from \"../../defaults/catalog/filter-select.js\";\nimport { type ColumnFilterState, SearchCatalogColumnFilter } from \"./column-filter.js\";\n\nexport interface SearchCatalogTagFilterProps {\n options?: ReadonlyArray<FilterSelectOption>;\n placeholder?: ReactNode;\n className?: string;\n render?: RenderProp<ComponentProps<\"div\">, ColumnFilterState>;\n}\n\nconst DEFAULT_PLACEHOLDER = (\n <span className=\"pz:inline-flex pz:items-center pz:gap-1.5\">\n <Tag className=\"pz:size-4\" /> Tag\n </span>\n);\n\nexport function SearchCatalogTagFilter({\n options,\n placeholder = DEFAULT_PLACEHOLDER,\n className,\n render,\n}: SearchCatalogTagFilterProps) {\n return (\n <SearchCatalogColumnFilter\n id=\"tags\"\n placeholder={placeholder}\n options={options}\n className={className}\n render={render}\n />\n );\n}\n"],"mappings":";;;;;AAaA,MAAM,sBACJ,qBAAC,QAAD;CAAM,WAAU;WAAhB,CACE,oBAAC,KAAD,EAAK,WAAU,aAAc,UACxB;;AAGT,SAAgB,uBAAuB,EACrC,SACA,cAAc,qBACd,WACA,UAC8B;AAC9B,QACE,oBAAC,2BAAD;EACE,IAAG;EACU;EACJ;EACE;EACH;EACR"}
1
+ {"version":3,"file":"tag-filter.mjs","names":[],"sources":["../../../../src/components/compound/search-catalog/tag-filter.tsx"],"sourcesContent":["import { useRender } from \"@base-ui/react/use-render\";\nimport { Tag } from \"lucide-react\";\nimport type { ReactNode } from \"react\";\nimport type { FilterSelectOption } from \"../../defaults/catalog/filter-select.js\";\nimport { type ColumnFilterState, SearchCatalogColumnFilter } from \"./column-filter.js\";\n\nexport interface SearchCatalogTagFilterProps {\n options?: ReadonlyArray<FilterSelectOption>;\n placeholder?: ReactNode;\n className?: string;\n render?: useRender.ComponentProps<\"div\", ColumnFilterState>[\"render\"];\n}\n\nconst DEFAULT_PLACEHOLDER = (\n <span className=\"pz:inline-flex pz:items-center pz:gap-1.5\">\n <Tag className=\"pz:size-4\" /> Tag\n </span>\n);\n\nexport function SearchCatalogTagFilter({\n options,\n placeholder = DEFAULT_PLACEHOLDER,\n className,\n render,\n}: SearchCatalogTagFilterProps) {\n return (\n <SearchCatalogColumnFilter\n id=\"tags\"\n placeholder={placeholder}\n options={options}\n className={className}\n render={render}\n />\n );\n}\n"],"mappings":";;;;;AAaA,MAAM,sBACJ,qBAAC,QAAD;CAAM,WAAU;WAAhB,CACE,oBAAC,KAAD,EAAK,WAAU,aAAc,UACxB;;AAGT,SAAgB,uBAAuB,EACrC,SACA,cAAc,qBACd,WACA,UAC8B;AAC9B,QACE,oBAAC,2BAAD;EACE,IAAG;EACU;EACJ;EACE;EACH;EACR"}
@@ -1,10 +1,15 @@
1
- import { FormSectionHandle } from "../../../types/form-handle.mjs";
2
- import * as _$react from "react";
1
+ import { FormHandle, FormSectionHandle } from "../../../types/form-handle.mjs";
3
2
  import { useRender } from "@base-ui/react/use-render";
3
+ import * as _$react from "react";
4
+ import { SearchPayload } from "@pipe0/base";
4
5
 
5
6
  //#region src/components/compound/search-form/content.d.ts
6
7
  interface SearchFormContentState {
7
8
  sections: FormSectionHandle[];
9
+ fieldPaths: Set<string>;
10
+ hasFieldLoaderError: boolean;
11
+ isFieldLoaderLoading: boolean;
12
+ form: FormHandle<SearchPayload>;
8
13
  }
9
14
  interface SearchFormContentProps extends useRender.ComponentProps<"div", SearchFormContentState> {}
10
15
  declare function SearchFormContent({
@@ -1 +1 @@
1
- {"version":3,"file":"content.d.mts","names":[],"sources":["../../../../src/components/compound/search-form/content.tsx"],"mappings":";;;;;UAUiB,sBAAA;EACf,QAAA,EAAU,iBAAA;AAAA;AAAA,UAGK,sBAAA,SACP,SAAA,CAAU,cAAA,QAAsB,sBAAA;AAAA,iBAE1B,iBAAA,CAAA;EACd,QAAA;EACA,SAAA;EACA,MAAA;EAAA,GACG;AAAA,GACF,sBAAA,GAAsB,OAAA,CAAA,YAAA,mBAAA,OAAA,CAAA,qBAAA"}
1
+ {"version":3,"file":"content.d.mts","names":[],"sources":["../../../../src/components/compound/search-form/content.tsx"],"mappings":";;;;;;UAQiB,sBAAA;EACf,QAAA,EAAU,iBAAA;EACV,UAAA,EAAY,GAAA;EACZ,mBAAA;EACA,oBAAA;EACA,IAAA,EAAM,UAAA,CAAW,aAAA;AAAA;AAAA,UAGF,sBAAA,SACP,SAAA,CAAU,cAAA,QAAsB,sBAAA;AAAA,iBAE1B,iBAAA,CAAA;EACd,QAAA;EACA,SAAA;EACA,MAAA;EAAA,GACG;AAAA,GACF,sBAAA,GAAsB,OAAA,CAAA,YAAA,mBAAA,OAAA,CAAA,qBAAA"}