@ds-mo/ui 14.35.0 → 14.36.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (326) hide show
  1. package/dist/.package-ready.json +1 -1
  2. package/dist/agent-patterns.json +1 -1
  3. package/dist/agent.json +1105 -187
  4. package/dist/angular/ds-button-inverted.d.ts +17 -0
  5. package/dist/angular/ds-button-inverted.js +46 -0
  6. package/dist/angular/ds-calendar.d.ts +15 -0
  7. package/dist/angular/ds-calendar.js +43 -0
  8. package/dist/angular/ds-field.d.ts +1 -1
  9. package/dist/angular/ds-field.js +1 -1
  10. package/dist/angular/ds-input-date.d.ts +15 -0
  11. package/dist/angular/ds-input-date.js +43 -0
  12. package/dist/angular/ds-input-time.d.ts +15 -0
  13. package/dist/angular/ds-input-time.js +43 -0
  14. package/dist/angular/ds-input.d.ts +1 -1
  15. package/dist/angular/ds-input.js +3 -3
  16. package/dist/angular/ds-select.d.ts +1 -1
  17. package/dist/angular/ds-select.js +3 -3
  18. package/dist/angular/ds-time-picker.d.ts +15 -0
  19. package/dist/angular/ds-time-picker.js +43 -0
  20. package/dist/angular/index.d.ts +1 -1
  21. package/dist/angular/index.js +5 -0
  22. package/dist/angular/proxies.d.ts +5 -0
  23. package/dist/angular/proxies.js +5 -0
  24. package/dist/angular/text-value-accessor.d.ts +1 -1
  25. package/dist/angular/text-value-accessor.js +2 -2
  26. package/dist/components/ds-agent-activity.js +1 -1
  27. package/dist/components/ds-agent-questionnaire.js +1 -1
  28. package/dist/components/ds-agent-response.js +1 -1
  29. package/dist/components/ds-agent-source-list.js +1 -1
  30. package/dist/components/ds-agent-tool-call.js +1 -1
  31. package/dist/components/ds-attachment-list.js +1 -1
  32. package/dist/components/ds-badge.js +1 -1
  33. package/dist/components/ds-banner.js +1 -1
  34. package/dist/components/ds-bar-action.js +1 -1
  35. package/dist/components/ds-bar-nav.js +1 -1
  36. package/dist/components/ds-bar-page-title.js +1 -1
  37. package/dist/components/ds-bar-title.js +1 -1
  38. package/dist/components/ds-bar-workflow.js +1 -1
  39. package/dist/components/ds-breadcrumb.js +1 -1
  40. package/dist/components/ds-button-filled.js +1 -1
  41. package/dist/components/ds-button-inverted.d.ts +11 -0
  42. package/dist/components/ds-button-inverted.js +2 -0
  43. package/dist/components/ds-button-inverted.js.map +1 -0
  44. package/dist/components/ds-button-unfilled.js +1 -1
  45. package/dist/components/ds-calendar.d.ts +11 -0
  46. package/dist/components/ds-calendar.js +2 -0
  47. package/dist/components/ds-calendar.js.map +1 -0
  48. package/dist/components/ds-card-action-center.js +1 -1
  49. package/dist/components/ds-card-chart.js +1 -1
  50. package/dist/components/ds-card-navigation.js +1 -1
  51. package/dist/components/ds-card-navigation.js.map +1 -1
  52. package/dist/components/ds-card-overview.js +1 -1
  53. package/dist/components/ds-card-setting.js +1 -1
  54. package/dist/components/ds-card-settings-scope.js +1 -1
  55. package/dist/components/ds-card-settings-scope.js.map +1 -1
  56. package/dist/components/ds-chart-legend.js +1 -1
  57. package/dist/components/ds-chart.js +1 -1
  58. package/dist/components/ds-checkbox.js +1 -1
  59. package/dist/components/ds-chip.js +1 -1
  60. package/dist/components/ds-code-block.js +1 -1
  61. package/dist/components/ds-conversation-list-item.js +1 -1
  62. package/dist/components/ds-conversation-list-item.js.map +1 -1
  63. package/dist/components/ds-conversation-list-section.js +1 -1
  64. package/dist/components/ds-conversation-list.js +1 -1
  65. package/dist/components/ds-divider.js +1 -1
  66. package/dist/components/ds-empty-state.js +1 -1
  67. package/dist/components/ds-field.js +1 -1
  68. package/dist/components/ds-filter-menu.js +1 -1
  69. package/dist/components/ds-input-date.d.ts +11 -0
  70. package/dist/components/ds-input-date.js +2 -0
  71. package/dist/components/ds-input-date.js.map +1 -0
  72. package/dist/components/ds-input-time.d.ts +11 -0
  73. package/dist/components/ds-input-time.js +2 -0
  74. package/dist/components/ds-input-time.js.map +1 -0
  75. package/dist/components/ds-input.js +1 -1
  76. package/dist/components/ds-markdown.js +1 -1
  77. package/dist/components/ds-menu.js +1 -1
  78. package/dist/components/ds-message-actions.js +1 -1
  79. package/dist/components/ds-message-bubble.js +1 -1
  80. package/dist/components/ds-message-bubble.js.map +1 -1
  81. package/dist/components/ds-message-composer.js +1 -1
  82. package/dist/components/ds-message-scroller.js +1 -1
  83. package/dist/components/ds-message.js +1 -1
  84. package/dist/components/ds-mobile-bar-nav.js +1 -1
  85. package/dist/components/ds-mobile-header.js +1 -1
  86. package/dist/components/ds-mobile-section-switcher.js +1 -1
  87. package/dist/components/ds-mobile-sheet-nav.js +1 -1
  88. package/dist/components/ds-modal.js +1 -1
  89. package/dist/components/ds-pagination.js +1 -1
  90. package/dist/components/ds-panel-nav.js +1 -1
  91. package/dist/components/ds-panel-sub-nav.js +1 -1
  92. package/dist/components/ds-panel-tool-header.js +1 -1
  93. package/dist/components/ds-panel-tool-search.js +1 -1
  94. package/dist/components/ds-panel-tools.js +1 -1
  95. package/dist/components/ds-paper-texture.js +1 -1
  96. package/dist/components/ds-radio.js +1 -1
  97. package/dist/components/ds-score.js +1 -1
  98. package/dist/components/ds-scroll-overlay.js +1 -1
  99. package/dist/components/ds-select.js +1 -1
  100. package/dist/components/ds-shell-app.js +1 -1
  101. package/dist/components/ds-shell-page.js +1 -1
  102. package/dist/components/ds-shell-tools.js +1 -1
  103. package/dist/components/ds-skeleton.js +1 -1
  104. package/dist/components/ds-slider.js +1 -1
  105. package/dist/components/ds-slider.js.map +1 -1
  106. package/dist/components/ds-swatch-picker.js +1 -1
  107. package/dist/components/ds-switch.js +1 -1
  108. package/dist/components/ds-tab-group.js +1 -1
  109. package/dist/components/ds-table-filter.js +1 -1
  110. package/dist/components/ds-table-filter.js.map +1 -1
  111. package/dist/components/ds-table-group.js +1 -1
  112. package/dist/components/ds-table-preferences.js +1 -1
  113. package/dist/components/ds-table-preferences.js.map +1 -1
  114. package/dist/components/ds-table-saved-views.js +1 -1
  115. package/dist/components/ds-table-saved-views.js.map +1 -1
  116. package/dist/components/ds-table-search.js +1 -1
  117. package/dist/components/ds-table-search.js.map +1 -1
  118. package/dist/components/ds-table-sort.js +1 -1
  119. package/dist/components/ds-table-sort.js.map +1 -1
  120. package/dist/components/ds-table-toolbar.js +1 -1
  121. package/dist/components/ds-table.js +1 -1
  122. package/dist/components/ds-tag.js +1 -1
  123. package/dist/components/ds-text.js +1 -1
  124. package/dist/components/ds-textarea.js +1 -1
  125. package/dist/components/ds-textarea.js.map +1 -1
  126. package/dist/components/ds-time-picker.d.ts +11 -0
  127. package/dist/components/ds-time-picker.js +2 -0
  128. package/dist/components/ds-time-picker.js.map +1 -0
  129. package/dist/components/ds-toast.js +1 -1
  130. package/dist/components/ds-tooltip-chart.js +1 -1
  131. package/dist/components/ds-tooltip.js +1 -1
  132. package/dist/components/ds-typing-indicator.js +1 -1
  133. package/dist/components/{p-CI7VfYC3.js → p-2GVGhrh0.js} +2 -2
  134. package/dist/components/p-7O-2D29W.js +2 -0
  135. package/dist/components/p-7O-2D29W.js.map +1 -0
  136. package/dist/components/{p-CE540WZ7.js → p-8oRkhvjy.js} +2 -2
  137. package/dist/components/p-B27_chI7.js +2 -0
  138. package/dist/components/p-B27_chI7.js.map +1 -0
  139. package/dist/components/{p-xHGqrz_p.js → p-BOhpMUwO.js} +2 -2
  140. package/dist/components/{p-DdspY23v.js → p-BV5T1hzN.js} +2 -2
  141. package/dist/components/{p-DTDLlinw.js → p-BWfzaSc3.js} +2 -2
  142. package/dist/components/{p-CLGtPE0K.js → p-BgLI9JoT.js} +2 -2
  143. package/dist/components/{p-DGzn4k4h.js → p-C-dHtQMi.js} +2 -2
  144. package/dist/components/p-C0CE2v5D.js +2 -0
  145. package/dist/components/{p-yZRXPHDe.js → p-C2JnoaWI.js} +2 -2
  146. package/dist/components/{p-umAf0fBn.js → p-C4m8y9ki.js} +2 -2
  147. package/dist/components/{p-CAxDdYjh.js → p-CDJ2Ntcq.js} +2 -2
  148. package/dist/components/{p-DQQFN2sw.js → p-CMQUuGvl.js} +2 -2
  149. package/dist/components/{p-BQaO7cg_.js → p-CQ5RwY2C.js} +2 -2
  150. package/dist/components/p-CQIh2yRP.js +2 -0
  151. package/dist/components/{p-C1_3CVma.js.map → p-CQIh2yRP.js.map} +1 -1
  152. package/dist/components/{p-DEGNrPLe.js → p-CWPT3aOB.js} +2 -2
  153. package/dist/components/p-CWog26I_.js +2 -0
  154. package/dist/components/p-CWog26I_.js.map +1 -0
  155. package/dist/components/{p-beRFLHbB.js → p-CaNCGKEJ.js} +2 -2
  156. package/dist/components/p-CbSUyv5B.js +2 -0
  157. package/dist/components/{p-BINSI_KF.js.map → p-CbSUyv5B.js.map} +1 -1
  158. package/dist/components/{p-Dhw_W8nk.js → p-Cc3ZUQlJ.js} +2 -2
  159. package/dist/components/p-Cc3ZUQlJ.js.map +1 -0
  160. package/dist/components/{p-DFjIBS5B.js → p-Ce4zy8q1.js} +2 -2
  161. package/dist/components/{p-BcdHgPi5.js → p-CeXf9-X3.js} +2 -2
  162. package/dist/components/{p-omPm8_vx.js → p-Cga6Ex0E.js} +2 -2
  163. package/dist/components/{p-y06IxxoN.js → p-Cl9phSf0.js} +2 -2
  164. package/dist/components/{p-Dk-8Ju0Q.js → p-ClJhuG5Y.js} +2 -2
  165. package/dist/components/{p-BmFeeR4q.js → p-CqW2eyiF.js} +2 -2
  166. package/dist/components/p-Cus1Sigh.js +2 -0
  167. package/dist/components/{p-N5SHSVo2.js.map → p-Cus1Sigh.js.map} +1 -1
  168. package/dist/components/{p-CzbsTZt7.js → p-Cxr0IQjC.js} +2 -2
  169. package/dist/components/{p-CwqFJMvP.js → p-D7yBIPB6.js} +2 -2
  170. package/dist/components/p-D8rpKod8.js +2 -0
  171. package/dist/components/p-D8rpKod8.js.map +1 -0
  172. package/dist/components/{p-DtLQIMsa.js → p-DBwa1OXP.js} +2 -2
  173. package/dist/components/{p-BQsVI_vO.js → p-DK9Ex3aY.js} +2 -2
  174. package/dist/components/{p-CqlBlv55.js → p-DLXXGgmf.js} +2 -2
  175. package/dist/components/{p-BnzsBNUY.js → p-DVd1TIxi.js} +2 -2
  176. package/dist/components/p-DZ58Sg5a.js.map +1 -1
  177. package/dist/components/{p-CZOiTaNa.js → p-DgG9W9N4.js} +2 -2
  178. package/dist/components/{p-mpk_Mm8_.js → p-DkfM55x8.js} +2 -2
  179. package/dist/components/p-DkikNSSO.js +2 -0
  180. package/dist/components/p-DkikNSSO.js.map +1 -0
  181. package/dist/components/{p-C7CZ9pnP.js → p-Dryt3COt.js} +2 -2
  182. package/dist/components/{p-eo_pmPqp.js → p-Ds51RgCi.js} +2 -2
  183. package/dist/components/p-DtkLtKY0.js +2 -0
  184. package/dist/components/p-DtkLtKY0.js.map +1 -0
  185. package/dist/components/{p-C8ek-1SP.js → p-DvzI2A_M.js} +2 -2
  186. package/dist/components/p-J5x-QtlD.js +2 -0
  187. package/dist/components/{p-beCz9OnD.js.map → p-J5x-QtlD.js.map} +1 -1
  188. package/dist/components/{p-CSnsz3Eb.js → p-Jaqdfw4E.js} +2 -2
  189. package/dist/components/p-MQ36mEgn.js +2 -0
  190. package/dist/components/{p-UAIxh67Q.js.map → p-MQ36mEgn.js.map} +1 -1
  191. package/dist/components/{p-BnWxbhFP.js → p-PmcUwTQ_.js} +2 -2
  192. package/dist/components/p-TjXGRPik.js +2 -0
  193. package/dist/components/{p-B-9fdIWv.js.map → p-TjXGRPik.js.map} +1 -1
  194. package/dist/components/{p-Cq_Qpe_C.js → p-bM3LH3kc.js} +2 -2
  195. package/dist/components/{p-BPhbwXOv.js → p-ji09W9el.js} +2 -2
  196. package/dist/components/{p-n68x-ZKp.js → p-neWTRxmf.js} +2 -2
  197. package/dist/components/{p-BPlWEidl.js → p-rYePOPbJ.js} +2 -2
  198. package/dist/components/{p-D44g2Kw1.js → p-su6y4hLK.js} +2 -2
  199. package/dist/components/p-su6y4hLK.js.map +1 -0
  200. package/dist/components/{p-DC69DgAR.js → p-tNQ0YulU.js} +2 -2
  201. package/dist/components/{p-Cwz9TPVS.js → p-x1wf38q3.js} +2 -2
  202. package/dist/docs/components.json +6485 -3451
  203. package/dist/lib/utils/button-render.d.ts +1 -1
  204. package/dist/lib/utils/clock-time.d.ts +22 -0
  205. package/dist/lib/utils/date-filter-value.d.ts +4 -0
  206. package/dist/lib/utils/index.d.ts +3 -1
  207. package/dist/lib/utils/index.js +133 -0
  208. package/dist/lib/utils/index.js.map +4 -4
  209. package/dist/mcp-data/registry/bar-title.json +2 -2
  210. package/dist/mcp-data/registry/button-inverted.json +580 -0
  211. package/dist/mcp-data/registry/calendar.json +273 -0
  212. package/dist/mcp-data/registry/card-navigation.json +4 -2
  213. package/dist/mcp-data/registry/field.json +19 -14
  214. package/dist/mcp-data/registry/filter-menu.json +6 -10
  215. package/dist/mcp-data/registry/input-date.json +516 -0
  216. package/dist/mcp-data/registry/input-time.json +535 -0
  217. package/dist/mcp-data/registry/input.json +56 -8
  218. package/dist/mcp-data/registry/registry.json +1118 -185
  219. package/dist/mcp-data/registry/select.json +63 -7
  220. package/dist/mcp-data/registry/table-saved-views.json +6 -4
  221. package/dist/mcp-data/registry/textarea.json +2 -2
  222. package/dist/mcp-data/registry/time-picker.json +259 -0
  223. package/dist/react/components.d.ts +5 -0
  224. package/dist/react/components.js +5 -0
  225. package/dist/react/ds-button-inverted.d.ts +13 -0
  226. package/dist/react/ds-button-inverted.js +15 -0
  227. package/dist/react/ds-calendar.d.ts +12 -0
  228. package/dist/react/ds-calendar.js +12 -0
  229. package/dist/react/ds-field.d.ts +1 -1
  230. package/dist/react/ds-input-date.d.ts +12 -0
  231. package/dist/react/ds-input-date.js +12 -0
  232. package/dist/react/ds-input-time.d.ts +12 -0
  233. package/dist/react/ds-input-time.js +12 -0
  234. package/dist/react/ds-time-picker.d.ts +12 -0
  235. package/dist/react/ds-time-picker.js +12 -0
  236. package/dist/types/components/BarTitle/BarTitle.d.ts +1 -0
  237. package/dist/types/components/BarTitle/bar-title-action-chrome.d.ts +2 -0
  238. package/dist/types/components/ButtonInverted/ButtonInverted.d.ts +83 -0
  239. package/dist/types/components/ButtonInverted/index.d.ts +2 -0
  240. package/dist/types/components/Calendar/Calendar.d.ts +32 -0
  241. package/dist/types/components/Calendar/calendar-grid.d.ts +19 -0
  242. package/dist/types/components/Field/Field.d.ts +7 -2
  243. package/dist/types/components/FilterMenu/FilterMenu.d.ts +0 -10
  244. package/dist/types/components/Input/Input.d.ts +10 -0
  245. package/dist/types/components/InputDate/InputDate.d.ts +78 -0
  246. package/dist/types/components/InputTime/InputTime.d.ts +80 -0
  247. package/dist/types/components/Select/Select.d.ts +8 -1
  248. package/dist/types/components/TimePicker/TimePicker.d.ts +33 -0
  249. package/dist/types/components.d.ts +858 -27
  250. package/dist/types/utils/button-render.d.ts +1 -1
  251. package/dist/types/utils/clock-time.d.ts +23 -0
  252. package/dist/types/utils/date-filter-value.d.ts +4 -0
  253. package/dist/types/utils/index.d.ts +3 -1
  254. package/dist/vue/components.d.ts +5 -0
  255. package/dist/vue/components.js +5 -0
  256. package/dist/vue/ds-button-inverted.d.ts +3 -0
  257. package/dist/vue/ds-button-inverted.js +33 -0
  258. package/dist/vue/ds-calendar.d.ts +3 -0
  259. package/dist/vue/ds-calendar.js +16 -0
  260. package/dist/vue/ds-input-date.d.ts +3 -0
  261. package/dist/vue/ds-input-date.js +31 -0
  262. package/dist/vue/ds-input-time.d.ts +3 -0
  263. package/dist/vue/ds-input-time.js +32 -0
  264. package/dist/vue/ds-input.js +2 -0
  265. package/dist/vue/ds-select.js +3 -0
  266. package/dist/vue/ds-time-picker.d.ts +3 -0
  267. package/dist/vue/ds-time-picker.js +16 -0
  268. package/package.json +1 -1
  269. package/dist/components/p-B-9fdIWv.js +0 -2
  270. package/dist/components/p-BINSI_KF.js +0 -2
  271. package/dist/components/p-BbfBvMRR.js +0 -2
  272. package/dist/components/p-BbfBvMRR.js.map +0 -1
  273. package/dist/components/p-C1_3CVma.js +0 -2
  274. package/dist/components/p-Cmj04E5Q.js +0 -2
  275. package/dist/components/p-Cmj04E5Q.js.map +0 -1
  276. package/dist/components/p-D44g2Kw1.js.map +0 -1
  277. package/dist/components/p-D_u8WhlU.js +0 -2
  278. package/dist/components/p-Dhw_W8nk.js.map +0 -1
  279. package/dist/components/p-FPZbS19l.js +0 -2
  280. package/dist/components/p-FPZbS19l.js.map +0 -1
  281. package/dist/components/p-N5SHSVo2.js +0 -2
  282. package/dist/components/p-QjkufCcn.js +0 -2
  283. package/dist/components/p-QjkufCcn.js.map +0 -1
  284. package/dist/components/p-UAIxh67Q.js +0 -2
  285. package/dist/components/p-beCz9OnD.js +0 -2
  286. package/dist/types/components/FilterMenu/filter-menu-calendar.d.ts +0 -13
  287. /package/dist/components/{p-CI7VfYC3.js.map → p-2GVGhrh0.js.map} +0 -0
  288. /package/dist/components/{p-CE540WZ7.js.map → p-8oRkhvjy.js.map} +0 -0
  289. /package/dist/components/{p-xHGqrz_p.js.map → p-BOhpMUwO.js.map} +0 -0
  290. /package/dist/components/{p-DdspY23v.js.map → p-BV5T1hzN.js.map} +0 -0
  291. /package/dist/components/{p-DTDLlinw.js.map → p-BWfzaSc3.js.map} +0 -0
  292. /package/dist/components/{p-CLGtPE0K.js.map → p-BgLI9JoT.js.map} +0 -0
  293. /package/dist/components/{p-DGzn4k4h.js.map → p-C-dHtQMi.js.map} +0 -0
  294. /package/dist/components/{p-D_u8WhlU.js.map → p-C0CE2v5D.js.map} +0 -0
  295. /package/dist/components/{p-yZRXPHDe.js.map → p-C2JnoaWI.js.map} +0 -0
  296. /package/dist/components/{p-umAf0fBn.js.map → p-C4m8y9ki.js.map} +0 -0
  297. /package/dist/components/{p-CAxDdYjh.js.map → p-CDJ2Ntcq.js.map} +0 -0
  298. /package/dist/components/{p-DQQFN2sw.js.map → p-CMQUuGvl.js.map} +0 -0
  299. /package/dist/components/{p-BQaO7cg_.js.map → p-CQ5RwY2C.js.map} +0 -0
  300. /package/dist/components/{p-DEGNrPLe.js.map → p-CWPT3aOB.js.map} +0 -0
  301. /package/dist/components/{p-beRFLHbB.js.map → p-CaNCGKEJ.js.map} +0 -0
  302. /package/dist/components/{p-DFjIBS5B.js.map → p-Ce4zy8q1.js.map} +0 -0
  303. /package/dist/components/{p-BcdHgPi5.js.map → p-CeXf9-X3.js.map} +0 -0
  304. /package/dist/components/{p-omPm8_vx.js.map → p-Cga6Ex0E.js.map} +0 -0
  305. /package/dist/components/{p-y06IxxoN.js.map → p-Cl9phSf0.js.map} +0 -0
  306. /package/dist/components/{p-Dk-8Ju0Q.js.map → p-ClJhuG5Y.js.map} +0 -0
  307. /package/dist/components/{p-BmFeeR4q.js.map → p-CqW2eyiF.js.map} +0 -0
  308. /package/dist/components/{p-CzbsTZt7.js.map → p-Cxr0IQjC.js.map} +0 -0
  309. /package/dist/components/{p-CwqFJMvP.js.map → p-D7yBIPB6.js.map} +0 -0
  310. /package/dist/components/{p-DtLQIMsa.js.map → p-DBwa1OXP.js.map} +0 -0
  311. /package/dist/components/{p-BQsVI_vO.js.map → p-DK9Ex3aY.js.map} +0 -0
  312. /package/dist/components/{p-CqlBlv55.js.map → p-DLXXGgmf.js.map} +0 -0
  313. /package/dist/components/{p-BnzsBNUY.js.map → p-DVd1TIxi.js.map} +0 -0
  314. /package/dist/components/{p-CZOiTaNa.js.map → p-DgG9W9N4.js.map} +0 -0
  315. /package/dist/components/{p-mpk_Mm8_.js.map → p-DkfM55x8.js.map} +0 -0
  316. /package/dist/components/{p-C7CZ9pnP.js.map → p-Dryt3COt.js.map} +0 -0
  317. /package/dist/components/{p-eo_pmPqp.js.map → p-Ds51RgCi.js.map} +0 -0
  318. /package/dist/components/{p-C8ek-1SP.js.map → p-DvzI2A_M.js.map} +0 -0
  319. /package/dist/components/{p-CSnsz3Eb.js.map → p-Jaqdfw4E.js.map} +0 -0
  320. /package/dist/components/{p-BnWxbhFP.js.map → p-PmcUwTQ_.js.map} +0 -0
  321. /package/dist/components/{p-Cq_Qpe_C.js.map → p-bM3LH3kc.js.map} +0 -0
  322. /package/dist/components/{p-BPhbwXOv.js.map → p-ji09W9el.js.map} +0 -0
  323. /package/dist/components/{p-n68x-ZKp.js.map → p-neWTRxmf.js.map} +0 -0
  324. /package/dist/components/{p-BPlWEidl.js.map → p-rYePOPbJ.js.map} +0 -0
  325. /package/dist/components/{p-DC69DgAR.js.map → p-tNQ0YulU.js.map} +0 -0
  326. /package/dist/components/{p-Cwz9TPVS.js.map → p-x1wf38q3.js.map} +0 -0
