@slotted/react 0.1.0-beta.10 → 0.1.0-beta.11

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 (336) hide show
  1. package/dist/action-bar-z2DPc1Wy.js +285 -0
  2. package/dist/action-bar.js +1 -1
  3. package/dist/action-sheet-BnedGewu.js +360 -0
  4. package/dist/action-sheet.js +1 -1
  5. package/dist/{alert-BTcqbG8w.js → alert-BTAXJ69M.js} +5 -5
  6. package/dist/alert.js +1 -1
  7. package/dist/{app-shell-BlkqQrOx.js → app-shell-Cb_kDBeV.js} +232 -173
  8. package/dist/app-shell.js +1 -1
  9. package/dist/{attachment-zlOPJvIm.js → attachment-D1O4qS8H.js} +28 -28
  10. package/dist/attachment.js +1 -1
  11. package/dist/{breadcrumb-DCGynpkb.js → breadcrumb-CnFjxxI2.js} +10 -10
  12. package/dist/breadcrumb.js +1 -1
  13. package/dist/{button-BCVjdzkn.js → button-D31perSu.js} +2 -2
  14. package/dist/button.js +2 -2
  15. package/dist/{calendar-qGUJ-kAy.js → calendar-DZyC1gAT.js} +8 -8
  16. package/dist/calendar.js +1 -1
  17. package/dist/{carousel-CjRTu8m7.js → carousel-Dso3gcYd.js} +14 -14
  18. package/dist/carousel.js +1 -1
  19. package/dist/cascader-BbajBwsX.js +1157 -0
  20. package/dist/cascader.js +1 -1
  21. package/dist/{chart-CPFq3jIE.js → chart-Bb6ctahn.js} +9 -9
  22. package/dist/chart.js +1 -1
  23. package/dist/{checkbox-CMY2KIih.js → checkbox-C_8GVtjD.js} +3 -3
  24. package/dist/{checkbox-group-DzMtLF7f.js → checkbox-group-DXCcusol.js} +2 -2
  25. package/dist/checkbox-group.js +1 -1
  26. package/dist/checkbox.js +1 -1
  27. package/dist/{code-block-Bh_2Eg3M.js → code-block-C4mtsROE.js} +8 -8
  28. package/dist/code-block.js +1 -1
  29. package/dist/{color-picker-DlepH5co.js → color-picker-JZPnPb7s.js} +49 -49
  30. package/dist/color-picker.js +1 -1
  31. package/dist/{column-manager-CV9tCnKa.js → column-manager-BDUj-WIs.js} +31 -31
  32. package/dist/column-manager.js +1 -1
  33. package/dist/combobox-Dn69QwGX.js +904 -0
  34. package/dist/combobox.js +1 -1
  35. package/dist/command-palette-Dh1HKz_F.js +744 -0
  36. package/dist/command-palette.js +1 -1
  37. package/dist/{context-menu-Dbc0KkFp.js → context-menu-uJjEmAN3.js} +1 -1
  38. package/dist/context-menu.js +1 -1
  39. package/dist/{currency-field--wIfgVAx.js → currency-field-lHcrNJ7X.js} +13 -13
  40. package/dist/currency-field.js +1 -1
  41. package/dist/{dashboard-grid-D_LbWfdZ.js → dashboard-grid-z-SOm9H0.js} +65 -65
  42. package/dist/dashboard-grid.js +1 -1
  43. package/dist/{data-grid-XH5fGoGj.js → data-grid-DQCvXMJA.js} +1330 -1278
  44. package/dist/data-grid.js +1 -1
  45. package/dist/data-list-BgdkA3bD.js +587 -0
  46. package/dist/data-list.js +1 -1
  47. package/dist/{date-field-BrNyJBiJ.js → date-field-B2lQzE3p.js} +5 -5
  48. package/dist/date-field.js +1 -1
  49. package/dist/{date-picker-Nl55so0C.js → date-picker-DpTRb-Y1.js} +16 -16
  50. package/dist/date-picker.js +1 -1
  51. package/dist/{date-range-picker-DLkvfUJD.js → date-range-picker-CBUPJep5.js} +17 -17
  52. package/dist/date-range-picker.js +1 -1
  53. package/dist/{datetime-field-CZRhRDPb.js → datetime-field-BZ44uJ_B.js} +7 -7
  54. package/dist/datetime-field.js +1 -1
  55. package/dist/{datetime-picker-_GHra2WL.js → datetime-picker-BK_bV3Yr.js} +21 -21
  56. package/dist/datetime-picker.js +1 -1
  57. package/dist/{datetime-range-picker-Dy1A0Wqy.js → datetime-range-picker-ChdbRgzQ.js} +21 -21
  58. package/dist/datetime-range-picker.js +1 -1
  59. package/dist/{description-list-Cc4JYZ-3.js → description-list-CYlfHDwx.js} +11 -11
  60. package/dist/description-list.js +1 -1
  61. package/dist/{detail-panel-BI_wHSoz.js → detail-panel-DimjnPI8.js} +91 -91
  62. package/dist/detail-panel.js +1 -1
  63. package/dist/{dialog-B6MP7GYI.js → dialog-BB5MdJex.js} +108 -108
  64. package/dist/dialog.js +1 -1
  65. package/dist/docs/action-bar.json +4 -4
  66. package/dist/docs/action-bar.md +3 -3
  67. package/dist/docs/calendar.md +2 -2
  68. package/dist/docs/command-palette.json +1 -0
  69. package/dist/docs/command-palette.md +1 -1
  70. package/dist/docs/data-grid.examples.md +8 -2
  71. package/dist/docs/data-grid.json +25 -3
  72. package/dist/docs/data-grid.md +4 -1
  73. package/dist/docs/data-grid.props.md +2 -1
  74. package/dist/docs/detail-panel.json +4 -2
  75. package/dist/docs/detail-panel.md +15 -5
  76. package/dist/docs/dialog.json +1 -0
  77. package/dist/docs/dialog.md +1 -1
  78. package/dist/docs/drawer.json +6 -4
  79. package/dist/docs/drawer.md +3 -3
  80. package/dist/docs/event-calendar.md +2 -2
  81. package/dist/docs/guidelines/index.md +4 -3
  82. package/dist/docs/guidelines/layout-alignment.md +17 -7
  83. package/dist/docs/guidelines/list-pages.md +3 -3
  84. package/dist/docs/page-header.json +18 -2
  85. package/dist/docs/page-header.md +5 -3
  86. package/dist/docs/page.json +1 -0
  87. package/dist/docs/page.md +1 -1
  88. package/dist/docs/rating.md +1 -1
  89. package/dist/docs/section.json +1 -1
  90. package/dist/docs/section.md +1 -1
  91. package/dist/docs/skills/compose-screen/SKILL.md +12 -4
  92. package/dist/docs/skills/review-screen/SKILL.md +20 -18
  93. package/dist/docs/skills/theme-app/SKILL.md +12 -1
  94. package/dist/docs/toast.json +1 -0
  95. package/dist/docs/toast.md +1 -1
  96. package/dist/docs/tokens.md +1 -1
  97. package/dist/docs/toolbar.json +1 -1
  98. package/dist/docs/toolbar.md +1 -1
  99. package/dist/docs/typography.md +1 -1
  100. package/dist/{drawer-CkpFlKYa.js → drawer-fyPyxnYQ.js} +216 -206
  101. package/dist/drawer.js +1 -1
  102. package/dist/entity-picker-ClyhBTyK.js +1283 -0
  103. package/dist/entity-picker.js +1 -1
  104. package/dist/{event-calendar-BDjI5T44.js → event-calendar-COgC24UG.js} +23 -23
  105. package/dist/event-calendar.js +1 -1
  106. package/dist/{field-group-CCM2vPKL.js → field-group-Bj-EbPIU.js} +2 -2
  107. package/dist/field-group.js +1 -1
  108. package/dist/{field-CzSGs7wo.js → field-tnEZiRLg.js} +19 -19
  109. package/dist/field.js +1 -1
  110. package/dist/filter-bar-BRuCz79-.js +1342 -0
  111. package/dist/filter-bar.js +1 -1
  112. package/dist/{form-CDq04WDY.js → form-DEcJ7tHf.js} +1 -1
  113. package/dist/form.js +1 -1
  114. package/dist/{fullscreen-6GW4naDP.js → fullscreen-BwweNj3-.js} +13 -13
  115. package/dist/fullscreen.js +1 -1
  116. package/dist/{hover-card-aadyPXzF.js → hover-card-BWcU37Yp.js} +1 -1
  117. package/dist/hover-card.js +1 -1
  118. package/dist/{i18n-DpW8lqJ1.js → i18n-D7xXDd8-.js} +11 -4
  119. package/dist/i18n.js +1 -1
  120. package/dist/{icon-button-CRB218_z.js → icon-button-DbSZKGT4.js} +73 -71
  121. package/dist/{import-export-center-DUrNwRKP.js → import-export-center-CYf0Qxl_.js} +291 -289
  122. package/dist/import-export-center.js +1 -1
  123. package/dist/index.js +100 -100
  124. package/dist/{kbd-Z4YmSPRy.js → kbd-dNz8QHfL.js} +1 -1
  125. package/dist/kbd.js +1 -1
  126. package/dist/{link-BsSlZ1ts.js → link-DLPyg54C.js} +5 -5
  127. package/dist/link.js +1 -1
  128. package/dist/{listbox-VFcfZT70.js → listbox-BSqx_ARf.js} +1 -1
  129. package/dist/listbox.js +1 -1
  130. package/dist/{loading-overlay-BZPBDK4w.js → loading-overlay-BLIrcaoj.js} +9 -9
  131. package/dist/loading-overlay.js +1 -1
  132. package/dist/{markdown-BmCU_sOv.js → markdown-DccRb1xf.js} +17 -17
  133. package/dist/markdown.js +1 -1
  134. package/dist/{menu-parts-DS9JEUCt.js → menu-parts-CNNHRduK.js} +42 -42
  135. package/dist/menu.js +1 -1
  136. package/dist/{menubar-BV43BKep.js → menubar-Bdr6zigi.js} +1 -1
  137. package/dist/menubar.js +1 -1
  138. package/dist/message-BkTiWsUp.js +436 -0
  139. package/dist/message-scroller-akQEtQLn.js +218 -0
  140. package/dist/message-scroller.js +1 -1
  141. package/dist/message.js +1 -1
  142. package/dist/{multi-select-YaxhhH9y.js → multi-select-BvlJIEtz.js} +445 -443
  143. package/dist/multi-select.js +1 -1
  144. package/dist/{navigation-menu-parts-B64gKl8B.js → navigation-menu-parts-CEW4fgCo.js} +12 -12
  145. package/dist/navigation-menu.js +1 -1
  146. package/dist/{notification-center-Ci-OLWTO.js → notification-center-BQO0Ey3h.js} +40 -40
  147. package/dist/notification-center.js +1 -1
  148. package/dist/{number-field-BYQmPyM-.js → number-field-D1MqT8_A.js} +13 -13
  149. package/dist/number-field.js +1 -1
  150. package/dist/{otp-input-BKO0WPZc.js → otp-input-Cub9H9Di.js} +1 -1
  151. package/dist/otp-input.js +1 -1
  152. package/dist/{page-CfjGviUA.js → page-CwYmBoZQ.js} +1 -1
  153. package/dist/{page-header-w_PFLnLG.js → page-header-CMxCQqu_.js} +117 -114
  154. package/dist/page-header.js +1 -1
  155. package/dist/page.js +1 -1
  156. package/dist/{pagination-Cm9665gb.js → pagination-IEuos7H1.js} +12 -12
  157. package/dist/pagination.js +1 -1
  158. package/dist/{popover-D1krYeP-.js → popover-C7NpEzq6.js} +22 -22
  159. package/dist/popover.js +1 -1
  160. package/dist/prompt-composer-Cu8bj1Vb.js +276 -0
  161. package/dist/prompt-composer.js +1 -1
  162. package/dist/{prose-Bl5OjXTb.js → prose-CQN4Bqqh.js} +1 -1
  163. package/dist/prose.js +1 -1
  164. package/dist/{radio-group-D9VTBLUB.js → radio-group-BHlDgCLk.js} +2 -2
  165. package/dist/radio-group.js +1 -1
  166. package/dist/{rating-BRqsV5OF.js → rating-Cr0lXaAV.js} +15 -15
  167. package/dist/rating.js +1 -1
  168. package/dist/{saved-views-C_76obIv.js → saved-views-CyLSn8a2.js} +151 -151
  169. package/dist/saved-views.js +1 -1
  170. package/dist/{scroll-area-vrm2bbtZ.js → scroll-area-Fr0PmnRS.js} +1 -1
  171. package/dist/scroll-area.js +1 -1
  172. package/dist/{segmented-control-5DTOKO3g.js → segmented-control-uPnQYklX.js} +2 -2
  173. package/dist/segmented-control.js +1 -1
  174. package/dist/select-C0JYHwBy.js +1020 -0
  175. package/dist/select.js +1 -1
  176. package/dist/{side-navigation-MNMSkj9b.js → side-navigation-D8lRpHwj.js} +64 -64
  177. package/dist/side-navigation.js +1 -1
  178. package/dist/{skeleton-DyOwgYmF.js → skeleton-DeEOmm1y.js} +1 -1
  179. package/dist/skeleton.js +1 -1
  180. package/dist/{slider-OMe1DAC-.js → slider-BSI1xvjw.js} +2 -2
  181. package/dist/slider.js +1 -1
  182. package/dist/{sparkline-ChkaLVdY.js → sparkline-CYU4_lCD.js} +1 -1
  183. package/dist/sparkline.js +1 -1
  184. package/dist/spinner-ring-DyfaYloA.js +19 -0
  185. package/dist/{split-button-DbmRwfMC.js → split-button-CkbylOMN.js} +2 -2
  186. package/dist/split-button.js +1 -1
  187. package/dist/{stat-card-BSnsTmsq.js → stat-card-CAh4SdeY.js} +16 -16
  188. package/dist/stat-card.js +1 -1
  189. package/dist/{status-indicator-CyKhBdvN.js → status-indicator-BVMnpcm8.js} +4 -4
  190. package/dist/status-indicator.js +1 -1
  191. package/dist/{stepper-Cw1Auv3n.js → stepper-BLfvMz04.js} +16 -16
  192. package/dist/stepper.js +1 -1
  193. package/dist/styles/action-bar.css +1 -1
  194. package/dist/styles/action-sheet.css +2 -2
  195. package/dist/styles/button.css +2 -2
  196. package/dist/styles/cascader.css +2 -2
  197. package/dist/styles/chart.css +1 -1
  198. package/dist/styles/column-manager.css +3 -3
  199. package/dist/styles/command-palette.css +3 -3
  200. package/dist/styles/dashboard-grid.css +2 -2
  201. package/dist/styles/data-grid.css +3 -3
  202. package/dist/styles/data-list.css +2 -2
  203. package/dist/styles/detail-panel.css +4 -4
  204. package/dist/styles/dialog.css +1 -1
  205. package/dist/styles/drawer.css +1 -1
  206. package/dist/styles/entity-picker.css +1 -1
  207. package/dist/styles/event-calendar.css +1 -1
  208. package/dist/styles/filter-bar.css +3 -3
  209. package/dist/styles/import-export-center.css +4 -4
  210. package/dist/styles/index.css +12 -12
  211. package/dist/styles/markdown.css +2 -2
  212. package/dist/styles/multi-select.css +1 -1
  213. package/dist/styles/notification-center.css +3 -3
  214. package/dist/styles/page-header.css +2 -2
  215. package/dist/styles/page.css +1 -1
  216. package/dist/styles/prompt-composer.css +1 -1
  217. package/dist/styles/saved-views.css +2 -2
  218. package/dist/styles/split-button.css +2 -2
  219. package/dist/styles/table.css +2 -2
  220. package/dist/styles/tabs.css +1 -1
  221. package/dist/styles/timeline.css +1 -1
  222. package/dist/styles/toast.css +1 -1
  223. package/dist/styles/tour.css +2 -2
  224. package/dist/styles/transfer.css +2 -2
  225. package/dist/styles/upload.css +1 -1
  226. package/dist/styles/wizard.css +2 -2
  227. package/dist/styles.css +1 -1
  228. package/dist/{switch-CQ1rpuKa.js → switch-BHyKHqeI.js} +5 -5
  229. package/dist/switch.js +1 -1
  230. package/dist/{table-DpGTPtnb.js → table-C8zOHDcY.js} +30 -30
  231. package/dist/{table-of-contents-BFVERMZy.js → table-of-contents-BAIuPCdy.js} +8 -8
  232. package/dist/table-of-contents.js +1 -1
  233. package/dist/table.js +1 -1
  234. package/dist/{tag-aX7uyAN0.js → tag-XYGEPUHR.js} +14 -14
  235. package/dist/tag.js +1 -1
  236. package/dist/{tags-input-BgpS22sf.js → tags-input-ClYSd-No.js} +40 -40
  237. package/dist/tags-input.js +1 -1
  238. package/dist/text-field-Cguj75tn.js +205 -0
  239. package/dist/text-field.js +1 -1
  240. package/dist/{textarea-DNCjsQYd.js → textarea-BKsh_jAo.js} +1 -1
  241. package/dist/textarea.js +1 -1
  242. package/dist/{time-field-Cm6iBjwH.js → time-field-BIE4WMpS.js} +7 -7
  243. package/dist/time-field.js +1 -1
  244. package/dist/{time-picker-Ce18FSO2.js → time-picker-CNfafRDF.js} +18 -18
  245. package/dist/time-picker.js +1 -1
  246. package/dist/{time-range-picker-kDnw4PQ3.js → time-range-picker-D7gM_Wno.js} +20 -20
  247. package/dist/time-range-picker.js +1 -1
  248. package/dist/timeline-BLadNUkS.js +449 -0
  249. package/dist/timeline.js +1 -1
  250. package/dist/{toast-58ex8PDK.js → toast-CjbiXiza.js} +16 -16
  251. package/dist/toast.js +1 -1
  252. package/dist/{toggle-group-YxVJlCnI.js → toggle-group-BZmghKac.js} +1 -1
  253. package/dist/toggle-group.js +1 -1
  254. package/dist/toolbar-BI4ZepBs.js +243 -0
  255. package/dist/toolbar.js +1 -1
  256. package/dist/{top-navigation-DorkYBnR.js → top-navigation-BTZpx5VA.js} +13 -13
  257. package/dist/top-navigation.js +1 -1
  258. package/dist/{tour-CwK_m_Jp.js → tour-_CQ1kYov.js} +23 -23
  259. package/dist/tour.js +1 -1
  260. package/dist/{transfer-DxGDWIEt.js → transfer-BVhBdIGp.js} +59 -59
  261. package/dist/transfer.js +1 -1
  262. package/dist/tree-DfI9UWLA.js +794 -0
  263. package/dist/tree.js +1 -1
  264. package/dist/types/action-bar/action-bar-overflow.d.ts.map +1 -1
  265. package/dist/types/action-bar/action-bar.types.d.ts +2 -2
  266. package/dist/types/action-sheet/action-sheet-parts.d.ts.map +1 -1
  267. package/dist/types/app-shell/app-shell-parts.d.ts.map +1 -1
  268. package/dist/types/app-shell/app-shell.d.ts.map +1 -1
  269. package/dist/types/app-shell/app-shell.types.d.ts +21 -14
  270. package/dist/types/app-shell/app-shell.types.d.ts.map +1 -1
  271. package/dist/types/app-shell/index.d.ts +1 -1
  272. package/dist/types/app-shell/index.d.ts.map +1 -1
  273. package/dist/types/button/button-indicator.d.ts.map +1 -1
  274. package/dist/types/button/spinner-ring.d.ts +8 -0
  275. package/dist/types/button/spinner-ring.d.ts.map +1 -0
  276. package/dist/types/cascader/cascader-surface.d.ts.map +1 -1
  277. package/dist/types/cascader/cascader.d.ts.map +1 -1
  278. package/dist/types/combobox/combobox-parts.d.ts.map +1 -1
  279. package/dist/types/command-palette/command-palette.d.ts.map +1 -1
  280. package/dist/types/data-grid/data-grid-body.d.ts +7 -2
  281. package/dist/types/data-grid/data-grid-body.d.ts.map +1 -1
  282. package/dist/types/data-grid/data-grid-context.d.ts +2 -1
  283. package/dist/types/data-grid/data-grid-context.d.ts.map +1 -1
  284. package/dist/types/data-grid/data-grid-header.d.ts.map +1 -1
  285. package/dist/types/data-grid/data-grid.d.ts +1 -1
  286. package/dist/types/data-grid/data-grid.d.ts.map +1 -1
  287. package/dist/types/data-grid/data-grid.types.d.ts +12 -0
  288. package/dist/types/data-grid/data-grid.types.d.ts.map +1 -1
  289. package/dist/types/data-grid/index.d.ts +1 -1
  290. package/dist/types/data-grid/index.d.ts.map +1 -1
  291. package/dist/types/detail-panel/detail-panel-parts.d.ts +2 -1
  292. package/dist/types/detail-panel/detail-panel-parts.d.ts.map +1 -1
  293. package/dist/types/drawer/drawer-parts.d.ts.map +1 -1
  294. package/dist/types/entity-picker/entity-picker-control.d.ts.map +1 -1
  295. package/dist/types/filter-bar/filter-bar.d.ts.map +1 -1
  296. package/dist/types/i18n/slotted-provider.d.ts +6 -0
  297. package/dist/types/i18n/slotted-provider.d.ts.map +1 -1
  298. package/dist/types/import-export-center/import-export-center.d.ts.map +1 -1
  299. package/dist/types/message/message-parts.d.ts.map +1 -1
  300. package/dist/types/message-scroller/message-scroller.d.ts.map +1 -1
  301. package/dist/types/multi-select/multi-select-parts.d.ts.map +1 -1
  302. package/dist/types/page-header/page-header-defaults.d.ts +1 -1
  303. package/dist/types/page-header/page-header-defaults.d.ts.map +1 -1
  304. package/dist/types/page-header/page-header.d.ts +1 -1
  305. package/dist/types/page-header/page-header.d.ts.map +1 -1
  306. package/dist/types/page-header/page-header.types.d.ts +9 -0
  307. package/dist/types/page-header/page-header.types.d.ts.map +1 -1
  308. package/dist/types/prompt-composer/prompt-composer.d.ts.map +1 -1
  309. package/dist/types/select/select-parts.d.ts.map +1 -1
  310. package/dist/types/text-field/text-field.d.ts.map +1 -1
  311. package/dist/types/timeline/timeline-parts.d.ts.map +1 -1
  312. package/dist/types/timeline/timeline.d.ts.map +1 -1
  313. package/dist/types/toolbar/toolbar-overflow.d.ts.map +1 -1
  314. package/dist/types/toolbar/toolbar.types.d.ts +2 -2
  315. package/dist/types/tree/tree-parts.d.ts.map +1 -1
  316. package/dist/{upload-CEDsfMWz.js → upload-N2-nyO8x.js} +65 -65
  317. package/dist/upload.js +1 -1
  318. package/dist/{wizard-B3p7zCSj.js → wizard-CK1x2fs3.js} +16 -16
  319. package/dist/wizard.js +1 -1
  320. package/package.json +6 -6
  321. package/dist/action-bar-CJgBierN.js +0 -283
  322. package/dist/action-sheet-tRrjm7WQ.js +0 -358
  323. package/dist/cascader-DqlC1z5b.js +0 -1154
  324. package/dist/combobox-YWFkxaQ3.js +0 -902
  325. package/dist/command-palette-DXNq-zKN.js +0 -741
  326. package/dist/data-list-DZCN_uW1.js +0 -587
  327. package/dist/entity-picker-CFwLGQeU.js +0 -1281
  328. package/dist/filter-bar-G50WdRac.js +0 -1340
  329. package/dist/message-Dtck9RJy.js +0 -434
  330. package/dist/message-scroller-niUJ8RoL.js +0 -216
  331. package/dist/prompt-composer-sh_TXKYZ.js +0 -273
  332. package/dist/select-BFx5EgAa.js +0 -1018
  333. package/dist/text-field-DL_uhNXV.js +0 -203
  334. package/dist/timeline-pEL30Jp8.js +0 -446
  335. package/dist/toolbar-BtIyVbs4.js +0 -241
  336. package/dist/tree-DbLRyItM.js +0 -792