@@ -38,14 +38,15 @@
38
38
  "commonlyComposedWith": [
39
39
  "component:ds-select",
40
40
  "component:ds-table",
41
- "component:ds-checkbox"
41
+ "component:ds-checkbox",
42
+ "component:ds-calendar"
42
43
  ],
43
44
  "accessibility": [
44
45
  "The built-in select trigger exposes combobox semantics with a dialog popup, synchronizes expanded state, holds the pressed interaction wash without changing resting foreground while open, and restores focus after dismissal.",
45
46
  "The category pane is a vertical tab list. Arrow Up and Arrow Down wrap, Home and End jump, Arrow Right enters the option pane, and Arrow Left returns to the active category.",
46
47
  "Every non-date category begins with a labelled search field. Arrow Down and Arrow Up enter the first or last visible option, while Left and Right retain native text-caret behavior. Search matches option labels and descriptions without changing selected values.",
47
48
  "Escape and outside activation close the popup and restore trigger focus. Tab moves through option controls and closes only when it leaves the popup boundary.",
48
- "Date filters expose containerless Range and Relative tabs in a secondary-background header with 4px padding around the 32px medium control. Relative presets use listbox semantics; the range calendar exposes a labelled grid, one tab stop, arrow-key day navigation, Home and End week navigation, and Page Up or Page Down month navigation. After a range start is chosen, pointer hover and keyboard focus preview the possible inclusive range without changing selection semantics.",
49
+ "Date filters expose containerless Range and Relative tabs in a secondary-background header with 4px padding around the 32px medium control. Relative presets use listbox semantics. Range selection hosts Calendar, which owns the labelled month grid, one tab stop, arrow-key day navigation, Home and End week navigation, and Page Up or Page Down month navigation. After a range start is chosen, pointer hover and keyboard focus preview the possible inclusive range without changing selection semantics.",
49
50
  "When an external trigger is inside an open shadow tree, pass its HTMLElement through anchor so outside activation, focus return, and Tab continuation use the composed tree.",
50
51
  "The trigger count reports active filter categories. Multiple-choice category tags report individual selected criteria, while an applied Date category uses a visual dot because its value is singular. The default summary footer announces the total; the categories-clear footer recipe reserves a visually empty category-pane action row and exposes its divider and only Clear when criteria are active."
51
52
  ],
@@ -865,7 +866,7 @@
865
866
  ],
866
867
  "registryDependencies": [
867
868
  "badge",
868
- "button-unfilled",
869
+ "calendar",
869
870
  "checkbox",
870
871
  "empty-state",
871
872
  "icon",
@@ -878,17 +879,12 @@
878
879
  "files": [
879
880
  {
880
881
  "path": "src/wc/components/FilterMenu/FilterMenu.css",
881
- "content": "@import '../../utils/radius.css';\n@import '../../utils/choice-list.css';\n@import '../../utils/chrome-header.css';\n@import '../../utils/control-parts.css';\n@import '../../utils/control-width.css';\n@import '../../utils/select-trigger.css';\n@import '../../utils/search-control.css';\n@import '../../utils/table-caption-control.css';\n\n:host(.filter-menu-host--external-trigger) {\n display: contents;\n}\n\n.filter-menu {\n display: flex;\n min-height: 0;\n flex-direction: column;\n color: var(--color-foreground-secondary);\n}\n\n.filter-menu__body {\n display: grid;\n grid-template-columns: var(--dimension-menu-width-xs) var(--dimension-menu-width-sm);\n min-height: calc(var(--dimension-size-800) * 4 + var(--dimension-space-150));\n max-height: calc(100vh - var(--dimension-size-800) - var(--dimension-size-600));\n}\n\n.filter-menu__category-pane {\n display: flex;\n min-width: 0;\n min-height: 0;\n flex-direction: column;\n border-inline-end: var(--dimension-stroke-width-012) solid var(--color-border-tertiary);\n}\n\n.filter-menu__categories {\n flex: 1 1 auto;\n min-width: 0;\n}\n\n.filter-menu__category-section {\n display: flex;\n min-width: 0;\n flex-direction: column;\n}\n\n.filter-menu__category-section.ds-choice-section--divided {\n padding-block-end: var(--dimension-space-050);\n}\n\n.filter-menu__category {\n justify-content: space-between;\n width: 100%;\n border: 0;\n background: transparent;\n color: var(--color-foreground-secondary);\n cursor: default;\n text-align: start;\n}\n\n.filter-menu__category--active {\n color: var(--color-foreground-primary);\n}\n\n.filter-menu__category-dot-box {\n display: flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n width: var(--ds-control-icon, var(--dimension-iconography-md));\n height: var(--ds-control-icon, var(--dimension-iconography-md));\n pointer-events: none;\n}\n\n.filter-menu__options {\n display: flex;\n min-width: 0;\n min-height: 0;\n flex-direction: column;\n overflow: hidden;\n}\n\n.filter-menu__options-content {\n display: flex;\n min-width: 0;\n min-height: 0;\n flex: 1 1 auto;\n flex-direction: column;\n overflow: auto;\n}\n\n.filter-menu__option-search {\n position: relative;\n flex: 0 0 var(--dimension-size-500);\n min-width: 0;\n min-height: var(--dimension-size-500);\n background: transparent;\n}\n\n.filter-menu__option-search::after {\n content: '';\n position: absolute;\n inset: auto 0 0;\n height: var(--dimension-stroke-width-012);\n background-color: var(--color-border-tertiary);\n pointer-events: none;\n}\n\n.filter-menu__option-search .select-search {\n height: 100%;\n background: transparent;\n}\n\n.filter-menu__options--date,\n.filter-menu__option-list--date,\n.filter-menu__date {\n display: flex;\n min-width: 0;\n min-height: 0;\n flex-direction: column;\n}\n\n.filter-menu__option-list--date,\n.filter-menu__date {\n flex: 1 1 auto;\n}\n\n.filter-menu__date-header {\n flex: 0 0 var(--dimension-size-500);\n justify-content: center;\n min-block-size: var(--dimension-size-500);\n padding: var(--dimension-space-050);\n background: var(--color-background-secondary);\n}\n\n.filter-menu__date-body {\n display: flex;\n flex: 1 1 auto;\n min-height: 0;\n flex-direction: column;\n}\n\n.filter-menu__date-relative {\n flex: 1 1 auto;\n}\n\n.filter-menu__calendar {\n display: flex;\n min-height: 0;\n flex-direction: column;\n padding: var(--dimension-space-100);\n}\n\n.filter-menu__calendar-heading {\n display: grid;\n grid-template-columns: var(--dimension-size-400) minmax(0, 1fr) var(--dimension-size-400);\n align-items: center;\n text-align: center;\n}\n\n.filter-menu__calendar-nav--previous {\n justify-self: start;\n}\n\n.filter-menu__calendar-nav--next {\n justify-self: end;\n}\n\n.filter-menu__calendar-weekdays,\n.filter-menu__calendar-grid {\n display: grid;\n grid-template-columns: repeat(7, minmax(0, 1fr));\n column-gap: var(--dimension-space-050);\n}\n\n.filter-menu__calendar-grid {\n row-gap: var(--dimension-space-050);\n}\n\n.filter-menu__calendar-weekdays {\n align-items: center;\n min-height: var(--dimension-size-400);\n margin-block-start: var(--dimension-space-050);\n color: var(--color-foreground-secondary);\n text-align: center;\n}\n\n.filter-menu__calendar-day {\n appearance: none;\n position: relative;\n display: flex;\n align-items: center;\n justify-content: center;\n min-width: 0;\n width: 100%;\n height: var(--dimension-size-400);\n padding: 0;\n border: 0;\n border-radius: var(--dimension-radius-025);\n background: transparent;\n color: var(--color-foreground-primary);\n cursor: default;\n}\n\n.filter-menu__calendar-day--outside {\n color: var(--color-foreground-tertiary);\n}\n\n.filter-menu__calendar-day--in-range {\n background: var(--color-background-faint-brand);\n color: var(--color-foreground-primary);\n}\n\n/* Pending range preview stays faint while the already-selected start keeps its bold edge. */\n.filter-menu__calendar-day--range-preview {\n background: var(--color-background-faint-brand);\n}\n\n.filter-menu__calendar-day--today {\n color: var(--color-foreground-primary);\n}\n\n.filter-menu__calendar-day--range-edge {\n background: var(--color-background-bold-brand);\n color: var(--color-foreground-on-bold-background-primary);\n}\n\n.filter-menu__footer {\n flex: 0 0 auto;\n}\n\n.filter-menu__footer--categories-clear .ds-choice-footer__content {\n justify-content: flex-start;\n}\n\n.filter-menu__footer--categories-clear[aria-hidden='true']::before {\n visibility: hidden;\n}\n\n.ds-choice-footer__content:has(.filter-menu__apply) {\n column-gap: var(--dimension-space-100);\n}\n\n.filter-menu__apply ds-text {\n padding-right: 0;\n}\n\n.filter-menu__action-separator + .filter-menu__clear ds-text {\n padding-left: 0;\n}\n\n.filter-menu__apply {\n color: var(--color-foreground-bold-brand);\n}\n\n.filter-menu__apply:disabled {\n color: var(--color-foreground-tertiary);\n text-decoration-line: none;\n}\n\n.filter-menu__clear {\n --ds-text-action-foreground: var(--color-foreground-bold-negative);\n\n color: var(--ds-text-action-foreground);\n}\n\n.filter-menu__match-mode-footer {\n flex: 0 0 auto;\n}\n\n.filter-menu__match-mode-content {\n justify-content: flex-start;\n padding-inline: calc(\n var(--dimension-space-050) + var(--ds-control-padding-inline, var(--dimension-space-075)) +\n var(--ds-control-label-inset, var(--dimension-space-025))\n );\n}\n\n.filter-menu__match-mode-toggle {\n appearance: none;\n display: inline-flex;\n align-items: center;\n padding: 0;\n border: 0;\n border-radius: var(--dimension-radius-025);\n background: transparent;\n cursor: default;\n}\n\n@media (forced-colors: active) {\n .filter-menu__category-pane {\n border-inline-end-color: var(--ds-forced-color-content);\n }\n\n .filter-menu__calendar-day--range-edge {\n outline: var(--dimension-stroke-width-012) solid var(--ds-forced-color-content);\n }\n}\n\n.table-preferences-embedded {\n display: flex;\n flex-direction: column;\n min-width: 0;\n min-height: 0;\n color: var(--color-foreground-secondary);\n}\n\n.table-preferences-embedded .filter-menu__body {\n grid-template-columns: min(var(--dimension-menu-width-xs), 40%) minmax(0, 1fr);\n}\n\n.filter-menu-vertical__section {\n border-bottom: var(--dimension-stroke-width-012) solid var(--color-border-tertiary);\n}\n.filter-menu-vertical__section > summary {\n cursor: default;\n padding: var(--dimension-space-200);\n}\n.filter-menu-vertical__section > summary ds-text {\n display: inline;\n}\n\n.filter-menu-vertical__section > summary {\n display: flex;\n align-items: center;\n gap: var(--dimension-space-100);\n list-style: none;\n}\n.filter-menu-vertical__section > summary::-webkit-details-marker {\n display: none;\n}\n.filter-menu-vertical__section:not([open]) .filter-menu-vertical__chevron {\n transform: rotate(-90deg);\n}\n",
882
+ "content": "@import '../../utils/radius.css';\n@import '../../utils/choice-list.css';\n@import '../../utils/chrome-header.css';\n@import '../../utils/control-parts.css';\n@import '../../utils/control-width.css';\n@import '../../utils/select-trigger.css';\n@import '../../utils/search-control.css';\n@import '../../utils/table-caption-control.css';\n\n:host(.filter-menu-host--external-trigger) {\n display: contents;\n}\n\n.filter-menu {\n display: flex;\n min-height: 0;\n flex-direction: column;\n color: var(--color-foreground-secondary);\n}\n\n.filter-menu__body {\n display: grid;\n grid-template-columns: var(--dimension-menu-width-xs) var(--dimension-menu-width-sm);\n min-height: calc(var(--dimension-size-800) * 4 + var(--dimension-space-150));\n max-height: calc(100vh - var(--dimension-size-800) - var(--dimension-size-600));\n}\n\n.filter-menu__category-pane {\n display: flex;\n min-width: 0;\n min-height: 0;\n flex-direction: column;\n border-inline-end: var(--dimension-stroke-width-012) solid var(--color-border-tertiary);\n}\n\n.filter-menu__categories {\n flex: 1 1 auto;\n min-width: 0;\n}\n\n.filter-menu__category-section {\n display: flex;\n min-width: 0;\n flex-direction: column;\n}\n\n.filter-menu__category-section.ds-choice-section--divided {\n padding-block-end: var(--dimension-space-050);\n}\n\n.filter-menu__category {\n justify-content: space-between;\n width: 100%;\n border: 0;\n background: transparent;\n color: var(--color-foreground-secondary);\n cursor: default;\n text-align: start;\n}\n\n.filter-menu__category--active {\n color: var(--color-foreground-primary);\n}\n\n.filter-menu__category-dot-box {\n display: flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n width: var(--ds-control-icon, var(--dimension-iconography-md));\n height: var(--ds-control-icon, var(--dimension-iconography-md));\n pointer-events: none;\n}\n\n.filter-menu__options {\n display: flex;\n min-width: 0;\n min-height: 0;\n flex-direction: column;\n overflow: hidden;\n}\n\n.filter-menu__options-content {\n display: flex;\n min-width: 0;\n min-height: 0;\n flex: 1 1 auto;\n flex-direction: column;\n overflow: auto;\n}\n\n.filter-menu__option-search {\n position: relative;\n flex: 0 0 var(--dimension-size-500);\n min-width: 0;\n min-height: var(--dimension-size-500);\n background: transparent;\n}\n\n.filter-menu__option-search::after {\n content: '';\n position: absolute;\n inset: auto 0 0;\n height: var(--dimension-stroke-width-012);\n background-color: var(--color-border-tertiary);\n pointer-events: none;\n}\n\n.filter-menu__option-search .select-search {\n height: 100%;\n background: transparent;\n}\n\n.filter-menu__options--date,\n.filter-menu__option-list--date,\n.filter-menu__date {\n display: flex;\n min-width: 0;\n min-height: 0;\n flex-direction: column;\n}\n\n.filter-menu__option-list--date,\n.filter-menu__date {\n flex: 1 1 auto;\n}\n\n.filter-menu__date-header {\n flex: 0 0 var(--dimension-size-500);\n justify-content: center;\n min-block-size: var(--dimension-size-500);\n padding: var(--dimension-space-050);\n background: var(--color-background-secondary);\n}\n\n.filter-menu__date-body {\n display: flex;\n flex: 1 1 auto;\n min-height: 0;\n flex-direction: column;\n}\n\n.filter-menu__date-relative {\n flex: 1 1 auto;\n}\n\n.filter-menu__date-body > ds-calendar {\n flex: 1 1 auto;\n min-width: 0;\n min-height: 0;\n}\n\n.filter-menu__footer {\n flex: 0 0 auto;\n}\n\n.filter-menu__footer--categories-clear .ds-choice-footer__content {\n justify-content: flex-start;\n}\n\n.filter-menu__footer--categories-clear[aria-hidden='true']::before {\n visibility: hidden;\n}\n\n.ds-choice-footer__content:has(.filter-menu__apply) {\n column-gap: var(--dimension-space-100);\n}\n\n.filter-menu__apply ds-text {\n padding-right: 0;\n}\n\n.filter-menu__action-separator + .filter-menu__clear ds-text {\n padding-left: 0;\n}\n\n.filter-menu__apply {\n color: var(--color-foreground-bold-brand);\n}\n\n.filter-menu__apply:disabled {\n color: var(--color-foreground-tertiary);\n text-decoration-line: none;\n}\n\n.filter-menu__clear {\n --ds-text-action-foreground: var(--color-foreground-bold-negative);\n\n color: var(--ds-text-action-foreground);\n}\n\n.filter-menu__match-mode-footer {\n flex: 0 0 auto;\n}\n\n.filter-menu__match-mode-content {\n justify-content: flex-start;\n padding-inline: calc(\n var(--dimension-space-050) + var(--ds-control-padding-inline, var(--dimension-space-075)) +\n var(--ds-control-label-inset, var(--dimension-space-025))\n );\n}\n\n.filter-menu__match-mode-toggle {\n appearance: none;\n display: inline-flex;\n align-items: center;\n padding: 0;\n border: 0;\n border-radius: var(--dimension-radius-025);\n background: transparent;\n cursor: default;\n}\n\n@media (forced-colors: active) {\n .filter-menu__category-pane {\n border-inline-end-color: var(--ds-forced-color-content);\n }\n}\n\n.table-preferences-embedded {\n display: flex;\n flex-direction: column;\n min-width: 0;\n min-height: 0;\n color: var(--color-foreground-secondary);\n}\n\n.table-preferences-embedded .filter-menu__body {\n grid-template-columns: min(var(--dimension-menu-width-xs), 40%) minmax(0, 1fr);\n}\n\n.filter-menu-vertical__section {\n border-bottom: var(--dimension-stroke-width-012) solid var(--color-border-tertiary);\n}\n.filter-menu-vertical__section > summary {\n cursor: default;\n padding: var(--dimension-space-200);\n}\n.filter-menu-vertical__section > summary ds-text {\n display: inline;\n}\n\n.filter-menu-vertical__section > summary {\n display: flex;\n align-items: center;\n gap: var(--dimension-space-100);\n list-style: none;\n}\n.filter-menu-vertical__section > summary::-webkit-details-marker {\n display: none;\n}\n.filter-menu-vertical__section:not([open]) .filter-menu-vertical__chevron {\n transform: rotate(-90deg);\n}\n",
882
883
  "type": "registry:ui"
883
884
  },
884
885
  {
885
886
  "path": "src/wc/components/FilterMenu/FilterMenu.tsx",
886
- "content": "import {\n Component,\n Element,\n Event,\n EventEmitter,\n h,\n Host,\n Listen,\n Prop,\n State,\n type VNode,\n Watch,\n} from '@stencil/core';\nimport {\n CONTROL_TEXT_VARIANT,\n DATE_FILTER_RELATIVE_PRESETS,\n controlWidthClass,\n dateFilterRangeValue,\n dateFilterRelativeValue,\n parseDateFilterValue,\n resolveChoicePopupAlignOffset,\n resolveCssLengthPx,\n resolveMotionTimeMs,\n shiftIsoCalendarDate,\n TOKEN_CSS_LENGTHS,\n TOKEN_DEFAULTS,\n type ControlWidth,\n} from '../../utils';\nimport { observeTableCaptionCompact } from '../../utils/table-caption-compact';\nimport type { AnchoredAlign, AnchoredSide } from '../../utils/anchored-position';\nimport { AnchoredPositionController } from '../../utils/anchored-position-controller';\nimport { AnchoredOverlayInteractionController } from '../../utils/anchored-overlay-interaction-controller';\nimport { resolveAnchoredOverlayBoundaryRect } from '../../utils/anchored-overlay-boundary';\nimport { ChoiceOptionRow, ChoiceSearch } from '../../utils/choice-list-parts';\nimport { choiceListUsesSubtext } from '../../utils/choice-list';\nimport {\n FILTER_MENU_WEEKDAYS,\n filterMenuCalendarDays,\n filterMenuCalendarMonth,\n filterMenuCalendarMonthLabel,\n filterMenuToday,\n shiftFilterMenuCalendarMonth,\n} from './filter-menu-calendar';\n\nexport type FilterMenuFilterKind = 'single' | 'multiple' | 'boolean' | 'date';\nexport type FilterMenuSize = 'lg' | 'md' | 'sm' | 'xs';\nexport type FilterMenuWidth = ControlWidth;\nexport type FilterMenuFooterLayout = 'summary' | 'categories-clear';\nexport type FilterMenuMatchMode = 'any' | 'all';\ntype FilterMenuDateMode = 'range' | 'relative';\n\nexport interface FilterMenuOption {\n label: string;\n value: string;\n description?: string;\n isInactive?: boolean;\n}\n\nexport interface FilterMenuFilter {\n id: string;\n label: string;\n kind: FilterMenuFilterKind;\n options?: FilterMenuOption[];\n description?: string;\n fieldLabel?: string;\n /** Draw a standard menu-section divider after this category. */\n divider?: boolean;\n}\n\nexport type FilterMenuValue = string[] | boolean | string;\nexport type FilterMenuValues = Record<string, FilterMenuValue | undefined>;\nexport type FilterMenuMatchModes = Record<string, FilterMenuMatchMode | undefined>;\n\nexport interface FilterMenuChangeDetail {\n filterId: string;\n value: FilterMenuValue;\n}\n\nexport interface FilterMenuMatchModeChangeDetail {\n filterId: string;\n mode: FilterMenuMatchMode;\n}\n\nlet filterMenuId = 0;\n\nconst ICON_SIZE: Record<FilterMenuSize, 'lg' | 'md' | 'sm' | 'xs'> = {\n lg: 'lg',\n md: 'md',\n sm: 'sm',\n xs: 'xs',\n};\n\nconst DATE_MODE_TABS = [\n { id: 'relative', label: 'Relative' },\n { id: 'range', label: 'Range' },\n];\n\nconst RELATIVE_DATE_OPTIONS: FilterMenuOption[] = DATE_FILTER_RELATIVE_PRESETS.map(preset => ({\n label: preset.label,\n value: dateFilterRelativeValue(preset.value),\n}));\n\n@Component({\n tag: 'ds-filter-menu',\n styleUrl: 'FilterMenu.css',\n scoped: true,\n})\nexport class FilterMenu {\n @Element() el!: HTMLElement;\n\n /** Controlled popup visibility. */\n /** Render content inside a parent-owned surface; the parent owns dismissal and positioning. */\n @Prop() embedded: boolean = false;\n /** Stacked, collapsible sections for a configuration panel. */\n @Prop() vertical: boolean = false;\n @Prop({ mutable: true }) open: boolean = false;\n /** Select trigger text. */\n @Prop() triggerLabel: string = 'Filters';\n /** Append the active-filter count to the visible trigger label. */\n @Prop() showSelectedCount: boolean = true;\n /** Optional select trigger prefix icon name. */\n @Prop() icon: string | undefined = 'Filters';\n /** Select trigger density. */\n @Prop() size: FilterMenuSize = 'md';\n /** Select trigger width fit. */\n @Prop() width: FilterMenuWidth = 'hug';\n /** Show the surface-aware inset border around the select trigger. */\n /** Show the trigger chevron. */\n @Prop() showIndicator: boolean = true;\n @Prop() hasBorder: boolean = true;\n /** Show selected interaction fill when one or more criteria are active. */\n /** Keep trigger colors neutral when a value is selected. */\n @Prop() neutralTrigger: boolean = false;\n /** Stage filter edits until Apply is pressed. */\n @Prop() applyRequired: boolean = false;\n @State() private draftValues?: FilterMenuValues;\n @State() private draftModes?: FilterMenuMatchModes;\n\n private changeValue(detail: FilterMenuChangeDetail): void {\n if (this.applyRequired)\n this.draftValues = { ...(this.draftValues ?? this.values), [detail.filterId]: detail.value };\n else this.dsChange.emit(detail);\n }\n private changeMode(detail: FilterMenuMatchModeChangeDetail): void {\n if (this.applyRequired)\n this.draftModes = { ...(this.draftModes ?? this.matchModes), [detail.filterId]: detail.mode };\n else this.dsMatchModeChange.emit(detail);\n }\n private get hasPendingChanges(): boolean {\n const normalize = (value: FilterMenuValue | undefined) =>\n Array.isArray(value) ? (value.length ? [...value].sort() : undefined) : value || undefined;\n const values = this.draftValues ?? this.values;\n const modes = this.draftModes ?? this.matchModes;\n return this.filters.some(\n filter =>\n JSON.stringify(normalize(values[filter.id])) !==\n JSON.stringify(normalize(this.values[filter.id])) ||\n (modes[filter.id] ?? 'any') !== (this.matchModes[filter.id] ?? 'any')\n );\n }\n private applyDraft(): void {\n if (!this.hasPendingChanges) return;\n if (this.draftValues && Object.keys(this.draftValues).length === 0) {\n this.dsClear.emit();\n } else if (this.draftValues) {\n for (const id of new Set([...Object.keys(this.values), ...Object.keys(this.draftValues)])) {\n if (JSON.stringify(this.values[id]) !== JSON.stringify(this.draftValues[id]))\n this.dsChange.emit({\n filterId: id,\n value:\n this.draftValues[id] ??\n (Array.isArray(this.values[id])\n ? []\n : typeof this.values[id] === 'boolean'\n ? false\n : ''),\n });\n }\n }\n if (this.draftModes) {\n for (const filterId of new Set([\n ...Object.keys(this.matchModes),\n ...Object.keys(this.draftModes),\n ])) {\n const mode = this.draftModes[filterId] ?? 'any';\n if ((this.matchModes[filterId] ?? 'any') !== mode)\n this.dsMatchModeChange.emit({ filterId, mode });\n }\n }\n }\n @Prop() activeFill: boolean = false;\n /**\n * Opt into table-caption icon-only chrome below 900px. The trigger omits its\n * visible label and chevron; keep an accessible name via aria-label.\n */\n @Prop({ reflect: true }) collapseLabel: boolean = false;\n /** ID applied to the internal select trigger. */\n @Prop() inputId: string | undefined;\n /** Direct accessible name for the internal select trigger. */\n @Prop({ attribute: 'aria-label' }) ariaLabel: string | null = null;\n /** Product-owned filter categories and option definitions. */\n @Prop() filters: FilterMenuFilter[] = [];\n /** Controlled values keyed by filter id. */\n @Prop() values: FilterMenuValues = {};\n /** Controlled any/all match mode keyed by multiple-choice filter id. Defaults to any. */\n @Prop() matchModes: FilterMenuMatchModes = {};\n /** Controlled category shown in the option pane. */\n @Prop() activeFilterId: string | undefined;\n /** External trigger element to position against. */\n @Prop() anchor: HTMLElement | undefined;\n /** ID of the external trigger element used for positioning and focus return. */\n @Prop() anchorId: string | undefined;\n /** Explicit collision owner; otherwise the nearest data-ds-overlay-boundary ancestor is used. */\n @Prop() boundary: HTMLElement | undefined;\n /** Preferred popup side; collision handling may flip it. */\n @Prop() side: AnchoredSide = 'bottom';\n /** Cross-axis alignment against the trigger. */\n @Prop() align: AnchoredAlign = 'end';\n /** Gap between trigger and popup — number in px or a TokoMo length. */\n @Prop() sideOffset: number | string = TOKEN_CSS_LENGTHS.space050;\n /** Cross-axis offset — number in px or a TokoMo length. */\n @Prop() alignOffset: number | string = 0;\n /** Popup width. It remains clamped to its collision boundary by the component recipe. */\n @Prop() menuWidth: string = TOKEN_CSS_LENGTHS.menuWidthLg;\n /** Accessible name for the non-modal filter dialog. */\n @Prop() menuLabel: string = 'Filters';\n /** Accessible name for the category tab list. */\n @Prop() categoriesLabel: string = 'Filter categories';\n /** Footer action and date-clear accessible label. */\n @Prop() clearLabel: string = 'Clear';\n /** Placeholder shown in each non-date option search header. */\n @Prop() searchPlaceholder: string = 'Search';\n /** Empty-state text shown when an option search has no matches. */\n @Prop() noResultsText: string = 'No results';\n /** Footer recipe: full-width selected summary or reserved category-pane Clear action. */\n @Prop() footerLayout: FilterMenuFooterLayout = 'summary';\n /** Show a visible focus ring on initial entry after keyboard activation. */\n @Prop() initialFocusVisible: boolean = false;\n\n @State() private shouldRender = false;\n @State() private closing = false;\n @State() private positionReady = false;\n @State() private pos: { x: number; y: number } = { x: 0, y: 0 };\n @State() private focusRingVisible = false;\n @State() private activeOptionIndex = 0;\n @State() private captionCompact = false;\n @State() private dateModeByFilter: Record<string, FilterMenuDateMode> = {};\n @State() private calendarMonthByFilter: Record<string, string> = {};\n @State() private pendingRangeStartByFilter: Record<string, string> = {};\n @State() private previewRangeEndByFilter: Record<string, string> = {};\n @State() private optionQueryByFilter: Record<string, string> = {};\n\n /** Requests a controlled value replacement without closing the popup. */\n @Event() dsChange!: EventEmitter<FilterMenuChangeDetail>;\n /** Requests that the consumer clear every filter value. */\n @Event() dsClear!: EventEmitter<void>;\n /** Requests a controlled any/all mode replacement for a multiple-choice filter. */\n @Event() dsMatchModeChange!: EventEmitter<FilterMenuMatchModeChangeDetail>;\n /** Requests a controlled active-category replacement. */\n @Event() dsActiveFilterChange!: EventEmitter<string>;\n /** Requests that the controlled popup close. */\n @Event() dsClose!: EventEmitter<void>;\n /** Emitted whenever internal select-trigger activation changes popup visibility. */\n @Event() dsOpenChange!: EventEmitter<boolean>;\n /** Emitted after exit motion and rendered popup removal complete. */\n @Event() dsAfterClose!: EventEmitter<void>;\n\n private readonly generatedId = `ds-filter-menu-${++filterMenuId}`;\n private triggerElement: HTMLButtonElement | null = null;\n private pendingInitialFocusVisible = false;\n private closeTimer: ReturnType<typeof setTimeout> | null = null;\n private captionCompactDisconnect: (() => void) | undefined;\n private hasLoaded = false;\n private closingSnapshot: {\n filters: FilterMenuFilter[];\n values: FilterMenuValues;\n matchModes: FilterMenuMatchModes;\n activeFilterId: string | undefined;\n } | null = null;\n\n private readonly position = new AnchoredPositionController({\n getAnchor: () => this.resolvedAnchor,\n getPopup: () => this.el.querySelector<HTMLElement>('.filter-menu-popup'),\n getOwnerDocument: () => this.el.ownerDocument,\n measure: (anchor, popup) => {\n if (!this.open) return null;\n const anchorRect = anchor.getBoundingClientRect();\n const sectionInsetPx = resolveCssLengthPx(TOKEN_DEFAULTS.space050, TOKEN_DEFAULTS.space050);\n return {\n anchorRect,\n popupWidth: popup.offsetWidth || this.popupFallbackWidth,\n popupHeight: popup.offsetHeight || this.popupFallbackHeight,\n side: this.side,\n align: this.align,\n sideOffsetPx: resolveCssLengthPx(this.sideOffset, TOKEN_DEFAULTS.space050),\n alignOffsetPx: resolveChoicePopupAlignOffset({\n align: this.align,\n alignOffsetPx: resolveCssLengthPx(this.alignOffset, 0),\n sectionInsetPx,\n }),\n viewportPadPx: this.viewportPad,\n viewportWidth: window.innerWidth,\n viewportHeight: window.innerHeight,\n collisionRect: resolveAnchoredOverlayBoundaryRect(anchor, this.boundary),\n };\n },\n apply: ({ x, y }) => {\n this.pos = { x, y };\n },\n onReady: () => {\n this.positionReady = true;\n },\n liveUpdate: 'double-frame',\n observeResize: true,\n topLayer: true,\n });\n private readonly interaction = new AnchoredOverlayInteractionController({\n getAnchor: () => this.resolvedAnchor,\n getPopup: () => this.el.querySelector<HTMLElement>('.filter-menu-popup'),\n getOwnerDocument: () => this.el.ownerDocument,\n onOutsideActivation: () => this.close(),\n });\n\n componentDidLoad() {\n this.hasLoaded = true;\n this.syncCaptionCompactObserver();\n if (this.open) this.onOpenChange(true);\n }\n\n connectedCallback() {\n if (!this.hasLoaded) return;\n this.syncCaptionCompactObserver();\n if (this.open) this.onOpenChange(true);\n }\n\n disconnectedCallback() {\n this.disconnectCaptionCompactObserver();\n this.position.unobserve();\n this.teardownListeners();\n }\n\n @Watch('collapseLabel')\n onCollapseLabelChange() {\n this.syncCaptionCompactObserver();\n }\n\n @Watch('open')\n onOpenChange(isOpen: boolean) {\n if (!isOpen) {\n this.draftValues = undefined;\n this.draftModes = undefined;\n }\n if (this.embedded) return;\n if (isOpen) {\n this.teardownListeners();\n this.closingSnapshot = null;\n this.shouldRender = true;\n this.closing = false;\n this.positionReady = false;\n this.focusRingVisible = this.pendingInitialFocusVisible || this.initialFocusVisible;\n this.setupListeners();\n this.position.schedule(() => this.focusInitialCategory());\n return;\n }\n\n if (!this.shouldRender) return;\n this.position.cancel();\n this.captureClosingSnapshot();\n this.closing = true;\n this.teardownListeners();\n const duration = resolveMotionTimeMs(\n TOKEN_DEFAULTS.motionShort2,\n TOKEN_DEFAULTS.animationDurationShort3\n );\n if (duration <= 0) {\n this.finishClose();\n return;\n }\n this.closeTimer = setTimeout(() => this.finishClose(), duration);\n }\n\n @Watch('anchor')\n @Watch('anchorId')\n @Watch('boundary')\n @Watch('side')\n @Watch('align')\n @Watch('sideOffset')\n @Watch('alignOffset')\n @Watch('menuWidth')\n onPositionInputChange() {\n if (this.open) this.position.schedule();\n }\n\n @Listen('keydown')\n handleKeyDown(event: KeyboardEvent) {\n if (this.embedded && (event.key === 'Escape' || event.key === 'Tab')) return;\n if ((!this.shouldRender && !this.embedded) || this.closing) return;\n if (event.key === 'Escape') {\n event.preventDefault();\n this.close();\n return;\n }\n if (event.key !== 'Tab' || !this.tabLeavesPopup(event)) return;\n event.preventDefault();\n this.close(false);\n this.interaction.moveFocusAfterTab(event.shiftKey);\n }\n\n private get resolvedAnchor(): HTMLElement | null {\n if (this.anchor) return this.anchor;\n if (this.anchorId) return document.getElementById(this.anchorId);\n return this.triggerElement;\n }\n\n private get usesInternalTrigger(): boolean {\n return !this.embedded && !this.anchor && !this.anchorId;\n }\n\n private get viewportPad(): number {\n return resolveCssLengthPx(TOKEN_DEFAULTS.space050, TOKEN_DEFAULTS.space050);\n }\n\n private get popupFallbackWidth(): number {\n return resolveCssLengthPx(TOKEN_DEFAULTS.menuWidthLg, TOKEN_DEFAULTS.menuWidthLg);\n }\n\n private get popupFallbackHeight(): number {\n return resolveCssLengthPx(TOKEN_DEFAULTS.menuFallbackHeight, TOKEN_DEFAULTS.menuFallbackHeight);\n }\n\n private setupListeners() {\n this.interaction.connect();\n this.position.observe();\n }\n\n private teardownListeners() {\n this.position.unobserve();\n this.interaction.disconnect();\n if (this.closeTimer) {\n clearTimeout(this.closeTimer);\n this.closeTimer = null;\n }\n }\n\n private close(restoreFocus = true) {\n this.captureClosingSnapshot();\n if (restoreFocus) this.interaction.focusAnchor();\n this.dsOpenChange.emit(false);\n this.dsClose.emit();\n this.open = false;\n this.onOpenChange(false);\n }\n\n private toggleFromTrigger(event: MouseEvent) {\n if (this.open) {\n this.close();\n return;\n }\n this.pendingInitialFocusVisible = event.detail === 0;\n this.open = true;\n this.dsOpenChange.emit(true);\n this.onOpenChange(true);\n }\n\n private handleTriggerKeyDown(event: KeyboardEvent) {\n if (event.key !== 'ArrowDown' || this.open) return;\n event.preventDefault();\n this.pendingInitialFocusVisible = true;\n this.open = true;\n this.dsOpenChange.emit(true);\n this.onOpenChange(true);\n }\n\n private finishClose() {\n const popup = this.el.querySelector<HTMLElement>('.filter-menu-popup');\n if (popup?.matches(':popover-open')) popup.hidePopover();\n this.shouldRender = false;\n this.closing = false;\n this.closingSnapshot = null;\n this.closeTimer = null;\n this.dateModeByFilter = {};\n this.calendarMonthByFilter = {};\n this.pendingRangeStartByFilter = {};\n this.previewRangeEndByFilter = {};\n this.optionQueryByFilter = {};\n this.dsAfterClose.emit();\n }\n\n private captureClosingSnapshot() {\n if (this.closingSnapshot) return;\n this.closingSnapshot = {\n filters: this.filters.map(filter => ({\n ...filter,\n options: filter.options?.map(option => ({ ...option })),\n })),\n values: Object.fromEntries(\n Object.entries(this.values).map(([key, value]) => [\n key,\n Array.isArray(value) ? [...value] : value,\n ])\n ),\n matchModes: { ...this.matchModes },\n activeFilterId: this.activeFilterId,\n };\n }\n\n private focusInitialCategory() {\n requestAnimationFrame(() => {\n this.el.querySelector<HTMLElement>('.filter-menu__category[tabindex=\"0\"]')?.focus();\n this.pendingInitialFocusVisible = false;\n });\n }\n\n private tabLeavesPopup(event: KeyboardEvent): boolean {\n return this.interaction.tabLeavesPopup(event);\n }\n\n private selectedFilter(filters: FilterMenuFilter[], activeFilterId: string | undefined) {\n return filters.find(filter => filter.id === activeFilterId) ?? filters[0];\n }\n\n private selectedCount(filter: FilterMenuFilter, values: FilterMenuValues): number {\n const value = values[filter.id];\n if (filter.kind === 'multiple') return Array.isArray(value) ? value.length : 0;\n if (filter.kind === 'boolean') return value === true ? 1 : 0;\n return typeof value === 'string' && value.length > 0 ? 1 : 0;\n }\n\n private totalSelected(filters: FilterMenuFilter[], values: FilterMenuValues): number {\n return filters.reduce((total, filter) => total + this.selectedCount(filter, values), 0);\n }\n\n private activeFilterCount(filters: FilterMenuFilter[], values: FilterMenuValues): number {\n return filters.filter(filter => this.selectedCount(filter, values) > 0).length;\n }\n\n private selectCategory(filterId: string, focus = false) {\n this.activeOptionIndex = 0;\n this.dsActiveFilterChange.emit(filterId);\n if (!focus) return;\n requestAnimationFrame(() => {\n this.el.querySelector<HTMLElement>(`[data-filter-category=\"${filterId}\"]`)?.focus();\n });\n }\n\n private handleCategoryKeyDown(\n event: KeyboardEvent,\n filters: FilterMenuFilter[],\n filterId: string\n ) {\n const currentIndex = filters.findIndex(filter => filter.id === filterId);\n let nextIndex: number;\n if (event.key === 'ArrowDown') nextIndex = (currentIndex + 1) % filters.length;\n else if (event.key === 'ArrowUp')\n nextIndex = (currentIndex - 1 + filters.length) % filters.length;\n else if (event.key === 'Home') nextIndex = 0;\n else if (event.key === 'End') nextIndex = filters.length - 1;\n else if (event.key === 'ArrowRight') {\n event.preventDefault();\n requestAnimationFrame(() => {\n this.el\n .querySelector<HTMLElement>(\n '.filter-menu__options [role=\"option\"], .filter-menu__options [data-date-option], .filter-menu__options input'\n )\n ?.focus();\n });\n return;\n } else return;\n\n event.preventDefault();\n this.focusRingVisible = true;\n this.selectCategory(filters[nextIndex].id, true);\n }\n\n private handlePanelKeyDown(event: KeyboardEvent, filterId: string) {\n if (event.key !== 'ArrowLeft') return;\n event.preventDefault();\n this.el.querySelector<HTMLElement>(`[data-filter-category=\"${filterId}\"]`)?.focus();\n }\n\n private handleOptionKeyDown(\n event: KeyboardEvent,\n filter: FilterMenuFilter,\n option: FilterMenuOption,\n index: number,\n values: FilterMenuValues,\n visibleOptions: FilterMenuOption[] = filter.options ?? []\n ) {\n if (event.key === 'ArrowLeft') {\n this.handlePanelKeyDown(event, filter.id);\n return;\n }\n if (event.key === 'Enter' || event.key === ' ') {\n event.preventDefault();\n this.selectOption(filter, option, values);\n return;\n }\n if (!['ArrowDown', 'ArrowUp', 'Home', 'End'].includes(event.key)) return;\n event.preventDefault();\n const enabled = visibleOptions\n .map((candidate, optionIndex) => ({ candidate, optionIndex }))\n .filter(({ candidate }) => !candidate.isInactive)\n .map(({ optionIndex }) => optionIndex);\n if (!enabled.length) return;\n const current = enabled.indexOf(index);\n let next: number;\n if (event.key === 'Home') next = enabled[0];\n else if (event.key === 'End') next = enabled[enabled.length - 1];\n else {\n const direction = event.key === 'ArrowDown' ? 1 : -1;\n const start = current >= 0 ? current : direction === 1 ? -1 : 0;\n next = enabled[(start + direction + enabled.length) % enabled.length];\n }\n this.activeOptionIndex = next;\n this.focusRingVisible = true;\n requestAnimationFrame(() => {\n this.el\n .querySelector<HTMLElement>(`#${this.generatedId}-${filter.id}-option-${next}`)\n ?.focus();\n });\n }\n\n private optionMatchesQuery(option: FilterMenuOption, query: string): boolean {\n const normalized = query.trim().toLocaleLowerCase();\n if (!normalized) return true;\n return `${option.label} ${option.description ?? ''}`.toLocaleLowerCase().includes(normalized);\n }\n\n private visibleOptions(\n filter: FilterMenuFilter,\n query = this.optionQueryByFilter[filter.id] ?? ''\n ) {\n if (filter.kind === 'boolean') {\n const option = this.booleanOption(filter);\n return this.optionMatchesQuery(option, query) ? [option] : [];\n }\n return (filter.options ?? []).filter(option => this.optionMatchesQuery(option, query));\n }\n\n private booleanOption(filter: FilterMenuFilter): FilterMenuOption {\n return {\n label: filter.fieldLabel ?? filter.label,\n value: 'true',\n description: filter.description,\n };\n }\n\n private setOptionQuery(filter: FilterMenuFilter, value: string) {\n const visibleOptions = this.visibleOptions(filter, value);\n const firstEnabled = visibleOptions.findIndex(option => !option.isInactive);\n this.activeOptionIndex = firstEnabled;\n this.focusRingVisible = false;\n this.optionQueryByFilter = { ...this.optionQueryByFilter, [filter.id]: value };\n requestAnimationFrame(() => {\n const content = this.el.querySelector<HTMLElement>('.filter-menu__options-content');\n if (content) content.scrollTop = 0;\n this.position.schedule();\n });\n }\n\n private handleOptionSearchKeyDown(event: KeyboardEvent, filter: FilterMenuFilter) {\n if (event.key !== 'ArrowDown' && event.key !== 'ArrowUp') return;\n const visibleOptions = this.visibleOptions(filter);\n const enabled = visibleOptions\n .map((option, index) => ({ option, index }))\n .filter(({ option }) => !option.isInactive)\n .map(({ index }) => index);\n if (!enabled.length) return;\n event.preventDefault();\n const next = event.key === 'ArrowDown' ? enabled[0] : enabled[enabled.length - 1];\n this.activeOptionIndex = next;\n this.focusRingVisible = true;\n requestAnimationFrame(() => {\n this.el\n .querySelector<HTMLElement>(`#${this.generatedId}-${filter.id}-option-${next}`)\n ?.focus();\n });\n }\n\n private toggleMultiple(\n filter: FilterMenuFilter,\n option: FilterMenuOption,\n checked: boolean,\n values: FilterMenuValues\n ) {\n if (option.isInactive) return;\n const current = Array.isArray(values[filter.id]) ? (values[filter.id] as string[]) : [];\n const selected = new Set(current);\n if (checked) selected.add(option.value);\n else selected.delete(option.value);\n const ordered = (filter.options ?? [])\n .map(candidate => candidate.value)\n .filter(value => selected.has(value));\n this.changeValue({ filterId: filter.id, value: ordered });\n }\n\n private selectOption(\n filter: FilterMenuFilter,\n option: FilterMenuOption,\n values: FilterMenuValues\n ) {\n if (option.isInactive) return;\n if (filter.kind === 'single') {\n this.changeValue({ filterId: filter.id, value: option.value });\n return;\n }\n const selected = Array.isArray(values[filter.id])\n ? (values[filter.id] as string[]).includes(option.value)\n : false;\n this.toggleMultiple(filter, option, !selected, values);\n }\n\n private dateMode(filterId: string, value: FilterMenuValue | undefined): FilterMenuDateMode {\n return this.dateModeByFilter[filterId] ?? parseDateFilterValue(value)?.kind ?? 'relative';\n }\n\n private setDateMode(filter: FilterMenuFilter, value: FilterMenuValue | undefined, mode: string) {\n if (mode !== 'range' && mode !== 'relative') return;\n this.dateModeByFilter = { ...this.dateModeByFilter, [filter.id]: mode };\n this.activeOptionIndex = 0;\n if (mode === 'range' && !this.calendarMonthByFilter[filter.id]) {\n const parsed = parseDateFilterValue(value);\n const initialDate = parsed?.kind === 'range' ? parsed.start : filterMenuToday();\n this.calendarMonthByFilter = {\n ...this.calendarMonthByFilter,\n [filter.id]: filterMenuCalendarMonth(initialDate),\n };\n }\n if (mode === 'relative' && this.pendingRangeStartByFilter[filter.id]) {\n const next = { ...this.pendingRangeStartByFilter };\n delete next[filter.id];\n this.pendingRangeStartByFilter = next;\n }\n if (mode === 'relative') this.clearCalendarRangePreview(filter.id);\n }\n\n private calendarMonth(filterId: string, value: FilterMenuValue | undefined): string {\n const parsed = parseDateFilterValue(value);\n const initialDate = parsed?.kind === 'range' ? parsed.start : filterMenuToday();\n return this.calendarMonthByFilter[filterId] ?? filterMenuCalendarMonth(initialDate);\n }\n\n private moveCalendarMonth(filterId: string, month: string, offset: number) {\n this.clearCalendarRangePreview(filterId);\n this.calendarMonthByFilter = {\n ...this.calendarMonthByFilter,\n [filterId]: shiftFilterMenuCalendarMonth(month, offset),\n };\n }\n\n private selectCalendarDate(filterId: string, value: string) {\n this.clearCalendarRangePreview(filterId);\n const pendingStart = this.pendingRangeStartByFilter[filterId];\n const next = { ...this.pendingRangeStartByFilter };\n if (pendingStart) delete next[filterId];\n else next[filterId] = value;\n this.pendingRangeStartByFilter = next;\n this.changeValue({\n filterId,\n value: dateFilterRangeValue(pendingStart ?? value, value),\n });\n }\n\n private previewCalendarRange(filterId: string, value: string) {\n if (!this.pendingRangeStartByFilter[filterId]) return;\n if (this.previewRangeEndByFilter[filterId] === value) return;\n this.previewRangeEndByFilter = { ...this.previewRangeEndByFilter, [filterId]: value };\n }\n\n private clearCalendarRangePreview(filterId: string) {\n if (!this.previewRangeEndByFilter[filterId]) return;\n const next = { ...this.previewRangeEndByFilter };\n delete next[filterId];\n this.previewRangeEndByFilter = next;\n }\n\n private focusCalendarDate(filterId: string, value: string) {\n this.previewCalendarRange(filterId, value);\n const targetMonth = filterMenuCalendarMonth(value);\n if (this.calendarMonthByFilter[filterId] !== targetMonth) {\n this.calendarMonthByFilter = { ...this.calendarMonthByFilter, [filterId]: targetMonth };\n }\n requestAnimationFrame(() => {\n this.el.querySelector<HTMLElement>(`[data-date-option=\"${value}\"]`)?.focus();\n });\n }\n\n private handleCalendarDayKeyDown(event: KeyboardEvent, filterId: string, value: string) {\n let offset: number | null = null;\n if (event.key === 'ArrowLeft') offset = -1;\n else if (event.key === 'ArrowRight') offset = 1;\n else if (event.key === 'ArrowUp') offset = -7;\n else if (event.key === 'ArrowDown') offset = 7;\n else if (event.key === 'Home') {\n offset = -new Date(`${value}T00:00:00Z`).getUTCDay();\n } else if (event.key === 'End') {\n offset = 6 - new Date(`${value}T00:00:00Z`).getUTCDay();\n } else if (event.key === 'PageUp') {\n const month = shiftFilterMenuCalendarMonth(filterMenuCalendarMonth(value), -1);\n const day = value.slice(8, 10);\n const candidate = `${month}-${day}`;\n const target = parseDateFilterValue(candidate) ? candidate : `${month}-01`;\n event.preventDefault();\n this.focusCalendarDate(filterId, target);\n return;\n } else if (event.key === 'PageDown') {\n const month = shiftFilterMenuCalendarMonth(filterMenuCalendarMonth(value), 1);\n const day = value.slice(8, 10);\n const candidate = `${month}-${day}`;\n const target = parseDateFilterValue(candidate) ? candidate : `${month}-01`;\n event.preventDefault();\n this.focusCalendarDate(filterId, target);\n return;\n }\n if (offset === null) return;\n event.preventDefault();\n this.focusCalendarDate(filterId, shiftIsoCalendarDate(value, offset));\n }\n\n private renderRelativeDateOptions(filter: FilterMenuFilter, value: FilterMenuValue | undefined) {\n const relativeFilter: FilterMenuFilter = {\n ...filter,\n kind: 'single',\n options: RELATIVE_DATE_OPTIONS,\n };\n return (\n <div\n class=\"filter-menu__date-relative ds-choice-list ds-chrome-column ds-chrome-space--sm\"\n role=\"listbox\"\n aria-label=\"Relative date\"\n >\n {RELATIVE_DATE_OPTIONS.map((option, index) => (\n <ChoiceOptionRow\n size=\"md\"\n id={`${this.generatedId}-${filter.id}-relative-${index}`}\n option={option}\n selected={value === option.value}\n active={index === this.activeOptionIndex}\n focusRingVisible={this.focusRingVisible}\n usesSubtext={false}\n tabIndex={index === this.activeOptionIndex ? 0 : -1}\n onFocus={() => {\n this.activeOptionIndex = index;\n }}\n onKeyDown={(event: KeyboardEvent) =>\n this.handleOptionKeyDown(event, relativeFilter, option, index, {\n [filter.id]: value,\n })\n }\n onHover={() => {\n this.focusRingVisible = false;\n this.activeOptionIndex = index;\n }}\n onSelect={() => this.changeValue({ filterId: filter.id, value: option.value })}\n />\n ))}\n </div>\n );\n }\n\n private renderDateCalendar(filter: FilterMenuFilter, value: FilterMenuValue | undefined) {\n const parsed = parseDateFilterValue(value);\n const range = parsed?.kind === 'range' ? parsed : null;\n const month = this.calendarMonth(filter.id, value);\n const days = filterMenuCalendarDays(month);\n const today = filterMenuToday();\n const pendingStart = this.pendingRangeStartByFilter[filter.id];\n const previewEnd = this.previewRangeEndByFilter[filter.id];\n const previewStart = pendingStart && previewEnd ? [pendingStart, previewEnd].sort()[0] : null;\n const previewFinish = pendingStart && previewEnd ? [pendingStart, previewEnd].sort()[1] : null;\n const preferredFocus =\n this.pendingRangeStartByFilter[filter.id] ??\n range?.end ??\n (month === today.slice(0, 7) ? today : '');\n const focusDate = days.some(day => day.value === preferredFocus)\n ? preferredFocus\n : (days.find(day => day.inMonth)?.value ?? days[0]?.value);\n\n return (\n <div class=\"filter-menu__calendar\">\n <div class=\"filter-menu__calendar-heading ds-control--md\">\n <ds-button-unfilled\n class=\"filter-menu__calendar-nav filter-menu__calendar-nav--previous\"\n variant=\"icon\"\n icon=\"ChevronLeft\"\n size=\"md\"\n hasBorder={false}\n ariaLabel=\"Previous month\"\n onDsClick={() => this.moveCalendarMonth(filter.id, month, -1)}\n />\n <ds-text as=\"span\" variant=\"text-body-medium\" emphasis color=\"primary\">\n {filterMenuCalendarMonthLabel(month)}\n </ds-text>\n <ds-button-unfilled\n class=\"filter-menu__calendar-nav filter-menu__calendar-nav--next\"\n variant=\"icon\"\n icon=\"ChevronRight\"\n size=\"md\"\n hasBorder={false}\n ariaLabel=\"Next month\"\n onDsClick={() => this.moveCalendarMonth(filter.id, month, 1)}\n />\n </div>\n <div class=\"filter-menu__calendar-weekdays\" aria-hidden=\"true\">\n {FILTER_MENU_WEEKDAYS.map(day => (\n <ds-text as=\"span\" variant=\"text-body-small\" color=\"secondary\">\n {day}\n </ds-text>\n ))}\n </div>\n <div\n class=\"filter-menu__calendar-grid\"\n role=\"grid\"\n aria-label={filterMenuCalendarMonthLabel(month)}\n onMouseLeave={() => this.clearCalendarRangePreview(filter.id)}\n >\n {days.map(day => {\n const selectedInRange = Boolean(\n range && day.value >= range.start && day.value <= range.end\n );\n const previewInRange = Boolean(\n previewStart &&\n previewFinish &&\n day.value >= previewStart &&\n day.value <= previewFinish\n );\n const inRange = previewInRange || selectedInRange;\n const rangeEdge = Boolean(\n previewStart\n ? day.value === pendingStart\n : range && (day.value === range.start || day.value === range.end)\n );\n const textColor = rangeEdge\n ? 'on-bold'\n : inRange || day.value === today\n ? 'primary'\n : day.inMonth\n ? 'secondary'\n : 'tertiary';\n return (\n <button\n type=\"button\"\n role=\"gridcell\"\n data-date-option={day.value}\n class={{\n 'filter-menu__calendar-day': true,\n 'filter-menu__calendar-day--outside': !day.inMonth,\n 'filter-menu__calendar-day--today': day.value === today,\n 'filter-menu__calendar-day--in-range': inRange,\n 'filter-menu__calendar-day--range-preview': previewInRange,\n 'filter-menu__calendar-day--range-edge': rangeEdge,\n 'ds-focus-ring-inset': true,\n 'ds-interaction-fill': true,\n }}\n aria-label={day.label}\n aria-selected={selectedInRange ? 'true' : 'false'}\n tabIndex={day.value === focusDate ? 0 : -1}\n onMouseEnter={() => this.previewCalendarRange(filter.id, day.value)}\n onFocus={() => this.previewCalendarRange(filter.id, day.value)}\n onClick={() => this.selectCalendarDate(filter.id, day.value)}\n onKeyDown={(event: KeyboardEvent) =>\n this.handleCalendarDayKeyDown(event, filter.id, day.value)\n }\n >\n <ds-text\n class=\"ds-interaction-fill__content\"\n as=\"span\"\n variant=\"text-body-medium\"\n color={textColor}\n emphasis={day.value === today}\n >\n {day.day}\n </ds-text>\n </button>\n );\n })}\n </div>\n </div>\n );\n }\n\n private renderDateFilter(filter: FilterMenuFilter, value: FilterMenuValue | undefined) {\n const mode = this.dateMode(filter.id, value);\n return (\n <div class=\"filter-menu__date\">\n <header class=\"filter-menu__date-header ds-chrome-header ds-chrome-header--bounded\">\n <ds-tab-group\n ariaLabel=\"Date filter mode\"\n size=\"md\"\n width=\"fill\"\n hasContainer={false}\n value={mode}\n tabs={DATE_MODE_TABS}\n onDsChange={(event: CustomEvent<string>) => {\n event.stopPropagation();\n this.setDateMode(filter, value, event.detail);\n }}\n />\n </header>\n <div class=\"filter-menu__date-body\">\n {mode === 'relative'\n ? this.renderRelativeDateOptions(filter, value)\n : this.renderDateCalendar(filter, value)}\n </div>\n </div>\n );\n }\n\n private renderOptionSearch(filter: FilterMenuFilter) {\n return (\n <div class=\"filter-menu__option-search\">\n <ChoiceSearch\n size=\"md\"\n hasFocusBoundary={false}\n hasInteractionFill={false}\n value={this.optionQueryByFilter[filter.id] ?? ''}\n placeholder={this.searchPlaceholder}\n ariaLabel={`Search ${filter.label} options`}\n controls={`${this.generatedId}-${filter.id}-options`}\n inputRef={() => undefined}\n clearLabel={`Clear ${filter.label} search`}\n onValueChange={value => this.setOptionQuery(filter, value)}\n onKeyDown={(event: KeyboardEvent) => this.handleOptionSearchKeyDown(event, filter)}\n />\n </div>\n );\n }\n\n private renderNoOptionResults() {\n return (\n <div\n class=\"ds-choice-empty ds-empty-region\"\n role=\"option\"\n aria-selected=\"false\"\n aria-disabled=\"true\"\n aria-label={this.noResultsText}\n aria-live=\"polite\"\n >\n <ds-empty-state body={this.noResultsText} />\n </div>\n );\n }\n\n private renderOptions(filter: FilterMenuFilter, values: FilterMenuValues) {\n const value = values[filter.id];\n if (filter.kind === 'multiple' || filter.kind === 'single') {\n const selected = Array.isArray(value) ? value : [];\n const allOptions = filter.options ?? [];\n const options = this.visibleOptions(filter);\n const usesSubtext = choiceListUsesSubtext(\n allOptions.map(option => ({\n label: option.label,\n value: option.value,\n subtext: option.description,\n }))\n );\n if (!options.length) return this.renderNoOptionResults();\n return options.map((option, index) => {\n const isSelected =\n filter.kind === 'multiple' ? selected.includes(option.value) : value === option.value;\n return (\n <ChoiceOptionRow\n size=\"md\"\n id={`${this.generatedId}-${filter.id}-option-${index}`}\n option={{\n label: option.label,\n value: option.value,\n subtext: option.description,\n isInactive: option.isInactive,\n }}\n selected={isSelected}\n active={index === this.activeOptionIndex}\n focusRingVisible={this.focusRingVisible}\n usesSubtext={usesSubtext}\n tabIndex={index === this.activeOptionIndex ? 0 : -1}\n leading={\n filter.kind === 'multiple' ? (\n <span\n class=\"ds-choice-item__icon ds-control-icon-box ds-interaction-fill__content\"\n aria-hidden=\"true\"\n >\n <ds-checkbox label=\"\" size=\"md\" checked={isSelected} presentation />\n </span>\n ) : undefined\n }\n onFocus={() => {\n this.activeOptionIndex = index;\n }}\n onKeyDown={(event: KeyboardEvent) =>\n this.handleOptionKeyDown(event, filter, option, index, values, options)\n }\n onHover={() => {\n this.focusRingVisible = false;\n this.activeOptionIndex = index;\n }}\n onSelect={() => this.selectOption(filter, option, values)}\n />\n );\n });\n }\n\n if (filter.kind === 'boolean') {\n const [option] = this.visibleOptions(filter);\n if (!option) return this.renderNoOptionResults();\n return (\n <ChoiceOptionRow\n size=\"md\"\n id={`${this.generatedId}-${filter.id}-option-0`}\n option={{\n label: option.label,\n value: option.value,\n subtext: option.description,\n }}\n selected={value === true}\n active\n focusRingVisible={this.focusRingVisible}\n usesSubtext={Boolean(option.description)}\n tabIndex={0}\n leading={\n <span\n class=\"ds-choice-item__icon ds-control-icon-box ds-interaction-fill__content\"\n aria-hidden=\"true\"\n >\n <ds-checkbox label=\"\" size=\"md\" checked={value === true} presentation />\n </span>\n }\n onKeyDown={(event: KeyboardEvent) => {\n if (event.key === 'ArrowLeft') this.handlePanelKeyDown(event, filter.id);\n else if (event.key === 'Enter' || event.key === ' ') {\n event.preventDefault();\n this.changeValue({ filterId: filter.id, value: value !== true });\n }\n }}\n onHover={() => {\n this.focusRingVisible = false;\n }}\n onSelect={() => this.changeValue({ filterId: filter.id, value: value !== true })}\n />\n );\n }\n\n return this.renderDateFilter(filter, value);\n }\n\n private get captionIconOnly(): boolean {\n return (\n this.collapseLabel && this.captionCompact && this.usesInternalTrigger && Boolean(this.icon)\n );\n }\n\n private syncCaptionCompactObserver(): void {\n this.disconnectCaptionCompactObserver();\n if (!this.collapseLabel) {\n if (this.captionCompact) this.captionCompact = false;\n return;\n }\n this.captionCompactDisconnect = observeTableCaptionCompact(this.el, compact => {\n if (this.captionCompact !== compact) this.captionCompact = compact;\n });\n }\n\n private disconnectCaptionCompactObserver(): void {\n this.captionCompactDisconnect?.();\n this.captionCompactDisconnect = undefined;\n }\n\n private renderCaptionTooltip(trigger: VNode, label: string): VNode {\n if (!this.collapseLabel) return trigger;\n return (\n <ds-tooltip label={label} side=\"top\" size=\"sm\">\n {trigger}\n </ds-tooltip>\n );\n }\n\n private renderFooter(totalSelected: number, categoriesClear: boolean) {\n const appliedCount = this.totalSelected(this.filters, this.values);\n if (this.applyRequired && totalSelected === 0 && appliedCount === 0) return null;\n return (\n <div\n class={{\n 'filter-menu__footer': true,\n 'filter-menu__footer--categories-clear': categoriesClear,\n 'ds-choice-footer': true,\n }}\n aria-hidden={\n !this.applyRequired &&\n categoriesClear &&\n totalSelected === 0 &&\n !this.draftValues &&\n !this.draftModes\n ? 'true'\n : undefined\n }\n >\n <div class=\"ds-choice-footer__content ds-control--md\">\n {!categoriesClear ? (\n <ds-text\n class=\"ds-choice-footer__summary\"\n as=\"span\"\n variant=\"text-body-medium\"\n color=\"secondary\"\n aria-live=\"polite\"\n >\n {totalSelected} selected\n </ds-text>\n ) : null}\n {this.applyRequired ? (\n <button\n class=\"filter-menu__apply ds-choice-footer__clear ds-text-action\"\n type=\"button\"\n disabled={!this.hasPendingChanges}\n onClick={() => this.applyDraft()}\n >\n <ds-text as=\"span\" variant=\"text-body-medium\" color=\"inherit\">\n Apply\n </ds-text>\n </button>\n ) : null}\n {this.applyRequired && (totalSelected > 0 || appliedCount > 0) ? (\n <ds-text\n class=\"filter-menu__action-separator\"\n as=\"span\"\n variant=\"text-body-medium\"\n color=\"tertiary\"\n aria-hidden=\"true\"\n >\n ·\n </ds-text>\n ) : null}\n {totalSelected > 0 || (this.applyRequired && appliedCount > 0) ? (\n <button\n class=\"filter-menu__clear ds-choice-footer__clear ds-text-action\"\n type=\"button\"\n onClick={() => {\n this.pendingRangeStartByFilter = {};\n if (this.applyRequired) {\n this.draftValues = {};\n this.draftModes = {};\n }\n this.dsClear.emit();\n }}\n >\n <ds-text as=\"span\" variant=\"text-body-medium\" color=\"inherit\">\n {this.clearLabel}\n </ds-text>\n </button>\n ) : null}\n </div>\n </div>\n );\n }\n\n private renderMatchModeFooter(filter: FilterMenuFilter, matchModes: FilterMenuMatchModes) {\n const mode: FilterMenuMatchMode = matchModes[filter.id] === 'all' ? 'all' : 'any';\n const nextMode: FilterMenuMatchMode = mode === 'any' ? 'all' : 'any';\n return (\n <div class=\"filter-menu__match-mode-footer ds-choice-footer\">\n <div class=\"filter-menu__match-mode-content ds-choice-footer__content ds-control--md\">\n <ds-text as=\"span\" variant=\"text-body-medium\" color=\"secondary\">\n Limit results to\n </ds-text>\n <button\n class=\"filter-menu__match-mode-toggle ds-text-action ds-focus-ring\"\n type=\"button\"\n aria-label={`Limit ${filter.label} results to ${nextMode} selected`}\n onClick={() => this.changeMode({ filterId: filter.id, mode: nextMode })}\n onKeyDown={(event: KeyboardEvent) => this.handlePanelKeyDown(event, filter.id)}\n >\n <ds-text as=\"span\" variant=\"text-body-medium\" color=\"inherit\">\n {mode}\n </ds-text>\n </button>\n <ds-text as=\"span\" variant=\"text-body-medium\" color=\"secondary\">\n selected\n </ds-text>\n </div>\n </div>\n );\n }\n\n render() {\n if (this.vertical)\n return (\n <Host class=\"filter-menu-vertical\">\n {this.filters.map(filter => (\n <details open key={filter.id} class=\"filter-menu-vertical__section\">\n <summary>\n <ds-icon class=\"filter-menu-vertical__chevron\" name=\"ChevronDown\" size=\"md\" />\n <ds-text variant=\"text-body-medium\" emphasis>\n {filter.label}\n </ds-text>\n </summary>\n {filter.kind !== 'date' && this.renderOptionSearch(filter)}\n <div\n id={`${this.generatedId}-${filter.id}-options`}\n role={filter.kind === 'date' ? undefined : 'listbox'}\n aria-label={filter.label}\n aria-multiselectable={filter.kind === 'multiple' ? 'true' : undefined}\n class=\"ds-choice-list ds-chrome-column ds-chrome-space--sm\"\n >\n {this.renderOptions(filter, this.values)}\n </div>\n {filter.kind === 'multiple' && this.renderMatchModeFooter(filter, this.matchModes)}\n </details>\n ))}\n </Host>\n );\n const state =\n this.closing && this.closingSnapshot\n ? this.closingSnapshot\n : {\n filters: this.filters,\n values: this.draftValues ?? this.values,\n matchModes: this.draftModes ?? this.matchModes,\n activeFilterId: this.activeFilterId,\n };\n const activeFilter = this.selectedFilter(state.filters, state.activeFilterId);\n const totalSelected = this.totalSelected(state.filters, state.values);\n const activeFilterCount = this.activeFilterCount(state.filters, state.values);\n const hasActiveFilters = activeFilterCount > 0;\n const categoriesClearFooter = this.footerLayout === 'categories-clear';\n const label = `${this.triggerLabel}${\n this.showSelectedCount && hasActiveFilters ? ` · ${activeFilterCount}` : ''\n }`;\n const textVariant = CONTROL_TEXT_VARIANT[this.size];\n const iconSize = ICON_SIZE[this.size];\n const popupId = `${this.generatedId}-popup`;\n const popupStyle: Record<string, string> = {\n position: 'fixed',\n left: '0',\n top: '0',\n width: this.menuWidth,\n transform: `translate(${Math.round(this.pos.x)}px, ${Math.round(this.pos.y)}px)`,\n zIndex: '9998',\n visibility: this.positionReady ? 'visible' : 'hidden',\n };\n\n return (\n <Host\n class={{\n 'filter-menu-host': true,\n 'filter-menu-host--external-trigger': !this.usesInternalTrigger,\n 'ds-select-trigger-host': this.usesInternalTrigger,\n [`ds-control--${this.size}`]: true,\n 'ds-table-caption-control': this.collapseLabel,\n 'ds-table-caption-control--compact': this.captionIconOnly,\n ...controlWidthClass(this.width),\n }}\n >\n {this.usesInternalTrigger\n ? this.renderCaptionTooltip(\n <button\n ref={element => {\n this.triggerElement = (element as HTMLButtonElement) ?? null;\n }}\n id={this.inputId ?? `${this.generatedId}-trigger`}\n type=\"button\"\n class={{\n trigger: true,\n 'ds-control-frame': true,\n 'ds-focus-ring-inset': true,\n 'ds-interaction-fill': true,\n 'ds-interaction-fill--selected': this.activeFill && hasActiveFilters,\n 'trigger--expanded': this.open || this.closing,\n 'ds-interaction-fill--surface-open': this.open || this.closing,\n 'trigger--bordered': this.hasBorder,\n 'trigger--has-value': hasActiveFilters && !this.neutralTrigger,\n [`ds-control--${this.size}`]: true,\n }}\n role=\"combobox\"\n aria-haspopup=\"dialog\"\n aria-expanded={String(this.open)}\n aria-controls={this.open ? popupId : undefined}\n aria-label={this.ariaLabel ?? this.menuLabel}\n onClick={(event: MouseEvent) => this.toggleFromTrigger(event)}\n onKeyDown={(event: KeyboardEvent) => this.handleTriggerKeyDown(event)}\n >\n {this.icon ? (\n <span\n class=\"trigger__prefix ds-control-icon-box ds-interaction-fill__content\"\n aria-hidden=\"true\"\n >\n <ds-icon name={this.icon} size={iconSize} color=\"inherit\" />\n </span>\n ) : null}\n {this.captionIconOnly ? null : (\n <ds-text\n class=\"trigger__label-box trigger__label trigger__label-content ds-control-label-box ds-interaction-fill__content\"\n as=\"span\"\n variant={textVariant}\n color=\"inherit\"\n lineTruncation={1}\n >\n {label}\n </ds-text>\n )}\n {this.captionIconOnly || !this.showIndicator ? null : (\n <span\n class=\"trigger__chevron ds-control-icon-box ds-interaction-fill__content\"\n aria-hidden=\"true\"\n >\n <ds-icon name=\"ChevronDown\" size={iconSize} color=\"inherit\" />\n </span>\n )}\n </button>,\n this.captionIconOnly ? label : ''\n )\n : null}\n\n {this.shouldRender || this.embedded ? (\n <div\n id={popupId}\n popover={this.embedded ? undefined : 'manual'}\n class={{\n 'filter-menu-popup': true,\n 'ds-choice-popup': !this.embedded,\n 'table-preferences-embedded': this.embedded,\n 'ds-choice-popup--closing': this.closing,\n }}\n style={this.embedded ? undefined : popupStyle}\n role=\"dialog\"\n aria-label={this.menuLabel}\n >\n {activeFilter ? (\n <div class=\"filter-menu\">\n <div class=\"filter-menu__body\">\n <div class=\"filter-menu__category-pane\">\n <div\n class=\"filter-menu__categories ds-choice-list ds-chrome-column ds-chrome-space--sm\"\n role=\"tablist\"\n aria-label={this.categoriesLabel}\n aria-orientation=\"vertical\"\n >\n {state.filters.map(filter => {\n const active = filter.id === activeFilter.id;\n const count = this.selectedCount(filter, state.values);\n return (\n <div\n key={filter.id}\n class={{\n 'filter-menu__category-section': true,\n 'ds-choice-section--divided': Boolean(filter.divider),\n }}\n >\n <button\n id={`${this.generatedId}-${filter.id}-tab`}\n type=\"button\"\n role=\"tab\"\n data-filter-category={filter.id}\n class={{\n 'filter-menu__category': true,\n 'filter-menu__category--active': active,\n 'ds-choice-item': true,\n 'ds-control-frame': true,\n 'ds-control--md': true,\n 'ds-focus-ring-inset': true,\n 'ds-focus-ring--visible': active && this.focusRingVisible,\n 'ds-interaction-fill': true,\n 'ds-interaction-fill--selected': active,\n }}\n aria-selected={String(active)}\n aria-controls={`${this.generatedId}-panel`}\n tabIndex={active ? 0 : -1}\n onMouseDown={() => {\n this.focusRingVisible = false;\n }}\n onClick={() => this.selectCategory(filter.id)}\n onKeyDown={(event: KeyboardEvent) =>\n this.handleCategoryKeyDown(event, state.filters, filter.id)\n }\n >\n <ds-text\n class=\"ds-choice-item__content ds-choice-item__label ds-control-label-box ds-interaction-fill__content\"\n as=\"span\"\n variant=\"text-body-medium\"\n color={active ? 'primary' : 'secondary'}\n >\n {filter.label}\n </ds-text>\n {count > 0 && filter.kind === 'date' ? (\n <span\n class=\"filter-menu__category-dot-box ds-interaction-fill__content\"\n aria-hidden=\"true\"\n >\n <ds-badge variant=\"dot\" hasRing={false} label=\"\" />\n </span>\n ) : count > 0 ? (\n <ds-tag\n class=\"ds-choice-item__tag ds-interaction-fill__content\"\n label={String(count)}\n size=\"sm\"\n intent=\"brand\"\n contrast=\"bold\"\n isInset\n rounded\n />\n ) : null}\n </button>\n </div>\n );\n })}\n </div>\n {categoriesClearFooter ? this.renderFooter(totalSelected, true) : null}\n </div>\n\n <div\n id={`${this.generatedId}-panel`}\n class={{\n 'filter-menu__options': true,\n 'filter-menu__options--date': activeFilter.kind === 'date',\n }}\n role=\"tabpanel\"\n aria-labelledby={`${this.generatedId}-${activeFilter.id}-tab`}\n >\n {activeFilter.kind === 'date' ? null : this.renderOptionSearch(activeFilter)}\n <div class=\"filter-menu__options-content\">\n {activeFilter.kind === 'date' ? (\n <div key={activeFilter.id} class=\"filter-menu__option-list--date\">\n {this.renderOptions(activeFilter, state.values)}\n </div>\n ) : (\n <div\n id={`${this.generatedId}-${activeFilter.id}-options`}\n key={activeFilter.id}\n class=\"filter-menu__option-list ds-choice-list ds-chrome-column ds-chrome-space--sm\"\n role=\"listbox\"\n aria-label={activeFilter.label}\n aria-multiselectable={\n activeFilter.kind === 'multiple' ? 'true' : undefined\n }\n >\n {this.renderOptions(activeFilter, state.values)}\n </div>\n )}\n </div>\n {activeFilter.kind === 'multiple'\n ? this.renderMatchModeFooter(activeFilter, state.matchModes)\n : null}\n </div>\n </div>\n\n {!categoriesClearFooter && totalSelected > 0\n ? this.renderFooter(totalSelected, false)\n : null}\n </div>\n ) : null}\n </div>\n ) : null}\n </Host>\n );\n }\n}\n",
887
- "type": "registry:ui"
888
- },
889
- {
890
- "path": "src/wc/components/FilterMenu/filter-menu-calendar.ts",
891
- "content": "import { isIsoCalendarDate, shiftIsoCalendarDate } from '../../utils';\n\nexport interface FilterMenuCalendarDay {\n value: string;\n day: number;\n inMonth: boolean;\n label: string;\n}\n\nexport const FILTER_MENU_WEEKDAYS = ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'];\n\nconst MONTH_FORMATTER = new Intl.DateTimeFormat('en-US', {\n month: 'long',\n year: 'numeric',\n timeZone: 'UTC',\n});\nconst DATE_FORMATTER = new Intl.DateTimeFormat('en-US', {\n weekday: 'long',\n month: 'long',\n day: 'numeric',\n year: 'numeric',\n timeZone: 'UTC',\n});\n\nexport function filterMenuToday(): string {\n const today = new Date();\n const year = today.getFullYear();\n const month = String(today.getMonth() + 1).padStart(2, '0');\n const day = String(today.getDate()).padStart(2, '0');\n return `${year}-${month}-${day}`;\n}\n\nexport function filterMenuCalendarMonth(value: string): string {\n return isIsoCalendarDate(value) ? value.slice(0, 7) : filterMenuToday().slice(0, 7);\n}\n\nexport function shiftFilterMenuCalendarMonth(value: string, offset: number): string {\n const [year, month] = value.split('-').map(Number);\n const date = new Date(Date.UTC(year, month - 1 + offset, 1));\n return `${date.getUTCFullYear()}-${String(date.getUTCMonth() + 1).padStart(2, '0')}`;\n}\n\nexport function filterMenuCalendarMonthLabel(value: string): string {\n const [year, month] = value.split('-').map(Number);\n return MONTH_FORMATTER.format(new Date(Date.UTC(year, month - 1, 1)));\n}\n\nexport function filterMenuCalendarDays(value: string): FilterMenuCalendarDay[] {\n const [year, month] = value.split('-').map(Number);\n const firstOfMonth = `${year}-${String(month).padStart(2, '0')}-01`;\n const firstWeekday = new Date(`${firstOfMonth}T00:00:00Z`).getUTCDay();\n const gridStart = shiftIsoCalendarDate(firstOfMonth, -firstWeekday);\n return Array.from({ length: 42 }, (_, index) => {\n const dateValue = shiftIsoCalendarDate(gridStart, index);\n const date = new Date(`${dateValue}T00:00:00Z`);\n return {\n value: dateValue,\n day: date.getUTCDate(),\n inMonth: dateValue.startsWith(`${value}-`),\n label: DATE_FORMATTER.format(date),\n };\n });\n}\n",
887
+ "content": "import {\n Component,\n Element,\n Event,\n EventEmitter,\n h,\n Host,\n Listen,\n Prop,\n State,\n type VNode,\n Watch,\n} from '@stencil/core';\nimport {\n CONTROL_TEXT_VARIANT,\n DATE_FILTER_RELATIVE_PRESETS,\n controlWidthClass,\n dateFilterRelativeValue,\n parseDateFilterValue,\n resolveChoicePopupAlignOffset,\n resolveCssLengthPx,\n resolveMotionTimeMs,\n TOKEN_CSS_LENGTHS,\n TOKEN_DEFAULTS,\n type ControlWidth,\n} from '../../utils';\nimport { observeTableCaptionCompact } from '../../utils/table-caption-compact';\nimport type { AnchoredAlign, AnchoredSide } from '../../utils/anchored-position';\nimport { AnchoredPositionController } from '../../utils/anchored-position-controller';\nimport { AnchoredOverlayInteractionController } from '../../utils/anchored-overlay-interaction-controller';\nimport { resolveAnchoredOverlayBoundaryRect } from '../../utils/anchored-overlay-boundary';\nimport { ChoiceOptionRow, ChoiceSearch } from '../../utils/choice-list-parts';\nimport { choiceListUsesSubtext } from '../../utils/choice-list';\n\nexport type FilterMenuFilterKind = 'single' | 'multiple' | 'boolean' | 'date';\nexport type FilterMenuSize = 'lg' | 'md' | 'sm' | 'xs';\nexport type FilterMenuWidth = ControlWidth;\nexport type FilterMenuFooterLayout = 'summary' | 'categories-clear';\nexport type FilterMenuMatchMode = 'any' | 'all';\ntype FilterMenuDateMode = 'range' | 'relative';\n\nexport interface FilterMenuOption {\n label: string;\n value: string;\n description?: string;\n isInactive?: boolean;\n}\n\nexport interface FilterMenuFilter {\n id: string;\n label: string;\n kind: FilterMenuFilterKind;\n options?: FilterMenuOption[];\n description?: string;\n fieldLabel?: string;\n /** Draw a standard menu-section divider after this category. */\n divider?: boolean;\n}\n\nexport type FilterMenuValue = string[] | boolean | string;\nexport type FilterMenuValues = Record<string, FilterMenuValue | undefined>;\nexport type FilterMenuMatchModes = Record<string, FilterMenuMatchMode | undefined>;\n\nexport interface FilterMenuChangeDetail {\n filterId: string;\n value: FilterMenuValue;\n}\n\nexport interface FilterMenuMatchModeChangeDetail {\n filterId: string;\n mode: FilterMenuMatchMode;\n}\n\nlet filterMenuId = 0;\n\nconst ICON_SIZE: Record<FilterMenuSize, 'lg' | 'md' | 'sm' | 'xs'> = {\n lg: 'lg',\n md: 'md',\n sm: 'sm',\n xs: 'xs',\n};\n\nconst DATE_MODE_TABS = [\n { id: 'relative', label: 'Relative' },\n { id: 'range', label: 'Range' },\n];\n\nconst RELATIVE_DATE_OPTIONS: FilterMenuOption[] = DATE_FILTER_RELATIVE_PRESETS.map(preset => ({\n label: preset.label,\n value: dateFilterRelativeValue(preset.value),\n}));\n\n@Component({\n tag: 'ds-filter-menu',\n styleUrl: 'FilterMenu.css',\n scoped: true,\n})\nexport class FilterMenu {\n @Element() el!: HTMLElement;\n\n /** Controlled popup visibility. */\n /** Render content inside a parent-owned surface; the parent owns dismissal and positioning. */\n @Prop() embedded: boolean = false;\n /** Stacked, collapsible sections for a configuration panel. */\n @Prop() vertical: boolean = false;\n @Prop({ mutable: true }) open: boolean = false;\n /** Select trigger text. */\n @Prop() triggerLabel: string = 'Filters';\n /** Append the active-filter count to the visible trigger label. */\n @Prop() showSelectedCount: boolean = true;\n /** Optional select trigger prefix icon name. */\n @Prop() icon: string | undefined = 'Filters';\n /** Select trigger density. */\n @Prop() size: FilterMenuSize = 'md';\n /** Select trigger width fit. */\n @Prop() width: FilterMenuWidth = 'hug';\n /** Show the surface-aware inset border around the select trigger. */\n /** Show the trigger chevron. */\n @Prop() showIndicator: boolean = true;\n @Prop() hasBorder: boolean = true;\n /** Show selected interaction fill when one or more criteria are active. */\n /** Keep trigger colors neutral when a value is selected. */\n @Prop() neutralTrigger: boolean = false;\n /** Stage filter edits until Apply is pressed. */\n @Prop() applyRequired: boolean = false;\n @State() private draftValues?: FilterMenuValues;\n @State() private draftModes?: FilterMenuMatchModes;\n\n private changeValue(detail: FilterMenuChangeDetail): void {\n if (this.applyRequired)\n this.draftValues = { ...(this.draftValues ?? this.values), [detail.filterId]: detail.value };\n else this.dsChange.emit(detail);\n }\n private changeMode(detail: FilterMenuMatchModeChangeDetail): void {\n if (this.applyRequired)\n this.draftModes = { ...(this.draftModes ?? this.matchModes), [detail.filterId]: detail.mode };\n else this.dsMatchModeChange.emit(detail);\n }\n private get hasPendingChanges(): boolean {\n const normalize = (value: FilterMenuValue | undefined) =>\n Array.isArray(value) ? (value.length ? [...value].sort() : undefined) : value || undefined;\n const values = this.draftValues ?? this.values;\n const modes = this.draftModes ?? this.matchModes;\n return this.filters.some(\n filter =>\n JSON.stringify(normalize(values[filter.id])) !==\n JSON.stringify(normalize(this.values[filter.id])) ||\n (modes[filter.id] ?? 'any') !== (this.matchModes[filter.id] ?? 'any')\n );\n }\n private applyDraft(): void {\n if (!this.hasPendingChanges) return;\n if (this.draftValues && Object.keys(this.draftValues).length === 0) {\n this.dsClear.emit();\n } else if (this.draftValues) {\n for (const id of new Set([...Object.keys(this.values), ...Object.keys(this.draftValues)])) {\n if (JSON.stringify(this.values[id]) !== JSON.stringify(this.draftValues[id]))\n this.dsChange.emit({\n filterId: id,\n value:\n this.draftValues[id] ??\n (Array.isArray(this.values[id])\n ? []\n : typeof this.values[id] === 'boolean'\n ? false\n : ''),\n });\n }\n }\n if (this.draftModes) {\n for (const filterId of new Set([\n ...Object.keys(this.matchModes),\n ...Object.keys(this.draftModes),\n ])) {\n const mode = this.draftModes[filterId] ?? 'any';\n if ((this.matchModes[filterId] ?? 'any') !== mode)\n this.dsMatchModeChange.emit({ filterId, mode });\n }\n }\n }\n @Prop() activeFill: boolean = false;\n /**\n * Opt into table-caption icon-only chrome below 900px. The trigger omits its\n * visible label and chevron; keep an accessible name via aria-label.\n */\n @Prop({ reflect: true }) collapseLabel: boolean = false;\n /** ID applied to the internal select trigger. */\n @Prop() inputId: string | undefined;\n /** Direct accessible name for the internal select trigger. */\n @Prop({ attribute: 'aria-label' }) ariaLabel: string | null = null;\n /** Product-owned filter categories and option definitions. */\n @Prop() filters: FilterMenuFilter[] = [];\n /** Controlled values keyed by filter id. */\n @Prop() values: FilterMenuValues = {};\n /** Controlled any/all match mode keyed by multiple-choice filter id. Defaults to any. */\n @Prop() matchModes: FilterMenuMatchModes = {};\n /** Controlled category shown in the option pane. */\n @Prop() activeFilterId: string | undefined;\n /** External trigger element to position against. */\n @Prop() anchor: HTMLElement | undefined;\n /** ID of the external trigger element used for positioning and focus return. */\n @Prop() anchorId: string | undefined;\n /** Explicit collision owner; otherwise the nearest data-ds-overlay-boundary ancestor is used. */\n @Prop() boundary: HTMLElement | undefined;\n /** Preferred popup side; collision handling may flip it. */\n @Prop() side: AnchoredSide = 'bottom';\n /** Cross-axis alignment against the trigger. */\n @Prop() align: AnchoredAlign = 'end';\n /** Gap between trigger and popup — number in px or a TokoMo length. */\n @Prop() sideOffset: number | string = TOKEN_CSS_LENGTHS.space050;\n /** Cross-axis offset — number in px or a TokoMo length. */\n @Prop() alignOffset: number | string = 0;\n /** Popup width. It remains clamped to its collision boundary by the component recipe. */\n @Prop() menuWidth: string = TOKEN_CSS_LENGTHS.menuWidthLg;\n /** Accessible name for the non-modal filter dialog. */\n @Prop() menuLabel: string = 'Filters';\n /** Accessible name for the category tab list. */\n @Prop() categoriesLabel: string = 'Filter categories';\n /** Footer action and date-clear accessible label. */\n @Prop() clearLabel: string = 'Clear';\n /** Placeholder shown in each non-date option search header. */\n @Prop() searchPlaceholder: string = 'Search';\n /** Empty-state text shown when an option search has no matches. */\n @Prop() noResultsText: string = 'No results';\n /** Footer recipe: full-width selected summary or reserved category-pane Clear action. */\n @Prop() footerLayout: FilterMenuFooterLayout = 'summary';\n /** Show a visible focus ring on initial entry after keyboard activation. */\n @Prop() initialFocusVisible: boolean = false;\n\n @State() private shouldRender = false;\n @State() private closing = false;\n @State() private positionReady = false;\n @State() private pos: { x: number; y: number } = { x: 0, y: 0 };\n @State() private focusRingVisible = false;\n @State() private activeOptionIndex = 0;\n @State() private captionCompact = false;\n @State() private dateModeByFilter: Record<string, FilterMenuDateMode> = {};\n @State() private optionQueryByFilter: Record<string, string> = {};\n\n /** Requests a controlled value replacement without closing the popup. */\n @Event() dsChange!: EventEmitter<FilterMenuChangeDetail>;\n /** Requests that the consumer clear every filter value. */\n @Event() dsClear!: EventEmitter<void>;\n /** Requests a controlled any/all mode replacement for a multiple-choice filter. */\n @Event() dsMatchModeChange!: EventEmitter<FilterMenuMatchModeChangeDetail>;\n /** Requests a controlled active-category replacement. */\n @Event() dsActiveFilterChange!: EventEmitter<string>;\n /** Requests that the controlled popup close. */\n @Event() dsClose!: EventEmitter<void>;\n /** Emitted whenever internal select-trigger activation changes popup visibility. */\n @Event() dsOpenChange!: EventEmitter<boolean>;\n /** Emitted after exit motion and rendered popup removal complete. */\n @Event() dsAfterClose!: EventEmitter<void>;\n\n private readonly generatedId = `ds-filter-menu-${++filterMenuId}`;\n private triggerElement: HTMLButtonElement | null = null;\n private pendingInitialFocusVisible = false;\n private closeTimer: ReturnType<typeof setTimeout> | null = null;\n private captionCompactDisconnect: (() => void) | undefined;\n private hasLoaded = false;\n private closingSnapshot: {\n filters: FilterMenuFilter[];\n values: FilterMenuValues;\n matchModes: FilterMenuMatchModes;\n activeFilterId: string | undefined;\n } | null = null;\n\n private readonly position = new AnchoredPositionController({\n getAnchor: () => this.resolvedAnchor,\n getPopup: () => this.el.querySelector<HTMLElement>('.filter-menu-popup'),\n getOwnerDocument: () => this.el.ownerDocument,\n measure: (anchor, popup) => {\n if (!this.open) return null;\n const anchorRect = anchor.getBoundingClientRect();\n const sectionInsetPx = resolveCssLengthPx(TOKEN_DEFAULTS.space050, TOKEN_DEFAULTS.space050);\n return {\n anchorRect,\n popupWidth: popup.offsetWidth || this.popupFallbackWidth,\n popupHeight: popup.offsetHeight || this.popupFallbackHeight,\n side: this.side,\n align: this.align,\n sideOffsetPx: resolveCssLengthPx(this.sideOffset, TOKEN_DEFAULTS.space050),\n alignOffsetPx: resolveChoicePopupAlignOffset({\n align: this.align,\n alignOffsetPx: resolveCssLengthPx(this.alignOffset, 0),\n sectionInsetPx,\n }),\n viewportPadPx: this.viewportPad,\n viewportWidth: window.innerWidth,\n viewportHeight: window.innerHeight,\n collisionRect: resolveAnchoredOverlayBoundaryRect(anchor, this.boundary),\n };\n },\n apply: ({ x, y }) => {\n this.pos = { x, y };\n },\n onReady: () => {\n this.positionReady = true;\n },\n liveUpdate: 'double-frame',\n observeResize: true,\n topLayer: true,\n });\n private readonly interaction = new AnchoredOverlayInteractionController({\n getAnchor: () => this.resolvedAnchor,\n getPopup: () => this.el.querySelector<HTMLElement>('.filter-menu-popup'),\n getOwnerDocument: () => this.el.ownerDocument,\n onOutsideActivation: () => this.close(),\n });\n\n componentDidLoad() {\n this.hasLoaded = true;\n this.syncCaptionCompactObserver();\n if (this.open) this.onOpenChange(true);\n }\n\n connectedCallback() {\n if (!this.hasLoaded) return;\n this.syncCaptionCompactObserver();\n if (this.open) this.onOpenChange(true);\n }\n\n disconnectedCallback() {\n this.disconnectCaptionCompactObserver();\n this.position.unobserve();\n this.teardownListeners();\n }\n\n @Watch('collapseLabel')\n onCollapseLabelChange() {\n this.syncCaptionCompactObserver();\n }\n\n @Watch('open')\n onOpenChange(isOpen: boolean) {\n if (!isOpen) {\n this.draftValues = undefined;\n this.draftModes = undefined;\n }\n if (this.embedded) return;\n if (isOpen) {\n this.teardownListeners();\n this.closingSnapshot = null;\n this.shouldRender = true;\n this.closing = false;\n this.positionReady = false;\n this.focusRingVisible = this.pendingInitialFocusVisible || this.initialFocusVisible;\n this.setupListeners();\n this.position.schedule(() => this.focusInitialCategory());\n return;\n }\n\n if (!this.shouldRender) return;\n this.position.cancel();\n this.captureClosingSnapshot();\n this.closing = true;\n this.teardownListeners();\n const duration = resolveMotionTimeMs(\n TOKEN_DEFAULTS.motionShort2,\n TOKEN_DEFAULTS.animationDurationShort3\n );\n if (duration <= 0) {\n this.finishClose();\n return;\n }\n this.closeTimer = setTimeout(() => this.finishClose(), duration);\n }\n\n @Watch('anchor')\n @Watch('anchorId')\n @Watch('boundary')\n @Watch('side')\n @Watch('align')\n @Watch('sideOffset')\n @Watch('alignOffset')\n @Watch('menuWidth')\n onPositionInputChange() {\n if (this.open) this.position.schedule();\n }\n\n @Listen('keydown')\n handleKeyDown(event: KeyboardEvent) {\n if (this.embedded && (event.key === 'Escape' || event.key === 'Tab')) return;\n if ((!this.shouldRender && !this.embedded) || this.closing) return;\n if (event.key === 'Escape') {\n event.preventDefault();\n this.close();\n return;\n }\n if (event.key !== 'Tab' || !this.tabLeavesPopup(event)) return;\n event.preventDefault();\n this.close(false);\n this.interaction.moveFocusAfterTab(event.shiftKey);\n }\n\n private get resolvedAnchor(): HTMLElement | null {\n if (this.anchor) return this.anchor;\n if (this.anchorId) return document.getElementById(this.anchorId);\n return this.triggerElement;\n }\n\n private get usesInternalTrigger(): boolean {\n return !this.embedded && !this.anchor && !this.anchorId;\n }\n\n private get viewportPad(): number {\n return resolveCssLengthPx(TOKEN_DEFAULTS.space050, TOKEN_DEFAULTS.space050);\n }\n\n private get popupFallbackWidth(): number {\n return resolveCssLengthPx(TOKEN_DEFAULTS.menuWidthLg, TOKEN_DEFAULTS.menuWidthLg);\n }\n\n private get popupFallbackHeight(): number {\n return resolveCssLengthPx(TOKEN_DEFAULTS.menuFallbackHeight, TOKEN_DEFAULTS.menuFallbackHeight);\n }\n\n private setupListeners() {\n this.interaction.connect();\n this.position.observe();\n }\n\n private teardownListeners() {\n this.position.unobserve();\n this.interaction.disconnect();\n if (this.closeTimer) {\n clearTimeout(this.closeTimer);\n this.closeTimer = null;\n }\n }\n\n private close(restoreFocus = true) {\n this.captureClosingSnapshot();\n if (restoreFocus) this.interaction.focusAnchor();\n this.dsOpenChange.emit(false);\n this.dsClose.emit();\n this.open = false;\n this.onOpenChange(false);\n }\n\n private toggleFromTrigger(event: MouseEvent) {\n if (this.open) {\n this.close();\n return;\n }\n this.pendingInitialFocusVisible = event.detail === 0;\n this.open = true;\n this.dsOpenChange.emit(true);\n this.onOpenChange(true);\n }\n\n private handleTriggerKeyDown(event: KeyboardEvent) {\n if (event.key !== 'ArrowDown' || this.open) return;\n event.preventDefault();\n this.pendingInitialFocusVisible = true;\n this.open = true;\n this.dsOpenChange.emit(true);\n this.onOpenChange(true);\n }\n\n private finishClose() {\n const popup = this.el.querySelector<HTMLElement>('.filter-menu-popup');\n if (popup?.matches(':popover-open')) popup.hidePopover();\n this.shouldRender = false;\n this.closing = false;\n this.closingSnapshot = null;\n this.closeTimer = null;\n this.dateModeByFilter = {};\n this.optionQueryByFilter = {};\n this.dsAfterClose.emit();\n }\n\n private captureClosingSnapshot() {\n if (this.closingSnapshot) return;\n this.closingSnapshot = {\n filters: this.filters.map(filter => ({\n ...filter,\n options: filter.options?.map(option => ({ ...option })),\n })),\n values: Object.fromEntries(\n Object.entries(this.values).map(([key, value]) => [\n key,\n Array.isArray(value) ? [...value] : value,\n ])\n ),\n matchModes: { ...this.matchModes },\n activeFilterId: this.activeFilterId,\n };\n }\n\n private focusInitialCategory() {\n requestAnimationFrame(() => {\n this.el.querySelector<HTMLElement>('.filter-menu__category[tabindex=\"0\"]')?.focus();\n this.pendingInitialFocusVisible = false;\n });\n }\n\n private tabLeavesPopup(event: KeyboardEvent): boolean {\n return this.interaction.tabLeavesPopup(event);\n }\n\n private selectedFilter(filters: FilterMenuFilter[], activeFilterId: string | undefined) {\n return filters.find(filter => filter.id === activeFilterId) ?? filters[0];\n }\n\n private selectedCount(filter: FilterMenuFilter, values: FilterMenuValues): number {\n const value = values[filter.id];\n if (filter.kind === 'multiple') return Array.isArray(value) ? value.length : 0;\n if (filter.kind === 'boolean') return value === true ? 1 : 0;\n return typeof value === 'string' && value.length > 0 ? 1 : 0;\n }\n\n private totalSelected(filters: FilterMenuFilter[], values: FilterMenuValues): number {\n return filters.reduce((total, filter) => total + this.selectedCount(filter, values), 0);\n }\n\n private activeFilterCount(filters: FilterMenuFilter[], values: FilterMenuValues): number {\n return filters.filter(filter => this.selectedCount(filter, values) > 0).length;\n }\n\n private selectCategory(filterId: string, focus = false) {\n this.activeOptionIndex = 0;\n this.dsActiveFilterChange.emit(filterId);\n if (!focus) return;\n requestAnimationFrame(() => {\n this.el.querySelector<HTMLElement>(`[data-filter-category=\"${filterId}\"]`)?.focus();\n });\n }\n\n private handleCategoryKeyDown(\n event: KeyboardEvent,\n filters: FilterMenuFilter[],\n filterId: string\n ) {\n const currentIndex = filters.findIndex(filter => filter.id === filterId);\n let nextIndex: number;\n if (event.key === 'ArrowDown') nextIndex = (currentIndex + 1) % filters.length;\n else if (event.key === 'ArrowUp')\n nextIndex = (currentIndex - 1 + filters.length) % filters.length;\n else if (event.key === 'Home') nextIndex = 0;\n else if (event.key === 'End') nextIndex = filters.length - 1;\n else if (event.key === 'ArrowRight') {\n event.preventDefault();\n requestAnimationFrame(() => {\n this.el\n .querySelector<HTMLElement>(\n '.filter-menu__options [role=\"option\"], .filter-menu__options [data-date-option], .filter-menu__options input'\n )\n ?.focus();\n });\n return;\n } else return;\n\n event.preventDefault();\n this.focusRingVisible = true;\n this.selectCategory(filters[nextIndex].id, true);\n }\n\n private handlePanelKeyDown(event: KeyboardEvent, filterId: string) {\n if (event.key !== 'ArrowLeft') return;\n event.preventDefault();\n this.el.querySelector<HTMLElement>(`[data-filter-category=\"${filterId}\"]`)?.focus();\n }\n\n private handleOptionKeyDown(\n event: KeyboardEvent,\n filter: FilterMenuFilter,\n option: FilterMenuOption,\n index: number,\n values: FilterMenuValues,\n visibleOptions: FilterMenuOption[] = filter.options ?? []\n ) {\n if (event.key === 'ArrowLeft') {\n this.handlePanelKeyDown(event, filter.id);\n return;\n }\n if (event.key === 'Enter' || event.key === ' ') {\n event.preventDefault();\n this.selectOption(filter, option, values);\n return;\n }\n if (!['ArrowDown', 'ArrowUp', 'Home', 'End'].includes(event.key)) return;\n event.preventDefault();\n const enabled = visibleOptions\n .map((candidate, optionIndex) => ({ candidate, optionIndex }))\n .filter(({ candidate }) => !candidate.isInactive)\n .map(({ optionIndex }) => optionIndex);\n if (!enabled.length) return;\n const current = enabled.indexOf(index);\n let next: number;\n if (event.key === 'Home') next = enabled[0];\n else if (event.key === 'End') next = enabled[enabled.length - 1];\n else {\n const direction = event.key === 'ArrowDown' ? 1 : -1;\n const start = current >= 0 ? current : direction === 1 ? -1 : 0;\n next = enabled[(start + direction + enabled.length) % enabled.length];\n }\n this.activeOptionIndex = next;\n this.focusRingVisible = true;\n requestAnimationFrame(() => {\n this.el\n .querySelector<HTMLElement>(`#${this.generatedId}-${filter.id}-option-${next}`)\n ?.focus();\n });\n }\n\n private optionMatchesQuery(option: FilterMenuOption, query: string): boolean {\n const normalized = query.trim().toLocaleLowerCase();\n if (!normalized) return true;\n return `${option.label} ${option.description ?? ''}`.toLocaleLowerCase().includes(normalized);\n }\n\n private visibleOptions(\n filter: FilterMenuFilter,\n query = this.optionQueryByFilter[filter.id] ?? ''\n ) {\n if (filter.kind === 'boolean') {\n const option = this.booleanOption(filter);\n return this.optionMatchesQuery(option, query) ? [option] : [];\n }\n return (filter.options ?? []).filter(option => this.optionMatchesQuery(option, query));\n }\n\n private booleanOption(filter: FilterMenuFilter): FilterMenuOption {\n return {\n label: filter.fieldLabel ?? filter.label,\n value: 'true',\n description: filter.description,\n };\n }\n\n private setOptionQuery(filter: FilterMenuFilter, value: string) {\n const visibleOptions = this.visibleOptions(filter, value);\n const firstEnabled = visibleOptions.findIndex(option => !option.isInactive);\n this.activeOptionIndex = firstEnabled;\n this.focusRingVisible = false;\n this.optionQueryByFilter = { ...this.optionQueryByFilter, [filter.id]: value };\n requestAnimationFrame(() => {\n const content = this.el.querySelector<HTMLElement>('.filter-menu__options-content');\n if (content) content.scrollTop = 0;\n this.position.schedule();\n });\n }\n\n private handleOptionSearchKeyDown(event: KeyboardEvent, filter: FilterMenuFilter) {\n if (event.key !== 'ArrowDown' && event.key !== 'ArrowUp') return;\n const visibleOptions = this.visibleOptions(filter);\n const enabled = visibleOptions\n .map((option, index) => ({ option, index }))\n .filter(({ option }) => !option.isInactive)\n .map(({ index }) => index);\n if (!enabled.length) return;\n event.preventDefault();\n const next = event.key === 'ArrowDown' ? enabled[0] : enabled[enabled.length - 1];\n this.activeOptionIndex = next;\n this.focusRingVisible = true;\n requestAnimationFrame(() => {\n this.el\n .querySelector<HTMLElement>(`#${this.generatedId}-${filter.id}-option-${next}`)\n ?.focus();\n });\n }\n\n private toggleMultiple(\n filter: FilterMenuFilter,\n option: FilterMenuOption,\n checked: boolean,\n values: FilterMenuValues\n ) {\n if (option.isInactive) return;\n const current = Array.isArray(values[filter.id]) ? (values[filter.id] as string[]) : [];\n const selected = new Set(current);\n if (checked) selected.add(option.value);\n else selected.delete(option.value);\n const ordered = (filter.options ?? [])\n .map(candidate => candidate.value)\n .filter(value => selected.has(value));\n this.changeValue({ filterId: filter.id, value: ordered });\n }\n\n private selectOption(\n filter: FilterMenuFilter,\n option: FilterMenuOption,\n values: FilterMenuValues\n ) {\n if (option.isInactive) return;\n if (filter.kind === 'single') {\n this.changeValue({ filterId: filter.id, value: option.value });\n return;\n }\n const selected = Array.isArray(values[filter.id])\n ? (values[filter.id] as string[]).includes(option.value)\n : false;\n this.toggleMultiple(filter, option, !selected, values);\n }\n\n private dateMode(filterId: string, value: FilterMenuValue | undefined): FilterMenuDateMode {\n return this.dateModeByFilter[filterId] ?? parseDateFilterValue(value)?.kind ?? 'relative';\n }\n\n private setDateMode(filter: FilterMenuFilter, mode: string) {\n if (mode !== 'range' && mode !== 'relative') return;\n this.dateModeByFilter = { ...this.dateModeByFilter, [filter.id]: mode };\n this.activeOptionIndex = 0;\n }\n\n private renderRelativeDateOptions(filter: FilterMenuFilter, value: FilterMenuValue | undefined) {\n const relativeFilter: FilterMenuFilter = {\n ...filter,\n kind: 'single',\n options: RELATIVE_DATE_OPTIONS,\n };\n return (\n <div\n class=\"filter-menu__date-relative ds-choice-list ds-chrome-column ds-chrome-space--sm\"\n role=\"listbox\"\n aria-label=\"Relative date\"\n >\n {RELATIVE_DATE_OPTIONS.map((option, index) => (\n <ChoiceOptionRow\n size=\"md\"\n id={`${this.generatedId}-${filter.id}-relative-${index}`}\n option={option}\n selected={value === option.value}\n active={index === this.activeOptionIndex}\n focusRingVisible={this.focusRingVisible}\n usesSubtext={false}\n tabIndex={index === this.activeOptionIndex ? 0 : -1}\n onFocus={() => {\n this.activeOptionIndex = index;\n }}\n onKeyDown={(event: KeyboardEvent) =>\n this.handleOptionKeyDown(event, relativeFilter, option, index, {\n [filter.id]: value,\n })\n }\n onHover={() => {\n this.focusRingVisible = false;\n this.activeOptionIndex = index;\n }}\n onSelect={() => this.changeValue({ filterId: filter.id, value: option.value })}\n />\n ))}\n </div>\n );\n }\n\n private renderDateCalendar(filter: FilterMenuFilter, value: FilterMenuValue | undefined) {\n return (\n <ds-calendar\n selectionMode=\"range\"\n value={typeof value === 'string' ? value : ''}\n onDsChange={(event: CustomEvent<string>) => {\n event.stopPropagation();\n this.changeValue({ filterId: filter.id, value: event.detail });\n }}\n />\n );\n }\n\n private renderDateFilter(filter: FilterMenuFilter, value: FilterMenuValue | undefined) {\n const mode = this.dateMode(filter.id, value);\n return (\n <div class=\"filter-menu__date\">\n <header class=\"filter-menu__date-header ds-chrome-header ds-chrome-header--bounded\">\n <ds-tab-group\n ariaLabel=\"Date filter mode\"\n size=\"md\"\n width=\"fill\"\n hasContainer={false}\n value={mode}\n tabs={DATE_MODE_TABS}\n onDsChange={(event: CustomEvent<string>) => {\n event.stopPropagation();\n this.setDateMode(filter, event.detail);\n }}\n />\n </header>\n <div class=\"filter-menu__date-body\">\n {mode === 'relative'\n ? this.renderRelativeDateOptions(filter, value)\n : this.renderDateCalendar(filter, value)}\n </div>\n </div>\n );\n }\n\n private renderOptionSearch(filter: FilterMenuFilter) {\n return (\n <div class=\"filter-menu__option-search\">\n <ChoiceSearch\n size=\"md\"\n hasFocusBoundary={false}\n hasInteractionFill={false}\n value={this.optionQueryByFilter[filter.id] ?? ''}\n placeholder={this.searchPlaceholder}\n ariaLabel={`Search ${filter.label} options`}\n controls={`${this.generatedId}-${filter.id}-options`}\n inputRef={() => undefined}\n clearLabel={`Clear ${filter.label} search`}\n onValueChange={value => this.setOptionQuery(filter, value)}\n onKeyDown={(event: KeyboardEvent) => this.handleOptionSearchKeyDown(event, filter)}\n />\n </div>\n );\n }\n\n private renderNoOptionResults() {\n return (\n <div\n class=\"ds-choice-empty ds-empty-region\"\n role=\"option\"\n aria-selected=\"false\"\n aria-disabled=\"true\"\n aria-label={this.noResultsText}\n aria-live=\"polite\"\n >\n <ds-empty-state body={this.noResultsText} />\n </div>\n );\n }\n\n private renderOptions(filter: FilterMenuFilter, values: FilterMenuValues) {\n const value = values[filter.id];\n if (filter.kind === 'multiple' || filter.kind === 'single') {\n const selected = Array.isArray(value) ? value : [];\n const allOptions = filter.options ?? [];\n const options = this.visibleOptions(filter);\n const usesSubtext = choiceListUsesSubtext(\n allOptions.map(option => ({\n label: option.label,\n value: option.value,\n subtext: option.description,\n }))\n );\n if (!options.length) return this.renderNoOptionResults();\n return options.map((option, index) => {\n const isSelected =\n filter.kind === 'multiple' ? selected.includes(option.value) : value === option.value;\n return (\n <ChoiceOptionRow\n size=\"md\"\n id={`${this.generatedId}-${filter.id}-option-${index}`}\n option={{\n label: option.label,\n value: option.value,\n subtext: option.description,\n isInactive: option.isInactive,\n }}\n selected={isSelected}\n active={index === this.activeOptionIndex}\n focusRingVisible={this.focusRingVisible}\n usesSubtext={usesSubtext}\n tabIndex={index === this.activeOptionIndex ? 0 : -1}\n leading={\n filter.kind === 'multiple' ? (\n <span\n class=\"ds-choice-item__icon ds-control-icon-box ds-interaction-fill__content\"\n aria-hidden=\"true\"\n >\n <ds-checkbox label=\"\" size=\"md\" checked={isSelected} presentation />\n </span>\n ) : undefined\n }\n onFocus={() => {\n this.activeOptionIndex = index;\n }}\n onKeyDown={(event: KeyboardEvent) =>\n this.handleOptionKeyDown(event, filter, option, index, values, options)\n }\n onHover={() => {\n this.focusRingVisible = false;\n this.activeOptionIndex = index;\n }}\n onSelect={() => this.selectOption(filter, option, values)}\n />\n );\n });\n }\n\n if (filter.kind === 'boolean') {\n const [option] = this.visibleOptions(filter);\n if (!option) return this.renderNoOptionResults();\n return (\n <ChoiceOptionRow\n size=\"md\"\n id={`${this.generatedId}-${filter.id}-option-0`}\n option={{\n label: option.label,\n value: option.value,\n subtext: option.description,\n }}\n selected={value === true}\n active\n focusRingVisible={this.focusRingVisible}\n usesSubtext={Boolean(option.description)}\n tabIndex={0}\n leading={\n <span\n class=\"ds-choice-item__icon ds-control-icon-box ds-interaction-fill__content\"\n aria-hidden=\"true\"\n >\n <ds-checkbox label=\"\" size=\"md\" checked={value === true} presentation />\n </span>\n }\n onKeyDown={(event: KeyboardEvent) => {\n if (event.key === 'ArrowLeft') this.handlePanelKeyDown(event, filter.id);\n else if (event.key === 'Enter' || event.key === ' ') {\n event.preventDefault();\n this.changeValue({ filterId: filter.id, value: value !== true });\n }\n }}\n onHover={() => {\n this.focusRingVisible = false;\n }}\n onSelect={() => this.changeValue({ filterId: filter.id, value: value !== true })}\n />\n );\n }\n\n return this.renderDateFilter(filter, value);\n }\n\n private get captionIconOnly(): boolean {\n return (\n this.collapseLabel && this.captionCompact && this.usesInternalTrigger && Boolean(this.icon)\n );\n }\n\n private syncCaptionCompactObserver(): void {\n this.disconnectCaptionCompactObserver();\n if (!this.collapseLabel) {\n if (this.captionCompact) this.captionCompact = false;\n return;\n }\n this.captionCompactDisconnect = observeTableCaptionCompact(this.el, compact => {\n if (this.captionCompact !== compact) this.captionCompact = compact;\n });\n }\n\n private disconnectCaptionCompactObserver(): void {\n this.captionCompactDisconnect?.();\n this.captionCompactDisconnect = undefined;\n }\n\n private renderCaptionTooltip(trigger: VNode, label: string): VNode {\n if (!this.collapseLabel) return trigger;\n return (\n <ds-tooltip label={label} side=\"top\" size=\"sm\">\n {trigger}\n </ds-tooltip>\n );\n }\n\n private renderFooter(totalSelected: number, categoriesClear: boolean) {\n const appliedCount = this.totalSelected(this.filters, this.values);\n if (this.applyRequired && totalSelected === 0 && appliedCount === 0) return null;\n return (\n <div\n class={{\n 'filter-menu__footer': true,\n 'filter-menu__footer--categories-clear': categoriesClear,\n 'ds-choice-footer': true,\n }}\n aria-hidden={\n !this.applyRequired &&\n categoriesClear &&\n totalSelected === 0 &&\n !this.draftValues &&\n !this.draftModes\n ? 'true'\n : undefined\n }\n >\n <div class=\"ds-choice-footer__content ds-control--md\">\n {!categoriesClear ? (\n <ds-text\n class=\"ds-choice-footer__summary\"\n as=\"span\"\n variant=\"text-body-medium\"\n color=\"secondary\"\n aria-live=\"polite\"\n >\n {totalSelected} selected\n </ds-text>\n ) : null}\n {this.applyRequired ? (\n <button\n class=\"filter-menu__apply ds-choice-footer__clear ds-text-action\"\n type=\"button\"\n disabled={!this.hasPendingChanges}\n onClick={() => this.applyDraft()}\n >\n <ds-text as=\"span\" variant=\"text-body-medium\" color=\"inherit\">\n Apply\n </ds-text>\n </button>\n ) : null}\n {this.applyRequired && (totalSelected > 0 || appliedCount > 0) ? (\n <ds-text\n class=\"filter-menu__action-separator\"\n as=\"span\"\n variant=\"text-body-medium\"\n color=\"tertiary\"\n aria-hidden=\"true\"\n >\n ·\n </ds-text>\n ) : null}\n {totalSelected > 0 || (this.applyRequired && appliedCount > 0) ? (\n <button\n class=\"filter-menu__clear ds-choice-footer__clear ds-text-action\"\n type=\"button\"\n onClick={() => {\n if (this.applyRequired) {\n this.draftValues = {};\n this.draftModes = {};\n }\n this.dsClear.emit();\n }}\n >\n <ds-text as=\"span\" variant=\"text-body-medium\" color=\"inherit\">\n {this.clearLabel}\n </ds-text>\n </button>\n ) : null}\n </div>\n </div>\n );\n }\n\n private renderMatchModeFooter(filter: FilterMenuFilter, matchModes: FilterMenuMatchModes) {\n const mode: FilterMenuMatchMode = matchModes[filter.id] === 'all' ? 'all' : 'any';\n const nextMode: FilterMenuMatchMode = mode === 'any' ? 'all' : 'any';\n return (\n <div class=\"filter-menu__match-mode-footer ds-choice-footer\">\n <div class=\"filter-menu__match-mode-content ds-choice-footer__content ds-control--md\">\n <ds-text as=\"span\" variant=\"text-body-medium\" color=\"secondary\">\n Limit results to\n </ds-text>\n <button\n class=\"filter-menu__match-mode-toggle ds-text-action ds-focus-ring\"\n type=\"button\"\n aria-label={`Limit ${filter.label} results to ${nextMode} selected`}\n onClick={() => this.changeMode({ filterId: filter.id, mode: nextMode })}\n onKeyDown={(event: KeyboardEvent) => this.handlePanelKeyDown(event, filter.id)}\n >\n <ds-text as=\"span\" variant=\"text-body-medium\" color=\"inherit\">\n {mode}\n </ds-text>\n </button>\n <ds-text as=\"span\" variant=\"text-body-medium\" color=\"secondary\">\n selected\n </ds-text>\n </div>\n </div>\n );\n }\n\n render() {\n if (this.vertical)\n return (\n <Host class=\"filter-menu-vertical\">\n {this.filters.map(filter => (\n <details open key={filter.id} class=\"filter-menu-vertical__section\">\n <summary>\n <ds-icon class=\"filter-menu-vertical__chevron\" name=\"ChevronDown\" size=\"md\" />\n <ds-text variant=\"text-body-medium\" emphasis>\n {filter.label}\n </ds-text>\n </summary>\n {filter.kind !== 'date' && this.renderOptionSearch(filter)}\n <div\n id={`${this.generatedId}-${filter.id}-options`}\n role={filter.kind === 'date' ? undefined : 'listbox'}\n aria-label={filter.label}\n aria-multiselectable={filter.kind === 'multiple' ? 'true' : undefined}\n class=\"ds-choice-list ds-chrome-column ds-chrome-space--sm\"\n >\n {this.renderOptions(filter, this.values)}\n </div>\n {filter.kind === 'multiple' && this.renderMatchModeFooter(filter, this.matchModes)}\n </details>\n ))}\n </Host>\n );\n const state =\n this.closing && this.closingSnapshot\n ? this.closingSnapshot\n : {\n filters: this.filters,\n values: this.draftValues ?? this.values,\n matchModes: this.draftModes ?? this.matchModes,\n activeFilterId: this.activeFilterId,\n };\n const activeFilter = this.selectedFilter(state.filters, state.activeFilterId);\n const totalSelected = this.totalSelected(state.filters, state.values);\n const activeFilterCount = this.activeFilterCount(state.filters, state.values);\n const hasActiveFilters = activeFilterCount > 0;\n const categoriesClearFooter = this.footerLayout === 'categories-clear';\n const label = `${this.triggerLabel}${\n this.showSelectedCount && hasActiveFilters ? ` · ${activeFilterCount}` : ''\n }`;\n const textVariant = CONTROL_TEXT_VARIANT[this.size];\n const iconSize = ICON_SIZE[this.size];\n const popupId = `${this.generatedId}-popup`;\n const popupStyle: Record<string, string> = {\n position: 'fixed',\n left: '0',\n top: '0',\n width: this.menuWidth,\n transform: `translate(${Math.round(this.pos.x)}px, ${Math.round(this.pos.y)}px)`,\n zIndex: '9998',\n visibility: this.positionReady ? 'visible' : 'hidden',\n };\n\n return (\n <Host\n class={{\n 'filter-menu-host': true,\n 'filter-menu-host--external-trigger': !this.usesInternalTrigger,\n 'ds-select-trigger-host': this.usesInternalTrigger,\n [`ds-control--${this.size}`]: true,\n 'ds-table-caption-control': this.collapseLabel,\n 'ds-table-caption-control--compact': this.captionIconOnly,\n ...controlWidthClass(this.width),\n }}\n >\n {this.usesInternalTrigger\n ? this.renderCaptionTooltip(\n <button\n ref={element => {\n this.triggerElement = (element as HTMLButtonElement) ?? null;\n }}\n id={this.inputId ?? `${this.generatedId}-trigger`}\n type=\"button\"\n class={{\n trigger: true,\n 'ds-control-frame': true,\n 'ds-focus-ring-inset': true,\n 'ds-interaction-fill': true,\n 'ds-interaction-fill--selected': this.activeFill && hasActiveFilters,\n 'trigger--expanded': this.open || this.closing,\n 'ds-interaction-fill--surface-open': this.open || this.closing,\n 'trigger--bordered': this.hasBorder,\n 'trigger--has-value': hasActiveFilters && !this.neutralTrigger,\n [`ds-control--${this.size}`]: true,\n }}\n role=\"combobox\"\n aria-haspopup=\"dialog\"\n aria-expanded={String(this.open)}\n aria-controls={this.open ? popupId : undefined}\n aria-label={this.ariaLabel ?? this.menuLabel}\n onClick={(event: MouseEvent) => this.toggleFromTrigger(event)}\n onKeyDown={(event: KeyboardEvent) => this.handleTriggerKeyDown(event)}\n >\n {this.icon ? (\n <span\n class=\"trigger__prefix ds-control-icon-box ds-interaction-fill__content\"\n aria-hidden=\"true\"\n >\n <ds-icon name={this.icon} size={iconSize} color=\"inherit\" />\n </span>\n ) : null}\n {this.captionIconOnly ? null : (\n <ds-text\n class=\"trigger__label-box trigger__label trigger__label-content ds-control-label-box ds-interaction-fill__content\"\n as=\"span\"\n variant={textVariant}\n color=\"inherit\"\n lineTruncation={1}\n >\n {label}\n </ds-text>\n )}\n {this.captionIconOnly || !this.showIndicator ? null : (\n <span\n class=\"trigger__chevron ds-control-icon-box ds-interaction-fill__content\"\n aria-hidden=\"true\"\n >\n <ds-icon name=\"ChevronDown\" size={iconSize} color=\"inherit\" />\n </span>\n )}\n </button>,\n this.captionIconOnly ? label : ''\n )\n : null}\n\n {this.shouldRender || this.embedded ? (\n <div\n id={popupId}\n popover={this.embedded ? undefined : 'manual'}\n class={{\n 'filter-menu-popup': true,\n 'ds-choice-popup': !this.embedded,\n 'table-preferences-embedded': this.embedded,\n 'ds-choice-popup--closing': this.closing,\n }}\n style={this.embedded ? undefined : popupStyle}\n role=\"dialog\"\n aria-label={this.menuLabel}\n >\n {activeFilter ? (\n <div class=\"filter-menu\">\n <div class=\"filter-menu__body\">\n <div class=\"filter-menu__category-pane\">\n <div\n class=\"filter-menu__categories ds-choice-list ds-chrome-column ds-chrome-space--sm\"\n role=\"tablist\"\n aria-label={this.categoriesLabel}\n aria-orientation=\"vertical\"\n >\n {state.filters.map(filter => {\n const active = filter.id === activeFilter.id;\n const count = this.selectedCount(filter, state.values);\n return (\n <div\n key={filter.id}\n class={{\n 'filter-menu__category-section': true,\n 'ds-choice-section--divided': Boolean(filter.divider),\n }}\n >\n <button\n id={`${this.generatedId}-${filter.id}-tab`}\n type=\"button\"\n role=\"tab\"\n data-filter-category={filter.id}\n class={{\n 'filter-menu__category': true,\n 'filter-menu__category--active': active,\n 'ds-choice-item': true,\n 'ds-control-frame': true,\n 'ds-control--md': true,\n 'ds-focus-ring-inset': true,\n 'ds-focus-ring--visible': active && this.focusRingVisible,\n 'ds-interaction-fill': true,\n 'ds-interaction-fill--selected': active,\n }}\n aria-selected={String(active)}\n aria-controls={`${this.generatedId}-panel`}\n tabIndex={active ? 0 : -1}\n onMouseDown={() => {\n this.focusRingVisible = false;\n }}\n onClick={() => this.selectCategory(filter.id)}\n onKeyDown={(event: KeyboardEvent) =>\n this.handleCategoryKeyDown(event, state.filters, filter.id)\n }\n >\n <ds-text\n class=\"ds-choice-item__content ds-choice-item__label ds-control-label-box ds-interaction-fill__content\"\n as=\"span\"\n variant=\"text-body-medium\"\n color={active ? 'primary' : 'secondary'}\n >\n {filter.label}\n </ds-text>\n {count > 0 && filter.kind === 'date' ? (\n <span\n class=\"filter-menu__category-dot-box ds-interaction-fill__content\"\n aria-hidden=\"true\"\n >\n <ds-badge variant=\"dot\" hasRing={false} label=\"\" />\n </span>\n ) : count > 0 ? (\n <ds-tag\n class=\"ds-choice-item__tag ds-interaction-fill__content\"\n label={String(count)}\n size=\"sm\"\n intent=\"brand\"\n contrast=\"bold\"\n isInset\n rounded\n />\n ) : null}\n </button>\n </div>\n );\n })}\n </div>\n {categoriesClearFooter ? this.renderFooter(totalSelected, true) : null}\n </div>\n\n <div\n id={`${this.generatedId}-panel`}\n class={{\n 'filter-menu__options': true,\n 'filter-menu__options--date': activeFilter.kind === 'date',\n }}\n role=\"tabpanel\"\n aria-labelledby={`${this.generatedId}-${activeFilter.id}-tab`}\n >\n {activeFilter.kind === 'date' ? null : this.renderOptionSearch(activeFilter)}\n <div class=\"filter-menu__options-content\">\n {activeFilter.kind === 'date' ? (\n <div key={activeFilter.id} class=\"filter-menu__option-list--date\">\n {this.renderOptions(activeFilter, state.values)}\n </div>\n ) : (\n <div\n id={`${this.generatedId}-${activeFilter.id}-options`}\n key={activeFilter.id}\n class=\"filter-menu__option-list ds-choice-list ds-chrome-column ds-chrome-space--sm\"\n role=\"listbox\"\n aria-label={activeFilter.label}\n aria-multiselectable={\n activeFilter.kind === 'multiple' ? 'true' : undefined\n }\n >\n {this.renderOptions(activeFilter, state.values)}\n </div>\n )}\n </div>\n {activeFilter.kind === 'multiple'\n ? this.renderMatchModeFooter(activeFilter, state.matchModes)\n : null}\n </div>\n </div>\n\n {!categoriesClearFooter && totalSelected > 0\n ? this.renderFooter(totalSelected, false)\n : null}\n </div>\n ) : null}\n </div>\n ) : null}\n </Host>\n );\n }\n}\n",
892
888
  "type": "registry:ui"
893
889
  }
894
890
  ]