@@ -0,0 +1,1342 @@
1
+ import { r as e } from "./i18n-D7xXDd8-.js";
2
+ import { n as t, t as n } from "./icon-DjqSEQ-o.js";
3
+ import { _ as r, a as i, c as a, d as o, h as s, m as c, n as l, t as u, u as d } from "./menu-parts-CNNHRduK.js";
4
+ import { a as f, c as p, i as m, n as h, o as g, t as ee, u as te } from "./drawer-fyPyxnYQ.js";
5
+ import { t as ne } from "./spinner-ring-DyfaYloA.js";
6
+ import { n as _, t as re } from "./icon-button-DbSZKGT4.js";
7
+ import { t as ie } from "./text-field-Cguj75tn.js";
8
+ import { a as ae, d as oe, f as se, l as ce, p as le, r as ue } from "./popover-C7NpEzq6.js";
9
+ import { n as de } from "./kbd-dNz8QHfL.js";
10
+ import { t as fe } from "./date-picker-DpTRb-Y1.js";
11
+ import { t as pe } from "./datetime-picker-BK_bV3Yr.js";
12
+ import { a as me, i as he, n as ge, s as _e } from "./multi-select-BvlJIEtz.js";
13
+ import { t as ve } from "./number-field-D1MqT8_A.js";
14
+ import { a as ye, t as v } from "./segmented-control-uPnQYklX.js";
15
+ import { c as be, i as xe, n as Se, o as Ce, s as we } from "./select-C0JYHwBy.js";
16
+ import { t as y } from "./time-picker-CNfafRDF.js";
17
+ import { withSelectorKey as b } from "@slotted/core/selector-key";
18
+ import { createRemovalFocus as Te, createRovingTabindex as Ee } from "@slotted/core/focus";
19
+ import { createControllable as De } from "@slotted/core/state";
20
+ import { Fragment as x, createContext as Oe, useCallback as ke, useContext as Ae, useEffect as S, useId as je, useImperativeHandle as Me, useLayoutEffect as Ne, useMemo as Pe, useRef as C, useState as w } from "react";
21
+ import { Fragment as T, jsx as E, jsxs as D } from "react/jsx-runtime";
22
+ import { filterBarMessages as Fe } from "@slotted/core/i18n";
23
+ import { getLiveAnnouncer as Ie } from "@slotted/core/live-announcer";
24
+ import { isPlainDate as Le, isPlainDateTime as Re, isPlainTime as ze, parseISODate as Be, parseISODateTime as Ve, parseISOTime as He, toISODate as O, toISODateTime as Ue, toISOTime as We } from "@slotted/core/date";
25
+ import { defaultOperator as k, describeFilter as Ge, describeFilterGroup as Ke, emptyFilter as qe, emptyFilterGroup as Je, firstLevelRules as Ye, insertNodeAt as Xe, isFilterActive as Ze, isFilterGroup as Qe, normalizeFilterGroup as A, operandCount as j, operatorsFor as $e, removeNodeAt as et, ruleFor as tt, serializeFilterGroup as nt, spokenOperator as rt, updateNodeAt as it, withCondition as at, withGroupJoin as ot, withRuleFor as st, withoutRuleFor as ct } from "@slotted/core/filter";
26
+ //#region src/filter-bar/filter-bar-defaults.tsx
27
+ var lt = Oe({});
28
+ function ut() {
29
+ return Ae(lt);
30
+ }
31
+ function dt({ children: e, ...t }) {
32
+ let n = ut();
33
+ return /* @__PURE__ */ E(lt.Provider, {
34
+ value: {
35
+ apply: t.apply ?? n.apply,
36
+ chipLimit: t.chipLimit ?? n.chipLimit,
37
+ queryDelay: t.queryDelay ?? n.queryDelay,
38
+ shortcut: t.shortcut === void 0 ? n.shortcut : t.shortcut,
39
+ size: t.size ?? n.size
40
+ },
41
+ children: e
42
+ });
43
+ }
44
+ //#endregion
45
+ //#region src/filter-bar/filter-bar-rules.tsx
46
+ function M(e, t) {
47
+ return e.find((e) => e.key === t);
48
+ }
49
+ function ft(e, t) {
50
+ return t in Fe.base.operators ? e(`operators.${t}`) : t;
51
+ }
52
+ function pt(e) {
53
+ let [t = "", n = ""] = e("\0").split("\0");
54
+ return [t.trim(), n.trim()];
55
+ }
56
+ function N(e) {
57
+ if (e.defaultValue) return e.defaultValue;
58
+ let t = e.defaultOperator ?? k(e.kind);
59
+ return qe(e.kind, t);
60
+ }
61
+ function mt(e, t, n) {
62
+ let r = n?.kind ?? t?.kind ?? "text", i = n?.conditions[0] ?? { operator: t ? t.defaultOperator ?? k(t.kind) : "contains" }, a = j(i.operator), o = ft(e, rt(r, i)), s = (e) => t?.options?.find((t) => t.value === e)?.label ?? String(e), c = (e) => e != null && e !== "" && !(Array.isArray(e) && e.length === 0);
63
+ if (a === 0) return {
64
+ operator: o,
65
+ value: "",
66
+ full: "",
67
+ operands: a
68
+ };
69
+ if (r === "set") {
70
+ let t = (i.value ?? []).map(s), n = t.join(", ");
71
+ return {
72
+ operator: o,
73
+ value: t.length > 2 ? e("moreValues", {
74
+ values: t.slice(0, 2).join(", "),
75
+ count: t.length - 2
76
+ }) : n,
77
+ full: n,
78
+ operands: a
79
+ };
80
+ }
81
+ if (a === 2) {
82
+ if (!c(i.value) || !c(i.end)) return {
83
+ operator: o,
84
+ value: "",
85
+ full: "",
86
+ operands: a
87
+ };
88
+ let e = `${s(i.value)} – ${s(i.end)}`;
89
+ return {
90
+ operator: o,
91
+ value: e,
92
+ full: e,
93
+ operands: a
94
+ };
95
+ }
96
+ let l = c(i.value) ? s(i.value) : "";
97
+ return {
98
+ operator: o,
99
+ value: l,
100
+ full: l,
101
+ operands: a
102
+ };
103
+ }
104
+ function ht({ icon: e }) {
105
+ return e == null || e === !1 ? null : /* @__PURE__ */ E(n, { children: typeof e == "string" ? /* @__PURE__ */ E(t, { name: e }) : e });
106
+ }
107
+ function P(e) {
108
+ return (t) => {
109
+ t.key === "Enter" && !t.defaultPrevented && e();
110
+ };
111
+ }
112
+ var F = (e) => e ? Be(String(e)) : null, I = (e) => e ? He(String(e)) : null, L = (e) => e ? Ve(String(e)) : null;
113
+ function gt(e) {
114
+ let { apply: t, field: n, label: r, onValueChange: i, render: a, size: o, value: s } = e, c = a?.(e);
115
+ if (c != null) return /* @__PURE__ */ E(T, { children: c });
116
+ let l = {
117
+ ...n.min === void 0 ? {} : { min: n.min },
118
+ ...n.max === void 0 ? {} : { max: n.max }
119
+ };
120
+ switch (n.kind) {
121
+ case "number": return /* @__PURE__ */ E(ve, {
122
+ "aria-label": r,
123
+ onKeyDown: P(t),
124
+ onValueChange: (e) => i(e),
125
+ placeholder: r,
126
+ size: o,
127
+ value: s ?? null,
128
+ ...typeof n.min == "number" ? { min: n.min } : {},
129
+ ...typeof n.max == "number" ? { max: n.max } : {},
130
+ ...n.step === void 0 ? {} : { step: n.step }
131
+ });
132
+ case "date": return /* @__PURE__ */ E(fe, {
133
+ "aria-label": r,
134
+ onKeyDown: P(t),
135
+ onValueChange: (e) => i(Le(e) ? O(e) : null),
136
+ size: o,
137
+ value: F(s),
138
+ ...F(l.min) ? { min: F(l.min) } : {},
139
+ ...F(l.max) ? { max: F(l.max) } : {}
140
+ });
141
+ case "time": return /* @__PURE__ */ E(y, {
142
+ "aria-label": r,
143
+ onKeyDown: P(t),
144
+ onValueChange: (e) => i(ze(e) ? We(e, "minute") : null),
145
+ size: o,
146
+ value: I(s)
147
+ });
148
+ case "datetime": return /* @__PURE__ */ E(pe, {
149
+ "aria-label": r,
150
+ onKeyDown: P(t),
151
+ onValueChange: (e) => i(Re(e) ? Ue(e) : null),
152
+ size: o,
153
+ value: L(s)
154
+ });
155
+ case "boolean": return /* @__PURE__ */ D(be, {
156
+ fullWidth: !0,
157
+ items: [{
158
+ label: "true",
159
+ value: "true"
160
+ }, {
161
+ label: "false",
162
+ value: "false"
163
+ }],
164
+ onValueChange: (e) => i(e === "true"),
165
+ size: o,
166
+ value: s === !0 ? "true" : s === !1 ? "false" : null,
167
+ children: [/* @__PURE__ */ E(Ce, {
168
+ "aria-label": r,
169
+ children: /* @__PURE__ */ E(we, {})
170
+ }), /* @__PURE__ */ D(xe, { children: [/* @__PURE__ */ E(Se, {
171
+ value: "true",
172
+ children: "true"
173
+ }), /* @__PURE__ */ E(Se, {
174
+ value: "false",
175
+ children: "false"
176
+ })] })]
177
+ });
178
+ case "set": {
179
+ let e = n.options ?? [];
180
+ return /* @__PURE__ */ D(_e, {
181
+ items: e,
182
+ onValueChange: (e) => i([...e]),
183
+ size: o,
184
+ value: s ?? [],
185
+ children: [/* @__PURE__ */ E(me, {
186
+ "aria-label": r,
187
+ placeholder: r
188
+ }), /* @__PURE__ */ E(he, {
189
+ "aria-label": r,
190
+ children: e.map((e) => /* @__PURE__ */ E(ge, {
191
+ value: e.value,
192
+ children: e.label
193
+ }, e.value))
194
+ })]
195
+ });
196
+ }
197
+ default: return /* @__PURE__ */ E(ie, {
198
+ "aria-label": r,
199
+ onKeyDown: P(t),
200
+ onValueChange: (e) => i(e),
201
+ placeholder: r,
202
+ size: o,
203
+ value: s ?? ""
204
+ });
205
+ }
206
+ }
207
+ function _t({ condition: e, environment: t, field: n, ids: r, invalid: i, onConditionChange: a, withOperator: o = !0 }) {
208
+ let { apply: s, renderOperand: c, size: l, t: u } = t, d = n.operators ?? $e(n.kind), f = j(e.operator);
209
+ function p(t) {
210
+ let n = j(e.operator), r = j(t);
211
+ a({
212
+ operator: t,
213
+ ...r >= 1 && n >= 1 ? { value: e.value } : {},
214
+ ...r === 2 && n === 2 ? { end: e.end } : {}
215
+ });
216
+ }
217
+ let m = (t) => ({
218
+ apply: s,
219
+ field: n,
220
+ index: t,
221
+ label: u(f === 2 ? t === 0 ? "from" : "to" : "value"),
222
+ onValueChange: (n) => a(t === 0 ? {
223
+ ...e,
224
+ value: n
225
+ } : {
226
+ ...e,
227
+ end: n
228
+ }),
229
+ operator: e.operator,
230
+ size: l,
231
+ value: (t === 0 ? e.value : e.end) ?? null
232
+ });
233
+ return /* @__PURE__ */ D(T, { children: [o ? /* @__PURE__ */ E("div", {
234
+ "data-part": "operator",
235
+ "data-part-operator": "",
236
+ id: r?.operator,
237
+ children: /* @__PURE__ */ D(be, {
238
+ fullWidth: !0,
239
+ ...i ? { invalid: !0 } : {},
240
+ items: d.map((e) => ({
241
+ label: ft(u, e),
242
+ value: e
243
+ })),
244
+ onValueChange: (e) => p(e),
245
+ size: l,
246
+ value: e.operator,
247
+ children: [/* @__PURE__ */ E(Ce, {
248
+ "aria-label": u("operator"),
249
+ children: /* @__PURE__ */ E(we, {})
250
+ }), /* @__PURE__ */ E(xe, { children: d.map((e) => /* @__PURE__ */ E(Se, {
251
+ value: e,
252
+ children: ft(u, e)
253
+ }, e)) })]
254
+ })
255
+ }) : null, /* @__PURE__ */ E("div", {
256
+ "data-part": "operand",
257
+ "data-part-operand": "",
258
+ id: r?.operand,
259
+ children: Array.from({ length: f }, (e, t) => /* @__PURE__ */ E(gt, {
260
+ render: c,
261
+ ...m(t)
262
+ }, t))
263
+ })] });
264
+ }
265
+ function R({ choices: e, environment: r, invalid: i, onRemove: a, onRuleChange: o, path: s, rule: c }) {
266
+ let { fields: l, size: u, t: d } = r, f = je(), p = s.join("."), m = r.expanded === p, h = M(l, c.field), g = c.filter.conditions[0] ?? { operator: h ? h.defaultOperator ?? k(h.kind) : "contains" }, ee = h ? j(g.operator) : 0, te = e ?? l;
267
+ function ne(e) {
268
+ let t = M(l, e);
269
+ t && o({
270
+ field: e,
271
+ filter: N(t)
272
+ });
273
+ }
274
+ let _ = mt(d, h, c.filter), re = h?.label ?? d("unknownField", { field: c.field });
275
+ return /* @__PURE__ */ D("div", {
276
+ "data-kind": h?.kind,
277
+ "data-operands": ee,
278
+ "data-part": "rule",
279
+ "data-part-rule": "",
280
+ ...i || !h ? { "data-invalid": "" } : {},
281
+ ...m ? { "data-expanded": "" } : {},
282
+ children: [
283
+ /* @__PURE__ */ D("button", {
284
+ "aria-controls": `${f}field ${f}operator ${f}operand`,
285
+ "aria-expanded": m,
286
+ "data-part": "rule-summary",
287
+ "data-part-rule-summary": "",
288
+ onClick: () => r.onExpandedChange?.(m ? null : p),
289
+ type: "button",
290
+ children: [/* @__PURE__ */ D("span", {
291
+ "data-sentence": "",
292
+ children: [
293
+ /* @__PURE__ */ E("span", {
294
+ "data-field": "",
295
+ children: re
296
+ }),
297
+ " ",
298
+ /* @__PURE__ */ E("span", {
299
+ "data-operator": "",
300
+ children: _.operator
301
+ }),
302
+ _.operands > 0 ? /* @__PURE__ */ D(T, { children: [" ", /* @__PURE__ */ E("span", {
303
+ "data-value": "",
304
+ children: _.value || d("noValue")
305
+ })] }) : null
306
+ ]
307
+ }), /* @__PURE__ */ E(n, { children: /* @__PURE__ */ E(t, { name: "chevron-down" }) })]
308
+ }),
309
+ /* @__PURE__ */ E("div", {
310
+ "data-part": "field",
311
+ "data-part-field": "",
312
+ id: `${f}field`,
313
+ children: /* @__PURE__ */ D(be, {
314
+ fullWidth: !0,
315
+ ...i || !h ? { invalid: !0 } : {},
316
+ items: te.map((e) => ({
317
+ label: e.label,
318
+ value: e.key
319
+ })),
320
+ onValueChange: (e) => ne(e),
321
+ size: u,
322
+ value: c.field,
323
+ children: [/* @__PURE__ */ E(Ce, {
324
+ "aria-label": d("field"),
325
+ children: /* @__PURE__ */ E(we, { placeholder: h ? void 0 : d("unknownField", { field: c.field }) })
326
+ }), /* @__PURE__ */ E(xe, { children: te.map((e) => /* @__PURE__ */ E(Se, {
327
+ value: e.key,
328
+ children: e.label
329
+ }, e.key)) })]
330
+ })
331
+ }),
332
+ h ? /* @__PURE__ */ E(_t, {
333
+ condition: g,
334
+ environment: r,
335
+ field: h,
336
+ ids: {
337
+ operand: `${f}operand`,
338
+ operator: `${f}operator`
339
+ },
340
+ invalid: i,
341
+ onConditionChange: (e) => o({
342
+ field: c.field,
343
+ filter: at(c.filter, 0, e)
344
+ })
345
+ }) : /* @__PURE__ */ D(T, { children: [/* @__PURE__ */ E("div", {
346
+ "data-part": "operator",
347
+ "data-part-operator": "",
348
+ id: `${f}operator`
349
+ }), /* @__PURE__ */ E("div", {
350
+ "data-part": "operand",
351
+ "data-part-operand": "",
352
+ id: `${f}operand`
353
+ })] }),
354
+ a ? /* @__PURE__ */ E("button", {
355
+ "aria-label": d("removeRule"),
356
+ "data-part": "remove",
357
+ "data-part-remove": "",
358
+ onClick: a,
359
+ type: "button",
360
+ children: /* @__PURE__ */ E(n, { children: /* @__PURE__ */ E(t, { name: "x" }) })
361
+ }) : /* @__PURE__ */ E("span", {})
362
+ ]
363
+ });
364
+ }
365
+ function vt({ environment: e, extra: r, firstField: i, group: a, onRootChange: o, path: s, root: c }) {
366
+ let { size: l, t: u } = e, d = s.length, f = /* @__PURE__ */ D(v, {
367
+ "aria-label": u("match"),
368
+ onValueChange: (e) => o(ot(c, s, e)),
369
+ size: "sm",
370
+ value: a.join,
371
+ children: [/* @__PURE__ */ E(ye, {
372
+ value: "and",
373
+ children: u("matchAll")
374
+ }), /* @__PURE__ */ E(ye, {
375
+ value: "or",
376
+ children: u("matchAny")
377
+ })]
378
+ }), [p, m] = pt((e) => u("matches", { join: e })), h = a.join === "and" ? u("matchAll") : u("matchAny"), g = d > 0 ? /* @__PURE__ */ E(re, {
379
+ "aria-label": u("removeGroup"),
380
+ onClick: () => o(et(c, s)),
381
+ render: (e) => /* @__PURE__ */ E("button", { ...b(e, "part", "remove-group") }),
382
+ size: l === "lg" ? "md" : "sm",
383
+ title: u("removeGroup"),
384
+ tone: "secondary",
385
+ variant: "ghost",
386
+ children: /* @__PURE__ */ E(n, { children: /* @__PURE__ */ E(t, { name: "trash" }) })
387
+ }) : null;
388
+ function ee() {
389
+ i && (o(Xe(c, s, {
390
+ field: i.key,
391
+ filter: N(i)
392
+ })), e.onExpandedChange?.([...s, a.rules.length].join(".")));
393
+ }
394
+ function te() {
395
+ i && (o(Xe(c, s, {
396
+ join: a.join === "and" ? "or" : "and",
397
+ rules: [{
398
+ field: i.key,
399
+ filter: N(i)
400
+ }]
401
+ })), e.onExpandedChange?.([
402
+ ...s,
403
+ a.rules.length,
404
+ 0
405
+ ].join(".")));
406
+ }
407
+ return /* @__PURE__ */ D("fieldset", {
408
+ "data-depth": d,
409
+ "data-part": "group",
410
+ "data-part-group": "",
411
+ children: [
412
+ /* @__PURE__ */ E("legend", { children: u("matches", { join: h }) }),
413
+ /* @__PURE__ */ D("div", {
414
+ "data-part": "join",
415
+ "data-part-join": "",
416
+ children: [
417
+ p ? /* @__PURE__ */ E("span", { children: p }) : null,
418
+ f,
419
+ m ? /* @__PURE__ */ E("span", { children: m }) : null,
420
+ g
421
+ ]
422
+ }),
423
+ /* @__PURE__ */ E("div", {
424
+ "data-part": "rules",
425
+ "data-part-rules": "",
426
+ children: a.rules.map((t, n) => {
427
+ let r = [...s, n], l = /* @__PURE__ */ E("span", {
428
+ "data-part": "conjunction",
429
+ "data-part-conjunction": "",
430
+ children: u(n === 0 ? "where" : `joins.${a.join}`)
431
+ });
432
+ if (Qe(t)) return /* @__PURE__ */ D(x, { children: [l, /* @__PURE__ */ E(vt, {
433
+ environment: e,
434
+ firstField: i,
435
+ group: t,
436
+ onRootChange: o,
437
+ path: r,
438
+ root: c
439
+ })] }, n);
440
+ let d = M(e.fields, t.field);
441
+ return /* @__PURE__ */ D(x, { children: [l, /* @__PURE__ */ E(R, {
442
+ environment: e,
443
+ path: r,
444
+ onRemove: d?.required ? void 0 : () => o(et(c, r)),
445
+ onRuleChange: (e) => o(it(c, r, e)),
446
+ rule: t
447
+ })] }, n);
448
+ })
449
+ }),
450
+ /* @__PURE__ */ D("div", {
451
+ "data-part": "actions",
452
+ "data-part-actions": "",
453
+ children: [
454
+ /* @__PURE__ */ E(_, {
455
+ disabled: !i,
456
+ onClick: ee,
457
+ render: (e) => /* @__PURE__ */ E("button", { ...b(e, "part", "add-rule") }),
458
+ size: l === "lg" ? "md" : "sm",
459
+ start: /* @__PURE__ */ E(n, { children: /* @__PURE__ */ E(t, { name: "plus" }) }),
460
+ tone: "secondary",
461
+ variant: d === 0 ? "outline" : "ghost",
462
+ children: u("addRule")
463
+ }),
464
+ /* @__PURE__ */ E(_, {
465
+ disabled: !i,
466
+ onClick: te,
467
+ render: (e) => /* @__PURE__ */ E("button", { ...b(e, "part", "add-group") }),
468
+ size: l === "lg" ? "md" : "sm",
469
+ start: /* @__PURE__ */ E(n, { children: /* @__PURE__ */ E(t, { name: "plus" }) }),
470
+ tone: "secondary",
471
+ variant: d === 0 ? "outline" : "ghost",
472
+ children: u("addGroup")
473
+ }),
474
+ d === 0 ? r : null
475
+ ]
476
+ })
477
+ ]
478
+ });
479
+ }
480
+ //#endregion
481
+ //#region src/filter-bar/filter-bar.tsx
482
+ var z = {
483
+ apply: "live",
484
+ chipLimit: 6,
485
+ queryDelay: 320,
486
+ shortcut: null,
487
+ size: "md"
488
+ }, yt = [
489
+ "summary",
490
+ "pill",
491
+ "chip-operator",
492
+ "chip-value",
493
+ "chip-remove",
494
+ "more",
495
+ "add",
496
+ "clear",
497
+ "reset",
498
+ "apply"
499
+ ].map((e) => `[data-part='${e}']`).join(", "), B = 36;
500
+ function bt(e, t) {
501
+ let n = parseFloat(e.ownerDocument.defaultView?.getComputedStyle(e.ownerDocument.documentElement).fontSize ?? "16");
502
+ return t * (Number.isFinite(n) ? n : 16);
503
+ }
504
+ function xt(e, t) {
505
+ return nt(e) === nt(t);
506
+ }
507
+ function St(e) {
508
+ if (!e) return !1;
509
+ let t = e.tagName;
510
+ return t === "INPUT" || t === "TEXTAREA" || t === "SELECT" || e.isContentEditable;
511
+ }
512
+ var V = "--slotted-page-sticky-top", Ct = typeof document > "u" ? S : Ne;
513
+ function wt(e) {
514
+ let [t, n] = w(!1);
515
+ return S(() => {
516
+ let t = e.current;
517
+ if (!t || typeof ResizeObserver > "u") return;
518
+ let r = new ResizeObserver(() => {
519
+ let e = t.getBoundingClientRect().width;
520
+ n(e > 0 && e < bt(t, B));
521
+ });
522
+ return r.observe(t), () => r.disconnect();
523
+ }, []), t;
524
+ }
525
+ function Tt() {
526
+ let [e, t] = w(!1);
527
+ return S(() => {
528
+ let e = typeof window > "u" ? void 0 : window;
529
+ if (!e?.matchMedia) return;
530
+ let n = e.matchMedia(`(max-width: ${B}rem)`), r = () => t(n.matches);
531
+ return r(), n.addEventListener?.("change", r), () => n.removeEventListener?.("change", r);
532
+ }, []), e;
533
+ }
534
+ function H({ apply: le, children: fe, chipLimit: pe, count: me, defaultOpen: he, defaultPreset: ge, defaultQuery: _e, defaultRevealed: ve, defaultValue: ye, disabled: v = !1, fields: y, loading: x = !1, messages: Oe, onOpenChange: Ae, onPresetChange: Ne, onPresetSave: Le, onQueryChange: Re, onRevealedChange: ze, onValueChange: Be, open: Ve, preset: He, presets: O, query: Ue, queryDelay: We, readOnly: k = !1, ref: qe, renderOperand: Xe, revealed: nt, shortcut: rt, size: it, sticky: ot = !1, container: lt, total: dt, value: pt, ...P }) {
535
+ let F = ut(), I = e(Fe, Oe), L = le ?? F.apply ?? z.apply, gt = pe ?? F.chipLimit ?? z.chipLimit, _t = We ?? F.queryDelay ?? z.queryDelay, R = rt === void 0 ? F.shortcut ?? z.shortcut : rt, B = it ?? F.size ?? z.size, bt = je(), H = C(null), kt = C(null), At = C(null), jt = wt(H), Mt = Tt(), [Nt, Pt] = w(ye ?? null), U = pt === void 0 ? Nt : pt, [Ft, It] = w(_e ?? ""), Lt = Ue === void 0 ? Ft : Ue, [Rt, zt] = w(ge ?? null), Bt = He === void 0 ? Rt : He, [Vt, Ht] = w(he ?? !1), Ut = Ve === void 0 ? Vt : Ve, [Wt, Gt] = w(ve ?? !1), Kt = nt === void 0 ? Wt : nt;
536
+ function W(e) {
537
+ Ie(H.current?.ownerDocument).announce(e);
538
+ }
539
+ let qt = Pe(() => ({
540
+ field: (e) => M(y, e)?.label ?? e,
541
+ join: (e) => I(`joins.${e}`),
542
+ operator: (e) => ft(I, e)
543
+ }), [y, I]), Jt = ke((e, t) => Ge(t, {
544
+ ...qt,
545
+ value: (t) => e?.options?.find((e) => e.value === t)?.label ?? String(t)
546
+ }), [qt]), Yt = ke((e, t, n) => {
547
+ let r = A(e);
548
+ De({
549
+ controlled: pt,
550
+ equals: xt,
551
+ initial: U,
552
+ onRequest: (e) => Be?.(e.value, e)
553
+ }).request(r, t, n) && Pt(r);
554
+ }, [
555
+ Be,
556
+ U,
557
+ pt
558
+ ]), Xt = ke((e, t, n) => {
559
+ De({
560
+ controlled: Ue,
561
+ initial: Lt,
562
+ onRequest: (e) => Re?.(e.value, e)
563
+ }).request(e, t, n) && It(e);
564
+ }, [
565
+ Re,
566
+ Lt,
567
+ Ue
568
+ ]);
569
+ function Zt(e, t, n) {
570
+ De({
571
+ controlled: He,
572
+ initial: Bt,
573
+ onRequest: (e) => Ne?.(e.value, e)
574
+ }).request(e, t, n) && zt(e);
575
+ }
576
+ function Qt(e, t, n) {
577
+ De({
578
+ controlled: Ve,
579
+ initial: Ut,
580
+ onRequest: (e) => Ae?.(e.value, e)
581
+ }).request(e, t, n) && Ht(e);
582
+ }
583
+ function $t(e, t, n) {
584
+ De({
585
+ controlled: nt,
586
+ initial: Kt,
587
+ onRequest: (e) => ze?.(e.value, e)
588
+ }).request(e, t, n) && Gt(e);
589
+ }
590
+ let [G, K] = w(null), q = L === "manual" && G ? G.value : U, en = L === "manual" && G ? G.query : Lt, tn = L === "manual" && G !== null && (!xt(G.value, U) || G.query !== Lt), nn = C(U);
591
+ S(() => {
592
+ xt(nn.current, U) || (nn.current = U, K(null));
593
+ }, [U]);
594
+ let rn = Pe(() => {
595
+ let e = O?.find((e) => e.key === Bt);
596
+ return e !== void 0 && !xt(A(e.value), U);
597
+ }, [
598
+ Bt,
599
+ O,
600
+ U
601
+ ]);
602
+ function J(e, t, n) {
603
+ if (L === "manual") {
604
+ K({
605
+ value: e,
606
+ query: en
607
+ });
608
+ return;
609
+ }
610
+ Yt(e, t, n);
611
+ }
612
+ let an = Pe(() => y.filter((e) => e.required), [y]);
613
+ function on() {
614
+ let e = null;
615
+ for (let t of an) t.defaultValue && (e = st(e, t.key, t.defaultValue));
616
+ return A(e);
617
+ }
618
+ function sn(e) {
619
+ return an.filter((t) => !Ze(tt(e, t.key) ?? null));
620
+ }
621
+ function cn(e) {
622
+ if (!G) return;
623
+ let t = sn(G.value);
624
+ if (t.length > 0) {
625
+ let e = t[0];
626
+ Y(e.key), W(I("required", { field: e.label })), H.current?.querySelector(`[data-part='pill'][data-field='${CSS.escape(e.key)}']`)?.focus();
627
+ return;
628
+ }
629
+ Y(null), Yt(G.value, "submit", e), G.query !== Lt && Xt(G.query, "submit", e), K(null);
630
+ let n = A(G.value);
631
+ W(n ? I("appliedCount", {
632
+ count: Ye(n).length,
633
+ filters: Ke(n, qt)
634
+ }) : I("cleared"));
635
+ }
636
+ function ln() {
637
+ K(null), Y(null);
638
+ }
639
+ function un(e) {
640
+ let t = on();
641
+ Y(null), Z(null), L === "manual" ? K({
642
+ value: t,
643
+ query: ""
644
+ }) : (Yt(t, "clear", e), Lt !== "" && Xt("", "clear", e)), W(t ? I("clearedTo", { filters: Ke(t, qt) }) : I("cleared"));
645
+ }
646
+ function dn(e, t) {
647
+ let n = M(y, e);
648
+ if (n?.required) {
649
+ Y(e), W(I("required", { field: n.label }));
650
+ return;
651
+ }
652
+ X?.key === e && (Z(null), tt(q, e) === void 0) || (J(ct(q, e), "remove", t), W(I("removed", { field: n?.label ?? e })));
653
+ }
654
+ function fn(e, t) {
655
+ q && J(et(q, e), "remove", t);
656
+ }
657
+ function pn(e, t) {
658
+ Zt(e, e === null ? "clear" : "select", t);
659
+ let n = O?.find((t) => t.key === e);
660
+ n && (K(null), Yt(n.value, "select", t), W(n.label));
661
+ }
662
+ let [mn, Y] = w(null), [X, Z] = w(null), [hn, gn] = w(null), _n = C(null);
663
+ function vn(e, t, n) {
664
+ if (L === "manual") {
665
+ K({
666
+ value: q,
667
+ query: e
668
+ });
669
+ return;
670
+ }
671
+ if (gn(e), _n.current && clearTimeout(_n.current), t === "clear" || _t === 0) {
672
+ gn(null), Xt(e, t, n);
673
+ return;
674
+ }
675
+ _n.current = setTimeout(() => {
676
+ _n.current = null, gn(null), Xt(e, t, n);
677
+ }, _t);
678
+ }
679
+ S(() => () => {
680
+ _n.current && clearTimeout(_n.current);
681
+ }, []);
682
+ function yn(e) {
683
+ e.defaultPrevented || (e.key === "Escape" && (hn ?? en) !== "" && (e.preventDefault(), vn("", "clear", e)), e.key === "Enter" && L === "manual" && cn(e));
684
+ }
685
+ S(() => {
686
+ if (!R || v) return;
687
+ let e = H.current?.ownerDocument;
688
+ if (!e) return;
689
+ let t = (t) => {
690
+ t.defaultPrevented || t.metaKey || t.ctrlKey || t.altKey || t.key === R && (St(e.activeElement) || (t.preventDefault(), kt.current?.focus()));
691
+ };
692
+ return e.addEventListener("keydown", t), () => e.removeEventListener("keydown", t);
693
+ }, [v, R]);
694
+ let bn = C(null);
695
+ S(() => {
696
+ let e = At.current;
697
+ if (!e) return;
698
+ let t = Ee(e, {
699
+ includeAriaDisabled: !0,
700
+ itemSelector: yt
701
+ }), n = Te(e, {
702
+ fallback: () => e.querySelector("[data-part='add']") ?? null,
703
+ itemSelector: yt
704
+ });
705
+ return bn.current = t, () => {
706
+ t.destroy(), n.destroy(), bn.current = null;
707
+ };
708
+ }, []), S(() => {
709
+ bn.current?.refresh();
710
+ });
711
+ let xn = C(null);
712
+ Ct(() => {
713
+ let e = xn.current;
714
+ e && (xn.current = null, (e.isConnected ? e : At.current?.querySelector("[data-part='add']"))?.focus());
715
+ }), S(() => {
716
+ let e = H.current;
717
+ if (!ot || !e || typeof ResizeObserver > "u") return;
718
+ let t = e.parentElement, n = e.ownerDocument.defaultView;
719
+ if (!t || !n) return;
720
+ let r = t.style.getPropertyValue(V), i = () => r ? t.style.setProperty(V, r) : t.style.removeProperty(V), a = new ResizeObserver(() => {
721
+ i();
722
+ let r = n.getComputedStyle(t).getPropertyValue(V).trim() || "0px", a = e.getBoundingClientRect().height;
723
+ e.style.setProperty(V, r), t.style.setProperty(V, `calc(${r} + ${a}px)`);
724
+ });
725
+ return a.observe(e), () => {
726
+ a.disconnect(), e.style.removeProperty(V), i();
727
+ };
728
+ }, [ot]);
729
+ let Sn = me === void 0 ? null : dt === void 0 ? I("countOnly", { count: me }) : I("count", {
730
+ count: me,
731
+ total: dt
732
+ }), [Cn, wn] = w(null), Tn = C(null), Q = Et(Ut, q, Tn);
733
+ function En(e, t, n) {
734
+ n?.tree !== void 0 && (Tn.current = n.tree), wn(n ? n.path.join(".") : null), Qt(!0, e, t);
735
+ }
736
+ function Dn(e, t) {
737
+ let n = M(y, e), r = q ? q.rules.findIndex((t) => !Qe(t) && t.field === e) : -1;
738
+ if (r !== -1 && X?.key !== e) {
739
+ En("pointer", t, { path: [r] });
740
+ return;
741
+ }
742
+ let i = X?.key === e ? X.filter : n ? N(n) : null;
743
+ if (!i) return;
744
+ let a = st(q, e, i);
745
+ Z(null), En("pointer", t, {
746
+ path: [a.rules.findIndex((t) => !Qe(t) && t.field === e)],
747
+ tree: a
748
+ });
749
+ }
750
+ Me(qe, () => ({
751
+ focusSearch: () => kt.current?.focus(),
752
+ open: (e) => En("programmatic", void 0, e ? { path: e } : void 0),
753
+ get root() {
754
+ return H.current;
755
+ }
756
+ }), []);
757
+ let On = {
758
+ apply: () => L === "manual" ? cn() : void 0,
759
+ fields: y,
760
+ renderOperand: Xe,
761
+ size: B,
762
+ t: I
763
+ }, kn = v || k, An = y.filter((e) => e.pinned || e.required), jn = new Set(An.map((e) => e.key)), Mn = q ? Dt(q) : 0, [Nn, Pn] = w(null), Fn = y.filter((e) => !jn.has(e.key) && tt(q, e.key) === void 0 && e.key !== X?.key), In = /* @__PURE__ */ new Map();
764
+ for (let e of Fn) {
765
+ let t = In.get(e.section) ?? [];
766
+ t.push(e), In.set(e.section, t);
767
+ }
768
+ function Ln(e, t) {
769
+ let n = M(y, e);
770
+ if (!n || kn) return;
771
+ if (jt) {
772
+ Dn(e, t);
773
+ return;
774
+ }
775
+ let r = N(n);
776
+ Ze(r) ? J(st(q, e, r), "pointer", t) : Z({
777
+ key: e,
778
+ filter: r
779
+ }), Pn(e);
780
+ }
781
+ function Rn(e, t, n) {
782
+ let r = M(y, e);
783
+ if (t === null) {
784
+ if (r?.required) {
785
+ Y(e), W(I("required", { field: r.label }));
786
+ return;
787
+ }
788
+ X?.key === e && Z(null), J(ct(q, e), "clear");
789
+ return;
790
+ }
791
+ if (Y(null), !Ze(t)) {
792
+ if (L === "manual") {
793
+ J(st(q, e, t), n);
794
+ return;
795
+ }
796
+ let r = q ? q.rules.findIndex((t) => !Qe(t) && t.field === e) : -1;
797
+ Z({
798
+ key: e,
799
+ filter: t,
800
+ ...r === -1 ? {} : { at: r }
801
+ }), r !== -1 && J(ct(q, e), n);
802
+ return;
803
+ }
804
+ X?.key === e && Z(null), J(st(q, e, t), n);
805
+ }
806
+ function zn(e, t, n, r) {
807
+ let i = t.conditions[0] ?? { operator: n }, a = j(i.operator), o = j(n), s = at(t, 0, {
808
+ operator: n,
809
+ ...o >= 1 && a >= 1 ? { value: i.value } : {},
810
+ ...o === 2 && a === 2 ? { end: i.end } : {}
811
+ });
812
+ Rn(e, s, "pointer"), o > 0 && !Ze(s) && Pn(e);
813
+ }
814
+ function Bn(e, t) {
815
+ if (e.key !== "Delete" && e.key !== "Backspace") return;
816
+ let n = e.target.closest("[data-part='chip-operator'], [data-part='chip-value'], [data-part='chip-remove']");
817
+ if (!n || kn || e.defaultPrevented) return;
818
+ if (e.preventDefault(), M(y, t)?.required) {
819
+ dn(t, e);
820
+ return;
821
+ }
822
+ let r = [...At.current?.querySelectorAll("[data-part='chip']") ?? []].filter((e) => e.checkVisibility?.() ?? !0), i = n.closest("[data-part='chip']"), a = i ? r.indexOf(i) : -1, o = n.getAttribute("data-part"), s = r[a + 1] ?? r[a - 1];
823
+ xn.current = s?.querySelector(`[data-part='${o}']`) ?? s?.querySelector("button") ?? At.current?.querySelector("[data-part='add']") ?? null, dn(t, e);
824
+ }
825
+ function Vn(e, i, a) {
826
+ let o = M(y, e), d = o === void 0, f = o?.label ?? e, p = mt(I, o, i), m = a.incomplete === !0 || !Ze(i), h = p.value || I("noValue"), g = I("rule", {
827
+ condition: p.operands > 0 ? I("condition", {
828
+ operator: p.operator,
829
+ value: h
830
+ }) : p.operator,
831
+ field: d ? I("unknownField", { field: e }) : f
832
+ }), ee = m ? I("incomplete", { rule: g }) : g, te = i.conditions[0], ne = o?.operators ?? (o ? $e(o.kind) : []), _ = k ? { "aria-disabled": !0 } : {}, re = v || d, ie = k || d ? /* @__PURE__ */ E("button", {
833
+ "data-part": "chip-operator",
834
+ "data-part-chip-operator": "",
835
+ disabled: v,
836
+ type: "button",
837
+ ...d ? { "aria-disabled": !0 } : _,
838
+ children: p.operator
839
+ }) : /* @__PURE__ */ D(r, { children: [/* @__PURE__ */ E(l, { render: (e) => /* @__PURE__ */ E("button", {
840
+ ...b(e, "part", "chip-operator"),
841
+ disabled: re,
842
+ type: "button",
843
+ children: p.operator
844
+ }) }), /* @__PURE__ */ E(u, {
845
+ "aria-label": I("operator"),
846
+ children: /* @__PURE__ */ E(c, {
847
+ onValueChange: (t, n) => zn(e, i, t, n.source),
848
+ value: te?.operator ?? "",
849
+ children: ne.map((e) => /* @__PURE__ */ E(s, {
850
+ value: e,
851
+ children: ft(I, e)
852
+ }, e))
853
+ })
854
+ })] }), le = /* @__PURE__ */ D(T, { children: [/* @__PURE__ */ E("span", {
855
+ "data-operator": "",
856
+ children: p.operator
857
+ }), /* @__PURE__ */ E("span", {
858
+ "data-value": "",
859
+ children: h
860
+ })] }), de = I("condition", {
861
+ operator: p.operator,
862
+ value: p.full || h
863
+ }), fe = p.full && p.full !== p.value ? p.full : void 0, pe = null;
864
+ return (p.operands > 0 || m) && (pe = k || !o || jt ? /* @__PURE__ */ E("button", {
865
+ "aria-haspopup": jt && !k && !d ? "dialog" : void 0,
866
+ "aria-label": de,
867
+ "data-part": "chip-value",
868
+ "data-part-chip-value": "",
869
+ disabled: v,
870
+ onClick: (t) => jt && !k && !d ? Dn(e, t) : void 0,
871
+ title: fe,
872
+ type: "button",
873
+ ...k || d ? { "aria-disabled": !0 } : {},
874
+ children: le
875
+ }) : /* @__PURE__ */ D(se, {
876
+ onOpenChange: (t) => Pn(t ? e : Nn === e ? null : Nn),
877
+ open: Nn === e,
878
+ children: [/* @__PURE__ */ E(oe, { render: (e) => /* @__PURE__ */ E("button", {
879
+ ...b(e, "part", "chip-value"),
880
+ "aria-haspopup": "dialog",
881
+ "aria-label": de,
882
+ disabled: v,
883
+ title: fe,
884
+ type: "button",
885
+ children: le
886
+ }) }), /* @__PURE__ */ E(ce, { children: /* @__PURE__ */ E(ae, {
887
+ "aria-label": f,
888
+ children: /* @__PURE__ */ E(ue, { children: /* @__PURE__ */ E(Ot, {
889
+ apply: L,
890
+ current: i,
891
+ environment: On,
892
+ field: o,
893
+ invalid: mn === e,
894
+ onChange: (t) => Rn(e, t, "keyboard"),
895
+ onDone: () => {
896
+ let t = tt(q, e);
897
+ t && Ze(t) && W(I("rule", {
898
+ condition: Jt(o, t),
899
+ field: f
900
+ }));
901
+ },
902
+ queryDelay: _t,
903
+ withOperator: !1
904
+ }) })
905
+ }) })]
906
+ })), /* @__PURE__ */ D("div", {
907
+ "aria-label": ee,
908
+ "data-field": e,
909
+ "data-operands": p.operands,
910
+ "data-part": "chip",
911
+ "data-part-chip": "",
912
+ onKeyDown: (t) => Bn(t, e),
913
+ role: "group",
914
+ ...a.pinned ? { "data-pinned": "" } : {},
915
+ ...m ? { "data-incomplete": "" } : {},
916
+ ...a.folded ? { "data-folded": "" } : {},
917
+ ...d || mn === e ? { "data-invalid": "" } : {},
918
+ children: [
919
+ /* @__PURE__ */ D("span", {
920
+ "data-part": "chip-field",
921
+ "data-part-chip-field": "",
922
+ children: [/* @__PURE__ */ E(ht, { icon: o?.icon }), /* @__PURE__ */ E("span", { children: f })]
923
+ }),
924
+ ie,
925
+ pe,
926
+ o?.required || k ? null : /* @__PURE__ */ E("button", {
927
+ "aria-label": I("remove", { name: f }),
928
+ "data-part": "chip-remove",
929
+ "data-part-chip-remove": "",
930
+ disabled: v,
931
+ onClick: (t) => dn(e, t),
932
+ type: "button",
933
+ children: /* @__PURE__ */ E(n, { children: /* @__PURE__ */ E(t, { name: "x" }) })
934
+ })
935
+ ]
936
+ }, e);
937
+ }
938
+ function Hn(e, r, i) {
939
+ let a = `(${Ke(e, qt)})`;
940
+ return /* @__PURE__ */ D("div", {
941
+ "aria-label": a,
942
+ "data-operands": 1,
943
+ "data-part": "chip",
944
+ "data-part-chip": "",
945
+ onKeyDown: (e) => {
946
+ (e.key === "Delete" || e.key === "Backspace") && !kn && (e.preventDefault(), fn(r, e));
947
+ },
948
+ role: "group",
949
+ ...i ? { "data-folded": "" } : {},
950
+ children: [/* @__PURE__ */ E("button", {
951
+ "aria-haspopup": "dialog",
952
+ "data-part": "chip-value",
953
+ "data-part-chip-value": "",
954
+ disabled: v,
955
+ onClick: (e) => k ? void 0 : En("pointer", e, { path: r }),
956
+ title: a,
957
+ type: "button",
958
+ ...k ? { "aria-disabled": !0 } : {},
959
+ children: /* @__PURE__ */ E("span", {
960
+ "data-value": "",
961
+ children: a
962
+ })
963
+ }), k ? null : /* @__PURE__ */ E("button", {
964
+ "aria-label": I("remove", { name: a }),
965
+ "data-part": "chip-remove",
966
+ "data-part-chip-remove": "",
967
+ disabled: v,
968
+ onClick: (e) => fn(r, e),
969
+ type: "button",
970
+ children: /* @__PURE__ */ E(n, { children: /* @__PURE__ */ E(t, { name: "x" }) })
971
+ })]
972
+ }, `group-${r.join(".")}`);
973
+ }
974
+ let $ = [], Un = 0, Wn = () => Un++ >= gt;
975
+ for (let e of An) {
976
+ let r = tt(q, e.key);
977
+ r === void 0 ? X?.key === e.key ? $.push(Vn(e.key, X.filter, {
978
+ pinned: !0,
979
+ incomplete: !0,
980
+ folded: Wn()
981
+ })) : k || $.push(/* @__PURE__ */ D("button", {
982
+ "aria-haspopup": "dialog",
983
+ "data-field": e.key,
984
+ "data-part": "pill",
985
+ "data-part-pill": "",
986
+ disabled: v,
987
+ onClick: (t) => Ln(e.key, t),
988
+ type: "button",
989
+ ...mn === e.key ? {
990
+ "data-invalid": "",
991
+ "aria-invalid": !0
992
+ } : {},
993
+ children: [/* @__PURE__ */ E(n, { children: /* @__PURE__ */ E(t, { name: "plus" }) }), /* @__PURE__ */ E("span", { children: e.label })]
994
+ }, e.key)) : $.push(Vn(e.key, r, {
995
+ pinned: !0,
996
+ folded: Wn()
997
+ }));
998
+ }
999
+ let Gn = X && !jn.has(X.key) && tt(q, X.key) === void 0 ? X : null, Kn = () => Gn ? Vn(Gn.key, Gn.filter, {
1000
+ incomplete: !0,
1001
+ folded: Wn()
1002
+ }) : null, qn = !1;
1003
+ (q?.rules ?? []).forEach((e, t) => {
1004
+ Gn?.at === t && ($.push(Kn()), qn = !0), Qe(e) ? $.push(Hn(e, [t], Wn())) : jn.has(e.field) || $.push(Vn(e.field, e.filter, { folded: Wn() }));
1005
+ }), Gn && !qn && $.push(Kn());
1006
+ let Jn = Un, Yn = Math.max(0, Jn - gt);
1007
+ return /* @__PURE__ */ D("div", {
1008
+ "aria-label": I("bar"),
1009
+ role: "search",
1010
+ ...b(P, "part", "root"),
1011
+ "data-apply": L,
1012
+ "data-size": B,
1013
+ "data-ui": "filter-bar",
1014
+ "data-ui-filter-bar": "",
1015
+ ref: H,
1016
+ ...v ? { "data-disabled": "" } : {},
1017
+ ...k ? { "data-readonly": "" } : {},
1018
+ ...x ? { "data-loading": "" } : {},
1019
+ ...tn || rn ? { "data-dirty": "" } : {},
1020
+ ...Ut ? { "data-open": "" } : {},
1021
+ ...ot ? { "data-sticky": "" } : {},
1022
+ children: [/* @__PURE__ */ D("div", {
1023
+ "data-part": "frame",
1024
+ "data-part-frame": "",
1025
+ children: [
1026
+ /* @__PURE__ */ E("div", {
1027
+ "data-part": "search",
1028
+ "data-part-search": "",
1029
+ children: /* @__PURE__ */ E(ie, {
1030
+ "aria-label": I("search"),
1031
+ clearable: !0,
1032
+ disabled: v,
1033
+ end: R ? /* @__PURE__ */ E(de, {
1034
+ size: "sm",
1035
+ children: R
1036
+ }) : void 0,
1037
+ onKeyDown: yn,
1038
+ onValueChange: (e, t) => vn(e, t.reason === "clear" ? "clear" : "keyboard", t.source),
1039
+ placeholder: I("search"),
1040
+ ref: kt,
1041
+ size: B,
1042
+ start: /* @__PURE__ */ E(n, { children: /* @__PURE__ */ E(t, { name: "search" }) }),
1043
+ type: "search",
1044
+ value: hn ?? en
1045
+ })
1046
+ }),
1047
+ /* @__PURE__ */ D("div", {
1048
+ "aria-label": I("filters"),
1049
+ "data-part": "bar",
1050
+ "data-part-bar": "",
1051
+ ref: At,
1052
+ role: "toolbar",
1053
+ ...k ? { "aria-description": I("readOnly") } : {},
1054
+ ...Kt ? { "data-revealed": "" } : {},
1055
+ children: [
1056
+ /* @__PURE__ */ E(_, {
1057
+ "aria-haspopup": "dialog",
1058
+ disabled: v,
1059
+ onClick: (e) => En("pointer", e),
1060
+ render: (e) => /* @__PURE__ */ E("button", { ...b(e, "part", "summary") }),
1061
+ size: B,
1062
+ start: /* @__PURE__ */ E(n, { children: /* @__PURE__ */ E(t, { name: "funnel" }) }),
1063
+ tone: "secondary",
1064
+ variant: "outline",
1065
+ children: /* @__PURE__ */ E("span", { children: I("summary", { count: Mn }) })
1066
+ }),
1067
+ $,
1068
+ Yn > 0 ? /* @__PURE__ */ E("button", {
1069
+ "aria-expanded": Kt,
1070
+ "data-part": "more",
1071
+ "data-part-more": "",
1072
+ disabled: v,
1073
+ onClick: (e) => $t(!Kt, "pointer", e),
1074
+ type: "button",
1075
+ children: Kt ? I("less") : I("more", { count: Yn })
1076
+ }) : null,
1077
+ k ? null : /* @__PURE__ */ D(r, { children: [/* @__PURE__ */ E(l, { render: (e) => Jn > 0 ? /* @__PURE__ */ E(re, {
1078
+ ...e,
1079
+ "aria-label": I("add"),
1080
+ disabled: v || Fn.length === 0,
1081
+ render: (e) => /* @__PURE__ */ E("button", {
1082
+ ...b(e, "part", "add"),
1083
+ "data-compact": ""
1084
+ }),
1085
+ shape: "circle",
1086
+ size: B,
1087
+ title: I("add"),
1088
+ tone: "secondary",
1089
+ variant: "outline",
1090
+ children: /* @__PURE__ */ E(n, { children: /* @__PURE__ */ E(t, { name: "plus" }) })
1091
+ }) : /* @__PURE__ */ E(_, {
1092
+ ...e,
1093
+ disabled: v || Fn.length === 0,
1094
+ render: (e) => /* @__PURE__ */ E("button", { ...b(e, "part", "add") }),
1095
+ size: B,
1096
+ start: /* @__PURE__ */ E(n, { children: /* @__PURE__ */ E(t, { name: "plus" }) }),
1097
+ tone: "secondary",
1098
+ variant: "ghost",
1099
+ children: I("add")
1100
+ }) }), /* @__PURE__ */ E(u, {
1101
+ "aria-label": I("add"),
1102
+ children: [...In.entries()].map(([e, t]) => {
1103
+ let n = t.map((e) => /* @__PURE__ */ D(a, {
1104
+ onSelect: (t) => Ln(e.key, t),
1105
+ children: [e.icon ? /* @__PURE__ */ E(d, { children: /* @__PURE__ */ E(ht, { icon: e.icon }) }) : null, /* @__PURE__ */ E(o, { children: e.label })]
1106
+ }, e.key));
1107
+ return e === void 0 ? n : /* @__PURE__ */ E(i, {
1108
+ label: e,
1109
+ children: n
1110
+ }, e);
1111
+ })
1112
+ })] }),
1113
+ !k && (Mn > 0 || en !== "" || X) ? /* @__PURE__ */ E(_, {
1114
+ disabled: v,
1115
+ onClick: (e) => un(e),
1116
+ render: (e) => /* @__PURE__ */ E("button", { ...b(e, "part", "clear") }),
1117
+ size: B,
1118
+ tone: "secondary",
1119
+ variant: "ghost",
1120
+ children: I("clear")
1121
+ }) : null,
1122
+ L === "manual" && !k ? /* @__PURE__ */ D("div", {
1123
+ "data-part": "actions",
1124
+ "data-part-actions": "",
1125
+ children: [/* @__PURE__ */ E(_, {
1126
+ disabled: v || !tn,
1127
+ onClick: ln,
1128
+ render: (e) => /* @__PURE__ */ E("button", { ...b(e, "part", "reset") }),
1129
+ size: B,
1130
+ tone: "secondary",
1131
+ variant: "ghost",
1132
+ children: I("reset")
1133
+ }), /* @__PURE__ */ E(_, {
1134
+ disabled: v || x || !tn,
1135
+ onClick: (e) => cn(e),
1136
+ render: (e) => /* @__PURE__ */ E("button", { ...b(e, "part", "apply") }),
1137
+ size: B,
1138
+ children: I("apply")
1139
+ })]
1140
+ }) : null
1141
+ ]
1142
+ }),
1143
+ /* @__PURE__ */ D("div", {
1144
+ "data-part": "end",
1145
+ "data-part-end": "",
1146
+ children: [O && O.length > 0 ? /* @__PURE__ */ E("div", {
1147
+ "data-part": "preset",
1148
+ "data-part-preset": "",
1149
+ children: /* @__PURE__ */ D(be, {
1150
+ clearable: !0,
1151
+ disabled: v || k,
1152
+ items: O.map((e) => ({
1153
+ label: e.label,
1154
+ value: e.key
1155
+ })),
1156
+ onValueChange: (e, t) => pn(e ?? null, t.source),
1157
+ size: B,
1158
+ value: Bt,
1159
+ children: [/* @__PURE__ */ E(Ce, {
1160
+ "aria-label": I("preset"),
1161
+ children: /* @__PURE__ */ E(we, { placeholder: I("presetNone") })
1162
+ }), /* @__PURE__ */ E(xe, { children: O.map((e) => /* @__PURE__ */ E(Se, {
1163
+ value: e.key,
1164
+ children: e.label
1165
+ }, e.key)) })]
1166
+ })
1167
+ }) : null, fe]
1168
+ }),
1169
+ Sn !== null || x ? /* @__PURE__ */ D("p", {
1170
+ "aria-live": "polite",
1171
+ "data-part": "count",
1172
+ "data-part-count": "",
1173
+ ...x ? { "aria-busy": !0 } : {},
1174
+ children: [x ? /* @__PURE__ */ E("span", {
1175
+ "data-ui": "spinner",
1176
+ "data-ui-spinner": "",
1177
+ "data-part": "root",
1178
+ "data-part-root": "",
1179
+ "data-size": "sm",
1180
+ role: "progressbar",
1181
+ "aria-label": I("filters"),
1182
+ children: ne
1183
+ }) : null, Sn]
1184
+ }) : null
1185
+ ]
1186
+ }), /* @__PURE__ */ E(te, {
1187
+ container: lt,
1188
+ onOpenChange: (e, t) => {
1189
+ Qt(e, t.reason, t.source);
1190
+ },
1191
+ open: Ut,
1192
+ side: Mt ? "bottom" : "end",
1193
+ size: Mt ? "content" : "xl",
1194
+ children: /* @__PURE__ */ D(g, { children: [
1195
+ /* @__PURE__ */ D(f, { children: [/* @__PURE__ */ E(p, { children: I("builder") }), /* @__PURE__ */ E(h, {})] }),
1196
+ /* @__PURE__ */ E(ee, { children: /* @__PURE__ */ E("div", {
1197
+ "data-part": "builder",
1198
+ "data-part-builder": "",
1199
+ "data-ui": "filter-bar",
1200
+ "data-ui-filter-bar": "",
1201
+ id: `${bt}builder`,
1202
+ children: /* @__PURE__ */ E(vt, {
1203
+ environment: {
1204
+ ...On,
1205
+ apply: () => Xn(),
1206
+ expanded: Cn,
1207
+ onExpandedChange: wn
1208
+ },
1209
+ extra: /* @__PURE__ */ D(T, { children: [Q.value && Dt(Q.value) > 0 ? /* @__PURE__ */ E(_, {
1210
+ onClick: () => Q.set(on()),
1211
+ render: (e) => /* @__PURE__ */ E("button", { ...b(e, "part", "clear") }),
1212
+ size: "sm",
1213
+ tone: "secondary",
1214
+ variant: "ghost",
1215
+ children: I("clear")
1216
+ }) : null, Le ? /* @__PURE__ */ E(_, {
1217
+ onClick: () => Le(A(Q.value)),
1218
+ render: (e) => /* @__PURE__ */ E("button", { ...b(e, "part", "save-preset") }),
1219
+ size: "sm",
1220
+ tone: "secondary",
1221
+ variant: "ghost",
1222
+ children: I("savePreset")
1223
+ }) : null] }),
1224
+ firstField: y[0],
1225
+ group: Q.value ?? Je(),
1226
+ onRootChange: (e) => Q.set(e),
1227
+ path: [],
1228
+ root: Q.value ?? Je()
1229
+ })
1230
+ }) }),
1231
+ /* @__PURE__ */ D(m, { children: [/* @__PURE__ */ E(_, {
1232
+ onClick: (e) => Qt(!1, "dismiss", e),
1233
+ size: "sm",
1234
+ tone: "secondary",
1235
+ variant: "ghost",
1236
+ children: I("cancel")
1237
+ }), /* @__PURE__ */ E(_, {
1238
+ onClick: () => Xn(),
1239
+ size: "sm",
1240
+ children: I("apply")
1241
+ })] })
1242
+ ] })
1243
+ })]
1244
+ });
1245
+ function Xn() {
1246
+ let e = Q.value, t = sn(e);
1247
+ if (t.length > 0) {
1248
+ let e = t[0];
1249
+ Y(e.key), W(I("required", { field: e.label }));
1250
+ return;
1251
+ }
1252
+ Y(null), J(e, "submit");
1253
+ let n = A(e);
1254
+ W(n ? I("appliedCount", {
1255
+ count: Dt(n),
1256
+ filters: Ke(n, qt)
1257
+ }) : I("cleared")), Qt(!1, "submit");
1258
+ }
1259
+ }
1260
+ function Et(e, t, n) {
1261
+ let [r, i] = w(t), a = C(!1);
1262
+ return S(() => {
1263
+ e && !a.current && (i(n.current ?? t), n.current = null), a.current = e;
1264
+ }, [
1265
+ e,
1266
+ n,
1267
+ t
1268
+ ]), {
1269
+ set: i,
1270
+ value: r
1271
+ };
1272
+ }
1273
+ function Dt(e) {
1274
+ let t = A(e);
1275
+ if (!t) return 0;
1276
+ let n = 0, r = (e) => {
1277
+ Qe(e) ? e.rules.forEach(r) : n += 1;
1278
+ };
1279
+ return r(t), n;
1280
+ }
1281
+ function Ot({ current: e, environment: t, field: n, invalid: r, onChange: i, onDone: a, queryDelay: o, withOperator: s = !0 }) {
1282
+ let c = le(), l = () => c.toggle(!1, "dismiss"), [u, d] = w(e ?? N(n)), f = C(null), p = JSON.stringify(e ?? null);
1283
+ S(() => {
1284
+ !f.current && e && d(e);
1285
+ }, [p]), S(() => () => {
1286
+ f.current && clearTimeout(f.current);
1287
+ }, []);
1288
+ function m(e) {
1289
+ if (d(e), f.current && clearTimeout(f.current), n.kind !== "text" && n.kind !== "number" || o === 0) {
1290
+ i(e);
1291
+ return;
1292
+ }
1293
+ f.current = setTimeout(() => {
1294
+ f.current = null, i(e);
1295
+ }, o);
1296
+ }
1297
+ function h() {
1298
+ f.current && (clearTimeout(f.current), f.current = null, i(u)), a(), l();
1299
+ }
1300
+ let g = u.conditions[0] ?? { operator: n.defaultOperator ?? "contains" };
1301
+ return /* @__PURE__ */ D("div", {
1302
+ "data-kind": n.kind,
1303
+ "data-part": "rule",
1304
+ "data-part-rule": "",
1305
+ "data-ui": "filter-bar",
1306
+ "data-ui-filter-bar": "",
1307
+ ...r ? { "data-invalid": "" } : {},
1308
+ children: [/* @__PURE__ */ E(_t, {
1309
+ condition: g,
1310
+ environment: {
1311
+ ...t,
1312
+ apply: h
1313
+ },
1314
+ field: n,
1315
+ invalid: r,
1316
+ withOperator: s,
1317
+ onConditionChange: (e) => m({
1318
+ ...u,
1319
+ conditions: [e]
1320
+ })
1321
+ }), /* @__PURE__ */ D("div", {
1322
+ "data-part": "actions",
1323
+ "data-part-actions": "",
1324
+ children: [/* @__PURE__ */ E(_, {
1325
+ disabled: n.required === !0,
1326
+ onClick: () => {
1327
+ f.current && clearTimeout(f.current), d(N(n)), i(null), l();
1328
+ },
1329
+ size: "sm",
1330
+ tone: "secondary",
1331
+ variant: "ghost",
1332
+ children: t.t("clearRule")
1333
+ }), /* @__PURE__ */ E(_, {
1334
+ onClick: h,
1335
+ size: "sm",
1336
+ children: t.t("done")
1337
+ })]
1338
+ })]
1339
+ });
1340
+ }
1341
+ //#endregion
1342
+ export { ut as i, H as n, dt as r, z as t };